From 7a169b05068c684076f6ffdcd3e354fa48dd0dea Mon Sep 17 00:00:00 2001 From: "2265829957@qq.com" <2265829957@qq.com> Date: Mon, 23 Feb 2026 20:34:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=90=E7=BB=B4=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xhpc/order/controller/XhpcInspectionController.java | 4 ++-- .../com/xhpc/order/service/IXhpcInspectionService.java | 2 +- .../order/service/impl/XhpcInspectionServiceImpl.java | 8 ++------ .../src/main/resources/mapper/XhpcInspectionMapper.xml | 9 +-------- 4 files changed, 6 insertions(+), 17 deletions(-) diff --git a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/controller/XhpcInspectionController.java b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/controller/XhpcInspectionController.java index 3106adb8..4eae2846 100644 --- a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/controller/XhpcInspectionController.java +++ b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/controller/XhpcInspectionController.java @@ -92,8 +92,8 @@ public class XhpcInspectionController extends BaseController { } @GetMapping("/getInspectionById") - public AjaxResult getInspectionById(@Param("stationId") Long stationId,@Param("id") String id) { - return xhpcInspectionService.getInspectionById(stationId, id); + public AjaxResult getInspectionById(@Param("stationId") Long stationId,@Param("id") String id,@Param("inspectionId") Long inspectionId) { + return xhpcInspectionService.getInspectionById(stationId, id,inspectionId); } @PostMapping("/addInspection") diff --git a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/IXhpcInspectionService.java b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/IXhpcInspectionService.java index 2697ff4f..8a6408ad 100644 --- a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/IXhpcInspectionService.java +++ b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/IXhpcInspectionService.java @@ -13,7 +13,7 @@ public interface IXhpcInspectionService { void timing(); - AjaxResult getInspectionById(Long stationId, String id); + AjaxResult getInspectionById(Long stationId, String id,Long inspectionId); AjaxResult addInspection(HttpServletRequest request, XhpcInspection xhpcInspection); diff --git a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcInspectionServiceImpl.java b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcInspectionServiceImpl.java index 2fb2966c..da78af22 100644 --- a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcInspectionServiceImpl.java +++ b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcInspectionServiceImpl.java @@ -110,24 +110,20 @@ public class XhpcInspectionServiceImpl implements IXhpcInspectionService { } @Override - public AjaxResult getInspectionById(Long stationId, String id) { + public AjaxResult getInspectionById(Long stationId, String id,Long inspectionId) { //'0 桩 1箱变 2监控 3道闸 4 远程连接' Map map =new HashMap<>(); int type =0; if(id.equals("XB")){ type=1; - map =xhpcInspectionMapper.getInspectionById(stationId,null,type); }else if(id.equals("DZ")){ type=3; - map =xhpcInspectionMapper.getInspectionById(stationId,null,type); }else if(id.equals("JK")){ type=2; - map =xhpcInspectionMapper.getInspectionById(stationId,null,type); }else if(id.equals("YC")){ type=2; - map =xhpcInspectionMapper.getInspectionById(stationId,null,type); } - map =xhpcInspectionMapper.getInspectionById(stationId,Long.getLong(id),type); + map =xhpcInspectionMapper.getInspectionById(stationId,inspectionId,type); return AjaxResult.success(map); } diff --git a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcInspectionMapper.xml b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcInspectionMapper.xml index f43bee1a..358093cc 100644 --- a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcInspectionMapper.xml +++ b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcInspectionMapper.xml @@ -201,14 +201,7 @@ t.maintenance_record as maintenanceRecord, t.error_name as errorName from xhpc_inspection t - where t.charging_station_id=#{stationId} and t.del_flag=0 - - and t.inspection_id =#{id} - - - and t.type =#{type} - - + where t.charging_station_id=#{stationId} and t.del_flag=0 and t.inspection_id =#{id} and t.type =#{type}