From 9c3f58cbafefbae556c309df9bf2a630e62c0044 Mon Sep 17 00:00:00 2001 From: "jhforever.wang@estsh.com" Date: Wed, 27 Mar 2024 17:13:36 +0800 Subject: [PATCH] YF --- .../pcn/api/busi/yf/IYfManyCellMonitorService.java | 12 ++ .../busi/yf/YfManyCellMonitorController.java | 43 +++++++ .../station/yf/YfManyCellMonitorModuleService.java | 134 +++++++++++++++++++++ .../busi/step/yf/YfManyCellMonitorStepService.java | 54 +++++++++ .../busi/step/yf/YfManyCellProdStepService.java | 33 +++++ .../busi/step/yf/YfManyCellScanStepService.java | 43 +++++++ .../busi/yf/YfManyCellMonitorService.java | 26 ++++ .../pcn/pojo/model/yf/YfManyCellMonitorModel.java | 40 ++++++ 8 files changed, 385 insertions(+) create mode 100644 modules/i3plus-ext-mes-pcn-api/src/main/java/cn/estsh/i3plus/ext/mes/pcn/api/busi/yf/IYfManyCellMonitorService.java create mode 100644 modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/controller/busi/yf/YfManyCellMonitorController.java create mode 100644 modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/station/yf/YfManyCellMonitorModuleService.java create mode 100644 modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/step/yf/YfManyCellMonitorStepService.java create mode 100644 modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/step/yf/YfManyCellProdStepService.java create mode 100644 modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/step/yf/YfManyCellScanStepService.java create mode 100644 modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/yf/YfManyCellMonitorService.java create mode 100644 modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/model/yf/YfManyCellMonitorModel.java diff --git a/modules/i3plus-ext-mes-pcn-api/src/main/java/cn/estsh/i3plus/ext/mes/pcn/api/busi/yf/IYfManyCellMonitorService.java b/modules/i3plus-ext-mes-pcn-api/src/main/java/cn/estsh/i3plus/ext/mes/pcn/api/busi/yf/IYfManyCellMonitorService.java new file mode 100644 index 0000000..4147cd2 --- /dev/null +++ b/modules/i3plus-ext-mes-pcn-api/src/main/java/cn/estsh/i3plus/ext/mes/pcn/api/busi/yf/IYfManyCellMonitorService.java @@ -0,0 +1,12 @@ +package cn.estsh.i3plus.ext.mes.pcn.api.busi.yf; + +/** + * @Author: wangjie + * @CreateDate: 2021/01/19 15:06 下午 + * @Description: + **/ +public interface IYfManyCellMonitorService { + + void doWritePlc(String organizeCode, String plcCode, String value); + +} diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/controller/busi/yf/YfManyCellMonitorController.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/controller/busi/yf/YfManyCellMonitorController.java new file mode 100644 index 0000000..721051e --- /dev/null +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/controller/busi/yf/YfManyCellMonitorController.java @@ -0,0 +1,43 @@ +package cn.estsh.i3plus.ext.mes.pcn.apiservice.controller.busi.yf; + +import cn.estsh.i3plus.ext.mes.pcn.api.busi.yf.IYfManyCellMonitorService; +import cn.estsh.i3plus.platform.common.util.CommonConstWords; +import cn.estsh.i3plus.pojo.base.enumutil.ResourceEnumUtil; +import cn.estsh.impp.framework.base.controller.MesPcnBaseController; +import cn.estsh.impp.framework.boot.exception.ImppBusiException; +import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder; +import cn.estsh.impp.framework.boot.util.ResultBean; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @Author: wangjie + * @CreateDate: 2021/01/19 15:37 + * @Description: + **/ +@RestController +@RequestMapping(CommonConstWords.BASE_URL_MES_PCN) +@Api(tags = "延峰多工位监控生产") +public class YfManyCellMonitorController extends MesPcnBaseController { + + @Autowired + private IYfManyCellMonitorService manyCellMonitorService; + + @GetMapping(value = "/many-cell-monitor/plc-write") + @ApiOperation(value = "模拟PLC写值") + public ResultBean doWritePlc(String organizeCode, String plcCode, String value) { + try { + manyCellMonitorService.doWritePlc(organizeCode, plcCode, value); + return ResultBean.success("操作成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode()); + } catch (ImppBusiException busExcep) { + return ResultBean.fail(busExcep); + } catch (Exception e) { + return ImppExceptionBuilder.newInstance().buildExceptionResult(e); + } + } + +} diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/station/yf/YfManyCellMonitorModuleService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/station/yf/YfManyCellMonitorModuleService.java new file mode 100644 index 0000000..94c92b7 --- /dev/null +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/station/yf/YfManyCellMonitorModuleService.java @@ -0,0 +1,134 @@ +package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.busi.station.yf; + +import cn.estsh.i3plus.ext.mes.pcn.pojo.model.yf.YfManyCellMonitorModel; +import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtConstWords; +import cn.estsh.i3plus.mes.pcn.serviceimpl.base.BaseModuleService; +import cn.estsh.i3plus.mes.pcn.serviceimpl.busi.dispatch.cachedispatch.WorkCellDataCacheDispatch; +import cn.estsh.i3plus.mes.pcn.util.LocaleUtil; +import cn.estsh.i3plus.mes.pcn.util.PojoAttrUtil; +import cn.estsh.i3plus.platform.common.tool.TimeTool; +import cn.estsh.i3plus.pojo.base.enumutil.MesPcnEnumUtil; +import cn.estsh.i3plus.pojo.mes.bean.MesStateMachineStatus; +import cn.estsh.i3plus.pojo.mes.model.AttrBean; +import cn.estsh.i3plus.pojo.mes.model.StationRequestBean; +import cn.estsh.i3plus.pojo.mes.model.StationResultBean; +import com.alibaba.fastjson.JSONObject; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; +import org.springframework.util.StringUtils; + +import java.text.ParseException; +import java.util.*; +import java.util.stream.Collectors; + +/** + * @Description : 展示组件:多工位监控加工 + * @Reference : + * @Author :wangjie + * @CreateDate : 2020-06-26 11:18 上午 + * @Modify: + **/ +@Slf4j +@Service("yfManyCellMonitorModuleService") +public class YfManyCellMonitorModuleService extends BaseModuleService { + + private static final String YF_MANY_CELL_MONITOR_MODULE = "YF_MANY_CELL_MONITOR_MODULE"; + private static final String CELL_LOCATION = "CELL_LOCATION"; + + @Override + public void init(StationRequestBean reqBean) { + StationResultBean resultBean = new StationResultBean(); + resultBean.setBusiType(MesPcnEnumUtil.STATION_BUSI_TYPE.MODULE_CONTENT.getValue()); + resultBean.setDataType(MesPcnEnumUtil.STATION_DATA_TYPE.CUSTOM.getValue()); + resultBean.setCustomPageName(YF_MANY_CELL_MONITOR_MODULE); + resultBean.setDataAttrList(packDataAttrList(reqBean)); + resultBean.setSpecialDisplayData(getStepColIndent(reqBean)); + resultBean.setResultList(getResultList(reqBean)); + resultBean.setResultMap(getResultMap(reqBean, resultBean)); + this.sendMessage(reqBean, resultBean); + } + + private Map getResultMap(StationRequestBean reqBean, StationResultBean resultBean) { + Map resultMap = new HashMap<>(); + resultMap.put("location", reqBean.getWcpcMap().get(CELL_LOCATION)); + resultMap.put("qty", CollectionUtils.isEmpty(resultBean.getResultList()) ? 0 : resultBean.getResultList().size()); + return resultMap; + } + + private List getResultList(StationRequestBean reqBean) { + List resultList = getSerialNumberList(reqBean); + if (CollectionUtils.isEmpty(resultList)) return null; + resultList = resultList.stream().filter(o -> null != o).sorted(Comparator.comparing(YfManyCellMonitorModel::getCreateDatetime).reversed()).collect(Collectors.toList()); + String time = TimeTool.getNowTime(true); + for (YfManyCellMonitorModel result : resultList) { + if (null == result) continue; + try { + if (TimeTool.getSecoundsBetweenTime(2, result.getCreateDatetime(), time) >= 1) result.status("加工完成"); + else result.status("正在加工"); + } catch (ParseException e) { + result.status("加工完成"); + } + } + return resultList; + } + + private List getSerialNumberList(StationRequestBean reqBean) { + String data = (String) doHandleSn(reqBean, 1, null); + return StringUtils.isEmpty(data) ? null : JSONObject.parseArray(data, YfManyCellMonitorModel.class); + } + + private List packDataAttrList(StationRequestBean reqBean) { + List attrBeanList = new ArrayList<>(); + PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.SERIAL_NUMBER, LocaleUtil.transferLanguage(reqBean.getUserInfo(), "产品条码")); + PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.STATUS, LocaleUtil.transferLanguage(reqBean.getUserInfo(), "状态")); + PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.CREATE_DATE_TIME, LocaleUtil.transferLanguage(reqBean.getUserInfo(), "操作时间")); + return attrBeanList; + } + + @Override + public boolean execStateModule(StationRequestBean reqBean, List states, Map wcpcMap) { + init(reqBean); + return true; + } + + private String getDataKey(StationRequestBean reqBean) { + return new StringJoiner(MesPcnExtConstWords.COLON).add(reqBean.getOrganizeCode()) + .add(YF_MANY_CELL_MONITOR_MODULE).add(reqBean.getWorkCenterCode()).add(reqBean.getWorkCellCode()).toString(); + } + + private String getMonitorKey(StationRequestBean reqBean, String suffix) { + return new StringJoiner(MesPcnExtConstWords.COLON).add(reqBean.getOrganizeCode()) + .add(YF_MANY_CELL_MONITOR_MODULE).add(MesPcnExtConstWords.PLC_CODE_UC).add(suffix).toString(); + } + + public void addSerialNumber(StationRequestBean reqBean, String serialNumber) { + List resultList = getSerialNumberList(reqBean); + if (CollectionUtils.isEmpty(resultList)) resultList = new ArrayList<>(); + resultList.add(new YfManyCellMonitorModel(serialNumber, TimeTool.getNowTime(true), reqBean.getUserInfo())); + doHandleSn(reqBean, 2, JSONObject.toJSONString(resultList)); + } + + public Object doHandleSn(StationRequestBean reqBean, Integer flag, String data) { + switch (flag) { + case 1: + return new WorkCellDataCacheDispatch.builder().key(getDataKey(reqBean)).org(reqBean.getOrganizeCode()).build().get().getValue(); + case 2: + return new WorkCellDataCacheDispatch.builder().key(getDataKey(reqBean)).value(data).timeSecond(MesPcnEnumUtil.EXPIRE_TIME.ONE_HOUR.getValue()).org(reqBean.getOrganizeCode()).build().save().getSuccess(); + default: + return null; + } + } + + public Object doHandlePlcData(StationRequestBean reqBean, Integer flag, String plcCode, String data) { + switch (flag) { + case 1: + return new WorkCellDataCacheDispatch.builder().key(getMonitorKey(reqBean, plcCode)).org(reqBean.getOrganizeCode()).build().get().getValue(); + case 2: + return new WorkCellDataCacheDispatch.builder().key(getMonitorKey(reqBean, plcCode)).value(data).timeSecond(MesPcnEnumUtil.EXPIRE_TIME.ONE_HOUR.getValue()).org(reqBean.getOrganizeCode()).build().save().getSuccess(); + default: + return null; + } + } + +} diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/step/yf/YfManyCellMonitorStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/step/yf/YfManyCellMonitorStepService.java new file mode 100644 index 0000000..4bb128d --- /dev/null +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/step/yf/YfManyCellMonitorStepService.java @@ -0,0 +1,54 @@ +package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.busi.step.yf; + +import cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.busi.station.yf.YfManyCellMonitorModuleService; +import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtConstWords; +import cn.estsh.i3plus.mes.pcn.actor.shipping.dispatch.IFsmCommonService; +import cn.estsh.i3plus.mes.pcn.serviceimpl.base.BaseStepService; +import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil; +import cn.estsh.i3plus.pojo.base.enumutil.MesPcnEnumUtil; +import cn.estsh.i3plus.pojo.mes.model.StationRequestBean; +import cn.estsh.i3plus.pojo.mes.model.StationResultBean; +import cn.estsh.i3plus.pojo.mes.model.StepResult; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.StringUtils; + +@Slf4j +@Service("yfManyCellMonitorStepService") +public class YfManyCellMonitorStepService extends BaseStepService { + + @Autowired + private IFsmCommonService fsmCommonService; + + @Autowired + private YfManyCellMonitorModuleService manyCellMonitorModuleService; + + @Override + public StepResult execute(StationRequestBean reqBean) { + + log.info("工厂{}生产线{}工位{}: --- STEP EXECUTE --- YfManyCellMonitorStepService --- START --- ", reqBean.getOrganizeCode(), reqBean.getWorkCenterCode(), reqBean.getWorkCellCode()); + + StationResultBean resultBean = new StationResultBean(); + + StepResult stepResult = StepResult.getSuccessComplete(); + + fsmCommonService.checkWcpcMapForDoScan(reqBean); + + String plcCode = reqBean.getWcpcMap().get(MesPcnExtConstWords.PLC_CODE_UC); + + String plcValue = (String) manyCellMonitorModuleService.doHandlePlcData(reqBean, 1, plcCode, null); + + if (StringUtils.isEmpty(plcValue) || !plcValue.equals("true")) + return execDynamicsCompleteAndSendMsgReturn(reqBean, resultBean, stepResult, false, MesPcnEnumUtil.STATION_BUSI_TYPE.MESSAGE, MesPcnEnumUtil.STATION_DATA_TYPE.TEXT, "正在监听PLC信号中..."); + + manyCellMonitorModuleService.doHandlePlcData(reqBean, 2, plcCode, "false"); + + log.info("工厂{}生产线{}工位{}: --- STEP EXECUTE --- YfManyCellMonitorStepService --- SUCCESS ---", reqBean.getOrganizeCode(), reqBean.getWorkCenterCode(), reqBean.getWorkCellCode()); + + this.sendMessage(reqBean, resultBean, CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValueStr(), MesPcnEnumUtil.STATION_BUSI_TYPE.ADDITIONAL_TIPS, MesPcnEnumUtil.STATION_DATA_TYPE.CUSTOM); + + return execSuccessCompleteAndSendMsgReturn(reqBean, resultBean, stepResult, "已获取到PLC信号!"); + } + +} diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/step/yf/YfManyCellProdStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/step/yf/YfManyCellProdStepService.java new file mode 100644 index 0000000..c1fb99f --- /dev/null +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/step/yf/YfManyCellProdStepService.java @@ -0,0 +1,33 @@ +package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.busi.step.yf; + +import cn.estsh.i3plus.mes.pcn.serviceimpl.base.BaseStepService; +import cn.estsh.i3plus.pojo.mes.model.StationRequestBean; +import cn.estsh.i3plus.pojo.mes.model.StationResultBean; +import cn.estsh.i3plus.pojo.mes.model.StepResult; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +import java.util.concurrent.TimeUnit; + +@Slf4j +@Service("yfManyCellProdStepService") +public class YfManyCellProdStepService extends BaseStepService { + + @Override + public StepResult execute(StationRequestBean reqBean) { + + log.info("工厂{}生产线{}工位{}: --- STEP EXECUTE --- YfManyCellProdStepService --- START --- ", reqBean.getOrganizeCode(), reqBean.getWorkCenterCode(), reqBean.getWorkCellCode()); + + StationResultBean resultBean = new StationResultBean(); + + try { + TimeUnit.SECONDS.sleep(10); + } catch (InterruptedException e) { + } + + log.info("工厂{}生产线{}工位{}: --- STEP EXECUTE --- YfManyCellProdStepService --- SUCCESS ---", reqBean.getOrganizeCode(), reqBean.getWorkCenterCode(), reqBean.getWorkCellCode()); + + return execSuccessCompleteAndSendMsgReturn(reqBean, resultBean, String.format("产品条码[%s]已进入自动加工!", reqBean.getSerialNumber())); + } + +} diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/step/yf/YfManyCellScanStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/step/yf/YfManyCellScanStepService.java new file mode 100644 index 0000000..ec6903d --- /dev/null +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/step/yf/YfManyCellScanStepService.java @@ -0,0 +1,43 @@ +package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.busi.step.yf; + +import cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.busi.station.yf.YfManyCellMonitorModuleService; +import cn.estsh.i3plus.mes.pcn.serviceimpl.base.BaseStepService; +import cn.estsh.i3plus.pojo.mes.model.StationRequestBean; +import cn.estsh.i3plus.pojo.mes.model.StationResultBean; +import cn.estsh.i3plus.pojo.mes.model.StepResult; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.StringUtils; + +@Slf4j +@Service("yfManyCellScanStepService") +public class YfManyCellScanStepService extends BaseStepService { + + @Autowired + private YfManyCellMonitorModuleService manyCellMonitorModuleService; + + @Override + public StepResult guide(StationRequestBean reqBean) { + return execSuccessCompleteAndSendGuideReturn(reqBean, new StationResultBean(), "请扫描产品条码!"); + } + + @Override + public StepResult execute(StationRequestBean reqBean) { + + log.info("工厂{}生产线{}工位{}: --- STEP EXECUTE --- YfManyCellScanStepService --- START --- ", reqBean.getOrganizeCode(), reqBean.getWorkCenterCode(), reqBean.getWorkCellCode()); + + StationResultBean resultBean = new StationResultBean(); + + if (StringUtils.isEmpty(reqBean.getScanInfo())) execSendGuideAndThrowEx(reqBean, resultBean, "请扫描产品条码!"); + + manyCellMonitorModuleService.addSerialNumber(reqBean, reqBean.getScanInfo()); + + reqBean.setSerialNumber(reqBean.getScanInfo()); + + log.info("工厂{}生产线{}工位{}: --- STEP EXECUTE --- YfManyCellScanStepService --- SUCCESS ---", reqBean.getOrganizeCode(), reqBean.getWorkCenterCode(), reqBean.getWorkCellCode()); + + return execSuccessCompleteAndSendMsgReturn(reqBean, resultBean, String.format("产品条码[%s]扫描成功! 请进行加工操作!", reqBean.getSerialNumber())); + } + +} diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/yf/YfManyCellMonitorService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/yf/YfManyCellMonitorService.java new file mode 100644 index 0000000..aa74840 --- /dev/null +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/yf/YfManyCellMonitorService.java @@ -0,0 +1,26 @@ +package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.busi.yf; + +import cn.estsh.i3plus.ext.mes.pcn.api.busi.yf.IYfManyCellMonitorService; +import cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.busi.station.yf.YfManyCellMonitorModuleService; +import cn.estsh.i3plus.pojo.mes.model.StationRequestBean; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + * @author yumingxing + * @version 1.0 + * @date 2021/7/12 9:59 + **/ +@Service +public class YfManyCellMonitorService implements IYfManyCellMonitorService { + + @Autowired + private YfManyCellMonitorModuleService manyCellMonitorModuleService; + + @Override + public void doWritePlc(String organizeCode, String plcCode, String value) { + StationRequestBean requestBean = new StationRequestBean(); + requestBean.setOrganizeCode(organizeCode); + manyCellMonitorModuleService.doHandlePlcData(requestBean, 2, plcCode, value); + } +} diff --git a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/model/yf/YfManyCellMonitorModel.java b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/model/yf/YfManyCellMonitorModel.java new file mode 100644 index 0000000..0b0d155 --- /dev/null +++ b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/model/yf/YfManyCellMonitorModel.java @@ -0,0 +1,40 @@ +package cn.estsh.i3plus.ext.mes.pcn.pojo.model.yf; + + +import io.swagger.annotations.Api; +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description :不良分类MODEL + * @Reference : + * @Author : wangjie + * @CreateDate : 2019-06-04 + * @Modify: + **/ +@Data +@Api("MODEL") +public class YfManyCellMonitorModel implements Serializable { + + private static final long serialVersionUID = 6940726955090728522L; + + private String serialNumber; + private String createDatetime; + private String userInfo; + private String status; + + public YfManyCellMonitorModel() {} + + public YfManyCellMonitorModel(String serialNumber, String createDatetime, String userInfo) { + this.serialNumber = serialNumber; + this.createDatetime = createDatetime; + this.userInfo = userInfo; + } + + public YfManyCellMonitorModel status(String status) { + this.status = status; + return this; + } + +}