Commit 49952f9e authored by chase's avatar chase

fix bug

parent ca1a6046
...@@ -51,8 +51,8 @@ public class KPSR extends FunctionBase implements FreeRefFunction { ...@@ -51,8 +51,8 @@ public class KPSR extends FunctionBase implements FreeRefFunction {
private double assembleData(String revenueTypeName, List<OutputInvoiceDataSourceDto> contain, Integer billType, Integer amountType, OperationEvaluationContext ec) { private double assembleData(String revenueTypeName, List<OutputInvoiceDataSourceDto> contain, Integer billType, Integer amountType, OperationEvaluationContext ec) {
String queryDate = formulaContext.getYear() + (formulaContext.getPeriod() < 10 ? ("0" + formulaContext.getPeriod()) : (formulaContext.getPeriod() + "")); String queryPeriod = formulaContext.getYear() + (formulaContext.getPeriod() < 10 ? ("0" + formulaContext.getPeriod()) : (formulaContext.getPeriod() + ""));
String queryDate = formulaContext.getYear() + "-"+(formulaContext.getPeriod() < 10 ? ("0" + formulaContext.getPeriod()) : (formulaContext.getPeriod() + ""));
// List<String> revenueTypes = typeMappingList.stream() // List<String> revenueTypes = typeMappingList.stream()
// .map(o -> o.getRevenueTypeName()).collect(Collectors.toList()); // .map(o -> o.getRevenueTypeName()).collect(Collectors.toList());
RevenueConfigExample configExample = new RevenueConfigExample(); RevenueConfigExample configExample = new RevenueConfigExample();
...@@ -78,7 +78,7 @@ public class KPSR extends FunctionBase implements FreeRefFunction { ...@@ -78,7 +78,7 @@ public class KPSR extends FunctionBase implements FreeRefFunction {
invoiceRecordExample = new InvoiceRecordExample(); invoiceRecordExample = new InvoiceRecordExample();
invoiceRecordExample.createCriteria().andRevenueCofIdIn(revenueTypeIds) invoiceRecordExample.createCriteria().andRevenueCofIdIn(revenueTypeIds)
.andProjectIdEqualTo(formulaContext.getProjectId()) .andProjectIdEqualTo(formulaContext.getProjectId())
.andPeriodEqualTo(Integer.valueOf(queryDate)) .andPeriodEqualTo(Integer.valueOf(queryPeriod))
.andTaxRateEqualTo(typeMapping.getTaxRate()) .andTaxRateEqualTo(typeMapping.getTaxRate())
.andDepartmentEqualTo(typeMapping.getOuName()) .andDepartmentEqualTo(typeMapping.getOuName())
.andInvoiceTypeEqualTo(InvoiceRecordEnum.InvoiceType.MAPPING.get(billType)); .andInvoiceTypeEqualTo(InvoiceRecordEnum.InvoiceType.MAPPING.get(billType));
...@@ -95,7 +95,7 @@ public class KPSR extends FunctionBase implements FreeRefFunction { ...@@ -95,7 +95,7 @@ public class KPSR extends FunctionBase implements FreeRefFunction {
invoiceRecordExample = new InvoiceRecordExample(); invoiceRecordExample = new InvoiceRecordExample();
invoiceRecordExample.createCriteria().andModifyRevenueCofIdIn(revenueTypeIds) invoiceRecordExample.createCriteria().andModifyRevenueCofIdIn(revenueTypeIds)
.andProjectIdEqualTo(formulaContext.getProjectId()) .andProjectIdEqualTo(formulaContext.getProjectId())
.andPeriodEqualTo(Integer.valueOf(queryDate)) .andPeriodEqualTo(Integer.valueOf(queryPeriod))
.andTaxRateEqualTo(typeMapping.getTaxRate()) .andTaxRateEqualTo(typeMapping.getTaxRate())
.andDepartmentEqualTo(typeMapping.getOuName()) .andDepartmentEqualTo(typeMapping.getOuName())
.andInvoiceTypeEqualTo(InvoiceRecordEnum.InvoiceType.MAPPING.get(billType)); .andInvoiceTypeEqualTo(InvoiceRecordEnum.InvoiceType.MAPPING.get(billType));
......
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