diff --git a/meapi/src/main/resources/mapper/SfcMapper.xml b/meapi/src/main/resources/mapper/SfcMapper.xml index 744632cf..e736a156 100644 --- a/meapi/src/main/resources/mapper/SfcMapper.xml +++ b/meapi/src/main/resources/mapper/SfcMapper.xml @@ -679,7 +679,7 @@ JOIN SFC_ROUTING SR ON SR.SFC_BO=S.HANDLE JOIN SFC_ROUTER SR2 ON SR.HANDLE =SR2.SFC_ROUTING_BO AND SR2.IN_USE = 'true' LEFT JOIN SFC_STEP SS ON SR2.HANDLE =SS.SFC_ROUTER_BO AND (SS.QTY_IN_QUEUE>0 or SS.QTY_IN_WORK>0) - WHERE S.SITE=#{ew.entity.site} AND ZSD.RESRCE=#{ew.entity.resrce} AND ZSD.DISPATCH_STATUS!='CANCEL' AND ZSD.DISPATCH_STATUS!='COMPLETE' + WHERE S.SITE=#{ew.entity.site} AND ZSD.RESRCE=#{ew.entity.resrce} AND (ZSD.DISPATCH_STATUS='RELEASE' AND ZSD.DISPATCH_STATUS='START') AND S.STATUS_BO IN ('StatusBO:'||#{ew.entity.site}||',401','StatusBO:'||#{ew.entity.site}||',402','StatusBO:'||#{ew.entity.site}||',403','StatusBO:'||#{ew.entity.site}||',404') AND zprt.STATUS='FINISH' AND ZPRT."RESULT"='OK' diff --git a/production/src/main/java/com/foreverwin/mesnac/production/service/impl/PodTemplateServiceImpl.java b/production/src/main/java/com/foreverwin/mesnac/production/service/impl/PodTemplateServiceImpl.java index 161371c8..4a77a180 100644 --- a/production/src/main/java/com/foreverwin/mesnac/production/service/impl/PodTemplateServiceImpl.java +++ b/production/src/main/java/com/foreverwin/mesnac/production/service/impl/PodTemplateServiceImpl.java @@ -137,6 +137,9 @@ public class PodTemplateServiceImpl implements PodTemplateService { if (StringUtil.isBlank(sfcDispatchStatus)) { throw new BaseException("产品条码与当前设备工序确认的派工单不匹配"); } + if (!sfcDispatchStatus.equals(DispatchStatusEnum.RELEASE.getCode())&&!sfcDispatchStatus.equals(DispatchStatusEnum.START.getCode())) { + throw new BaseException("派工单状态不可用"); + } //构造前台所需要的数据 Map resultMap = sfcCrossMapper.querySfcData(site, locale, sfcDto);