大屏检修预警修复
This commit is contained in:
parent
c3253543ce
commit
0aa12bd997
|
|
@ -192,13 +192,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
ELSE NULL
|
||||
END) AS TimeoutNum
|
||||
FROM ma_machine mm
|
||||
LEFT JOIN slt_agreement_info sai on sai.ma_id = mm.ma_id and mm.type_id = sai.type_id and sai.`status`='0' and sai.end_time is null
|
||||
LEFT JOIN slt_agreement_info sai on sai.ma_id = mm.ma_id and mm.type_id = sai.type_id
|
||||
LEFT JOIN bm_agreement_info bai ON sai.agreement_id = bai.agreement_id
|
||||
LEFT JOIN bm_project bp ON bai.project_id = bp.pro_id
|
||||
LEFT JOIN ma_type mt ON sai.type_id = mt.type_id
|
||||
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
|
||||
left join sys_dept sd ON sd.dept_id = bp.imp_unit
|
||||
where mm.next_check_time is not null and mt.`level` = '4'
|
||||
and sai.`status`='0' and sai.end_time is null
|
||||
and bp.external_id is not null
|
||||
and mm.ma_status = 2
|
||||
<if test="deptId != null">
|
||||
AND sd.dept_id = #{deptId}
|
||||
</if>
|
||||
|
|
@ -221,13 +224,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
ELSE NULL
|
||||
END AS daysDiff
|
||||
FROM ma_machine mm
|
||||
LEFT JOIN slt_agreement_info sai on sai.ma_id = mm.ma_id and mm.type_id = sai.type_id and sai.`status`='0' and sai.end_time is null
|
||||
LEFT JOIN slt_agreement_info sai on sai.ma_id = mm.ma_id and mm.type_id = sai.type_id
|
||||
LEFT JOIN bm_agreement_info bai ON sai.agreement_id = bai.agreement_id
|
||||
LEFT JOIN bm_project bp ON bai.project_id = bp.pro_id
|
||||
LEFT JOIN sys_dept sd on bp.imp_unit = sd.dept_id
|
||||
LEFT JOIN ma_type mt ON sai.type_id = mt.type_id
|
||||
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
|
||||
WHERE mm.next_check_time is not null AND mt.`level`=4
|
||||
and bp.external_id is not null
|
||||
and sai.`status`='0' and sai.end_time is null
|
||||
and mm.ma_status = 2
|
||||
<if test="proId != null">
|
||||
AND bp.pro_id = #{proId}
|
||||
</if>
|
||||
|
|
@ -255,6 +261,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="proId != null">
|
||||
GROUP BY bp.pro_id
|
||||
</if>
|
||||
order by mt.jiju_type desc
|
||||
</select>
|
||||
<select id="getCompletionNotRefunded" resultType="com.bonus.material.push.domain.MachineInfoBean">
|
||||
select
|
||||
|
|
|
|||
Loading…
Reference in New Issue