diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyInfoMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyInfoMapper.xml index da0d1c73..d755b9db 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyInfoMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyInfoMapper.xml @@ -654,7 +654,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT GROUP_CONCAT( DISTINCT lod.id ) AS ids, lai.id AS id, - tt.CODE AS CODE, + a.`code` AS CODE, lai.create_by AS createBy, lai.create_time AS createTime, lai.lease_person AS leasePerson, @@ -676,8 +676,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" lease_out_details lod 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 (SELECT parent_id, unit_id,project_id,create_time from lease_publish_details - GROUP BY parent_id) a ON a.parent_id = lod.parent_id + LEFT JOIN (SELECT parent_id, unit_id,project_id,create_time,`code`,publish_task from lease_publish_details + 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_project bp ON bp.pro_id = a.project_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" GROUP BY - lod.parent_id + lod.parent_id, + lod.publish_task ORDER BY lod.create_time DESC