<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<mapper namespace="org.jeecg.modules.eam.mapper.SpecialtyInspectionOrderMapper">
|
|
<select id="getSpecialtyInspectionOrderList" parameterType="Map" resultType="Map">
|
|
SELECT
|
t1.id,
|
t2.id as specialtyInspectionPlanId,
|
t1.num,
|
t1.status,
|
t6.item_text as statusName,
|
t1.inspection_time as inspectionTime,
|
t1.actual_start_time as actualStartTime,
|
t1.actual_end_time as actualEndTime,
|
t2.num as specialtyInspectionPlanNum,
|
t3.id as inspectionCycleId,
|
concat(t3.code, '/', t3.name) as inspectionCycleName,
|
t4.depart_name as departName,
|
t2.team_id as teamId,
|
t5.name as teamName,
|
t1.inspection_deadline as inspectionDeadline,
|
t1.create_by as createBy,
|
t1.create_time as createTime,
|
t2.assign_mode as assignMode,
|
t7.item_text as assignModeName,
|
t1.inspection_user_id as inspectionUserId,
|
t8.realname as inspectionUserName
|
FROM
|
mom_eam_specialty_inspection_order t1
|
left join mom_eam_specialty_inspection_plan t2 ON t1.specialty_inspection_plan_id = t2.id
|
left join mom_eam_inspection_cycle t3 on t1.inspection_cycle_id = t3.id
|
left join sys_depart t4 on t2.depart_id = t4.id
|
left join mom_base_team t5 on t2.team_id = t5.id
|
LEFT JOIN ( SELECT * FROM v_sys_dict WHERE dict_code = 'daily_inspection_standard_status' ) t6 ON t6.item_value = t1.status
|
left join (select * from v_sys_dict where dict_code = 'assign_mode') t7 on t2.assign_mode = t7.item_value
|
left join sys_user t8 on t1.inspection_user_id = t8.id
|
WHERE t1.del_flag = 0 and t2.del_flag = 0 and t3.del_flag = 0 and t4.del_flag = 0
|
<if test="params.num != null and params.num != ''">
|
and t1.num like concat('%',#{params.num},'%')
|
</if>
|
ORDER BY t1.create_time desc
|
</select>
|
|
</mapper>
|