From 9a942b3d874da9a6af6a774130668043a047b6bf Mon Sep 17 00:00:00 2001 From: mashuai Date: Wed, 3 Jul 2024 17:31:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E9=A1=B5=E9=9D=A2=E8=B0=83?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/largeScreen/LargeScreenMapper.xml | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) 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`