ard-work/src/main/java/com/ruoyi/app/patrolplan/controller/ArdAppPatrolplanController.java
@@ -215,7 +215,7 @@ } /** * 巡检日历 * 管理端--巡检日历 */ @PreAuthorize("@ss.hasPermi('app:appPatrolplan:recordMonth')") @ApiOperation("管理端--巡检日历") @@ -225,13 +225,22 @@ } /** * 巡检日历 * 管理端--点击日历获取该记录下人员打卡记录 */ @PreAuthorize("@ss.hasPermi('app:appPatrolplan:recordMonth')") @PreAuthorize("@ss.hasPermi('app:appPatrolplan:recordDetails')") @ApiOperation("管理端--点击日历获取该记录下人员打卡记录") @PostMapping("recordDetails") public Results recordDetails(@RequestBody ArdAppPatrolpointRecordParam ardAppPatrolpointRecordParam) throws ParseException { return recordService.recordDetails(ardAppPatrolpointRecordParam); } /** * 管理端--单人详情 */ @PreAuthorize("@ss.hasPermi('app:appPatrolplan:recordSolo')") @ApiOperation("管理端--单人详情") @PostMapping("recordSolo") public Results recordSolo(@RequestBody ArdAppPatrolpointRecordParam ardAppPatrolpointRecordParam) throws ParseException { return recordService.recordSolo(ardAppPatrolpointRecordParam); } } ard-work/src/main/java/com/ruoyi/app/patrolplan/domain/param/ArdAppPatrolpointRecordParam.java
@@ -10,4 +10,5 @@ private String planId; private String cycle; private String toDay; private String userId; } ard-work/src/main/java/com/ruoyi/app/patrolplan/mapper/ArdAppPatrolpointRecordMapper.java
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ruoyi.app.patrolplan.domain.ArdAppPatrolpointRecord; import com.ruoyi.app.patrolplan.domain.param.ArdAppPatrolpointRecordParam; /** * app巡检计划记录Mapper接口 @@ -11,8 +12,7 @@ * @author ard * @date 2023-08-02 */ public interface ArdAppPatrolpointRecordMapper extends BaseMapper<ArdAppPatrolpointRecord> { public interface ArdAppPatrolpointRecordMapper extends BaseMapper<ArdAppPatrolpointRecord> { /** * 查询app巡检计划记录 * @@ -61,5 +61,4 @@ */ public int deleteArdAppPatrolpointRecordByIds(String[] ids); // List<ArdAppPatrolpointRecord> maxNum(); } ard-work/src/main/java/com/ruoyi/app/patrolplan/service/IArdAppPatrolpointRecordService.java
@@ -69,4 +69,6 @@ Results recordMonth(ArdAppPatrolpointRecordParam ardAppPatrolpointRecordParam) throws ParseException; Results recordDetails(ArdAppPatrolpointRecordParam ardAppPatrolpointRecordParam) throws ParseException; Results recordSolo(ArdAppPatrolpointRecordParam ardAppPatrolpointRecordParam); } ard-work/src/main/java/com/ruoyi/app/patrolplan/service/impl/ArdAppPatrolpointRecordServiceImpl.java
@@ -359,4 +359,50 @@ } } @Override public Results recordSolo(ArdAppPatrolpointRecordParam ardAppPatrolpointRecordParam) { String toDay = ardAppPatrolpointRecordParam.getToDay(); String planId = ardAppPatrolpointRecordParam.getPlanId(); String userId = ardAppPatrolpointRecordParam.getUserId(); QueryWrapper<ArdAppPatrolpointRecord> queryWrapper = new QueryWrapper<>(); queryWrapper.eq("plan_id", planId).eq("user_id",userId).like("record_time", toDay); //当前计划选中时间里此用户的打卡记录 List<ArdAppPatrolpointRecord> list = ardAppPatrolpointRecordMapper.selectList(queryWrapper); for (ArdAppPatrolpointRecord appPatrolpointRecord : list) { QueryWrapper<ArdAppPatrolpointRecordImg> queryWrapper1 = new QueryWrapper<>(); queryWrapper1.eq("app_patrolponit_record_id", appPatrolpointRecord.getId()); List<ArdAppPatrolpointRecordImg> list1 = recordImgMapper.selectList(queryWrapper1); List<String> strings = new ArrayList<>(); for (ArdAppPatrolpointRecordImg ardAppPatrolpointRecordImg : list1) { strings.add(ardAppPatrolpointRecordImg.getImg()); } appPatrolpointRecord.setImg(strings); } //打过卡的地点 List<String> pointList = new ArrayList<>(); for (ArdAppPatrolpointRecord appPatrolpointRecord : list) { pointList.add(appPatrolpointRecord.getAppPatrolpointsId()); } //查询该计划的所有兴趣点 List<ArdAlarmpointsWell> wellList = wellMapper.wellByPlanId(planId); for (ArdAlarmpointsWell ardAlarmpointsWell : wellList) { //所有应该打卡的地点ID String well = ardAlarmpointsWell.getId(); //如果打开地点不包含应打卡地点,那说名这块儿没打卡 if (!pointList.contains(well)) { ArdAppPatrolpointRecord ardAppPatrolpointRecord = new ArdAppPatrolpointRecord(); ardAppPatrolpointRecord.setAppPatrolpointsId(well); ardAppPatrolpointRecord.setAppPatrolpointsName(ardAlarmpointsWell.getWellId()); ardAppPatrolpointRecord.setPlanId(planId); ardAppPatrolpointRecord.setPlanName(list.get(0).getPlanName()); ardAppPatrolpointRecord.setUserId(userId); ardAppPatrolpointRecord.setUserName(list.get(0).getUserName()); ardAppPatrolpointRecord.setLatitude(ardAlarmpointsWell.getLatitude().toString()); ardAppPatrolpointRecord.setLongitude(ardAlarmpointsWell.getLongitude().toString()); list.add(ardAppPatrolpointRecord); } } return Results.succeed(list); } } ard-work/src/main/resources/mapper/app/ArdAppPatrolpointRecordMapper.xml
@@ -83,4 +83,6 @@ <!-- <select id="maxNum">--> <!-- select user_id,user_name,max(points_num) pointsNum from ard_app_patrolpoint_record GROUP BY user_id,user_name--> <!-- </select>--> </mapper>