wxz 2 years ago
parent
commit
4aae44c37b
  1. 26
      doc/epmet-cloud.md
  2. 36
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/OrgCommonFormDTO.java
  3. 67
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ScanContentUtils.java
  4. 15
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/lingshan/DangerousChemicalsDistributionFormDTO.java
  5. 56
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/DangerousChemicalsTypeStatDetailDTO.java
  6. 17
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/DangerousChemicalsTypeStatResultDTO.java
  7. 31
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcDangerousChemicalsController.java
  8. 11
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcDangerousChemicalsDao.java
  9. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcBuildingExcel.java
  10. 3
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/BuildingInfoModel.java
  11. 21
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcDangerousChemicalsService.java
  12. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java
  13. 96
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcDangerousChemicalsServiceImpl.java
  14. 5
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java
  15. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/NeighborHoodServiceImpl.java
  16. BIN
      epmet-module/gov-org/gov-org-server/src/main/resources/excel/building_export.xlsx
  17. BIN
      epmet-module/gov-org/gov-org-server/src/main/resources/excel/building_template.xlsx
  18. 1
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CommunityBuildingManagerDao.xml
  19. 28
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcDangerousChemicalsDao.xml

26
doc/epmet-cloud.md

@ -4,17 +4,33 @@
```
开发环境已经搭建好了
在最新的代码中:
默认情况下,所有服务的pom.xml中应该启用dev环境,其他环境的active应该被注释掉(dev-local不再有用,可以删除)
默认情况下,所有服务的pom.xml中启用local环境,其他环境的active应该被注释掉
根据dev环境中的配置,微服务会注册到nacos,并且调用其他微服务的时候会从nacos中取目标微服务的ip来发送请求
因此,本地电脑不再需要启动所有服务,只需要启动要开发的服务即可;默认情况下,本机的微服务在调用目标微服务的时候,都是调用的服务器,不再请求本地。
例如:有A、B2个服务,并且A调用B,如果我们只需要开发A服务,那本地只启动A服务即可,A调用B的时候,会调用服务器的B服务。
如果需要开发AB2个服务,那么将A中的FeignClient的url属性指向localhost。
如果需要开发AB2个服务,那么将A中的FeignClient的url属性指向localhost:[B的端口]
PS:目前正在测试通过负载均衡器和本地环境变量实现动态修改目标服务IP,成功之后就不需要再修改FeignClient的url,配置一下环境变量即可,到时候具体说
```
## 私有化部署
##### 需要开放哪些域名
##### 需要对外访问哪些域名
- epmet-cloud.elinkservice.cn 微信交互代理
- dysmsapi.aliyuncs.com 阿里云短信
- epmet-cloud.elinkservice.cn 微信交互代理,第三方,客户等
- dysmsapi.aliyuncs.com 阿里云短信
- api.weixin.qq.com 微信直接交互(二维码等)
- oss-cn-qingdao.aliyuncs.com(如果需要用到oss)
#### 腾讯云呼叫中心需要调用,需要开放
- https://map.qq.com
- https://pr.map.qq.com
- https://webapi.amap.com
- https://tccc.qcloud.com
- https://aegis.qq.com
- https://api.tccc.qcloud.com
- wss://wss.im.qcloud.com
- https://tpstelemetry.tencent.com
- https://ccc.ap-shanghai.tencentcloudapi.com
- https://ccc.tencentcloudapi.com

36
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/OrgCommonFormDTO.java

@ -0,0 +1,36 @@
package com.epmet.commons.tools.dto.form;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Description
* @Author yzm
* @Date 2023/5/15 13:44
*/
@Data
public class OrgCommonFormDTO implements Serializable {
private static final long serialVersionUID = 2261315322260807610L;
public interface AddUserInternalGroup {
}
public interface AddUserShowGroup extends CustomerClientShowGroup {
}
/**
* 组织id或者网格id
*/
@NotBlank(message = "orgId不能为空", groups = AddUserInternalGroup.class)
private String orgId;
/**
* agency
* grid
*/
@NotBlank(message = "orgType不能为空", groups = AddUserInternalGroup.class)
private String orgType;
}

67
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ScanContentUtils.java

