|
|
|
@ -89,6 +89,8 @@ public class CheckTaskServiceImpl implements CheckTaskService { |
|
|
|
|
return checkTaskDao.getNoDetailInvoiceOld(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private String taxRate; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 查验 |
|
|
|
|
* |
|
|
|
@ -140,7 +142,7 @@ public class CheckTaskServiceImpl implements CheckTaskService { |
|
|
|
|
|
|
|
|
|
// 构建主表实体
|
|
|
|
|
InvoiceCollectionInfo invoiceCollectionInfo = |
|
|
|
|
buildInvoiceCollectionInfo(responseInvoice, checkNoDetailInvoice.getBuyerTaxNo()); |
|
|
|
|
buildInvoiceCollectionInfo(responseInvoice, checkNoDetailInvoice.getBuyerTaxNo(),taxRate); |
|
|
|
|
|
|
|
|
|
int countdetail = getDetailCount(invoiceCollectionInfo, db); |
|
|
|
|
// 更新主表
|
|
|
|
@ -186,7 +188,7 @@ public class CheckTaskServiceImpl implements CheckTaskService { |
|
|
|
|
|
|
|
|
|
// 构建主表实体
|
|
|
|
|
InvoiceCollectionInfo invoiceCollectionInfo = |
|
|
|
|
buildInvoiceCollectionInfo(responseInvoice, checkNoDetailInvoice.getBuyerTaxNo()); |
|
|
|
|
buildInvoiceCollectionInfo(responseInvoice, checkNoDetailInvoice.getBuyerTaxNo(),""); |
|
|
|
|
DynamicContextHolder.push(db + DbConstant.BUSINESS_READ); |
|
|
|
|
int countdetail = tDxRecordInvoiceDetailDao |
|
|
|
|
.getDetailJd(invoiceCollectionInfo.getInvoiceCode() + invoiceCollectionInfo.getInvoiceNo()); |
|
|
|
@ -385,6 +387,7 @@ public class CheckTaskServiceImpl implements CheckTaskService { |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
private List<InvoiceDetailInfo> buildDetailList(ResponseInvoice responseInvoice) { |
|
|
|
|
taxRate = ""; |
|
|
|
|
// 构建返回值
|
|
|
|
|
final List<InvoiceDetailInfo> invoiceDetailInfoList = new ArrayList<>(); |
|
|
|
|
|
|
|
|
@ -417,6 +420,8 @@ public class CheckTaskServiceImpl implements CheckTaskService { |
|
|
|
|
invoiceDetailInfo.setTxrqz(invoiceDetail.getTxrqz()); |
|
|
|
|
// 税率
|
|
|
|
|
invoiceDetailInfo.setTaxRate(invoiceDetail.getTaxRate()); |
|
|
|
|
|
|
|
|
|
taxRate = taxRate + invoiceDetail.getTaxRate(); |
|
|
|
|
//山能项目 增加税码字段
|
|
|
|
|
if(invoiceDetail.getTaxRate() != null){ |
|
|
|
|
invoiceDetailInfo.setTaxCode(getZSM(invoiceDetail.getTaxRate())); |
|
|
|
@ -645,7 +650,7 @@ public class CheckTaskServiceImpl implements CheckTaskService { |
|
|
|
|
* 抵账主体数据 |
|
|
|
|
* @return 主体数据 |
|
|
|
|
*/ |
|
|
|
|
private InvoiceCollectionInfo buildInvoiceCollectionInfo(ResponseInvoice responseInvoice, String buyerTaxNo) { |
|
|
|
|
private InvoiceCollectionInfo buildInvoiceCollectionInfo(ResponseInvoice responseInvoice, String buyerTaxNo,String taxRate) { |
|
|
|
|
// 定义返回值
|
|
|
|
|
final InvoiceCollectionInfo invoiceCollectionInfo = new InvoiceCollectionInfo(); |
|
|
|
|
// 购方税号
|
|
|
|
@ -712,6 +717,8 @@ public class CheckTaskServiceImpl implements CheckTaskService { |
|
|
|
|
invoiceCollectionInfo.setMachinecode(responseInvoice.getMachineNo()); |
|
|
|
|
|
|
|
|
|
invoiceCollectionInfo.setQsType(responseInvoice.getQsType()); |
|
|
|
|
|
|
|
|
|
invoiceCollectionInfo.setTaxRate(taxRate); |
|
|
|
|
// 返回
|
|
|
|
|
return invoiceCollectionInfo; |
|
|
|
|
} |
|
|
|
|