|
|
@ -44,7 +44,6 @@ import com.github.pagehelper.PageHelper; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.commons.collections4.CollectionUtils; |
|
|
|
import org.apache.commons.collections4.MapUtils; |
|
|
|
import org.apache.commons.fileupload.FileItem; |
|
|
|
import org.apache.commons.fileupload.FileItemFactory; |
|
|
|
import org.apache.commons.fileupload.disk.DiskFileItemFactory; |
|
|
@ -62,7 +61,6 @@ import java.awt.image.BufferedImage; |
|
|
|
import java.io.IOException; |
|
|
|
import java.io.InputStream; |
|
|
|
import java.io.OutputStream; |
|
|
|
import java.io.UnsupportedEncodingException; |
|
|
|
import java.net.URLEncoder; |
|
|
|
import java.nio.file.Files; |
|
|
|
import java.nio.file.Path; |
|
|
@ -258,15 +256,23 @@ public class IcEnterpriseServiceImpl extends BaseServiceImpl<IcEnterpriseDao, Ic |
|
|
|
} else { |
|
|
|
resultDto.setPlaceTypeName(coverageCategoryDictDao.selectCategoryName(Constant.DEFAULT_CUSTOMER, CoveragePlaceTypeEnum.ENTERPRISE_PATROL.getCode(), resultDto.getPlaceType())); |
|
|
|
} |
|
|
|
// 原规模,已废弃
|
|
|
|
// Result<Map<String, String>> dictMapRes = adminOpenFeignClient.dictMap(DictTypeEnum.SCALE.getCode());
|
|
|
|
// Map<String, String> dictMap = dictMapRes.success() && MapUtils.isNotEmpty(dictMapRes.getData()) ? dictMapRes.getData() : new HashMap<>();
|
|
|
|
// resultDto.setScaleName(dictMap.containsKey(resultDto.getScale()) ? dictMap.get(resultDto.getScale()) : StrConstant.EPMETY_STR);
|
|
|
|
//规模名称
|
|
|
|
Result<Map<String, String>> dictMapRes = adminOpenFeignClient.dictMap(DictTypeEnum.SCALE.getCode()); |
|
|
|
Map<String, String> dictMap = dictMapRes.success() && MapUtils.isNotEmpty(dictMapRes.getData()) ? dictMapRes.getData() : new HashMap<>(); |
|
|
|
resultDto.setScaleName(dictMap.containsKey(resultDto.getScale()) ? dictMap.get(resultDto.getScale()) : StrConstant.EPMETY_STR); |
|
|
|
resultDto.setScaleName(resultDto.getScaleTotal()+"人"); |
|
|
|
if (StringUtils.isNotBlank(enterpriseEntity.getLatestResult()) && "0".equals(enterpriseEntity.getLatestResult())) { |
|
|
|
resultDto.setLatestResultName("合格"); |
|
|
|
} else if (StringUtils.isNotBlank(enterpriseEntity.getLatestResult()) && "1".equals(enterpriseEntity.getLatestResult())) { |
|
|
|
resultDto.setLatestResultName("不合格"); |
|
|
|
} |
|
|
|
if ("0".equals(resultDto.getPlaceCategory())) { |
|
|
|
// 0九小场所、1企事业单位
|
|
|
|
resultDto.setPlaceCategoryName("九小场所"); |
|
|
|
} else if ("1".equals(resultDto.getPlaceCategory())) { |
|
|
|
resultDto.setPlaceCategoryName("企事业单位"); |
|
|
|
} |
|
|
|
return resultDto; |
|
|
|
} |
|
|
|
|
|
|
@ -319,9 +325,9 @@ public class IcEnterpriseServiceImpl extends BaseServiceImpl<IcEnterpriseDao, Ic |
|
|
|
} |
|
|
|
PageInfo<EnterpriseDetailDTO> pageInfo = new PageInfo<>(list); |
|
|
|
if (!org.springframework.util.CollectionUtils.isEmpty(list)) { |
|
|
|
//规模名称
|
|
|
|
Result<Map<String, String>> dictMapRes = adminOpenFeignClient.dictMap(DictTypeEnum.SCALE.getCode()); |
|
|
|
Map<String, String> dictMap = dictMapRes.success() && MapUtils.isNotEmpty(dictMapRes.getData()) ? dictMapRes.getData() : new HashMap<>(); |
|
|
|
//规模名称 已废弃用字典表,改为手动输入数字了
|
|
|
|
// Result<Map<String, String>> dictMapRes = adminOpenFeignClient.dictMap(DictTypeEnum.SCALE.getCode());
|
|
|
|
// Map<String, String> dictMap = dictMapRes.success() && MapUtils.isNotEmpty(dictMapRes.getData()) ? dictMapRes.getData() : new HashMap<>();
|
|
|
|
for (EnterpriseDetailDTO detailDTO : list) { |
|
|
|
GridInfoCache gridInfoCache = CustomerOrgRedis.getGridInfo(detailDTO.getGridId()); |
|
|
|
if (null != gridInfoCache) { |
|
|
@ -334,7 +340,14 @@ public class IcEnterpriseServiceImpl extends BaseServiceImpl<IcEnterpriseDao, Ic |
|
|
|
} else { |
|
|
|
detailDTO.setPlaceTypeName(coverageCategoryDictDao.selectCategoryName(Constant.DEFAULT_CUSTOMER, CoveragePlaceTypeEnum.ENTERPRISE_PATROL.getCode(), detailDTO.getPlaceType())); |
|
|
|
} |
|
|
|
detailDTO.setScaleName(dictMap.containsKey(detailDTO.getScale()) ? dictMap.get(detailDTO.getScale()) : StrConstant.EPMETY_STR); |
|
|
|
// detailDTO.setScaleName(dictMap.containsKey(detailDTO.getScale()) ? dictMap.get(detailDTO.getScale()) : StrConstant.EPMETY_STR);
|
|
|
|
detailDTO.setScaleName(detailDTO.getScaleTotal() + "人"); |
|
|
|
if ("0".equals(detailDTO.getPlaceCategory())) { |
|
|
|
// 0九小场所、1企事业单位
|
|
|
|
detailDTO.setPlaceCategoryName("九小场所"); |
|
|
|
} else if ("1".equals(detailDTO.getPlaceCategory())) { |
|
|
|
detailDTO.setPlaceCategoryName("企事业单位"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return new PageData<>(list, pageInfo.getTotal()); |
|
|
|