diff --git a/aucma-api/src/main/java/com/aucma/api/service/impl/SAPPutStorageServiceImpl.java b/aucma-api/src/main/java/com/aucma/api/service/impl/SAPPutStorageServiceImpl.java
index 248c5d5..901bacc 100644
--- a/aucma-api/src/main/java/com/aucma/api/service/impl/SAPPutStorageServiceImpl.java
+++ b/aucma-api/src/main/java/com/aucma/api/service/impl/SAPPutStorageServiceImpl.java
@@ -203,24 +203,22 @@ public class SAPPutStorageServiceImpl implements ISAPPutStorageService {
} else {
//更新SAP计划
BaseOrderInfo baseOrderInfo = baseOrderInfos.get(0);
- if (baseOrderInfo.getIsRelease() == 0) {
- //SAP计划已下达到生产计划工位不更新数据
- continue;
- }
baseOrderInfo.setOrderStatus(map.get("STTXT"));
baseOrderInfo.setSaleOrderCode(map.get("KDAUF"));
baseOrderInfo.setMaterialName(map.get("MAKTX"));
baseOrderInfo.setOrderType(map.get("AUART"));
- if (!map.get("GAMNG").equals(null)) {
- baseOrderInfo.setOrderAmount(new BigDecimal(map.get("GAMNG")));
+ if (baseOrderInfo.getIsRelease() == 1) {
+ //SAP计划已下达到生产计划工位不更新数量
+ if (!map.get("GAMNG").equals(null)) {
+ baseOrderInfo.setOrderAmount(new BigDecimal(map.get("GAMNG")));
+ }
}
-
baseOrderInfo.setWorkCenterCode(map.get("ARBPL"));
baseOrderInfo.setRoutingCode(map.get("AUFPL"));
baseOrderInfo.setBeginDate(new SimpleDateFormat("yyyy-MM-dd").parse(map.get("GSTRP")));
baseOrderInfo.setEndDate(new SimpleDateFormat("yyyy-MM-dd").parse(map.get("GLTRP")));
baseOrderInfoService.updateBaseOrderInfo(baseOrderInfo);
-
+ baseOrderInfoList.add(baseOrderInfo);
// 同步生产日历
CalendarInfo calendar = new CalendarInfo();
calendar.setSapPlanCode(baseOrderInfo.getOrderCode());
diff --git a/aucma-base/src/main/resources/mapper/base/BaseOrderInfoMapper.xml b/aucma-base/src/main/resources/mapper/base/BaseOrderInfoMapper.xml
index dc877f7..a5aeb4a 100644
--- a/aucma-base/src/main/resources/mapper/base/BaseOrderInfoMapper.xml
+++ b/aucma-base/src/main/resources/mapper/base/BaseOrderInfoMapper.xml
@@ -175,6 +175,8 @@
updated_by = #{updatedBy},
updated_time = #{updatedTime},
complete_date = #{completeDate},
+ work_center_code = #{workCenterCode},
+ routing_code = #{routingCode},
where obj_id = #{objId}
diff --git a/aucma-production/src/main/resources/mapper/production/BaseBomInfoMapper.xml b/aucma-production/src/main/resources/mapper/production/BaseBomInfoMapper.xml
index 662193b..5529d48 100644
--- a/aucma-production/src/main/resources/mapper/production/BaseBomInfoMapper.xml
+++ b/aucma-production/src/main/resources/mapper/production/BaseBomInfoMapper.xml
@@ -82,7 +82,7 @@
GROUP BY ANCESTORS)
- order by bb.created_time desc
+ order by bb.material_type, bb.created_time desc