功能优化
This commit is contained in:
parent
44a4c0d4a1
commit
4c96c5ab9d
|
|
@ -34,11 +34,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<select id="selectScrapApplyDetailsList" parameterType="com.bonus.material.scrap.domain.ScrapApplyDetails" resultType="com.bonus.material.scrap.domain.vo.ScrapTaskListVo">
|
||||
SELECT
|
||||
sad.task_id as taskId, sad.create_by, sad.create_time as createTime,sad.update_time,sad.company_id,
|
||||
sad.task_id as taskId, sad.create_time as createTime,sad.update_time,sad.company_id,
|
||||
tt.`code` AS scrapCode, tt2.`code` as repairCode ,tt.task_status AS taskStatus,tt.task_type as taskType,tt.company_id AS companyId,tt.remark,
|
||||
bui.unit_name AS backUnit,
|
||||
bpi.pro_name AS backPro,
|
||||
su.nick_name AS createName,
|
||||
sad.create_by AS createName,
|
||||
tta.agreement_id as agreementId,
|
||||
GROUP_CONCAT(DISTINCT mt2.type_name) as type,
|
||||
CASE tt.task_status
|
||||
|
|
@ -58,7 +58,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN bm_agreement_info bai2 ON tta.agreement_id = bai2.agreement_id
|
||||
LEFT JOIN bm_unit bui ON bai2.unit_id = bui.unit_id
|
||||
LEFT JOIN bm_project bpi ON bai2.project_id = bpi.pro_id and bpi.del_flag = '0'
|
||||
left join sys_user su on sad.create_by = su.user_id
|
||||
left join sys_user su1 on sad.audit_by = su1.user_id
|
||||
left join repair_audit_details rad ON sad.parent_id = rad.id
|
||||
left join tm_task tt2 ON tt2.task_id = rad.task_id
|
||||
|
|
@ -79,14 +78,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
tt.`code` like concat('%', #{keyWord}, '%') or
|
||||
tt2.`code` like concat('%', #{keyWord}, '%') or
|
||||
tt.remark like concat('%', #{keyWord}, '%') or
|
||||
su.nick_name like concat('%', #{keyWord}, '%')
|
||||
sad.create_by like concat('%', #{keyWord}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
<![CDATA[and DATE_FORMAT( sad.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY sad.task_id,bui.unit_name,bpi.pro_name,su.nick_name
|
||||
GROUP BY sad.task_id,bui.unit_name,bpi.pro_name
|
||||
order by tt.create_time desc
|
||||
</select>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue