Commit dcfe14a3 authored by chase's avatar chase

fix bug

parent 27e20682
...@@ -54,7 +54,7 @@ public class JXFP extends FunctionBase implements FreeRefFunction { ...@@ -54,7 +54,7 @@ public class JXFP extends FunctionBase implements FreeRefFunction {
int resultType = getIntParam(args[3], ec); int resultType = getIntParam(args[3], ec);
int period = getIntParam(args[4], ec); int period = getIntParam(args[4], ec);
// 客户情况只计算增值税专票 // 客户情况只计算增值税专票
String invoiceType = "004"; // String invoiceType = "004";
String formulaExpression = "JXFP(" + certificationPeriod + "," + invoiceTypeParam + "," String formulaExpression = "JXFP(" + certificationPeriod + "," + invoiceTypeParam + ","
+ authenticationType + "," + resultType + "," + period + ")"; + authenticationType + "," + resultType + "," + period + ")";
...@@ -82,22 +82,22 @@ public class JXFP extends FunctionBase implements FreeRefFunction { ...@@ -82,22 +82,22 @@ public class JXFP extends FunctionBase implements FreeRefFunction {
List<CertifiedInvoicesList> inputInvoices; List<CertifiedInvoicesList> inputInvoices;
if (authenticationType == 1 && formulaContext.getIsYear()) { if (authenticationType == 1 && formulaContext.getIsYear()) {
inputInvoices = getInvoice(null, invoiceType, inputInvoices = getInvoice(null, invoiceTypeParam,
Constant.InputInvoiceCertificationResult.CheckPass, Constant.InputInvoiceCertificationResult.ScanPass, Constant.InputInvoiceCertificationResult.CheckPass, Constant.InputInvoiceCertificationResult.ScanPass,
null); null);
} else if (authenticationType == 1) { } else if (authenticationType == 1) {
inputInvoices =getInvoice(period, invoiceType, inputInvoices =getInvoice(period, invoiceTypeParam,
Constant.InputInvoiceCertificationResult.CheckPass, Constant.InputInvoiceCertificationResult.ScanPass, Constant.InputInvoiceCertificationResult.CheckPass, Constant.InputInvoiceCertificationResult.ScanPass,
null); null);
} }
// 认证未通过与未认证暂认为是同一个意思 // 认证未通过与未认证暂认为是同一个意思
else if (authenticationType == 2 && formulaContext.getIsYear()) { else if (authenticationType == 2 && formulaContext.getIsYear()) {
inputInvoices = getInvoice(null, invoiceType, inputInvoices = getInvoice(null, invoiceTypeParam,
null, null, Constant.InputInvoiceCertificationResult.NotPass); null, null, Constant.InputInvoiceCertificationResult.NotPass);
} }
// 认证未通过与未认证暂认为是同一个意思 // 认证未通过与未认证暂认为是同一个意思
else if (authenticationType == 0 || authenticationType == 2) { else if (authenticationType == 0 || authenticationType == 2) {
inputInvoices =getInvoice(period, invoiceType, null, inputInvoices =getInvoice(period, invoiceTypeParam, null,
null, Constant.InputInvoiceCertificationResult.NotPass); null, Constant.InputInvoiceCertificationResult.NotPass);
} else { } else {
saveFormulaBlock(period, ec, formulaExpression, new BigDecimal("0.0"), 0L, formulaContext.getProjectId()); saveFormulaBlock(period, ec, formulaExpression, new BigDecimal("0.0"), 0L, formulaContext.getProjectId());
...@@ -195,7 +195,7 @@ public class JXFP extends FunctionBase implements FreeRefFunction { ...@@ -195,7 +195,7 @@ public class JXFP extends FunctionBase implements FreeRefFunction {
return strtodate; return strtodate;
} }
public List<CertifiedInvoicesList> getInvoice(Integer period, String invoiceType, String checkPass, String scanPass, String notPass) { public List<CertifiedInvoicesList> getInvoice(Integer period, Integer invoiceType, String checkPass, String scanPass, String notPass) {
CertifiedInvoicesListExample example = new CertifiedInvoicesListExample(); CertifiedInvoicesListExample example = new CertifiedInvoicesListExample();
CertifiedInvoicesListExample.Criteria criteria = example.createCriteria(); CertifiedInvoicesListExample.Criteria criteria = example.createCriteria();
......
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