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 250bf45..23607bd 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 @@ -92,9 +92,9 @@ public class MesPullingOrderInfoService implements IMesPullingOrderInfoService { //已确认、已扫描、已发送设备 if (StringUtil.isEmpty(bean.getPullOrderStatus())) { DdlPreparedPack.getInPackList(Arrays.asList( - MesExtEnumUtil.PULL_ORDER_STATUS.KITTING_PULL.getValue(), - MesExtEnumUtil.PULL_ORDER_STATUS.JIS_PULL.getValue(), - MesExtEnumUtil.PULL_ORDER_STATUS.SPS_PULL.getValue()), "pullOrderStatus", packBean); + MesExtEnumUtil.PULL_ORDER_STATUS.PULL_ORDER_STATUS_10.getValue(), + MesExtEnumUtil.PULL_ORDER_STATUS.PULL_ORDER_STATUS_20.getValue(), + MesExtEnumUtil.PULL_ORDER_STATUS.PULL_ORDER_STATUS_30.getValue()), "pullOrderStatus", packBean); } else { DdlPreparedPack.getNumEqualPack(bean.getPullOrderStatus(), "pullOrderStatus", packBean); } @@ -109,12 +109,12 @@ public class MesPullingOrderInfoService implements IMesPullingOrderInfoService { DdlPreparedPack.getStringEqualPack(bean.getPullCode(), "pullCode", packBeanOne); DdlPreparedPack.getStringEqualPack(bean.getPullingOrderNo(), "pullingOrderNo", packBeanOne); DdlPreparedPack.getStringEqualPack(bean.getWorkCenterCode(), "workCenterCode", packBeanOne); -// DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.PULL_ORDER_STATUS.KITTING_PULL.getValue(), "pullOrderStatus", packBeanOne); +// DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.PULL_ORDER_STATUS.PULL_ORDER_STATUS_10.getValue(), "pullOrderStatus", packBeanOne); MesPullingOrderInfo mesPullingOrderInfo = mesPullingOrderInfoRepository.getByProperty(packBeanOne); if (StringUtil.isEmpty(mesPullingOrderInfo)) { MesPcnException.throwMesBusiException("扫描拉动单号【%s】查询数据为空", bean.getPullingOrderNo()); } - if (mesPullingOrderInfo.getPullOrderStatus() != MesExtEnumUtil.PULL_ORDER_STATUS.KITTING_PULL.getValue()) { + if (mesPullingOrderInfo.getPullOrderStatus() != MesExtEnumUtil.PULL_ORDER_STATUS.PULL_ORDER_STATUS_10.getValue()) { MesPcnException.throwMesBusiException("扫描拉动单号【%s】拉动单状态不是【已确认】", bean.getPullingOrderNo()); } @@ -123,13 +123,13 @@ public class MesPullingOrderInfoService implements IMesPullingOrderInfoService { // String spsPass = configService.getCfgValue(bean.getOrganizeCode(), MesPcnExtConstWords.SPS_STRONGER_PASS); if ((!Objects.isNull(mesPullingOrderInfo.getIsPassCode()) && mesPullingOrderInfo.getIsPassCode() == CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue()) || (!Objects.isNull(bean.getIsPass()) && CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue() == bean.getIsPass())) { - mesPullingOrderInfo.setPullOrderStatus(MesExtEnumUtil.PULL_ORDER_STATUS.JIS_PULL.getValue()); + mesPullingOrderInfo.setPullOrderStatus(MesExtEnumUtil.PULL_ORDER_STATUS.PULL_ORDER_STATUS_20.getValue()); ConvertBean.serviceModelUpdate(mesPullingOrderInfo, userName); mesPullingOrderInfoRepository.update(mesPullingOrderInfo); //修改当前单号之前的为可强过 DdlPackBean packBeanPass = DdlPackBean.getDdlPackBean(bean.getOrganizeCode()); DdlPreparedPack.getStringEqualPack(bean.getPullCode(), "pullCode", packBeanPass); - DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.PULL_ORDER_STATUS.KITTING_PULL.getValue(), "pullOrderStatus", packBeanOne); + DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.PULL_ORDER_STATUS.PULL_ORDER_STATUS_10.getValue(), "pullOrderStatus", packBeanOne); DdlPreparedPack.getStringSmallerNotEqualPack(bean.getPullingOrderNo(), "pullingOrderNo", packBeanPass); DdlPreparedPack.getStringEqualPack(bean.getWorkCenterCode(), "workCenterCode", packBeanPass); List mesPullingOrderInfos = mesPullingOrderInfoRepository.findByHqlWhere(packBeanPass); @@ -146,7 +146,7 @@ public class MesPullingOrderInfoService implements IMesPullingOrderInfoService { DdlPreparedPack.getStringEqualPack(bean.getWorkCenterCode(), "workCenterCode", packBean); DdlPreparedPack.getNumNOEqualPack(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue(), "isPassCode", packBean); DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.PART_PULL_ORDER_TYPE.SPS_PULL.getValue(), "pullOrderType", packBean); - DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.PULL_ORDER_STATUS.KITTING_PULL.getValue(), "pullOrderStatus", packBean); + DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.PULL_ORDER_STATUS.PULL_ORDER_STATUS_10.getValue(), "pullOrderStatus", packBean); //顺序校验 根据未扫描单号 1 、2 、3,如果没有强过码 必须先扫1 再扫2 pullingOrderNo修改位workOrderNo DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.ASC.getValue()}, new String[]{"pullingOrderNo"}, packBean); @@ -155,7 +155,7 @@ public class MesPullingOrderInfoService implements IMesPullingOrderInfoService { //按照排序 依次扫描,如果扫描不按照顺序 报错 MesPullingOrderInfo pullingOrderInfo = pullingOrderInfos.get(0); if (pullingOrderInfo.getPullingOrderNo().equals(mesPullingOrderInfo.getPullingOrderNo())) { - mesPullingOrderInfo.setPullOrderStatus(MesExtEnumUtil.PULL_ORDER_STATUS.JIS_PULL.getValue()); + mesPullingOrderInfo.setPullOrderStatus(MesExtEnumUtil.PULL_ORDER_STATUS.PULL_ORDER_STATUS_20.getValue()); ConvertBean.serviceModelUpdate(mesPullingOrderInfo, userName); mesPullingOrderInfoRepository.update(mesPullingOrderInfo); } else { @@ -556,7 +556,7 @@ public class MesPullingOrderInfoService implements IMesPullingOrderInfoService { MesPullingOrderInfo pullingOrderInfo = mesPullingOrderInfoRepository.getByProperty(packBean); if (!StringUtil.isEmpty(pullingOrderInfo)) { - pullingOrderInfo.setPullOrderStatus(MesExtEnumUtil.PULL_ORDER_STATUS.JIS_PULL.getValue()); + pullingOrderInfo.setPullOrderStatus(MesExtEnumUtil.PULL_ORDER_STATUS.PULL_ORDER_STATUS_20.getValue()); ConvertBean.serviceModelUpdate(pullingOrderInfo, userName); mesPullingOrderInfoRepository.update(pullingOrderInfo); } @@ -570,11 +570,11 @@ public class MesPullingOrderInfoService implements IMesPullingOrderInfoService { DdlPackBean seriesPackBean = DdlPackBean.getDdlPackBean(organizeCode); DdlPreparedPack.getStringEqualPack(assemblyLine,"workCenterCode", seriesPackBean); DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.PART_PULL_ORDER_TYPE.SPS_PULL.getValue(), "pullOrderType", seriesPackBean); - DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.PULL_ORDER_STATUS.JIS_PULL.getValue(), "pullOrderStatus", seriesPackBean); + DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.PULL_ORDER_STATUS.PULL_ORDER_STATUS_20.getValue(), "pullOrderStatus", seriesPackBean); seriesPackBean.setWhereAppend(seriesPackBean.getWhereAppend() + " order by modifyDatetime desc"); MesPullingOrderInfo mesPullingOrder = mesPullingOrderInfoRepository.getByProperty(seriesPackBean); - log.info("castle-1-查询条件为:workCenterCode:{},pullOrderType:{},pullOrderStatus:{}查询出来的数据为:{}",assemblyLine,MesExtEnumUtil.PART_PULL_ORDER_TYPE.SPS_PULL.getValue(),MesExtEnumUtil.PULL_ORDER_STATUS.JIS_PULL.getValue(),JSON.toJSONString(mesPullingOrder)); + log.info("castle-1-查询条件为:workCenterCode:{},pullOrderType:{},pullOrderStatus:{}查询出来的数据为:{}",assemblyLine,MesExtEnumUtil.PART_PULL_ORDER_TYPE.SPS_PULL.getValue(),MesExtEnumUtil.PULL_ORDER_STATUS.PULL_ORDER_STATUS_20.getValue(),JSON.toJSONString(mesPullingOrder)); if (StringUtil.isEmpty(mesPullingOrder)) { return null; } @@ -582,7 +582,7 @@ public class MesPullingOrderInfoService implements IMesPullingOrderInfoService { DdlPackBean pullingOrderPackBean = DdlPackBean.getDdlPackBean(organizeCode); DdlPreparedPack.getStringEqualPack(organizeCode, "organizeCode", pullingOrderPackBean); DdlPreparedPack.getNumEqualPack(mesPullingOrder.getId(),"id", pullingOrderPackBean); - mesPullingOrderInfoRepository.updateByProperties(new String[]{"pullOrderStatus","modifyDatetime"},new Object[]{MesExtEnumUtil.PULL_ORDER_STATUS.SPS_PULL.getValue(),TimeTool.getNowTime(true)},pullingOrderPackBean); + mesPullingOrderInfoRepository.updateByProperties(new String[]{"pullOrderStatus","modifyDatetime"},new Object[]{MesExtEnumUtil.PULL_ORDER_STATUS.PULL_ORDER_STATUS_30.getValue(),TimeTool.getNowTime(true)},pullingOrderPackBean); //查询拉动组明细 DdlPackBean partPackBean = DdlPackBean.getDdlPackBean(mesPullingOrder.getOrganizeCode()); DdlPreparedPack.getStringEqualPack(mesPullingOrder.getPullingOrderNo(), "pullingOrderNo", partPackBean);