feature:用友回写支持逗号分割

reBack
路明慧 11 months ago
parent b3e494ed7b
commit 5c151a08ff
  1. 16
      order-management-order/src/main/java/com/dxhy/order/consumer/modules/bespoke/service/impl/YyOrderServiceImpl.java

@ -295,8 +295,19 @@ public class YyOrderServiceImpl implements OrderService {
DynamicContextHolder.push(ConfigureConstant.MAIN);
tInvoiceInvmapMapper.deleteBackMsg(fphm);
for (NewTable newTable : newTableList) {
//判断是否存在逗号
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(newTable.getCDLCode());
List<InvoiceBpmmap> ddbhList = yyOrderMapper.getDdbh(cdlCode);
log.debug("查询到中间表信息:{}", JSON.toJSONString(ddbhList));
if (CollectionUtils.isNotEmpty(ddbhList)) {
for (InvoiceBpmmap invoiceBpmmap : ddbhList) {
@ -304,6 +315,7 @@ public class YyOrderServiceImpl implements OrderService {
BeanUtil.copyProperties(newTable, newTableFull);
newTableFull.setBpmNo(invoiceBpmmap.getBpmno());
newTableFull.setBpmlsNo(invoiceBpmmap.getBpmlsno());
newTableFull.setCDLCode(cdlCode);
DynamicContextHolder.push(ConfigureConstant.MAIN);
count += tInvoiceInvmapMapper.insertBackMsg(newTableFull);
}
@ -311,6 +323,8 @@ public class YyOrderServiceImpl implements OrderService {
}
}
}
return count;
}

Loading…
Cancel
Save