|
|
@ -112,7 +112,7 @@ public class IcPlacePatrolRecordServiceImpl extends BaseServiceImpl<IcPlacePatro |
|
|
|
@Override |
|
|
|
public PlacePatrolRecordDetailResultDTO detail(String placePatrolRecordId) { |
|
|
|
PlacePatrolRecordDetailResultDTO resultDTO = new PlacePatrolRecordDetailResultDTO(); |
|
|
|
//1.查询场所基础信息
|
|
|
|
//1.查询巡查记录信息
|
|
|
|
GetListPlacePatrolRecordFormDTO dto = new GetListPlacePatrolRecordFormDTO(); |
|
|
|
dto.setPlacePatrolRecordId(placePatrolRecordId); |
|
|
|
List<PlacePatrolRecordDetailResultDTO> result = baseDao.getList(dto); |
|
|
@ -127,12 +127,27 @@ public class IcPlacePatrolRecordServiceImpl extends BaseServiceImpl<IcPlacePatro |
|
|
|
throw new RenException("获取九小场所基本信息失败......"); |
|
|
|
} |
|
|
|
|
|
|
|
//3.封装九小场所数据
|
|
|
|
//3.查询所有分队下人员名单
|
|
|
|
List<String> teamIds = new ArrayList<>(); |
|
|
|
teamIds.add(resultDTO.getPlacePatrolTeamId()); |
|
|
|
List<IcPlacePatrolTeamStaffDTO> teamDTOList = icPlacePatrolTeamStaffDao.selectByTeamIds(teamIds); |
|
|
|
|
|
|
|
//4.封装九小场所、分队成员数据
|
|
|
|
for (OptionResultDTO n : nineList.getData()){ |
|
|
|
if(resultDTO.getNinePlaceVal().equals(n.getValue())){ |
|
|
|
resultDTO.setNinePlaceName(n.getLabel()); |
|
|
|
} |
|
|
|
} |
|
|
|
//分队成员
|
|
|
|
StringBuffer inspectorsNames = new StringBuffer(""); |
|
|
|
for (String str : resultDTO.getInspectors().split(",")) { |
|
|
|
teamDTOList.forEach(r -> { |
|
|
|
if (str.equals(r.getId())) { |
|
|
|
inspectorsNames.append("".equals(inspectorsNames.toString().trim()) ? r.getName() : "," + r.getName()); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
resultDTO.setInspectorsNames(inspectorsNames.toString()); |
|
|
|
|
|
|
|
return resultDTO; |
|
|
|
} |
|
|
@ -175,7 +190,7 @@ public class IcPlacePatrolRecordServiceImpl extends BaseServiceImpl<IcPlacePatro |
|
|
|
for (String str : dto.getInspectors().split(",")) { |
|
|
|
teamDTOList.forEach(r -> { |
|
|
|
if (str.equals(r.getId())) { |
|
|
|
inspectorsNames.append("".equals(inspectorsNames) ? r.getName() : "," + r.getName()); |
|
|
|
inspectorsNames.append("".equals(inspectorsNames.toString().trim()) ? r.getName() : "," + r.getName()); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|