From c82473c72a2fcaa621fa6b0d409695b99dc9bd11 Mon Sep 17 00:00:00 2001 From: "jhforever.wang@estsh.com" Date: Fri, 18 Oct 2024 15:55:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=92=E5=BA=8F=20=E8=A3=85=E9=85=8D?= =?UTF-8?q?=E4=BB=B6=E5=89=8D=E7=BD=AE=E5=86=99=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ext/mes/pcn/apiservice/daoimpl/MesEquipmentLogDao.java | 2 +- .../serviceimpl/step/MesAssemblyMatchSortStepService.java | 12 ++++++------ .../serviceimpl/step/MesAssemblyShowSortStepService.java | 6 ++---- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/daoimpl/MesEquipmentLogDao.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/daoimpl/MesEquipmentLogDao.java index c998082..ea0006c 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/daoimpl/MesEquipmentLogDao.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/daoimpl/MesEquipmentLogDao.java @@ -210,7 +210,7 @@ public class MesEquipmentLogDao implements IMesEquipmentLogDao { for (MesEquipmentLog equipmentLog : equipmentLogList) { if (null == equipmentLog) continue; - builder.append(" insert into mes_equipment_log_"); + builder.append(" insert into mes_equipment_log_detail_"); if (!StringUtils.isEmpty(mesShardingAppendOrg) && mesShardingAppendOrg.toUpperCase().equals(CommonEnumUtil.TRUE_OR_FALSE.TRUE.name())) builder.append(organizeCode.toLowerCase()).append(MesPcnExtConstWords.E_UNDERLINE); builder.append(equipId); builder.append("( id, organize_code, is_valid, is_deleted, create_user, create_date_time, modify_user, modify_date_time,"); 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 f7f741b..fb1edb2 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 @@ -69,12 +69,6 @@ public class MesAssemblyMatchSortStepService extends BaseStepService { List prodRuleContextList = productionDispatchContextStepService.getProdRuleDataContext(reqBean); if (CollectionUtils.isEmpty(prodRuleContextList)) stepExpSendMsgAndThrowEx(reqBean, resultBean.writeDbLog(), "当前不存在非排序加工规则数据,请重置工序!"); - //获取上下文产出零件数据信息集合 - List productionPartContextList = productionDispatchContextStepService.getProductionPartContext(reqBean); - - //获取上下文进料零件条码信息集合 - List productionPsInContextList = productionDispatchContextStepService.getProductionPsInContext(reqBean); - //判断是否存在装配件清单 if (!checkIsNeedScanAssembly(prodRuleContextList)) return stepSuccessCompleteAndSendMsgReturn(reqBean, resultBean.writeDbLog(), stepResult, "当前加工规则未配置装配件扫描项,当前无需匹配装配件条码!"); @@ -105,6 +99,12 @@ public class MesAssemblyMatchSortStepService extends BaseStepService { String assemblySn = equipVariableCollectContextList.stream().filter(o -> null != o).map(MesEquipVariableCollectContext::getEquipVariableValue).collect(Collectors.toList()).toString(); //匹配成功 【result=true 代表单次扫描匹配成功; hasUnBindAssembly=false 代表浑腔模式全部匹配成功】 if (result || !hasUnBindAssembly) { + //获取上下文产出零件条码信息集合 + List productionPsOutContextList = productionDispatchContextStepService.getProductionPsOutContext(reqBean); + //获取上下文工位扫描监控信息 + MesScanMonitorContext scanMonitorContext = productionProcessContextStepService.dispatchScanMonitorContext(reqBean, true); + //无需扫描的需要先写库, 使用isSaveDb=1 进行标记 + prodRuleContextList = ((MesAssemblySaveSortStepService) SpringContextsUtil.getBean("mesAssemblySaveSortStepService")).saveSortProductionAssembly(reqBean, prodRuleContextList, productionPsOutContextList, scanMonitorContext); productionDispatchContextStepService.dispatchProdRuleDataContext(reqBean, prodRuleContextList); ((MesAssemblyShowSortStepService) SpringContextsUtil.getBean("mesAssemblyShowSortStepService")).showProductionAssembly(reqBean, resultBean, productionProcessContext.getWorkCenter(), prodRuleContextList, true, true); suffix = (isSkip || isCavitySkip) ? stepResult.getMsg() : String.format("装配件条码%s匹配成功!", assemblySn); 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 d6ae0e1..cefbc42 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 @@ -86,9 +86,6 @@ public class MesAssemblyShowSortStepService extends BaseStepService { //获取上下文产出零件条码信息集合 List productionPsOutContextList = productionDispatchContextStepService.getProductionPsOutContext(reqBean); - //获取上下文工位扫描监控信息 - MesScanMonitorContext scanMonitorContext = productionProcessContextStepService.dispatchScanMonitorContext(reqBean, true); - //加工规则数据信息集合 List prodRuleContextList = new ArrayList<>(); @@ -96,7 +93,8 @@ public class MesAssemblyShowSortStepService extends BaseStepService { doHandleProdRuleData(reqBean, resultBean, productionProcessContext, cellEquipContext, prodRuleContextList, productionPartContextList, productionPsInContextList, productionPsOutContextList); if (!CollectionUtils.isEmpty(prodRuleContextList)) { - + //获取上下文工位扫描监控信息 + MesScanMonitorContext scanMonitorContext = productionProcessContextStepService.dispatchScanMonitorContext(reqBean, true); //无需扫描的需要先写库, 使用isSaveDb=1 进行标记 prodRuleContextList = ((MesAssemblySaveSortStepService) SpringContextsUtil.getBean("mesAssemblySaveSortStepService")).saveSortProductionAssembly(reqBean, prodRuleContextList, productionPsOutContextList, scanMonitorContext);