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}