wxz 3 years ago
parent
commit
ea28abc444
  1. 26
      epmet-module/data-aggregator/data-aggregator-server/pom.xml
  2. 5
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/bootstrap.yml
  3. 4
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java
  4. 5
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/BuildingTreeLevelDTO.java
  5. 54
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseManageTreeFormDTO.java
  6. 10
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseListFormDTO.java
  7. 40
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/BuildingController.java
  8. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/GridController.java
  9. 20
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java
  10. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java
  11. 27
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/BuildingService.java
  12. 5
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java
  13. 186
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java
  14. 3
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java
  15. 3
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java
  16. 7
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcEnterpriseServiceImpl.java
  17. 65
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml
  18. 13
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml
  19. 10
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml
  20. 88
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java
  21. 21
      epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/person/controller/BadgeController.java
  22. 8
      epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/person/service/BadgeService.java
  23. 15
      epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/person/service/impl/BadgeServiceImpl.java
  24. 2
      epmet-user/epmet-user-client/src/main/java/com/epmet/constant/BadgeConstant.java
  25. 33
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/InternalDelIcResiUserFormDTO.java
  26. 9
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/NatListDTO.java
  27. 6
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicPreventionController.java
  28. 25
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java
  29. 6
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java
  30. 26
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatServiceImpl.java
  31. 35
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java
  32. 3
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java
  33. BIN
      epmet-user/epmet-user-server/src/main/resources/excel/attention_vaccination_template.xlsx
  34. 2
      epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml

26
epmet-module/data-aggregator/data-aggregator-server/pom.xml

