diff --git a/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.19__add_dict.sql b/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.19__add_dict.sql new file mode 100644 index 0000000000..70705df799 --- /dev/null +++ b/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.19__add_dict.sql @@ -0,0 +1,11 @@ +INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000014', 'ic_service_type', '服务类别', '', '20', '0', '0', '', '2022-05-27 16:23:27', '', '2022-05-27 16:23:27'); + +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 ('3100000000000000000', '1000000000000000014', '社区养老', '00', '0', '', '0', '0', '0', '', '2022-05-27 16:23:27', '', '2022-05-27 16:23:27'); +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 ('3100000000000000001', '1000000000000000014', '社会保障', '01', '0', '', '1', '0', '0', '', '2022-05-27 16:23:27', '', '2022-05-27 16:23:27'); +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 ('3100000000000000002', '1000000000000000014', '社区救助', '02', '0', '', '2', '0', '0', '', '2022-05-27 16:23:27', '', '2022-05-27 16:23:27'); +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 ('3100000000000000003', '1000000000000000014', '健康医疗', '03', '0', '', '3', '0', '0', '', '2022-05-27 16:23:27', '', '2022-05-27 16:23:27'); +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 ('3100000000000000004', '1000000000000000014', '社区安全', '04', '0', '', '4', '0', '0', '', '2022-05-27 16:23:27', '', '2022-05-27 16:23:27'); +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 ('3100000000000000005', '1000000000000000014', '社区卫生', '05', '0', '', '5', '0', '0', '', '2022-05-27 16:23:27', '', '2022-05-27 16:23:27'); +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 ('3100000000000000006', '1000000000000000014', '社区环境', '06', '0', '', '6', '0', '0', '', '2022-05-27 16:23:27', '', '2022-05-27 16:23:27'); +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 ('3100000000000000007', '1000000000000000014', '社区治安', '07', '0', '', '7', '0', '0', '', '2022-05-27 16:23:27', '', '2022-05-27 16:23:27'); +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 ('3100000000000000008', '1000000000000000014', '社区文化', '08', '0', '', '8', '0', '0', '', '2022-05-27 16:23:27', '', '2022-05-27 16:23:27'); diff --git a/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java b/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java index ab5eccfc39..dd48a5577f 100644 --- a/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java +++ b/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java @@ -288,7 +288,7 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol String errorStackTrace = ExceptionUtils.getErrorStackTrace(e); logger.error("登录:查询部门列表异常:{}", errorStackTrace); } - return null; + return new HashSet<>(); } /** diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java index a813af8152..6c8f4271ce 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java @@ -25,6 +25,7 @@ public enum DictTypeEnum { ITEM_TYPE_QUERY("item_type_query","居民信息组件查询方式",14), SELF_ORG_CATEGORY("self_org_category","社区自组织分类",15), IC_EVENT_SOURCE_TYPE("ic_event_source_type","事件管理",19), + IC_SERVICE_TYPE("ic_service_type","服务类别",20), ; private final String code; diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java index 13b7d37057..d03143dd81 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java @@ -194,7 +194,13 @@ public enum RequirePermissionEnum { /** * 基层治理-群众直报 功能入口 */ - RESI_EVENT_MANAGE("resi_event_manage","基层治理:群众直报","基层治理-群众直报"); + RESI_EVENT_MANAGE("resi_event_manage","基层治理:群众直报","基层治理-群众直报"), + + /** + * 事件管理-工作端小程序列表、详情接口权限 + */ + IC_EVENT_LIST("ic_event_list","基层治理:事件管理:列表","基层治理-事件管理-列表"), + IC_EVENT_DETAIL("ic_event_detail","基层治理:事件管理:详情","基层治理-事件管理-详情"); private String key; private String name; diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index 6a66e1ae71..425417c7d5 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -258,6 +258,7 @@ public enum EpmetErrorCode { NOT_REGEIST_RESI(8927,"未注册居民"), UNIT_EXIST_HOUSES_ERROR(8928,"单元下存在房屋,不可修改单元数"), + MISMATCH(10086,"人员与房屋信息不匹配,请与工作人员联系。"), //通用错误码 start //通用的 错误消息自己定义返回 diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/bean/ResiUserInfoCache.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/bean/ResiUserInfoCache.java new file mode 100644 index 0000000000..6cba629aca --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/bean/ResiUserInfoCache.java @@ -0,0 +1,99 @@ +package com.epmet.commons.tools.redis.common.bean; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 房屋信息缓存 + * @author Administrator + */ +@Data +public class ResiUserInfoCache implements Serializable { + private String id; + + /** + * 客户Id + * */ + private String customerId; + + /** + * 用户id + */ + private String userId; + + /** + * 手机号(注册手机号) + */ + private String mobile; + + /** + * 姓氏 + */ + private String surname; + + /** + * 名 + */ + private String name; + + /** + * 姓名 + */ + private String realName; + + /** + * 身份证号 + */ + private String idNum; + + /** + * 性别(1男2女0未知) + */ + private String gender; + + /** + * 街道 + */ + private String street; + + /** + * 小区名称 + */ + private String district; + + /** + * 楼栋单元 + */ + private String buildingAddress; + + /** + * 昵称(目前来源于微信昵称,后续系统可支持用户有昵称) + */ + private String nickname; + + /** + * 头像(目前来源于微信,后续系统顾客支持上传头像) + */ + private String headImgUrl; + + /** + * 网格Id + * */ + private String registeredGridId; + + /** + * xx机关-yy网格 + * */ + private String registeredGridName; + + /** + * 显示昵称 xx网格-y先生/女士 + * */ + private String showName; + + /** + * xxx街道-尹女士 + */ + private String userShowName; +} diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ExcelPoiUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ExcelPoiUtils.java index ee92fbeb26..199fe6dcdb 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ExcelPoiUtils.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ExcelPoiUtils.java @@ -7,6 +7,7 @@ import cn.afterturn.easypoi.excel.entity.ImportParams; import cn.afterturn.easypoi.excel.entity.TemplateExportParams; import cn.afterturn.easypoi.excel.entity.enmus.ExcelType; import cn.afterturn.easypoi.excel.entity.result.ExcelImportResult; +import cn.afterturn.easypoi.excel.imports.ExcelImportService; import org.apache.commons.lang3.StringUtils; import org.apache.poi.ss.usermodel.Workbook; import org.springframework.web.multipart.MultipartFile; @@ -228,6 +229,27 @@ public class ExcelPoiUtils { throw new IOException(e.getMessage()); } } + + public static ExcelImportResult importExcel1(InputStream inputStream, Integer titleRows, Integer headerRows, Class pojoClass) throws IOException { + if (inputStream == null) { + return null; + } + ImportParams params = new ImportParams(); + params.setTitleRows(titleRows); + params.setHeadRows(headerRows); + params.setSaveUrl("/tmp/excel/"); + params.setNeedSave(true); + try { + // return ExcelImportUtil.importExcel(inputStream, pojoClass, params); + return (new ExcelImportService()).importExcelByIs(inputStream, pojoClass, params, false); + } catch (NoSuchElementException e) { + throw new IOException("excel文件不能为空"); + } catch (Exception e) { + throw new IOException(e.getMessage()); + } + } + + /** * excel 导入,有错误信息 * diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/IDCardUtil.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/IDCardUtil.java new file mode 100644 index 0000000000..3ec57c53f5 --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/IDCardUtil.java @@ -0,0 +1,132 @@ +package com.epmet.commons.tools.utils; + +import com.epmet.commons.tools.enums.GenderEnum; +import org.apache.commons.lang3.StringUtils; + +import java.text.SimpleDateFormat; +import java.util.Date; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2022/6/13 17:53 + */ +public class IDCardUtil { + /** + * 15位身份证号 + */ + private static final Integer FIFTEEN_ID_CARD=15; + /** + * 18位身份证号 + */ + private static final Integer EIGHTEEN_ID_CARD=18; + private static final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); + + /** + * 根据身份证号获取性别 + * @param idCard + * @return + */ + public static String getSex(String idCard){ + String sex =""; + if (StringUtils.isNotBlank(idCard)){ + //15位身份证号 + if (idCard.length() == FIFTEEN_ID_CARD){ + if (Integer.parseInt(idCard.substring(14, 15)) % 2 == 0) { + sex = GenderEnum.WOMAN.getCode(); + } else { + sex = GenderEnum.MAN.getCode(); + } + //18位身份证号 + }else if(idCard.length() == EIGHTEEN_ID_CARD){ + // 判断性别 + if (Integer.parseInt(idCard.substring(16).substring(0, 1)) % 2 == 0) { + sex = GenderEnum.WOMAN.getCode(); + } else { + sex = GenderEnum.MAN.getCode(); + } + } + } + return sex; + } + + /** + * 根据身份证号获取年龄 + * @param idCard + * @return + */ + public static Integer getAge(String idCard){ + int age = 0; + Date date = new Date(); + if (StringUtils.isNotBlank(idCard)){ + //15位身份证号 + if (idCard.length() == FIFTEEN_ID_CARD){ + // 身份证上的年份(15位身份证为1980年前的) + String uyear = "19" + idCard.substring(6, 8); + // 身份证上的月份 + String uyue = idCard.substring(8, 10); + // 当前年份 + String fyear = format.format(date).substring(0, 4); + // 当前月份 + String fyue = format.format(date).substring(5, 7); + if (Integer.parseInt(uyue) <= Integer.parseInt(fyue)) { + age = Integer.parseInt(fyear) - Integer.parseInt(uyear) + 1; + // 当前用户还没过生 + } else { + age = Integer.parseInt(fyear) - Integer.parseInt(uyear); + } + //18位身份证号 + }else if(idCard.length() == EIGHTEEN_ID_CARD){ + // 身份证上的年份 + String year = idCard.substring(6).substring(0, 4); + // 身份证上的月份 + String yue = idCard.substring(10).substring(0, 2); + // 当前年份 + String fyear = format.format(date).substring(0, 4); + // 当前月份 + String fyue = format.format(date).substring(5, 7); + // 当前月份大于用户出身的月份表示已过生日 + if (Integer.parseInt(yue) <= Integer.parseInt(fyue)) { + age = Integer.parseInt(fyear) - Integer.parseInt(year) + 1; + // 当前用户还没过生日 + } else { + age = Integer.parseInt(fyear) - Integer.parseInt(year); + } + } + } + return age; + } + + /** + * 获取出生日期 yyyy年MM月dd日 + * @param idCard + * @return + */ + public static String getBirthday(String idCard){ + String birthday=""; + String year=""; + String month=""; + String day=""; + if (StringUtils.isNotBlank(idCard)){ + //15位身份证号 + if (idCard.length() == FIFTEEN_ID_CARD){ + // 身份证上的年份(15位身份证为1980年前的) + year = "19" + idCard.substring(6, 8); + //身份证上的月份 + month = idCard.substring(8, 10); + //身份证上的日期 + day= idCard.substring(10, 12); + //18位身份证号 + }else if(idCard.length() == EIGHTEEN_ID_CARD){ + // 身份证上的年份 + year = idCard.substring(6).substring(0, 4); + // 身份证上的月份 + month = idCard.substring(10).substring(0, 2); + //身份证上的日期 + day=idCard.substring(12).substring(0,2); + } + birthday=year+"-"+month+"-"+day; + } + return birthday; + } +} 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 add7341a75..d4bdb13bb2 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 @@ -203,6 +203,7 @@ INNER JOIN screen_customer_dept org ON org.CUSTOMER_ID = u.CUSTOMER_ID AND org.DEPT_ID = u.ORG_ID AND org.DEL_FLAG = '0' + WHERE diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactGridGovernDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactGridGovernDailyEntity.java index 4120ed76c5..ce6447a5e4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactGridGovernDailyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactGridGovernDailyEntity.java @@ -238,6 +238,8 @@ public class FactGridGovernDailyEntity extends BaseEpmetEntity { this.eventUnResolvedCount=NumConstant.ZERO; this.workEventResolvedCount=NumConstant.ZERO; this.workEventUnResolvedCount=NumConstant.ZERO; + this.icEventResolvedCount = NumConstant.ZERO; + this.icEventUnResolvedCount = NumConstant.ZERO; this.inGroupTopicResolvedCount=NumConstant.ZERO; this.inGroupTopicUnResolvedCount=NumConstant.ZERO; this.fromIssueResolvedInGridCount=NumConstant.ZERO; @@ -248,5 +250,6 @@ public class FactGridGovernDailyEntity extends BaseEpmetEntity { this.communityClosedCount=NumConstant.ZERO; this.streetClosedCount=NumConstant.ZERO; this.districtDeptClosedCount=NumConstant.ZERO; + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml index 297d15dbd3..1510478bc4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml @@ -75,7 +75,7 @@ AND g.CUSTOMER_ID = #{customerId} GROUP BY - g.CUSTOMER_ID + g.CUSTOMER_ID,t.NEIGHBOR_HOOD_ID + + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml index 38316f51c1..c1800190cb 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml @@ -183,4 +183,14 @@ where del_flag='0' and id=#{partyUnitId} + + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceFeedbackDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceFeedbackDao.xml new file mode 100755 index 0000000000..2f58637231 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceFeedbackDao.xml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceOrgDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceOrgDao.xml new file mode 100644 index 0000000000..18c6dbe981 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceOrgDao.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + UPDATE ic_service_org + SET del_flag = '1', + updated_by = #{updatedBy}, + updated_time = NOW() + WHERE + id = #{id} + AND del_flag = '0' + + + + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceProjectAttachmentDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceProjectAttachmentDao.xml new file mode 100644 index 0000000000..e33c5a3958 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceProjectAttachmentDao.xml @@ -0,0 +1,11 @@ + + + + + + + + DELETE FROM ic_service_project_attachment + WHERE IC_SERVICE_ID = #{id} + + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceProjectDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceProjectDao.xml new file mode 100644 index 0000000000..17f4de965a --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceProjectDao.xml @@ -0,0 +1,72 @@ + + + + + + + + UPDATE ic_service_project + SET ENABLED = 1, + UPDATED_TIME = NOW() + WHERE ID IN ( + #{id} + ) + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceRecordDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceRecordDao.xml new file mode 100644 index 0000000000..ad5df068ef --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceRecordDao.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceScopeDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceScopeDao.xml new file mode 100644 index 0000000000..026d8c6ac4 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceScopeDao.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + update ic_service_scope set del_flag='1',UPDATED_TIME=now(),UPDATED_BY=#{userId} + where SERVICE_RECORD_ID=#{serviceId} + + + + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml index 1f36306bf0..158dcb1b7d 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml @@ -665,4 +665,17 @@ order by r.REPORT_TIME desc + + 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 0f67e0f0e1..6f5622382d 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/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/PointAditiveCalcDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/PointAditiveCalcDTO.java new file mode 100644 index 0000000000..dd61db0db7 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/PointAditiveCalcDTO.java @@ -0,0 +1,79 @@ +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 附加积分计算 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Data +public class PointAditiveCalcDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 积分类别;德育积分moral_education;党建积分party_building + */ + private String categoryCode; + + /** + * 积分主体ID;居民端用户ID或房屋ID + */ + private String subjectId; + + /** + * 已用积分;累计已花费 + */ + private Integer spend; + + /** + * 总分;累计积分 + */ + private Integer total; + + /** + * 删除标识;0.未删除 1.已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/PointAditiveRecordDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/PointAditiveRecordDTO.java new file mode 100644 index 0000000000..b72fe77a08 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/PointAditiveRecordDTO.java @@ -0,0 +1,95 @@ +package com.epmet.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 附加积分记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Data +public class PointAditiveRecordDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 标题;积分变动标题或业务场景标题 + */ + private String title; + + /** + * 说明;积分变动的说明 + */ + private String statement; + + /** + * 分值 + */ + private Integer pointValue; + + /** + * 积分类别;德育积分moral_education;党建积分party_building + */ + private String categoryCode; + + /** + * 积分主体ID;居民端用户ID或房屋ID + */ + private String subjectId; + + /** + * 业务主键 + */ + private String businessId; + + /** + * 业务编码;积分申请point_apply;积分奖励point_reward;积分扣罚point_fine;积分花费point_cost;驳回积分申请point_reject + */ + private String businessCode; + + /** + * 删除标识;0.未删除 1.已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/PointAnnexDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/PointAnnexDTO.java new file mode 100644 index 0000000000..db0bcc7e16 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/PointAnnexDTO.java @@ -0,0 +1,80 @@ +package com.epmet.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 积分相关附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Data +public class PointAnnexDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 业务ID;业务主键,包括积分申请、奖扣等业务 + */ + private String businessId; + + /** + * 业务编码;积分申请point_apply,积分奖励point_reward,积分扣罚point_fine,积分花费point_cost + */ + private String businessCode; + + /** + * 附件访问地址 + */ + private String url; + + /** + * 排序 + */ + private Integer sort; + + /** + * 删除标识;0.未删除 1.已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/PointApplyDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/PointApplyDTO.java new file mode 100644 index 0000000000..459447f84c --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/PointApplyDTO.java @@ -0,0 +1,174 @@ +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 积分申请 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Data +public class PointApplyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 类别ID + */ + private String categoryId; + + /** + * 类别名称 + */ + private String categoryName; + + /** + * 类别编码;德育积分moral_education;党建积分party_building + */ + private String categoryCode; + + /** + * 积分规则ID + */ + private String ruleId; + + /** + * 积分规则名称 + */ + private String ruleName; + + /** + * 申请标题;30字内 + */ + private String title; + + /** + * 申请内容说明;1000字内 + */ + private String statement; + + /** + * 申请状态;0已提交;1已驳回;2已通过 + */ + private String status; + + /** + * 申请人所属网格名称 + */ + private String gridName; + + /** + * 申请人所属网格ID + */ + private String gridId; + + /** + * 申请人所属组织ID + */ + private String agencyId; + + /** + * 上级组织ID路径 + */ + private String agencyPids; + + /** + * 用户ID;申请人ID(居民端用户ID) + */ + private String userId; + + /** + * 居民ID;申请人居民ID(IC_RESI_USER表主键) + */ + private String icResiUser; + + /** + * 房屋ID;房屋或家庭ID + */ + private String houseId; + + /** + * 房屋名称;完整拼接的名称 + */ + private String houseAllName; + + /** + * 头像 + */ + private String headImgUrl; + + /** + * 昵称 + */ + private String nickname; + + /** + * 性别;未知0;男1;女2 + */ + private String gender; + + /** + * 姓名 + */ + private String name; + + /** + * 身份证号 + */ + private String idCard; + + /** + * 手机号 + */ + private String mobile; + + /** + * 审核备注 + */ + private String remark; + + /** + * 删除标识;0.未删除 1.已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/PointApplyFormDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/PointApplyFormDTO.java new file mode 100644 index 0000000000..2d46dca728 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/PointApplyFormDTO.java @@ -0,0 +1,32 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.AddGroup; +import lombok.Data; +import lombok.NoArgsConstructor; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.List; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2022/6/14 14:08 + */ +@NoArgsConstructor +@Data +public class PointApplyFormDTO implements Serializable { + private static final long serialVersionUID = 4850146857511834988L; + private String customerId; + private String userId; + @NotBlank(message = "申请类别不能为空", groups = {AddGroup.class}) + private String ruleId; + @NotBlank(message = "标题不能为空", groups = {AddGroup.class}) + private String title; + @NotBlank(message = "申请内容不能为空", groups = {AddGroup.class}) + private String statement; + @NotBlank(message = "分类不能为空", groups = {AddGroup.class}) + private String categoryCode; + private List annexList; + private String gridId; +} diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/MyTotalPointResultDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/MyTotalPointResultDTO.java new file mode 100644 index 0000000000..81d70ffd3c --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/MyTotalPointResultDTO.java @@ -0,0 +1,37 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2022/6/14 15:39 + */ +@Data +public class MyTotalPointResultDTO implements Serializable { + private static final long serialVersionUID = 15299506166024546L; + /** + * 德育积分moral_education;党建积分party_building;活跃积分active + */ + private String categoryCode; + /** + * 总积分 + */ + private Integer total; + /** + * 已花费积分 + */ + private Integer spend; + /** + * 可用积分 + */ + private Integer usable; + + public MyTotalPointResultDTO() { + this.total = 0; + this.spend = 0; + this.usable = 0; + } +} diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/common/CommonConstant.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/common/CommonConstant.java new file mode 100644 index 0000000000..9f8a8786d9 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/common/CommonConstant.java @@ -0,0 +1,48 @@ +/** + * Copyright (c) 2018 人人开源 All rights reserved. + * + * https://www.renren.io + * + * 版权所有,侵权必究! + */ + +package com.epmet.common; + +import com.epmet.commons.tools.constant.Constant; + +/** + * 身边党员-积分排行 入参常量 + * + * @author Mark sunlightcs@gmail.com + * @since 1.1.0 + */ +public interface CommonConstant extends Constant { + /** + * 德育积分 + */ + String MORAL_EDUCATION = "moral_education"; + /** + * 党建积分 + */ + String PARTY_BUILDING = "party_building"; + /** + * 活跃积分 + */ + String ACTIVE = "active"; + /** + * 积分申请 + */ + String POINT_APPLY = "point_apply"; + /** + * 积分奖励 + */ + String POINT_REWARD = "point_reward"; + /** + * 积分扣罚 + */ + String POINT_FINE = "point_fine"; + /** + * 积分花费 + */ + String POINT_COST = "point_cost"; +} diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/common/enu/ApplyStatusEnum.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/common/enu/ApplyStatusEnum.java new file mode 100644 index 0000000000..5db66d452b --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/common/enu/ApplyStatusEnum.java @@ -0,0 +1,49 @@ +package com.epmet.common.enu; + +import java.util.Objects; + +/** + * @author Administrator + */ + +public enum ApplyStatusEnum { + //审核状态 + AUDITING("0", "未审核"), + REJECT("1", "未通过"), + PASSED("2", "已通过"); + + private String code; + private String name; + + + ApplyStatusEnum(String code, String name) { + this.code = code; + this.name = name; + } + + public static String getName(String code) { + ApplyStatusEnum[] applyStatusEnums = values(); + for (ApplyStatusEnum applyStatusEnum : applyStatusEnums) { + if (Objects.equals(applyStatusEnum.getCode(), code)) { + return applyStatusEnum.getName(); + } + } + return null; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/PointApplyController.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/PointApplyController.java new file mode 100644 index 0000000000..4f7ba03a07 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/PointApplyController.java @@ -0,0 +1,84 @@ +package com.epmet.controller; + +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.dto.PointApplyDTO; +import com.epmet.dto.form.PointApplyFormDTO; +import com.epmet.service.PointApplyService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.Map; + + +/** + * 积分申请 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@RestController +@RequestMapping("apply") +public class PointApplyController { + + @Autowired + private PointApplyService pointApplyService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = pointApplyService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + PointApplyDTO data = pointApplyService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody PointApplyDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + pointApplyService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody PointApplyDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + pointApplyService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + pointApplyService.delete(ids); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("submit") + public Result submit(@LoginUser TokenDto tokenDto, @RequestBody PointApplyFormDTO formDTO){ + //效验数据 + ValidatorUtils.validateEntity(formDTO, AddGroup.class, DefaultGroup.class); + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + pointApplyService.submit(formDTO); + return new Result(); + } + +} diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ResiPointController.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ResiPointController.java index 0b19244e0a..05b37956d2 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ResiPointController.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ResiPointController.java @@ -232,5 +232,10 @@ public class ResiPointController { return new Result().ok(userPointStatisticalDailyService.gridPointRank(tokenDto, formDTO)); } + @PostMapping("total") + public Result> totalPoint(@LoginUser TokenDto tokenDto) { + return new Result>().ok(userPointTotalService.totalPoint(tokenDto)); + } + } diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointAditiveCalcDao.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointAditiveCalcDao.java new file mode 100644 index 0000000000..b5410693e5 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointAditiveCalcDao.java @@ -0,0 +1,16 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.PointAditiveCalcEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 附加积分计算 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Mapper +public interface PointAditiveCalcDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointAditiveRecordDao.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointAditiveRecordDao.java new file mode 100644 index 0000000000..cf95a4367c --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointAditiveRecordDao.java @@ -0,0 +1,16 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.PointAditiveRecordEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 附加积分记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Mapper +public interface PointAditiveRecordDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointAnnexDao.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointAnnexDao.java new file mode 100644 index 0000000000..6d1163adc3 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointAnnexDao.java @@ -0,0 +1,16 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.PointAnnexEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 积分相关附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Mapper +public interface PointAnnexDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointApplyDao.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointApplyDao.java new file mode 100644 index 0000000000..29fd3d8c90 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointApplyDao.java @@ -0,0 +1,16 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.PointApplyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 积分申请 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Mapper +public interface PointApplyDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointAditiveCalcEntity.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointAditiveCalcEntity.java new file mode 100644 index 0000000000..552b9e5dea --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointAditiveCalcEntity.java @@ -0,0 +1,46 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 附加积分计算 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("point_aditive_calc") +public class PointAditiveCalcEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 积分类别;德育积分moral_education;党建积分party_building + */ + private String categoryCode; + + /** + * 积分主体ID;居民端用户ID或房屋ID + */ + private String subjectId; + + /** + * 已用积分;累计已花费 + */ + private Integer spend; + + /** + * 总分;累计积分 + */ + private Integer total; + +} diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointAditiveRecordEntity.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointAditiveRecordEntity.java new file mode 100644 index 0000000000..1a3ad83056 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointAditiveRecordEntity.java @@ -0,0 +1,61 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 附加积分记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("point_aditive_record") +public class PointAditiveRecordEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 标题;积分变动标题或业务场景标题 + */ + private String title; + + /** + * 说明;积分变动的说明 + */ + private String statement; + + /** + * 分值 + */ + private Integer pointValue; + + /** + * 积分类别;德育积分moral_education;党建积分party_building + */ + private String categoryCode; + + /** + * 积分主体ID;居民端用户ID或房屋ID + */ + private String subjectId; + + /** + * 业务主键 + */ + private String businessId; + + /** + * 业务编码;积分申请point_apply;积分奖励point_reward;积分扣罚point_fine;积分花费point_cost;驳回积分申请point_reject + */ + private String businessCode; + +} diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointAnnexEntity.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointAnnexEntity.java new file mode 100644 index 0000000000..b5b19d6ccb --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointAnnexEntity.java @@ -0,0 +1,45 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 积分相关附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("point_annex") +public class PointAnnexEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 业务ID;业务主键,包括积分申请、奖扣等业务 + */ + private String businessId; + + /** + * 业务编码;积分申请point_apply,积分奖励point_reward,积分扣罚point_fine,积分花费point_cost + */ + private String businessCode; + + /** + * 附件访问地址 + */ + private String url; + + /** + * 排序 + */ + private Integer sort; +} diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointApplyEntity.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointApplyEntity.java new file mode 100644 index 0000000000..29c2272fec --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointApplyEntity.java @@ -0,0 +1,144 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 积分申请 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("point_apply") +public class PointApplyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 类别ID + */ + private String categoryId; + + /** + * 类别名称 + */ + private String categoryName; + + /** + * 类别编码;德育积分moral_education;党建积分party_building + */ + private String categoryCode; + + /** + * 积分规则ID + */ + private String ruleId; + + /** + * 积分规则名称 + */ + private String ruleName; + + /** + * 申请标题;30字内 + */ + private String title; + + /** + * 申请内容说明;1000字内 + */ + private String statement; + + /** + * 申请状态;0已提交;1已驳回;2已通过 + */ + private String status; + + /** + * 申请人所属网格名称 + */ + private String gridName; + + /** + * 申请人所属网格ID + */ + private String gridId; + + /** + * 申请人所属组织ID + */ + private String agencyId; + + /** + * 上级组织ID路径 + */ + private String agencyPids; + + /** + * 用户ID;申请人ID(居民端用户ID) + */ + private String userId; + + /** + * 居民ID;申请人居民ID(IC_RESI_USER表主键) + */ + private String icResiUser; + + /** + * 房屋ID;房屋或家庭ID + */ + private String houseId; + + /** + * 房屋名称;完整拼接的名称 + */ + private String houseAllName; + + /** + * 头像 + */ + private String headImgUrl; + + /** + * 昵称 + */ + private String nickname; + + /** + * 性别;未知0;男1;女2 + */ + private String gender; + + /** + * 姓名 + */ + private String name; + + /** + * 身份证号 + */ + private String idCard; + + /** + * 手机号 + */ + private String mobile; + + /** + * 审核备注 + */ + private String remark; + +} diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointAditiveCalcService.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointAditiveCalcService.java new file mode 100644 index 0000000000..6b87e5cefc --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointAditiveCalcService.java @@ -0,0 +1,78 @@ +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.PointAditiveCalcDTO; +import com.epmet.entity.PointAditiveCalcEntity; + +import java.util.List; +import java.util.Map; + +/** + * 附加积分计算 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +public interface PointAditiveCalcService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-06-14 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-06-14 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return PointAditiveCalcDTO + * @author generator + * @date 2022-06-14 + */ + PointAditiveCalcDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void save(PointAditiveCalcDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void update(PointAditiveCalcDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-06-14 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointAditiveRecordService.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointAditiveRecordService.java new file mode 100644 index 0000000000..857d5b797d --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointAditiveRecordService.java @@ -0,0 +1,78 @@ +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.PointAditiveRecordDTO; +import com.epmet.entity.PointAditiveRecordEntity; + +import java.util.List; +import java.util.Map; + +/** + * 附加积分记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +public interface PointAditiveRecordService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-06-14 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-06-14 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return PointAditiveRecordDTO + * @author generator + * @date 2022-06-14 + */ + PointAditiveRecordDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void save(PointAditiveRecordDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void update(PointAditiveRecordDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-06-14 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointAnnexService.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointAnnexService.java new file mode 100644 index 0000000000..f2c7cdb49e --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointAnnexService.java @@ -0,0 +1,78 @@ +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.PointAnnexDTO; +import com.epmet.entity.PointAnnexEntity; + +import java.util.List; +import java.util.Map; + +/** + * 积分相关附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +public interface PointAnnexService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-06-14 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-06-14 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return PointAnnexDTO + * @author generator + * @date 2022-06-14 + */ + PointAnnexDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void save(PointAnnexDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void update(PointAnnexDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-06-14 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointApplyService.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointApplyService.java new file mode 100644 index 0000000000..7988b94f26 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointApplyService.java @@ -0,0 +1,88 @@ +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.PointApplyDTO; +import com.epmet.dto.form.PointApplyFormDTO; +import com.epmet.entity.PointApplyEntity; + +import java.util.List; +import java.util.Map; + +/** + * 积分申请 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +public interface PointApplyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-06-14 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-06-14 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return PointApplyDTO + * @author generator + * @date 2022-06-14 + */ + PointApplyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void save(PointApplyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void update(PointApplyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-06-14 + */ + void delete(String[] ids); + + /** + * 申请德育积分/党建积分 + * @Param formDTO + * @Return + * @Author zhaoqifeng + * @Date 2022/6/14 14:14 + */ + void submit(PointApplyFormDTO formDTO); +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointTotalService.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointTotalService.java index 8c9977dce8..07bc0b77e1 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointTotalService.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointTotalService.java @@ -18,8 +18,10 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.form.CommonUserFormDTO; import com.epmet.dto.form.ResiPointRankFormDTO; +import com.epmet.dto.result.MyTotalPointResultDTO; import com.epmet.dto.result.ResiPointDetailResultDTO; import com.epmet.dto.result.ResiPointRankListResultDTO; import com.epmet.entity.UserPointTotalEntity; @@ -69,4 +71,14 @@ public interface UserPointTotalService extends BaseService * @date 2020.07.22 15:58 **/ ResiPointDetailResultDTO getMyPointGroupByCustomer(CommonUserFormDTO customerUserParam); + + /** + * 积分总分 + * + * @Param tokenDto + * @Return {@link MyTotalPointResultDTO} + * @Author zhaoqifeng + * @Date 2022/6/14 15:46 + */ + List totalPoint(TokenDto tokenDto); } diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointAditiveCalcServiceImpl.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointAditiveCalcServiceImpl.java new file mode 100644 index 0000000000..2b8bc7ed16 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointAditiveCalcServiceImpl.java @@ -0,0 +1,82 @@ +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.PointAditiveCalcDao; +import com.epmet.dto.PointAditiveCalcDTO; +import com.epmet.entity.PointAditiveCalcEntity; +import com.epmet.service.PointAditiveCalcService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 附加积分计算 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Service +public class PointAditiveCalcServiceImpl extends BaseServiceImpl implements PointAditiveCalcService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, PointAditiveCalcDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, PointAditiveCalcDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public PointAditiveCalcDTO get(String id) { + PointAditiveCalcEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, PointAditiveCalcDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(PointAditiveCalcDTO dto) { + PointAditiveCalcEntity entity = ConvertUtils.sourceToTarget(dto, PointAditiveCalcEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(PointAditiveCalcDTO dto) { + PointAditiveCalcEntity entity = ConvertUtils.sourceToTarget(dto, PointAditiveCalcEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointAditiveRecordServiceImpl.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointAditiveRecordServiceImpl.java new file mode 100644 index 0000000000..6ca0fb5f22 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointAditiveRecordServiceImpl.java @@ -0,0 +1,84 @@ +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.PointAditiveRecordDao; +import com.epmet.dto.PointAditiveRecordDTO; +import com.epmet.entity.PointAditiveRecordEntity; +import com.epmet.service.PointAditiveRecordService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 附加积分记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Service +public class PointAditiveRecordServiceImpl extends BaseServiceImpl implements PointAditiveRecordService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, PointAditiveRecordDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, PointAditiveRecordDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public PointAditiveRecordDTO get(String id) { + PointAditiveRecordEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, PointAditiveRecordDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(PointAditiveRecordDTO dto) { + PointAditiveRecordEntity entity = ConvertUtils.sourceToTarget(dto, PointAditiveRecordEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(PointAditiveRecordDTO dto) { + PointAditiveRecordEntity entity = ConvertUtils.sourceToTarget(dto, PointAditiveRecordEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointAnnexServiceImpl.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointAnnexServiceImpl.java new file mode 100644 index 0000000000..fdfd83e9fd --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointAnnexServiceImpl.java @@ -0,0 +1,83 @@ +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.PointAnnexDao; +import com.epmet.dto.PointAnnexDTO; +import com.epmet.entity.PointAnnexEntity; +import com.epmet.service.PointAnnexService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 积分相关附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Service +public class PointAnnexServiceImpl extends BaseServiceImpl implements PointAnnexService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, PointAnnexDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, PointAnnexDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public PointAnnexDTO get(String id) { + PointAnnexEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, PointAnnexDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(PointAnnexDTO dto) { + PointAnnexEntity entity = ConvertUtils.sourceToTarget(dto, PointAnnexEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(PointAnnexDTO dto) { + PointAnnexEntity entity = ConvertUtils.sourceToTarget(dto, PointAnnexEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointApplyServiceImpl.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointApplyServiceImpl.java new file mode 100644 index 0000000000..4827ab4d2d --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointApplyServiceImpl.java @@ -0,0 +1,153 @@ +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.common.CommonConstant; +import com.epmet.common.enu.ApplyStatusEnum; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.EpmetException; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.redis.common.CustomerOrgRedis; +import com.epmet.commons.tools.redis.common.bean.GridInfoCache; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dao.PointAnnexDao; +import com.epmet.dao.PointApplyDao; +import com.epmet.dto.PointApplyDTO; +import com.epmet.dto.form.PointApplyFormDTO; +import com.epmet.dto.result.HomeInfoResultDTO; +import com.epmet.entity.PointAnnexEntity; +import com.epmet.entity.PointApplyEntity; +import com.epmet.feign.EpmetUserOpenFeignClient; +import com.epmet.service.PointApplyService; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.concurrent.atomic.AtomicInteger; + +/** + * 积分申请 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Service +public class PointApplyServiceImpl extends BaseServiceImpl implements PointApplyService { + + @Resource + private EpmetUserOpenFeignClient epmetUserOpenFeignClient; + @Resource + private PointAnnexDao pointAnnexDao; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, PointApplyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, PointApplyDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public PointApplyDTO get(String id) { + PointApplyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, PointApplyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(PointApplyDTO dto) { + PointApplyEntity entity = ConvertUtils.sourceToTarget(dto, PointApplyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(PointApplyDTO dto) { + PointApplyEntity entity = ConvertUtils.sourceToTarget(dto, PointApplyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + /** + * 申请德育积分/党建积分 + * + * @param formDTO + * @Param formDTO + * @Return + * @Author zhaoqifeng + * @Date 2022/6/14 14:14 + */ + @Override + public void submit(PointApplyFormDTO formDTO) { + PointApplyEntity entity = ConvertUtils.sourceToTarget(formDTO, PointApplyEntity.class); + //从缓存获取网格信息 + GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(formDTO.getGridId()); + if (null == gridInfo) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取网格缓存失败", "获取网格缓存失败"); + } + //如果申请类型为德育积分,需要获取用户所在房屋 + if (CommonConstant.MORAL_EDUCATION.equals(formDTO.getCategoryCode())) { + Result result = epmetUserOpenFeignClient.getHomeInfo(); + if (!result.success() || null == result.getData()) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取居民所在家庭信息失败", "获取居民所在家庭信息失败"); + } + if (StringUtils.isBlank(result.getData().getHouseId())) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "无法申请", "没有绑定家庭,无法申请德育积分"); + } + entity.setHouseId(result.getData().getHouseId()); + } + + entity.setAgencyId(gridInfo.getPid()); + entity.setAgencyPids(gridInfo.getPids()); + entity.setStatus(ApplyStatusEnum.AUDITING.getCode()); + baseDao.insert(entity); + + //保存附件 + if (CollectionUtils.isNotEmpty(formDTO.getAnnexList())) { + AtomicInteger i = new AtomicInteger(NumConstant.ONE); + formDTO.getAnnexList().forEach(url -> { + PointAnnexEntity annex = new PointAnnexEntity(); + annex.setCustomerId(formDTO.getCustomerId()); + annex.setBusinessId(entity.getId()); + annex.setBusinessCode(CommonConstant.POINT_APPLY); + annex.setUrl(url); + annex.setSort(i.getAndIncrement()); + pointAnnexDao.insert(annex); + }); + } + + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointTotalServiceImpl.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointTotalServiceImpl.java index 66f83715c8..4dbda58db2 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointTotalServiceImpl.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointTotalServiceImpl.java @@ -17,15 +17,22 @@ package com.epmet.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.epmet.common.CommonConstant; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.EpmetException; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.dao.PointAditiveCalcDao; import com.epmet.dao.UserPointTotalDao; import com.epmet.dto.form.CommonUserFormDTO; import com.epmet.dto.form.ResiPointRankFormDTO; import com.epmet.dto.result.*; +import com.epmet.entity.PointAditiveCalcEntity; import com.epmet.entity.UserPointTotalEntity; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.service.UserPointTotalService; @@ -33,9 +40,9 @@ import com.github.pagehelper.PageHelper; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import javax.annotation.Resource; import java.util.*; import java.util.function.Function; import java.util.stream.Collectors; @@ -50,8 +57,10 @@ import java.util.stream.Collectors; @Slf4j public class UserPointTotalServiceImpl extends BaseServiceImpl implements UserPointTotalService { - @Autowired - EpmetUserOpenFeignClient epmetUserOpenFeignClient; + @Resource + private EpmetUserOpenFeignClient epmetUserOpenFeignClient; + @Resource + private PointAditiveCalcDao pointAditiveCalcDao; /** * @Description 获取指定居民的积分信息 @@ -203,4 +212,66 @@ public class UserPointTotalServiceImpl extends BaseServiceImpl totalPoint(TokenDto tokenDto) { + List list = new ArrayList(); + //活跃度积分 + MyTotalPointResultDTO active = new MyTotalPointResultDTO(); + active.setCategoryCode(CommonConstant.ACTIVE); + ResiPointDetailResultDTO activeTotal = baseDao.selectPointByCustomerUserId(tokenDto.getUserId(), tokenDto.getCustomerId()); + if (null != activeTotal) { + active.setTotal(activeTotal.getAccumulatedPoint()); + active.setUsable(activeTotal.getUsablePoint()); + active.setSpend(activeTotal.getAccumulatedPoint() - activeTotal.getUsablePoint()); + } + list.add(active); + //德育积分 + MyTotalPointResultDTO education = new MyTotalPointResultDTO(); + education.setCategoryCode(CommonConstant.MORAL_EDUCATION); + //获取居民绑定的家庭 + Result result = epmetUserOpenFeignClient.getHomeInfo(); + if (!result.success() || null == result.getData()) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取居民绑定家庭信息失败", "获取居民绑定家庭信息失败"); + } + if (StringUtils.isNotBlank(result.getData().getHouseId())) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(PointAditiveCalcEntity::getCustomerId, tokenDto.getCustomerId()); + wrapper.eq(PointAditiveCalcEntity::getSubjectId, result.getData().getHouseId()); + wrapper.eq(PointAditiveCalcEntity::getCategoryCode, CommonConstant.MORAL_EDUCATION); + PointAditiveCalcEntity entity = pointAditiveCalcDao.selectOne(wrapper); + if (null != entity) { + education.setTotal(entity.getTotal()); + education.setSpend(entity.getSpend()); + education.setUsable(entity.getTotal() - entity.getSpend()); + } + } + list.add(education); + + //党建积分 + MyTotalPointResultDTO party = new MyTotalPointResultDTO(); + party.setCategoryCode(CommonConstant.PARTY_BUILDING); + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(PointAditiveCalcEntity::getCustomerId, tokenDto.getCustomerId()); + wrapper.eq(PointAditiveCalcEntity::getSubjectId, tokenDto.getUserId()); + wrapper.eq(PointAditiveCalcEntity::getCategoryCode, CommonConstant.PARTY_BUILDING); + PointAditiveCalcEntity entity = pointAditiveCalcDao.selectOne(wrapper); + if (null != entity) { + party.setTotal(entity.getTotal()); + party.setSpend(entity.getSpend()); + party.setUsable(entity.getTotal() - entity.getSpend()); + } + list.add(party); + + return list; + } + } diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointAditiveCalcDao.xml b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointAditiveCalcDao.xml new file mode 100644 index 0000000000..c015362019 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointAditiveCalcDao.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointAditiveRecordDao.xml b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointAditiveRecordDao.xml new file mode 100644 index 0000000000..4839dd26fa --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointAditiveRecordDao.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointAnnexDao.xml b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointAnnexDao.xml new file mode 100644 index 0000000000..b53f102654 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointAnnexDao.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointApplyDao.xml b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointApplyDao.xml new file mode 100644 index 0000000000..6daa8936d8 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointApplyDao.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java index c5845d11c8..899a40c76b 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java @@ -3,6 +3,8 @@ package com.epmet.service.impl; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; @@ -309,6 +311,14 @@ public class CodeServiceImpl implements CodeService { if (null == authInfo) { throw new RenException("未授权"); } + //校验小程序是否设置了用户隐私 如果没有设置则执行设置后 再发布 + WxResult privacySetting = wxMaCodeService.getPrivacySetting(authInfo.getAuthorizerAccessToken()); + if (!privacySetting.success()){ + WxResult stringWxResult = wxMaCodeService.setPrivacySetting(authInfo.getAuthorizerAccessToken()); + if (!stringWxResult.success()){ + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),stringWxResult.getErrorMsg(),"用户隐私权限设置失败"); + } + } //获取上传代码信息 CodeCustomerDTO uploadCode = codeCustomerService.getUploadCodeByCustomer(formDTO.getCodeId(), codeCustomerDTO.getCustomerId(), codeCustomerDTO.getClientType()); diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/constant/WxMaCodeConstant.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/constant/WxMaCodeConstant.java index 7d1263e3b3..735a3b4569 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/constant/WxMaCodeConstant.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/constant/WxMaCodeConstant.java @@ -200,4 +200,16 @@ public interface WxMaCodeConstant { * 获取代码草稿列表 */ String DELETE_TEMPLATE_URL = "https://api.weixin.qq.com/wxa/deletetemplate"; + + /** + * 获取用户隐私地址 + * @see https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/privacy_config/set_privacy_setting.html + */ + String GET_PRIVACY_SETTING_URL = "https://api.weixin.qq.com/cgi-bin/component/getprivacysetting"; + + /** + * 设置用户隐私地址 + * @see https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/privacy_config/set_privacy_setting.html + */ + String SET_PRIVACY_SETTING_URL = "https://api.weixin.qq.com/cgi-bin/component/setprivacysetting"; } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/WxMaCodeService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/WxMaCodeService.java index 452ad866e1..e116eca160 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/WxMaCodeService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/WxMaCodeService.java @@ -72,6 +72,22 @@ public interface WxMaCodeService { */ WxResult submitAudit(String accessToken, WxMaCodeSubmitAuditRequest auditRequest); + /** + * 获取用户隐私接口权限. + * + * @param accessToken 小程序对应的accessToken + * @return 审核编号 + */ + WxResult getPrivacySetting(String accessToken); + + /** + * 设置用户隐私接口权限. + * + * @param accessToken 小程序对应的accessToken + * @return 审核编号 + */ + WxResult setPrivacySetting(String accessToken); + /** * 加急审核申请 * @author zhaoqifeng @@ -197,7 +213,7 @@ public interface WxMaCodeService { /** * 版本退回 * @author zhaoqifeng - * @date 2020/8/10 15:41 + * @date 2020/8/10 15:41 * @param accessToken * @return com.epmet.wxapi.result.WxResult */ @@ -215,7 +231,7 @@ public interface WxMaCodeService { /** * 将草稿添加到代码模板库 * @author zhaoqifeng - * @date 2020/10/28 10:23 + * @date 2020/10/28 10:23 * @param accessToken * @param request * @return com.epmet.wxapi.result.WxResult diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/impl/WxMaCodeServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/impl/WxMaCodeServiceImpl.java index ecf30738c8..b7a6a6374b 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/impl/WxMaCodeServiceImpl.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/impl/WxMaCodeServiceImpl.java @@ -1,5 +1,7 @@ package com.epmet.wxapi.service.impl; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.utils.HttpClientManager; @@ -36,6 +38,7 @@ import java.util.Map; public class WxMaCodeServiceImpl implements WxMaCodeService { private static final String ERR_CODE = "errcode"; private static final String ERR_MSG = "errmsg"; + private static final String SETTING_LIST = "setting_list"; @Autowired private WxMaDomainDTO wxMaDomainDTO; @@ -150,6 +153,50 @@ public class WxMaCodeServiceImpl implements WxMaCodeService { return result; } + @Override + public WxResult getPrivacySetting(String accessToken) { + WxResult result = new WxResult<>(); + String url = WxMaCodeConstant.SET_PRIVACY_SETTING_URL + "?" + "access_token=" + accessToken; + Result submitResult = HttpClientManager.getInstance().sendPostByJSON(url, "{}"); + log.info("getPrivacySetting result:{}", JSON.toJSONString(submitResult)); + if (!submitResult.success()) { + result.setErrorCode(submitResult.getCode()); + result.setErrorMsg(submitResult.getMsg()); + return result; + } + JSONObject jsonObject = JSONObject.parseObject(submitResult.getData()); + + + JSONArray jsonArray = jsonObject.getJSONArray(SETTING_LIST); + if (jsonArray.size() == 9){ + result.setErrorCode(9999); + result.setErrorMsg("用户隐私权限未设置或设置不完整"); + return result; + } + result.setErrorCode(jsonObject.getInteger(ERR_CODE)); + result.setErrorMsg(WxMaErrorMsgEnum.findMsgByCode(jsonObject.getInteger(ERR_CODE))); + return result; + } + + @Override + public WxResult setPrivacySetting(String accessToken) { + //todo 目前设置9个隐私权限 + String param = "{\"owner_setting\":{\"contact_email\":\"eshitong@elink-cn.com\",\"contact_phone\":\"\",\"contact_qq\":\"\",\"contact_weixin\":\"\",\"ext_file_media_id\":\"\",\"notice_method\":\"通知\",\"store_expire_timestamp\":\"\"},\"setting_list\":[{\"privacy_key\":\"UserInfo\",\"privacy_text\":\"用户个人中心显示用户头像及昵称等\"},{\"privacy_key\":\"Location\",\"privacy_text\":\"发表话题等功能时获取位置信息\"},{\"privacy_key\":\"Record\",\"privacy_text\":\"录音发话题等\"},{\"privacy_key\":\"Album\",\"privacy_text\":\"上传照片发话题等\"},{\"privacy_key\":\"AlbumWriteOnly\",\"privacy_text\":\"下载党建声音图片或项目附近等\"},{\"privacy_key\":\"Camera\",\"privacy_text\":\"通过相机拍照发话题反应问题等\"},{\"privacy_key\":\"PhoneNumber\",\"privacy_text\":\"通过手机号为用户开通账号,更新用户基础信息\"},{\"privacy_key\":\"MessageFile\",\"privacy_text\":\"发表话题等可以选择文件上传\"},{\"privacy_key\":\"ChooseLocation\",\"privacy_text\":\"用户巡查上报\"}],\"privacy_ver\":2}\n"; + WxResult result = new WxResult<>(); + String url = WxMaCodeConstant.SET_PRIVACY_SETTING_URL + "?" + "access_token=" + accessToken; + Result submitResult = HttpClientManager.getInstance().sendPostByJSON(url, param); + log.info("setPrivacySetting param:{}, result:{}", param, JSON.toJSONString(submitResult)); + if (!submitResult.success()) { + result.setErrorCode(submitResult.getCode()); + result.setErrorMsg(submitResult.getMsg()); + return result; + } + JSONObject jsonObject = JSONObject.parseObject(submitResult.getData()); + result.setErrorCode(jsonObject.getInteger(ERR_CODE)); + result.setErrorMsg(WxMaErrorMsgEnum.findMsgByCode(jsonObject.getInteger(ERR_CODE))); + return result; + } + @Override public WxResult speedUpAudit(String accessToken, WxMaSpeedUpAuditReq request) { WxResult result = new WxResult(); diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueVoteStatisticalController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueVoteStatisticalController.java index 204bbd4e55..061a224946 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueVoteStatisticalController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueVoteStatisticalController.java @@ -18,6 +18,7 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; @@ -106,6 +107,7 @@ public class IssueVoteStatisticalController { * @param formDTO * @author zxc */ + @NoRepeatSubmit @PostMapping("votecount") public Result voteCount(@LoginUser TokenDto tokenDto, @RequestBody IssueIdFormDTO formDTO){ return new Result().ok(issueVoteStatisticalService.voteCount(tokenDto,formDTO)); diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/CommonHouseFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/CommonHouseFormDTO.java new file mode 100644 index 0000000000..f56f003137 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/CommonHouseFormDTO.java @@ -0,0 +1,17 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @program: epmet-cloud + * @description: + * @author: wangtong + * @create: 2022-06-10 13:26 + **/ +@Data +public class CommonHouseFormDTO implements Serializable { + + private String houseCode; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseInfoFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseInfoFormDTO.java new file mode 100644 index 0000000000..e1dd0ea53d --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseInfoFormDTO.java @@ -0,0 +1,19 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +/** + * @program: epmet-cloud + * @description: + * @author: wangtong + * @create: 2022-06-09 15:12 + **/ +@Data +public class HouseInfoFormDTO implements Serializable { + + @NotNull(message = "房屋编码不可为空") + private String houseCode; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseListFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseListFormDTO.java index 060cfd4c19..0e2e25a049 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseListFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseListFormDTO.java @@ -89,6 +89,13 @@ public class IcHouseListFormDTO extends PageFormDTO { * 结束日期 eg:20220505 */ private String updateEndDate; - + private String customerId; + + private String selectType; + + /** + * 楼栋ID + */ + private String unitId; } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/MapAddAreaFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/MapAddAreaFormDTO.java index 8fcf455279..0f4ba3494f 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/MapAddAreaFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/MapAddAreaFormDTO.java @@ -3,6 +3,7 @@ package com.epmet.dto.form; import lombok.Data; import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Pattern; import java.io.Serializable; /** @@ -28,4 +29,16 @@ public class MapAddAreaFormDTO implements Serializable { @NotBlank(message = "coordinates不能为空",groups = MapAddAreaForm.class) private String coordinates; + + /** + * 中心位置经度 经纬度同时填写才更新 + */ + @Pattern(regexp = "^([-+])?\\d+(\\.\\d+)?$", message = "请输入正确的经度值",groups = MapAddAreaForm.class) + private String longitude; + + /** + * 中心位置纬度 + */ + @Pattern(regexp = "^([-+])?\\d+(\\.\\d+)?$", message = "请输入正确的纬度值",groups = MapAddAreaForm.class) + private String latitude; } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseInfoResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseInfoResultDTO.java new file mode 100644 index 0000000000..e83ec67bf4 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseInfoResultDTO.java @@ -0,0 +1,106 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @program: epmet-cloud + * @description: + * @author: wangtong + * @create: 2022-06-09 15:22 + **/ +@Data +public class HouseInfoResultDTO implements Serializable { + + private String houseId; + + private String houseName; + + private String houseCode; + + private String houseQrcodeUrl; + + private String customerId; + + /** + * 所属行政组织 + */ + private String agencyId; + private String agencyPids; + private String agencyName; + + /** + * eg:市北区-阜新路街道-南宁社区 + */ + private String agencyPathName; + /** + * 组织的area_code + */ + private String areaCode; + + /** + * 所属网格 + */ + private String gridName; + private String gridId; + + /** + * 所属小区 + */ + private String neighborHoodId; + private String neighborHoodName; + + /** + * 所属楼栋 + */ + private String buildingId; + private String buildingName; + + /** + * 所属单元id + */ + private String buildingUnitId; + private String unitName; + + /** + * 门牌号 + */ + private String doorName; + + /** + * 房屋类型,这里存储字典value就可以 + */ + private String houseType; + private String houseTypeName; + /** + * 存储字典value + */ + private String purpose; + private String purposeName; + /** + * 1出租;0未出租 + */ + private Integer rentFlag; + private String rentName; + + /** + * 房主姓名 + */ + private String ownerName; + + /** + * 房主电话 + */ + private String ownerPhone; + + /** + * 房主身份证号 + */ + private String ownerIdCard; + + /** + * 备注 + */ + private String remark; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ServiceProjectScopeResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ServiceProjectScopeResultDTO.java new file mode 100644 index 0000000000..a727b2dae8 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ServiceProjectScopeResultDTO.java @@ -0,0 +1,20 @@ +package com.epmet.dto.result; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.List; + +@Data +@NoArgsConstructor +@AllArgsConstructor +public class ServiceProjectScopeResultDTO { + + private String objectId; + private String objectName; + private String objectType; + + private List children; + +} 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 81ad4df7e2..60419614fc 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 @@ -661,4 +661,15 @@ public interface GovOrgOpenFeignClient { */ @GetMapping("/gov/org/ichouse/getbyhousecode/{houseCode}") Result getByHouseCode(@PathVariable("houseCode") String houseCode); + + + /** + * @describe: 工作端-通过房屋编码获取房屋信息 + * @author wangtong + * @date 2022/6/10 13:27 + * @params [dto] + * @return com.epmet.commons.tools.utils.Result + */ + @PostMapping("/gov/org/house/getHomeInfoByHouseCode") + Result getHomeInfoByHouseCode(CommonHouseFormDTO dto); } 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 6270575319..23054533c7 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 @@ -425,4 +425,10 @@ public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient { public Result getDelAgencyGridIdList(String agencyId) { return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getDelAgencyGridIdList", agencyId); } + + @Override + public Result getHomeInfoByHouseCode(CommonHouseFormDTO dto) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getHomeInfoByHouseCode", dto); + } + } 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 bb960749f5..6e99cd25f7 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 @@ -113,6 +113,7 @@ public class HouseController implements ResultDataResolver { LoginUserDetailsResultDTO loginUserDetail = getLoginUserDetailsResultDTO(loginUser, "【查询房屋】查询当前staff所在组织信息失败"); formDTO.setAgencyId(loginUserDetail.getAgencyId()); ValidatorUtils.validateEntity(formDTO); + formDTO.setSelectType("id"); return new Result().ok(houseService.getHouseList(formDTO)); } @@ -159,6 +160,7 @@ public class HouseController implements ResultDataResolver { formDTO.setAgencyId(loginUserDetail.getAgencyId()); formDTO.setBuildingName(buildingName); formDTO.setNeighborHoodName(neighborhoodName); + formDTO.setSelectType("agency"); return new Result>().ok(houseService.getHouseList(formDTO)); } @@ -367,6 +369,7 @@ public class HouseController implements ResultDataResolver { if (StringUtils.isBlank(formDTO.getAgencyId())) { LoginUserDetailsResultDTO loginUserDetail = getLoginUserDetailsResultDTO(tokenDto, "【查询房屋】查询当前staff所在组织信息失败"); formDTO.setAgencyId(loginUserDetail.getAgencyId()); + formDTO.setSelectType("agency"); } ValidatorUtils.validateEntity(formDTO); @@ -523,7 +526,7 @@ public class HouseController implements ResultDataResolver { @NoRepeatSubmit @PostMapping("createBatchHouseCodeAndUrl") public Result createBatchHouseCodeAndUrl(@LoginUser TokenDto loginUser) { - return houseService.createBatchHouseCodeAndUrl(loginUser); + return houseService.createBatchHouseCodeAndUrl(loginUser.getCustomerId()); } @@ -551,6 +554,21 @@ public class HouseController implements ResultDataResolver { @PostMapping("createHouseQrcodeUrl") public String createHouseQrcodeUrl(@RequestBody TestFormDTO formDTO) throws Exception { return houseService.createHouseQrcodeUrl(formDTO.getHouseId(),null); + } + + /** + * @describe: 工作端-通过房屋编码获取房屋信息 + * @author wangtong + * @date 2022/6/9 14:48 + * @params [tokenDto] + * @return com.epmet.commons.tools.utils.Result + */ + @PostMapping("getHomeInfoByHouseCode") + public Result getHomeInfoByHouseCode(@RequestBody HouseInfoFormDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto); + return houseService.getHomeInfoByHouseCode(dto); } + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/ServiceProjectController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/ServiceProjectController.java new file mode 100644 index 0000000000..6bae4e8f2f --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/ServiceProjectController.java @@ -0,0 +1,35 @@ +package com.epmet.controller; + +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.dto.result.ServiceProjectScopeResultDTO; +import com.epmet.service.ServiceProjectService; +import com.epmet.service.impl.ServiceProjectServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 服务项目 + */ +@RestController +@RequestMapping("icServiceProject") +public class ServiceProjectController { + + @Autowired + public ServiceProjectService serviceProjectService; + + + /** + * 服务范围树查询 + * @return + */ + @RequestMapping("service/serviceScopeTree") + public Result getServiceScopeTree(@LoginUser TokenDto loginInfo) { + ServiceProjectScopeResultDTO r = serviceProjectService.getServiceScopeTree(loginInfo.getUserId()); + return new Result().ok(r); + } +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java index a63c7e0ff7..892ef61681 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java @@ -273,7 +273,7 @@ public interface CustomerAgencyDao extends BaseDao { * @author zxc * @date 2021/10/25 9:59 上午 */ - void addMapArea(@Param("orgId") String orgId, @Param("level") String level, @Param("coordinates") String coordinates); + void addMapArea(@Param("orgId") String orgId, @Param("level") String level, @Param("coordinates") String coordinates, @Param("latitude") String latitude, @Param("longitude") String longitude); /** * @param pid 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 0b6bdcfd93..8efb45cf92 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 @@ -154,4 +154,22 @@ public interface IcHouseDao extends BaseDao { * @return com.epmet.dto.result.IcHouseQrcodeConfigDTO */ CustomerOrgParameterEntity selectByCustomerId(@Param("customerId") String customerId, @Param("preKey") String preKey); + + /** + * @describe: 工作端-通过房屋编码获取房屋信息 + * @author wangtong + * @date 2022/6/9 15:23 + * @params [houseCode] + * @return com.epmet.dto.result.HouseInfoResultDTO + */ + HouseInfoResultDTO selectHomeInfoByHouseCode(@Param("houseCode") String houseCode); + + /** + * @describe: 根据筛选获取需要下载的一户一码信息 + * @author wangtong + * @date 2022/6/13 16:34 + * @params [formDTO] + * @return java.util.List + */ + List searchHouseZipList(IcHouseListFormDTO formDTO); } 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 701f164790..04c0fc819c 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 @@ -162,5 +162,15 @@ public interface HouseService { * @params [] * @return com.epmet.commons.tools.utils.Result */ - Result createBatchHouseCodeAndUrl(TokenDto loginUser); + Result createBatchHouseCodeAndUrl(String customerId); + + + /** + * @describe: 通过房屋编码获取房屋信息 + * @author wangtong + * @date 2022/6/9 14:51 + * @params [tokenDto] + * @return com.epmet.commons.tools.utils.Result + */ + Result getHomeInfoByHouseCode(HouseInfoFormDTO dto); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/ServiceProjectService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/ServiceProjectService.java new file mode 100644 index 0000000000..22058470de --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/ServiceProjectService.java @@ -0,0 +1,9 @@ +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.result.ServiceProjectScopeResultDTO; +import com.epmet.entity.IcPlaceOrgEntity; + +public interface ServiceProjectService { + ServiceProjectScopeResultDTO getServiceScopeTree(String staffId); +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java index 4b11db9a40..ceee6804eb 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java @@ -711,7 +711,7 @@ public class AgencyServiceImpl implements AgencyService { */ @Override public void mapAddArea(MapAddAreaFormDTO formDTO) { - customerAgencyDao.addMapArea(formDTO.getOrgId(), formDTO.getLevel(), formDTO.getCoordinates()); + customerAgencyDao.addMapArea(formDTO.getOrgId(), formDTO.getLevel(), formDTO.getCoordinates(), formDTO.getLatitude(), formDTO.getLongitude()); } /** 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 3887f57c1b..e329260f69 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 @@ -27,6 +27,7 @@ import com.epmet.commons.tools.utils.FileUtils; import com.epmet.commons.tools.utils.HouseQRcodeUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.CustomerGridConstant; +import com.epmet.constant.NeighborhoodConstant; import com.epmet.constants.ImportTaskConstants; import com.epmet.dao.*; import com.epmet.dto.*; @@ -55,6 +56,7 @@ import org.apache.commons.fileupload.FileItem; import org.apache.commons.fileupload.disk.DiskFileItemFactory; import org.apache.commons.lang3.StringUtils; import org.apache.http.entity.ContentType; +import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -314,14 +316,16 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { @Override public PageData getHouseList(IcHouseListFormDTO formDTO) { - // 查询pids String pids = null; - if (StringUtils.isNotBlank(formDTO.getAgencyId())) { - pids = getPids(formDTO.getAgencyId()); - } - if (StringUtils.isNotBlank(formDTO.getLevel()) && OrgTypeEnum.AGENCY.getCode().equals(formDTO.getLevel())) { - pids = getPids(formDTO.getAgencyId()); + if (StringUtils.isNotBlank(formDTO.getSelectType()) && formDTO.getSelectType().equals("agency")){ + if (StringUtils.isNotBlank(formDTO.getAgencyId())){ + pids = getPids(formDTO.getAgencyId()); + } + }else if (StringUtils.isNotBlank(formDTO.getSelectType()) && formDTO.getSelectType().equals("id")){ + if (StringUtils.isNotBlank(formDTO.getLevel()) && OrgTypeEnum.AGENCY.getCode().equals(formDTO.getLevel())){ + pids = getPids(formDTO.getId()); + } } formDTO.setPids(pids); PageInfo pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()) @@ -806,15 +810,22 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { @Override public void downloadZip(HttpServletResponse response, IcHouseListFormDTO formDTO) throws Exception { - // 查询pids - String pids = null; - if (StringUtils.isNotBlank(formDTO.getAgencyId())) { - pids = getPids(formDTO.getAgencyId()); - } - if (StringUtils.isNotBlank(formDTO.getLevel()) && OrgTypeEnum.AGENCY.getCode().equals(formDTO.getLevel())) { - pids = getPids(formDTO.getAgencyId()); + if(NeighborhoodConstant.GRID.equals(formDTO.getLevel())){ + //根据网格过滤 + formDTO.setGridId(formDTO.getId()); + }else if(StringUtils.isNotBlank(formDTO.getId())){ + //根据组织过滤 + formDTO.setAgencyId(formDTO.getId()); } - formDTO.setPids(pids); + // 查询pids +// String pids = null; +// if (StringUtils.isNotBlank(formDTO.getAgencyId())) { +// pids = getPids(formDTO.getAgencyId()); +// } +// if (StringUtils.isNotBlank(formDTO.getLevel()) && OrgTypeEnum.AGENCY.getCode().equals(formDTO.getLevel())) { +// pids = getPids(formDTO.getAgencyId()); +// } +// formDTO.setPids(pids); //response response.reset(); @@ -828,7 +839,7 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { response.setHeader("Content-Disposition", "attachment;filename=" + downloadFilename); ZipOutputStream zip = new ZipOutputStream(response.getOutputStream()); - List houseList = icHouseDao.searchHouseByPage(formDTO); + List houseList = icHouseDao.searchHouseZipList(formDTO); //获取一户一码前缀地址 CustomerOrgParameterEntity codePre = icHouseDao.selectByCustomerId(formDTO.getCustomerId(), HouseQrcodeEnum.PREFIX_KEY.getCode()); @@ -987,8 +998,8 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { @Override - public Result createBatchHouseCodeAndUrl(TokenDto loginUser) { - List houseList = icHouseDao.selectBatchHouseCodeAndUrl(loginUser.getCustomerId()); + public Result createBatchHouseCodeAndUrl(String customerId) { + List houseList = icHouseDao.selectBatchHouseCodeAndUrl(customerId); houseList.forEach(house->{ IcHouseEntity entity = icHouseDao.selectById(house.getHouseId()); if(StringUtils.isNotBlank(house.getAreaCode())){ @@ -1035,4 +1046,28 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { return buffer.toString(); } + @Override + public Result getHomeInfoByHouseCode(HouseInfoFormDTO dto) { + HouseInfoResultDTO house = icHouseDao.selectHomeInfoByHouseCode(dto.getHouseCode()); + + HouseInfoCache cache = CustomerIcHouseRedis.getHouseInfo(house.getCustomerId(), house.getHouseId()); + BeanUtils.copyProperties(cache,house); + + if (null != house && StringUtils.isNotBlank(house.getAgencyId())) { + AgencyInfoCache agencyInfoCache = CustomerOrgRedis.getAgencyInfo(house.getAgencyId()); + house.setAgencyPathName(StringUtils.isNotBlank(agencyInfoCache.getAllParentName()) ? agencyInfoCache.getAllParentName().concat(StrConstant.HYPHEN).concat(agencyInfoCache.getOrganizationName()) : agencyInfoCache.getOrganizationName()); + house.setAreaCode(StringUtils.isNotBlank(agencyInfoCache.getAreaCode()) ? agencyInfoCache.getAreaCode() : StrConstant.EPMETY_STR); + house.setAgencyName(StringUtils.isNotBlank(agencyInfoCache.getOrganizationName()) ? agencyInfoCache.getOrganizationName() : StrConstant.EPMETY_STR); + } else { + house.setAgencyPathName(StrConstant.EPMETY_STR); + house.setAgencyName(StrConstant.EPMETY_STR); + } + + house.setHouseTypeName(HouseTypeEnums.getTypeValue(house.getHouseType())); + house.setRentName(HouseRentFlagEnums.getTypeValue(house.getRentFlag())); + house.setPurposeName(HousePurposeEnums.getTypeValue(house.getPurpose())); + return new Result().ok(house); + } + + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/ServiceProjectServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/ServiceProjectServiceImpl.java new file mode 100644 index 0000000000..3e4fc139d5 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/ServiceProjectServiceImpl.java @@ -0,0 +1,107 @@ +package com.epmet.service.impl; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dao.CustomerAgencyDao; +import com.epmet.dao.CustomerGridDao; +import com.epmet.dao.IcNeighborHoodDao; +import com.epmet.dto.IcNeighborHoodDTO; +import com.epmet.dto.result.AgencyTreeResultDTO; +import com.epmet.dto.result.ServiceProjectScopeResultDTO; +import com.epmet.entity.CustomerAgencyEntity; +import com.epmet.entity.IcPlaceOrgEntity; +import com.epmet.service.CustomerAgencyService; +import com.epmet.service.NeighborHoodService; +import com.epmet.service.ServiceProjectService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +@Slf4j +@Service +public class ServiceProjectServiceImpl implements ServiceProjectService { + + @Autowired + private CustomerAgencyDao agencyDao; + + @Autowired + private CustomerGridDao gridDao; + + @Autowired + private IcNeighborHoodDao neighborHoodDao; + + @Autowired + private CustomerAgencyService customerAgencyService; + + public ServiceProjectServiceImpl() { + System.out.println(6); + } + + @Override + public ServiceProjectScopeResultDTO getServiceScopeTree(String staffId) { + AgencyTreeResultDTO orgTreeData = customerAgencyService.getOrgTreeData(staffId); + + ServiceProjectScopeResultDTO rootScope = new ServiceProjectScopeResultDTO(); + rootScope.setObjectId(orgTreeData.getAgencyId()); + rootScope.setObjectType(orgTreeData.getLevel()); + rootScope.setObjectName(orgTreeData.getAgencyName()); + rootScope.setChildren(convert2ServiceProjectScope(orgTreeData.getSubAgencyList())); + + return rootScope; + } + + private List convert2ServiceProjectScope(List oldChildren) { + + ArrayList scopes = new ArrayList<>(); + + for (AgencyTreeResultDTO oldChild : oldChildren) { + ServiceProjectScopeResultDTO scope = new ServiceProjectScopeResultDTO(); + scope.setObjectId(oldChild.getAgencyId()); + scope.setObjectType(oldChild.getLevel()); + scope.setObjectName(oldChild.getAgencyName()); + if ("grid".equals(oldChild.getLevel())) { + // 如果是网格,那么还要查询网格下的小区 + List neighborhoods = neighborHoodDao.selectNeighborList(oldChild.getAgencyId()); + + List neighborhoodScopes = neighborhoods.stream().map(n -> new ServiceProjectScopeResultDTO(n.getId(), + n.getNeighborHoodName(), + "neighborhood", + null)).collect(Collectors.toList()); + + scope.setChildren(neighborhoodScopes); + } else { + // 递归处理子级 + List subAgencyList = oldChild.getSubAgencyList(); + if (subAgencyList != null && !CollectionUtils.isEmpty(subAgencyList)) { + List subOrgScope = convert2ServiceProjectScope(subAgencyList); + scope.setChildren(subOrgScope); + } + } + + scopes.add(scope); + } + + return scopes; + } + + //public void recursiveFillChildren(ServiceProjectScopeResultDTO parentObject) { + // String parentObjectType = parentObject.getObjectType(); + // if ("grid".equals(parentObjectType)) { + // // 如果父级是网格,那么查询子级小区 + // neighborHoodService.listNeighborhood() + // } else if ("agency".equals(parentObjectType)) { + // // 如果父级是单位,那么查询子级单位或者网格 + // String parentObjectId = parentObject.getObjectId(); + // if ("community".equals(parentObject)) { + // gridDao.get + // } else { + // agencyDao.getSubAgencyList() + // } + // } + // + //} +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml index 37169a21a4..2b6a9910ff 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml @@ -37,7 +37,12 @@ ic_neighbor_hood SET - COORDINATES = #{coordinates}, + + LATITUDE = #{latitude},LONGITUDE = #{longitude}, + + + COORDINATES = #{coordinates}, + UPDATED_TIME = NOW() WHERE ID = #{orgId} AND DEL_FLAG = '0' 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 81ca8c415d..fcc9679915 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 @@ -435,6 +435,83 @@ and PARAMETER_KEY=#{preKey} and DEL_FLAG='0' + + + + + diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberDao.xml b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberDao.xml index d71cdbd883..21ea480cca 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberDao.xml +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberDao.xml @@ -51,7 +51,7 @@ a.LDZH, a.PARTY_ZW, a.ADDRESS, - IF( b.PAY_DATE IS NULL, 0, 1 ) AS isPay, + IF( e.MONEY IS NULL, 0, 1 ) AS isPay, b.PAY_DATE, a.CULTURE, a.TOTAL_SCORE AS point, @@ -73,6 +73,8 @@ AND b.CUSTOMER_ID = #{customerId} INNER JOIN ic_party_org d ON a.SSZB = d.ID AND d.DEL_FLAG = 0 + LEFT JOIN ic_party_member_pay_record_detail e ON a.ID = e.PARTY_MEMBER_ID + AND e.DEL_FLAG = 0 AND e.`YEAR` = #{year} AND e.`MONTH` = #{month} WHERE a.DEL_FLAG = 0 AND a.CUSTOMER_ID = #{customerId} diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberPayRecordDetailDao.xml b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberPayRecordDetailDao.xml index aaf0abe2c1..f4898cea8a 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberPayRecordDetailDao.xml +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberPayRecordDetailDao.xml @@ -33,6 +33,7 @@ left join ic_party_org org on org.ID = pm.SSZB and org.DEL_FLAG = 0 where prd.DEL_FLAG = 0 and prd.CUSTOMER_ID = #{customerId} + AND (pm.SSZB = #{orgId} OR pm.ORG_PIDS LIKE concat('%', #{orgId}, '%')) and pm.NAME like concat('%',#{name},'%') @@ -42,9 +43,6 @@ and pm.ID_CARD like concat('%',#{idCard},'%') - - and FIND_IN_SET(#{orgId},pm.ORG_PIDS) - and prd.YEAR = #{year} diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberPointDao.xml b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberPointDao.xml index 60fa191f70..c2b6857a10 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberPointDao.xml +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberPointDao.xml @@ -8,6 +8,23 @@ WHERE id = #{partyMemberId} + + UPDATE ic_party_member_point + SET BASE_POINT = #{entity.basePoint}, + BASE_OPTIONS = #{entity.baseOptions}, + REVIEW_POINT = #{entity.reviewPoint}, + REVIEW_OPTIONS = #{entity.reviewOptions}, + INSPIRE_POINT = #{entity.inspirePoint}, + INSPIRE_OPTIONS = #{entity.inspireOptions}, + WARN_POINT = #{entity.warnPoint}, + WARN_OPTIONS = #{entity.warnOptions} + WHERE + DEL_FLAG = '0' + AND PARTY_MEMBER_ID = #{entity.partyMemberId} + AND YEAR = #{entity.year} + AND QUARTER = #{entity.quarter} + AND CUSTOMER_ID = #{entity.customerId} + - \ No newline at end of file + diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiUserConfirmSubmitDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiUserConfirmSubmitDTO.java index 429852ff04..ea119fbd80 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiUserConfirmSubmitDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiUserConfirmSubmitDTO.java @@ -27,6 +27,8 @@ public class IcResiUserConfirmSubmitDTO implements Serializable { */ private String customerId; + private String staffId; + /** * 组织Id */ @@ -207,4 +209,6 @@ public class IcResiUserConfirmSubmitDTO implements Serializable { */ private String operationDescribe; + private String houseCode; + } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/MoveOutMemberFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/MoveOutMemberFormDTO.java new file mode 100644 index 0000000000..18bc3cc7c8 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/MoveOutMemberFormDTO.java @@ -0,0 +1,136 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class MoveOutMemberFormDTO implements Serializable { + + private static final long serialVersionUID = 7059338517023959372L; + + /** + * 客户id + */ + private String customerId; + + /** + * 居民信息ID + */ + private String icResiUserId; + + /** + * 居民所在网格ID + */ + private String gridId; + + /** + * 迁出到网格名 迁出类型为in时必填 + */ + private String gridName; + + /** + * 迁出到小区名 迁出类型为in时必填 + */ + private String villageName; + + /** + * 迁出到楼栋名 迁出类型为in时必填 + */ + private String buildName; + + /** + * 迁出到单元名 迁出类型为in时必填 + */ + private String unitName; + + /** + * 迁出到房屋名 迁出类型为in时必填 + */ + private String homeName; + + /** + * 外迁详细地址 迁出类型为out时必填 + */ + private String xxdz; + + /** + * 迁出类型 迁出客户外out 迁出客户内in + */ + private String submitType; + + /** + * 迁出原因 + */ + private String deleteReason; + + /** + * 组织id + */ + private String agencyId; + + /** + * 组织的pids + */ + private String pids; + + /** + * 房屋ID + */ + private String houseId; + + /** + * 名字 + */ + private String allName; + + /** + * 姓 + */ + private String surname; + + /** + * 名 + */ + private String name; + + /** + * 手机号 + */ + private String mobile; + + /** + * 性别 + */ + private String gender; + + /** + * 身份证号 + */ + private String idCard; + + /** + * 出生日期 + */ + private String birthday; + + /** + * 户籍所在地 + */ + private String hjszd; + + /** + * 现居住地 + */ + private String xjzd; + + /** + * 民族 + */ + private String mz; + + /** + * 与户主关系 + */ + private String yhzgx; +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/HomeInfoResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/HomeInfoResultDTO.java index 5ff591455f..e890aa3092 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/HomeInfoResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/HomeInfoResultDTO.java @@ -16,6 +16,7 @@ public class HomeInfoResultDTO implements Serializable { private static final long serialVersionUID = -6109420020924607393L; private String icResiUserId; + private String houseId; private String houseName; private String houseCode; private String qrCodeUrl; diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcUserRoleResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcUserRoleResultDTO.java index cfcd9da6aa..97cc70ea11 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcUserRoleResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcUserRoleResultDTO.java @@ -3,6 +3,8 @@ package com.epmet.dto.result; import lombok.Data; import java.io.Serializable; +import java.util.List; +import java.util.Map; /** * @Description @@ -16,4 +18,10 @@ public class IcUserRoleResultDTO implements Serializable { * 是否是志愿者0否,1是 */ private String isVolunteer; + /** + * 是否是党员0否,1是 + */ + private String isPartyMember; + + private Map>> detail; } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserBaseInfoResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserBaseInfoResultDTO.java index 01741a9275..d14ec7a0bf 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserBaseInfoResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserBaseInfoResultDTO.java @@ -100,7 +100,7 @@ public class UserBaseInfoResultDTO implements Serializable { /** * 微信基本信息 */ - private UserWechatResultDTO userWechatResultDTO; + // private UserWechatResultDTO userWechatResultDTO; /** * xxx街道-尹女士 diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java index e5952a2726..2071c9f904 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java @@ -806,4 +806,7 @@ public interface EpmetUserOpenFeignClient { @PostMapping("/epmetuser/icVolunteerPoly/volunteerDataExtraction/{customerId}") Result volunteerDataExtraction(@PathVariable("customerId") String customerId); + + @PostMapping("/epmetuser/myHome/homeInfo") + Result getHomeInfo(); } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java index 404ba7d0c3..23554e16d4 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java @@ -595,4 +595,9 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "volunteerDataExtraction", customerId); } + @Override + public Result getHomeInfo() { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getHomeInfo"); + } + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java index 4b28ce6ac2..0e595cc96f 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java @@ -11,6 +11,7 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.IcResiUserConfirmDTO; import com.epmet.dto.form.IcResiUserConfirmGetDTO; import com.epmet.dto.form.IcResiUserConfirmSubmitDTO; +import com.epmet.dto.form.MoveOutMemberFormDTO; import com.epmet.dto.form.RegisterAndBindFormDTO; import com.epmet.dto.result.HomeInfoResultDTO; import com.epmet.dto.result.HomeUserBriefResultDTO; @@ -80,15 +81,16 @@ public class MyHomeController { // return icResiUserConfirmService.editMember(dto); // } // + /** - * @describe: 删除家庭成员 - * @author wangtong - * @date 2022/6/1 16:10 - * @params [dto] - * @return com.epmet.commons.tools.utils.Result - */ + * @return com.epmet.commons.tools.utils.Result + * @describe: 删除家庭成员 + * @author wangtong + * @date 2022/6/1 16:10 + * @params [dto] + */ @PostMapping("delMember") - public Result delMember(@RequestBody IcResiUserConfirmSubmitDTO dto){ + public Result delMember(@RequestBody IcResiUserConfirmSubmitDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); dto.setSubmitType(HomeMemberOperationEnum.DELETE.getCode()); @@ -96,44 +98,59 @@ public class MyHomeController { } /** + * @return com.epmet.commons.tools.utils.Result * @describe: 新增家庭成员 * @author wangtong * @date 2022/6/1 15:50 * @params [dto] - * @return com.epmet.commons.tools.utils.Result */ @PostMapping("addMember") - public Result addMember(@RequestBody IcResiUserConfirmSubmitDTO dto){ + public Result addMember(@RequestBody IcResiUserConfirmSubmitDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); return icResiUserService.addMember(dto); } /** + * @describe: 工作端-新增家庭成员 + * @author wangtong + * @date 2022/6/1 15:50 + * @params [dto] + * @return com.epmet.commons.tools.utils.Result + */ + @PostMapping("addWorkMember") + public Result addWorkMember(@LoginUser TokenDto tokenDto,@RequestBody IcResiUserConfirmSubmitDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + dto.setCustomerId(tokenDto.getCustomerId()); + dto.setStaffId(tokenDto.getUserId()); + return icResiUserService.addWorkMember(dto); + } + + /** + * @return com.epmet.commons.tools.utils.Result * @describe: 修改家庭成员 * @author wangtong * @date 2022/6/1 15:27 * @params [dto] - * @return com.epmet.commons.tools.utils.Result */ @PostMapping("editMember") - public Result editMember(@RequestBody IcResiUserConfirmSubmitDTO dto){ + public Result editMember(@RequestBody IcResiUserConfirmSubmitDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); return icResiUserService.editMember(dto); } - /** - * @describe: 查询家庭成员信息 - * @author wangtong - * @date 2022/6/1 16:14 - * @params [dto] - * @return com.epmet.commons.tools.utils.Result - */ + * @return com.epmet.commons.tools.utils.Result + * @describe: 查询家庭成员信息 + * @author wangtong + * @date 2022/6/1 16:14 + * @params [dto] + */ @PostMapping("getMemberDetail") - public Result getMemberDetail(@RequestBody IcResiUserConfirmGetDTO dto){ + public Result getMemberDetail(@RequestBody IcResiUserConfirmGetDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); return icResiUserConfirmService.getMemberDetail(dto); @@ -161,4 +178,21 @@ public class MyHomeController { HomeInfoResultDTO result = myHomeService.getHomeInfo(tokenDto); return new Result().ok(result); } + + /** + * 【我的家庭】迁出家庭成员 + * + * @param form + * @param tokenDto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/10 11:06 + */ + @PostMapping("/moveOutMember") + public Result moveOutMember(@RequestBody MoveOutMemberFormDTO form, @LoginUser TokenDto tokenDto) { + form.setCustomerId(tokenDto.getCustomerId()); + icResiUserConfirmService.moveOutMember(form); + return new Result(); + } + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserConfirmDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserConfirmDao.java index beb7ae9d77..03704abd4b 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserConfirmDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserConfirmDao.java @@ -15,11 +15,37 @@ import org.apache.ibatis.annotations.Param; public interface IcResiUserConfirmDao extends BaseDao { /** - * @describe: 根据icResiUserId查询 - * @author wangtong - * @date 2022/6/1 16:01 - * @params [icResiUserId] - * @return com.epmet.entity.IcResiUserConfirmEntity - */ + * @return com.epmet.entity.IcResiUserConfirmEntity + * @describe: 根据icResiUserId查询 + * @author wangtong + * @date 2022/6/1 16:01 + * @params [icResiUserId] + */ IcResiUserConfirmEntity selectByIcResiUserId(@Param("icResiUserId") String icResiUserId); + + /** + * 【我的家庭】迁出家庭成员 根据身份证号查询是否已提交 + * + * @param idCard + * @param customerId + * @param submitType + * @return int + * @author LZN + * @date 2022/6/10 11:04 + */ + int selectByIdCard(@Param("idCard") String idCard, @Param("customerId") String customerId, + @Param("submitType") String submitType); + + /** + * 【我的家庭】迁出家庭成员 先删后添 + * + * @param idCard + * @param customerId + * @param submitType + * @return void + * @author LZN + * @date 2022/6/10 11:04 + */ + void deleteByIdCard(@Param("idCard") String idCard, @Param("customerId") String customerId, + @Param("submitType") String submitType); } 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 f76ad8e2ad..4b8a562045 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 @@ -23,6 +23,7 @@ import com.epmet.dto.IcResiUserConfirmDTO; import com.epmet.dto.IcResiUserDTO; import com.epmet.dto.IcVolunteerPolyDTO; import com.epmet.dto.form.EpidemicPreventionFormDTO; +import com.epmet.dto.form.MoveOutMemberFormDTO; import com.epmet.dto.form.RentTenantDataFormDTO; import com.epmet.dto.form.ResiUserQueryValueDTO; import com.epmet.dto.result.*; @@ -72,7 +73,7 @@ public interface IcResiUserDao extends BaseDao { @Param("staffOrgPath") String staffOrgPath, @Param("resultTableName") String resultTableName, @Param("keyword") String keyword, - @Param("groupByTables")Set groupByTables); + @Param("groupByTables") Set groupByTables); /** * 查询主表 @@ -138,10 +139,10 @@ public interface IcResiUserDao extends BaseDao { */ List searchByName(@Param("name") String name, @Param("columnName") String columnName, - @Param("level")String level, - @Param("id")String id, + @Param("level") String level, + @Param("id") String id, @Param("agencyId") String agencyId, - @Param("pageNo") Integer pageNo,@Param("customerId") String customerId); + @Param("pageNo") Integer pageNo, @Param("customerId") String customerId); Set selectUserDemandCode(String icResiUserId); @@ -169,11 +170,12 @@ public interface IcResiUserDao extends BaseDao { /** * desc:根据身份证号获取居民信息 + * * @param idCard * @param customerId * @return */ - IcResiUserDTO getResiUserByIdCard(@Param("idCard") String idCard,@Param("customerId") String customerId); + IcResiUserDTO getResiUserByIdCard(@Param("idCard") String idCard, @Param("customerId") String customerId); /** * @param agencyId @@ -266,7 +268,7 @@ public interface IcResiUserDao extends BaseDao { List icUserCustomerIds(); - List> getIcUserList(@Param("customerId") String customerId, @Param("columns")List columns); + List> getIcUserList(@Param("customerId") String customerId, @Param("columns") List columns); /** * desc: 获取数据分析列中的 各类居民数据 @@ -312,6 +314,7 @@ public interface IcResiUserDao extends BaseDao { /** * desc:根据维度获取居民信息表的数据[正常状态的居民] + * * @param formDTO * @return */ @@ -326,10 +329,11 @@ public interface IcResiUserDao extends BaseDao { */ List listUserIds(@Param("customerId") String customerId, @Param("gridId") String gridId); - List getAllUserIds(@Param("idCard") String idCard, @Param("customerId")String customerId); + List getAllUserIds(@Param("idCard") String idCard, @Param("customerId") String customerId); /** * 获取客户下志愿者信息 + * * @Param customerId * @Return {@link List< IcVolunteerPolyDTO>} * @Author zhaoqifeng @@ -338,11 +342,32 @@ public interface IcResiUserDao extends BaseDao { List getVolunteerList(@Param("customerId") String customerId, @Param("userId") String userId); /** - * @describe: 查询家庭成员信息 - * @author wangtong - * @date 2022/6/1 16:16 - * @params [icResiUserId] - * @return com.epmet.dto.IcResiUserConfirmDTO - */ + * @return com.epmet.dto.IcResiUserConfirmDTO + * @describe: 查询家庭成员信息 + * @author wangtong + * @date 2022/6/1 16:16 + * @params [icResiUserId] + */ IcResiUserConfirmDTO selectMemberDetail(@Param("icResiUserId") String icResiUserId); + + /** + * 【我的家庭】迁出家庭成员 查询缺失字段 + * + * @param icResiUserId + * @param customerId + * @return com.epmet.dto.form.MoveOutMemberFormDTO + * @author LZN + * @date 2022/6/10 11:03 + */ + MoveOutMemberFormDTO moveOutMember(@Param("icResiUserId") String icResiUserId, + @Param("customerId") String customerId); + + /** + * @return com.epmet.entity.IcResiUserEntity + * @describe: 通过身份证号查询实体类 + * @author wangtong + * @date 2022/6/13 17:32 + * @params [idCard, customerId] + */ + IcResiUserEntity selectResiUserEntityByIdCard(@Param("idCard") String idCard, @Param("customerId") String customerId); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserConfirmService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserConfirmService.java index 692b12e514..202964eca1 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserConfirmService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserConfirmService.java @@ -6,6 +6,7 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.dto.IcResiUserConfirmDTO; import com.epmet.dto.form.IcResiUserConfirmGetDTO; import com.epmet.dto.form.IcResiUserConfirmSubmitDTO; +import com.epmet.dto.form.MoveOutMemberFormDTO; import com.epmet.entity.IcResiUserConfirmEntity; import java.util.List; @@ -80,39 +81,39 @@ public interface IcResiUserConfirmService extends BaseService getMemberDetail(IcResiUserConfirmGetDTO dto); /** @@ -124,4 +125,14 @@ public interface IcResiUserConfirmService extends BaseService { * @params [dto] */ Result editMember(IcResiUserConfirmSubmitDTO dto); + + /** + * @describe: 工作端-新增家庭成员 + * @author wangtong + * @date 2022/6/10 13:32 + * @params [dto] + * @return com.epmet.commons.tools.utils.Result + */ + Result addWorkMember(IcResiUserConfirmSubmitDTO dto); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserConfirmServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserConfirmServiceImpl.java index ed2bd8e05d..33888e282f 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserConfirmServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserConfirmServiceImpl.java @@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; -import com.epmet.commons.tools.enums.GenderEnum; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; @@ -14,6 +13,7 @@ import com.epmet.dao.IcResiUserDao; import com.epmet.dto.IcResiUserConfirmDTO; import com.epmet.dto.form.IcResiUserConfirmGetDTO; import com.epmet.dto.form.IcResiUserConfirmSubmitDTO; +import com.epmet.dto.form.MoveOutMemberFormDTO; import com.epmet.entity.IcResiUserConfirmEntity; import com.epmet.entity.IcResiUserEntity; import com.epmet.redis.IcResiUserConfirmRedis; @@ -42,6 +42,9 @@ public class IcResiUserConfirmServiceImpl extends BaseServiceImpl page(Map params) { IPage page = baseDao.selectPage( @@ -139,7 +142,7 @@ public class IcResiUserConfirmServiceImpl extends BaseServiceImpl getMemberDetail(IcResiUserConfirmGetDTO dto) { IcResiUserConfirmDTO result = icResiUserDao.selectMemberDetail(dto.getIcResiUserId()); if (null != result && StringUtils.isBlank(result.getGender())) { - result.setGender(GenderEnum.UN_KNOWN.getCode()); + result.setGender(""); } return new Result().ok(result); } @@ -176,4 +179,24 @@ public class IcResiUserConfirmServiceImpl extends BaseServiceImpl 0) { + icResiUserConfirmDao.deleteByIdCard(form.getIdCard(), form.getCustomerId(), form.getSubmitType()); + } + IcResiUserConfirmEntity entity = ConvertUtils.sourceToTarget(form, IcResiUserConfirmEntity.class); + icResiUserConfirmDao.insert(entity); + } + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java index 8562af6077..6901fd27b1 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java @@ -72,6 +72,7 @@ import java.io.File; import java.io.IOException; import java.io.OutputStream; import java.nio.file.Path; +import java.time.DateTimeException; import java.time.LocalDate; import java.time.Period; import java.util.*; @@ -647,7 +648,12 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res } // 出生日期 & 年龄 - LocalDate birthday = LocalDate.of(Integer.parseInt(year), Integer.parseInt(month), Integer.parseInt(day)); + LocalDate birthday = null; + try { + birthday = LocalDate.of(Integer.parseInt(year), Integer.parseInt(month), Integer.parseInt(day)); + } catch (DateTimeException e) { + throw new EpmetException("身份证号中日期信息错误"); + } int age = Period.between(birthday, LocalDate.now()).getYears(); // 性别 & 生日 & 老年人 @@ -816,7 +822,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res private LinkedHashMap removeNeedlessColumns(LinkedHashMap originColumnAndValues) { List needlessColumns = Arrays.asList("GRID_ID", "VILLAGE_ID", "BUILD_ID", "UNIT_ID", "HOME_ID", "IS_BDHJ", "NAME", "MOBILE", "GENDER", "ID_CARD", - "BIRTHDAY", "CONTACTS", "CONTACTS_MOBILE"); + "BIRTHDAY", "CONTACTS", "CONTACTS_MOBILE", "REMARKS"); LinkedHashMap newMap = new LinkedHashMap(); @@ -910,7 +916,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res Map itemOptions = columnWrapper.getOptions(); String colValue = itemOptions.get(cellContent); columnWrapper.setColValue(colValue); - } else { + } else if (StringUtils.isNotBlank(cellContent)) { String fullUri = columnWrapper.getOptionSourceValue(); String[] uriParts = splitOptionSourceUrl(fullUri); String pureUri = uriParts[0]; 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 9a5aa2d787..6233ddfec3 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 @@ -269,6 +269,18 @@ public class IcResiUserServiceImpl extends BaseServiceImpl hash : formMap.get("ic_party_member")) { + if (!hash.containsKey("SSZB")) { + String errorMsg = "党员信息所属支部不能为空"; + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), errorMsg, errorMsg); + } + } + } else { + String errorMsg = "党员信息所属支部不能为空"; + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), errorMsg, errorMsg); + } + partyMemberDTO.setCustomerId(tokenDto.getCustomerId()); partyMemberDTO.setAgencyId(agencyId); partyMemberDTO.setAgencyPids(result.getData().getPids()); @@ -291,6 +303,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcResiUserEntity::getCustomerId, tokenDto.getCustomerId()); + wrapper.eq(IcResiUserEntity::getIdCard, map.get("ID_CARD")); + wrapper.ne(IcResiUserEntity::getId, map.get("ID")); + List entityList = baseDao.selectList(wrapper); + if (CollectionUtils.isNotEmpty(entityList)) { String errorMsg = "修改居民信息失败,身份证号已存在!"; throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), errorMsg, errorMsg); } @@ -469,6 +483,19 @@ public class IcResiUserServiceImpl extends BaseServiceImpl hash : formMap.get("ic_party_member")) { + if (!hash.containsKey("ID") && !hash.containsKey("SSZB")) { + String errorMsg = "党员信息所属支部不能为空"; + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), errorMsg, errorMsg); + } + } + } else { + String errorMsg = "党员信息所属支部不能为空"; + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), errorMsg, errorMsg); + } + } if ((map.containsKey("IS_PARTY") && NumConstant.ONE_STR.equals(map.get("IS_PARTY"))) || (!map.containsKey("IS_PARTY") && NumConstant.ONE_STR.equals(icResiUser.getIsParty()))) { partyMemberDTO.setCustomerId(tokenDto.getCustomerId()); @@ -812,6 +839,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl()); Result> demandNameRes = heartOpenFeignClient.queryDemandNames(userDemandNameQueryFormDTO); if (!demandNameRes.success() || CollectionUtils.isEmpty(demandNameRes.getData())) { throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "获取需求分类字典表数据异常", EpmetErrorCode.SERVER_ERROR.getMsg()); @@ -2359,6 +2387,96 @@ public class IcResiUserServiceImpl extends BaseServiceImpl houseResult = govOrgOpenFeignClient.getHomeInfoByHouseCode(formDto); + if (!houseResult.success() || null == houseResult || null == houseResult.getData()) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "查询房屋信息失败", "查询房屋信息失败"); + } + HouseInfoResultDTO houseInfo = houseResult.getData(); + + //这个房屋下已经设置了户主后,再次选择户主时提示提示“房屋下已存在户主” PS.户主指与户主关系是本人的用户 + if (RelationshipEnum.SELF.getCode().equals(dto.getYhzgx())) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcResiUserEntity::getHomeId, houseInfo.getHouseId()); + wrapper.eq(IcResiUserEntity::getYhzgx, RelationshipEnum.SELF.getCode()); + List entityList = baseDao.selectList(wrapper); + if (CollectionUtils.isNotEmpty(entityList)) { + String errorMsg = "房屋下已存在户主"; + throw new EpmetException(EpmetErrorCode.ORG_ADD_FAILED.getCode(), errorMsg, errorMsg); + } + } + + dto.setCustomerId(houseInfo.getCustomerId()); + dto.setAgencyId(houseInfo.getAgencyId()); + dto.setPids(houseInfo.getAgencyPids()); + dto.setGridId(houseInfo.getGridId()); + dto.setVillageId(houseInfo.getNeighborHoodId()); + dto.setBuildId(houseInfo.getBuildingId()); + dto.setUnitId(houseInfo.getBuildingUnitId()); + dto.setHomeId(houseInfo.getHouseId()); + + IcResiUserDTO userDTO = baseDao.getResiUserByIdCard(dto.getIdCard(), houseInfo.getCustomerId()); + if (null != userDTO && null != userDTO.getIdCard()) { + //覆盖原有的家庭成员信息,并且添加成员变更记录 + return updateOldMemberInfo(houseInfo.getCustomerId(),dto); + } + + IcResiUserEntity entity = ConvertUtils.sourceToTarget(dto, IcResiUserEntity.class); + insert(entity); + + return new Result().ok("新增成功"); + } + + private Result updateOldMemberInfo(String customerId, IcResiUserConfirmSubmitDTO dto) { + IcResiUserEntity userEntity = baseDao.selectResiUserEntityByIdCard(dto.getIdCard(), customerId); + //在添加调动记录的时候调整 + userEntity.setCustomerId(dto.getCustomerId()); + userEntity.setAgencyId(dto.getAgencyId()); + userEntity.setPids(dto.getPids()); + userEntity.setGridId(dto.getGridId()); + userEntity.setVillageId(dto.getVillageId()); + userEntity.setBuildId(dto.getBuildId()); + userEntity.setUnitId(dto.getUnitId()); + userEntity.setHomeId(dto.getHomeId()); + + userEntity.setName(dto.getName()); + userEntity.setIdCard(dto.getIdCard()); + userEntity.setMobile(dto.getMobile()); + userEntity.setBirthday(dto.getBirthday()); + userEntity.setGender(dto.getGender()); + userEntity.setMz(dto.getMz()); + userEntity.setYhzgx(dto.getYhzgx()); + userEntity.setHjszd(dto.getHjszd()); + userEntity.setXjzd(dto.getXjzd()); + userEntity.setUpdatedTime(new java.util.Date()); + //添加人员调动记录 + IcResiUserTransferFormDTO formDTO = new IcResiUserTransferFormDTO(); + formDTO.setCustomerId(customerId); + formDTO.setStaffId(dto.getStaffId()); + formDTO.setIcUserId(userEntity.getId()); + formDTO.setType("in");//客户内 + formDTO.setNewAgencyId(dto.getAgencyId()); + formDTO.setNewGridId(dto.getGridId()); + formDTO.setNewNeighborHoodId(dto.getVillageId()); + formDTO.setNewBuildingId(dto.getBuildId()); + formDTO.setNewBuildingUnitId(dto.getUnitId()); + formDTO.setNewHouseId(dto.getHomeId()); + formDTO.setTransferTime(new java.util.Date()); + formDTO.setRemark("更换房屋"); + formDTO.setReason("更换房屋"); + formDTO.setOrigin(IcResiUserConstant.CHANGE); + icUserTransferRecordService.add(formDTO); + //更新家庭成员信息 + baseDao.updateById(userEntity); + return new Result().ok("新增成功"); + } + /** * 根据身份证获取居民角色(目前只有是否是志愿者) * @@ -2371,7 +2489,9 @@ public class IcResiUserServiceImpl extends BaseServiceImpl>> detail = new HashMap<>(); result.setIsVolunteer(NumConstant.ZERO_STR); + result.setIsPartyMember(NumConstant.ZERO_STR); //根据身份证获取小程序端居民信息 LambdaQueryWrapper baseInfoWrapper = new LambdaQueryWrapper<>(); baseInfoWrapper.eq(UserBaseInfoEntity::getCustomerId, formDTO.getCustomerId()); @@ -2391,7 +2511,26 @@ public class IcResiUserServiceImpl extends BaseServiceImpl memberInfoResult = resiPartyMemberOpenFeignClient.getPartyMemberByIdCard(memberFormDTO); + if (memberInfoResult.success() && null != memberInfoResult.getData()) { + List> list = new ArrayList<>(); + Map memberMap = new HashMap<>(); + result.setIsPartyMember(NumConstant.ONE_STR); + com.epmet.resi.partymember.dto.partymember.IcPartyMemberDTO dto = memberInfoResult.getData(); + memberMap.put("RDSJ", dto.getRdsj()); + memberMap.put("SSZB", dto.getSszb()); + memberMap.put("IS_LD", dto.getIsLd()); + memberMap.put("LDZH", dto.getLdzh()); + memberMap.put("PARTY_ZW", dto.getPartyZw()); + memberMap.put("IS_DYZXH", dto.getIsDyzxh()); + list.add(memberMap); + detail.put("ic_party_member", list); + } + result.setDetail(detail); return result; } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java index b167e98c14..9ae1bba783 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java @@ -4,8 +4,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.redis.common.CustomerIcHouseRedis; -import com.epmet.commons.tools.redis.common.CustomerOrgRedis; -import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; import com.epmet.commons.tools.redis.common.bean.HouseInfoCache; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; @@ -94,9 +92,10 @@ public class MyHomeServiceImpl implements MyHomeService { userWrapper.eq(IcResiUserEntity::getCustomerId, formDTO.getCustomerId()); userWrapper.eq(IcResiUserEntity::getIdCard, formDTO.getIdCard()); IcResiUserEntity icUser = icResiUserDao.selectOne(userWrapper); - - if (null != icUser && !icUser.getHomeId().equals(formDTO.getHomeId())) { - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "已绑定其他房屋", "已绑定其他房屋"); + if (null == icUser || !icUser.getHomeId().equals(formDTO.getHomeId())) { + throw new EpmetException(EpmetErrorCode.MISMATCH.getCode(), + "人员与房屋信息不匹配,请与工作人员联系。", + "人员与房屋信息不匹配,请与工作人员联系。"); } //进入网格(entergrid)流程 @@ -152,25 +151,6 @@ public class MyHomeServiceImpl implements MyHomeService { userResiInfoDTO.setApp("resi"); userResiInfoService.saveResiInfo(userResiInfoDTO); } - //2.添加ic_resi_user信息 - HouseInfoCache houseInfo = CustomerIcHouseRedis.getHouseInfo(formDTO.getCustomerId(), formDTO.getHomeId()); - if (null == houseInfo) { - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取房屋信息失败", "获取房屋信息失败"); - } - AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(houseInfo.getAgencyId()); - if (null == agencyInfo) { - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取组织信息失败", "获取组织信息失败"); - } - IcResiUserEntity icUserEntity = ConvertUtils.sourceToTarget(formDTO, IcResiUserEntity.class); - icUserEntity.setName(formDTO.getSurname() + formDTO.getName()); - icUserEntity.setAgencyId(houseInfo.getAgencyId()); - icUserEntity.setPids(agencyInfo.getPids()); - if (null != icUser) { - icUserEntity.setId(icUser.getId()); - icResiUserDao.updateById(icUserEntity); - } else { - icResiUserDao.insert(icUserEntity); - } } /** @@ -203,6 +183,7 @@ public class MyHomeServiceImpl implements MyHomeService { if (null == houseInfo) { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取房屋信息失败", "获取房屋信息失败"); } + resultDto.setHouseId(houseInfo.getHomeId()); resultDto.setHouseName(houseInfo.getAllName()); resultDto.setHouseCode(houseInfo.getHouseCode()); resultDto.setQrCodeUrl(houseInfo.getHouseQrcodeUrl()); diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserConfirmDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserConfirmDao.xml index 4c46257dc1..30c3baca88 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserConfirmDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserConfirmDao.xml @@ -34,11 +34,31 @@ + + delete from ic_resi_user_confirm + where + id_card = #{idCard} + AND customer_id = #{customerId} + AND CONFIRM_RESULT = '0' + AND SUBMIT_TYPE = #{submitType} + + 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 4187fa45ca..81f3c65f49 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 @@ -1094,5 +1094,32 @@ where DEL_FLAG='0' and id=#{icResiUserId} - + + diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcVolunteerPolyDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcVolunteerPolyDao.xml index e8bec0b3b8..acfca0cf16 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcVolunteerPolyDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcVolunteerPolyDao.xml @@ -97,7 +97,7 @@ p.CUSTOMER_ID = #{customerId} and c.VOLUNTEER_CATEGORY is not null AND c.VOLUNTEER_CATEGORY != '' - AND p.AGENCY_ID = #{agencyId} + AND ( p.AGENCY_ID = #{agencyId} or p.AGENCY_PIDS like '%${agencyId}%' ) AND p.del_flag = '0' GROUP BY c.VOLUNTEER_CATEGORY @@ -108,4 +108,4 @@ delete from ic_volunteer_poly_category where CUSTOMER_ID = #{customerId} - \ No newline at end of file +