修改派工单人员必输,主关件判断逻辑。

master
Leon 3 years ago
parent 655b40d4cf
commit 67ad5556a3

@ -506,6 +506,7 @@ public class SfcDispatchServiceImpl extends ServiceImpl<SfcDispatchMapper, SfcDi
//派工发布 //派工发布
String employees = sfcDispatchDto.getEmployee();
if (DispatchStatusEnum.RELEASE.getCode().equals(type)) { if (DispatchStatusEnum.RELEASE.getCode().equals(type)) {
//校验派工状态 //校验派工状态
String originalStatus = sfcDispatchDto.getDispatchStatus(); String originalStatus = sfcDispatchDto.getDispatchStatus();
@ -517,10 +518,10 @@ public class SfcDispatchServiceImpl extends ServiceImpl<SfcDispatchMapper, SfcDi
} }
//资源、计划时间必输 //资源、计划时间必输
if (StringUtils.isBlank(resource) || sfcDispatchDto.getPlannedStartDate() == null || sfcDispatchDto.getPlannedCompDate() == null) { if (StringUtils.isBlank(resource) || StringUtil.isBlank(employees) || sfcDispatchDto.getPlannedStartDate() == null || sfcDispatchDto.getPlannedCompDate() == null) {
flag = false; flag = false;
message.append(seq++%3 == 0 ? "\n" : "| |"); message.append(seq++%3 == 0 ? "\n" : "| |");
message.append("派工单[" + dispatchNo + "]的资源、计划开始或完成时间没维护,不允许发布"); message.append("派工单[" + dispatchNo + "]的资源、操作者、计划开始或完成时间没维护,不允许发布");
continue; continue;
} }
@ -551,7 +552,6 @@ public class SfcDispatchServiceImpl extends ServiceImpl<SfcDispatchMapper, SfcDi
} }
//校验操作者与资源是否匹配 //校验操作者与资源是否匹配
String employees = sfcDispatchDto.getEmployee();
if (StringUtil.notBlank(employees)) { if (StringUtil.notBlank(employees)) {
//资源、计划时间必输 //资源、计划时间必输
if (StringUtils.isBlank(resource)) { if (StringUtils.isBlank(resource)) {

@ -683,7 +683,7 @@
SD.STEP_ID, SD.OPERATION, OT.DESCRIPTION OPERATION_DESCRIPTION, SD.RESOURCE_TYPE, SD.RESRCE, SD.EMPLOYEE, SD.EMPLOYEE USER_NAME, SD.DISPATCH_QTY, SD.PROD_HOURS, RS.DESCRIPTION RESOURCE_DESCRIPTION, SD.STEP_ID, SD.OPERATION, OT.DESCRIPTION OPERATION_DESCRIPTION, SD.RESOURCE_TYPE, SD.RESRCE, SD.EMPLOYEE, SD.EMPLOYEE USER_NAME, SD.DISPATCH_QTY, SD.PROD_HOURS, RS.DESCRIPTION RESOURCE_DESCRIPTION,
CASE WHEN SD.DISPATCH_STATUS = 'COMPLETE' THEN SD.DISPATCH_QTY ELSE 0 END COMPLETED_QTY, SD.PLANNED_START_DATE, SD.PLANNED_COMP_DATE, SD.WORK_CENTER, SD.IS_DISPATCH, SD.EMPLOYEE_DESCRIPTION, CASE WHEN SD.DISPATCH_STATUS = 'COMPLETE' THEN SD.DISPATCH_QTY ELSE 0 END COMPLETED_QTY, SD.PLANNED_START_DATE, SD.PLANNED_COMP_DATE, SD.WORK_CENTER, SD.IS_DISPATCH, SD.EMPLOYEE_DESCRIPTION,
SD.ACTUAL_START_DATE, SD.ACTUAL_COMPLETE_DATE, SD.REMARK, SD.DISPATCH_SEQ, SD.DISPATCH_SEQ-1 BEFORE_SEQ, SD.DISPATCH_SEQ+1 AFTER_SEQ, SD.EARLIEST_START_DATE, SD.LATEST_END_DATE, SD.ACTUAL_START_DATE, SD.ACTUAL_COMPLETE_DATE, SD.REMARK, SD.DISPATCH_SEQ, SD.DISPATCH_SEQ-1 BEFORE_SEQ, SD.DISPATCH_SEQ+1 AFTER_SEQ, SD.EARLIEST_START_DATE, SD.LATEST_END_DATE,
CASE WHEN IM.LOT_SIZE = 1 THEN N'是' ELSE N'否' END IS_MAJOR, CASE WHEN SD.TURN_OPERATION = 'true' THEN N'是' ELSE N'否' END TURN_OPERATION, SD.BLANKING_SIZE, MAX(BC.COMPONENT_GBO) COMPONENT_BO, CASE WHEN CC.VALUE = '9' THEN N'是' ELSE N'否' END IS_MAJOR, CASE WHEN SD.TURN_OPERATION = 'true' THEN N'是' ELSE N'否' END TURN_OPERATION, SD.BLANKING_SIZE, MAX(BC.COMPONENT_GBO) COMPONENT_BO,
WR.WORK_CENTER RESOURCE_WORK_CENTER, MAX(CP.ITEM) COMPONENT, MAX(CT.DESCRIPTION) COMPONENT_DESCRIPTION, MAX(C3.VALUE) TEXTURE, MAX(C4.VALUE) MAT_SPEC WR.WORK_CENTER RESOURCE_WORK_CENTER, MAX(CP.ITEM) COMPONENT, MAX(CT.DESCRIPTION) COMPONENT_DESCRIPTION, MAX(C3.VALUE) TEXTURE, MAX(C4.VALUE) MAT_SPEC
FROM Z_SFC_DISPATCH SD FROM Z_SFC_DISPATCH SD
LEFT JOIN RESRCE RS ON SD.SITE = RS.SITE AND SD.RESRCE = RS.RESRCE LEFT JOIN RESRCE RS ON SD.SITE = RS.SITE AND SD.RESRCE = RS.RESRCE
@ -692,6 +692,7 @@
LEFT JOIN CUSTOM_FIELDS C2 ON C2.HANDLE = SO.HANDLE AND C2."ATTRIBUTE" = 'ITEM_NUMBER' LEFT JOIN CUSTOM_FIELDS C2 ON C2.HANDLE = SO.HANDLE AND C2."ATTRIBUTE" = 'ITEM_NUMBER'
INNER JOIN ITEM IM ON IM.HANDLE = SO.ITEM_BO INNER JOIN ITEM IM ON IM.HANDLE = SO.ITEM_BO
LEFT JOIN ITEM_T IT ON IT.ITEM_BO = IM.HANDLE AND IT.LOCALE = 'zh' LEFT JOIN ITEM_T IT ON IT.ITEM_BO = IM.HANDLE AND IT.LOCALE = 'zh'
LEFT JOIN CUSTOM_FIELDS CC ON CC.HANDLE = IT.HANDLE AND CC.ATTRIBUTE = 'ACCESSORY_TYPE'
INNER JOIN OPERATION O ON O.SITE = SD.SITE AND O.OPERATION = SD.OPERATION AND O.CURRENT_REVISION = 'true' INNER JOIN OPERATION O ON O.SITE = SD.SITE AND O.OPERATION = SD.OPERATION AND O.CURRENT_REVISION = 'true'
LEFT JOIN OPERATION_T OT ON OT.OPERATION_BO = O.HANDLE AND OT.LOCALE = 'zh' LEFT JOIN OPERATION_T OT ON OT.OPERATION_BO = O.HANDLE AND OT.LOCALE = 'zh'
INNER JOIN BOM_COMPONENT BC ON BC.BOM_BO = SO.BOM_BO INNER JOIN BOM_COMPONENT BC ON BC.BOM_BO = SO.BOM_BO

Loading…
Cancel
Save