运维接口

This commit is contained in:
2265829957@qq.com 2026-02-23 20:34:45 +08:00
parent 30e01dc8a9
commit 7a169b0506
4 changed files with 6 additions and 17 deletions

View File

@ -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")

View File

@ -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);

View File

@ -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<String, Object> 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);
}

View File

@ -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
<if test="type==0">
and t.inspection_id =#{id}
</if>
<if test="type!=0">
and t.type =#{type}
</if>
where t.charging_station_id=#{stationId} and t.del_flag=0 and t.inspection_id =#{id} and t.type =#{type}
</select>
<update id="updateInspection">