diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/largeScreen/LargeScreenMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/largeScreen/LargeScreenMapper.xml index 9051a06f..f293805a 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/largeScreen/LargeScreenMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/largeScreen/LargeScreenMapper.xml @@ -341,12 +341,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" mt2.type_name AS typeName, mt2.type_id AS typeId, mt.type_name AS typeModelName, - lod.out_num AS num, + SUM( lod.out_num ) AS num, lai.`code` AS materialCode, bui.unit_name AS unitName, bai.unit_id AS unitId, bpl.lot_id AS projectId, - su.user_name AS userName, + mt_full.userName AS userName, bpl.lot_name AS projectName, sd.dept_name AS companyName FROM @@ -354,8 +354,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" LEFT JOIN ma_type mt ON lod.type_id = mt.type_id AND mt.`level` = '4' LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id + LEFT JOIN ( + SELECT + mt.type_id, + mt.type_name, + GROUP_CONCAT( su.user_name ) AS userName + FROM + ma_type mt LEFT JOIN ma_type_keeper mtk ON mt.type_id = mtk.type_id LEFT JOIN sys_user su ON mtk.user_id = su.user_id + GROUP BY + mt.type_id, + mt.type_name + ) mt_full ON mt.type_id = mt_full.type_id LEFT JOIN sys_dept sd ON sd.dept_id = mt.company_id LEFT JOIN lease_apply_info lai ON lod.parent_id = lai.id LEFT JOIN tm_task_agreement tta ON lai.task_id = tta.task_id @@ -379,6 +390,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND mt2.type_id = #{typeId} + GROUP BY + mt.type_id, + mt.type_name, + lai.`code`