生产派工导入人员按姓名修改功能。

master
Leon 3 years ago
parent ae4aa1810b
commit 637a25ed77

@ -90,8 +90,8 @@ public class SfcDispatchDto implements Serializable{
/** /**
* *
*/ */
@ExcelColumn("操作者")
private String employee; private String employee;
@ExcelColumn("操作者")
private String employeeDescription; private String employeeDescription;
/** /**
* *

@ -433,7 +433,7 @@ public class SfcDispatchServiceImpl extends ServiceImpl<SfcDispatchMapper, SfcDi
//导入的是人员名称-查找人员编号,设备 //导入的是人员名称-查找人员编号,设备
String employee = ""; String employee = "";
String employeeDescription = sfcDispatchDto.getEmployee(); String employeeDescription = sfcDispatchDto.getEmployeeDescription();
if (StringUtil.notBlank(employeeDescription)) { if (StringUtil.notBlank(employeeDescription)) {
String _employeeDescription; String _employeeDescription;
@ -518,10 +518,22 @@ public class SfcDispatchServiceImpl extends ServiceImpl<SfcDispatchMapper, SfcDi
} }
//资源、计划时间必输 //资源、计划时间必输
if (StringUtils.isBlank(resource) || StringUtil.isBlank(employees) || sfcDispatchDto.getPlannedStartDate() == null || sfcDispatchDto.getPlannedCompDate() == null) { if (StringUtil.isBlank(employees)) {
flag = false; flag = false;
message.append(seq++%3 == 0 ? "\n" : "| |"); message.append(seq++%3 == 0 ? "\n" : "| |");
message.append("派工单[" + dispatchNo + "]的资源、操作者、计划开始或完成时间没维护,不允许发布"); message.append("派工单[" + dispatchNo + "]的操作者没有维护,不允许发布");
continue;
}
if (StringUtil.isBlank(resource)) {
flag = false;
message.append(seq++%3 == 0 ? "\n" : "| |");
message.append("派工单[" + dispatchNo + "]的资源没有维护,不允许发布");
continue;
}
if (sfcDispatchDto.getPlannedStartDate() == null || sfcDispatchDto.getPlannedCompDate() == null || sfcDispatchDto.getEarliestStartDate() == null || sfcDispatchDto.getLatestEndDate() == null) {
flag = false;
message.append(seq++%3 == 0 ? "\n" : "| |");
message.append("派工单[" + dispatchNo + "]的计划开始或完成时间没维护,不允许发布");
continue; continue;
} }

@ -379,8 +379,8 @@
<if test="et.resourceType!=null">RESOURCE_TYPE=#{et.resourceType},</if> <if test="et.resourceType!=null">RESOURCE_TYPE=#{et.resourceType},</if>
<if test="et.workCenter!=null">WORK_CENTER=#{et.workCenter},</if> <if test="et.workCenter!=null">WORK_CENTER=#{et.workCenter},</if>
<if test="et.resrce!=null">RESRCE=#{et.resrce},</if> <if test="et.resrce!=null">RESRCE=#{et.resrce},</if>
<if test="et.employee!=null">EMPLOYEE=#{et.employee},</if> EMPLOYEE=#{et.employee},
<if test="et.employeeDescription!=null">EMPLOYEE_DESCRIPTION=#{et.employeeDescription},</if> EMPLOYEE_DESCRIPTION=#{et.employeeDescription},
<if test="et.turnOperation!=null">TURN_OPERATION=#{et.turnOperation},</if> <if test="et.turnOperation!=null">TURN_OPERATION=#{et.turnOperation},</if>
<if test="et.dispatchQty!=null">DISPATCH_QTY=#{et.dispatchQty},</if> <if test="et.dispatchQty!=null">DISPATCH_QTY=#{et.dispatchQty},</if>
<if test="et.prodHours!=null">PROD_HOURS=#{et.prodHours},</if> <if test="et.prodHours!=null">PROD_HOURS=#{et.prodHours},</if>
@ -692,7 +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' LEFT JOIN CUSTOM_FIELDS CC ON CC.HANDLE = IM.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
@ -761,16 +761,16 @@
AND C4.VALUE = #{matSpec} AND C4.VALUE = #{matSpec}
</if> </if>
<if test="startFromDate != null"> <if test="startFromDate != null">
AND SO.PLANNED_START_DATE >= TO_DATE(#{startFromDate}, 'YYYY-MM-DD') AND SD.PLANNED_START_DATE >= TO_DATE(#{startFromDate}, 'YYYY-MM-DD')
</if> </if>
<if test="startToDate != null"> <if test="startToDate != null">
AND SO.PLANNED_START_DATE &lt;= TO_DATE(#{startToDate}|| '23:59:59', 'YYYY-MM-DD HH24:MI:SS') AND SD.PLANNED_START_DATE &lt;= TO_DATE(#{startToDate}|| '23:59:59', 'YYYY-MM-DD HH24:MI:SS')
</if> </if>
<if test="completeFromDate != null"> <if test="completeFromDate != null">
AND SO.PLANNED_COMP_DATE >= TO_DATE(#{completeFromDate}, 'YYYY-MM-DD') AND SD.PLANNED_COMPLETE_DATE >= TO_DATE(#{completeFromDate}, 'YYYY-MM-DD')
</if> </if>
<if test="completeToDate != null"> <if test="completeToDate != null">
AND SO.PLANNED_COMP_DATE &lt;= TO_DATE(#{completeToDate}|| '23:59:59', 'YYYY-MM-DD HH24:MI:SS') AND SD.PLANNED_COMPLETE_DATE &lt;= TO_DATE(#{completeToDate}|| '23:59:59', 'YYYY-MM-DD HH24:MI:SS')
</if> </if>
GROUP BY SD.HANDLE, SD.SITE, SD.SHOP_ORDER, SD.DISPATCH_NO, C2.VALUE, C1.VALUE, IM.HANDLE, IM.ITEM, IT.DESCRIPTION, SD.SFC, SD.DISPATCH_STATUS, GROUP BY SD.HANDLE, SD.SITE, SD.SHOP_ORDER, SD.DISPATCH_NO, C2.VALUE, C1.VALUE, IM.HANDLE, IM.ITEM, IT.DESCRIPTION, SD.SFC, SD.DISPATCH_STATUS,
SD.STEP_ID, SD.OPERATION, OT.DESCRIPTION, SD.RESOURCE_TYPE, SD.RESRCE, SD.EMPLOYEE, SD.EMPLOYEE, SD.DISPATCH_QTY, SD.PROD_HOURS, RS.DESCRIPTION, SD.STEP_ID, SD.OPERATION, OT.DESCRIPTION, SD.RESOURCE_TYPE, SD.RESRCE, SD.EMPLOYEE, SD.EMPLOYEE, SD.DISPATCH_QTY, SD.PROD_HOURS, RS.DESCRIPTION,

Loading…
Cancel
Save