Browse Source

.....

master
sunyuchao 3 years ago
parent
commit
b9cd9a63c8
  1. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcCityManagementExcel.java
  2. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPublicServiceExcel.java
  3. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcSuperiorResourceExcel.java
  4. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/handler/IcCityManagementExcelImportListener.java
  5. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/handler/IcPublicServiceExcelImportListener.java
  6. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/handler/IcSuperiorResourceExcelImportListener.java
  7. 9
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcCityManagementServiceImpl.java
  8. 15
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcDangerousChemicalsServiceImpl.java
  9. 9
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPublicServiceServiceImpl.java
  10. 9
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcSuperiorResourceServiceImpl.java

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcCityManagementExcel.java

@ -31,7 +31,7 @@ public class IcCityManagementExcel {
@ExcelProperty(value = "容纳人数")
@ColumnWidth(20)
private Integer capacityName;
private String capacityName;
@ExcelProperty(value = "地址")
@ColumnWidth(25)

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPublicServiceExcel.java

@ -31,7 +31,7 @@ public class IcPublicServiceExcel {
@ExcelProperty(value = "容纳人数")
@ColumnWidth(20)
private Integer capacityName;
private String capacityName;
@ExcelProperty(value = "地址")
@ColumnWidth(25)

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcSuperiorResourceExcel.java

@ -31,7 +31,7 @@ public class IcSuperiorResourceExcel {
@ExcelProperty(value = "容纳人数")
@ColumnWidth(20)
private Integer capacityName;
private String capacityName;
@ExcelProperty(value = "地址")
@ColumnWidth(25)

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/handler/IcCityManagementExcelImportListener.java

@ -74,7 +74,7 @@ public class IcCityManagementExcelImportListener implements ReadListener<IcCityM
IcCityManagementEntity.setSourceType("import");
IcCityManagementEntity.setCategory(data.getCategoryName());
IcCityManagementEntity.setAreaCovered(data.getAreaCoveredName());
IcCityManagementEntity.setCapacity(data.getCapacityName());
IcCityManagementEntity.setCapacity(Integer.parseInt(data.getCapacityName()));
datas.add(IcCityManagementEntity);
if (datas.size() == MAX_THRESHOLD) {

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/handler/IcPublicServiceExcelImportListener.java

@ -74,7 +74,7 @@ public class IcPublicServiceExcelImportListener implements ReadListener<IcPublic
IcPublicServiceEntity.setSourceType("import");
IcPublicServiceEntity.setCategory(data.getCategoryName());
IcPublicServiceEntity.setAreaCovered(data.getAreaCoveredName());
IcPublicServiceEntity.setCapacity(data.getCapacityName());
IcPublicServiceEntity.setCapacity(Integer.parseInt(data.getCapacityName()));
datas.add(IcPublicServiceEntity);
if (datas.size() == MAX_THRESHOLD) {

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/handler/IcSuperiorResourceExcelImportListener.java

@ -76,7 +76,7 @@ public class IcSuperiorResourceExcelImportListener implements ReadListener<IcSup
icSuperiorResourceEntity.setSourceType("import");
icSuperiorResourceEntity.setCategory(data.getCategoryName());
icSuperiorResourceEntity.setAreaCovered(data.getAreaCoveredName());
icSuperiorResourceEntity.setCapacity(data.getCapacityName());
icSuperiorResourceEntity.setCapacity(Integer.parseInt(data.getCapacityName()));
datas.add(icSuperiorResourceEntity);
if (datas.size() == MAX_THRESHOLD) {

9
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcCityManagementServiceImpl.java

@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.AppClientConstant;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
@ -135,6 +136,7 @@ public class IcCityManagementServiceImpl extends BaseServiceImpl<IcCityManagemen
}
//3.新增服务组织数据
IcCityManagementEntity entity = ConvertUtils.sourceToTarget(formDTO, IcCityManagementEntity.class);
entity.setSourceType("add");
entity.setAgencyId(staffInfo.getAgencyId());
entity.setAgencyIdPath(StringUtils.isEmpty(staffInfo.getAgencyPIds()) ? staffInfo.getAgencyId() : staffInfo.getAgencyPIds() + ":" + staffInfo.getAgencyId());
insert(entity);
@ -180,12 +182,11 @@ public class IcCityManagementServiceImpl extends BaseServiceImpl<IcCityManagemen
//封装类别数据
if (!CollectionUtils.isEmpty(list)) {
resultDTO = list.get(NumConstant.ZERO);
List<IcCoverageCategoryDictListResultDTO> dictList = coverageService.dictMap(formDTO.getCustomerId(), "city_management");
Map<String, String> dictMap = dictList.stream().collect(Collectors.toMap(IcCoverageCategoryDictListResultDTO::getLabel, IcCoverageCategoryDictListResultDTO::getValue));
for (IcCityManagementListResultDTO v : list) {
if (StringUtils.isNotBlank(v.getCategory())) {
v.setCategoryName(dictMap.get(v.getCategory()));
}
if (StringUtils.isNotBlank(resultDTO.getCategory())) {
resultDTO.setCategoryName(dictMap.get(resultDTO.getCategory()));
}
}

15
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcDangerousChemicalsServiceImpl.java

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.enums.DictTypeEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode;
@ -149,6 +150,7 @@ public class IcDangerousChemicalsServiceImpl extends BaseServiceImpl<IcDangerous
}
//3.新增服务组织数据
IcDangerousChemicalsEntity entity = ConvertUtils.sourceToTarget(formDTO, IcDangerousChemicalsEntity.class);
entity.setSourceType("add");
entity.setAgencyId(staffInfo.getAgencyId());
entity.setAgencyIdPath(StringUtils.isEmpty(staffInfo.getAgencyPIds()) ? staffInfo.getAgencyId() : staffInfo.getAgencyPIds() + ":" + staffInfo.getAgencyId());
insert(entity);
@ -194,19 +196,18 @@ public class IcDangerousChemicalsServiceImpl extends BaseServiceImpl<IcDangerous
//封装类别数据
if (!CollectionUtils.isEmpty(list)) {
resultDTO = list.get(NumConstant.ZERO);
//危化品种类字典
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<>();
//企业类别字典数据
List<IcCoverageCategoryDictListResultDTO> dictList = coverageService.dictMap(formDTO.getCustomerId(), "city_management");
Map<String, String> dictMap = dictList.stream().collect(Collectors.toMap(IcCoverageCategoryDictListResultDTO::getLabel, IcCoverageCategoryDictListResultDTO::getValue));
for (IcDangerousChemicalsListResultDTO v : list) {
if (StringUtils.isNotBlank(v.getCategory())) {
v.setCategoryName(dictMap.get(v.getCategory()));
}
if (StringUtils.isNotBlank(v.getDangerType())) {
v.setDangerTypeName(statusMap.get(v.getDangerType()));
}
if (StringUtils.isNotBlank(resultDTO.getCategory())) {
resultDTO.setCategoryName(dictMap.get(resultDTO.getCategory()));
}
if (StringUtils.isNotBlank(resultDTO.getDangerType())) {
resultDTO.setDangerTypeName(statusMap.get(resultDTO.getDangerType()));
}
}

9
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPublicServiceServiceImpl.java

@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.AppClientConstant;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
@ -135,6 +136,7 @@ public class IcPublicServiceServiceImpl extends BaseServiceImpl<IcPublicServiceD
}
//3.新增服务组织数据
IcPublicServiceEntity entity = ConvertUtils.sourceToTarget(formDTO, IcPublicServiceEntity.class);
entity.setSourceType("add");
entity.setAgencyId(staffInfo.getAgencyId());
entity.setAgencyIdPath(StringUtils.isEmpty(staffInfo.getAgencyPIds()) ? staffInfo.getAgencyId() : staffInfo.getAgencyPIds() + ":" + staffInfo.getAgencyId());
insert(entity);
@ -180,12 +182,11 @@ public class IcPublicServiceServiceImpl extends BaseServiceImpl<IcPublicServiceD
//封装类别数据
if (!CollectionUtils.isEmpty(list)) {
resultDTO = list.get(NumConstant.ZERO);
List<IcCoverageCategoryDictListResultDTO> dictList = coverageService.dictMap(formDTO.getCustomerId(), "public_service");
Map<String, String> dictMap = dictList.stream().collect(Collectors.toMap(IcCoverageCategoryDictListResultDTO::getLabel, IcCoverageCategoryDictListResultDTO::getValue));
for (IcPublicServiceListResultDTO v : list) {
if (StringUtils.isNotBlank(v.getCategory())) {
v.setCategoryName(dictMap.get(v.getCategory()));
}
if (StringUtils.isNotBlank(resultDTO.getCategory())) {
resultDTO.setCategoryName(dictMap.get(resultDTO.getCategory()));
}
}

9
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcSuperiorResourceServiceImpl.java

@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.AppClientConstant;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
@ -135,6 +136,7 @@ public class IcSuperiorResourceServiceImpl extends BaseServiceImpl<IcSuperiorRes
}
//3.新增服务组织数据
IcSuperiorResourceEntity entity = ConvertUtils.sourceToTarget(formDTO, IcSuperiorResourceEntity.class);
entity.setSourceType("add");
entity.setAgencyId(staffInfo.getAgencyId());
entity.setAgencyIdPath(StringUtils.isEmpty(staffInfo.getAgencyPIds()) ? staffInfo.getAgencyId() : staffInfo.getAgencyPIds() + ":" + staffInfo.getAgencyId());
insert(entity);
@ -180,12 +182,11 @@ public class IcSuperiorResourceServiceImpl extends BaseServiceImpl<IcSuperiorRes
//封装类别数据
if (!CollectionUtils.isEmpty(list)) {
resultDTO = list.get(NumConstant.ZERO);
List<IcCoverageCategoryDictListResultDTO> dictList = coverageService.dictMap(formDTO.getCustomerId(), "superior_resource");
Map<String, String> dictMap = dictList.stream().collect(Collectors.toMap(IcCoverageCategoryDictListResultDTO::getLabel, IcCoverageCategoryDictListResultDTO::getValue));
for (IcSuperiorResourceListResultDTO v : list) {
if (StringUtils.isNotBlank(v.getCategory())) {
v.setCategoryName(dictMap.get(v.getCategory()));
}
if (StringUtils.isNotBlank(resultDTO.getCategory())) {
resultDTO.setCategoryName(dictMap.get(resultDTO.getCategory()));
}
}

Loading…
Cancel
Save