问题清单 295、296

master
赵嘉伟 3 years ago
parent ffad2d9f34
commit b4e8404ef5

@ -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 @@
</if>
</if>
</where>
order by S.SFC DESC
</select>
<select id="surplusReturnTable" resultType="java.util.HashMap">
@ -472,15 +481,28 @@
</select>
<select id="shopOrderSchedule" parameterType="java.util.HashMap" resultType="java.util.HashMap">
SELECT ROWNUM SEQ,wct.DESCRIPTION WORK_CENTER_DESCRIPTION,cf.VALUE ITEM_NUMBER,
SELECT ROWNUM SEQ,S.* FROM (
SELECT wct.DESCRIPTION WORK_CENTER_DESCRIPTION,cf.VALUE ITEM_NUMBER,
COALESCE(dflt.DATA_TAG,cf2.VALUE) PRODUCT_CATEGORY,
zsd.SHOP_ORDER,it.DESCRIPTION ITEM_DESCRIPTION,zsd.PLANNED_START_DATE,zsd.PLANNED_START_DATE PREDICT_COMP_DATE,
zsd.PLANNED_COMP_DATE ,zsd.ACTUAL_START_DATE ,zsd.ACTUAL_COMPLETE_DATE,ot.DESCRIPTION CURRENT_OPERATION_DESCRIPTION,
zsd.PLANNED_COMP_DATE ,zsd.ACTUAL_START_DATE ,zsd.ACTUAL_COMPLETE_DATE,
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 DISPATCH_STATUS,
ot.DESCRIPTION CURRENT_OPERATION_DESCRIPTION,
-- CASE WHEN ss.STEP_ID = zsd.STEP_ID AND zsd.DISPATCH_STATUS != 'START' AND o.OPERATION = zsd.OPERATION THEN ''
-- ELSE ot.DESCRIPTION
-- END CURRENT_OPERATION_DESCRIPTION,
ot2.DESCRIPTION OPERATION_DESCRIPTION,
CASE WHEN zab.HANDLE IS NOT NULL THEN '是'
ELSE '否'
END IS_ANOMALY,
CASE WHEN zsd.PLANNED_COMP_DATE IS NOT NULL AND zsd.ACTUAL_COMPLETE_DATE IS NULL THEN TO_CHAR(TO_NUMBER(zsd.PLANNED_COMP_DATE + 8/24 - SYSDATE),'FM9999990.000')
CASE WHEN zsd.PLANNED_COMP_DATE IS NOT NULL AND zsd.ACTUAL_COMPLETE_DATE IS NULL AND zsd.DISPATCH_STATUS != 'CANCEL' THEN TO_CHAR(TO_NUMBER(zsd.PLANNED_COMP_DATE + 8/24 - SYSDATE),'FM9999990.000')
ELSE ''
END SURPLUS_DAY,
CASE WHEN zsd.ACTUAL_START_DATE IS NOT NULL AND cf3.VALUE IS NOT NULL AND cf3.VALUE != 0 AND zsd.ACTUAL_COMPLETE_DATE IS NULL
@ -537,6 +559,6 @@
AND zsd.PLANNED_COMP_DATE &lt;= TO_DATE(#{endDateTime}|| '15:59:59','YYYY-MM-DD HH24:MI:SS')
</if>
</where>
ORDER BY zsd.SFC,zsd.STEP_ID
ORDER BY zsd.SFC DESC,zsd.STEP_ID) S
</select>
</mapper>

@ -44,6 +44,8 @@ public interface ResrceMapper extends BaseMapper<Resrce> {
String isInspectByResrce(@Param("site") String site, @Param("resrce") String resrce);
String findCustomFieldByResrce(@Param("site")String site,@Param("resrce")String resrce,@Param("customField")String customField);

@ -619,4 +619,10 @@
WHERE R.RESRCE = #{resrce} AND R.SITE = #{site}
</select>
<!--根据设备找到设备上的自定义字段-->
<select id="findCustomFieldByResrce" resultType="java.lang.String">
SELECT CF.VALUE FROM RESRCE R
LEFT JOIN CUSTOM_FIELDS CF ON CF.HANDLE = R.HANDLE AND CF."ATTRIBUTE" = #{customField}
WHERE R.RESRCE = #{resrce} AND R.SITE = #{site}
</select>
</mapper>

@ -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 {

Loading…
Cancel
Save