派工人员问题处理

master
Leon 4 years ago
parent 401a56439e
commit 98e48c755d

@ -33,7 +33,7 @@ ftp:
#打印服务器配置
print:
server: http://172.16.251.188:8022/print/mesnacprint
server: http://10.10.170.32:8022/print/mesnacprint
exportDocument:

@ -115,6 +115,8 @@ public class SfcDispatch extends Model<SfcDispatch> {
*/
@TableField("EMPLOYEE")
private String employee;
@TableField("EMPLOYEE_DESCRIPTION")
private String employeeDescription;
/**
*
*/
@ -381,6 +383,14 @@ public class SfcDispatch extends Model<SfcDispatch> {
this.employee = employee;
}
public String getEmployeeDescription() {
return employeeDescription;
}
public void setEmployeeDescription(String employeeDescription) {
this.employeeDescription = employeeDescription;
}
public String getTurnOperation() {
return turnOperation;
}

@ -525,10 +525,13 @@ public class SfcDispatchServiceImpl extends ServiceImpl<SfcDispatchMapper, SfcDi
sfcDispatch.setResrce(resource);
sfcDispatch.setEmployee(employees);
sfcDispatch.setEmployeeDescription(sfcDispatchDto.getEmployeeDescription());
sfcDispatch.setRemark(sfcDispatchDto.getRemark());
sfcDispatch.setBlankingSize(sfcDispatchDto.getBlankingSize());
sfcDispatch.setPlannedStartDate(sfcDispatchDto.getPlannedStartDate());
sfcDispatch.setPlannedCompDate(sfcDispatchDto.getPlannedCompDate());
sfcDispatch.setEarliestStartDate(sfcDispatchDto.getEarliestStartDate());
sfcDispatch.setLatestEndDate(sfcDispatchDto.getLatestEndDate());
//是否分配资源
if (StringUtil.notBlank(resource)) {

@ -22,6 +22,7 @@
<result column="WORK_CENTER" property="workCenter" />
<result column="RESRCE" property="resrce" />
<result column="EMPLOYEE" property="employee" />
<result column="EMPLOYEE_DESCRIPTION" property="employeeDescription" />
<result column="TURN_OPERATION" property="turnOperation" />
<result column="DISPATCH_QTY" property="dispatchQty" />
<result column="PROD_HOURS" property="prodHours" />
@ -65,6 +66,7 @@
<result column="ITEM_DESCRIPTION" property="itemDescription" />
<result column="COMPONENT" property="component" />
<result column="COMPLETED_QTY" property="completedQty" />
<result column="RESOURCE_DESCRIPTION" property="resourceDescription" />
<result column="COMPONENT_DESCRIPTION" property="componentDescription" />
<result column="OPERATION_DESCRIPTION" property="operationDescription" />
<result column="RESOURCE_WORK_CENTER" property="resourceWorkCenter" />
@ -73,7 +75,7 @@
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
HANDLE, SITE, SHOP_ORDER, SFC, BLANKING_SIZE, DISPATCH_SEQ, DISPATCH_NO, DISPATCH_STATUS, DRAWINGS_NO, DRAWINGS_REVISION, IS_LOCK, ROUTER_BO, STEP_ID, OPERATION, RESOURCE_TYPE, WORK_CENTER, RESRCE, EMPLOYEE, TURN_OPERATION, DISPATCH_QTY, PROD_HOURS, PLANNED_START_DATE, PLANNED_COMP_DATE, EARLIEST_START_DATE, LATEST_END_DATE, SO_RELEASED_DATE, SFC_RELEASED_DATE, RELEASED_COMPLETE_DATE, ACTUAL_START_DATE, ACTUAL_COMPLETE_DATE, IS_DISPATCH, IS_IMPORT, REMARK, PREPOSITION_STEP_ID, PREPOSITION_OPERATION, IS_FIRST_OPERATION, CREATE_USER, CREATED_DATE_TIME, MODIFY_USER, MODIFIED_DATE_TIME, OTHER_1, OTHER_2, OTHER_3, OTHER_4, OTHER_5
HANDLE, SITE, SHOP_ORDER, SFC, BLANKING_SIZE, DISPATCH_SEQ, DISPATCH_NO, DISPATCH_STATUS, DRAWINGS_NO, DRAWINGS_REVISION, IS_LOCK, ROUTER_BO, STEP_ID, OPERATION, RESOURCE_TYPE, WORK_CENTER, RESRCE, EMPLOYEE, EMPLOYEE_DESCRIPTION, TURN_OPERATION, DISPATCH_QTY, PROD_HOURS, PLANNED_START_DATE, PLANNED_COMP_DATE, EARLIEST_START_DATE, LATEST_END_DATE, SO_RELEASED_DATE, SFC_RELEASED_DATE, RELEASED_COMPLETE_DATE, ACTUAL_START_DATE, ACTUAL_COMPLETE_DATE, IS_DISPATCH, IS_IMPORT, REMARK, PREPOSITION_STEP_ID, PREPOSITION_OPERATION, IS_FIRST_OPERATION, CREATE_USER, CREATED_DATE_TIME, MODIFY_USER, MODIFIED_DATE_TIME, OTHER_1, OTHER_2, OTHER_3, OTHER_4, OTHER_5
</sql>
<!-- BaseMapper标准查询/修改/删除 -->
@ -81,143 +83,6 @@
SELECT <include refid="Base_Column_List"></include> FROM Z_SFC_DISPATCH WHERE HANDLE=#{handle}
</select>
<select id="selectByMap" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>
FROM Z_SFC_DISPATCH
<if test="cm!=null and !cm.isEmpty">
<where>
<foreach collection="cm.keys" item="k" separator="AND">
<if test="cm[k] != null">
${k} = #{cm[${k}]}
</if>
</foreach>
</where>
</if>
</select>
<select id="selectBatchIds" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>
FROM Z_SFC_DISPATCH WHERE HANDLE IN (
<foreach item="item" index="index" collection="coll" separator=",">#{item}
</foreach>)
</select>
<select id="selectOne" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include> FROM Z_SFC_DISPATCH
<where>
<if test="ew.entity.handle!=null">
HANDLE=#{ew.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.blankingSize!=null"> AND BLANKING_SIZE=#{ew.entity.blankingSize}</if>
<if test="ew.entity.dispatchSeq!=null"> AND DISPATCH_SEQ=#{ew.entity.dispatchSeq}</if>
<if test="ew.entity.dispatchNo!=null"> AND DISPATCH_NO=#{ew.entity.dispatchNo}</if>
<if test="ew.entity.dispatchStatus!=null"> AND DISPATCH_STATUS=#{ew.entity.dispatchStatus}</if>
<if test="ew.entity.drawingsNo!=null"> AND DRAWINGS_NO=#{ew.entity.drawingsNo}</if>
<if test="ew.entity.drawingsRevision!=null"> AND DRAWINGS_REVISION=#{ew.entity.drawingsRevision}</if>
<if test="ew.entity.isLock!=null"> AND IS_LOCK=#{ew.entity.isLock}</if>
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<if test="ew.entity.resourceType!=null"> AND RESOURCE_TYPE=#{ew.entity.resourceType}</if>
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.employee!=null"> AND EMPLOYEE=#{ew.entity.employee}</if>
<if test="ew.entity.turnOperation!=null"> AND TURN_OPERATION=#{ew.entity.turnOperation}</if>
<if test="ew.entity.dispatchQty!=null"> AND DISPATCH_QTY=#{ew.entity.dispatchQty}</if>
<if test="ew.entity.prodHours!=null"> AND PROD_HOURS=#{ew.entity.prodHours}</if>
<if test="ew.entity.plannedStartDate!=null"> AND PLANNED_START_DATE=#{ew.entity.plannedStartDate}</if>
<if test="ew.entity.plannedCompDate!=null"> AND PLANNED_COMP_DATE=#{ew.entity.plannedCompDate}</if>
<if test="ew.entity.earliestStartDate!=null"> AND EARLIEST_START_DATE=#{ew.entity.earliestStartDate}</if>
<if test="ew.entity.latestEndDate!=null"> AND LATEST_END_DATE=#{ew.entity.latestEndDate}</if>
<if test="ew.entity.soReleasedDate!=null"> AND SO_RELEASED_DATE=#{ew.entity.soReleasedDate}</if>
<if test="ew.entity.sfcReleasedDate!=null"> AND SFC_RELEASED_DATE=#{ew.entity.sfcReleasedDate}</if>
<if test="ew.entity.releasedCompleteDate!=null"> AND RELEASED_COMPLETE_DATE=#{ew.entity.releasedCompleteDate}</if>
<if test="ew.entity.actualStartDate!=null"> AND ACTUAL_START_DATE=#{ew.entity.actualStartDate}</if>
<if test="ew.entity.actualCompleteDate!=null"> AND ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate}</if>
<if test="ew.entity.isDispatch!=null"> AND IS_DISPATCH=#{ew.entity.isDispatch}</if>
<if test="ew.entity.isImport!=null"> AND IS_IMPORT=#{ew.entity.isImport}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.prepositionStepId!=null"> AND PREPOSITION_STEP_ID=#{ew.entity.prepositionStepId}</if>
<if test="ew.entity.prepositionOperation!=null"> AND PREPOSITION_OPERATION=#{ew.entity.prepositionOperation}</if>
<if test="ew.entity.isFirstOperation!=null"> AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.other1!=null"> AND OTHER_1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null"> AND OTHER_2=#{ew.entity.other2}</if>
<if test="ew.entity.other3!=null"> AND OTHER_3=#{ew.entity.other3}</if>
<if test="ew.entity.other4!=null"> AND OTHER_4=#{ew.entity.other4}</if>
<if test="ew.entity.other5!=null"> AND OTHER_5=#{ew.entity.other5}</if>
</where>
</select>
<select id="selectCount" resultType="Integer">
SELECT COUNT(1) FROM Z_SFC_DISPATCH
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.blankingSize!=null"> AND BLANKING_SIZE=#{ew.entity.blankingSize}</if>
<if test="ew.entity.dispatchSeq!=null"> AND DISPATCH_SEQ=#{ew.entity.dispatchSeq}</if>
<if test="ew.entity.dispatchNo!=null"> AND DISPATCH_NO=#{ew.entity.dispatchNo}</if>
<if test="ew.entity.dispatchStatus!=null"> AND DISPATCH_STATUS=#{ew.entity.dispatchStatus}</if>
<if test="ew.entity.drawingsNo!=null"> AND DRAWINGS_NO=#{ew.entity.drawingsNo}</if>
<if test="ew.entity.drawingsRevision!=null"> AND DRAWINGS_REVISION=#{ew.entity.drawingsRevision}</if>
<if test="ew.entity.isLock!=null"> AND IS_LOCK=#{ew.entity.isLock}</if>
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<if test="ew.entity.resourceType!=null"> AND RESOURCE_TYPE=#{ew.entity.resourceType}</if>
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.employee!=null"> AND EMPLOYEE=#{ew.entity.employee}</if>
<if test="ew.entity.turnOperation!=null"> AND TURN_OPERATION=#{ew.entity.turnOperation}</if>
<if test="ew.entity.dispatchQty!=null"> AND DISPATCH_QTY=#{ew.entity.dispatchQty}</if>
<if test="ew.entity.prodHours!=null"> AND PROD_HOURS=#{ew.entity.prodHours}</if>
<if test="ew.entity.plannedStartDate!=null"> AND PLANNED_START_DATE=#{ew.entity.plannedStartDate}</if>
<if test="ew.entity.plannedCompDate!=null"> AND PLANNED_COMP_DATE=#{ew.entity.plannedCompDate}</if>
<if test="ew.entity.earliestStartDate!=null"> AND EARLIEST_START_DATE=#{ew.entity.earliestStartDate}</if>
<if test="ew.entity.latestEndDate!=null"> AND LATEST_END_DATE=#{ew.entity.latestEndDate}</if>
<if test="ew.entity.soReleasedDate!=null"> AND SO_RELEASED_DATE=#{ew.entity.soReleasedDate}</if>
<if test="ew.entity.sfcReleasedDate!=null"> AND SFC_RELEASED_DATE=#{ew.entity.sfcReleasedDate}</if>
<if test="ew.entity.releasedCompleteDate!=null"> AND RELEASED_COMPLETE_DATE=#{ew.entity.releasedCompleteDate}</if>
<if test="ew.entity.actualStartDate!=null"> AND ACTUAL_START_DATE=#{ew.entity.actualStartDate}</if>
<if test="ew.entity.actualCompleteDate!=null"> AND ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate}</if>
<if test="ew.entity.isDispatch!=null"> AND IS_DISPATCH=#{ew.entity.isDispatch}</if>
<if test="ew.entity.isImport!=null"> AND IS_IMPORT=#{ew.entity.isImport}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.prepositionStepId!=null"> AND PREPOSITION_STEP_ID=#{ew.entity.prepositionStepId}</if>
<if test="ew.entity.prepositionOperation!=null"> AND PREPOSITION_OPERATION=#{ew.entity.prepositionOperation}</if>
<if test="ew.entity.isFirstOperation!=null"> AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.other1!=null"> AND OTHER_1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null"> AND OTHER_2=#{ew.entity.other2}</if>
<if test="ew.entity.other3!=null"> AND OTHER_3=#{ew.entity.other3}</if>
<if test="ew.entity.other4!=null"> AND OTHER_4=#{ew.entity.other4}</if>
<if test="ew.entity.other5!=null"> AND OTHER_5=#{ew.entity.other5}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectList" resultMap="BaseResultMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_SFC_DISPATCH
<where>
@ -274,132 +139,6 @@
</if>
</select>
<select id="selectMaps" resultType="HashMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_SFC_DISPATCH
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.blankingSize!=null"> AND BLANKING_SIZE=#{ew.entity.blankingSize}</if>
<if test="ew.entity.dispatchSeq!=null"> AND DISPATCH_SEQ=#{ew.entity.dispatchSeq}</if>
<if test="ew.entity.dispatchNo!=null"> AND DISPATCH_NO=#{ew.entity.dispatchNo}</if>
<if test="ew.entity.dispatchStatus!=null"> AND DISPATCH_STATUS=#{ew.entity.dispatchStatus}</if>
<if test="ew.entity.drawingsNo!=null"> AND DRAWINGS_NO=#{ew.entity.drawingsNo}</if>
<if test="ew.entity.drawingsRevision!=null"> AND DRAWINGS_REVISION=#{ew.entity.drawingsRevision}</if>
<if test="ew.entity.isLock!=null"> AND IS_LOCK=#{ew.entity.isLock}</if>
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<if test="ew.entity.resourceType!=null"> AND RESOURCE_TYPE=#{ew.entity.resourceType}</if>
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.employee!=null"> AND EMPLOYEE=#{ew.entity.employee}</if>
<if test="ew.entity.turnOperation!=null"> AND TURN_OPERATION=#{ew.entity.turnOperation}</if>
<if test="ew.entity.dispatchQty!=null"> AND DISPATCH_QTY=#{ew.entity.dispatchQty}</if>
<if test="ew.entity.prodHours!=null"> AND PROD_HOURS=#{ew.entity.prodHours}</if>
<if test="ew.entity.plannedStartDate!=null"> AND PLANNED_START_DATE=#{ew.entity.plannedStartDate}</if>
<if test="ew.entity.plannedCompDate!=null"> AND PLANNED_COMP_DATE=#{ew.entity.plannedCompDate}</if>
<if test="ew.entity.earliestStartDate!=null"> AND EARLIEST_START_DATE=#{ew.entity.earliestStartDate}</if>
<if test="ew.entity.latestEndDate!=null"> AND LATEST_END_DATE=#{ew.entity.latestEndDate}</if>
<if test="ew.entity.soReleasedDate!=null"> AND SO_RELEASED_DATE=#{ew.entity.soReleasedDate}</if>
<if test="ew.entity.sfcReleasedDate!=null"> AND SFC_RELEASED_DATE=#{ew.entity.sfcReleasedDate}</if>
<if test="ew.entity.releasedCompleteDate!=null"> AND RELEASED_COMPLETE_DATE=#{ew.entity.releasedCompleteDate}</if>
<if test="ew.entity.actualStartDate!=null"> AND ACTUAL_START_DATE=#{ew.entity.actualStartDate}</if>
<if test="ew.entity.actualCompleteDate!=null"> AND ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate}</if>
<if test="ew.entity.isDispatch!=null"> AND IS_DISPATCH=#{ew.entity.isDispatch}</if>
<if test="ew.entity.isImport!=null"> AND IS_IMPORT=#{ew.entity.isImport}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.prepositionStepId!=null"> AND PREPOSITION_STEP_ID=#{ew.entity.prepositionStepId}</if>
<if test="ew.entity.prepositionOperation!=null"> AND PREPOSITION_OPERATION=#{ew.entity.prepositionOperation}</if>
<if test="ew.entity.isFirstOperation!=null"> AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.other1!=null"> AND OTHER_1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null"> AND OTHER_2=#{ew.entity.other2}</if>
<if test="ew.entity.other3!=null"> AND OTHER_3=#{ew.entity.other3}</if>
<if test="ew.entity.other4!=null"> AND OTHER_4=#{ew.entity.other4}</if>
<if test="ew.entity.other5!=null"> AND OTHER_5=#{ew.entity.other5}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectObjs" resultType="Object">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_SFC_DISPATCH
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.blankingSize!=null"> AND BLANKING_SIZE=#{ew.entity.blankingSize}</if>
<if test="ew.entity.dispatchSeq!=null"> AND DISPATCH_SEQ=#{ew.entity.dispatchSeq}</if>
<if test="ew.entity.dispatchNo!=null"> AND DISPATCH_NO=#{ew.entity.dispatchNo}</if>
<if test="ew.entity.dispatchStatus!=null"> AND DISPATCH_STATUS=#{ew.entity.dispatchStatus}</if>
<if test="ew.entity.drawingsNo!=null"> AND DRAWINGS_NO=#{ew.entity.drawingsNo}</if>
<if test="ew.entity.drawingsRevision!=null"> AND DRAWINGS_REVISION=#{ew.entity.drawingsRevision}</if>
<if test="ew.entity.isLock!=null"> AND IS_LOCK=#{ew.entity.isLock}</if>
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<if test="ew.entity.resourceType!=null"> AND RESOURCE_TYPE=#{ew.entity.resourceType}</if>
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.employee!=null"> AND EMPLOYEE=#{ew.entity.employee}</if>
<if test="ew.entity.turnOperation!=null"> AND TURN_OPERATION=#{ew.entity.turnOperation}</if>
<if test="ew.entity.dispatchQty!=null"> AND DISPATCH_QTY=#{ew.entity.dispatchQty}</if>
<if test="ew.entity.prodHours!=null"> AND PROD_HOURS=#{ew.entity.prodHours}</if>
<if test="ew.entity.plannedStartDate!=null"> AND PLANNED_START_DATE=#{ew.entity.plannedStartDate}</if>
<if test="ew.entity.plannedCompDate!=null"> AND PLANNED_COMP_DATE=#{ew.entity.plannedCompDate}</if>
<if test="ew.entity.earliestStartDate!=null"> AND EARLIEST_START_DATE=#{ew.entity.earliestStartDate}</if>
<if test="ew.entity.latestEndDate!=null"> AND LATEST_END_DATE=#{ew.entity.latestEndDate}</if>
<if test="ew.entity.soReleasedDate!=null"> AND SO_RELEASED_DATE=#{ew.entity.soReleasedDate}</if>
<if test="ew.entity.sfcReleasedDate!=null"> AND SFC_RELEASED_DATE=#{ew.entity.sfcReleasedDate}</if>
<if test="ew.entity.releasedCompleteDate!=null"> AND RELEASED_COMPLETE_DATE=#{ew.entity.releasedCompleteDate}</if>
<if test="ew.entity.actualStartDate!=null"> AND ACTUAL_START_DATE=#{ew.entity.actualStartDate}</if>
<if test="ew.entity.actualCompleteDate!=null"> AND ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate}</if>
<if test="ew.entity.isDispatch!=null"> AND IS_DISPATCH=#{ew.entity.isDispatch}</if>
<if test="ew.entity.isImport!=null"> AND IS_IMPORT=#{ew.entity.isImport}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.prepositionStepId!=null"> AND PREPOSITION_STEP_ID=#{ew.entity.prepositionStepId}</if>
<if test="ew.entity.prepositionOperation!=null"> AND PREPOSITION_OPERATION=#{ew.entity.prepositionOperation}</if>
<if test="ew.entity.isFirstOperation!=null"> AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.other1!=null"> AND OTHER_1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null"> AND OTHER_2=#{ew.entity.other2}</if>
<if test="ew.entity.other3!=null"> AND OTHER_3=#{ew.entity.other3}</if>
<if test="ew.entity.other4!=null"> AND OTHER_4=#{ew.entity.other4}</if>
<if test="ew.entity.other5!=null"> AND OTHER_5=#{ew.entity.other5}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectPage" resultMap="BaseResultMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_SFC_DISPATCH
<where>
@ -463,69 +202,6 @@
</if>
</select>
<select id="selectMapsPage" resultType="HashMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_SFC_DISPATCH
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.blankingSize!=null"> AND BLANKING_SIZE=#{ew.entity.blankingSize}</if>
<if test="ew.entity.dispatchSeq!=null"> AND DISPATCH_SEQ=#{ew.entity.dispatchSeq}</if>
<if test="ew.entity.dispatchNo!=null"> AND DISPATCH_NO=#{ew.entity.dispatchNo}</if>
<if test="ew.entity.dispatchStatus!=null"> AND DISPATCH_STATUS=#{ew.entity.dispatchStatus}</if>
<if test="ew.entity.drawingsNo!=null"> AND DRAWINGS_NO=#{ew.entity.drawingsNo}</if>
<if test="ew.entity.drawingsRevision!=null"> AND DRAWINGS_REVISION=#{ew.entity.drawingsRevision}</if>
<if test="ew.entity.isLock!=null"> AND IS_LOCK=#{ew.entity.isLock}</if>
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<if test="ew.entity.resourceType!=null"> AND RESOURCE_TYPE=#{ew.entity.resourceType}</if>
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.employee!=null"> AND EMPLOYEE=#{ew.entity.employee}</if>
<if test="ew.entity.turnOperation!=null"> AND TURN_OPERATION=#{ew.entity.turnOperation}</if>
<if test="ew.entity.dispatchQty!=null"> AND DISPATCH_QTY=#{ew.entity.dispatchQty}</if>
<if test="ew.entity.prodHours!=null"> AND PROD_HOURS=#{ew.entity.prodHours}</if>
<if test="ew.entity.plannedStartDate!=null"> AND PLANNED_START_DATE=#{ew.entity.plannedStartDate}</if>
<if test="ew.entity.plannedCompDate!=null"> AND PLANNED_COMP_DATE=#{ew.entity.plannedCompDate}</if>
<if test="ew.entity.earliestStartDate!=null"> AND EARLIEST_START_DATE=#{ew.entity.earliestStartDate}</if>
<if test="ew.entity.latestEndDate!=null"> AND LATEST_END_DATE=#{ew.entity.latestEndDate}</if>
<if test="ew.entity.soReleasedDate!=null"> AND SO_RELEASED_DATE=#{ew.entity.soReleasedDate}</if>
<if test="ew.entity.sfcReleasedDate!=null"> AND SFC_RELEASED_DATE=#{ew.entity.sfcReleasedDate}</if>
<if test="ew.entity.releasedCompleteDate!=null"> AND RELEASED_COMPLETE_DATE=#{ew.entity.releasedCompleteDate}</if>
<if test="ew.entity.actualStartDate!=null"> AND ACTUAL_START_DATE=#{ew.entity.actualStartDate}</if>
<if test="ew.entity.actualCompleteDate!=null"> AND ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate}</if>
<if test="ew.entity.isDispatch!=null"> AND IS_DISPATCH=#{ew.entity.isDispatch}</if>
<if test="ew.entity.isImport!=null"> AND IS_IMPORT=#{ew.entity.isImport}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.prepositionStepId!=null"> AND PREPOSITION_STEP_ID=#{ew.entity.prepositionStepId}</if>
<if test="ew.entity.prepositionOperation!=null"> AND PREPOSITION_OPERATION=#{ew.entity.prepositionOperation}</if>
<if test="ew.entity.isFirstOperation!=null"> AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.other1!=null"> AND OTHER_1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null"> AND OTHER_2=#{ew.entity.other2}</if>
<if test="ew.entity.other3!=null"> AND OTHER_3=#{ew.entity.other3}</if>
<if test="ew.entity.other4!=null"> AND OTHER_4=#{ew.entity.other4}</if>
<if test="ew.entity.other5!=null"> AND OTHER_5=#{ew.entity.other5}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<insert id="insert" parameterType="com.foreverwin.mesnac.dispatch.model.SfcDispatch">
INSERT INTO Z_SFC_DISPATCH
<trim prefix="(" suffix=")" suffixOverrides=",">
@ -547,6 +223,7 @@
<if test="workCenter!=null">WORK_CENTER,</if>
<if test="resrce!=null">RESRCE,</if>
<if test="employee!=null">EMPLOYEE,</if>
<if test="employeeDescription!=null">EMPLOYEE_DESCRIPTION,</if>
<if test="turnOperation!=null">TURN_OPERATION,</if>
<if test="dispatchQty!=null">DISPATCH_QTY,</if>
<if test="prodHours!=null">PROD_HOURS,</if>
@ -594,6 +271,7 @@
<if test="workCenter!=null">#{workCenter},</if>
<if test="resrce!=null">#{resrce},</if>
<if test="employee!=null">#{employee},</if>
<if test="employeeDescription!=null">#{employeeDescription},</if>
<if test="turnOperation!=null">#{turnOperation},</if>
<if test="dispatchQty!=null">#{dispatchQty},</if>
<if test="prodHours!=null">#{prodHours},</if>
@ -648,6 +326,7 @@
#{workCenter},
#{resrce},
#{employee},
#{employeeDescription},
#{turnOperation},
#{dispatchQty},
#{prodHours},
@ -698,6 +377,7 @@
<if test="et.workCenter!=null">WORK_CENTER=#{et.workCenter},</if>
<if test="et.resrce!=null">RESRCE=#{et.resrce},</if>
<if test="et.employee!=null">EMPLOYEE=#{et.employee},</if>
<if test="et.employeeDescription!=null">EMPLOYEE_DESCRIPTION=#{et.employeeDescription},</if>
<if test="et.turnOperation!=null">TURN_OPERATION=#{et.turnOperation},</if>
<if test="et.dispatchQty!=null">DISPATCH_QTY=#{et.dispatchQty},</if>
<if test="et.prodHours!=null">PROD_HOURS=#{et.prodHours},</if>
@ -748,6 +428,7 @@
WORK_CENTER=#{et.workCenter},
RESRCE=#{et.resrce},
EMPLOYEE=#{et.employee},
EMPLOYEE_DESCRIPTION=#{et.employeeDescription},
TURN_OPERATION=#{et.turnOperation},
DISPATCH_QTY=#{et.dispatchQty},
PROD_HOURS=#{et.prodHours},
@ -798,6 +479,7 @@
<if test="et.workCenter!=null">WORK_CENTER=#{et.workCenter},</if>
<if test="et.resrce!=null">RESRCE=#{et.resrce},</if>
<if test="et.employee!=null">EMPLOYEE=#{et.employee},</if>
<if test="et.employeeDescription!=null">EMPLOYEE_DESCRIPTION=#{et.employeeDescription},</if>
<if test="et.turnOperation!=null">TURN_OPERATION=#{et.turnOperation},</if>
<if test="et.dispatchQty!=null">DISPATCH_QTY=#{et.dispatchQty},</if>
<if test="et.prodHours!=null">PROD_HOURS=#{et.prodHours},</if>
@ -847,6 +529,7 @@
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.employee!=null"> AND EMPLOYEE=#{ew.entity.employee}</if>
<if test="et.entity.employeeDescription!=null">EMPLOYEE_DESCRIPTION=#{et.entity.employeeDescription},</if>
<if test="ew.entity.turnOperation!=null"> AND TURN_OPERATION=#{ew.entity.turnOperation}</if>
<if test="ew.entity.dispatchQty!=null"> AND DISPATCH_QTY=#{ew.entity.dispatchQty}</if>
<if test="ew.entity.prodHours!=null"> AND PROD_HOURS=#{ew.entity.prodHours}</if>
@ -927,6 +610,7 @@
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.employee!=null"> AND EMPLOYEE=#{ew.entity.employee}</if>
<if test="et.entity.employeeDescription!=null">EMPLOYEE_DESCRIPTION=#{et.entity.employeeDescription},</if>
<if test="ew.entity.turnOperation!=null"> AND TURN_OPERATION=#{ew.entity.turnOperation}</if>
<if test="ew.entity.dispatchQty!=null"> AND DISPATCH_QTY=#{ew.entity.dispatchQty}</if>
<if test="ew.entity.prodHours!=null"> AND PROD_HOURS=#{ew.entity.prodHours}</if>
@ -984,21 +668,20 @@
</select>
<select id="findSfcDispatchList" resultMap="FullResultMap">
SELECT WIP.*, CASE WHEN WIP.DISPATCH_SEQ = 1 THEN WIP.PLANNED_START_DATE ELSE V1.PLANNED_COMP_DATE END EARLIEST_START_DATE,
CASE WHEN V2.HANDLE IS NOT NULL THEN V2.PLANNED_START_DATE ELSE WIP.PLANNED_COMP_DATE END LATEST_END_DATE,
V1.STEP_ID PREPOSITION_STEP_ID, V1.OPERATION PREPOSITION_OPERATION,
SELECT WIP.*, V1.STEP_ID PREPOSITION_STEP_ID, V1.OPERATION PREPOSITION_OPERATION,
CASE WHEN WIP.DISPATCH_SEQ = 1 OR V1.DISPATCH_STATUS = 'COMPLETE' THEN N'是' ELSE N'否' END IS_COMPLETED,
CASE WHEN WIP.DISPATCH_STATUS = 'NEW' THEN N'新建' WHEN WIP.DISPATCH_STATUS = 'CANCEL' THEN N'取消'
WHEN WIP.DISPATCH_STATUS = 'PAUSE' THEN N'暂停' WHEN WIP.DISPATCH_STATUS = 'RELEASE' THEN N'发布'
END AS STATUS_NAME, 'ADMINISTRATOR' AS ROLE
FROM (
SELECT DISTINCT SD.HANDLE, SD.SITE, SD.SHOP_ORDER, SD.DISPATCH_NO, C2.VALUE ITEM_NUMBER, C1.VALUE WORK_ORDER, IM.HANDLE ITEM_BO, IM.ITEM, IT.DESCRIPTION ITEM_DESCRIPTION, SD.SFC, SD.DISPATCH_STATUS,
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,
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.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.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,
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,
WR.WORK_CENTER RESOURCE_WORK_CENTER
FROM Z_SFC_DISPATCH SD
INNER JOIN RESRCE RS ON SD.SITE = RS.SITE AND SD.RESRCE = RS.RESRCE
INNER JOIN SHOP_ORDER SO ON SO.SITE = SD.SITE AND SO.SHOP_ORDER = SD.SHOP_ORDER
LEFT JOIN CUSTOM_FIELDS C1 ON C1.HANDLE = SO.HANDLE AND C1."ATTRIBUTE" = 'WORK_ORDER'
LEFT JOIN CUSTOM_FIELDS C2 ON C2.HANDLE = SO.HANDLE AND C2."ATTRIBUTE" = 'ITEM_NUMBER'

@ -530,7 +530,7 @@ public class InterfaceServiceImpl implements InterfaceService {
for (int i = 0; i < routerStepDtoList.size(); i++) {
RouterStepDto routerStepDto = routerStepDtoList.get(i);
String stepId = routerStepDto.getSTEP_ID();
String erpWorkCenter = routerStepDto.getOPERATION().trim();
String erpWorkCenter = routerStepDto.getOPERATION();
if (StringUtil.isBlank(entryRouterStep)) {
entryRouterStep = stepId;
@ -545,7 +545,7 @@ public class InterfaceServiceImpl implements InterfaceService {
String operation = null;
String operationBo = null;
if (StringUtil.isBlank(erpWorkCenter)) {
if (StringUtil.isBlank(erpWorkCenter) || "null".equals(erpWorkCenter)) {
operation = Constants.OP_WX_6106GX;
Operation operationModel = operationService.getCurrentRevisionRef(site, operation);
if (operationModel == null) {

Loading…
Cancel
Save