Commit 34549cce authored by neo's avatar neo

[DEV] add xxkp xxkp

parent 3329163f
......@@ -21,6 +21,7 @@ import org.springframework.stereotype.Service;
import pwc.taxtech.atms.common.CommonUtils;
import pwc.taxtech.atms.common.util.DateUtils;
import pwc.taxtech.atms.constant.enums.EnumTbImportType;
import pwc.taxtech.atms.dao.DimensionValueOrgMapper;
import pwc.taxtech.atms.dao.OrganizationMapper;
import pwc.taxtech.atms.dao.ProjectMapper;
import pwc.taxtech.atms.dpo.PagingResultDto;
......@@ -30,6 +31,7 @@ import pwc.taxtech.atms.dto.vatdto.QueryEvidenceDto;
import pwc.taxtech.atms.entity.Organization;
import pwc.taxtech.atms.entity.OrganizationExample;
import pwc.taxtech.atms.entity.Project;
import pwc.taxtech.atms.invoice.OutputFpxxtbMapper;
import pwc.taxtech.atms.invoice.OutputInvoiceDetailMapper;
import pwc.taxtech.atms.invoice.OutputInvoiceMapper;
import pwc.taxtech.atms.service.impl.Message;
......@@ -72,24 +74,50 @@ public class OutputInvoiceServiceImpl {
private OrganizationMapper organizationMapper;
@Autowired
private OutputInvoiceDetailMapper outputInvoiceDetailMapper;
@Autowired
private OutputFpxxtbMapper outputFpxxtbMapper;
public List<OutputInvoice> getOutputInvoice(QueryOutputDto queryDto, String projectId) {
Project project = projectMapper.selectByPrimaryKey(projectId);
Organization organization = organizationMapper.selectByPrimaryKey(project.getOrganizationId());
List<OutputInvoice> outputInvoices;
if("off".equals(queryDto.getTag())){
OutputFpxxtbExample outputFpxxtbExample = new OutputFpxxtbExample();
if (organization.getTaxPayerNumber() == null) {
outputFpxxtbExample.createCriteria().andXFSHIsNull().
andKPRQBetween(DateUtils.getPeriodBegin(project.getYear(), queryDto.getPeriodStart()),
DateUtils .getPeriodEnd(project.getYear(), queryDto.getPeriodEnd()))
.andFPZTNotEqualTo("1");
} else {
outputFpxxtbExample.createCriteria().andXFSHEqualTo(organization.getTaxPayerNumber()).
andKPRQBetween(DateUtils.getPeriodBegin(project.getYear(), queryDto.getPeriodStart()),
DateUtils.getPeriodEnd(project.getYear(), queryDto.getPeriodEnd()))
.andFPZTNotEqualTo("1");
}
List<OutputFpxxtb> outputFpxxtbs = outputFpxxtbMapper.selectByExample(outputFpxxtbExample);
outputInvoices = new ArrayList<>(outputFpxxtbs.size());
outputFpxxtbs.forEach(m->{
OutputInvoice outputInvoice = new OutputInvoice();
outputInvoices.add(CommonUtils.copyProperties(m,outputInvoice));
});
}else{
OutputInvoiceExample outputInvoiceExample = new OutputInvoiceExample();
if (organization.getTaxPayerNumber() == null) {
outputInvoiceExample.createCriteria().andXFSHIsNull().andKPZTEqualTo(OUTPUT_KPZT_YES).
andKPRQBetween(DateUtils.getPeriodBegin(project.getYear(), queryDto.getPeriodStart()),
DateUtils .getPeriodEnd(project.getYear(), queryDto.getPeriodEnd()))
.andFPZTNotEqualTo("1");
} else {
outputInvoiceExample.createCriteria().andXFSHEqualTo(organization.getTaxPayerNumber()).andKPZTEqualTo(OUTPUT_KPZT_YES).
andKPRQBetween(DateUtils.getPeriodBegin(project.getYear(), queryDto.getPeriodStart()),
DateUtils.getPeriodEnd(project.getYear(), queryDto.getPeriodEnd()))
.andFPZTNotEqualTo("1");
}
OutputInvoiceExample outputInvoiceExample = new OutputInvoiceExample();
if (organization.getTaxPayerNumber() == null) {
outputInvoiceExample.createCriteria().andXFSHIsNull().andKPZTEqualTo(OUTPUT_KPZT_YES).
andKPRQBetween(DateUtils.getPeriodBegin(project.getYear(), queryDto.getPeriodStart()),
DateUtils.getPeriodEnd(project.getYear(), queryDto.getPeriodEnd()))
.andFPZTNotEqualTo("1");
} else {
outputInvoiceExample.createCriteria().andXFSHEqualTo(organization.getTaxPayerNumber()).andKPZTEqualTo(OUTPUT_KPZT_YES).
andKPRQBetween(DateUtils.getPeriodBegin(project.getYear(), queryDto.getPeriodStart()),
DateUtils.getPeriodEnd(project.getYear(), queryDto.getPeriodEnd()))
.andFPZTNotEqualTo("1");
outputInvoices = outputInvoiceMapper.selectByExample(outputInvoiceExample);
}
return outputInvoiceMapper.selectByExample(outputInvoiceExample);
return outputInvoices;
}
public List<OutputInvoice> queryOutputInvoiceAllList(QueryOutputDto queryDto, String projectId) {
......@@ -104,24 +132,48 @@ public class OutputInvoiceServiceImpl {
}
public PageInfo<OutputInvoice> queryOutputInvoiceList(QueryOutputDto queryDto, String projectId) {
Project project = projectMapper.selectByPrimaryKey(projectId);
Organization organization = organizationMapper.selectByPrimaryKey(project.getOrganizationId());
OutputInvoiceExample outputInvoiceExample = new OutputInvoiceExample();
if (organization.getTaxPayerNumber() == null) {
outputInvoiceExample.createCriteria().andXFSHIsNull().andKPZTEqualTo(OUTPUT_KPZT_YES).
andKPRQBetween(DateUtils.getPeriodBegin(project.getYear(), queryDto.getPeriodStart()),
DateUtils.getPeriodEnd(project.getYear(), queryDto.getPeriodEnd()))
.andFPZTNotEqualTo("1");
} else {
outputInvoiceExample.createCriteria().andXFSHEqualTo(organization.getTaxPayerNumber()).andKPZTEqualTo(OUTPUT_KPZT_YES).
andKPRQBetween(DateUtils.getPeriodBegin(project.getYear(), queryDto.getPeriodStart()),
DateUtils.getPeriodEnd(project.getYear(), queryDto.getPeriodEnd()))
.andFPZTNotEqualTo("1");
List<OutputInvoice> invoices;
if("off".equals(queryDto.getTag())){
OutputFpxxtbExample outputFpxxtbExample = new OutputFpxxtbExample();
if (organization.getTaxPayerNumber() == null) {
outputFpxxtbExample.createCriteria().andXFSHIsNull().
andKPRQBetween(DateUtils.getPeriodBegin(project.getYear(), queryDto.getPeriodStart()),
DateUtils.getPeriodEnd(project.getYear(), queryDto.getPeriodEnd()))
.andFPZTNotEqualTo("1");
} else {
outputFpxxtbExample.createCriteria().andXFSHEqualTo(organization.getTaxPayerNumber()).
andKPRQBetween(DateUtils.getPeriodBegin(project.getYear(), queryDto.getPeriodStart()),
DateUtils.getPeriodEnd(project.getYear(), queryDto.getPeriodEnd()))
.andFPZTNotEqualTo("1");
}
PageHelper.startPage(queryDto.getPageInfo().getPageIndex(), queryDto.getPageInfo().getPageSize());
List<OutputFpxxtb> fpxxtbs = outputFpxxtbMapper.selectByExample(outputFpxxtbExample);
invoices =new ArrayList<>(fpxxtbs.size());
fpxxtbs.forEach(m->{
OutputInvoice invoice = new OutputInvoice();
invoices.add(CommonUtils.copyProperties(m,invoice));
});
}else {
OutputInvoiceExample outputInvoiceExample = new OutputInvoiceExample();
if (organization.getTaxPayerNumber() == null) {
outputInvoiceExample.createCriteria().andXFSHIsNull().andKPZTEqualTo(OUTPUT_KPZT_YES).
andKPRQBetween(DateUtils.getPeriodBegin(project.getYear(), queryDto.getPeriodStart()),
DateUtils.getPeriodEnd(project.getYear(), queryDto.getPeriodEnd()))
.andFPZTNotEqualTo("1");
} else {
outputInvoiceExample.createCriteria().andXFSHEqualTo(organization.getTaxPayerNumber()).andKPZTEqualTo(OUTPUT_KPZT_YES).
andKPRQBetween(DateUtils.getPeriodBegin(project.getYear(), queryDto.getPeriodStart()),
DateUtils.getPeriodEnd(project.getYear(), queryDto.getPeriodEnd()))
.andFPZTNotEqualTo("1");
}
PageHelper.startPage(queryDto.getPageInfo().getPageIndex(), queryDto.getPageInfo().getPageSize());
invoices = outputInvoiceMapper.selectByExample(outputInvoiceExample);
}
PageHelper.startPage(queryDto.getPageInfo().getPageIndex(), queryDto.getPageInfo().getPageSize());
List<OutputInvoice> invoices = outputInvoiceMapper.selectByExample(outputInvoiceExample);
DecimalFormat df = new DecimalFormat("#,###.00");
invoices.stream().forEach(x -> {
x.setHJJE(df.format(new BigDecimal(x.getHJJE())));
......
......@@ -258,7 +258,7 @@
<!--</table>-->
<table tableName="OUTPUT_FPXXTB" schema="pwc_invoice" domainObjectName="OutputFpxxtb">
<property name="useActualColumnNames" value="false"/>
<property name="useActualColumnNames" value="true"/>
<property name="ignoreQualifiersAtRuntime" value="true"/>
</table>
......
......@@ -21,6 +21,7 @@ public class QueryOutputDto {
private BigDecimal amountEnd;
private BigDecimal taxAmountStart;
private BigDecimal taxAmountEnd;
private String tag;
public PagingDto getPageInfo() {
return pageInfo;
......@@ -133,4 +134,12 @@ public class QueryOutputDto {
public void setTaxAmountEnd(BigDecimal taxAmountEnd) {
this.taxAmountEnd = taxAmountEnd;
}
public String getTag() {
return tag;
}
public void setTag(String tag) {
this.tag = tag;
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -2668,6 +2668,34 @@
$scope.voucherFileName = evidence.fileName;
$scope.voucherFileID = evidence.fileID;
};
$scope.upLoadManual = function(){
var text= $(".li").find(".active").text();
$log.debug(text);
if(text == '海关专用缴款书' || text =='代扣代缴税收通用缴款书取数'){
var excelIo = new GC.Spread.Excel.IO();
var excelFilePath = 'resources/Excel/importExcel.xlsx';
var xhr = new XMLHttpRequest();
xhr.open('GET', excelFilePath, true);
xhr.responseType = 'blob';
xhr.onload = function(e) {
if (this.status == 200) {
// get binary data as a response
var blob = this.response;
// convert Excel to JSON
excelIo.open(blob, function (json) {
var workbookObj = json;
spread.fromJSON(workbookObj);
}, function (e) {
// process error
alert(e.errorMessage);
}, {});
}
};
}else{
SweetAlert.warning("仅支持海关专用缴款书或代扣代缴税收通用缴款书取数");
}
};
/****************************************证据文件function Ended*************************************************/
/****************************************证据文件function Ended*************************************************/
/****************************************证据文件function Ended*************************************************/
......
......@@ -6,6 +6,8 @@
class="fa fa-floppy-o"></i>&nbsp;{{'报表提审'}}</span>
<span ng-if="!isBSPL" ng-click="doApprove();"><i
class="fa fa-floppy-o"></i>&nbsp;{{'报表审批'}}</span>
<span ng-if="!isBSPL" ng-click="upLoadManual();"><i
class="fa fa-floppy-o"></i>&nbsp;{{'上传手工数据'}}</span>
<!--<span ng-if="!isBSPL" ng-click="saveReportCache();"><i-->
<!--class="fa fa-floppy-o"></i>&nbsp;{{'Save' | translate}}</span>-->
</div>
......
......@@ -21,6 +21,7 @@
AmountEnd: param.amountEnd,
TaxAmountStart: param.taxAmountStart,
TaxAmountEnd: param.taxAmountEnd,
Tag: param.tag,
}, apiConfig.createVat());
},
......@@ -40,6 +41,7 @@
AmountEnd: param.amountEnd,
TaxAmountStart: param.taxAmountStart,
TaxAmountEnd: param.taxAmountEnd,
Tag: param.tag,
}, apiConfig.createVat());
},
......
......@@ -62,7 +62,8 @@
amountEnd: null,
invoiceType: null,
taxAmountStart: null,
taxAmountEnd: null
taxAmountEnd: null,
tag: null
};
$scope.queryParams.periodStart = vatSessionService.month;
$scope.queryParams.periodEnd = vatSessionService.month;
......
......@@ -410,7 +410,8 @@
amountEnd: null,
invoiceType: null,
taxAmountStart: null,
taxAmountEnd: null
taxAmountEnd: null,
tag: 'off'
};
$scope.criteriaList = [];
$scope.queryParams.periodStart = startMonth;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment