Commit 59f49ed5 authored by sherlock's avatar sherlock

RZSJ -> RZSQ

parent 2bbf19ad
...@@ -14,6 +14,8 @@ import pwc.taxtech.atms.dto.vatdto.InputInvoiceDataSourceDto; ...@@ -14,6 +14,8 @@ import pwc.taxtech.atms.dto.vatdto.InputInvoiceDataSourceDto;
import pwc.taxtech.atms.vat.entity.InputInvoice; import pwc.taxtech.atms.vat.entity.InputInvoice;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.ParsePosition;
import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
import java.util.Collections; import java.util.Collections;
...@@ -127,8 +129,8 @@ public class JXFP extends FunctionBase implements FreeRefFunction { ...@@ -127,8 +129,8 @@ public class JXFP extends FunctionBase implements FreeRefFunction {
Date finalEndDate1 = endDate; Date finalEndDate1 = endDate;
Date finalStartDate = startDate; Date finalStartDate = startDate;
inputInvoices = inputInvoices.stream() inputInvoices = inputInvoices.stream()
.filter(a -> DateUtils.strToDate(a.getRZSJ()).after(finalStartDate) .filter(a -> strToDate(a.getRZSQ()).after(finalStartDate)
&& DateUtils.strToDate(a.getRZSJ()).before(finalEndDate1)) && strToDate(a.getRZSQ()).before(finalEndDate1))
.collect(Collectors.toList()); .collect(Collectors.toList());
} }
} }
...@@ -188,4 +190,12 @@ public class JXFP extends FunctionBase implements FreeRefFunction { ...@@ -188,4 +190,12 @@ public class JXFP extends FunctionBase implements FreeRefFunction {
formulaContext.getProjectId()); formulaContext.getProjectId());
return NumberEval.ZERO; return NumberEval.ZERO;
} }
private static Date strToDate(String strDate) {
SimpleDateFormat formatter = new SimpleDateFormat("yyyyMM");
ParsePosition pos = new ParsePosition(0);
Date strtodate = formatter.parse(strDate, pos);
return strtodate;
}
} }
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