tags/yfai-pcn-ext-v1.0
王杰 11 months ago
parent 1c01b3bc24
commit 41126d8e2b

@ -26,6 +26,9 @@ public interface IMesProductionCustomContextStepService {
@ApiOperation(value = "发送设备质量信息")
void sendEquipQualityMessage(StationRequestBean reqBean, MesCellEquipContext cellEquipContext);
@ApiOperation(value = "发送工序完成音")
void sendProcessCompleteSound(StationRequestBean reqBean);
@ApiOperation(value = "存储上个扫描/读取信息")
Boolean saveLastScanContext(StationRequestBean reqBean, List<StationKvBean> dataList);

@ -20,7 +20,7 @@ import java.util.Optional;
public interface IMesProductionProcessContextStepService {
@ApiOperation(value = "清除上下文中的所有基础数据")
void doFlushProductionDispatchContext(StationRequestBean reqBean);
void doFlushProductionProcessContext(StationRequestBean reqBean);
@ApiOperation(value = "存储生产过程上下文对象【工步根据业务实际情况执行,配置错误等情况无需执行】")
Boolean saveProductionProcessContext(StationRequestBean reqBean, MesProductionProcessContext productionProcessContext);

@ -19,19 +19,21 @@ public class MesFunctionResetCellContextService extends BaseSwsService implement
@Autowired
private IMesProductionProcessContextStepService productionProcessContextStepService;
@Autowired
private IMesProductionDispatchContextStepService productionDispatchContextStepService;
@Override
public boolean doFunction(StationRequestBean reqBean, StationResultBean resultBean, ButtonDynamicModel buttonDynamicModel) {
productionProcessContextStepService.doFlushProductionDispatchContext(reqBean);
//清除上下文中的所有基础数据
productionProcessContextStepService.doFlushProductionProcessContext(reqBean);
//清除上下文中的所有业务数据
productionDispatchContextStepService.doFlushProductionDispatchContext(reqBean);
//TODO 清除工位队列LOCK, 工位状态对象, 流程数据等信息
this.sendMessage(reqBean, resultBean.writeDbLog(), String.format("生产线[%s]工位[%s]%s成功!",
reqBean.getWorkCenterCode(), reqBean.getWorkCellCode(), buttonDynamicModel.getButtonName()), MesPcnEnumUtil.STATION_BUSI_TYPE.MESSAGE, MesPcnEnumUtil.STATION_DATA_TYPE.TEXT);

@ -1,7 +1,9 @@
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.step.context;
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesProductionCustomContextStepService;
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesProductionDispatchContextStepService;
import cn.estsh.i3plus.mes.pcn.actor.shipping.dispatch.FsmJumpProcessService;
import cn.estsh.i3plus.pojo.base.enumutil.MesPcnEnumUtil;
import cn.estsh.i3plus.pojo.mes.model.StationRequestBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
@ -14,13 +16,19 @@ public class MesProductionContextFlushService extends FsmJumpProcessService {
@Autowired
private IMesProductionDispatchContextStepService productionDispatchContextStepService;
@Autowired
private IMesProductionCustomContextStepService productionCustomContextStepService;
//重置工序业务实现
@Override
public Boolean doJumpProcess(StationRequestBean requestBean) {
public Boolean doJumpProcess(StationRequestBean requestBean, Integer jumpProcessSource) {
//清除上下文中的所有业务数据
productionDispatchContextStepService.doFlushProductionDispatchContext(requestBean);
//发送工序完成音
if (MesPcnEnumUtil.FSM_JUMP_PROCESS_SOURCE.TASK_COMPLETE.getValue() == jumpProcessSource) productionCustomContextStepService.sendProcessCompleteSound(requestBean);
return true;
}

@ -38,6 +38,12 @@ public class MesProductionCustomContextStepService extends BaseStepService imple
this.sendMessage(reqBean, resultBean);
}
//发送工序完成音
@Override
public void sendProcessCompleteSound(StationRequestBean reqBean) {
this.sendMessage(reqBean, new StationResultBean().resultObj(MesPcnExtConstWords.PROCESS_COMPLETE).busiType(MesPcnEnumUtil.STATION_BUSI_TYPE.CUSTOM_COMPONENT.getValue()).dataType(MesPcnEnumUtil.STATION_DATA_TYPE.SOUND.getValue()));
}
//工位加工锁KEY
private String getProductionLockContextKey(StationRequestBean reqBean) { return getFsmBusikey(reqBean, new StringJoiner(MesPcnExtConstWords.COLON).add(MesPcnExtConstWords.PRODUCTION_PROCESS_CONTEXT).add(MesPcnExtConstWords.PRODUCTION_LOCK_CONTEXT).toString()); }

@ -37,7 +37,9 @@ public class MesProductionDispatchContextStepService extends BaseStepService imp
//清除上下文中的所有业务数据
@Override
public void doFlushProductionDispatchContext(StationRequestBean reqBean) {
//清除上下文中的所有业务数据
deleteFsmBusiData(reqBean.getOrganizeCode(), getContextKey(reqBean));
//清除工步客制化区域数据【装配件清单】
this.sendMessage(reqBean, new StationResultBean().busiType(MesPcnEnumUtil.STATION_BUSI_TYPE.STEP_CUSTOM_CONTENT.getValue()).dataType(MesPcnEnumUtil.STATION_DATA_TYPE.TABLES.getValue()));
}

@ -47,7 +47,7 @@ public class MesProductionProcessContextStepService extends BaseStepService impl
//清除上下文中的所有基础数据
@Override
public void doFlushProductionDispatchContext(StationRequestBean reqBean) {
public void doFlushProductionProcessContext(StationRequestBean reqBean) {
deleteFsmBusiData(reqBean.getOrganizeCode(), getContextKey(reqBean));
}

@ -204,6 +204,9 @@ public class MesPcnExtConstWords {
// 自定义触发事件: 主条码
public static final String NEXT_TRIGGER_EVENT_PRODUCT_SN = "PRODUCT_SN";
// 工序完成
public static final String PROCESS_COMPLETE = "processComplete";
// 0
public static final String ZERO_STR = "0";
// 0

Loading…
Cancel
Save