|
|
|
@ -295,20 +295,34 @@ public class YyOrderServiceImpl implements OrderService { |
|
|
|
|
DynamicContextHolder.push(ConfigureConstant.MAIN); |
|
|
|
|
tInvoiceInvmapMapper.deleteBackMsg(fphm); |
|
|
|
|
for (NewTable newTable : newTableList) { |
|
|
|
|
DynamicContextHolder.push(nsrsbh); |
|
|
|
|
List<InvoiceBpmmap> ddbhList = yyOrderMapper.getDdbh(newTable.getCDLCode()); |
|
|
|
|
log.debug("查询到中间表信息:{}", JSON.toJSONString(ddbhList)); |
|
|
|
|
if (CollectionUtils.isNotEmpty(ddbhList)) { |
|
|
|
|
for (InvoiceBpmmap invoiceBpmmap : ddbhList) { |
|
|
|
|
NewTable newTableFull = new NewTable(); |
|
|
|
|
BeanUtil.copyProperties(newTable, newTableFull); |
|
|
|
|
newTableFull.setBpmNo(invoiceBpmmap.getBpmno()); |
|
|
|
|
newTableFull.setBpmlsNo(invoiceBpmmap.getBpmlsno()); |
|
|
|
|
DynamicContextHolder.push(ConfigureConstant.MAIN); |
|
|
|
|
count += tInvoiceInvmapMapper.insertBackMsg(newTableFull); |
|
|
|
|
} |
|
|
|
|
//判断是否存在逗号
|
|
|
|
|
log.debug("cdlCode:{}", newTable.getCDLCode()); |
|
|
|
|
List<String> ddhList = new ArrayList<>(); |
|
|
|
|
if (newTable.getCDLCode().contains(",") || newTable.getCDLCode().contains(",")){ |
|
|
|
|
String[] ddhs = newTable.getCDLCode().replace(",", ",").split(","); |
|
|
|
|
ddhList = Arrays.asList(ddhs); |
|
|
|
|
}else { |
|
|
|
|
ddhList.add(newTable.getCDLCode()); |
|
|
|
|
} |
|
|
|
|
log.debug("cdlCodeList:{}", JSON.toJSONString(ddhList)); |
|
|
|
|
for (String cdlCode : ddhList) { |
|
|
|
|
DynamicContextHolder.push(nsrsbh); |
|
|
|
|
List<InvoiceBpmmap> ddbhList = yyOrderMapper.getDdbh(cdlCode); |
|
|
|
|
log.debug("查询到中间表信息:{}", JSON.toJSONString(ddbhList)); |
|
|
|
|
if (CollectionUtils.isNotEmpty(ddbhList)) { |
|
|
|
|
for (InvoiceBpmmap invoiceBpmmap : ddbhList) { |
|
|
|
|
NewTable newTableFull = new NewTable(); |
|
|
|
|
BeanUtil.copyProperties(newTable, newTableFull); |
|
|
|
|
newTableFull.setBpmNo(invoiceBpmmap.getBpmno()); |
|
|
|
|
newTableFull.setBpmlsNo(invoiceBpmmap.getBpmlsno()); |
|
|
|
|
newTableFull.setCDLCode(cdlCode); |
|
|
|
|
DynamicContextHolder.push(ConfigureConstant.MAIN); |
|
|
|
|
count += tInvoiceInvmapMapper.insertBackMsg(newTableFull); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return count; |
|
|
|
|