| | |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | import org.springblade.modules.system.entity.Region; |
| | | import org.springblade.modules.system.service.IRegionService; |
| | | import org.springblade.modules.yw.entity.EmergencySpaceEntity; |
| | | import org.springblade.modules.yw.entity.IndParkInfoEntity; |
| | | import org.springblade.modules.yw.entity.RescueTeamEntity; |
| | | import org.springblade.modules.yw.excel.IndParkInfoExcel; |
| | | import org.springblade.modules.yw.service.IFirmInfoService; |
| | | import org.springblade.modules.yw.service.*; |
| | | import org.springblade.modules.yw.vo.IndParkInfoVO; |
| | | import org.springblade.modules.yw.mapper.IndParkInfoMapper; |
| | | import org.springblade.modules.yw.service.IIndParkInfoService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | |
| | | |
| | | @Autowired |
| | | private IFirmInfoService firmInfoService; |
| | | |
| | | @Autowired |
| | | private IRescueTeamService rescueTeamService; |
| | | |
| | | @Autowired |
| | | private IRiskSourceService riskSourceService; |
| | | |
| | | @Autowired |
| | | private IProTarService proTarService; |
| | | |
| | | @Autowired |
| | | private IEmergencySpaceService emergencySpaceService; |
| | | |
| | | /** |
| | | * 自定义分页查询 |
| | |
| | | indParkInfoVO.setFirmNum((int) count); |
| | | // 设置行政区划 |
| | | setRegionInfo(indParkInfoVO); |
| | | // 设置救援人员数量 |
| | | indParkInfoVO.setRecNum(getRecNum()); |
| | | // 设置应急池容量 |
| | | indParkInfoVO.setEmePool(getEmePool()); |
| | | // 设置风险企业数量 |
| | | indParkInfoVO.setRiskFirmNum(getRiskFirmNum()); |
| | | // 设置保护目标数量 |
| | | indParkInfoVO.setProTarNum(getProTarNum()); |
| | | // 设置应急空间数量 |
| | | indParkInfoVO.setSpaceNum(getSpaceNum()); |
| | | // 返回 |
| | | return indParkInfoVO; |
| | | } |
| | | |
| | | /** |
| | | * 获取应急池容量 |
| | | * @return |
| | | */ |
| | | private String getEmePool() { |
| | | return emergencySpaceService.getEmePool(); |
| | | } |
| | | |
| | | /** |
| | | * 查询应急空间数量 |
| | | * @return |
| | | */ |
| | | private Integer getSpaceNum() { |
| | | QueryWrapper<EmergencySpaceEntity> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("is_deleted",0); |
| | | return (int)emergencySpaceService.count(wrapper); |
| | | } |
| | | |
| | | /** |
| | | * 查询保护目标数量 |
| | | * @return |
| | | */ |
| | | private Integer getProTarNum() { |
| | | return (int)proTarService.count(); |
| | | } |
| | | |
| | | /** |
| | | * 查询风险企业数量 |
| | | * @return |
| | | */ |
| | | private Integer getRiskFirmNum() { |
| | | return (int)riskSourceService.count(); |
| | | } |
| | | |
| | | /** |
| | | * 获取救援人员数量 |
| | | * @return |
| | | */ |
| | | private Integer getRecNum() { |
| | | QueryWrapper<RescueTeamEntity> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("type",1); |
| | | long count = rescueTeamService.count(wrapper); |
| | | return (int)count; |
| | | } |
| | | |
| | | /** |
| | | * 设置行政区划 |
| | | * @param indParkInfoVO |
| | | */ |