|
|
|
@ -93,6 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="isFlag != null and isFlag != ''"> and is_flag = #{isFlag}</if>
|
|
|
|
|
<if test="deviceId != null and deviceId != ''"> and device_id = #{deviceId}</if>
|
|
|
|
|
</where>
|
|
|
|
|
order by create_time desc
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectDmsBillsFaultInstanceByRepairInstanceId" parameterType="Long" resultMap="DmsBillsFaultInstanceResult">
|
|
|
|
@ -167,6 +168,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
|
|
<if test="deviceId != null">device_id = #{deviceId},</if>
|
|
|
|
|
<if test="approveStatus != null">approveStatus = #{approveStatus},</if>
|
|
|
|
|
<if test="repairConfirm != null">repair_confirm = #{repairConfirm},</if>
|
|
|
|
|
<if test="confirmer != null">confirmer = #{confirmer},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
where repair_instance_id = #{repairInstanceId}
|
|
|
|
|
</update>
|
|
|
|
@ -267,7 +270,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<select id="selectFaults" resultType="com.hw.dms.domain.DmsFaultInstanceActivity"
|
|
|
|
|
parameterType="java.lang.Long">
|
|
|
|
|
select
|
|
|
|
|
x.*,a.device_name ,a.device_code,a.device_location ,b.apply_user ,b.apply_time ,b.real_begin_time ,b.real_end_time
|
|
|
|
|
x.fault_description ,
|
|
|
|
|
x.checked_fault ,
|
|
|
|
|
x.repair_content ,
|
|
|
|
|
x.protected_method ,
|
|
|
|
|
x.repairer ,
|
|
|
|
|
a.device_name ,
|
|
|
|
|
a.device_code,
|
|
|
|
|
a.device_location ,
|
|
|
|
|
b.apply_user ,
|
|
|
|
|
b.apply_time ,
|
|
|
|
|
b.real_begin_time ,
|
|
|
|
|
b.real_end_time,
|
|
|
|
|
b.repair_confirm,
|
|
|
|
|
b.update_time,
|
|
|
|
|
b.confirmer
|
|
|
|
|
from
|
|
|
|
|
`hwjy-cloud`.dms_fault_instance_activity x left join dms_base_device_ledger a on x.device_id = a.device_id
|
|
|
|
|
left join dms_bills_fault_instance b on x.repair_instance_id = b.repair_instance_id where x.repair_instance_id = #{repairInstanceId}
|
|
|
|
@ -276,6 +293,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
parameterType="java.lang.Long">
|
|
|
|
|
SELECT x.* FROM `hwjy-cloud`.dms_fault_compents_parts x where x.fault_id = #{repairInstanceId}
|
|
|
|
|
</select>
|
|
|
|
|
<select id="selectDmsBillsFaultInstanceCompletedList" resultType="com.hw.dms.domain.DmsBillsFaultInstance"
|
|
|
|
|
parameterType="com.hw.dms.domain.DmsBillsFaultInstance">
|
|
|
|
|
select repair_instance_id, fault_source_type, fault_source_id, wf_process_id, bills_fault_code, bills_status, apply_user, apply_time, real_begin_time, real_end_time, require_end_time, instance_type, is_flag, remark, create_by, create_time, update_by, update_time,device_id,approveStatus,repair_confirm from dms_bills_fault_instance
|
|
|
|
|
<where>
|
|
|
|
|
bills_status = 2
|
|
|
|
|
<if test="faultSourceType != null and faultSourceType != ''"> and fault_source_type = #{faultSourceType}</if>
|
|
|
|
|
<if test="faultSourceId != null "> and fault_source_id = #{faultSourceId}</if>
|
|
|
|
|
<if test="repairInstanceId != null "> and repair_instance_id = #{repairInstanceId}</if>
|
|
|
|
|
<if test="wfProcessId != null "> and wf_process_id = #{wfProcessId}</if>
|
|
|
|
|
<if test="billsFaultCode != null and billsFaultCode != ''"> and bills_fault_code = #{billsFaultCode}</if>
|
|
|
|
|
<if test="billsStatus != null and billsStatus != ''"> and bills_status = #{billsStatus}</if>
|
|
|
|
|
<if test="applyUser != null and applyUser != ''"> and apply_user = #{applyUser}</if>
|
|
|
|
|
<if test="applyTime != null "> and apply_time = #{applyTime}</if>
|
|
|
|
|
<if test="realBeginTime != null "> and real_begin_time = #{realBeginTime}</if>
|
|
|
|
|
<if test="realEndTime != null "> and real_end_time = #{realEndTime}</if>
|
|
|
|
|
<if test="requireEndTime != null "> and require_end_time = #{requireEndTime}</if>
|
|
|
|
|
<if test="instanceType != null and instanceType != ''"> and instance_type = #{instanceType}</if>
|
|
|
|
|
<if test="isFlag != null and isFlag != ''"> and is_flag = #{isFlag}</if>
|
|
|
|
|
<if test="deviceId != null and deviceId != ''"> and device_id = #{deviceId}</if>
|
|
|
|
|
</where>
|
|
|
|
|
order by create_time desc
|
|
|
|
|
</select>
|
|
|
|
|
<select id="getDmsPartsList" resultType="com.hw.dms.domain.DmsFaultCompentsParts"
|
|
|
|
|
parameterType="java.lang.Long">
|
|
|
|
|
select
|
|
|
|
|
x.*,a.bills_fault_code
|
|
|
|
|
from
|
|
|
|
|
`hwjy-cloud`.dms_fault_compents_parts x
|
|
|
|
|
left join dms_bills_fault_instance a on
|
|
|
|
|
x.fault_id = a.repair_instance_id where x.fault_id = #{repairInstanceId}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</mapper>
|
|
|
|
|