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}