功能优化
This commit is contained in:
parent
c7fc7a0cd2
commit
14d3bc2040
|
|
@ -654,7 +654,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
SELECT
|
SELECT
|
||||||
GROUP_CONCAT( DISTINCT lod.id ) AS ids,
|
GROUP_CONCAT( DISTINCT lod.id ) AS ids,
|
||||||
lai.id AS id,
|
lai.id AS id,
|
||||||
tt.CODE AS CODE,
|
a.`code` AS CODE,
|
||||||
lai.create_by AS createBy,
|
lai.create_by AS createBy,
|
||||||
lai.create_time AS createTime,
|
lai.create_time AS createTime,
|
||||||
lai.lease_person AS leasePerson,
|
lai.lease_person AS leasePerson,
|
||||||
|
|
@ -676,8 +676,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
lease_out_details lod
|
lease_out_details lod
|
||||||
LEFT JOIN lease_apply_info lai ON lai.id = lod.parent_id
|
LEFT JOIN lease_apply_info lai ON lai.id = lod.parent_id
|
||||||
LEFT JOIN tm_task tt ON lai.task_id = tt.task_id
|
LEFT JOIN tm_task tt ON lai.task_id = tt.task_id
|
||||||
LEFT JOIN (SELECT parent_id, unit_id,project_id,create_time from lease_publish_details
|
LEFT JOIN (SELECT parent_id, unit_id,project_id,create_time,`code`,publish_task from lease_publish_details
|
||||||
GROUP BY parent_id) a ON a.parent_id = lod.parent_id
|
GROUP BY parent_id,publish_task) a ON a.parent_id = lod.parent_id
|
||||||
|
and a.publish_task = lod.publish_task
|
||||||
LEFT JOIN bm_unit bu ON bu.unit_id = a.unit_id
|
LEFT JOIN bm_unit bu ON bu.unit_id = a.unit_id
|
||||||
LEFT JOIN bm_project bp ON bp.pro_id = a.project_id
|
LEFT JOIN bm_project bp ON bp.pro_id = a.project_id
|
||||||
LEFT JOIN bm_agreement_info bai ON a.unit_id = bai.unit_id
|
LEFT JOIN bm_agreement_info bai ON a.unit_id = bai.unit_id
|
||||||
|
|
@ -695,7 +696,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<![CDATA[ AND DATE_FORMAT( lai.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
|
<![CDATA[ AND DATE_FORMAT( lai.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
|
||||||
</if>
|
</if>
|
||||||
GROUP BY
|
GROUP BY
|
||||||
lod.parent_id
|
lod.parent_id,
|
||||||
|
lod.publish_task
|
||||||
ORDER BY
|
ORDER BY
|
||||||
lod.create_time DESC
|
lod.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue