From f4e36b37b660e86bb59ed01389a0e4d3c3c1feb9 Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Fri, 27 Sep 2024 15:09:46 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=B9=B2=E7=BA=BF=E5=BC=80=E5=8D=95=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trunkline/mapper/TrunklineAdvanceDetailMapper.xml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.xml index 0748dc4b7..bc233580b 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.xml +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.xml @@ -53,8 +53,7 @@ IFNULL(sum(ltad.volume),0) volume from logpm_trunkline_advance_detail ltad left join logpm_basicdata_factory_category lbfc on lbfc.brand = ltad.brand and type=1 - and IFNULL(lbfc.firsts,1) = IFNULL(ltad.first_pack_name,1) and IFNULL(lbfc.seconds,2) = IFNULL(ltad.second_pack_name,2) and IFNULL(lbfc.thirds,3) = IFNULL(ltad.third_pack_name,3) and IFNULL(lbfc.materiel_name,4)=IFNULL(ltad.material_name,4) - left join logpm_basicdata_category lbc on lbc.id = lbfc.category_id + and IFNULL(lbfc.firsts,1) = IFNULL(ltad.first_pack_name,1) and IFNULL(lbfc.seconds,2) = IFNULL(ltad.second_pack_name,2) and IFNULL(lbfc.thirds,3) = IFNULL(ltad.third_pack_name,3) and IFNULL(lbfc.materiel_name,4)=IFNULL(ltad.material_name,4) AND lbfc.is_delete = 0 where ltad.is_deleted = 0 and ltad.advance_id in @@ -387,8 +386,8 @@ lbfc2.category_id costCategoryId, IFNULL(lbfc2.category,'其他') costCategoryName from logpm_trunkline_advance_detail ltad - left join logpm_basicdata_factory_category lbfc1 on lbfc1.brand = ltad.brand and IFNULL(lbfc1.firsts,1) = IFNULL(ltad.first_pack_name,1) and IFNULL(lbfc1.seconds,2) = IFNULL(ltad.second_pack_name,2) and IFNULL(lbfc1.thirds,3) = IFNULL(ltad.third_pack_name,3) and lbfc1.type = 1 AND IFNULL(lbfc1.materiel_name,4) = IFNULL(ltad.material_name,4) - left join logpm_basicdata_factory_category lbfc2 on lbfc2.brand = ltad.brand and IFNULL(lbfc2.firsts,1) = IFNULL(ltad.first_pack_name,1) and IFNULL(lbfc2.seconds,2) = IFNULL(ltad.second_pack_name,2) and IFNULL(lbfc2.thirds,3) = IFNULL(ltad.third_pack_name,3) and lbfc1.type = 2 AND IFNULL(lbfc2.materiel_name,4) = IFNULL(ltad.material_name,4) + left join logpm_basicdata_factory_category lbfc1 on lbfc1.brand = ltad.brand and IFNULL(lbfc1.firsts,1) = IFNULL(ltad.first_pack_name,1) and IFNULL(lbfc1.seconds,2) = IFNULL(ltad.second_pack_name,2) and IFNULL(lbfc1.thirds,3) = IFNULL(ltad.third_pack_name,3) and lbfc1.type = 1 AND IFNULL(lbfc1.materiel_name,4) = IFNULL(ltad.material_name,4) AND lbfc1.is_deleted = 0 + left join logpm_basicdata_factory_category lbfc2 on lbfc2.brand = ltad.brand and IFNULL(lbfc2.firsts,1) = IFNULL(ltad.first_pack_name,1) and IFNULL(lbfc2.seconds,2) = IFNULL(ltad.second_pack_name,2) and IFNULL(lbfc2.thirds,3) = IFNULL(ltad.third_pack_name,3) and lbfc1.type = 2 AND IFNULL(lbfc2.materiel_name,4) = IFNULL(ltad.material_name,4) AND lbfc2.is_deleted = 0 where ltad.is_deleted = 0 and ltad.advance_id in