功能优化

This commit is contained in:
mashuai 2025-09-04 23:28:15 +08:00
parent 3014474c88
commit ce1c35d31c
2 changed files with 11 additions and 9 deletions

View File

@ -344,7 +344,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
lai.is_confirm AS isConfirm,
lai.confirm_remark AS confirmRemark,
mt3.type_id AS firstId,
lpd.create_time AS releaseTime
lpd.create_time AS releaseTime,
lpd.parent_id AS parentId
FROM
lease_publish_details lpd
LEFT JOIN lease_apply_info lai ON lai.id = lpd.parent_id
@ -368,7 +369,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND lpd.project_id = bai.project_id
left join sys_user su on lpd.create_by = su.user_id
<if test="userId != null">
JOIN ma_type_keeper mtk ON mtk.type_id = lpd.type_id AND mtk.user_id = #{userId}
JOIN ma_type_keeper mtk ON mtk.type_id = lpd.new_type AND mtk.user_id = #{userId}
</if>
where 1 = 1
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">

View File

@ -703,19 +703,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
sai.id,
bu.unit_name AS leaseUnit,
bp.pro_name AS leaseProject,
sai.start_time AS leaseTime,
lai.create_time AS leaseTime,
IF( sai.status = 1, bu.unit_name,"") AS backUnit,
IF( sai.status = 1, bp.pro_name ,"") AS backProject,
IF( sai.status = 1, sai.end_time ,"") AS backTime,
IF( sai.status = 1, bai.create_time ,"") AS backTime,
sai.status
FROM
slt_agreement_info sai
LEFT JOIN bm_agreement_info bai on sai.agreement_id = bai.agreement_id
LEFT JOIN bm_unit bu on bai.unit_id = bu.unit_id
LEFT JOIN bm_project bp on bai.project_id = bp.pro_id
LEFT JOIN bm_agreement_info ba on sai.agreement_id = ba.agreement_id
LEFT JOIN bm_unit bu on ba.unit_id = bu.unit_id
LEFT JOIN bm_project bp on ba.project_id = bp.pro_id
LEFT JOIN lease_apply_info lai ON sai.lease_id = lai.id
LEFT JOIN back_apply_info bai ON bai.id = sai.back_id
WHERE sai.ma_id = #{maId}
ORDER BY sai.ID desc
ORDER BY lai.create_time desc
limit 1
</select>