| | |
| | | public BasicResult selectAppInfo(String regionInspectionId, String userId) { |
| | | SysUserInfo sysUserInfo = UserInfoUtils.getInstance().getUserInfo(); |
| | | userId = sysUserInfo.getUserId(); |
| | | RegionInspectionEntity obj = regionInspectionRecordMapper.selectInfo(regionInspectionId, userId); |
| | | String platUserId = regionInspectionRecordMapper.selectPlatUserId(userId); |
| | | RegionInspectionEntity obj = regionInspectionRecordMapper.selectInfo(regionInspectionId, platUserId); |
| | | List<RegionInspectionHazardInformEntity> regionList = new ArrayList<>(); |
| | | if (obj.getRegionIds()!=null){ |
| | | if (obj!=null && obj.getRegionIds()!=null){ |
| | | String[] regionIds = obj.getRegionIds().intern().split(","); |
| | | String[] regions = obj.getRegions().intern().split(","); |
| | | //区域对象数组 |
| | | for (int i = 0; i < regionIds.length; i++) { |
| | | RegionInspectionRecordEntity recordEntity = regionInspectionRecordMapper.regionInfo( |
| | | regionInspectionId, |
| | | userId, |
| | | platUserId, |
| | | regionIds[i]); |
| | | List<RegionInspectionRecordImgEntity> imgEntityList=null; |
| | | if (recordEntity!=null){ |
| | | imgEntityList = regionInspectionRecordMapper.selectImgByRecordId(recordEntity.getId()); |
| | | recordEntity.setImgList(imgEntityList); |
| | | } |
| | | RegionInspectionHazardInformEntity regionEntity = RegionInspectionHazardInformEntity |
| | | .builder() |
| | | .regionInspectionId(obj.getId()) |
| | | .regionHazardInformId(regionIds[i]) |
| | | .region(regions[i]) |
| | | .recordEntity(recordEntity).build(); |
| | | .recordEntity(recordEntity) |
| | | .imgList(imgEntityList) |
| | | .result(recordEntity.getResult()) |
| | | .build(); |
| | | regionList.add(regionEntity); |
| | | } |
| | | } |