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 images;
/**角色、岗位名称*/ /**角色、岗位名称*/
private String roleName; private String roleName;
/**项目名称*/
private String projectName;
} }

View File

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