设备点检、维修模块更新

zpl 4 years ago
parent 8eb343adde
commit e6d937ab17

@ -281,12 +281,12 @@ public class ResourceRepairTask extends Model<ResourceRepairTask> {
*
*/
@TableField(exist = false)
private LocalDateTime compareStartTime;
private String compareStartDate;
/**
*
*/
@TableField(exist = false)
private LocalDateTime compareEndTime;
private String compareEndDate;
/**
*
*/
@ -387,20 +387,20 @@ public class ResourceRepairTask extends Model<ResourceRepairTask> {
this.workCenterDescription = workCenterDescription;
}
public LocalDateTime getCompareStartTime() {
return compareStartTime;
public String getCompareStartDate() {
return compareStartDate;
}
public void setCompareStartTime(LocalDateTime compareStartTime) {
this.compareStartTime = compareStartTime;
public void setCompareStartDate(String compareStartDate) {
this.compareStartDate = compareStartDate;
}
public LocalDateTime getCompareEndTime() {
return compareEndTime;
public String getCompareEndDate() {
return compareEndDate;
}
public void setCompareEndTime(LocalDateTime compareEndTime) {
this.compareEndTime = compareEndTime;
public void setCompareEndDate(String compareEndDate) {
this.compareEndDate = compareEndDate;
}
public Integer getSeq() {

@ -200,12 +200,13 @@ public class ResourceRepairTaskServiceImpl extends ServiceImpl<ResourceRepairTas
// 结束时间、等待时长
repairTask.setWaitEndDate(LocalDateTime.now());
Duration betweenTime = Duration.between(repairTask.getWaitStartDate(), repairTask.getWaitEndDate());
Long waitTime = betweenTime.toHours();
double v = waitTime.doubleValue();
repairTask.setWaitTime(v);
Long waitMinutes = betweenTime.toMinutes();
double waitHours = waitMinutes.doubleValue()/60.00;
repairTask.setWaitTime(waitHours);
break;
}
/*// 维修完成
/*
// 维修完成
if (status.equals("301")){
// 耗用备品清单
List<ResourceInspectTaskSpare> spareList = resourceRepairTask.getSpareList();

@ -883,16 +883,20 @@
<!--批量获取维修任务-->
<select id="findResourceRepairTaskList" resultType="com.foreverwin.mesnac.equip.model.ResourceRepairTask">
SELECT DISTINCT RRT.*,R.DESCRIPTION AS RESOURCE_DESCRIPTION,R.RESRCE AS RESOURCE_NO,
NCT.DESCRIPTION AS NC_CODE_DESCRIPTION,WCT.DESCRIPTION AS WORK_CENTER_DESCRIPTION
NCT.DESCRIPTION AS NC_CODE_DESCRIPTION,
WCMA.WORK_CENTER_BO AS WORK_CENTER_BO,
WCT.DESCRIPTION AS WORK_CENTER_DESCRIPTION
FROM
WIP.Z_RESOURCE_REPAIR_TASK RRT
INNER JOIN WIP.RESRCE R ON RRT.SITE = R.SITE AND R.RESRCE = RRT.RESOURCE_NO
INNER JOIN WIP.NC_CODE NC ON RRT.SITE = NC.SITE AND NC.NC_CODE = RRT.NC_CODE_NO
LEFT JOIN WIP.NC_CODE_T NCT ON NCT.NC_CODE_BO = NC.HANDLE AND NCT.LOCALE = 'zh'
LEFT JOIN WIP.WORK_CENTER_MEMBER WCM ON WCM.WORK_CENTER_OR_RESOURCE_GBO = R.HANDLE
LEFT JOIN WIP.WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = 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
INNER JOIN WIP.RESOURCE_TYPE_RESOURCE RTR ON RTR.RESOURCE_BO = R.HANDLE
WHERE RRT.SITE = #{site}
--AND WCT.LOCALE = 'zh'
<if test="resourceBo != null and resourceBo != ''">
AND RRT.RESOURCE_BO = #{resourceBo}
</if>
@ -914,27 +918,28 @@
<if test="reportSource != null and reportSource != ''">
AND RRT.REPORT_SOURCE = #{reportSource}
</if>
<if test="compareStartTime != null and compareStartTime != ''">
AND RRT.PLAN_START_DATE &gt; #{compareStartTime}
<if test="compareStartDate != null and compareStartDate != ''">
AND RRT.PLAN_START_DATE &gt; TO_DATE( #{compareStartDate},'yyyy-MM-dd hh24:mi-ss' )
</if>
<if test="compareEndTime != null and compareEndTime != ''">
AND RRT.PLAN_START_DATE &lt; #{compareEndTime}
<if test="compareEndDate != null and compareEndDate != ''">
AND RRT.PLAN_START_DATE &lt; TO_DATE( #{compareEndDate},'yyyy-MM-dd hh24:mi-ss' )
</if>
</select>
<!--根据维修任务HANDLE获取维修任务详细数据-->
<select id="findResourceRepairTaskByHandleAndSite" resultType="com.foreverwin.mesnac.equip.model.ResourceRepairTask">
SELECT RRT.*,R.DESCRIPTION AS RESOURCE_DESCRIPTION,R.RESRCE AS RESOURCE_NO,
NCT.DESCRIPTION AS NC_CODE_DESCRIPTION,WCT.DESCRIPTION AS WORK_CENTER_DESCRIPTION
NCT.DESCRIPTION AS NC_CODE_DESCRIPTION,
WCMA.WORK_CENTER_BO AS WORK_CENTER_BO,WCT.DESCRIPTION AS WORK_CENTER_DESCRIPTION
FROM
WIP.Z_RESOURCE_REPAIR_TASK RRT
LEFT JOIN WIP.RESRCE R ON R.RESRCE = RRT.RESOURCE_NO
LEFT JOIN WIP.NC_CODE NC ON NC.NC_CODE = RRT.NC_CODE_NO
LEFT JOIN WIP.NC_CODE_T NCT ON NCT.NC_CODE_BO = NC.HANDLE
LEFT JOIN WIP.RESRCE R ON R.RESRCE = RRT.RESOURCE_NO AND R.SITE = RRT.SITE
LEFT JOIN WIP.NC_CODE NC ON NC.NC_CODE = RRT.NC_CODE_NO AND NC.SITE = RRT.SITE
LEFT JOIN WIP.NC_CODE_T NCT ON NCT.NC_CODE_BO = NC.HANDLE AND NC.LOCALE = 'zh'
LEFT JOIN WIP.WORK_CENTER_MEMBER WCM ON WCM.WORK_CENTER_OR_RESOURCE_GBO = R.HANDLE
LEFT JOIN WIP.WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = 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
INNER JOIN WIP.RESOURCE_TYPE_RESOURCE RTR ON RTR.RESOURCE_BO = R.HANDLE
WHERE RRT.SITE = #{site} AND RRT.HANDLE = #{handle}
AND R.SITE = #{site} AND NC.SITE = #{site}
</select>
<!--自定义sql-->

Loading…
Cancel
Save