From 8f9bec32c9c51df69ce965a0e5cdc2b100ba0aaa Mon Sep 17 00:00:00 2001 From: wangfs <15029758498@163.com> Date: Sat, 20 Dec 2025 17:17:13 +0800 Subject: [PATCH] 优化 --- urbanops-module-garden/src/main/resources/mapper/inspectionplan/InspectionPlanCommitMapper.xml | 22 ++++++++-------------- urbanops-module-garden/src/main/resources/mapper/maintainplan/MaintainPlanCommitMapper.xml | 1 + 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/urbanops-module-garden/src/main/resources/mapper/inspectionplan/InspectionPlanCommitMapper.xml b/urbanops-module-garden/src/main/resources/mapper/inspectionplan/InspectionPlanCommitMapper.xml index 90093f4..684c0c7 100644 --- a/urbanops-module-garden/src/main/resources/mapper/inspectionplan/InspectionPlanCommitMapper.xml +++ b/urbanops-module-garden/src/main/resources/mapper/inspectionplan/InspectionPlanCommitMapper.xml @@ -38,11 +38,9 @@ a.creator_name, a.create_time FROM - garden_inspection_plan_commit a, - garden_inspection_plan b - where a.batch_no=b.batch_no - AND a.deleted = b. deleted - AND a.deleted = 0 + garden_inspection_plan_commit a + INNER JOIN garden_inspection_plan b ON a.batch_no = b.batch_no AND a.deleted= b.deleted + where a.deleted = 0 and a.plan_no = #{req.planNo} @@ -125,15 +123,10 @@ c.user_name, c.finish_time, c.remark - FROM - garden_inspection_plan a, - garden_inspection_plan_detail b, - garden_inspection_plan_commit c - WHERE a.batch_no = b.batch_no - AND b.plan_no=c.plan_no - AND a.dept_id =b.dept_id - AND a.deleted = b.deleted - AND a.deleted = 0 + FROM garden_inspection_plan_detail b + INNER JOIN garden_inspection_plan a ON a.batch_no = b.batch_no + INNER JOIN garden_inspection_plan_commit c ON c.plan_no = a.plan_no AND b.batch_no = c.batch_no + WHERE a.deleted = 0 AND b.plan_no = #{planNo} AND a.busi_line IN @@ -141,5 +134,6 @@ #{id} + ODER BY c.id DESC diff --git a/urbanops-module-garden/src/main/resources/mapper/maintainplan/MaintainPlanCommitMapper.xml b/urbanops-module-garden/src/main/resources/mapper/maintainplan/MaintainPlanCommitMapper.xml index cc69c32..0c43bc7 100644 --- a/urbanops-module-garden/src/main/resources/mapper/maintainplan/MaintainPlanCommitMapper.xml +++ b/urbanops-module-garden/src/main/resources/mapper/maintainplan/MaintainPlanCommitMapper.xml @@ -115,5 +115,6 @@ INNER JOIN garden_maintain_plan b ON a.batch_no = b.batch_no INNER JOIN garden_maintain_plan_commit c ON a.batch_no = c.batch_no AND a.plan_no = c.plan_no WHERE a.plan_no = #{req.planNo} + ODER BY c.id DESC -- libgit2 0.21.4