Commit c89864c9 authored by neo's avatar neo

Merge branch 'dev_oracle' of code.tech.tax.asia.pwcinternal.com:root/atms into neo_jpa_withoutgen

parents a8e93415 d320d29b
......@@ -9,7 +9,9 @@ import pwc.taxtech.atms.vat.entity.InputInvoiceExample;
import pwc.taxtech.atms.vat.entity.InputVatInvoice;
import pwc.taxtech.atms.vat.entity.InputVatInvoiceExample;
import java.util.Calendar;
import java.util.List;
import java.util.stream.Collectors;
@Service
public class InputInvoiceDao {
......@@ -19,29 +21,34 @@ public class InputInvoiceDao {
public List<InputInvoice> getInputInvoice(Integer period, String invoiceType, String checkPass, String scanPass, String notPass) {
InputInvoiceExample example = new InputInvoiceExample();
InputInvoiceExample.Criteria criteria = example.createCriteria();
InputInvoiceExample.Criteria criteria1 = example.createCriteria();
// InputInvoiceExample.Criteria criteria1 = example.createCriteria();
if (period != null) {
// if(period != null){
// Calendar date = Calendar.getInstance();
// String year = String.valueOf(date.get(Calendar.YEAR));
// criteria.andRZSQEqualTo(year + "-" + (period > 9 ? period.toString() : "0" + period.toString()));
// }
criteria.andRZSQEqualTo(String.valueOf(period));
criteria1.andRZSQEqualTo(String.valueOf(period));
}
if (invoiceType != null) {
criteria.andFPLXEqualTo(String.valueOf(invoiceType));
criteria1.andFPLXEqualTo(String.valueOf(invoiceType));
// criteria1.andFPLXEqualTo(String.valueOf(invoiceType));
}
if (StringUtils.isNotBlank(notPass)) {
String unPass = "1";
criteria.andRZJGEqualTo(unPass);
criteria1.andRZJGEqualTo(unPass);
// criteria1.andRZJGEqualTo(unPass);
} else if (StringUtils.isNotBlank(checkPass) && StringUtils.isNotBlank(scanPass)) {
String pass = "0";
criteria.andRZJGEqualTo(pass);
criteria1.andRZJGEqualTo(pass);
example.or(criteria1);
// criteria1.andRZJGEqualTo(pass);
// example.or(criteria1);
}
return inputInvoiceMapper.selectByExample(example);
List<InputInvoice> list = inputInvoiceMapper.selectByExample(example).stream().filter(x -> {
return x.getRZSQ().endsWith("-" + (period.intValue() > 9 ? period.toString() : "0" + period.toString()));
}).collect(Collectors.toList());
// return inputInvoiceMapper.selectByExample(example);
return list;
}
}
......@@ -51,10 +51,10 @@ public class JXFP extends FunctionBase implements FreeRefFunction {
}
int certificationPeriod = getIntParam(args[0], ec);
int invoiceTypeParam = getIntParam(args[1], ec);
int authenticationType = getIntParam(args[2], ec);
int resultType = getIntParam(args[3], ec);
int period = getIntParam(args[4], ec);
int invoiceTypeParam = getIntParam(args[1], ec);
// 客户情况只计算增值税专票
String invoiceType = "004";
......@@ -119,10 +119,10 @@ public class JXFP extends FunctionBase implements FreeRefFunction {
.filter(a -> DateUtils.strToDate(a.getRZSJ()).before(finalEndDate))
.collect(Collectors.toList());
} else if (certificationPeriod != 99) {
calendar.set(formulaContext.getYear(), certificationPeriod, 1);
calendar.set(formulaContext.getYear(), certificationPeriod - 1, 1);
startDate = calendar.getTime();
calendar.set(formulaContext.getYear(), certificationPeriod, 1);
calendar.add(Calendar.MONTH, 1);
// calendar.add(Calendar.MONTH, 1);
endDate = calendar.getTime();
Date finalEndDate1 = endDate;
Date finalStartDate = startDate;
......@@ -145,7 +145,7 @@ public class JXFP extends FunctionBase implements FreeRefFunction {
inputInvoiceDataSourceDto.setInvoiceCode(x.getFPDM());
inputInvoiceDataSourceDto.setInvoiceNumber(x.getFPHM());
inputInvoiceDataSourceDto.setInvoiceType(Integer.parseInt(x.getFPLX()));
inputInvoiceDataSourceDto.setPeriod(Integer.parseInt(x.getRZSQ()));
inputInvoiceDataSourceDto.setPeriod(period);
inputInvoiceDataSourceDto.setSellerTaxNumber(x.getXFSH());
inputInvoiceDataSourceDto.setName(Constant.DataSourceName.InputDetailInvoiceDataSource);
inputInvoiceDataSourceDto.setOperationType(EnumOperationType.Single.getCode());
......
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