diff --git a/src/main/java/com/glxp/api/controller/sync/SpsSyncDownloadController.java b/src/main/java/com/glxp/api/controller/sync/SpsSyncDownloadController.java index 8a286df5..829142f2 100644 --- a/src/main/java/com/glxp/api/controller/sync/SpsSyncDownloadController.java +++ b/src/main/java/com/glxp/api/controller/sync/SpsSyncDownloadController.java @@ -800,11 +800,13 @@ public class SpsSyncDownloadController { if (CollUtil.isNotEmpty(spsSyncBusOrderResponse.getPurOrderDetailEntities())) { List purOrderDetailEntities = spsSyncBusOrderResponse.getPurOrderDetailEntities(); for (PurOrderDetailEntity purOrderDetailEntity : purOrderDetailEntities) { - PurOrderDetailEntity codeTempEntity = new PurOrderDetailEntity(); - BeanUtils.copyProperties(purOrderDetailEntity, codeTempEntity); - codeTempEntity.setId(null); - codeTempEntity.setOrderIdFk(orderEntity.getId() + ""); - purOrderDetailService.insert(codeTempEntity); + if(purOrderDetailEntity.getOrderIdFk().equals(orderEntity.getId()+"")){ + PurOrderDetailEntity codeTempEntity = new PurOrderDetailEntity(); + BeanUtils.copyProperties(purOrderDetailEntity, codeTempEntity); + codeTempEntity.setId(null); + purOrderDetailService.insert(codeTempEntity); + } + } }