From d0199fca6febb91307b1066fa4ee54e849020b20 Mon Sep 17 00:00:00 2001 From: "2265829957@qq.com" <2265829957@qq.com> Date: Mon, 23 Feb 2026 21:15:49 +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 --- .../order/controller/XhpcInspectionController.java | 7 ++----- .../service/impl/XhpcInspectionServiceImpl.java | 3 +-- .../main/resources/mapper/XhpcInspectionMapper.xml | 12 ++++++------ 3 files changed, 9 insertions(+), 13 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 4eae2846..3302991a 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 @@ -9,10 +9,7 @@ import org.apache.ibatis.annotations.Param; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.scheduling.annotation.Scheduled; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; import java.util.ArrayList; @@ -97,7 +94,7 @@ public class XhpcInspectionController extends BaseController { } @PostMapping("/addInspection") - public AjaxResult addInspection(HttpServletRequest request,XhpcInspection xhpcInspection) { + public AjaxResult addInspection(HttpServletRequest request,@RequestBody XhpcInspection xhpcInspection) { return xhpcInspectionService.addInspection(request,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 da78af22..04842548 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 @@ -112,7 +112,6 @@ public class XhpcInspectionServiceImpl implements IXhpcInspectionService { @Override 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; @@ -123,7 +122,7 @@ public class XhpcInspectionServiceImpl implements IXhpcInspectionService { }else if(id.equals("YC")){ type=2; } - map =xhpcInspectionMapper.getInspectionById(stationId,inspectionId,type); + Map 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 358093cc..838298df 100644 --- a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcInspectionMapper.xml +++ b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcInspectionMapper.xml @@ -207,12 +207,12 @@ update xhpc_inspection - status=#{status} - inspection_img=#{inspectionImg} - fault_img=#{faultImg} - fault_description=#{faultDescription} - maintenance_record=#{maintenanceRecord} - user_id=#{userId} + status=#{status}, + inspection_img=#{inspectionImg}, + fault_img=#{faultImg}, + fault_description=#{faultDescription}, + maintenance_record=#{maintenanceRecord}, + user_id=#{userId}, where inspection_id=#{inspectionId}