|
|
@ -1917,8 +1917,18 @@ public class OrderInfoServiceImpl implements OrderInfoService { |
|
|
|
|
|
|
|
|
|
|
|
List<OrderItemInfo> items = new ArrayList<>(); |
|
|
|
List<OrderItemInfo> items = new ArrayList<>(); |
|
|
|
StringBuffer sb = new StringBuffer(); |
|
|
|
StringBuffer sb = new StringBuffer(); |
|
|
|
|
|
|
|
Map repeatEnding = new HashMap(); |
|
|
|
for (OrderItemInfo itemInfo : orderItemInfo) { |
|
|
|
for (OrderItemInfo itemInfo : orderItemInfo) { |
|
|
|
|
|
|
|
//存在同一物料编码
|
|
|
|
|
|
|
|
if(repeatEnding.get(itemInfo.getZxbm()) != null){ |
|
|
|
|
|
|
|
OrderItemInfo item = new OrderItemInfo(); |
|
|
|
|
|
|
|
item.setId(itemInfo.getId()); |
|
|
|
|
|
|
|
item.setZnfm(ConfigureConstant.STRING_0); |
|
|
|
|
|
|
|
item.setZxbm(StringUtils.isNotBlank(itemInfo.getZxbm())?itemInfo.getZxbm():baseService.getGenerateShotKey()); |
|
|
|
|
|
|
|
items.add(item); |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
CommodityCodeEntity commodityCodeEntity = buildCommodity(itemInfo, param, spbmMap); |
|
|
|
CommodityCodeEntity commodityCodeEntity = buildCommodity(itemInfo, param, spbmMap); |
|
|
|
//判断是否已存在,同步中存在一样的是否需要过滤后期考虑
|
|
|
|
//判断是否已存在,同步中存在一样的是否需要过滤后期考虑
|
|
|
@ -1949,7 +1959,7 @@ public class OrderInfoServiceImpl implements OrderInfoService { |
|
|
|
} |
|
|
|
} |
|
|
|
items.add(item); |
|
|
|
items.add(item); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
repeatEnding.put(commodityCodeEntity.getZxbm(),commodityCodeEntity); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("更新公司库物料异常{}",e); |
|
|
|
log.error("更新公司库物料异常{}",e); |
|
|
|
sb.append(itemInfo.getSphxh()).append(","); |
|
|
|
sb.append(itemInfo.getSphxh()).append(","); |
|
|
|