From 872f8e9413fa25dd5a8175c83b6f4a5c86041fef Mon Sep 17 00:00:00 2001 From: "jhforever.wang@estsh.com" Date: Sat, 16 Nov 2024 11:11:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E7=A6=BB=E7=BA=BF=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pcn/api/job/IMesOffLineDataSyncJobService.java | 9 - .../pcn/api/job/IMesOffLineDataSyncService.java | 21 -- .../pcn/apiservice/config/MesOffLineConfig.java | 57 ------ .../busi/MesOffLineDataSyncController.java | 72 ------- .../schedulejob/MesOffLineDataSyncJob.java | 78 -------- .../serviceimpl/busi/MesAssemblyExtService.java | 15 +- .../job/MesOffLineDataSyncJobService.java | 218 --------------------- .../serviceimpl/job/MesOffLineDataSyncService.java | 136 ------------- .../MesNumberRuleMatchAndUniqueService.java | 4 - .../rulematch/MesNumberRuleMatchSnService.java | 2 - .../MesNumberRuleMatchSortDoubleCheckService.java | 3 - .../MesNumberRuleMatchSortSnGmService.java | 4 - .../function/MesFunctionEquDowntimeService.java | 2 - .../step/MesAssemblyMatchSortStepService.java | 4 +- .../step/MesAssemblyReadStepService.java | 3 - .../MesAssemblyShowSortPreCraftStepService.java | 3 +- .../step/MesAssemblyShowSortStepService.java | 8 +- .../step/MesEquipByPassReadStepService.java | 5 - .../step/MesFirstMouldNoReadStepService.java | 3 - .../step/MesMembraneSignalReadStepService.java | 3 - .../step/MesMouldNoReadStepService.java | 3 - .../step/MesProductResultReadStepService.java | 3 - .../step/MesProductSnReadStepService.java | 3 - .../step/MesReadySignalReadStepService.java | 3 - .../step/MesRecyclablePackageReadStepService.java | 3 - .../step/MesSendEquipParamsCmdStepService.java | 3 - .../step/MesSendEquipParamsCmdStepService2.java | 3 - .../step/MesSendInitializationCmdStepService.java | 3 - .../step/MesSendProcessCmdStepService.java | 3 - .../MesVariableWhenFinishedReadStepService.java | 3 - .../step/MesWorkOrderCheckSortStepService.java | 4 +- .../step/MesWorkOrderReadStepService.java | 3 - .../MesProductionProcessContextStepService.java | 7 - .../MesProductionProcessMonitorService.java | 6 +- .../method/MesAssemblySaveSortStepService.java | 1 - .../resources/application-offline-bak.properties | 35 ---- .../main/resources/application-offline.properties | 81 -------- .../mes/pcn/pojo/context/MesProdRuleContext.java | 10 - .../pojo/context/MesProductionAssemblyContext.java | 4 - .../context/MesProductionAssemblySortContext.java | 6 - .../pcn/pojo/context/MesProductionPartContext.java | 11 -- .../pcn/pojo/context/MesProductionPsInContext.java | 11 -- 42 files changed, 17 insertions(+), 842 deletions(-) delete mode 100644 modules/i3plus-ext-mes-pcn-api/src/main/java/cn/estsh/i3plus/ext/mes/pcn/api/job/IMesOffLineDataSyncJobService.java delete mode 100644 modules/i3plus-ext-mes-pcn-api/src/main/java/cn/estsh/i3plus/ext/mes/pcn/api/job/IMesOffLineDataSyncService.java delete mode 100644 modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/config/MesOffLineConfig.java delete mode 100644 modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/controller/busi/MesOffLineDataSyncController.java delete mode 100644 modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/schedulejob/MesOffLineDataSyncJob.java delete mode 100644 modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/job/MesOffLineDataSyncJobService.java delete mode 100644 modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/job/MesOffLineDataSyncService.java delete mode 100644 modules/i3plus-ext-mes-pcn-apiservice/src/main/resources/application-offline-bak.properties delete mode 100644 modules/i3plus-ext-mes-pcn-apiservice/src/main/resources/application-offline.properties diff --git a/modules/i3plus-ext-mes-pcn-api/src/main/java/cn/estsh/i3plus/ext/mes/pcn/api/job/IMesOffLineDataSyncJobService.java b/modules/i3plus-ext-mes-pcn-api/src/main/java/cn/estsh/i3plus/ext/mes/pcn/api/job/IMesOffLineDataSyncJobService.java deleted file mode 100644 index 67fb6f4..0000000 --- a/modules/i3plus-ext-mes-pcn-api/src/main/java/cn/estsh/i3plus/ext/mes/pcn/api/job/IMesOffLineDataSyncJobService.java +++ /dev/null @@ -1,9 +0,0 @@ -package cn.estsh.i3plus.ext.mes.pcn.api.job; - -import cn.estsh.i3plus.pojo.mes.bean.MesPcnSyncOfflineLog; - -public interface IMesOffLineDataSyncJobService { - - String doOffLineDataSync(MesPcnSyncOfflineLog pcnSyncOfflineLog); - -} diff --git a/modules/i3plus-ext-mes-pcn-api/src/main/java/cn/estsh/i3plus/ext/mes/pcn/api/job/IMesOffLineDataSyncService.java b/modules/i3plus-ext-mes-pcn-api/src/main/java/cn/estsh/i3plus/ext/mes/pcn/api/job/IMesOffLineDataSyncService.java deleted file mode 100644 index 718a584..0000000 --- a/modules/i3plus-ext-mes-pcn-api/src/main/java/cn/estsh/i3plus/ext/mes/pcn/api/job/IMesOffLineDataSyncService.java +++ /dev/null @@ -1,21 +0,0 @@ -package cn.estsh.i3plus.ext.mes.pcn.api.job; - -import cn.estsh.i3plus.pojo.mes.bean.MesDatasource; -import cn.estsh.i3plus.pojo.mes.bean.MesPcnSyncOfflineLog; - -import java.util.List; -import java.util.Map; - -public interface IMesOffLineDataSyncService { - - List getPcnSyncOfflineLogList(String organizeCode); - - List filterPcnSyncOfflineLogList(List pcnSyncOfflineLogList, Boolean flag); - - Map filterFaulurePcnSyncOfflineLog(List pcnSyncOfflineLogList); - - MesPcnSyncOfflineLog insertPcnSyncOfflineLog(MesPcnSyncOfflineLog pcnSyncOfflineLog, String tableName); - - void insertBaseBeanData(MesPcnSyncOfflineLog pcnSyncOfflineLog, List> resultList, String objectCode, String tableName) throws Exception; - -} diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/config/MesOffLineConfig.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/config/MesOffLineConfig.java deleted file mode 100644 index 907b775..0000000 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/config/MesOffLineConfig.java +++ /dev/null @@ -1,57 +0,0 @@ -package cn.estsh.i3plus.ext.mes.pcn.apiservice.config; - -import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil; -import cn.estsh.i3plus.pojo.mes.bean.MesDatasource; -import cn.estsh.i3plus.pojo.mes.bean.MesPcnTask; -import io.swagger.annotations.ApiParam; -import lombok.Data; -import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.context.annotation.Configuration; -import org.springframework.util.StringUtils; - -import java.io.Serializable; -import java.util.HashMap; -import java.util.Map; - -@ConditionalOnExpression("'${mes.offline.sync.open:false}' == 'true'") -@Data -@Configuration -@ConfigurationProperties(prefix = "mes.offline.sync") -public class MesOffLineConfig { - - //离线数据源配置 - private MesDatasourceModel dataSource = new MesDatasourceModel(); - - //离线数据同步JOB配置 - private MesPcnTaskModel pcnTask = new MesPcnTaskModel(); - - //sql参数注入值 - private Map sqlParameter = new HashMap<>(); - - //同步sql - private Map sql = new HashMap<>(); - - public class MesDatasourceModel extends MesDatasource implements Serializable { - - private static final long serialVersionUID = 7825562788566047534L; - - @ApiParam("主机端口") - private String dsHostPort; - - public void setDsHostPort(String dsHostPort) { - this.dsHostPort = dsHostPort; - if (!StringUtils.isEmpty(this.dsHostPort)) setDsPort(Integer.valueOf(this.dsHostPort)); - } - } - - public class MesPcnTaskModel extends MesPcnTask implements Serializable { - - private static final long serialVersionUID = -521750700257233487L; - - public MesPcnTaskModel() { - this.isDeleted = CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(); - this.isValid = CommonEnumUtil.IS_VAILD.VAILD.getValue(); - } - } -} diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/controller/busi/MesOffLineDataSyncController.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/controller/busi/MesOffLineDataSyncController.java deleted file mode 100644 index f978b46..0000000 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/controller/busi/MesOffLineDataSyncController.java +++ /dev/null @@ -1,72 +0,0 @@ -package cn.estsh.i3plus.ext.mes.pcn.apiservice.controller.busi; - -import cn.estsh.i3plus.ext.mes.pcn.api.job.IMesOffLineDataSyncJobService; -import cn.estsh.i3plus.ext.mes.pcn.apiservice.config.MesOffLineConfig; -import cn.estsh.i3plus.ext.mes.pcn.pojo.constant.MesCommonConstant; -import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtConstWords; -import cn.estsh.i3plus.pojo.mes.bean.MesPcnSyncOfflineLog; -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 cn.estsh.impp.framework.boot.util.SpringContextsUtil; -import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.util.StringUtils; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import java.net.InetAddress; -import java.util.HashMap; -import java.util.Map; - -@RestController -@RequestMapping(MesCommonConstant.MES_YANFEN + "/offline-data-sync") -public class MesOffLineDataSyncController { - - @Autowired - private IMesOffLineDataSyncJobService offLineDataSyncJobService; - - @GetMapping("/cfg/get") - @ApiOperation(value = "获取离线配置") - public ResultBean getOffLineCfg() { - try { - MesOffLineConfig offLineConfig = (MesOffLineConfig) SpringContextsUtil.getBean("mesOffLineConfig"); - Map resultMap = new HashMap<>(); - resultMap.put("dataSource", offLineConfig.getDataSource()); - resultMap.put("pcnTask", offLineConfig.getPcnTask()); - resultMap.put("sqlParameter", offLineConfig.getSqlParameter()); - resultMap.put("sql", offLineConfig.getSql()); - return ResultBean.success("查询成功").setResultMap(resultMap); - } catch (ImppBusiException imppException) { - return ResultBean.fail(imppException); - } catch (Exception e) { - return ImppExceptionBuilder.newInstance().buildExceptionResult(e); - } - } - - @GetMapping("/do") - @ApiOperation(value = "执行离线同步") - public ResultBean doOffLineDataSync() { - try { - - MesOffLineConfig offLineConfig = (MesOffLineConfig) SpringContextsUtil.getBean("mesOffLineConfig"); - - String param = offLineConfig.getPcnTask().getTaskParam(); - - String[] params = StringUtils.isEmpty(param) ? null : param.split(MesPcnExtConstWords.COLON); - - if (null == params || params.length != 4) return ResultBean.fail("参数配置错误,参数正确格式[ mes.offline.sync.pcnTask.taskParam = 工厂:区域:生产线:工位 ]"); - - MesPcnSyncOfflineLog pcnSyncOfflineLog = new MesPcnSyncOfflineLog(params[0], params[1], params[2], params[3]); - pcnSyncOfflineLog.setSyncTarget(InetAddress.getLocalHost().getHostAddress()); - - return ResultBean.success(offLineDataSyncJobService.doOffLineDataSync(pcnSyncOfflineLog)); - } catch (ImppBusiException imppException) { - return ResultBean.fail(imppException); - } 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/schedulejob/MesOffLineDataSyncJob.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/schedulejob/MesOffLineDataSyncJob.java deleted file mode 100644 index ce2e4fe..0000000 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/schedulejob/MesOffLineDataSyncJob.java +++ /dev/null @@ -1,78 +0,0 @@ -package cn.estsh.i3plus.ext.mes.pcn.apiservice.schedulejob; - - -import cn.estsh.i3plus.ext.mes.pcn.api.job.IMesOffLineDataSyncJobService; -import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtConstWords; -import cn.estsh.i3plus.pojo.mes.bean.MesPcnSyncOfflineLog; -import com.alibaba.fastjson.JSONObject; -import io.swagger.annotations.ApiOperation; -import lombok.extern.slf4j.Slf4j; -import org.quartz.DisallowConcurrentExecution; -import org.quartz.Job; -import org.quartz.JobExecutionContext; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.util.StopWatch; - -import java.net.InetAddress; - -/** - * @Author: Wynne.Lu - * @CreateDate: 2019/12/17 1:18 下午 - * @Description: - **/ -@Slf4j -@ApiOperation("MES同步离线数据JOB") -@DisallowConcurrentExecution -public class MesOffLineDataSyncJob implements Job { - - @Autowired - private IMesOffLineDataSyncJobService offLineDataSyncJobService; - - public MesOffLineDataSyncJob() {} - - @Override - public void execute(JobExecutionContext jobExecutionContext) { - - log.info("MES同步离线数据JOB --- START ---"); - - StopWatch stopWatch = new StopWatch(); - - stopWatch.start(); - - try { - - Object param = jobExecutionContext.getJobDetail().getJobDataMap().get("param"); - - if (null == param) { - log.info("MES同步离线数据JOB --- ERROR --- 未配置参数 ---"); - return; - } - - String[] params = param.toString().split(MesPcnExtConstWords.COLON); - - if (null == params || params.length != 4) { - log.info("MES同步离线数据JOB --- ERROR --- 参数配置错误,参数正确格式[ mes.offline.sync.pcnTask.taskParam = 工厂:区域:生产线:工位 ] ---"); - return; - } - - MesPcnSyncOfflineLog pcnSyncOfflineLog = new MesPcnSyncOfflineLog(params[0], params[1], params[2], params[3]); - pcnSyncOfflineLog.setSyncTarget(InetAddress.getLocalHost().getHostAddress()); - - String success = offLineDataSyncJobService.doOffLineDataSync(pcnSyncOfflineLog); - - log.info("MES同步离线数据JOB --- EXEC --- {} ---", success); - - } catch (Exception e) { - - log.info("MES同步离线数据JOB --- ERROR --- {} ---", JSONObject.toJSONString(e)); - - } finally { - - stopWatch.stop(); - - log.info("MES同步离线数据JOB --- END --- 耗时:{} ms ---", stopWatch.getTotalTimeMillis()); - - } - - } -} diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesAssemblyExtService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesAssemblyExtService.java index 889f8cf..fe9bf75 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesAssemblyExtService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesAssemblyExtService.java @@ -67,12 +67,12 @@ public class MesAssemblyExtService implements IMesAssemblyExtService { if (CollectionUtils.isEmpty(workOrderAssemblyList)) return null; - //获取排序FILE文件URL 【离线生产不需要获取文件】 - Map fileMap = !prodRuleContext.getIsClosedCheck() ? getFileMap(prodRuleContext.getOrganizeCode(), filterSortFileIdList(workOrderAssemblyList)) : null; + //获取排序FILE文件URL + Map fileMap = getFileMap(prodRuleContext.getOrganizeCode(), filterSortFileIdList(workOrderAssemblyList)); List productionAssemblySortContextList = new ArrayList<>(); - workOrderAssemblyList.forEach(o -> productionAssemblySortContextList.add(new MesProductionAssemblySortContext().copy(o).fileUrl(fileMap).foreignKey(prodRuleContext.getForeignKey()).isClosedCheck(prodRuleContext.getIsClosedCheck()))); + workOrderAssemblyList.forEach(o -> productionAssemblySortContextList.add(new MesProductionAssemblySortContext().copy(o).fileUrl(fileMap).foreignKey(prodRuleContext.getForeignKey()))); return productionAssemblySortContextList; } @@ -101,17 +101,16 @@ public class MesAssemblyExtService implements IMesAssemblyExtService { workOrderAssemblyList.forEach(o -> productionAssemblySortContextList.add( new MesProductionAssemblySortContext() - .copy(o, getProductionAssembly(productionAssemblyMap, o.getId()), getIsCheckBindSeq(getWorkCell(workCellMap, o.getWorkCellCode()), prodRuleContext.getIsClosedCheck())) - .foreignKey(prodRuleContext.getForeignKey()).isClosedCheck(prodRuleContext.getIsClosedCheck()) + .copy(o, getProductionAssembly(productionAssemblyMap, o.getId()), getIsCheckBindSeq(getWorkCell(workCellMap, o.getWorkCellCode()))) + .foreignKey(prodRuleContext.getForeignKey()) ) ); return productionAssemblySortContextList; } - //判断是否按序扫描【离线默认有序】 - private Integer getIsCheckBindSeq(MesWorkCell workCell, Boolean isClosedCheck) { - if (isClosedCheck) return CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue(); + //判断是否按序扫描 + private Integer getIsCheckBindSeq(MesWorkCell workCell) { return (null != workCell && !StringUtils.isEmpty(workCell.getIsSeqScan())) ? workCell.getIsSeqScan() : CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(); } diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/job/MesOffLineDataSyncJobService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/job/MesOffLineDataSyncJobService.java deleted file mode 100644 index a85e38e..0000000 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/job/MesOffLineDataSyncJobService.java +++ /dev/null @@ -1,218 +0,0 @@ -package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.job; - -import cn.estsh.i3plus.ext.mes.pcn.api.job.IMesOffLineDataSyncJobService; -import cn.estsh.i3plus.ext.mes.pcn.api.job.IMesOffLineDataSyncService; -import cn.estsh.i3plus.ext.mes.pcn.apiservice.config.MesOffLineConfig; -import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtConstWords; -import cn.estsh.i3plus.mes.pcn.serviceimpl.base.PcnJobService; -import cn.estsh.i3plus.mes.pcn.util.BsJdbcTemplate; -import cn.estsh.i3plus.mes.pcn.util.BsJdbcTemplateConfig; -import cn.estsh.i3plus.platform.common.convert.ConvertBean; -import cn.estsh.i3plus.platform.common.tool.TimeTool; -import cn.estsh.i3plus.pojo.mes.bean.MesDatasource; -import cn.estsh.i3plus.pojo.mes.bean.MesPcnSyncOfflineLog; -import cn.estsh.i3plus.pojo.mes.bean.MesPcnTask; -import cn.estsh.i3plus.pojo.mes.util.MesExtEnumUtil; -import cn.estsh.impp.framework.boot.util.SpringContextsUtil; -import com.alibaba.fastjson.JSONObject; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Primary; -import org.springframework.stereotype.Service; -import org.springframework.util.CollectionUtils; -import org.springframework.util.StringUtils; - -import java.util.*; - -@Slf4j -@Primary -@Service -public class MesOffLineDataSyncJobService extends PcnJobService implements IMesOffLineDataSyncJobService { - - private MesOffLineConfig offLineConfig; - - private BsJdbcTemplateConfig jdbcTemplateConfig; - - @Autowired - private IMesOffLineDataSyncService offLineDataSyncService; - - @Override - public List loadJobs(Boolean pcnScheduleJob, Boolean mesOffLineSyncOpen) { - List list = super.loadJobs(pcnScheduleJob, mesOffLineSyncOpen); - if (!mesOffLineSyncOpen) return list; - try { - offLineConfig = (MesOffLineConfig) SpringContextsUtil.getBean("mesOffLineConfig"); - jdbcTemplateConfig = (BsJdbcTemplateConfig) SpringContextsUtil.getBean("bsJdbcTemplateConfig"); - list.add(offLineConfig.getPcnTask()); - } catch (Exception e) { - } - return list; - } - - @Override - public String doOffLineDataSync(MesPcnSyncOfflineLog pcnSyncOfflineLog) { - - if (null == offLineConfig) offLineConfig = (MesOffLineConfig) SpringContextsUtil.getBean("mesOffLineConfig"); - - if (null == offLineConfig) return "MesOffLineConfig IS NULL"; - - MesDatasource datasource = offLineConfig.getDataSource(); - pcnSyncOfflineLog.setSyncSource(String.format("mysql://%s:%s/%s", datasource.getDsHost(), datasource.getDsPort(), datasource.getDsDbName())); - pcnSyncOfflineLog.setSyncPattern("全量同步"); - pcnSyncOfflineLog.setSyncDate(TimeTool.getToday()); - ConvertBean.serviceModelInitialize(pcnSyncOfflineLog, MesPcnExtConstWords.JOB); - pcnSyncOfflineLog.setSystemSyncDatetime(pcnSyncOfflineLog.getModifyDatetime()); - - String error = checkDataSourceIsValid(datasource); - if (!StringUtils.isEmpty(error)) return error; - - Map sqlMap = offLineConfig.getSql(); - Map sqlParameterMap = offLineConfig.getSqlParameter(); - - if (CollectionUtils.isEmpty(sqlMap) || CollectionUtils.isEmpty(sqlParameterMap)) return "SQL CFG IS NULL"; - - List pcnSyncOfflineLogList = offLineDataSyncService.getPcnSyncOfflineLogList(pcnSyncOfflineLog.getOrganizeCode()); - - List successedList = offLineDataSyncService.filterPcnSyncOfflineLogList(pcnSyncOfflineLogList, true); - - if (!CollectionUtils.isEmpty(successedList) && successedList.containsAll(sqlMap.keySet())) return String.format("%s已同步成功,无需重复执行!", sqlMap.keySet().toString()); - - Map failuredMap = offLineDataSyncService.filterFaulurePcnSyncOfflineLog(pcnSyncOfflineLogList); - - if (null == jdbcTemplateConfig) jdbcTemplateConfig = (BsJdbcTemplateConfig) SpringContextsUtil.getBean("bsJdbcTemplateConfig"); - - BsJdbcTemplate bsJdbcTemplate = null != jdbcTemplateConfig ? jdbcTemplateConfig.getJdbcTemplate(datasource) : null; - - Boolean isConn = null != jdbcTemplateConfig ? jdbcTemplateConfig.checkDbConn(datasource) : false; - - String tableName; - Boolean success = true; - List successTableNameList = new ArrayList<>(); - List failureTableNameList = new ArrayList<>(); - - for (String objectCode : sqlMap.keySet()) { - - if (StringUtils.isEmpty(objectCode)) continue; - - if (!objectCode.contains(MesPcnExtConstWords.DECIMAL_POINT)) { - tableName = objectCode; - } else { - //如果pojo在 DEFAULT_POJO_ROUTE 下面还有包, 配置的时候需带上除去 DEFAULT_POJO_ROUTE 以外的包 - String[] suffix = objectCode.split(MesPcnExtConstWords.DECIMAL_POINT_ESCAPE); - tableName = suffix[suffix.length - 1]; - } - - if (!CollectionUtils.isEmpty(successedList) && successedList.contains(tableName)) continue; - - Boolean status = false; - String remark = null; - - try { - - String sql = sqlMap.get(objectCode); - if (StringUtils.isEmpty(sql)) { - remark = "SQL IS NULL"; - continue; - } - if (null == jdbcTemplateConfig) { - remark = "BsJdbcTemplateConfig IS NULL"; - continue; - } - if (null == bsJdbcTemplate) { - remark = "BsJdbcTemplate IS NULL"; - continue; - } - if (!isConn) { - remark = "checkDbConn IS FALSE"; - continue; - } - - Map paramMap = new HashMap<>(); - - for (Map.Entry sqlParameter : sqlParameterMap.entrySet()) { - - if (null == sqlParameter || StringUtils.isEmpty(sqlParameter.getValue())) continue; - - if (!sql.contains(MesPcnExtConstWords.COLON + sqlParameter.getKey())) continue; - - if (sqlParameter.getKey().contains("_int")) paramMap.put(sqlParameter.getKey(), Integer.valueOf(sqlParameter.getValue())); - else if (sqlParameter.getKey().contains("_list")) paramMap.put(sqlParameter.getKey(), Arrays.asList(sqlParameter.getValue().split(MesPcnExtConstWords.COMMA))); - // TODO else if - else paramMap.put(sqlParameter.getKey(), sqlParameter.getValue()); - - } - - List> resultList = bsJdbcTemplate.getJdbcTemplate().queryForList(sql, paramMap); - - if (CollectionUtils.isEmpty(resultList)) remark = "未查询到数据"; - else { - offLineDataSyncService.insertBaseBeanData(pcnSyncOfflineLog, resultList, objectCode, tableName); - successTableNameList.add(tableName); - status = true; - } - - } catch (Exception e) { - - remark = e.toString(); - - success = false; - - log.info("MES同步离线数据JOB --- ERROR --- {} ---", JSONObject.toJSONString(e)); - - } finally { - if (!status) { - insertPcnSyncOfflineLog2Failure(pcnSyncOfflineLog, tableName, failuredMap, remark); - failureTableNameList.add(String.format("[%s]同步失败原因[%s]", tableName, remark)); - success = false; - } - } - - } - - if (!CollectionUtils.isEmpty(successTableNameList) && success) { - - StringBuilder builder = new StringBuilder(); - builder.append(" insert into mes_pcn_sync_offline_log "); - builder.append("( id, organize_code, is_valid, is_deleted, create_user, create_date_time, modify_user, modify_date_time, system_sync_date_time, system_sync_status,"); - builder.append(" area_code, work_center_code, work_cell_code, object_code, effect_num, sync_date, sync_pattern, sync_source, sync_target, sync_result )"); - builder.append(" values ( :id , :organizeCode , :isValid , :isDeleted , :createUser , :createDatetime , :modifyUser , :modifyDatetime , :systemSyncDatetime , :systemSyncStatus ,"); - builder.append(" :areaCode , :workCenterCode , :workCellCode , :objectCode , :effectNum , :syncDate , :syncPattern , :syncSource , :syncTarget , :syncResult ); "); - - Map paramMap = JSONObject.parseObject(JSONObject.toJSONString(pcnSyncOfflineLog), Map.class); - paramMap.put(MesPcnExtConstWords.OBJECT_CODE, sqlMap.keySet().toString()); - paramMap.put(MesPcnExtConstWords.EFFECT_NUM, MesPcnExtConstWords.ZERO); - - bsJdbcTemplate.getJdbcTemplate().update(builder.toString(), paramMap); - - } - - return (CollectionUtils.isEmpty(successTableNameList) ? MesPcnExtConstWords.EMPTY : String.format("%s同步成功!", successTableNameList.toString())) + - (CollectionUtils.isEmpty(failureTableNameList) ? MesPcnExtConstWords.EMPTY : failureTableNameList.toString()); - - } - - private String checkDataSourceIsValid(MesDatasource datasource) { - - if (null == datasource) return "MesDatasource IS NULL"; - - if (StringUtils.isEmpty(datasource.getDsCode())) return "离线边端数据库[dsCode]未配置!"; - if (StringUtils.isEmpty(datasource.getDsName())) return "离线边端数据库[dsName]未配置!"; - if (StringUtils.isEmpty(datasource.getDsType())) return "离线边端数据库[dsType]未配置!"; - if (StringUtils.isEmpty(datasource.getDsHost())) return "离线边端数据库[dsHost]未配置!"; - if (StringUtils.isEmpty(datasource.getDsPort())) return "离线边端数据库[dsHostPort]未配置!"; - if (StringUtils.isEmpty(datasource.getDsUser())) return "离线边端数据库[dsUser]未配置!"; - if (StringUtils.isEmpty(datasource.getDsPassword())) return "离线边端数据库[dsPassword]未配置!"; - if (StringUtils.isEmpty(datasource.getDsDbName())) return "离线边端数据库[dsDbName]未配置!"; - - return null; - } - - private void insertPcnSyncOfflineLog2Failure(MesPcnSyncOfflineLog pcnSyncOfflineLog, String objectCode, Map failuredMap, String remark) { - - if (!CollectionUtils.isEmpty(failuredMap) && failuredMap.containsKey(objectCode) && failuredMap.get(objectCode).equals(remark)) return; - - offLineDataSyncService.insertPcnSyncOfflineLog(pcnSyncOfflineLog.syncResult(MesExtEnumUtil.MES_LOG_DEAL_STATUS.DEAL_FAILURE.getValue()).remark(remark), objectCode); - - } - -} diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/job/MesOffLineDataSyncService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/job/MesOffLineDataSyncService.java deleted file mode 100644 index 610c422..0000000 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/job/MesOffLineDataSyncService.java +++ /dev/null @@ -1,136 +0,0 @@ -package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.job; - -import cn.estsh.i3plus.ext.mes.pcn.api.job.IMesOffLineDataSyncService; -import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtConstWords; -import cn.estsh.i3plus.mes.pcn.util.StringUtil; -import cn.estsh.i3plus.platform.common.tool.ReflectTool; -import cn.estsh.i3plus.platform.common.tool.TimeTool; -import cn.estsh.i3plus.pojo.base.bean.BaseBean; -import cn.estsh.i3plus.pojo.base.bean.DdlPackBean; -import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil; -import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; -import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack; -import cn.estsh.i3plus.pojo.mes.bean.MesPcnSyncOfflineLog; -import cn.estsh.i3plus.pojo.mes.repository.MesPcnSyncOfflineLogRepository; -import cn.estsh.i3plus.pojo.mes.util.MesExtEnumUtil; -import cn.estsh.impp.framework.boot.exception.ImppBusiException; -import cn.estsh.impp.framework.boot.util.SpringContextsUtil; -import com.alibaba.fastjson.JSONObject; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.ArrayUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Propagation; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.util.CollectionUtils; - -import javax.persistence.Column; -import java.lang.reflect.Field; -import java.util.*; -import java.util.stream.Collectors; - -@Slf4j -@Service -public class MesOffLineDataSyncService implements IMesOffLineDataSyncService { - - @Autowired - private MesPcnSyncOfflineLogRepository pcnSyncOfflineLogRepository; - - private static String DEFAULT_POJO_ROUTE = "cn.estsh.i3plus.pojo.mes.bean."; - - @Override - public List getPcnSyncOfflineLogList(String organizeCode) { - return pcnSyncOfflineLogRepository.findByProperty( - new String[]{MesPcnExtConstWords.ORGANIZE_CODE, MesPcnExtConstWords.IS_DELETED, MesPcnExtConstWords.IS_VALID, MesPcnExtConstWords.SYNC_DATE}, - new Object[]{organizeCode, CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), TimeTool.getToday()}); - } - - @Override - public List filterPcnSyncOfflineLogList(List pcnSyncOfflineLogList, Boolean flag) { - return CollectionUtils.isEmpty(pcnSyncOfflineLogList) ? null : pcnSyncOfflineLogList.stream().filter(o -> ( - null != o && o.getSyncResult().compareTo(MesExtEnumUtil.MES_LOG_DEAL_STATUS.getValueByFlag(flag)) == 0)).map(MesPcnSyncOfflineLog::getObjectCode).collect(Collectors.toList()); - } - - @Override - public Map filterFaulurePcnSyncOfflineLog(List pcnSyncOfflineLogList) { - List filterList = CollectionUtils.isEmpty(pcnSyncOfflineLogList) ? null : - pcnSyncOfflineLogList.stream().filter(o -> (null != o && o.getSyncResult().compareTo(MesExtEnumUtil.MES_LOG_DEAL_STATUS.DEAL_FAILURE.getValue()) == 0)).collect(Collectors.toList()); - if (CollectionUtils.isEmpty(filterList)) return null; - filterList = filterList.stream().filter(o -> null != o).sorted(Comparator.comparing(MesPcnSyncOfflineLog::getCreateDatetime).reversed()).collect(Collectors.toList()); - filterList = filterList.stream().filter(o -> null != o).distinct().collect(Collectors.collectingAndThen( - Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(MesPcnSyncOfflineLog::getObjectCode))), ArrayList::new)); - return filterList.stream().filter(o -> null != o).collect(Collectors.toMap(MesPcnSyncOfflineLog::getObjectCode, MesPcnSyncOfflineLog::getRemark)); - } - - @Override - @Transactional(propagation = Propagation.REQUIRES_NEW, noRollbackFor = {ImppBusiException.class, Exception.class}) - public MesPcnSyncOfflineLog insertPcnSyncOfflineLog(MesPcnSyncOfflineLog pcnSyncOfflineLog, String tableName) { - pcnSyncOfflineLog.setObjectCode(tableName); - pcnSyncOfflineLog.setId(null); - pcnSyncOfflineLog = pcnSyncOfflineLogRepository.insert(pcnSyncOfflineLog); - log.info("MES同步离线数据JOB --- EXEC --- TABLE_NAME: {} --- {} ---", tableName, JSONObject.toJSONString(pcnSyncOfflineLog)); - return pcnSyncOfflineLog; - } - - @Override - @Transactional(propagation = Propagation.REQUIRES_NEW, noRollbackFor = {ImppBusiException.class, Exception.class}) - public void insertBaseBeanData(MesPcnSyncOfflineLog pcnSyncOfflineLog, List> resultList, String objectCode, String tableName) throws Exception { - - String daoName = StringUtil.lineToHump(tableName); - String pojoName = StringUtil.toUpperCaseFirst(daoName); - String pojoRoute = DEFAULT_POJO_ROUTE + (!objectCode.contains(MesPcnExtConstWords.DECIMAL_POINT) ? pojoName : objectCode.replace(tableName, pojoName)); - - BaseRepository baseRepository = (BaseRepository) SpringContextsUtil.getBean(daoName + MesPcnExtConstWords.Repository); - - List historyList = baseRepository.findAll(); - Map historyMap = CollectionUtils.isEmpty(historyList) ? null : historyList.stream().filter(o -> null != o).collect(Collectors.toMap(BaseBean::getId, o -> o)); - - Class clazz = Class.forName(pojoRoute); - - Field[] fields = ArrayUtils.addAll(clazz.getFields(), clazz.getDeclaredFields()); - - String fieldName; - for (Map map : resultList) { - - BaseBean baseBean = (BaseBean) clazz.newInstance(); - - for (Field field : fields) { - - if (null == field) continue; - - Column column = field.getAnnotation(Column.class); - - if (null == column) continue; - - fieldName = column.name().toLowerCase(); - - if (!map.containsKey(fieldName)) continue; - - ReflectTool.setFieldValue(baseBean, field, map.get(fieldName)); - - } - - baseBean.setSystemSyncDatetime(pcnSyncOfflineLog.getSystemSyncDatetime()); - if (!CollectionUtils.isEmpty(historyMap) && historyMap.containsKey(baseBean.getId())) { - baseRepository.updateNoSync(baseBean); - historyMap.remove(baseBean.getId()); - } else { - baseRepository.insert(baseBean); - } - - } - - historyList = CollectionUtils.isEmpty(historyMap) ? null : - historyMap.values().stream().filter(o -> (null != o && o.getIsDeleted().compareTo(CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue()) == 0)).collect(Collectors.toList()); - - if (!CollectionUtils.isEmpty(historyList)) { - DdlPackBean packBean = DdlPackBean.getDdlPackBean(pcnSyncOfflineLog.getOrganizeCode()); - DdlPreparedPack.getInPackList(historyList.stream().filter(o -> null != o).map(BaseBean::getId).collect(Collectors.toList()), MesPcnExtConstWords.ID, packBean); - baseRepository.updateByProperties(MesPcnExtConstWords.IS_DELETED, CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue(), packBean); - } - - insertPcnSyncOfflineLog(pcnSyncOfflineLog.syncResult(MesExtEnumUtil.MES_LOG_DEAL_STATUS.DEAL_SUCCESS.getValue()).effectNum(CollectionUtils.isEmpty(resultList) ? 0 : resultList.size()).remark(null), tableName); - - } - -} diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/rulematch/MesNumberRuleMatchAndUniqueService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/rulematch/MesNumberRuleMatchAndUniqueService.java index 0c138c7..d7c019f 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/rulematch/MesNumberRuleMatchAndUniqueService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/rulematch/MesNumberRuleMatchAndUniqueService.java @@ -39,10 +39,6 @@ public class MesNumberRuleMatchAndUniqueService implements IMesNumberRuleMatchDi return result; } - //验证是否离线 - MesProductionAssemblyContext context = (MesProductionAssemblyContext) params[0]; - if (context.getIsClosedCheck()) return result; - List productionAssemblyUniqueList = assemblyExtService.getProductionAssemblyUniqueList(organizeCode, sn); Optional optional = CollectionUtils.isEmpty(productionAssemblyUniqueList) ? null : diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/rulematch/MesNumberRuleMatchSnService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/rulematch/MesNumberRuleMatchSnService.java index 573fd61..79be7c9 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/rulematch/MesNumberRuleMatchSnService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/rulematch/MesNumberRuleMatchSnService.java @@ -39,9 +39,7 @@ public class MesNumberRuleMatchSnService implements IMesNumberRuleMatchDispatchS return result; } - //验证是否离线 MesProductionAssemblyContext context = (MesProductionAssemblyContext) params[0]; - if (context.getIsClosedCheck()) return result; List produceSnList = produceSnExtService.getProduceSnList(organizeCode, sn); if (CollectionUtils.isEmpty(produceSnList)) { diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/rulematch/MesNumberRuleMatchSortDoubleCheckService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/rulematch/MesNumberRuleMatchSortDoubleCheckService.java index a6b01fa..7d677d5 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/rulematch/MesNumberRuleMatchSortDoubleCheckService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/rulematch/MesNumberRuleMatchSortDoubleCheckService.java @@ -58,9 +58,6 @@ public class MesNumberRuleMatchSortDoubleCheckService implements IMesNumberRuleM if (!(Boolean) result.get(MesPcnExtConstWords.RESULT)) return result; } - //验证是否离线 - if (context.getIsClosedCheck()) return result; - result.put(MesPcnExtConstWords.RESULT, false); //验证零件号 diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/rulematch/MesNumberRuleMatchSortSnGmService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/rulematch/MesNumberRuleMatchSortSnGmService.java index 5d9ea70..0161748 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/rulematch/MesNumberRuleMatchSortSnGmService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/rulematch/MesNumberRuleMatchSortSnGmService.java @@ -40,10 +40,6 @@ public class MesNumberRuleMatchSortSnGmService implements IMesNumberRuleMatchDis return result; } - //验证是否离线 - MesProductionAssemblyContext context = (MesProductionAssemblyContext) params[0]; - if (context.getIsClosedCheck()) return result; - String productSn = customerSnTransformService.transformBarCodeGm(sn); if (productSn.length() == sn.length()) { result.put(MesPcnExtConstWords.MESSAGE, String.format("通用自制件条码固定长度为58位,零件条码[%s]长度[%s]位!", sn, sn.length())); diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/station/function/MesFunctionEquDowntimeService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/station/function/MesFunctionEquDowntimeService.java index 730744f..126ee40 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/station/function/MesFunctionEquDowntimeService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/station/function/MesFunctionEquDowntimeService.java @@ -1,6 +1,5 @@ package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.station.function; -import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesConfigService; import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtConstWords; import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.BaseSwsService; import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.function.IFsmModuleFunctionService; @@ -24,7 +23,6 @@ import org.springframework.util.CollectionUtils; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.stream.Collectors; /** diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyMatchSortStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyMatchSortStepService.java index 410257e..74a0d9a 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyMatchSortStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyMatchSortStepService.java @@ -248,7 +248,7 @@ public class MesAssemblyMatchSortStepService extends BaseStepService { MesProductionAssemblySortContext filter = (MesProductionAssemblySortContext) result.get(MesPcnExtConstWords.DATA); //前道防错 - if (!filter.getIsClosedCheck() && !StringUtils.isEmpty(filter.getProductSnId()) && !StringUtils.isEmpty(productionAssemblySortContext.getPreCraftCode())) { + if (!StringUtils.isEmpty(filter.getProductSnId()) && !StringUtils.isEmpty(productionAssemblySortContext.getPreCraftCode())) { if (CollectionUtils.isEmpty(productionRecordService.findProductionRecordList(reqBean.getOrganizeCode(), equipVariableCollectContext.getEquipVariableValue(), productionAssemblySortContext.getAssemblyPartNo(), productionAssemblySortContext.getPreCraftCode()))) { stepResult.msg(String.format("%s%s", StringUtils.isEmpty(stepResult.getMsg()) ? MesPcnExtConstWords.EMPTY : stepResult.getMsg(), String.format("零件条码[%s]前道防错零件号[%s]工艺[%s]验证失败,未查询到加工记录信息!", equipVariableCollectContext.getEquipVariableValue(), productionAssemblySortContext.getAssemblyPartNo(), productionAssemblySortContext.getPreCraftCode()))); @@ -257,7 +257,7 @@ public class MesAssemblyMatchSortStepService extends BaseStepService { } //时效性验证 - if (!filter.getIsClosedCheck() && !StringUtils.isEmpty(filter.getProductSnId())) { + if (!StringUtils.isEmpty(filter.getProductSnId())) { result = timeEfficientCfgMatchService.checkSnTimeliness(reqBean.getOrganizeCode(), equipVariableCollectContext.getEquipVariableValue(), filter.getSourceId(), MesExtEnumUtil.TIME_DATA_SOURCE.DATA_SOURCE10.getValue()); if (!(Boolean)result.get(MesPcnExtConstWords.RESULT)) { diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyReadStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyReadStepService.java index 80c3d62..87756d6 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyReadStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyReadStepService.java @@ -63,9 +63,6 @@ public class MesAssemblyReadStepService extends BaseStepService { @Override public StepResult init(StationRequestBean reqBean) { - //离线生产 - if (mesOffLineOpen) stepExpSendMsgAndThrowEx(reqBean, new StationResultBean().writeDbLog(), "离线生产当前设备不可用!"); - StepResult stepResult = StepResult.getSuccessComplete(); String endlessLoopReadTimes = fsmCommonService.handleFsmWcpcMapDataForDoScan(reqBean).get(MesPcnExtConstWords.ENDLESS_LOOP_READ_TIMES); diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyShowSortPreCraftStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyShowSortPreCraftStepService.java index 18957d3..35cc9cb 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyShowSortPreCraftStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyShowSortPreCraftStepService.java @@ -31,8 +31,7 @@ public class MesAssemblyShowSortPreCraftStepService extends MesAssemblyShowSortS public MesProdRuleContext getProdRuleSortContext(StationRequestBean reqBean, MesProductionProcessContext productionProcessContext, MesCellEquipContext cellEquipContext, MesProductionPsInContext productionPsInContext) { Map workCellMap = productionProcessContextStepService.dispatchWorkCellMap(reqBean); MesProdRuleContext prodRuleContext = new MesProdRuleContext(reqBean.getOrganizeCode(), reqBean.getWorkCenterCode(), reqBean.getWorkCellCode(), reqBean.getProcessCode(), productionProcessContext.getCraftCode()) - .equipmentCode(cellEquipContext.getEquipmentCode()).workOrderNo(productionPsInContext.getWorkOrderNo()).productSn(productionPsInContext.getProductSn()).foreignKey(productionPsInContext.getForeignKey()) - .isClosedCheck(mesOffLineOpen); + .equipmentCode(cellEquipContext.getEquipmentCode()).workOrderNo(productionPsInContext.getWorkOrderNo()).productSn(productionPsInContext.getProductSn()).foreignKey(productionPsInContext.getForeignKey()); return prodRuleCfgExtService.getProdRuleSortPreCraftContext(prodRuleContext, workCellMap); } diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyShowSortStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyShowSortStepService.java index 35bceec..44fdcb2 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyShowSortStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyShowSortStepService.java @@ -115,15 +115,13 @@ public class MesAssemblyShowSortStepService extends BaseStepService { public MesProdRuleContext getProdRuleSortContext(StationRequestBean reqBean, MesProductionProcessContext productionProcessContext, MesCellEquipContext cellEquipContext, MesProductionPsInContext productionPsInContext) { MesProdRuleContext prodRuleContext = new MesProdRuleContext( reqBean.getOrganizeCode(), reqBean.getWorkCenterCode(), reqBean.getWorkCellCode(), reqBean.getProcessCode(), productionProcessContext.getCraftCode()).isCheckBindSeq(getIsCheckBindSeq(productionProcessContext.getWorkCell())) - .equipmentCode(cellEquipContext.getEquipmentCode()).workOrderNo(productionPsInContext.getWorkOrderNo()).productSn(productionPsInContext.getProductSn()).foreignKey(productionPsInContext.getForeignKey()) - .isClosedCheck(mesOffLineOpen); + .equipmentCode(cellEquipContext.getEquipmentCode()).workOrderNo(productionPsInContext.getWorkOrderNo()).productSn(productionPsInContext.getProductSn()).foreignKey(productionPsInContext.getForeignKey()); return prodRuleCfgExtService.getProdRuleSortContext(prodRuleContext); } - //判断是否按序扫描【离线默认有序】 + //判断是否按序扫描 private Integer getIsCheckBindSeq(MesWorkCell workCell) { - if (!mesOffLineOpen) return (null != workCell && !StringUtils.isEmpty(workCell.getIsSeqScan())) ? workCell.getIsSeqScan() : CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(); - return CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue(); + return (null != workCell && !StringUtils.isEmpty(workCell.getIsSeqScan())) ? workCell.getIsSeqScan() : CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(); } //装配件清单列表标题 diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesEquipByPassReadStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesEquipByPassReadStepService.java index 5be72ee..453a499 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesEquipByPassReadStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesEquipByPassReadStepService.java @@ -8,7 +8,6 @@ import cn.estsh.i3plus.ext.mes.pcn.pojo.context.MesCellEquipContext; import cn.estsh.i3plus.ext.mes.pcn.pojo.context.MesEquipLogDispatchContext; import cn.estsh.i3plus.ext.mes.pcn.pojo.context.MesProductionProcessContext; import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.BaseStepService; -import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil; import cn.estsh.i3plus.pojo.base.enumutil.MesPcnEnumUtil; import cn.estsh.i3plus.pojo.mes.bean.MesEquipmentVariable; import cn.estsh.i3plus.pojo.mes.bean.MesEquipmentVariableCfg; @@ -20,7 +19,6 @@ import com.alibaba.fastjson.JSONObject; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import org.springframework.util.StringUtils; import java.util.List; @@ -55,9 +53,6 @@ public class MesEquipByPassReadStepService extends BaseStepService { MesProductionProcessContext productionProcessContext = productionProcessContextStepService.getProductionProcessContext(reqBean); if (!productionProcessContext.getSuccess()) return stepResult.isCompleted(false); - //离线生产 - if (mesOffLineOpen) return stepResult.isCompleted(false); - //当前工位使用的设备 MesCellEquipContext cellEquipContext = productionProcessContext.getCurCellEquip(); if (null == cellEquipContext) return stepResult.isCompleted(false); diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesFirstMouldNoReadStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesFirstMouldNoReadStepService.java index a0e36ff..4c627e0 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesFirstMouldNoReadStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesFirstMouldNoReadStepService.java @@ -67,9 +67,6 @@ public class MesFirstMouldNoReadStepService extends BaseStepService { @Override public StepResult init(StationRequestBean reqBean) { - //离线生产 - if (mesOffLineOpen) stepExpSendMsgAndThrowEx(reqBean, new StationResultBean().writeDbLog(), "离线生产当前设备不可用!"); - //发送工步内容 productionCustomContextStepService.sendStepContextMessage(reqBean); diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesMembraneSignalReadStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesMembraneSignalReadStepService.java index 27b7623..e5712e4 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesMembraneSignalReadStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesMembraneSignalReadStepService.java @@ -55,9 +55,6 @@ public class MesMembraneSignalReadStepService extends BaseStepService { @Override public StepResult init(StationRequestBean reqBean) { - //离线生产 - if (mesOffLineOpen) stepExpSendMsgAndThrowEx(reqBean, new StationResultBean().writeDbLog(), "离线生产当前设备不可用!"); - //发送工步内容 productionCustomContextStepService.sendStepContextMessage(reqBean); diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesMouldNoReadStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesMouldNoReadStepService.java index b5e7cff..4eedf6d 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesMouldNoReadStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesMouldNoReadStepService.java @@ -69,9 +69,6 @@ public class MesMouldNoReadStepService extends BaseStepService { StepResult stepResult = StepResult.getSuccessComplete(); - //离线生产不读模具号 - if (mesOffLineOpen) return stepResult; - StationResultBean resultBean = new StationResultBean(); //获取工步参数 diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductResultReadStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductResultReadStepService.java index 37c4717..12af97e 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductResultReadStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductResultReadStepService.java @@ -71,9 +71,6 @@ public class MesProductResultReadStepService extends BaseStepService { StepResult stepResult = StepResult.getSuccessComplete(); - //离线生产不读加工结果 - if (mesOffLineOpen) return stepResult; - StationResultBean resultBean = new StationResultBean(); //获取工步参数 diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductSnReadStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductSnReadStepService.java index 7be2c93..8d4e0e9 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductSnReadStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductSnReadStepService.java @@ -65,9 +65,6 @@ public class MesProductSnReadStepService extends BaseStepService { @Override public StepResult init(StationRequestBean reqBean) { - //离线生产 - if (mesOffLineOpen) stepExpSendMsgAndThrowEx(reqBean, new StationResultBean().writeDbLog(), "离线生产当前设备不可用!"); - StepResult stepResult = StepResult.getSuccessComplete(); String endlessLoopReadTimes = fsmCommonService.handleFsmWcpcMapDataForDoScan(reqBean).get(MesPcnExtConstWords.ENDLESS_LOOP_READ_TIMES); diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesReadySignalReadStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesReadySignalReadStepService.java index 7e85f94..b71fe25 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesReadySignalReadStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesReadySignalReadStepService.java @@ -55,9 +55,6 @@ public class MesReadySignalReadStepService extends BaseStepService { @Override public StepResult init(StationRequestBean reqBean) { - //离线生产 - if (mesOffLineOpen) stepExpSendMsgAndThrowEx(reqBean, new StationResultBean().writeDbLog(), "离线生产当前设备不可用!"); - //发送工步内容 productionCustomContextStepService.sendStepContextMessage(reqBean); diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesRecyclablePackageReadStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesRecyclablePackageReadStepService.java index 912a5e1..714f1fc 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesRecyclablePackageReadStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesRecyclablePackageReadStepService.java @@ -66,9 +66,6 @@ public class MesRecyclablePackageReadStepService extends BaseStepService { @Override public StepResult init(StationRequestBean reqBean) { - //离线生产 - if (mesOffLineOpen) stepExpSendMsgAndThrowEx(reqBean, new StationResultBean().writeDbLog(), "离线生产当前设备不可用!"); - StepResult stepResult = StepResult.getSuccessComplete(); String endlessLoopReadTimes = fsmCommonService.handleFsmWcpcMapDataForDoScan(reqBean).get(MesPcnExtConstWords.ENDLESS_LOOP_READ_TIMES); diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesSendEquipParamsCmdStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesSendEquipParamsCmdStepService.java index 4119a95..d8cd1f7 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesSendEquipParamsCmdStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesSendEquipParamsCmdStepService.java @@ -62,9 +62,6 @@ public class MesSendEquipParamsCmdStepService extends BaseStepService { StepResult stepResult = StepResult.getSuccessComplete(); - //离线生产不发送设备加工参数 - if (mesOffLineOpen) return stepResult; - StationResultBean resultBean = new StationResultBean(); //获取上下文加工规则数据信息集合 diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesSendEquipParamsCmdStepService2.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesSendEquipParamsCmdStepService2.java index 2d618fe..1287d9a 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesSendEquipParamsCmdStepService2.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesSendEquipParamsCmdStepService2.java @@ -62,9 +62,6 @@ public class MesSendEquipParamsCmdStepService2 extends BaseStepService { StepResult stepResult = StepResult.getSuccessComplete(); - //离线生产不发送设备加工参数 - if (mesOffLineOpen) return stepResult; - StationResultBean resultBean = new StationResultBean(); //获取上下文加工规则数据信息集合 diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesSendInitializationCmdStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesSendInitializationCmdStepService.java index 18a1283..553e058 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesSendInitializationCmdStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesSendInitializationCmdStepService.java @@ -49,9 +49,6 @@ public class MesSendInitializationCmdStepService extends BaseStepService { StepResult stepResult = StepResult.getSuccessComplete(); - //离线生产不发送初始化指令 - if (mesOffLineOpen) return stepResult; - StationResultBean resultBean = new StationResultBean(); //获取工步参数 diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesSendProcessCmdStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesSendProcessCmdStepService.java index fe85b36..8a2b493 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesSendProcessCmdStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesSendProcessCmdStepService.java @@ -49,9 +49,6 @@ public class MesSendProcessCmdStepService extends BaseStepService { StepResult stepResult = StepResult.getSuccessComplete(); - //离线生产不发送允许加工指令 - if (mesOffLineOpen) return stepResult; - StationResultBean resultBean = new StationResultBean(); //获取工步参数 diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesVariableWhenFinishedReadStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesVariableWhenFinishedReadStepService.java index 6e5378a..aa01e29 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesVariableWhenFinishedReadStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesVariableWhenFinishedReadStepService.java @@ -59,9 +59,6 @@ public class MesVariableWhenFinishedReadStepService extends BaseStepService { StepResult stepResult = StepResult.getSuccessComplete(); - //离线生产不保存工艺参数 - if (mesOffLineOpen) return stepResult; - StationResultBean resultBean = new StationResultBean(); // 获取上下文信息 diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesWorkOrderCheckSortStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesWorkOrderCheckSortStepService.java index 4a25b15..b2981fe 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesWorkOrderCheckSortStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesWorkOrderCheckSortStepService.java @@ -207,11 +207,11 @@ public class MesWorkOrderCheckSortStepService extends MesWorkOrderCheckStepServi return stepResult.isCompleted(false).msg(String.format("请检查工单工位队列信息,加工单[%s]工位队列状态[%s]", workOrderNo, MesExtEnumUtil.QUEUE_ORDER_STATUS.valueOfDescription(queueOrder.getStatus()))); //封装产成零件 - MesProductionPartContext productionPartContext = new MesProductionPartContext().copyPartNo(workOrder, equipVariableCollectContextList.get(0).getMessageSource()).isClosedCheck(mesOffLineOpen).isCheck(productionProcessContext.getWorkCell()); + MesProductionPartContext productionPartContext = new MesProductionPartContext().copyPartNo(workOrder, equipVariableCollectContextList.get(0).getMessageSource()).isCheck(productionProcessContext.getWorkCell()); productionPartContextList.add(productionPartContext); //封装产品条码 - productionPsInContextList.add(new MesProductionPsInContext(produceSn).isClosedCheck(mesOffLineOpen).isCheck(productionProcessContext.getWorkCell()).messageSource(equipVariableCollectContextList.get(0).getMessageSource()).relateId(queueOrder.getId())); + productionPsInContextList.add(new MesProductionPsInContext(produceSn).isCheck(productionProcessContext.getWorkCell()).messageSource(equipVariableCollectContextList.get(0).getMessageSource()).relateId(queueOrder.getId())); //封装产出条码 productionPsOutContextList.add(new MesProductionPsOutContext().copy(produceSn)); diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesWorkOrderReadStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesWorkOrderReadStepService.java index 0923986..01b64ba 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesWorkOrderReadStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesWorkOrderReadStepService.java @@ -62,9 +62,6 @@ public class MesWorkOrderReadStepService extends BaseStepService { @Override public StepResult init(StationRequestBean reqBean) { - //离线生产 - if (mesOffLineOpen) stepExpSendMsgAndThrowEx(reqBean, new StationResultBean().writeDbLog(), "离线生产当前设备不可用!"); - StepResult stepResult = StepResult.getSuccessComplete(); String endlessLoopReadTimes = fsmCommonService.handleFsmWcpcMapDataForDoScan(reqBean).get(MesPcnExtConstWords.ENDLESS_LOOP_READ_TIMES); diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/context/MesProductionProcessContextStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/context/MesProductionProcessContextStepService.java index 4ac6992..506a828 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/context/MesProductionProcessContextStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/context/MesProductionProcessContextStepService.java @@ -10,7 +10,6 @@ import cn.estsh.i3plus.mes.pcn.api.iservice.base.IConfigService; import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.BaseStepService; import cn.estsh.i3plus.platform.common.tool.TimeTool; import cn.estsh.i3plus.pojo.base.codemaker.SnowflakeIdMaker; -import cn.estsh.i3plus.pojo.base.enumutil.MesPcnEnumUtil; import cn.estsh.i3plus.pojo.mes.bean.*; import cn.estsh.i3plus.pojo.mes.model.StationKvBean; import cn.estsh.i3plus.pojo.mes.model.StationRequestBean; @@ -168,12 +167,6 @@ public class MesProductionProcessContextStepService extends BaseStepService impl if (isCheckProcess && StringUtils.isEmpty(productionProcessContext.getProcessCode())) return productionProcessContext.message(String.format("请检查工序信息,生产线[%s]工位[%s]对应工序代码[%s]的有效性!", reqBean.getWorkCenterCode(), reqBean.getWorkCellCode(), reqBean.getProcessCode())); - if (mesOffLineOpen) { - //离线生产发送设备质量信息[BAD=Red] - this.sendMessage(reqBean, new StationResultBean().busiType(MesPcnEnumUtil.STATION_BUSI_TYPE.QUALITY_MODULE.getValue()).dataType(MesPcnEnumUtil.STATION_DATA_TYPE.COLOR.getValue()).resultObj(MesExtEnumUtil.COLOR.RED.getValue())); - if (productionProcessContext.getWorkCenter().getCenterType().compareTo(MesExtEnumUtil.WORK_CENTER_TYPE.NOSORT.getValue()) == 0) return productionProcessContext.message("离线生产仅支持排序生产线!"); - } - return productionProcessContext; } diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/context/MesProductionProcessMonitorService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/context/MesProductionProcessMonitorService.java index ed8d7f4..b7f4b90 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/context/MesProductionProcessMonitorService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/context/MesProductionProcessMonitorService.java @@ -36,10 +36,8 @@ public class MesProductionProcessMonitorService extends BaseProcessMonitorServic @Override public Boolean doProcessComplete(StationRequestBean requestBean) { //补DB日志 [获取开模ID赋值scanInfo] [获取上下文产出条码数据信息集合赋值resultList] - if (!mesOffLineOpen) { - writeDbLogService.doRestoreDbLog(requestBean, new StationResultBean() - .restoreDbLog().scanInfo(productionProcessContextStepService.getScanMonitorContextMouldRecordId(requestBean)).resultList(productionDispatchContextStepService.getProductionPsOutContext(requestBean))); - } + writeDbLogService.doRestoreDbLog(requestBean, new StationResultBean() + .restoreDbLog().scanInfo(productionProcessContextStepService.getScanMonitorContextMouldRecordId(requestBean)).resultList(productionDispatchContextStepService.getProductionPsOutContext(requestBean))); //清除上下文中的所有业务数据 productionDispatchContextStepService.flushProductionDispatchContext(requestBean); //父类发送工序完成音 diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/method/MesAssemblySaveSortStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/method/MesAssemblySaveSortStepService.java index 38f5533..8bd8448 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/method/MesAssemblySaveSortStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/method/MesAssemblySaveSortStepService.java @@ -154,7 +154,6 @@ public class MesAssemblySaveSortStepService extends BaseStepService { private void saveProductionAssemblyUnique(StationRequestBean reqBean, MesProductionAssemblySortContext productionAssemblySortContext) { if (!MesExtEnumUtil.ASSEMBLY_MATCH_TYPE.checkUniqueRuleInDb(productionAssemblySortContext.getMatchType()) || StringUtils.isEmpty(productionAssemblySortContext.getAssemblySn())) return; - if (productionAssemblySortContext.getIsClosedCheck()) return;//离线生产不写[装配件规则唯一绑定记录表] MesProductionAssemblyUnique productionAssemblyUnique = new MesProductionAssemblyUnique(); BeanUtils.copyProperties(productionAssemblySortContext, productionAssemblyUnique, MesPcnExtConstWords.ID); productionAssemblyUnique.setPid(productionAssemblySortContext.getId()); diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/resources/application-offline-bak.properties b/modules/i3plus-ext-mes-pcn-apiservice/src/main/resources/application-offline-bak.properties deleted file mode 100644 index d840eb7..0000000 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/resources/application-offline-bak.properties +++ /dev/null @@ -1,35 +0,0 @@ -##\u79BB\u7EBF\u5F00\u5173 -mes.offline.open = false -##\u79BB\u7EBF\u540C\u6B65\u5F00\u5173 -mes.offline.sync.open = true - -##\u79BB\u7EBF\u540C\u6B65\u8FB9\u7AEF\u6570\u636E\u5E93JOB -mes.offline.sync.pcnTask.taskCode = OFFLINE_DATA_SYNC_JOB -mes.offline.sync.pcnTask.taskName = OFFLINE_DATA_SYNC_JOB -mes.offline.sync.pcnTask.taskGroupName = OFFLINE_DATA_SYNC_JOB -mes.offline.sync.pcnTask.taskDescription = OFFLINE_DATA_SYNC_JOB -mes.offline.sync.pcnTask.taskClass = MesOffLineDataSyncJob -mes.offline.sync.pcnTask.taskPackage = cn.estsh.i3plus.ext.mes.pcn.apiservice.schedulejob -mes.offline.sync.pcnTask.pcnCode = PCN001 -mes.offline.sync.pcnTask.taskCycleExps = 0 0/2 * * * ? -mes.offline.sync.pcnTask.taskCycleDescription = \u6BCF2\u5206\u949F\u6267\u884C\u4E00\u6B21 -mes.offline.sync.pcnTask.taskParam = CR01:CH218:CH218-B - -##\u79BB\u7EBF\u8FB9\u7AEF\u6570\u636E\u5E93\u914D\u7F6E -mes.offline.sync.dataSource.dsCode = impp_i3_mes_offline -mes.offline.sync.dataSource.dsName = impp_i3_mes_offline -mes.offline.sync.dataSource.dsType = SOURCE_MARIA_DB -mes.offline.sync.dataSource.dsHost = 10.193.30.20 -mes.offline.sync.dataSource.dsHostPort = 3306 -mes.offline.sync.dataSource.dsUser = root -mes.offline.sync.dataSource.dsPassword = (mfLEu7@9kmfdsTy -mes.offline.sync.dataSource.dsDbName = impp_i3_mes_offline - -##\u79BB\u7EBF\u8BBF\u95EE\u8FB9\u7AEF\u6570\u636E\u5E93SQL\u8BED\u53E5\u5360\u4F4D\u7B26\u5BF9\u5E94\u503C -mes.offline.sync.sqlParameter.organize_code = CR01 - - -##\u79BB\u7EBF\u8BBF\u95EE\u8FB9\u7AEF\u6570\u636E\u5E93SQL\u8BED\u53E5 -##\u7EC4\u7EC7\u6A21\u578B -mes.offline.sync.sql.mes_datasource = select * from mes_datasource where organize_code = :organize_code ; - diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/resources/application-offline.properties b/modules/i3plus-ext-mes-pcn-apiservice/src/main/resources/application-offline.properties deleted file mode 100644 index 8242b32..0000000 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/resources/application-offline.properties +++ /dev/null @@ -1,81 +0,0 @@ -##\u79BB\u7EBF\u5F00\u5173 -mes.offline.open = false -##\u79BB\u7EBF\u540C\u6B65\u5F00\u5173 -mes.offline.sync.open = true - -##\u79BB\u7EBF\u540C\u6B65\u8FB9\u7AEF\u6570\u636E\u5E93JOB -mes.offline.sync.pcnTask.taskCode = OFFLINE_DATA_SYNC_JOB -mes.offline.sync.pcnTask.taskName = OFFLINE_DATA_SYNC_JOB -mes.offline.sync.pcnTask.taskGroupName = OFFLINE_DATA_SYNC_JOB -mes.offline.sync.pcnTask.taskDescription = OFFLINE_DATA_SYNC_JOB -mes.offline.sync.pcnTask.taskClass = MesOffLineDataSyncJob -mes.offline.sync.pcnTask.taskPackage = cn.estsh.i3plus.ext.mes.pcn.apiservice.schedulejob -mes.offline.sync.pcnTask.pcnCode = PCN001 -#mes.offline.sync.pcnTask.taskCycleExps = 0 0 */1 * * ? -mes.offline.sync.pcnTask.taskCycleExps = 0 0/10 * * * ? -mes.offline.sync.pcnTask.taskCycleDescription = \u6BCF\u5C0F\u65F6\u6267\u884C\u4E00\u6B21 -mes.offline.sync.pcnTask.taskParam = CR01:CH218:CH218-B - -##\u79BB\u7EBF\u8FB9\u7AEF\u6570\u636E\u5E93\u914D\u7F6E -mes.offline.sync.dataSource.dsCode = impp_i3_mes -mes.offline.sync.dataSource.dsName = impp_i3_mes -mes.offline.sync.dataSource.dsType = SOURCE_MARIA_DB -mes.offline.sync.dataSource.dsHost = 10.193.30.20 -mes.offline.sync.dataSource.dsHostPort = 3306 -mes.offline.sync.dataSource.dsUser = root -mes.offline.sync.dataSource.dsPassword = (mfLEu7@9kmfdsTy -mes.offline.sync.dataSource.dsDbName = impp_i3_mes - -##\u79BB\u7EBF\u8BBF\u95EE\u8FB9\u7AEF\u6570\u636E\u5E93SQL\u8BED\u53E5\u5360\u4F4D\u7B26\u5BF9\u5E94\u503C -mes.offline.sync.sqlParameter.organize_code = CR01 -mes.offline.sync.sqlParameter.work_center_code = CH218 -mes.offline.sync.sqlParameter.work_cell_code = CH218-B -##mes.offline.sync.sqlParameter.part_no_list = abc,def,ghi... -##mes.offline.sync.sqlParameter.field_int = 10 - -##\u79BB\u7EBF\u8BBF\u95EE\u8FB9\u7AEF\u6570\u636E\u5E93SQL\u8BED\u53E5 -##\u7EC4\u7EC7\u6A21\u578B -mes.offline.sync.sql.mes_area = select * from mes_area where organize_code = :organize_code ; -mes.offline.sync.sql.mes_work_center = select * from mes_work_center where organize_code = :organize_code and work_center_code = :work_center_code ; -mes.offline.sync.sql.mes_work_cell = select * from mes_work_cell where organize_code = :organize_code and work_center_code = :work_center_code ; - -##\u5DE5\u827A\u6D41\u7A0B -mes.offline.sync.sql.mes_state_machine = select * from mes_state_machine where organize_code = :organize_code and is_deleted = 2 and sm_code in (select sm_code from mes_route_process where organize_code = :organize_code and is_deleted = 2 and route_code in (select route_code from mes_route_process_cell where organize_code = :organize_code and is_deleted = 2 and work_center_code = :work_center_code and work_cell_code = :work_cell_code) and process_code in (select process_code from mes_route_process_cell where organize_code = :organize_code and is_deleted = 2 and work_center_code = :work_center_code and work_cell_code = :work_cell_code )) ; -mes.offline.sync.sql.mes_state_machine_status = select * from mes_state_machine_status where organize_code = :organize_code and is_deleted = 2 and sm_code in (select sm_code from mes_route_process where organize_code = :organize_code and is_deleted = 2 and route_code in (select route_code from mes_route_process_cell where organize_code = :organize_code and is_deleted = 2 and work_center_code = :work_center_code and work_cell_code = :work_cell_code) and process_code in (select process_code from mes_route_process_cell where organize_code = :organize_code and is_deleted = 2 and work_center_code = :work_center_code and work_cell_code = :work_cell_code )) ; -mes.offline.sync.sql.mes_step_group = select * from mes_step_group where organize_code = :organize_code and amg_id in (select trigger_amg_id from mes_state_machine_status where organize_code = :organize_code and is_deleted = 2 and sm_code in (select sm_code from mes_route_process where organize_code = :organize_code and is_deleted = 2 and route_code in (select route_code from mes_route_process_cell where organize_code = :organize_code and is_deleted = 2 and work_center_code = :work_center_code and work_cell_code = :work_cell_code) and process_code in (select process_code from mes_route_process_cell where organize_code = :organize_code and is_deleted = 2 and work_center_code = :work_center_code and work_cell_code = :work_cell_code ))) ; -mes.offline.sync.sql.mes_step = select * from mes_step where organize_code = :organize_code ; -mes.offline.sync.sql.mes_step_param = select * from mes_step_param where organize_code = :organize_code ; -mes.offline.sync.sql.mes_route = select * from mes_route where organize_code = :organize_code and is_deleted = 2 and route_code in (select route_code from mes_route_process_cell where organize_code = :organize_code and is_deleted = 2 and work_center_code = :work_center_code and work_cell_code = :work_cell_code ) ; -mes.offline.sync.sql.mes_route_process = select * from mes_route_process where organize_code = :organize_code and is_deleted = 2 and route_code in (select route_code from mes_route_process_cell where organize_code = :organize_code and is_deleted = 2 and work_center_code = :work_center_code and work_cell_code = :work_cell_code ) ; -mes.offline.sync.sql.mes_route_process_cell = select * from mes_route_process_cell where organize_code = :organize_code and is_deleted = 2 and work_center_code = :work_center_code and work_cell_code = :work_cell_code ; -mes.offline.sync.sql.mes_prod_route_cfg = select * from mes_prod_route_cfg where organize_code = :organize_code and is_deleted = 2 and work_center_code = :work_center_code ; -mes.offline.sync.sql.mes_prod_route_opt_param = select * from mes_prod_route_opt_param where organize_code = :organize_code and is_deleted = 2 and prod_route_cfg_id in (select id from mes_prod_route_cfg where organize_code = :organize_code and is_deleted = 2 and work_center_code = :work_center_code ) ; -mes.offline.sync.sql.mes_process = select * from mes_process where organize_code = :organize_code and is_deleted = 2 and process_code in (select process_code from mes_route_process_cell where organize_code = :organize_code and is_deleted = 2 and work_center_code = :work_center_code and work_cell_code = :work_cell_code ) ; -mes.offline.sync.sql.mes_craft = select * from mes_craft where organize_code = :organize_code and is_deleted = 2 and craft_code in (select craft_code from mes_process_craft_cfg where organize_code = :organize_code and is_deleted = 2 and process_code in (select process_code from mes_process where organize_code = :organize_code and is_deleted = 2 and process_code in (select process_code from mes_route_process_cell where organize_code = :organize_code and is_deleted = 2 and work_center_code = :work_center_code and work_cell_code = :work_cell_code ))) ; -mes.offline.sync.sql.mes_process_craft_cfg = select * from mes_process_craft_cfg where organize_code = :organize_code and is_deleted = 2 and process_code in (select process_code from mes_process where organize_code = :organize_code and is_deleted = 2 and process_code in (select process_code from mes_route_process_cell where organize_code = :organize_code and is_deleted = 2 and work_center_code = :work_center_code and work_cell_code = :work_cell_code )) ; - -##\u7CFB\u7EDF\u914D\u7F6E -mes.offline.sync.sql.mes_config = select * from mes_config ; - -##\u5DE5\u4F4D\u6309\u94AE -mes.offline.sync.sql.mes_window = select * from mes_window where organize_code = :organize_code ; -mes.offline.sync.sql.mes_window_module = select * from mes_window_module where organize_code = :organize_code ; -mes.offline.sync.sql.mes_window_module_param = select * from mes_window_module_param where organize_code = :organize_code ; -mes.offline.sync.sql.mes_work_module = select * from mes_work_module where organize_code = :organize_code ; -mes.offline.sync.sql.mes_work_module_param = select * from mes_work_module_param where organize_code = :organize_code ; -mes.offline.sync.sql.mes_work_cell_module = select * from mes_work_cell_module where organize_code = :organize_code and is_deleted = 2 and is_valid = 1 and work_center_code = :work_center_code and work_cell_code = :work_cell_code ; - -##\u7269\u6599\u4FE1\u606F -mes.offline.sync.sql.mes_part = select * from mes_part where organize_code = :organize_code ; -mes.offline.sync.sql.mes_part_sap = select * from mes_part_sap where organize_code = :organize_code ; -mes.offline.sync.sql.mes_customer_part = select * from mes_customer_part where organize_code = :organize_code ; - -##\u6253\u5370\u6A21\u7248 -mes.offline.sync.sql.mes_label_template = select * from mes_label_template where organize_code = :organize_code and is_deleted = 2 and is_valid = 1 ; -mes.offline.sync.sql.mes_label_template_param = select * from mes_label_template_param where organize_code = :organize_code and is_deleted = 2 and is_valid = 1 ; - -##\u7F16\u7801\u89C4\u5219 -mes.offline.sync.sql.mes_number_rule = select * from mes_number_rule where organize_code = :organize_code and is_deleted = 2 and is_valid = 1 ; - -##\u6392\u5E8F\u4EA7\u54C1\u52A0\u5DE5\u89C4\u5219 -mes.offline.sync.sql.mes_prod_rule_sort_cfg = select * from mes_prod_rule_sort_cfg where organize_code = :organize_code and work_center_code = :work_center_code and work_cell_code = :work_cell_code ; \ No newline at end of file diff --git a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProdRuleContext.java b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProdRuleContext.java index 94abe1f..04e674e 100644 --- a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProdRuleContext.java +++ b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProdRuleContext.java @@ -60,10 +60,6 @@ public class MesProdRuleContext implements Serializable { @ApiParam(name = "是否验证装配件扫描顺序") private Integer isCheckBindSeq; - //默认开启防错, true代表关闭防错 - @ApiParam(name = "是否关闭防错") - private Boolean isClosedCheck = false; - //-------以下非排序属性------------- @ApiParam("非排序产品加工规则ID") @@ -134,12 +130,6 @@ public class MesProdRuleContext implements Serializable { return this; } - //赋值系统配置【离线开关】 - public MesProdRuleContext isClosedCheck(Boolean isClosedCheck) { - this.isClosedCheck = isClosedCheck; - return this; - } - //非排序无须使用工位的字段,直接使用非排序产品加工规则的字段; //排序使用工位的字段, 如果是显示前道所有装配件场景下在装配件清单中单独标记各个工位的装配件是否需要顺序扫描 public MesProdRuleContext isCheckBindSeq(Integer isSeqScan) { diff --git a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionAssemblyContext.java b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionAssemblyContext.java index 3b7687d..e6463bb 100644 --- a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionAssemblyContext.java +++ b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionAssemblyContext.java @@ -124,10 +124,6 @@ public class MesProductionAssemblyContext implements Serializable { @ApiParam("匹配时间") public String matchDatetime; - //默认开启防错, true代表关闭防错 - @ApiParam(name = "是否关闭防错") - public Boolean isClosedCheck = false; - public String repeatKeyToString() { if (StringUtils.isEmpty(this.equipmentCode) || StringUtils.isEmpty(this.matchType) || (StringUtils.isEmpty(this.matchRule) && StringUtils.isEmpty(this.assemblyPartNo))) return null; return String.format("%s:%s&%s:%s&%s:%s&%s:%s", diff --git a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionAssemblySortContext.java b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionAssemblySortContext.java index 7ff9499..7f3b4f8 100644 --- a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionAssemblySortContext.java +++ b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionAssemblySortContext.java @@ -247,10 +247,4 @@ public class MesProductionAssemblySortContext extends MesProductionAssemblyConte private void matchDatetime() { this.matchDatetime = (new SimpleDateFormat(MesPcnExtConstWords.DATE_FORMAT_SSS)).format(new Date()); } - //赋值系统配置【离线开关】 - public MesProductionAssemblySortContext isClosedCheck(Boolean isClosedCheck) { - this.isClosedCheck = isClosedCheck; - return this; - } - } diff --git a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionPartContext.java b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionPartContext.java index fddec94..0f14096 100644 --- a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionPartContext.java +++ b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionPartContext.java @@ -106,10 +106,6 @@ public class MesProductionPartContext implements Serializable { @ApiParam("工艺强过码") private String craftJumpCode; - //默认开启防错, true代表关闭防错 - @ApiParam(name = "是否关闭防错") - private Boolean isClosedCheck = false; - //默认否 @ApiParam("是否顺序防错") private Integer isCheckSeq = CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(); @@ -188,14 +184,7 @@ public class MesProductionPartContext implements Serializable { return this; } - //赋值系统配置【离线开关】 - public MesProductionPartContext isClosedCheck(Boolean isClosedCheck) { - this.isClosedCheck = isClosedCheck; - return this; - } - public MesProductionPartContext isCheck(MesWorkCell workCell) { - if (isClosedCheck) return this; if(!StringUtils.isEmpty(workCell.getIsCheckSeq()) && workCell.getIsCheckSeq().compareTo(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue()) == 0) this.isCheckSeq = workCell.getIsCheckSeq(); return this; } diff --git a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionPsInContext.java b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionPsInContext.java index 816c65d..6060f9f 100644 --- a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionPsInContext.java +++ b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionPsInContext.java @@ -80,10 +80,6 @@ public class MesProductionPsInContext implements Serializable { @ApiParam("是否空腔") private Integer isFinishCode = CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(); - //默认开启防错, true代表关闭防错 - @ApiParam(name = "是否关闭防错") - private Boolean isClosedCheck = false; - //默认否 @ApiParam(name = "是否前道工艺防错") private Integer isCheckCraft = CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(); @@ -115,14 +111,7 @@ public class MesProductionPsInContext implements Serializable { return this; } - //赋值系统配置【离线开关】 - public MesProductionPsInContext isClosedCheck(Boolean isClosedCheck) { - this.isClosedCheck = isClosedCheck; - return this; - } - public MesProductionPsInContext isCheck(MesWorkCell workCell) { - if (isClosedCheck) return this; if(!StringUtils.isEmpty(workCell.getIsCheckCraft()) && workCell.getIsCheckCraft().compareTo(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue()) == 0) this.isCheckCraft = workCell.getIsCheckCraft(); return this; }