diff --git a/anomaly/src/main/resources/mapper/ReportMapper.xml b/anomaly/src/main/resources/mapper/ReportMapper.xml index 8dd8091c..8f6e2cec 100644 --- a/anomaly/src/main/resources/mapper/ReportMapper.xml +++ b/anomaly/src/main/resources/mapper/ReportMapper.xml @@ -46,7 +46,15 @@ CASE WHEN S2.STATUS = '405' THEN '是' ELSE '否' END DISPATCH_STATUS, ZSD.EARLIEST_START_DATE EARLIEST_START_DATE,ZSD.LATEST_END_DATE LATEST_END_DATE, ZSD.ACTUAL_START_DATE ACTUAL_START_DATE,ZSD.ACTUAL_COMPLETE_DATE ACTUAL_COMPLETE_DATE, - CF2.VALUE WORK_ORDER,OT2.DESCRIPTION CURRENT_OPERATION_DESCRIPTION,O2.OPERATION CURRENT_OPERATION + CF2.VALUE WORK_ORDER,OT2.DESCRIPTION CURRENT_OPERATION_DESCRIPTION,O2.OPERATION CURRENT_OPERATION, + CASE WHEN zsd.DISPATCH_STATUS = 'NEW' THEN '新建' + WHEN zsd.DISPATCH_STATUS = 'RELEASE' THEN '发布' + WHEN zsd.DISPATCH_STATUS = 'PAUSE' THEN '暂挂' + WHEN zsd.DISPATCH_STATUS = 'START' ThEN '已开始' + WHEN zsd.DISPATCH_STATUS = 'COMPLETE' THEN '已完成' + WHEN zsd.DISPATCH_STATUS = 'CANCEL' THEN '已取消' + ELSE '' + END OPERATION_STATUS FROM SFC S LEFT JOIN SFC_ROUTING SR ON SR.SFC_BO = S.HANDLE LEFT JOIN SFC_ROUTER ST ON ST.SFC_ROUTING_BO = SR.HANDLE AND ST.IN_USE = 'true' @@ -121,6 +129,7 @@ + order by S.SFC DESC \ No newline at end of file diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/mapper/ResrceMapper.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/mapper/ResrceMapper.java index 89abf8af..daf672b7 100644 --- a/meapi/src/main/java/com/foreverwin/mesnac/meapi/mapper/ResrceMapper.java +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/mapper/ResrceMapper.java @@ -44,6 +44,8 @@ public interface ResrceMapper extends BaseMapper { String isInspectByResrce(@Param("site") String site, @Param("resrce") String resrce); + String findCustomFieldByResrce(@Param("site")String site,@Param("resrce")String resrce,@Param("customField")String customField); + diff --git a/meapi/src/main/resources/mapper/ResrceMapper.xml b/meapi/src/main/resources/mapper/ResrceMapper.xml index a95a614c..7cc0768e 100644 --- a/meapi/src/main/resources/mapper/ResrceMapper.xml +++ b/meapi/src/main/resources/mapper/ResrceMapper.xml @@ -619,4 +619,10 @@ WHERE R.RESRCE = #{resrce} AND R.SITE = #{site} + + 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 c5c99084..cb8f73a9 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 @@ -27,6 +27,7 @@ import com.foreverwin.mesnac.integration.service.IntegrationLogService; import com.foreverwin.mesnac.meapi.dto.BomComponentDto; import com.foreverwin.mesnac.meapi.dto.SfcDto; import com.foreverwin.mesnac.meapi.dto.WorkCenterDto; +import com.foreverwin.mesnac.meapi.mapper.ResrceMapper; import com.foreverwin.mesnac.meapi.model.*; import com.foreverwin.mesnac.meapi.service.*; import com.foreverwin.mesnac.production.mapper.SfcCrossMapper; @@ -100,6 +101,8 @@ public class PodTemplateServiceImpl implements PodTemplateService { private IntegrationLogService integrationLogService; @Autowired private SfcDispatchCommonService sfcDispatchCommonService; + @Autowired + private ResrceMapper resrceMapper; @@ -246,7 +249,8 @@ public class PodTemplateServiceImpl implements PodTemplateService { InspectionTask inspectionTask = list.get(0); String result = inspectionTask.getResult(); if (!inspectionTask.getStatus().equals(Constants.INSPECTION_TASK_STATUS_COMPLETE)||StringUtil.isBlank(result)||!result.equals(Constants.RSESULT_OK)){ - throw new BaseException("请完成专检检验任务"); + String checkUser = resrceMapper.findCustomFieldByResrce(site, inspectionTask.getResrce(), "CHECK_USR"); + throw new BaseException("请联系"+checkUser+",处理专检任务。"); } } try {