|
|
|
@ -49,17 +49,25 @@ public class JxCenterPlcPassStepService extends BaseStepService {
|
|
|
|
|
if (forceCmd) reqBean.getDataMap().remove(forceCmdKey);
|
|
|
|
|
|
|
|
|
|
fsmCommonService.checkWcpcMapForDoScan(reqBean);
|
|
|
|
|
String plcCode = fsmCommonService.getAndCheckWcpcMapIsContainsKey(reqBean, reqBean.getWcpcMap(), MesPcnExtConstWords.PLC_CODE_UC);
|
|
|
|
|
|
|
|
|
|
String plcPassValueParamCode = reqBean.getDataMap().containsKey(MesPcnExtConstWords.PLC_PASS_VALUE) ? (String) reqBean.getDataMap().get(MesPcnExtConstWords.PLC_PASS_VALUE) : MesPcnExtConstWords.PLC_PASS_VALUE;
|
|
|
|
|
String plcPassValue = fsmCommonService.getAndCheckWcpcMapIsContainsKey(reqBean, reqBean.getWcpcMap(), plcPassValueParamCode);
|
|
|
|
|
if (StringUtils.isEmpty(plcCode) || StringUtils.isEmpty(plcPassValue)) foundExThrowNoShowMsg();
|
|
|
|
|
if (StringUtils.isEmpty(plcPassValue)) foundExThrowNoShowMsg();
|
|
|
|
|
|
|
|
|
|
if (!plcPassValue.equals("noplc")) {
|
|
|
|
|
|
|
|
|
|
String plcCode = fsmCommonService.getAndCheckWcpcMapIsContainsKey(reqBean, reqBean.getWcpcMap(), MesPcnExtConstWords.PLC_CODE_UC);
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isEmpty(plcCode)) foundExThrowNoShowMsg();
|
|
|
|
|
|
|
|
|
|
MesPlc plcDb = getPlcDb(reqBean, resultBean, plcCode);
|
|
|
|
|
if (null == plcDb) execExpSendMsgAndThrowEx(reqBean, resultBean, String.format("生产线[%s]工位[%s]工位参数[%s]值[%s]对应的PLC信息不存在!", reqBean.getWorkCenterCode(), reqBean.getWorkCellCode(), MesPcnExtConstWords.PLC_CODE_UC, plcCode));
|
|
|
|
|
|
|
|
|
|
if (!plcPassValue.equals("noplc") && !plcExtService.doWriteOpcParamValue(plcDb, plcPassValue))
|
|
|
|
|
if (!plcExtService.doWriteOpcParamValue(plcDb, plcPassValue))
|
|
|
|
|
execExpSendMsgAndThrowEx(reqBean, resultBean, String.format("生产线[%s]工位[%s]%s放行失败:写入PLC[%s]值[%s]失败!", reqBean.getWorkCenterCode(), reqBean.getWorkCellCode(), !forceCmd ? MesPcnExtConstWords.EMPTY : "强制", plcCode, plcPassValue));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (reqBean.getDataMap().containsKey(MesPcnExtConstWords.PLC_PASS_VALUE)) reqBean.getDataMap().remove(MesPcnExtConstWords.PLC_PASS_VALUE);
|
|
|
|
|
|
|
|
|
|
log.info("工厂{}生产线{}工位{}: --- STEP EXECUTE --- JxCenterPlcPassStepService --- SUCCESS ---", reqBean.getOrganizeCode(), reqBean.getWorkCenterCode(), reqBean.getWorkCellCode());
|
|
|
|
|