Browse Source

aps-错误信息提示

sucheng 4 months ago
parent
commit
f87d71c38e

+ 4 - 1
cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ApsServiceImpl.java

@@ -724,7 +724,7 @@ public class ApsServiceImpl implements ApsService {
                 productionScheduleVo.setEquipmentList(equipmentList1);
                 apsProductionSchedules.add(productionScheduleVo);
             } catch (Exception e) {
-                logger.info("坯料计划:"+bo.getBlanknumber() + ";排程数据初始化异常", e);
+                logger.info("坯料计划:" + bo.getBlanknumber() + ";排程数据初始化异常", e);
                 String msg = "坯料计划:" + bo.getBlanknumber() + ";排程数据初始化异常";
                 throw new CustomException(msg + " " + DateUtil.formatDateTime(new Date()));
             }
@@ -2062,6 +2062,9 @@ public class ApsServiceImpl implements ApsService {
         processes.setProducttype(operationDo.getProducttype());
         // 连续生产标识设置
         // 合金+输入物料+宽度+输入物料厚度+输出物料厚度(取第一个冷轧工序使用)
+        if (outMaterDos.isEmpty()) {
+            throw new CustomException("坯料计划:" + apsBlankOrderVo.getBlanknumber() + "工序作业:" + operationDo.getProcessname() + "没有找到输出物料");
+        }
         processes.setSeriesProduceMark(operationDo.getMetal() + "^_^" + operationDo.getProducttype() + "^_^" + operationDo.getProwidth() + "^_^" + operationDo.getThickness() + "^_^" + outMaterDos.get(0).getThickness());
         processes.setPrepressworkmin(operationDo.getPrepressworkmin() == null ? null : operationDo.getPrepressworkmin().intValue());
         processes.setCutfinishmin(operationDo.getCutfinishmin() == null ? null : operationDo.getCutfinishmin().intValue());