diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/step/jx/JxSnProcessingCollectProductDataStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/step/jx/JxSnProcessingCollectProductDataStepService.java index 85e29ce..65ab7d9 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/step/jx/JxSnProcessingCollectProductDataStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/step/jx/JxSnProcessingCollectProductDataStepService.java @@ -82,7 +82,7 @@ public class JxSnProcessingCollectProductDataStepService extends BaseStepService fsmCommonService.checkWcpcMapForDoScan(reqBean); - String plcCodes = fsmCommonService.getAndCheckWcpcMapIsContainsKey(reqBean, reqBean.getWcpcMap(), MesPcnExtConstWords.PLC_CODE_UC); + String plcCodes = fsmCommonService.getAndCheckWcpcMapIsContainsKey(reqBean, reqBean.getWcpcMap(), MesPcnExtConstWords.PLC_CODES_UC); if (StringUtils.isEmpty(plcCodes)) foundExThrowNoShowMsg(); String key = new StringJoiner(MesPcnExtConstWords.COLON).add(MesPcnExtConstWords.PRODUCT_DATA).add(reqBean.getOrganizeCode()).add(reqBean.getWorkCenterCode()).add(reqBean.getWorkCellCode()).toString(); @@ -133,12 +133,12 @@ public class JxSnProcessingCollectProductDataStepService extends BaseStepService private String[] checkPlcCodeIsValid(StationRequestBean reqBean, StationResultBean resultBean, String plcCodes, String key) { String[] plcCodeArr = plcCodes.split(MesPcnExtConstWords.COMMA); - if (plcCodeArr.length != 2) execExpSendMsgAndThrowEx(reqBean, resultBean, String.format("生产线[%s]工位[%s]工位参数[%s]维护的PLC代码[%s]无效!", reqBean.getWorkCenterCode(), reqBean.getWorkCellCode(), MesPcnExtConstWords.PLC_CODE_UC, plcCodes)); + if (plcCodeArr.length != 2) execExpSendMsgAndThrowEx(reqBean, resultBean, String.format("生产线[%s]工位[%s]工位参数[%s]维护的PLC代码[%s]无效!", reqBean.getWorkCenterCode(), reqBean.getWorkCellCode(), MesPcnExtConstWords.PLC_CODES_UC, plcCodes)); for (String plcCode : plcCodeArr) { MesPlc plc = plcExtService.getPlcData(reqBean.getOrganizeCode(), key, plcCode); if (null == plc || (StringUtils.isEmpty(plc.getChannel()) || StringUtils.isEmpty(plc.getDevice()) || StringUtils.isEmpty(plc.getTagAddress()))) - execExpSendMsgAndThrowEx(reqBean, resultBean, String.format("生产线[%s]工位[%s]工位参数[%s]维护的PLC代码[%s]其中[%s]未配置有效的PLC信息!", reqBean.getWorkCenterCode(), reqBean.getWorkCellCode(), MesPcnExtConstWords.PLC_CODE_UC, plcCodes, plcCode)); + execExpSendMsgAndThrowEx(reqBean, resultBean, String.format("生产线[%s]工位[%s]工位参数[%s]维护的PLC代码[%s]其中[%s]未配置有效的PLC信息!", reqBean.getWorkCenterCode(), reqBean.getWorkCellCode(), MesPcnExtConstWords.PLC_CODES_UC, plcCodes, plcCode)); } return plcCodeArr; diff --git a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/util/MesPcnExtConstWords.java b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/util/MesPcnExtConstWords.java index e6b54a7..4a529a0 100644 --- a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/util/MesPcnExtConstWords.java +++ b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/util/MesPcnExtConstWords.java @@ -268,6 +268,8 @@ public class MesPcnExtConstWords { //PLC代码 public static final String PLC_CODE_UC = "PLC_CODE"; //PLC代码 + public static final String PLC_CODES_UC = "PLC_CODES"; + //PLC代码 public static final String PLC_CODE = "plcCode"; //对象代码 public static final String OBJECT_CODE = "objectCode";