Browse Source

Merge remote-tracking branch 'origin/dev_dengjima' into dev_dengjima

master
zxc 3 years ago
parent
commit
1f7a110ffb
  1. 14
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EnterpriseFormDTO.java
  2. 13
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/EnterpriseDetailDTO.java
  3. 16
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/EnterpriseExportExcelDTO.java
  4. 31
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcEnterpriseServiceImpl.java
  5. 1
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcEnterpriseDao.xml

14
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EnterpriseFormDTO.java

@ -5,6 +5,7 @@ import lombok.Data;
import org.hibernate.validator.constraints.Length; import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable; import java.io.Serializable;
@ -44,6 +45,14 @@ public class EnterpriseFormDTO implements Serializable {
@NotBlank(message = "场所类型不能为空", groups = {AddShow.class}) @NotBlank(message = "场所类型不能为空", groups = {AddShow.class})
private String placeType; private String placeType;
/**
* 10.26需求
* 场所类别0九小场所1企事业单位
* 默认0
*/
@NotBlank(message = "场所类别不能为空", groups = {AddShow.class})
private String placeCategory;
/** /**
* 场所名称 * 场所名称
*/ */
@ -77,9 +86,12 @@ public class EnterpriseFormDTO implements Serializable {
3:41-100人 3:41-100人
4:100人以上 4:100人以上
*/ */
@NotBlank(message = "规模不能为空", groups = {AddShow.class}) // @NotBlank(message = "规模不能为空", groups = {AddShow.class})
private String scale; private String scale;
@NotNull(message = "规模不能为空",groups ={AddShow.class} )
private Integer scaleTotal;
/** /**
* 场所负责人 * 场所负责人
*/ */

13
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/EnterpriseDetailDTO.java

@ -37,7 +37,19 @@ public class EnterpriseDetailDTO implements Serializable {
* 场所类型来源于ic_coverage_category_dict * 场所类型来源于ic_coverage_category_dict
*/ */
private String placeType; private String placeType;
/**
* 10.26需求
* 场所类别0九小场所1企事业单位
* 默认0
*/
private String placeCategory;
/**
* 10.26需求
* 场所类别0九小场所1企事业单位
* 默认0
*/
private String placeCategoryName;
/** /**
* 场所类型名称 * 场所类型名称
*/ */
@ -73,6 +85,7 @@ public class EnterpriseDetailDTO implements Serializable {
*/ */
private String scale; private String scale;
private Integer scaleTotal;
/** /**
* 规模名称 * 规模名称
*/ */

16
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/EnterpriseExportExcelDTO.java

@ -22,7 +22,22 @@ public class EnterpriseExportExcelDTO {
@ExcelProperty(value = "场所类型") @ExcelProperty(value = "场所类型")
@ColumnWidth(25) @ColumnWidth(25)
private String placeTypeName; private String placeTypeName;
/**
* 10.26需求
* 场所类别0九小场所1企事业单位
* 默认0
*/
@ExcelIgnore
private String placeCategory;
/**
* 10.26需求
* 场所类别0九小场所1企事业单位
* 默认0
*/
@ExcelProperty(value = "场所类别")
@ColumnWidth(25)
private String placeCategoryName;
/** /**
* 网格所属的组织Id * 网格所属的组织Id
@ -70,6 +85,7 @@ public class EnterpriseExportExcelDTO {
@ExcelIgnore @ExcelIgnore
private String scale; private String scale;
private Integer scaleTotal;
/** /**
* 规模名称 * 规模名称
*/ */

31
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcEnterpriseServiceImpl.java

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

1
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcEnterpriseDao.xml

@ -43,6 +43,7 @@
ie.AGENCY_ID, ie.AGENCY_ID,
ie.AGENCY_PIDS, ie.AGENCY_PIDS,
ie.PLACE_TYPE, ie.PLACE_TYPE,
ie.PLACE_CATEGORY,
ie.PLACE_ORG_NAME, ie.PLACE_ORG_NAME,
ie.ADDRESS, ie.ADDRESS,
ie.LONGITUDE, ie.LONGITUDE,

Loading…
Cancel
Save