新火炬后端单体项目初始化代码
zhangherong
2 天以前 d4a7b1faad635b4817891185a4f471595db2eece
src/main/java/org/jeecg/modules/mes/job/ProductionOrderSyncCreationJob.java
@@ -1,6 +1,7 @@
package org.jeecg.modules.mes.job;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.modules.lsw.service.ILswMaterialService;
import org.jeecg.modules.mdc.util.DateUtils;
import org.jeecg.modules.mdc.util.ThrowableUtil;
@@ -72,11 +73,6 @@
    @Value("${xhj.orderStatus:REL}")
    private String ORDER_STATUS;
    /**
     * 请求成功编码
     */
    private static final String SUCCESS_CODE = "S";
    @Autowired
    private ProductionOrderSync productionOrderSync;
    @Autowired
@@ -125,7 +121,7 @@
        try {
            //调用SAP接口获取生产订单
            Map<String, Object> productionOrderMap = productionOrderSync.syncProductionOrder(request);
            if (productionOrderMap == null || !SUCCESS_CODE.equals(productionOrderMap.get("ztype"))) {
            if (productionOrderMap == null || !CommonConstant.SAP_SUCCESS_CODE.equals(productionOrderMap.get("ztype"))) {
                log.error("未同步到订单信息!日期:{}", LocalDateTime.now());
                return;
            }
@@ -141,7 +137,7 @@
            String orderCodes = String.join(",", orderMap.keySet());
            //订单BOM同步
            Map<String, Object> orderBomMap = orderBomSync.syncOrderBom(FACTORY_CODE, orderCodes);
            if (orderBomMap == null || !SUCCESS_CODE.equals(orderBomMap.get("ztype"))) {
            if (orderBomMap == null || !CommonConstant.SAP_SUCCESS_CODE.equals(orderBomMap.get("ztype"))) {
                log.error("未同步到订单BOM信息!日期:{}", LocalDateTime.now());
                return;
            }
@@ -167,7 +163,7 @@
            }
            //订单工序同步
            Map<String, Object> orderProcessMap = orderProcessSync.syncOrderProcess(FACTORY_CODE, orderCodes);
            if (orderBomMap == null || !SUCCESS_CODE.equals(orderProcessMap.get("ztype"))) {
            if (orderBomMap == null || !CommonConstant.SAP_SUCCESS_CODE.equals(orderProcessMap.get("ztype"))) {
                log.error("未同步到订单工序信息!日期:{}", LocalDateTime.now());
                return;
            }