运维接口
This commit is contained in:
parent
30e01dc8a9
commit
7a169b0506
@ -92,8 +92,8 @@ public class XhpcInspectionController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/getInspectionById")
|
@GetMapping("/getInspectionById")
|
||||||
public AjaxResult getInspectionById(@Param("stationId") Long stationId,@Param("id") String id) {
|
public AjaxResult getInspectionById(@Param("stationId") Long stationId,@Param("id") String id,@Param("inspectionId") Long inspectionId) {
|
||||||
return xhpcInspectionService.getInspectionById(stationId, id);
|
return xhpcInspectionService.getInspectionById(stationId, id,inspectionId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/addInspection")
|
@PostMapping("/addInspection")
|
||||||
|
|||||||
@ -13,7 +13,7 @@ public interface IXhpcInspectionService {
|
|||||||
|
|
||||||
void timing();
|
void timing();
|
||||||
|
|
||||||
AjaxResult getInspectionById(Long stationId, String id);
|
AjaxResult getInspectionById(Long stationId, String id,Long inspectionId);
|
||||||
|
|
||||||
AjaxResult addInspection(HttpServletRequest request, XhpcInspection xhpcInspection);
|
AjaxResult addInspection(HttpServletRequest request, XhpcInspection xhpcInspection);
|
||||||
|
|
||||||
|
|||||||
@ -110,24 +110,20 @@ public class XhpcInspectionServiceImpl implements IXhpcInspectionService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult getInspectionById(Long stationId, String id) {
|
public AjaxResult getInspectionById(Long stationId, String id,Long inspectionId) {
|
||||||
//'0 桩 1箱变 2监控 3道闸 4 远程连接'
|
//'0 桩 1箱变 2监控 3道闸 4 远程连接'
|
||||||
Map<String, Object> map =new HashMap<>();
|
Map<String, Object> map =new HashMap<>();
|
||||||
int type =0;
|
int type =0;
|
||||||
if(id.equals("XB")){
|
if(id.equals("XB")){
|
||||||
type=1;
|
type=1;
|
||||||
map =xhpcInspectionMapper.getInspectionById(stationId,null,type);
|
|
||||||
}else if(id.equals("DZ")){
|
}else if(id.equals("DZ")){
|
||||||
type=3;
|
type=3;
|
||||||
map =xhpcInspectionMapper.getInspectionById(stationId,null,type);
|
|
||||||
}else if(id.equals("JK")){
|
}else if(id.equals("JK")){
|
||||||
type=2;
|
type=2;
|
||||||
map =xhpcInspectionMapper.getInspectionById(stationId,null,type);
|
|
||||||
}else if(id.equals("YC")){
|
}else if(id.equals("YC")){
|
||||||
type=2;
|
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);
|
return AjaxResult.success(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -201,14 +201,7 @@
|
|||||||
t.maintenance_record as maintenanceRecord,
|
t.maintenance_record as maintenanceRecord,
|
||||||
t.error_name as errorName
|
t.error_name as errorName
|
||||||
from xhpc_inspection t
|
from xhpc_inspection t
|
||||||
where t.charging_station_id=#{stationId} and t.del_flag=0
|
where t.charging_station_id=#{stationId} and t.del_flag=0 and t.inspection_id =#{id} and t.type =#{type}
|
||||||
<if test="type==0">
|
|
||||||
and t.inspection_id =#{id}
|
|
||||||
</if>
|
|
||||||
<if test="type!=0">
|
|
||||||
and t.type =#{type}
|
|
||||||
</if>
|
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="updateInspection">
|
<update id="updateInspection">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user