From 84436a5b0f95d2a59a8f2aab4bc25cac6aa3c11e Mon Sep 17 00:00:00 2001 From: "jhforever.wang@estsh.com" Date: Fri, 11 Oct 2024 09:37:45 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=A7=E5=93=81?= =?UTF-8?q?=E5=8A=A0=E5=B7=A5=E8=AE=B0=E5=BD=95=20=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=A6=86=E7=9B=96=20=E6=B2=A1=E6=9C=89=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pcn/apiservice/serviceimpl/busi/MesAssemblyExtService.java | 5 ++--- .../apiservice/serviceimpl/busi/MesProduceSnExtService.java | 3 +-- .../pcn/apiservice/serviceimpl/busi/MesWorkOrderService.java | 5 ++--- .../serviceimpl/step/MesAssemblySaveStepService.java | 4 ++-- .../step/MesProductionRecordGenerateStepService.java | 3 ++- .../step/MesSendCavityGroupParamsCmdStepService.java | 4 ++-- .../serviceimpl/step/MesWorkOrderQueueSaveStepService.java | 4 ++-- .../serviceimpl/step/MesWorkOrderSaveSortStepService.java | 10 +++++----- .../pcn/pojo/context/MesProductionAssemblyNosortContext.java | 2 +- 9 files changed, 19 insertions(+), 21 deletions(-) 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 3cef6a4..283ebfc 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 @@ -85,9 +85,8 @@ public class MesAssemblyExtService implements IMesAssemblyExtService { //【排序线】获取生产工单装配件清单 List workOrderAssemblyList = filterWorkOrderAssemblyList(getWorkOrderAssemblyList(prodRuleContext), prodRuleContext.getEquipmentCode()); - // 显示前道所有工序装配件工步: 不携带工位 - workOrderAssemblyList = !StringUtils.isEmpty(prodRuleContext.getWorkCellCode()) ? workOrderAssemblyList : - workOrderAssemblyList.stream().filter(o -> (null != o && o.getAssemblyStatus().compareTo(MesExtEnumUtil.ASSEMBLY_STATUS.ASSEMBLY_STATUS_10.getValue()) != 0)).collect(Collectors.toList()); + // 搜集非已装配的数据 + workOrderAssemblyList = workOrderAssemblyList.stream().filter(o -> (null != o && o.getAssemblyStatus().compareTo(MesExtEnumUtil.ASSEMBLY_STATUS.ASSEMBLY_STATUS_10.getValue()) != 0)).collect(Collectors.toList()); if (CollectionUtils.isEmpty(workOrderAssemblyList)) return null; diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesProduceSnExtService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesProduceSnExtService.java index 9eb8964..dc94dfb 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesProduceSnExtService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesProduceSnExtService.java @@ -161,8 +161,7 @@ public class MesProduceSnExtService implements IMesProduceSnExtService { public void saveProduceSnList(StationRequestBean reqBean, Integer snStatus, List idList) { idList = CollectionUtils.isEmpty(idList) ? idList : idList.stream().filter(o -> !StringUtils.isEmpty(o)).distinct().collect(Collectors.toList()); if (CollectionUtils.isEmpty(idList)) return; - DdlPackBean packBean = new DdlPackBean(); - DdlPreparedPack.getStringEqualPack(reqBean.getOrganizeCode(), MesPcnExtConstWords.ORGANIZE_CODE, packBean); + DdlPackBean packBean = DdlPackBean.getDdlPackBean(reqBean.getOrganizeCode()); if (idList.size() == 1) DdlPreparedPack.getNumEqualPack(idList.get(0), MesPcnExtConstWords.ID, packBean); else DdlPreparedPack.getInPackList(idList, MesPcnExtConstWords.ID, packBean); produceSnRepository.updateByProperties( diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesWorkOrderService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesWorkOrderService.java index 2bdb09e..c0a68ba 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesWorkOrderService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesWorkOrderService.java @@ -702,14 +702,13 @@ public class MesWorkOrderService implements IMesWorkOrderService { } // 同步工单信息给加工记录、条码信息 - DdlPackBean snDdlPackBean = DdlPackBean.getDdlPackBean(); + DdlPackBean snDdlPackBean = DdlPackBean.getDdlPackBean(organizeCode); DdlPreparedPack.getNumEqualPack(productionRecord.getId(), "id", snDdlPackBean); - DdlPreparedPack.getStringEqualPack(organizeCode, "organizeCode", snDdlPackBean); mesProduceSnRao.updateByProperties(new String[]{"modifyUser", "modifyDatetime", "workOrderNo"}, new Object[]{userName, TimeTool.getNowTime(true), oldMesWorkOrder.getWorkOrderNo()}, snDdlPackBean); - DdlPackBean packBean = DdlPackBean.getDdlPackBean(); + DdlPackBean packBean = DdlPackBean.getDdlPackBean(organizeCode); DdlPreparedPack.getNumEqualPack(productionRecord.getId(), "id", packBean); productionRecordRao.updateByProperties(new String[]{"modifyUser", "modifyDatetime", "workOrderNo", "reportStatus"}, new Object[]{userName, TimeTool.getNowTime(true), oldMesWorkOrder.getWorkOrderNo(), MesExtEnumUtil.REPORT_STATUS.REPORT_STATUS_20.getValue()}, packBean); diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblySaveStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblySaveStepService.java index a6fd965..c2060e0 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblySaveStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblySaveStepService.java @@ -179,8 +179,8 @@ public class MesAssemblySaveStepService extends BaseStepService { private void saveWorkOrderAssembly(StationRequestBean reqBean, MesProductionAssemblyContext productionAssemblyContext) { workOrderAssemblyRepository.updateByProperties( - new String[]{MesPcnExtConstWords.ID}, - new Object[]{productionAssemblyContext.getSourceId()}, + new String[]{MesPcnExtConstWords.ID, MesPcnExtConstWords.ORGANIZE_CODE}, + new Object[]{productionAssemblyContext.getSourceId(), reqBean.getOrganizeCode()}, new String[]{MesPcnExtConstWords.MODIFY_USER, MesPcnExtConstWords.MODIFY_DATE_TIME, MesPcnExtConstWords.SYSTEM_SYNC_STATUS, MesPcnExtConstWords.ASSEMBLY_STATUS}, new Object[]{reqBean.getUserInfo(), TimeTool.getNowTime(true), CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), productionAssemblyContext.getAssemblyStatus()}); } diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductionRecordGenerateStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductionRecordGenerateStepService.java index bc644cc..2dab440 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductionRecordGenerateStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductionRecordGenerateStepService.java @@ -5,6 +5,7 @@ import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesProductionDispatchContextStepSer import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesProductionProcessContextStepService; import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesProductionRecordService; import cn.estsh.i3plus.ext.mes.pcn.pojo.context.*; +import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtConstWords; import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.BaseStepService; import cn.estsh.i3plus.platform.common.convert.ConvertBean; import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil; @@ -123,7 +124,7 @@ public class MesProductionRecordGenerateStepService extends BaseStepService { MesProdRuleContext prodRuleContext = CollectionUtils.isEmpty(prMap) ? null : prMap.get(productionPsOutContext.getForeignKey()); MesProductionRecord productionRecord = new MesProductionRecord(); - BeanUtils.copyProperties(productionPsOutContext, productionRecord); + BeanUtils.copyProperties(productionPsOutContext, productionRecord, MesPcnExtConstWords.BASE_BEAN_FIELDS); productionRecord.setMouldNo(mouldNo); productionRecord.setEquipmentCode(cellEquipContext.getEquipmentCode()); diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesSendCavityGroupParamsCmdStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesSendCavityGroupParamsCmdStepService.java index 0d4ca2e..92ca612 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesSendCavityGroupParamsCmdStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesSendCavityGroupParamsCmdStepService.java @@ -105,14 +105,14 @@ public class MesSendCavityGroupParamsCmdStepService extends BaseStepService { for (MesCavityGroupDetailCfg mesCavityGroupDetailCfg : mesCavityGroupDetailCfgs) { index ++; // 获取加工参数 - DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean(); + DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean(reqBean.getOrganizeCode()); DdlPreparedPack.getNumEqualPack(mesCavityGroupDetailCfg.getId(), "sourceId", ddlPackBean); List mesEquipmentProdParamCfgs = mesEquipmentProdParamCfgRepository.findByHqlWhere(ddlPackBean); for (MesEquipmentProdParamCfg mesEquipmentProdParamCfg : mesEquipmentProdParamCfgs) {// String strategyClass = getStrateClass(mesEquipmentProdParamCfg.getMatchRule()); AbstractWriteVariableService equipVariableRwExtService = ((AbstractWriteVariableService) SpringContextsUtil.getBean(strategyClass)); - DdlPackBean paramPackBean = DdlPackBean.getDdlPackBean(); + DdlPackBean paramPackBean = DdlPackBean.getDdlPackBean(reqBean.getOrganizeCode()); DdlPreparedPack.getNumEqualPack(mesEquipmentProdParamCfg.getEquipVariableId(), "id", paramPackBean); MesEquipmentVariable mesEquipmentVariable = mesEquipmentVariableRepository.getByProperty(paramPackBean); if (mesEquipmentVariable == null) { diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesWorkOrderQueueSaveStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesWorkOrderQueueSaveStepService.java index 741da0a..5098e2d 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesWorkOrderQueueSaveStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesWorkOrderQueueSaveStepService.java @@ -67,8 +67,8 @@ public class MesWorkOrderQueueSaveStepService extends BaseStepService { private void saveWorkOrderQueue(StationRequestBean reqBean, MesProductionPsInContext productionPsInContext) { queueOrderRepository.updateByProperties( - new String[]{MesPcnExtConstWords.ID}, - new Object[]{productionPsInContext.getRelateId()}, + new String[]{MesPcnExtConstWords.ID, MesPcnExtConstWords.ORGANIZE_CODE}, + new Object[]{productionPsInContext.getRelateId(), reqBean.getOrganizeCode()}, new String[]{MesPcnExtConstWords.MODIFY_USER, MesPcnExtConstWords.MODIFY_DATE_TIME, MesPcnExtConstWords.SYSTEM_SYNC_STATUS, MesPcnExtConstWords.STATUS}, new Object[]{reqBean.getUserInfo(), TimeTool.getNowTime(true), CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), MesExtEnumUtil.QUEUE_ORDER_STATUS.FINISH.getValue()}); } diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesWorkOrderSaveSortStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesWorkOrderSaveSortStepService.java index 06989fd..dfee367 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesWorkOrderSaveSortStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesWorkOrderSaveSortStepService.java @@ -93,20 +93,20 @@ public class MesWorkOrderSaveSortStepService extends BaseStepService { if (null == productionPartContext || StringUtils.isEmpty(productionPartContext.getForeignKey())) continue; - Boolean isEndWorkCell = (StringUtils.isEmpty(workCell.getIsEndWorkCell()) || workCell.getIsEndWorkCell().compareTo(CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue()) == 0) ? false : true; + Boolean isEndWorkCell = (!StringUtils.isEmpty(workCell.getIsEndWorkCell()) && workCell.getIsEndWorkCell().compareTo(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue()) == 0) ? true : false; if (!isEndWorkCell && productionPartContext.getWorkOrderStatus().compareTo(MesExtEnumUtil.ORDER_STATUS.PROCESS.getValue()) == 0) continue; if (!isEndWorkCell) { workOrderRepository.updateByProperties( - new String[]{MesPcnExtConstWords.ID}, - new Object[]{productionPartContext.getId()}, + new String[]{MesPcnExtConstWords.ID, MesPcnExtConstWords.ORGANIZE_CODE}, + new Object[]{productionPartContext.getId(), reqBean.getOrganizeCode()}, new String[]{MesPcnExtConstWords.MODIFY_USER, MesPcnExtConstWords.MODIFY_DATE_TIME, MesPcnExtConstWords.SYSTEM_SYNC_STATUS, MesPcnExtConstWords.WORK_ORDER_STATUS, MesPcnExtConstWords.ONLINE_TIME}, new Object[]{reqBean.getUserInfo(), (new SimpleDateFormat(MesPcnExtConstWords.DATE_FORMAT_SSS)).format(new Date()), CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), MesExtEnumUtil.ORDER_STATUS.PROCESS.getValue(), TimeTool.getNowTime(true)}); } else { workOrderRepository.updateByProperties( - new String[]{MesPcnExtConstWords.ID}, - new Object[]{productionPartContext.getId()}, + new String[]{MesPcnExtConstWords.ID, MesPcnExtConstWords.ORGANIZE_CODE}, + new Object[]{productionPartContext.getId(), reqBean.getOrganizeCode()}, new String[]{MesPcnExtConstWords.MODIFY_USER, MesPcnExtConstWords.MODIFY_DATE_TIME, MesPcnExtConstWords.SYSTEM_SYNC_STATUS, MesPcnExtConstWords.WORK_ORDER_STATUS, MesPcnExtConstWords.COMPLETE_QTY, MesPcnExtConstWords.UN_COMPLETE_QTY, MesPcnExtConstWords.OFFLINE_TIME}, new Object[]{reqBean.getUserInfo(), (new SimpleDateFormat(MesPcnExtConstWords.DATE_FORMAT_SSS)).format(new Date()), CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), MesExtEnumUtil.ORDER_STATUS.COMPLETE.getValue(), new Double(1), new Double(0), TimeTool.getNowTime(true)}); } diff --git a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionAssemblyNosortContext.java b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionAssemblyNosortContext.java index 698ecfe..d48d55e 100644 --- a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionAssemblyNosortContext.java +++ b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionAssemblyNosortContext.java @@ -53,7 +53,7 @@ public class MesProductionAssemblyNosortContext extends MesProductionAssemblyCon this.partNo = prodRuleContext.getOutPartNo(); if (StringUtils.isEmpty(this.routeSeq)) this.routeSeq = MesPcnExtConstWords.ZERO; - if (StringUtils.isEmpty(this.isRepeat)) this.isRepeat = CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(); + if (StringUtils.isEmpty(this.isRepeat) || this.isRepeat.compareTo(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue()) != 0) this.isRepeat = CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(); this.assemblyStatus = MesExtEnumUtil.ASSEMBLY_STATUS.ASSEMBLY_STATUS_30.getValue(); From 265f4ef7dc4437246dede3fccb4879227b088ad4 Mon Sep 17 00:00:00 2001 From: yxw Date: Fri, 11 Oct 2024 10:34:43 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=8E=92=E5=BA=8F=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=20=E5=B1=95=E7=A4=BA=E5=B7=A5=E5=8D=95?= =?UTF-8?q?=E5=BA=8F=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../serviceimpl/station/MesProductionSortModuleService.java | 2 +- .../cn/estsh/i3plus/ext/mes/pcn/pojo/util/MesPcnExtConstWords.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/station/MesProductionSortModuleService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/station/MesProductionSortModuleService.java index e1786eb..4d24ac4 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/station/MesProductionSortModuleService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/station/MesProductionSortModuleService.java @@ -107,7 +107,7 @@ public class MesProductionSortModuleService extends BaseModuleService { //队列工单清单列表标题 public List dataAttrList() { List attrBeanList = new ArrayList<>(); - PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.PRODUCE_SEQ, "工单序号"); + PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.WORK_ORDER_SEQ, "工单序号"); PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.CAR_MODEL_CODE, "车型配置"); PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.CUST_ORDER_NO, "客户订单号"); PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.PART_NO, "零件号"); diff --git a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/util/MesPcnExtConstWords.java b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/util/MesPcnExtConstWords.java index 060318b..f9a1b14 100644 --- a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/util/MesPcnExtConstWords.java +++ b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/util/MesPcnExtConstWords.java @@ -631,5 +631,7 @@ public class MesPcnExtConstWords { public static final int DATA_MATRIX_CODE_HEIGHT = 80; // dataMatrix 形式的客户条码 public static final String CUST_SN_DATA_MATRIX = "custSnDataMatrix"; - public static final String CUST_SN_DATA_MATRIX_BASE64 = "custSnDataMatrixBase64"; + + // 工单序号 + public static final String WORK_ORDER_SEQ = "workOrderSeq"; } From 53ba608c1635ee6db726ccdd9a7aa1d1822aca69 Mon Sep 17 00:00:00 2001 From: "jhforever.wang@estsh.com" Date: Fri, 11 Oct 2024 10:53:57 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../serviceimpl/step/MesProductSnPrintSortStepService.java | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductSnPrintSortStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductSnPrintSortStepService.java index e9e5023..94e41ba 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductSnPrintSortStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductSnPrintSortStepService.java @@ -23,7 +23,10 @@ import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; import org.springframework.util.StringUtils; -import java.util.*; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Optional; import java.util.function.Function; import java.util.stream.Collectors; @@ -128,17 +131,10 @@ public class MesProductSnPrintSortStepService extends BaseStepService { // 从物料信息中获取标签模板 String labelTemplateCode = partDataContext.get(sn.getPartNo()).getCustLabelTemplate(); - // 从物料信息中获取打印机 - String productPrinterCode = partDataContext.get(sn.getPartNo()).getProductPrinterCode(); - if (labelTemplateCode == null) { stepExpSendMsgAndThrowEx(reqBean, resultBean, String.format("工单号[%s]零件号[%s]未在ERP物料信息维护打印模板,请检查并修改!", sn.getWorkOrderNo(), sn.getPartNo())); } - if (StringUtils.isEmpty(productPrinterCode)) { - stepExpSendMsgAndThrowEx(reqBean, resultBean, String.format("工单号[%s]零件号[%s]未在ERP物料信息维护打印机,请检查并修改!", sn.getWorkOrderNo(), sn.getPartNo())); - } - MesProduceSnPrintModel mesProduceSnPrintModel = new MesProduceSnPrintModel(); // 查模板代码 MesLabelTemplate labelTemplate = getLabelTemplate(labelTemplateCode, organizeCode); @@ -148,7 +144,7 @@ public class MesProductSnPrintSortStepService extends BaseStepService { } mesProduceSnPrintModel.setMesLabelTemplate(labelTemplate); - mesProduceSnPrintModel.setPrinter(productPrinterCode); + mesProduceSnPrintModel.setPrinter(partDataContext.get(sn.getPartNo()).getProductPrinterCode()); mesProduceSnPrintModel.setPartNo(sn.getPartNo()); mesProduceSnPrintModel.setOrganizeCode(organizeCode); mesProduceSnPrintModel.setSourceData(workOrder);