diff --git a/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.12__up_sys_dict_data.sql b/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.12__up_sys_dict_data.sql new file mode 100644 index 0000000000..7d93d8bc97 --- /dev/null +++ b/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.12__up_sys_dict_data.sql @@ -0,0 +1,17 @@ + + +UPDATE `epmet_admin`.`sys_dict_data` SET `id` = '1000000000000000220', `dict_label` = '区域化党建单位--楼宇党建' +WHERE (`id` = '1000000000000000200'); +UPDATE `epmet_admin`.`sys_dict_data` SET `id` = '1000000000000000221', `dict_label` = '区域化党建单位--两新组织' +WHERE (`id` = '1000000000000000201'); +UPDATE `epmet_admin`.`sys_dict_data` SET `id` = '1000000000000000222', `dict_label` = '区域化党建单位--区域单位党建' +WHERE (`id` = '1000000000000000202'); +UPDATE `epmet_admin`.`sys_dict_data` SET `id` = '1000000000000000223', `dict_label` = '区域化党建单位--机关直属部门' +WHERE (`id` = '1000000000000000203'); +UPDATE `epmet_admin`.`sys_dict_data` SET `id` = '1000000000000000224', `dict_label` = '区域化党建单位--其他' +WHERE (`id` = '1000000000000000204'); + +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000225', '1000000000000000007', '社会组织--社会团体', '5', '0', '', '5', '0', '0', '', '2022-04-12 14:39:18', '', '2022-04-12 14:39:18'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000226', '1000000000000000007', '社会组织--民办非企业单位', '6', '0', '', '6', '0', '0', '', '2022-04-12 14:39:18', '', '2022-04-12 14:39:18'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000227', '1000000000000000007', '社会组织--基金会', '7', '0', '', '7', '0', '0', '', '2022-04-12 14:39:18', '', '2022-04-12 14:39:18'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000228', '1000000000000000007', '社会组织--其他', '8', '0', '', '8', '0', '0', '', '2022-04-12 14:39:18', '', '2022-04-12 14:39:18'); diff --git a/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.13__up_sys_dict_data.sql b/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.13__up_sys_dict_data.sql new file mode 100644 index 0000000000..8cf8a7e21a --- /dev/null +++ b/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.13__up_sys_dict_data.sql @@ -0,0 +1,6 @@ +update sys_dict_data set dict_label='联建单位' +where dict_value='party_unit' +and DEL_FLAG='0' +and dict_type_id=( + select st.id from sys_dict_type st where st.dict_type='user_demand_service_type' and st.DEL_FLAG='0' +); \ No newline at end of file diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/PartyUnitTypeEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/PartyUnitTypeEnum.java index 6d7aee6009..27807a6d9a 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/PartyUnitTypeEnum.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/PartyUnitTypeEnum.java @@ -7,11 +7,16 @@ import com.epmet.commons.tools.exception.EpmetErrorCode; */ public enum PartyUnitTypeEnum { //房屋类型,1楼房,2平房,3别墅 - LOUYU("0", "楼宇党建"), - ZUZHI("1", "两新组织"), - DANWEI("2", "区域单位党建"), - JIGUAN("3", "机关直属部门"), - QITA("4", "其他"); + LOUYU("0", "区域化党建单位--楼宇党建"), + ZUZHI("1", "区域化党建单位--两新组织"), + DANWEI("2", "区域化党建单位--区域单位党建"), + JIGUAN("3", "区域化党建单位--机关直属部门"), + QITA("4", "区域化党建单位--其他"), + SHZZ_SHTT("5", "社会组织--社会团体"), + SHZZ_MBFQYDW("6", "社会组织--民办非企业单位"), + SHZZ_JJH("7", "社会组织--基金会"), + SHZZ_QT("8", "社会组织--其他"); + private String code; private String name; diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/bean/AgencyInfoCache.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/bean/AgencyInfoCache.java index 684440db65..1a842d3987 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/bean/AgencyInfoCache.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/bean/AgencyInfoCache.java @@ -4,6 +4,7 @@ import lombok.Data; import java.io.Serializable; import java.util.Date; +import java.util.List; /** * @Author zxc @@ -59,6 +60,11 @@ public class AgencyInfoCache implements Serializable { */ private String areaCode; + /** + * 地区编码全路径:例如:37,3702,370203,370203005,370203005015 + */ + private List areaCodePath; + /** * 删除标识 */ diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/CustomerAgencyDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/CustomerAgencyDTO.java index 70c25c839c..1880541692 100644 --- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/CustomerAgencyDTO.java +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/CustomerAgencyDTO.java @@ -21,6 +21,7 @@ import lombok.Data; import java.io.Serializable; import java.util.Date; +import java.util.List; /** @@ -172,4 +173,9 @@ public class CustomerAgencyDTO implements Serializable { * 联系电话 */ private String mobile; + + /** + * 地区编码全路径:例如:37,3702,370203,370203005,370203005015 + */ + private List areaCodePath; } \ No newline at end of file diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovOrgController.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovOrgController.java index 717e2370b9..1e560103fa 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovOrgController.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovOrgController.java @@ -21,10 +21,10 @@ import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dataaggre.beans.GridMemberDataAnalysisExcelExportBean; +import com.epmet.dataaggre.dto.govorg.CustomerAgencyDTO; import com.epmet.dataaggre.dto.govorg.CustomerGridDTO; import com.epmet.dataaggre.dto.govorg.form.*; import com.epmet.dataaggre.dto.govorg.result.*; -import com.epmet.dataaggre.entity.govorg.CustomerAgencyEntity; import com.epmet.dataaggre.enums.GridMemberDataAnalysisEnums; import com.epmet.dataaggre.service.AggreGridService; import com.epmet.dataaggre.service.govorg.GovOrgService; @@ -242,8 +242,8 @@ public class GovOrgController { * @date 2021/11/5 2:54 下午 */ @PostMapping("agency") - public Result getAgencyInfo(@RequestParam("agencyId")String agencyId){ - return new Result().ok(govOrgService.getAgencyInfo(agencyId)); + public Result getAgencyInfo(@RequestParam("agencyId")String agencyId){ + return new Result().ok(govOrgService.getAgencyInfo(agencyId)); } /** @@ -305,7 +305,7 @@ public class GovOrgController { CustomerGridDTO gridInfo = govOrgService.getGridInfo(orgId); Optional.ofNullable(gridInfo).ifPresent((g) -> orgName.set(g.getGridName())); } else if ("agency".equals(orgType)) { - CustomerAgencyEntity agencyInfo = govOrgService.getAgencyInfo(orgId); + CustomerAgencyDTO agencyInfo = govOrgService.getAgencyInfo(orgId); Optional.ofNullable(agencyInfo).ifPresent((a) -> orgName.set(a.getOrganizationName())); } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/CustomerAgencyDao.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/CustomerAgencyDao.java index c9ebd4bf8d..076b7af7bd 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/CustomerAgencyDao.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/CustomerAgencyDao.java @@ -105,4 +105,5 @@ public interface CustomerAgencyDao extends BaseDao { * @author sun */ LinkedList subAgencyListAndGridSumNum(@Param("agencyId") String agencyId); + } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgService.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgService.java index 53c1f3200c..6b5d2d0ed4 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgService.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgService.java @@ -8,7 +8,6 @@ import com.epmet.dataaggre.dto.govorg.CustomerGridDTO; import com.epmet.dataaggre.dto.govorg.form.*; import com.epmet.dataaggre.dto.govorg.result.*; import com.epmet.dataaggre.dto.resigroup.result.OrgInfoCommonDTO; -import com.epmet.dataaggre.entity.govorg.CustomerAgencyEntity; import javax.servlet.http.HttpServletResponse; import java.util.List; @@ -162,7 +161,7 @@ public interface GovOrgService { * @author zxc * @date 2021/11/5 2:54 下午 */ - CustomerAgencyEntity getAgencyInfo(String agencyId); + CustomerAgencyDTO getAgencyInfo(String agencyId); /** * @Description 查询网格信息 diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java index 4d1b356fd3..992ac08201 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java @@ -6,6 +6,7 @@ import cn.afterturn.easypoi.excel.entity.enmus.ExcelType; import com.alibaba.fastjson.JSON; import com.dingtalk.api.request.OapiRobotSendRequest; import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.tools.constant.Constant; import com.epmet.commons.tools.constant.DingDingRobotConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; @@ -23,6 +24,7 @@ import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; import com.epmet.commons.tools.redis.common.bean.BuildingInfoCache; import com.epmet.commons.tools.redis.common.bean.GridInfoCache; import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.HttpClientManager; import com.epmet.commons.tools.utils.Result; import com.epmet.dataaggre.constant.DataSourceConstant; @@ -250,41 +252,6 @@ public class GovOrgServiceImpl implements GovOrgService { return result; } - public static void main(String[] args) { - List allList = new ArrayList<>(); - NextAreaCodeResultDTO m1 = new NextAreaCodeResultDTO(); - m1.setAreaCode("1"); - m1.setAreaName("a"); - allList.add(m1); - - NextAreaCodeResultDTO m2 = new NextAreaCodeResultDTO(); - m2.setAreaCode("2"); - m2.setAreaName("b"); - allList.add(m2); - - - NextAreaCodeResultDTO m3 = new NextAreaCodeResultDTO(); - m3.setAreaCode("3"); - m3.setAreaName("c"); - allList.add(m3); - - List stringList = new ArrayList<>(); - stringList.add("1"); - stringList.add("2"); - - Iterator iterator = allList.iterator(); - while (iterator.hasNext()) { - NextAreaCodeResultDTO next = iterator.next(); - for (String usedAreaCode : stringList) { - if (next.getAreaCode().equals(usedAreaCode)) { - iterator.remove(); - } - } - - } - System.out.println(JSON.toJSONString(allList, true)); - } - /** * @param staffId * @Author sun @@ -642,8 +609,46 @@ public class GovOrgServiceImpl implements GovOrgService { * @date 2021/11/5 2:54 下午 */ @Override - public CustomerAgencyEntity getAgencyInfo(String agencyId) { - return customerAgencyDao.selectById(agencyId); + public CustomerAgencyDTO getAgencyInfo(String agencyId) { + CustomerAgencyEntity customerAgencyEntity=customerAgencyDao.selectById(agencyId); + CustomerAgencyDTO res= ConvertUtils.sourceToTarget(customerAgencyEntity,CustomerAgencyDTO.class); + //设置行政地区编码全路径 + if (StringUtils.isNotBlank(res.getAreaCode()) && StringUtils.isNotBlank(res.getParentAreaCode())) { + res.setAreaCodePath(queryAreaCodePath(res)); + } + return res; + } + + private List queryAreaCodePath(CustomerAgencyDTO customerAgencyEntity) { + List areaCodePath = new ArrayList<>(); + switch (customerAgencyEntity.getLevel()) { + case Constant.COMMUNITY: + areaCodePath.add(customerAgencyEntity.getAreaCode().substring(NumConstant.ZERO, NumConstant.TWO)); + areaCodePath.add(customerAgencyEntity.getAreaCode().substring(NumConstant.ZERO, NumConstant.FOUR)); + areaCodePath.add(customerAgencyEntity.getAreaCode().substring(NumConstant.ZERO, NumConstant.SIX)); + areaCodePath.add(customerAgencyEntity.getParentAreaCode()); + areaCodePath.add(customerAgencyEntity.getAreaCode()); + break; + case Constant.STREET: + areaCodePath.add(customerAgencyEntity.getAreaCode().substring(NumConstant.ZERO, NumConstant.TWO)); + areaCodePath.add(customerAgencyEntity.getAreaCode().substring(NumConstant.ZERO, NumConstant.FOUR)); + areaCodePath.add(customerAgencyEntity.getParentAreaCode()); + areaCodePath.add(customerAgencyEntity.getAreaCode()); + break; + case Constant.DISTRICT: + areaCodePath.add(customerAgencyEntity.getAreaCode().substring(NumConstant.ZERO, NumConstant.TWO)); + areaCodePath.add(customerAgencyEntity.getParentAreaCode()); + areaCodePath.add(customerAgencyEntity.getAreaCode()); + break; + case Constant.CITY: + areaCodePath.add(customerAgencyEntity.getParentAreaCode()); + areaCodePath.add(customerAgencyEntity.getAreaCode()); + break; + case Constant.PROVINCE: + areaCodePath.add(customerAgencyEntity.getAreaCode()); + break; + } + return areaCodePath; } /** diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/AggreGridServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/AggreGridServiceImpl.java index 972d686151..d9804c5b1c 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/AggreGridServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/AggreGridServiceImpl.java @@ -8,10 +8,10 @@ import com.epmet.commons.tools.redis.common.CustomerOrgRedis; import com.epmet.commons.tools.redis.common.bean.GridInfoCache; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.dataaggre.dto.epmetuser.result.StaffPatrolRecordDailyResultDTO; +import com.epmet.dataaggre.dto.govorg.CustomerAgencyDTO; import com.epmet.dataaggre.dto.govorg.CustomerGridDTO; import com.epmet.dataaggre.dto.govorg.result.GridMemberDataAnalysisResultDTO; import com.epmet.dataaggre.entity.epmetuser.CustomerStaffEntity; -import com.epmet.dataaggre.entity.govorg.CustomerAgencyEntity; import com.epmet.dataaggre.service.AggreGridService; import com.epmet.dataaggre.service.datastats.DataStatsService; import com.epmet.dataaggre.service.epmetuser.EpmetUserService; @@ -22,7 +22,6 @@ import com.google.common.collect.Lists; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import sun.rmi.runtime.Log; import java.util.*; @@ -173,7 +172,7 @@ public class AggreGridServiceImpl implements AggreGridService { * @return */ private String getPidsByAgencyId(String agencyId) { - CustomerAgencyEntity agencyInfo = govOrgService.getAgencyInfo(agencyId); + CustomerAgencyDTO agencyInfo = govOrgService.getAgencyInfo(agencyId); if (agencyInfo == null) { String errorMsg = "【网格员数据统计查询pcwork】查询组织信息返回为null"; diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml index 2851c5a835..add7341a75 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml @@ -163,6 +163,7 @@ WHERE u.del_flag = '0' AND PARTY_FLAG = 0 + AND u.point_total > 0 AND u.all_parent_ids LIKE CONCAT('%',#{orgId},'%') @@ -207,6 +208,7 @@ WHERE u.del_flag = '0' AND party_flag = '1' + and u.point_total > 0 AND u.all_parent_ids LIKE CONCAT('%',#{orgId},'%') diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/AreaCodeDao.xml b/epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/AreaCodeDao.xml index eca90f2415..324edf5f0f 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/AreaCodeDao.xml +++ b/epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/AreaCodeDao.xml @@ -84,7 +84,6 @@ area_code_child ac WHERE ac.DEL_FLAG = '0' - AND ac.USER_DEFINED = '0' AND ac.p_code=#{pCode} @@ -101,7 +100,6 @@ area_code_child ac WHERE ac.DEL_FLAG = '0' - AND ac.USER_DEFINED = '0' AND ac.p_code=#{pCode} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationDTO.java index 6be34cb9b8..52338da6e9 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationDTO.java @@ -133,4 +133,9 @@ public class IcCommunitySelfOrganizationDTO implements Serializable { */ private Date updatedTime; + /** + * 备注 + */ + private String remark; + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java index bcb04fb6ef..23451a79d7 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java @@ -57,7 +57,8 @@ public class IcPartyActivityDTO implements Serializable { */ @JsonIgnore private String agencyId; - + private String gridId; + private String gridName; /** * 组织的所有上级 */ diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/LatestActInfoDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/LatestActInfoDTO.java index e73c466837..d4cc64d386 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/LatestActInfoDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/LatestActInfoDTO.java @@ -43,7 +43,7 @@ public class LatestActInfoDTO implements Serializable { * 客户id */ private String customerId; - + private String gridId; /** * 活动标题 */ diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java index 302f3d08a4..2a693143d3 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java @@ -56,6 +56,11 @@ public class AddCommunitySelfOrganizationFormDTO implements Serializable { */ private String organizationCreatedTime; + /** + * 备注 + */ + private String remark; + /** * 经度 */ diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CommunitySelfOrganizationListFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CommunitySelfOrganizationListFormDTO.java index c70e2a7055..5d634afaa3 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CommunitySelfOrganizationListFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CommunitySelfOrganizationListFormDTO.java @@ -46,4 +46,6 @@ public class CommunitySelfOrganizationListFormDTO implements Serializable { private String customerId; private String agencyId; private Integer ranking; + + private String remark; } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditCommunitySelfOrganizationFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditCommunitySelfOrganizationFormDTO.java index cade96113f..68d0176e35 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditCommunitySelfOrganizationFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditCommunitySelfOrganizationFormDTO.java @@ -68,6 +68,11 @@ public class EditCommunitySelfOrganizationFormDTO implements Serializable { */ private String latitude; + /** + * 备注 + */ + private String remark; + /** * 社区自组织ID */ diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivityFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivityFormDTO.java index 1f108568e1..0481b07fc4 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivityFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivityFormDTO.java @@ -19,6 +19,7 @@ public class PartyActivityFormDTO implements Serializable { private static final long serialVersionUID = -2510068555703677L; @NotBlank(message = "组织Id不能为空" ) private String agencyId; + private String gridId; private String unitId; private String title; @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/DraftActInfoFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/DraftActInfoFormDTO.java index a88d1d393f..08c6c8def7 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/DraftActInfoFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/DraftActInfoFormDTO.java @@ -28,7 +28,7 @@ public class DraftActInfoFormDTO implements Serializable { * 活动草稿id,如果是编辑之前的活动草稿,此列是有值的 */ private String actDraftId; - + private String gridId; /** * 如果是重新发布活动,此列是有值的 diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/PublishActInfoFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/PublishActInfoFormDTO.java index 099fa38e60..57e0358505 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/PublishActInfoFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/PublishActInfoFormDTO.java @@ -36,7 +36,7 @@ public class PublishActInfoFormDTO implements Serializable { * 活动草稿id,如果是编辑之前的活动草稿,此列是有值的 */ private String actDraftId; - + private String gridId; /** * 客户id */ diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/RePublishFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/RePublishFormDTO.java index 587a60a0ff..7dfc46329f 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/RePublishFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/RePublishFormDTO.java @@ -36,6 +36,8 @@ public class RePublishFormDTO implements Serializable { */ private String actDraftId; + private String gridId; + /** * 活动id */ diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java index 522da610d1..b7a7627030 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java @@ -53,6 +53,11 @@ public class CommunitySelfOrganizationListDTO implements Serializable { */ private String organizationCreatedTime; + /** + * 备注 + */ + private String remark; + /** * 经度 */ @@ -87,6 +92,7 @@ public class CommunitySelfOrganizationListDTO implements Serializable { this.longitude = ""; this.latitude = ""; this.orgId = ""; + this.remark = ""; this.score = NumConstant.ZERO; this.organizationPersonnel = new ArrayList<>(); } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActPreviewResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActPreviewResultDTO.java index caeed480d5..b1856da3b3 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActPreviewResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActPreviewResultDTO.java @@ -101,6 +101,9 @@ public class ActPreviewResultDTO implements Serializable { */ private String actType; + private String gridId; + private String gridName; + /** * 联建单位 */ diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/CanceledActDetailResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/CanceledActDetailResultDTO.java index 764d3ffabf..61f6eae029 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/CanceledActDetailResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/CanceledActDetailResultDTO.java @@ -153,6 +153,8 @@ public class CanceledActDetailResultDTO implements Serializable { */ private String actType; + private String gridId; + private String gridName; /** * 联建单位 */ diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/FinishedActDetailResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/FinishedActDetailResultDTO.java index 5bf9c4bfb1..26aa13d4a1 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/FinishedActDetailResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/FinishedActDetailResultDTO.java @@ -142,6 +142,9 @@ public class FinishedActDetailResultDTO implements Serializable { */ private String actType; + private String gridId; + private String gridName; + /** * 联建单位 */ diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/InProgressActDetailResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/InProgressActDetailResultDTO.java index 03fdbf576b..f220f19a96 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/InProgressActDetailResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/InProgressActDetailResultDTO.java @@ -137,6 +137,9 @@ public class InProgressActDetailResultDTO implements Serializable { */ private String actType; + private String gridId; + private String gridName; + /** * 联建单位 */ diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/LatestDraftActInfoResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/LatestDraftActInfoResultDTO.java index 70b4c5754f..e5699f1140 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/LatestDraftActInfoResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/LatestDraftActInfoResultDTO.java @@ -21,6 +21,7 @@ public class LatestDraftActInfoResultDTO implements Serializable { * 活动草稿id */ private String actDraftId; + private String gridId; /** * 客户id */ diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ReEditActInfoResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ReEditActInfoResultDTO.java index 367ab0ec1d..e4db367ee0 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ReEditActInfoResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ReEditActInfoResultDTO.java @@ -154,6 +154,9 @@ public class ReEditActInfoResultDTO implements Serializable { */ private String actType; + private String gridId; + private String gridName; + /** * 联建单位 */ diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java index b66e6a0773..fa00ec37e8 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java @@ -106,4 +106,9 @@ public class IcCommunitySelfOrganizationEntity extends BaseEpmetEntity { */ private String latitude; + /** + * 备注 + */ + private String remark; + } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPartyActivityEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPartyActivityEntity.java index 4919fdd133..da03e372e7 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPartyActivityEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPartyActivityEntity.java @@ -47,7 +47,7 @@ public class IcPartyActivityEntity extends BaseEpmetEntity { * 组织ID */ private String agencyId; - + private String gridId; /** * 组织的所有上级 */ diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ExportCommunitySelfOrganizationExcel.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ExportCommunitySelfOrganizationExcel.java index 1822610552..fdf33d7b48 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ExportCommunitySelfOrganizationExcel.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ExportCommunitySelfOrganizationExcel.java @@ -31,6 +31,9 @@ public class ExportCommunitySelfOrganizationExcel { @Excel(name = "创建时间", width = 20, needMerge = true) private String organizationCreatedTime; + @Excel(name = "备注", width = 60, needMerge = true) + private String remark; + @ExcelCollection(name = "组织成员") private List organizationPersonnel; diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ImportCommunitySelfOrganization.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ImportCommunitySelfOrganization.java index a6c6102431..25a8f27af9 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ImportCommunitySelfOrganization.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ImportCommunitySelfOrganization.java @@ -40,6 +40,9 @@ public class ImportCommunitySelfOrganization extends ExcelVerifyInfo { @Excel(name = "创建时间", needMerge = true) private String organizationCreatedTime; + @Excel(name = "备注", needMerge = true) + private String remark; + @ExcelCollection(name = "组织成员") private List persons; diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java index b72739dbbc..ce0b172893 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java @@ -28,7 +28,9 @@ import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; 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.redis.common.CustomerOrgRedis; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; +import com.epmet.commons.tools.redis.common.bean.GridInfoCache; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.DateUtils; @@ -123,6 +125,12 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl unitIds = Arrays.asList(dto.getUnitId().split(StrConstant.COMMA)); List unitNames = unitIds.stream().map(option::get).collect(Collectors.toList()); dto.setUnitName(StringUtils.join(unitNames, StrConstant.COMMA)); + if (StringUtils.isNotEmpty(dto.getGridId())) { + GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(dto.getGridId()); + if (null != gridInfo) { + dto.setGridName(gridInfo.getGridName()); + } + } }); } @@ -150,6 +158,12 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl unitIds = Arrays.asList(dto.getUnitId().split(StrConstant.COMMA)); List unitNames = unitIds.stream().map(option::get).collect(Collectors.toList()); dto.setUnitName(StringUtils.join(unitNames, StrConstant.COMMA)); + if (StringUtils.isNotEmpty(dto.getGridId())) { + GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(dto.getGridId()); + if (null != gridInfo) { + dto.setGridName(gridInfo.getGridName()); + } + } }); } @@ -171,6 +185,12 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl serviceNames = services.stream().map(categoryMap::get).collect(Collectors.toList()); dto.setServiceMatterList(services); dto.setServiceMatterNameList(serviceNames); + if (StringUtils.isNotEmpty(dto.getGridId())) { + GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(dto.getGridId()); + if (null != gridInfo) { + dto.setGridName(gridInfo.getGridName()); + } + } //获取单位 //获取组织下联建单位 @@ -547,6 +567,14 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl services = Arrays.asList(dto.getServiceMatter().split(StrConstant.COMMA)); List serviceNames = services.stream().map(categoryMap::get).collect(Collectors.toList()); dto.setServiceMatterName(StringUtils.join(serviceNames, StrConstant.SEMICOLON)); + + if (StringUtils.isNotEmpty(dto.getGridId())) { + GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(dto.getGridId()); + if (null != gridInfo) { + dto.setGridName(gridInfo.getGridName()); + } + } + }); } PageInfo pageInfo = new PageInfo<>(dtoList); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActDraftServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActDraftServiceImpl.java index 1273ffa577..a5fb199d5a 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActDraftServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActDraftServiceImpl.java @@ -2,6 +2,8 @@ package com.epmet.service.impl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; +import com.epmet.commons.tools.redis.common.CustomerOrgRedis; +import com.epmet.commons.tools.redis.common.bean.GridInfoCache; import com.epmet.commons.tools.security.user.LoginUserUtil; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.ActConstant; @@ -201,6 +203,13 @@ public class WorkActDraftServiceImpl implements WorkActDraftService { List unitNames = unitIds.stream().map(option::get).collect(Collectors.toList()); actPreviewResultDTO.setUnitIdList(unitIds); actPreviewResultDTO.setUnitNameList(unitNames); + + if (StringUtils.isNotEmpty(actPreviewResultDTO.getGridId())) { + GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(actPreviewResultDTO.getGridId()); + if (null != gridInfo) { + actPreviewResultDTO.setGridName(gridInfo.getGridName()); + } + } } } return actPreviewResultDTO; @@ -337,7 +346,7 @@ public class WorkActDraftServiceImpl implements WorkActDraftService { latestActInfoDTO.setActType(formDTO.getActType()); latestActInfoDTO.setTarget(formDTO.getTarget()); - + latestActInfoDTO.setGridId(formDTO.getGridId()); return latestActInfoDTO; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java index 7ab8dc2e52..e12a501ae1 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java @@ -9,6 +9,8 @@ import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.dto.form.mq.eventmsg.BasePointEventMsg; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.redis.common.CustomerOrgRedis; +import com.epmet.commons.tools.redis.common.bean.GridInfoCache; import com.epmet.commons.tools.scan.param.ImgScanParamDTO; import com.epmet.commons.tools.scan.param.ImgTaskDTO; import com.epmet.commons.tools.scan.param.TextScanParamDTO; @@ -832,6 +834,14 @@ public class WorkActServiceImpl implements WorkActService { List unitNames = unitIds.stream().map(option::get).collect(Collectors.toList()); canceledActDetailResultDTO.setUnitIdList(unitIds); canceledActDetailResultDTO.setUnitNameList(unitNames); + + if (StringUtils.isNotEmpty(dto.getGridId())) { + canceledActDetailResultDTO.setGridId(dto.getGridId()); + GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(dto.getGridId()); + if (null != gridInfo) { + canceledActDetailResultDTO.setGridName(gridInfo.getGridName()); + } + } } } } @@ -897,6 +907,14 @@ public class WorkActServiceImpl implements WorkActService { List unitNames = unitIds.stream().map(option::get).collect(Collectors.toList()); resultDTO.setUnitIdList(unitIds); resultDTO.setUnitNameList(unitNames); + + if (StringUtils.isNotEmpty(dto.getGridId())) { + resultDTO.setGridId(dto.getGridId()); + GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(dto.getGridId()); + if (null != gridInfo) { + resultDTO.setGridName(gridInfo.getGridName()); + } + } } } } @@ -986,6 +1004,14 @@ public class WorkActServiceImpl implements WorkActService { List unitNames = unitIds.stream().map(option::get).collect(Collectors.toList()); resultDTO.setUnitIdList(unitIds); resultDTO.setUnitNameList(unitNames); + + if (StringUtils.isNotEmpty(dto.getGridId())) { + resultDTO.setGridId(dto.getGridId()); + GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(dto.getGridId()); + if (null != gridInfo) { + resultDTO.setGridName(gridInfo.getGridName()); + } + } } } } @@ -1390,6 +1416,14 @@ public class WorkActServiceImpl implements WorkActService { List unitNames = unitIds.stream().map(option::get).collect(Collectors.toList()); resultDTO.setUnitIdList(unitIds); resultDTO.setUnitNameList(unitNames); + + if (StringUtils.isNotEmpty(dto.getGridId())) { + resultDTO.setGridId(dto.getGridId()); + GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(dto.getGridId()); + if (null != gridInfo) { + resultDTO.setGridName(gridInfo.getGridName()); + } + } } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.13__add_column_remark.sql b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.13__add_column_remark.sql new file mode 100644 index 0000000000..9a747fa8a4 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.13__add_column_remark.sql @@ -0,0 +1 @@ +alter table ic_community_self_organization add COLUMN REMARK VARCHAR(500) comment '备注' AFTER ORGANIZATION_CREATED_TIME; \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.14__activity_add_grid.sql b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.14__activity_add_grid.sql new file mode 100644 index 0000000000..c542430b98 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.14__activity_add_grid.sql @@ -0,0 +1,4 @@ +ALTER TABLE `epmet_heart`.`ic_party_activity` + ADD COLUMN `GRID_ID` varchar(64) NULL COMMENT '网格ID' AFTER `AGENCY_ID`; +ALTER TABLE `epmet_heart`.`latest_act_info` + ADD COLUMN `GRID_ID` varchar(64) NULL COMMENT '网格ID' AFTER `CUSTOMER_ID`; \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml index d2575e0af0..0903571a1a 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml @@ -14,6 +14,7 @@ LONGITUDE = #{longitude}, LATITUDE = #{latitude}, ORGANIZATION_CREATED_TIME = #{organizationCreatedTime}, + REMARK = #{remark}, UPDATED_TIME = NOW(), UPDATED_BY = #{updatedBy} WHERE DEL_FLAG = 0 @@ -52,7 +53,8 @@ so.SERVICE_ITEM AS serviceItem, so.LONGITUDE AS longitude, so.LATITUDE AS latitude, - so.ID as orgId + so.ID as orgId, + so.remark FROM ic_community_self_organization so WHERE so.DEL_FLAG = 0 AND so.ORG_ID = #{agencyId} @@ -60,6 +62,9 @@ AND so.ORGANIZATION_NAME LIKE CONCAT('%',#{organizationName},'%') + + AND so.REMARK LIKE CONCAT('%',#{remark},'%') + AND so.ORGANIZATION_CREATED_TIME = ]]> #{startTime} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml index 429461fbfb..9bd0824165 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml @@ -49,6 +49,7 @@ diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/templates/self_org_import_template.xlsx b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/templates/self_org_import_template.xlsx index aa0edb4167..0893eff404 100644 Binary files a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/templates/self_org_import_template.xlsx and b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/templates/self_org_import_template.xlsx differ diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseFormDTO.java index fb679755d7..5fe1c6c4db 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseFormDTO.java @@ -79,9 +79,9 @@ public class IcHouseFormDTO implements Serializable { private String purpose; /** - * 1出租;0未出租 + * 1:出租 0:自住 2:闲置 */ - @NotNull(message = "是否出租不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class}) + @NotNull(message = "房屋状态不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class}) private Integer rentFlag; /** diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/ListIcNeighborHoodFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/ListIcNeighborHoodFormDTO.java index 402c86c868..613ee6f3d2 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/ListIcNeighborHoodFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/ListIcNeighborHoodFormDTO.java @@ -62,6 +62,10 @@ public class ListIcNeighborHoodFormDTO implements Serializable{ * 房主电话 */ private String ownerPhone; + /** + * 房屋状态 【1:出租 0:自住 2:闲置】 + */ + private String rentFlag; /** * 数据类型【小区:neighbourHood,楼栋:building,房屋:house】 */ diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HousesNameResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HousesNameResultDTO.java new file mode 100644 index 0000000000..954031f4c2 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HousesNameResultDTO.java @@ -0,0 +1,20 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2022/4/12 16:40 + * @DESC + */ +@Data +public class HousesNameResultDTO implements Serializable { + + private static final long serialVersionUID = -8643628706377635279L; + + private String idCard; + + private String houseName; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/enums/HouseRentFlagEnums.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/enums/HouseRentFlagEnums.java index 618be0ea9a..27cd699bf3 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/enums/HouseRentFlagEnums.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/enums/HouseRentFlagEnums.java @@ -3,8 +3,12 @@ package com.epmet.enums; import org.springframework.util.StringUtils; public enum HouseRentFlagEnums { - YES(1,"是"), - NO(0,"否"); + //原有的房屋出租状态是否改为房屋状态【1:出租 0:自住 2:闲置】 + /*YES(1,"是"), + NO(0,"否");*/ + HOUSE_ZZ(0,"自住"), + HOUSE_CZ(1,"出租"), + HOUSE_XZ(2,"闲置"); diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java index e3ffa35663..87db3dd3e6 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java @@ -605,4 +605,13 @@ public interface GovOrgOpenFeignClient { */ @PostMapping("/gov/org/customerstaffgrid/getallstaffbygridid") Result> getAllStaffByGridId(@RequestParam("gridId")String gridId); + + /** + * Desc: 根据身份证查询房屋名 + * @param idCards + * @author zxc + * @date 2022/4/12 16:42 + */ + @PostMapping("/gov/org/ichouse/houses-name") + Result> getHousesNameByIdCards(@RequestBody List idCards); } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java index dd29ab6129..4e48ff1657 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java @@ -393,4 +393,9 @@ public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient { public Result> getAllStaffByGridId(String gridId) { return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getAllStaffByGridId", gridId); } + + @Override + public Result> getHousesNameByIdCards(List idCards) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getHousesNameByIdCards", idCards); + } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/BuildingController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/BuildingController.java index fca09fe069..6ca644bd31 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/BuildingController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/BuildingController.java @@ -118,6 +118,18 @@ public class BuildingController { List buildingTreeLevelDTOS =buildingService.treeList(tokenDTO.getCustomerId(), tokenDTO.getUserId()); return new Result().ok(buildingTreeLevelDTOS); } + + /** + * Desc: 根据前端方便,新开接口,只返回树的ID + * @param tokenDTO + * @author zxc + * @date 2022/4/12 15:20 + */ + @PostMapping("tree-ids") + public Result treeIds(@LoginUser TokenDto tokenDTO){ + List ids =buildingService.treeIds(tokenDTO.getCustomerId(), tokenDTO.getUserId()); + return new Result().ok(ids); + } /** * 导出模板 * @param response diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java index 09f29f5330..316ab3e12f 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java @@ -89,12 +89,10 @@ public class HouseController implements ResultDataResolver { //效验数据 ValidatorUtils.validateEntity(formDTO); - String queryScene = "house_manage"; - IcNeighborHoodResultDTO icNeighborHoodResultDTO = houseService.listNeighborhood(null, formDTO.getBuildingId(), formDTO.getOwnerName(), formDTO.getOwnerPhone(), null, - null, queryScene, - formDTO.getPageNo(), formDTO.getPageSize()); + null, + formDTO.getPageNo(), formDTO.getPageSize(),formDTO.getId(),formDTO.getLevel(),formDTO.getRentFlag()); return new Result().ok(icNeighborHoodResultDTO); } @@ -129,9 +127,6 @@ public class HouseController implements ResultDataResolver { buildingName = null; } - // 使用场景:社区查询 - String scene = "community_search"; - LoginUserDetailsFormDTO form = new LoginUserDetailsFormDTO(); form.setUserId(loginUser.getUserId()); form.setClient(loginUser.getClient()); @@ -142,7 +137,7 @@ public class HouseController implements ResultDataResolver { null); IcNeighborHoodResultDTO icNeighborHoodResultDTO = houseService.listNeighborhood(loginUserDetail.getAgencyId(),null, null, null, - neighborhoodName, buildingName, scene, formDTO.getPageNo(), formDTO.getPageSize()); + neighborhoodName, buildingName, formDTO.getPageNo(), formDTO.getPageSize(),null,null,null); return new Result().ok(icNeighborHoodResultDTO); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcHouseController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcHouseController.java index 8473a7ac72..8587a72993 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcHouseController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcHouseController.java @@ -30,6 +30,7 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcHouseDTO; import com.epmet.dto.form.HouseFormDTO; import com.epmet.dto.result.HouseListResultDTO; +import com.epmet.dto.result.HousesNameResultDTO; import com.epmet.service.IcHouseService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -114,4 +115,15 @@ public class IcHouseController { return new Result>().ok(icHouseService.getHouseList(tokenDto, formDTO)); } + /** + * Desc: 根据身份证查询房屋名 + * @param idCards + * @author zxc + * @date 2022/4/12 16:42 + */ + @PostMapping("houses-name") + public Result> getHousesNameByIdCards(@RequestBody List idCards){ + return new Result>().ok(icHouseService.getHousesNameByIdCards(idCards)); + } + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java index c5a392e6ca..6841d60ce3 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.ImportGeneralDTO; import com.epmet.dto.result.HouseInfoDTO; +import com.epmet.dto.result.HousesNameResultDTO; import com.epmet.dto.result.NeighborHoodManageDelResultDTO; import com.epmet.entity.IcHouseEntity; import com.epmet.excel.IcHouseExcel; @@ -23,14 +24,6 @@ import java.util.Set; @Mapper public interface IcHouseDao extends BaseDao { -// IPage> searchHouseByPage(IPage page, -// @Param(Constants.WRAPPER) QueryWrapper neighborHoodEntityQueryWrapper, -// @Param("ew1") QueryWrapper buildingEntityQueryWrapper, -// @Param("ew2") QueryWrapper houseEntityQueryWrapper); -// IPage> searchHouseByPage(IPage page, -// @Param("neighbor") IcNeighborHoodEntity neighbor, -// @Param("building") IcBuildingEntity building, -// @Param("house") IcHouseEntity house); IPage> searchHouseByPage(IPage page, @Param("pids") String pids, @Param("buildingId") String buildingId, @@ -38,7 +31,9 @@ public interface IcHouseDao extends BaseDao { @Param("ownerPhone") String ownerPhone, @Param("neighborHoodName") String neighborHoodName, @Param("buildingName") String buildingName, - @Param("queryScene") String queryScene); + @Param("id")String id, + @Param("level")String level, + @Param("rentFlag")String rentFlag); List searchAllHouse(@Param("house") IcHouseEntity house); @@ -92,4 +87,12 @@ public interface IcHouseDao extends BaseDao { */ void houseUpdate(@Param("houses") List houses); -} \ No newline at end of file + /** + * Desc: 根据身份证查询房屋名 + * @param idCards + * @author zxc + * @date 2022/4/12 16:42 + */ + List getHousesNameByIdCards(@Param("idCards") List idCards); + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/BuildingService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/BuildingService.java index 81a9f10390..d5d1dd7903 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/BuildingService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/BuildingService.java @@ -57,6 +57,7 @@ public interface BuildingService { void addBuilding(String customerId, IcBulidingFormDTO formDTO); List treeList(String customerId, String staffId); + List treeIds(String customerId, String staffId); List importExcel(String customerId, List list, String staffId, List numList); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java index a651ed1615..04413fb902 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java @@ -60,9 +60,11 @@ public interface HouseService { String ownerPhone, String neighborHoodName, String buildingName, - String queryScene, Integer pageNo, - Integer pageSize); + Integer pageSize, + String id, + String level, + String rentFlag); void exportBuildinginfo(ListIcNeighborHoodFormDTO formDTO, HttpServletResponse response) throws Exception; @@ -79,4 +81,4 @@ public interface HouseService { void allDelete(NeighborHoodManageDelFormDTO formDTO); HouseInfoDTO getHouseInfoDTO(String customerId,String houseId); -} \ No newline at end of file +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcHouseService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcHouseService.java index 423f218049..bd82a396c1 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcHouseService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcHouseService.java @@ -8,6 +8,7 @@ import com.epmet.dto.IcHouseDTO; import com.epmet.dto.ImportGeneralDTO; import com.epmet.dto.form.HouseFormDTO; import com.epmet.dto.result.HouseListResultDTO; +import com.epmet.dto.result.HousesNameResultDTO; import com.epmet.entity.IcHouseEntity; import java.util.List; @@ -116,4 +117,12 @@ public interface IcHouseService extends BaseService { */ void houseUpdate(List houses); + /** + * Desc: 根据身份证查询房屋名 + * @param idCards + * @author zxc + * @date 2022/4/12 16:42 + */ + List getHousesNameByIdCards(List idCards); + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java index 04670fde28..4649e18546 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java @@ -261,6 +261,45 @@ public class BuildingServiceImpl implements BuildingService { } + @Override + public List treeIds(String customerId, String staffId) { + List result = new ArrayList<>(); + CustomerStaffInfoCacheResult agency = CustomerStaffRedis.getStaffInfo(customerId, staffId); + if(null == agency || StringUtils.isBlank(agency.getAgencyId())){ + log.error("com.epmet.service.impl.BuildingServiceImpl.treeIds,没有找到工作人员所属的机关信息,用户Id:{}",staffId); + return new ArrayList<>(); + } + //1.获取所在组织及下级组织 + CustomerAgencyEntity customerAgency = customerAgencyDao.selectById(agency.getAgencyId()); + List customerAgencyList = icBuildingDao.selectAgencyChildrenList(agency.getAgencyId()); + customerAgencyList.add(customerAgency); + if(CollectionUtils.isEmpty(customerAgencyList)){ + return new ArrayList<>(); + } + result.addAll(customerAgencyList.stream().map(m -> m.getId()).collect(Collectors.toList())); + List agencyList = customerAgencyList.stream().map(item -> { + BuildingTreeLevelDTO buildingTreeLevelDTO = new BuildingTreeLevelDTO(); + buildingTreeLevelDTO.setId(item.getId()); + buildingTreeLevelDTO.setPId(item.getPid()); + buildingTreeLevelDTO.setLabel(item.getOrganizationName()); + buildingTreeLevelDTO.setLevel(item.getLevel()); + buildingTreeLevelDTO.setLongitude(item.getLongitude()); + buildingTreeLevelDTO.setLatitude(item.getLatitude()); + buildingTreeLevelDTO.setChildren(new ArrayList<>()); + //当前组织有几个下级组织 + buildingTreeLevelDTO.setShowNum(StrConstant.EPMETY_STR); + return buildingTreeLevelDTO; + }).collect(Collectors.toList()); + //2.获取组织所在网格 + List agencyIdList = customerAgencyList.stream().map(BaseEpmetEntity::getId).collect(Collectors.toList()); + List customerGridList = customerGridDao.selectList(new QueryWrapper().lambda().in(CustomerGridEntity::getPid, agencyIdList)); + if(CollectionUtils.isEmpty(customerGridList)){ + return result; + } + result.addAll(customerGridList.stream().map(m -> m.getId()).collect(Collectors.toList())); + return result; + } + @Override @Transactional(rollbackFor = Exception.class) public List importExcel(String customerId, List list, String staffId, List numList) { diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java index 03458a90fd..6d92f82fab 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java @@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; +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.RenException; @@ -254,33 +255,22 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { String ownerPhone, String neighborHoodName, String buildingName, - String queryScene, Integer pageNo, - Integer pageSize) { + Integer pageSize, + String id,String level, String rentFlag) { IcNeighborHoodResultDTO result = new IcNeighborHoodResultDTO(); - //如果类型是house 查房屋 - //IPage> resultMap = searchHouse(buildingId, ownerName, ownerPhone, neighborHoodName, buildingName, pageNo, pageSize); - // 查询pids String pids = null; if (StringUtils.isNotBlank(ancestorAgencyId)) { - CustomerAgencyDTO agency = agencyservice.getAgencyById(ancestorAgencyId); - - if (agency == null) { - throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "【社区查询-查询房屋列表】查询当前staff所属组织信息失败"); - } - - - if (NumConstant.ZERO_STR.equals(agency.getPid())) { - pids = ancestorAgencyId; - } else { - pids = agency.getPids().concat(StrConstant.COLON).concat(ancestorAgencyId); - } + pids = getPids(ancestorAgencyId); + } + if (StringUtils.isNotBlank(level) && OrgTypeEnum.AGENCY.getCode().equals(level)){ + pids = getPids(ancestorAgencyId); } IPage page = new Page(pageNo,pageSize); - IPage> mapIPage = icHouseDao.searchHouseByPage(page, pids, buildingId, ownerName, ownerPhone, neighborHoodName, buildingName, queryScene); + IPage> mapIPage = icHouseDao.searchHouseByPage(page, pids, buildingId, ownerName, ownerPhone, neighborHoodName, buildingName,id,level,rentFlag); List> records = mapIPage.getRecords(); records.forEach(item->{ item.put("houseType", HouseTypeEnums.getTypeValue(item.get("houseTypeKey"))); @@ -291,6 +281,22 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { result.setList(records); return result; } + public String getPids(String agencyId){ + String pids = null; + CustomerAgencyDTO agency = agencyservice.getAgencyById(agencyId); + + if (agency == null) { + throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "【社区查询-查询房屋列表】查询当前staff所属组织信息失败"); + } + + + if (NumConstant.ZERO_STR.equals(agency.getPid())) { + pids = agencyId; + } else { + pids = agency.getPids().concat(StrConstant.COLON).concat(agencyId); + } + return pids; + } @Override public void exportBuildinginfo(ListIcNeighborHoodFormDTO formDTO, HttpServletResponse response) throws Exception { diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java index f0afc84a28..527a5cf986 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java @@ -19,6 +19,7 @@ import com.epmet.dto.IcResiUserDTO; import com.epmet.dto.ImportGeneralDTO; import com.epmet.dto.form.HouseFormDTO; import com.epmet.dto.result.HouseListResultDTO; +import com.epmet.dto.result.HousesNameResultDTO; import com.epmet.entity.IcHouseEntity; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.feign.OperCustomizeOpenFeignClient; @@ -231,4 +232,18 @@ public class IcHouseServiceImpl extends BaseServiceImpl getHousesNameByIdCards(List idCards) { + if (CollectionUtils.isEmpty(idCards)){ + return new ArrayList<>(); + } + return baseDao.getHousesNameByIdCards(idCards); + } + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.15__alter_ic_house.sql b/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.15__alter_ic_house.sql new file mode 100644 index 0000000000..d624bf775a --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.15__alter_ic_house.sql @@ -0,0 +1,2 @@ +ALTER TABLE `ic_house` +MODIFY COLUMN `RENT_FLAG` tinyint(1) NOT NULL COMMENT '1:出租 0:自住 2:闲置' AFTER `PURPOSE`; diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.16__add_index_ic_house.sql b/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.16__add_index_ic_house.sql new file mode 100644 index 0000000000..3bf8ad31eb --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.16__add_index_ic_house.sql @@ -0,0 +1,3 @@ +ALTER TABLE `epmet_gov_org`.`ic_house` + ADD INDEX `idx_building_id`(`BUILDING_ID`) USING BTREE COMMENT '楼宇id', + ADD INDEX `idx_hood_id`(`NEIGHBOR_HOOD_ID`) USING BTREE COMMENT '小区id'; diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml index 0db3dfa93e..b2b6b99b29 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml @@ -70,83 +70,6 @@ ) - - - + + + diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiCollectMemFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiCollectMemFormDTO.java index 95ae25cd79..12aff48466 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiCollectMemFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiCollectMemFormDTO.java @@ -44,6 +44,16 @@ public class IcResiCollectMemFormDTO implements Serializable { // @NotNull(message = "疫苗接种情况不能为空", groups = {IcResiCollectFormDTO.InternalShowGroup.class, IcResiCollectFormDTO.ExternalShowGroup.class}) private Integer ymjz; + /** + * 户籍所在地 + */ + private String domicilePlace; + + /** + * 学校或公司 + */ + private String workPlace; + /** * 社区居民信息登记-查询返参用 */ diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PartyMemberListFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PartyMemberListFormDTO.java index a6ffad6477..39ce7f3a9d 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PartyMemberListFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PartyMemberListFormDTO.java @@ -1,5 +1,6 @@ package com.epmet.dto.form; +import com.epmet.commons.tools.dto.form.PageFormDTO; import lombok.Data; import javax.validation.constraints.NotBlank; @@ -11,7 +12,7 @@ import java.io.Serializable; * @Date 2021/12/10 15:49 */ @Data -public class PartyMemberListFormDTO implements Serializable { +public class PartyMemberListFormDTO extends PageFormDTO implements Serializable { private static final long serialVersionUID = -6085134769034337175L; @NotBlank(message = "组织类型不能为空") @@ -19,6 +20,4 @@ public class PartyMemberListFormDTO implements Serializable { @NotBlank(message = "组织ID不能为空") private String orgId; private String code; - private Integer pageNo = 1; - private Integer pageSize = 20; } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/SearchByNameFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/SearchByNameFormDTO.java index 8f4abca17f..56f7c244c4 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/SearchByNameFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/SearchByNameFormDTO.java @@ -17,7 +17,7 @@ public class SearchByNameFormDTO implements Serializable { private static final long serialVersionUID = -5017695783909884799L; public interface SearchByNameForm{} - + public interface SearchByCategoryForm{} @NotBlank(message = "name不能为空",groups = SearchByNameForm.class) private String name; @@ -27,4 +27,9 @@ public class SearchByNameFormDTO implements Serializable { @NotNull(message = "pageNo不能为空",groups = SearchByNameForm.class) private Integer pageNo; + @NotBlank(message = "columnName不能为空",groups = SearchByCategoryForm.class) + private String columnName; + + private String customerId; + private String userId; } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VaccinationListFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VaccinationListFormDTO.java index fc69f5da84..23da9d859b 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VaccinationListFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VaccinationListFormDTO.java @@ -54,6 +54,26 @@ public class VaccinationListFormDTO extends PageFormDTO implements Serializable * 备注,核酸检测关注名单,此字段可填可不填 */ private String remark; + /** + * 所属小区ID + */ + private String villageId; + + /** + * 所属楼宇Id + */ + private String buildId; + + /** + * 单元id + */ + private String unitId; + + /** + * 所属家庭Id + */ + private String homeId; + private String userId; diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListMemberExcelResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListMemberExcelResultDTO.java index 854d1b3c93..34efe5d146 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListMemberExcelResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListMemberExcelResultDTO.java @@ -45,4 +45,15 @@ public class CollectListMemberExcelResultDTO implements Serializable { @Excel(name = "疫苗接种情况",replace = { "全程接种_1", "未全程接种_2", "未接种_0" }, width = 30) private String ymjz; + /** + * 户籍所在地 + */ + @Excel(name = "户籍所在地", width = 60) + private String domicilePlace; + + /** + * 学校或公司 + */ + @Excel(name = "单位或学校", width = 60) + private String workPlace; } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListResultDTO.java index 1d61469165..2b95eb5e04 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListResultDTO.java @@ -69,6 +69,15 @@ public class CollectListResultDTO implements Serializable { */ private Integer ymjz; + /** + * 户籍所在地 + */ + private String domicilePlace; + + /** + * 学校或公司 + */ + private String workPlace; } } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcStatsResiResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcStatsResiResultDTO.java index 4f670770f3..beacf24482 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcStatsResiResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcStatsResiResultDTO.java @@ -40,5 +40,8 @@ public class IcStatsResiResultDTO implements Serializable { private String managementIcon; private String dataIcon; private String houseShowIcon; - + /** + * 列名 + */ + private String columnName; } \ No newline at end of file diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/SearchByNameResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/SearchByNameResultDTO.java index 0451dafaf0..005e645b16 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/SearchByNameResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/SearchByNameResultDTO.java @@ -55,6 +55,31 @@ public class SearchByNameResultDTO implements Serializable { */ private String userId; + /** + * 手机号 + */ + private String mobile; + + /** + * 性别 + */ + private String gender; + + /** + * 身份证号 + */ + private String idCard; + + /** + * 出生日期 + */ + private String birthday; + + /** + * 备注 + */ + private String remarks; + public SearchByNameResultDTO() { this.sort = NumConstant.ZERO; this.name = ""; @@ -62,5 +87,10 @@ public class SearchByNameResultDTO implements Serializable { this.neighborHoodName = ""; this.buildNum = ""; this.userId = ""; + this.mobile=""; + this.gender=""; + this.idCard=""; + this.birthday=""; + this.remarks=""; } } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffBasicInfoResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffBasicInfoResultDTO.java index 52c432f810..33416972ae 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffBasicInfoResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffBasicInfoResultDTO.java @@ -92,5 +92,8 @@ public class StaffBasicInfoResultDTO implements Serializable { */ private String latitude; - + /** + * 地区编码全路径:例如:37,3702,370203,370203005,370203005015 + */ + private List areaCodePath; } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccinationListResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccinationListResultDTO.java index a0b10a13d3..a2012686fe 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccinationListResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccinationListResultDTO.java @@ -55,6 +55,51 @@ public class VaccinationListResultDTO implements Serializable { */ private String lastInformTime; + /** + * 所属小区ID + */ + private String villageId; + + /** + * 所属小区名称 + */ + private String villageName; + + /** + * 所属楼宇Id + */ + private String buildId; + + /** + * 所属楼宇名称 + */ + private String buildName; + + /** + * 单元id + */ + private String unitId; + + /** + * 单元名称 + */ + private String unitName; + + /** + * 所属家庭Id + */ + private String homeId; + + /** + * 所属家庭名称 + */ + private String homeName; + + /** + * 小区名+楼栋名+单元名+房屋名 + */ + private String allName; + public VaccinationListResultDTO() { this.vaccinationCount = NumConstant.ZERO; this.name = ""; diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java index f054e77608..f5a54cdc8c 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java @@ -43,6 +43,7 @@ import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.security.user.LoginUserUtil; import com.epmet.commons.tools.utils.*; +import com.epmet.commons.tools.utils.poi.excel.FreezeAndFilter; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.constant.SystemMessageType; import com.epmet.constants.ImportTaskConstants; @@ -50,6 +51,8 @@ import com.epmet.dto.IcResiUserDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.enums.IcResiUserTableEnum; +import com.epmet.excel.PartyMemberAgeExportExcel; +import com.epmet.excel.PartyMemberEducationExportExcel; import com.epmet.excel.support.ExportResiUserItemDTO; import com.epmet.feign.EpmetMessageOpenFeignClient; import com.epmet.feign.OperCustomizeOpenFeignClient; @@ -59,6 +62,7 @@ import com.epmet.service.IcResiUserService; import feign.RequestInterceptor; import jodd.io.FileUtil; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.io.FileUtils; import org.apache.commons.io.FilenameUtils; import org.apache.commons.io.IOUtils; @@ -85,6 +89,7 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.util.*; import java.util.concurrent.ExecutorService; +import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; @@ -532,8 +537,24 @@ public class IcResiUserController implements ResultDataResolver { */ @PostMapping("searchbyname") public Result> searchByName(@RequestBody SearchByNameFormDTO formDTO, @LoginUser TokenDto tokenDto) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); ValidatorUtils.validateEntity(formDTO, SearchByNameFormDTO.SearchByNameForm.class); - return new Result>().ok(icResiUserService.searchByName(formDTO, tokenDto)); + return new Result>().ok(icResiUserService.searchByName(formDTO)); + } + + /** + * 需求: http://zentao.elinkservice.cn/task-view-4193.html 第11条 + * @param formDTO + * @param tokenDto + * @return 根据分类搜索 + */ + @PostMapping("searchbycategory") + public Result> search(@RequestBody SearchByNameFormDTO formDTO, @LoginUser TokenDto tokenDto) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO, SearchByNameFormDTO.SearchByCategoryForm.class); + return new Result>().ok(icResiUserService.searchByName(formDTO)); } @NotNull @@ -640,6 +661,56 @@ public class IcResiUserController implements ResultDataResolver { return new Result>().ok(icResiUserService.getPartyMemberAgeList(formDTO)); } + @NoRepeatSubmit + @PostMapping("partymemberagelist/export") + public void partyMemberAgeListExport(@LoginUser TokenDto tokenDto, @RequestBody PartyMemberListFormDTO formDTO, HttpServletResponse response) { + ExcelWriter excelWriter = null; + formDTO.setPageSize(NumConstant.TEN_THOUSAND); + formDTO.setIsPage(false); + List exportList = new ArrayList<>(); + try { + String fileName = ""; + switch (formDTO.getCode()) { + case NumConstant.ZERO_STR: + fileName = "50岁以下党员信息.xlsx"; + break; + case NumConstant.ONE_STR: + fileName = "50-59岁党员信息.xlsx"; + break; + case NumConstant.TWO_STR: + fileName = "60-69岁党员信息.xlsx"; + break; + case NumConstant.THREE_STR: + fileName = "70-79岁党员信息.xlsx"; + break; + case NumConstant.FOUR_STR: + fileName = "80岁以上党员信息.xlsx"; + break; + default: + fileName = "党员年龄信息.xlsx"; + break; + } + excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response), PartyMemberAgeExportExcel.class).build(); + WriteSheet writeSheet = EasyExcel.writerSheet("党员列表").registerWriteHandler(new FreezeAndFilter()).build(); + List list = icResiUserService.getPartyMemberAgeList(formDTO).getList(); + AtomicInteger i = new AtomicInteger(1); + if (CollectionUtils.isNotEmpty(list)) { + exportList = list.stream().map(item -> { + PartyMemberAgeExportExcel excel = ConvertUtils.sourceToTarget(item, PartyMemberAgeExportExcel.class); + excel.setIndex(i.getAndIncrement()); + return excel; + }).collect(Collectors.toList()); + } + excelWriter.write(exportList, writeSheet); + } catch (Exception e) { + log.error("export exception", e); + } finally { + if (excelWriter != null) { + excelWriter.finish(); + } + } + } + /** * 党员学历统计 * @Param formDTO @@ -666,6 +737,62 @@ public class IcResiUserController implements ResultDataResolver { return new Result>().ok(icResiUserService.getPartyMemberEducationList(formDTO)); } + @NoRepeatSubmit + @PostMapping("partymembereducationlist/export") + public void partyMemberEducationListExport(@LoginUser TokenDto tokenDto, @RequestBody PartyMemberListFormDTO formDTO, HttpServletResponse response) { + ExcelWriter excelWriter = null; + formDTO.setPageSize(NumConstant.TEN_THOUSAND); + formDTO.setIsPage(false); + List exportList = new ArrayList<>(); + try { + String fileName = ""; + switch (formDTO.getCode()) { + case NumConstant.ZERO_STR: + fileName = "小学及文盲党员信息.xlsx"; + break; + case NumConstant.ONE_STR: + fileName = "初中学历党员信息.xlsx"; + break; + case NumConstant.TWO_STR: + fileName = "高中学历党员信息.xlsx"; + break; + case NumConstant.THREE_STR: + fileName = "大专学历党员信息.xlsx"; + break; + case NumConstant.FOUR_STR: + fileName = "本科学历党员信息.xlsx"; + break; + case NumConstant.FIVE_STR: + fileName = "硕士学历党员信息.xlsx"; + break; + case NumConstant.SIX_STR: + fileName = "博士学历党员信息.xlsx"; + break; + default: + fileName = "党员学历信息.xlsx"; + break; + } + excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response), PartyMemberEducationExportExcel.class).build(); + WriteSheet writeSheet = EasyExcel.writerSheet("党员列表").registerWriteHandler(new FreezeAndFilter()).build(); + List list = icResiUserService.getPartyMemberEducationList(formDTO).getList(); + AtomicInteger i = new AtomicInteger(1); + if (CollectionUtils.isNotEmpty(list)) { + exportList = list.stream().map(item -> { + PartyMemberEducationExportExcel excel = ConvertUtils.sourceToTarget(item, PartyMemberEducationExportExcel.class); + excel.setIndex(i.getAndIncrement()); + return excel; + }).collect(Collectors.toList()); + } + excelWriter.write(exportList, writeSheet); + } catch (Exception e) { + log.error("export exception", e); + } finally { + if (excelWriter != null) { + excelWriter.finish(); + } + } + } + /** * 根据居民id查询居民信息简介 * @param resiUserId diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java index f5ebf8ac51..d3fe22ee44 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java @@ -124,7 +124,7 @@ public interface IcResiUserDao extends BaseDao { * @author zxc * @date 2021/11/3 2:05 下午 */ - List searchByName(@Param("name") String name, @Param("agencyId") String agencyId, @Param("pageNo") Integer pageNo); + List searchByName(@Param("name") String name, @Param("columnName") String columnName, @Param("agencyId") String agencyId, @Param("pageNo") Integer pageNo); Set selectUserDemandCode(String icResiUserId); diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiMemberEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiMemberEntity.java index 399ce07822..b93190e5c5 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiMemberEntity.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiMemberEntity.java @@ -53,4 +53,13 @@ public class IcResiMemberEntity extends BaseEpmetEntity { */ private Integer ymjz; + /** + * 户籍所在地 + */ + private String domicilePlace; + + /** + * 学校或公司 + */ + private String workPlace; } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/PartyMemberAgeExportExcel.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/PartyMemberAgeExportExcel.java new file mode 100644 index 0000000000..c8a6e6f8d0 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/PartyMemberAgeExportExcel.java @@ -0,0 +1,21 @@ +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2022/4/13 10:46 + */ +@Data +public class PartyMemberAgeExportExcel { + @Excel(name = "序号", width = 10) + private Integer index; + @Excel(name = "姓名", width = 20) + private String name; + @Excel(name = "年龄", width = 10) + private String age; + @Excel(name = "手机号码", width = 30) + private String mobile; +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/PartyMemberEducationExportExcel.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/PartyMemberEducationExportExcel.java new file mode 100644 index 0000000000..1ec5f8033d --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/PartyMemberEducationExportExcel.java @@ -0,0 +1,21 @@ +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2022/4/13 10:46 + */ +@Data +public class PartyMemberEducationExportExcel { + @Excel(name = "序号", width = 10) + private Integer index; + @Excel(name = "姓名", width = 20) + private String name; + @Excel(name = "学历", width = 10) + private String education; + @Excel(name = "手机号码", width = 30) + private String mobile; +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/VaccinationExportExcel.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/VaccinationExportExcel.java index 65534756cd..8fe217466f 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/VaccinationExportExcel.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/VaccinationExportExcel.java @@ -32,4 +32,7 @@ public class VaccinationExportExcel { @Excel(name = "最近一次通知时间",width = 20) private String lastInformTime; + @Excel(name = "所属房屋",width = 40) + private String allName; + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java index fd3e49415d..8bcebefd92 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java @@ -98,11 +98,10 @@ public interface IcResiUserService extends BaseService { /** * @Description 根据名字搜索 * @param formDTO - * @param tokenDto * @author zxc * @date 2021/11/3 1:42 下午 */ - PageData searchByName(SearchByNameFormDTO formDTO, TokenDto tokenDto); + PageData searchByName(SearchByNameFormDTO formDTO); /** diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java index 30203ef9bc..72b43b0506 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java @@ -30,7 +30,9 @@ import com.epmet.commons.tools.exception.EpmetErrorCode; 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.redis.common.CustomerOrgRedis; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; +import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; import com.epmet.commons.tools.security.password.PasswordUtils; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.CpUserDetailRedis; @@ -741,6 +743,8 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl()); } //获取工作人员所属客户名 CustomerDTO dto = new CustomerDTO(); diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java index f27bc46842..94ed60ce9f 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java @@ -23,6 +23,7 @@ import com.epmet.constants.ImportTaskConstants; import com.epmet.dao.IcEpidemicSpecialAttentionDao; import com.epmet.dto.IcEpidemicSpecialAttentionDTO; import com.epmet.dto.form.*; +import com.epmet.dto.result.HouseInfoDTO; import com.epmet.dto.result.UploadImgResultDTO; import com.epmet.dto.result.VaccinationListResultDTO; import com.epmet.entity.IcEpidemicSpecialAttentionEntity; @@ -30,6 +31,7 @@ import com.epmet.enums.ChannelEnum; import com.epmet.excel.ImportEpidemicSpecialAttention; import com.epmet.excel.error.EpidemicSpecialAttentionErrorModel; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; +import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.feign.OssFeignClient; import com.epmet.service.IcEpidemicSpecialAttentionService; import com.epmet.service.IcNoticeService; @@ -53,6 +55,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.*; +import java.util.function.Function; import java.util.stream.Collectors; /** @@ -71,6 +74,8 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl page(Map params) { @@ -160,10 +165,28 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl houseInfoMap = new HashMap<>(); + //查询房屋信息 + if (result.getList().size() > NumConstant.ZERO) { + Set houseIds = result.getList().stream().filter(l -> StringUtils.isNotBlank(l.getHomeId())).map(m -> m.getHomeId()).collect(Collectors.toSet()); + Result> houseInfoRes = govOrgOpenFeignClient.queryListHouseInfo(houseIds, formDTO.getCustomerId()); + List houseInfoDTOList = houseInfoRes.success() && !CollectionUtils.isEmpty(houseInfoRes.getData()) ? houseInfoRes.getData() : new ArrayList<>(); + houseInfoMap = houseInfoDTOList.stream().collect(Collectors.toMap(HouseInfoDTO::getHomeId, Function.identity())); + } + int i = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize(); for (VaccinationListResultDTO v : result.getList()) { i += 1; v.setSort(i); + if (null != houseInfoMap && houseInfoMap.containsKey(v.getHomeId())) { + v.setVillageName(houseInfoMap.get(v.getHomeId()).getNeighborHoodName()); + v.setBuildName(houseInfoMap.get(v.getHomeId()).getBuildingName()); + v.setUnitName(houseInfoMap.get(v.getHomeId()).getUnitName()); + v.setHomeName(houseInfoMap.get(v.getHomeId()).getDoorName()); + v.setAllName(houseInfoMap.get(v.getHomeId()).getAllName()); + } } return result; } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java index 7e376b57ec..50f46409a4 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java @@ -835,19 +835,18 @@ public class IcResiUserServiceImpl extends BaseServiceImpl searchByName(SearchByNameFormDTO formDTO, TokenDto tokenDto) { + public PageData searchByName(SearchByNameFormDTO formDTO) { // 查询工作人员所属组织 - CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId()); + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getUserId()); if (null == staffInfo){ throw new RenException("未查询到当前工作人员所属组织"); } Integer no = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize(); - PageInfo pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.searchByName(formDTO.getName(), staffInfo.getAgencyId(), no)); + PageInfo pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.searchByName(formDTO.getName(), formDTO.getColumnName(),staffInfo.getAgencyId(), no)); List result = pageInfo.getList(); if (CollectionUtils.isEmpty(result)){ return new PageData<>(new ArrayList<>(), pageInfo.getTotal()); @@ -1298,6 +1297,16 @@ public class IcResiUserServiceImpl extends BaseServiceImpl idCards = list.stream().map(m -> m.getIdCard()).distinct().collect(Collectors.toList()); + if (CollectionUtils.isNotEmpty(idCards)){ + Result> housesNameByIdCards = govOrgOpenFeignClient.getHousesNameByIdCards(idCards); + if (!housesNameByIdCards.success()){ + throw new EpmetException("查询居民所属房屋失败..."); + } + if (CollectionUtils.isNotEmpty(housesNameByIdCards.getData())){ + list.forEach(l -> housesNameByIdCards.getData().stream().filter( h -> h.getIdCard().equals(l.getIdCard())).forEach(h -> l.setHouseName(h.getHouseName()))); + } + } PageInfo pageInfo = new PageInfo<>(list); return new PageData<>(list, pageInfo.getTotal()); } @@ -1474,10 +1483,14 @@ public class IcResiUserServiceImpl extends BaseServiceImpl getPartyMemberAgeList(PartyMemberListFormDTO formDTO) { - PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); + if (formDTO.getIsPage()) { + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); + List list = baseDao.getPartyMemberAgeList(formDTO.getOrgType(), formDTO.getOrgId(), formDTO.getCode()); + PageInfo pageInfo = new PageInfo<>(list); + return new PageData<>(list, pageInfo.getTotal()); + } List list = baseDao.getPartyMemberAgeList(formDTO.getOrgType(), formDTO.getOrgId(), formDTO.getCode()); - PageInfo pageInfo = new PageInfo<>(list); - return new PageData<>(list, pageInfo.getTotal()); + return new PageData<>(list, null == list?NumConstant.ZERO:list.size()); } /** @@ -1533,15 +1546,26 @@ public class IcResiUserServiceImpl extends BaseServiceImpl getPartyMemberEducationList(PartyMemberListFormDTO formDTO) { - PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); + if (formDTO.getIsPage()) { + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); + List list = baseDao.getPartyMemberEducationList(formDTO.getOrgType(), formDTO.getOrgId(), formDTO.getCode()); + Result> mapResult = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.EDUCATION.getCode()); + PageInfo pageInfo = new PageInfo<>(list); + if (CollectionUtils.isNotEmpty(list)) { + list.forEach(item -> { + item.setEducation(null == mapResult.getData().get(item.getEducation()) ? "" : mapResult.getData().get(item.getEducation())); + }); + } + return new PageData<>(list, pageInfo.getTotal()); + } List list = baseDao.getPartyMemberEducationList(formDTO.getOrgType(), formDTO.getOrgId(), formDTO.getCode()); Result> mapResult = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.EDUCATION.getCode()); - PageInfo pageInfo = new PageInfo<>(list); if (CollectionUtils.isNotEmpty(list)) { list.forEach(item -> { item.setEducation(null == mapResult.getData().get(item.getEducation()) ? "" : mapResult.getData().get(item.getEducation())); }); } - return new PageData<>(list, pageInfo.getTotal()); + return new PageData<>(list, null == list?NumConstant.ZERO:list.size()); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java index 3766ee7baa..af4c3c0357 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java @@ -220,6 +220,7 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl orDefault = tableColumnCountMap.getOrDefault(item.getTableName(), new HashMap<>()); diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.40__member_huji.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.40__member_huji.sql new file mode 100644 index 0000000000..03a2a4bc23 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.40__member_huji.sql @@ -0,0 +1,2 @@ +alter table ic_resi_member add COLUMN DOMICILE_PLACE VARCHAR(128) comment '户籍所在地' AFTER YMJZ; +alter table ic_resi_member add COLUMN WORK_PLACE VARCHAR(128) comment '单位或学校' AFTER DOMICILE_PLACE; diff --git a/epmet-user/epmet-user-server/src/main/resources/excel/attention_vaccination_template.xlsx b/epmet-user/epmet-user-server/src/main/resources/excel/attention_vaccination_template.xlsx index 9209a1be45..8999a52839 100644 Binary files a/epmet-user/epmet-user-server/src/main/resources/excel/attention_vaccination_template.xlsx and b/epmet-user/epmet-user-server/src/main/resources/excel/attention_vaccination_template.xlsx differ diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml index dc8ae898b1..2b063d7094 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml @@ -24,14 +24,20 @@ a.`NAME`, a.MOBILE, a.ID_CARD, + a.reason, a.REMARK, + b.VILLAGE_ID, + b.BUILD_ID, + b.UNIT_ID, + b.HOME_ID, IFNULL((SELECT DATE_FORMAT(CREATED_TIME,'%Y-%m-%d %H:%i:%s') FROM ic_notice WHERE DEL_FLAG = '0' AND ORIGIN = #{attentionType} AND ID_CARD = a.ID_CARD ORDER BY CREATED_TIME DESC LIMIT 1),'') AS lastInformTime, IFNULL(v.vaccinationCount,0) AS vaccinationCount FROM ic_epidemic_special_attention a + LEFT JOIN ic_resi_user b ON a.id_card = b.id_card LEFT JOIN (SELECT id_card ,count(1) AS vaccinationCount FROM ic_vaccine WHERE DEL_FLAG = 0 GROUP BY ID_CARD) v ON (v.ID_CARD = a.ID_CARD) WHERE a.DEL_FLAG = 0 AND a.ORG_ID = #{orgId} - AND ATTENTION_TYPE = #{attentionType} + AND a.ATTENTION_TYPE = #{attentionType} AND a.`NAME` LIKE CONCAT('%',#{name},'%') @@ -41,6 +47,18 @@ AND a.ID_CARD LIKE CONCAT('%',#{idCard},'%') + + AND b.village_id = #{villageId} + + + AND b.build_id = #{buildId} + + + AND b.unit_id = #{unitId} + + + AND b.home_id = #{homeId} + HAVING vaccinationCount = #{vaccinationCount} @@ -55,11 +73,16 @@ a.ID_CARD, a.REMARK, a.REASON, + b.VILLAGE_ID, + b.BUILD_ID, + b.UNIT_ID, + b.HOME_ID, IFNULL((SELECT DATE_FORMAT(CREATED_TIME,'%Y-%m-%d %H:%i:%s') FROM ic_notice WHERE DEL_FLAG = '0' AND ORIGIN = #{attentionType} AND ID_CARD = a.ID_CARD ORDER BY CREATED_TIME DESC LIMIT 1),'') AS lastInformTime FROM ic_epidemic_special_attention a + LEFT JOIN ic_resi_user b ON a.id_card = b.id_card WHERE a.DEL_FLAG = 0 AND a.ORG_ID = #{orgId} - AND ATTENTION_TYPE = #{attentionType} + AND a.ATTENTION_TYPE = #{attentionType} AND a.`NAME` LIKE CONCAT('%',#{name},'%') @@ -75,6 +98,18 @@ AND a.REMARK LIKE CONCAT('%',#{remark},'%') + + AND b.village_id = #{villageId} + + + AND b.build_id = #{buildId} + + + AND b.unit_id = #{unitId} + + + AND b.home_id = #{homeId} + ORDER BY a.CREATED_TIME DESC diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectDao.xml index 777622c9f5..28e1e8370a 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectDao.xml @@ -47,7 +47,9 @@ m.ID_NUM AS memberIdNum, m.MOBILE AS memberMobile, m.HE_SUAN_COUNT AS heSuanCount, - m.YMJZ AS ymjz + m.YMJZ AS ymjz, + m.DOMICILE_PLACE as domicilePlace, + m.WORK_PLACE as workPlace from ic_resi_member m where m.DEL_FLAG = 0 and m.IC_RESI_COLLECT_ID = #{id} diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiMemberDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiMemberDao.xml index b76345774c..b9bc9300dd 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiMemberDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiMemberDao.xml @@ -12,7 +12,9 @@ m.ID_NUM, m.MOBILE, m.HE_SUAN_COUNT, - m.YMJZ + m.YMJZ, + m.DOMICILE_PLACE, + m.WORK_PLACE FROM ic_resi_member m WHERE diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml index d5fb91de45..a70ffddac0 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml @@ -196,11 +196,25 @@ `NAME`, VILLAGE_ID AS neighborHoodId, BUILD_ID, - GRID_ID + GRID_ID, + MOBILE, + ( case when GENDER='1'then '男' + when GENDER='2' then '女' + else '未知' + end + ) as GENDER, + ID_CARD, + IFNULL(BIRTHDAY,'') AS BIRTHDAY, + IFNULL(REMARKS,'') AS REMARKS FROM ic_resi_user WHERE DEL_FLAG = '0' AND (AGENCY_ID = #{agencyId} OR PIDS LIKE CONCAT('%',#{agencyId},'%')) - AND `NAME` LIKE CONCAT('%',#{name},'%') + + AND `NAME` LIKE CONCAT('%',#{name},'%') + + + and ${columnName}='1' + ORDER BY `NAME` @@ -454,6 +468,7 @@ WHERE ageGroup = #{code} + ORDER BY CONVERT(NAME USING GBK) ASC