|  | @ -5,27 +5,37 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |  |  | import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.constant.FieldConstant; |  |  | import com.epmet.commons.tools.constant.FieldConstant; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |  |  | import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; | 
			
		
	
		
		
			
				
					|  |  |  |  |  | import com.epmet.commons.tools.enums.DictTypeEnum; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.exception.EpmetErrorCode; |  |  | import com.epmet.commons.tools.exception.EpmetErrorCode; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.exception.EpmetException; |  |  | import com.epmet.commons.tools.exception.EpmetException; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.page.PageData; |  |  | import com.epmet.commons.tools.page.PageData; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |  |  | 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.Result; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.dao.IcDangerousChemicalsDao; |  |  | import com.epmet.dao.IcDangerousChemicalsDao; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.dto.IcDangerousChemicalsDTO; |  |  | import com.epmet.dto.IcDangerousChemicalsDTO; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.dto.form.IcDangerousChemicalsAddEditFormDTO; |  |  | import com.epmet.dto.form.IcDangerousChemicalsAddEditFormDTO; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.dto.form.IcDangerousChemicalsListFormDTO; |  |  | import com.epmet.dto.form.IcDangerousChemicalsListFormDTO; | 
			
		
	
		
		
			
				
					|  |  |  |  |  | import com.epmet.dto.result.IcCityManagementListResultDTO; | 
			
		
	
		
		
			
				
					|  |  |  |  |  | import com.epmet.dto.result.IcCoverageCategoryDictListResultDTO; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.dto.result.IcDangerousChemicalsListResultDTO; |  |  | import com.epmet.dto.result.IcDangerousChemicalsListResultDTO; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.entity.IcDangerousChemicalsEntity; |  |  | import com.epmet.entity.IcDangerousChemicalsEntity; | 
			
		
	
		
		
			
				
					|  |  |  |  |  | import com.epmet.feign.EpmetAdminOpenFeignClient; | 
			
		
	
		
		
			
				
					|  |  |  |  |  | import com.epmet.service.CoverageService; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.service.IcDangerousChemicalsService; |  |  | import com.epmet.service.IcDangerousChemicalsService; | 
			
		
	
		
		
			
				
					|  |  | import com.github.pagehelper.PageHelper; |  |  | import com.github.pagehelper.PageHelper; | 
			
		
	
		
		
			
				
					|  |  | import com.github.pagehelper.PageInfo; |  |  | import com.github.pagehelper.PageInfo; | 
			
		
	
		
		
			
				
					|  |  |  |  |  | import org.apache.commons.collections4.MapUtils; | 
			
		
	
		
		
			
				
					|  |  | import org.apache.commons.lang3.StringUtils; |  |  | import org.apache.commons.lang3.StringUtils; | 
			
		
	
		
		
			
				
					|  |  |  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
			
		
	
		
		
			
				
					|  |  | import org.springframework.stereotype.Service; |  |  | import org.springframework.stereotype.Service; | 
			
		
	
		
		
			
				
					|  |  | import org.springframework.transaction.annotation.Transactional; |  |  | import org.springframework.transaction.annotation.Transactional; | 
			
		
	
		
		
			
				
					|  |  | import org.springframework.util.CollectionUtils; |  |  | import org.springframework.util.CollectionUtils; | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |  |  |  | import java.util.HashMap; | 
			
		
	
		
		
			
				
					|  |  | import java.util.List; |  |  | import java.util.List; | 
			
		
	
		
		
			
				
					|  |  | import java.util.Map; |  |  | import java.util.Map; | 
			
		
	
		
		
			
				
					|  |  |  |  |  | import java.util.stream.Collectors; | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | /** |  |  | /** | 
			
		
	
		
		
			
				
					|  |  |  * 重点危化品企业 |  |  |  * 重点危化品企业 | 
			
		
	
	
		
		
			
				
					|  | @ -36,6 +46,10 @@ import java.util.Map; | 
			
		
	
		
		
			
				
					|  |  | @Service |  |  | @Service | 
			
		
	
		
		
			
				
					|  |  | public class IcDangerousChemicalsServiceImpl extends BaseServiceImpl<IcDangerousChemicalsDao, IcDangerousChemicalsEntity> implements IcDangerousChemicalsService { |  |  | public class IcDangerousChemicalsServiceImpl extends BaseServiceImpl<IcDangerousChemicalsDao, IcDangerousChemicalsEntity> implements IcDangerousChemicalsService { | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     @Autowired | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     private EpmetAdminOpenFeignClient adminOpenFeignClient; | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     @Autowired | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     private CoverageService coverageService; | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |     @Override |  |  |     @Override | 
			
		
	
		
		
			
				
					|  |  |     public PageData<IcDangerousChemicalsListResultDTO> list(IcDangerousChemicalsListFormDTO formDTO) { |  |  |     public PageData<IcDangerousChemicalsListResultDTO> list(IcDangerousChemicalsListFormDTO formDTO) { | 
			
		
	
	
		
		
			
				
					|  | @ -52,20 +66,27 @@ public class IcDangerousChemicalsServiceImpl extends BaseServiceImpl<IcDangerous | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |         //封装类别数据
 |  |  |         //封装类别数据
 | 
			
		
	
		
		
			
				
					|  |  |         if (!CollectionUtils.isEmpty(list)) { |  |  |         if (!CollectionUtils.isEmpty(list)) { | 
			
		
	
		
		
			
				
					
					|  |  |             /*Result<Map<String, String>> statusRes = adminOpenFeignClient.dictMap(DictTypeEnum.RELATIONSHIP.getCode()); |  |  |             //危化品种类字典
 | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |  |  |  |             Result<Map<String, String>> statusRes = adminOpenFeignClient.dictMap(DictTypeEnum.IC_DANGER_TYPE.getCode()); | 
			
		
	
		
		
			
				
					|  |  |             Map<String, String> statusMap = statusRes.success() && MapUtils.isNotEmpty(statusRes.getData()) ? statusRes.getData() : new HashMap<>(); |  |  |             Map<String, String> statusMap = statusRes.success() && MapUtils.isNotEmpty(statusRes.getData()) ? statusRes.getData() : new HashMap<>(); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             //企业类别字典数据
 | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             List<IcCoverageCategoryDictListResultDTO> dictList = coverageService.dictMap(formDTO.getCustomerId(), "city_management"); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             Map<String, String> dictMap = dictList.stream().collect(Collectors.toMap(IcCoverageCategoryDictListResultDTO::getCategoryKey, IcCoverageCategoryDictListResultDTO::getCategoryName)); | 
			
		
	
		
		
			
				
					|  |  |             for (IcDangerousChemicalsListResultDTO v : list) { |  |  |             for (IcDangerousChemicalsListResultDTO v : list) { | 
			
		
	
		
		
			
				
					|  |  |                 if (StringUtils.isNotBlank(v.getCategory())) { |  |  |                 if (StringUtils.isNotBlank(v.getCategory())) { | 
			
		
	
		
		
			
				
					
					|  |  |                     v.setCategoryName(statusMap.get(v.getCategory())); |  |  |                     v.setCategoryName(dictMap.get(v.getCategory())); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |                 } |  |  |                 } | 
			
		
	
		
		
			
				
					
					|  |  |             }*/ |  |  |                 if (StringUtils.isNotBlank(v.getDangerType())) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |  |  |  |                     v.setDangerTypeName(statusMap.get(v.getDangerType())); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                 } | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             } | 
			
		
	
		
		
			
				
					|  |  |         } |  |  |         } | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |         return new PageData<>(list, pageInfo.getTotal()); |  |  |         return new PageData<>(list, pageInfo.getTotal()); | 
			
		
	
		
		
			
				
					|  |  |     } |  |  |     } | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |     private QueryWrapper<IcDangerousChemicalsEntity> getWrapper(Map<String, Object> params){ |  |  |     private QueryWrapper<IcDangerousChemicalsEntity> getWrapper(Map<String, Object> params) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |         String id = (String)params.get(FieldConstant.ID_HUMP); |  |  |         String id = (String) params.get(FieldConstant.ID_HUMP); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |         QueryWrapper<IcDangerousChemicalsEntity> wrapper = new QueryWrapper<>(); |  |  |         QueryWrapper<IcDangerousChemicalsEntity> wrapper = new QueryWrapper<>(); | 
			
		
	
		
		
			
				
					|  |  |         wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |  |  |         wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); | 
			
		
	
	
		
		
			
				
					|  | @ -142,13 +163,20 @@ public class IcDangerousChemicalsServiceImpl extends BaseServiceImpl<IcDangerous | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |         //封装类别数据
 |  |  |         //封装类别数据
 | 
			
		
	
		
		
			
				
					|  |  |         if (!CollectionUtils.isEmpty(list)) { |  |  |         if (!CollectionUtils.isEmpty(list)) { | 
			
		
	
		
		
			
				
					
					|  |  |             /*Result<Map<String, String>> statusRes = adminOpenFeignClient.dictMap(DictTypeEnum.RELATIONSHIP.getCode()); |  |  |             //危化品种类字典
 | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |  |  |  |             Result<Map<String, String>> statusRes = adminOpenFeignClient.dictMap(DictTypeEnum.IC_DANGER_TYPE.getCode()); | 
			
		
	
		
		
			
				
					|  |  |             Map<String, String> statusMap = statusRes.success() && MapUtils.isNotEmpty(statusRes.getData()) ? statusRes.getData() : new HashMap<>(); |  |  |             Map<String, String> statusMap = statusRes.success() && MapUtils.isNotEmpty(statusRes.getData()) ? statusRes.getData() : new HashMap<>(); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             //企业类别字典数据
 | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             List<IcCoverageCategoryDictListResultDTO> dictList = coverageService.dictMap(formDTO.getCustomerId(), "city_management"); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             Map<String, String> dictMap = dictList.stream().collect(Collectors.toMap(IcCoverageCategoryDictListResultDTO::getCategoryKey, IcCoverageCategoryDictListResultDTO::getCategoryName)); | 
			
		
	
		
		
			
				
					|  |  |             for (IcDangerousChemicalsListResultDTO v : list) { |  |  |             for (IcDangerousChemicalsListResultDTO v : list) { | 
			
		
	
		
		
			
				
					|  |  |                 if (StringUtils.isNotBlank(v.getCategory())) { |  |  |                 if (StringUtils.isNotBlank(v.getCategory())) { | 
			
		
	
		
		
			
				
					
					|  |  |                     v.setCategoryName(statusMap.get(v.getCategory())); |  |  |                     v.setCategoryName(dictMap.get(v.getCategory())); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |  |  |  |                 } | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                 if (StringUtils.isNotBlank(v.getDangerType())) { | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                     v.setDangerTypeName(statusMap.get(v.getDangerType())); | 
			
		
	
		
		
			
				
					|  |  |                 } |  |  |                 } | 
			
		
	
		
		
			
				
					
					|  |  |             }*/ |  |  |             } | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |         } |  |  |         } | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |         return resultDTO; |  |  |         return resultDTO; | 
			
		
	
	
		
		
			
				
					|  | 
 |