diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesPullingOrderInfoService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesPullingOrderInfoService.java index ff85563..8ea8aec 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesPullingOrderInfoService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesPullingOrderInfoService.java @@ -257,8 +257,9 @@ public class MesPullingOrderInfoService implements IMesPullingOrderInfoService { @Override public MesPullingOrderPartInfo doMesPullingOrderInfoJisScan(MesPullingOrderPartInfo mesPullingOrderInfo, String userName) { - - MesPullingOrderPartInfo partInfo = mesPullingOrderPartInfoRepository.getById(mesPullingOrderInfo.getId()); + DdlPackBean packBean = DdlPackBean.getDdlPackBean(mesPullingOrderInfo.getOrganizeCode()); + DdlPreparedPack.getNumEqualPack(mesPullingOrderInfo.getId(), MesPcnExtConstWords.ID, packBean); + MesPullingOrderPartInfo partInfo = mesPullingOrderPartInfoRepository.getByProperty(packBean); if (!StringUtil.isEmpty(partInfo)) { //查拉动单明细对应的拉动组规则 DdlPackBean packBeanDetail = DdlPackBean.getDdlPackBean(partInfo.getOrganizeCode()); @@ -268,6 +269,12 @@ public class MesPullingOrderInfoService implements IMesPullingOrderInfoService { if (StringUtil.isEmpty(mesPartPullDetail)) { MesPcnException.throwMesBusiException("工单【%s】拉动组数据为空", mesPullingOrderInfo.getWorkOrderNo()); } + //跳过码 + if (mesPullingOrderInfo.getProductSn().equals(configService.getCfgValue(partInfo.getOrganizeCode(), MesPcnExtConstWords.JIS_SKIP_CODE))) { + //修改为已跳过 + partInfo.setStatus(MesExtEnumUtil.PULL_ORDER_PART_STATUS.SKIP.getValue()); + return updatePullingOrderPartInfo(userName, partInfo); + } //校验规则 if (checkRule(mesPullingOrderInfo, mesPartPullDetail)) { //校验成功修改颜色为黄色2 @@ -314,22 +321,26 @@ public class MesPullingOrderInfoService implements IMesPullingOrderInfoService { if (!StringUtil.isEmpty(partInfo)) { //修改为已送料 partInfo.setStatus(MesExtEnumUtil.PULL_ORDER_PART_STATUS.SENTED.getValue()); - partInfo.setColor(MesExtEnumUtil.PART_PULL_DETAIL_COLOR.GREEN.getCode()); - ConvertBean.serviceModelUpdate(partInfo, userName); - mesPullingOrderPartInfoRepository.update(partInfo); - //拉动单改为已扫描 - DdlPackBean packBean = DdlPackBean.getDdlPackBean(partInfo.getOrganizeCode()); - DdlPreparedPack.getStringEqualPack(partInfo.getPullingOrderNo(), "pullingOrderNo", packBean); - - MesPullingOrderInfo pullingOrderInfo = mesPullingOrderInfoRepository.getByProperty(packBean); - if (!StringUtil.isEmpty(pullingOrderInfo)) { - pullingOrderInfo.setPullOrderStatus(MesExtEnumUtil.PULL_ORDER_STATUS.JIS_PULL.getValue()); - ConvertBean.serviceModelUpdate(pullingOrderInfo, userName); - mesPullingOrderInfoRepository.update(pullingOrderInfo); - } - result.add(partInfo); + result.add(updatePullingOrderPartInfo(userName, partInfo)); } } return result; } + + private MesPullingOrderPartInfo updatePullingOrderPartInfo(String userName, MesPullingOrderPartInfo partInfo) { + partInfo.setColor(MesExtEnumUtil.PART_PULL_DETAIL_COLOR.GREEN.getCode()); + ConvertBean.serviceModelUpdate(partInfo, userName); + mesPullingOrderPartInfoRepository.update(partInfo); + //拉动单改为已扫描 + DdlPackBean packBean = DdlPackBean.getDdlPackBean(partInfo.getOrganizeCode()); + DdlPreparedPack.getStringEqualPack(partInfo.getPullingOrderNo(), "pullingOrderNo", packBean); + + MesPullingOrderInfo pullingOrderInfo = mesPullingOrderInfoRepository.getByProperty(packBean); + if (!StringUtil.isEmpty(pullingOrderInfo)) { + pullingOrderInfo.setPullOrderStatus(MesExtEnumUtil.PULL_ORDER_STATUS.JIS_PULL.getValue()); + ConvertBean.serviceModelUpdate(pullingOrderInfo, userName); + mesPullingOrderInfoRepository.update(pullingOrderInfo); + } + return partInfo; + } } 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 f072973..b7584d7 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 @@ -499,6 +499,9 @@ public class MesPcnExtConstWords { //SPS强过配置code public static final String SPS_STRONGER_PASS = "SPS_STRONGER_PASS"; + // JIS跳过码 + public static final String JIS_SKIP_CODE = "JIS_SKIP_CODE"; + //发运解析条码最大长度 public static final String MAX_SHIPPING_BARCODE_LENGTH = "MAX_SHIPPING_BARCODE_LENGTH"; //裁片工单号