设备维修优化

master
zpl 3 years ago
parent 531e8cbd89
commit 7834d4baa0

@ -302,6 +302,41 @@ public class ResourceRepairTask extends Model<ResourceRepairTask> {
*/ */
@TableField(exist = false) @TableField(exist = false)
private String reportUserName; private String reportUserName;
/**
*
*/
@TableField(exist = false)
private String cancelCodeDescription;
/**取消用户名称**/
@TableField(exist = false)
private String cancelUserName;
/**不良代码名称**/
@TableField(exist = false)
private String ncCodeNoDescription;
public String getNcCodeNoDescription() {
return ncCodeNoDescription;
}
public void setNcCodeNoDescription(String ncCodeNoDescription) {
this.ncCodeNoDescription = ncCodeNoDescription;
}
public String getCancelUserName() {
return cancelUserName;
}
public void setCancelUserName(String cancelUserName) {
this.cancelUserName = cancelUserName;
}
public String getCancelCodeDescription() {
return cancelCodeDescription;
}
public void setCancelCodeDescription(String cancelCodeDescription) {
this.cancelCodeDescription = cancelCodeDescription;
}
public String getReportUserName() { public String getReportUserName() {
return reportUserName; return reportUserName;

@ -209,7 +209,9 @@ public class ResourceRepairTaskServiceImpl extends ServiceImpl<ResourceRepairTas
repairTask.setCancelCode(resourceRepairTask.getCancelCode()); repairTask.setCancelCode(resourceRepairTask.getCancelCode());
repairTask.setCancelDescription(resourceRepairTask.getCancelDescription()); repairTask.setCancelDescription(resourceRepairTask.getCancelDescription());
repairTask.setCancelDate(LocalDateTime.now()); repairTask.setCancelDate(LocalDateTime.now());
repairTask.setCancelUser(CommonMethods.getUser()); repairTask.setCancelUser(user);
NwaUser userByUserName = nwaUserService.findUserByUserName(user);
repairTask.setCancelUserName(userByUserName.getFullName());
break; break;
case "502": case "502":
if (repairTask.getWaitStartDate() != null){ if (repairTask.getWaitStartDate() != null){

@ -883,11 +883,14 @@
<!--批量获取维修任务--> <!--批量获取维修任务-->
<select id="findResourceRepairTaskList" resultType="com.foreverwin.mesnac.equip.model.ResourceRepairTask"> <select id="findResourceRepairTaskList" resultType="com.foreverwin.mesnac.equip.model.ResourceRepairTask">
SELECT DISTINCT RRT.*, ZNU.FULL_NAME AS REPORT_USER_NAME, R.DESCRIPTION AS RESOURCE_DESCRIPTION,R.RESRCE AS RESOURCE_NO, SELECT DISTINCT RRT.*, ZNU.FULL_NAME AS REPORT_USER_NAME, R.DESCRIPTION AS RESOURCE_DESCRIPTION,R.RESRCE AS RESOURCE_NO,
WCMA.WORK_CENTER_BO AS WORK_CENTER_BO, WCMA.WORK_CENTER_BO AS WORK_CENTER_BO,NCT.DESCRIPTION AS CANCEL_CODE_DESCRIPTION, ZNU2.FULL_NAME AS CANCEL_USER_NAME,
WCT.DESCRIPTION AS WORK_CENTER_DESCRIPTION WCT.DESCRIPTION AS WORK_CENTER_DESCRIPTION
FROM FROM
WIP.Z_RESOURCE_REPAIR_TASK RRT WIP.Z_RESOURCE_REPAIR_TASK RRT
LEFT JOIN Z_NWA_USER ZNU ON ZNU.USER_NAME = RRT.REPORT_USER LEFT JOIN Z_NWA_USER ZNU ON ZNU.USER_NAME = RRT.REPORT_USER
LEFT JOIN NC_CODE NC ON NC.NC_CODE = RRT.CANCEL_CODE
LEFT JOIN NC_CODE_T NCT ON NCT.NC_CODE_BO = NC.HANDLE
LEFT JOIN Z_NWA_USER ZNU2 ON ZNU2.USER_NAME = RRT.CANCEL_USER
INNER JOIN WIP.RESRCE R ON RRT.SITE = R.SITE AND R.RESRCE = RRT.RESOURCE_NO INNER JOIN WIP.RESRCE R ON RRT.SITE = R.SITE AND R.RESRCE = RRT.RESOURCE_NO
LEFT JOIN WIP.WORK_CENTER_MEMBER WCM ON WCM.WORK_CENTER_OR_RESOURCE_GBO = R.HANDLE LEFT JOIN WIP.WORK_CENTER_MEMBER WCM ON WCM.WORK_CENTER_OR_RESOURCE_GBO = R.HANDLE
LEFT JOIN WIP.WORK_CENTER_MEMBER WCMA ON WCMA.WORK_CENTER_OR_RESOURCE_GBO = WCM.WORK_CENTER_BO LEFT JOIN WIP.WORK_CENTER_MEMBER WCMA ON WCMA.WORK_CENTER_OR_RESOURCE_GBO = WCM.WORK_CENTER_BO
@ -921,14 +924,20 @@
<if test="compareEndDate != null and compareEndDate != ''"> <if test="compareEndDate != null and compareEndDate != ''">
AND RRT.PLAN_START_DATE &lt;= (TO_DATE( #{compareEndDate},'yyyy-MM-dd hh24:mi-ss' ) - 8/24 ) AND RRT.PLAN_START_DATE &lt;= (TO_DATE( #{compareEndDate},'yyyy-MM-dd hh24:mi-ss' ) - 8/24 )
</if> </if>
ORDER BY PLAN_START_DATE , ACTUAL_START_DATE
</select> </select>
<!--根据维修任务HANDLE获取维修任务详细数据--> <!--根据维修任务HANDLE获取维修任务详细数据-->
<select id="findResourceRepairTaskByHandleAndSite" resultType="com.foreverwin.mesnac.equip.model.ResourceRepairTask"> <select id="findResourceRepairTaskByHandleAndSite" resultType="com.foreverwin.mesnac.equip.model.ResourceRepairTask">
SELECT DISTINCT RRT.*,R.DESCRIPTION AS RESOURCE_DESCRIPTION,R.RESRCE AS RESOURCE_NO, SELECT DISTINCT RRT.*,R.DESCRIPTION AS RESOURCE_DESCRIPTION,R.RESRCE AS RESOURCE_NO, NCT.DESCRIPTION AS CANCEL_CODE_DESCRIPTION,
ZNU.FULL_NAME AS REPORT_USER_NAME, ZNU2.FULL_NAME AS CANCEL_USER_NAME ,
WCMA.WORK_CENTER_BO AS WORK_CENTER_BO,WCT.DESCRIPTION AS WORK_CENTER_DESCRIPTION WCMA.WORK_CENTER_BO AS WORK_CENTER_BO,WCT.DESCRIPTION AS WORK_CENTER_DESCRIPTION
FROM FROM
WIP.Z_RESOURCE_REPAIR_TASK RRT WIP.Z_RESOURCE_REPAIR_TASK RRT
LEFT JOIN WIP.RESRCE R ON R.RESRCE = RRT.RESOURCE_NO AND R.SITE = RRT.SITE LEFT JOIN WIP.RESRCE R ON R.RESRCE = RRT.RESOURCE_NO AND R.SITE = RRT.SITE
LEFT JOIN NC_CODE NC ON NC.NC_CODE = RRT.CANCEL_CODE
LEFT JOIN NC_CODE_T NCT ON NCT.NC_CODE_BO = NC.HANDLE
LEFT JOIN WIP.Z_NWA_USER ZNU ON ZNU.USER_NAME = RRT.REPORT_USER
LEFT JOIN WIP.Z_NWA_USER ZNU2 ON ZNU2.USER_NAME = RRT.CANCEL_USER
LEFT JOIN WIP.WORK_CENTER_MEMBER WCM ON WCM.WORK_CENTER_OR_RESOURCE_GBO = R.HANDLE LEFT JOIN WIP.WORK_CENTER_MEMBER WCM ON WCM.WORK_CENTER_OR_RESOURCE_GBO = R.HANDLE
LEFT JOIN WIP.WORK_CENTER_MEMBER WCMA ON WCMA.WORK_CENTER_OR_RESOURCE_GBO = WCM.WORK_CENTER_BO LEFT JOIN WIP.WORK_CENTER_MEMBER WCMA ON WCMA.WORK_CENTER_OR_RESOURCE_GBO = WCM.WORK_CENTER_BO
LEFT JOIN WIP.WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WCMA.WORK_CENTER_BO LEFT JOIN WIP.WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WCMA.WORK_CENTER_BO

Loading…
Cancel
Save