我的场站巡检日志

This commit is contained in:
2265829957@qq.com 2026-02-25 17:46:27 +08:00
parent d0199fca6f
commit 69bb678a58
5 changed files with 38 additions and 3 deletions

View File

@ -2,6 +2,7 @@ package com.xhpc.order.controller;
import com.xhpc.common.core.web.controller.BaseController; import com.xhpc.common.core.web.controller.BaseController;
import com.xhpc.common.core.web.domain.AjaxResult; import com.xhpc.common.core.web.domain.AjaxResult;
import com.xhpc.common.core.web.page.TableDataInfo;
import com.xhpc.order.domain.XhpcInspection; import com.xhpc.order.domain.XhpcInspection;
import com.xhpc.order.service.IXhpcInspectionService; import com.xhpc.order.service.IXhpcInspectionService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -99,6 +100,10 @@ public class XhpcInspectionController extends BaseController {
} }
@GetMapping("/getInspectionUserList")
public TableDataInfo getInspectionUserList(HttpServletRequest request) {
List<Map<String, Object>> list = xhpcInspectionService.getInspectionUserList(request);
return getDataTable(list);
}
} }

View File

@ -24,5 +24,5 @@ public interface XhpcInspectionMapper {
List<Map<String, Object>> getWXXhpcTerminalMassage(@Param("chargingStationId") Long chargingStationId); List<Map<String, Object>> getWXXhpcTerminalMassage(@Param("chargingStationId") Long chargingStationId);
List<Map<String, Object>> getInspectionUserList(@Param("userId") Long userId);
} }

View File

@ -19,5 +19,5 @@ public interface IXhpcInspectionService {
List<Map<String, Object>> getStationList(HttpServletRequest request); List<Map<String, Object>> getStationList(HttpServletRequest request);
List<Map<String, Object>> getInspectionUserList(HttpServletRequest request);
} }

View File

@ -236,4 +236,12 @@ public class XhpcInspectionServiceImpl implements IXhpcInspectionService {
} }
return mapList; return mapList;
} }
@Override
public List<Map<String, Object>> getInspectionUserList(HttpServletRequest request) {
LoginUser loginUser = tokenService.getLoginUser(request);
Long logUserId = loginUser.getUserid();
List<Map<String, Object>> inspectionUserList = xhpcInspectionMapper.getInspectionUserList(logUserId);
return inspectionUserList;
}
} }

View File

@ -346,4 +346,26 @@
and te.del_flag = 0 and te.del_flag = 0
order by te.serial_number desc order by te.serial_number desc
</select> </select>
<select id="getInspectionUserList" resultType="java.util.Map">
select
t.charging_station_id as chargingStationId,
t.data_time as dataTime,
xct.name as chargingStationName,
su.nick_name as nickName,
(select count(inspection_id) from xhpc_inspection where charging_station_id=t.charging_station_id and data_time=t.data_time) as totalItem,
(select count(inspection_id) from xhpc_inspection where charging_station_id=t.charging_station_id and data_time=t.data_time and status!=0) as detectedItems,
(select count(inspection_id) from xhpc_inspection where charging_station_id=t.charging_station_id and data_time=t.data_time and status=2) as statusItems
from xhpc_inspection t
left join xhpc_charging_station xct on xct.charging_station_id = t.charging_station_id
left join sys_user su on su.user_id =t.user_id
where t.user_id=#{userId}
group by t.charging_station_id,t.data_time
</select>
</mapper> </mapper>