This commit is contained in:
PQZ 2024-11-05 14:12:20 +08:00
parent e02e370fbb
commit 97edaf4046
2 changed files with 12 additions and 9 deletions

View File

@ -18,5 +18,6 @@ public class RepairRecordsRespVO extends RepairRecords {
private String images;
/**角色、岗位名称*/
private String roleName;
/**项目名称*/
private String projectName;
}

View File

@ -10,24 +10,26 @@
-->
<select id="queryRepairRecords" resultType="cn.iocoder.yudao.module.base.vo.RepairRecordsRespVO">
SELECT *
FROM dl_repair_records
SELECT main.*,
drt.item_name AS projectName
FROM dl_repair_records main
LEFT JOIN dl_repair_titem drt ON main.repair_item_id = drt.id AND drt.deleted = 0
<where>
deleted = '0'
main.deleted = '0'
<if test="entity.ticketId != null and entity.ticketId != ''">
AND ticket_id = #{entity.ticketId}
AND main.ticket_id = #{entity.ticketId}
</if>
<if test="entity.repairItemId != null and entity.repairItemId != ''">
AND repair_item_id = #{entity.repairItemId}
AND main.repair_item_id = #{entity.repairItemId}
</if>
<if test="entity.dealUserId != null and entity.dealUserId != ''">
AND deal_user_id = #{entity.dealUserId}
AND main.deal_user_id = #{entity.dealUserId}
</if>
<if test="entity.type != null and entity.type != ''">
AND type = #{entity.type}
AND main.type = #{entity.type}
</if>
</where>
order by create_time desc
order by main.create_time desc
</select>
<select id="selectNowRepairByTicketId" resultType="java.util.Map">
SELECT