@ -245,11 +245,11 @@
<datasource.druid.evaluationIndex.username>epmet_evaluation_index_user</datasource.druid.evaluationIndex.username>
<datasource.druid.evaluationIndex.password>EpmEt-db-UsEr</datasource.druid.evaluationIndex.password>
<datasource.druid.evaluationIndex1.url>
<datasource.druid..url>
<![CDATA[jdbc:mysql://192.168.1.140:3306/epmet_evaluation_index?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</datasource.druid.evaluationIndex1.url>
<datasource.druid.evaluationIndex1.username>root</datasource.druid.evaluationIndex1.username>
<datasource.druid.evaluationIndex1.password>root</datasource.druid.evaluationIndex1.password>
</datasource.druid..url>
<datasource.druid..username>root</datasource.druid..username>
<datasource.druid..password>root</datasource.druid..password>
<datasource.druid.opercustomize.url>
<![CDATA[jdbc:mysql://192.168.1.140:3306/epmet_oper_customize?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
@ -390,12 +390,6 @@
<datasource.druid.evaluationIndex.username>epmet_evaluation_index_user</datasource.druid.evaluationIndex.username>
<datasource.druid.evaluationIndex.password>EpmEt-db-UsEr</datasource.druid.evaluationIndex.password>
<datasource.druid.evaluationIndex1.url>
<![CDATA[jdbc:mysql://192.168.1.140:3306/epmet_evaluation_index?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</datasource.druid.evaluationIndex1.url>
<datasource.druid.evaluationIndex1.username>root</datasource.druid.evaluationIndex1.username>
<datasource.druid.evaluationIndex1.password>root</datasource.druid.evaluationIndex1.password>
<datasource.druid.opercustomize.url>
<![CDATA[jdbc:mysql://192.168.1.140:3306/epmet_oper_customize?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</datasource.druid.opercustomize.url>
@ -534,12 +528,6 @@
<datasource.druid.evaluationIndex.username>epmet</datasource.druid.evaluationIndex.username>
<datasource.druid.evaluationIndex.password>elink@833066</datasource.druid.evaluationIndex.password>
<datasource.druid.evaluationIndex1.url>
<![CDATA[jdbc:mysql://rm-m5ef9t617j6o5eup7.mysql.rds.aliyuncs.com:3306/epmet_evaluation_index?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</datasource.druid.evaluationIndex1.url>
<datasource.druid.evaluationIndex1.username>epmet</datasource.druid.evaluationIndex1.username>
<datasource.druid.evaluationIndex1.password>elink@833066</datasource.druid.evaluationIndex1.password>
<datasource.druid.opercustomize.url>
<![CDATA[jdbc:mysql://rm-m5ef9t617j6o5eup7.mysql.rds.aliyuncs.com:3306/epmet_oper_customize?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</datasource.druid.opercustomize.url>
@ -679,12 +667,6 @@
<datasource.druid.evaluationIndex.username>epmet_evaluation_index_user</datasource.druid.evaluationIndex.username>
<datasource.druid.evaluationIndex.password>EpmEt-db-UsEr</datasource.druid.evaluationIndex.password>
<datasource.druid.evaluationIndex1.url>
<![CDATA[jdbc:mysql://rm-m5e3vzs2637224wj9.mysql.rds.aliyuncs.com:3306/epmet_evaluation_index?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</datasource.druid.evaluationIndex1.url>
<datasource.druid.evaluationIndex1.username>epmet_cloud_viewer</datasource.druid.evaluationIndex1.username>
<datasource.druid.evaluationIndex1.password>EpmEtclOUdvIEwEr@w</datasource.druid.evaluationIndex1.password>
<datasource.druid.opercustomize.url>
<![CDATA[jdbc:mysql://rm-m5e3vzs2637224wj9.mysql.rds.aliyuncs.com:3306/epmet_oper_customize?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</datasource.druid.opercustomize.url>

5
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/bootstrap.yml

@ -166,11 +166,6 @@ dynamic:
url: @datasource.druid.partymember.url@
username: @datasource.druid.partymember.username@
password: @datasource.druid.partymember.password@
evaluationIndexRead:
driver-class-name: com.mysql.cj.jdbc.Driver
url: @datasource.druid.evaluationIndex1.url@
username: @datasource.druid.evaluationIndex1.username@
password: @datasource.druid.evaluationIndex1.password@
feign:
hystrix:
enabled: true

4
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java

@ -497,7 +497,7 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
//爱心互助的志愿者
Result<List<UserBaseInfoResultDTO>> userInfoRes = epmetUserOpenFeignClient.queryUserBaseInfo(Arrays.asList(serverId));
if (!userInfoRes.success() || CollectionUtils.isEmpty(userInfoRes.getData())) {
throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "查询爱心互助志愿者信息异常","志愿者信息查询异常");
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "查询爱心互助志愿者信息异常","志愿者信息查询异常");
}
serviceName=userInfoRes.getData().get(NumConstant.ZERO).getRealName();
mobile = userInfoRes.getData().get(NumConstant.ZERO).getMobile();
@ -506,7 +506,7 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
//居民信息的志愿者 ic_resi_user
Result<IcResiUserDTO> icUserInfoRes = epmetUserOpenFeignClient.getIcResiUserDTO(serverId);
if (!icUserInfoRes.success() || null==icUserInfoRes.getData()) {
throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "查询居民信息志愿者信息异常","查询居民信息志愿者信息异常");
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "查询居民信息志愿者信息异常","查询居民信息志愿者信息异常");
}
serviceName=icUserInfoRes.getData().getName();
mobile = icUserInfoRes.getData().getMobile();

5
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/BuildingTreeLevelDTO.java

@ -17,6 +17,7 @@
package com.epmet.dto;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.io.Serializable;
@ -57,4 +58,8 @@ public class BuildingTreeLevelDTO implements Serializable {
private String showNum;
private String showName;
//agency、grid
@JsonIgnore
private String orgType;
}

54
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseManageTreeFormDTO.java

@ -0,0 +1,54 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Description 烟台房屋信息界面左侧树查询入参
* @Author yzm
* @Date 2023/1/6 13:39
*/
@Data
public class HouseManageTreeFormDTO implements Serializable {
public interface InitTreeGroup {
}
// public interface AddUserShowGroup extends CustomerClientShowGroup {}
public interface NodeEventGroup {
}
/**
* 组织id网格id小区id楼栋id
*/
@NotBlank(message = "id不能为空", groups = NodeEventGroup.class)
private String id;
/**
* 省级:province
* 市级: city
* 区县级: district,
* 街道:street,
* 社区级community
* 网格grid
* 小区neighborHood
* 楼栋building
*/
@NotBlank(message = "level不能为空", groups = NodeEventGroup.class)
private String level;
// ------------------------------------
/**
* tokenDto.customerId
*/
@NotBlank(message = "customerId不能为空", groups = {InitTreeGroup.class,NodeEventGroup.class})
private String customerId;
/**
* tokenDto.userId
*/
@NotBlank(message = "staffId不能为空", groups = {InitTreeGroup.class,NodeEventGroup.class})
private String staffId;
}

10
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseListFormDTO.java

@ -115,4 +115,14 @@ public class IcHouseListFormDTO extends PageFormDTO {
* 楼栋ID
*/
private String unitId;
//对应界面上的所属组织
/**
* 组织agency
* 网格grid
* 与orgId一起使用
*/
private String orgType;
private String orgId;
}

40
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/BuildingController.java

@ -109,12 +109,50 @@ public class BuildingController {
return new Result();
}
/**
* 房屋信息左侧树
* 此接口返回的树是完整的针对烟台市这个客户改为逐级展开烟台调用下面的接口
* @param tokenDTO
* @return
*/
@PostMapping("treelist")
public Result treeList(@LoginUser TokenDto tokenDTO){
public Result<List<BuildingTreeLevelDTO>> treeList(@LoginUser TokenDto tokenDTO){
List<BuildingTreeLevelDTO> buildingTreeLevelDTOS =buildingService.treeList(tokenDTO.getCustomerId(), tokenDTO.getUserId());
return new Result().ok(buildingTreeLevelDTOS);
}
/**
* 房屋信息左侧树
* 逐级展开用户点击树节点去查询 目前只有烟台客户房屋信息调用
* @param tokenDTO
* @return
*/
@PostMapping("treeinit")
public Result<BuildingTreeLevelDTO> treeInit(@LoginUser TokenDto tokenDTO){
HouseManageTreeFormDTO formDTO=new HouseManageTreeFormDTO();
formDTO.setCustomerId(tokenDTO.getCustomerId());
formDTO.setStaffId(tokenDTO.getUserId());
ValidatorUtils.validateEntity(formDTO,HouseManageTreeFormDTO.InitTreeGroup.class);
BuildingTreeLevelDTO buildingTreeLevelDTOS =buildingService.treeInit(formDTO);
return new Result<BuildingTreeLevelDTO>().ok(buildingTreeLevelDTOS);
}
/**
* 房屋信息左侧树
* 点击树上节点查询下一级列表
* @param tokenDTO
* @param formDTO
* @return
*/
@PostMapping("next-tree-node")
public Result<List<BuildingTreeLevelDTO>> nextTreeNode(@LoginUser TokenDto tokenDTO,@RequestBody HouseManageTreeFormDTO formDTO){
formDTO.setCustomerId(tokenDTO.getCustomerId());
formDTO.setStaffId(tokenDTO.getUserId());
ValidatorUtils.validateEntity(formDTO,HouseManageTreeFormDTO.NodeEventGroup.class);
List<BuildingTreeLevelDTO> resultList =buildingService.nextTreeNode(formDTO);
return new Result<List<BuildingTreeLevelDTO>>().ok(resultList);
}
/**
* Desc: 根据前端方便新开接口只返回树的ID
* @param tokenDTO

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/GridController.java

@ -43,7 +43,7 @@ public class GridController {
* @return
*/
@PostMapping("griddetail")
public Result<GridDetailResultDTO> gridDetail(@LoginUser TokenDto tokenDto,@RequestBody CustomerGridFormDTO customerGridFormDTO){
public Result<GridDetailResultDTO> gridDetail(@RequestBody CustomerGridFormDTO customerGridFormDTO){
Result<GridDetailResultDTO> griddetail = customerGridService.griddetail(customerGridFormDTO);
return griddetail;
}

20
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java

@ -18,6 +18,7 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.BuildingTreeLevelDTO;
import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.dto.form.GridInfoVaccinePrarmeterFormDTO;
import com.epmet.dto.form.OrgInfoPointFormDTO;
@ -401,6 +402,25 @@ public interface CustomerAgencyDao extends BaseDao<CustomerAgencyEntity> {
List<CurrentUserCommunityInfoResultDTO> getCurrentUserCommunityInfo(@Param("customerId") String customerId,@Param("staffAgencyId")String staffAgencyId);
/**
*
* @param agencyId
* @return 组织信息用于房屋信息左侧树
*/
BuildingTreeLevelDTO selectAgencyTree(String agencyId);
/**
*
* @param agencyId
* @return 获取当前agencyId的下一级组织+直属网格
*/
List<BuildingTreeLevelDTO> selectNextOrg(String agencyId);
/**
* 查询当前agencyId下 组织数+网格数
* @param agencyId
* @return
*/
Integer selectTotalNext(String agencyId);
}

4
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java

@ -51,7 +51,9 @@ public interface IcBuildingDao extends BaseDao<IcBuildingEntity> {
List<IcBuildingExcel> searchAllBuilding(
@Param("building")IcBuildingEntity building, @Param("house")IcHouseEntity house);
List<CustomerAgencyEntity> selectAgencyChildrenList(@Param("agencyId") String agencyId);
List<CustomerAgencyEntity> selectAgencyChildrenList(@Param("customerId")String customerId,
@Param("pidsKey") String pidsKey,
@Param("pid")String pid);
List<Map<String, Object>> selectListByName(@Param("customerId") String customerId,
@Param("neighborNameList")ArrayList<String> strings,

27
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/BuildingService.java

@ -20,10 +20,7 @@ package com.epmet.service;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.BuildingTreeLevelDTO;
import com.epmet.dto.form.IcBuildingListFormDTO;
import com.epmet.dto.form.IcBulidingAddFormDTO;
import com.epmet.dto.form.IcHouseListFormDTO;
import com.epmet.dto.form.ImportInfoFormDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.BuildingResultDTO;
import com.epmet.dto.result.BuildingResultPagedDTO;
import com.epmet.dto.result.IcBuildingListResultDTO;
@ -57,7 +54,29 @@ public interface BuildingService {
void addBuilding(String customerId, IcBulidingAddFormDTO formDTO);
/**
* 房屋信息左侧树
* @param customerId
* @param staffId
* @return
*/
List<BuildingTreeLevelDTO> treeList(String customerId, String staffId);
/**
* 房屋信息左侧树
* @param houseManageTreeFormDTO
* @return 逐级展开用户点击树节点去查询
*/
BuildingTreeLevelDTO treeInit(HouseManageTreeFormDTO houseManageTreeFormDTO);
/**
* 房屋信息左侧树
* 点击树上节点查询下一级列表
* @param houseManageTreeFormDTO
* @return
*/
List<BuildingTreeLevelDTO> nextTreeNode(HouseManageTreeFormDTO houseManageTreeFormDTO);
List<String> treeIds(String customerId, String staffId);
PageData<IcBuildingListResultDTO> listBuilding(IcBuildingListFormDTO formDTO);

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

@ -1149,8 +1149,9 @@ public class AgencyServiceImpl implements AgencyService {
AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(orgId);
agencyOrgIdPath = getOrgIdPath(agencyInfo.getPids(), agencyInfo.getId());
List<String> currentUsingCommunityList = customerAgencyDao.getUsingCommunityList(customerId, orgId, agencyOrgIdPath, null);
List<String> preferUsingCommunityList = customerAgencyDao.getUsingCommunityList(customerId, orgId, agencyOrgIdPath, endTime);
return new UsingCommunityStatsResultDTO(currentUsingCommunityList.size(), currentUsingCommunityList.size() - preferUsingCommunityList.size());
// List<String> preferUsingCommunityList = customerAgencyDao.getUsingCommunityList(customerId, orgId, agencyOrgIdPath, endTime);
// return new UsingCommunityStatsResultDTO(currentUsingCommunityList.size(), currentUsingCommunityList.size() - preferUsingCommunityList.size());
return new UsingCommunityStatsResultDTO(currentUsingCommunityList.size(), 0);
} else if ("grid".equals(orgType)) {
// 网格下不会有该数据,给个0
return new UsingCommunityStatsResultDTO(0, 0);

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

@ -53,10 +53,7 @@ import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.concurrent.ExecutorService;
import java.util.stream.Collectors;
@ -181,7 +178,7 @@ public class BuildingServiceImpl implements BuildingService {
// agency.setAgencyId("77f6bc7f07064bf4c09ef848139a344c");
//1.获取所在组织及下级组织
CustomerAgencyEntity customerAgency = customerAgencyDao.selectById(agency.getAgencyId());
List<CustomerAgencyEntity> customerAgencyList = icBuildingDao.selectAgencyChildrenList(agency.getAgencyId());
List<CustomerAgencyEntity> customerAgencyList = icBuildingDao.selectAgencyChildrenList(customerId,agency.getAgencyId(),null);
customerAgencyList.add(customerAgency);
if (CollectionUtils.isEmpty(customerAgencyList)) {
@ -313,6 +310,184 @@ public class BuildingServiceImpl implements BuildingService {
}
/**
* 房屋信息左侧树
*
* @param formDTO
* @return 逐级展开用户点击树节点去查询
*/
@Override
public BuildingTreeLevelDTO treeInit(HouseManageTreeFormDTO formDTO) {
CustomerStaffInfoCacheResult staffInfoCacheResult=CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(),formDTO.getStaffId());
BuildingTreeLevelDTO resultDto = customerAgencyDao.selectAgencyTree(staffInfoCacheResult.getAgencyId());
if (null != resultDto) {
int showNum = customerAgencyDao.selectTotalNext(staffInfoCacheResult.getAgencyId());
resultDto.setShowNum(String.valueOf(showNum));
resultDto.setShowName(String.format("%s(%s)", resultDto.getLabel(), showNum));
List<BuildingTreeLevelDTO> children = customerAgencyDao.selectNextOrg(staffInfoCacheResult.getAgencyId());
for (BuildingTreeLevelDTO dto : children) {
if ("agency".equals(dto.getOrgType())) {
dto.setShowNum(String.valueOf(customerAgencyDao.selectTotalNext(dto.getId())));
dto.setShowName(String.format("%s(%s)", dto.getLabel(), dto.getShowNum()));
} else if ("grid".equals(dto.getOrgType())) {
LambdaQueryWrapper<IcNeighborHoodEntity> queryWrapper = new QueryWrapper<IcNeighborHoodEntity>().lambda()
.eq(IcNeighborHoodEntity::getGridId, dto.getId());
dto.setShowNum(String.valueOf(icNeighborHoodDao.selectCount(queryWrapper)));
dto.setShowName(String.format("%s(%s)", dto.getLabel(), dto.getShowNum()));
}
}
resultDto.setChildren(children);
}
return resultDto;
}
/**
* 房屋信息左侧树
* 点击树上节点查询下一级列表
*
* @param formDTO
* @return
*/
@Override
public List<BuildingTreeLevelDTO> nextTreeNode(HouseManageTreeFormDTO formDTO) {
/**
* level::::
* 省级:province
* 市级: city
* 区县级: district,
* 街道:street,
* 社区级community
* 网格grid
* 小区neighborHood
* 楼栋building
*/
List<BuildingTreeLevelDTO> resultList = new ArrayList<>();
if ("province".equals(formDTO.getLevel())
|| "city".equals(formDTO.getLevel())
|| "district".equals(formDTO.getLevel())
|| "street".equals(formDTO.getLevel())) {
List<BuildingTreeLevelDTO> list = customerAgencyDao.selectNextOrg(formDTO.getId());
for (BuildingTreeLevelDTO dto : list) {
if ("agency".equals(dto.getOrgType())) {
dto.setShowNum(String.valueOf(customerAgencyDao.selectTotalNext(dto.getId())));
dto.setShowName(String.format("%s(%s)", dto.getLabel(), dto.getShowNum()));
} else if ("grid".equals(dto.getOrgType())) {
LambdaQueryWrapper<IcNeighborHoodEntity> queryWrapper = new QueryWrapper<IcNeighborHoodEntity>().lambda()
.eq(IcNeighborHoodEntity::getGridId, dto.getId());
dto.setShowNum(String.valueOf(icNeighborHoodDao.selectCount(queryWrapper)));
dto.setShowName(String.format("%s(%s)", dto.getLabel(), dto.getShowNum()));
}
}
resultList.addAll(list);
} else if ("community".equals(formDTO.getLevel())) {
// 网格列表,需要计算网格下小区数量
resultList.addAll(getGridTreeNode(formDTO.getId()));
} else if ("grid".equals(formDTO.getLevel())) {
// 小区列表,需要计算小区下楼栋数量
resultList.addAll(getNeighborHoodTreeNode(formDTO.getId()));
} else if ("neighborHood".equals(formDTO.getLevel())) {
// 楼栋列表,需要计算楼栋下 实有房屋数/楼栋总户数
resultList.addAll(getBuildTreeNode(formDTO.getId()));
} else if ("building".equals(formDTO.getLevel())) {
// 直接返回
return resultList;
}
return resultList;
}
private List<BuildingTreeLevelDTO> getGridTreeNode(String agencyId) {
List<BuildingTreeLevelDTO> list = new ArrayList<>();
LambdaQueryWrapper<CustomerGridEntity> gridWrapper = new LambdaQueryWrapper<>();
gridWrapper.eq(CustomerGridEntity::getPid, agencyId);
gridWrapper.last("ORDER BY sort,CAST(GRID_NAME AS SIGNED),CONVERT(GRID_NAME using gbk)");
List<CustomerGridEntity> customerGridList = customerGridDao.selectList(gridWrapper);
customerGridList.forEach(gridEntity -> {
BuildingTreeLevelDTO resultDto = new BuildingTreeLevelDTO();
resultDto.setId(gridEntity.getId());
resultDto.setLabel(gridEntity.getGridName());
resultDto.setLevel("grid");
resultDto.setPId(gridEntity.getPid());
resultDto.setLongitude(gridEntity.getLongitude());
resultDto.setLatitude(gridEntity.getLatitude());
resultDto.setChildren(new ArrayList<>());
// 当前网格下有几个小区
LambdaQueryWrapper<IcNeighborHoodEntity> neighborhoodWrapper = new QueryWrapper<IcNeighborHoodEntity>().lambda()
.eq(IcNeighborHoodEntity::getGridId, resultDto.getId());
resultDto.setShowNum(String.valueOf(icNeighborHoodDao.selectCount(neighborhoodWrapper)));
resultDto.setShowName(String.format("%s(%s)", resultDto.getLabel(), resultDto.getShowNum()));
list.add(resultDto);
});
return list;
}
private List<BuildingTreeLevelDTO> getNeighborHoodTreeNode(String gridId) {
List<BuildingTreeLevelDTO> list = new ArrayList<>();
// 当前网格下有几个小区
LambdaQueryWrapper<IcNeighborHoodEntity> neighborhoodWrapper = new QueryWrapper<IcNeighborHoodEntity>().lambda()
.eq(IcNeighborHoodEntity::getGridId, gridId)
.last("ORDER BY CAST(NEIGHBOR_HOOD_NAME AS SIGNED),CONVERT(NEIGHBOR_HOOD_NAME using gbk)");
;
List<IcNeighborHoodEntity> neighborHoodEntityList = icNeighborHoodDao.selectList(neighborhoodWrapper);
neighborHoodEntityList.forEach(item -> {
BuildingTreeLevelDTO neighborHood = new BuildingTreeLevelDTO();
neighborHood.setId(item.getId());
neighborHood.setPId(item.getGridId());
neighborHood.setLabel(item.getNeighborHoodName());
neighborHood.setLevel("neighborHood");
neighborHood.setLongitude(item.getLongitude());
neighborHood.setLatitude(item.getLatitude());
neighborHood.setChildren(new ArrayList<>());
// 当前小区下,有几栋楼
LambdaQueryWrapper<IcBuildingEntity> buildingQueryWrapper = new QueryWrapper<IcBuildingEntity>().lambda()
.eq(IcBuildingEntity::getNeighborHoodId, neighborHood.getId());
neighborHood.setShowNum(String.valueOf(icBuildingDao.selectCount(buildingQueryWrapper)));
neighborHood.setShowName(String.format("%s(%s)", neighborHood.getLabel(), neighborHood.getShowNum()));
list.add(neighborHood);
});
return list;
}
private List<BuildingTreeLevelDTO> getBuildTreeNode(String neighborHoodId) {
List<BuildingTreeLevelDTO> list = new ArrayList<>();
LambdaQueryWrapper<IcBuildingEntity> buildingQueryWrapper = new QueryWrapper<IcBuildingEntity>().lambda()
.in(IcBuildingEntity::getNeighborHoodId, neighborHoodId)
.last("ORDER BY SORT, CAST(BUILDING_NAME AS SIGNED),CONVERT(BUILDING_NAME USING gbk)");
List<IcBuildingEntity> icBuildingList = icBuildingDao.selectList(buildingQueryWrapper);
// 获取楼里已经有多少个房屋
LambdaQueryWrapper<IcHouseEntity> icHouseEntityWrapper = new QueryWrapper<IcHouseEntity>().lambda()
.eq(IcHouseEntity::getNeighborHoodId, neighborHoodId)
.select(IcHouseEntity::getId)
.select(IcHouseEntity::getBuildingId);
List<IcHouseEntity> buildingHouseCount = icHouseDao.selectList(icHouseEntityWrapper);
Map<String, Long> buildingHouseCountMap = buildingHouseCount.stream().collect(Collectors.groupingBy(IcHouseEntity::getBuildingId, Collectors.counting()));
icBuildingList.forEach(item -> {
BuildingTreeLevelDTO building = new BuildingTreeLevelDTO();
building.setId(item.getId());
building.setPId(item.getNeighborHoodId());
building.setLabel(item.getBuildingName());
building.setLevel("building");
building.setLongitude(item.getLongitude());
building.setLatitude(item.getLatitude());
building.setChildren(new ArrayList<>());
// 当前楼栋共有多少户,有多少户有人住
building.setShowNum(StrConstant.EPMETY_STR);
// 楼栋总户数
Integer total = null == item.getTotalHouseNum() ? NumConstant.ZERO : item.getTotalHouseNum();
// 实际已录入的总房屋数
int count = buildingHouseCountMap.getOrDefault(item.getId(), NumConstant.ZERO_L).intValue();
if (NumConstant.ZERO == total) {
building.setShowNum(String.format("%s/%s", count, count));
} else {
building.setShowNum(String.format("%s/%s", count, total));
}
building.setShowName(String.format("%s(%s)", building.getLabel(), building.getShowNum()));
list.add(building);
});
return list;
}
/**
* Desc:
* 2022-06-06 需求变动只返回当前组织下级ID
@ -441,6 +616,7 @@ public class BuildingServiceImpl implements BuildingService {
private List<BuildingTreeLevelDTO> covertToTree(CustomerAgencyEntity customerAgency, List<BuildingTreeLevelDTO> agencyList) {
BuildingTreeLevelDTO buildingTreeLevelDTO = new BuildingTreeLevelDTO();
buildingTreeLevelDTO.setId(customerAgency.getId());
buildingTreeLevelDTO.setPId(customerAgency.getPid());
buildingTreeLevelDTO.setLabel(customerAgency.getOrganizationName());
buildingTreeLevelDTO.setLevel(customerAgency.getLevel());
buildingTreeLevelDTO.setLongitude(customerAgency.getLongitude());

3
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java

@ -238,6 +238,9 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu
@Override
public Result<GridDetailResultDTO> griddetail(CustomerGridFormDTO customerGridFormDTO) {
GridDetailResultDTO griddetail = baseDao.griddetail(customerGridFormDTO);
if(null==griddetail){
return new Result<>();
}
List<UserIdAndPidDTO> customerStaffGridDTOS = baseDao.selectUserIdByGridId(customerGridFormDTO);
//获取人员具体信息(头像、名字...)
Result<List<StaffGridListDTO>> staffGridList = epmetUserFeignClient.getStaffGridList(customerStaffGridDTOS);

3
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java

@ -724,6 +724,7 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver {
resultDTO.setOrgId(formDTO.getOrgId());
resultDTO.setOrgType(formDTO.getOrgType());
/*应烟台要求 页面去掉较上月的数据后端程序也去掉提升接口相应时间
// 加载上个月,该组织的人房统计信息,并且计算较上月信息
Date lastDayOfLastMonth = DateUtils.getLastDayOfMonth(DateUtils.addDateMonths(new Date(), -1));
UserHouseStatsQueryFormDTO form = new UserHouseStatsQueryFormDTO(formDTO.getOrgId(), formDTO.getOrgType(), DateUtils.format(lastDayOfLastMonth, "yyyyMMdd"));
@ -733,7 +734,7 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver {
resultDTO.setHouseTotalJSY(resultDTO.getHouseTotal() - lastMonthUserHouseStats.getHouseTotal());
resultDTO.setCzHouseTotalJSY(resultDTO.getCzHouseTotal() - lastMonthUserHouseStats.getCzHouseTotal());
resultDTO.setXzHouseTotalJSY(resultDTO.getXzHouseTotal() - lastMonthUserHouseStats.getXzHouseTotal());
resultDTO.setZzHouseTotalJSY(resultDTO.getZzHouseTotal() - lastMonthUserHouseStats.getZzHouseTotal());
resultDTO.setZzHouseTotalJSY(resultDTO.getZzHouseTotal() - lastMonthUserHouseStats.getZzHouseTotal());*/
return resultDTO;
}

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

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.constant.Constant;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
@ -280,12 +281,16 @@ public class IcEnterpriseServiceImpl extends BaseServiceImpl<IcEnterpriseDao, Ic
* @param enterpriseId
* @return
*/
@NoRepeatSubmit
@Transactional(rollbackFor = Exception.class)
@Override
public void delete(String enterpriseId, String customerId, String userId) {
//如果是编辑判断下权限要删除的记录的agencyId要与当前登录用户的agencyId一致
IcEnterpriseEntity origin = baseDao.selectById(enterpriseId);
if(null==origin){
// 已经不存在了,返回!
return;
}
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, userId);
if (!staffInfo.getAgencyId().equals(origin.getAgencyId())) {
AgencyInfoCache orginAgencyInfo = CustomerOrgRedis.getAgencyInfo(origin.getAgencyId());

65
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml

@ -1055,4 +1055,69 @@
</select>
<select id="selectAgencyTree" parameterType="java.lang.String" resultType="com.epmet.dto.BuildingTreeLevelDTO">
SELECT
ca.ID as id,
ca.ORGANIZATION_NAME as label,
ca.LONGITUDE as longitude,
ca.LATITUDE as latitude,
ca.`LEVEL` as level,
ca.PID as pId,
'agency' AS orgType
FROM
customer_agency ca
WHERE
ca.ID = #{agencyId}
AND ca.DEL_FLAG = '0'
</select>
<select id="selectNextOrg" parameterType="java.lang.String" resultType="com.epmet.dto.BuildingTreeLevelDTO">
(SELECT ca.ID as id,
ca.ORGANIZATION_NAME as label,
ca.LONGITUDE as longitude,
ca.LATITUDE as latitude,
ca.`LEVEL` as level,
ca.PID as pId,
'agency' AS orgType
FROM customer_agency ca
WHERE ca.PID = #{agencyId}
AND ca.DEL_FLAG = '0'
ORDER BY CAST(ca.organization_name AS SIGNED), CONVERT(ca.organization_name using gbk))
union all
(SELECT cg.id,
cg.GRID_NAME AS label,
cg.LONGITUDE,
cg.LATITUDE,
'grid' AS LEVEL,
cg.PID,
'grid' AS orgType
FROM customer_grid cg
WHERE cg.DEL_FLAG = '0'
AND cg.PID = #{agencyId}
ORDER BY cg.sort, CAST(cg.GRID_NAME AS SIGNED), CONVERT(cg.GRID_NAME using gbk))
</select>
<select id="selectTotalNext" parameterType="java.lang.String" resultType="java.lang.Integer">
SELECT
sum( t.total )
FROM
(
SELECT
count( a.id ) AS total
FROM
customer_agency a
WHERE
a.PID = #{agencyId}
AND a.DEL_FLAG = '0'
UNION all
SELECT
count( g.id ) AS total
FROM
customer_grid g
WHERE
g.PID = #{agencyId}
AND g.DEL_FLAG = '0'
) t
</select>
</mapper>

13
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml

@ -190,13 +190,20 @@
ca.organization_name AS organizationName,
ca.LEVEL AS LEVEL,
ca.pid as pid,
ca.pids as pids
ca.pids as pids,
ca.LONGITUDE longitude,
ca.LATITUDE latitude
FROM
customer_agency ca
WHERE
ca.del_flag = '0'
and
CONCAT(':',ca.pids, ':') like CONCAT('%:',#{agencyId},':%')
and ca.customer_id = #{customerId}
<if test=" null != pidsKey and pidsKey.trim() != ''">
and CONCAT(':',ca.pids, ':') like CONCAT('%:',#{pidsKey},':%')
</if>
<if test=" null != pid and pid.trim() != ''">
and ca.pid = #{pid}
</if>
ORDER BY CAST(organization_name AS SIGNED),CONVERT(organization_name using gbk)
</select>

10
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml

@ -128,6 +128,16 @@
<where>
1 = 1
and a.del_flag = '0'
<if test=" orgType == 'grid'">
<if test="orgId != null and orgId != ''">
AND c.GRID_ID = #{orgId}
</if>
</if>
<if test=" orgType == 'agency'">
<if test="orgId != null and orgId != ''">
and (c.AGENCY_ID =#{orgId} or c.AGENCY_PIDS like concat('%',#{orgId},'%') )
</if>
</if>
<if test="pids != null and pids != ''">
and case c.AGENCY_PIDS when '' then CONCAT(c.AGENCY_ID) like CONCAT(#{pids}, '%')
else CONCAT(c.AGENCY_PIDS, ':', c.AGENCY_ID) like CONCAT(#{pids}, '%') end

88
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java

@ -537,8 +537,10 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
}
}
});
//2.1:批量更新发布范围表数据
articlePublishRangeService.updateBatchById(offLineList);
if(!CollectionUtils.isEmpty(offLineList)){
//2.1:批量更新发布范围表数据
articlePublishRangeService.updateBatchById(offLineList);
}
//3:根据是否全部下线更新文章主表数据
ArticleEntity entity = new ArticleEntity();
@ -1740,47 +1742,47 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
PublishedListResultDTO resultDTO = new PublishedListResultDTO();
//1.查询文章主表信息
List<PublishedListResultDTO> list = baseDao.selectAllArticle(formDTO);
if (!CollectionUtils.isEmpty(list)) {
resultDTO = list.get(NumConstant.ZERO);
resultDTO.setTagNameList(StringUtils.isNotBlank(resultDTO.getTags())?Arrays.asList(resultDTO.getTags().split("[|]")):new ArrayList<>());
resultDTO.setIsMePublished(resultDTO.getCreatedBy().equals(formDTO.getStaffId())?true:false);
//查询文章涉及的发布范围网络Id列表
LambdaQueryWrapper<ArticlePublishRangeEntity> tWrapper = new LambdaQueryWrapper<>();
tWrapper.eq(ArticlePublishRangeEntity::getArticleId, formDTO.getArticleId());
tWrapper.eq(ArticlePublishRangeEntity::getDelFlag, NumConstant.ZERO_STR);
//【文章下线的查所有发布范围,文章没下线的只查还没下线的发布范围】
if("offline".equals(resultDTO.getStatusFlag())){
tWrapper.eq(ArticlePublishRangeEntity::getPublishStatus, "offline");
}else {
tWrapper.eq(ArticlePublishRangeEntity::getPublishStatus, "published");
}
List<ArticlePublishRangeEntity> entityList = articlePublishRangeDao.selectList(tWrapper);
if (!CollectionUtils.isEmpty(entityList)) {
List<String> contentList = entityList.stream().map(ArticlePublishRangeEntity::getGridId).collect(Collectors.toList());
resultDTO.setGridIdList(contentList);
}
//查询文章内容
LambdaQueryWrapper<ArticleContentEntity> tWrapper1 = new LambdaQueryWrapper<>();
tWrapper1.eq(ArticleContentEntity::getArticleId, formDTO.getArticleId());
tWrapper1.eq(ArticleContentEntity::getDelFlag, NumConstant.ZERO_STR);
tWrapper1.orderByDesc(ArticleContentEntity::getOrderNum);
List<ArticleContentEntity> contentEntityList = articleContentDao.selectList(tWrapper1);
if (!CollectionUtils.isEmpty(contentEntityList)) {
List<PublishedListResultDTO.Content> contentList = ConvertUtils.sourceToTarget(contentEntityList, PublishedListResultDTO.Content.class);
resultDTO.setContentList(contentList);
}
//标签列表
LambdaQueryWrapper<ArticleTagsEntity> tWrapper2 = new LambdaQueryWrapper<>();
tWrapper2.eq(ArticleTagsEntity::getArticleId, formDTO.getArticleId());
tWrapper2.eq(ArticleTagsEntity::getDelFlag, NumConstant.ZERO_STR);
List<ArticleTagsEntity> tagsEntityList = articleTagsDao.selectList(tWrapper2);
if (!CollectionUtils.isEmpty(tagsEntityList)) {
List<String> contentList = tagsEntityList.stream().map(ArticleTagsEntity::getTagId).collect(Collectors.toList());
resultDTO.setTagIdList(contentList);
}
if(CollectionUtils.isEmpty(list)){
return null;
}
resultDTO = list.get(NumConstant.ZERO);
resultDTO.setTagNameList(StringUtils.isNotBlank(resultDTO.getTags())?Arrays.asList(resultDTO.getTags().split("[|]")):new ArrayList<>());
resultDTO.setIsMePublished(resultDTO.getCreatedBy().equals(formDTO.getStaffId())?true:false);
//查询文章涉及的发布范围网络Id列表
LambdaQueryWrapper<ArticlePublishRangeEntity> tWrapper = new LambdaQueryWrapper<>();
tWrapper.eq(ArticlePublishRangeEntity::getArticleId, formDTO.getArticleId());
tWrapper.eq(ArticlePublishRangeEntity::getDelFlag, NumConstant.ZERO_STR);
//【文章下线的查所有发布范围,文章没下线的只查还没下线的发布范围】
if("offline".equals(resultDTO.getStatusFlag())){
tWrapper.eq(ArticlePublishRangeEntity::getPublishStatus, "offline");
}else {
tWrapper.eq(ArticlePublishRangeEntity::getPublishStatus, "published");
}
List<ArticlePublishRangeEntity> entityList = articlePublishRangeDao.selectList(tWrapper);
if (!CollectionUtils.isEmpty(entityList)) {
List<String> contentList = entityList.stream().map(ArticlePublishRangeEntity::getGridId).collect(Collectors.toList());
resultDTO.setGridIdList(contentList);
}
//查询文章内容
LambdaQueryWrapper<ArticleContentEntity> tWrapper1 = new LambdaQueryWrapper<>();
tWrapper1.eq(ArticleContentEntity::getArticleId, formDTO.getArticleId());
tWrapper1.eq(ArticleContentEntity::getDelFlag, NumConstant.ZERO_STR);
tWrapper1.orderByDesc(ArticleContentEntity::getOrderNum);
List<ArticleContentEntity> contentEntityList = articleContentDao.selectList(tWrapper1);
if (!CollectionUtils.isEmpty(contentEntityList)) {
List<PublishedListResultDTO.Content> contentList = ConvertUtils.sourceToTarget(contentEntityList, PublishedListResultDTO.Content.class);
resultDTO.setContentList(contentList);
}
//标签列表
LambdaQueryWrapper<ArticleTagsEntity> tWrapper2 = new LambdaQueryWrapper<>();
tWrapper2.eq(ArticleTagsEntity::getArticleId, formDTO.getArticleId());
tWrapper2.eq(ArticleTagsEntity::getDelFlag, NumConstant.ZERO_STR);
List<ArticleTagsEntity> tagsEntityList = articleTagsDao.selectList(tWrapper2);
if (!CollectionUtils.isEmpty(tagsEntityList)) {
List<String> contentList = tagsEntityList.stream().map(ArticleTagsEntity::getTagId).collect(Collectors.toList());
resultDTO.setTagIdList(contentList);
}
return resultDTO;

21
epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/person/controller/BadgeController.java

@ -1,14 +1,13 @@
package com.epmet.modules.person.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.CertificationAddFormDTO;
import com.epmet.dto.form.OpenedOrClosedFormDTO;
import com.epmet.modules.person.service.BadgeService;
import com.epmet.resi.mine.dto.from.BadgeListFormDTO;
import com.epmet.resi.mine.dto.from.OperListFormDTO;
import com.epmet.resi.mine.dto.result.BadgeListResultDTO;
import com.epmet.resi.mine.dto.result.OperListResultDTO;
import org.springframework.beans.factory.annotation.Autowired;
@ -37,9 +36,11 @@ public class BadgeController {
* @date 2020/11/3 4:11 下午
*/
@PostMapping("list")
public Result<List<BadgeListResultDTO>> getBadgeList(@LoginUser TokenDto tokenDto,@RequestBody BadgeListFormDTO badgeListFormDTO){
ValidatorUtils.validateEntity(badgeListFormDTO, BadgeListFormDTO.BadgeList.class);
return new Result<List<BadgeListResultDTO>>().ok(badgeService.getBadgeList(tokenDto,badgeListFormDTO));
// public Result<List<BadgeListResultDTO>> getBadgeList(@LoginUser TokenDto tokenDto,@RequestBody BadgeListFormDTO badgeListFormDTO){
public Result<List<BadgeListResultDTO>> getBadgeList(@LoginUser TokenDto tokenDto){
// ValidatorUtils.validateEntity(badgeListFormDTO, BadgeListFormDTO.BadgeList.class);
// return new Result<List<BadgeListResultDTO>>().ok(badgeService.getBadgeList(tokenDto,badgeListFormDTO));
return new Result<List<BadgeListResultDTO>>().ok(badgeService.getBadgeList(tokenDto.getCustomerId(),tokenDto.getUserId()));
}
/**
@ -49,9 +50,11 @@ public class BadgeController {
* @date 2020/11/3 4:28 下午
*/
@PostMapping("operlist")
public Result<List<OperListResultDTO>> getOperList(@LoginUser TokenDto tokenDto,@RequestBody OperListFormDTO operListFormDTO){
ValidatorUtils.validateEntity(operListFormDTO, OperListFormDTO.OperList.class);
return new Result<List<OperListResultDTO>>().ok(badgeService.getOperList(tokenDto,operListFormDTO));
// public Result<List<OperListResultDTO>> getOperList(@LoginUser TokenDto tokenDto,@RequestBody OperListFormDTO operListFormDTO){
public Result<List<OperListResultDTO>> getOperList(@LoginUser TokenDto tokenDto){
// ValidatorUtils.validateEntity(operListFormDTO, OperListFormDTO.OperList.class);
// return new Result<List<OperListResultDTO>>().ok(badgeService.getOperList(tokenDto,operListFormDTO));
return new Result<List<OperListResultDTO>>().ok(badgeService.getOperList(tokenDto.getCustomerId(),tokenDto.getUserId()));
}
/**
@ -61,8 +64,10 @@ public class BadgeController {
* @author zxc
* @date 2020/11/4 11:16 上午
*/
@NoRepeatSubmit
@PostMapping("certification/add")
public Result certificationAdd(@LoginUser TokenDto tokenDto,@RequestBody CertificationAddFormDTO certificationAddFormDTO){
certificationAddFormDTO.setUserId(tokenDto.getUserId());
ValidatorUtils.validateEntity(certificationAddFormDTO, CertificationAddFormDTO.CertificationAdd.class);
return badgeService.certificationAdd(tokenDto,certificationAddFormDTO);
}

8
epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/person/service/BadgeService.java

@ -4,8 +4,6 @@ import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.CertificationAddFormDTO;
import com.epmet.dto.form.OpenedOrClosedFormDTO;
import com.epmet.resi.mine.dto.from.BadgeListFormDTO;
import com.epmet.resi.mine.dto.from.OperListFormDTO;
import com.epmet.resi.mine.dto.result.BadgeListResultDTO;
import com.epmet.resi.mine.dto.result.OperListResultDTO;
@ -23,7 +21,8 @@ public interface BadgeService {
* @author zxc
* @date 2020/11/3 4:11 下午
*/
List<BadgeListResultDTO> getBadgeList(TokenDto tokenDto,BadgeListFormDTO badgeListFormDTO);
// List<BadgeListResultDTO> getBadgeList(TokenDto tokenDto,BadgeListFormDTO badgeListFormDTO);
List<BadgeListResultDTO> getBadgeList(String customerId,String userId);
/**
* @Description 个人中心-获取徽章可操作列表点亮取消认证
@ -31,7 +30,8 @@ public interface BadgeService {
* @author zxc
* @date 2020/11/3 4:28 下午
*/
List<OperListResultDTO> getOperList(TokenDto tokenDto,OperListFormDTO operListFormDTO);
// List<OperListResultDTO> getOperList(TokenDto tokenDto,OperListFormDTO operListFormDTO);
List<OperListResultDTO> getOperList(String customerId,String userId);
/**
* @Description 个人中心-提交徽章认证

15
epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/person/service/impl/BadgeServiceImpl.java

@ -12,8 +12,6 @@ import com.epmet.dto.result.UserBadgeListResultDTO;
import com.epmet.dto.result.UserOperListResultDTO;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.modules.person.service.BadgeService;
import com.epmet.resi.mine.dto.from.BadgeListFormDTO;
import com.epmet.resi.mine.dto.from.OperListFormDTO;
import com.epmet.resi.mine.dto.result.BadgeListResultDTO;
import com.epmet.resi.mine.dto.result.OperListResultDTO;
import lombok.extern.slf4j.Slf4j;
@ -41,10 +39,10 @@ public class BadgeServiceImpl implements BadgeService {
* @date 2020/11/3 4:11 下午
*/
@Override
public List<BadgeListResultDTO> getBadgeList(TokenDto tokenDto,BadgeListFormDTO badgeListFormDTO) {
public List<BadgeListResultDTO> getBadgeList(String customerId,String userId) {
UserBadgeListFormDTO form = new UserBadgeListFormDTO();
form.setCustomerId(badgeListFormDTO.getCustomerId());
form.setUserId(tokenDto.getUserId());
form.setCustomerId(customerId);
form.setUserId(userId);
Result<List<UserBadgeListResultDTO>> listResult = epmetUserOpenFeignClient.selectBadgeList(form);
if (!listResult.success()){
throw new RenException("获取徽章点亮列表失败......");
@ -63,10 +61,10 @@ public class BadgeServiceImpl implements BadgeService {
* @date 2020/11/3 4:28 下午
*/
@Override
public List<OperListResultDTO> getOperList(TokenDto tokenDto,OperListFormDTO operListFormDTO) {
public List<OperListResultDTO> getOperList(String customerId,String userId) {
UserOperListFormDTO userOperListFormDTO = new UserOperListFormDTO();
userOperListFormDTO.setCustomerId(operListFormDTO.getCustomerId());
userOperListFormDTO.setUserId(tokenDto.getUserId());
userOperListFormDTO.setCustomerId(customerId);
userOperListFormDTO.setUserId(userId);
Result<List<UserOperListResultDTO>> listResult = epmetUserOpenFeignClient.selectOperList(userOperListFormDTO);
if (!listResult.success()){
throw new RenException("获取徽章列表失败......");
@ -87,7 +85,6 @@ public class BadgeServiceImpl implements BadgeService {
*/
@Override
public Result certificationAdd(TokenDto tokenDto, CertificationAddFormDTO certificationAddFormDTO) {
certificationAddFormDTO.setUserId(tokenDto.getUserId());
Result result = epmetUserOpenFeignClient.authBadgeRecord(certificationAddFormDTO);
return result;
}

2
epmet-user/epmet-user-client/src/main/java/com/epmet/constant/BadgeConstant.java

@ -36,7 +36,7 @@ public interface BadgeConstant {
String GET_BADGE_NAME_FAILURE = "获取徽章名称失败......";
String MESSAGE_CONTENT = "您有一条徽章认证消,,%s申请认证%s,请审核";
String MESSAGE_CONTENT = "您有一条徽章认证消,,%s申请认证%s,请审核";
String READ_FLAG = "unread";

33
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/InternalDelIcResiUserFormDTO.java

@ -0,0 +1,33 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.enums.IcFormCodeEnum;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.util.List;
/**
* @Description
* @Author yzm
* @Date 2023/1/11 15:26
*/
@Data
public class InternalDelIcResiUserFormDTO {
public interface DefaultGroup {
}
private List<String> icResiUserIds;
private String formCode = IcFormCodeEnum.RESI_BASE_INFO.getCode();
@NotBlank(message = "token获取的customerId不能为空", groups = DefaultGroup.class)
private String customerId;
@NotBlank(message = "token获取的userId不能为空", groups = DefaultGroup.class)
private String currentStaffId;
@NotBlank(message = "agencyId不能为空", groups = DefaultGroup.class)
private String agencyId;
}

9
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/NatListDTO.java

@ -1,9 +1,11 @@
package com.epmet.dto.result;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
* @Description
@ -17,4 +19,11 @@ public class NatListDTO implements Serializable {
private String testTime;
private String address;
private String result;
//01.11,增加以下两个参数
private String idNatId;
/**
* 采样时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date sampleTime;
}

6
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicPreventionController.java

@ -99,6 +99,12 @@ public class IcEpidemicPreventionController{
return new Result<EpidemicPreventionResultDTO>().ok(result);
}
/**
* 居民防疫信息-点击查看
* @param tokenDto
* @param formDTO
* @return
*/
@PostMapping("info")
public Result<EpidemicPreventionInfoDTO> info(@LoginUser TokenDto tokenDto, @RequestBody EpidemicPreventionFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());

25
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java

@ -225,7 +225,32 @@ public class IcResiUserController implements ResultDataResolver {
return new Result();
}
/**
* 该接口供开发人员手动调用
* 项目上经常要求删除某个社区的人房数据 索性写一个接口供开发人员调用
* @param tokenDto
* @param formDTO
* @return
*/
@NoRepeatSubmit
@PostMapping("delete-interal")
public Result deleteInternal(@LoginUser TokenDto tokenDto, @RequestBody InternalDelIcResiUserFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setCurrentStaffId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO, InternalDelIcResiUserFormDTO.DefaultGroup.class);
icResiUserService.deleteInternal(formDTO);
//推送MQ事件
IcResiUserAddMQMsg mqMsg = new IcResiUserAddMQMsg();
mqMsg.setCustomerId(tokenDto.getCustomerId());
// mqMsg.setIcResiUser(userId);
SystemMsgFormDTO form = new SystemMsgFormDTO();
form.setMessageType(SystemMessageType.IC_RESI_USER_DEL);
form.setContent(mqMsg);
epmetMessageOpenFeignClient.sendSystemMsgByMQ(form);
log.error(String.format("!!!!!当前组织下的居民已删除agencyId:%s",formDTO.getAgencyId()));
return new Result();
}
/**
* @Author sun
* @Description 党建互联平台--保存居民信息

6
epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java

@ -53,6 +53,12 @@ public interface IcResiUserService extends BaseService<IcResiUserEntity> {
*/
void delete(DelIcResiUserFormDTO formDTO);
/**
* 开发人员掉员工此接口
* @param formDTO
*/
void deleteInternal(InternalDelIcResiUserFormDTO formDTO);
/**
* @Author sun
* @Description 党建互联平台--保存居民信息

26
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatServiceImpl.java

@ -457,18 +457,24 @@ public class IcNatServiceImpl extends BaseServiceImpl<IcNatDao, IcNatEntity> imp
}
return list.stream().map(item -> {
NatListDTO dto = new NatListDTO();
dto.setIdNatId(item.getId());
dto.setSampleTime(item.getSampleTime());
dto.setAddress(item.getNatAddress());
dto.setTestTime(DateUtils.format(item.getNatTime(), DateUtils.DATE_TIME_PATTERN_END_WITH_MINUTE));
switch (item.getNatResult())
{
case NumConstant.ZERO_STR:
dto.setResult("阴性");
break;
case NumConstant.ONE_STR:
dto.setResult("阳性");
break;
default:
dto.setResult("未知");
if(StringUtils.isNotBlank(item.getNatResult())){
switch (item.getNatResult())
{
case NumConstant.ZERO_STR:
dto.setResult("阴性");
break;
case NumConstant.ONE_STR:
dto.setResult("阳性");
break;
default:
dto.setResult("未知");
}
}else{
dto.setResult("未知");
}
return dto;
}).collect(Collectors.toList());

35
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java

@ -213,6 +213,38 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
icUserChangeDetailedService.deleteByIcResiUserId(formDTO.getIcResiUserId(),formDTO.getCurrentStaffId());
}
/**
* 该接口供开发人员手动调用
* 项目上经常要求删除某个社区的人房数据 索性写一个接口供开发人员调用
* @param formDTO
* @return
*/
@Override
@Transactional(rollbackFor = Exception.class)
public void deleteInternal(InternalDelIcResiUserFormDTO formDTO){
if(StringUtils.isNotBlank(formDTO.getAgencyId())){
LambdaQueryWrapper<IcResiUserEntity> resiWrapper=new LambdaQueryWrapper<>();
resiWrapper.eq(IcResiUserEntity::getAgencyId,formDTO.getAgencyId());
resiWrapper.select(IcResiUserEntity::getId);
List<IcResiUserEntity> resiIds=icResiUserDao.selectList(resiWrapper);
for(IcResiUserEntity entity:resiIds){
baseDao.updateToDel(entity.getId(),formDTO.getCurrentStaffId());
CustomerFormQueryDTO queryDTO = ConvertUtils.sourceToTarget(formDTO, CustomerFormQueryDTO.class);
Result<Set<String>> subTableRes = operCustomizeOpenFeignClient.queryIcResiSubTables(queryDTO);
if (subTableRes.success() && !CollectionUtils.isEmpty(subTableRes.getData())) {
for (String subTalbeName : subTableRes.getData()) {
baseDao.updateSubTableToDel(subTalbeName, entity.getId(),formDTO.getCurrentStaffId());
}
}
//删除ic_user_transfer_record、ic_user_change_record、ic_user_change_detailed
icUserTransferRecordService.deleteByIcResiUserId(entity.getId(),formDTO.getCurrentStaffId());
icUserChangeRecordService.deleteByIcResiUserId(entity.getId(),formDTO.getCurrentStaffId());
icUserChangeDetailedService.deleteByIcResiUserId(entity.getId(),formDTO.getCurrentStaffId());
}
}
}
/**
* @Author sun
* @Description 党建互联平台--保存居民信息
@ -2112,6 +2144,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
resultDTO.setOrgId(formDTO.getOrgId());
resultDTO.setOrgType(formDTO.getOrgType());
/*应烟台要求 页面去掉较上月的数据后端程序也去掉提升接口相应时间
// 计算较上月的数据
Date lastDayOfLastMonth = DateUtils.getLastDayOfMonth(DateUtils.addDateMonths(new Date(), -1));
UserHouseStatsQueryFormDTO form = new UserHouseStatsQueryFormDTO(formDTO.getOrgId(), formDTO.getOrgType(), DateUtils.format(lastDayOfLastMonth, "yyyyMMdd"));
@ -2120,7 +2153,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
resultDTO.setUserTotalJSY(resultDTO.getUserTotal() - lastMonthUserHouseStats.getUserTotal());
resultDTO.setCzUserTotalJSY(resultDTO.getCzUserTotal() - lastMonthUserHouseStats.getCzUserTotal());
resultDTO.setLdUserTotalJSY(resultDTO.getLdUserTotal() - lastMonthUserHouseStats.getLdUserTotal());
resultDTO.setLdUserTotalJSY(resultDTO.getLdUserTotal() - lastMonthUserHouseStats.getLdUserTotal());*/
return resultDTO;
}

3
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java

@ -3,6 +3,7 @@ package com.epmet.service.impl;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
@ -255,7 +256,7 @@ public class UserBadgeServiceImpl implements UserBadgeService {
// 校验这个徽章此人有没有
Integer recordCount = userBadgeCertificateRecordDao.selectIsExist(certificationAddFormDTO.getBadgeId(), certificationAddFormDTO.getUserId());
if (recordCount>NumConstant.ZERO){
throw new RenException("不允许重复提交审核");
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"不允许重复提交审核","已存在认证记录,不允许重复提交审核");
}
log.info(JSON.toJSONString(certificationAddFormDTO));
AuthFieldFormDTO authFieldFormDTO = new AuthFieldFormDTO();

BIN
epmet-user/epmet-user-server/src/main/resources/excel/attention_vaccination_template.xlsx

Binary file not shown.

2
epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml

@ -861,7 +861,7 @@
FROM
ic_resi_user a
LEFT JOIN (
SELECT ID_CARD, count( id ) AS count
SELECT ID_CARD, count(distinct INOCULATE_TIME ) AS count
FROM ic_vaccine
WHERE DEL_FLAG = '0' AND CUSTOMER_ID = #{customerId}
<if test="startDate != null and startDate != ''">

Loading…
Cancel
Save