|
@ -1,14 +1,18 @@ |
|
|
package com.epmet.datareport.service.user.impl; |
|
|
package com.epmet.datareport.service.user.impl; |
|
|
|
|
|
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
|
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
|
|
|
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
|
|
|
import com.epmet.commons.tools.utils.EpmetRequestHolder; |
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
import com.epmet.datareport.constant.PatrolConstant; |
|
|
import com.epmet.datareport.constant.PatrolConstant; |
|
|
import com.epmet.datareport.dao.user.StaffPatrolDetailDao; |
|
|
import com.epmet.datareport.dao.user.StaffPatrolDetailDao; |
|
|
import com.epmet.datareport.dao.user.StaffPatrolRecordDao; |
|
|
import com.epmet.datareport.dao.user.StaffPatrolRecordDao; |
|
|
import com.epmet.datareport.service.evaluationindex.screen.ScreenOrgService; |
|
|
import com.epmet.datareport.service.evaluationindex.screen.ScreenOrgService; |
|
|
import com.epmet.datareport.service.user.StaffPatrolDetailService; |
|
|
import com.epmet.datareport.service.user.StaffPatrolDetailService; |
|
|
|
|
|
import com.epmet.dto.IcEventDTO; |
|
|
import com.epmet.dto.form.PatrolCountFormDTO; |
|
|
import com.epmet.dto.form.PatrolCountFormDTO; |
|
|
import com.epmet.dto.form.PatrolTrackFormDTO; |
|
|
import com.epmet.dto.form.PatrolTrackFormDTO; |
|
|
import com.epmet.dto.form.RecordListFormDTO; |
|
|
import com.epmet.dto.form.RecordListFormDTO; |
|
@ -76,7 +80,7 @@ public class StaffPatrolDetailServiceImpl implements StaffPatrolDetailService { |
|
|
if (CollectionUtils.isEmpty(grids)) { |
|
|
if (CollectionUtils.isEmpty(grids)) { |
|
|
return new ArrayList<>(); |
|
|
return new ArrayList<>(); |
|
|
} |
|
|
} |
|
|
List<String> gridIds = grids.stream().map(m -> m.getGridId()).collect(Collectors.toList()); |
|
|
List<String> gridIds = grids.stream().map(GridManagerListResultDTO::getGridId).collect(Collectors.toList()); |
|
|
// 查询网格下的网格员
|
|
|
// 查询网格下的网格员
|
|
|
Result<List<GridStaffResultDTO>> resultData = govOrgOpenFeignClient.selectGridStaffByGridIds(gridIds); |
|
|
Result<List<GridStaffResultDTO>> resultData = govOrgOpenFeignClient.selectGridStaffByGridIds(gridIds); |
|
|
if (!resultData.success()) { |
|
|
if (!resultData.success()) { |
|
@ -87,8 +91,17 @@ public class StaffPatrolDetailServiceImpl implements StaffPatrolDetailService { |
|
|
return new ArrayList<>(); |
|
|
return new ArrayList<>(); |
|
|
} |
|
|
} |
|
|
List<GridManagerListResultDTO> result = ConvertUtils.sourceToTarget(data, GridManagerListResultDTO.class); |
|
|
List<GridManagerListResultDTO> result = ConvertUtils.sourceToTarget(data, GridManagerListResultDTO.class); |
|
|
|
|
|
result.forEach(staff -> {//获取头像
|
|
|
|
|
|
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(EpmetRequestHolder.getLoginUserCustomerId(), staff.getStaffId()); |
|
|
|
|
|
if (null != staffInfo) { |
|
|
|
|
|
staff.setHeadPhoto(staffInfo.getHeadPhoto()); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
//统计事件
|
|
|
|
|
|
List<IcEventDTO> events = null; |
|
|
|
|
|
|
|
|
// 查询经纬度
|
|
|
// 查询经纬度
|
|
|
Result<UserNameAndLLResultDTO> selectll = epmetUserOpenFeignClient.selectll(result.stream().map(m -> m.getStaffId()).collect(Collectors.toList())); |
|
|
Result<UserNameAndLLResultDTO> selectll = epmetUserOpenFeignClient.selectll(result.stream().map(GridManagerListResultDTO::getStaffId).collect(Collectors.toList())); |
|
|
if (!selectll.success()) { |
|
|
if (!selectll.success()) { |
|
|
throw new RenException("查询经纬度和姓名失败【" + selectll.getMsg() + "】"); |
|
|
throw new RenException("查询经纬度和姓名失败【" + selectll.getMsg() + "】"); |
|
|
} |
|
|
} |
|
|