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 - SELECT * FROM TABLE (${method}) + SELECT * + FROM TABLE(${method}) + diff --git a/aucma-report/src/main/resources/mapper/report/ReportRepairMeasuresMapper.xml b/aucma-report/src/main/resources/mapper/report/ReportRepairMeasuresMapper.xml index 3e233b2..dbae48d 100644 --- a/aucma-report/src/main/resources/mapper/report/ReportRepairMeasuresMapper.xml +++ b/aucma-report/src/main/resources/mapper/report/ReportRepairMeasuresMapper.xml @@ -14,6 +14,7 @@ + @@ -25,7 +26,8 @@ created_by, created_time, updated_by, - updated_time + updated_time, + user_permission from report_repair_measures @@ -43,6 +45,7 @@ and created_time = #{createdTime} and updated_by = #{updatedBy} and updated_time = #{updatedTime} + and user_permission = #{userPermission} order by repair_code