From a7fe4bcbcd58118c8e13ad1cb1c300e33537a8d4 Mon Sep 17 00:00:00 2001 From: liuzhaotian Date: Thu, 3 Apr 2025 11:49:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=92=E5=8D=95=E6=9F=A5=E8=AF=A2=E5=B0=8F?= =?UTF-8?q?=E6=9D=BFSQL=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../executor/dal/mysql/planitem/PlanItemMapper.java | 2 +- .../module/executor/service/plan/PlanServiceImpl.java | 2 +- .../src/main/resources/mapper/planitem/PlanItemMapper.xml | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/dal/mysql/planitem/PlanItemMapper.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/dal/mysql/planitem/PlanItemMapper.java index 8559686aa..c2f31f9b6 100644 --- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/dal/mysql/planitem/PlanItemMapper.java +++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/dal/mysql/planitem/PlanItemMapper.java @@ -43,7 +43,7 @@ public interface PlanItemMapper extends BaseMapperX { List selectOrderPlanPlateList(@Param("planIds") List planIds, @Param("organId") Long organId); - IPage selectPlateListByPlateIds(@Param("page") IPage page, @Param(Constants.WRAPPER) Wrapper wrapper); + IPage selectPlateListByPlateIds(@Param("page") IPage page, @Param(Constants.WRAPPER) Wrapper wrapper,@Param("organId") Long organId); IPage selectNoPlanGoodsByRoomAndBodyIds(@Param("page") IPage page, @Param(Constants.WRAPPER) Wrapper wrapper,@Param("organId") Long organId); diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/plan/PlanServiceImpl.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/plan/PlanServiceImpl.java index 585c30a35..9c9dd687c 100644 --- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/plan/PlanServiceImpl.java +++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/plan/PlanServiceImpl.java @@ -781,7 +781,7 @@ public class PlanServiceImpl implements PlanService { PageDTO page = new PageDTO<>(vo.getPageNo(), vo.getPageSize()); - IPage pageResult = planItemMapper.selectPlateListByPlateIds(page,queryWrapperX); + IPage pageResult = planItemMapper.selectPlateListByPlateIds(page,queryWrapperX,getUserOrganId()); if (CollUtil.isEmpty(pageResult.getRecords())) { diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/resources/mapper/planitem/PlanItemMapper.xml b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/resources/mapper/planitem/PlanItemMapper.xml index 449119d27..a198d7019 100644 --- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/resources/mapper/planitem/PlanItemMapper.xml +++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/resources/mapper/planitem/PlanItemMapper.xml @@ -124,10 +124,10 @@ ob.room_name as roomName from order_plan_item opi - left join order_goods og on opi.organ_id = og.organ_id and opi.order_id = og.order_id and opi.goods_id = og.id - left join order_plate op on opi.organ_id = op.organ_id and opi.order_id = op.order_id and opi.goods_id = op.goods_id and opi.plate_id = op.id - left join order_item oi on opi.organ_id = oi.organ_id and opi.order_id = oi.order_id and opi.plate_id = oi.plate_id - left join order_body ob on oi.organ_id = ob.organ_id and oi.order_id = ob.order_id and oi.body_id = ob.id + join order_goods og on opi.order_id = og.order_id and opi.goods_id = og.id and og.organ_id = #{organId} + join order_plate op on opi.order_id = op.order_id and opi.goods_id = op.goods_id and opi.plate_id = op.id and op.organ_id = #{organId} + join order_item oi on op.order_id = oi.order_id and op.id = oi.plate_id and oi.organ_id = #{organId} + join order_body ob on oi.order_id = ob.order_id and oi.body_id = ob.id and ob.organ_id = #{organId} ${ew.customSqlSegment}