| | |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public IPage<TaskPlaceRectificationVO> selectTaskPlaceRectificationList(IPage<TaskPlaceRectificationVO> page, TaskPlaceRectificationDTO taskPlaceRectificationDTO) { |
| | | // 数据过滤 |
| | | List<String> regionChildCodesList = SysCache.getRegionChildCodesByDeptId(AuthUtil.getDeptId()); |
| | | // 数据过滤 todo |
| | | List<String> regionChildCodesList = new ArrayList<>();//SysCache.getRegionChildCodesByDeptId(AuthUtil.getDeptId()); |
| | | Integer isAdministrator = AuthUtil.isAdmin() == true ? 1 : 2; |
| | | List<TaskPlaceRectificationVO> taskPlaceRectificationVOS = baseMapper.selectTaskPlaceRectificationList(page, taskPlaceRectificationDTO, regionChildCodesList, isAdministrator); |
| | | for (TaskPlaceRectificationVO taskPlaceRectificationVO : taskPlaceRectificationVOS) { |
| | | StringBuilder builder = new StringBuilder(""); |
| | | List<PatrolRecordVO> patrolRecordVOList = taskPlaceRectificationVO.getPatrolRecordVOList(); |
| | | for (int i = 0; i < patrolRecordVOList.size(); i++) { |
| | | builder.append(i + 1).append(" : ").append(patrolRecordVOList.get(i).getItemsName()).append("; "); |
| | | if(patrolRecordVOList.get(i).getState().equals(0)){ |
| | | builder.append(i + 1).append(" : ").append(patrolRecordVOList.get(i).getItemsName()).append("; "); |
| | | } |
| | | } |
| | | taskPlaceRectificationVO.setHiddenDanger(builder.toString()); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public Object rectificationStatistics(TaskPlaceRectificationVO taskPlaceRectification) { |
| | | List<String> regionChildCodesList = SysCache.getRegionChildCodesByDeptId(AuthUtil.getDeptId()); |
| | | // todo |
| | | List<String> regionChildCodesList = new ArrayList<>();//SysCache.getRegionChildCodesByDeptId(AuthUtil.getDeptId()); |
| | | Integer isAdministrator = AuthUtil.isAdmin() == true ? 1 : 2; |
| | | // 统计九小场所类型隐患统计 |
| | | IRegionService bean = SpringUtils.getBean(IRegionService.class); |
| | |
| | | |
| | | @Override |
| | | public List<TaskPlaceRectificationExcel> export(TaskPlaceRectificationsVO taskPlaceRectificationVO) { |
| | | List<String> regionChildCodesList = SysCache.getRegionChildCodesByDeptId(AuthUtil.getDeptId()); |
| | | // todo |
| | | List<String> regionChildCodesList = new ArrayList<>();//SysCache.getRegionChildCodesByDeptId(AuthUtil.getDeptId()); |
| | | Integer isAdministrator = AuthUtil.isAdmin() == true ? 1 : 2; |
| | | List<TaskPlaceRectificationExcel> export = baseMapper.export(taskPlaceRectificationVO, regionChildCodesList, isAdministrator); |
| | | IDictBizService bean = SpringUtils.getBean(IDictBizService.class); |
| | |
| | | for (TaskPlaceRectificationExcel taskPlaceRectificationExcel : export) { |
| | | for (DictBiz dictBiz : nineType) { |
| | | if (StringUtils.isNotBlank(taskPlaceRectificationExcel.getNineType()) && taskPlaceRectificationExcel.getNineType().equals(dictBiz.getDictKey())) { |
| | | taskPlaceRectificationExcel.setNineType(dictBiz.getDictValue()); |
| | | if (taskPlaceRectificationExcel.getNineType().contains("10,11,12")) { |
| | | taskPlaceRectificationExcel.setNineType("小学校(幼儿园、校外培训机构)- " + dictBiz.getDictValue()); |
| | | } else if (taskPlaceRectificationExcel.getNineType().contains("13,14,15")) { |
| | | taskPlaceRectificationExcel.setNineType("小医院(诊所、养老院)- " + dictBiz.getDictValue()); |
| | | } else { |
| | | taskPlaceRectificationExcel.setNineType(dictBiz.getDictValue()); |
| | | } |
| | | } |
| | | } |
| | | if (taskPlaceRectificationExcel.getRectificationFlag().equals(1)) { |
| | |
| | | StringBuilder builder = new StringBuilder(""); |
| | | List<PatrolRecordVO> patrolRecordVOList = taskPlaceRectificationExcel.getPatrolRecordVOList(); |
| | | for (int i = 0; i < patrolRecordVOList.size(); i++) { |
| | | builder.append(i + 1).append(" : ").append(patrolRecordVOList.get(i).getItemsName()).append("; "); |
| | | if(patrolRecordVOList.get(i).getState().equals(0)){ |
| | | builder.append(i + 1).append(" : ").append(patrolRecordVOList.get(i).getItemsName()).append("; "); |
| | | } |
| | | } |
| | | taskPlaceRectificationExcel.setHiddenDanger(builder.toString()); |
| | | } |