@ -27,12 +27,59 @@ import java.util.stream.Collectors;
**/
@Slf4j
public class ScanContentUtils {
// 内容审核是否可用。烟台是政务网,无法使用互联网,所以该功能不可用
public static final Boolean USABLE = false;
/**
* 模拟sync成功的结果(可以用来模拟也可以适用于无法使用互联网的环境)
* @author wxz
* @date 2022/12/13 15:37
*
* * @return Result<SyncScanResult>
*/
public static Result<SyncScanResult> mockSyncSuccessResult() {
Result<SyncScanResult> tempRst = new Result<>();
SyncScanResult syncScanResult = new SyncScanResult();
syncScanResult.setAllPass(true);
tempRst.setData(syncScanResult);
return tempRst;
}
/**
* 模拟async成功的结果(可以用来模拟也可以适用于无法使用互联网的环境)
* @author wxz
* @date 2022/12/13 15:46
*
* * @return Result<AsyncScanResult>
*/
public static Result<AsyncScanResult> mockAsyncSuccessResult() {
Result<AsyncScanResult> tempRst = new Result<>();
AsyncScanResult asyncScanResult = new AsyncScanResult();
asyncScanResult.setAllSuccess(true);
tempRst.setData(asyncScanResult);
return tempRst;
}
public static Result<VideoAsyncScanResultDTO> mockVideoAsyncSuccessResult() {
Result<VideoAsyncScanResultDTO> tempRst = new Result<>();
VideoAsyncScanResultDTO asyncScanResult = new VideoAsyncScanResultDTO();
asyncScanResult.setIsAllPass(true);
tempRst.setData(asyncScanResult);
return tempRst;
}
/**
* desc:图片同步扫描
*
* @return
*/
public static Result<SyncScanResult> imgSyncScan(String url, ImgScanParamDTO param) {
if (!USABLE) {
return mockSyncSuccessResult();
}
//start 测试环境停机了,先这样改试试
EnvEnum currentEnv = EnvEnum.getCurrentEnv();
if(EnvEnum.LOCAL.getCode().equals(currentEnv.getCode())||EnvEnum.DEV.getCode().equals(currentEnv.getCode())){
@ -68,6 +115,11 @@ public class ScanContentUtils {
* @return
*/
public static Result<SyncScanResult> textSyncScan(String url, TextScanParamDTO param) {
if (!USABLE) {
return mockSyncSuccessResult();
}
//start 测试环境停机了,先这样改试试
EnvEnum currentEnv = EnvEnum.getCurrentEnv();
if(EnvEnum.LOCAL.getCode().equals(currentEnv.getCode())||EnvEnum.DEV.getCode().equals(currentEnv.getCode())){
@ -104,6 +156,11 @@ public class ScanContentUtils {
* @return 返回检测对象对应的任务id
*/
public static Result<AsyncScanResult> voiceAsyncScan(String url, VoiceScanParamDTO param){
if (!USABLE) {
return mockAsyncSuccessResult();
}
log.debug("voiceAsyncScan param:{}", JSON.toJSONString(param));
if (StringUtils.isBlank(url) || param == null) {
throw new RenException("参数错误");
@ -164,6 +221,11 @@ public class ScanContentUtils {
* @description 异步检测-提交检测任务
**/
public static Result<AsyncScanResult> videoAsyncScan(String url, VideoScanParamDTO param){
if (!USABLE) {
return mockAsyncSuccessResult();
}
log.debug("videoAsyncScan param:{}", JSON.toJSONString(param));
if (StringUtils.isBlank(url) || param == null) {
throw new RenException("参数错误");
@ -194,6 +256,11 @@ public class ScanContentUtils {
* @description 查询视频检测结果
**/
public static Result<VideoAsyncScanResultDTO> videoResults(String url, List<String> taskIds) {
if (!USABLE) {
return mockVideoAsyncSuccessResult();
}
if (StringUtils.isBlank(url) || CollectionUtils.isEmpty(taskIds)) {
throw new RenException("参数错误");
}

15
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/lingshan/DangerousChemicalsDistributionFormDTO.java

@ -0,0 +1,15 @@
package com.epmet.dto.form.lingshan;
import com.epmet.commons.tools.dto.form.OrgCommonFormDTO;
import lombok.Data;
/**
* @Description 灵山大屏-安全生产-生产企业类型统计点击饼图中间地图显示列表
* @Author yzm
* @Date 2023/5/15 14:59
*/
@Data
public class DangerousChemicalsDistributionFormDTO extends OrgCommonFormDTO {
private String typeCode;
}

56
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/DangerousChemicalsTypeStatDetailDTO.java

@ -0,0 +1,56 @@
package com.epmet.dto.result.lingshan;
/**
* @Description 灵山大屏-安全生产-生产企业类型统计 点击饼图列表及详情返参DTO
* @Author yzm
* @Date 2023/5/15 15:00
*/
import lombok.Data;
@Data
public class DangerousChemicalsTypeStatDetailDTO {
/**
* 企业id
*/
private String id;
/**
* 企业名称
*/
private String name;
/**
* 企业介绍
*/
private String content;
private String longitude;
private String latitude;
private String addr;
/**
* 联系人
*/
private String annt;
/**
* 联系电话
*/
private String phone;
// @JsonIgnore
private String category;
/**
* 类别名称
*/
private String type;
/**
* 是否重点企业
*/
private Boolean zd;
/**
* 包企领导
*/
private String leader;
/**
* 包企干部
*/
private String cadre;
}

17
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/DangerousChemicalsTypeStatResultDTO.java

@ -0,0 +1,17 @@
package com.epmet.dto.result.lingshan;
import lombok.Data;
/**
* @Description 灵山大屏-安全生产-生产企业类型统计
* @Author yzm
* @Date 2023/5/15 13:48
*/
@Data
public class DangerousChemicalsTypeStatResultDTO {
private String name;
private Integer value;
private String typeCode;
}

31
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcDangerousChemicalsController.java

@ -10,6 +10,7 @@ import com.alibaba.fastjson.JSON;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.dto.form.OrgCommonFormDTO;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.exception.ExceptionUtils;
@ -23,8 +24,11 @@ import com.epmet.dto.IcDangerousChemicalsDTO;
import com.epmet.dto.form.IcDangerousChemicalsAddEditFormDTO;
import com.epmet.dto.form.IcDangerousChemicalsListFormDTO;
import com.epmet.dto.form.ImportTaskCommonFormDTO;
import com.epmet.dto.form.lingshan.DangerousChemicalsDistributionFormDTO;
import com.epmet.dto.result.IcDangerousChemicalsListResultDTO;
import com.epmet.dto.result.ImportTaskCommonResultDTO;
import com.epmet.dto.result.lingshan.DangerousChemicalsTypeStatDetailDTO;
import com.epmet.dto.result.lingshan.DangerousChemicalsTypeStatResultDTO;
import com.epmet.excel.IcDangerousChemicalsExcel;
import com.epmet.feign.EpmetCommonServiceOpenFeignClient;
import com.epmet.service.IcDangerousChemicalsService;
@ -288,5 +292,32 @@ public class IcDangerousChemicalsController {
return new Result();
}
/**
* 灵山大屏-安全生产-生产企业类型统计
*
* @param formDto
* @return
*/
@PostMapping("type-stat")
public Result<List<DangerousChemicalsTypeStatResultDTO>> typeStat(@LoginUser TokenDto tokenDto, @RequestBody OrgCommonFormDTO formDto) {
return new Result<List<DangerousChemicalsTypeStatResultDTO>>().ok(icDangerousChemicalsService.typeStat(tokenDto.getCustomerId(),
tokenDto.getUserId(),
formDto.getOrgId(),
formDto.getOrgType()));
}
/**
* 灵山大屏-安全生产-生产企业类型统计,点击饼图查询列表及详情
* @param tokenDto
* @param formDTO
* @return
*/
@PostMapping("distribution")
public Result<List<DangerousChemicalsTypeStatDetailDTO>> distribution(@LoginUser TokenDto tokenDto, @RequestBody DangerousChemicalsDistributionFormDTO formDTO) {
return new Result<List<DangerousChemicalsTypeStatDetailDTO>>().ok(icDangerousChemicalsService.distribution(tokenDto.getCustomerId(),
tokenDto.getUserId(),
formDTO.getOrgId(),
formDTO.getOrgType(),
formDTO.getTypeCode()));
}
}

11
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcDangerousChemicalsDao.java

@ -3,6 +3,7 @@ package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.form.IcDangerousChemicalsListFormDTO;
import com.epmet.dto.result.IcDangerousChemicalsListResultDTO;
import com.epmet.dto.result.lingshan.DangerousChemicalsTypeStatDetailDTO;
import com.epmet.entity.IcDangerousChemicalsEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -24,4 +25,14 @@ public interface IcDangerousChemicalsDao extends BaseDao<IcDangerousChemicalsEnt
void importInsert(@Param("entityList") List<IcDangerousChemicalsEntity> entityList);
/**
* 灵山大屏-安全生产-生产企业类型统计,点击饼图查询列表及详情
* @param customerId
* @param orgIdPath
* @param typeCode
* @return
*/
List<DangerousChemicalsTypeStatDetailDTO> selectDistributionList(@Param("customerId") String customerId,
@Param("orgIdPath") String orgIdPath,
@Param("typeCode") String typeCode);
}

4
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcBuildingExcel.java

@ -134,6 +134,6 @@ public class IcBuildingExcel extends ExcelVerifyInfo implements Serializable {
@Excel(name = "楼长身份证号")
private String buildingLeaderIdCard;
@Excel(name = "楼长类型")
private String buildingLeaderType;
/* @Excel(name = "楼长类型")
private String buildingLeaderType;*/
}

3
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/BuildingInfoModel.java

@ -47,9 +47,6 @@ public class BuildingInfoModel {
@ExcelProperty(value = "楼长身份证号")
private String buildingLeaderIdCard;
@ExcelProperty(value = "楼长类型")
private String buildingLeaderType;
@ExcelProperty(value = "排序")
private BigDecimal sort;

21
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcDangerousChemicalsService.java

@ -7,6 +7,8 @@ import com.epmet.dto.IcDangerousChemicalsDTO;
import com.epmet.dto.form.IcDangerousChemicalsAddEditFormDTO;
import com.epmet.dto.form.IcDangerousChemicalsListFormDTO;
import com.epmet.dto.result.IcDangerousChemicalsListResultDTO;
import com.epmet.dto.result.lingshan.DangerousChemicalsTypeStatDetailDTO;
import com.epmet.dto.result.lingshan.DangerousChemicalsTypeStatResultDTO;
import com.epmet.entity.IcDangerousChemicalsEntity;
import java.nio.file.Path;
@ -82,4 +84,23 @@ public interface IcDangerousChemicalsService extends BaseService<IcDangerousChem
void importInsert(List<IcDangerousChemicalsEntity> entityList);
IcDangerousChemicalsEntity get(String orgId, String name);
/**
* 灵山大屏-安全生产-生产企业类型统计
* @param orgId
* @param orgType
* @return
*/
List<DangerousChemicalsTypeStatResultDTO> typeStat(String customerId,String staffId,String orgId, String orgType);
/**
* 灵山大屏-安全生产-生产企业类型统计,点击饼图查询列表及详情
* @param customerId
* @param userId
* @param orgId
* @param orgType
* @param typeCode
* @return
*/
List<DangerousChemicalsTypeStatDetailDTO> distribution(String customerId, String staffId, String orgId, String orgType, String typeCode);
}

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java

@ -121,6 +121,7 @@ public class BuildingServiceImpl implements BuildingService {
IcBuildingDTO icBuildingDTO = ConvertUtils.sourceToTarget(formDTO, IcBuildingDTO.class);
icBuildingDTO.setCustomerId(customerId);
IcBuildingEntity entity = ConvertUtils.sourceToTarget(icBuildingDTO, IcBuildingEntity.class);
entity.setBuildingLeaderType("0");
icBuildingDao.insert(entity);
@ -735,6 +736,7 @@ public class BuildingServiceImpl implements BuildingService {
IcBuildingDTO icBuildingDTO = ConvertUtils.sourceToTarget(formDTO, IcBuildingDTO.class);
icBuildingDTO.setId(formDTO.getBuildingId());
icBuildingDTO.setCustomerId(customerId);
icBuildingDTO.setBuildingLeaderType("0");
icBuildingService.update(icBuildingDTO);

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

@ -28,6 +28,8 @@ import com.epmet.dto.form.ImportTaskCommonFormDTO;
import com.epmet.dto.result.IcCoverageCategoryDictListResultDTO;
import com.epmet.dto.result.IcDangerousChemicalsListResultDTO;
import com.epmet.dto.result.UploadImgResultDTO;
import com.epmet.dto.result.lingshan.DangerousChemicalsTypeStatDetailDTO;
import com.epmet.dto.result.lingshan.DangerousChemicalsTypeStatResultDTO;
import com.epmet.entity.IcDangerousChemicalsEntity;
import com.epmet.feign.EpmetAdminOpenFeignClient;
import com.epmet.feign.EpmetCommonServiceOpenFeignClient;
@ -59,10 +61,7 @@ import java.io.IOException;
import java.io.OutputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import java.util.*;
import java.util.stream.Collectors;
/**
@ -115,7 +114,7 @@ public class IcDangerousChemicalsServiceImpl extends BaseServiceImpl<IcDangerous
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(), "dangerous_chemicals");
List<IcCoverageCategoryDictListResultDTO> dictList = coverageService.dictMap(formDTO.getCustomerId(), CoveragePlaceTypeEnum.DANGEROUS_CHEMICALS.getCode());
Map<String, String> dictMap = dictList.stream().collect(Collectors.toMap(IcCoverageCategoryDictListResultDTO::getValue, IcCoverageCategoryDictListResultDTO::getLabel));
for (IcDangerousChemicalsListResultDTO v : list) {
if (StringUtils.isNotBlank(v.getCategory())) {
@ -225,7 +224,7 @@ public class IcDangerousChemicalsServiceImpl extends BaseServiceImpl<IcDangerous
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");
List<IcCoverageCategoryDictListResultDTO> dictList = coverageService.dictMap(formDTO.getCustomerId(), CoveragePlaceTypeEnum.DANGEROUS_CHEMICALS.getCode());
Map<String, String> dictMap = dictList.stream().collect(Collectors.toMap(IcCoverageCategoryDictListResultDTO::getValue, IcCoverageCategoryDictListResultDTO::getLabel));
if (StringUtils.isNotBlank(resultDTO.getCategory())) {
resultDTO.setCategoryName(dictMap.get(resultDTO.getCategory()));
@ -355,4 +354,89 @@ public class IcDangerousChemicalsServiceImpl extends BaseServiceImpl<IcDangerous
queryWrapper.eq(IcDangerousChemicalsEntity::getOrgId,orgId).eq(IcDangerousChemicalsEntity::getName,name);
return baseDao.selectOne(queryWrapper);
}
/**
* 灵山大屏-安全生产-生产企业类型统计
*
* @param orgId
* @param orgType
* @return
*/
@Override
public List<DangerousChemicalsTypeStatResultDTO> typeStat(String customerId,String staffId,String orgId, String orgType) {
// 企业类别字典数据
List<IcCoverageCategoryDictListResultDTO> dictList = coverageService.dictMap(customerId, CoveragePlaceTypeEnum.DANGEROUS_CHEMICALS.getCode());
if (CollectionUtils.isEmpty(dictList)) {
return new ArrayList<>();
}
String orgIdPath = queryOrgIdPath(customerId,staffId,orgId, orgType);
if (StringUtils.isBlank(orgIdPath)) {
return new ArrayList<>();
}
List<DangerousChemicalsTypeStatResultDTO> resultList = new ArrayList<>();
for (IcCoverageCategoryDictListResultDTO dto : dictList) {
DangerousChemicalsTypeStatResultDTO resultDTO = new DangerousChemicalsTypeStatResultDTO();
resultDTO.setName(dto.getLabel());
LambdaQueryWrapper<IcDangerousChemicalsEntity> countWrapper = new LambdaQueryWrapper<>();
countWrapper.eq(IcDangerousChemicalsEntity::getCustomerId, customerId)
.likeRight(IcDangerousChemicalsEntity::getOrgIdPath, orgIdPath)
.eq(IcDangerousChemicalsEntity::getCategory, dto.getValue());
resultDTO.setValue(baseDao.selectCount(countWrapper));
resultDTO.setTypeCode(dto.getValue());
resultList.add(resultDTO);
}
return resultList;
}
private String queryOrgIdPath(String customerId,String staffId,String orgId, String orgType) {
String orgIdPath = "";
// 如果没传,默认查询当前工作人员所属组织
if (StringUtils.isBlank(orgId) && StringUtils.isBlank(orgType)) {
CustomerStaffInfoCacheResult staffInfoCacheResult = CustomerStaffRedis.getStaffInfo(customerId, staffId);
orgId = staffInfoCacheResult.getAgencyId();
orgType = OrgTypeEnum.AGENCY.getCode();
}
if (OrgTypeEnum.AGENCY.getCode().equals(orgType)) {
CustomerAgencyDTO customerAgencyDTO = SpringContextUtils.getBean(CustomerAgencyService.class).get(orgId);
orgIdPath = PidUtils.convertPid2OrgIdPath(customerAgencyDTO.getId(), customerAgencyDTO.getPids());
} else if (OrgTypeEnum.GRID.getCode().equals(orgType)) {
CustomerGridDTO customerGridDTO = SpringContextUtils.getBean(CustomerGridService.class).get(orgId);
orgIdPath = PidUtils.convertPid2OrgIdPath(customerGridDTO.getId(), customerGridDTO.getPids());
}
return orgIdPath;
}
/**
* 灵山大屏-安全生产-生产企业类型统计,点击饼图查询列表及详情
*
* @param customerId
* @param staffId
* @param orgId
* @param orgType
* @param typeCode
* @return
*/
@Override
public List<DangerousChemicalsTypeStatDetailDTO> distribution(String customerId, String staffId, String orgId, String orgType, String typeCode) {
// 企业类别字典数据
List<IcCoverageCategoryDictListResultDTO> dictList = coverageService.dictMap(customerId, CoveragePlaceTypeEnum.DANGEROUS_CHEMICALS.getCode());
if (CollectionUtils.isEmpty(dictList)) {
return new ArrayList<>();
}
Map<String, String> categoryDictMap = dictList.stream().collect(Collectors.toMap(IcCoverageCategoryDictListResultDTO::getValue, IcCoverageCategoryDictListResultDTO::getLabel));
String orgIdPath = queryOrgIdPath(customerId, staffId, orgId, orgType);
if (StringUtils.isBlank(orgIdPath)) {
return new ArrayList<>();
}
List<DangerousChemicalsTypeStatDetailDTO> list = baseDao.selectDistributionList(customerId, orgIdPath, typeCode);
list.forEach(l -> {
// 赋值企业分类名称
if (MapUtils.isNotEmpty(categoryDictMap) && categoryDictMap.containsKey(l.getCategory())) {
l.setType(categoryDictMap.get(l.getCategory()));
}
});
return list;
}
}

5
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java

@ -629,14 +629,15 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl<IcNeighborHoodDao
private String getBuildingId(String customerId, ImportGeneralDTO info) {
//根据小区ID和楼栋名获取楼栋信息
IcBuildingDTO building = icBuildingService.getBuildingInfo(info.getNeighborHoodId(), info.getBuildingName());
if (StringUtils.isNotBlank(info.getBuildingLeaderType())){
/* if (StringUtils.isNotBlank(info.getBuildingLeaderType())){
if (info.getBuildingLeaderType().equals("楼长")){
info.setBuildingLeaderTypeNum("0");
}
if (info.getBuildingLeaderType().equals("单元长")){
info.setBuildingLeaderTypeNum("1");
}
}
}*/
info.setBuildingLeaderTypeNum("0");
if (null != building) {
info.setBuildingExistStatus(true);

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/NeighborHoodServiceImpl.java

@ -12,6 +12,7 @@ import com.epmet.commons.tools.enums.CollectUrlEnum;
import com.epmet.commons.tools.enums.OrgTypeEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
@ -134,6 +135,7 @@ public class NeighborHoodServiceImpl extends BaseServiceImpl<IcNeighborHoodDao,I
try {
neiEntity.setQrcodeUrl(createNeiQrcodeUrl(entity));
} catch (Exception e) {
log.error("【新增小区】二维码生成失败:" + ExceptionUtils.getErrorStackTrace(e));
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"二维码生成失败","二维码生成失败");
}
baseDao.updateById(neiEntity);

BIN
epmet-module/gov-org/gov-org-server/src/main/resources/excel/building_export.xlsx

Binary file not shown.

BIN
epmet-module/gov-org/gov-org-server/src/main/resources/excel/building_template.xlsx

Binary file not shown.

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

@ -33,6 +33,7 @@
(
case when m.type='0' then '楼长'
when m.type='1' then '单元长'
when m.type='0,1' or m.type='1,0' then '楼长,单元长'
else '-'
end
)as typeName,

28
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcDangerousChemicalsDao.xml

@ -143,5 +143,31 @@
AND del_flag = '0'
</delete>
<!-- 灵山大屏-安全生产-生产企业类型统计,点击饼图,查询列表及详情 -->
<select id="selectDistributionList" parameterType="map" resultType="com.epmet.dto.result.lingshan.DangerousChemicalsTypeStatDetailDTO">
SELECT
c.id,
c.`NAME`,
c.COMPANY_PROFILE AS content,
c.LONGITUDE,
c.LATITUDE,
c.ADDRESS AS addr,
c.PRINCIPAL_NAME AS annt,
c.PRINCIPAL_MOBILE AS phone,
c.CATEGORY,
'' AS type,
c.SECURITY_FLAG AS zd,
c.BQ_LD AS leader,
c.BQ_GB AS cadre
FROM
ic_dangerous_chemicals c
WHERE
c.DEL_FLAG = '0'
AND c.CUSTOMER_ID = #{customerId}
and c.ORG_ID_PATH like concat(#{orgIdPath},'%')
<if test="typeCode != null and typeCode != '' ">
AND c.CATEGORY = #{typeCode}
</if>
order by c.CREATED_TIME desc
</select>
</mapper>
Loading…
Cancel
Save