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-admin/epmet-admin-server/src/main/resources/logback-spring.xml b/epmet-admin/epmet-admin-server/src/main/resources/logback-spring.xml index ab8ee06fa8..94112d1c19 100644 --- a/epmet-admin/epmet-admin-server/src/main/resources/logback-spring.xml +++ b/epmet-admin/epmet-admin-server/src/main/resources/logback-spring.xml @@ -133,12 +133,36 @@ + + + + ${log.path}/rocketmqclient.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%X{Transaction-Serial}] %-5level %logger{50} - %msg%n + UTF-8 + + + + ${log.path}/rocketmqclient-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + + + + @@ -152,6 +176,10 @@ + + + + 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-mybatis/src/main/java/com/epmet/commons/mybatis/handler/FieldMetaObjectHandler.java b/epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/handler/FieldMetaObjectHandler.java index 3c0b35ff4d..749eef2360 100644 --- a/epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/handler/FieldMetaObjectHandler.java +++ b/epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/handler/FieldMetaObjectHandler.java @@ -147,12 +147,7 @@ public class FieldMetaObjectHandler implements MetaObjectHandler { updatedTime = metaObject.getValue(FieldConstant.UPDATED_TIME_HUMP); } if (updatedTime == null) { - if(metaObject.hasGetter(FieldConstant.CREATED_TIME_HUMP)) { - updatedTime = metaObject.getValue(FieldConstant.CREATED_TIME_HUMP); - } - if(updatedTime == null) { - updatedTime = new Date(); - } + updatedTime = new Date(); } return updatedTime; } @@ -165,13 +160,7 @@ public class FieldMetaObjectHandler implements MetaObjectHandler { } if (value == null) { - if(metaObject.hasGetter(FieldConstant.CREATED_BY_HUMP)) { - value = metaObject.getValue(FieldConstant.CREATED_BY_HUMP); - } - - if(null == value) { - value = Optional.ofNullable(loginUserUtil.getLoginUserId()).orElse(Constant.APP_USER_FLAG); - } + value = Optional.ofNullable(loginUserUtil.getLoginUserId()).orElse(Constant.APP_USER_FLAG); } return value; 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 cecd853b9c..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 @@ -256,6 +256,8 @@ public enum EpmetErrorCode { RESI_IC_NAT(8925,"已存在记录,请联系社区工作人员修改"), IC_MOVE_IN(8926,"居民信息中房屋信息与当前选择房屋不一致,是否更新?"), 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/RedisKeys.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java index 05e5c200a4..89e8a70ab3 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java @@ -101,7 +101,7 @@ public class RedisKeys { * epmet:sys:security:user:token字符串 */ public static String getCpUserKey(String app, String client, String userId) { - return rootPrefix.concat("sys:security:user:").concat(app).concat(":").concat(client).concat(":").concat(userId); + return rootPrefix.concat("sys:security:user:").concat(app).concat(StrConstant.COLON).concat(client).concat(StrConstant.COLON).concat(userId); } /** @@ -200,7 +200,7 @@ public class RedisKeys { * @return */ public static String getRoleOpeScopesKey(String roleId, String opeKey) { - return rootPrefix.concat("gov:access:role:opescopes:").concat(roleId).concat(":").concat(opeKey); + return rootPrefix.concat("gov:access:role:opescopes:").concat(roleId).concat(StrConstant.COLON).concat(opeKey); } /** @@ -338,7 +338,7 @@ public class RedisKeys { * @return */ public static String getCustomerStatsCalFlag(String customerId) { - return getCustomerStatsCalKeyPrefix().concat(":").concat(customerId); + return getCustomerStatsCalKeyPrefix().concat(StrConstant.COLON).concat(customerId); } /** @@ -364,7 +364,7 @@ public class RedisKeys { * @return */ public static String getCustomerFootbarKey(String customerId, String appType) { - return rootPrefix.concat("footbar").concat(":").concat(customerId).concat(":").concat(appType); + return rootPrefix.concat("footbar").concat(StrConstant.COLON).concat(customerId).concat(StrConstant.COLON).concat(appType); } @@ -397,7 +397,7 @@ public class RedisKeys { * @date 2020.11.05 13:34 */ public static String getResiUserBadgeKey(String customerId, String userId) { - return rootPrefix.concat("badge:user:").concat(customerId).concat(":").concat(StringUtils.isBlank(userId) ? "*" : userId); + return rootPrefix.concat("badge:user:").concat(customerId).concat(StrConstant.COLON).concat(StringUtils.isBlank(userId) ? "*" : userId); } /** @@ -483,7 +483,7 @@ public class RedisKeys { **/ public static String getGroupMsgReadKey(String source, String groupId, String sourceId) { String currentMonth= DateUtils.getBeforeNMonth(NumConstant.ZERO); - return "groupread:".concat(currentMonth).concat(":").concat(source).concat(":").concat(groupId).concat(":").concat(sourceId); + return "groupread:".concat(currentMonth).concat(StrConstant.COLON).concat(source).concat(StrConstant.COLON).concat(groupId).concat(StrConstant.COLON).concat(sourceId); } /** @@ -497,7 +497,7 @@ public class RedisKeys { **/ public static String getGroupMsgShouldReadUser(String source, String groupId, String sourceId) { String currentMonth= DateUtils.getBeforeNMonth(NumConstant.ZERO); - return "groupread:user:".concat(currentMonth).concat(":").concat(source).concat(":").concat(groupId).concat(":").concat(sourceId); + return "groupread:user:".concat(currentMonth).concat(StrConstant.COLON).concat(source).concat(StrConstant.COLON).concat(groupId).concat(StrConstant.COLON).concat(sourceId); } /** @@ -560,7 +560,7 @@ public class RedisKeys { * @date 2021.09.23 17:38:37 */ public static String getQuestionnaireAccessKey(String userId, String qKey) { - return rootPrefix.concat("questionnaire:accesskey:").concat(userId).concat(":").concat(qKey); + return rootPrefix.concat("questionnaire:accesskey:").concat(userId).concat(StrConstant.COLON).concat(qKey); } /** @@ -594,7 +594,7 @@ public class RedisKeys { * @date 2021.10.25 17:49:43 */ public static String loginTicket(String app, String ticket) { - return rootPrefix.concat("sys:security:ticket:").concat(app).concat(":").concat(ticket); + return rootPrefix.concat("sys:security:ticket:").concat(app).concat(StrConstant.COLON).concat(ticket); } /** @@ -649,7 +649,7 @@ public class RedisKeys { } public static String getHouseInfoCacheKey(String houseId,String customerId){ - return rootPrefix.concat("house:").concat(customerId).concat(":").concat(houseId); + return rootPrefix.concat("house:").concat(customerId).concat(StrConstant.COLON).concat(houseId); } /** @@ -671,7 +671,7 @@ public class RedisKeys { * @return */ public static String icResiImportTypeKey(String importTag, String type) { - return icResiImportBaseKey(importTag).concat(":").concat(type); + return icResiImportBaseKey(importTag).concat(StrConstant.COLON).concat(type); } /** @@ -682,7 +682,7 @@ public class RedisKeys { * @return */ public static String icResiImportResiCategoryKey(String importTag, String type, String resiId) { - return icResiImportTypeKey(importTag, type).concat(":").concat(resiId); + return icResiImportTypeKey(importTag, type).concat(StrConstant.COLON).concat(resiId); } /** @@ -693,7 +693,7 @@ public class RedisKeys { * @date 2022/2/14 9:38 上午 */ public static String getTemporaryHouseInfoCacheKey(String customerId,String userId){ - return rootPrefix.concat("temporary:").concat("temporaryHouse:").concat(customerId).concat(":").concat(userId); + return rootPrefix.concat("temporary:").concat("temporaryHouse:").concat(customerId).concat(StrConstant.COLON).concat(userId); } /** @@ -704,7 +704,7 @@ public class RedisKeys { * @date 2022/2/14 9:38 上午 */ public static String getTemporaryGridInfoCacheKey(String customerId,String userId){ - return rootPrefix.concat("temporary:").concat("temporaryGrid:").concat(customerId).concat(":").concat(userId); + return rootPrefix.concat("temporary:").concat("temporaryGrid:").concat(customerId).concat(StrConstant.COLON).concat(userId); } /** @@ -715,7 +715,7 @@ public class RedisKeys { * @date 2022/2/14 9:39 上午 */ public static String getTemporaryNeighborHoodInfoCacheKey(String customerId,String userId){ - return rootPrefix.concat("temporary:").concat("temporaryNeighborHood:").concat(customerId).concat(":").concat(userId); + return rootPrefix.concat("temporary:").concat("temporaryNeighborHood:").concat(customerId).concat(StrConstant.COLON).concat(userId); } /** @@ -726,7 +726,7 @@ public class RedisKeys { * @date 2022/2/14 9:39 上午 */ public static String getTemporaryBuildingInfoCacheKey(String customerId,String userId){ - return rootPrefix.concat("temporary:").concat("temporaryBuilding:").concat(customerId).concat(":").concat(userId); + return rootPrefix.concat("temporary:").concat("temporaryBuilding:").concat(customerId).concat(StrConstant.COLON).concat(userId); } /** @@ -737,15 +737,15 @@ public class RedisKeys { * @date 2022/2/14 1:54 下午 */ public static String getTemporaryBuildingUnitInfoCacheKey(String customerId,String userId){ - return rootPrefix.concat("temporary:").concat("temporaryBuildingUnit:").concat(customerId).concat(":").concat(userId); + return rootPrefix.concat("temporary:").concat("temporaryBuildingUnit:").concat(customerId).concat(StrConstant.COLON).concat(userId); } public static String getTemporaryImportResultCacheKey(String customerId,String userId){ - return rootPrefix.concat("temporary:").concat("temporaryResult:").concat(customerId).concat(":").concat(userId); + return rootPrefix.concat("temporary:").concat("temporaryResult:").concat(customerId).concat(StrConstant.COLON).concat(userId); } - public static String getCustomerMenuList(String customerId, Integer type) { - return getCustomerMenuListPrefix().concat(customerId).concat(":type:")+type; + public static String getCustomerMenuList(String customerId, Integer type, String tableName) { + return getCustomerMenuListPrefix().concat("type:").concat(type.toString()).concat(":tableName:").concat(tableName).concat(StrConstant.COLON).concat(customerId); } /** @@ -753,7 +753,7 @@ public class RedisKeys { * @return */ public static String getCustomerMenuListPrefix() { - return rootPrefix.concat("oper:access:nav:customerId:"); + return rootPrefix.concat("gov:access:nav:"); } /** 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-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/LouDongTreeNodeUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/LouDongTreeNodeUtils.java new file mode 100644 index 0000000000..36f7d62ab1 --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/LouDongTreeNodeUtils.java @@ -0,0 +1,34 @@ +package com.epmet.commons.tools.utils; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +public class LouDongTreeNodeUtils { + + /** + * 构建树节点 + */ + public static List build(List treeNodes) { + List result = new ArrayList<>(); + + //list转map + Map nodeMap = new LinkedHashMap<>(treeNodes.size()); + for(T treeNode : treeNodes){ + nodeMap.put(treeNode.getId(), treeNode); + } + + for(T node : nodeMap.values()) { + T parent = nodeMap.get(node.getPid()); + if(parent != null && !(node.getId().equals(parent.getId()))){ + parent.getChildren().add(node); + continue; + } + + result.add(node); + } + + return result; + } +} diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/LoudongTreeNode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/LoudongTreeNode.java new file mode 100644 index 0000000000..e4c77467a8 --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/LoudongTreeNode.java @@ -0,0 +1,48 @@ +package com.epmet.commons.tools.utils; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +public class LoudongTreeNode implements Serializable { + + private static final long serialVersionUID = 1L; + /** + * 主键 + */ + private String id; + /** + * 上级ID + */ + private String pid; + /** + * 子节点列表 + */ + private List children = new ArrayList<>(); + + + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getPid() { + return pid; + } + + public void setPid(String pid) { + this.pid = pid; + } + + public List getChildren() { + return children; + } + + public void setChildren(List children) { + this.children = children; + } +} diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/NodeTree.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/NodeTree.java new file mode 100644 index 0000000000..8f28cef145 --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/NodeTree.java @@ -0,0 +1,45 @@ +package com.epmet.commons.tools.utils; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +public class NodeTree implements Serializable { + private static final long serialVersionUID = 8020505121785861117L; + /** + * 主键 + */ + private String id; + /** + * 上级ID + */ + private String pid; + /** + * 子节点列表 + */ + private List children = new ArrayList<>(); + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getPid() { + return pid; + } + + public void setPid(String pid) { + this.pid = pid; + } + + public List getChildren() { + return children; + } + + public void setChildren(List children) { + this.children = children; + } +} diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/NodeTreeUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/NodeTreeUtils.java new file mode 100644 index 0000000000..1c3df168ee --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/NodeTreeUtils.java @@ -0,0 +1,31 @@ +package com.epmet.commons.tools.utils; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +public class NodeTreeUtils { + + public static List build(List treeNodes) { + List result = new ArrayList<>(); + + //list转map + Map nodeMap = new LinkedHashMap<>(treeNodes.size()); + for(T treeNode : treeNodes){ + nodeMap.put(treeNode.getId(), treeNode); + } + + for(T node : nodeMap.values()) { + T parent = nodeMap.get(node.getPid()); + if(parent != null && !(node.getId().equals(parent.getId()))){ + parent.getChildren().add(node); + continue; + } + + result.add(node); + } + + return result; + } +} 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-client/src/main/java/com/epmet/dto/stats/FactAgencyUserHouseDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactAgencyUserHouseDailyDTO.java new file mode 100644 index 0000000000..862f85649f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactAgencyUserHouseDailyDTO.java @@ -0,0 +1,148 @@ +package com.epmet.dto.stats; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 人房信息统计数,按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +@Data +public class FactAgencyUserHouseDailyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键,customer_id+AGENCY_ID+date_id只有一条记录 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd; + */ + private String dateId; + + /** + * 组织id + */ + private String agencyId; + + /** + * agency_id所属的机关级别(社区级:community, +乡(镇、街道)级:street, +区县级: district, +市级: city +省级:province) + */ + private String level; + + /** + * 组织i所属的组织id + */ + private String pid; + + /** + * 组织i所有上级id + */ + private String pids; + + /** + * 小区总数 + */ + private Integer neighbourhoodsCount; + + /** + * 房屋总数 + */ + private Integer houseCount; + + /** + * 自住房屋总数 + */ + private Integer houseSelfCount; + + /** + * 出租房屋总数 + */ + private Integer houseLeaseCount; + + /** + * 闲置房屋总数 + */ + private Integer houseIdleCount; + + /** + * 居民总数 + */ + private Integer userCount; + + /** + * 常住居民总数 + */ + private Integer userResiCount; + + /** + * 流动居民总数 + */ + private Integer userFloatCount; + + /** + * 当日新增房屋数 + */ + private Integer houseIncr; + + /** + * 当日修改房屋数 + */ + private Integer houseModify; + + /** + * 当日新增居民数 + */ + private Integer userIncr; + + /** + * 当日修改居民数 + */ + private Integer userModify; + + /** + * 删除标识 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/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactGridUserHouseDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactGridUserHouseDailyDTO.java new file mode 100644 index 0000000000..1da0d57339 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactGridUserHouseDailyDTO.java @@ -0,0 +1,139 @@ +package com.epmet.dto.stats; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 网格的人房信息统计数,按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +@Data +public class FactGridUserHouseDailyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键,customer_id+grid_id+date_id只有一条记录 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd; + */ + private String dateId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格所属的组织id + */ + private String pid; + + /** + * 网格所有上级id + */ + private String pids; + + /** + * 小区总数 + */ + private Integer neighbourhoodsCount; + + /** + * 房屋总数 + */ + private Integer houseCount; + + /** + * 自住房屋总数 + */ + private Integer houseSelfCount; + + /** + * 出租房屋总数 + */ + private Integer houseLeaseCount; + + /** + * 闲置房屋总数 + */ + private Integer houseIdleCount; + + /** + * 居民总数 + */ + private Integer userCount; + + /** + * 常住居民总数 + */ + private Integer userResiCount; + + /** + * 流动居民总数 + */ + private Integer userFloatCount; + + /** + * 当日新增房屋数 + */ + private Integer houseIncr; + + /** + * 当日修改房屋数 + */ + private Integer houseModify; + + /** + * 当日新增居民数 + */ + private Integer userIncr; + + /** + * 当日修改居民数 + */ + private Integer userModify; + + /** + * 删除标识 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/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactNeighborhoodUserHouseDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactNeighborhoodUserHouseDailyDTO.java new file mode 100644 index 0000000000..9a2a6d7328 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactNeighborhoodUserHouseDailyDTO.java @@ -0,0 +1,149 @@ +package com.epmet.dto.stats; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 网格的人房信息统计数,按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-01 + */ +@Data +public class FactNeighborhoodUserHouseDailyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键,customer_id+grid_id+date_id只有一条记录 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd; + */ + private String dateId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格所属的组织id + */ + private String pid; + + /** + * 网格所有上级id + */ + private String pids; + + /** + * 小区ID + */ + private String neighbourhoodsId; + + /** + * 小区名称 + */ + private String neighborHoodName; + + /** + * 小区总数 + */ + private Integer neighbourhoodsCount; + + /** + * 房屋总数 + */ + private Integer houseCount; + + /** + * 自住房屋总数 + */ + private Integer houseSelfCount; + + /** + * 出租房屋总数 + */ + private Integer houseLeaseCount; + + /** + * 闲置房屋总数 + */ + private Integer houseIdleCount; + + /** + * 居民总数 + */ + private Integer userCount; + + /** + * 常住居民总数 + */ + private Integer userResiCount; + + /** + * 流动居民总数 + */ + private Integer userFloatCount; + + /** + * 当日新增房屋数 + */ + private Integer houseIncr; + + /** + * 当日修改房屋数 + */ + private Integer houseModify; + + /** + * 当日新增居民数 + */ + private Integer userIncr; + + /** + * 当日修改居民数 + */ + private Integer userModify; + + /** + * 删除标识 0未删除、1已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间:第一次提交审核的时间,注意和历史表的第一条记录时间一致 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/form/FactUserHouseFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/form/FactUserHouseFormDTO.java new file mode 100644 index 0000000000..ed7492dbee --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/form/FactUserHouseFormDTO.java @@ -0,0 +1,35 @@ +package com.epmet.dto.stats.form; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 人房信息统计数,按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +@Data +public class FactUserHouseFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd; + */ + private String dateId; + + /** + * level + */ + private String level; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/result/FactUserHouseResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/result/FactUserHouseResultDTO.java new file mode 100644 index 0000000000..37c080deee --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/result/FactUserHouseResultDTO.java @@ -0,0 +1,169 @@ +package com.epmet.dto.stats.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 人房信息统计数,按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +@Data +public class FactUserHouseResultDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键,customer_id+AGENCY_ID+date_id只有一条记录 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd; + */ + private String dateId; + + /** + * 网格id + */ + private String gridId; + + /** + * 组织id + */ + private String agencyId; + + /** + * 组织id + */ + private String agencyName; + + /** + * 小区ID + */ + private String neighbourhoodsId; + + /** + * 小区名称 + */ + private String neighborHoodName; + + /** + * agency_id所属的机关级别(社区级:community, +乡(镇、街道)级:street, +区县级: district, +市级: city +省级:province) + */ + private String level; + + /** + * 组织i所属的组织id + */ + private String pid; + + /** + * 组织i所有上级id + */ + private String pids; + + /** + * 小区总数 + */ + private Integer neighbourhoodsCount; + + /** + * 房屋总数 + */ + private Integer houseCount; + + /** + * 自住房屋总数 + */ + private Integer houseSelfCount; + + /** + * 出租房屋总数 + */ + private Integer houseLeaseCount; + + /** + * 闲置房屋总数 + */ + private Integer houseIdleCount; + + /** + * 居民总数 + */ + private Integer userCount; + + /** + * 常住居民总数 + */ + private Integer userResiCount; + + /** + * 流动居民总数 + */ + private Integer userFloatCount; + + /** + * 当日新增房屋数 + */ + private Integer houseIncr; + + /** + * 当日修改房屋数 + */ + private Integer houseModify; + + /** + * 当日新增居民数 + */ + private Integer userIncr; + + /** + * 当日修改居民数 + */ + private Integer userModify; + + /** + * 删除标识 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/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java index 595977d64c..67f56957dc 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java @@ -13,6 +13,7 @@ import com.epmet.dto.org.result.CustomerAgencyDTO; import com.epmet.dto.org.result.CustomerGridDTO; import com.epmet.dto.screen.form.InitCustomerIndexForm; import com.epmet.dto.stats.form.CustomerIdAndDateIdFormDTO; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; import com.epmet.dto.user.form.StaffBaseInfoFormDTO; import com.epmet.dto.user.param.MidPatrolFormDTO; import com.epmet.dto.user.result.GridUserInfoDTO; @@ -368,4 +369,13 @@ public interface DataStatisticalOpenFeignClient { @PostMapping("/data/stats/screenextract/data_check") Result dataCheck(@RequestBody ExtractOriginFormDTO formDTO); + + @PostMapping("/data/stats/factAgencyUserHouseDaily/userHouseStatGrid") + Result userHouseStatGrid(@RequestBody FactUserHouseFormDTO formDTO); + + @PostMapping("/data/stats/factAgencyUserHouseDaily/userHouseStatAgency") + Result userHouseStatAgency(@RequestBody FactUserHouseFormDTO formDTO); + + @PostMapping("/data/stats/factAgencyUserHouseDaily/userHouseStatNeighborhood") + Result userHouseStatNeighborhood(@RequestBody FactUserHouseFormDTO formDTO); } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java index 43e2a3445c..b5bb0013c4 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java @@ -14,6 +14,7 @@ import com.epmet.dto.org.result.CustomerAgencyDTO; import com.epmet.dto.org.result.CustomerGridDTO; import com.epmet.dto.screen.form.InitCustomerIndexForm; import com.epmet.dto.stats.form.CustomerIdAndDateIdFormDTO; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; import com.epmet.dto.user.form.StaffBaseInfoFormDTO; import com.epmet.dto.user.param.MidPatrolFormDTO; import com.epmet.dto.user.result.GridUserInfoDTO; @@ -351,4 +352,19 @@ public class DataStatisticalOpenFeignClientFallBack implements DataStatisticalOp public Result dataCheck(ExtractOriginFormDTO formDTO) { return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL_SERVER, "dataCheck", formDTO); } + + @Override + public Result userHouseStatGrid(FactUserHouseFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL_SERVER, "userHouseStatGrid", formDTO); + } + + @Override + public Result userHouseStatAgency(FactUserHouseFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL_SERVER, "userHouseStatAgency", formDTO); + } + + @Override + public Result userHouseStatNeighborhood(FactUserHouseFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL_SERVER, "userHouseStatNeighborhood", formDTO); + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactUserHouseController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactUserHouseController.java new file mode 100644 index 0000000000..3ff1e7df16 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactUserHouseController.java @@ -0,0 +1,103 @@ +package com.epmet.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; +import com.epmet.dto.stats.result.FactUserHouseResultDTO; +import com.epmet.excel.FactUserHouseExcel; +import com.epmet.service.stats.FactUserHouseService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 人房信息统计数,按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +@RestController +@RequestMapping("factAgencyUserHouseDaily") +public class FactUserHouseController { + + @Autowired + private FactUserHouseService factUserHouseService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params) { + PageData page = factUserHouseService.page(params); + return new Result>().ok(page); + } + + /** + * 合计 + * + * @param params + * @return com.epmet.commons.tools.utils.Result + * @author zhy + * @date 2022/5/31 9:48 + */ + @RequestMapping("total") + public Result total(@RequestParam Map params) { + FactUserHouseResultDTO dto = factUserHouseService.total(params); + return new Result().ok(dto); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = factUserHouseService.list(params); + if (list.isEmpty()) { + FactUserHouseResultDTO dto = new FactUserHouseResultDTO(); + list.add(dto); + } + ExcelUtils.exportExcelToTarget(response, null, list, FactUserHouseExcel.class); + } + + /** + * 统计网格纬度 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @author zhy + * @date 2022/5/31 9:48 + */ + @PostMapping("userHouseStatGrid") + public Result userHouseStatGrid(@RequestBody FactUserHouseFormDTO formDTO) { + factUserHouseService.statGrid(formDTO); + return new Result(); + } + + /** + * 统计小区纬度 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @author wgf + * @date 2022/5/31 9:48 + */ + @PostMapping("userHouseStatNeighborhood") + public Result userHouseStatNeighborhood(@RequestBody FactUserHouseFormDTO formDTO) { + factUserHouseService.statNeighborhood(formDTO); + return new Result(); + } + + /** + * 统计组织纬度 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @author zhy + * @date 2022/5/31 9:48 + */ + @PostMapping("userHouseStatAgency") + public Result userHouseStatAgency(@RequestBody FactUserHouseFormDTO formDTO) { + factUserHouseService.statAgency(formDTO); + return new Result(); + } + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/IcHouseDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/IcHouseDao.java new file mode 100644 index 0000000000..5e3d1e5477 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/IcHouseDao.java @@ -0,0 +1,28 @@ +package com.epmet.dao.org; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; +import com.epmet.dto.stats.result.FactUserHouseResultDTO; +import com.epmet.entity.org.IcHouseEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 房屋信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-10-25 + */ +@Mapper +public interface IcHouseDao extends BaseDao { + + List houseStat(FactUserHouseFormDTO formDTO); + + List houseStatNew(FactUserHouseFormDTO formDTO); + + List neighborhoodStatStat(FactUserHouseFormDTO formDTO); + + List neighborhoodStatStatNew(FactUserHouseFormDTO formDTO); + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactAgencyUserHouseDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactAgencyUserHouseDailyDao.java new file mode 100644 index 0000000000..3bbdef4df6 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactAgencyUserHouseDailyDao.java @@ -0,0 +1,26 @@ +package com.epmet.dao.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; +import com.epmet.dto.stats.result.FactUserHouseResultDTO; +import com.epmet.entity.stats.FactAgencyUserHouseDailyEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; +import java.util.Map; + +/** + * 人房信息统计数,按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +@Mapper +public interface FactAgencyUserHouseDailyDao extends BaseDao { + + List listPage(Map params); + + List getTotal(Map params); + + void deleteByDateId(FactUserHouseFormDTO formDTO); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGridUserHouseDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGridUserHouseDailyDao.java new file mode 100644 index 0000000000..515333fc6f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGridUserHouseDailyDao.java @@ -0,0 +1,28 @@ +package com.epmet.dao.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; +import com.epmet.dto.stats.result.FactUserHouseResultDTO; +import com.epmet.entity.stats.FactGridUserHouseDailyEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; +import java.util.Map; + +/** + * 网格的人房信息统计数,按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +@Mapper +public interface FactGridUserHouseDailyDao extends BaseDao { + + List listPage(Map params); + + List getTotal(Map params); + + List statAgency(FactUserHouseFormDTO formDTO); + + void deleteByDateId(FactUserHouseFormDTO formDTO); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactNeighborhoodUserHouseDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactNeighborhoodUserHouseDailyDao.java new file mode 100644 index 0000000000..e83fb2dcc7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactNeighborhoodUserHouseDailyDao.java @@ -0,0 +1,27 @@ +package com.epmet.dao.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; +import com.epmet.dto.stats.result.FactUserHouseResultDTO; +import com.epmet.entity.stats.FactNeighborhoodUserHouseDailyEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; +import java.util.Map; + +/** + * 网格的人房信息统计数,按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-01 + */ +@Mapper +public interface FactNeighborhoodUserHouseDailyDao extends BaseDao { + + void deleteByDateId(FactUserHouseFormDTO formDTO); + + List listPage(Map params); + + List getTotal(Map params); + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/user/IcResiUserDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/user/IcResiUserDao.java new file mode 100644 index 0000000000..e879641504 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/user/IcResiUserDao.java @@ -0,0 +1,42 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao.user; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; +import com.epmet.dto.stats.result.FactUserHouseResultDTO; +import com.epmet.entity.user.IcResiUserEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 用户基础信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-10-26 + */ +@Mapper +public interface IcResiUserDao extends BaseDao { + + List userStat(FactUserHouseFormDTO formDTO); + + List userStatNew(FactUserHouseFormDTO formDTO); + +} 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/java/com/epmet/entity/org/IcHouseEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/org/IcHouseEntity.java new file mode 100644 index 0000000000..889f5b3d86 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/org/IcHouseEntity.java @@ -0,0 +1,110 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.org; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 房屋信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-10-25 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_house") +public class IcHouseEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 小区id + */ + private String neighborHoodId; + + /** + * 片区id,neighbor_hood_part.id,可为空。 + */ + private String partId; + + /** + * 所属楼栋id + */ + private String buildingId; + + /** + * 所属单元id + */ + private String buildingUnitId; + + /** + * 房屋名字后台插入时生成 + */ + private String houseName; + + /** + * 门牌号 + */ + private String doorName; + + /** + * 房屋类型,这里存储字典value就可以 + */ + private String houseType; + + /** + * 存储字典value + */ + private String purpose; + + /** + * 1出租;0未出租 + */ + private Integer rentFlag; + + /** + * 房主姓名 + */ + private String ownerName; + + /** + * 房主电话 + */ + private String ownerPhone; + + /** + * 房主身份证号 + */ + private String ownerIdCard; + + /** + * 排序 + */ + private BigDecimal sort; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactAgencyUserHouseDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactAgencyUserHouseDailyEntity.java new file mode 100644 index 0000000000..2426a984d5 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactAgencyUserHouseDailyEntity.java @@ -0,0 +1,118 @@ +package com.epmet.entity.stats; + +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-05-27 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_agency_user_house_daily") +public class FactAgencyUserHouseDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd; + */ + private String dateId; + + /** + * 组织id + */ + private String agencyId; + + /** + * agency_id所属的机关级别(社区级:community, +乡(镇、街道)级:street, +区县级: district, +市级: city +省级:province) + */ + private String level; + + /** + * 组织i所属的组织id + */ + private String pid; + + /** + * 组织i所有上级id + */ + private String pids; + + /** + * 小区总数 + */ + private Integer neighbourhoodsCount; + + /** + * 房屋总数 + */ + private Integer houseCount; + + /** + * 自住房屋总数 + */ + private Integer houseSelfCount; + + /** + * 出租房屋总数 + */ + private Integer houseLeaseCount; + + /** + * 闲置房屋总数 + */ + private Integer houseIdleCount; + + /** + * 居民总数 + */ + private Integer userCount; + + /** + * 常住居民总数 + */ + private Integer userResiCount; + + /** + * 流动居民总数 + */ + private Integer userFloatCount; + + /** + * 当日新增房屋数 + */ + private Integer houseIncr; + + /** + * 当日修改房屋数 + */ + private Integer houseModify; + + /** + * 当日新增居民数 + */ + private Integer userIncr; + + /** + * 当日修改居民数 + */ + private Integer userModify; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactGridUserHouseDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactGridUserHouseDailyEntity.java new file mode 100644 index 0000000000..58075e335e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactGridUserHouseDailyEntity.java @@ -0,0 +1,109 @@ +package com.epmet.entity.stats; + +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-05-27 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_grid_user_house_daily") +public class FactGridUserHouseDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd; + */ + private String dateId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格所属的组织id + */ + private String pid; + + /** + * 网格所有上级id + */ + private String pids; + + /** + * 小区总数 + */ + private Integer neighbourhoodsCount; + + /** + * 房屋总数 + */ + private Integer houseCount; + + /** + * 自住房屋总数 + */ + private Integer houseSelfCount; + + /** + * 出租房屋总数 + */ + private Integer houseLeaseCount; + + /** + * 闲置房屋总数 + */ + private Integer houseIdleCount; + + /** + * 居民总数 + */ + private Integer userCount; + + /** + * 常住居民总数 + */ + private Integer userResiCount; + + /** + * 流动居民总数 + */ + private Integer userFloatCount; + + /** + * 当日新增房屋数 + */ + private Integer houseIncr; + + /** + * 当日修改房屋数 + */ + private Integer houseModify; + + /** + * 当日新增居民数 + */ + private Integer userIncr; + + /** + * 当日修改居民数 + */ + private Integer userModify; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactNeighborhoodUserHouseDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactNeighborhoodUserHouseDailyEntity.java new file mode 100644 index 0000000000..2c48798b2c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactNeighborhoodUserHouseDailyEntity.java @@ -0,0 +1,119 @@ +package com.epmet.entity.stats; + +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-01 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_neighborhood_user_house_daily") +public class FactNeighborhoodUserHouseDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd; + */ + private String dateId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格所属的组织id + */ + private String pid; + + /** + * 网格所有上级id + */ + private String pids; + + /** + * 小区ID + */ + private String neighbourhoodsId; + + /** + * 小区名称 + */ + private String neighborHoodName; + + /** + * 房屋总数 + */ + private Integer houseCount; + + /** + * 小区总数 + */ + private Integer neighbourhoodsCount; + + /** + * 自住房屋总数 + */ + private Integer houseSelfCount; + + /** + * 出租房屋总数 + */ + private Integer houseLeaseCount; + + /** + * 闲置房屋总数 + */ + private Integer houseIdleCount; + + /** + * 居民总数 + */ + private Integer userCount; + + /** + * 常住居民总数 + */ + private Integer userResiCount; + + /** + * 流动居民总数 + */ + private Integer userFloatCount; + + /** + * 当日新增房屋数 + */ + private Integer houseIncr; + + /** + * 当日修改房屋数 + */ + private Integer houseModify; + + /** + * 当日新增居民数 + */ + private Integer userIncr; + + /** + * 当日修改居民数 + */ + private Integer userModify; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/user/IcResiUserEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/user/IcResiUserEntity.java new file mode 100644 index 0000000000..4a2260b045 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/user/IcResiUserEntity.java @@ -0,0 +1,513 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.user; + +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 2021-10-26 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_resi_user") +public class IcResiUserEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id customer.id + */ + private String customerId; + + /** + * + */ + private String agencyId; + + /** + * + */ + private String pids; + + /** + * 网格ID + */ + private String gridId; + + /** + * 所属小区ID + */ + private String villageId; + + /** + * 所属楼宇Id + */ + private String buildId; + + /** + * 单元id + */ + private String unitId; + + /** + * 所属家庭Id + */ + private String homeId; + + /** + * 是否本地户籍 + */ + private String isBdhj; + + /** + * 姓名 + */ + private String name; + + /** + * 手机号 + */ + private String mobile; + + /** + * 性别 + */ + private String gender; + + /** + * 身份证号 + */ + private String idCard; + + /** + * 出生日期 + */ + private String birthday; + + /** + * 备注 + */ + private String remarks; + + /** + * 联系人 + */ + private String contacts; + + /** + * 联系人电话 + */ + private String contactsMobile; + + /** + * 九小场所url + */ + private String ninePlace; + + /** + * 是否党员 + */ + private String isParty; + + /** + * 是否低保户 + */ + private String isDbh; + + /** + * 是否保障房 + */ + private String isEnsureHouse; + + /** + * 是否失业 + */ + private String isUnemployed; + + /** + * 是否育龄妇女 + */ + private String isYlfn; + + /** + * 是否退役军人 + */ + private String isVeterans; + + /** + * 是否统战人员 + */ + private String isUnitedFront; + + /** + * 是否信访人员 + */ + private String isXfry; + + /** + * 是否志愿者 + */ + private String isVolunteer; + + /** + * 是否老年人 + */ + private String isOldPeople; + + /** + * 是否空巢 + */ + private String isKc; + + /** + * 是否失独 + */ + private String isSd; + + /** + * 是否失能 + */ + private String isSn; + + /** + * 是否失智 + */ + private String isSz; + + /** + * 是否残疾 + */ + private String isCj; + + /** + * 是否大病 + */ + private String isDb; + + /** + * 是否慢病 + */ + private String isMb; + + /** + * 是否特殊人群 + */ + private String isSpecial; + + /** + * 是否租户【是:1 否:0】 + */ + private String isTenant; + + /** + * 是否流动人口【是:1 否:0】 + */ + private String isFloating; + + /** + * 文化程度【字典表】 + */ + private String culture; + + /** + * 文化程度备注 + */ + private String cultureRemakes; + + /** + * 特长【字典表】 + */ + private String specialSkill; + + /** + * 兴趣爱好 + */ + private String hobby; + + /** + * 兴趣爱好备注 + */ + private String hobbyRemakes; + + /** + * 宗教信仰 + */ + private String faith; + + /** + * 宗教信仰备注 + */ + private String faithRemakes; + + /** + * 残疾类别【字典表】 + */ + private String cjlb; + + /** + * 残疾登记(状况)【字典表】 + */ + private String cjzk; + + /** + * 残疾证号 + */ + private String cjzh; + + /** + * 残疾说明 + */ + private String cjsm; + + /** + * 有无监护人【yes no】 + */ + private String ynJdr; + + /** + * 有无技能特长【yes no】 + */ + private String ynJntc; + + /** + * 有无劳动能力 + */ + private String ynLdnl; + + /** + * 有无非义务教育阶段助学【yes no】 + */ + private String ynFywjyjdzx; + + /** + * 所患大病 + */ + private String shdb; + + /** + * 患大病时间 + */ + private String dbsj; + + /** + * 所患慢性病 + */ + private String shmxb; + + /** + * 患慢性病时间 + */ + private String mxbsj; + + /** + * 是否参保 + */ + private String isCb; + + /** + * 自付金额 + */ + private String zfje; + + /** + * 救助金额 + */ + private String jzje; + + /** + * 救助时间[yyyy-MM-dd] + */ + private String jzsj; + + /** + * 享受救助明细序号 + */ + private String jzmxxh; + + /** + * 健康信息备注 + */ + private String healthRemakes; + + /** + * 工作单位 + */ + private String gzdw; + + /** + * 职业 + */ + private String zy; + + /** + * 离退休时间 + */ + private String ltxsj; + + /** + * 工作信息备注 + */ + private String workRemake; + + /** + * 退休金额 + */ + private String txje; + + /** + * 月收入 + */ + private String ysr; + + /** + * 籍贯 + */ + private String jg; + + /** + * 户籍所在地 + */ + private String hjszd; + + /** + * 现居住地 + */ + private String xjzd; + + /** + * 人户情况 + */ + private String rhzk; + + /** + * 居住信息备注 + */ + private String jzxxRemakes; + + /** + * 民族【字典表】 + */ + private String mz; + + /** + * 与户主关系【字典表】 + */ + private String yhzgx; + + /** + * 居住情况【字典表】 + */ + private String jzqk; + + /** + * 婚姻状况【字典表】 + */ + private String hyzk; + + /** + * 配偶情况【字典表】 + */ + private String poqk; + + /** + * 有无赡养人 + */ + private String ynSyr; + + /** + * 与赡养人关系【字典表】 + */ + private String ysyrgx; + + /** + * 赡养人电话 + */ + private String syrMobile; + + /** + * 家庭信息备注 + */ + private String jtxxRemakes; + + /** + * 用户状态【0:正常;1:迁出;2:注销】 + */ + private String status; + + /** + * 用户详细状态:01:新增、02:导入、03:迁入、04:新生、11:迁出、21死亡 + */ + private String subStatus; + + /** + * 预留字段1 + */ + private String field1; + + /** + * 预留字段2 + */ + private String field2; + + /** + * 预留字段3 + */ + private String field3; + + /** + * 预留字段4 + */ + private String field4; + + /** + * 预留字段5 + */ + private String field5; + + /** + * 预留字段6 + */ + private String field6; + + /** + * 预留字段7 + */ + private String field7; + + /** + * 预留字段8 + */ + private String field8; + + /** + * 预留字段9 + */ + private String field9; + + /** + * 预留字段10 + */ + private String field10; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/excel/FactUserHouseExcel.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/excel/FactUserHouseExcel.java new file mode 100644 index 0000000000..47e4445591 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/excel/FactUserHouseExcel.java @@ -0,0 +1,56 @@ +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 人房信息统计数,按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +@Data +public class FactUserHouseExcel { + + @Excel(name = "组织结构") + private String agencyName; + + @Excel(name = "小区数") + private Integer neighbourhoodsCount; + + @Excel(name = "房屋数") + private Integer houseCount; + + @Excel(name = "自住房屋数") + private Integer houseSelfCount; + + @Excel(name = "出租房屋数") + private Integer houseLeaseCount; + + @Excel(name = "闲置房屋数") + private Integer houseIdleCount; + + @Excel(name = "居民总数") + private Integer userCount; + + @Excel(name = "常住人口数") + private Integer userResiCount; + + @Excel(name = "流动人口数") + private Integer userFloatCount; + + @Excel(name = "新增房屋数") + private Integer houseIncr; + + @Excel(name = "新增人口数") + private Integer userIncr; + + @Excel(name = "修改房屋数") + private Integer houseModify; + + @Excel(name = "修改人口数") + private Integer userModify; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/HouseService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/HouseService.java new file mode 100644 index 0000000000..5eafd8cc88 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/HouseService.java @@ -0,0 +1,73 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.org; + +import com.epmet.dto.stats.form.FactUserHouseFormDTO; +import com.epmet.dto.stats.result.FactUserHouseResultDTO; + +import java.util.List; + +/** + * 小区表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-10-25 + */ +public interface HouseService { + + /** + * 房屋统计 + * + * @param formDTO + * @return java.util.List + * @author zhy + * @date 2022/5/30 13:33 + */ + List houseStat(FactUserHouseFormDTO formDTO); + + /** + * 房屋统计(小区) + * + * @param formDTO + * @return java.util.List + * @author wgf + * @date 2022/5/30 13:33 + */ + List houseStatNew(FactUserHouseFormDTO formDTO); + + /** + * 小区统计 + * + * @param formDTO + * @return java.util.List + * @author zhy + * @date 2022/5/30 13:33 + */ + List neighborhoodStat(FactUserHouseFormDTO formDTO); + + /** + * 小区统计(小区) + * + * @param formDTO + * @return java.util.List + * @author wgf + * @date 2022/5/30 13:33 + */ + List neighborhoodStatNew(FactUserHouseFormDTO formDTO); + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/HouseServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/HouseServiceImpl.java new file mode 100644 index 0000000000..f6e74ac689 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/HouseServiceImpl.java @@ -0,0 +1,42 @@ +package com.epmet.service.org.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.feign.ResultDataResolver; +import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.org.IcHouseDao; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; +import com.epmet.dto.stats.result.FactUserHouseResultDTO; +import com.epmet.entity.org.IcHouseEntity; +import com.epmet.service.org.HouseService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Slf4j +@DataSource(DataSourceConstant.GOV_ORG) +@Service +public class HouseServiceImpl extends BaseServiceImpl implements HouseService, ResultDataResolver { + + @Override + public List houseStat(FactUserHouseFormDTO formDTO) { + return baseDao.houseStat(formDTO); + } + + @Override + public List houseStatNew(FactUserHouseFormDTO formDTO) { + return baseDao.houseStatNew(formDTO); + } + + @Override + public List neighborhoodStat(FactUserHouseFormDTO formDTO) { + return baseDao.neighborhoodStatStat(formDTO); + } + + @Override + public List neighborhoodStatNew(FactUserHouseFormDTO formDTO) { + return baseDao.neighborhoodStatStatNew(formDTO); + } + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactAgencyUserHouseDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactAgencyUserHouseDailyService.java new file mode 100644 index 0000000000..9a31152d55 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactAgencyUserHouseDailyService.java @@ -0,0 +1,111 @@ +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.stats.FactAgencyUserHouseDailyDTO; +import com.epmet.dto.stats.FactGridUserHouseDailyDTO; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; +import com.epmet.dto.stats.result.FactUserHouseResultDTO; +import com.epmet.entity.stats.FactAgencyUserHouseDailyEntity; + +import java.util.List; +import java.util.Map; + +/** + * 人房信息统计数,按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +public interface FactAgencyUserHouseDailyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-05-27 + */ + PageData page(Map params); + + /** + * 分页合计 + * + * @param params + * @return PageData + * @author generator + * @date 2022-05-27 + */ + FactUserHouseResultDTO getTotal(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-05-27 + */ + List list(Map params); + + /** + * 查询导出数据 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-05-27 + */ + List listExport(Map params); + + /** + * 单条查询 + * + * @param id + * @return FactAgencyUserHouseDailyDTO + * @author generator + * @date 2022-05-27 + */ + FactAgencyUserHouseDailyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-27 + */ + void save(FactAgencyUserHouseDailyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-27 + */ + void update(FactAgencyUserHouseDailyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-05-27 + */ + void delete(String[] ids); + + /** + * 物理删除历史数据 + * + * @param formDTO + * @return void + * @author zhy + * @date 2022/5/30 13:32 + */ + void deleteByDateId(FactUserHouseFormDTO formDTO); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGridUserHouseDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGridUserHouseDailyService.java new file mode 100644 index 0000000000..36dd9046a5 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGridUserHouseDailyService.java @@ -0,0 +1,120 @@ +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.stats.FactGridUserHouseDailyDTO; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; +import com.epmet.dto.stats.result.FactUserHouseResultDTO; +import com.epmet.entity.stats.FactGridUserHouseDailyEntity; + +import java.util.List; +import java.util.Map; + +/** + * 网格的人房信息统计数,按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +public interface FactGridUserHouseDailyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-05-27 + */ + PageData page(Map params); + + /** + * 页面合计 + * + * @param params + * @return PageData + * @author generator + * @date 2022-05-27 + */ + FactUserHouseResultDTO getTotal(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-05-27 + */ + List list(Map params); + + /** + * 查询导出数据 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-05-27 + */ + List listExport(Map params); + + /** + * 单条查询 + * + * @param id + * @return FactGridUserHouseDailyDTO + * @author generator + * @date 2022-05-27 + */ + FactGridUserHouseDailyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-27 + */ + void save(FactGridUserHouseDailyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-27 + */ + void update(FactGridUserHouseDailyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-05-27 + */ + void delete(String[] ids); + + /** + * 物理删除历史数据 + * + * @param formDTO + * @return void + * @author zhy + * @date 2022/5/30 13:32 + */ + void deleteByDateId(FactUserHouseFormDTO formDTO); + + /** + * 根据网格统计组织数据 + * + * @param formDTO + * @return java.util.List + * @author zhy + * @date 2022/5/30 13:32 + */ + List statAgency(FactUserHouseFormDTO formDTO); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactNeighborhoodUserHouseDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactNeighborhoodUserHouseDailyService.java new file mode 100644 index 0000000000..4c8905bae4 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactNeighborhoodUserHouseDailyService.java @@ -0,0 +1,113 @@ +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.stats.FactNeighborhoodUserHouseDailyDTO; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; +import com.epmet.dto.stats.result.FactUserHouseResultDTO; +import com.epmet.entity.stats.FactNeighborhoodUserHouseDailyEntity; + +import java.util.List; +import java.util.Map; + +/** + * 网格的人房信息统计数,按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-01 + */ +public interface FactNeighborhoodUserHouseDailyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-06-01 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-06-01 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return FactNeighborhoodUserHouseDailyDTO + * @author generator + * @date 2022-06-01 + */ + FactNeighborhoodUserHouseDailyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-01 + */ + void save(FactNeighborhoodUserHouseDailyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-01 + */ + void update(FactNeighborhoodUserHouseDailyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-06-01 + */ + void delete(String[] ids); + + + /** + * 物理删除历史数据 + * + * @param formDTO + * @return void + * @author wgf + * @date 2022/5/30 13:32 + */ + void deleteByDateId(FactUserHouseFormDTO formDTO); + + /** + * 查询导出数据 + * + * @param params + * @return java.util.List + * @author wgf + * @date 2022-05-27 + */ + List listExport(Map params); + + /** + * 页面合计 + * + * @param params + * @return PageData + * @author wgf + * @date 2022-05-27 + */ + FactUserHouseResultDTO getTotal(Map params); + + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactUserHouseService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactUserHouseService.java new file mode 100644 index 0000000000..9221627c48 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactUserHouseService.java @@ -0,0 +1,78 @@ +package com.epmet.service.stats; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.stats.FactAgencyUserHouseDailyDTO; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; +import com.epmet.dto.stats.result.FactUserHouseResultDTO; + +import java.util.List; +import java.util.Map; + +/** + * 人房信息统计数,按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +public interface FactUserHouseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-05-27 + */ + PageData page(Map params); + + /** + * 页面合计 + * + * @param params + * @return PageData + * @author generator + * @date 2022-05-27 + */ + FactUserHouseResultDTO total(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-05-27 + */ + List list(Map params); + + /** + * 人房网格数据 + * + * @param formDTO + * @return void + * @author zhy + * @date 2022/5/30 13:31 + */ + void statGrid(FactUserHouseFormDTO formDTO); + + /** + * 人房小区数据 + * + * @param formDTO + * @return void + * @author wgf + * @date 2022/5/30 13:31 + */ + void statNeighborhood(FactUserHouseFormDTO formDTO); + + /** + * 人房组织数据 + * + * @param formDTO + * @return void + * @author zhy + * @date 2022/5/30 13:31 + */ + void statAgency(FactUserHouseFormDTO formDTO); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java index 9ff2671fbb..044f6e63d1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java @@ -81,9 +81,11 @@ public class DimGridServiceImpl extends BaseServiceImpl getWrapper(Map params){ String id = (String)params.get(FieldConstant.ID_HUMP); + String customerId = (String)params.get("customerId"); QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + wrapper.eq(StringUtils.isNotBlank(customerId), "CUSTOMER_ID", customerId); return wrapper; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyUserHouseDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyUserHouseDailyServiceImpl.java new file mode 100644 index 0000000000..8fbf82b671 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyUserHouseDailyServiceImpl.java @@ -0,0 +1,121 @@ +package com.epmet.service.stats.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.constant.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.user.LoginUserUtil; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.stats.FactAgencyUserHouseDailyDao; +import com.epmet.dto.stats.FactAgencyUserHouseDailyDTO; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; +import com.epmet.dto.stats.result.FactUserHouseResultDTO; +import com.epmet.entity.stats.FactAgencyUserHouseDailyEntity; +import com.epmet.service.stats.FactAgencyUserHouseDailyService; +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-05-27 + */ +@Service +public class FactAgencyUserHouseDailyServiceImpl extends BaseServiceImpl implements FactAgencyUserHouseDailyService { + + @Autowired + private LoginUserUtil loginUserUtil; + + @Override + public PageData page(Map params) { + params.put("customerId", loginUserUtil.getLoginUserCustomerId()); + IPage page = getPage(params); + List list = baseDao.listPage(params); + return new PageData<>(list, page.getTotal()); + } + + @Override + public FactUserHouseResultDTO getTotal(Map params) { + params.put("customerId", loginUserUtil.getLoginUserCustomerId()); + List list = baseDao.getTotal(params); + + // 只有当日数据直接展示,否则需要统计时间段内两天差值进行Incr和Modify数据计算 + if (list.size() == NumConstant.ZERO) { + return null; + } else if (list.size() == NumConstant.ONE) { + return list.get(0); + } else { + FactUserHouseResultDTO first = list.get(0); + FactUserHouseResultDTO last = list.get(list.size() - 1); + FactUserHouseResultDTO dto = last; + dto.setHouseIncr(last.getHouseIncr() - first.getHouseIncr()); + dto.setHouseModify(last.getHouseModify() - first.getHouseModify()); + dto.setUserIncr(last.getUserIncr() - first.getUserIncr()); + dto.setUserModify(last.getUserModify() - first.getUserModify()); + return dto; + } + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, FactAgencyUserHouseDailyDTO.class); + } + + @Override + public List listExport(Map params) { + return baseDao.listPage(params); + } + + 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 FactAgencyUserHouseDailyDTO get(String id) { + FactAgencyUserHouseDailyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, FactAgencyUserHouseDailyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(FactAgencyUserHouseDailyDTO dto) { + FactAgencyUserHouseDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactAgencyUserHouseDailyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(FactAgencyUserHouseDailyDTO dto) { + FactAgencyUserHouseDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactAgencyUserHouseDailyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public void deleteByDateId(FactUserHouseFormDTO formDTO) { + baseDao.deleteByDateId(formDTO); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridUserHouseDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridUserHouseDailyServiceImpl.java new file mode 100644 index 0000000000..7aef227b16 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridUserHouseDailyServiceImpl.java @@ -0,0 +1,138 @@ +package com.epmet.service.stats.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.constant.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.user.LoginUserUtil; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.stats.FactGridUserHouseDailyDao; +import com.epmet.dto.stats.FactGridUserHouseDailyDTO; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; +import com.epmet.dto.stats.result.FactUserHouseResultDTO; +import com.epmet.entity.stats.FactGridUserHouseDailyEntity; +import com.epmet.service.stats.FactGridUserHouseDailyService; +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-05-27 + */ +@Service +public class FactGridUserHouseDailyServiceImpl extends BaseServiceImpl implements FactGridUserHouseDailyService { + + @Autowired + private LoginUserUtil loginUserUtil; + + @Override + public PageData page(Map params) { + params.put("customerId", loginUserUtil.getLoginUserCustomerId()); + IPage page = getPage(params); + List list = baseDao.listPage(params); + return new PageData<>(list, page.getTotal()); + } + + @Override + public FactUserHouseResultDTO getTotal(Map params) { + params.put("customerId", loginUserUtil.getLoginUserCustomerId()); + List list = baseDao.getTotal(params); + + // 只有当日数据直接展示,否则需要统计时间段内两天差值进行Incr和Modify数据计算 + if (list.size() == NumConstant.ZERO) { + return null; + } else if (list.size() == NumConstant.ONE) { + return list.get(0); + } else { + Integer houseIncr = 0; + Integer houseModify = 0; + Integer userIncr = 0; + Integer userModify = 0; + for(FactUserHouseResultDTO factUserHouseResultDTO : list){ + houseIncr = houseIncr + factUserHouseResultDTO.getHouseIncr(); + houseModify = houseModify + factUserHouseResultDTO.getHouseModify(); + userIncr = userIncr + factUserHouseResultDTO.getUserIncr(); + userModify = userModify + factUserHouseResultDTO.getUserModify(); + } + FactUserHouseResultDTO dto = list.get(list.size() - 1); + dto.setHouseIncr(houseIncr); + dto.setHouseModify(houseModify); + dto.setUserIncr(userIncr); + dto.setUserModify(userModify); + return dto; + } + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, FactGridUserHouseDailyDTO.class); + } + + @Override + public List listExport(Map params) { + return baseDao.listPage(params); + } + + private QueryWrapper getWrapper(Map params) { + String id = (String) params.get(FieldConstant.ID_HUMP); + String dateId = (String) params.get("dateId"); + String customerId = (String) params.get("customerId"); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + wrapper.eq(StringUtils.isNotBlank(dateId), "DATE_ID", dateId); + wrapper.eq(StringUtils.isNotBlank(customerId), "CUSTOMER_ID", customerId); + + return wrapper; + } + + @Override + public FactGridUserHouseDailyDTO get(String id) { + FactGridUserHouseDailyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, FactGridUserHouseDailyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(FactGridUserHouseDailyDTO dto) { + FactGridUserHouseDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactGridUserHouseDailyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(FactGridUserHouseDailyDTO dto) { + FactGridUserHouseDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactGridUserHouseDailyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public void deleteByDateId(FactUserHouseFormDTO formDTO) { + baseDao.deleteByDateId(formDTO); + } + + @Override + public List statAgency(FactUserHouseFormDTO formDTO) { + return baseDao.statAgency(formDTO); + } + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactNeighborhoodUserHouseDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactNeighborhoodUserHouseDailyServiceImpl.java new file mode 100644 index 0000000000..8772511aa0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactNeighborhoodUserHouseDailyServiceImpl.java @@ -0,0 +1,129 @@ +package com.epmet.service.stats.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.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.user.LoginUserUtil; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.dao.stats.FactNeighborhoodUserHouseDailyDao; +import com.epmet.dto.stats.FactNeighborhoodUserHouseDailyDTO; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; +import com.epmet.dto.stats.result.FactUserHouseResultDTO; +import com.epmet.entity.stats.FactGridUserHouseDailyEntity; +import com.epmet.entity.stats.FactNeighborhoodUserHouseDailyEntity; +import com.epmet.service.stats.FactNeighborhoodUserHouseDailyService; +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.*; + +/** + * 网格的人房信息统计数,按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-01 + */ +@Service +public class FactNeighborhoodUserHouseDailyServiceImpl extends BaseServiceImpl implements FactNeighborhoodUserHouseDailyService { + + @Autowired + private LoginUserUtil loginUserUtil; + + @Override + public PageData page(Map params) { + params.put("customerId", loginUserUtil.getLoginUserCustomerId()); + IPage page = getPage(params); + List list = baseDao.listPage(params); + return new PageData<>(list, page.getTotal()); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, FactNeighborhoodUserHouseDailyDTO.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 FactNeighborhoodUserHouseDailyDTO get(String id) { + FactNeighborhoodUserHouseDailyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, FactNeighborhoodUserHouseDailyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(FactNeighborhoodUserHouseDailyDTO dto) { + FactNeighborhoodUserHouseDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactNeighborhoodUserHouseDailyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(FactNeighborhoodUserHouseDailyDTO dto) { + FactNeighborhoodUserHouseDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactNeighborhoodUserHouseDailyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public void deleteByDateId(FactUserHouseFormDTO formDTO) { + baseDao.deleteByDateId(formDTO); + } + + @Override + public List listExport(Map params) { + return baseDao.listPage(params); + } + + @Override + public FactUserHouseResultDTO getTotal(Map params) { + params.put("customerId", loginUserUtil.getLoginUserCustomerId()); + List list = baseDao.getTotal(params); + + // 只有当日数据直接展示,否则需要统计时间段内两天差值进行Incr和Modify数据计算 + if (list.size() == NumConstant.ZERO) { + return null; + } else if (list.size() == NumConstant.ONE) { + return list.get(0); + } else { + Integer houseIncr = 0; + Integer houseModify = 0; + Integer userIncr = 0; + Integer userModify = 0; + for(FactUserHouseResultDTO factUserHouseResultDTO : list){ + houseIncr = houseIncr + factUserHouseResultDTO.getHouseIncr(); + houseModify = houseModify + factUserHouseResultDTO.getHouseModify(); + userIncr = userIncr + factUserHouseResultDTO.getUserIncr(); + userModify = userModify + factUserHouseResultDTO.getUserModify(); + } + FactUserHouseResultDTO dto = list.get(list.size() - 1); + dto.setHouseIncr(houseIncr); + dto.setHouseModify(houseModify); + dto.setUserIncr(userIncr); + dto.setUserModify(userModify); + return dto; + } + } + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java new file mode 100644 index 0000000000..db20e4ccc6 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java @@ -0,0 +1,307 @@ +package com.epmet.service.stats.impl; + +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.enums.OrgLevelEnum; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.dto.stats.FactGridUserHouseDailyDTO; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; +import com.epmet.dto.stats.result.FactUserHouseResultDTO; +import com.epmet.entity.stats.FactAgencyUserHouseDailyEntity; +import com.epmet.entity.stats.FactGridUserHouseDailyEntity; +import com.epmet.entity.stats.FactNeighborhoodUserHouseDailyEntity; +import com.epmet.service.org.HouseService; +import com.epmet.service.stats.*; +import com.epmet.service.user.IcResiUserService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.*; + +/** + * 人房信息统计数,按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +@Service +@Slf4j +public class FactUserHouseServiceImpl implements FactUserHouseService { + + @Autowired + private FactAgencyUserHouseDailyService factAgencyUserHouseDailyService; + + @Autowired + private FactGridUserHouseDailyService factGridUserHouseDailyService; + + @Autowired + private FactNeighborhoodUserHouseDailyService factNeighborhoodUserHouseDailyService; + + @Autowired + private HouseService houseService; + + @Autowired + private IcResiUserService icResiUserService; + + @Autowired + private DimGridService dimGridService; + + @Override + public PageData page(Map params) { + PageData page = null; + if (params.containsKey("startTime") && params.containsKey("endTime")) { + if (StringUtils.isNotBlank(params.get("startTime").toString()) && StringUtils.isNotBlank(params.get("endTime").toString())) { + params.put("dateId", StringUtils.EMPTY); + } else { + params.put("dateId", DateUtils.getBeforeNDay(NumConstant.ONE)); + } + } else { + params.put("dateId", DateUtils.getBeforeNDay(NumConstant.ONE)); + } + if (params.containsKey("level")) { + if("neighborhood".equals(params.get("level").toString()) || OrgLevelEnum.GRID.getCode().equals(params.get("level").toString())){ + page = factNeighborhoodUserHouseDailyService.page(params); + + }else if (OrgLevelEnum.COMMUNITY.getCode().equals(params.get("level").toString())) { + page = factGridUserHouseDailyService.page(params); + } else { + page = factAgencyUserHouseDailyService.page(params); + } + } + return page; + } + + @Override + public FactUserHouseResultDTO total(Map params) { + FactUserHouseResultDTO dto = null; + // 不查询时间段默认查询当天 + if (params.containsKey("startTime") && params.containsKey("endTime")) { + if (StringUtils.isNotBlank(params.get("startTime").toString()) && StringUtils.isNotBlank(params.get("endTime").toString())) { + params.put("dateId", StringUtils.EMPTY); + } else { + params.put("dateId", DateUtils.getBeforeNDay(NumConstant.ONE)); + } + } else { + params.put("dateId", DateUtils.getBeforeNDay(NumConstant.ONE)); + } + // 网格纬度查询网格统计表,其余纬度查询组织统计表 + if (params.containsKey("level")) { + if("neighborhood".equals(params.get("level").toString())){ + dto = factNeighborhoodUserHouseDailyService.getTotal(params); + }else if (OrgLevelEnum.GRID.getCode().equals(params.get("level").toString())) { + dto = factGridUserHouseDailyService.getTotal(params); + } else { + dto = factAgencyUserHouseDailyService.getTotal(params); + } + } + return dto; + } + + @Override + public List list(Map params) { + List list = new ArrayList<>(); + if (params.containsKey("level")) { + if("neighborhood".equals(params.get("level").toString()) || OrgLevelEnum.GRID.getCode().equals(params.get("level").toString())){ + list = factNeighborhoodUserHouseDailyService.listExport(params); + }else if (OrgLevelEnum.COMMUNITY.getCode().equals(params.get("level").toString())) { + list = factGridUserHouseDailyService.listExport(params); + } else { + list = factAgencyUserHouseDailyService.listExport(params); + } + } + FactUserHouseResultDTO dto = total(params); + if (dto != null) { + dto.setAgencyName("合计"); + } + list.add(dto); + return list; + } + + @Override + public void statGrid(FactUserHouseFormDTO formDTO) { + if (StringUtils.isBlank(formDTO.getDateId())) { + formDTO.setDateId(DateUtils.getBeforeNDay(NumConstant.ONE)); + } + String dateId = formDTO.getDateId(); + String customerId = formDTO.getCustomerId(); + + // 先删除历史 + factGridUserHouseDailyService.deleteByDateId(formDTO); + + // 保证小区是全部网格后,其余数据进行循环匹配 + List neiList = houseService.neighborhoodStat(formDTO); + List houseList = houseService.houseStat(formDTO); + List userList = icResiUserService.userStat(formDTO); + + List addList = new ArrayList<>(); + + neiList.forEach(item -> { + String gridId = item.getGridId(); + FactUserHouseResultDTO dto = new FactUserHouseResultDTO(); + dto.setCustomerId(formDTO.getCustomerId()); + dto.setDateId(dateId); + dto.setGridId(gridId); + dto.setPid(item.getPid()); + dto.setPids(item.getPids()); + dto.setNeighbourhoodsCount(item.getNeighbourhoodsCount()); + + Optional houseOptional = houseList.stream().filter(house -> gridId.equals(house.getGridId()) && customerId.equals(house.getCustomerId())).findFirst(); + if (houseOptional.isPresent()) { + dto.setHouseCount(houseOptional.get().getHouseCount()); + dto.setHouseSelfCount(houseOptional.get().getHouseSelfCount()); + dto.setHouseLeaseCount(houseOptional.get().getHouseLeaseCount()); + dto.setHouseIdleCount(houseOptional.get().getHouseIdleCount()); + dto.setHouseIncr(houseOptional.get().getHouseIncr()); + dto.setHouseModify(houseOptional.get().getHouseModify()); + } else { + dto.setHouseCount(NumConstant.ZERO); + dto.setHouseSelfCount(NumConstant.ZERO); + dto.setHouseLeaseCount(NumConstant.ZERO); + dto.setHouseIdleCount(NumConstant.ZERO); + dto.setHouseIncr(NumConstant.ZERO); + dto.setHouseModify(NumConstant.ZERO); + } + + Optional userOptional = userList.stream().filter(user -> gridId.equals(user.getGridId()) && customerId.equals(user.getCustomerId())).findFirst(); + if (userOptional.isPresent()) { + dto.setUserCount(userOptional.get().getUserCount()); + dto.setUserResiCount(userOptional.get().getUserResiCount()); + dto.setUserFloatCount(userOptional.get().getUserFloatCount()); + dto.setUserIncr(userOptional.get().getUserIncr()); + dto.setUserModify(userOptional.get().getUserModify()); + } else { + dto.setUserCount(NumConstant.ZERO); + dto.setUserResiCount(NumConstant.ZERO); + dto.setUserFloatCount(NumConstant.ZERO); + dto.setUserIncr(NumConstant.ZERO); + dto.setUserModify(NumConstant.ZERO); + } + addList.add(dto); + }); + + List entityList = ConvertUtils.sourceToTarget(addList, FactGridUserHouseDailyEntity.class); + factGridUserHouseDailyService.insertBatch(entityList); + } + + + /** + * 小区 + * @author wgf + * @param formDTO + */ + @Override + public void statNeighborhood(FactUserHouseFormDTO formDTO) { + log.info("$$$进入业务逻辑"); + if (StringUtils.isBlank(formDTO.getDateId())) { + formDTO.setDateId(DateUtils.getBeforeNDay(NumConstant.ONE)); + } + String dateId = formDTO.getDateId(); + String customerId = formDTO.getCustomerId(); + + // 先删除历史 + factNeighborhoodUserHouseDailyService.deleteByDateId(formDTO); + log.info("$$$删除历史完成"); + // 保证小区是全部网格后,其余数据进行循环匹配 + List neiList = houseService.neighborhoodStatNew(formDTO); + List houseList = houseService.houseStatNew(formDTO); + List userList = icResiUserService.userStatNew(formDTO); + + List addList = new ArrayList<>(); + + neiList.forEach(item -> { + String gridId = item.getGridId() == null ? "" : item.getGridId(); + String neighborHoodsId = item.getNeighbourhoodsId(); + FactUserHouseResultDTO dto = new FactUserHouseResultDTO(); + dto.setCustomerId(formDTO.getCustomerId()); + dto.setDateId(dateId); + dto.setGridId(gridId); + dto.setPid(item.getPid() == null ? "" : item.getPid()); + dto.setPids(item.getPids() == null ? "" : item.getPids()); + dto.setNeighbourhoodsCount(item.getNeighbourhoodsCount()); + dto.setNeighbourhoodsId(item.getNeighbourhoodsId()); + dto.setNeighborHoodName(item.getNeighborHoodName()); + + Optional houseOptional = houseList.stream().filter(house -> neighborHoodsId.equals(house.getNeighbourhoodsId()) && customerId.equals(house.getCustomerId())).findFirst(); + if (houseOptional.isPresent()) { + dto.setHouseCount(houseOptional.get().getHouseCount()); + dto.setHouseSelfCount(houseOptional.get().getHouseSelfCount()); + dto.setHouseLeaseCount(houseOptional.get().getHouseLeaseCount()); + dto.setHouseIdleCount(houseOptional.get().getHouseIdleCount()); + } else { + dto.setHouseCount(NumConstant.ZERO); + dto.setHouseSelfCount(NumConstant.ZERO); + dto.setHouseLeaseCount(NumConstant.ZERO); + dto.setHouseIdleCount(NumConstant.ZERO); + } + + Optional userOptional = userList.stream().filter(user -> neighborHoodsId.equals(user.getNeighbourhoodsId()) && customerId.equals(user.getCustomerId())).findFirst(); + if (userOptional.isPresent()) { + dto.setUserCount(userOptional.get().getUserCount()); + dto.setUserResiCount(userOptional.get().getUserResiCount()); + dto.setUserFloatCount(userOptional.get().getUserFloatCount()); + } else { + dto.setUserCount(NumConstant.ZERO); + dto.setUserResiCount(NumConstant.ZERO); + dto.setUserFloatCount(NumConstant.ZERO); + } + addList.add(dto); + }); + log.info("$$$addList:::::" + addList); + List entityList = ConvertUtils.sourceToTarget(addList, FactNeighborhoodUserHouseDailyEntity.class); + factNeighborhoodUserHouseDailyService.insertBatch(entityList); + } + + @Override + public void statAgency(FactUserHouseFormDTO formDTO) { + if (StringUtils.isBlank(formDTO.getDateId())) { + formDTO.setDateId(DateUtils.getBeforeNDay(NumConstant.ONE)); + } + + Map params = new HashMap<>(); + params.put("dateId", formDTO.getDateId()); + params.put("customerId", formDTO.getCustomerId()); + List list = factGridUserHouseDailyService.list(params); + if (list.isEmpty()) { + return; + } + + // 先删除历史 + factAgencyUserHouseDailyService.deleteByDateId(formDTO); + + // 使用机构表左关联,对不同纬度的机构进行分组统计 + formDTO.setLevel("community"); + List commList = factGridUserHouseDailyService.statAgency(formDTO); + if (!commList.isEmpty()) { + commList.forEach(item -> item.setDateId(formDTO.getDateId())); + factAgencyUserHouseDailyService.insertBatch(ConvertUtils.sourceToTarget(commList, FactAgencyUserHouseDailyEntity.class)); + } + formDTO.setLevel("street"); + List streetList = factGridUserHouseDailyService.statAgency(formDTO); + if (!streetList.isEmpty()) { + streetList.forEach(item -> item.setDateId(formDTO.getDateId())); + factAgencyUserHouseDailyService.insertBatch(ConvertUtils.sourceToTarget(streetList, FactAgencyUserHouseDailyEntity.class)); + } + formDTO.setLevel("district"); + List districtList = factGridUserHouseDailyService.statAgency(formDTO); + if (!districtList.isEmpty()) { + districtList.forEach(item -> item.setDateId(formDTO.getDateId())); + factAgencyUserHouseDailyService.insertBatch(ConvertUtils.sourceToTarget(districtList, FactAgencyUserHouseDailyEntity.class)); + } + formDTO.setLevel("city"); + List cityList = factGridUserHouseDailyService.statAgency(formDTO); + if (!cityList.isEmpty()) { + cityList.forEach(item -> item.setDateId(formDTO.getDateId())); + factAgencyUserHouseDailyService.insertBatch(ConvertUtils.sourceToTarget(cityList, FactAgencyUserHouseDailyEntity.class)); + } + formDTO.setLevel("province"); + List provinceList = factGridUserHouseDailyService.statAgency(formDTO); + if (!provinceList.isEmpty()) { + provinceList.forEach(item -> item.setDateId(formDTO.getDateId())); + factAgencyUserHouseDailyService.insertBatch(ConvertUtils.sourceToTarget(provinceList, FactAgencyUserHouseDailyEntity.class)); + } + + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/IcResiUserService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/IcResiUserService.java new file mode 100644 index 0000000000..a3c689b8a8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/IcResiUserService.java @@ -0,0 +1,55 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.user; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; +import com.epmet.dto.stats.result.FactUserHouseResultDTO; +import com.epmet.entity.user.IcResiUserEntity; + +import java.util.List; + +/** + * 用户基础信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-10-26 + */ +public interface IcResiUserService extends BaseService { + + /** + * 居民统计 + * + * @param formDTO + * @return java.util.List + * @author zhy + * @date 2022/5/30 13:33 + */ + List userStat(FactUserHouseFormDTO formDTO); + + /** + * 居民统计(小区) + * + * @param formDTO + * @return java.util.List + * @author wgf + * @date 2022/5/30 13:33 + */ + List userStatNew(FactUserHouseFormDTO formDTO); + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/IcResiUserServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/IcResiUserServiceImpl.java new file mode 100644 index 0000000000..e1f1e9ef1e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/IcResiUserServiceImpl.java @@ -0,0 +1,55 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.user.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.feign.ResultDataResolver; +import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.user.IcResiUserDao; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; +import com.epmet.dto.stats.result.FactUserHouseResultDTO; +import com.epmet.entity.user.IcResiUserEntity; +import com.epmet.service.user.IcResiUserService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 用户基础信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-10-26 + */ +@Slf4j +@DataSource(DataSourceConstant.EPMET_USER) +@Service +public class IcResiUserServiceImpl extends BaseServiceImpl implements IcResiUserService, ResultDataResolver { + + @Override + public List userStat(FactUserHouseFormDTO formDTO) { + return baseDao.userStat(formDTO); + } + + @Override + public List userStatNew(FactUserHouseFormDTO formDTO) { + return baseDao.userStatNew(formDTO); + } + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.32__fact_grid_user_house_daily.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.32__fact_grid_user_house_daily.sql new file mode 100644 index 0000000000..a5ce1a6c8b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.32__fact_grid_user_house_daily.sql @@ -0,0 +1,85 @@ +/* + Navicat Premium Data Transfer + + Source Server : epmet_cloud_dev_statistical + Source Server Type : MySQL + Source Server Version : 50726 + Source Host : 192.168.1.140:3306 + Source Schema : epmet_data_statistical + + Target Server Type : MySQL + Target Server Version : 50726 + File Encoding : 65001 + + Date: 31/05/2022 13:29:46 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for fact_grid_user_house_daily +-- ---------------------------- +DROP TABLE IF EXISTS `fact_grid_user_house_daily`; +CREATE TABLE `fact_grid_user_house_daily` ( + `ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键,customer_id+grid_id+date_id只有一条记录', + `CUSTOMER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户id', + `DATE_ID` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '数据更新至:yyyyMMdd; ', + `GRID_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '网格id', + `PID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '网格所属的组织id', + `PIDS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '网格所有上级id', + `NEIGHBOURHOODS_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '小区总数', + `HOUSE_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '房屋总数', + `HOUSE_SELF_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '自住房屋总数', + `HOUSE_LEASE_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '出租房屋总数', + `HOUSE_IDLE_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '闲置房屋总数', + `USER_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '居民总数', + `USER_RESI_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '常住居民总数', + `USER_FLOAT_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '流动居民总数', + `HOUSE_INCR` int(11) NOT NULL DEFAULT 0 COMMENT '当日新增房屋数', + `HOUSE_MODIFY` int(11) NOT NULL DEFAULT 0 COMMENT '当日修改房屋数', + `USER_INCR` int(11) NOT NULL DEFAULT 0 COMMENT '当日新增居民数', + `USER_MODIFY` int(11) NOT NULL DEFAULT 0 COMMENT '当日修改居民数', + `DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除、1已删除', + `REVISION` int(11) NOT NULL DEFAULT 0 COMMENT '乐观锁', + `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间:第一次提交审核的时间,注意和历史表的第一条记录时间一致', + `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '网格的人房信息统计数,按天统计' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Table structure for fact_agency_user_house_daily +-- ---------------------------- +DROP TABLE IF EXISTS `fact_agency_user_house_daily`; +CREATE TABLE `fact_agency_user_house_daily` ( + `ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键,customer_id+AGENCY_ID+date_id只有一条记录', + `CUSTOMER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户id', + `DATE_ID` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '数据更新至:yyyyMMdd; ', + `AGENCY_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '组织id', + `LEVEL` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'agency_id所属的机关级别(社区级:community,\r\n乡(镇、街道)级:street,\r\n区县级: district,\r\n市级: city\r\n省级:province)', + `PID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '组织i所属的组织id', + `PIDS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '组织i所有上级id', + `NEIGHBOURHOODS_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '小区总数', + `HOUSE_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '房屋总数', + `HOUSE_SELF_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '自住房屋总数', + `HOUSE_LEASE_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '出租房屋总数', + `HOUSE_IDLE_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '闲置房屋总数', + `USER_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '居民总数', + `USER_RESI_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '常住居民总数', + `USER_FLOAT_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '流动居民总数', + `HOUSE_INCR` int(11) NOT NULL DEFAULT 0 COMMENT '当日新增房屋数', + `HOUSE_MODIFY` int(11) NOT NULL DEFAULT 0 COMMENT '当日修改房屋数', + `USER_INCR` int(11) NOT NULL DEFAULT 0 COMMENT '当日新增居民数', + `USER_MODIFY` int(11) NOT NULL DEFAULT 0 COMMENT '当日修改居民数', + `DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除、1已删除', + `REVISION` int(11) NOT NULL DEFAULT 0 COMMENT '乐观锁', + `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间:第一次提交审核的时间,注意和历史表的第一条记录时间一致', + `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '人房信息统计数,按天统计' ROW_FORMAT = DYNAMIC; + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/logback-spring.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/logback-spring.xml index 90d3242709..1a92303138 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/logback-spring.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/logback-spring.xml @@ -138,11 +138,35 @@ + + + + ${log.path}/rocketmqclient.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%X{Transaction-Serial}] %-5level %logger{50} - %msg%n + UTF-8 + + + + ${log.path}/rocketmqclient-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + + + + @@ -166,6 +190,10 @@ + + + + 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 new file mode 100644 index 0000000000..1510478bc4 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml index a1e6a233d0..2ee065b4b5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml @@ -4,7 +4,7 @@ + SELECT + d.AGENCY_NAME AS AGENCY_NAME, + max( NEIGHBOURHOODS_COUNT ) AS NEIGHBOURHOODS_COUNT, + max( HOUSE_COUNT ) AS HOUSE_COUNT, + max( HOUSE_SELF_COUNT ) AS HOUSE_SELF_COUNT, + max( HOUSE_LEASE_COUNT ) AS HOUSE_LEASE_COUNT, + max( HOUSE_IDLE_COUNT ) AS HOUSE_IDLE_COUNT, + max( USER_COUNT ) AS USER_COUNT, + max( USER_RESI_COUNT ) AS USER_RESI_COUNT, + max( USER_FLOAT_COUNT ) AS USER_FLOAT_COUNT, + max( HOUSE_INCR ) AS HOUSE_INCR, + max( HOUSE_MODIFY ) AS HOUSE_MODIFY, + max( USER_INCR ) AS USER_INCR, + max( USER_MODIFY ) AS USER_MODIFY + FROM + fact_agency_user_house_daily a + LEFT JOIN dim_agency d ON d.id = a.AGENCY_ID + WHERE + d.DEL_FLAG = '0' + + AND a.CUSTOMER_ID = #{customerId} + AND d.CUSTOMER_ID = #{customerId} + + + AND a.DATE_ID = #{dateId} + + + AND a.LEVEL = 'community' + AND a.PID = #{agencyId} + + + AND a.LEVEL = 'street' + AND a.PID = #{agencyId} + + + AND a.LEVEL = 'district' + AND a.PID = #{agencyId} + + + AND a.LEVEL = 'city' + AND a.PID = #{agencyId} + + + AND DATE_FORMAT( a.DATE_ID, '%Y-%m-%d' ) >= DATE_FORMAT( #{startTime}, '%Y-%m-%d' ) + + + AND DATE_FORMAT( a.DATE_ID, '%Y-%m-%d' ) <= DATE_FORMAT( #{endTime}, '%Y-%m-%d' ) + + GROUP BY + a.AGENCY_ID + + + + + + DELETE + FROM + fact_agency_user_house_daily + WHERE + DATE_ID = #{dateId} + AND CUSTOMER_ID = #{customerId} + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml new file mode 100644 index 0000000000..b46b9467eb --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml @@ -0,0 +1,237 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DELETE + FROM + fact_grid_user_house_daily + WHERE + DATE_ID = #{dateId} + AND CUSTOMER_ID = #{customerId} + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactNeighborhoodUserHouseDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactNeighborhoodUserHouseDailyDao.xml new file mode 100644 index 0000000000..4ff079453d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactNeighborhoodUserHouseDailyDao.xml @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DELETE + FROM + fact_neighborhood_user_house_daily + WHERE + DATE_ID = #{dateId} + AND CUSTOMER_ID = #{customerId} + + + + + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml new file mode 100644 index 0000000000..94ed1819ee --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml @@ -0,0 +1,47 @@ + + + + + + + + + + diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceOrgDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceOrgDTO.java new file mode 100644 index 0000000000..42d8fcf19b --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceOrgDTO.java @@ -0,0 +1,115 @@ +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-05-27 + */ +@Data +public class IcServiceOrgDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 所属组织机构Id + */ + private String agencyId; + + /** + * agencyId的所有上级,包含自己 + */ + private String agencyIdPath; + + /** + * 服务类别【字典表 ic_service_type】多个值逗号分隔 + */ + private String serviceType; + + /** + * 服务组织名称 + */ + private String orgName; + + /** + * 组织描述 + */ + private String orgDescribe; + + /** + * 负责人姓名 + */ + private String principalName; + + /** + * 负责人电话 + */ + private String principalMobile; + + /** + * 经度 + */ + private String longitude; + + /** + * 纬度 + */ + private String latitude; + + /** + * 地址 + */ + private String address; + + /** + * 备注 + */ + private String remark; + + /** + * 删除标识 + */ + 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-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceProjectAttachmentDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceProjectAttachmentDTO.java new file mode 100644 index 0000000000..6919112fde --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceProjectAttachmentDTO.java @@ -0,0 +1,116 @@ +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-05-27 + */ +@Data +public class IcServiceProjectAttachmentDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 事件Id + */ + private String icServiceId; + + private String attachTo; + + /** + * 附件名 + */ + private String attachmentName; + private String name; + + /** + * 文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS) + */ + private String attachmentFormat; + private String format; + + /** + * 附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc)) + */ + private String attachmentType; + private String type; + + /** + * 附件地址 + */ + private String attachmentUrl; + private String url; + + /** + * 排序字段 + */ + private Integer sort; + + /** + * 附件状态(审核中:auditing; +auto_passed: 自动通过; +review:结果不确定,需要人工审核; +block: 结果违规; +rejected:人工审核驳回; +approved:人工审核通过) +现在图片是同步审核的,所以图片只有auto_passed一种状态 + */ + private String status; + + /** + * 失败原因 + */ + private String reason; + + /** + * 语音或视频时长,秒 + */ + private Integer duration; + + /** + * 删除标记 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-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceProjectDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceProjectDTO.java new file mode 100644 index 0000000000..3d3a6c733f --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceProjectDTO.java @@ -0,0 +1,104 @@ +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-05-27 + */ +@Data +public class IcServiceProjectDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 组织ID + */ + private String agencyId; + + /** + * 组织ID的上级 + */ + private String pid; + + /** + * 组织ID的所有上级[包括自己] + */ + private String agencyIdPath; + + /** + * 服务类别值 + */ + private String serviceCategoryKey; + + /** + * 服务名称 + */ + private String serviceName; + + /** + * 服务内容 + */ + private String serviceContent; + + /** + * 政策级别,0市级;1区级;2街道级 + */ + private String policyLevel; + + /** + * 政策依据 + */ + private String policyGround; + + /** + * 启用状态,0启用,1禁用 + */ + private Integer enabled; + + /** + * + */ + private Integer 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-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceEditFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceEditFormDTO.java new file mode 100644 index 0000000000..140e8269c1 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceEditFormDTO.java @@ -0,0 +1,49 @@ +package com.epmet.dto.form; + + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.Date; + +/** + * 【服务项目记录】修改 + */ +@Data +public class IcServiceEditFormDTO implements Serializable { + public interface AddUserInternalGroup { + } + + public interface AddUserShowGroup extends CustomerClientShowGroup { + } + + @NotBlank(message = "", groups = AddUserInternalGroup.class) + private String serviceRecordId; + private String principalName; + private String principalContact; + /** + * 服务时间 + */ + @NotNull(message = "起始服务时间不能为空", groups = AddUserShowGroup.class) + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date serviceTimeStart; + + /** + * 服务截止时间 + */ + @NotNull(message = "截止服务时间不能为空", groups = AddUserShowGroup.class) + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date serviceTimeEnd; + + /** + * 备注 + */ + private String remark; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgAddEditFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgAddEditFormDTO.java new file mode 100644 index 0000000000..3b95afef3f --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgAddEditFormDTO.java @@ -0,0 +1,71 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description 服务组织新增/修改 + * @Author sun + */ +@Data +public class IcServiceOrgAddEditFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + public interface Del extends CustomerClientShowGroup { + } + + /** + * 服务组织Id + */ + @NotBlank(message = "服务组织Id不能为空", groups = {UpdateGroup.class, Del.class}) + private String icServiceOrgId; + /** + * 服务类型,多个值逗号分隔,字典值,字典key:ic_service_type + */ + @NotBlank(message = "服务类型不能为空", groups = {AddGroup.class}) + private String serviceType; + /** + * 服务组织名称 + */ + @NotBlank(message = "服务组织名称不能为空", groups = {AddGroup.class}) + private String orgName; + /** + * 组织描述 + */ + private String orgDescribe; + /** + * 负责人姓名 + */ + @NotBlank(message = "负责人姓名不能为空", groups = {AddGroup.class}) + private String principalName; + /** + * 联系方式 + */ + @NotBlank(message = "联系方式不能为空", groups = {AddGroup.class}) + private String principalMobile; + /** + * 经度 + */ + private String longitude; + /** + * 维度 + */ + private String latitude; + /** + * 服务地址 + */ + private String address; + /** + * 备注信息 + */ + private String remark; + + private String customerId; + private String userId; + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgListFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgListFormDTO.java new file mode 100644 index 0000000000..b0cceaeb79 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgListFormDTO.java @@ -0,0 +1,46 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 【组织】服务组织列表--接口入参 + * @Author sun + */ +@Data +public class IcServiceOrgListFormDTO implements Serializable { + private static final long serialVersionUID = 9156247659994638103L; + + /** + * 服务类型,字典值 + */ + private String serviceType; + /** + * 服务组织名称 + */ + private String orgName; + /** + * 服务地址 + */ + private String address; + /** + * 备注信息 + */ + private String remark; + /** + * 页码 + */ + private Integer pageNo = 1; + /** + * 每页显示数量 + */ + private Integer pageSize = 20; + + private Boolean isPage = true; + private String icServiceOrgId; + private String customerId; + private String staffId; + private String agencyId; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFeedbackFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFeedbackFormDTO.java new file mode 100644 index 0000000000..231ab79b95 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFeedbackFormDTO.java @@ -0,0 +1,57 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.Valid; +import javax.validation.constraints.NotBlank; +import java.util.List; + +@Data +public class ServiceProjectFeedbackFormDTO { + + /** + * 反馈接口分组 + */ + public interface FeedbackGroup {} + + /** + * 发起服务接口分组 + */ + public interface InitiateGroup {} + + @NotBlank(message = "服务记录id不能为空", groups = { FeedbackGroup.class }) + private String serviceRecordId; + private String serviceProjectId; + private String serviceGoal; + private String serviceEffect; + private Integer servicePeopleNumber; + /** + * 服务状态。in_service服务中;completed:已完成 + */ + @NotBlank(message = "服务状态不能为空", groups = { FeedbackGroup.class, InitiateGroup.class }) + private String serviceStatus; + /** + * 满意度。不满意:bad、基本满意:good、非常满意:perfect + * 按理说,服务完成的时候才可以选,不完成应该不能选,可是谁知道呢,原型也没写 + */ + private String satisfaction; + private String longitude; + private String latitude; + private String address; + + @Valid + private List attachmentList; + + @Data + public static class Attachment { + + @NotBlank(message = "附件名称不能为空", groups = { FeedbackGroup.class, InitiateGroup.class }) + private String attachmentName; + @NotBlank(message = "附件格式不能为空", groups = { FeedbackGroup.class, InitiateGroup.class }) + private String attachmentFormat; + @NotBlank(message = "附件类型不能为空", groups = { FeedbackGroup.class, InitiateGroup.class }) + private String attachmentType; + @NotBlank(message = "附件url不能为空", groups = { FeedbackGroup.class, InitiateGroup.class }) + private String attachmentUrl; + } +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFormDTO.java new file mode 100644 index 0000000000..524628e95c --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFormDTO.java @@ -0,0 +1,53 @@ +package com.epmet.dto.form; + +import com.epmet.dto.IcServiceProjectAttachmentDTO; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2022/5/27 15:53 + * @DESC + */ +@Data +public class ServiceProjectFormDTO implements Serializable { + + private static final long serialVersionUID = -4573264697450644498L; + + public interface ServiceProjectAddForm{} + public interface ServiceProjectUpdateForm{} + + @NotBlank(message = "服务类别不能为空",groups = {ServiceProjectAddForm.class}) + private String serviceCategoryKey; + + @NotBlank(message = "服务名称不能为空",groups = {ServiceProjectAddForm.class,ServiceProjectUpdateForm.class}) + private String serviceName; + + @NotBlank(message = "服务内容不能为空",groups = {ServiceProjectAddForm.class,ServiceProjectUpdateForm.class}) + private String serviceContent; + + /** + * 政策依据 + */ + private String policyGround; + + /** + * 政策级别,0市级;1区级;2街道级 + */ + private String policyLevel; + + private String customerId; + + private String userId; + + @NotBlank(message = "serviceProjectId不能为空",groups = {ServiceProjectUpdateForm.class}) + private String serviceProjectId; + + /** + * 附件集合 + */ + private List attachmentList; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectListFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectListFormDTO.java new file mode 100644 index 0000000000..ff265a8a44 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectListFormDTO.java @@ -0,0 +1,32 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2022/5/27 16:42 + * @DESC + */ +@Data +public class ServiceProjectListFormDTO extends PageFormDTO implements Serializable { + + private static final long serialVersionUID = -6508966695564469253L; + + public interface ServiceProjectDetail{} + + private String serviceCategoryKey; + private String serviceName; + private String serviceContent; + private String policyGround; + private String customerId; + private String userId; + private String agencyId; + + @NotBlank(message = "serviceProjectId不能为空",groups = ServiceProjectDetail.class) + private String serviceProjectId; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectRecordFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectRecordFormDTO.java new file mode 100644 index 0000000000..59d86bfac5 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectRecordFormDTO.java @@ -0,0 +1,66 @@ +package com.epmet.dto.form; + +import com.epmet.dto.result.IcServiceScopeDTO; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.validation.Valid; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import java.util.Date; +import java.util.List; + +@Data +public class ServiceProjectRecordFormDTO { + + /** + * 发起服务 + */ + public interface Initiate {} + + @NotBlank(message = "服务类别key不能为空", groups = { Initiate.class }) + private String serviceCategoryKey; + + @NotBlank(message = "服务项目Id不能为空", groups = { Initiate.class }) + private String serviceProjectId; + + private String serviceProjectName; + + @NotBlank(message = "服务组织Id不能为空", groups = { Initiate.class }) + private String serviceOrgId; + + private String serviceOrgName; + + @NotEmpty(message = "发布范围不能为空", groups = { Initiate.class }) + private List serviceScope; + + @NotNull(message = "服务起始时间不能为空", groups = { Initiate.class }) + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date serviceTimeStart; + + @NotNull(message = "服务结束时间不能为空", groups = { Initiate.class }) + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date serviceTimeEnd; + private String serviceStatus; + private String satisfaction; + + private String principalName; + + private String principalContact; + + /** + * 备注 + */ + private String remark; + + @Valid + private ServiceProjectFeedbackFormDTO feedback; + + private Integer pageNo = 1; + private Integer pageSize = 20; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceFeedbackResDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceFeedbackResDTO.java new file mode 100644 index 0000000000..394b5b6b40 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceFeedbackResDTO.java @@ -0,0 +1,64 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * 服务记录反馈 + */ +@Data +public class IcServiceFeedbackResDTO implements Serializable { + + /** + * 反馈记录id + */ + private String feedBackId; + + /** + * 服务目标 + */ + private String serviceGoal; + + /** + * 服务效果 + */ + private String serviceEffect; + + /** + * 服务人数 + */ + // private Integer servicePeopleNumber; + + /** + * 满意度。满意度 - 不满意:bad、基本满意:good、非常满意:perfect + */ + private String satisfaction; + + /** + * 地址经度 + */ + private String longitude; + + /** + * 地址纬度 + */ + private String latitude; + + /** + * 地址 + */ + private String address; + + private List attachmentList; + + @Data + public static class Attachment { + private String attachmentName; + private String attachmentFormat; + private String attachmentType; + private String attachmentUrl; + } + +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceOrgListResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceOrgListResultDTO.java new file mode 100644 index 0000000000..30164b69c4 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceOrgListResultDTO.java @@ -0,0 +1,81 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Description 【组织】服务组织列表--接口返参 + * @Author sun + */ +@Data +public class IcServiceOrgListResultDTO implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 服务组织Id + */ + private String icServiceOrgId; + /** + * 组织Id + */ + private String agencyId; + /** + * 服务类别 + */ + private List serviceTypeList; + /** + * 服务类别,多个值逗号分隔 + */ + private String serviceType; + /** + * 服务类别,多个值顿号分隔 + */ + private String serviceTypeName; + /** + * 服务组织名称 + */ + private String orgName; + /** + * 组织描述 + */ + private String orgDescribe; + /** + * 负责人名称 + */ + private String principalName; + /** + * 负责人电话 + */ + private String principalMobile; + /** + * 经度 + */ + private String longitude; + /** + * 纬度 + */ + private String latitude; + /** + * 地址 + */ + private String address; + /** + * 备注 + */ + private String remark; + + @Data + public static class ServiceType { + /** + * 服务类别值 + */ + private String value; + /** + * 服务类别名 + */ + private String name; + } + +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceOrgSelectListResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceOrgSelectListResultDTO.java new file mode 100644 index 0000000000..30f5ef457b --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceOrgSelectListResultDTO.java @@ -0,0 +1,24 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 【组织】服务组织列表_下拉框使用--接口返参 + * @Author sun + */ +@Data +public class IcServiceOrgSelectListResultDTO implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 服务组织Id + */ + private String icServiceOrgId; + /** + * 服务组织名称 + */ + private String orgName; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceRecDetailRes.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceRecDetailRes.java new file mode 100644 index 0000000000..d1ef78ab5f --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceRecDetailRes.java @@ -0,0 +1,90 @@ +package com.epmet.dto.result; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; + +@Data +public class IcServiceRecDetailRes implements Serializable { + + + /** + * 联系方式 + */ + private String principalContact; + + /** + * 经办人姓名 + */ + private String principalName; + + /** + * 备注 + */ + private String remark; + + /** + * 服务类别ID + */ + private String serviceCategoryKey; + + /** + * 服务类别ID + */ + private String serviceCategoryName; + + /** + * 服务组织ID + */ + private String serviceOrgId; + + /** + * 服务组织名称 + */ + private String serviceOrgName; + + /** + * 服务项目ID + */ + private String serviceProjectId; + + /** + * 服务项目名称 + */ + private String serviceProjectName; + + /** + * 服务时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date serviceTimeStart; + + /** + * 服务截止时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date serviceTimeEnd; + + /** + * in_service服务中;completed:已完成 + */ + private String serviceStatus; + + /** + * 发布范围 + */ + private List serviceScope; + + /** + * 服务人数 + */ + private Integer servicePeopleNumber; + + /** + * 反馈详情 + */ + private IcServiceFeedbackResDTO feedBack; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceScopeDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceScopeDTO.java new file mode 100644 index 0000000000..1a2be3dca0 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceScopeDTO.java @@ -0,0 +1,15 @@ +package com.epmet.dto.result; + + +import lombok.Data; + +@Data +public class IcServiceScopeDTO { + private String objectId; + private String objectName; + private String objectType; + /** + * 发布范围的组织ID PATH + */ + private String objectIdPath; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ServiceProjectListResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ServiceProjectListResultDTO.java new file mode 100644 index 0000000000..eadf11a78a --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ServiceProjectListResultDTO.java @@ -0,0 +1,63 @@ +package com.epmet.dto.result; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import com.epmet.dto.IcServiceProjectAttachmentDTO; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2022/5/27 16:42 + * @DESC + */ +@Data +public class ServiceProjectListResultDTO implements Serializable { + + private static final long serialVersionUID = -6508966695564469113L; + + /** + * 服务类别 + */ + private String serviceCategory; + private String serviceCategoryKey; + + /** + * 服务项目ID + */ + private String serviceProjectId; + + /** + * 服务名称 + */ + private String serviceName; + + /** + * 服务内容 + */ + private String serviceContent; + + /** + * 政策依据 + */ + private String policyGround; + + /** + * 政策级别 + */ + private String policyLevel; + private String policyLevelName; + + private List attachmentList; + + public ServiceProjectListResultDTO() { + this.serviceCategory = ""; + this.serviceProjectId = ""; + this.serviceName = ""; + this.serviceContent = ""; + this.policyGround = ""; + this.policyLevel = ""; + this.policyLevelName = ""; + } +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ServiceProjectRecordResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ServiceProjectRecordResultDTO.java new file mode 100644 index 0000000000..940a8ae9f1 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ServiceProjectRecordResultDTO.java @@ -0,0 +1,18 @@ +package com.epmet.dto.result; + +import lombok.Data; + +@Data +public class ServiceProjectRecordResultDTO { + private String serviceRecordId; + private String serviceCategoryKey; + private String serviceCategoryName; + private String serviceProjectId; + private String serviceProjectName; + private String serviceOrgId; + private String serviceOrgName; + private String serviceTimeStart; + private String serviceTimeEnd; + private String serviceStatus; + private String servicePeopleNumber; +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/pom.xml b/epmet-module/epmet-heart/epmet-heart-server/pom.xml index bc2955d8b7..af7bb32c5d 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/pom.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/pom.xml @@ -132,6 +132,14 @@ + + org.apache.maven.plugins + maven-compiler-plugin + + 8 + 8 + + ${project.basedir}/src/main/java diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceOrgController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceOrgController.java new file mode 100644 index 0000000000..2232830346 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceOrgController.java @@ -0,0 +1,91 @@ +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.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.IcServiceOrgDTO; +import com.epmet.dto.form.IcServiceOrgAddEditFormDTO; +import com.epmet.dto.form.IcServiceOrgListFormDTO; +import com.epmet.dto.result.IcServiceOrgListResultDTO; +import com.epmet.dto.result.IcServiceOrgSelectListResultDTO; +import com.epmet.service.IcServiceOrgService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + + +/** + * 服务组织表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +@RestController +@RequestMapping("icServiceOrg") +public class IcServiceOrgController { + + @Autowired + private IcServiceOrgService icServiceOrgService; + + @RequestMapping("list") + public Result> list(@LoginUser TokenDto tokenDto, @RequestBody IcServiceOrgListFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); + return new Result>().ok(icServiceOrgService.list(formDTO)); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + IcServiceOrgDTO data = icServiceOrgService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("add") + public Result save(@LoginUser TokenDto tokenDto, @RequestBody IcServiceOrgAddEditFormDTO dto) { + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + dto.setCustomerId(tokenDto.getCustomerId()); + dto.setUserId(tokenDto.getUserId()); + icServiceOrgService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("edit") + public Result edit(@LoginUser TokenDto tokenDto, @RequestBody IcServiceOrgAddEditFormDTO dto){ + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + dto.setCustomerId(tokenDto.getCustomerId()); + dto.setUserId(tokenDto.getUserId()); + icServiceOrgService.update(dto); + return new Result(); + } + + @PostMapping("del") + public Result delete(@LoginUser TokenDto tokenDto, @RequestBody IcServiceOrgAddEditFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, IcServiceOrgAddEditFormDTO.Del.class); + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + icServiceOrgService.delete(formDTO); + return new Result(); + } + + @RequestMapping("detail") + public Result detail(@RequestBody IcServiceOrgListFormDTO formDTO) { + return new Result().ok(icServiceOrgService.detail(formDTO)); + } + + @RequestMapping("selectlist") + public Result> selectList(@LoginUser TokenDto tokenDto, @RequestBody IcServiceOrgListFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); + return new Result>().ok(icServiceOrgService.selectList(formDTO)); + } + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectAttachmentController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectAttachmentController.java new file mode 100644 index 0000000000..07e07b0d92 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectAttachmentController.java @@ -0,0 +1,72 @@ +package com.epmet.controller; + +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +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.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.IcServiceProjectAttachmentDTO; +import com.epmet.service.IcServiceProjectAttachmentService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 事件附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +@RestController +@RequestMapping("icServiceProjectAttachment") +public class IcServiceProjectAttachmentController { + + @Autowired + private IcServiceProjectAttachmentService icServiceProjectAttachmentService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = icServiceProjectAttachmentService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + IcServiceProjectAttachmentDTO data = icServiceProjectAttachmentService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody IcServiceProjectAttachmentDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + icServiceProjectAttachmentService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody IcServiceProjectAttachmentDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + icServiceProjectAttachmentService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + icServiceProjectAttachmentService.delete(ids); + return new Result(); + } +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java new file mode 100644 index 0000000000..abcf757f89 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java @@ -0,0 +1,244 @@ +package com.epmet.controller; + +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.aop.NoRepeatSubmit; +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.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.IcServiceProjectDTO; +import com.epmet.dto.form.*; +import com.epmet.dto.result.IcServiceRecDetailRes; +import com.epmet.dto.result.ServiceProjectListResultDTO; +import com.epmet.dto.result.ServiceProjectRecordResultDTO; +import com.epmet.entity.IcServiceRecordEntity; +import com.epmet.service.IcServiceProjectService; +import com.epmet.service.IcServiceRecordService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.Map; + + +/** + * 服务项目管理表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +@RestController +@RequestMapping("icServiceProject") +public class IcServiceProjectController { + + @Autowired + private IcServiceProjectService icServiceProjectService; + @Autowired + private IcServiceRecordService icServiceRecordService; + + + @RequestMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = icServiceProjectService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + IcServiceProjectDTO data = icServiceProjectService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody IcServiceProjectDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + icServiceProjectService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody IcServiceProjectDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + icServiceProjectService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + icServiceProjectService.delete(ids); + return new Result(); + } + + /** + * Desc: 服务项目新增 + * @param tokenDto + * @param formDTO + * @author zxc + * @date 2022/5/27 16:04 + */ + @PostMapping("serviceProjectAdd") + public Result serviceProjectAdd(@LoginUser TokenDto tokenDto,@RequestBody ServiceProjectFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, ServiceProjectFormDTO.ServiceProjectAddForm.class); + formDTO.setUserId(tokenDto.getUserId()); + formDTO.setCustomerId(tokenDto.getCustomerId()); + icServiceProjectService.serviceProjectAdd(formDTO); + return new Result(); + } + + /** + * Desc: 服务项目列表 + * @param formDTO + * @author zxc + * @date 2022/5/27 16:46 + */ + @PostMapping("serviceProjectList") + public Result serviceProjectList(@LoginUser TokenDto tokenDto,@RequestBody ServiceProjectListFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + return new Result().ok(icServiceProjectService.serviceProjectList(formDTO)); + } + + /** + * Desc: 服务项目详情 + * @param formDTO + * @author zxc + * @date 2022/5/30 15:46 + */ + @PostMapping("serviceProjectDetail") + public Result serviceProjectDetail(@RequestBody ServiceProjectListFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, ServiceProjectListFormDTO.ServiceProjectDetail.class); + return new Result().ok(icServiceProjectService.serviceProjectDetail(formDTO)); + } + + /** + * Desc: 修改【服务项目】 + * @param formDTO + * @author zxc + * @date 2022/5/30 09:36 + */ + @PostMapping("serviceProjectEdit") + public Result serviceProjectEdit(@RequestBody ServiceProjectFormDTO formDTO,@LoginUser TokenDto tokenDto){ + ValidatorUtils.validateEntity(formDTO, ServiceProjectFormDTO.ServiceProjectUpdateForm.class); + formDTO.setCustomerId(tokenDto.getCustomerId()); + icServiceProjectService.serviceProjectEdit(formDTO); + return new Result(); + } + + /** + * Desc: 上下架【服务项目】 + * @param ids + * @author zxc + * @date 2022/5/30 10:17 + */ + @PostMapping("serviceProjectEnabled") + public Result serviceProjectEnabled(@RequestBody List ids){ + icServiceProjectService.serviceProjectEnabled(ids); + return new Result(); + } + + /** + * http://yapi.elinkservice.cn/project/245/interface/api/7820 + * + * @param serviceId + * @return 【服务项目记录】取消:进行中的项目可以取消。删除该记录 + */ + @PostMapping("service/cancel/{service-id}") + public Result cancelService(@PathVariable("service-id") String serviceId) { + icServiceRecordService.cancelService(serviceId, "yzm"); + return new Result(); + } + + /** + * http://yapi.elinkservice.cn/project/245/interface/api/7821 + * @param serviceId + * @return 【服务项目记录】详情 + */ + @PostMapping("service/detail/{service-id}") + public Result queryServiceDetail(@PathVariable("service-id") String serviceId) { + return new Result().ok(icServiceRecordService.queryServiceDetail(serviceId)); + } + + /** + * 【服务项目记录】修改 + * + * @param formDTO + * @return + */ + @PostMapping("service/update") + public Result updateServiceRecord(@RequestBody IcServiceEditFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, IcServiceEditFormDTO.AddUserShowGroup.class, IcServiceEditFormDTO.AddUserInternalGroup.class); + icServiceRecordService.updateServiceRecord(formDTO); + return new Result(); + } + + /** + * 服务列表 + * @param input + * @return + */ + @PostMapping("/service/recordList") + public Result listServiceRecords(@RequestBody ServiceProjectRecordFormDTO input) { + + PageData page = icServiceRecordService.listServiceRecords( + input.getServiceCategoryKey(), input.getServiceProjectName(), input.getServiceOrgName(), input.getServiceTimeStart(), + input.getServiceTimeEnd(), input.getServiceStatus(), input.getSatisfaction(), input.getPageNo(), input.getPageSize()); + + return new Result().ok(page); + } + + /** + * 发起服务 + * @param input + * @return + */ + @PostMapping("/service/initiate") + public Result initiateService(@RequestBody ServiceProjectRecordFormDTO input) { + + ValidatorUtils.validateEntity(input, ServiceProjectRecordFormDTO.Initiate.class, ServiceProjectFeedbackFormDTO.InitiateGroup.class); + icServiceRecordService.initiateService(input); + + return new Result(); + } + + /** + * 反馈 + * @param input + * @return + */ + @PostMapping("/service/feedback") + public Result serviceFeedback(@RequestBody ServiceProjectFeedbackFormDTO input) { + ValidatorUtils.validateEntity(input, ServiceProjectFeedbackFormDTO.FeedbackGroup.class); + String serviceRecordId = input.getServiceRecordId(); + + // 做状态检查,未反馈的,服务状态为服务中的才可以反馈 + IcServiceRecordEntity serviceRecord = icServiceRecordService.selectById(serviceRecordId); + if (serviceRecord == null) { + String msg = "未找到服务记录"; + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), msg, msg); + } + + if ("completed".equals(serviceRecord.getServiceStatus())) { + String msg = "服务已完成,不能再次反馈"; + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), msg, msg); + } + + icServiceRecordService.serviceFeedback(serviceRecord.getServiceCategoryKey(), + serviceRecord.getServiceOrgId(), + serviceRecord.getServiceProjectId(), + serviceRecord.getId(), + input); + return new Result(); + } +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java index 9c53742254..3405c0c019 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java @@ -44,9 +44,9 @@ import com.epmet.feign.EpmetMessageOpenFeignClient; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.service.*; 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.util.CollectionUtils; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; @@ -83,6 +83,7 @@ public class IcUserDemandRecController implements ResultDataResolver { @Autowired private EpmetUserOpenFeignClient userOpenFeignClient; + /** * 根据服务方类型查询 下拉框 * 服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit; @@ -219,28 +220,33 @@ public class IcUserDemandRecController implements ResultDataResolver { && null != finishResultDTO.getAwardPoint() && finishResultDTO.getAwardPoint() > NumConstant.ZERO && UserDemandConstant.RESOLVED.equals(finishResultDTO.getFinishResult())) { - // 志愿者发放积分 - List actPointEventMsgList = new ArrayList<>(); - BasePointEventMsg actPointEventMsg = new BasePointEventMsg(); - actPointEventMsg.setCustomerId(formDTO.getCustomerId()); - actPointEventMsg.setSourceType(MqConstant.SOURCE_TYPE_DEMAND); - actPointEventMsg.setSourceId(formDTO.getDemandRecId()); - actPointEventMsg.setUserId(finishResultDTO.getServerId()); - actPointEventMsg.setActionFlag(MqConstant.PLUS); - actPointEventMsg.setIsCommon(false); - actPointEventMsg.setRemark(finishResultDTO.getRemark()); - actPointEventMsg.setEventTag(EventEnum.FINISH_USER_DEMAND.getEventTag()); - actPointEventMsg.setEventClass(EventEnum.FINISH_USER_DEMAND.getEventClass()); - actPointEventMsg.setEventName(finishResultDTO.getFirstCategoryName()); - actPointEventMsg.setObjectId(finishResultDTO.getCategoryCode()); - actPointEventMsg.setPoint(finishResultDTO.getAwardPoint()); - actPointEventMsgList.add(actPointEventMsg); - SystemMsgFormDTO sendMsgForm = new SystemMsgFormDTO(); - sendMsgForm.setContent(actPointEventMsgList); - sendMsgForm.setMessageType(SystemMessageType.FINISH_USER_DEMAND); - Result mqResult = epmetMessageOpenFeignClient.sendSystemMsgByMQ(sendMsgForm); - if (!mqResult.success()) { - log.error(String.format("demandRecId:%s,给志愿者发放积分失败", formDTO.getDemandRecId())); + Result> userIdRes = userOpenFeignClient.getUserId(finishResultDTO.getServerId()); + if (userIdRes.success() && CollectionUtils.isNotEmpty(userIdRes.getData())) { + userIdRes.getData().forEach(userId -> { + // 志愿者发放积分 + List actPointEventMsgList = new ArrayList<>(); + BasePointEventMsg actPointEventMsg = new BasePointEventMsg(); + actPointEventMsg.setCustomerId(formDTO.getCustomerId()); + actPointEventMsg.setSourceType(MqConstant.SOURCE_TYPE_DEMAND); + actPointEventMsg.setSourceId(formDTO.getDemandRecId()); + actPointEventMsg.setUserId(userId); + actPointEventMsg.setActionFlag(MqConstant.PLUS); + actPointEventMsg.setIsCommon(false); + actPointEventMsg.setRemark(finishResultDTO.getRemark()); + actPointEventMsg.setEventTag(EventEnum.FINISH_USER_DEMAND.getEventTag()); + actPointEventMsg.setEventClass(EventEnum.FINISH_USER_DEMAND.getEventClass()); + actPointEventMsg.setEventName(finishResultDTO.getFirstCategoryName()); + actPointEventMsg.setObjectId(finishResultDTO.getCategoryCode()); + actPointEventMsg.setPoint(finishResultDTO.getAwardPoint()); + actPointEventMsgList.add(actPointEventMsg); + SystemMsgFormDTO sendMsgForm = new SystemMsgFormDTO(); + sendMsgForm.setContent(actPointEventMsgList); + sendMsgForm.setMessageType(SystemMessageType.FINISH_USER_DEMAND); + Result mqResult = epmetMessageOpenFeignClient.sendSystemMsgByMQ(sendMsgForm); + if (!mqResult.success()) { + log.error(String.format("demandRecId:%s,给志愿者发放积分失败", formDTO.getDemandRecId())); + } + }); } } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java index 5899abc96f..3ba576777b 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java @@ -73,4 +73,6 @@ public interface IcCommunitySelfOrganizationDao extends BaseDao queryCategoryList(CategorySelfOrgFormDTO formDTO); List queryCoordinateList(CategorySelfOrgFormDTO formDTO); + + List selectByIds(@Param("communityOrgIds") List communityOrgIds); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java index fd36187bd8..0c02e737b7 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java @@ -19,7 +19,6 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.commons.tools.dto.result.OptionDataResultDTO; -import com.epmet.dto.form.PartyTypepercentFormDTO; import com.epmet.dto.form.PartyUnitListbriefFormDTO; import com.epmet.dto.result.PartyTypepercentResultDTO; import com.epmet.dto.result.PartyUnitDistributionResultDTO; @@ -32,7 +31,6 @@ import org.apache.ibatis.annotations.Param; import java.math.BigDecimal; import java.util.List; -import java.util.Map; /** * 联建单位 @@ -97,7 +95,7 @@ public interface IcPartyUnitDao extends BaseDao { * @author zxc * @date 2022/5/18 13:48 */ - List getAssistanceUnitList(@Param("agencyId")String agencyId); + List getAssistanceUnitList(@Param("agencyId")String agencyId,@Param("pid")String pid); /** * 联建单位-简要信息列表 @@ -116,4 +114,6 @@ public interface IcPartyUnitDao extends BaseDao { */ List getTypepercent(@Param("agencyId") String agencyId, @Param("customerId") String customerId); + + List selectByIds(@Param("partyUnitIds") List partyUnitIds); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceFeedbackDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceFeedbackDao.java new file mode 100755 index 0000000000..301a261fb1 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceFeedbackDao.java @@ -0,0 +1,33 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.IcServiceFeedbackResDTO; +import com.epmet.entity.IcServiceFeedbackEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-30 + */ +@Mapper +public interface IcServiceFeedbackDao extends BaseDao { + + /** + * 根据服务记录id,查询反馈记录 + * @param serviceRecordId + * @return + */ + IcServiceFeedbackResDTO selectByRecId(@Param("serviceRecordId") String serviceRecordId); + + /** + * 根据服务反馈id,查询附件列表 + * @param feedBackId + * @return + */ + List getAttachmentList(String feedBackId); +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceOrgDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceOrgDao.java new file mode 100644 index 0000000000..5407d8f10b --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceOrgDao.java @@ -0,0 +1,34 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.form.IcServiceOrgListFormDTO; +import com.epmet.dto.result.IcServiceOrgListResultDTO; +import com.epmet.dto.result.IcServiceOrgSelectListResultDTO; +import com.epmet.entity.IcServiceOrgEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 服务组织表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +@Mapper +public interface IcServiceOrgDao extends BaseDao { + + /** + * @Author sun + * @Description 服务组织-列表查询 + **/ + List selectServiceOrgList(IcServiceOrgListFormDTO formDTO); + + /** + * @Author sun + * @Description 服务组织列表_下拉框 + **/ + List selectServiceOrgSelectList(IcServiceOrgListFormDTO formDTO); + + void del(IcServiceOrgEntity entity); +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceProjectAttachmentDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceProjectAttachmentDao.java new file mode 100644 index 0000000000..17eddc6215 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceProjectAttachmentDao.java @@ -0,0 +1,27 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcServiceProjectAttachmentEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 事件附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +@Mapper +public interface IcServiceProjectAttachmentDao extends BaseDao { + + /** + * Desc: 根据服务项目ID删除附件 + * @param id + * @author zxc + * @date 2022/5/30 09:50 + */ + void delAttachmentByServiceProjectId(@Param("id")String id); + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceProjectDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceProjectDao.java new file mode 100644 index 0000000000..528e9a06a5 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceProjectDao.java @@ -0,0 +1,37 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.form.ServiceProjectListFormDTO; +import com.epmet.dto.result.ServiceProjectListResultDTO; +import com.epmet.entity.IcServiceProjectEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 服务项目管理表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +@Mapper +public interface IcServiceProjectDao extends BaseDao { + + /** + * Desc: 查询服务项目列表 + * @param formDTO + * @author zxc + * @date 2022/5/27 17:13 + */ + List getServiceProjectList(ServiceProjectListFormDTO formDTO); + + /** + * Desc: 上下架【服务项目】 + * @param ids + * @author zxc + * @date 2022/5/30 10:17 + */ + void serviceProjectEnabled(@Param("ids") List ids); + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceRecordDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceRecordDao.java new file mode 100644 index 0000000000..5a51a14a76 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceRecordDao.java @@ -0,0 +1,29 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.ServiceProjectRecordResultDTO; +import com.epmet.entity.IcServiceRecordEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.Date; +import java.util.List; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-30 + */ +@Mapper +public interface IcServiceRecordDao extends BaseDao { + + List listServiceRecords( + @Param("serviceCategoryKey") String serviceCategoryKey, + @Param("serviceProjectName") String serviceProjectName, + @Param("serviceOrgName") String serviceOrgName, + @Param("serviceTimeStart") Date serviceTimeStart, + @Param("serviceTimeEnd") Date serviceTimeEnd, + @Param("serviceStatus") String serviceStatus, + @Param("satisfaction") String satisfaction); +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceScopeDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceScopeDao.java new file mode 100644 index 0000000000..c2fc96cfd9 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceScopeDao.java @@ -0,0 +1,23 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.IcServiceScopeDTO; +import com.epmet.entity.IcServiceScopeEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-30 + */ +@Mapper +public interface IcServiceScopeDao extends BaseDao { + + int update(@Param("serviceId") String serviceId, @Param("userId") String userId); + + List selectList(String serviceRecordId); +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java index 01ab0ad96d..f3ac1eb80b 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java @@ -140,4 +140,11 @@ public interface IcUserDemandRecDao extends BaseDao { List getServicePoint(@Param("customerId")String customerId, @Param("serviceType")String serviceType); List queryServiceList(ServiceListFormDTO formDTO); + + /** + * 根据服务方id查询已派单的服务记录数 + * @param serverId + * @return + */ + Integer selectCountByServerId(String serverId); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceFeedbackEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceFeedbackEntity.java new file mode 100755 index 0000000000..df89735b5b --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceFeedbackEntity.java @@ -0,0 +1,83 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; +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-05-30 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_service_feedback") +public class IcServiceFeedbackEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + @TableField(fill = FieldFill.INSERT) + private String customerId; + /** + * 服务类别ID + */ + private String serviceCategoryKey; + + /** + * 服务项目ID + */ + private String serviceProjectId; + + /** + * 服务组织ID + */ + private String serviceOrgId; + + /** + * 服务目标 + */ + private String serviceGoal; + + /** + * 服务效果 + */ + private String serviceEffect; + + /** + * 服务人数 + */ + //private Integer servicePeopleNumber; + + /** + * 满意度。满意度 - 不满意:bad、基本满意:good、非常满意:perfect + */ + private String satisfaction; + + /** + * 地址经度 + */ + private String longitude; + + /** + * 地址纬度 + */ + private String latitude; + + /** + * 地址 + */ + private String address; + + /** + * + */ + private String serviceRecordId; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceOrgEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceOrgEntity.java new file mode 100644 index 0000000000..9b9da6dd7c --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceOrgEntity.java @@ -0,0 +1,81 @@ +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-05-27 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_service_org") +public class IcServiceOrgEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 所属组织机构Id + */ + private String agencyId; + + /** + * agencyId的所有上级,包含自己 + */ + private String agencyIdPath; + + /** + * 服务类别【字典表 ic_service_type】多个值逗号分隔 + */ + private String serviceType; + + /** + * 服务组织名称 + */ + private String orgName; + + /** + * 组织描述 + */ + private String orgDescribe; + + /** + * 负责人姓名 + */ + private String principalName; + + /** + * 负责人电话 + */ + private String principalMobile; + + /** + * 经度 + */ + private String longitude; + + /** + * 纬度 + */ + private String latitude; + + /** + * 地址 + */ + private String address; + + /** + * 备注 + */ + private String remark; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceProjectAttachmentEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceProjectAttachmentEntity.java new file mode 100644 index 0000000000..966b5a6d94 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceProjectAttachmentEntity.java @@ -0,0 +1,88 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; +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-05-27 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_service_project_attachment") +public class IcServiceProjectAttachmentEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + @TableField(fill = FieldFill.INSERT) + private String customerId; + + /** + * 事件Id + */ + private String icServiceId; + + /** + * 隶属于。feedback:反馈;service:服务本身 + */ + private String attachTo; + + /** + * 附件名 + */ + private String attachmentName; + + /** + * 文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS) + */ + private String attachmentFormat; + + /** + * 附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc)) + */ + private String attachmentType; + + /** + * 附件地址 + */ + private String attachmentUrl; + + /** + * 排序字段 + */ + private Integer sort; + + /** + * 附件状态(审核中:auditing; +auto_passed: 自动通过; +review:结果不确定,需要人工审核; +block: 结果违规; +rejected:人工审核驳回; +approved:人工审核通过) +现在图片是同步审核的,所以图片只有auto_passed一种状态 + */ + private String status; + + /** + * 失败原因 + */ + private String reason; + + /** + * 语音或视频时长,秒 + */ + private Integer duration; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceProjectEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceProjectEntity.java new file mode 100644 index 0000000000..b8a09e67cf --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceProjectEntity.java @@ -0,0 +1,74 @@ +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-05-27 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_service_project") +public class IcServiceProjectEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 组织ID + */ + private String agencyId; + + /** + * 组织ID的上级 + */ + private String pid; + + /** + * 组织ID的所有上级[包括自己] + */ + private String agencyIdPath; + + /** + * 服务类别值 + */ + private String serviceCategoryKey; + + /** + * 服务名称 + */ + private String serviceName; + + /** + * 服务内容 + */ + private String serviceContent; + + /** + * 政策级别,0市级;1区级;2街道级 + */ + private String policyLevel; + + /** + * 政策依据 + */ + private String policyGround; + + /** + * 启用状态,0启用,1禁用 + */ + private Integer enabled; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceRecordEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceRecordEntity.java new file mode 100644 index 0000000000..4156c60604 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceRecordEntity.java @@ -0,0 +1,89 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; +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-05-30 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_service_record") +public class IcServiceRecordEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + @TableField(fill = FieldFill.INSERT) + private String customerId; + + /** + * 服务类别ID + */ + private String serviceCategoryKey; + + /** + * 服务项目ID + */ + private String serviceProjectId; + + /** + * 服务项目名称 + */ + private String serviceProjectName; + + /** + * 服务组织ID + */ + private String serviceOrgId; + + /** + * 服务组织名称 + */ + private String serviceOrgName; + + /** + * 经办人姓名 + */ + private String principalName; + + /** + * 联系方式 + */ + private String principalContact; + + /** + * 服务时间 + */ + private Date serviceTimeStart; + + /** + * 服务截止时间 + */ + private Date serviceTimeEnd; + + /** + * in_service服务中;completed:已完成 + */ + private String serviceStatus; + + /** + * 备注 + */ + private String remark; + + /** + * 服务人数 + */ + private Integer servicePeopleNumber; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceScopeEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceScopeEntity.java new file mode 100644 index 0000000000..1826e26df1 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceScopeEntity.java @@ -0,0 +1,75 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import java.util.Date; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-30 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_service_scope") +public class IcServiceScopeEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + @TableField(fill = FieldFill.INSERT) + private String customerId; + + /** + * 服务类别ID + */ + private String serviceCategoryKey; + + /** + * 服务项目ID + */ + private String serviceProjectId; + + /** + * 服务组织ID + */ + private String serviceOrgId; + + /** + * 服务记录的ID + */ + private String serviceRecordId; + + /** + * agency单位;grid网格;neighborhood小区 + */ + private String objectType; + + /** + * 选中的组织的ID + */ + private String objectId; + + /** + * 发布范围的组织ID PATH + */ + private String objectIdPath; + + /** + * + */ + private String objectName; + + /** + * 备注 + */ + private String remark; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcServiceOrgExcel.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcServiceOrgExcel.java new file mode 100644 index 0000000000..79c052a9f8 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcServiceOrgExcel.java @@ -0,0 +1,75 @@ +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 服务组织表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +@Data +public class IcServiceOrgExcel { + + @Excel(name = "ID") + private String id; + + @Excel(name = "客户Id") + private String customerId; + + @Excel(name = "所属组织机构Id") + private String agencyId; + + @Excel(name = "agencyId的所有上级,包含自己") + private String agencyIdPath; + + @Excel(name = "服务类别【字典表 ic_service_type】多个值逗号分隔") + private String serviceType; + + @Excel(name = "服务组织名称") + private String orgName; + + @Excel(name = "组织描述") + private String orgDescribe; + + @Excel(name = "负责人姓名") + private String principalName; + + @Excel(name = "负责人电话") + private String principalMobile; + + @Excel(name = "经度") + private String longitude; + + @Excel(name = "纬度") + private String latitude; + + @Excel(name = "地址") + private String address; + + @Excel(name = "备注") + private String remarks; + + @Excel(name = "删除标识") + private String delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceOrgService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceOrgService.java new file mode 100644 index 0000000000..3115e08d8a --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceOrgService.java @@ -0,0 +1,68 @@ +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.IcServiceOrgDTO; +import com.epmet.dto.form.IcServiceOrgAddEditFormDTO; +import com.epmet.dto.form.IcServiceOrgListFormDTO; +import com.epmet.dto.result.IcServiceOrgListResultDTO; +import com.epmet.dto.result.IcServiceOrgSelectListResultDTO; +import com.epmet.entity.IcServiceOrgEntity; + +import java.util.List; + +/** + * 服务组织表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +public interface IcServiceOrgService extends BaseService { + + /** + * 默认查询 + * + * @param formDTO + * @return java.util.List + * @author generator + * @date 2022-05-27 + */ + PageData list(IcServiceOrgListFormDTO formDTO); + + /** + * 单条查询 + * + * @param id + * @return IcServiceOrgDTO + * @author generator + * @date 2022-05-27 + */ + IcServiceOrgDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-27 + */ + void save(IcServiceOrgAddEditFormDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-27 + */ + void update(IcServiceOrgAddEditFormDTO dto); + + void delete(IcServiceOrgAddEditFormDTO formDTO); + + IcServiceOrgListResultDTO detail(IcServiceOrgListFormDTO formDTO); + + List selectList(IcServiceOrgListFormDTO formDTO); + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectAttachmentService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectAttachmentService.java new file mode 100644 index 0000000000..afc94ec748 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectAttachmentService.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.IcServiceProjectAttachmentDTO; +import com.epmet.entity.IcServiceProjectAttachmentEntity; + +import java.util.List; +import java.util.Map; + +/** + * 事件附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +public interface IcServiceProjectAttachmentService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-05-27 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-05-27 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IcServiceProjectAttachmentDTO + * @author generator + * @date 2022-05-27 + */ + IcServiceProjectAttachmentDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-27 + */ + void save(IcServiceProjectAttachmentDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-27 + */ + void update(IcServiceProjectAttachmentDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-05-27 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectService.java new file mode 100644 index 0000000000..aa02487cab --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectService.java @@ -0,0 +1,122 @@ +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.IcServiceProjectDTO; +import com.epmet.dto.form.ServiceProjectFormDTO; +import com.epmet.dto.form.ServiceProjectListFormDTO; +import com.epmet.dto.result.ServiceProjectListResultDTO; +import com.epmet.entity.IcServiceProjectEntity; + +import java.util.List; +import java.util.Map; + +/** + * 服务项目管理表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +public interface IcServiceProjectService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-05-27 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-05-27 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IcServiceProjectDTO + * @author generator + * @date 2022-05-27 + */ + IcServiceProjectDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-27 + */ + void save(IcServiceProjectDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-27 + */ + void update(IcServiceProjectDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-05-27 + */ + void delete(String[] ids); + + /** + * Desc: 服务项目新增 + * @param formDTO + * @author zxc + * @date 2022/5/27 16:04 + */ + void serviceProjectAdd(ServiceProjectFormDTO formDTO); + + /** + * Desc: 服务项目列表 + * @param formDTO + * @author zxc + * @date 2022/5/27 16:46 + */ + PageData serviceProjectList(ServiceProjectListFormDTO formDTO); + + /** + * Desc: 服务项目详情 + * @param formDTO + * @author zxc + * @date 2022/5/30 15:46 + */ + ServiceProjectListResultDTO serviceProjectDetail(ServiceProjectListFormDTO formDTO); + + /** + * Desc: 修改【服务项目】 + * @param formDTO + * @author zxc + * @date 2022/5/30 09:36 + */ + void serviceProjectEdit(ServiceProjectFormDTO formDTO); + + /** + * Desc: 上下架【服务项目】 + * @param ids + * @author zxc + * @date 2022/5/30 10:17 + */ + void serviceProjectEnabled(List ids); + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceRecordService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceRecordService.java new file mode 100644 index 0000000000..1fe7cb518a --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceRecordService.java @@ -0,0 +1,56 @@ +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.form.IcServiceEditFormDTO; +import com.epmet.dto.form.ServiceProjectFeedbackFormDTO; +import com.epmet.dto.form.ServiceProjectRecordFormDTO; +import com.epmet.dto.result.IcServiceRecDetailRes; +import com.epmet.dto.result.ServiceProjectRecordResultDTO; +import com.epmet.entity.IcServiceRecordEntity; + +import java.util.Date; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-30 + */ +public interface IcServiceRecordService extends BaseService { + + /** + * http://yapi.elinkservice.cn/project/245/interface/api/7820 + * @param serviceId + * 【服务项目记录】取消:进行中的项目可以取消。删除该记录 + */ + void cancelService(String serviceId,String userId); + + /** + * 【服务项目记录】详情 + * @param serviceId + * @return + */ + IcServiceRecDetailRes queryServiceDetail(String serviceId); + + /** + * 【服务项目记录】修改 + * @param formDTO + */ + void updateServiceRecord(IcServiceEditFormDTO formDTO); + + PageData listServiceRecords(String serviceCategoryKey, String serviceProjectName, String serviceOrgName, + Date serviceTimeStart, Date serviceTimeEnd, String serviceStatus, + String satisfaction, Integer pageNo, Integer pageSize); + + /** + * 发起服务 + * @param input + */ + void initiateService(ServiceProjectRecordFormDTO input); + + /** + * 服务反馈 + */ + void serviceFeedback(String serviceCategoryKey, String serviceOrgId, String serviceProjectId, String serviceRecordId, ServiceProjectFeedbackFormDTO feedbackDto); +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceScopeService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceScopeService.java new file mode 100644 index 0000000000..00603de5c3 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceScopeService.java @@ -0,0 +1,14 @@ +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.IcServiceScopeEntity; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-30 + */ +public interface IcServiceScopeService extends BaseService { + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java index eb5f2f89fc..1824e1feb3 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java @@ -260,4 +260,6 @@ public interface IcUserDemandRecService extends BaseService l = new LambdaQueryWrapper<>(); l.eq(IcCommunitySelfOrganizationEntity::getOrganizationName,formDTO.getOrganizationName()) .eq(IcCommunitySelfOrganizationEntity::getCustomerId,customerId) @@ -182,7 +182,6 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl { + /** + * 2022-06-14 需求变动 去掉号码校验 + */ + /*formDTO.getOrganizationPersonnel().forEach(p -> { boolean m = PhoneValidatorUtils.isMobile(p.getPersonPhone()); boolean t = PhoneValidatorUtils.isTel(p.getPersonPhone()); if (!m && !t){ throw new EpmetException(EpmetErrorCode.CHECK_PHONE_ERROR.getCode()); } - }); + });*/ List persons = ConvertUtils.sourceToTarget(formDTO.getOrganizationPersonnel(), IcCommunitySelfOrganizationPersonnelEntity.class); Map> groupPhone = persons.stream().collect(Collectors.groupingBy(IcCommunitySelfOrganizationPersonnelEntity::getPersonPhone)); List phones = new ArrayList<>(); @@ -242,11 +246,11 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl l = new LambdaQueryWrapper<>(); l.eq(IcCommunitySelfOrganizationEntity::getOrganizationName,formDTO.getOrganizationName()) .eq(IcCommunitySelfOrganizationEntity::getCustomerId,tokenDto.getCustomerId()) @@ -262,13 +266,16 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl { + /** + * 2022-06-14 需求变动 去掉号码校验 + */ + /*formDTO.getOrganizationPersonnel().forEach(p -> { boolean mobile = PhoneValidatorUtils.isMobile(p.getPersonPhone()); boolean tel = PhoneValidatorUtils.isTel(p.getPersonPhone()); if (!mobile && !tel){ throw new EpmetException(EpmetErrorCode.CHECK_PHONE_ERROR.getCode()); } - }); + });*/ List persons = ConvertUtils.sourceToTarget(formDTO.getOrganizationPersonnel(), IcCommunitySelfOrganizationPersonnelEntity.class); Map> groupPhone = persons.stream().collect(Collectors.groupingBy(IcCommunitySelfOrganizationPersonnelEntity::getPersonPhone)); List phones = new ArrayList<>(); @@ -362,6 +369,10 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl NumConstant.ZERO) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "存在未完成的服务", "存在未完成的服务,不能删除"); + } baseDao.deleteById(formDTO.getOrgId()); personnelService.deleteByOrgId(formDTO.getOrgId()); } @@ -499,16 +510,18 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl fileList = new ArrayList<>(); CommunitySelfOrgImportExcel excel = null; //1.读取Excel数据 - ExcelImportResult testExcelImportResult = ExcelPoiUtils.importExcelMore(inputStream,0,2,ImportCommunitySelfOrganization.class); + ExcelImportResult testExcelImportResult = ExcelPoiUtils.importExcel1(inputStream,0,2,ImportCommunitySelfOrganization.class); //2.存在错误行数据时存入错误数据集合中 - for (ImportCommunitySelfOrganization entity : testExcelImportResult.getFailList()) { - //打印失败的行 和失败的信息 - log.warn("第{}行,{}", entity.getRowNum(), entity.getErrorMsg()); - excel = new CommunitySelfOrgImportExcel(); - //excel.setAgencyName(entity.getOrganizationName()); - excel.setSocietyName(entity.getOrganizationName()); - excel.setErrorInfo(entity.getErrorMsg()); - fileList.add(excel); + if(CollectionUtils.isNotEmpty(testExcelImportResult.getFailList())){ + for (ImportCommunitySelfOrganization entity : testExcelImportResult.getFailList()) { + //打印失败的行 和失败的信息 + log.warn("第{}行,{}", entity.getRowNum(), entity.getErrorMsg()); + excel = new CommunitySelfOrgImportExcel(); + //excel.setAgencyName(entity.getOrganizationName()); + excel.setSocietyName(entity.getOrganizationName()); + excel.setErrorInfo(entity.getErrorMsg()); + fileList.add(excel); + } } //正确行数据集合 List list = testExcelImportResult.getList(); @@ -529,19 +542,22 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl { if (obj.getOrganizationName().equals(org.getOrganizationName())) { - log.warn(String.format("当前客户下的社会自组织名称已存在,社会自组织名称->%s,行号->%s", obj.getOrganizationName(), obj.getRowNum())); - errMsg.append("客户下社会自组织名称已存在;"); + log.warn(String.format("当前客户下的社区自组织名称已存在,社会自组织名称->%s,行号->%s", obj.getOrganizationName(), obj.getRowNum())); + errMsg.append("客户下社区自组织名称已存在;"); bl.set(true); } }); //手机号不合规 - boolean m = PhoneValidatorUtils.isMobile(obj.getPrincipalPhone()); + /** + * 2022-06-14 需求变动 去掉号码校验 + */ + /*boolean m = PhoneValidatorUtils.isMobile(obj.getPrincipalPhone()); boolean t = PhoneValidatorUtils.isTel(obj.getPrincipalPhone()); if (!m && !t){ errMsg.append("手机号码不合法;"); bl.set(true); log.warn("手机号码不合法,自组织名称{}", obj.getOrganizationName()); - } + }*/ if(bl.get()){ excel = new CommunitySelfOrgImportExcel(); //excel.setAgencyName(obj.getOrganizationName()); @@ -560,19 +576,23 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl persons = new ArrayList<>(); AtomicReference bl = new AtomicReference<>(false); StringBuffer msg = new StringBuffer(""); if (CollectionUtils.isNotEmpty(l.getPersons())){ - l.getPersons().forEach(p -> { + /*l.getPersons().forEach(p -> { boolean m = PhoneValidatorUtils.isMobile(p.getPersonPhone()); boolean t = PhoneValidatorUtils.isTel(p.getPersonPhone()); if (!m && !t){ @@ -582,7 +602,7 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl> groupByPhone = persons.stream().collect(Collectors.groupingBy(IcCommunitySelfOrganizationPersonnelEntity::getPersonPhone)); List phones = new ArrayList<>(); @@ -703,7 +723,7 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl queryListById(List communityOrgIds) { if(CollectionUtils.isNotEmpty(communityOrgIds)){ - return baseDao.selectBatchIds(communityOrgIds); + return baseDao.selectByIds(communityOrgIds); } return Collections.EMPTY_LIST; } @@ -769,9 +789,7 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl queryCoordinateList(CategorySelfOrgFormDTO formDTO) { CustomerStaffInfoCacheResult staffInfo=getStaffInfo(formDTO.getCustomerId(),formDTO.getStaffId()); formDTO.setAgencyId(staffInfo.getAgencyId()); - PageInfo pageInfo= PageHelper.startPage(formDTO.getPageNo(), - formDTO.getPageSize(),formDTO.getIsPage()).doSelectPageInfo(() -> baseDao.queryCoordinateList(formDTO)); - List list=pageInfo.getList(); + List list=baseDao.queryCoordinateList(formDTO); for (CommunitySelfOrganizationListDTO dto : list) { dto.setColor(SelfOrgCategoryEnum.getEnum(dto.getCategoryCode()).getColor()); if (StringUtils.isNotBlank(dto.getCategoryCode())) { @@ -779,7 +797,7 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl(list, pageInfo.getTotal()); + return new PageData<>(list, NumConstant.ONE_NEG); } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java index ce0b172893..c645ffbc55 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java @@ -179,8 +179,8 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl serviceItemList=icServiceItemDictService.queryDictList(entity.getCustomerId()); - Map categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + List serviceItemList = icServiceItemDictService.queryDictList(entity.getCustomerId()); + Map categoryMap = serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); List services = icActivityServiceRelationService.getServiceList(id); List serviceNames = services.stream().map(categoryMap::get).collect(Collectors.toList()); dto.setServiceMatterList(services); @@ -213,7 +213,7 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl serviceItemList=icServiceItemDictService.queryDictList(tokenDto.getCustomerId()); - Map categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + List serviceItemList = icServiceItemDictService.queryDictList(tokenDto.getCustomerId()); + Map categoryMap = serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); //获取联建单位 IcPartyUnitDTO unitDTO = new IcPartyUnitDTO(); unitDTO.setAgencyId(staffInfoCache.getAgencyId()); @@ -341,43 +341,43 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl%s", obj.getRowNum())); iterator.remove(); - } else if(StringUtils.isBlank(obj.getTarget())) { + } else if (StringUtils.isBlank(obj.getTarget())) { IcPartyActivityImportFailedExcel failed = ConvertUtils.sourceToTarget(obj, IcPartyActivityImportFailedExcel.class); failed.setErrorInfo("活动目标为空"); fileList.add(failed); log.warn(String.format("活动目标为空,行号->%s", obj.getRowNum())); - } else if(StringUtils.isBlank(obj.getContent())) { + } else if (StringUtils.isBlank(obj.getContent())) { IcPartyActivityImportFailedExcel failed = ConvertUtils.sourceToTarget(obj, IcPartyActivityImportFailedExcel.class); failed.setErrorInfo("活动内容为空"); fileList.add(failed); log.warn(String.format("活动内容为空,行号->%s", obj.getRowNum())); - } else if(StringUtils.isBlank(obj.getActivityTime())) { + } else if (StringUtils.isBlank(obj.getActivityTime())) { IcPartyActivityImportFailedExcel failed = ConvertUtils.sourceToTarget(obj, IcPartyActivityImportFailedExcel.class); failed.setErrorInfo("活动时间为空"); fileList.add(failed); log.warn(String.format("活动时间为空,行号->%s", obj.getRowNum())); - } else if(StringUtils.isBlank(obj.getAddress())) { + } else if (StringUtils.isBlank(obj.getAddress())) { IcPartyActivityImportFailedExcel failed = ConvertUtils.sourceToTarget(obj, IcPartyActivityImportFailedExcel.class); failed.setErrorInfo("活动地址为空"); fileList.add(failed); log.warn(String.format("活动地址为空,行号->%s", obj.getRowNum())); - } else if(StringUtils.isBlank(obj.getLatitude())) { + } else if (StringUtils.isBlank(obj.getLatitude())) { IcPartyActivityImportFailedExcel failed = ConvertUtils.sourceToTarget(obj, IcPartyActivityImportFailedExcel.class); failed.setErrorInfo("活动地址纬度为空"); fileList.add(failed); log.warn(String.format("活动地址纬度为空,行号->%s", obj.getRowNum())); - } else if(StringUtils.isBlank(obj.getLongitude())) { + } else if (StringUtils.isBlank(obj.getLongitude())) { IcPartyActivityImportFailedExcel failed = ConvertUtils.sourceToTarget(obj, IcPartyActivityImportFailedExcel.class); failed.setErrorInfo("活动地址经度为空"); fileList.add(failed); log.warn(String.format("活动地址经度为空,行号->%s", obj.getRowNum())); - } else if(StringUtils.isBlank(obj.getResult())) { + } else if (StringUtils.isBlank(obj.getResult())) { IcPartyActivityImportFailedExcel failed = ConvertUtils.sourceToTarget(obj, IcPartyActivityImportFailedExcel.class); failed.setErrorInfo("活动结果为空"); fileList.add(failed); @@ -540,7 +540,8 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl getActivityList(TokenDto tokenDto, PartyActivityFormDTO formDTO) { - if (null == formDTO.getStartTime() && null == formDTO.getEndTime()) { + // unitId 不为空(按单位查询)时,不需要限制活动创建时间 + if (null == formDTO.getStartTime() && null == formDTO.getEndTime() && StringUtils.isBlank(formDTO.getUnitId())) { setDate(formDTO); } PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); @@ -554,8 +555,8 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl option = icPartyUnitService.options(unitDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); //获取服务事项字典 - List serviceItemList=icServiceItemDictService.queryDictList(tokenDto.getCustomerId()); - Map categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + List serviceItemList = icServiceItemDictService.queryDictList(tokenDto.getCustomerId()); + Map categoryMap = serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); //数据组装 dtoList.forEach(dto -> { //联建单位ID与单位名匹配 @@ -617,6 +618,7 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl NumConstant.ZERO) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "存在未完成的服务", "存在未完成的服务,不能删除"); + } // 逻辑删除(@TableLogic 注解) baseDao.deleteById(id); } @@ -598,7 +594,7 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl queryListById(List partyUnitIds) { if (CollectionUtils.isNotEmpty(partyUnitIds)) { - return baseDao.selectBatchIds(partyUnitIds); + return baseDao.selectByIds(partyUnitIds); } return Collections.EMPTY_LIST; } @@ -633,7 +629,11 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl implements IcServiceOrgService { + @Autowired + private EpmetAdminOpenFeignClient epmetAdminOpenFeignClient; + + + @Override + public PageData list(IcServiceOrgListFormDTO formDTO) { + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); + if (null == staffInfo) { + throw new EpmetException("获取工作人员信息失败"); + } + //查询当前组织及下级数据 + formDTO.setAgencyId(staffInfo.getAgencyId()); + //列表/导出查询 + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()); + List list = baseDao.selectServiceOrgList(formDTO); + PageInfo pageInfo = new PageInfo<>(list); + + //封装服务类别数据 + if (!CollectionUtils.isEmpty(list)) { + //服务类别字典表数据 + Result> statusRes = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.IC_SERVICE_TYPE.getCode()); + Map statusMap = statusRes.success() && MapUtils.isNotEmpty(statusRes.getData()) ? statusRes.getData() : new HashMap<>(); + List stList = null; + IcServiceOrgListResultDTO.ServiceType st = null; + StringBuffer buffer = null; + for (IcServiceOrgListResultDTO dto : list) { + stList = new ArrayList<>(); + buffer = new StringBuffer(""); + for (String str : dto.getServiceType().split(",")) { + st = new IcServiceOrgListResultDTO.ServiceType(); + st.setValue(str); + st.setName(null != statusMap.get(str) ? statusMap.get(str) : ""); + stList.add(st); + buffer.append(buffer.length() > NumConstant.ZERO ? "、" : "").append(st.getName()); + } + dto.setServiceTypeList(stList); + dto.setServiceTypeName(buffer.toString()); + } + } + + return new PageData<>(list, pageInfo.getTotal()); + } + + 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 IcServiceOrgDTO get(String id) { + IcServiceOrgEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcServiceOrgDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcServiceOrgAddEditFormDTO formDTO) { + //1.获取当前工作人员缓存信息 + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getUserId()); + if (null == staffInfo) { + throw new EpmetException(String.format("查询工作人员%s缓存信息失败...", formDTO.getUserId())); + } + //2.校验同组织下服务组织名称不能重复 + LambdaQueryWrapper tWrapper = new LambdaQueryWrapper<>(); + tWrapper.eq(IcServiceOrgEntity::getAgencyId, staffInfo.getAgencyId()); + tWrapper.eq(IcServiceOrgEntity::getOrgName, formDTO.getOrgName()); + List entityList = baseDao.selectList(tWrapper); + if (!CollectionUtils.isEmpty(entityList)) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "当前组织下已存在相同名称的服务组织"); + } + //3.新增服务组织数据 + IcServiceOrgEntity entity = ConvertUtils.sourceToTarget(formDTO, IcServiceOrgEntity.class); + entity.setAgencyId(staffInfo.getAgencyId()); + entity.setAgencyIdPath(StringUtils.isEmpty(staffInfo.getAgencyPIds()) ? staffInfo.getAgencyId() : staffInfo.getAgencyPIds() + ":" + staffInfo.getAgencyId()); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcServiceOrgAddEditFormDTO formDTO) { + //1.获取当前工作人员缓存信息 + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getUserId()); + if (null == staffInfo) { + throw new EpmetException(String.format("查询工作人员%s缓存信息失败...", formDTO.getUserId())); + } + //2.校验同组织下服务组织名称不能重复 + LambdaQueryWrapper tWrapper = new LambdaQueryWrapper<>(); + tWrapper.eq(IcServiceOrgEntity::getAgencyId, staffInfo.getAgencyId()); + tWrapper.ne(IcServiceOrgEntity::getId, formDTO.getIcServiceOrgId()); + tWrapper.eq(IcServiceOrgEntity::getOrgName, formDTO.getOrgName()); + List entityList = baseDao.selectList(tWrapper); + if (!CollectionUtils.isEmpty(entityList)) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "当前组织下已存在相同名称的服务组织"); + } + //3.更新服务组织数据 + IcServiceOrgEntity entity = ConvertUtils.sourceToTarget(formDTO, IcServiceOrgEntity.class); + entity.setId(formDTO.getIcServiceOrgId()); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(IcServiceOrgAddEditFormDTO formDTO) { + IcServiceOrgEntity entity = new IcServiceOrgEntity(); + entity.setId(formDTO.getIcServiceOrgId()); + entity.setUpdatedBy(formDTO.getUserId()); + baseDao.del(entity); + } + + @Override + public IcServiceOrgListResultDTO detail(IcServiceOrgListFormDTO formDTO) { + IcServiceOrgListResultDTO resultDTO = new IcServiceOrgListResultDTO(); + //1.查询服务组织信息 + List list = baseDao.selectServiceOrgList(formDTO); + + //封装服务类别数据 + if (!CollectionUtils.isEmpty(list)) { + resultDTO = list.get(NumConstant.ZERO); + //服务类别字典表数据 + Result> statusRes = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.IC_SERVICE_TYPE.getCode()); + Map statusMap = statusRes.success() && MapUtils.isNotEmpty(statusRes.getData()) ? statusRes.getData() : new HashMap<>(); + List stList = new ArrayList<>(); + IcServiceOrgListResultDTO.ServiceType st = null; + StringBuffer buffer = new StringBuffer(""); + for (String str : resultDTO.getServiceType().split(",")) { + st = new IcServiceOrgListResultDTO.ServiceType(); + st.setValue(str); + st.setName(null != statusMap.get(str) ? statusMap.get(str) : ""); + stList.add(st); + buffer.append(buffer.length() > NumConstant.ZERO ? "、" : "").append(st.getName()); + } + resultDTO.setServiceTypeList(stList); + resultDTO.setServiceTypeName(buffer.toString()); + } + + return resultDTO; + } + + @Override + public List selectList(IcServiceOrgListFormDTO formDTO) { + //1.获取当前工作人员缓存信息 + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); + if (null == staffInfo) { + throw new EpmetException(String.format("查询工作人员%s缓存信息失败...", formDTO.getStaffId())); + } + //2.按条件查询当前组织及下级服务组织数据 + List resultList = baseDao.selectServiceOrgSelectList(formDTO); + + return resultList; + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceProjectAttachmentServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceProjectAttachmentServiceImpl.java new file mode 100644 index 0000000000..13610ad374 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceProjectAttachmentServiceImpl.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.IcServiceProjectAttachmentDao; +import com.epmet.dto.IcServiceProjectAttachmentDTO; +import com.epmet.entity.IcServiceProjectAttachmentEntity; +import com.epmet.service.IcServiceProjectAttachmentService; +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-05-27 + */ +@Service +public class IcServiceProjectAttachmentServiceImpl extends BaseServiceImpl implements IcServiceProjectAttachmentService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcServiceProjectAttachmentDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcServiceProjectAttachmentDTO.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 IcServiceProjectAttachmentDTO get(String id) { + IcServiceProjectAttachmentEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcServiceProjectAttachmentDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcServiceProjectAttachmentDTO dto) { + IcServiceProjectAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, IcServiceProjectAttachmentEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcServiceProjectAttachmentDTO dto) { + IcServiceProjectAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, IcServiceProjectAttachmentEntity.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-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceProjectServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceProjectServiceImpl.java new file mode 100644 index 0000000000..ecc399cfb3 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceProjectServiceImpl.java @@ -0,0 +1,259 @@ +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.dto.form.DictListFormDTO; +import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; +import com.epmet.commons.tools.dto.result.DictListResultDTO; +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.CustomerStaffRedis; +import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dao.IcServiceProjectAttachmentDao; +import com.epmet.dao.IcServiceProjectDao; +import com.epmet.dto.IcServiceProjectAttachmentDTO; +import com.epmet.dto.IcServiceProjectDTO; +import com.epmet.dto.form.ServiceProjectFormDTO; +import com.epmet.dto.form.ServiceProjectListFormDTO; +import com.epmet.dto.result.ServiceProjectListResultDTO; +import com.epmet.entity.IcServiceProjectAttachmentEntity; +import com.epmet.entity.IcServiceProjectEntity; +import com.epmet.feign.EpmetAdminOpenFeignClient; +import com.epmet.service.IcServiceProjectAttachmentService; +import com.epmet.service.IcServiceProjectService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +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 org.springframework.transaction.annotation.Transactional; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 服务项目管理表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +@Service +public class IcServiceProjectServiceImpl extends BaseServiceImpl implements IcServiceProjectService { + + @Autowired + private IcServiceProjectAttachmentService attachmentService; + @Autowired + private IcServiceProjectAttachmentDao attachmentDao; + @Autowired + private EpmetAdminOpenFeignClient adminOpenFeignClient; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcServiceProjectDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcServiceProjectDTO.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 IcServiceProjectDTO get(String id) { + IcServiceProjectEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcServiceProjectDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcServiceProjectDTO dto) { + IcServiceProjectEntity entity = ConvertUtils.sourceToTarget(dto, IcServiceProjectEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcServiceProjectDTO dto) { + IcServiceProjectEntity entity = ConvertUtils.sourceToTarget(dto, IcServiceProjectEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + /** + * Desc: 服务项目新增 + * @param formDTO + * @author zxc + * @date 2022/5/27 16:04 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void serviceProjectAdd(ServiceProjectFormDTO formDTO) { + IcServiceProjectEntity entity = ConvertUtils.sourceToTarget(formDTO, IcServiceProjectEntity.class); + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getUserId()); + if (null == staffInfo){ + throw new EpmetException("未查询到此工作人员"+formDTO.getUserId()); + } + AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(staffInfo.getAgencyId()); + if (null == agencyInfo){ + throw new EpmetException("未查询到此组织信息"+staffInfo.getStaffId()); + } + entity.setEnabled(NumConstant.ZERO); + entity.setAgencyId(staffInfo.getAgencyId()); + entity.setPid(agencyInfo.getPid()); + entity.setAgencyIdPath((StringUtils.isBlank(agencyInfo.getPids()) || agencyInfo.getPids().equals(NumConstant.ZERO_STR)) ? staffInfo.getAgencyId() : agencyInfo.getPids().concat(":").concat(staffInfo.getAgencyId())); + baseDao.insert(entity); + if (CollectionUtils.isNotEmpty(formDTO.getAttachmentList())){ + disposeAttachment(formDTO.getAttachmentList(), formDTO.getCustomerId(), entity.getId()); + } + } + + /** + * Desc: 服务项目列表 + * @param formDTO + * @author zxc + * @date 2022/5/27 16:46 + */ + @Override + public PageData> serviceProjectList(ServiceProjectListFormDTO formDTO) { + PageData result = new PageData(new ArrayList(),NumConstant.ZERO); + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getUserId()); + if (null == staffInfo){ + throw new EpmetException("未查询到此工作人员"+formDTO.getUserId()); + } + formDTO.setAgencyId(staffInfo.getAgencyId()); + PageInfo pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> baseDao.getServiceProjectList(formDTO)); + if (CollectionUtils.isNotEmpty(pageInfo.getList())){ + DictListFormDTO dictListFormDTO = new DictListFormDTO(); + dictListFormDTO.setDictType("ic_service_type"); + Result> listResult = adminOpenFeignClient.dictList(dictListFormDTO); + if (!listResult.success()){ + throw new EpmetException("获取字典表数据失败,类型为:ic_service_type"); + } + if (CollectionUtils.isNotEmpty(listResult.getData())){ + pageInfo.getList().forEach(p -> listResult.getData().stream().filter(l -> l.getValue().equals(p.getServiceCategoryKey())).forEach(l -> p.setServiceCategory(l.getLabel()))); + } + result.setTotal(Integer.valueOf(String.valueOf(pageInfo.getTotal()))); + result.setList(pageInfo.getList()); + } + return result; + } + + /** + * Desc: 服务项目详情 + * @param formDTO + * @author zxc + * @date 2022/5/30 15:46 + */ + @Override + public ServiceProjectListResultDTO serviceProjectDetail(ServiceProjectListFormDTO formDTO) { + List serviceProjectList = baseDao.getServiceProjectList(formDTO); + if (CollectionUtils.isNotEmpty(serviceProjectList)){ + DictListFormDTO dictListFormDTO = new DictListFormDTO(); + dictListFormDTO.setDictType("ic_service_type"); + Result> listResult = adminOpenFeignClient.dictList(dictListFormDTO); + if (!listResult.success()){ + throw new EpmetException("获取字典表数据失败,类型为:ic_service_type"); + } + if (CollectionUtils.isNotEmpty(listResult.getData())){ + serviceProjectList.forEach(p -> listResult.getData().stream().filter(l -> l.getValue().equals(p.getServiceCategoryKey())).forEach(l -> p.setServiceCategory(l.getLabel()))); + } + return serviceProjectList.get(NumConstant.ZERO); + } + return new ServiceProjectListResultDTO(); + } + + /** + * Desc: 修改【服务项目】 + * @param formDTO + * @author zxc + * @date 2022/5/30 09:36 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void serviceProjectEdit(ServiceProjectFormDTO formDTO) { + LambdaQueryWrapper qw = new LambdaQueryWrapper<>(); + qw.eq(IcServiceProjectEntity::getId,formDTO.getServiceProjectId()); + IcServiceProjectEntity entity = ConvertUtils.sourceToTarget(formDTO, IcServiceProjectEntity.class); + baseDao.update(entity,qw); + if (CollectionUtils.isNotEmpty(formDTO.getAttachmentList())){ + // 先删后增 + attachmentDao.delAttachmentByServiceProjectId(formDTO.getServiceProjectId()); + disposeAttachment(formDTO.getAttachmentList(), formDTO.getCustomerId(), formDTO.getServiceProjectId()); + }else { + attachmentDao.delAttachmentByServiceProjectId(formDTO.getServiceProjectId()); + } + } + + /** + * Desc: 上下架【服务项目】 + * @param ids + * @author zxc + * @date 2022/5/30 10:17 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void serviceProjectEnabled(List ids) { + if (CollectionUtils.isNotEmpty(ids)){ + baseDao.serviceProjectEnabled(ids); + } + } + + /** + * Desc: 附件处理 + * @param attachmentList + * @param customerId + * @param serviceId + * @author zxc + * @date 2022/5/30 10:17 + */ + public void disposeAttachment(List attachmentList,String customerId,String serviceId){ + attachmentList.forEach(a -> { + a.setAttachmentName(a.getName()); + a.setAttachmentFormat(a.getFormat()); + a.setAttachmentType(a.getType()); + a.setAttachmentUrl(a.getUrl()); + }); + List entities = ConvertUtils.sourceToTarget(attachmentList, IcServiceProjectAttachmentEntity.class); + Integer sort = NumConstant.ZERO; + for (IcServiceProjectAttachmentEntity e : entities) { + e.setCustomerId(customerId); + e.setStatus("auto_passed"); + e.setSort(sort); + e.setIcServiceId(serviceId); + e.setAttachTo("service"); + sort++; + } + attachmentService.insertBatch(entities); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceRecordServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceRecordServiceImpl.java new file mode 100644 index 0000000000..214b762cfc --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceRecordServiceImpl.java @@ -0,0 +1,324 @@ +package com.epmet.service.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.enums.DictTypeEnum; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.EpmetException; +import com.epmet.commons.tools.feign.ResultDataResolver; +import com.epmet.commons.tools.page.PageData; +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.GridInfoCache; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dao.*; +import com.epmet.dto.IcNeighborHoodDTO; +import com.epmet.dto.form.IcServiceEditFormDTO; +import com.epmet.dto.form.ServiceProjectFeedbackFormDTO; +import com.epmet.dto.form.ServiceProjectRecordFormDTO; +import com.epmet.dto.result.IcServiceRecDetailRes; +import com.epmet.dto.result.IcServiceScopeDTO; +import com.epmet.dto.result.ServiceProjectRecordResultDTO; +import com.epmet.entity.*; +import com.epmet.feign.EpmetAdminOpenFeignClient; +import com.epmet.feign.GovOrgOpenFeignClient; +import com.epmet.service.IcServiceRecordService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.collections4.MapUtils; +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.Date; +import java.util.List; +import java.util.Map; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-30 + */ +@Service +public class IcServiceRecordServiceImpl extends BaseServiceImpl implements IcServiceRecordService, ResultDataResolver { + @Autowired + private IcServiceScopeDao icServiceScopeDao; + @Autowired + private EpmetAdminOpenFeignClient adminOpenFeignClient; + @Autowired + private IcServiceProjectDao serviceProjectDao; + @Autowired + private IcServiceOrgDao serviceOrgDao; + @Autowired + private GovOrgOpenFeignClient govOrgOpenFeignClient; + @Autowired + private IcServiceFeedbackDao serviceFeedbackDao; + @Autowired + private IcServiceProjectAttachmentDao serviceProjectAttachmentDao; + @Autowired + private IcServiceRecordDao serviceRecordDao; + + /** + * http://yapi.elinkservice.cn/project/245/interface/api/7820 + * + * @param serviceId 【服务项目记录】取消:进行中的项目可以取消。删除该记录 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void cancelService(String serviceId,String userId) { + IcServiceRecordEntity icServiceRecordEntity = baseDao.selectById(serviceId); + if (null == icServiceRecordEntity) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),String.format("服务记录不存在,serviceId:%s",serviceId),"服务记录不存在"); + } + if (!"in_service".equals(icServiceRecordEntity.getServiceStatus())) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), String.format("服务状态:%s", icServiceRecordEntity.getServiceStatus()), "只有服务中的项目可以取消"); + } + baseDao.deleteById(serviceId); + icServiceScopeDao.update(serviceId,userId); + } + + /** + * 【服务项目记录】详情 + * + * @param serviceId + * @return + */ + @Override + public IcServiceRecDetailRes queryServiceDetail(String serviceId) { + IcServiceRecordEntity icServiceRecordEntity = baseDao.selectById(serviceId); + IcServiceRecDetailRes res = ConvertUtils.sourceToTarget(icServiceRecordEntity, IcServiceRecDetailRes.class); + if (null != res) { + res.setServiceScope(icServiceScopeDao.selectList(serviceId)); + //服务分类名称 + Result> icServiceTypeMapRes = adminOpenFeignClient.dictMap(DictTypeEnum.IC_SERVICE_TYPE.getCode()); + if (!icServiceTypeMapRes.success() || MapUtils.isEmpty(icServiceTypeMapRes.getData())) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "服务分类字典查询异常"); + } + res.setServiceCategoryName(icServiceTypeMapRes.getData().get(res.getServiceCategoryKey())); + res.setFeedBack(serviceFeedbackDao.selectByRecId(icServiceRecordEntity.getId())); + } + return res; + } + + /** + * 【服务项目记录】修改 + * + * @param formDTO + */ + @Transactional(rollbackFor = Exception.class) + @Override + public void updateServiceRecord(IcServiceEditFormDTO formDTO) { + IcServiceRecordEntity icServiceRecordEntity = baseDao.selectById(formDTO.getServiceRecordId()); + if (null == icServiceRecordEntity) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),String.format("服务记录不存在,serviceRecordId:%s",formDTO.getServiceRecordId()),"服务记录不存在"); + } + icServiceRecordEntity.setServiceTimeStart(formDTO.getServiceTimeStart()); + icServiceRecordEntity.setServiceTimeEnd(formDTO.getServiceTimeEnd()); + if(StringUtils.isNotBlank(formDTO.getPrincipalContact())){ + icServiceRecordEntity.setPrincipalContact(formDTO.getPrincipalContact()); + } + if(StringUtils.isNotBlank(formDTO.getPrincipalName())){ + icServiceRecordEntity.setPrincipalName(formDTO.getPrincipalName()); + } + if(StringUtils.isNotBlank(formDTO.getRemark())){ + icServiceRecordEntity.setRemark(formDTO.getRemark()); + } + baseDao.updateById(icServiceRecordEntity); + } + + + @Override + public PageData listServiceRecords(String serviceCategoryKey, String serviceProjectName, + String serviceOrgName, Date serviceTimeStart, + Date serviceTimeEnd, String serviceStatus, + String satisfaction, Integer pageNo, + Integer pageSize) { + + String msg = "【服务列表】查询服务类别失败"; + Map categories = getResultDataOrThrowsException(adminOpenFeignClient.dictMap(DictTypeEnum.IC_SERVICE_TYPE.getCode()), + ServiceConstant.EPMET_ADMIN_SERVER, + EpmetErrorCode.SERVER_ERROR.getCode(), msg, msg); + + if (categories == null || categories.size() == 0) { + throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), msg, msg); + } + + PageHelper.startPage(pageNo, pageSize); + List records = baseDao.listServiceRecords(serviceCategoryKey, serviceProjectName, serviceOrgName, serviceTimeStart, serviceTimeEnd, serviceStatus, satisfaction); + PageInfo pi = new PageInfo<>(records); + + // 补充信息 + records.forEach(r->{ + String categoryKey = r.getServiceCategoryKey(); + r.setServiceCategoryName(categories.get(categoryKey)); + }); + + return new PageData<>(records, pi.getTotal()); + } + + @Transactional(rollbackFor = Throwable.class) + public void initiateService(ServiceProjectRecordFormDTO input) { + + // 同一个项目暂时不做服务次数限制 + //LambdaQueryWrapper query = new LambdaQueryWrapper<>(); + //query.eq(IcServiceRecordEntity::getServiceProjectId, input.getServiceProjectId()); + // + //if (serviceRecordDao.selectCount(query) > 0) { + // String msg = "该项目已经发起服务,不能重复发起"; + // throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), msg, msg); + //} + + IcServiceProjectEntity serviceProject = serviceProjectDao.selectById(input.getServiceProjectId()); + IcServiceOrgEntity serviceOrg = serviceOrgDao.selectById(input.getServiceOrgId()); + + ServiceProjectFeedbackFormDTO feedbackDto = input.getFeedback(); + + // 1.服务记录 + IcServiceRecordEntity serviceRecord = new IcServiceRecordEntity(); + serviceRecord.setServiceCategoryKey(input.getServiceCategoryKey()); + serviceRecord.setServiceProjectId(input.getServiceProjectId()); + serviceRecord.setServiceProjectName(serviceProject.getServiceName()); + serviceRecord.setServiceOrgId(input.getServiceOrgId()); + serviceRecord.setServiceOrgName(serviceOrg.getOrgName()); + serviceRecord.setPrincipalName(input.getPrincipalName()); + serviceRecord.setPrincipalContact(input.getPrincipalContact()); + serviceRecord.setServiceTimeStart(input.getServiceTimeStart()); + serviceRecord.setServiceTimeEnd(input.getServiceTimeEnd()); + if (feedbackDto == null) { + // 没写反馈,给一个服务中 + serviceRecord.setServiceStatus("in_service"); + } else { + // 写了反馈,按照反馈的来 + serviceRecord.setServiceStatus(feedbackDto.getServiceStatus()); + serviceRecord.setServicePeopleNumber(feedbackDto.getServicePeopleNumber()); + } + serviceRecord.setRemark(input.getRemark()); + + baseDao.insert(serviceRecord); + + // 2.服务范围列表 + List serviceScope = input.getServiceScope(); + + serviceScope.stream().forEach(s -> { + String[] scopeObjectIdPathAndName = getScopeObjectIdPath(s.getObjectType(), s.getObjectId()); + IcServiceScopeEntity scope = new IcServiceScopeEntity(); + scope.setServiceCategoryKey(input.getServiceCategoryKey()); + scope.setServiceProjectId(input.getServiceProjectId()); + scope.setServiceOrgId(input.getServiceOrgId()); + scope.setServiceRecordId(serviceRecord.getId()); + scope.setObjectType(s.getObjectType()); + scope.setObjectId(s.getObjectId()); + scope.setObjectIdPath(scopeObjectIdPathAndName[0]); + scope.setObjectName(scopeObjectIdPathAndName[1]); + icServiceScopeDao.insert(scope); + //scope.setRemark(); 为什么会有这个字段?? + }); + + // 3.反馈 + if (feedbackDto == null) { + return; + } + + serviceFeedback(input.getServiceCategoryKey(), input.getServiceOrgId(), input.getServiceProjectId(), serviceRecord.getId(), feedbackDto); + } + + /** + * 查询服务范围的对象的Id path + * @param scopeObjectType + * @param scopeObjectId + * @return + */ + private String[] getScopeObjectIdPath(String scopeObjectType, String scopeObjectId) { + if ("neighborhood".equals(scopeObjectType)) { + + String msg = String.format("【服务项目】-发起服务-根据范围id查询小区信息失败。scopeObjectType:%s, scopeObjectId:%s", + scopeObjectType, scopeObjectId); + + IcNeighborHoodDTO neighborHoodDTO = getResultDataOrThrowsException(govOrgOpenFeignClient.getIcNeighbordhoodById(scopeObjectId), + ServiceConstant.GOV_ORG_SERVER, + EpmetErrorCode.SERVER_ERROR.getCode(), + msg, msg); + + GridInfoCache gridOfNeighborhood = CustomerOrgRedis.getGridInfo(neighborHoodDTO.getGridId()); + + String agencyPids = neighborHoodDTO.getAgencyPids(); + String agencyId = neighborHoodDTO.getAgencyId(); + String gridId = gridOfNeighborhood.getId(); + + return new String[]{ agencyPids.concat(":") + .concat(agencyId).concat(":") + .concat(gridId).concat(":") + .concat(neighborHoodDTO.getId()), + neighborHoodDTO.getNeighborHoodName() }; + } else if ("agency".equals(scopeObjectType)) { + // 组织的pids是到父级组织 + AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(scopeObjectId); + if ("0".equals(agencyInfo.getPid())) { + return new String[]{ agencyInfo.getId(), agencyInfo.getOrganizationName() }; + } + return new String[]{ agencyInfo.getPids().concat(":").concat(agencyInfo.getPid()), agencyInfo.getOrganizationName() }; + } else if ("grid".equals(scopeObjectType)) { + GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(scopeObjectId); + // 网格的pids是到社区的 + return new String[]{ gridInfo.getPids().concat(":").concat(gridInfo.getId()), gridInfo.getGridName() }; + } else { + String msg = String.format("【服务项目】-发起服务-范围type未知:scopeObjectType:%s,scopeObjectId:%s", scopeObjectType, scopeObjectId); + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), msg, msg); + } + } + + @Transactional(rollbackFor = Throwable.class) + @Override + public void serviceFeedback(String serviceCategoryKey, String serviceOrgId, String serviceProjectId, String serviceRecordId, ServiceProjectFeedbackFormDTO feedbackDto) { + + // 如果还在服务中,那么需要改为已结束 + IcServiceRecordEntity serviceRecord = serviceRecordDao.selectById(serviceRecordId); + if ("in_service".equals(serviceRecord.getServiceStatus())) { + serviceRecord.setServiceStatus("completed"); + serviceRecord.setServicePeopleNumber(feedbackDto.getServicePeopleNumber()); + serviceRecordDao.updateById(serviceRecord); + } + + // 反馈信息 + IcServiceFeedbackEntity feedbackEntity = new IcServiceFeedbackEntity(); + feedbackEntity.setServiceCategoryKey(serviceCategoryKey); + feedbackEntity.setServiceProjectId(serviceProjectId); + feedbackEntity.setServiceOrgId(serviceOrgId); + feedbackEntity.setServiceGoal(feedbackDto.getServiceGoal()); + feedbackEntity.setServiceEffect(feedbackDto.getServiceEffect()); + //feedbackEntity.setServicePeopleNumber(feedbackDto.getServicePeopleNumber()); + feedbackEntity.setSatisfaction(feedbackDto.getSatisfaction()); + feedbackEntity.setLongitude(feedbackDto.getLongitude()); + feedbackEntity.setLatitude(feedbackDto.getLatitude()); + feedbackEntity.setAddress(feedbackDto.getAddress()); + feedbackEntity.setServiceRecordId(serviceRecordId); + serviceFeedbackDao.insert(feedbackEntity); + + // 反馈附件列表 + List attachmentList = feedbackDto.getAttachmentList(); + if (CollectionUtils.isNotEmpty(attachmentList)) { + for (int i = 0; i < attachmentList.size(); i++) { + ServiceProjectFeedbackFormDTO.Attachment a = attachmentList.get(i); + + IcServiceProjectAttachmentEntity at = new IcServiceProjectAttachmentEntity(); + at.setAttachmentFormat(a.getAttachmentFormat()); + at.setAttachmentName(a.getAttachmentName()); + at.setAttachmentType(a.getAttachmentType()); + at.setAttachmentUrl(a.getAttachmentUrl()); + // feedback:反馈,service:服务本身 + at.setAttachTo("feedback"); + at.setDuration(0); + at.setIcServiceId(feedbackEntity.getId()); + // 根本不需要审核,逗你玩 + at.setReason(null); + at.setStatus("auto_passed"); + at.setSort(i); + serviceProjectAttachmentDao.insert(at); + } + } + } +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceScopeServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceScopeServiceImpl.java new file mode 100644 index 0000000000..8324f297d3 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceScopeServiceImpl.java @@ -0,0 +1,19 @@ +package com.epmet.service.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.dao.IcServiceScopeDao; +import com.epmet.entity.IcServiceScopeEntity; +import com.epmet.service.IcServiceScopeService; +import org.springframework.stereotype.Service; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-30 + */ +@Service +public class IcServiceScopeServiceImpl extends BaseServiceImpl implements IcServiceScopeService { + + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java index b552251007..2d04bec434 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java @@ -1810,6 +1810,11 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl query=new LambdaQueryWrapper<>(); - query.eq(VolunteerInfoEntity::getCustomerId,customerId); - query.likeRight(VolunteerInfoEntity::getPids,pids); - query.select(VolunteerInfoEntity::getUserId); - query.orderByAsc(VolunteerInfoEntity::getCreatedTime); - Set userIds = baseDao.selectObjs(query).stream().map(o->o.toString()).collect(Collectors.toSet()); List resultList = new ArrayList<>(); - if (CollectionUtils.isEmpty(userIds)) { - return resultList; - } - Result> userInfoRes = epmetUserOpenFeignClient.queryUserBaseInfo(new ArrayList<>(userIds)); - if (userInfoRes.success() && CollectionUtils.isNotEmpty(userInfoRes.getData())) { - Map userMap = userInfoRes.getData().stream().collect(Collectors.toMap(UserBaseInfoResultDTO::getUserId, Function.identity())); - for (String userId : userIds) { - if (userMap.containsKey(userId)) { - if (StringUtils.isNoneBlank(userRealName)) { - if (userMap.get(userId).getRealName().contains(userRealName)) { - OptionDTO optionDTO = new OptionDTO(); - optionDTO.setLabel(userMap.get(userId).getRealName().concat("(").concat(userMap.get(userId).getMobile().concat(")"))); - optionDTO.setValue(userId); - resultList.add(optionDTO); - } - } else { - OptionDTO optionDTO = new OptionDTO(); - optionDTO.setLabel(userMap.get(userId).getRealName().concat("(").concat(userMap.get(userId).getMobile().concat(")"))); - optionDTO.setValue(userId); - resultList.add(optionDTO); - } - } - } + IcResiUserDTO icUser = new IcResiUserDTO(); + icUser.setCustomerId(customerId); + icUser.setAgencyId(staffInfo.getAgencyId()); + Result> volunteerRes = epmetUserOpenFeignClient.getVolunteerList(icUser); + if (volunteerRes.success() && CollectionUtils.isNotEmpty(volunteerRes.getData())) { + resultList = ConvertUtils.sourceToTarget(volunteerRes.getData(), OptionDTO.class); + resultList = resultList.stream().sorted((o1, o2) -> + Collator.getInstance(Locale.SIMPLIFIED_CHINESE).compare(o1.getLabel(),o2.getLabel())) + .collect(Collectors.toList()); } return resultList; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java index ee3924bdb5..7c4f924e20 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java @@ -162,9 +162,9 @@ public class WorkActServiceImpl implements WorkActService { //校验参数 //校验 活动报名截止时间应该大于当前时间 - if (actInfoEntity.getSignUpEndTime().before(DateUtils.minStrToSecondDate(DateUtils.format(new Date(), DateUtils.DATE_TIME_PATTERN_END_WITH_MINUTE)))){ - throw new RenException(EpmetErrorCode.ACT_SIGN_UP_END_TIME_EARLIER_NOW_EERROR.getCode(),EpmetErrorCode.ACT_SIGN_UP_END_TIME_EARLIER_NOW_EERROR.getMsg()); - } + // if (actInfoEntity.getSignUpEndTime().before(DateUtils.minStrToSecondDate(DateUtils.format(new Date(), DateUtils.DATE_TIME_PATTERN_END_WITH_MINUTE)))){ + // throw new RenException(EpmetErrorCode.ACT_SIGN_UP_END_TIME_EARLIER_NOW_EERROR.getCode(),EpmetErrorCode.ACT_SIGN_UP_END_TIME_EARLIER_NOW_EERROR.getMsg()); + // } this.checkPublishFormDTO(actInfoEntity); PublishActResultDTO publishActResultDTO=new PublishActResultDTO(); //内容审核(活动标题、招募要求、活动内容图文) @@ -202,10 +202,10 @@ public class WorkActServiceImpl implements WorkActService { ActInfoEntity actInfoEntity=this.constructActInfo(formDTO); //校验参数 - //校验 活动报名截止时间应该大于当前时间 - if (actInfoEntity.getSignUpEndTime().before(DateUtils.minStrToSecondDate(DateUtils.format(new Date(), DateUtils.DATE_TIME_PATTERN_END_WITH_MINUTE)))){ - throw new RenException(EpmetErrorCode.ACT_SIGN_UP_END_TIME_EARLIER_NOW_EERROR.getCode(),EpmetErrorCode.ACT_SIGN_UP_END_TIME_EARLIER_NOW_EERROR.getMsg()); - } + // //校验 活动报名截止时间应该大于当前时间 + // if (actInfoEntity.getSignUpEndTime().before(DateUtils.minStrToSecondDate(DateUtils.format(new Date(), DateUtils.DATE_TIME_PATTERN_END_WITH_MINUTE)))){ + // throw new RenException(EpmetErrorCode.ACT_SIGN_UP_END_TIME_EARLIER_NOW_EERROR.getCode(),EpmetErrorCode.ACT_SIGN_UP_END_TIME_EARLIER_NOW_EERROR.getMsg()); + // } this.checkPublishFormDTO(actInfoEntity); PublishActResultDTO publishActResultDTO=new PublishActResultDTO(); //内容审核(活动标题、招募要求、活动内容图文) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.17__ic_service_project.sql b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.17__ic_service_project.sql new file mode 100644 index 0000000000..8882e7c143 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.17__ic_service_project.sql @@ -0,0 +1,137 @@ + +CREATE TABLE `ic_service_project` ( + `ID` varchar(64) NOT NULL COMMENT 'ID', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', + `AGENCY_ID` varchar(64) NOT NULL COMMENT '组织ID', + `PID` varchar(64) NOT NULL COMMENT '组织ID的上级', + `AGENCY_ID_PATH` varchar(255) NOT NULL COMMENT '组织ID的所有上级[包括自己]', + `SERVICE_CATEGORY_KEY` varchar(10) NOT NULL COMMENT '服务类别值', + `SERVICE_NAME` varchar(2000) NOT NULL COMMENT '服务名称', + `SERVICE_CONTENT` varchar(2000) NOT NULL COMMENT '服务内容', + `POLICY_LEVEL` varchar(1) DEFAULT '' COMMENT '政策级别,0市级;1区级;2街道级', + `POLICY_GROUND` varchar(2000) DEFAULT NULL COMMENT '政策依据', + `ENABLED` int(1) NOT NULL COMMENT '启用状态,0启用,1禁用', + `DEL_FLAG` int(1) NOT NULL, + `REVISION` int(1) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务项目管理表'; + + +CREATE TABLE `ic_service_project_attachment` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', + `IC_SERVICE_ID` varchar(64) NOT NULL COMMENT '服务记录id,服务项目id', + `ATTACH_TO` varchar(32) DEFAULT NULL COMMENT '隶属于。feedback:反馈;service:服务本身', + `ATTACHMENT_NAME` varchar(64) DEFAULT NULL COMMENT '附件名', + `ATTACHMENT_FORMAT` varchar(64) DEFAULT NULL COMMENT '文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS)', + `ATTACHMENT_TYPE` varchar(64) NOT NULL COMMENT '附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc))', + `ATTACHMENT_URL` varchar(255) NOT NULL COMMENT '附件地址', + `SORT` int(1) NOT NULL COMMENT '排序字段', + `STATUS` varchar(32) NOT NULL DEFAULT 'auto_passed' COMMENT '附件状态(审核中:auditing; \r\nauto_passed: 自动通过;\r\nreview:结果不确定,需要人工审核;\r\nblock: 结果违规;\r\nrejected:人工审核驳回;\r\napproved:人工审核通过)\r\n现在图片是同步审核的,所以图片只有auto_passed一种状态', + `REASON` varchar(255) DEFAULT NULL COMMENT '失败原因', + `DURATION` int(11) DEFAULT NULL COMMENT '语音或视频时长,秒', + `DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标记 0:未删除,1:已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='事件附件表'; + +CREATE TABLE `ic_service_org` ( + `ID` varchar(64) NOT NULL COMMENT 'ID', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `AGENCY_ID` varchar(64) NOT NULL COMMENT '所属组织机构Id', + `AGENCY_ID_PATH` varchar(256) NOT NULL COMMENT 'agencyId的所有上级,包含自己', + `SERVICE_TYPE` varchar(64) NOT NULL COMMENT '服务类别【字典表 ic_service_type】多个值逗号分隔', + `ORG_NAME` varchar(64) NOT NULL COMMENT '服务组织名称', + `ORG_DESCRIBE` varchar(512) DEFAULT NULL COMMENT '组织描述', + `PRINCIPAL_NAME` varchar(64) NOT NULL COMMENT '负责人姓名', + `PRINCIPAL_MOBILE` varchar(11) NOT NULL COMMENT '负责人电话', + `LONGITUDE` varchar(64) DEFAULT NULL COMMENT '经度', + `LATITUDE` varchar(64) DEFAULT NULL COMMENT '纬度', + `ADDRESS` varchar(256) DEFAULT NULL COMMENT '地址', + `REMARK` varchar(512) DEFAULT NULL COMMENT '备注', + `DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标识', + `REVISION` int(10) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE, + KEY `idx_pid` (`AGENCY_ID`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='服务组织表'; + + +CREATE TABLE `ic_service_record` ( + `ID` varchar(64) NOT NULL, + `CUSTOMER_ID` varchar(64) NOT NULL, + `SERVICE_PROJECT_ID` varchar(64) NOT NULL COMMENT '服务项目ID', + `SERVICE_PROJECT_NAME` varchar(255) NOT NULL COMMENT '服务项目名称', + `SERVICE_ORG_ID` varchar(64) NOT NULL COMMENT '服务组织ID', + `SERVICE_ORG_NAME` varchar(255) NOT NULL COMMENT '服务组织名称', + `PRINCIPAL_NAME` varchar(32) DEFAULT NULL COMMENT '经办人姓名', + `PRINCIPAL_CONTACT` varchar(64) DEFAULT NULL COMMENT '联系方式', + `SERVICE_TIME_START` datetime NOT NULL COMMENT '服务时间', + `SERVICE_TIME_END` datetime NOT NULL COMMENT '服务截止时间', + `SERVICE_STATUS` varchar(32) NOT NULL COMMENT 'in_service服务中;completed:已完成', + `REMARK` varchar(255) DEFAULT NULL COMMENT '备注', + `REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + `DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识', + `SERVICE_CATEGORY_KEY` varchar(64) NOT NULL COMMENT '服务类别ID', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 comment '服务项目记录表'; + +CREATE TABLE `ic_service_feedback` ( + `ID` varchar(64) NOT NULL, + `CUSTOMER_ID` varchar(64) NOT NULL, + `SERVICE_PROJECT_ID` varchar(64) NOT NULL COMMENT '服务项目ID', + `SERVICE_ORG_ID` varchar(64) NOT NULL COMMENT '服务组织ID', + `SERVICE_GOAL` varchar(255) DEFAULT NULL COMMENT '服务目标', + `SERVICE_EFFECT` varchar(255) DEFAULT NULL COMMENT '服务效果', + `SERVICE_PEOPLE_NUMBER` int(10) DEFAULT NULL COMMENT '服务人数', + `SATISFACTION` varchar(30) DEFAULT NULL COMMENT '满意度。满意度 - 不满意:bad、基本满意:good、非常满意:perfect', + `LONGITUDE` varchar(255) DEFAULT NULL COMMENT '地址经度', + `LATITUDE` varchar(255) DEFAULT NULL COMMENT '地址纬度', + `address` varchar(64) DEFAULT NULL COMMENT '地址', + `REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + `DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识', + `SERVICE_RECORD_ID` varchar(64) NOT NULL, + `SERVICE_CATEGORY_KEY` varchar(64) NOT NULL COMMENT '服务类别ID', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 comment '服务项目反馈信息'; + + +CREATE TABLE `ic_service_scope` ( + `ID` varchar(64) NOT NULL, + `CUSTOMER_ID` varchar(64) NOT NULL, + `SERVICE_PROJECT_ID` varchar(64) NOT NULL COMMENT '服务项目ID', + `SERVICE_ORG_ID` varchar(64) NOT NULL COMMENT '服务组织ID', + `SERVICE_RECORD_ID` varchar(64) NOT NULL COMMENT '服务记录的ID', + `OBJECT_TYPE` varchar(32) NOT NULL COMMENT 'agency单位;grid网格;neighborhood小区', + `OBJECT_ID` varchar(64) NOT NULL COMMENT '选中的组织的ID', + `OBJECT_ID_PATH` varchar(255) NOT NULL COMMENT '发布范围的组织ID PATH', + `OBJECT_NAME` varchar(32) DEFAULT NULL, + `REMARK` varchar(255) DEFAULT NULL COMMENT '备注', + `REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + `DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识', + `SERVICE_CATEGORY_KEY` varchar(64) NOT NULL COMMENT '服务类别ID', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 comment '服务范围表' \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.18__alter_service_org.sql b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.18__alter_service_org.sql new file mode 100644 index 0000000000..32cb514da9 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.18__alter_service_org.sql @@ -0,0 +1,6 @@ +ALTER TABLE `ic_service_org` +MODIFY COLUMN `ORG_NAME` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '服务组织名称' AFTER `SERVICE_TYPE`, +MODIFY COLUMN `ORG_DESCRIBE` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '组织描述' AFTER `ORG_NAME`, +MODIFY COLUMN `PRINCIPAL_NAME` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '负责人姓名' AFTER `ORG_DESCRIBE`, +MODIFY COLUMN `PRINCIPAL_MOBILE` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '负责人电话' AFTER `PRINCIPAL_NAME`; + diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.19__service_move_people_to_record.sql b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.19__service_move_people_to_record.sql new file mode 100644 index 0000000000..703651cf09 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.19__service_move_people_to_record.sql @@ -0,0 +1,2 @@ +alter table ic_service_record + add SERVICE_PEOPLE_NUMBER int(10) comment '服务人数' after SERVICE_STATUS; \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml index 4293f65f43..d7b90133a4 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml @@ -178,4 +178,13 @@ ORDER BY so.ORG_ID ASC,so.ORGANIZATION_CREATED_TIME DESC + + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml index 1117174bcc..0c5c86d30d 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml @@ -163,7 +163,10 @@ AND ACTIVITY_TIME <= #{endTime} - AND ACTIVITY_TIME BETWEEN #{startTime} AND #{endTime} + + AND ACTIVITY_TIME BETWEEN #{startTime} AND #{endTime} + + ORDER BY ACTIVITY_TIME DESC 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 f57d1c7826..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 @@ -164,7 +164,7 @@ CREATED_TIME FROM ic_party_unit WHERE DEL_FLAG = '0' - AND CONCAT(PIDS,':',AGENCY_ID) LIKE CONCAT('%',#{agencyId},'%') + AND AGENCY_ID IN (#{pid},#{agencyId}) UNION ALL SELECT ID AS assistanceUnitId, @@ -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 4d215c16d9..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 @@ -658,10 +658,24 @@ INNER JOIN ic_user_demand_service s ON ( r.id = s.DEMAND_REC_ID ) WHERE r.CUSTOMER_ID = #{customerId} + AND r.DEL_FLAG = '0' AND r.STATUS = 'finished' s.SERVER_ID = #{serverId} 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-job/epmet-job-server/pom.xml b/epmet-module/epmet-job/epmet-job-server/pom.xml index b0a4d6f1e5..1e0d00c9ba 100644 --- a/epmet-module/epmet-job/epmet-job-server/pom.xml +++ b/epmet-module/epmet-job/epmet-job-server/pom.xml @@ -114,6 +114,12 @@ 2.0.0 compile + + com.epmet + open-data-worker-client + 2.0.0 + compile + diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/StatsUserHouseService.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/StatsUserHouseService.java new file mode 100644 index 0000000000..7a1537bdd1 --- /dev/null +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/StatsUserHouseService.java @@ -0,0 +1,37 @@ +package com.epmet.service; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; + +public interface StatsUserHouseService { + + /** + * 人房信息统计 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @author zhy + * @date 2022/5/30 10:25 + */ + Result execUserHouseGridStatistical(FactUserHouseFormDTO formDTO); + + /** + * 人房信息统计 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @author zhy + * @date 2022/5/30 10:25 + */ + Result execUserHouseAgencyStatistical(FactUserHouseFormDTO formDTO); + + /** + * 人房信息统计 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @author zhy + * @date 2022/5/30 10:25 + */ + Result execUserHouseNeighborhoodStatistical(FactUserHouseFormDTO formDTO); +} diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/StatsUserHouseServiceImpl.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/StatsUserHouseServiceImpl.java new file mode 100644 index 0000000000..653c0ae7e8 --- /dev/null +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/StatsUserHouseServiceImpl.java @@ -0,0 +1,35 @@ +package com.epmet.service.impl; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; +import com.epmet.feign.DataStatisticalOpenFeignClient; +import com.epmet.service.StatsUserHouseService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + + +@Service +public class StatsUserHouseServiceImpl implements StatsUserHouseService { + + private Logger logger = LoggerFactory.getLogger(getClass()); + + @Autowired + private DataStatisticalOpenFeignClient dataStatisticalOpenFeignClient; + + @Override + public Result execUserHouseGridStatistical(FactUserHouseFormDTO formDTO) { + return dataStatisticalOpenFeignClient.userHouseStatGrid(formDTO); + } + + @Override + public Result execUserHouseAgencyStatistical(FactUserHouseFormDTO formDTO) { + return dataStatisticalOpenFeignClient.userHouseStatAgency(formDTO); + } + + @Override + public Result execUserHouseNeighborhoodStatistical(FactUserHouseFormDTO formDTO) { + return dataStatisticalOpenFeignClient.userHouseStatNeighborhood(formDTO); + } +} diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosTask.java new file mode 100644 index 0000000000..a4a2bf1028 --- /dev/null +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosTask.java @@ -0,0 +1,41 @@ +package com.epmet.task; + +import com.alibaba.fastjson.JSON; +import com.epmet.commons.tools.utils.Result; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.feign.GuardarDatosFeignClient; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; + +/** + * 获取ruoyi系统数据存入表内 + * + * @param + * @author LZN + * @return + * @date 2022/6/6 14:39 + */ +@Component("guardarDatosTask") +@Slf4j +public class GuardarDatosTask implements ITask { + + @Resource + private GuardarDatosFeignClient guardarDatosFeignClient; + + @Override + public void run(String params) { + PreserVationFormDTO formDTO = new PreserVationFormDTO(); + if (StringUtils.isNotBlank(params)) { + formDTO = JSON.parseObject(params, PreserVationFormDTO.class); + } + Result result = guardarDatosFeignClient.guardarDatosTask(formDTO); + if (result.success()) { + log.debug("定时任务执行成功"); + } else { + log.debug("定时任务执行失败" + result.getMsg()); + } + } +} diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsUserHouseTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsUserHouseTask.java new file mode 100644 index 0000000000..9925ed4391 --- /dev/null +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsUserHouseTask.java @@ -0,0 +1,55 @@ +package com.epmet.task; + +import com.alibaba.fastjson.JSON; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; +import com.epmet.service.StatsUserHouseService; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 人房 + * + * @author zhy + * @date 2022/5/30 10:23 + */ +@Component("statsUserHouseTask") +public class StatsUserHouseTask implements ITask { + + private Logger logger = LoggerFactory.getLogger(getClass()); + + @Autowired + private StatsUserHouseService statsUserHouseService; + + @Override + public void run(String params) { + logger.info("StatsUserHouseTask定时任务正在执行,参数为:{}", params); + FactUserHouseFormDTO formDTO = new FactUserHouseFormDTO(); + if (StringUtils.isNotBlank(params)) { + formDTO = JSON.parseObject(params, FactUserHouseFormDTO.class); + } + Result result = statsUserHouseService.execUserHouseGridStatistical(formDTO); + if (result.success()) { + logger.info("StatsUserHouseTask-grid定时任务执行成功"); + } else { + logger.error("StatsUserHouseTask-grid定时任务执行失败:" + result.getMsg()); + } + + result = statsUserHouseService.execUserHouseAgencyStatistical(formDTO); + if (result.success()) { + logger.info("StatsUserHouseTask-agency定时任务执行成功"); + } else { + logger.error("StatsUserHouseTask-agency定时任务执行失败:" + result.getMsg()); + } + + result = statsUserHouseService.execUserHouseNeighborhoodStatistical(formDTO); + if (result.success()) { + logger.info("StatsUserHouseTask-neighborhood定时任务执行成功"); + } else { + logger.error("StatsUserHouseTask-neighborhood定时任务执行失败:" + result.getMsg()); + } + } +} diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java index 81edf12a9a..5a4b39f502 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java @@ -544,7 +544,7 @@ public class WxmpMessageServiceImpl implements WxmpMessageService { throw new WxSubscribeException("clientType有误", "", openId); } } catch (Exception e) { - log.error("method exception", e); + log.warn("method exception,msg:{}", e.getMessage()); throw new WxSubscribeException("获取openId失败:" + e.getMessage(), "", ""); } return openId; diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/resources/logback-spring.xml b/epmet-module/epmet-point/epmet-point-server/src/main/resources/logback-spring.xml index c6a2ee5d59..63a188f67c 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/resources/logback-spring.xml +++ b/epmet-module/epmet-point/epmet-point-server/src/main/resources/logback-spring.xml @@ -137,12 +137,36 @@ + + + + ${log.path}/rocketmqclient.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%X{Transaction-Serial}] %-5level %logger{50} - %msg%n + UTF-8 + + + + ${log.path}/rocketmqclient-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + + + + @@ -156,6 +180,10 @@ + + + + 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..52d258308a 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.GET_PRIVACY_SETTING_URL + "?" + "access_token=" + accessToken; + Result submitResult = HttpClientManager.getInstance().sendPostByJSON(url, "{\"privacy_ver\":2}"); + 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 != null || 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}"; + 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-access/gov-access-client/src/main/java/com/epmet/dto/GovMenuDTO.java b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/GovMenuDTO.java index fb130e9c65..91ef00b75a 100644 --- a/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/GovMenuDTO.java +++ b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/GovMenuDTO.java @@ -22,7 +22,6 @@ import com.epmet.dto.result.MenuResourceDTO; import lombok.Data; import java.io.Serializable; -import java.util.Date; import java.util.List; @@ -77,36 +76,6 @@ public class GovMenuDTO extends TreeStringNode implements Serializab */ private Integer sort; - /** - * 删除标识:0.未删除 1.已删除 - */ - private Integer delFlag; - - /** - * 乐观锁 - */ - private Integer revision; - - /** - * 创建人 - */ - private String createdBy; - - /** - * 创建时间 - */ - private Date createdTime; - - /** - * 更新人 - */ - private String updatedBy; - - /** - * 更新时间 - */ - private Date updatedTime; - /** * 菜单资源 */ @@ -121,4 +90,9 @@ public class GovMenuDTO extends TreeStringNode implements Serializab * 是否显示,1:显示 0不显示 */ private Integer showFlag; -} \ No newline at end of file + + /** + * 用于区分哪个端的菜单 eg:管理平台(gov_menu)、数据分析平台(data_menu) + */ + private String tableName; +} diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovMenuController.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovMenuController.java index d3a67c889f..20636cfc3a 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovMenuController.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovMenuController.java @@ -11,7 +11,6 @@ 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.GovMenuDTO; -import com.epmet.dto.result.MenuResourceDTO; import com.epmet.service.GovMenuService; import com.epmet.service.GovResourceService; import org.springframework.beans.factory.annotation.Autowired; @@ -45,11 +44,8 @@ public class GovMenuController { } @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - GovMenuDTO data = govMenuService.get(id); - - //菜单资源列表 - List resourceList = govResourceService.getMenuResourceList(id); + public Result get(@PathVariable("id") String id,String tableName){ + GovMenuDTO data = govMenuService.get(id,tableName); return new Result().ok(data); } @@ -101,8 +97,8 @@ public class GovMenuController { * @return Result> */ @GetMapping("list") - public Result> list(Integer type){ - List list = govMenuService.getMenuList(type); + public Result> list(Integer type,String tableName){ + List list = govMenuService.getMenuList(type,tableName); return new Result>().ok(list); } @@ -113,8 +109,8 @@ public class GovMenuController { * @return List */ @GetMapping("nav") - public Result> nav(@LoginUser TokenDto tokenDto){ - List list = govMenuService.getUserMenuNavList(tokenDto); + public Result> nav(@LoginUser TokenDto tokenDto, String tableName){ + List list = govMenuService.getUserMenuNavList(tokenDto,tableName); return new Result>().ok(list); } diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovMenuDao.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovMenuDao.java index ba05556dc1..d1902baca6 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovMenuDao.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovMenuDao.java @@ -1,8 +1,8 @@ /** * Copyright (c) 2018 人人开源 All rights reserved. - * + *

* https://www.renren.io - * + *

* 版权所有,侵权必究! */ @@ -24,21 +24,22 @@ import java.util.List; @Mapper public interface GovMenuDao extends BaseDao { - GovMenuEntity getById(@Param("id") String id, @Param("language") String language); + GovMenuEntity getById(@Param("id") String id, @Param("language") String language, @Param("tableName") String tableName); /** * 查询所有菜单列表 * - * @param type 菜单类型 - * @param language 语言 + * @param type 菜单类型 + * @param language 语言 + * @param tableName */ - List getMenuList(@Param("type") Integer type, @Param("language") String language); + List getMenuList(@Param("type") Integer type, @Param("language") String language, @Param("tableName") String tableName); /** * 查询用户菜单列表 * - * @param userId 用户ID - * @param type 菜单类型 + * @param userId 用户ID + * @param type 菜单类型 * @param language 语言 */ List getUserMenuList(@Param("userId") String userId, @Param("type") Integer type, @Param("language") String language); @@ -46,7 +47,8 @@ public interface GovMenuDao extends BaseDao { /** * 根据父菜单,查询子菜单 - * @param pid 父菜单ID + * + * @param pid 父菜单ID */ List getListPid(String pid); @@ -54,8 +56,9 @@ public interface GovMenuDao extends BaseDao { * 查询客户菜单列表 * * @param customerId 客户id - * @param type 菜单类型 - * @param language 语言 + * @param type 菜单类型 + * @param language 语言 + * @param tableName */ - List getCustomerMenuList(@Param("customerId") String customerId, @Param("type") Integer type, @Param("language") String language); + List getCustomerMenuList(@Param("customerId") String customerId, @Param("type") Integer type, @Param("language") String language, @Param("tableName") String tableName); } diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovCustomerMenuRedis.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovCustomerMenuRedis.java index 911e42f59a..64dcb0fb1c 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovCustomerMenuRedis.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovCustomerMenuRedis.java @@ -45,11 +45,12 @@ public class GovCustomerMenuRedis { * desc:保存客户菜单缓存 * @param customerId * @param type + * @param tableName * @see com.epmet.enums.MenuTypeEnum */ - public void setCustomerMenuList(String customerId, Integer type, List govMenuDTOS) { + public void setCustomerMenuList(String customerId, Integer type, List govMenuDTOS, String tableName) { if (checkParam(customerId, type) && !CollectionUtils.isEmpty(govMenuDTOS) && StringUtils.isNotBlank(govMenuDTOS.get(NumConstant.ZERO).getName())) { - String key = RedisKeys.getCustomerMenuList(customerId, type); + String key = RedisKeys.getCustomerMenuList(customerId, type, tableName); redisUtils.set(key, govMenuDTOS, RedisUtils.DEFAULT_EXPIRE); } } @@ -57,11 +58,12 @@ public class GovCustomerMenuRedis { * desc:获取客户菜单缓存 * @param customerId * @param type + * @param tableName * @see com.epmet.enums.MenuTypeEnum */ - public List getCustomerMenuList(String customerId, Integer type) { + public List getCustomerMenuList(String customerId, Integer type, String tableName) { if (checkParam(customerId, type)) { - String key = RedisKeys.getCustomerMenuList(customerId, type); + String key = RedisKeys.getCustomerMenuList(customerId, type, tableName); return (List) redisUtils.get(key); } return null; diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovMenuService.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovMenuService.java index b5c0cf12a3..0e87946dc5 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovMenuService.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovMenuService.java @@ -59,11 +59,12 @@ public interface GovMenuService extends BaseService { * 单条查询 * * @param id + * @param tableName * @return GovMenuDTO * @author generator * @date 2020-03-18 */ - GovMenuDTO get(String id); + GovMenuDTO get(String id, String tableName); /** * 默认保存 @@ -117,15 +118,17 @@ public interface GovMenuService extends BaseService { * 菜单列表 * * @param type 菜单类型 + * @param tableName */ - List getMenuList(Integer type); + List getMenuList(Integer type, String tableName); /** * 用户菜单导航 * @param tokenDto 用户信息 + * @param tableName * @return java.util.List */ - List getUserMenuNavList(TokenDto tokenDto); + List getUserMenuNavList(TokenDto tokenDto, String tableName); /** * 获取用户权限标识 @@ -141,4 +144,4 @@ public interface GovMenuService extends BaseService { List getListPid(String pid); void clearOperUserAccess(String app, String client, String userId); -} \ No newline at end of file +} diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovMenuServiceImpl.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovMenuServiceImpl.java index 63bde3c678..2dbb4abe05 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovMenuServiceImpl.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovMenuServiceImpl.java @@ -94,8 +94,9 @@ public class GovMenuServiceImpl extends BaseServiceImpl getMenuList(Integer type) { - List menuList = baseDao.getMenuList(type, HttpContextUtils.getLanguage()); + public List getMenuList(Integer type, String tableName) { + tableName = getTableName(tableName); + List menuList = baseDao.getMenuList(type, HttpContextUtils.getLanguage(), tableName); List dtoList = ConvertUtils.sourceToTarget(menuList, GovMenuDTO.class); @@ -189,7 +208,7 @@ public class GovMenuServiceImpl extends BaseServiceImpl getUserMenuNavList(TokenDto tokenDto) { + public List getUserMenuNavList(TokenDto tokenDto, String tableName) { // List menuList = govMenuRedis.getUserMenuNavList(tokenDto.getCustomerId(), tokenDto.getApp(), tokenDto.getClient()); // if(menuList == null){ // menuList = getCustomerMenuList(tokenDto.getCustomerId(), MenuTypeEnum.MENU.value()); @@ -198,7 +217,8 @@ public class GovMenuServiceImpl extends BaseServiceImpl * @Author zhangyong * @Date 15:51 2021-03-16 **/ - private List getCustomerMenuList(String customerId, Integer type) { - List govMenuDTOS = govCustomerMenuRedis.getCustomerMenuList(customerId,type); + private List getCustomerMenuList(String customerId, Integer type, String tableName) { + List govMenuDTOS = govCustomerMenuRedis.getCustomerMenuList(customerId,type,tableName); if (!CollectionUtils.isEmpty(govMenuDTOS)){ return govMenuDTOS; } - List menuList = baseDao.getCustomerMenuList(customerId, type, HttpContextUtils.getLanguage()); + List menuList = baseDao.getCustomerMenuList(customerId, type, HttpContextUtils.getLanguage(),tableName); List dtoList = ConvertUtils.sourceToTarget(menuList, GovMenuDTO.class); govMenuDTOS = TreeUtils.buildTree(dtoList); - govCustomerMenuRedis.setCustomerMenuList(customerId,type,govMenuDTOS); + govCustomerMenuRedis.setCustomerMenuList(customerId,type,govMenuDTOS,tableName); return govMenuDTOS; } @@ -235,7 +256,8 @@ public class GovMenuServiceImpl extends BaseServiceImpl menuList; // if(govUserDTOResult.getData().getSuperAdmin() == SuperAdminEnum.YES.value()){ - menuList = baseDao.getMenuList(MenuTypeEnum.BUTTON.value(), HttpContextUtils.getLanguage()); + //目前不支持角色 菜单 + menuList = baseDao.getMenuList(MenuTypeEnum.BUTTON.value(), HttpContextUtils.getLanguage(), null); // }else{ // menuList = baseDao.getUserMenuList(tokenDto.getUserId(), MenuTypeEnum.BUTTON.value(), HttpContextUtils.getLanguage()); // } @@ -267,7 +289,7 @@ public class GovMenuServiceImpl extends BaseServiceImpl select t1.*, - (select lang.field_value from gov_language lang where lang.table_name='gov_menu' and lang.field_name='name' + (select lang.field_value from gov_language lang where lang.table_name=#{tableName} and lang.field_name='name' and lang.table_id=t1.pid and lang.language=#{language}) as parentName, - (select lang.field_value from gov_language lang where lang.table_name='gov_menu' and lang.field_name='name' + (select lang.field_value from gov_language lang where lang.table_name=#{tableName} and lang.field_name='name' and lang.table_id=t1.id and lang.language=#{language}) as name from gov_menu t1 where t1.id = #{id} and t1.del_flag = 0 - select ID AS agencyId, ORGANIZATION_NAME AS agencyName, @@ -625,8 +632,13 @@ customer_agency where DEL_FLAG = 0 - AND PID ='0' AND CUSTOMER_ID = #{customerId} + + AND id = #{staffAgencyId} + + + AND PID ='0' + + UPDATE customer_agency @@ -802,4 +869,15 @@ order by CREATED_TIME desc + + + diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml index 0f08fce996..e428bc42c6 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml @@ -846,6 +846,17 @@ ) + + + UPDATE customer_grid SET total_user = total_user+#{incrCount} where id = #{gridId} and del_flag = '0' diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml index 7e0d3bde18..92c486f24a 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml @@ -48,10 +48,18 @@ SET TOTAL_UNIT_NUM = #{totalUnitNum}, TOTAL_FLOOR_NUM = #{totalFloorNum}, TOTAL_HOUSE_NUM = #{totalHouseNum}, - BUILDING_LEADER_NAME = #{buildingLeaderName}, - BUILDING_LEADER_MOBILE = #{buildingLeaderMobile}, - SORT = #{sort}, - TYPE = #{type}, + + BUILDING_LEADER_NAME = #{buildingLeaderName}, + + + BUILDING_LEADER_MOBILE = #{buildingLeaderMobile}, + + + SORT = #{sort}, + + + TYPE = #{type}, + UPDATED_TIME = NOW() WHERE ID = #{buildingId} diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingUnitDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingUnitDao.xml index 0ee38da368..09f334b42d 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingUnitDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingUnitDao.xml @@ -3,19 +3,20 @@ - - - - - - - - - - - - - + + + UPDATE ic_building_unit + SET DEL_FLAG = '1', + UPDATED_TIME = NOW() + WHERE ID IN ( + #{id} + ) + + + + \ No newline at end of file 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 2a4a2c7ee3..c55f985fc5 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 @@ -96,6 +96,7 @@ (case when a.RENT_FLAG = '0' then '自住' when a.RENT_FLAG = '1' then '出租' when a.RENT_FLAG = '2' then '闲置' + when a.RENT_FLAG = '3' then '未出售' else '' end) as rentFlag, a.OWNER_NAME as ownerName, a.OWNER_PHONE as ownerPhone, @@ -114,6 +115,7 @@ c.GRID_ID as gridId, gr.GRID_NAME, IFNULL(a.sort,0) as sort, + IFNULL(a.REMARK,'') AS remark, a.CUSTOMER_ID from ic_house a LEFT JOIN ic_building b on a.BUILDING_ID = b.ID and b.DEL_FLAG = '0' @@ -123,6 +125,7 @@ LEFT JOIN customer_agency ag on ag.ID = c.AGENCY_ID and d.DEL_FLAG = '0' 1 = 1 + and a.del_flag = '0' and case c.AGENCY_PIDS when '' then CONCAT(c.AGENCY_ID) like CONCAT(#{pids}, '%') else CONCAT(c.AGENCY_PIDS, ':', c.AGENCY_ID) like CONCAT(#{pids}, '%') end @@ -172,7 +175,16 @@ AND a.REMARK like CONCAT('%',#{remark},'%') - and a.del_flag = '0' + + AND ((DATE_FORMAT(a.CREATED_TIME,'%Y%m%d') >= #{updateStartDate} AND DATE_FORMAT(a.CREATED_TIME,'%Y%m%d') #{updateEndDate}) + OR (DATE_FORMAT(a.UPDATED_TIME,'%Y%m%d') >= #{updateStartDate} AND DATE_FORMAT(a.UPDATED_TIME,'%Y%m%d') #{updateEndDate})) + + + AND (DATE_FORMAT(a.CREATED_TIME,'%Y%m%d') #{updateEndDate}) OR ((DATE_FORMAT(a.UPDATED_TIME,'%Y%m%d')) #{updateEndDate}) + + + AND (DATE_FORMAT(a.CREATED_TIME,'%Y%m%d') =]]> #{updateStartDate}) OR ((DATE_FORMAT(a.UPDATED_TIME,'%Y%m%d')) =]]> #{updateStartDate}) + #排序规则:根据小区、楼栋、单元、门牌号(分别按照数字和中文)分别升序排序 ORDER BY @@ -343,9 +355,12 @@ AND neighbor_hood_id IN ( - select id from ic_neighbor_hood - where del_flag = '0' - and (agency_id = #{orgId} OR agency_pids LIKE CONCAT('%', #{orgId}, '%')) + select a.id from ic_neighbor_hood a + + inner join customer_agency b on a.agency_id = b.id and b.del_flag = '0' + inner join customer_grid c on a.grid_id = c.id and c.del_flag = '0' + where a.del_flag = '0' + and (a.agency_id = #{orgId} OR a.agency_pids LIKE CONCAT('%', #{orgId}, '%')) ) @@ -453,6 +468,7 @@ (case when a.RENT_FLAG = '0' then '自住' when a.RENT_FLAG = '1' then '出租' when a.RENT_FLAG = '2' then '闲置' + when a.RENT_FLAG = '3' then '未出售' else '' end) as rentFlag, a.OWNER_NAME as ownerName, a.OWNER_PHONE as ownerPhone, @@ -499,4 +515,11 @@ ORDER BY CAST(c.NEIGHBOR_HOOD_NAME AS SIGNED),CONVERT(c.NEIGHBOR_HOOD_NAME using gbk) + + + diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventDTO.java index fb86222967..b357632bf8 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventDTO.java @@ -1,8 +1,9 @@ package com.epmet.dto; +import lombok.Data; + import java.io.Serializable; import java.util.Date; -import lombok.Data; /** @@ -121,6 +122,11 @@ public class IcEventDTO implements Serializable { */ private Integer redDot; + /** + * 工作端的红点:展示1;不展示:0;【居民报事、回复更新为1】 + */ + private Integer govRedDot; + /** * 最近一次操作时间(回复、立项、转需求、办结更新此列) */ @@ -182,7 +188,7 @@ approved:人工审核通过) private String createdBy; /** - * 展示红点:visible;隐藏:invisible;人大回复、工作人员回复/立项更新为visible; 插入数据默认不展示 + * 创建时间 */ private Date createdTime; diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java index ad88c1ce36..7d8187c110 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java @@ -17,11 +17,13 @@ public class IcEventListFormDTO implements Serializable { public interface Detail extends CustomerClientShowGroup { } + public interface GovRedDot extends CustomerClientShowGroup { + } /** * 事件ID */ - @NotBlank(message = "事件ID不能为空", groups = Detail.class) + @NotBlank(message = "事件ID不能为空", groups = {Detail.class, GovRedDot.class}) private String icEventId; /** * 所属组织 diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java index 19bb9b55df..408d0c1ea6 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java @@ -44,7 +44,7 @@ public class IcEventListResultDTO implements Serializable { /** * 音频[url集合] */ - private List voiceList; + private List voiceList; /** * 上报渠道 */ @@ -136,6 +136,10 @@ public class IcEventListResultDTO implements Serializable { * 报事人的红点:展示1;不展示:0;人大代表回复,工作人员回复/立项/转需求/办结更新为1; */ private Integer redDot; + /** + * 工作端的红点:展示1;不展示:0;【居民报事、回复更新为1】 + */ + private Integer govRedDot; /** * 最近一次操作时间(回复、立项、转需求、办结更新此列) */ diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index 8e65d4273d..12416e4276 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -5,9 +5,11 @@ import com.alibaba.excel.ExcelWriter; import com.alibaba.excel.write.metadata.WriteSheet; import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.annotation.RequirePermission; import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.dto.form.PageFormDTO; +import com.epmet.commons.tools.enums.RequirePermissionEnum; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.page.PageData; @@ -63,6 +65,17 @@ public class IcEventController { formDTO.setStaffId(tokenDto.getUserId()); return new Result>().ok(icEventService.list(formDTO)); } + /** + * @Author sun + * @Description 工作端小程序-事件管理-列表 + **/ + @RequestMapping("gov-list") + @RequirePermission(requirePermission = RequirePermissionEnum.IC_EVENT_LIST) + public Result> govList(@LoginUser TokenDto tokenDto, @RequestBody IcEventListFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); + return new Result>().ok(icEventService.list(formDTO)); + } @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) public Result get(@PathVariable("id") String id){ @@ -70,6 +83,7 @@ public class IcEventController { return new Result().ok(data); } + @NoRepeatSubmit @PostMapping("add") public Result save(@LoginUser TokenDto tokenDto, @RequestBody IcEventAddEditFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO, AddGroup.class, DefaultGroup.class); @@ -189,6 +203,7 @@ public class IcEventController { * @Author sun * @Description 事件管理-回复 **/ + @NoRepeatSubmit @PostMapping("reply") public Result reply(@LoginUser TokenDto tokenDto, @RequestBody IcEventReplyFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO, UpdateGroup.class, DefaultGroup.class); @@ -202,6 +217,7 @@ public class IcEventController { * @Author sun * @Description 事件管理-立项 **/ + @NoRepeatSubmit @PostMapping("icEventToProject") public Result icEventToProject(@LoginUser TokenDto tokenDto, @RequestBody IcEventToProjectFormDTO formDTO){ formDTO.setCustomerId(tokenDto.getCustomerId()); @@ -265,6 +281,18 @@ public class IcEventController { ValidatorUtils.validateEntity(formDTO, IcEventListFormDTO.Detail.class); return new Result().ok(icEventService.detail(formDTO)); } + /** + * @Author sun + * @Description 工作端小程序-事件管理-详情 + **/ + @PostMapping("gov-detail") + @RequirePermission(requirePermission = RequirePermissionEnum.IC_EVENT_DETAIL) + public Result govDetail(@LoginUser TokenDto tokenDto, @RequestBody IcEventListFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO, IcEventListFormDTO.Detail.class); + return new Result().ok(icEventService.detail(formDTO)); + } /** * 事件分类分析- 饼图2,直属下级 事件数量 @@ -320,6 +348,7 @@ public class IcEventController { * @author zxc * @date 2022/5/19 13:38 */ + @NoRepeatSubmit @PostMapping("add-event-resi") public Result addEventFromResi(@LoginUser TokenDto tokenDto,@RequestBody AddEventFromResiFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO, AddEventFromResiFormDTO.AddEventFromResiForm.class); @@ -394,6 +423,7 @@ public class IcEventController { * @param formDTO * @return */ + @NoRepeatSubmit @PostMapping("resi-reply") public Result resiReply(@LoginUser TokenDto tokenDto, @RequestBody ResiReplyIcEventFormDTO formDTO){ formDTO.setCustomerId(tokenDto.getCustomerId()); @@ -407,6 +437,7 @@ public class IcEventController { * @Author sun * @Description 数字平台-事件导出 **/ + @NoRepeatSubmit @PostMapping("export") public void export(@LoginUser TokenDto tokenDto, @RequestBody IcEventListFormDTO formDTO, HttpServletResponse response) throws IOException { formDTO.setCustomerId(tokenDto.getCustomerId()); @@ -449,4 +480,15 @@ public class IcEventController { } } + /** + * @Author sun + * @Description 工作端事件红点消除 + **/ + @PostMapping("govRedDot") + public Result govRedDot(@RequestBody IcEventListFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, IcEventListFormDTO.GovRedDot.class); + icEventService.govRedDot(formDTO.getIcEventId()); + return new Result(); + } + } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java index db3fc54536..a8e83bcf7c 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java @@ -121,6 +121,11 @@ public class IcEventEntity extends BaseEpmetEntity { */ private Integer redDot; + /** + * 工作端的红点:展示1;不展示:0;【居民报事、回复更新为1】 + */ + private Integer govRedDot; + /** * 最近一次操作时间(回复、立项、转需求、办结更新此列) */ diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java index d7b548aca9..2a3545fc9c 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java @@ -215,4 +215,9 @@ public interface IcEventService extends BaseService { * @return */ MyReportIcEvResDTO myReportDetail(MyReportIcEvFormDTO formDTO); + + /** + * @Description 工作端事件红点消除 + **/ + void govRedDot(String icEventId); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 5d1c2f9fbd..ed76a24e82 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -135,12 +135,12 @@ public class IcEventServiceImpl extends BaseServiceImpl imageList = new ArrayList<>(); - List voiceList = new ArrayList<>(); + List voiceList = new ArrayList<>(); for(IcEventListResultDTO.Attachment file: dto.getAttachmentList()){ if ("image".equals(file.getType())) { imageList.add(file.getUrl()); } else if ("voice".equals(file.getType())) { - voiceList.add(file.getUrl()); + voiceList.add(file); } } dto.setImageList(imageList); @@ -993,7 +993,7 @@ public class IcEventServiceImpl extends BaseServiceImpl imageList = new ArrayList<>(); - List voiceList = new ArrayList<>(); + List voiceList = new ArrayList<>(); resultDTO.getAttachmentList().forEach(file -> { if ("image".equals(file.getType())) { imageList.add(file.getUrl()); } else if ("voice".equals(file.getType())) { - voiceList.add(file.getUrl()); + voiceList.add(file); } }); resultDTO.setImageList(imageList); @@ -1212,6 +1212,27 @@ public class IcEventServiceImpl extends BaseServiceImpl msgList = new ArrayList<>(); + UserMessageFormDTO messageFormDTO = new UserMessageFormDTO(); + messageFormDTO.setCustomerId(formDTO.getCustomerId()); + messageFormDTO.setApp(ProjectConstant.RESI); + messageFormDTO.setGridId(entity.getGridId()); + messageFormDTO.setUserId(entity.getCreatedBy()); + messageFormDTO.setTitle(UserMessageConstant.EVENT_TITILE); + messageFormDTO.setMessageContent(String.format("您上报的事件已完成,请查看。")); + messageFormDTO.setReadFlag(Constant.UNREAD); + messageFormDTO.setMessageType(UserMessageTypeConstant.IC_EVENT); + messageFormDTO.setTargetId(entity.getId()); + msgList.add(messageFormDTO); + Result sendMessageRes = messageOpenFeignClient.saveUserMessageList(msgList); + if (!sendMessageRes.success()) { + log.warn(String.format("事件回复,给居民端用户发送站内信异常,事件Id->%s", entity.getId())); + } + } + } /** @@ -1267,9 +1288,12 @@ public class IcEventServiceImpl extends BaseServiceImpl attachmentEntityList = new ArrayList<>(); @@ -1426,7 +1450,10 @@ public class IcEventServiceImpl extends BaseServiceImpl> agencyStaffsResult = govOrgOpenFeignClient.getAgencyStaffs(formDTO); + if (!agencyStaffsResult.success()){ + throw new EpmetException("查询组织下工作人员失败..."); + } + if (!CollectionUtils.isEmpty(agencyStaffsResult.getData())){ + List msgList = new ArrayList<>(); + agencyStaffsResult.getData().forEach(u -> { + UserMessageFormDTO msg = new UserMessageFormDTO(); + msg.setUserId(u); + msg.setCustomerId(customerId); + msg.setTargetId(icEventId); + msg.setGridId("*"); + msg.setApp(AppClientConstant.APP_GOV); + msg.setMessageType(UserMessageTypeConstant.IC_EVENT); + msg.setReadFlag(ReadFlagConstant.UN_READ); + msg.setTitle("您有一条事件消息"); + msg.setMessageContent(showName+"对事件进行了新的回复,请查看。"); + msgList.add(msg); + }); + messageOpenFeignClient.saveUserMessageList(msgList); + } } /** @@ -1516,5 +1572,12 @@ public class IcEventServiceImpl extends BaseServiceImpl + @@ -169,6 +170,7 @@ ie.operation_id, ie.read_flag, ie.red_dot, + ie.gov_red_dot, ie.latest_operated_time, ie.resolve_status, ie.close_remark, diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaBmCategoryDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaBmCategoryDTO.java new file mode 100644 index 0000000000..52bf7b79a6 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaBmCategoryDTO.java @@ -0,0 +1,129 @@ +package com.epmet.opendata.dto.ca; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 多级类型信息表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-16 + */ +@Data +public class CaBmCategoryDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 类别ID + */ + private Long categoryId; + + /** + * 名称 + */ + private String categoryName; + + /** + * + */ + private String categoryType; + + /** + * 名称值 + */ + private String categoryValue; + + /** + * 父类别ID + */ + private Long parentCategoryId; + + /** + * 展示顺序 + */ + private Integer categorySort; + + /** + * 创建人 + */ + private Long createBy; + + /** + * 创建时间 + */ + private Date createDate; + + /** + * 最后修改人 + */ + private Long updateBy; + + /** + * 最后修改时间 + */ + private Date updateDate; + + /** + * 删除状态 + */ + private String deleteFlag; + + /** + * 乐观锁 + */ + private Integer versions; + + /** + * 扩展字段1 + */ + private String attribute1; + + /** + * 扩展字段2 + */ + private String attribute2; + + /** + * 扩展字段3 + */ + private String attribute3; + + /** + * 扩展字段4 + */ + private String attribute4; + + /** + * 扩展字段5 + */ + private String attribute5; + + /** + * 扩展字段6 + */ + private Long attribute6; + + /** + * 扩展字段7 + */ + private Long attribute7; + + /** + * 扩展字段8 + */ + private Long attribute8; + + /** + * 扩展字段9 + */ + private Date attribute9; + + /** + * 扩展字段10 + */ + private Date attribute10; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaLoudongDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaLoudongDTO.java new file mode 100644 index 0000000000..09d3628f2a --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaLoudongDTO.java @@ -0,0 +1,235 @@ +package com.epmet.opendata.dto.ca; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 楼栋基本信息表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-31 + */ +@Data +public class CaLoudongDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 楼栋ID + */ + private Long buildingId; + + /** + * 楼宇类型 + */ + private String buildingType; + + /** + * 网格ID + */ + private Long gridId; + + /** + * 楼宇名称 + */ + private String buildingName; + + /** + * 用途分类 + */ + private String buildingUse; + + /** + * 楼宇状态 + */ + private String buildingStatus; + + /** + * 楼宇结构 + */ + private String buildingStructure; + + /** + * 使用现状 + */ + private String buildingUseage; + + /** + * 建筑时间 + */ + private Date constructionTime; + + /** + * 所处位置 + */ + private String buildingAddr; + + /** + * 小区(单位)名称 + */ + private String communityName; + + /** + * 楼栋长 + */ + private String buildingLeader; + + /** + * 楼层数 + */ + private Integer layerCount; + + /** + * 地下楼层数 + */ + private Integer basementLayerCount; + + /** + * 住宅开始层数 + */ + private Integer houseBeginLayer; + + /** + * 单元数 + */ + private Integer unitCount; + + /** + * 每层每单元户数 + */ + private Integer layerRoomCount; + + /** + * 总房屋数 + */ + private Integer roomCount; + + /** + * 电梯数量 + */ + private String elevatorCount; + + /** + * 建筑面积 + */ + private String buildingArea; + + /** + * 物业公司 + */ + private String buildingPmc; + + /** + * 介绍 + */ + private String buildingDesc; + + /** + * 标绘状态 + */ + private String pointStatus; + + /** + * 经度 + */ + private BigDecimal longitude; + + /** + * 纬度 + */ + private BigDecimal latitude; + + /** + * 数据来源 + */ + private String platCode; + + /** + * 创建人 + */ + private Long createBy; + + /** + * 创建时间 + */ + private Date createDate; + + /** + * 最后修改人 + */ + private Long updateBy; + + /** + * 最后修改时间 + */ + private Date updateDate; + + /** + * 删除状态 + */ + private String deleteFlag; + + /** + * 乐观锁 + */ + private Integer versions; + + /** + * 扩展字段1 + */ + private String attribute1; + + /** + * 扩展字段2 + */ + private String attribute2; + + /** + * 扩展字段3 + */ + private String attribute3; + + /** + * 扩展字段4 + */ + private String attribute4; + + /** + * 扩展字段5 + */ + private String attribute5; + + /** + * 小区主键 + */ + private Long attribute6; + + /** + * 扩展字段7 + */ + private Long attribute7; + + /** + * 扩展字段8 + */ + private Long attribute8; + + /** + * 扩展字段9 + */ + private Date attribute9; + + /** + * 扩展字段10 + */ + private Date attribute10; + + /** + * 小区主键 + */ + private String communityId; + +} \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaPingfangDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaPingfangDTO.java new file mode 100644 index 0000000000..39456014b9 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaPingfangDTO.java @@ -0,0 +1,235 @@ +package com.epmet.opendata.dto.ca; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-31 + */ +@Data +public class CaPingfangDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 楼栋ID + */ + private Long buildingId; + + /** + * 楼宇类型 + */ + private String buildingType; + + /** + * 网格ID + */ + private Long gridId; + + /** + * 楼宇名称 + */ + private String buildingName; + + /** + * 用途分类 + */ + private String buildingUse; + + /** + * 楼宇状态 + */ + private String buildingStatus; + + /** + * 楼宇结构 + */ + private String buildingStructure; + + /** + * 使用现状 + */ + private String buildingUseage; + + /** + * 建筑时间 + */ + private Date constructionTime; + + /** + * 所处位置 + */ + private String buildingAddr; + + /** + * 小区(单位)名称 + */ + private String communityName; + + /** + * 楼栋长 + */ + private String buildingLeader; + + /** + * 楼层数 + */ + private Integer layerCount; + + /** + * 地下楼层数 + */ + private Integer basementLayerCount; + + /** + * 住宅开始层数 + */ + private Integer houseBeginLayer; + + /** + * 单元数 + */ + private Integer unitCount; + + /** + * 每层每单元户数 + */ + private Integer layerRoomCount; + + /** + * 总房屋数 + */ + private Integer roomCount; + + /** + * 电梯数量 + */ + private String elevatorCount; + + /** + * 建筑面积 + */ + private String buildingArea; + + /** + * 物业公司 + */ + private String buildingPmc; + + /** + * 介绍 + */ + private String buildingDesc; + + /** + * 标绘状态 + */ + private String pointStatus; + + /** + * 经度 + */ + private BigDecimal longitude; + + /** + * 纬度 + */ + private BigDecimal latitude; + + /** + * 数据来源 + */ + private String platCode; + + /** + * 创建人 + */ + private Long createBy; + + /** + * 创建时间 + */ + private Date createDate; + + /** + * 最后修改人 + */ + private Long updateBy; + + /** + * 最后修改时间 + */ + private Date updateDate; + + /** + * 删除状态 + */ + private String deleteFlag; + + /** + * 乐观锁 + */ + private Integer versions; + + /** + * 扩展字段1 + */ + private String attribute1; + + /** + * 扩展字段2 + */ + private String attribute2; + + /** + * 扩展字段3 + */ + private String attribute3; + + /** + * 扩展字段4 + */ + private String attribute4; + + /** + * 扩展字段5 + */ + private String attribute5; + + /** + * 小区主键 + */ + private Long attribute6; + + /** + * 扩展字段7 + */ + private Long attribute7; + + /** + * 扩展字段8 + */ + private Long attribute8; + + /** + * 扩展字段9 + */ + private Date attribute9; + + /** + * 扩展字段10 + */ + private Date attribute10; + + /** + * 小区主键 + */ + private String communityId; + +} \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaRentalDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaRentalDTO.java new file mode 100644 index 0000000000..597b46c5ae --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaRentalDTO.java @@ -0,0 +1,215 @@ +package com.epmet.opendata.dto.ca; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 出租房信息表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-31 + */ +@Data +public class CaRentalDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 出租房ID + */ + private Long rentalId; + + /** + * 网格ID + */ + private Long gridId; + + /** + * 房屋ID + */ + private Long houseId; + + /** + * 房屋编号 + */ + private String houseName; + + /** + * 房屋地址 + */ + private String houseAddress; + + /** + * 建筑用途 + */ + private String houseUse; + + /** + * 建筑面积(平方米) + */ + private BigDecimal houseArea; + + /** + * 证件代码 + */ + private String idType; + + /** + * 证件号码 + */ + private String idCard; + + /** + * 房主姓名 + */ + private String residentName; + + /** + * 房主联系方式 + */ + private String telephone; + + /** + * 房主现居详址 + */ + private String curliveAddress; + + /** + * 出租用途 + */ + private String rentUse; + + /** + * 隐患类型 + */ + private String troubleType; + + /** + * 承租人ID + */ + private Long renterId; + + /** + * 承租人公民身份证号码 + */ + private String renterCardNumber; + + /** + * 承租人证件类型 + */ + private Long renterCardType; + + /** + * 承租人姓名 + */ + private String renterName; + + /** + * 承租人联系方式 + */ + private String renterPhone; + + /** + * 经度 + */ + private BigDecimal longitude; + + /** + * 纬度 + */ + private BigDecimal latitude; + + /** + * 标绘状态 + */ + private String pointStatus; + + /** + * 数据来源 + */ + private String platCode; + + /** + * 创建人 + */ + private Long createBy; + + /** + * 创建时间 + */ + private Date createDate; + + /** + * 最后修改人 + */ + private Long updateBy; + + /** + * 最后修改时间 + */ + private Date updateDate; + + /** + * 删除状态 + */ + private String deleteFlag; + + /** + * 乐观锁 + */ + private Integer versions; + + /** + * 承租单位 + */ + private String attribute1; + + /** + * 承租日期 + */ + private String attribute2; + + /** + * 承租期限 + */ + private String attribute3; + + /** + * 扩展字段4 + */ + private String attribute4; + + /** + * 扩展字段5 + */ + private String attribute5; + + /** + * 扩展字段6 + */ + private Long attribute6; + + /** + * 扩展字段7 + */ + private Long attribute7; + + /** + * 扩展字段8 + */ + private Long attribute8; + + /** + * 扩展字段9 + */ + private Date attribute9; + + /** + * 扩展字段10 + */ + private Date attribute10; + +} \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaResidentDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaResidentDTO.java new file mode 100644 index 0000000000..6b2e8c4c86 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaResidentDTO.java @@ -0,0 +1,284 @@ +package com.epmet.opendata.dto.ca; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 人口基本信息表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-31 + */ +@Data +public class CaResidentDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 人口ID + */ + private Long residentId; + + /** + * 网格ID + */ + private Long gridId; + + /** + * 人口性质 + */ + private String residentProperty; + + /** + * 居民分类 + */ + private String residentType; + + /** + * 证件类型 + */ + private String idType; + + /** + * 证件号码(公民身份证号) + */ + private String idCard; + + /** + * 姓名 + */ + private String residentName; + + /** + * 性别 + */ + private String sex; + + /** + * 出生日期 + */ + private Date birthday; + + /** + * 民族 + */ + private String nation; + + /** + * 联系方式 + */ + private String telephone; + + /** + * 户籍省 + */ + private String householdProv; + + /** + * 户籍市 + */ + private String householdCity; + + /** + * 户籍县(区) + */ + private String householdCounty; + + /** + * 户籍镇街 + */ + private String householdTown; + + /** + * 户籍社区/村 + */ + private String householdVillage; + + /** + * 户籍详址 + */ + private String householdAddressDetail; + + /** + * 现住省 + */ + private String curliveProv; + + /** + * 现住市 + */ + private String curliveCity; + + /** + * 现住县(区) + */ + private String curliveCounty; + + /** + * 现住镇街 + */ + private String curliveTown; + + /** + * 现住社区/村 + */ + private String curliveVillage; + + /** + * 现住详址 + */ + private String curliveAddressDetail; + + /** + * 籍贯省 + */ + private String nativeAddressProv; + + /** + * 籍贯市 + */ + private String nativeAddressCity; + + /** + * 籍贯县(区) + */ + private String nativeAddressCounty; + + /** + * 曾用名 + */ + private String formerName; + + /** + * 学历 + */ + private String education; + + /** + * 职业 + */ + private String occupation; + + /** + * 职业类别 + */ + private String occupationType; + + /** + * 服务处所 + */ + private String serviceAddress; + + /** + * 婚姻状况 + */ + private String marriageStatus; + + /** + * 政治面貌 + */ + private String party; + + /** + * 宗教信仰 + */ + private String religious; + + /** + * 有无皈依(已受洗) + */ + private String conversionState; + + /** + * 国籍 + */ + private String nationality; + + /** + * 数据来源 + */ + private String platCode; + + /** + * 创建人 + */ + private Long createBy; + + /** + * 创建时间 + */ + private Date createDate; + + /** + * 最后修改人 + */ + private Long updateBy; + + /** + * 最后修改时间 + */ + private Date updateDate; + + /** + * 删除状态 + */ + private String deleteFlag; + + /** + * 乐观锁 + */ + private Integer versions; + + /** + * 扩展字段1 + */ + private String attribute1; + + /** + * 扩展字段2 + */ + private String attribute2; + + /** + * 扩展字段3 + */ + private String attribute3; + + /** + * 扩展字段4 + */ + private String attribute4; + + /** + * 扩展字段5 + */ + private String attribute5; + + /** + * 扩展字段6 + */ + private Long attribute6; + + /** + * 扩展字段7 + */ + private Long attribute7; + + /** + * 扩展字段8 + */ + private Long attribute8; + + /** + * 扩展字段9 + */ + private Date attribute9; + + /** + * 扩展字段10 + */ + private Date attribute10; + +} \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaRotatorsDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaRotatorsDTO.java new file mode 100644 index 0000000000..9bd29a4dea --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaRotatorsDTO.java @@ -0,0 +1,299 @@ +package com.epmet.opendata.dto.ca; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 流动人口表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-31 + */ +@Data +public class CaRotatorsDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键id + */ + private Long rotatorsId; + + /** + * 公民身份证号 + */ + private String idCard; + + /** + * 证件类型 + */ + private String idType; + + /** + * 姓名 + */ + private String rotatorsName; + + /** + * 曾用名 + */ + private String formerName; + + /** + * 性别 + */ + private String sex; + + /** + * 出生日期 + */ + private Date birthday; + + /** + * 民族 + */ + private String nation; + + /** + * 籍贯省 + */ + private String nativeAddressProv; + + /** + * 籍贯市 + */ + private String nativeAddressCity; + + /** + * 籍贯县(区) + */ + private String nativeAddressCountry; + + /** + * 婚姻状况 + */ + private String marriageStatus; + + /** + * 政治面貌 + */ + private String party; + + /** + * 学历 + */ + private String education; + + /** + * 宗教信仰 + */ + private String religious; + + /** + * 职业类别 + */ + private String occupationType; + + /** + * 职业 + */ + private String occupation; + + /** + * 服务处所 + */ + private String serviceAddress; + + /** + * 联系方式 + */ + private String telephone; + + /** + * 户籍地省 + */ + private String householdAddressProv; + + /** + * 户籍地市 + */ + private String householdAddressCity; + + /** + * 户籍地县(区) + */ + private String householdAddressCountry; + + /** + * 户籍地镇街 + */ + private String householdAddressTown; + + /** + * 户籍地社区/村 + */ + private String householdAddressVillage; + + /** + * 户籍门(楼)详址 + */ + private String householdAddressDetail; + + /** + * 现住地省 + */ + private String curliveAddressProv; + + /** + * 现住地市 + */ + private String curliveAddressCity; + + /** + * 现住地县(区) + */ + private String curliveAddressCountry; + + /** + * 现住地镇街 + */ + private String curliveAddressTown; + + /** + * 现住地社区/村 + */ + private String curliveAddressVillage; + + /** + * 现住门(楼)详址 + */ + private String curliveAddressDetail; + + /** + * 流入原因 + */ + private String inflowReason; + + /** + * 办证类型 + */ + private String certificateType; + + /** + * 证件号码 + */ + private String certificateNumber; + + /** + * 登记日期 + */ + private Date signDate; + + /** + * 证件到期日期 + */ + private Date endDate; + + /** + * 住所类型 + */ + private String residenceType; + + /** + * 是否重点关注人员 + */ + private String isFocusPerson; + + /** + * 创建人 + */ + private Long createBy; + + /** + * 创建时间 + */ + private Date createDate; + + /** + * 最后修改人 + */ + private Long updateBy; + + /** + * 最后修改时间 + */ + private Date updateDate; + + /** + * 删除标识(正常的数据存:normal,逻辑删除的标识为:delete) + */ + private String deleteFlag; + + /** + * 数据来源编码 + */ + private String platcode; + + /** + * 网格id + */ + private Long gridId; + + /** + * 乐观锁 + */ + private Integer versions; + + /** + * 是否注销 + */ + private String attribute1; + + /** + * 注销原因 + */ + private String attribute2; + + /** + * + */ + private String attribute3; + + /** + * + */ + private String attribute4; + + /** + * + */ + private String attribute5; + + /** + * + */ + private Long attribute6; + + /** + * + */ + private Long attribute7; + + /** + * + */ + private Long attribute8; + + /** + * + */ + private Date attribute9; + + /** + * + */ + private Date attribute10; + +} \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaSysDictDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaSysDictDTO.java new file mode 100644 index 0000000000..abb22af9f7 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaSysDictDTO.java @@ -0,0 +1,79 @@ +package com.epmet.opendata.dto.ca; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 字典信息表,字典值和字典组均存入此表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-16 + */ +@Data +public class CaSysDictDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 字典ID + */ + private Long dictId; + + /** + * 字典值,例如:sex/F + */ + private String dictValue; + + /** + * 1.字典组名称(性别)或者字典名称(女) + */ + private String dictLabel; + + /** + * 字典值时存入字典的值,字典组时存null + */ + private String dictType; + + /** + * 描述 + */ + private String dictDesc; + + /** + * 排序 + */ + private Integer dictSort; + + /** + * 创建人 + */ + private Long createBy; + + /** + * 创建时间 + */ + private Date createDate; + + /** + * 最后修改人 + */ + private Long updateBy; + + /** + * 最后修改时间 + */ + private Date updateDate; + + /** + * 字典值:normal正常,deleted正常 + */ + private String deleteFlag; + + /** + * 乐观锁 + */ + private Integer versions; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/constant/CaWghDataConstant.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/constant/CaWghDataConstant.java new file mode 100644 index 0000000000..0c43a0ae97 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/constant/CaWghDataConstant.java @@ -0,0 +1,48 @@ +package com.epmet.opendata.dto.constant; + +/*** + * 综治及网格化常量 + * @author work@yujt.net.cn + * @date 2022/6/8/0008 10:00 + */ +public interface CaWghDataConstant { + + int PAGE_LIMIT = 200; + + String AESKEY = "hriajrutnbghajsd"; + + String TABLESCHEMA_UNICOM = "unicom"; + String TABLESCHEMA_SHARE = "share"; + + + String UNICOM_PINGFANG = "ca_pingfang"; + String UNICOM_LOUDONG = "ca_loudong"; + String UNICOM_RESIDENT = "ca_resident"; + String UNICOM_ROTATORS = "ca_rotators"; + String UNICOM_RENTAL = "ca_rental"; + String UNICOM_BM_CATEGORY = "ca_bm_category"; + String UNICOM_SYS_DICT = "ca_sys_dict"; + + String SHARE_BASE_GRID = "wgh_base_grid"; + String SHARE_WGH_SUB = "wgh_subdistrict_office"; + String SHARE_BM_GRID = "ca_bm_grid"; + String SHARE_COMMUNITY = "wgh_community"; + String SHARE_WGH_DYWG = "wgh_dywg"; + String SHARE_WGH_JDB = "wgh_jdb"; + String SHARE_WGH_JQZ = "wgh_jqz"; + String SHARE_WGH_JXCS = "wgh_jxcs"; + String SHARE_WGH_JYZ = "wgh_jyz"; + String SHARE_WGH_SJXX = "wgh_sjxxb"; + String SHARE_WGH_SQXX = "wgh_sqxx"; + String SHARE_WGH_SZCGWGH = "wgh_szcgwgh"; + String SHARE_WGH_SZZRWG = "wgh_szzrwg"; + String SHARE_WGH_WHPDW = "wgh_whpdw"; + String SHARE_WGH_YJBMCS = "wgh_yjbmcs"; + String SHARE_WGH_YQHJZ = "wgh_yqhjz"; + + String DATA_URL_UNICON = "http://120.221.72.83:9090/bridge/unicom/page"; + String DATA_URL_SHARE = "http://120.221.72.83:9090/bridge/share/sharePage"; + + String UNICOM_CONDITION = "unicomCondition"; + String SHARE_CONDITION = "shareCondition"; +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaLoudongDetailsFormDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaLoudongDetailsFormDTO.java new file mode 100644 index 0000000000..eab041919e --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaLoudongDetailsFormDTO.java @@ -0,0 +1,17 @@ +package com.epmet.opendata.dto.form; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigInteger; + +@Data +public class CaLoudongDetailsFormDTO implements Serializable { + + private static final long serialVersionUID = -496629781476101758L; + + /** + * 楼栋id + */ + private BigInteger buildingId; +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaLoudongFormDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaLoudongFormDTO.java new file mode 100644 index 0000000000..4bc0cec51d --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaLoudongFormDTO.java @@ -0,0 +1,33 @@ +package com.epmet.opendata.dto.form; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +import java.io.Serializable; + +@Data +public class CaLoudongFormDTO implements Serializable { + + private static final long serialVersionUID = -5277855973512833181L; + + /** + * 小区名称 + */ + private String communityName; + + /** + * 楼宇名字 + */ + private String buildingName; + + /** + * 网格id + */ + private String gridId; + + private Integer page; + private Integer limit; + + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaPingFangDetailsFormDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaPingFangDetailsFormDTO.java new file mode 100644 index 0000000000..ccff047834 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaPingFangDetailsFormDTO.java @@ -0,0 +1,14 @@ +package com.epmet.opendata.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class CaPingFangDetailsFormDTO implements Serializable { + + private static final long serialVersionUID = -357459764293119751L; + + + private String buildingId; +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaPingfangFormDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaPingfangFormDTO.java new file mode 100644 index 0000000000..e98bf07580 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaPingfangFormDTO.java @@ -0,0 +1,31 @@ +package com.epmet.opendata.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class CaPingfangFormDTO implements Serializable { + + private static final long serialVersionUID = 7714897295294884648L; + + /** + * 楼栋名称 + */ + private String buildingName; + + /** + * 小区名称 + */ + private String communityName; + + /** + * 网格id + */ + private String gridId; + + private Integer page; + + private Integer limit; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRentalDetailsFormDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRentalDetailsFormDTO.java new file mode 100644 index 0000000000..f949721e55 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRentalDetailsFormDTO.java @@ -0,0 +1,16 @@ +package com.epmet.opendata.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class CaRentalDetailsFormDTO implements Serializable { + + private static final long serialVersionUID = 5574325462597735500L; + + /** + * 出租房id + */ + private String rentalId; +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRentalFormtDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRentalFormtDTO.java new file mode 100644 index 0000000000..dab0b4611a --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRentalFormtDTO.java @@ -0,0 +1,35 @@ +package com.epmet.opendata.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class CaRentalFormtDTO implements Serializable { + + private static final long serialVersionUID = -6052280300032032361L; + + /** + * 房主姓名 + */ + private String residentName; + + /** + * 房屋编号 + */ + private String houseName; + + /** + * 网格id + */ + private String gridId; + + /** + * 承租人姓名 + */ + private String renterName; + + private Integer page; + + private Integer limit; +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaResidentDetailsFormDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaResidentDetailsFormDTO.java new file mode 100644 index 0000000000..b8a88b5cd5 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaResidentDetailsFormDTO.java @@ -0,0 +1,13 @@ +package com.epmet.opendata.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class CaResidentDetailsFormDTO implements Serializable { + + private static final long serialVersionUID = 1936067831073936603L; + + private String idCard; +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaResidentFormDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaResidentFormDTO.java new file mode 100644 index 0000000000..d2303ff5e9 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaResidentFormDTO.java @@ -0,0 +1,36 @@ +package com.epmet.opendata.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class CaResidentFormDTO implements Serializable { + + private static final long serialVersionUID = 7243033732302561487L; + + private Integer page; + + private Integer limit; + + /** + * 姓名 + */ + private String residentName; + + /** + * 身份证号 + */ + private String idCard; + + /** + * 联系方式 + */ + private String telephone; + + /** + * 网格id + */ + private String gridId; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRotatorsDetailsFormDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRotatorsDetailsFormDTO.java new file mode 100644 index 0000000000..4861ef6627 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRotatorsDetailsFormDTO.java @@ -0,0 +1,16 @@ +package com.epmet.opendata.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class CaRotatorsDetailsFormDTO implements Serializable { + + private static final long serialVersionUID = -536489426327498665L; + + /** + * 身份证号 + */ + private String idCard; +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRotatorsFormDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRotatorsFormDTO.java new file mode 100644 index 0000000000..664e6f4c2f --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRotatorsFormDTO.java @@ -0,0 +1,35 @@ +package com.epmet.opendata.dto.form; + +import lombok.Data; + +import java.io.Serializable; +import java.net.Inet4Address; + +@Data +public class CaRotatorsFormDTO implements Serializable { + + private static final long serialVersionUID = 3356808153818385932L; + + /** + * 姓名 + */ + private String rotatorsName; + + /** + * 身份证号 + */ + private String idCard; + + /** + * 联系方式 + */ + private String telephone; + + /** + * 网格id + */ + private String gridId; + + private Integer page; + private Integer limit; +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/PreserVationFormDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/PreserVationFormDTO.java new file mode 100644 index 0000000000..e2cb679bf7 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/PreserVationFormDTO.java @@ -0,0 +1,41 @@ +package com.epmet.opendata.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class PreserVationFormDTO implements Serializable { + + private static final long serialVersionUID = 3489407841261413891L; + + /** + * 表名 + */ + private String tableSchema; + + /** + * 表名 + */ + private String tableName; + + /** + * 页码 + */ + private Integer pageNo; + + /** + * 每页条数 + */ + private Integer pageSize; + + /** + * 查询条件 + */ + private String whereCase; + + /** + *排序字段 + */ + private String orderBy; +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaLoudongDetailsResultDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaLoudongDetailsResultDTO.java new file mode 100644 index 0000000000..d79b6884c4 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaLoudongDetailsResultDTO.java @@ -0,0 +1,143 @@ +package com.epmet.opendata.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +@Data +public class CaLoudongDetailsResultDTO implements Serializable { + + private static final long serialVersionUID = -8076699273641714744L; + + /** + * 楼栋ID + */ + private Long buildingId; + + /** + * 楼宇类型 + */ + private String buildingType; + + /** + * 网格ID + */ + private Long gridId; + + /** + * 楼宇名称 + */ + private String buildingName; + + /** + * 用途分类 + */ + private String buildingUse; + + /** + * 楼宇状态 + */ + private String buildingStatus; + + /** + * 楼宇结构 + */ + private String buildingStructure; + + /** + * 使用现状 + */ + private String buildingUseage; + + /** + * 建筑时间 + */ + private Date constructionTime; + + /** + * 所处位置 + */ + private String buildingAddr; + + /** + * 小区(单位)名称 + */ + private String communityName; + + /** + * 楼栋长 + */ + private String buildingLeader; + + /** + * 楼层数 + */ + private Integer layerCount; + + /** + * 地下楼层数 + */ + private Integer basementLayerCount; + + /** + * 住宅开始层数 + */ + private Integer houseBeginLayer; + + /** + * 单元数 + */ + private Integer unitCount; + + /** + * 每层每单元户数 + */ + private Integer layerRoomCount; + + /** + * 总房屋数 + */ + private Integer roomCount; + + /** + * 电梯数量 + */ + private String elevatorCount; + + /** + * 建筑面积 + */ + private String buildingArea; + + /** + * 物业公司 + */ + private String buildingPmc; + + /** + * 介绍 + */ + private String buildingDesc; + + /** + * 标绘状态 + */ + private String pointStatus; + + /** + * 经度 + */ + private BigDecimal longitude; + + /** + * 纬度 + */ + private BigDecimal latitude; + + /** + * 小区主键 + */ + private String communityId; +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaLoudongResultDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaLoudongResultDTO.java new file mode 100644 index 0000000000..35b101ce32 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaLoudongResultDTO.java @@ -0,0 +1,150 @@ +package com.epmet.opendata.dto.result; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +@Data +public class CaLoudongResultDTO extends PageFormDTO implements Serializable { + + private static final long serialVersionUID = 2835612060476537433L; + + private String gridName; + + private String comName; + + private String streetName; + + /** + * 楼栋ID + */ + private Long buildingId; + + /** + * 楼宇类型 + */ + private String buildingType; + + /** + * 网格ID + */ + private Long gridId; + + /** + * 楼宇名称 + */ + private String buildingName; + + /** + * 用途分类 + */ + private String buildingUse; + + /** + * 楼宇状态 + */ + private String buildingStatus; + + /** + * 楼宇结构 + */ + private String buildingStructure; + + /** + * 使用现状 + */ + private String buildingUseage; + + /** + * 建筑时间 + */ + private Date constructionTime; + + /** + * 所处位置 + */ + private String buildingAddr; + + /** + * 小区(单位)名称 + */ + private String communityName; + + /** + * 楼栋长 + */ + private String buildingLeader; + + /** + * 楼层数 + */ + private Integer layerCount; + + /** + * 地下楼层数 + */ + private Integer basementLayerCount; + + /** + * 住宅开始层数 + */ + private Integer houseBeginLayer; + + /** + * 单元数 + */ + private Integer unitCount; + + /** + * 每层每单元户数 + */ + private Integer layerRoomCount; + + /** + * 总房屋数 + */ + private Integer roomCount; + + /** + * 电梯数量 + */ + private String elevatorCount; + + /** + * 建筑面积 + */ + private String buildingArea; + + /** + * 物业公司 + */ + private String buildingPmc; + + /** + * 介绍 + */ + private String buildingDesc; + + /** + * 标绘状态 + */ + private String pointStatus; + + /** + * 经度 + */ + private BigDecimal longitude; + + /** + * 纬度 + */ + private BigDecimal latitude; + + /** + * 小区主键 + */ + private String communityId; +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaPingFangDetailsResultDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaPingFangDetailsResultDTO.java new file mode 100644 index 0000000000..dcf821a3c0 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaPingFangDetailsResultDTO.java @@ -0,0 +1,149 @@ +package com.epmet.opendata.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +@Data +public class CaPingFangDetailsResultDTO implements Serializable { + + private static final long serialVersionUID = -6967441851106789821L; + + /** + * 楼栋ID + */ + private Long buildingId; + + /** + * 楼宇类型 + */ + private String buildingType; + + /** + * 网格ID + */ + private Long gridId; + + /** + * 楼宇名称 + */ + private String buildingName; + + /** + * 用途分类 + */ + private String buildingUse; + + /** + * 楼宇状态 + */ + private String buildingStatus; + + /** + * 楼宇结构 + */ + private String buildingStructure; + + /** + * 使用现状 + */ + private String buildingUseage; + + /** + * 建筑时间 + */ + private Date constructionTime; + + /** + * 所处位置 + */ + private String buildingAddr; + + /** + * 小区(单位)名称 + */ + private String communityName; + + /** + * 楼栋长 + */ + private String buildingLeader; + + /** + * 楼层数 + */ + private Integer layerCount; + + /** + * 地下楼层数 + */ + private Integer basementLayerCount; + + /** + * 住宅开始层数 + */ + private Integer houseBeginLayer; + + /** + * 单元数 + */ + private Integer unitCount; + + /** + * 每层每单元户数 + */ + private Integer layerRoomCount; + + /** + * 总房屋数 + */ + private Integer roomCount; + + /** + * 电梯数量 + */ + private String elevatorCount; + + /** + * 建筑面积 + */ + private String buildingArea; + + /** + * 物业公司 + */ + private String buildingPmc; + + /** + * 介绍 + */ + private String buildingDesc; + + /** + * 标绘状态 + */ + private String pointStatus; + + /** + * 经度 + */ + private BigDecimal longitude; + + /** + * 纬度 + */ + private BigDecimal latitude; + + /** + * 数据来源 + */ + private String platCode; + + /** + * 小区主键 + */ + private String communityId; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaPingfangResultDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaPingfangResultDTO.java new file mode 100644 index 0000000000..c4f1bfe23e --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaPingfangResultDTO.java @@ -0,0 +1,155 @@ +package com.epmet.opendata.dto.result; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +@Data +public class CaPingfangResultDTO extends PageFormDTO implements Serializable { + + private static final long serialVersionUID = 3689421598802326474L; + + private String gridName; + + private String comName; + + private String streetName; + + /** + * 楼栋ID + */ + private Long buildingId; + + /** + * 楼宇类型 + */ + private String buildingType; + + /** + * 网格ID + */ + private Long gridId; + + /** + * 楼宇名称 + */ + private String buildingName; + + /** + * 用途分类 + */ + private String buildingUse; + + /** + * 楼宇状态 + */ + private String buildingStatus; + + /** + * 楼宇结构 + */ + private String buildingStructure; + + /** + * 使用现状 + */ + private String buildingUseage; + + /** + * 建筑时间 + */ + private Date constructionTime; + + /** + * 所处位置 + */ + private String buildingAddr; + + /** + * 小区(单位)名称 + */ + private String communityName; + + /** + * 楼栋长 + */ + private String buildingLeader; + + /** + * 楼层数 + */ + private Integer layerCount; + + /** + * 地下楼层数 + */ + private Integer basementLayerCount; + + /** + * 住宅开始层数 + */ + private Integer houseBeginLayer; + + /** + * 单元数 + */ + private Integer unitCount; + + /** + * 每层每单元户数 + */ + private Integer layerRoomCount; + + /** + * 总房屋数 + */ + private Integer roomCount; + + /** + * 电梯数量 + */ + private String elevatorCount; + + /** + * 建筑面积 + */ + private String buildingArea; + + /** + * 物业公司 + */ + private String buildingPmc; + + /** + * 介绍 + */ + private String buildingDesc; + + /** + * 标绘状态 + */ + private String pointStatus; + + /** + * 经度 + */ + private BigDecimal longitude; + + /** + * 纬度 + */ + private BigDecimal latitude; + + /** + * 数据来源 + */ + private String platCode; + + /** + * 小区主键 + */ + private String communityId; +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaRentalDetailsResultDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaRentalDetailsResultDTO.java new file mode 100644 index 0000000000..8bd5acca1c --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaRentalDetailsResultDTO.java @@ -0,0 +1,128 @@ +package com.epmet.opendata.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +@Data +public class CaRentalDetailsResultDTO implements Serializable { + + private static final long serialVersionUID = 163050940482300773L; + + /** + * 出租房ID + */ + private Long rentalId; + + /** + * 网格ID + */ + private Long gridId; + + /** + * 房屋ID + */ + private Long houseId; + + /** + * 房屋编号 + */ + private String houseName; + + /** + * 房屋地址 + */ + private String houseAddress; + + /** + * 建筑用途 + */ + private String houseUse; + + /** + * 建筑面积(平方米) + */ + private BigDecimal houseArea; + + /** + * 证件代码 + */ + private String idType; + + /** + * 证件号码 + */ + private String idCard; + + /** + * 房主姓名 + */ + private String residentName; + + /** + * 房主联系方式 + */ + private String telephone; + + /** + * 房主现居详址 + */ + private String curliveAddress; + + /** + * 出租用途 + */ + private String rentUse; + + /** + * 隐患类型 + */ + private String troubleType; + + /** + * 承租人ID + */ + private Long renterId; + + /** + * 承租人公民身份证号码 + */ + private String renterCardNumber; + + /** + * 承租人证件类型 + */ + private Long renterCardType; + + /** + * 承租人姓名 + */ + private String renterName; + + /** + * 承租人联系方式 + */ + private String renterPhone; + + /** + * 经度 + */ + private BigDecimal longitude; + + /** + * 纬度 + */ + private BigDecimal latitude; + + /** + * 标绘状态 + */ + private String pointStatus; + + /** + * 数据来源 + */ + private String platCode; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaRentalResultDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaRentalResultDTO.java new file mode 100644 index 0000000000..b5c5b0bbd6 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaRentalResultDTO.java @@ -0,0 +1,134 @@ +package com.epmet.opendata.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +@Data +public class CaRentalResultDTO implements Serializable { + + private static final long serialVersionUID = -1721373620271590333L; + + private String gridName; + + private String comName; + + private String streetName; + + /** + * 出租房ID + */ + private Long rentalId; + + /** + * 网格ID + */ + private Long gridId; + + /** + * 房屋ID + */ + private Long houseId; + + /** + * 房屋编号 + */ + private String houseName; + + /** + * 房屋地址 + */ + private String houseAddress; + + /** + * 建筑用途 + */ + private String houseUse; + + /** + * 建筑面积(平方米) + */ + private BigDecimal houseArea; + + /** + * 证件代码 + */ + private String idType; + + /** + * 证件号码 + */ + private String idCard; + + /** + * 房主姓名 + */ + private String residentName; + + /** + * 房主联系方式 + */ + private String telephone; + + /** + * 房主现居详址 + */ + private String curliveAddress; + + /** + * 出租用途 + */ + private String rentUse; + + /** + * 隐患类型 + */ + private String troubleType; + + /** + * 承租人ID + */ + private Long renterId; + + /** + * 承租人公民身份证号码 + */ + private String renterCardNumber; + + /** + * 承租人证件类型 + */ + private Long renterCardType; + + /** + * 承租人姓名 + */ + private String renterName; + + /** + * 承租人联系方式 + */ + private String renterPhone; + + /** + * 经度 + */ + private BigDecimal longitude; + + /** + * 纬度 + */ + private BigDecimal latitude; + + /** + * 标绘状态 + */ + private String pointStatus; + + /** + * 数据来源 + */ + private String platCode; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaResidentDetailsResultDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaResidentDetailsResultDTO.java new file mode 100644 index 0000000000..20f5c86f93 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaResidentDetailsResultDTO.java @@ -0,0 +1,198 @@ +package com.epmet.opendata.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +@Data +public class CaResidentDetailsResultDTO implements Serializable { + + private static final long serialVersionUID = -7745222285619853846L; + + /** + * 人口ID + */ + private Long residentId; + + /** + * 网格ID + */ + private Long gridId; + + /** + * 人口性质 + */ + private String residentProperty; + + /** + * 居民分类 + */ + private String residentType; + + /** + * 证件类型 + */ + private String idType; + + /** + * 证件号码(公民身份证号) + */ + private String idCard; + + /** + * 姓名 + */ + private String residentName; + + /** + * 性别 + */ + private String sex; + + /** + * 出生日期 + */ + private Date birthday; + + /** + * 民族 + */ + private String nation; + + /** + * 联系方式 + */ + private String telephone; + + /** + * 户籍省 + */ + private String householdProv; + + /** + * 户籍市 + */ + private String householdCity; + + /** + * 户籍县(区) + */ + private String householdCounty; + + /** + * 户籍镇街 + */ + private String householdTown; + + /** + * 户籍社区/村 + */ + private String householdVillage; + + /** + * 户籍详址 + */ + private String householdAddressDetail; + + /** + * 现住省 + */ + private String curliveProv; + + /** + * 现住市 + */ + private String curliveCity; + + /** + * 现住县(区) + */ + private String curliveCounty; + + /** + * 现住镇街 + */ + private String curliveTown; + + /** + * 现住社区/村 + */ + private String curliveVillage; + + /** + * 现住详址 + */ + private String curliveAddressDetail; + + /** + * 籍贯省 + */ + private String nativeAddressProv; + + /** + * 籍贯市 + */ + private String nativeAddressCity; + + /** + * 籍贯县(区) + */ + private String nativeAddressCounty; + + /** + * 曾用名 + */ + private String formerName; + + /** + * 学历 + */ + private String education; + + /** + * 职业 + */ + private String occupation; + + /** + * 职业类别 + */ + private String occupationType; + + /** + * 服务处所 + */ + private String serviceAddress; + + /** + * 婚姻状况 + */ + private String marriageStatus; + + /** + * 政治面貌 + */ + private String party; + + /** + * 宗教信仰 + */ + private String religious; + + /** + * 有无皈依(已受洗) + */ + private String conversionState; + + /** + * 国籍 + */ + private String nationality; + + /** + * 数据来源 + */ + private String platCode; + +} \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaResidentResultDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaResidentResultDTO.java new file mode 100644 index 0000000000..a94247a9ba --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaResidentResultDTO.java @@ -0,0 +1,203 @@ +package com.epmet.opendata.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +@Data +public class CaResidentResultDTO implements Serializable { + + private static final long serialVersionUID = 3876909002181822355L; + + private String gridName; + + private String comName; + + private String streetName; + + /** + * 人口ID + */ + private Long residentId; + + /** + * 网格ID + */ + private Long gridId; + + /** + * 人口性质 + */ + private String residentProperty; + + /** + * 居民分类 + */ + private String residentType; + + /** + * 证件类型 + */ + private String idType; + + /** + * 证件号码(公民身份证号) + */ + private String idCard; + + /** + * 姓名 + */ + private String residentName; + + /** + * 性别 + */ + private String sex; + + /** + * 出生日期 + */ + private Date birthday; + + /** + * 民族 + */ + private String nation; + + /** + * 联系方式 + */ + private String telephone; + + /** + * 户籍省 + */ + private String householdProv; + + /** + * 户籍市 + */ + private String householdCity; + + /** + * 户籍县(区) + */ + private String householdCounty; + + /** + * 户籍镇街 + */ + private String householdTown; + + /** + * 户籍社区/村 + */ + private String householdVillage; + + /** + * 户籍详址 + */ + private String householdAddressDetail; + + /** + * 现住省 + */ + private String curliveProv; + + /** + * 现住市 + */ + private String curliveCity; + + /** + * 现住县(区) + */ + private String curliveCounty; + + /** + * 现住镇街 + */ + private String curliveTown; + + /** + * 现住社区/村 + */ + private String curliveVillage; + + /** + * 现住详址 + */ + private String curliveAddressDetail; + + /** + * 籍贯省 + */ + private String nativeAddressProv; + + /** + * 籍贯市 + */ + private String nativeAddressCity; + + /** + * 籍贯县(区) + */ + private String nativeAddressCounty; + + /** + * 曾用名 + */ + private String formerName; + + /** + * 学历 + */ + private String education; + + /** + * 职业 + */ + private String occupation; + + /** + * 职业类别 + */ + private String occupationType; + + /** + * 服务处所 + */ + private String serviceAddress; + + /** + * 婚姻状况 + */ + private String marriageStatus; + + /** + * 政治面貌 + */ + private String party; + + /** + * 宗教信仰 + */ + private String religious; + + /** + * 有无皈依(已受洗) + */ + private String conversionState; + + /** + * 国籍 + */ + private String nationality; + + /** + * 数据来源 + */ + private String platCode; +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaRotatorsDetailsResultDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaRotatorsDetailsResultDTO.java new file mode 100644 index 0000000000..7d91a14322 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaRotatorsDetailsResultDTO.java @@ -0,0 +1,213 @@ +package com.epmet.opendata.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +@Data +public class CaRotatorsDetailsResultDTO implements Serializable { + + private static final long serialVersionUID = 6450956000162367591L; + + /** + * 主键id + */ + private Long rotatorsId; + + /** + * 公民身份证号 + */ + private String idCard; + + /** + * 证件类型 + */ + private String idType; + + /** + * 姓名 + */ + private String rotatorsName; + + /** + * 曾用名 + */ + private String formerName; + + /** + * 性别 + */ + private String sex; + + /** + * 出生日期 + */ + private Date birthday; + + /** + * 民族 + */ + private String nation; + + /** + * 籍贯省 + */ + private String nativeAddressProv; + + /** + * 籍贯市 + */ + private String nativeAddressCity; + + /** + * 籍贯县(区) + */ + private String nativeAddressCountry; + + /** + * 婚姻状况 + */ + private String marriageStatus; + + /** + * 政治面貌 + */ + private String party; + + /** + * 学历 + */ + private String education; + + /** + * 宗教信仰 + */ + private String religious; + + /** + * 职业类别 + */ + private String occupationType; + + /** + * 职业 + */ + private String occupation; + + /** + * 服务处所 + */ + private String serviceAddress; + + /** + * 联系方式 + */ + private String telephone; + + /** + * 户籍地省 + */ + private String householdAddressProv; + + /** + * 户籍地市 + */ + private String householdAddressCity; + + /** + * 户籍地县(区) + */ + private String householdAddressCountry; + + /** + * 户籍地镇街 + */ + private String householdAddressTown; + + /** + * 户籍地社区/村 + */ + private String householdAddressVillage; + + /** + * 户籍门(楼)详址 + */ + private String householdAddressDetail; + + /** + * 现住地省 + */ + private String curliveAddressProv; + + /** + * 现住地市 + */ + private String curliveAddressCity; + + /** + * 现住地县(区) + */ + private String curliveAddressCountry; + + /** + * 现住地镇街 + */ + private String curliveAddressTown; + + /** + * 现住地社区/村 + */ + private String curliveAddressVillage; + + /** + * 现住门(楼)详址 + */ + private String curliveAddressDetail; + + /** + * 流入原因 + */ + private String inflowReason; + + /** + * 办证类型 + */ + private String certificateType; + + /** + * 证件号码 + */ + private String certificateNumber; + + /** + * 登记日期 + */ + private Date signDate; + + /** + * 证件到期日期 + */ + private Date endDate; + + /** + * 住所类型 + */ + private String residenceType; + + /** + * 是否重点关注人员 + */ + private String isFocusPerson; + + /** + * 数据来源编码 + */ + private String platcode; + + /** + * 网格id + */ + private Long gridId; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaRotatorsResultDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaRotatorsResultDTO.java new file mode 100644 index 0000000000..04a5895ad8 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaRotatorsResultDTO.java @@ -0,0 +1,208 @@ +package com.epmet.opendata.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +@Data +public class CaRotatorsResultDTO implements Serializable { + + private static final long serialVersionUID = -5388784241677803257L; + + private String gridName; + + private String comName; + + private String streetName; + + /** + * 主键id + */ + private Long rotatorsId; + + /** + * 公民身份证号 + */ + private String idCard; + + /** + * 证件类型 + */ + private String idType; + + /** + * 姓名 + */ + private String rotatorsName; + + /** + * 曾用名 + */ + private String formerName; + + /** + * 性别 + */ + private String sex; + + /** + * 出生日期 + */ + private Date birthday; + + /** + * 民族 + */ + private String nation; + + /** + * 籍贯省 + */ + private String nativeAddressProv; + + /** + * 籍贯市 + */ + private String nativeAddressCity; + + /** + * 籍贯县(区) + */ + private String nativeAddressCountry; + + /** + * 婚姻状况 + */ + private String marriageStatus; + + /** + * 政治面貌 + */ + private String party; + + /** + * 学历 + */ + private String education; + + /** + * 宗教信仰 + */ + private String religious; + + /** + * 职业类别 + */ + private String occupationType; + + /** + * 职业 + */ + private String occupation; + + /** + * 服务处所 + */ + private String serviceAddress; + + /** + * 联系方式 + */ + private String telephone; + + /** + * 户籍地省 + */ + private String householdAddressProv; + + /** + * 户籍地市 + */ + private String householdAddressCity; + + /** + * 户籍地县(区) + */ + private String householdAddressCountry; + + /** + * 户籍地镇街 + */ + private String householdAddressTown; + + /** + * 户籍地社区/村 + */ + private String householdAddressVillage; + + /** + * 户籍门(楼)详址 + */ + private String householdAddressDetail; + + /** + * 现住地省 + */ + private String curliveAddressProv; + + /** + * 现住地市 + */ + private String curliveAddressCity; + + /** + * 现住地县(区) + */ + private String curliveAddressCountry; + + /** + * 现住地镇街 + */ + private String curliveAddressTown; + + /** + * 现住地社区/村 + */ + private String curliveAddressVillage; + + /** + * 现住门(楼)详址 + */ + private String curliveAddressDetail; + + /** + * 流入原因 + */ + private String inflowReason; + + /** + * 办证类型 + */ + private String certificateType; + + /** + * 证件号码 + */ + private String certificateNumber; + + /** + * 登记日期 + */ + private Date signDate; + + /** + * 证件到期日期 + */ + private Date endDate; + + /** + * 住所类型 + */ + private String residenceType; + + /** + * 是否重点关注人员 + */ + private String isFocusPerson; +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/LouDongCascadeResultDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/LouDongCascadeResultDTO.java new file mode 100644 index 0000000000..37f3799090 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/LouDongCascadeResultDTO.java @@ -0,0 +1,18 @@ +package com.epmet.opendata.dto.result; + +import com.epmet.commons.tools.utils.LoudongTreeNode; +import com.epmet.commons.tools.utils.TreeNode; +import lombok.Data; + +import java.io.Serializable; + +@Data +public class LouDongCascadeResultDTO extends LoudongTreeNode implements Serializable { + + private static final long serialVersionUID = -359443782589013555L; + + private String label; + + private String value; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/BasegridDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/BasegridDTO.java new file mode 100644 index 0000000000..0180f59b47 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/BasegridDTO.java @@ -0,0 +1,64 @@ +package com.epmet.opendata.dto.wgh; + +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 BasegridDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private String coordinateInfo; + + /** + * + */ + private String gridName; + + /** + * + */ + private String subDistrictOffice; + + /** + * + */ + private String community; + + /** + * + */ + private String streetCode; + + /** + * + */ + private String gridCode; + + /** + * + */ + private String communityCode; + + /** + * + */ + private String longitude; + + /** + * + */ + private String latitude; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/BmGridDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/BmGridDTO.java new file mode 100644 index 0000000000..4c5c9869b4 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/BmGridDTO.java @@ -0,0 +1,206 @@ +package com.epmet.opendata.dto.wgh; + +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 BmGridDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 网格ID + */ + private Long gridId; + + /** + * 网格编码。人工填写,编码规则业务规定,不允许重复。 + */ + private String gridCode; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 行政区划的国标编码 + */ + private String gbCode; + + /** + * 上级网格ID + */ + private Long parentId; + + /** + * 上级网格编码 + */ + private String parentCode; + + /** + * 网格分类。1基础网格 2环保网格 3防火网格 4城管网格 5执法网格 6安监网格等 + */ + private String gridClassification; + + /** + * 网格层级。网格层级表的层级 +根据【网格层级表】的层级关系动态展示。 +查询【网格层级表】层级 条件:上层级=网格树返回的网格层级 + */ + private String gridLevel; + + /** + * 网格属性。01村庄、02小区、03企业、04学校(幼儿园)、05医院、06驻镇(街)单位、07其他 + */ + private String gridProperty; + + /** + * 是否最后一级:0否 1是 + */ + private String isEnd; + + /** + * 网格地址 + */ + private String gridAddress; + + /** + * 网格介绍 + */ + private String gridIntroduce; + + /** + * 宣传图片 + */ + private String gridPicture; + + /** + * 地图区域范围 + */ + private String reginScopeDesc; + + /** + * 展示顺序 + */ + private Integer gridSort; + + /** + * 标绘状态 + */ + private String pointStatus; + + /** + * 事件上报中心 + */ + private Long gridEmCenter; + + /** + * 初始日期 + */ + private Date gridBeginTime; + + /** + * 终止日期 + */ + private Date gridEndTime; + + /** + * 面积 + */ + private String gridArea; + + /** + * 是否有效 + */ + private String isValid; + + /** + * 创建人 + */ + private Long createBy; + + /** + * 创建时间 + */ + private Date createDate; + + /** + * + */ + private Long updateBy; + + /** + * + */ + private Date updateDate; + + /** + * 删除状态: 字典值:normal正常,删除deleted + */ + private String deleteFlag; + + /** + * 乐观锁 + */ + private Integer versions; + + /** + * 网格内人口规模 + */ + private String attribute1; + + /** + * 是否成立网格党支部或网格党小组 + */ + private String attribute2; + + /** + * 网格党组织类型 + */ + private String attribute3; + + /** + * 党组织编码 + */ + private String attribute4; + + /** + * 扩展字段 + */ + private String attribute5; + + /** + * 扩展字段 + */ + private Long attribute6; + + /** + * 扩展字段 + */ + private Long attribute7; + + /** + * 扩展字段 + */ + private Long attribute8; + + /** + * 扩展字段 + */ + private Date attribute9; + + /** + * 扩展字段 + */ + private Date attribute10; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/CommunityDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/CommunityDTO.java new file mode 100644 index 0000000000..de6db91652 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/CommunityDTO.java @@ -0,0 +1,54 @@ +package com.epmet.opendata.dto.wgh; + +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 CommunityDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private String coordinateInfo; + + /** + * + */ + private String streetName; + + /** + * + */ + private String streetCode; + + /** + * + */ + private String communityName; + + /** + * + */ + private String communityCode; + + /** + * + */ + private String longitude; + + /** + * + */ + private String latitude; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/SubdistrictOfficeDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/SubdistrictOfficeDTO.java new file mode 100644 index 0000000000..ccb89c4ca0 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/SubdistrictOfficeDTO.java @@ -0,0 +1,44 @@ +package com.epmet.opendata.dto.wgh; + +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 SubdistrictOfficeDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private String coordinateInfo; + + /** + * + */ + private String streetName; + + /** + * + */ + private String streetCode; + + /** + * + */ + private String longitude; + + /** + * + */ + private String latitude; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghDywgDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghDywgDTO.java new file mode 100644 index 0000000000..b3dbfaad42 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghDywgDTO.java @@ -0,0 +1,74 @@ +package com.epmet.opendata.dto.wgh; + +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 WghDywgDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private Integer objectid; + + /** + * 网格名称 + */ + private String bgname; + + /** + * 所属街镇 + */ + private String street; + + /** + * 所属社区 + */ + private String community; + + /** + * 网格面积 + */ + private Double bgsqua; + + /** + * 初始时间 + */ + private Date ordate; + + /** + * 变更时间 + */ + private Date chdate; + + /** + * 备注 + */ + private String note; + + /** + * + */ + private String contacts; + + /** + * 联系电话 + */ + private String telphone; + + /** + * 插入日期 + */ + private Date insertTime; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghJdbDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghJdbDTO.java new file mode 100644 index 0000000000..307df64c6a --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghJdbDTO.java @@ -0,0 +1,54 @@ +package com.epmet.opendata.dto.wgh; + +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 WghJdbDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private String objectid1; + + /** + * + */ + private String objectid; + + /** + * 街道名称 + */ + private String mc; + + /** + * 责任人 + */ + private String personInCharge; + + /** + * 联系电话 + */ + private String phone; + + /** + * + */ + private Double shapeLeng; + + /** + * 插入日期 + */ + private Date insertTime; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghJqzDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghJqzDTO.java new file mode 100644 index 0000000000..26d20c8bbc --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghJqzDTO.java @@ -0,0 +1,124 @@ +package com.epmet.opendata.dto.wgh; + +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 WghJqzDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private Integer objectid; + + /** + * 序号 + */ + private String xh; + + /** + * 单位名称 + */ + private String name; + + /** + * + */ + private Double area; + + /** + * 周边安全间距 + */ + private String space; + + /** + * 存在问题 + */ + private String problem; + + /** + * 危险源类型 + */ + private String type; + + /** + * 经营地址 + */ + private String location; + + /** + * 负责人 + */ + private String principal; + + /** + * 联系电话 + */ + private String phone; + + /** + * 企业类型 + */ + private String qtype; + + /** + * 危化品种类 + */ + private String wtype; + + /** + * 等级 + */ + private String level; + + /** + * 性质 + */ + private String nature; + + /** + * 备注 + */ + private String remarks; + + /** + * + */ + private String dwmcjc; + + /** + * + */ + private String layer; + + /** + * + */ + private String ssjdb; + + /** + * 数量 + */ + private String amount; + + /** + * 应急措施 + */ + private String yjcs; + + /** + * 插入日期 + */ + private Date insertTime; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghJxcsDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghJxcsDTO.java new file mode 100644 index 0000000000..2c2b4e0584 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghJxcsDTO.java @@ -0,0 +1,119 @@ +package com.epmet.opendata.dto.wgh; + +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 WghJxcsDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private String objectid; + + /** + * + */ + private String jsonInfo; + + /** + * + */ + private String creatTime; + + /** + * 所属街道 + */ + private String ssjd; + + /** + * 所属社区 + */ + private String sssq; + + /** + * 道路名 + */ + private String dlm; + + /** + * 门牌号 + */ + private String mph; + + /** + * 名称 + */ + private String name; + + /** + * + */ + private String ztlx; + + /** + * 子类型 + */ + private String type; + + /** + * 统一社会信用代码 + */ + private String xydm; + + /** + * 联系人 + */ + private String lxr; + + /** + * 联系电话 + */ + private String lxdh; + + /** + * + */ + private String userName; + + /** + * 备注 + */ + private String bz; + + /** + * + */ + private String available; + + /** + * + */ + private String id; + + /** + * 编辑人ID + */ + private String userId; + + /** + * 编辑人姓名 + */ + private String updateTim; + + /** + * 插入日期 + */ + private String insertTime; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghJyzDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghJyzDTO.java new file mode 100644 index 0000000000..2d38d831da --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghJyzDTO.java @@ -0,0 +1,124 @@ +package com.epmet.opendata.dto.wgh; + +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 WghJyzDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private Integer objectid; + + /** + * 序号 + */ + private String xh; + + /** + * 单位名称 + */ + private String name; + + /** + * + */ + private Double area; + + /** + * 周边安全间距 + */ + private String space; + + /** + * 存在问题 + */ + private String problem; + + /** + * 危险源类型 + */ + private String type; + + /** + * 经营地址 + */ + private String location; + + /** + * 负责人 + */ + private String principal; + + /** + * 联系电话 + */ + private String phone; + + /** + * 企业类型 + */ + private String qtype; + + /** + * 危化品种类 + */ + private String wtype; + + /** + * 等级 + */ + private String level; + + /** + * 性质 + */ + private String nature; + + /** + * 备注 + */ + private String remarks; + + /** + * + */ + private String dwmcjc; + + /** + * + */ + private String layer; + + /** + * + */ + private String ssjdb; + + /** + * 数量 + */ + private String amount; + + /** + * 应急措施 + */ + private String yjcs; + + /** + * 插入日期 + */ + private Date insertTime; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghSjxxbDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghSjxxbDTO.java new file mode 100644 index 0000000000..3ae1d2aa4e --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghSjxxbDTO.java @@ -0,0 +1,94 @@ +package com.epmet.opendata.dto.wgh; + +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 WghSjxxbDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private Integer objectid1; + + /** + * + */ + private Double objectid; + + /** + * 事件来源 + */ + private String infosourcename; + + /** + * 事件类别 + */ + private String infotypename; + + /** + * 社区名称 + */ + private String communityname; + + /** + * 事件描述 + */ + private String description; + + /** + * + */ + private String taskid; + + /** + * + */ + private String casesn; + + /** + * 事件地址 + */ + private String address; + + /** + * 事件状态 + */ + private String statusname; + + /** + * + */ + private String infobcname; + + /** + * + */ + private String infoscname; + + /** + * 街道名称 + */ + private String streetname; + + /** + * + */ + private Date discovertime; + + /** + * 插入日期 + */ + private Date insertTime; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghSqxxDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghSqxxDTO.java new file mode 100644 index 0000000000..5b859c277a --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghSqxxDTO.java @@ -0,0 +1,139 @@ +package com.epmet.opendata.dto.wgh; + +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 WghSqxxDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private Integer objectid; + + /** + * + */ + private Double commuarea; + + /** + * + */ + private String belongto; + + /** + * + */ + private String contacts; + + /** + * + */ + private String telphone; + + /** + * + */ + private Double numberOfGrid; + + /** + * + */ + private String streetCode; + + /** + * + */ + private String communityCode; + + /** + * + */ + private String commname; + + /** + * + */ + private String jdcjgb; + + /** + * + */ + private String wgz; + + /** + * + */ + private String policeName; + + /** + * + */ + private Double trafficPolicePhone; + + /** + * + */ + private String trafficPoliceCompany; + + /** + * + */ + private String peoPoliceName; + + /** + * + */ + private String peoPolicePhone; + + /** + * + */ + private String policeStation; + + /** + * + */ + private String wgy; + + /** + * + */ + private String jdlxks; + + /** + * + */ + private String ddy; + + /** + * + */ + private String zhzfxm; + + /** + * + */ + private String zhzfdh; + + /** + * + */ + private String zhzfbm; + + /** + * + */ + private Date insertTime; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghSzcgwghDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghSzcgwghDTO.java new file mode 100644 index 0000000000..54de99914c --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghSzcgwghDTO.java @@ -0,0 +1,49 @@ +package com.epmet.opendata.dto.wgh; + +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 WghSzcgwghDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private Integer objectid; + + /** + * 备注 + */ + private String note; + + /** + * + */ + private String sssq; + + /** + * + */ + private String ssjd; + + /** + * + */ + private String id; + + /** + * + */ + private Date insertTime; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghSzzrwgDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghSzzrwgDTO.java new file mode 100644 index 0000000000..e83e9eae4a --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghSzzrwgDTO.java @@ -0,0 +1,49 @@ +package com.epmet.opendata.dto.wgh; + +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 WghSzzrwgDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private Integer objectid; + + /** + * 备注 + */ + private String note; + + /** + * 责任单位 + */ + private String name; + + /** + * 监管人 + */ + private String principal; + + /** + * 联系方式 + */ + private String phone; + + /** + * 插入日期 + */ + private Date insertTime; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghWhpdwDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghWhpdwDTO.java new file mode 100644 index 0000000000..40c4c8b154 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghWhpdwDTO.java @@ -0,0 +1,134 @@ +package com.epmet.opendata.dto.wgh; + +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 WghWhpdwDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private Integer objectid; + + /** + * 序号 + */ + private String xh; + + /** + * 单位名称 + */ + private String name; + + /** + * + */ + private Double area; + + /** + * 周边安全间距 + */ + private String space; + + /** + * 存在问题 + */ + private String problem; + + /** + * 危险源类型 + */ + private String type; + + /** + * 经营地址 + */ + private String location; + + /** + * 安全负责人 + */ + private String person; + + /** + * 联系电话 + */ + private String phone; + + /** + * 企业类型 + */ + private String qtype; + + /** + * 危化品种类 + */ + private String wtype; + + /** + * 数量 + */ + private String amount; + + /** + * 等级 + */ + private String grade; + + /** + * 性质 + */ + private String natrue; + + /** + * 应急措施 + */ + private String yjcs; + + /** + * 备注 + */ + private String note; + + /** + * + */ + private String dwmcjc; + + /** + * 主要负责人 + */ + private String principal; + + /** + * 用途 + */ + private String user; + + /** + * + */ + private String layer; + + /** + * + */ + private String ssjdb; + + /** + * 插入日期 + */ + private Date insertTime; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghYjbmcsDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghYjbmcsDTO.java new file mode 100644 index 0000000000..b217584fa9 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghYjbmcsDTO.java @@ -0,0 +1,84 @@ +package com.epmet.opendata.dto.wgh; + +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 WghYjbmcsDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private Integer objectid; + + /** + * + */ + private String grade; + + /** + * 地址 + */ + private String adress; + + /** + * 面积(㎡) + */ + private String area; + + /** + * 容纳人数 + */ + private String rnns; + + /** + * + */ + private String sfbsp; + + /** + * + */ + private String zysbcs; + + /** + * + */ + private String fzr; + + /** + * + */ + private String zgdw; + + /** + * + */ + private String name; + + /** + * + */ + private String fzrtel; + + /** + * + */ + private String ssjd; + + /** + * + */ + private Date insertTime; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghYqhjzDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghYqhjzDTO.java new file mode 100644 index 0000000000..d070697218 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghYqhjzDTO.java @@ -0,0 +1,124 @@ +package com.epmet.opendata.dto.wgh; + +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 WghYqhjzDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private Integer objectid; + + /** + * 序号 + */ + private String xh; + + /** + * 单位名称 + */ + private String name; + + /** + * + */ + private Double area; + + /** + * 周边安全间距 + */ + private String space; + + /** + * 危险源类型 + */ + private String type; + + /** + * 经营地址 + */ + private String location; + + /** + * 负责人 + */ + private String principal; + + /** + * 联系电话 + */ + private String phone; + + /** + * 企业类型 + */ + private String qtype; + + /** + * 危化品种类 + */ + private String wtype; + + /** + * 数量 + */ + private String amount; + + /** + * 等级 + */ + private String grade; + + /** + * 性质 + */ + private String natrue; + + /** + * 应急措施 + */ + private String yjcs; + + /** + * 备注 + */ + private String note; + + /** + * 简称 + */ + private String dwmcjc; + + /** + * 所在图层 + */ + private String layer; + + /** + * 所属街道办 + */ + private String ssjdb; + + /** + * 存在问题 + */ + private String problem; + + /** + * 插入日期 + */ + private Date insertTime; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/feign/GuardarDatosFeignClient.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/feign/GuardarDatosFeignClient.java new file mode 100644 index 0000000000..62aa02fd0c --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/feign/GuardarDatosFeignClient.java @@ -0,0 +1,14 @@ +package com.epmet.opendata.feign; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.feign.impl.GuardarDatosFeignClientFallBack; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PostMapping; + +@FeignClient(name = "open-data-worker-server", fallback = GuardarDatosFeignClientFallBack.class) +public interface GuardarDatosFeignClient { + + @PostMapping("/opendata/caTask/guardarDatosTask") + Result guardarDatosTask(PreserVationFormDTO dto); +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/feign/impl/GuardarDatosFeignClientFallBack.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/feign/impl/GuardarDatosFeignClientFallBack.java new file mode 100644 index 0000000000..4a688e5ae5 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/feign/impl/GuardarDatosFeignClientFallBack.java @@ -0,0 +1,17 @@ +package com.epmet.opendata.feign.impl; + +import com.epmet.commons.tools.utils.ModuleUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.feign.GuardarDatosFeignClient; +import org.springframework.stereotype.Component; + +@Component +public class GuardarDatosFeignClientFallBack implements GuardarDatosFeignClient { + + @Override + public Result guardarDatosTask(PreserVationFormDTO dto) { + return ModuleUtils.feignConError("open-data-worker", "guardarDatosTask", dto); + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaBmCategoryController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaBmCategoryController.java new file mode 100644 index 0000000000..a5a26e65a8 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaBmCategoryController.java @@ -0,0 +1,96 @@ +package com.epmet.opendata.controller; + +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +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.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; + +import com.epmet.opendata.dto.ca.CaBmCategoryDTO; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.excel.CaBmCategoryExcel; +import com.epmet.opendata.service.CaBmCategoryService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 多级类型信息表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-16 + */ +@RestController +@RequestMapping("caBmCategory") +public class CaBmCategoryController { + + @Autowired + private CaBmCategoryService caBmCategoryService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params) { + PageData page = caBmCategoryService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET}) + public Result get(@PathVariable("id") String id) { + CaBmCategoryDTO data = caBmCategoryService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody CaBmCategoryDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + caBmCategoryService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody CaBmCategoryDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + caBmCategoryService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids) { + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + caBmCategoryService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = caBmCategoryService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, CaBmCategoryExcel.class); + } + + /** + * 调用ruoyi接口存储数据 + * + * @param dto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/2 10:02 + */ + @PostMapping("/preserBmCategoryVation") + public Result getPreserBmCategoryVation(@RequestBody PreserVationFormDTO dto) { + caBmCategoryService.preserBmCategoryVation(dto); + return new Result(); + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaLoudongController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaLoudongController.java new file mode 100644 index 0000000000..1a24078b95 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaLoudongController.java @@ -0,0 +1,134 @@ +package com.epmet.opendata.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; +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.opendata.dto.ca.CaLoudongDTO; +import com.epmet.opendata.dto.form.CaLoudongDetailsFormDTO; +import com.epmet.opendata.dto.form.CaLoudongFormDTO; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.result.CaLoudongDetailsResultDTO; +import com.epmet.opendata.dto.result.CaLoudongResultDTO; +import com.epmet.opendata.dto.result.LouDongCascadeResultDTO; +import com.epmet.opendata.excel.CaLoudongExcel; +import com.epmet.opendata.service.CaLoudongService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 楼栋基本信息表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-31 + */ +@RestController +@RequestMapping("caLoudong") +public class CaLoudongController { + + @Autowired + private CaLoudongService caLoudongService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params) { + PageData page = caLoudongService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET}) + public Result get(@PathVariable("id") String id) { + CaLoudongDTO data = caLoudongService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody CaLoudongDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + caLoudongService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody CaLoudongDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + caLoudongService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids) { + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + caLoudongService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = caLoudongService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, CaLoudongExcel.class); + } + + /** + * 楼栋基本信息分页 + * + * @param dto + * @param tokenDto + * @return com.epmet.commons.tools.utils.Result> + * @author LZN + * @date 2022/5/31 18:57 + */ + @PostMapping("getPage") + public Result> getPage(@RequestBody CaLoudongFormDTO dto, @LoginUser TokenDto tokenDto) { + PageData data = caLoudongService.getPage(dto); + return new Result>().ok(data); + } + + /** + * 楼栋基本信息详情 + * + * @param dto + * @param tokenDto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/1 9:37 + */ + @PostMapping("getLouDongDetails") + public Result getLouDongDetails(@RequestBody CaLoudongDetailsFormDTO dto, @LoginUser TokenDto tokenDto) { + CaLoudongDetailsResultDTO result = caLoudongService.getLouDongDetails(dto); + return new Result().ok(result); + } + + /** + * 楼栋调用ruoyi接口存储数据 + * + * @param dto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/2 10:02 + */ + @PostMapping("/preserLouDongVation") + public Result getPreserLouDongVation(@RequestBody PreserVationFormDTO dto) { + caLoudongService.preserLouDongVation(dto); + return new Result(); + } + + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaPingfangController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaPingfangController.java new file mode 100644 index 0000000000..3ef18ebada --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaPingfangController.java @@ -0,0 +1,129 @@ +package com.epmet.opendata.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; +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.opendata.dto.ca.CaPingfangDTO; +import com.epmet.opendata.dto.form.CaPingFangDetailsFormDTO; +import com.epmet.opendata.dto.form.CaPingfangFormDTO; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.result.CaPingFangDetailsResultDTO; +import com.epmet.opendata.excel.CaPingfangExcel; +import com.epmet.opendata.service.CaPingfangService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-31 + */ +@RestController +@RequestMapping("caPingfang") +public class CaPingfangController { + + @Autowired + private CaPingfangService caPingfangService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params) { + PageData page = caPingfangService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET}) + public Result get(@PathVariable("id") String id) { + CaPingfangDTO data = caPingfangService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody CaPingfangDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + caPingfangService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody CaPingfangDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + caPingfangService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids) { + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + caPingfangService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = caPingfangService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, CaPingfangExcel.class); + } + + /** + * 平房基础信息分页 + * + * @param dto + * @param tokenDto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/5/31 18:58 + */ + @PostMapping("getPage") + public Result getPage(@RequestBody CaPingfangFormDTO dto, @LoginUser TokenDto tokenDto) { + PageData data = caPingfangService.getPage(dto); + return new Result().ok(data); + } + + /** + * 平房详情 + * + * @param dto + * @param tokenDto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/2 14:04 + */ + @PostMapping("getPingFangDetails") + public Result getPingFangDetails(@RequestBody CaPingFangDetailsFormDTO dto, @LoginUser TokenDto tokenDto) { + CaPingFangDetailsResultDTO result = caPingfangService.getPingFangDetails(dto); + return new Result().ok(result); + } + + /** + * 平房调用ruoyi接口存储数据 + * + * @param dto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/2 10:20 + */ + @PostMapping("/preserPingFangVation") + public Result getPreserPingFangVation(@RequestBody PreserVationFormDTO dto) { + caPingfangService.preserPingFangVation(dto); + return new Result(); + } + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRentalController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRentalController.java new file mode 100644 index 0000000000..ac31858960 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRentalController.java @@ -0,0 +1,131 @@ +package com.epmet.opendata.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; +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.opendata.dto.ca.CaRentalDTO; +import com.epmet.opendata.dto.form.CaRentalDetailsFormDTO; +import com.epmet.opendata.dto.form.CaRentalFormtDTO; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.result.CaRentalDetailsResultDTO; +import com.epmet.opendata.dto.result.CaRentalResultDTO; +import com.epmet.opendata.excel.CaRentalExcel; +import com.epmet.opendata.service.CaRentalService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 出租房信息表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-31 + */ +@RestController +@RequestMapping("caRental") +public class CaRentalController { + + @Autowired + private CaRentalService caRentalService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params) { + PageData page = caRentalService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET}) + public Result get(@PathVariable("id") String id) { + CaRentalDTO data = caRentalService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody CaRentalDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + caRentalService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody CaRentalDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + caRentalService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids) { + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + caRentalService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = caRentalService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, CaRentalExcel.class); + } + + /** + * 出租房信息分页 + * + * @param dto + * @param tokenDto + * @return com.epmet.commons.tools.utils.Result> + * @author LZN + * @date 2022/5/31 18:38 + */ + @PostMapping("getPage") + public Result> getPage(@RequestBody CaRentalFormtDTO dto, @LoginUser TokenDto tokenDto) { + PageData data = caRentalService.getPage(dto); + return new Result>().ok(data); + } + + /** + * 出租房详情 + * + * @param dto + * @param tokenDto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/2 14:53 + */ + @PostMapping("getRentalDetails") + public Result getRentalDetails(@RequestBody CaRentalDetailsFormDTO dto, @LoginUser TokenDto tokenDto) { + CaRentalDetailsResultDTO result = caRentalService.getRentalDetails(dto); + return new Result().ok(result); + } + + /** + * 出租房调用ruoyi接口存储数据 + * + * @param dto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/2 10:31 + */ + @PostMapping("/preserRentalVation") + public Result getPreserRentalVation(@RequestBody PreserVationFormDTO dto) { + caRentalService.preserRentalVation(dto); + return new Result(); + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaResidentController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaResidentController.java new file mode 100644 index 0000000000..ac27374d80 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaResidentController.java @@ -0,0 +1,130 @@ +package com.epmet.opendata.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; +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.opendata.dto.ca.CaResidentDTO; +import com.epmet.opendata.dto.form.CaResidentDetailsFormDTO; +import com.epmet.opendata.dto.form.CaResidentFormDTO; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.result.CaResidentDetailsResultDTO; +import com.epmet.opendata.dto.result.CaResidentResultDTO; +import com.epmet.opendata.excel.CaResidentExcel; +import com.epmet.opendata.service.CaResidentService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 人口基本信息表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-31 + */ +@RestController +@RequestMapping("caResident") +public class CaResidentController { + + @Autowired + private CaResidentService caResidentService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params) { + PageData page = caResidentService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET}) + public Result get(@PathVariable("id") String id) { + CaResidentDTO data = caResidentService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody CaResidentDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + caResidentService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody CaResidentDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + caResidentService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids) { + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + caResidentService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = caResidentService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, CaResidentExcel.class); + } + + /** + * 人口基本信息分页 + * + * @param dto + * @param tokenDto + * @return com.epmet.commons.tools.utils.Result> + * @author LZN + * @date 2022/5/31 18:59 + */ + @PostMapping("getPage") + public Result> getPage(@RequestBody CaResidentFormDTO dto, @LoginUser TokenDto tokenDto) { + PageData data = caResidentService.getPage(dto); + return new Result>().ok(data); + } + + /** + * 人口基本信息详情 + * + * @param dto + * @param tokenDto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/2 15:17 + */ + @PostMapping("getResidentDetails") + public Result getResidentDetails(@RequestBody CaResidentDetailsFormDTO dto, @LoginUser TokenDto tokenDto) { + CaResidentDetailsResultDTO result = caResidentService.getResidentDetails(dto); + return new Result().ok(result); + } + + /** + * 人口基本信息调用ruoyi接口存储数据 + * + * @param dto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/2 10:47 + */ + @PostMapping("/preserResidentVation") + public Result getPreserResidentVation(@RequestBody PreserVationFormDTO dto) { + caResidentService.preserResidentVation(dto); + return new Result(); + } +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRotatorsController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRotatorsController.java new file mode 100644 index 0000000000..8072b7fbb5 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRotatorsController.java @@ -0,0 +1,132 @@ +package com.epmet.opendata.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; +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.opendata.dto.ca.CaRotatorsDTO; +import com.epmet.opendata.dto.form.CaRotatorsDetailsFormDTO; +import com.epmet.opendata.dto.form.CaRotatorsFormDTO; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.result.CaRotatorsDetailsResultDTO; +import com.epmet.opendata.dto.result.CaRotatorsResultDTO; +import com.epmet.opendata.excel.CaRotatorsExcel; +import com.epmet.opendata.service.CaRotatorsService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 流动人口表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-31 + */ +@RestController +@RequestMapping("caRotators") +public class CaRotatorsController { + + @Autowired + private CaRotatorsService caRotatorsService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params) { + PageData page = caRotatorsService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET}) + public Result get(@PathVariable("id") String id) { + CaRotatorsDTO data = caRotatorsService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody CaRotatorsDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + caRotatorsService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody CaRotatorsDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + caRotatorsService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids) { + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + caRotatorsService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = caRotatorsService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, CaRotatorsExcel.class); + } + + /** + * 流动人口分页 + * + * @param dto + * @param tokenDto + * @return com.epmet.commons.tools.utils.Result> + * @author LZN + * @date 2022/5/31 19:00 + */ + @PostMapping("getPage") + public Result> getPage(@RequestBody CaRotatorsFormDTO dto, @LoginUser TokenDto tokenDto) { + PageData data = caRotatorsService.getPage(dto); + return new Result>().ok(data); + } + + /** + * 流动人口详情 + * + * @param dto + * @param tokenDto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/2 15:33 + */ + @PostMapping("getRotatorsDetails") + public Result getRotatorsDetails(@RequestBody CaRotatorsDetailsFormDTO dto, @LoginUser TokenDto tokenDto) { + CaRotatorsDetailsResultDTO result = caRotatorsService.getRotatorsDetails(dto); + return new Result().ok(result); + } + + /** + * 流动人口调用ruoyi接口存储数据 + * + * @param dto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/2 11:00 + */ + @PostMapping("/preserRotatorsVation") + public Result getPreserRotatorsVation(@RequestBody PreserVationFormDTO dto) { + caRotatorsService.preserRotatorsVation(dto); + return new Result(); + } + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaSysDictController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaSysDictController.java new file mode 100644 index 0000000000..0964a32a69 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaSysDictController.java @@ -0,0 +1,96 @@ +package com.epmet.opendata.controller; + +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +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.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; + +import com.epmet.opendata.dto.ca.CaSysDictDTO; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.excel.CaSysDictExcel; +import com.epmet.opendata.service.CaSysDictService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 字典信息表,字典值和字典组均存入此表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-16 + */ +@RestController +@RequestMapping("caSysDict") +public class CaSysDictController { + + @Autowired + private CaSysDictService caSysDictService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params) { + PageData page = caSysDictService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET}) + public Result get(@PathVariable("id") String id) { + CaSysDictDTO data = caSysDictService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody CaSysDictDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + caSysDictService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody CaSysDictDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + caSysDictService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids) { + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + caSysDictService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = caSysDictService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, CaSysDictExcel.class); + } + + /** + * 调用ruoyi接口存储数据 + * + * @param dto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/2 10:02 + */ + @PostMapping("/preserSysdictVation") + public Result getPreserSysdictVation(@RequestBody PreserVationFormDTO dto) { + caSysDictService.preserSysdictVation(dto); + return new Result(); + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaTaskController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaTaskController.java new file mode 100644 index 0000000000..97c77cd539 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaTaskController.java @@ -0,0 +1,33 @@ +package com.epmet.opendata.controller; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.service.GuardarDatosTaskService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 定时任务 + * + * @param + * @author LZN + * @return + * @date 2022/6/7 15:54 + */ +@RestController +@RequestMapping("caTask") +public class CaTaskController { + + @Autowired + private GuardarDatosTaskService taskService; + + @PostMapping("guardarDatosTask") + public Result guardarDatosTask(@RequestBody PreserVationFormDTO dto) { + taskService.guardarDatosTask(dto); + return new Result(); + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghBaseGridController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghBaseGridController.java new file mode 100644 index 0000000000..d537ae63e9 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghBaseGridController.java @@ -0,0 +1,96 @@ +package com.epmet.opendata.controller; + +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +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.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.BasegridDTO; +import com.epmet.opendata.excel.WghBaseGridExcel; +import com.epmet.opendata.service.WghBaseGridService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@RestController +@RequestMapping("basegrid") +public class WghBaseGridController { + + @Autowired + private WghBaseGridService basegridService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = basegridService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + BasegridDTO data = basegridService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody BasegridDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + basegridService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody BasegridDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + basegridService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + basegridService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = basegridService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, WghBaseGridExcel.class); + } + + /** + * 调用ruoyi存储基础网格的数据 + * + * @param dto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/14 13:40 + */ + @PostMapping("/preserBaseGridVation") + public Result getPreserLouDongVation(@RequestBody PreserVationFormDTO dto) { + basegridService.preserBaseGridVation(dto); + return new Result(); + } + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghCommunityController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghCommunityController.java new file mode 100644 index 0000000000..90ff0ca529 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghCommunityController.java @@ -0,0 +1,93 @@ +package com.epmet.opendata.controller; + +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +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.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.CommunityDTO; +import com.epmet.opendata.excel.WghCommunityExcel; +import com.epmet.opendata.service.WghCommunityService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@RestController +@RequestMapping("community") +public class WghCommunityController { + + @Autowired + private WghCommunityService communityService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params) { + PageData page = communityService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET}) + public Result get(@PathVariable("id") String id) { + CommunityDTO data = communityService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody CommunityDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + communityService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody CommunityDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + communityService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids) { + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + communityService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = communityService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, WghCommunityExcel.class); + } + + /** + * 调用ruoyi接口存储社区数据 + * + * @param dto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/14 15:02 + */ + @PostMapping("preserCommunityVation") + public Result getPreserCommunityVation(@RequestBody PreserVationFormDTO dto) { + communityService.getPreserCommunityVation(dto); + return new Result(); + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghDywgController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghDywgController.java new file mode 100644 index 0000000000..90f910d9c2 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghDywgController.java @@ -0,0 +1,96 @@ +package com.epmet.opendata.controller; + +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +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.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; + +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.WghDywgDTO; +import com.epmet.opendata.excel.WghDywgExcel; +import com.epmet.opendata.service.WghDywgService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 单元网格 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@RestController +@RequestMapping("wghDywg") +public class WghDywgController { + + @Autowired + private WghDywgService wghDywgService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = wghDywgService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + WghDywgDTO data = wghDywgService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody WghDywgDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + wghDywgService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody WghDywgDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + wghDywgService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + wghDywgService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = wghDywgService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, WghDywgExcel.class); + } + + /** + * 调用ruoyi接口获取dywg数据 + * + * @param dto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/14 15:11 + */ + @PostMapping("preserDywgVation") + public Result getPreserDywgVation(@RequestBody PreserVationFormDTO dto) { + wghDywgService.getPreserDywgVation(dto); + return new Result(); + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghJdbController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghJdbController.java new file mode 100644 index 0000000000..643bf049ca --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghJdbController.java @@ -0,0 +1,96 @@ +package com.epmet.opendata.controller; + +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +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.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; + +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.WghJdbDTO; +import com.epmet.opendata.excel.WghJdbExcel; +import com.epmet.opendata.service.WghJdbService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 街道办 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@RestController +@RequestMapping("wghJdb") +public class WghJdbController { + + @Autowired + private WghJdbService wghJdbService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params) { + PageData page = wghJdbService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET}) + public Result get(@PathVariable("id") String id) { + WghJdbDTO data = wghJdbService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody WghJdbDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + wghJdbService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody WghJdbDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + wghJdbService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids) { + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + wghJdbService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = wghJdbService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, WghJdbExcel.class); + } + + /** + * 调用ruoyi接口获取wgh_jdb数据 + * + * @param dto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/14 15:31 + */ + @PostMapping("/preserWghJdbVation") + public Result getPreserWghJdbVation(@RequestBody PreserVationFormDTO dto) { + wghJdbService.getPreserWghJdbVation(dto); + return new Result(); + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghJqzController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghJqzController.java new file mode 100644 index 0000000000..bb38ffc0ca --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghJqzController.java @@ -0,0 +1,97 @@ +package com.epmet.opendata.controller; + +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +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.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; + +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.WghJqzDTO; +import com.epmet.opendata.excel.WghJqzExcel; +import com.epmet.opendata.service.WghJqzService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 加气站信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@RestController +@RequestMapping("wghJqz") +public class WghJqzController { + + @Autowired + private WghJqzService wghJqzService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = wghJqzService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + WghJqzDTO data = wghJqzService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody WghJqzDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + wghJqzService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody WghJqzDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + wghJqzService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + wghJqzService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = wghJqzService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, WghJqzExcel.class); + } + + /** + * 调用ruoyi接口存储wgh_jqz数据 + * + * @param dto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/14 15:39 + */ + @PostMapping("/preserWghjqzVation") + public Result getPreserWghjqzVation(@RequestBody PreserVationFormDTO dto) { + wghJqzService.getPreserWghjqzVation(dto); + return new Result(); + } + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghJxcsController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghJxcsController.java new file mode 100644 index 0000000000..c392595534 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghJxcsController.java @@ -0,0 +1,95 @@ +package com.epmet.opendata.controller; + +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +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.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.WghJxcsDTO; +import com.epmet.opendata.excel.WghJxcsExcel; +import com.epmet.opendata.service.WghJxcsService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 九小场所信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@RestController +@RequestMapping("wghJxcs") +public class WghJxcsController { + + @Autowired + private WghJxcsService wghJxcsService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = wghJxcsService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + WghJxcsDTO data = wghJxcsService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody WghJxcsDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + wghJxcsService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody WghJxcsDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + wghJxcsService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + wghJxcsService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = wghJxcsService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, WghJxcsExcel.class); + } + + /** + * 调用ruoyi接口存储wgh_jxcs数据 + * + * @param dto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/14 15:46 + */ + @PostMapping("/preserWghJxcsVation") + public Result getPreserWghJxcsVation(@RequestBody PreserVationFormDTO dto) { + wghJxcsService.preserWghJxcsVation(dto); + return new Result(); + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghJyzController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghJyzController.java new file mode 100644 index 0000000000..2cb21796ad --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghJyzController.java @@ -0,0 +1,95 @@ +package com.epmet.opendata.controller; + +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +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.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.WghJyzDTO; +import com.epmet.opendata.excel.WghJyzExcel; +import com.epmet.opendata.service.WghJyzService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 加油站 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@RestController +@RequestMapping("wghJyz") +public class WghJyzController { + + @Autowired + private WghJyzService wghJyzService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = wghJyzService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + WghJyzDTO data = wghJyzService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody WghJyzDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + wghJyzService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody WghJyzDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + wghJyzService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + wghJyzService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = wghJyzService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, WghJyzExcel.class); + } + + /** + * 调用ruoyi接口获取wgh_jyz数据 + * + * @param dto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/14 15:52 + */ + @PostMapping("/preserWghJyzVation") + public Result getPreserWghJyzVation(@RequestBody PreserVationFormDTO dto) { + wghJyzService.getPreserWghJyzVation(dto); + return new Result(); + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSjxxbController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSjxxbController.java new file mode 100644 index 0000000000..4d3a6cd04b --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSjxxbController.java @@ -0,0 +1,95 @@ +package com.epmet.opendata.controller; + +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +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.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.WghSjxxbDTO; +import com.epmet.opendata.excel.WghSjxxbExcel; +import com.epmet.opendata.service.WghSjxxbService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 事件信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@RestController +@RequestMapping("wghSjxxb") +public class WghSjxxbController { + + @Autowired + private WghSjxxbService wghSjxxbService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = wghSjxxbService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + WghSjxxbDTO data = wghSjxxbService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody WghSjxxbDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + wghSjxxbService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody WghSjxxbDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + wghSjxxbService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + wghSjxxbService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = wghSjxxbService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, WghSjxxbExcel.class); + } + + /** + * 调用ruoyi接口获取wgh_sjxx数据 + * + * @param dto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/14 16:01 + */ + @PostMapping("/preserSjxxVation") + public Result getPreserSjxxVation(@RequestBody PreserVationFormDTO dto) { + wghSjxxbService.getPreserSjxxVation(dto); + return new Result(); + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSqxxController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSqxxController.java new file mode 100644 index 0000000000..1c36726db0 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSqxxController.java @@ -0,0 +1,95 @@ +package com.epmet.opendata.controller; + +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +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.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.WghSqxxDTO; +import com.epmet.opendata.excel.WghSqxxExcel; +import com.epmet.opendata.service.WghSqxxService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@RestController +@RequestMapping("wghSqxx") +public class WghSqxxController { + + @Autowired + private WghSqxxService wghSqxxService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = wghSqxxService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + WghSqxxDTO data = wghSqxxService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody WghSqxxDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + wghSqxxService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody WghSqxxDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + wghSqxxService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + wghSqxxService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = wghSqxxService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, WghSqxxExcel.class); + } + + /** + * 调用ruoyi接口获取wgh_sqxx数据 + * + * @param dto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/14 16:08 + */ + @PostMapping("/preserWghSqxxVation") + public Result getPreserWghSqxxVation(@RequestBody PreserVationFormDTO dto) { + wghSqxxService.getPreserWghSqxxVation(dto); + return new Result(); + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSubdistrictOfficeController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSubdistrictOfficeController.java new file mode 100644 index 0000000000..1deed4b024 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSubdistrictOfficeController.java @@ -0,0 +1,98 @@ +package com.epmet.opendata.controller; + +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +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.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; + +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.SubdistrictOfficeDTO; + +import com.epmet.opendata.excel.WghSubdistrictOfficeExcel; +import com.epmet.opendata.service.WghSubdistrictOfficeService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@RestController +@RequestMapping("subdistrictOffice") +public class WghSubdistrictOfficeController { + + @Autowired + private WghSubdistrictOfficeService subdistrictOfficeService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = subdistrictOfficeService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + SubdistrictOfficeDTO data = subdistrictOfficeService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody SubdistrictOfficeDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + subdistrictOfficeService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody SubdistrictOfficeDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + subdistrictOfficeService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + subdistrictOfficeService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = subdistrictOfficeService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, WghSubdistrictOfficeExcel.class); + } + + /** + * 调用ruoyi接口 + * + * @param dto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/14 17:36 + */ + @PostMapping("/preserSubVation") + public Result getpreserSubVation(@RequestBody PreserVationFormDTO dto) { + subdistrictOfficeService.getpreserSubVation(dto); + return new Result(); + } + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSzcgwghController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSzcgwghController.java new file mode 100644 index 0000000000..c678c9a7fd --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSzcgwghController.java @@ -0,0 +1,95 @@ +package com.epmet.opendata.controller; + +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +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.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.WghSzcgwghDTO; +import com.epmet.opendata.excel.WghSzcgwghExcel; +import com.epmet.opendata.service.WghSzcgwghService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 数字城管网格化信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@RestController +@RequestMapping("wghSzcgwgh") +public class WghSzcgwghController { + + @Autowired + private WghSzcgwghService wghSzcgwghService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = wghSzcgwghService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + WghSzcgwghDTO data = wghSzcgwghService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody WghSzcgwghDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + wghSzcgwghService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody WghSzcgwghDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + wghSzcgwghService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + wghSzcgwghService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = wghSzcgwghService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, WghSzcgwghExcel.class); + } + + /** + * 调用ruoyi系统获取wgh_szcgwgh数据 + * + * @param dto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/14 16:19 + */ + @PostMapping("/preserWghSzcgwghVation") + public Result getPreserWghSzcgwghVation(@RequestBody PreserVationFormDTO dto) { + wghSzcgwghService.getPreserWghSzcgwghVation(dto); + return new Result(); + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSzzrwgController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSzzrwgController.java new file mode 100644 index 0000000000..d2f5316399 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSzzrwgController.java @@ -0,0 +1,95 @@ +package com.epmet.opendata.controller; + +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +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.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.WghSzzrwgDTO; +import com.epmet.opendata.excel.WghSzzrwgExcel; +import com.epmet.opendata.service.WghSzzrwgService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 市政责任网格信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@RestController +@RequestMapping("wghSzzrwg") +public class WghSzzrwgController { + + @Autowired + private WghSzzrwgService wghSzzrwgService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = wghSzzrwgService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + WghSzzrwgDTO data = wghSzzrwgService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody WghSzzrwgDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + wghSzzrwgService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody WghSzzrwgDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + wghSzzrwgService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + wghSzzrwgService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = wghSzzrwgService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, WghSzzrwgExcel.class); + } + + /** + * 调用ruoyi接口获取wgh_szzrwg数据 + * + * @param dto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/14 16:26 + */ + @PostMapping("/preserWghSzzrwgVation") + public Result getPreserWghSzzrwgVation(@RequestBody PreserVationFormDTO dto) { + wghSzzrwgService.getPreserWghSzzrwgVation(dto); + return new Result(); + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghWhpdwController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghWhpdwController.java new file mode 100644 index 0000000000..9381038398 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghWhpdwController.java @@ -0,0 +1,95 @@ +package com.epmet.opendata.controller; + +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +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.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.WghWhpdwDTO; +import com.epmet.opendata.excel.WghWhpdwExcel; +import com.epmet.opendata.service.WghWhpdwService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 危化品单位信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@RestController +@RequestMapping("wghWhpdw") +public class WghWhpdwController { + + @Autowired + private WghWhpdwService wghWhpdwService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = wghWhpdwService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + WghWhpdwDTO data = wghWhpdwService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody WghWhpdwDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + wghWhpdwService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody WghWhpdwDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + wghWhpdwService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + wghWhpdwService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = wghWhpdwService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, WghWhpdwExcel.class); + } + + /** + * 调用ruoyi系统获取wgh_whpdw数据 + * + * @param dto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/14 16:33 + */ + @PostMapping("/preserWhpdwVation") + public Result getPreserWhpdwVation(@RequestBody PreserVationFormDTO dto) { + wghWhpdwService.getPreserWhpdwVation(dto); + return new Result(); + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghYjbmcsController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghYjbmcsController.java new file mode 100644 index 0000000000..3a6764c36c --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghYjbmcsController.java @@ -0,0 +1,95 @@ +package com.epmet.opendata.controller; + +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +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.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.WghYjbmcsDTO; +import com.epmet.opendata.excel.WghYjbmcsExcel; +import com.epmet.opendata.service.WghYjbmcsService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 应急避难场所信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@RestController +@RequestMapping("wghYjbmcs") +public class WghYjbmcsController { + + @Autowired + private WghYjbmcsService wghYjbmcsService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params) { + PageData page = wghYjbmcsService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET}) + public Result get(@PathVariable("id") String id) { + WghYjbmcsDTO data = wghYjbmcsService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody WghYjbmcsDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + wghYjbmcsService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody WghYjbmcsDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + wghYjbmcsService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids) { + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + wghYjbmcsService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = wghYjbmcsService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, WghYjbmcsExcel.class); + } + + /** + * 调用ruoyi系统获取wgh_yjbmcs数据 + * + * @param dto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/14 16:39 + */ + @PostMapping("/preserWghYjbmcsVation") + public Result getPreserWghYjbmcsVation(@RequestBody PreserVationFormDTO dto) { + wghYjbmcsService.getPreserWghYjbmcsVation(dto); + return new Result(); + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghYqhjzController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghYqhjzController.java new file mode 100644 index 0000000000..972710d611 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghYqhjzController.java @@ -0,0 +1,94 @@ +package com.epmet.opendata.controller; + +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +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.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.service.WghYqhjzService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import com.epmet.opendata.dto.wgh.WghYqhjzDTO; +import javax.servlet.http.HttpServletResponse; +import com.epmet.opendata.excel.WghYqhjzExcel; +import java.util.List; +import java.util.Map; + + +/** + * 油气合建站信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@RestController +@RequestMapping("wghYqhjz") +public class WghYqhjzController { + + @Autowired + private WghYqhjzService wghYqhjzService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = wghYqhjzService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + WghYqhjzDTO data = wghYqhjzService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody WghYqhjzDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + wghYqhjzService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody WghYqhjzDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + wghYqhjzService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + wghYqhjzService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = wghYqhjzService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, WghYqhjzExcel.class); + } + + /** + * 调用ruoyi系统获取wgh_yqhjz数据 + * + * @param dto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/14 16:46 + */ + @PostMapping("/preserWghYqhjzVation") + public Result getPreserWghYqhjzVation(@RequestBody PreserVationFormDTO dto) { + wghYqhjzService.getPreserWghYqhjzVation(dto); + return new Result(); + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/caBmGridController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/caBmGridController.java new file mode 100644 index 0000000000..52217e64f3 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/caBmGridController.java @@ -0,0 +1,112 @@ +package com.epmet.opendata.controller; + +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +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.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.result.LouDongCascadeResultDTO; +import com.epmet.opendata.dto.wgh.BmGridDTO; + + +import com.epmet.opendata.excel.caBmGridExcel; +import com.epmet.opendata.service.caBmGridService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@RestController +@RequestMapping("bmGrid") +public class caBmGridController { + + @Autowired + private caBmGridService bmGridService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = bmGridService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + BmGridDTO data = bmGridService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody BmGridDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + bmGridService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody BmGridDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + bmGridService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + bmGridService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = bmGridService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, caBmGridExcel.class); + } + + /** + * 调用ruoyi存储bm_grid数据 + * + * @param dto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/14 14:16 + */ + @PostMapping("preserBmGridVation") + public Result getpreserBmGridVation(@RequestBody PreserVationFormDTO dto) { + bmGridService.getPreserBmGridVation(dto); + return new Result(); + } + + /** + * 获取级联菜单 + * + * @param + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/15 14:01 + */ + @PostMapping("getCascadeMenu") + public Result getCascadeMenu(){ + List dto = bmGridService.getCascadeMenu(); + return new Result().ok(dto); + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaBmCategoryDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaBmCategoryDao.java new file mode 100644 index 0000000000..b09ea46440 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaBmCategoryDao.java @@ -0,0 +1,18 @@ +package com.epmet.opendata.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; + +import com.epmet.opendata.entity.CaBmCategoryEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 多级类型信息表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-16 + */ +@Mapper +public interface CaBmCategoryDao extends BaseDao { + + int deleteAll(); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java new file mode 100644 index 0000000000..cb923fdc9a --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java @@ -0,0 +1,51 @@ +package com.epmet.opendata.dao; + + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.opendata.dto.ca.CaLoudongDTO; +import com.epmet.opendata.dto.result.CaLoudongDetailsResultDTO; +import com.epmet.opendata.dto.result.CaLoudongResultDTO; +import com.epmet.opendata.dto.result.LouDongCascadeResultDTO; +import com.epmet.opendata.entity.CaLoudongEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.math.BigInteger; +import java.util.List; + +/** + * 楼栋基本信息表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-31 + */ +@Mapper +public interface CaLoudongDao extends BaseDao { + + List getList(); + + /** + * 楼栋基本信息分页 + * + * @param communityName + * @return java.util.List + * @author LZN + * @date 2022/5/31 18:57 + */ + List getPage(@Param("communityName") String communityName, + @Param("buildingName") String buildingName, + @Param("gridId") String gridId); + + /** + * 楼栋基本信息详情 + * + * @param buildingId + * @return + */ + CaLoudongDetailsResultDTO getLouDongDetails(@Param("buildingId") BigInteger buildingId); + + int deleteAll(); + + +} + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaPingfangDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaPingfangDao.java new file mode 100644 index 0000000000..28675c6bb2 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaPingfangDao.java @@ -0,0 +1,38 @@ +package com.epmet.opendata.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.opendata.dto.result.CaPingFangDetailsResultDTO; +import com.epmet.opendata.dto.result.CaPingfangResultDTO; +import com.epmet.opendata.entity.CaPingfangEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-31 + */ +@Mapper +public interface CaPingfangDao extends BaseDao { + + /** + * 平房基础信息分页 + * + * @param buildingName + * @return + */ + List getPage(@Param("buildingName") String buildingName, + @Param("communityName") String communityName, + @Param("gridId") String gridId); + + int deleteAll(); + + /** + * 平房详情 + * + * @param buildingId + * @return + */ + CaPingFangDetailsResultDTO getPingFangDetails(@Param("buildingId") String buildingId); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRentalDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRentalDao.java new file mode 100644 index 0000000000..4b1460a9ea --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRentalDao.java @@ -0,0 +1,43 @@ +package com.epmet.opendata.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; + +import com.epmet.opendata.dto.result.CaLoudongResultDTO; +import com.epmet.opendata.dto.result.CaRentalDetailsResultDTO; +import com.epmet.opendata.dto.result.CaRentalResultDTO; +import com.epmet.opendata.entity.CaRentalEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 出租房信息表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-31 + */ +@Mapper +public interface CaRentalDao extends BaseDao { + + /** + * 出租房信息分页 + * + * @param residentName + * @return + */ + List getPage(@Param("residentName") String residentName, + @Param("houseName") String houseName, + @Param("renterName") String renterName, + @Param("gridId") String gridId); + + int deleteAll(); + + /** + * 出租房详情 + * + * @param rentalId + * @return + */ + CaRentalDetailsResultDTO getRentalDetails(@Param("rentalId") String rentalId); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaResidentDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaResidentDao.java new file mode 100644 index 0000000000..3f907c76e2 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaResidentDao.java @@ -0,0 +1,42 @@ +package com.epmet.opendata.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; + +import com.epmet.opendata.dto.result.CaResidentDetailsResultDTO; +import com.epmet.opendata.dto.result.CaResidentResultDTO; +import com.epmet.opendata.entity.CaResidentEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 人口基本信息表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-31 + */ +@Mapper +public interface CaResidentDao extends BaseDao { + + /** + * 人口基本信息分页 + * + * @param residentName + * @return + */ + List getPage(@Param("residentName") String residentName, + @Param("idCard") String idCard, + @Param("telephone") String telephone, + @Param("gridId") String gridId); + + int deleteAll(); + + /** + * 人口基本信息详情 + * + * @param idCard + * @return + */ + CaResidentDetailsResultDTO getResidentDetails(@Param("idCard") String idCard); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRotatorsDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRotatorsDao.java new file mode 100644 index 0000000000..ade7309eaa --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRotatorsDao.java @@ -0,0 +1,43 @@ +package com.epmet.opendata.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; + +import com.epmet.opendata.dto.result.CaRotatorsDetailsResultDTO; +import com.epmet.opendata.dto.result.CaRotatorsResultDTO; +import com.epmet.opendata.entity.CaRotatorsEntity; +import com.sun.tracing.dtrace.ProviderAttributes; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 流动人口表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-31 + */ +@Mapper +public interface CaRotatorsDao extends BaseDao { + + /** + * 流动人口表 + * + * @param rotatorsName + * @return + */ + List getPage(@Param("rotatorsName") String rotatorsName, + @Param("idCard") String idCard, + @Param("telephone") String telephone, + @Param("gridId") String gridId); + + int deleteAll(); + + /** + * 流动人口详情 + * + * @param idCard + * @return + */ + CaRotatorsDetailsResultDTO getRotatorsDetails(@Param("idCard") String idCard); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaSysDictDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaSysDictDao.java new file mode 100644 index 0000000000..b761ce29fc --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaSysDictDao.java @@ -0,0 +1,18 @@ +package com.epmet.opendata.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; + +import com.epmet.opendata.entity.CaSysDictEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 字典信息表,字典值和字典组均存入此表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-16 + */ +@Mapper +public interface CaSysDictDao extends BaseDao { + + int deleteAll(); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghBaseGridDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghBaseGridDao.java new file mode 100644 index 0000000000..c48f75c03f --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghBaseGridDao.java @@ -0,0 +1,17 @@ +package com.epmet.opendata.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; + +import com.epmet.opendata.entity.WghBaseGridEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Mapper +public interface WghBaseGridDao extends BaseDao { + int deleteAll(); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghCommunityDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghCommunityDao.java new file mode 100644 index 0000000000..624403d977 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghCommunityDao.java @@ -0,0 +1,19 @@ +package com.epmet.opendata.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; + + +import com.epmet.opendata.entity.WghCommunityEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Mapper +public interface WghCommunityDao extends BaseDao { + + int deleteAll(); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghDywgDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghDywgDao.java new file mode 100644 index 0000000000..341db87c61 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghDywgDao.java @@ -0,0 +1,18 @@ +package com.epmet.opendata.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; + +import com.epmet.opendata.entity.WghDywgEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 单元网格 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Mapper +public interface WghDywgDao extends BaseDao { + + int deleteAll(); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghJdbDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghJdbDao.java new file mode 100644 index 0000000000..4806bdcf0d --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghJdbDao.java @@ -0,0 +1,18 @@ +package com.epmet.opendata.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; + +import com.epmet.opendata.entity.WghJdbEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 街道办 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Mapper +public interface WghJdbDao extends BaseDao { + + int deleteAll(); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghJqzDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghJqzDao.java new file mode 100644 index 0000000000..52881f0543 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghJqzDao.java @@ -0,0 +1,17 @@ +package com.epmet.opendata.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.opendata.entity.WghJqzEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 加气站信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Mapper +public interface WghJqzDao extends BaseDao { + + int deleteAll(); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghJxcsDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghJxcsDao.java new file mode 100644 index 0000000000..afbda65ea1 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghJxcsDao.java @@ -0,0 +1,17 @@ +package com.epmet.opendata.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.opendata.entity.WghJxcsEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 九小场所信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Mapper +public interface WghJxcsDao extends BaseDao { + + int deleteAll(); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghJyzDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghJyzDao.java new file mode 100644 index 0000000000..01fcc12a97 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghJyzDao.java @@ -0,0 +1,17 @@ +package com.epmet.opendata.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.opendata.entity.WghJyzEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 加油站 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Mapper +public interface WghJyzDao extends BaseDao { + + int deleteAll(); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSjxxbDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSjxxbDao.java new file mode 100644 index 0000000000..d2806b93fe --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSjxxbDao.java @@ -0,0 +1,17 @@ +package com.epmet.opendata.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.opendata.entity.WghSjxxbEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 事件信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Mapper +public interface WghSjxxbDao extends BaseDao { + + int deleteAll(); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSqxxDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSqxxDao.java new file mode 100644 index 0000000000..8a75f69fde --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSqxxDao.java @@ -0,0 +1,18 @@ +package com.epmet.opendata.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; + +import com.epmet.opendata.entity.WghSqxxEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Mapper +public interface WghSqxxDao extends BaseDao { + + int deleteAll(); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSubdistrictOfficeDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSubdistrictOfficeDao.java new file mode 100644 index 0000000000..0b58b480d1 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSubdistrictOfficeDao.java @@ -0,0 +1,19 @@ +package com.epmet.opendata.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; + + +import com.epmet.opendata.entity.WghSubdistrictOfficeEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Mapper +public interface WghSubdistrictOfficeDao extends BaseDao { + + int deleteAll(); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSzcgwghDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSzcgwghDao.java new file mode 100644 index 0000000000..66d2c0197c --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSzcgwghDao.java @@ -0,0 +1,18 @@ +package com.epmet.opendata.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; + +import com.epmet.opendata.entity.WghSzcgwghEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 数字城管网格化信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Mapper +public interface WghSzcgwghDao extends BaseDao { + + int deleteAll(); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSzzrwgDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSzzrwgDao.java new file mode 100644 index 0000000000..f3d34fee32 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSzzrwgDao.java @@ -0,0 +1,17 @@ +package com.epmet.opendata.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.opendata.entity.WghSzzrwgEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 市政责任网格信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Mapper +public interface WghSzzrwgDao extends BaseDao { + + int deleteAll(); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghWhpdwDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghWhpdwDao.java new file mode 100644 index 0000000000..cffef5c3f0 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghWhpdwDao.java @@ -0,0 +1,17 @@ +package com.epmet.opendata.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.opendata.entity.WghWhpdwEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 危化品单位信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Mapper +public interface WghWhpdwDao extends BaseDao { + + int deleteAll(); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghYjbmcsDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghYjbmcsDao.java new file mode 100644 index 0000000000..1bc32540b1 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghYjbmcsDao.java @@ -0,0 +1,17 @@ +package com.epmet.opendata.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.opendata.entity.WghYjbmcsEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 应急避难场所信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Mapper +public interface WghYjbmcsDao extends BaseDao { + + int deleteAll(); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghYqhjzDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghYqhjzDao.java new file mode 100644 index 0000000000..a8984a2aa7 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghYqhjzDao.java @@ -0,0 +1,17 @@ +package com.epmet.opendata.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.opendata.entity.WghYqhjzEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 油气合建站信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Mapper +public interface WghYqhjzDao extends BaseDao { + + int deleteAll(); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/caBmGridDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/caBmGridDao.java new file mode 100644 index 0000000000..1f76dd0d28 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/caBmGridDao.java @@ -0,0 +1,24 @@ +package com.epmet.opendata.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; + + +import com.epmet.opendata.dto.result.LouDongCascadeResultDTO; +import com.epmet.opendata.entity.caBmGridEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Mapper +public interface caBmGridDao extends BaseDao { + + int deleteAll(); + + List getCascadeMenu(); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaBmCategoryEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaBmCategoryEntity.java new file mode 100644 index 0000000000..bb2ecfb8ee --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaBmCategoryEntity.java @@ -0,0 +1,134 @@ +package com.epmet.opendata.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-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ca_bm_category") +public class CaBmCategoryEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 类别ID + */ + private Long categoryId; + + /** + * 名称 + */ + private String categoryName; + + /** + * + */ + private String categoryType; + + /** + * 名称值 + */ + private String categoryValue; + + /** + * 父类别ID + */ + private Long parentCategoryId; + + /** + * 展示顺序 + */ + private Integer categorySort; + + /** + * 创建人 + */ + private Long createBy; + + /** + * 创建时间 + */ + private Date createDate; + + /** + * 最后修改人 + */ + private Long updateBy; + + /** + * 最后修改时间 + */ + private Date updateDate; + + /** + * 删除状态 + */ + private String deleteFlag; + + /** + * 乐观锁 + */ + private Integer versions; + + /** + * 扩展字段1 + */ + private String attribute1; + + /** + * 扩展字段2 + */ + private String attribute2; + + /** + * 扩展字段3 + */ + private String attribute3; + + /** + * 扩展字段4 + */ + private String attribute4; + + /** + * 扩展字段5 + */ + private String attribute5; + + /** + * 扩展字段6 + */ + private Long attribute6; + + /** + * 扩展字段7 + */ + private Long attribute7; + + /** + * 扩展字段8 + */ + private Long attribute8; + + /** + * 扩展字段9 + */ + private Date attribute9; + + /** + * 扩展字段10 + */ + private Date attribute10; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaLoudongEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaLoudongEntity.java new file mode 100644 index 0000000000..820a670b38 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaLoudongEntity.java @@ -0,0 +1,240 @@ +package com.epmet.opendata.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 楼栋基本信息表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-31 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ca_loudong") +public class CaLoudongEntity { + + private static final long serialVersionUID = 1L; + + /** + * 楼栋ID + */ + private Long buildingId; + + /** + * 楼宇类型 + */ + private String buildingType; + + /** + * 网格ID + */ + private Long gridId; + + /** + * 楼宇名称 + */ + private String buildingName; + + /** + * 用途分类 + */ + private String buildingUse; + + /** + * 楼宇状态 + */ + private String buildingStatus; + + /** + * 楼宇结构 + */ + private String buildingStructure; + + /** + * 使用现状 + */ + private String buildingUseage; + + /** + * 建筑时间 + */ + private Date constructionTime; + + /** + * 所处位置 + */ + private String buildingAddr; + + /** + * 小区(单位)名称 + */ + private String communityName; + + /** + * 楼栋长 + */ + private String buildingLeader; + + /** + * 楼层数 + */ + private Integer layerCount; + + /** + * 地下楼层数 + */ + private Integer basementLayerCount; + + /** + * 住宅开始层数 + */ + private Integer houseBeginLayer; + + /** + * 单元数 + */ + private Integer unitCount; + + /** + * 每层每单元户数 + */ + private Integer layerRoomCount; + + /** + * 总房屋数 + */ + private Integer roomCount; + + /** + * 电梯数量 + */ + private String elevatorCount; + + /** + * 建筑面积 + */ + private String buildingArea; + + /** + * 物业公司 + */ + private String buildingPmc; + + /** + * 介绍 + */ + private String buildingDesc; + + /** + * 标绘状态 + */ + private String pointStatus; + + /** + * 经度 + */ + private BigDecimal longitude; + + /** + * 纬度 + */ + private BigDecimal latitude; + + /** + * 数据来源 + */ + private String platCode; + + /** + * 创建人 + */ + private Long createBy; + + /** + * 创建时间 + */ + private Date createDate; + + /** + * 最后修改人 + */ + private Long updateBy; + + /** + * 最后修改时间 + */ + private Date updateDate; + + /** + * 删除状态 + */ + private String deleteFlag; + + /** + * 乐观锁 + */ + private Integer versions; + + /** + * 扩展字段1 + */ + private String attribute1; + + /** + * 扩展字段2 + */ + private String attribute2; + + /** + * 扩展字段3 + */ + private String attribute3; + + /** + * 扩展字段4 + */ + private String attribute4; + + /** + * 扩展字段5 + */ + private String attribute5; + + /** + * 小区主键 + */ + private Long attribute6; + + /** + * 扩展字段7 + */ + private Long attribute7; + + /** + * 扩展字段8 + */ + private Long attribute8; + + /** + * 扩展字段9 + */ + private Date attribute9; + + /** + * 扩展字段10 + */ + private Date attribute10; + + /** + * 小区主键 + */ + private String communityId; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaPingfangEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaPingfangEntity.java new file mode 100644 index 0000000000..ae008d7585 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaPingfangEntity.java @@ -0,0 +1,240 @@ +package com.epmet.opendata.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-31 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ca_pingfang") +public class CaPingfangEntity { + + private static final long serialVersionUID = 1L; + + /** + * 楼栋ID + */ + private Long buildingId; + + /** + * 楼宇类型 + */ + private String buildingType; + + /** + * 网格ID + */ + private Long gridId; + + /** + * 楼宇名称 + */ + private String buildingName; + + /** + * 用途分类 + */ + private String buildingUse; + + /** + * 楼宇状态 + */ + private String buildingStatus; + + /** + * 楼宇结构 + */ + private String buildingStructure; + + /** + * 使用现状 + */ + private String buildingUseage; + + /** + * 建筑时间 + */ + private Date constructionTime; + + /** + * 所处位置 + */ + private String buildingAddr; + + /** + * 小区(单位)名称 + */ + private String communityName; + + /** + * 楼栋长 + */ + private String buildingLeader; + + /** + * 楼层数 + */ + private Integer layerCount; + + /** + * 地下楼层数 + */ + private Integer basementLayerCount; + + /** + * 住宅开始层数 + */ + private Integer houseBeginLayer; + + /** + * 单元数 + */ + private Integer unitCount; + + /** + * 每层每单元户数 + */ + private Integer layerRoomCount; + + /** + * 总房屋数 + */ + private Integer roomCount; + + /** + * 电梯数量 + */ + private String elevatorCount; + + /** + * 建筑面积 + */ + private String buildingArea; + + /** + * 物业公司 + */ + private String buildingPmc; + + /** + * 介绍 + */ + private String buildingDesc; + + /** + * 标绘状态 + */ + private String pointStatus; + + /** + * 经度 + */ + private BigDecimal longitude; + + /** + * 纬度 + */ + private BigDecimal latitude; + + /** + * 数据来源 + */ + private String platCode; + + /** + * 创建人 + */ + private Long createBy; + + /** + * 创建时间 + */ + private Date createDate; + + /** + * 最后修改人 + */ + private Long updateBy; + + /** + * 最后修改时间 + */ + private Date updateDate; + + /** + * 删除状态 + */ + private String deleteFlag; + + /** + * 乐观锁 + */ + private Integer versions; + + /** + * 扩展字段1 + */ + private String attribute1; + + /** + * 扩展字段2 + */ + private String attribute2; + + /** + * 扩展字段3 + */ + private String attribute3; + + /** + * 扩展字段4 + */ + private String attribute4; + + /** + * 扩展字段5 + */ + private String attribute5; + + /** + * 小区主键 + */ + private Long attribute6; + + /** + * 扩展字段7 + */ + private Long attribute7; + + /** + * 扩展字段8 + */ + private Long attribute8; + + /** + * 扩展字段9 + */ + private Date attribute9; + + /** + * 扩展字段10 + */ + private Date attribute10; + + /** + * 小区主键 + */ + private String communityId; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaRentalEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaRentalEntity.java new file mode 100644 index 0000000000..d3a22ce419 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaRentalEntity.java @@ -0,0 +1,220 @@ +package com.epmet.opendata.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 出租房信息表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-31 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ca_rental") +public class CaRentalEntity { + + private static final long serialVersionUID = 1L; + + /** + * 出租房ID + */ + private Long rentalId; + + /** + * 网格ID + */ + private Long gridId; + + /** + * 房屋ID + */ + private Long houseId; + + /** + * 房屋编号 + */ + private String houseName; + + /** + * 房屋地址 + */ + private String houseAddress; + + /** + * 建筑用途 + */ + private String houseUse; + + /** + * 建筑面积(平方米) + */ + private BigDecimal houseArea; + + /** + * 证件代码 + */ + private String idType; + + /** + * 证件号码 + */ + private String idCard; + + /** + * 房主姓名 + */ + private String residentName; + + /** + * 房主联系方式 + */ + private String telephone; + + /** + * 房主现居详址 + */ + private String curliveAddress; + + /** + * 出租用途 + */ + private String rentUse; + + /** + * 隐患类型 + */ + private String troubleType; + + /** + * 承租人ID + */ + private Long renterId; + + /** + * 承租人公民身份证号码 + */ + private String renterCardNumber; + + /** + * 承租人证件类型 + */ + private Long renterCardType; + + /** + * 承租人姓名 + */ + private String renterName; + + /** + * 承租人联系方式 + */ + private String renterPhone; + + /** + * 经度 + */ + private BigDecimal longitude; + + /** + * 纬度 + */ + private BigDecimal latitude; + + /** + * 标绘状态 + */ + private String pointStatus; + + /** + * 数据来源 + */ + private String platCode; + + /** + * 创建人 + */ + private Long createBy; + + /** + * 创建时间 + */ + private Date createDate; + + /** + * 最后修改人 + */ + private Long updateBy; + + /** + * 最后修改时间 + */ + private Date updateDate; + + /** + * 删除状态 + */ + private String deleteFlag; + + /** + * 乐观锁 + */ + private Integer versions; + + /** + * 承租单位 + */ + private String attribute1; + + /** + * 承租日期 + */ + private String attribute2; + + /** + * 承租期限 + */ + private String attribute3; + + /** + * 扩展字段4 + */ + private String attribute4; + + /** + * 扩展字段5 + */ + private String attribute5; + + /** + * 扩展字段6 + */ + private Long attribute6; + + /** + * 扩展字段7 + */ + private Long attribute7; + + /** + * 扩展字段8 + */ + private Long attribute8; + + /** + * 扩展字段9 + */ + private Date attribute9; + + /** + * 扩展字段10 + */ + private Date attribute10; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaResidentEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaResidentEntity.java new file mode 100644 index 0000000000..a65dcc6574 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaResidentEntity.java @@ -0,0 +1,299 @@ +package com.epmet.opendata.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-05-31 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ca_resident") +public class CaResidentEntity { + + private static final long serialVersionUID = 1L; + + /** + * 人口ID + */ + private Long residentId; + + /** + * homeId + */ + private String homeId; + + /** + * 对应的ic_resi_user主表Id + */ + private String icResiUser; + + /** + * 网格ID + */ + private Long gridId; + + /** + * 人口性质 + */ + private String residentProperty; + + /** + * 居民分类 + */ + private String residentType; + + /** + * 证件类型 + */ + private String idType; + + /** + * 证件号码(公民身份证号) + */ + private String idCard; + + /** + * 姓名 + */ + private String residentName; + + /** + * 性别 + */ + private String sex; + + /** + * 出生日期 + */ + private Date birthday; + + /** + * 民族 + */ + private String nation; + + /** + * 联系方式 + */ + private String telephone; + + /** + * 户籍省 + */ + private String householdProv; + + /** + * 户籍市 + */ + private String householdCity; + + /** + * 户籍县(区) + */ + private String householdCounty; + + /** + * 户籍镇街 + */ + private String householdTown; + + /** + * 户籍社区/村 + */ + private String householdVillage; + + /** + * 户籍详址 + */ + private String householdAddressDetail; + + /** + * 现住省 + */ + private String curliveProv; + + /** + * 现住市 + */ + private String curliveCity; + + /** + * 现住县(区) + */ + private String curliveCounty; + + /** + * 现住镇街 + */ + private String curliveTown; + + /** + * 现住社区/村 + */ + private String curliveVillage; + + /** + * 现住详址 + */ + private String curliveAddressDetail; + + /** + * 籍贯省 + */ + private String nativeAddressProv; + + /** + * 籍贯市 + */ + private String nativeAddressCity; + + /** + * 籍贯县(区) + */ + private String nativeAddressCounty; + + /** + * 曾用名 + */ + private String formerName; + + /** + * 学历 + */ + private String education; + + /** + * 职业 + */ + private String occupation; + + /** + * 职业类别 + */ + private String occupationType; + + /** + * 服务处所 + */ + private String serviceAddress; + + /** + * 婚姻状况 + */ + private String marriageStatus; + + /** + * 政治面貌 + */ + private String party; + + /** + * 宗教信仰 + */ + private String religious; + + /** + * 有无皈依(已受洗) + */ + private String conversionState; + + /** + * 国籍 + */ + private String nationality; + + /** + * 数据来源 + */ + private String platCode; + + /** + * 创建人 + */ + private Long createBy; + + /** + * 创建时间 + */ + private Date createDate; + + /** + * 最后修改人 + */ + private Long updateBy; + + /** + * 最后修改时间 + */ + private Date updateDate; + + /** + * 删除状态 + */ + private String deleteFlag; + + /** + * 乐观锁 + */ + private Integer versions; + + /** + * 扩展字段1 + */ + private String attribute1; + + /** + * 扩展字段2 + */ + private String attribute2; + + /** + * 扩展字段3 + */ + private String attribute3; + + /** + * 扩展字段4 + */ + private String attribute4; + + /** + * 扩展字段5 + */ + private String attribute5; + + /** + * 扩展字段6 + */ + private Long attribute6; + + /** + * 扩展字段7 + */ + private Long attribute7; + + /** + * 扩展字段8 + */ + private Long attribute8; + + /** + * 扩展字段9 + */ + private Date attribute9; + + /** + * 扩展字段10 + */ + private Date attribute10; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaRotatorsEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaRotatorsEntity.java new file mode 100644 index 0000000000..77e27c75fd --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaRotatorsEntity.java @@ -0,0 +1,314 @@ +package com.epmet.opendata.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-05-31 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ca_rotators") +public class CaRotatorsEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键id + */ + private Long rotatorsId; + + /** + * homeId + */ + private String homeId; + + /** + * 对应的ic_resi_user主表Id + */ + private String icResiUser; + + /** + * 公民身份证号 + */ + private String idCard; + + /** + * 证件类型 + */ + private String idType; + + /** + * 姓名 + */ + private String rotatorsName; + + /** + * 曾用名 + */ + private String formerName; + + /** + * 性别 + */ + private String sex; + + /** + * 出生日期 + */ + private Date birthday; + + /** + * 民族 + */ + private String nation; + + /** + * 籍贯省 + */ + private String nativeAddressProv; + + /** + * 籍贯市 + */ + private String nativeAddressCity; + + /** + * 籍贯县(区) + */ + private String nativeAddressCountry; + + /** + * 婚姻状况 + */ + private String marriageStatus; + + /** + * 政治面貌 + */ + private String party; + + /** + * 学历 + */ + private String education; + + /** + * 宗教信仰 + */ + private String religious; + + /** + * 职业类别 + */ + private String occupationType; + + /** + * 职业 + */ + private String occupation; + + /** + * 服务处所 + */ + private String serviceAddress; + + /** + * 联系方式 + */ + private String telephone; + + /** + * 户籍地省 + */ + private String householdAddressProv; + + /** + * 户籍地市 + */ + private String householdAddressCity; + + /** + * 户籍地县(区) + */ + private String householdAddressCountry; + + /** + * 户籍地镇街 + */ + private String householdAddressTown; + + /** + * 户籍地社区/村 + */ + private String householdAddressVillage; + + /** + * 户籍门(楼)详址 + */ + private String householdAddressDetail; + + /** + * 现住地省 + */ + private String curliveAddressProv; + + /** + * 现住地市 + */ + private String curliveAddressCity; + + /** + * 现住地县(区) + */ + private String curliveAddressCountry; + + /** + * 现住地镇街 + */ + private String curliveAddressTown; + + /** + * 现住地社区/村 + */ + private String curliveAddressVillage; + + /** + * 现住门(楼)详址 + */ + private String curliveAddressDetail; + + /** + * 流入原因 + */ + private String inflowReason; + + /** + * 办证类型 + */ + private String certificateType; + + /** + * 证件号码 + */ + private String certificateNumber; + + /** + * 登记日期 + */ + private Date signDate; + + /** + * 证件到期日期 + */ + private Date endDate; + + /** + * 住所类型 + */ + private String residenceType; + + /** + * 是否重点关注人员 + */ + private String isFocusPerson; + + /** + * 创建人 + */ + private Long createBy; + + /** + * 创建时间 + */ + private Date createDate; + + /** + * 最后修改人 + */ + private Long updateBy; + + /** + * 最后修改时间 + */ + private Date updateDate; + + /** + * 删除标识(正常的数据存:normal,逻辑删除的标识为:delete) + */ + private String deleteFlag; + + /** + * 数据来源编码 + */ + private String platcode; + + /** + * 网格id + */ + private Long gridId; + + /** + * 乐观锁 + */ + private Integer versions; + + /** + * 是否注销 + */ + private String attribute1; + + /** + * 注销原因 + */ + private String attribute2; + + /** + * + */ + private String attribute3; + + /** + * + */ + private String attribute4; + + /** + * + */ + private String attribute5; + + /** + * + */ + private Long attribute6; + + /** + * + */ + private Long attribute7; + + /** + * + */ + private Long attribute8; + + /** + * + */ + private Date attribute9; + + /** + * + */ + private Date attribute10; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaSysDictEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaSysDictEntity.java new file mode 100644 index 0000000000..0d9f7145b1 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaSysDictEntity.java @@ -0,0 +1,84 @@ +package com.epmet.opendata.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-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ca_sys_dict") +public class CaSysDictEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 字典ID + */ + private Long dictId; + + /** + * 字典值,例如:sex/F + */ + private String dictValue; + + /** + * 1.字典组名称(性别)或者字典名称(女) + */ + private String dictLabel; + + /** + * 字典值时存入字典的值,字典组时存null + */ + private String dictType; + + /** + * 描述 + */ + private String dictDesc; + + /** + * 排序 + */ + private Integer dictSort; + + /** + * 创建人 + */ + private Long createBy; + + /** + * 创建时间 + */ + private Date createDate; + + /** + * 最后修改人 + */ + private Long updateBy; + + /** + * 最后修改时间 + */ + private Date updateDate; + + /** + * 字典值:normal正常,deleted正常 + */ + private String deleteFlag; + + /** + * 乐观锁 + */ + private Integer versions; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghBaseGridEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghBaseGridEntity.java new file mode 100644 index 0000000000..0a4d1ff91c --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghBaseGridEntity.java @@ -0,0 +1,69 @@ +package com.epmet.opendata.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("wgh_base_grid") +public class WghBaseGridEntity { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private String coordinateInfo; + + /** + * + */ + private String gridName; + + /** + * + */ + private String subDistrictOffice; + + /** + * + */ + private String community; + + /** + * + */ + private String streetCode; + + /** + * + */ + private String gridCode; + + /** + * + */ + private String communityCode; + + /** + * + */ + private String longitude; + + /** + * + */ + private String latitude; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghCommunityEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghCommunityEntity.java new file mode 100644 index 0000000000..cafd34e05c --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghCommunityEntity.java @@ -0,0 +1,59 @@ +package com.epmet.opendata.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("wgh_community") +public class WghCommunityEntity { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private String coordinateInfo; + + /** + * + */ + private String streetName; + + /** + * + */ + private String streetCode; + + /** + * + */ + private String communityName; + + /** + * + */ + private String communityCode; + + /** + * + */ + private String longitude; + + /** + * + */ + private String latitude; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghDywgEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghDywgEntity.java new file mode 100644 index 0000000000..9c47bdd298 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghDywgEntity.java @@ -0,0 +1,79 @@ +package com.epmet.opendata.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("wgh_dywg") +public class WghDywgEntity { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private Integer objectid; + + /** + * 网格名称 + */ + private String bgname; + + /** + * 所属街镇 + */ + private String street; + + /** + * 所属社区 + */ + private String community; + + /** + * 网格面积 + */ + private Double bgsqua; + + /** + * 初始时间 + */ + private Date ordate; + + /** + * 变更时间 + */ + private Date chdate; + + /** + * 备注 + */ + private String note; + + /** + * + */ + private String contacts; + + /** + * 联系电话 + */ + private String telphone; + + /** + * 插入日期 + */ + private Date insertTime; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghJdbEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghJdbEntity.java new file mode 100644 index 0000000000..b02d41dd5c --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghJdbEntity.java @@ -0,0 +1,59 @@ +package com.epmet.opendata.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("wgh_jdb") +public class WghJdbEntity { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private String objectid_1; + + /** + * + */ + private String objectid; + + /** + * 街道名称 + */ + private String mc; + + /** + * 责任人 + */ + private String personInCharge; + + /** + * 联系电话 + */ + private String phone; + + /** + * + */ + private Double shapeLeng; + + /** + * 插入日期 + */ + private Date insertTime; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghJqzEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghJqzEntity.java new file mode 100644 index 0000000000..eecfe7048a --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghJqzEntity.java @@ -0,0 +1,129 @@ +package com.epmet.opendata.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("wgh_jqz") +public class WghJqzEntity { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private Integer objectid; + + /** + * 序号 + */ + private String xh; + + /** + * 单位名称 + */ + private String name; + + /** + * + */ + private Double area; + + /** + * 周边安全间距 + */ + private String space; + + /** + * 存在问题 + */ + private String problem; + + /** + * 危险源类型 + */ + private String type; + + /** + * 经营地址 + */ + private String location; + + /** + * 负责人 + */ + private String principal; + + /** + * 联系电话 + */ + private String phone; + + /** + * 企业类型 + */ + private String qtype; + + /** + * 危化品种类 + */ + private String wtype; + + /** + * 等级 + */ + private String level; + + /** + * 性质 + */ + private String nature; + + /** + * 备注 + */ + private String remarks; + + /** + * + */ + private String dwmcjc; + + /** + * + */ + private String layer; + + /** + * + */ + private String ssjdb; + + /** + * 数量 + */ + private String amount; + + /** + * 应急措施 + */ + private String yjcs; + + /** + * 插入日期 + */ + private Date insertTime; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghJxcsEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghJxcsEntity.java new file mode 100644 index 0000000000..53ad3a48e3 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghJxcsEntity.java @@ -0,0 +1,119 @@ +package com.epmet.opendata.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("wgh_jxcs") +public class WghJxcsEntity { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private String objectid; + + /** + * + */ + private String jsonInfo; + + /** + * + */ + private String creatTime; + + /** + * 所属街道 + */ + private String ssjd; + + /** + * 所属社区 + */ + private String sssq; + + /** + * 道路名 + */ + private String dlm; + + /** + * 门牌号 + */ + private String mph; + + /** + * 名称 + */ + private String name; + + /** + * + */ + private String ztlx; + + /** + * 子类型 + */ + private String type; + + /** + * 统一社会信用代码 + */ + private String xydm; + + /** + * 联系人 + */ + private String lxr; + + /** + * 联系电话 + */ + private String lxdh; + + /** + * + */ + private String userName; + + /** + * 备注 + */ + private String bz; + + /** + * + */ + private String available; + + /** + * 编辑人ID + */ + private String userId; + + /** + * 编辑人姓名 + */ + private String updateTim; + + /** + * 插入日期 + */ + private String insertTime; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghJyzEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghJyzEntity.java new file mode 100644 index 0000000000..9468201318 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghJyzEntity.java @@ -0,0 +1,129 @@ +package com.epmet.opendata.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("wgh_jyz") +public class WghJyzEntity { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private Integer objectid; + + /** + * 序号 + */ + private String xh; + + /** + * 单位名称 + */ + private String name; + + /** + * + */ + private Double area; + + /** + * 周边安全间距 + */ + private String space; + + /** + * 存在问题 + */ + private String problem; + + /** + * 危险源类型 + */ + private String type; + + /** + * 经营地址 + */ + private String location; + + /** + * 负责人 + */ + private String principal; + + /** + * 联系电话 + */ + private String phone; + + /** + * 企业类型 + */ + private String qtype; + + /** + * 危化品种类 + */ + private String wtype; + + /** + * 等级 + */ + private String level; + + /** + * 性质 + */ + private String nature; + + /** + * 备注 + */ + private String remarks; + + /** + * + */ + private String dwmcjc; + + /** + * + */ + private String layer; + + /** + * + */ + private String ssjdb; + + /** + * 数量 + */ + private String amount; + + /** + * 应急措施 + */ + private String yjcs; + + /** + * 插入日期 + */ + private Date insertTime; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSjxxbEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSjxxbEntity.java new file mode 100644 index 0000000000..2e443c2205 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSjxxbEntity.java @@ -0,0 +1,99 @@ +package com.epmet.opendata.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("wgh_sjxxb") +public class WghSjxxbEntity { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private Integer objectid_1; + + /** + * + */ + private Double objectid; + + /** + * 事件来源 + */ + private String infosourcename; + + /** + * 事件类别 + */ + private String infotypename; + + /** + * 社区名称 + */ + private String communityname; + + /** + * 事件描述 + */ + private String description; + + /** + * + */ + private String taskid; + + /** + * + */ + private String casesn; + + /** + * 事件地址 + */ + private String address; + + /** + * 事件状态 + */ + private String statusname; + + /** + * + */ + private String infobcname; + + /** + * + */ + private String infoscname; + + /** + * 街道名称 + */ + private String streetname; + + /** + * + */ + private Date discovertime; + + /** + * 插入日期 + */ + private Date insertTime; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSqxxEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSqxxEntity.java new file mode 100644 index 0000000000..3ef9574bb9 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSqxxEntity.java @@ -0,0 +1,144 @@ +package com.epmet.opendata.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("wgh_sqxx") +public class WghSqxxEntity { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private Integer objectid; + + /** + * + */ + private Double commuarea; + + /** + * + */ + private String belongto; + + /** + * + */ + private String contacts; + + /** + * + */ + private String telphone; + + /** + * + */ + private Double numberOfGrid; + + /** + * + */ + private String streetCode; + + /** + * + */ + private String communityCode; + + /** + * + */ + private String commname; + + /** + * + */ + private String jdcjgb; + + /** + * + */ + private String wgz; + + /** + * + */ + private String policeName; + + /** + * + */ + private Double trafficPolicePhone; + + /** + * + */ + private String trafficPoliceCompany; + + /** + * + */ + private String peoPoliceName; + + /** + * + */ + private String peoPolicePhone; + + /** + * + */ + private String policeStation; + + /** + * + */ + private String wgy; + + /** + * + */ + private String jdlxks; + + /** + * + */ + private String ddy; + + /** + * + */ + private String zhzfxm; + + /** + * + */ + private String zhzfdh; + + /** + * + */ + private String zhzfbm; + + /** + * + */ + private Date insertTime; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSubdistrictOfficeEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSubdistrictOfficeEntity.java new file mode 100644 index 0000000000..fa133bc1fb --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSubdistrictOfficeEntity.java @@ -0,0 +1,49 @@ +package com.epmet.opendata.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("wgh_subdistrict_office") +public class WghSubdistrictOfficeEntity { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private String coordinateInfo; + + /** + * + */ + private String streetName; + + /** + * + */ + private String streetCode; + + /** + * + */ + private String longitude; + + /** + * + */ + private String latitude; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSzcgwghEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSzcgwghEntity.java new file mode 100644 index 0000000000..35c3e95f8f --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSzcgwghEntity.java @@ -0,0 +1,49 @@ +package com.epmet.opendata.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("wgh_szcgwgh") +public class WghSzcgwghEntity { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private Integer objectid; + + /** + * 备注 + */ + private String note; + + /** + * + */ + private String sssq; + + /** + * + */ + private String ssjd; + + /** + * + */ + private Date insertTime; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSzzrwgEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSzzrwgEntity.java new file mode 100644 index 0000000000..697b37f90f --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSzzrwgEntity.java @@ -0,0 +1,54 @@ +package com.epmet.opendata.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("wgh_szzrwg") +public class WghSzzrwgEntity { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private Integer objectid; + + /** + * 备注 + */ + private String note; + + /** + * 责任单位 + */ + private String name; + + /** + * 监管人 + */ + private String principal; + + /** + * 联系方式 + */ + private String phone; + + /** + * 插入日期 + */ + private Date insertTime; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghWhpdwEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghWhpdwEntity.java new file mode 100644 index 0000000000..760057255a --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghWhpdwEntity.java @@ -0,0 +1,139 @@ +package com.epmet.opendata.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("wgh_whpdw") +public class WghWhpdwEntity { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private Integer objectid; + + /** + * 序号 + */ + private String xh; + + /** + * 单位名称 + */ + private String name; + + /** + * + */ + private Double area; + + /** + * 周边安全间距 + */ + private String space; + + /** + * 存在问题 + */ + private String problem; + + /** + * 危险源类型 + */ + private String type; + + /** + * 经营地址 + */ + private String location; + + /** + * 安全负责人 + */ + private String person; + + /** + * 联系电话 + */ + private String phone; + + /** + * 企业类型 + */ + private String qtype; + + /** + * 危化品种类 + */ + private String wtype; + + /** + * 数量 + */ + private String amount; + + /** + * 等级 + */ + private String grade; + + /** + * 性质 + */ + private String natrue; + + /** + * 应急措施 + */ + private String yjcs; + + /** + * 备注 + */ + private String note; + + /** + * + */ + private String dwmcjc; + + /** + * 主要负责人 + */ + private String principal; + + /** + * 用途 + */ + private String user; + + /** + * + */ + private String layer; + + /** + * + */ + private String ssjdb; + + /** + * 插入日期 + */ + private Date insertTime; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghYjbmcsEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghYjbmcsEntity.java new file mode 100644 index 0000000000..6f4f0d7a74 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghYjbmcsEntity.java @@ -0,0 +1,89 @@ +package com.epmet.opendata.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("wgh_yjbmcs") +public class WghYjbmcsEntity { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private Integer objectid; + + /** + * + */ + private String grade; + + /** + * 地址 + */ + private String adress; + + /** + * 面积(㎡) + */ + private String area; + + /** + * 容纳人数 + */ + private String rnns; + + /** + * + */ + private String sfbsp; + + /** + * + */ + private String zysbcs; + + /** + * + */ + private String fzr; + + /** + * + */ + private String zgdw; + + /** + * + */ + private String name; + + /** + * + */ + private String fzrtel; + + /** + * + */ + private String ssjd; + + /** + * + */ + private Date insertTime; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghYqhjzEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghYqhjzEntity.java new file mode 100644 index 0000000000..909e33fd59 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghYqhjzEntity.java @@ -0,0 +1,129 @@ +package com.epmet.opendata.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("wgh_yqhjz") +public class WghYqhjzEntity { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private Integer objectid; + + /** + * 序号 + */ + private String xh; + + /** + * 单位名称 + */ + private String name; + + /** + * + */ + private Double area; + + /** + * 周边安全间距 + */ + private String space; + + /** + * 危险源类型 + */ + private String type; + + /** + * 经营地址 + */ + private String location; + + /** + * 负责人 + */ + private String principal; + + /** + * 联系电话 + */ + private String phone; + + /** + * 企业类型 + */ + private String qtype; + + /** + * 危化品种类 + */ + private String wtype; + + /** + * 数量 + */ + private String amount; + + /** + * 等级 + */ + private String grade; + + /** + * 性质 + */ + private String natrue; + + /** + * 应急措施 + */ + private String yjcs; + + /** + * 备注 + */ + private String note; + + /** + * 简称 + */ + private String dwmcjc; + + /** + * 所在图层 + */ + private String layer; + + /** + * 所属街道办 + */ + private String ssjdb; + + /** + * 存在问题 + */ + private String problem; + + /** + * 插入日期 + */ + private Date insertTime; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/caBmGridEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/caBmGridEntity.java new file mode 100644 index 0000000000..f287d88494 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/caBmGridEntity.java @@ -0,0 +1,211 @@ +package com.epmet.opendata.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("ca_bm_grid") +public class caBmGridEntity { + + private static final long serialVersionUID = 1L; + + /** + * 网格ID + */ + private Long gridId; + + /** + * 网格编码。人工填写,编码规则业务规定,不允许重复。 + */ + private String gridCode; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 行政区划的国标编码 + */ + private String gbCode; + + /** + * 上级网格ID + */ + private Long parentId; + + /** + * 上级网格编码 + */ + private String parentCode; + + /** + * 网格分类。1基础网格 2环保网格 3防火网格 4城管网格 5执法网格 6安监网格等 + */ + private String gridClassification; + + /** + * 网格层级。网格层级表的层级 +根据【网格层级表】的层级关系动态展示。 +查询【网格层级表】层级 条件:上层级=网格树返回的网格层级 + */ + private String gridLevel; + + /** + * 网格属性。01村庄、02小区、03企业、04学校(幼儿园)、05医院、06驻镇(街)单位、07其他 + */ + private String gridProperty; + + /** + * 是否最后一级:0否 1是 + */ + private String isEnd; + + /** + * 网格地址 + */ + private String gridAddress; + + /** + * 网格介绍 + */ + private String gridIntroduce; + + /** + * 宣传图片 + */ + private String gridPicture; + + /** + * 地图区域范围 + */ + private String reginScopeDesc; + + /** + * 展示顺序 + */ + private Integer gridSort; + + /** + * 标绘状态 + */ + private String pointStatus; + + /** + * 事件上报中心 + */ + private Long gridEmCenter; + + /** + * 初始日期 + */ + private Date gridBeginTime; + + /** + * 终止日期 + */ + private Date gridEndTime; + + /** + * 面积 + */ + private String gridArea; + + /** + * 是否有效 + */ + private String isValid; + + /** + * 创建人 + */ + private Long createBy; + + /** + * 创建时间 + */ + private Date createDate; + + /** + * + */ + private Long updateBy; + + /** + * + */ + private Date updateDate; + + /** + * 删除状态: 字典值:normal正常,删除deleted + */ + private String deleteFlag; + + /** + * 乐观锁 + */ + private Integer versions; + + /** + * 网格内人口规模 + */ + private String attribute1; + + /** + * 是否成立网格党支部或网格党小组 + */ + private String attribute2; + + /** + * 网格党组织类型 + */ + private String attribute3; + + /** + * 党组织编码 + */ + private String attribute4; + + /** + * 扩展字段 + */ + private String attribute5; + + /** + * 扩展字段 + */ + private Long attribute6; + + /** + * 扩展字段 + */ + private Long attribute7; + + /** + * 扩展字段 + */ + private Long attribute8; + + /** + * 扩展字段 + */ + private Date attribute9; + + /** + * 扩展字段 + */ + private Date attribute10; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/CaBmCategoryExcel.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/CaBmCategoryExcel.java new file mode 100644 index 0000000000..460df80eeb --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/CaBmCategoryExcel.java @@ -0,0 +1,84 @@ +package com.epmet.opendata.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 多级类型信息表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-16 + */ +@Data +public class CaBmCategoryExcel { + + @Excel(name = "类别ID") + private Long categoryId; + + @Excel(name = "名称") + private String categoryName; + + @Excel(name = "") + private String categoryType; + + @Excel(name = "名称值") + private String categoryValue; + + @Excel(name = "父类别ID") + private Long parentCategoryId; + + @Excel(name = "展示顺序") + private Integer categorySort; + + @Excel(name = "创建人") + private Long createBy; + + @Excel(name = "创建时间") + private Date createDate; + + @Excel(name = "最后修改人") + private Long updateBy; + + @Excel(name = "最后修改时间") + private Date updateDate; + + @Excel(name = "删除状态") + private String deleteFlag; + + @Excel(name = "乐观锁") + private Integer versions; + + @Excel(name = "扩展字段1") + private String attribute1; + + @Excel(name = "扩展字段2") + private String attribute2; + + @Excel(name = "扩展字段3") + private String attribute3; + + @Excel(name = "扩展字段4") + private String attribute4; + + @Excel(name = "扩展字段5") + private String attribute5; + + @Excel(name = "扩展字段6") + private Long attribute6; + + @Excel(name = "扩展字段7") + private Long attribute7; + + @Excel(name = "扩展字段8") + private Long attribute8; + + @Excel(name = "扩展字段9") + private Date attribute9; + + @Excel(name = "扩展字段10") + private Date attribute10; + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/CaLoudongExcel.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/CaLoudongExcel.java new file mode 100644 index 0000000000..fce722fd43 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/CaLoudongExcel.java @@ -0,0 +1,148 @@ +package com.epmet.opendata.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 楼栋基本信息表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-31 + */ +@Data +public class CaLoudongExcel { + + @Excel(name = "楼栋ID") + private Long buildingId; + + @Excel(name = "楼宇类型") + private String buildingType; + + @Excel(name = "网格ID") + private Long gridId; + + @Excel(name = "楼宇名称") + private String buildingName; + + @Excel(name = "用途分类") + private String buildingUse; + + @Excel(name = "楼宇状态") + private String buildingStatus; + + @Excel(name = "楼宇结构") + private String buildingStructure; + + @Excel(name = "使用现状") + private String buildingUseage; + + @Excel(name = "建筑时间") + private Date constructionTime; + + @Excel(name = "所处位置") + private String buildingAddr; + + @Excel(name = "小区(单位)名称") + private String communityName; + + @Excel(name = "楼栋长") + private String buildingLeader; + + @Excel(name = "楼层数") + private Integer layerCount; + + @Excel(name = "地下楼层数") + private Integer basementLayerCount; + + @Excel(name = "住宅开始层数") + private Integer houseBeginLayer; + + @Excel(name = "单元数") + private Integer unitCount; + + @Excel(name = "每层每单元户数") + private Integer layerRoomCount; + + @Excel(name = "总房屋数") + private Integer roomCount; + + @Excel(name = "电梯数量") + private String elevatorCount; + + @Excel(name = "建筑面积") + private String buildingArea; + + @Excel(name = "物业公司") + private String buildingPmc; + + @Excel(name = "介绍") + private String buildingDesc; + + @Excel(name = "标绘状态") + private String pointStatus; + + @Excel(name = "经度") + private BigDecimal longitude; + + @Excel(name = "纬度") + private BigDecimal latitude; + + @Excel(name = "数据来源") + private String platCode; + + @Excel(name = "创建人") + private Long createBy; + + @Excel(name = "创建时间") + private Date createDate; + + @Excel(name = "最后修改人") + private Long updateBy; + + @Excel(name = "最后修改时间") + private Date updateDate; + + @Excel(name = "删除状态") + private String deleteFlag; + + @Excel(name = "乐观锁") + private Integer versions; + + @Excel(name = "扩展字段1") + private String attribute1; + + @Excel(name = "扩展字段2") + private String attribute2; + + @Excel(name = "扩展字段3") + private String attribute3; + + @Excel(name = "扩展字段4") + private String attribute4; + + @Excel(name = "扩展字段5") + private String attribute5; + + @Excel(name = "小区主键") + private Long attribute6; + + @Excel(name = "扩展字段7") + private Long attribute7; + + @Excel(name = "扩展字段8") + private Long attribute8; + + @Excel(name = "扩展字段9") + private Date attribute9; + + @Excel(name = "扩展字段10") + private Date attribute10; + + @Excel(name = "小区主键") + private String communityId; + + +} \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/CaPingfangExcel.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/CaPingfangExcel.java new file mode 100644 index 0000000000..4eadd5f8b3 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/CaPingfangExcel.java @@ -0,0 +1,148 @@ +package com.epmet.opendata.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-31 + */ +@Data +public class CaPingfangExcel { + + @Excel(name = "楼栋ID") + private Long buildingId; + + @Excel(name = "楼宇类型") + private String buildingType; + + @Excel(name = "网格ID") + private Long gridId; + + @Excel(name = "楼宇名称") + private String buildingName; + + @Excel(name = "用途分类") + private String buildingUse; + + @Excel(name = "楼宇状态") + private String buildingStatus; + + @Excel(name = "楼宇结构") + private String buildingStructure; + + @Excel(name = "使用现状") + private String buildingUseage; + + @Excel(name = "建筑时间") + private Date constructionTime; + + @Excel(name = "所处位置") + private String buildingAddr; + + @Excel(name = "小区(单位)名称") + private String communityName; + + @Excel(name = "楼栋长") + private String buildingLeader; + + @Excel(name = "楼层数") + private Integer layerCount; + + @Excel(name = "地下楼层数") + private Integer basementLayerCount; + + @Excel(name = "住宅开始层数") + private Integer houseBeginLayer; + + @Excel(name = "单元数") + private Integer unitCount; + + @Excel(name = "每层每单元户数") + private Integer layerRoomCount; + + @Excel(name = "总房屋数") + private Integer roomCount; + + @Excel(name = "电梯数量") + private String elevatorCount; + + @Excel(name = "建筑面积") + private String buildingArea; + + @Excel(name = "物业公司") + private String buildingPmc; + + @Excel(name = "介绍") + private String buildingDesc; + + @Excel(name = "标绘状态") + private String pointStatus; + + @Excel(name = "经度") + private BigDecimal longitude; + + @Excel(name = "纬度") + private BigDecimal latitude; + + @Excel(name = "数据来源") + private String platCode; + + @Excel(name = "创建人") + private Long createBy; + + @Excel(name = "创建时间") + private Date createDate; + + @Excel(name = "最后修改人") + private Long updateBy; + + @Excel(name = "最后修改时间") + private Date updateDate; + + @Excel(name = "删除状态") + private String deleteFlag; + + @Excel(name = "乐观锁") + private Integer versions; + + @Excel(name = "扩展字段1") + private String attribute1; + + @Excel(name = "扩展字段2") + private String attribute2; + + @Excel(name = "扩展字段3") + private String attribute3; + + @Excel(name = "扩展字段4") + private String attribute4; + + @Excel(name = "扩展字段5") + private String attribute5; + + @Excel(name = "小区主键") + private Long attribute6; + + @Excel(name = "扩展字段7") + private Long attribute7; + + @Excel(name = "扩展字段8") + private Long attribute8; + + @Excel(name = "扩展字段9") + private Date attribute9; + + @Excel(name = "扩展字段10") + private Date attribute10; + + @Excel(name = "小区主键") + private String communityId; + + +} \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/CaRentalExcel.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/CaRentalExcel.java new file mode 100644 index 0000000000..f4ccf8ee38 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/CaRentalExcel.java @@ -0,0 +1,136 @@ +package com.epmet.opendata.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 出租房信息表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-31 + */ +@Data +public class CaRentalExcel { + + @Excel(name = "出租房ID") + private Long rentalId; + + @Excel(name = "网格ID") + private Long gridId; + + @Excel(name = "房屋ID") + private Long houseId; + + @Excel(name = "房屋编号") + private String houseName; + + @Excel(name = "房屋地址") + private String houseAddress; + + @Excel(name = "建筑用途") + private String houseUse; + + @Excel(name = "建筑面积(平方米)") + private BigDecimal houseArea; + + @Excel(name = "证件代码") + private String idType; + + @Excel(name = "证件号码") + private String idCard; + + @Excel(name = "房主姓名") + private String residentName; + + @Excel(name = "房主联系方式") + private String telephone; + + @Excel(name = "房主现居详址") + private String curliveAddress; + + @Excel(name = "出租用途") + private String rentUse; + + @Excel(name = "隐患类型") + private String troubleType; + + @Excel(name = "承租人ID") + private Long renterId; + + @Excel(name = "承租人公民身份证号码") + private String renterCardNumber; + + @Excel(name = "承租人证件类型") + private Long renterCardType; + + @Excel(name = "承租人姓名") + private String renterName; + + @Excel(name = "承租人联系方式") + private String renterPhone; + + @Excel(name = "经度") + private BigDecimal longitude; + + @Excel(name = "纬度") + private BigDecimal latitude; + + @Excel(name = "标绘状态") + private String pointStatus; + + @Excel(name = "数据来源") + private String platCode; + + @Excel(name = "创建人") + private Long createBy; + + @Excel(name = "创建时间") + private Date createDate; + + @Excel(name = "最后修改人") + private Long updateBy; + + @Excel(name = "最后修改时间") + private Date updateDate; + + @Excel(name = "删除状态") + private String deleteFlag; + + @Excel(name = "乐观锁") + private Integer versions; + + @Excel(name = "承租单位") + private String attribute1; + + @Excel(name = "承租日期") + private String attribute2; + + @Excel(name = "承租期限") + private String attribute3; + + @Excel(name = "扩展字段4") + private String attribute4; + + @Excel(name = "扩展字段5") + private String attribute5; + + @Excel(name = "扩展字段6") + private Long attribute6; + + @Excel(name = "扩展字段7") + private Long attribute7; + + @Excel(name = "扩展字段8") + private Long attribute8; + + @Excel(name = "扩展字段9") + private Date attribute9; + + @Excel(name = "扩展字段10") + private Date attribute10; + + +} \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/CaResidentExcel.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/CaResidentExcel.java new file mode 100644 index 0000000000..5d3007c8e9 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/CaResidentExcel.java @@ -0,0 +1,177 @@ +package com.epmet.opendata.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 人口基本信息表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-31 + */ +@Data +public class CaResidentExcel { + + @Excel(name = "人口ID") + private Long residentId; + + @Excel(name = "网格ID") + private Long gridId; + + @Excel(name = "人口性质") + private String residentProperty; + + @Excel(name = "居民分类") + private String residentType; + + @Excel(name = "证件类型") + private String idType; + + @Excel(name = "证件号码(公民身份证号)") + private String idCard; + + @Excel(name = "姓名") + private String residentName; + + @Excel(name = "性别") + private String sex; + + @Excel(name = "出生日期") + private Date birthday; + + @Excel(name = "民族") + private String nation; + + @Excel(name = "联系方式") + private String telephone; + + @Excel(name = "户籍省") + private String householdProv; + + @Excel(name = "户籍市") + private String householdCity; + + @Excel(name = "户籍县(区)") + private String householdCounty; + + @Excel(name = "户籍镇街") + private String householdTown; + + @Excel(name = "户籍社区/村") + private String householdVillage; + + @Excel(name = "户籍详址") + private String householdAddressDetail; + + @Excel(name = "现住省") + private String curliveProv; + + @Excel(name = "现住市") + private String curliveCity; + + @Excel(name = "现住县(区)") + private String curliveCounty; + + @Excel(name = "现住镇街") + private String curliveTown; + + @Excel(name = "现住社区/村") + private String curliveVillage; + + @Excel(name = "现住详址") + private String curliveAddressDetail; + + @Excel(name = "籍贯省") + private String nativeAddressProv; + + @Excel(name = "籍贯市") + private String nativeAddressCity; + + @Excel(name = "籍贯县(区)") + private String nativeAddressCounty; + + @Excel(name = "曾用名") + private String formerName; + + @Excel(name = "学历") + private String education; + + @Excel(name = "职业") + private String occupation; + + @Excel(name = "职业类别") + private String occupationType; + + @Excel(name = "服务处所") + private String serviceAddress; + + @Excel(name = "婚姻状况") + private String marriageStatus; + + @Excel(name = "政治面貌") + private String party; + + @Excel(name = "宗教信仰") + private String religious; + + @Excel(name = "有无皈依(已受洗)") + private String conversionState; + + @Excel(name = "国籍") + private String nationality; + + @Excel(name = "数据来源") + private String platCode; + + @Excel(name = "创建人") + private Long createBy; + + @Excel(name = "创建时间") + private Date createDate; + + @Excel(name = "最后修改人") + private Long updateBy; + + @Excel(name = "最后修改时间") + private Date updateDate; + + @Excel(name = "删除状态") + private String deleteFlag; + + @Excel(name = "乐观锁") + private Integer versions; + + @Excel(name = "扩展字段1") + private String attribute1; + + @Excel(name = "扩展字段2") + private String attribute2; + + @Excel(name = "扩展字段3") + private String attribute3; + + @Excel(name = "扩展字段4") + private String attribute4; + + @Excel(name = "扩展字段5") + private String attribute5; + + @Excel(name = "扩展字段6") + private Long attribute6; + + @Excel(name = "扩展字段7") + private Long attribute7; + + @Excel(name = "扩展字段8") + private Long attribute8; + + @Excel(name = "扩展字段9") + private Date attribute9; + + @Excel(name = "扩展字段10") + private Date attribute10; + + +} \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/CaRotatorsExcel.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/CaRotatorsExcel.java new file mode 100644 index 0000000000..a528ae4d29 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/CaRotatorsExcel.java @@ -0,0 +1,186 @@ +package com.epmet.opendata.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 流动人口表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-31 + */ +@Data +public class CaRotatorsExcel { + + @Excel(name = "主键id") + private Long rotatorsId; + + @Excel(name = "公民身份证号") + private String idCard; + + @Excel(name = "证件类型") + private String idType; + + @Excel(name = "姓名") + private String rotatorsName; + + @Excel(name = "曾用名") + private String formerName; + + @Excel(name = "性别") + private String sex; + + @Excel(name = "出生日期") + private Date birthday; + + @Excel(name = "民族") + private String nation; + + @Excel(name = "籍贯省") + private String nativeAddressProv; + + @Excel(name = "籍贯市") + private String nativeAddressCity; + + @Excel(name = "籍贯县(区)") + private String nativeAddressCountry; + + @Excel(name = "婚姻状况") + private String marriageStatus; + + @Excel(name = "政治面貌") + private String party; + + @Excel(name = "学历") + private String education; + + @Excel(name = "宗教信仰") + private String religious; + + @Excel(name = "职业类别") + private String occupationType; + + @Excel(name = "职业") + private String occupation; + + @Excel(name = "服务处所") + private String serviceAddress; + + @Excel(name = "联系方式") + private String telephone; + + @Excel(name = "户籍地省") + private String householdAddressProv; + + @Excel(name = "户籍地市") + private String householdAddressCity; + + @Excel(name = "户籍地县(区)") + private String householdAddressCountry; + + @Excel(name = "户籍地镇街") + private String householdAddressTown; + + @Excel(name = "户籍地社区/村") + private String householdAddressVillage; + + @Excel(name = "户籍门(楼)详址") + private String householdAddressDetail; + + @Excel(name = "现住地省") + private String curliveAddressProv; + + @Excel(name = "现住地市") + private String curliveAddressCity; + + @Excel(name = "现住地县(区)") + private String curliveAddressCountry; + + @Excel(name = "现住地镇街") + private String curliveAddressTown; + + @Excel(name = "现住地社区/村") + private String curliveAddressVillage; + + @Excel(name = "现住门(楼)详址") + private String curliveAddressDetail; + + @Excel(name = "流入原因") + private String inflowReason; + + @Excel(name = "办证类型") + private String certificateType; + + @Excel(name = "证件号码") + private String certificateNumber; + + @Excel(name = "登记日期") + private Date signDate; + + @Excel(name = "证件到期日期") + private Date endDate; + + @Excel(name = "住所类型") + private String residenceType; + + @Excel(name = "是否重点关注人员") + private String isFocusPerson; + + @Excel(name = "创建人") + private Long createBy; + + @Excel(name = "创建时间") + private Date createDate; + + @Excel(name = "最后修改人") + private Long updateBy; + + @Excel(name = "最后修改时间") + private Date updateDate; + + @Excel(name = "删除标识(正常的数据存:normal,逻辑删除的标识为:delete)") + private String deleteFlag; + + @Excel(name = "数据来源编码") + private String platcode; + + @Excel(name = "网格id") + private Long gridId; + + @Excel(name = "乐观锁") + private Integer versions; + + @Excel(name = "是否注销") + private String attribute1; + + @Excel(name = "注销原因") + private String attribute2; + + @Excel(name = "") + private String attribute3; + + @Excel(name = "") + private String attribute4; + + @Excel(name = "") + private String attribute5; + + @Excel(name = "") + private Long attribute6; + + @Excel(name = "") + private Long attribute7; + + @Excel(name = "") + private Long attribute8; + + @Excel(name = "") + private Date attribute9; + + @Excel(name = "") + private Date attribute10; + + +} \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/CaSysDictExcel.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/CaSysDictExcel.java new file mode 100644 index 0000000000..4e3b42a2da --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/CaSysDictExcel.java @@ -0,0 +1,54 @@ +package com.epmet.opendata.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 字典信息表,字典值和字典组均存入此表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-16 + */ +@Data +public class CaSysDictExcel { + + @Excel(name = "字典ID") + private Long dictId; + + @Excel(name = "字典值,例如:sex/F") + private String dictValue; + + @Excel(name = "1.字典组名称(性别)或者字典名称(女)") + private String dictLabel; + + @Excel(name = "字典值时存入字典的值,字典组时存null") + private String dictType; + + @Excel(name = "描述") + private String dictDesc; + + @Excel(name = "排序") + private Integer dictSort; + + @Excel(name = "创建人") + private Long createBy; + + @Excel(name = "创建时间") + private Date createDate; + + @Excel(name = "最后修改人") + private Long updateBy; + + @Excel(name = "最后修改时间") + private Date updateDate; + + @Excel(name = "字典值:normal正常,deleted正常") + private String deleteFlag; + + @Excel(name = "乐观锁") + private Integer versions; + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghBaseGridExcel.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghBaseGridExcel.java new file mode 100644 index 0000000000..e1370f23d0 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghBaseGridExcel.java @@ -0,0 +1,45 @@ +package com.epmet.opendata.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Data +public class WghBaseGridExcel { + + @Excel(name = "") + private String coordinateInfo; + + @Excel(name = "") + private String gridName; + + @Excel(name = "") + private String subDistrictOffice; + + @Excel(name = "") + private String community; + + @Excel(name = "") + private String streetCode; + + @Excel(name = "") + private String gridCode; + + @Excel(name = "") + private String communityCode; + + @Excel(name = "") + private String longitude; + + @Excel(name = "") + private String latitude; + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghCommunityExcel.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghCommunityExcel.java new file mode 100644 index 0000000000..243c77c0d3 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghCommunityExcel.java @@ -0,0 +1,39 @@ +package com.epmet.opendata.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Data +public class WghCommunityExcel { + + @Excel(name = "") + private String coordinateInfo; + + @Excel(name = "") + private String streetName; + + @Excel(name = "") + private String streetCode; + + @Excel(name = "") + private String communityName; + + @Excel(name = "") + private String communityCode; + + @Excel(name = "") + private String longitude; + + @Excel(name = "") + private String latitude; + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghDywgExcel.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghDywgExcel.java new file mode 100644 index 0000000000..0c8300cdb0 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghDywgExcel.java @@ -0,0 +1,51 @@ +package com.epmet.opendata.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 单元网格 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Data +public class WghDywgExcel { + + @Excel(name = "") + private Integer objectid; + + @Excel(name = "网格名称") + private String bgname; + + @Excel(name = "所属街镇") + private String street; + + @Excel(name = "所属社区") + private String community; + + @Excel(name = "网格面积") + private Double bgsqua; + + @Excel(name = "初始时间") + private Date ordate; + + @Excel(name = "变更时间") + private Date chdate; + + @Excel(name = "备注") + private String note; + + @Excel(name = "") + private String contacts; + + @Excel(name = "联系电话") + private String telphone; + + @Excel(name = "插入日期") + private Date insertTime; + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghJdbExcel.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghJdbExcel.java new file mode 100644 index 0000000000..e2bc316ac2 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghJdbExcel.java @@ -0,0 +1,39 @@ +package com.epmet.opendata.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 街道办 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Data +public class WghJdbExcel { + + @Excel(name = "") + private String objectid1; + + @Excel(name = "") + private String objectid; + + @Excel(name = "街道名称") + private String mc; + + @Excel(name = "责任人") + private String personInCharge; + + @Excel(name = "联系电话") + private String 联系电话; + + @Excel(name = "") + private Double shapeLeng; + + @Excel(name = "插入日期") + private Date insertTime; + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghJqzExcel.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghJqzExcel.java new file mode 100644 index 0000000000..c8f469aaef --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghJqzExcel.java @@ -0,0 +1,81 @@ +package com.epmet.opendata.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 加气站信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Data +public class WghJqzExcel { + + @Excel(name = "") + private Integer objectid; + + @Excel(name = "序号") + private String xh; + + @Excel(name = "单位名称") + private String name; + + @Excel(name = "") + private Double area; + + @Excel(name = "周边安全间距") + private String space; + + @Excel(name = "存在问题") + private String problem; + + @Excel(name = "危险源类型") + private String type; + + @Excel(name = "经营地址") + private String location; + + @Excel(name = "负责人") + private String principal; + + @Excel(name = "联系电话") + private String phone; + + @Excel(name = "企业类型") + private String qtype; + + @Excel(name = "危化品种类") + private String wtype; + + @Excel(name = "等级") + private String level; + + @Excel(name = "性质") + private String nature; + + @Excel(name = "备注") + private String remarks; + + @Excel(name = "") + private String dwmcjc; + + @Excel(name = "") + private String layer; + + @Excel(name = "") + private String ssjdb; + + @Excel(name = "数量") + private String amount; + + @Excel(name = "应急措施") + private String yjcs; + + @Excel(name = "插入日期") + private Date insertTime; + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghJxcsExcel.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghJxcsExcel.java new file mode 100644 index 0000000000..0c2bd157cf --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghJxcsExcel.java @@ -0,0 +1,78 @@ +package com.epmet.opendata.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 九小场所信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Data +public class WghJxcsExcel { + + @Excel(name = "") + private String objectid; + + @Excel(name = "") + private String jsonInfo; + + @Excel(name = "") + private String creatTime; + + @Excel(name = "所属街道") + private String ssjd; + + @Excel(name = "所属社区") + private String sssq; + + @Excel(name = "道路名") + private String dlm; + + @Excel(name = "门牌号") + private String mph; + + @Excel(name = "名称") + private String name; + + @Excel(name = "") + private String ztlx; + + @Excel(name = "子类型") + private String type; + + @Excel(name = "统一社会信用代码") + private String xydm; + + @Excel(name = "联系人") + private String lxr; + + @Excel(name = "联系电话") + private String lxdh; + + @Excel(name = "") + private String userName; + + @Excel(name = "备注") + private String bz; + + @Excel(name = "") + private String available; + + @Excel(name = "") + private String id; + + @Excel(name = "编辑人ID") + private String userId; + + @Excel(name = "编辑人姓名") + private String updateTim; + + @Excel(name = "插入日期") + private String insertTime; + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghJyzExcel.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghJyzExcel.java new file mode 100644 index 0000000000..e8bdf9e000 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghJyzExcel.java @@ -0,0 +1,81 @@ +package com.epmet.opendata.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 加油站 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Data +public class WghJyzExcel { + + @Excel(name = "") + private Integer objectid; + + @Excel(name = "序号") + private String xh; + + @Excel(name = "单位名称") + private String name; + + @Excel(name = "") + private Double area; + + @Excel(name = "周边安全间距") + private String space; + + @Excel(name = "存在问题") + private String problem; + + @Excel(name = "危险源类型") + private String type; + + @Excel(name = "经营地址") + private String location; + + @Excel(name = "负责人") + private String principal; + + @Excel(name = "联系电话") + private String phone; + + @Excel(name = "企业类型") + private String qtype; + + @Excel(name = "危化品种类") + private String wtype; + + @Excel(name = "等级") + private String level; + + @Excel(name = "性质") + private String nature; + + @Excel(name = "备注") + private String remarks; + + @Excel(name = "") + private String dwmcjc; + + @Excel(name = "") + private String layer; + + @Excel(name = "") + private String ssjdb; + + @Excel(name = "数量") + private String amount; + + @Excel(name = "应急措施") + private String yjcs; + + @Excel(name = "插入日期") + private Date insertTime; + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghSjxxbExcel.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghSjxxbExcel.java new file mode 100644 index 0000000000..eb861aa4ae --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghSjxxbExcel.java @@ -0,0 +1,63 @@ +package com.epmet.opendata.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 事件信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Data +public class WghSjxxbExcel { + + @Excel(name = "") + private Integer objectid1; + + @Excel(name = "") + private Double objectid; + + @Excel(name = "事件来源") + private String infosourcename; + + @Excel(name = "事件类别") + private String infotypename; + + @Excel(name = "社区名称") + private String communityname; + + @Excel(name = "事件描述") + private String description; + + @Excel(name = "") + private String taskid; + + @Excel(name = "") + private String casesn; + + @Excel(name = "事件地址") + private String address; + + @Excel(name = "事件状态") + private String statusname; + + @Excel(name = "") + private String infobcname; + + @Excel(name = "") + private String infoscname; + + @Excel(name = "街道名称") + private String streetname; + + @Excel(name = "") + private Date discovertime; + + @Excel(name = "插入日期") + private Date insertTime; + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghSqxxExcel.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghSqxxExcel.java new file mode 100644 index 0000000000..4d308f8d41 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghSqxxExcel.java @@ -0,0 +1,90 @@ +package com.epmet.opendata.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Data +public class WghSqxxExcel { + + @Excel(name = "") + private Integer objectid; + + @Excel(name = "") + private Double commuarea; + + @Excel(name = "") + private String belongto; + + @Excel(name = "") + private String contacts; + + @Excel(name = "") + private String telphone; + + @Excel(name = "") + private Double numberOfGrid; + + @Excel(name = "") + private String streetCode; + + @Excel(name = "") + private String communityCode; + + @Excel(name = "") + private String commname; + + @Excel(name = "") + private String jdcjgb; + + @Excel(name = "") + private String wgz; + + @Excel(name = "") + private String policeName; + + @Excel(name = "") + private Double trafficPolicePhone; + + @Excel(name = "") + private String trafficPoliceCompany; + + @Excel(name = "") + private String peoPoliceName; + + @Excel(name = "") + private String peoPolicePhone; + + @Excel(name = "") + private String policeStation; + + @Excel(name = "") + private String wgy; + + @Excel(name = "") + private String jdlxks; + + @Excel(name = "") + private String ddy; + + @Excel(name = "") + private String zhzfxm; + + @Excel(name = "") + private String zhzfdh; + + @Excel(name = "") + private String zhzfbm; + + @Excel(name = "") + private Date insertTime; + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghSubdistrictOfficeExcel.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghSubdistrictOfficeExcel.java new file mode 100644 index 0000000000..f33f6df6ea --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghSubdistrictOfficeExcel.java @@ -0,0 +1,33 @@ +package com.epmet.opendata.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Data +public class WghSubdistrictOfficeExcel { + + @Excel(name = "") + private String coordinateInfo; + + @Excel(name = "") + private String streetName; + + @Excel(name = "") + private String streetCode; + + @Excel(name = "") + private String longitude; + + @Excel(name = "") + private String latitude; + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghSzcgwghExcel.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghSzcgwghExcel.java new file mode 100644 index 0000000000..e00b617c39 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghSzcgwghExcel.java @@ -0,0 +1,36 @@ +package com.epmet.opendata.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 数字城管网格化信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Data +public class WghSzcgwghExcel { + + @Excel(name = "") + private Integer objectid; + + @Excel(name = "备注") + private String note; + + @Excel(name = "") + private String sssq; + + @Excel(name = "") + private String ssjd; + + @Excel(name = "") + private String id; + + @Excel(name = "") + private Date insertTime; + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghSzzrwgExcel.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghSzzrwgExcel.java new file mode 100644 index 0000000000..9b59f93a96 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghSzzrwgExcel.java @@ -0,0 +1,36 @@ +package com.epmet.opendata.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 市政责任网格信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Data +public class WghSzzrwgExcel { + + @Excel(name = "") + private Integer objectid; + + @Excel(name = "备注") + private String note; + + @Excel(name = "责任单位") + private String name; + + @Excel(name = "监管人") + private String principal; + + @Excel(name = "联系方式") + private String phone; + + @Excel(name = "插入日期") + private Date insertTime; + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghWhpdwExcel.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghWhpdwExcel.java new file mode 100644 index 0000000000..94a9e37250 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghWhpdwExcel.java @@ -0,0 +1,87 @@ +package com.epmet.opendata.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 危化品单位信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Data +public class WghWhpdwExcel { + + @Excel(name = "") + private Integer objectid; + + @Excel(name = "序号") + private String xh; + + @Excel(name = "单位名称") + private String name; + + @Excel(name = "") + private Double area; + + @Excel(name = "周边安全间距") + private String space; + + @Excel(name = "存在问题") + private String problem; + + @Excel(name = "危险源类型") + private String type; + + @Excel(name = "经营地址") + private String location; + + @Excel(name = "安全负责人") + private String person; + + @Excel(name = "联系电话") + private String phone; + + @Excel(name = "企业类型") + private String qtype; + + @Excel(name = "危化品种类") + private String wtype; + + @Excel(name = "数量") + private String amount; + + @Excel(name = "等级") + private String grade; + + @Excel(name = "性质") + private String natrue; + + @Excel(name = "应急措施") + private String yjcs; + + @Excel(name = "备注") + private String note; + + @Excel(name = "") + private String dwmcjc; + + @Excel(name = "主要负责人") + private String principal; + + @Excel(name = "用途") + private String user; + + @Excel(name = "") + private String layer; + + @Excel(name = "") + private String ssjdb; + + @Excel(name = "插入日期") + private Date insertTime; + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghYjbmcsExcel.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghYjbmcsExcel.java new file mode 100644 index 0000000000..b180b13932 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghYjbmcsExcel.java @@ -0,0 +1,57 @@ +package com.epmet.opendata.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 应急避难场所信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Data +public class WghYjbmcsExcel { + + @Excel(name = "") + private Integer objectid; + + @Excel(name = "") + private String grade; + + @Excel(name = "地址") + private String adress; + + @Excel(name = "面积(㎡)") + private String area; + + @Excel(name = "容纳人数") + private String rnns; + + @Excel(name = "") + private String sfbsp; + + @Excel(name = "") + private String zysbcs; + + @Excel(name = "") + private String fzr; + + @Excel(name = "") + private String zgdw; + + @Excel(name = "") + private String name; + + @Excel(name = "") + private String fzrtel; + + @Excel(name = "") + private String ssjd; + + @Excel(name = "") + private Date insertTime; + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghYqhjzExcel.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghYqhjzExcel.java new file mode 100644 index 0000000000..c6bfaa9307 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghYqhjzExcel.java @@ -0,0 +1,81 @@ +package com.epmet.opendata.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 油气合建站信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Data +public class WghYqhjzExcel { + + @Excel(name = "") + private Integer objectid; + + @Excel(name = "序号") + private String xh; + + @Excel(name = "单位名称") + private String name; + + @Excel(name = "") + private Double area; + + @Excel(name = "周边安全间距") + private String space; + + @Excel(name = "危险源类型") + private String type; + + @Excel(name = "经营地址") + private String location; + + @Excel(name = "负责人") + private String principal; + + @Excel(name = "联系电话") + private String phone; + + @Excel(name = "企业类型") + private String qtype; + + @Excel(name = "危化品种类") + private String wtype; + + @Excel(name = "数量") + private String amount; + + @Excel(name = "等级") + private String grade; + + @Excel(name = "性质") + private String natrue; + + @Excel(name = "应急措施") + private String yjcs; + + @Excel(name = "备注") + private String note; + + @Excel(name = "简称") + private String dwmcjc; + + @Excel(name = "所在图层") + private String layer; + + @Excel(name = "所属街道办") + private String ssjdb; + + @Excel(name = "存在问题") + private String problem; + + @Excel(name = "插入日期") + private Date insertTime; + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/caBmGridExcel.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/caBmGridExcel.java new file mode 100644 index 0000000000..21ee4853dd --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/caBmGridExcel.java @@ -0,0 +1,129 @@ +package com.epmet.opendata.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Data +public class caBmGridExcel { + + @Excel(name = "网格ID") + private Long gridId; + + @Excel(name = "网格编码。人工填写,编码规则业务规定,不允许重复。") + private String gridCode; + + @Excel(name = "网格名称") + private String gridName; + + @Excel(name = "行政区划的国标编码") + private String gbCode; + + @Excel(name = "上级网格ID") + private Long parentId; + + @Excel(name = "上级网格编码") + private String parentCode; + + @Excel(name = "网格分类。1基础网格 2环保网格 3防火网格 4城管网格 5执法网格 6安监网格等") + private String gridClassification; + + @Excel(name = "网格层级。网格层级表的层级 根据【网格层级表】的层级关系动态展示。 查询【网格层级表】层级 条件:上层级=网格树返回的网格层级") + private String gridLevel; + + @Excel(name = "网格属性。01村庄、02小区、03企业、04学校(幼儿园)、05医院、06驻镇(街)单位、07其他") + private String gridProperty; + + @Excel(name = "是否最后一级:0否 1是") + private String isEnd; + + @Excel(name = "网格地址") + private String gridAddress; + + @Excel(name = "网格介绍") + private String gridIntroduce; + + @Excel(name = "宣传图片") + private String gridPicture; + + @Excel(name = "地图区域范围") + private String reginScopeDesc; + + @Excel(name = "展示顺序") + private Integer gridSort; + + @Excel(name = "标绘状态") + private String pointStatus; + + @Excel(name = "事件上报中心") + private Long gridEmCenter; + + @Excel(name = "初始日期") + private Date gridBeginTime; + + @Excel(name = "终止日期") + private Date gridEndTime; + + @Excel(name = "面积") + private String gridArea; + + @Excel(name = "是否有效") + private String isValid; + + @Excel(name = "创建人") + private Long createBy; + + @Excel(name = "创建时间") + private Date createDate; + + @Excel(name = "") + private Long updateBy; + + @Excel(name = "") + private Date updateDate; + + @Excel(name = "删除状态: 字典值:normal正常,删除deleted") + private String deleteFlag; + + @Excel(name = "乐观锁") + private Integer versions; + + @Excel(name = "网格内人口规模") + private String attribute1; + + @Excel(name = "是否成立网格党支部或网格党小组") + private String attribute2; + + @Excel(name = "网格党组织类型") + private String attribute3; + + @Excel(name = "党组织编码") + private String attribute4; + + @Excel(name = "扩展字段") + private String attribute5; + + @Excel(name = "扩展字段") + private Long attribute6; + + @Excel(name = "扩展字段") + private Long attribute7; + + @Excel(name = "扩展字段") + private Long attribute8; + + @Excel(name = "扩展字段") + private Date attribute9; + + @Excel(name = "扩展字段") + private Date attribute10; + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/BasegridRedis.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/BasegridRedis.java new file mode 100644 index 0000000000..26ac2a5600 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/BasegridRedis.java @@ -0,0 +1,30 @@ +package com.epmet.opendata.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Component +public class BasegridRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/BmGridRedis.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/BmGridRedis.java new file mode 100644 index 0000000000..29e6df66c3 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/BmGridRedis.java @@ -0,0 +1,30 @@ +package com.epmet.opendata.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Component +public class BmGridRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/CaBmCategoryRedis.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/CaBmCategoryRedis.java new file mode 100644 index 0000000000..c561019f41 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/CaBmCategoryRedis.java @@ -0,0 +1,30 @@ +package com.epmet.opendata.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 多级类型信息表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-16 + */ +@Component +public class CaBmCategoryRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/CaLoudongRedis.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/CaLoudongRedis.java new file mode 100644 index 0000000000..f6e9dce887 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/CaLoudongRedis.java @@ -0,0 +1,30 @@ +package com.epmet.opendata.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 楼栋基本信息表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-31 + */ +@Component +public class CaLoudongRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/CaPingfangRedis.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/CaPingfangRedis.java new file mode 100644 index 0000000000..8a992d6f15 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/CaPingfangRedis.java @@ -0,0 +1,30 @@ +package com.epmet.opendata.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-31 + */ +@Component +public class CaPingfangRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/CaRentalRedis.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/CaRentalRedis.java new file mode 100644 index 0000000000..54e13c1d97 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/CaRentalRedis.java @@ -0,0 +1,30 @@ +package com.epmet.opendata.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 出租房信息表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-31 + */ +@Component +public class CaRentalRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/CaResidentRedis.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/CaResidentRedis.java new file mode 100644 index 0000000000..d16105e371 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/CaResidentRedis.java @@ -0,0 +1,30 @@ +package com.epmet.opendata.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 人口基本信息表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-31 + */ +@Component +public class CaResidentRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/CaRotatorsRedis.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/CaRotatorsRedis.java new file mode 100644 index 0000000000..2f1552f8ba --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/CaRotatorsRedis.java @@ -0,0 +1,30 @@ +package com.epmet.opendata.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 流动人口表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-31 + */ +@Component +public class CaRotatorsRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/CaSysDictRedis.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/CaSysDictRedis.java new file mode 100644 index 0000000000..3857e1803d --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/CaSysDictRedis.java @@ -0,0 +1,30 @@ +package com.epmet.opendata.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 字典信息表,字典值和字典组均存入此表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-16 + */ +@Component +public class CaSysDictRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/CommunityRedis.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/CommunityRedis.java new file mode 100644 index 0000000000..201fa90d44 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/CommunityRedis.java @@ -0,0 +1,30 @@ +package com.epmet.opendata.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Component +public class CommunityRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/SubdistrictOfficeRedis.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/SubdistrictOfficeRedis.java new file mode 100644 index 0000000000..11e7458396 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/SubdistrictOfficeRedis.java @@ -0,0 +1,30 @@ +package com.epmet.opendata.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Component +public class SubdistrictOfficeRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghDywgRedis.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghDywgRedis.java new file mode 100644 index 0000000000..7ae8d82888 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghDywgRedis.java @@ -0,0 +1,30 @@ +package com.epmet.opendata.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 单元网格 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Component +public class WghDywgRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghJdbRedis.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghJdbRedis.java new file mode 100644 index 0000000000..7eb624a467 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghJdbRedis.java @@ -0,0 +1,30 @@ +package com.epmet.opendata.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 街道办 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Component +public class WghJdbRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghJqzRedis.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghJqzRedis.java new file mode 100644 index 0000000000..2c05f982dd --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghJqzRedis.java @@ -0,0 +1,30 @@ +package com.epmet.opendata.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 加气站信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Component +public class WghJqzRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghJxcsRedis.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghJxcsRedis.java new file mode 100644 index 0000000000..4463866cd3 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghJxcsRedis.java @@ -0,0 +1,30 @@ +package com.epmet.opendata.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 九小场所信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Component +public class WghJxcsRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghJyzRedis.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghJyzRedis.java new file mode 100644 index 0000000000..6d477dd45c --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghJyzRedis.java @@ -0,0 +1,30 @@ +package com.epmet.opendata.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 加油站 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Component +public class WghJyzRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghSjxxbRedis.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghSjxxbRedis.java new file mode 100644 index 0000000000..f52724484b --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghSjxxbRedis.java @@ -0,0 +1,30 @@ +package com.epmet.opendata.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 事件信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Component +public class WghSjxxbRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghSqxxRedis.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghSqxxRedis.java new file mode 100644 index 0000000000..ae6c063db3 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghSqxxRedis.java @@ -0,0 +1,30 @@ +package com.epmet.opendata.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Component +public class WghSqxxRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghSzcgwghRedis.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghSzcgwghRedis.java new file mode 100644 index 0000000000..3ad17f710a --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghSzcgwghRedis.java @@ -0,0 +1,30 @@ +package com.epmet.opendata.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 数字城管网格化信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Component +public class WghSzcgwghRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghSzzrwgRedis.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghSzzrwgRedis.java new file mode 100644 index 0000000000..d3bf717cb2 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghSzzrwgRedis.java @@ -0,0 +1,30 @@ +package com.epmet.opendata.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 市政责任网格信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Component +public class WghSzzrwgRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghWhpdwRedis.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghWhpdwRedis.java new file mode 100644 index 0000000000..91d21285f1 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghWhpdwRedis.java @@ -0,0 +1,30 @@ +package com.epmet.opendata.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 危化品单位信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Component +public class WghWhpdwRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghYjbmcsRedis.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghYjbmcsRedis.java new file mode 100644 index 0000000000..cbe2fb69d5 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghYjbmcsRedis.java @@ -0,0 +1,30 @@ +package com.epmet.opendata.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 应急避难场所信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Component +public class WghYjbmcsRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghYqhjzRedis.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghYqhjzRedis.java new file mode 100644 index 0000000000..4143ec72df --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghYqhjzRedis.java @@ -0,0 +1,30 @@ +package com.epmet.opendata.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 油气合建站信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +@Component +public class WghYqhjzRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaBmCategoryService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaBmCategoryService.java new file mode 100644 index 0000000000..5f0ff8d3eb --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaBmCategoryService.java @@ -0,0 +1,90 @@ +package com.epmet.opendata.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.opendata.dto.ca.CaBmCategoryDTO; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.entity.CaBmCategoryEntity; + + +import java.util.List; +import java.util.Map; + +/** + * 多级类型信息表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-16 + */ +public interface CaBmCategoryService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-06-16 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-06-16 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return CaBmCategoryDTO + * @author generator + * @date 2022-06-16 + */ + CaBmCategoryDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-16 + */ + void save(CaBmCategoryDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-16 + */ + void update(CaBmCategoryDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-06-16 + */ + void delete(String[] ids); + + /** + * 调用ruoyi接口存储数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/16 16:38 + */ + void preserBmCategoryVation(PreserVationFormDTO dto); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaLoudongService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaLoudongService.java new file mode 100644 index 0000000000..10e5a08aa4 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaLoudongService.java @@ -0,0 +1,113 @@ +package com.epmet.opendata.service; + + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.opendata.dto.ca.CaLoudongDTO; +import com.epmet.opendata.dto.form.CaLoudongDetailsFormDTO; +import com.epmet.opendata.dto.form.CaLoudongFormDTO; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.result.CaLoudongDetailsResultDTO; +import com.epmet.opendata.dto.result.CaLoudongResultDTO; +import com.epmet.opendata.dto.result.LouDongCascadeResultDTO; +import com.epmet.opendata.entity.CaLoudongEntity; + + +import java.util.List; +import java.util.Map; + +/** + * 楼栋基本信息表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-31 + */ +public interface CaLoudongService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-05-31 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-05-31 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return CaLoudongDTO + * @author generator + * @date 2022-05-31 + */ + CaLoudongDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-31 + */ + void save(CaLoudongDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-31 + */ + void update(CaLoudongDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-05-31 + */ + void delete(String[] ids); + + /** + * 楼栋基本信息分页 + * + * @param dto + * @return com.epmet.commons.tools.page.PageData + * @author LZN + * @date 2022/5/31 18:57 + */ + PageData getPage(CaLoudongFormDTO dto); + + /** + * 楼栋基本信息详情 + * + * @param dto + * @return + */ + CaLoudongDetailsResultDTO getLouDongDetails(CaLoudongDetailsFormDTO dto); + + /** + * 楼栋调用ruoyi接口存储数据 + * + * @param dto + */ + void preserLouDongVation(PreserVationFormDTO dto); + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaPingfangService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaPingfangService.java new file mode 100644 index 0000000000..26f6501df3 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaPingfangService.java @@ -0,0 +1,105 @@ +package com.epmet.opendata.service; + + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.opendata.dto.ca.CaPingfangDTO; +import com.epmet.opendata.dto.form.CaPingFangDetailsFormDTO; +import com.epmet.opendata.dto.form.CaPingfangFormDTO; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.result.CaPingFangDetailsResultDTO; +import com.epmet.opendata.entity.CaPingfangEntity; + + +import java.util.List; +import java.util.Map; + +/** + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-31 + */ +public interface CaPingfangService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-05-31 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-05-31 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return CaPingfangDTO + * @author generator + * @date 2022-05-31 + */ + CaPingfangDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-31 + */ + void save(CaPingfangDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-31 + */ + void update(CaPingfangDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-05-31 + */ + void delete(String[] ids); + + /** + * 平房基础信息分页 + * + * @param dto + * @return + */ + PageData getPage(CaPingfangFormDTO dto); + + /** + * 平房调用ruoyi接口存储数据 + * + * @param dto + */ + void preserPingFangVation(PreserVationFormDTO dto); + + /** + * 平房详情 + * + * @param dto + * @return + */ + CaPingFangDetailsResultDTO getPingFangDetails(CaPingFangDetailsFormDTO dto); +} \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRentalService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRentalService.java new file mode 100644 index 0000000000..ae1f631b54 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRentalService.java @@ -0,0 +1,107 @@ +package com.epmet.opendata.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.opendata.dto.ca.CaRentalDTO; +import com.epmet.opendata.dto.form.CaRentalDetailsFormDTO; +import com.epmet.opendata.dto.form.CaRentalFormtDTO; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.result.CaRentalDetailsResultDTO; +import com.epmet.opendata.dto.result.CaRentalResultDTO; +import com.epmet.opendata.entity.CaRentalEntity; + + +import java.util.List; +import java.util.Map; + +/** + * 出租房信息表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-31 + */ +public interface CaRentalService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-05-31 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-05-31 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return CaRentalDTO + * @author generator + * @date 2022-05-31 + */ + CaRentalDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-31 + */ + void save(CaRentalDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-31 + */ + void update(CaRentalDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-05-31 + */ + void delete(String[] ids); + + /** + * 出租房信息分页 + * + * @param dto + * @return + */ + PageData getPage(CaRentalFormtDTO dto); + + /** + * 出租房调用ruoyi接口存储数据 + * + * @param dto + */ + void preserRentalVation(PreserVationFormDTO dto); + + /** + * 出租房详情 + * + * @param dto + * @return + */ + CaRentalDetailsResultDTO getRentalDetails(CaRentalDetailsFormDTO dto); +} \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaResidentService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaResidentService.java new file mode 100644 index 0000000000..0f1406b524 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaResidentService.java @@ -0,0 +1,107 @@ +package com.epmet.opendata.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.opendata.dto.ca.CaResidentDTO; +import com.epmet.opendata.dto.form.CaResidentDetailsFormDTO; +import com.epmet.opendata.dto.form.CaResidentFormDTO; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.result.CaResidentDetailsResultDTO; +import com.epmet.opendata.dto.result.CaResidentResultDTO; +import com.epmet.opendata.entity.CaResidentEntity; + + +import java.util.List; +import java.util.Map; + +/** + * 人口基本信息表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-31 + */ +public interface CaResidentService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-05-31 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-05-31 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return CaResidentDTO + * @author generator + * @date 2022-05-31 + */ + CaResidentDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-31 + */ + void save(CaResidentDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-31 + */ + void update(CaResidentDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-05-31 + */ + void delete(String[] ids); + + /** + * 人口基本信息分页 + * + * @param dto + * @return + */ + PageData getPage(CaResidentFormDTO dto); + + /** + * 人口基本信息调用ruoyi接口存储数据 + * + * @param dto + */ + void preserResidentVation(PreserVationFormDTO dto); + + /** + * 人口基本信息详情 + * + * @param dto + * @return + */ + CaResidentDetailsResultDTO getResidentDetails(CaResidentDetailsFormDTO dto); +} \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRotatorsService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRotatorsService.java new file mode 100644 index 0000000000..f114134bf7 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRotatorsService.java @@ -0,0 +1,106 @@ +package com.epmet.opendata.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.opendata.dto.ca.CaRotatorsDTO; +import com.epmet.opendata.dto.form.CaRotatorsDetailsFormDTO; +import com.epmet.opendata.dto.form.CaRotatorsFormDTO; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.result.CaRotatorsDetailsResultDTO; +import com.epmet.opendata.dto.result.CaRotatorsResultDTO; +import com.epmet.opendata.entity.CaRotatorsEntity; + +import java.util.List; +import java.util.Map; + +/** + * 流动人口表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-31 + */ +public interface CaRotatorsService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-05-31 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-05-31 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return CaRotatorsDTO + * @author generator + * @date 2022-05-31 + */ + CaRotatorsDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-31 + */ + void save(CaRotatorsDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-31 + */ + void update(CaRotatorsDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-05-31 + */ + void delete(String[] ids); + + /** + * 流动人口表 + * + * @param dto + * @return + */ + PageData getPage(CaRotatorsFormDTO dto); + + /** + * 流动人口调用ruoyi接口存储数据 + * + * @param dto + */ + void preserRotatorsVation(PreserVationFormDTO dto); + + /** + * 流动人口详情 + * + * @param dto + * @return + */ + CaRotatorsDetailsResultDTO getRotatorsDetails(CaRotatorsDetailsFormDTO dto); +} \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaSysDictService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaSysDictService.java new file mode 100644 index 0000000000..f2c0cebb5f --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaSysDictService.java @@ -0,0 +1,90 @@ +package com.epmet.opendata.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.opendata.dto.ca.CaSysDictDTO; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.entity.CaSysDictEntity; + + +import java.util.List; +import java.util.Map; + +/** + * 字典信息表,字典值和字典组均存入此表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-16 + */ +public interface CaSysDictService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-06-16 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-06-16 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return CaSysDictDTO + * @author generator + * @date 2022-06-16 + */ + CaSysDictDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-16 + */ + void save(CaSysDictDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-16 + */ + void update(CaSysDictDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-06-16 + */ + void delete(String[] ids); + + /** + * 调用ruoyi接口存储数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/16 16:52 + */ + void preserSysdictVation(PreserVationFormDTO dto); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/GuardarDatosTaskService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/GuardarDatosTaskService.java new file mode 100644 index 0000000000..fbd89caa2f --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/GuardarDatosTaskService.java @@ -0,0 +1,16 @@ +package com.epmet.opendata.service; + +import com.epmet.opendata.dto.form.PreserVationFormDTO; + +/** + * 定时任务 + * + * @param + * @author LZN + * @return + * @date 2022/6/7 15:54 + */ +public interface GuardarDatosTaskService { + + void guardarDatosTask(PreserVationFormDTO dto); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghBaseGridService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghBaseGridService.java new file mode 100644 index 0000000000..6c2cff2cf2 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghBaseGridService.java @@ -0,0 +1,88 @@ +package com.epmet.opendata.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.BasegridDTO; +import com.epmet.opendata.entity.WghBaseGridEntity; + + +import java.util.List; +import java.util.Map; + +/** + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +public interface WghBaseGridService 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 BasegridDTO + * @author generator + * @date 2022-06-14 + */ + BasegridDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void save(BasegridDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void update(BasegridDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-06-14 + */ + void delete(String[] ids); + + /** + * 调用ruoyi存储基础网格的数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/14 13:40 + */ + void preserBaseGridVation(PreserVationFormDTO dto); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghCommunityService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghCommunityService.java new file mode 100644 index 0000000000..a53ffb8a6a --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghCommunityService.java @@ -0,0 +1,88 @@ +package com.epmet.opendata.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.CommunityDTO; +import com.epmet.opendata.entity.WghCommunityEntity; + + +import java.util.List; +import java.util.Map; + +/** + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +public interface WghCommunityService 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 CommunityDTO + * @author generator + * @date 2022-06-14 + */ + CommunityDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void save(CommunityDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void update(CommunityDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-06-14 + */ + void delete(String[] ids); + + /** + * 调用ruoyi接口存储社区数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/14 15:03 + */ + void getPreserCommunityVation(PreserVationFormDTO dto); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghDywgService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghDywgService.java new file mode 100644 index 0000000000..8f13184379 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghDywgService.java @@ -0,0 +1,89 @@ +package com.epmet.opendata.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.WghDywgDTO; +import com.epmet.opendata.entity.WghDywgEntity; + +import java.util.List; +import java.util.Map; + +/** + * 单元网格 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +public interface WghDywgService 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 WghDywgDTO + * @author generator + * @date 2022-06-14 + */ + WghDywgDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void save(WghDywgDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void update(WghDywgDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-06-14 + */ + void delete(String[] ids); + + /** + * 调用ruoyi接口获取dywg数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/14 15:11 + */ + void getPreserDywgVation(PreserVationFormDTO dto); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghJdbService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghJdbService.java new file mode 100644 index 0000000000..ab9e62fc86 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghJdbService.java @@ -0,0 +1,90 @@ +package com.epmet.opendata.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.WghJdbDTO; +import com.epmet.opendata.entity.WghJdbEntity; + + +import java.util.List; +import java.util.Map; + +/** + * 街道办 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +public interface WghJdbService 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 WghJdbDTO + * @author generator + * @date 2022-06-14 + */ + WghJdbDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void save(WghJdbDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void update(WghJdbDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-06-14 + */ + void delete(String[] ids); + + /** + * 调用ruoyi接口获取wgh_jdb数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/14 15:31 + */ + void getPreserWghJdbVation(PreserVationFormDTO dto); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghJqzService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghJqzService.java new file mode 100644 index 0000000000..9ad0ee26d6 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghJqzService.java @@ -0,0 +1,90 @@ +package com.epmet.opendata.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.WghJqzDTO; +import com.epmet.opendata.entity.WghJqzEntity; + + +import java.util.List; +import java.util.Map; + +/** + * 加气站信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +public interface WghJqzService 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 WghJqzDTO + * @author generator + * @date 2022-06-14 + */ + WghJqzDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void save(WghJqzDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void update(WghJqzDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-06-14 + */ + void delete(String[] ids); + + /** + * 调用ruoyi接口存储wgh_jqz数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/14 15:40 + */ + void getPreserWghjqzVation(PreserVationFormDTO dto); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghJxcsService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghJxcsService.java new file mode 100644 index 0000000000..de8df4334d --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghJxcsService.java @@ -0,0 +1,90 @@ +package com.epmet.opendata.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.WghJxcsDTO; +import com.epmet.opendata.entity.WghJxcsEntity; + + +import java.util.List; +import java.util.Map; + +/** + * 九小场所信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +public interface WghJxcsService 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 WghJxcsDTO + * @author generator + * @date 2022-06-14 + */ + WghJxcsDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void save(WghJxcsDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void update(WghJxcsDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-06-14 + */ + void delete(String[] ids); + + /** + * 调用ruoyi接口存储wgh_jxcs数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/14 15:46 + */ + void preserWghJxcsVation(PreserVationFormDTO dto); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghJyzService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghJyzService.java new file mode 100644 index 0000000000..77778a6262 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghJyzService.java @@ -0,0 +1,89 @@ +package com.epmet.opendata.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.WghJyzDTO; +import com.epmet.opendata.entity.WghJyzEntity; + +import java.util.List; +import java.util.Map; + +/** + * 加油站 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +public interface WghJyzService 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 WghJyzDTO + * @author generator + * @date 2022-06-14 + */ + WghJyzDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void save(WghJyzDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void update(WghJyzDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-06-14 + */ + void delete(String[] ids); + + /** + * 调用ruoyi接口获取wgh_jyz数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/14 15:53 + */ + void getPreserWghJyzVation(PreserVationFormDTO dto); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSjxxbService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSjxxbService.java new file mode 100644 index 0000000000..1185b76fcb --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSjxxbService.java @@ -0,0 +1,89 @@ +package com.epmet.opendata.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.WghSjxxbDTO; +import com.epmet.opendata.entity.WghSjxxbEntity; + +import java.util.List; +import java.util.Map; + +/** + * 事件信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +public interface WghSjxxbService 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 WghSjxxbDTO + * @author generator + * @date 2022-06-14 + */ + WghSjxxbDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void save(WghSjxxbDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void update(WghSjxxbDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-06-14 + */ + void delete(String[] ids); + + /** + * 调用ruoyi接口获取wgh_sjxx数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/14 16:02 + */ + void getPreserSjxxVation(PreserVationFormDTO dto); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSqxxService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSqxxService.java new file mode 100644 index 0000000000..93a9a297b4 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSqxxService.java @@ -0,0 +1,90 @@ +package com.epmet.opendata.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.WghSqxxDTO; +import com.epmet.opendata.entity.WghSqxxEntity; + + +import java.util.List; +import java.util.Map; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +public interface WghSqxxService 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 WghSqxxDTO + * @author generator + * @date 2022-06-14 + */ + WghSqxxDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void save(WghSqxxDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void update(WghSqxxDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-06-14 + */ + void delete(String[] ids); + + /** + * 调用ruoyi接口获取wgh_sqxx数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/14 16:08 + */ + void getPreserWghSqxxVation(PreserVationFormDTO dto); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSubdistrictOfficeService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSubdistrictOfficeService.java new file mode 100644 index 0000000000..f378b09109 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSubdistrictOfficeService.java @@ -0,0 +1,81 @@ +package com.epmet.opendata.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.SubdistrictOfficeDTO; +import com.epmet.opendata.entity.WghSubdistrictOfficeEntity; + +import java.util.List; +import java.util.Map; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +public interface WghSubdistrictOfficeService 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 SubdistrictOfficeDTO + * @author generator + * @date 2022-06-14 + */ + SubdistrictOfficeDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void save(SubdistrictOfficeDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void update(SubdistrictOfficeDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-06-14 + */ + void delete(String[] ids); + + void getpreserSubVation(PreserVationFormDTO dto); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSzcgwghService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSzcgwghService.java new file mode 100644 index 0000000000..39533fc2a1 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSzcgwghService.java @@ -0,0 +1,90 @@ +package com.epmet.opendata.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.WghSzcgwghDTO; +import com.epmet.opendata.entity.WghSzcgwghEntity; + + +import java.util.List; +import java.util.Map; + +/** + * 数字城管网格化信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +public interface WghSzcgwghService 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 WghSzcgwghDTO + * @author generator + * @date 2022-06-14 + */ + WghSzcgwghDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void save(WghSzcgwghDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void update(WghSzcgwghDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-06-14 + */ + void delete(String[] ids); + + /** + * 调用ruoyi系统获取wgh_szcgwgh数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/14 16:20 + */ + void getPreserWghSzcgwghVation(PreserVationFormDTO dto); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSzzrwgService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSzzrwgService.java new file mode 100644 index 0000000000..17048d584d --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSzzrwgService.java @@ -0,0 +1,90 @@ +package com.epmet.opendata.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.WghSzzrwgDTO; +import com.epmet.opendata.entity.WghSzzrwgEntity; + + +import java.util.List; +import java.util.Map; + +/** + * 市政责任网格信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +public interface WghSzzrwgService 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 WghSzzrwgDTO + * @author generator + * @date 2022-06-14 + */ + WghSzzrwgDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void save(WghSzzrwgDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void update(WghSzzrwgDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-06-14 + */ + void delete(String[] ids); + + /** + * 调用ruoyi接口获取wgh_szzrwg数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/14 16:27 + */ + void getPreserWghSzzrwgVation(PreserVationFormDTO dto); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghWhpdwService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghWhpdwService.java new file mode 100644 index 0000000000..16214aeb9f --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghWhpdwService.java @@ -0,0 +1,90 @@ +package com.epmet.opendata.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.WghWhpdwDTO; +import com.epmet.opendata.entity.WghWhpdwEntity; + + +import java.util.List; +import java.util.Map; + +/** + * 危化品单位信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +public interface WghWhpdwService 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 WghWhpdwDTO + * @author generator + * @date 2022-06-14 + */ + WghWhpdwDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void save(WghWhpdwDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void update(WghWhpdwDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-06-14 + */ + void delete(String[] ids); + + /** + * 调用ruoyi系统获取wgh_whpdw数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/14 16:34 + */ + void getPreserWhpdwVation(PreserVationFormDTO dto); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghYjbmcsService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghYjbmcsService.java new file mode 100644 index 0000000000..03cbb10b49 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghYjbmcsService.java @@ -0,0 +1,90 @@ +package com.epmet.opendata.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.WghYjbmcsDTO; +import com.epmet.opendata.entity.WghYjbmcsEntity; + + +import java.util.List; +import java.util.Map; + +/** + * 应急避难场所信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +public interface WghYjbmcsService 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 WghYjbmcsDTO + * @author generator + * @date 2022-06-14 + */ + WghYjbmcsDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void save(WghYjbmcsDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void update(WghYjbmcsDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-06-14 + */ + void delete(String[] ids); + + /** + * 调用ruoyi系统获取wgh_yjbmcs数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/14 16:39 + */ + void getPreserWghYjbmcsVation(PreserVationFormDTO dto); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghYqhjzService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghYqhjzService.java new file mode 100644 index 0000000000..129c917617 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghYqhjzService.java @@ -0,0 +1,89 @@ +package com.epmet.opendata.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.entity.WghYqhjzEntity; +import com.epmet.opendata.dto.wgh.WghYqhjzDTO; + +import java.util.List; +import java.util.Map; + +/** + * 油气合建站信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +public interface WghYqhjzService 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 WghYqhjzDTO + * @author generator + * @date 2022-06-14 + */ + WghYqhjzDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void save(WghYqhjzDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void update(WghYqhjzDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-06-14 + */ + void delete(String[] ids); + + /** + * 调用ruoyi系统获取wgh_yqhjz数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/14 16:46 + */ + void getPreserWghYqhjzVation(PreserVationFormDTO dto); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/caBmGridService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/caBmGridService.java new file mode 100644 index 0000000000..5f763e4433 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/caBmGridService.java @@ -0,0 +1,101 @@ +package com.epmet.opendata.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.result.LouDongCascadeResultDTO; +import com.epmet.opendata.dto.wgh.BmGridDTO; +import com.epmet.opendata.entity.caBmGridEntity; + + +import java.util.List; +import java.util.Map; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-14 + */ +public interface caBmGridService 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 BmGridDTO + * @author generator + * @date 2022-06-14 + */ + BmGridDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void save(BmGridDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-14 + */ + void update(BmGridDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-06-14 + */ + void delete(String[] ids); + + /** + * 调用ruoyi存储bm_grid数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/14 14:17 + */ + void getPreserBmGridVation(PreserVationFormDTO dto); + + /** + * 获取级联菜单 + * + * @param + * @return java.util.List + * @author LZN + * @date 2022/6/17 13:32 + */ + List getCascadeMenu(); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaBmCategoryServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaBmCategoryServiceImpl.java new file mode 100644 index 0000000000..6bc74d2e1b --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaBmCategoryServiceImpl.java @@ -0,0 +1,173 @@ +package com.epmet.opendata.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +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.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; + +import com.epmet.commons.tools.utils.HttpClientManager; +import com.epmet.commons.tools.utils.Result; +import com.epmet.opendata.dao.CaBmCategoryDao; +import com.epmet.opendata.dto.ca.CaBmCategoryDTO; +import com.epmet.opendata.dto.constant.CaWghDataConstant; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.entity.CaBmCategoryEntity; +import com.epmet.opendata.entity.CaLoudongEntity; +import com.epmet.opendata.redis.CaBmCategoryRedis; +import com.epmet.opendata.service.CaBmCategoryService; +import com.epmet.opendata.util.AesUtils; +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-16 + */ +@Service +public class CaBmCategoryServiceImpl extends BaseServiceImpl implements CaBmCategoryService { + + @Autowired + private CaBmCategoryRedis caBmCategoryRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, CaBmCategoryDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, CaBmCategoryDTO.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 CaBmCategoryDTO get(String id) { + CaBmCategoryEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, CaBmCategoryDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(CaBmCategoryDTO dto) { + CaBmCategoryEntity entity = ConvertUtils.sourceToTarget(dto, CaBmCategoryEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(CaBmCategoryDTO dto) { + CaBmCategoryEntity entity = ConvertUtils.sourceToTarget(dto, CaBmCategoryEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + /** + * 调用ruoyi接口存储数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/16 16:38 + */ + @Override + public void preserBmCategoryVation(PreserVationFormDTO dto) { + int i = baseDao.deleteAll(); + if (i >= 0) { + dto.setPageNo(NumConstant.ONE); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); + dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_UNICOM); + dto.setTableName(CaWghDataConstant.UNICOM_BM_CATEGORY); + + dto.setWhereCase("delete_flag = 'normal'"); + dto.setOrderBy("category_id,parent_category_id,create_date,update_date"); + + int pageNo = 1; + + int total = 0; + + do { + try { + total = listCategory(dto); + pageNo++; + dto.setPageNo(pageNo); + } catch (Exception e) { + e.printStackTrace(); + } + } while (total > (pageNo * NumConstant.FIFTY)); + } + + } + + private int listCategory(PreserVationFormDTO dto) throws Exception { + String aes = AesUtils.encryptByAES(JSONObject.toJSONString(dto), CaWghDataConstant.AESKEY); + JSONObject obj = new JSONObject(); + obj.put(CaWghDataConstant.UNICOM_CONDITION, aes); + String data = HttpClientManager.getInstance().sendPostByJSON(CaWghDataConstant.DATA_URL_UNICON, obj.toJSONString()).getData(); + JSONObject toResult = JSON.parseObject(data); + Result result = ConvertUtils.mapToEntity(toResult, Result.class); + if (!result.success()) { + return dto.getPageNo() + 1; + } + + ReturnDate returnDate = JSONObject.parseObject(JSONObject.toJSONString(result.getData()), ReturnDate.class); + this.insertBatch(returnDate.getList()); + return returnDate.getTotal(); + } + + static class ReturnDate { + + private int total; + private List list; + + + public int getTotal() { + return total; + } + + public void setTotal(int total) { + this.total = total; + } + + public List getList() { + return list; + } + + public void setList(List list) { + this.list = list; + } + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaBmGridServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaBmGridServiceImpl.java new file mode 100644 index 0000000000..42528e3a4a --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaBmGridServiceImpl.java @@ -0,0 +1,188 @@ +package com.epmet.opendata.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +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.constant.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.HttpClientManager; +import com.epmet.commons.tools.utils.LouDongTreeNodeUtils; +import com.epmet.commons.tools.utils.Result; + +import com.epmet.opendata.dao.caBmGridDao; +import com.epmet.opendata.dto.constant.CaWghDataConstant; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.result.LouDongCascadeResultDTO; +import com.epmet.opendata.dto.wgh.BmGridDTO; + +import com.epmet.opendata.entity.caBmGridEntity; +import com.epmet.opendata.redis.BmGridRedis; + +import com.epmet.opendata.service.caBmGridService; +import com.epmet.opendata.util.AesUtils; +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 CaBmGridServiceImpl extends BaseServiceImpl implements caBmGridService { + + @Autowired + private BmGridRedis bmGridRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, BmGridDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, BmGridDTO.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 BmGridDTO get(String id) { + caBmGridEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, BmGridDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(BmGridDTO dto) { + caBmGridEntity entity = ConvertUtils.sourceToTarget(dto, caBmGridEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(BmGridDTO dto) { + caBmGridEntity entity = ConvertUtils.sourceToTarget(dto, caBmGridEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + /** + * 调用ruoyi存储bm_grid数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/14 14:17 + */ + @Override + public void getPreserBmGridVation(PreserVationFormDTO dto) { + int i = baseDao.deleteAll(); + if (i >= 0) { + dto.setPageNo(NumConstant.ONE); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); + dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_UNICOM); + dto.setTableName(CaWghDataConstant.SHARE_BM_GRID); + + dto.setWhereCase("delete_flag = 'normal'"); + dto.setOrderBy("grid_id"); + + int pageNo = 1; + + int total = 0; + + do { + try { + total = listBmGrid(dto); + pageNo++; + dto.setPageNo(pageNo); + } catch (Exception e) { + e.printStackTrace(); + } + } while (total > (pageNo * NumConstant.FIFTY)); + } + } + + /** + * 获取级联菜单 + * + * @param + * @return java.util.List + * @author LZN + * @date 2022/6/15 14:01 + */ + @Override + public List getCascadeMenu() { + List list = baseDao.getCascadeMenu(); + return LouDongTreeNodeUtils.build(list); + } + + private int listBmGrid(PreserVationFormDTO dto) throws Exception { + String aes = AesUtils.encryptByAES(JSONObject.toJSONString(dto), CaWghDataConstant.AESKEY); + JSONObject obj = new JSONObject(); + obj.put(CaWghDataConstant.UNICOM_CONDITION, aes); + String data = HttpClientManager.getInstance().sendPostByJSON(CaWghDataConstant.DATA_URL_UNICON, obj.toJSONString()).getData(); + JSONObject toResult = JSON.parseObject(data); + Result result = ConvertUtils.mapToEntity(toResult, Result.class); + if (!result.success()) { + return dto.getPageNo() + 1; + } + + ReturnDate returnDate = JSONObject.parseObject(JSONObject.toJSONString(result.getData()),ReturnDate.class); + this.insertBatch(returnDate.getList()); + return returnDate.getTotal(); + } + + static class ReturnDate { + private int total; + private List list; + + public int getTotal() { + return total; + } + + public void setTotal(int total) { + this.total = total; + } + + public List getList() { + return list; + } + + public void setList(List list) { + this.list = list; + } + } + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java new file mode 100644 index 0000000000..40e440d48e --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java @@ -0,0 +1,205 @@ +package com.epmet.opendata.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +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.page.PageData; +import com.epmet.commons.tools.utils.*; +import com.epmet.opendata.dao.CaLoudongDao; +import com.epmet.opendata.dto.ca.CaLoudongDTO; +import com.epmet.opendata.dto.constant.CaWghDataConstant; +import com.epmet.opendata.dto.form.CaLoudongDetailsFormDTO; +import com.epmet.opendata.dto.form.CaLoudongFormDTO; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.result.CaLoudongDetailsResultDTO; +import com.epmet.opendata.dto.result.CaLoudongResultDTO; +import com.epmet.opendata.dto.result.LouDongCascadeResultDTO; +import com.epmet.opendata.entity.CaLoudongEntity; +import com.epmet.opendata.redis.CaLoudongRedis; +import com.epmet.opendata.service.CaLoudongService; +import com.epmet.opendata.util.AesUtils; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +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.*; + +/** + * 楼栋基本信息表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-31 + */ +@Service +public class CaLoudongServiceImpl extends BaseServiceImpl implements CaLoudongService { + + @Autowired + private CaLoudongRedis caLoudongRedis; + +// @Override +// public PageData page(Map params) { +// IPage page = baseDao.selectPage( +// getPage(params, FieldConstant.CREATED_TIME, false), +// getWrapper(params) +// ); +// return getPageData(page, CaLoudongDTO.class); +// } + + @Override + public PageData page(Map params) { + PageHelper.startPage((int) (params.get("limit")), (int) (params.get("pageSize"))); + List list = baseDao.getList(); + PageInfo info = new PageInfo<>(list); + return new PageData<>(list, info.getTotal()); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, CaLoudongDTO.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 CaLoudongDTO get(String id) { + CaLoudongEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, CaLoudongDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(CaLoudongDTO dto) { + CaLoudongEntity entity = ConvertUtils.sourceToTarget(dto, CaLoudongEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(CaLoudongDTO dto) { + CaLoudongEntity entity = ConvertUtils.sourceToTarget(dto, CaLoudongEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public PageData getPage(CaLoudongFormDTO dto) { + PageHelper.startPage(dto.getPage(), dto.getLimit()); + List result = baseDao.getPage(dto.getCommunityName(), dto.getBuildingName(),dto.getGridId()); + PageInfo info = new PageInfo<>(result); + return new PageData<>(result, info.getTotal()); + } + + /** + * 楼栋基本信息详情 + * + * @param dto + * @return com.epmet.opendata.dto.result.CaLoudongDetailsResultDTO + * @author LZN + * @date 2022/6/2 13:40 + */ + @Override + public CaLoudongDetailsResultDTO getLouDongDetails(CaLoudongDetailsFormDTO dto) { + CaLoudongDetailsResultDTO result = baseDao.getLouDongDetails(dto.getBuildingId()); + return result; + } + + /** + * 楼栋调用ruoyi接口存储数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/2 10:03 + */ + @Override + public void preserLouDongVation(PreserVationFormDTO dto) { + int i = baseDao.deleteAll(); + if (i >= 0) { + dto.setPageNo(NumConstant.ONE); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); + dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_UNICOM); + dto.setTableName(CaWghDataConstant.UNICOM_LOUDONG); + + dto.setWhereCase("delete_flag = 'normal'"); + dto.setOrderBy("grid_id,update_date,building_id desc"); + + int pageNo = 1; + + int total = 0; + + do { + try { + total = listLouDong(dto); + pageNo++; + dto.setPageNo(pageNo); + } catch (Exception e) { + e.printStackTrace(); + } + } while (total > (pageNo * NumConstant.FIFTY)); + } + + } + + + + private int listLouDong(PreserVationFormDTO dto) throws Exception { + String aes = AesUtils.encryptByAES(JSONObject.toJSONString(dto), CaWghDataConstant.AESKEY); + JSONObject obj = new JSONObject(); + obj.put(CaWghDataConstant.UNICOM_CONDITION, aes); + String data = HttpClientManager.getInstance().sendPostByJSON(CaWghDataConstant.DATA_URL_UNICON, obj.toJSONString()).getData(); + JSONObject toResult = JSON.parseObject(data); + Result result = ConvertUtils.mapToEntity(toResult, Result.class); + if (!result.success()) { + return dto.getPageNo() + 1; + } + + ReturnDate returnDate = JSONObject.parseObject(JSONObject.toJSONString(result.getData()), ReturnDate.class); + this.insertBatch(returnDate.getList()); + return returnDate.getTotal(); + } + + static class ReturnDate { + + private int total; + private List list; + + + public int getTotal() { + return total; + } + + public void setTotal(int total) { + this.total = total; + } + + public List getList() { + return list; + } + + public void setList(List list) { + this.list = list; + } + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java new file mode 100644 index 0000000000..efd49ea4dd --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java @@ -0,0 +1,190 @@ +package com.epmet.opendata.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +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.constant.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.HttpClientManager; +import com.epmet.commons.tools.utils.Result; +import com.epmet.opendata.dao.CaPingfangDao; +import com.epmet.opendata.dto.ca.CaPingfangDTO; +import com.epmet.opendata.dto.constant.CaWghDataConstant; +import com.epmet.opendata.dto.form.CaPingFangDetailsFormDTO; +import com.epmet.opendata.dto.form.CaPingfangFormDTO; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.result.CaPingFangDetailsResultDTO; +import com.epmet.opendata.dto.result.CaPingfangResultDTO; +import com.epmet.opendata.entity.CaPingfangEntity; +import com.epmet.opendata.redis.CaPingfangRedis; +import com.epmet.opendata.service.CaPingfangService; +import com.epmet.opendata.util.AesUtils; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +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-05-31 + */ +@Service +public class CaPingfangServiceImpl extends BaseServiceImpl implements CaPingfangService { + + @Autowired + private CaPingfangRedis caPingfangRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, CaPingfangDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, CaPingfangDTO.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 CaPingfangDTO get(String id) { + CaPingfangEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, CaPingfangDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(CaPingfangDTO dto) { + CaPingfangEntity entity = ConvertUtils.sourceToTarget(dto, CaPingfangEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(CaPingfangDTO dto) { + CaPingfangEntity entity = ConvertUtils.sourceToTarget(dto, CaPingfangEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public PageData getPage(CaPingfangFormDTO dto) { + PageHelper.startPage(dto.getPage(), dto.getLimit()); + List result = baseDao.getPage(dto.getBuildingName(), dto.getCommunityName(),dto.getGridId()); + PageInfo info = new PageInfo<>(result); + return new PageData<>(result, info.getTotal()); + } + + /** + * 平房调用ruoyi接口存储数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/2 10:21 + */ + @Override + public void preserPingFangVation(PreserVationFormDTO dto) { + int i = baseDao.deleteAll(); + if (i >= 0) { + dto.setPageNo(NumConstant.ONE); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); + dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_UNICOM); + dto.setTableName(CaWghDataConstant.UNICOM_PINGFANG); + + dto.setWhereCase("delete_flag = 'normal'"); + dto.setOrderBy("grid_id,update_date,building_id desc"); + + int pageNo = 1; + + int total = 0; + + do { + try { + total = listPingFang(dto); + pageNo++; + dto.setPageNo(pageNo); + } catch (Exception e) { + e.printStackTrace(); + } + } while (total > (pageNo * NumConstant.FIFTY)); + } + + } + + + @Override + public CaPingFangDetailsResultDTO getPingFangDetails(CaPingFangDetailsFormDTO dto) { + CaPingFangDetailsResultDTO result = baseDao.getPingFangDetails(dto.getBuildingId()); + return result; + } + + private int listPingFang(PreserVationFormDTO dto) throws Exception { + String aes = AesUtils.encryptByAES(JSONObject.toJSONString(dto), CaWghDataConstant.AESKEY); + JSONObject obj = new JSONObject(); + obj.put(CaWghDataConstant.UNICOM_CONDITION, aes); + String data = HttpClientManager.getInstance().sendPostByJSON(CaWghDataConstant.DATA_URL_UNICON, obj.toJSONString()).getData(); + JSONObject toResult = JSON.parseObject(data); + Result result = ConvertUtils.mapToEntity(toResult, Result.class); + if (!result.success()) { + return dto.getPageNo() + 1; + } + + ReturnDate returnDate = JSONObject.parseObject(JSONObject.toJSONString(result.getData()), ReturnDate.class); + this.insertBatch(returnDate.getList()); + return returnDate.getTotal(); + } + + static class ReturnDate { + + private int total; + private List list; + + + public int getTotal() { + return total; + } + + public void setTotal(int total) { + this.total = total; + } + + public List getList() { + return list; + } + + public void setList(List list) { + this.list = list; + } + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRentalServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRentalServiceImpl.java new file mode 100644 index 0000000000..44dffcc7ee --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRentalServiceImpl.java @@ -0,0 +1,198 @@ +package com.epmet.opendata.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +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.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; + +import com.epmet.commons.tools.utils.HttpClientManager; +import com.epmet.commons.tools.utils.Result; +import com.epmet.opendata.dao.CaRentalDao; +import com.epmet.opendata.dto.ca.CaRentalDTO; +import com.epmet.opendata.dto.constant.CaWghDataConstant; +import com.epmet.opendata.dto.form.CaRentalDetailsFormDTO; +import com.epmet.opendata.dto.form.CaRentalFormtDTO; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.result.CaRentalDetailsResultDTO; +import com.epmet.opendata.dto.result.CaRentalResultDTO; +import com.epmet.opendata.entity.CaRentalEntity; +import com.epmet.opendata.redis.CaRentalRedis; +import com.epmet.opendata.service.CaRentalService; +import com.epmet.opendata.util.AesUtils; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +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-05-31 + */ +@Service +public class CaRentalServiceImpl extends BaseServiceImpl implements CaRentalService { + + @Autowired + private CaRentalRedis caRentalRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, CaRentalDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, CaRentalDTO.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 CaRentalDTO get(String id) { + CaRentalEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, CaRentalDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(CaRentalDTO dto) { + CaRentalEntity entity = ConvertUtils.sourceToTarget(dto, CaRentalEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(CaRentalDTO dto) { + CaRentalEntity entity = ConvertUtils.sourceToTarget(dto, CaRentalEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public PageData getPage(CaRentalFormtDTO dto) { + PageHelper.startPage(dto.getPage(), dto.getLimit()); + List result = baseDao.getPage(dto.getResidentName(), + dto.getHouseName(), + dto.getRenterName(), + dto.getGridId()); + PageInfo info = new PageInfo<>(result); + return new PageData<>(result, info.getTotal()); + } + + /** + * 出租房调用ruoyi接口存储数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/2 10:31 + */ + @Override + public void preserRentalVation(PreserVationFormDTO dto) { + int i = baseDao.deleteAll(); + + if (i >= 0) { + dto.setPageNo(NumConstant.ONE); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); + dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_UNICOM); + dto.setTableName(CaWghDataConstant.UNICOM_RENTAL); + + dto.setWhereCase("delete_flag = 'normal'"); + dto.setOrderBy("grid_id,update_date,rental_id desc"); + + int pageNo = 1; + + int total = 0; + + do { + try { + total = listRental(dto); + pageNo++; + dto.setPageNo(pageNo); + } catch (Exception e) { + e.printStackTrace(); + } + } while (total > (pageNo * NumConstant.FIFTY)); + + } + + } + + @Override + public CaRentalDetailsResultDTO getRentalDetails(CaRentalDetailsFormDTO dto) { + CaRentalDetailsResultDTO result = baseDao.getRentalDetails(dto.getRentalId()); + return result; + } + + private int listRental(PreserVationFormDTO dto) throws Exception { + String aes = AesUtils.encryptByAES(JSONObject.toJSONString(dto), CaWghDataConstant.AESKEY); + JSONObject obj = new JSONObject(); + obj.put(CaWghDataConstant.UNICOM_CONDITION, aes); + String data = HttpClientManager.getInstance().sendPostByJSON(CaWghDataConstant.DATA_URL_UNICON, obj.toJSONString()).getData(); + JSONObject toResult = JSON.parseObject(data); + Result result = ConvertUtils.mapToEntity(toResult, Result.class); + if (!result.success()) { + return dto.getPageNo() + 1; + } + + ReturnDate returnDate = JSONObject.parseObject(JSONObject.toJSONString(result.getData()), ReturnDate.class); + this.insertBatch(returnDate.getList()); + return returnDate.getTotal(); + } + + static class ReturnDate { + + private int total; + private List list; + + + public int getTotal() { + return total; + } + + public void setTotal(int total) { + this.total = total; + } + + public List getList() { + return list; + } + + public void setList(List list) { + this.list = list; + } + } + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java new file mode 100644 index 0000000000..b0f71b2f42 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java @@ -0,0 +1,208 @@ +package com.epmet.opendata.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +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.constant.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.HttpClientManager; +import com.epmet.commons.tools.utils.Result; +import com.epmet.feign.EpmetUserOpenFeignClient; +import com.epmet.opendata.dao.CaResidentDao; +import com.epmet.opendata.dto.ca.CaResidentDTO; +import com.epmet.opendata.dto.constant.CaWghDataConstant; +import com.epmet.opendata.dto.form.CaResidentDetailsFormDTO; +import com.epmet.opendata.dto.form.CaResidentFormDTO; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.result.CaResidentDetailsResultDTO; +import com.epmet.opendata.dto.result.CaResidentResultDTO; +import com.epmet.opendata.entity.CaResidentEntity; +import com.epmet.opendata.redis.CaResidentRedis; +import com.epmet.opendata.service.CaResidentService; +import com.epmet.opendata.util.AesUtils; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +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-05-31 + */ +@Service +public class CaResidentServiceImpl extends BaseServiceImpl implements CaResidentService { + + @Autowired + private CaResidentRedis caResidentRedis; + + @Autowired + private EpmetUserOpenFeignClient openFeignClient; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, CaResidentDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, CaResidentDTO.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 CaResidentDTO get(String id) { + CaResidentEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, CaResidentDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(CaResidentDTO dto) { + CaResidentEntity entity = ConvertUtils.sourceToTarget(dto, CaResidentEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(CaResidentDTO dto) { + CaResidentEntity entity = ConvertUtils.sourceToTarget(dto, CaResidentEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public PageData getPage(CaResidentFormDTO dto) { + PageHelper.startPage(dto.getPage(), dto.getLimit()); + List result = baseDao.getPage(dto.getResidentName(), + dto.getIdCard(), + dto.getTelephone(), + dto.getGridId()); + PageInfo info = new PageInfo<>(result); + return new PageData<>(result, info.getTotal()); + } + + /** + * 人口基本信息调用ruoyi接口存储数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/2 10:47 + */ + @Override + public void preserResidentVation(PreserVationFormDTO dto) { + int i = baseDao.deleteAll(); + if (i >= 0) { + dto.setPageNo(NumConstant.ONE); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); + dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_UNICOM); + dto.setTableName(CaWghDataConstant.UNICOM_RESIDENT); + + dto.setWhereCase("delete_flag = 'normal'"); + dto.setOrderBy("grid_id,update_date,resident_id desc"); + + int pageNo = 1; + + int total = 0; + + do { + try { + total = listResident(dto); + pageNo++; + dto.setPageNo(pageNo); + } catch (Exception e) { + e.printStackTrace(); + } + } while (total > (pageNo * NumConstant.FIFTY)); + } + } + + @Override + public CaResidentDetailsResultDTO getResidentDetails(CaResidentDetailsFormDTO dto) { + CaResidentDetailsResultDTO result = baseDao.getResidentDetails(dto.getIdCard()); + return result; + } + + + private int listResident(PreserVationFormDTO dto) throws Exception { + String aes = AesUtils.encryptByAES(JSONObject.toJSONString(dto), CaWghDataConstant.AESKEY); + JSONObject obj = new JSONObject(); + obj.put(CaWghDataConstant.UNICOM_CONDITION, aes); + String data = HttpClientManager.getInstance().sendPostByJSON(CaWghDataConstant.DATA_URL_UNICON, obj.toJSONString()).getData(); + JSONObject toResult = JSON.parseObject(data); + Result result = ConvertUtils.mapToEntity(toResult, Result.class); + if (!result.success()) { + return dto.getPageNo() + 1; + } + + ReturnDate returnDate = JSONObject.parseObject(JSONObject.toJSONString(result.getData()), ReturnDate.class); + +// returnDate.getList().forEach(item -> { +// if (StringUtils.isNotBlank(item.getIdCard())) { +// Result client = openFeignClient.getByResiIdCard(item.getIdCard()); +// IcResiUserDTO clientData = client.getData(); +// item.setIcResiUser(clientData.getId()); +// item.setHomeId(clientData.getHomeId()); +// } +// }); + + this.insertBatch(returnDate.getList()); + return returnDate.getTotal(); + } + + static class ReturnDate { + + private int total; + private List list; + + + public int getTotal() { + return total; + } + + public void setTotal(int total) { + this.total = total; + } + + public List getList() { + return list; + } + + public void setList(List list) { + this.list = list; + } + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRotatorsServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRotatorsServiceImpl.java new file mode 100644 index 0000000000..2d76b56fc0 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRotatorsServiceImpl.java @@ -0,0 +1,224 @@ +package com.epmet.opendata.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +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.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.HttpClientManager; +import com.epmet.commons.tools.utils.Result; +import com.epmet.feign.EpmetUserOpenFeignClient; +import com.epmet.opendata.dao.CaRotatorsDao; +import com.epmet.opendata.dto.ca.CaRotatorsDTO; +import com.epmet.opendata.dto.constant.CaWghDataConstant; +import com.epmet.opendata.dto.form.CaRotatorsDetailsFormDTO; +import com.epmet.opendata.dto.form.CaRotatorsFormDTO; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.result.CaRotatorsDetailsResultDTO; +import com.epmet.opendata.dto.result.CaRotatorsResultDTO; +import com.epmet.opendata.entity.CaRotatorsEntity; +import com.epmet.opendata.redis.CaRotatorsRedis; +import com.epmet.opendata.service.CaRotatorsService; +import com.epmet.opendata.util.AesUtils; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +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-05-31 + */ +@Service +public class CaRotatorsServiceImpl extends BaseServiceImpl implements CaRotatorsService { + + @Autowired + private CaRotatorsRedis caRotatorsRedis; + + @Autowired + private EpmetUserOpenFeignClient openFeignClient; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, CaRotatorsDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, CaRotatorsDTO.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 CaRotatorsDTO get(String id) { + CaRotatorsEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, CaRotatorsDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(CaRotatorsDTO dto) { + CaRotatorsEntity entity = ConvertUtils.sourceToTarget(dto, CaRotatorsEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(CaRotatorsDTO dto) { + CaRotatorsEntity entity = ConvertUtils.sourceToTarget(dto, CaRotatorsEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public PageData getPage(CaRotatorsFormDTO dto) { + PageHelper.startPage(dto.getPage(), dto.getLimit()); + List result = baseDao.getPage(dto.getRotatorsName(), + dto.getIdCard(), + dto.getTelephone(), + dto.getGridId()); + PageInfo info = new PageInfo<>(result); + return new PageData<>(result, info.getTotal()); + } + + /** + * 流动人口调用ruoyi接口存储数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/2 11:01 + */ + @Override + public void preserRotatorsVation(PreserVationFormDTO dto) { + int i = baseDao.deleteAll(); + if (i >= 0) { + dto.setPageNo(NumConstant.ONE); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); + dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_UNICOM); + dto.setTableName(CaWghDataConstant.UNICOM_ROTATORS); + + dto.setWhereCase("delete_flag = 'normal'"); + dto.setOrderBy("grid_id,update_date,rotators_id desc"); + + int pageNo = 1; + + int total = 0; + + do { + try { + total = listRotators(dto); + pageNo++; + dto.setPageNo(pageNo); + } catch (Exception e) { + e.printStackTrace(); + } + } while (total > (pageNo * NumConstant.FIFTY)); + } + + } + + @Override + public CaRotatorsDetailsResultDTO getRotatorsDetails(CaRotatorsDetailsFormDTO dto) { + CaRotatorsDetailsResultDTO result = baseDao.getRotatorsDetails(dto.getIdCard()); + return result; + } + + enum rotatorsEnum { + + LDRK("unicom", "ca_rotators"), + AES("key", "hriajrutnbghajsd"); + + private String name; + private String code; + + + rotatorsEnum(String name, String code) { + this.name = name; + this.code = code; + } + + } + + private int listRotators(PreserVationFormDTO dto) throws Exception { + String aes = AesUtils.encryptByAES(JSONObject.toJSONString(dto), CaWghDataConstant.AESKEY); + JSONObject obj = new JSONObject(); + obj.put(CaWghDataConstant.UNICOM_CONDITION, aes); + String data = HttpClientManager.getInstance().sendPostByJSON(CaWghDataConstant.DATA_URL_UNICON, obj.toJSONString()).getData(); + JSONObject toResult = JSON.parseObject(data); + Result result = ConvertUtils.mapToEntity(toResult, Result.class); + if (!result.success()) { + return dto.getPageNo() + 1; + } + + ReturnDate returnDate = JSONObject.parseObject(JSONObject.toJSONString(result.getData()), ReturnDate.class); + +// returnDate.getList().forEach(item -> { +// if (StringUtils.isNotBlank(item.getIdCard())) { +// Result client = openFeignClient.getByResiIdCard(item.getIdCard()); +// IcResiUserDTO clientData = client.getData(); +// item.setIcResiUser(clientData.getId()); +// item.setHomeId(clientData.getHomeId()); +// } +// }); + + this.insertBatch(returnDate.getList()); + return returnDate.getTotal(); + } + + static class ReturnDate { + + private int total; + private List list; + + + public int getTotal() { + return total; + } + + public void setTotal(int total) { + this.total = total; + } + + public List getList() { + return list; + } + + public void setList(List list) { + this.list = list; + } + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaSysDictServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaSysDictServiceImpl.java new file mode 100644 index 0000000000..2f11f830f0 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaSysDictServiceImpl.java @@ -0,0 +1,171 @@ +package com.epmet.opendata.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +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.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.HttpClientManager; +import com.epmet.commons.tools.utils.Result; +import com.epmet.opendata.dao.CaSysDictDao; +import com.epmet.opendata.dto.ca.CaSysDictDTO; +import com.epmet.opendata.dto.constant.CaWghDataConstant; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.entity.CaLoudongEntity; +import com.epmet.opendata.entity.CaSysDictEntity; +import com.epmet.opendata.redis.CaSysDictRedis; +import com.epmet.opendata.service.CaSysDictService; +import com.epmet.opendata.util.AesUtils; +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-16 + */ +@Service +public class CaSysDictServiceImpl extends BaseServiceImpl implements CaSysDictService { + + @Autowired + private CaSysDictRedis caSysDictRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, CaSysDictDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, CaSysDictDTO.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 CaSysDictDTO get(String id) { + CaSysDictEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, CaSysDictDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(CaSysDictDTO dto) { + CaSysDictEntity entity = ConvertUtils.sourceToTarget(dto, CaSysDictEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(CaSysDictDTO dto) { + CaSysDictEntity entity = ConvertUtils.sourceToTarget(dto, CaSysDictEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + /** + * 调用ruoyi接口存储数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/16 16:52 + */ + @Override + public void preserSysdictVation(PreserVationFormDTO dto) { + int i = baseDao.deleteAll(); + if (i >= 0) { + dto.setPageNo(NumConstant.ONE); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); + dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_UNICOM); + dto.setTableName(CaWghDataConstant.UNICOM_SYS_DICT); + + dto.setWhereCase("delete_flag = 'normal'"); + dto.setOrderBy("dict_id,,create_date,update_date"); + + int pageNo = 1; + + int total = 0; + + do { + try { + total = listSysDict(dto); + pageNo++; + dto.setPageNo(pageNo); + } catch (Exception e) { + e.printStackTrace(); + } + } while (total > (pageNo * NumConstant.FIFTY)); + } + } + + private int listSysDict(PreserVationFormDTO dto) throws Exception { + String aes = AesUtils.encryptByAES(JSONObject.toJSONString(dto), CaWghDataConstant.AESKEY); + JSONObject obj = new JSONObject(); + obj.put(CaWghDataConstant.UNICOM_CONDITION, aes); + String data = HttpClientManager.getInstance().sendPostByJSON(CaWghDataConstant.DATA_URL_UNICON, obj.toJSONString()).getData(); + JSONObject toResult = JSON.parseObject(data); + Result result = ConvertUtils.mapToEntity(toResult, Result.class); + if (!result.success()) { + return dto.getPageNo() + 1; + } + + ReturnDate returnDate = JSONObject.parseObject(JSONObject.toJSONString(result.getData()), ReturnDate.class); + this.insertBatch(returnDate.getList()); + return returnDate.getTotal(); + } + + static class ReturnDate { + + private int total; + private List list; + + + public int getTotal() { + return total; + } + + public void setTotal(int total) { + this.total = total; + } + + public List getList() { + return list; + } + + public void setList(List list) { + this.list = list; + } + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GuardarDatosTaskServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GuardarDatosTaskServiceImpl.java new file mode 100644 index 0000000000..8937858883 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GuardarDatosTaskServiceImpl.java @@ -0,0 +1,157 @@ +package com.epmet.opendata.service.impl; + +import com.epmet.opendata.dto.constant.CaWghDataConstant; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.service.*; +import lombok.extern.slf4j.Slf4j; +import net.bytebuddy.asm.Advice; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Slf4j +@Service +public class GuardarDatosTaskServiceImpl implements GuardarDatosTaskService { + + @Autowired + private CaLoudongService caLoudongService; + + @Autowired + private CaPingfangService pingfangService; + + @Autowired + private CaRentalService rentalService; + + @Autowired + private CaResidentService residentService; + + @Autowired + private CaRotatorsService rotatorsService; + + @Autowired + private WghBaseGridService basegridService; + + @Autowired + private caBmGridService bmGridService; + + @Autowired + private WghCommunityService communityService; + + @Autowired + private WghDywgService wghDywgService; + + @Autowired + private WghJdbService wghJdbService; + + @Autowired + private WghJqzService wghJqzService; + + @Autowired + private WghJxcsService wghJxcsService; + + @Autowired + private WghJyzService wghJyzService; + + @Autowired + private WghSjxxbService wghSjxxbService; + + @Autowired + private WghSqxxService wghSqxxService; + + @Autowired + private WghSzcgwghService wghSzcgwghService; + + @Autowired + private WghSzzrwgService wghSzzrwgService; + + @Autowired + private WghWhpdwService wghWhpdwService; + + @Autowired + private WghYjbmcsService wghYjbmcsService; + + @Autowired + private WghYqhjzService wghYqhjzService; + + @Autowired + private CaSysDictService caSysDictService; + + @Autowired + private CaBmCategoryService caBmCategoryService; + + @Override + public void guardarDatosTask(PreserVationFormDTO dto) { + if (StringUtils.isNotBlank(dto.getTableName())) { + switch (dto.getTableName()) { + case CaWghDataConstant.UNICOM_LOUDONG: + caLoudongService.preserLouDongVation(dto); + break; + case CaWghDataConstant.UNICOM_PINGFANG: + pingfangService.preserPingFangVation(dto); + break; + case CaWghDataConstant.UNICOM_RESIDENT: + residentService.preserResidentVation(dto); + break; + case CaWghDataConstant.UNICOM_RENTAL: + rentalService.preserRentalVation(dto); + break; + case CaWghDataConstant.UNICOM_ROTATORS: + rotatorsService.preserRotatorsVation(dto); + break; + case CaWghDataConstant.SHARE_BASE_GRID: + basegridService.preserBaseGridVation(dto); + break; + case CaWghDataConstant.SHARE_BM_GRID: + bmGridService.getPreserBmGridVation(dto); + break; + case CaWghDataConstant.SHARE_COMMUNITY: + communityService.getPreserCommunityVation(dto); + break; + case CaWghDataConstant.SHARE_WGH_DYWG: + wghDywgService.getPreserDywgVation(dto); + break; + case CaWghDataConstant.SHARE_WGH_JDB: + wghJdbService.getPreserWghJdbVation(dto); + break; + case CaWghDataConstant.SHARE_WGH_JQZ: + wghJqzService.getPreserWghjqzVation(dto); + break; + case CaWghDataConstant.SHARE_WGH_JXCS: + wghJxcsService.preserWghJxcsVation(dto); + break; + case CaWghDataConstant.SHARE_WGH_JYZ: + wghJyzService.getPreserWghJyzVation(dto); + break; + case CaWghDataConstant.SHARE_WGH_SJXX: + wghSjxxbService.getPreserSjxxVation(dto); + break; + case CaWghDataConstant.SHARE_WGH_SQXX: + wghSqxxService.getPreserWghSqxxVation(dto); + break; + case CaWghDataConstant.SHARE_WGH_SZCGWGH: + wghSzcgwghService.getPreserWghSzcgwghVation(dto); + break; + case CaWghDataConstant.SHARE_WGH_SZZRWG: + wghSzzrwgService.getPreserWghSzzrwgVation(dto); + break; + case CaWghDataConstant.SHARE_WGH_WHPDW: + wghWhpdwService.getPreserWhpdwVation(dto); + break; + case CaWghDataConstant.SHARE_WGH_YJBMCS: + wghYjbmcsService.getPreserWghYjbmcsVation(dto); + break; + case CaWghDataConstant.SHARE_WGH_YQHJZ: + wghYqhjzService.getPreserWghYqhjzVation(dto); + break; + case CaWghDataConstant.UNICOM_BM_CATEGORY: + caBmCategoryService.preserBmCategoryVation(dto); + break; + case CaWghDataConstant.UNICOM_SYS_DICT: + caSysDictService.preserSysdictVation(dto); + break; + } + } else{ + throw new Error("没传名字"); + } + } +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghBaseGridServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghBaseGridServiceImpl.java new file mode 100644 index 0000000000..9aaf2ae706 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghBaseGridServiceImpl.java @@ -0,0 +1,167 @@ +package com.epmet.opendata.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +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.constant.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.HttpClientManager; +import com.epmet.commons.tools.utils.Result; +import com.epmet.opendata.dao.WghBaseGridDao; +import com.epmet.opendata.dto.constant.CaWghDataConstant; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.BasegridDTO; +import com.epmet.opendata.entity.WghBaseGridEntity; +import com.epmet.opendata.redis.BasegridRedis; +import com.epmet.opendata.service.WghBaseGridService; +import com.epmet.opendata.util.AesUtils; +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 WghBaseGridServiceImpl extends BaseServiceImpl implements WghBaseGridService { + + @Autowired + private BasegridRedis basegridRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, BasegridDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, BasegridDTO.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 BasegridDTO get(String id) { + WghBaseGridEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, BasegridDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(BasegridDTO dto) { + WghBaseGridEntity entity = ConvertUtils.sourceToTarget(dto, WghBaseGridEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(BasegridDTO dto) { + WghBaseGridEntity entity = ConvertUtils.sourceToTarget(dto, WghBaseGridEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + /** + * 调用ruoyi存储基础网格的数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/14 13:41 + */ + @Override + public void preserBaseGridVation(PreserVationFormDTO dto) { + int i = baseDao.deleteAll(); + if (i >= 0) { + dto.setPageNo(NumConstant.ONE); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); + dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_SHARE); + dto.setTableName(CaWghDataConstant.SHARE_BASE_GRID); + + dto.setWhereCase("1=1"); + dto.setOrderBy("网格编码"); + + int pageNo = 1; + + int total = 0; + + do { + try { + total = listBaseGrid(dto); + pageNo++; + dto.setPageNo(pageNo); + } catch (Exception e) { + e.printStackTrace(); + } + } while (total > (pageNo * NumConstant.FIFTY)); + + } + } + + private int listBaseGrid(PreserVationFormDTO dto) throws Exception { + String aes = AesUtils.encryptByAES(JSONObject.toJSONString(dto), CaWghDataConstant.AESKEY); + JSONObject obj = new JSONObject(); + obj.put(CaWghDataConstant.SHARE_CONDITION, aes); + String data = HttpClientManager.getInstance().sendPostByJSON(CaWghDataConstant.DATA_URL_SHARE, obj.toJSONString()).getData(); + JSONObject toResult = JSON.parseObject(data); + Result result = ConvertUtils.mapToEntity(toResult, Result.class); + if (!result.success()) { + return dto.getPageNo() + 1; + } + + ReturnDate returnDate = JSONObject.parseObject(JSONObject.toJSONString(result.getData()), ReturnDate.class); + this.insertBatch(returnDate.getList()); + return returnDate.getTotal(); + } + + static class ReturnDate { + private int total; + private List list; + + public int getTotal() { + return total; + } + + public void setTotal(int total) { + this.total = total; + } + + public List getList() { + return list; + } + + public void setList(List list) { + this.list = list; + } + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghCommunityServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghCommunityServiceImpl.java new file mode 100644 index 0000000000..05a77768f8 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghCommunityServiceImpl.java @@ -0,0 +1,169 @@ +package com.epmet.opendata.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +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.constant.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.HttpClientManager; +import com.epmet.commons.tools.utils.Result; +import com.epmet.opendata.dao.WghCommunityDao; +import com.epmet.opendata.dto.constant.CaWghDataConstant; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.CommunityDTO; +import com.epmet.opendata.entity.WghCommunityEntity; +import com.epmet.opendata.redis.CommunityRedis; + +import com.epmet.opendata.service.WghCommunityService; +import com.epmet.opendata.util.AesUtils; +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 WghCommunityServiceImpl extends BaseServiceImpl implements WghCommunityService { + + @Autowired + private CommunityRedis communityRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, CommunityDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, CommunityDTO.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 CommunityDTO get(String id) { + WghCommunityEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, CommunityDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(CommunityDTO dto) { + WghCommunityEntity entity = ConvertUtils.sourceToTarget(dto, WghCommunityEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(CommunityDTO dto) { + WghCommunityEntity entity = ConvertUtils.sourceToTarget(dto, WghCommunityEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + /** + * 调用ruoyi接口存储社区数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/14 15:03 + */ + @Override + public void getPreserCommunityVation(PreserVationFormDTO dto) { + int i = baseDao.deleteAll(); + if (i >= 0) { + dto.setPageNo(NumConstant.ONE); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); + dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_SHARE); + dto.setTableName(CaWghDataConstant.SHARE_COMMUNITY); + + dto.setWhereCase("1=1"); + dto.setOrderBy("社区编码"); + + int pageNo = 1; + + int total = 0; + + do { + try { + total = listCommunity(dto); + pageNo++; + dto.setPageNo(pageNo); + } catch (Exception e) { + e.printStackTrace(); + } + } while (total > (pageNo * NumConstant.FIFTY)); + } + } + + private int listCommunity(PreserVationFormDTO dto) throws Exception { + String aes = AesUtils.encryptByAES(JSONObject.toJSONString(dto), CaWghDataConstant.AESKEY); + JSONObject obj = new JSONObject(); + obj.put(CaWghDataConstant.SHARE_CONDITION, aes); + String data = HttpClientManager.getInstance().sendPostByJSON(CaWghDataConstant.DATA_URL_SHARE, obj.toJSONString()).getData(); + JSONObject toResult = JSON.parseObject(data); + Result result = ConvertUtils.mapToEntity(toResult, Result.class); + if (!result.success()) { + return dto.getPageNo() + 1; + } + + ReturnDate returnDate = JSONObject.parseObject(JSONObject.toJSONString(result.getData()), ReturnDate.class); + this.insertBatch(returnDate.getList()); + return returnDate.getTotal(); + } + + static class ReturnDate { + + private int total; + private List list; + + + public int getTotal() { + return total; + } + + public void setTotal(int total) { + this.total = total; + } + + public List getList() { + return list; + } + + public void setList(List list) { + this.list = list; + } + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghDywgServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghDywgServiceImpl.java new file mode 100644 index 0000000000..3f98dd5c40 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghDywgServiceImpl.java @@ -0,0 +1,171 @@ +package com.epmet.opendata.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +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.constant.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.HttpClientManager; +import com.epmet.commons.tools.utils.Result; +import com.epmet.opendata.dao.WghDywgDao; +import com.epmet.opendata.dto.constant.CaWghDataConstant; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.WghDywgDTO; +import com.epmet.opendata.entity.CaLoudongEntity; +import com.epmet.opendata.entity.WghDywgEntity; +import com.epmet.opendata.redis.WghDywgRedis; +import com.epmet.opendata.service.WghDywgService; +import com.epmet.opendata.util.AesUtils; +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 WghDywgServiceImpl extends BaseServiceImpl implements WghDywgService { + + @Autowired + private WghDywgRedis wghDywgRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, WghDywgDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, WghDywgDTO.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 WghDywgDTO get(String id) { + WghDywgEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, WghDywgDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(WghDywgDTO dto) { + WghDywgEntity entity = ConvertUtils.sourceToTarget(dto, WghDywgEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(WghDywgDTO dto) { + WghDywgEntity entity = ConvertUtils.sourceToTarget(dto, WghDywgEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + /** + * 调用ruoyi接口获取dywg数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/14 15:12 + */ + @Override + public void getPreserDywgVation(PreserVationFormDTO dto) { + int i = baseDao.deleteAll(); + if (i >= 0) { + dto.setPageNo(NumConstant.ONE); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); + dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_SHARE); + dto.setTableName(CaWghDataConstant.SHARE_WGH_DYWG); + + dto.setWhereCase("1=1"); + dto.setOrderBy("ORDATE"); + + int pageNo = 1; + + int total = 0; + + do { + try { + total = listDywg(dto); + pageNo++; + dto.setPageNo(pageNo); + } catch (Exception e) { + e.printStackTrace(); + } + } while (total > (pageNo * NumConstant.FIFTY)); + } + } + + private int listDywg(PreserVationFormDTO dto) throws Exception { + String aes = AesUtils.encryptByAES(JSONObject.toJSONString(dto), CaWghDataConstant.AESKEY); + JSONObject obj = new JSONObject(); + obj.put(CaWghDataConstant.SHARE_CONDITION, aes); + String data = HttpClientManager.getInstance().sendPostByJSON(CaWghDataConstant.DATA_URL_SHARE, obj.toJSONString()).getData(); + JSONObject toResult = JSON.parseObject(data); + Result result = ConvertUtils.mapToEntity(toResult, Result.class); + if (!result.success()) { + return dto.getPageNo() + 1; + } + + ReturnDate returnDate = JSONObject.parseObject(JSONObject.toJSONString(result.getData()), ReturnDate.class); + this.insertBatch(returnDate.getList()); + return returnDate.getTotal(); + } + + static class ReturnDate { + + private int total; + private List list; + + + public int getTotal() { + return total; + } + + public void setTotal(int total) { + this.total = total; + } + + public List getList() { + return list; + } + + public void setList(List list) { + this.list = list; + } + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghJdbServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghJdbServiceImpl.java new file mode 100644 index 0000000000..cb164432b0 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghJdbServiceImpl.java @@ -0,0 +1,171 @@ +package com.epmet.opendata.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +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.constant.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.HttpClientManager; +import com.epmet.commons.tools.utils.Result; +import com.epmet.opendata.dao.WghJdbDao; +import com.epmet.opendata.dto.constant.CaWghDataConstant; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.WghJdbDTO; +import com.epmet.opendata.entity.CaLoudongEntity; +import com.epmet.opendata.entity.WghJdbEntity; +import com.epmet.opendata.redis.WghJdbRedis; +import com.epmet.opendata.service.WghJdbService; +import com.epmet.opendata.util.AesUtils; +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 WghJdbServiceImpl extends BaseServiceImpl implements WghJdbService { + + @Autowired + private WghJdbRedis wghJdbRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, WghJdbDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, WghJdbDTO.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 WghJdbDTO get(String id) { + WghJdbEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, WghJdbDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(WghJdbDTO dto) { + WghJdbEntity entity = ConvertUtils.sourceToTarget(dto, WghJdbEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(WghJdbDTO dto) { + WghJdbEntity entity = ConvertUtils.sourceToTarget(dto, WghJdbEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + /** + * 调用ruoyi接口获取wgh_jdb数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/14 15:31 + */ + @Override + public void getPreserWghJdbVation(PreserVationFormDTO dto) { + int i = baseDao.deleteAll(); + if (i >= 0) { + dto.setPageNo(NumConstant.ONE); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); + dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_SHARE); + dto.setTableName(CaWghDataConstant.SHARE_WGH_JDB); + + dto.setWhereCase("1=1"); + dto.setOrderBy("insert_time"); + + int pageNo = 1; + + int total = 0; + + do { + try { + total = listWghJdb(dto); + pageNo++; + dto.setPageNo(pageNo); + } catch (Exception e) { + e.printStackTrace(); + } + } while (total > (pageNo * NumConstant.FIFTY)); + } + } + + private int listWghJdb(PreserVationFormDTO dto) throws Exception { + String aes = AesUtils.encryptByAES(JSONObject.toJSONString(dto), CaWghDataConstant.AESKEY); + JSONObject obj = new JSONObject(); + obj.put(CaWghDataConstant.SHARE_CONDITION, aes); + String data = HttpClientManager.getInstance().sendPostByJSON(CaWghDataConstant.DATA_URL_SHARE, obj.toJSONString()).getData(); + JSONObject toResult = JSON.parseObject(data); + Result result = ConvertUtils.mapToEntity(toResult, Result.class); + if (!result.success()) { + return dto.getPageNo() + 1; + } + + ReturnDate returnDate = JSONObject.parseObject(JSONObject.toJSONString(result.getData()), ReturnDate.class); + this.insertBatch(returnDate.getList()); + return returnDate.getTotal(); + } + + static class ReturnDate { + + private int total; + private List list; + + + public int getTotal() { + return total; + } + + public void setTotal(int total) { + this.total = total; + } + + public List getList() { + return list; + } + + public void setList(List list) { + this.list = list; + } + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghJqzServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghJqzServiceImpl.java new file mode 100644 index 0000000000..1023edffa7 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghJqzServiceImpl.java @@ -0,0 +1,171 @@ +package com.epmet.opendata.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +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.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.HttpClientManager; +import com.epmet.commons.tools.utils.Result; +import com.epmet.opendata.dao.WghJqzDao; +import com.epmet.opendata.dto.constant.CaWghDataConstant; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.WghJqzDTO; +import com.epmet.opendata.entity.CaLoudongEntity; +import com.epmet.opendata.entity.WghJqzEntity; +import com.epmet.opendata.redis.WghJqzRedis; +import com.epmet.opendata.service.WghJqzService; +import com.epmet.opendata.util.AesUtils; +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 WghJqzServiceImpl extends BaseServiceImpl implements WghJqzService { + + @Autowired + private WghJqzRedis wghJqzRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, WghJqzDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, WghJqzDTO.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 WghJqzDTO get(String id) { + WghJqzEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, WghJqzDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(WghJqzDTO dto) { + WghJqzEntity entity = ConvertUtils.sourceToTarget(dto, WghJqzEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(WghJqzDTO dto) { + WghJqzEntity entity = ConvertUtils.sourceToTarget(dto, WghJqzEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + /** + * 调用ruoyi接口存储wgh_jqz数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/14 15:40 + */ + @Override + public void getPreserWghjqzVation(PreserVationFormDTO dto) { + int i = baseDao.deleteAll(); + if (i >= 0) { + dto.setPageNo(NumConstant.ONE); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); + dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_SHARE); + dto.setTableName(CaWghDataConstant.SHARE_WGH_JQZ); + + dto.setWhereCase("1=1"); + dto.setOrderBy("OBJECTID"); + + int pageNo = 1; + + int total = 0; + + do { + try { + total = listWghJqz(dto); + pageNo++; + dto.setPageNo(pageNo); + } catch (Exception e) { + e.printStackTrace(); + } + } while (total > (pageNo * NumConstant.FIFTY)); + } + } + + private int listWghJqz(PreserVationFormDTO dto) throws Exception { + String aes = AesUtils.encryptByAES(JSONObject.toJSONString(dto), CaWghDataConstant.AESKEY); + JSONObject obj = new JSONObject(); + obj.put(CaWghDataConstant.SHARE_CONDITION, aes); + String data = HttpClientManager.getInstance().sendPostByJSON(CaWghDataConstant.DATA_URL_SHARE, obj.toJSONString()).getData(); + JSONObject toResult = JSON.parseObject(data); + Result result = ConvertUtils.mapToEntity(toResult, Result.class); + if (!result.success()) { + return dto.getPageNo() + 1; + } + + ReturnDate returnDate = JSONObject.parseObject(JSONObject.toJSONString(result.getData()), ReturnDate.class); + this.insertBatch(returnDate.getList()); + return returnDate.getTotal(); + } + + static class ReturnDate { + + private int total; + private List list; + + + public int getTotal() { + return total; + } + + public void setTotal(int total) { + this.total = total; + } + + public List getList() { + return list; + } + + public void setList(List list) { + this.list = list; + } + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghJxcsServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghJxcsServiceImpl.java new file mode 100644 index 0000000000..0e202ffa6b --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghJxcsServiceImpl.java @@ -0,0 +1,173 @@ +package com.epmet.opendata.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +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.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.HttpClientManager; +import com.epmet.commons.tools.utils.Result; +import com.epmet.opendata.dao.WghJxcsDao; +import com.epmet.opendata.dto.constant.CaWghDataConstant; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.WghJxcsDTO; +import com.epmet.opendata.entity.CaLoudongEntity; +import com.epmet.opendata.entity.WghJxcsEntity; +import com.epmet.opendata.redis.WghJxcsRedis; +import com.epmet.opendata.service.WghJxcsService; +import com.epmet.opendata.util.AesUtils; +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 WghJxcsServiceImpl extends BaseServiceImpl implements WghJxcsService { + + @Autowired + private WghJxcsRedis wghJxcsRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, WghJxcsDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, WghJxcsDTO.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 WghJxcsDTO get(String id) { + WghJxcsEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, WghJxcsDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(WghJxcsDTO dto) { + WghJxcsEntity entity = ConvertUtils.sourceToTarget(dto, WghJxcsEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(WghJxcsDTO dto) { + WghJxcsEntity entity = ConvertUtils.sourceToTarget(dto, WghJxcsEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + /** + * 调用ruoyi接口存储wgh_jxcs数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/14 15:46 + */ + @Override + public void preserWghJxcsVation(PreserVationFormDTO dto) { + int i = baseDao.deleteAll(); + if (i >= 0) { + dto.setPageNo(NumConstant.ONE); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); + dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_SHARE); + dto.setTableName(CaWghDataConstant.SHARE_WGH_JXCS); + + dto.setWhereCase("1=1"); + dto.setOrderBy("USER_ID,ID"); + + int pageNo = 1; + + int total = 0; + + do { + try { + total = listWghJxcs(dto); + pageNo++; + dto.setPageNo(pageNo); + } catch (Exception e) { + e.printStackTrace(); + } + } while (total > (pageNo * NumConstant.FIFTY)); + } + + } + + + private int listWghJxcs(PreserVationFormDTO dto) throws Exception { + String aes = AesUtils.encryptByAES(JSONObject.toJSONString(dto), CaWghDataConstant.AESKEY); + JSONObject obj = new JSONObject(); + obj.put(CaWghDataConstant.SHARE_CONDITION, aes); + String data = HttpClientManager.getInstance().sendPostByJSON(CaWghDataConstant.DATA_URL_SHARE, obj.toJSONString()).getData(); + JSONObject toResult = JSON.parseObject(data); + Result result = ConvertUtils.mapToEntity(toResult, Result.class); + if (!result.success()) { + return dto.getPageNo() + 1; + } + + ReturnDate returnDate = JSONObject.parseObject(JSONObject.toJSONString(result.getData()), ReturnDate.class); + this.insertBatch(returnDate.getList()); + return returnDate.getTotal(); + } + + static class ReturnDate { + + private int total; + private List list; + + + public int getTotal() { + return total; + } + + public void setTotal(int total) { + this.total = total; + } + + public List getList() { + return list; + } + + public void setList(List list) { + this.list = list; + } + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghJyzServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghJyzServiceImpl.java new file mode 100644 index 0000000000..f159e690de --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghJyzServiceImpl.java @@ -0,0 +1,173 @@ +package com.epmet.opendata.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +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.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.HttpClientManager; +import com.epmet.commons.tools.utils.Result; +import com.epmet.opendata.dao.WghJyzDao; +import com.epmet.opendata.dto.constant.CaWghDataConstant; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.WghJyzDTO; +import com.epmet.opendata.entity.CaLoudongEntity; +import com.epmet.opendata.entity.WghJyzEntity; +import com.epmet.opendata.redis.WghJyzRedis; +import com.epmet.opendata.service.WghJyzService; +import com.epmet.opendata.util.AesUtils; +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 WghJyzServiceImpl extends BaseServiceImpl implements WghJyzService { + + @Autowired + private WghJyzRedis wghJyzRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, WghJyzDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, WghJyzDTO.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 WghJyzDTO get(String id) { + WghJyzEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, WghJyzDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(WghJyzDTO dto) { + WghJyzEntity entity = ConvertUtils.sourceToTarget(dto, WghJyzEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(WghJyzDTO dto) { + WghJyzEntity entity = ConvertUtils.sourceToTarget(dto, WghJyzEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + /** + * 调用ruoyi接口获取wgh_jyz数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/14 15:53 + */ + @Override + public void getPreserWghJyzVation(PreserVationFormDTO dto) { + int i = baseDao.deleteAll(); + if (i >= 0) { + dto.setPageNo(NumConstant.ONE); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); + dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_SHARE); + dto.setTableName(CaWghDataConstant.SHARE_WGH_JYZ); + + dto.setWhereCase("1=1"); + dto.setOrderBy("OBJECTID,等级,insert_time"); + + int pageNo = 1; + + int total = 0; + + do { + try { + total = listLouDong(dto); + pageNo++; + dto.setPageNo(pageNo); + } catch (Exception e) { + e.printStackTrace(); + } + } while (total > (pageNo * NumConstant.FIFTY)); + } + + } + + + private int listLouDong(PreserVationFormDTO dto) throws Exception { + String aes = AesUtils.encryptByAES(JSONObject.toJSONString(dto), CaWghDataConstant.AESKEY); + JSONObject obj = new JSONObject(); + obj.put(CaWghDataConstant.SHARE_CONDITION, aes); + String data = HttpClientManager.getInstance().sendPostByJSON(CaWghDataConstant.DATA_URL_SHARE, obj.toJSONString()).getData(); + JSONObject toResult = JSON.parseObject(data); + Result result = ConvertUtils.mapToEntity(toResult, Result.class); + if (!result.success()) { + return dto.getPageNo() + 1; + } + + ReturnDate returnDate = JSONObject.parseObject(JSONObject.toJSONString(result.getData()), ReturnDate.class); + this.insertBatch(returnDate.getList()); + return returnDate.getTotal(); + } + + static class ReturnDate { + + private int total; + private List list; + + + public int getTotal() { + return total; + } + + public void setTotal(int total) { + this.total = total; + } + + public List getList() { + return list; + } + + public void setList(List list) { + this.list = list; + } + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSjxxbServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSjxxbServiceImpl.java new file mode 100644 index 0000000000..ad2dee773b --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSjxxbServiceImpl.java @@ -0,0 +1,173 @@ +package com.epmet.opendata.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +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.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.HttpClientManager; +import com.epmet.commons.tools.utils.Result; +import com.epmet.opendata.dao.WghSjxxbDao; +import com.epmet.opendata.dto.constant.CaWghDataConstant; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.WghSjxxbDTO; +import com.epmet.opendata.entity.CaLoudongEntity; +import com.epmet.opendata.entity.WghSjxxbEntity; +import com.epmet.opendata.redis.WghSjxxbRedis; +import com.epmet.opendata.service.WghSjxxbService; +import com.epmet.opendata.util.AesUtils; +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 WghSjxxbServiceImpl extends BaseServiceImpl implements WghSjxxbService { + + @Autowired + private WghSjxxbRedis wghSjxxbRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, WghSjxxbDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, WghSjxxbDTO.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 WghSjxxbDTO get(String id) { + WghSjxxbEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, WghSjxxbDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(WghSjxxbDTO dto) { + WghSjxxbEntity entity = ConvertUtils.sourceToTarget(dto, WghSjxxbEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(WghSjxxbDTO dto) { + WghSjxxbEntity entity = ConvertUtils.sourceToTarget(dto, WghSjxxbEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + /** + * 调用ruoyi接口获取wgh_sjxx数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/14 16:02 + */ + @Override + public void getPreserSjxxVation(PreserVationFormDTO dto) { + int i = baseDao.deleteAll(); + if (i >= 0) { + dto.setPageNo(NumConstant.ONE); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); + dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_SHARE); + dto.setTableName(CaWghDataConstant.SHARE_WGH_SJXX); + + dto.setWhereCase("1=1"); + dto.setOrderBy("OBJECTID,OBJECTID_1,insert_time"); + + int pageNo = 1; + + int total = 0; + + do { + try { + total = listLouDong(dto); + pageNo++; + dto.setPageNo(pageNo); + } catch (Exception e) { + e.printStackTrace(); + } + } while (total > (pageNo * NumConstant.FIFTY)); + } + + } + + + private int listLouDong(PreserVationFormDTO dto) throws Exception { + String aes = AesUtils.encryptByAES(JSONObject.toJSONString(dto), CaWghDataConstant.AESKEY); + JSONObject obj = new JSONObject(); + obj.put(CaWghDataConstant.SHARE_CONDITION, aes); + String data = HttpClientManager.getInstance().sendPostByJSON(CaWghDataConstant.DATA_URL_SHARE, obj.toJSONString()).getData(); + JSONObject toResult = JSON.parseObject(data); + Result result = ConvertUtils.mapToEntity(toResult, Result.class); + if (!result.success()) { + return dto.getPageNo() + 1; + } + + ReturnDate returnDate = JSONObject.parseObject(JSONObject.toJSONString(result.getData()), ReturnDate.class); + this.insertBatch(returnDate.getList()); + return returnDate.getTotal(); + } + + static class ReturnDate { + + private int total; + private List list; + + + public int getTotal() { + return total; + } + + public void setTotal(int total) { + this.total = total; + } + + public List getList() { + return list; + } + + public void setList(List list) { + this.list = list; + } + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSqxxServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSqxxServiceImpl.java new file mode 100644 index 0000000000..e804f85a5c --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSqxxServiceImpl.java @@ -0,0 +1,173 @@ +package com.epmet.opendata.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +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.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.HttpClientManager; +import com.epmet.commons.tools.utils.Result; +import com.epmet.opendata.dao.WghSqxxDao; +import com.epmet.opendata.dto.constant.CaWghDataConstant; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.WghSqxxDTO; +import com.epmet.opendata.entity.CaLoudongEntity; +import com.epmet.opendata.entity.WghSqxxEntity; +import com.epmet.opendata.redis.WghSqxxRedis; +import com.epmet.opendata.service.WghSqxxService; +import com.epmet.opendata.util.AesUtils; +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 WghSqxxServiceImpl extends BaseServiceImpl implements WghSqxxService { + + @Autowired + private WghSqxxRedis wghSqxxRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, WghSqxxDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, WghSqxxDTO.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 WghSqxxDTO get(String id) { + WghSqxxEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, WghSqxxDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(WghSqxxDTO dto) { + WghSqxxEntity entity = ConvertUtils.sourceToTarget(dto, WghSqxxEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(WghSqxxDTO dto) { + WghSqxxEntity entity = ConvertUtils.sourceToTarget(dto, WghSqxxEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + /** + * 调用ruoyi接口获取wgh_sqxx数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/14 16:08 + */ + @Override + public void getPreserWghSqxxVation(PreserVationFormDTO dto) { + int i = baseDao.deleteAll(); + if (i >= 0) { + dto.setPageNo(NumConstant.ONE); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); + dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_SHARE); + dto.setTableName(CaWghDataConstant.SHARE_WGH_SQXX); + + dto.setWhereCase("1=1"); + dto.setOrderBy("OBJECTID,街道编码,社区编码,insert_time"); + + int pageNo = 1; + + int total = 0; + + do { + try { + total = listWghSqxx(dto); + pageNo++; + dto.setPageNo(pageNo); + } catch (Exception e) { + e.printStackTrace(); + } + } while (total > (pageNo * NumConstant.FIFTY)); + } + + } + + + private int listWghSqxx(PreserVationFormDTO dto) throws Exception { + String aes = AesUtils.encryptByAES(JSONObject.toJSONString(dto), CaWghDataConstant.AESKEY); + JSONObject obj = new JSONObject(); + obj.put(CaWghDataConstant.SHARE_CONDITION, aes); + String data = HttpClientManager.getInstance().sendPostByJSON(CaWghDataConstant.DATA_URL_SHARE, obj.toJSONString()).getData(); + JSONObject toResult = JSON.parseObject(data); + Result result = ConvertUtils.mapToEntity(toResult, Result.class); + if (!result.success()) { + return dto.getPageNo() + 1; + } + + ReturnDate returnDate = JSONObject.parseObject(JSONObject.toJSONString(result.getData()), ReturnDate.class); + this.insertBatch(returnDate.getList()); + return returnDate.getTotal(); + } + + static class ReturnDate { + + private int total; + private List list; + + + public int getTotal() { + return total; + } + + public void setTotal(int total) { + this.total = total; + } + + public List getList() { + return list; + } + + public void setList(List list) { + this.list = list; + } + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSubdistrictOfficeServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSubdistrictOfficeServiceImpl.java new file mode 100644 index 0000000000..6c60f83523 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSubdistrictOfficeServiceImpl.java @@ -0,0 +1,165 @@ +package com.epmet.opendata.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +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.constant.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.HttpClientManager; +import com.epmet.commons.tools.utils.Result; +import com.epmet.opendata.dao.WghSubdistrictOfficeDao; +import com.epmet.opendata.dto.constant.CaWghDataConstant; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.SubdistrictOfficeDTO; +import com.epmet.opendata.entity.CaLoudongEntity; +import com.epmet.opendata.entity.WghSubdistrictOfficeEntity; +import com.epmet.opendata.redis.SubdistrictOfficeRedis; +import com.epmet.opendata.service.WghSubdistrictOfficeService; +import com.epmet.opendata.util.AesUtils; +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 WghSubdistrictOfficeServiceImpl extends BaseServiceImpl implements WghSubdistrictOfficeService { + + @Autowired + private SubdistrictOfficeRedis subdistrictOfficeRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, SubdistrictOfficeDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, SubdistrictOfficeDTO.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 SubdistrictOfficeDTO get(String id) { + WghSubdistrictOfficeEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, SubdistrictOfficeDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(SubdistrictOfficeDTO dto) { + WghSubdistrictOfficeEntity entity = ConvertUtils.sourceToTarget(dto, WghSubdistrictOfficeEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(SubdistrictOfficeDTO dto) { + WghSubdistrictOfficeEntity entity = ConvertUtils.sourceToTarget(dto, WghSubdistrictOfficeEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public void getpreserSubVation(PreserVationFormDTO dto) { + int i = baseDao.deleteAll(); + if (i >= 0) { + dto.setPageNo(NumConstant.ONE); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); + dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_SHARE); + dto.setTableName(CaWghDataConstant.SHARE_WGH_SUB); + + dto.setWhereCase("1=1"); + dto.setOrderBy("街道代码"); + + int pageNo = 1; + + int total = 0; + + do { + try { + total = listSub(dto); + pageNo++; + dto.setPageNo(pageNo); + } catch (Exception e) { + e.printStackTrace(); + } + } while (total > (pageNo * NumConstant.FIFTY)); + } + + } + + + private int listSub(PreserVationFormDTO dto) throws Exception { + String aes = AesUtils.encryptByAES(JSONObject.toJSONString(dto), CaWghDataConstant.AESKEY); + JSONObject obj = new JSONObject(); + obj.put(CaWghDataConstant.SHARE_CONDITION, aes); + String data = HttpClientManager.getInstance().sendPostByJSON(CaWghDataConstant.DATA_URL_SHARE, obj.toJSONString()).getData(); + JSONObject toResult = JSON.parseObject(data); + Result result = ConvertUtils.mapToEntity(toResult, Result.class); + if (!result.success()) { + return dto.getPageNo() + 1; + } + + ReturnDate returnDate = JSONObject.parseObject(JSONObject.toJSONString(result.getData()), ReturnDate.class); + this.insertBatch(returnDate.getList()); + return returnDate.getTotal(); + } + + static class ReturnDate { + + private int total; + private List list; + + + public int getTotal() { + return total; + } + + public void setTotal(int total) { + this.total = total; + } + + public List getList() { + return list; + } + + public void setList(List list) { + this.list = list; + } + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSzcgwghServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSzcgwghServiceImpl.java new file mode 100644 index 0000000000..e8b1a8d19c --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSzcgwghServiceImpl.java @@ -0,0 +1,173 @@ +package com.epmet.opendata.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +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.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.HttpClientManager; +import com.epmet.commons.tools.utils.Result; +import com.epmet.opendata.dao.WghSzcgwghDao; +import com.epmet.opendata.dto.constant.CaWghDataConstant; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.WghSzcgwghDTO; +import com.epmet.opendata.entity.CaLoudongEntity; +import com.epmet.opendata.entity.WghSzcgwghEntity; +import com.epmet.opendata.redis.WghSzcgwghRedis; +import com.epmet.opendata.service.WghSzcgwghService; +import com.epmet.opendata.util.AesUtils; +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 WghSzcgwghServiceImpl extends BaseServiceImpl implements WghSzcgwghService { + + @Autowired + private WghSzcgwghRedis wghSzcgwghRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, WghSzcgwghDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, WghSzcgwghDTO.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 WghSzcgwghDTO get(String id) { + WghSzcgwghEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, WghSzcgwghDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(WghSzcgwghDTO dto) { + WghSzcgwghEntity entity = ConvertUtils.sourceToTarget(dto, WghSzcgwghEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(WghSzcgwghDTO dto) { + WghSzcgwghEntity entity = ConvertUtils.sourceToTarget(dto, WghSzcgwghEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + /** + * 调用ruoyi系统获取wgh_szcgwgh数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/14 16:20 + */ + @Override + public void getPreserWghSzcgwghVation(PreserVationFormDTO dto) { + int i = baseDao.deleteAll(); + if (i >= 0) { + dto.setPageNo(NumConstant.ONE); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); + dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_SHARE); + dto.setTableName(CaWghDataConstant.SHARE_WGH_SZCGWGH); + + dto.setWhereCase("1=1"); + dto.setOrderBy("OBJECTID,ID,insert_time"); + + int pageNo = 1; + + int total = 0; + + do { + try { + total = listWghSzcgWgh(dto); + pageNo++; + dto.setPageNo(pageNo); + } catch (Exception e) { + e.printStackTrace(); + } + } while (total > (pageNo * NumConstant.FIFTY)); + } + + } + + + private int listWghSzcgWgh(PreserVationFormDTO dto) throws Exception { + String aes = AesUtils.encryptByAES(JSONObject.toJSONString(dto), CaWghDataConstant.AESKEY); + JSONObject obj = new JSONObject(); + obj.put(CaWghDataConstant.SHARE_CONDITION, aes); + String data = HttpClientManager.getInstance().sendPostByJSON(CaWghDataConstant.DATA_URL_SHARE, obj.toJSONString()).getData(); + JSONObject toResult = JSON.parseObject(data); + Result result = ConvertUtils.mapToEntity(toResult, Result.class); + if (!result.success()) { + return dto.getPageNo() + 1; + } + + ReturnDate returnDate = JSONObject.parseObject(JSONObject.toJSONString(result.getData()), ReturnDate.class); + this.insertBatch(returnDate.getList()); + return returnDate.getTotal(); + } + + static class ReturnDate { + + private int total; + private List list; + + + public int getTotal() { + return total; + } + + public void setTotal(int total) { + this.total = total; + } + + public List getList() { + return list; + } + + public void setList(List list) { + this.list = list; + } + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSzzrwgServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSzzrwgServiceImpl.java new file mode 100644 index 0000000000..6a34e91255 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSzzrwgServiceImpl.java @@ -0,0 +1,175 @@ +package com.epmet.opendata.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +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.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; + +import com.epmet.commons.tools.utils.HttpClientManager; +import com.epmet.commons.tools.utils.Result; +import com.epmet.opendata.dao.WghSzzrwgDao; +import com.epmet.opendata.dto.constant.CaWghDataConstant; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.WghSzzrwgDTO; +import com.epmet.opendata.entity.CaLoudongEntity; +import com.epmet.opendata.entity.WghSzzrwgEntity; +import com.epmet.opendata.redis.WghSzzrwgRedis; +import com.epmet.opendata.service.WghSzzrwgService; +import com.epmet.opendata.util.AesUtils; +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 WghSzzrwgServiceImpl extends BaseServiceImpl implements WghSzzrwgService { + + @Autowired + private WghSzzrwgRedis wghSzzrwgRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, WghSzzrwgDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, WghSzzrwgDTO.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 WghSzzrwgDTO get(String id) { + WghSzzrwgEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, WghSzzrwgDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(WghSzzrwgDTO dto) { + WghSzzrwgEntity entity = ConvertUtils.sourceToTarget(dto, WghSzzrwgEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(WghSzzrwgDTO dto) { + WghSzzrwgEntity entity = ConvertUtils.sourceToTarget(dto, WghSzzrwgEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + /** + * 调用ruoyi接口获取wgh_szzrwg数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/14 16:27 + */ + @Override + public void getPreserWghSzzrwgVation(PreserVationFormDTO dto) { + + int i = baseDao.deleteAll(); + if (i >= 0) { + dto.setPageNo(NumConstant.ONE); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); + dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_SHARE); + dto.setTableName(CaWghDataConstant.SHARE_WGH_SZZRWG); + + dto.setWhereCase("1=1"); + dto.setOrderBy("OBJECTID"); + + int pageNo = 1; + + int total = 0; + + do { + try { + total = listSzzrwg(dto); + pageNo++; + dto.setPageNo(pageNo); + } catch (Exception e) { + e.printStackTrace(); + } + } while (total > (pageNo * NumConstant.FIFTY)); + } + + } + + + private int listSzzrwg(PreserVationFormDTO dto) throws Exception { + String aes = AesUtils.encryptByAES(JSONObject.toJSONString(dto), CaWghDataConstant.AESKEY); + JSONObject obj = new JSONObject(); + obj.put(CaWghDataConstant.SHARE_CONDITION, aes); + String data = HttpClientManager.getInstance().sendPostByJSON(CaWghDataConstant.DATA_URL_SHARE, obj.toJSONString()).getData(); + JSONObject toResult = JSON.parseObject(data); + Result result = ConvertUtils.mapToEntity(toResult, Result.class); + if (!result.success()) { + return dto.getPageNo() + 1; + } + + ReturnDate returnDate = JSONObject.parseObject(JSONObject.toJSONString(result.getData()), ReturnDate.class); + this.insertBatch(returnDate.getList()); + return returnDate.getTotal(); + } + + static class ReturnDate { + + private int total; + private List list; + + + public int getTotal() { + return total; + } + + public void setTotal(int total) { + this.total = total; + } + + public List getList() { + return list; + } + + public void setList(List list) { + this.list = list; + } + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghWhpdwServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghWhpdwServiceImpl.java new file mode 100644 index 0000000000..c62f8689f4 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghWhpdwServiceImpl.java @@ -0,0 +1,173 @@ +package com.epmet.opendata.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +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.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.HttpClientManager; +import com.epmet.commons.tools.utils.Result; +import com.epmet.opendata.dao.WghWhpdwDao; +import com.epmet.opendata.dto.constant.CaWghDataConstant; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.WghWhpdwDTO; +import com.epmet.opendata.entity.CaLoudongEntity; +import com.epmet.opendata.entity.WghWhpdwEntity; +import com.epmet.opendata.redis.WghWhpdwRedis; +import com.epmet.opendata.service.WghWhpdwService; +import com.epmet.opendata.util.AesUtils; +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 WghWhpdwServiceImpl extends BaseServiceImpl implements WghWhpdwService { + + @Autowired + private WghWhpdwRedis wghWhpdwRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, WghWhpdwDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, WghWhpdwDTO.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 WghWhpdwDTO get(String id) { + WghWhpdwEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, WghWhpdwDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(WghWhpdwDTO dto) { + WghWhpdwEntity entity = ConvertUtils.sourceToTarget(dto, WghWhpdwEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(WghWhpdwDTO dto) { + WghWhpdwEntity entity = ConvertUtils.sourceToTarget(dto, WghWhpdwEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + /** + * 调用ruoyi系统获取wgh_whpdw数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/14 16:34 + */ + @Override + public void getPreserWhpdwVation(PreserVationFormDTO dto) { + int i = baseDao.deleteAll(); + if (i >= 0) { + dto.setPageNo(NumConstant.ONE); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); + dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_SHARE); + dto.setTableName(CaWghDataConstant.SHARE_WGH_WHPDW); + + dto.setWhereCase("1=1"); + dto.setOrderBy("OBJECTID,XH,GRADE,insert_time"); + + int pageNo = 1; + + int total = 0; + + do { + try { + total = listWghWhpdw(dto); + pageNo++; + dto.setPageNo(pageNo); + } catch (Exception e) { + e.printStackTrace(); + } + } while (total > (pageNo * NumConstant.FIFTY)); + } + + } + + + private int listWghWhpdw(PreserVationFormDTO dto) throws Exception { + String aes = AesUtils.encryptByAES(JSONObject.toJSONString(dto), CaWghDataConstant.AESKEY); + JSONObject obj = new JSONObject(); + obj.put(CaWghDataConstant.SHARE_CONDITION, aes); + String data = HttpClientManager.getInstance().sendPostByJSON(CaWghDataConstant.DATA_URL_SHARE, obj.toJSONString()).getData(); + JSONObject toResult = JSON.parseObject(data); + Result result = ConvertUtils.mapToEntity(toResult, Result.class); + if (!result.success()) { + return dto.getPageNo() + 1; + } + + ReturnDate returnDate = JSONObject.parseObject(JSONObject.toJSONString(result.getData()), ReturnDate.class); + this.insertBatch(returnDate.getList()); + return returnDate.getTotal(); + } + + static class ReturnDate { + + private int total; + private List list; + + + public int getTotal() { + return total; + } + + public void setTotal(int total) { + this.total = total; + } + + public List getList() { + return list; + } + + public void setList(List list) { + this.list = list; + } + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghYjbmcsServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghYjbmcsServiceImpl.java new file mode 100644 index 0000000000..550822bf20 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghYjbmcsServiceImpl.java @@ -0,0 +1,173 @@ +package com.epmet.opendata.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +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.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.HttpClientManager; +import com.epmet.commons.tools.utils.Result; +import com.epmet.opendata.dao.WghYjbmcsDao; +import com.epmet.opendata.dto.constant.CaWghDataConstant; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.WghYjbmcsDTO; +import com.epmet.opendata.entity.CaLoudongEntity; +import com.epmet.opendata.entity.WghYjbmcsEntity; +import com.epmet.opendata.redis.WghYjbmcsRedis; +import com.epmet.opendata.service.WghYjbmcsService; +import com.epmet.opendata.util.AesUtils; +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 WghYjbmcsServiceImpl extends BaseServiceImpl implements WghYjbmcsService { + + @Autowired + private WghYjbmcsRedis wghYjbmcsRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, WghYjbmcsDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, WghYjbmcsDTO.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 WghYjbmcsDTO get(String id) { + WghYjbmcsEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, WghYjbmcsDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(WghYjbmcsDTO dto) { + WghYjbmcsEntity entity = ConvertUtils.sourceToTarget(dto, WghYjbmcsEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(WghYjbmcsDTO dto) { + WghYjbmcsEntity entity = ConvertUtils.sourceToTarget(dto, WghYjbmcsEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + /** + * 调用ruoyi系统获取wgh_yjbmcs数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/14 16:39 + */ + @Override + public void getPreserWghYjbmcsVation(PreserVationFormDTO dto) { + int i = baseDao.deleteAll(); + if (i >= 0) { + dto.setPageNo(NumConstant.ONE); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); + dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_SHARE); + dto.setTableName(CaWghDataConstant.SHARE_WGH_YJBMCS); + + dto.setWhereCase("1=1"); + dto.setOrderBy("OBJECTID,INSERT_TIME"); + + int pageNo = 1; + + int total = 0; + + do { + try { + total = listLouDong(dto); + pageNo++; + dto.setPageNo(pageNo); + } catch (Exception e) { + e.printStackTrace(); + } + } while (total > (pageNo * NumConstant.FIFTY)); + } + + } + + + private int listLouDong(PreserVationFormDTO dto) throws Exception { + String aes = AesUtils.encryptByAES(JSONObject.toJSONString(dto), CaWghDataConstant.AESKEY); + JSONObject obj = new JSONObject(); + obj.put(CaWghDataConstant.SHARE_CONDITION, aes); + String data = HttpClientManager.getInstance().sendPostByJSON(CaWghDataConstant.DATA_URL_SHARE, obj.toJSONString()).getData(); + JSONObject toResult = JSON.parseObject(data); + Result result = ConvertUtils.mapToEntity(toResult, Result.class); + if (!result.success()) { + return dto.getPageNo() + 1; + } + + ReturnDate returnDate = JSONObject.parseObject(JSONObject.toJSONString(result.getData()), ReturnDate.class); + this.insertBatch(returnDate.getList()); + return returnDate.getTotal(); + } + + static class ReturnDate { + + private int total; + private List list; + + + public int getTotal() { + return total; + } + + public void setTotal(int total) { + this.total = total; + } + + public List getList() { + return list; + } + + public void setList(List list) { + this.list = list; + } + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghYqhjzServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghYqhjzServiceImpl.java new file mode 100644 index 0000000000..a32a484816 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghYqhjzServiceImpl.java @@ -0,0 +1,173 @@ +package com.epmet.opendata.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +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.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; + +import com.epmet.commons.tools.utils.HttpClientManager; +import com.epmet.commons.tools.utils.Result; +import com.epmet.opendata.dao.WghYqhjzDao; +import com.epmet.opendata.dto.constant.CaWghDataConstant; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.entity.CaLoudongEntity; +import com.epmet.opendata.entity.WghYqhjzEntity; +import com.epmet.opendata.redis.WghYqhjzRedis; +import com.epmet.opendata.service.WghYqhjzService; +import com.epmet.opendata.util.AesUtils; +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 com.epmet.opendata.dto.wgh.WghYqhjzDTO; +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 WghYqhjzServiceImpl extends BaseServiceImpl implements WghYqhjzService { + + @Autowired + private WghYqhjzRedis wghYqhjzRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, WghYqhjzDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, WghYqhjzDTO.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 WghYqhjzDTO get(String id) { + WghYqhjzEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, WghYqhjzDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(WghYqhjzDTO dto) { + WghYqhjzEntity entity = ConvertUtils.sourceToTarget(dto, WghYqhjzEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(WghYqhjzDTO dto) { + WghYqhjzEntity entity = ConvertUtils.sourceToTarget(dto, WghYqhjzEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + /** + * 调用ruoyi系统获取wgh_yqhjz数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/14 16:46 + */ + @Override + public void getPreserWghYqhjzVation(PreserVationFormDTO dto) { + int i = baseDao.deleteAll(); + if (i >= 0) { + dto.setPageNo(NumConstant.ONE); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); + dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_SHARE); + dto.setTableName(CaWghDataConstant.SHARE_WGH_YQHJZ); + + dto.setWhereCase("1=1"); + dto.setOrderBy("OBJECTID,XH,insert_time"); + + int pageNo = 1; + + int total = 0; + + do { + try { + total = listWghYqhjz(dto); + pageNo++; + dto.setPageNo(pageNo); + } catch (Exception e) { + e.printStackTrace(); + } + } while (total > (pageNo * NumConstant.FIFTY)); + } + + } + + + private int listWghYqhjz(PreserVationFormDTO dto) throws Exception { + String aes = AesUtils.encryptByAES(JSONObject.toJSONString(dto), CaWghDataConstant.AESKEY); + JSONObject obj = new JSONObject(); + obj.put(CaWghDataConstant.SHARE_CONDITION, aes); + String data = HttpClientManager.getInstance().sendPostByJSON(CaWghDataConstant.DATA_URL_SHARE, obj.toJSONString()).getData(); + JSONObject toResult = JSON.parseObject(data); + Result result = ConvertUtils.mapToEntity(toResult, Result.class); + if (!result.success()) { + return dto.getPageNo() + 1; + } + + ReturnDate returnDate = JSONObject.parseObject(JSONObject.toJSONString(result.getData()), ReturnDate.class); + this.insertBatch(returnDate.getList()); + return returnDate.getTotal(); + } + + static class ReturnDate { + + private int total; + private List list; + + + public int getTotal() { + return total; + } + + public void setTotal(int total) { + this.total = total; + } + + public List getList() { + return list; + } + + public void setList(List list) { + this.list = list; + } + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/util/AesUtils.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/util/AesUtils.java new file mode 100644 index 0000000000..131bbfec83 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/util/AesUtils.java @@ -0,0 +1,78 @@ +package com.epmet.opendata.util; + +import javax.crypto.Cipher; +import javax.crypto.spec.SecretKeySpec; + +/*** + * Aes加解密工具类 + * @author www + * @date 2022/6/6/0006 11:07 + */ +public class AesUtils { + + + public static String encryptByAES(String input, String key) throws Exception { + // 算法 + String algorithm = "AES"; + String transformation = "AES"; + // Cipher:密码,获取加密对象 + // transformation:参数表示使用什么类型加密 + Cipher cipher = Cipher.getInstance(transformation); + // 指定秘钥规则 + // 第一个参数表示:密钥,key的字节数组 长度必须是16位 + // 第二个参数表示:算法 + SecretKeySpec sks = new SecretKeySpec(key.getBytes(), algorithm); + // 对加密进行初始化 + // 第一个参数:表示模式,有加密模式和解密模式 + // 第二个参数:表示秘钥规则 + cipher.init(Cipher.ENCRYPT_MODE, sks); + // 进行加密 + byte[] bytes = cipher.doFinal(input.getBytes()); + return bytesToHexString(bytes); + } + + public static String decryptByAES(String input, String key) throws Exception { + // 算法 + String algorithm = "AES"; + String transformation = "AES"; + // Cipher:密码,获取加密对象 + // transformation:参数表示使用什么类型加密 + Cipher cipher = Cipher.getInstance(transformation); + // 指定秘钥规则 + // 第一个参数表示:密钥,key的字节数组 长度必须是16位 + // 第二个参数表示:算法 + SecretKeySpec sks = new SecretKeySpec(key.getBytes(), algorithm); + // 对加密进行初始化 + // 第一个参数:表示模式,有加密模式和解密模式 + // 第二个参数:表示秘钥规则 + cipher.init(Cipher.DECRYPT_MODE, sks); + // 进行解密 + byte[] inputBytes = hexStringToBytes(input); + byte[] bytes = cipher.doFinal(inputBytes); + return new String(bytes); + } + + private static byte[] hexStringToBytes(String hexString) { + if (hexString.length() % 2 != 0) throw new IllegalArgumentException("hexString length not valid"); + int length = hexString.length() / 2; + byte[] resultBytes = new byte[length]; + for (int index = 0; index < length; index++) { + String result = hexString.substring(index * 2, index * 2 + 2); + resultBytes[index] = Integer.valueOf(Integer.parseInt(result, 16)).byteValue(); + } + return resultBytes; + } + + private static String bytesToHexString(byte[] sources) { + if (sources == null) return null; + StringBuilder stringBuffer = new StringBuilder(); + for (byte source : sources) { + String result = Integer.toHexString(source & 0xff); + if (result.length() < 2) { + result = "0" + result; + } + stringBuffer.append(result); + } + return stringBuffer.toString(); + } +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.2__create_resident_rotators_tables.sql b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.2__create_resident_rotators_tables.sql new file mode 100644 index 0000000000..e56a702e99 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.2__create_resident_rotators_tables.sql @@ -0,0 +1,135 @@ +CREATE TABLE `ca_resident` ( + `resident_id` bigint(20) DEFAULT NULL COMMENT '人口ID', + `grid_id` bigint(20) DEFAULT NULL COMMENT '网格ID', + `resident_property` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '人口性质', + `resident_type` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '居民分类', + `id_type` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '证件类型', + `id_card` varchar(18) COLLATE utf8_bin DEFAULT NULL COMMENT '证件号码(公民身份证号)', + `resident_name` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '姓名', + `sex` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '性别', + `birthday` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '出生日期', + `nation` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '民族', + `telephone` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '联系方式', + `household_prov` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '户籍省', + `household_city` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '户籍市', + `household_county` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '户籍县(区)', + `household_town` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '户籍镇街', + `household_village` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '户籍社区/村', + `household_address_detail` varchar(200) COLLATE utf8_bin DEFAULT NULL COMMENT '户籍详址', + `curlive_prov` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '现住省', + `curlive_city` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '现住市', + `curlive_county` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '现住县(区)', + `curlive_town` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '现住镇街', + `curlive_village` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '现住社区/村', + `curlive_address_detail` varchar(200) COLLATE utf8_bin DEFAULT NULL COMMENT '现住详址', + `native_address_prov` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '籍贯省', + `native_address_city` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '籍贯市', + `native_address_county` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '籍贯县(区)', + `former_name` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '曾用名', + `education` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '学历', + `occupation` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '职业', + `occupation_type` varchar(50) COLLATE utf8_bin DEFAULT '' COMMENT '职业类别', + `service_address` varchar(200) COLLATE utf8_bin DEFAULT NULL COMMENT '服务处所', + `marriage_status` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '婚姻状况', + `party` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '政治面貌', + `religious` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '宗教信仰', + `conversion_state` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '有无皈依(已受洗)', + `nationality` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '国籍', + `plat_code` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '数据来源', + `create_by` bigint(20) DEFAULT NULL COMMENT '创建人', + `create_date` datetime DEFAULT NULL COMMENT '创建时间', + `update_by` bigint(20) DEFAULT NULL COMMENT '最后修改人', + `update_date` datetime DEFAULT NULL COMMENT '最后修改时间', + `delete_flag` varchar(50) COLLATE utf8_bin DEFAULT 'normal' COMMENT '删除状态', + `versions` int(11) DEFAULT '1' COMMENT '乐观锁', + `attribute1` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '扩展字段1', + `attribute2` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '扩展字段2', + `attribute3` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '扩展字段3', + `attribute4` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '扩展字段4', + `attribute5` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '扩展字段5', + `attribute6` bigint(20) DEFAULT NULL COMMENT '扩展字段6', + `attribute7` bigint(20) DEFAULT NULL COMMENT '扩展字段7', + `attribute8` bigint(20) DEFAULT NULL COMMENT '扩展字段8', + `attribute9` datetime DEFAULT NULL COMMENT '扩展字段9', + `attribute10` datetime DEFAULT NULL COMMENT '扩展字段10', + `home_id` varchar(64) COLLATE utf8_bin DEFAULT NULL COMMENT 'homeId', + `ic_resi_user` varchar(64) COLLATE utf8_bin DEFAULT NULL COMMENT '对应的ic_resi_user主表Id', + KEY `IDX_ID_CARD` (`id_card`) USING BTREE, + KEY `IDX_RESIDENT_ID` (`resident_id`) USING BTREE, + KEY `IDX_GRID_ID` (`grid_id`) USING BTREE, + KEY `IDX_DELETE_FLAG` (`delete_flag`) USING BTREE, + KEY `IDX_RESIDENT_NAME` (`resident_name`) USING BTREE, + KEY `IDX_BIRTHDAY` (`grid_id`,`birthday`) USING BTREE, + KEY `inx_gridDelete` (`grid_id`,`delete_flag`) USING BTREE, + KEY `IDX_UPDATE_DATE` (`update_date`,`create_date`) USING BTREE, + KEY `idx_resident_property` (`resident_property`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='人口基本信息表'; + +CREATE TABLE `ca_rotators` ( + `rotators_id` bigint(20) DEFAULT NULL COMMENT '主键id', + `id_card` varchar(18) COLLATE utf8_bin DEFAULT NULL COMMENT '公民身份证号', + `id_type` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '证件类型', + `rotators_name` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '姓名', + `former_name` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '曾用名', + `sex` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '性别', + `birthday` datetime DEFAULT NULL COMMENT '出生日期', + `nation` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '民族', + `native_address_prov` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '籍贯省', + `native_address_city` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '籍贯市', + `native_address_country` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '籍贯县(区)', + `marriage_status` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '婚姻状况', + `party` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '政治面貌', + `education` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '学历', + `religious` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '宗教信仰', + `occupation_type` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '职业类别', + `occupation` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '职业', + `service_address` varchar(200) COLLATE utf8_bin DEFAULT NULL COMMENT '服务处所', + `telephone` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '联系方式', + `household_address_prov` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '户籍地省', + `household_address_city` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '户籍地市', + `household_address_country` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '户籍地县(区)', + `household_address_town` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '户籍地镇街', + `household_address_village` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '户籍地社区/村', + `household_address_detail` varchar(200) COLLATE utf8_bin DEFAULT NULL COMMENT '户籍门(楼)详址', + `curlive_address_prov` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '现住地省', + `curlive_address_city` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '现住地市', + `curlive_address_country` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '现住地县(区)', + `curlive_address_town` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '现住地镇街', + `curlive_address_village` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '现住地社区/村', + `curlive_address_detail` varchar(200) COLLATE utf8_bin DEFAULT NULL COMMENT '现住门(楼)详址', + `inflow_reason` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '流入原因', + `certificate_type` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '办证类型', + `certificate_number` varchar(30) COLLATE utf8_bin DEFAULT NULL COMMENT '证件号码', + `sign_date` datetime DEFAULT NULL COMMENT '登记日期', + `end_date` datetime DEFAULT NULL COMMENT '证件到期日期', + `residence_type` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '住所类型', + `is_focus_person` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '是否重点关注人员', + `create_by` bigint(20) DEFAULT NULL COMMENT '创建人', + `create_date` datetime DEFAULT NULL COMMENT '创建时间', + `update_by` bigint(20) DEFAULT NULL COMMENT '最后修改人', + `update_date` datetime DEFAULT NULL COMMENT '最后修改时间', + `delete_flag` varchar(10) COLLATE utf8_bin DEFAULT 'normal' COMMENT '删除标识(正常的数据存:normal,逻辑删除的标识为:delete)', + `platcode` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '数据来源编码', + `grid_id` bigint(20) DEFAULT NULL COMMENT '网格id', + `versions` int(11) DEFAULT '1' COMMENT '乐观锁', + `attribute1` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '是否注销', + `attribute2` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '注销原因', + `attribute3` varchar(240) COLLATE utf8_bin DEFAULT NULL, + `attribute4` varchar(240) COLLATE utf8_bin DEFAULT NULL, + `attribute5` varchar(240) COLLATE utf8_bin DEFAULT '', + `attribute6` bigint(20) DEFAULT NULL, + `attribute7` bigint(20) DEFAULT NULL, + `attribute8` bigint(20) DEFAULT NULL, + `attribute9` datetime DEFAULT NULL, + `attribute10` datetime DEFAULT NULL, + `home_id` varchar(64) COLLATE utf8_bin DEFAULT NULL COMMENT 'homeId', + `ic_resi_user` varchar(64) COLLATE utf8_bin DEFAULT NULL COMMENT '对应的ic_resi_user主表Id', + KEY `idx_rotators_id` (`rotators_id`) USING BTREE, + KEY `idx_id_card` (`id_card`) USING BTREE, + KEY `idx_rotators_name` (`rotators_name`) USING BTREE, + KEY `idx_telephone` (`telephone`) USING BTREE, + KEY `IDX_UPDATE_DATE` (`update_date`) USING BTREE, + KEY `idx_rotators_create_date` (`create_date`) USING BTREE, + KEY `idx_data` (`update_date`,`create_date`) USING BTREE, + KEY `idx_platcode` (`platcode`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='流动人口表'; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.3__create_table.sql b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.3__create_table.sql new file mode 100644 index 0000000000..7093472799 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.3__create_table.sql @@ -0,0 +1,141 @@ +CREATE TABLE `ca_loudong` ( + `building_id` bigint(20) DEFAULT NULL COMMENT '楼栋ID', + `building_type` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '楼宇类型', + `grid_id` bigint(50) DEFAULT NULL COMMENT '网格ID', + `building_name` varchar(200) COLLATE utf8_bin DEFAULT NULL COMMENT '楼宇名称', + `building_use` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '用途分类', + `building_status` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '楼宇状态', + `building_structure` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '楼宇结构', + `building_useage` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '使用现状', + `construction_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '建筑时间', + `building_addr` varchar(256) COLLATE utf8_bin DEFAULT NULL COMMENT '所处位置', + `community_name` varchar(200) COLLATE utf8_bin DEFAULT NULL COMMENT '小区(单位)名称', + `building_leader` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '楼栋长', + `layer_count` int(11) DEFAULT NULL COMMENT '楼层数', + `basement_layer_count` int(11) DEFAULT NULL COMMENT '地下楼层数', + `house_begin_layer` int(11) DEFAULT NULL COMMENT '住宅开始层数', + `unit_count` int(11) DEFAULT NULL COMMENT '单元数', + `layer_room_count` int(11) DEFAULT NULL COMMENT '每层每单元户数', + `room_count` int(11) DEFAULT NULL COMMENT '总房屋数', + `elevator_count` varchar(11) COLLATE utf8_bin DEFAULT NULL COMMENT '电梯数量', + `building_area` varchar(20) COLLATE utf8_bin DEFAULT NULL COMMENT '建筑面积', + `building_pmc` varchar(100) COLLATE utf8_bin DEFAULT NULL COMMENT '物业公司', + `building_desc` varchar(1000) COLLATE utf8_bin DEFAULT NULL COMMENT '介绍', + `point_status` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '标绘状态', + `longitude` decimal(10,7) DEFAULT NULL COMMENT '经度', + `latitude` decimal(10,7) DEFAULT NULL COMMENT '纬度', + `plat_code` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '数据来源', + `create_by` bigint(20) DEFAULT NULL COMMENT '创建人', + `create_date` datetime DEFAULT NULL COMMENT '创建时间', + `update_by` bigint(20) DEFAULT NULL COMMENT '最后修改人', + `update_date` datetime DEFAULT NULL COMMENT '最后修改时间', + `delete_flag` varchar(10) COLLATE utf8_bin DEFAULT 'normal' COMMENT '删除状态', + `versions` int(11) DEFAULT '1' COMMENT '乐观锁', + `attribute1` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '扩展字段1', + `attribute2` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '扩展字段2', + `attribute3` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '扩展字段3', + `attribute4` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '扩展字段4', + `attribute5` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '扩展字段5', + `attribute6` bigint(20) DEFAULT NULL COMMENT '小区主键', + `attribute7` bigint(20) DEFAULT NULL COMMENT '扩展字段7', + `attribute8` bigint(20) DEFAULT NULL COMMENT '扩展字段8', + `attribute9` datetime DEFAULT NULL COMMENT '扩展字段9', + `attribute10` datetime DEFAULT NULL COMMENT '扩展字段10', + `community_id` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '小区主键', + KEY `IDX_BUILDING_ID` (`building_id`) USING BTREE, + KEY `idx_building_grid_type` (`building_id`,`building_use`,`delete_flag`) USING BTREE, + KEY `sel_buildingname` (`building_name`) USING BTREE, + KEY `idx_buiding_type` (`building_type`) USING BTREE, + KEY `idx_building_id_flag` (`grid_id`,`delete_flag`,`building_use`) USING BTREE, + KEY `u_createdate` (`update_date`,`create_date`) USING BTREE, + KEY `idx_grid_id` (`grid_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='楼栋基本信息表'; + +CREATE TABLE `ca_pingfang` ( + `building_id` bigint(20) DEFAULT NULL COMMENT '楼栋ID', + `building_type` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '楼宇类型', + `grid_id` bigint(50) DEFAULT NULL COMMENT '网格ID', + `building_name` varchar(200) COLLATE utf8_bin DEFAULT NULL COMMENT '楼宇名称', + `building_use` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '用途分类', + `building_status` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '楼宇状态', + `building_structure` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '楼宇结构', + `building_useage` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '使用现状', + `construction_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '建筑时间', + `building_addr` varchar(256) COLLATE utf8_bin DEFAULT NULL COMMENT '所处位置', + `community_name` varchar(200) COLLATE utf8_bin DEFAULT NULL COMMENT '小区(单位)名称', + `building_leader` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '楼栋长', + `layer_count` int(11) DEFAULT NULL COMMENT '楼层数', + `basement_layer_count` int(11) DEFAULT NULL COMMENT '地下楼层数', + `house_begin_layer` int(11) DEFAULT NULL COMMENT '住宅开始层数', + `unit_count` int(11) DEFAULT NULL COMMENT '单元数', + `layer_room_count` int(11) DEFAULT NULL COMMENT '每层每单元户数', + `room_count` int(11) DEFAULT NULL COMMENT '总房屋数', + `elevator_count` varchar(11) COLLATE utf8_bin DEFAULT NULL COMMENT '电梯数量', + `building_area` varchar(20) COLLATE utf8_bin DEFAULT NULL COMMENT '建筑面积', + `building_pmc` varchar(100) COLLATE utf8_bin DEFAULT NULL COMMENT '物业公司', + `building_desc` varchar(1000) COLLATE utf8_bin DEFAULT NULL COMMENT '介绍', + `point_status` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '标绘状态', + `longitude` decimal(10,7) DEFAULT NULL COMMENT '经度', + `latitude` decimal(10,7) DEFAULT NULL COMMENT '纬度', + `plat_code` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '数据来源', + `create_by` bigint(20) DEFAULT NULL COMMENT '创建人', + `create_date` datetime DEFAULT NULL COMMENT '创建时间', + `update_by` bigint(20) DEFAULT NULL COMMENT '最后修改人', + `update_date` datetime DEFAULT NULL COMMENT '最后修改时间', + `delete_flag` varchar(10) COLLATE utf8_bin DEFAULT 'normal' COMMENT '删除状态', + `versions` int(11) DEFAULT '1' COMMENT '乐观锁', + `attribute1` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '扩展字段1', + `attribute2` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '扩展字段2', + `attribute3` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '扩展字段3', + `attribute4` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '扩展字段4', + `attribute5` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '扩展字段5', + `attribute6` bigint(20) DEFAULT NULL COMMENT '小区主键', + `attribute7` bigint(20) DEFAULT NULL COMMENT '扩展字段7', + `attribute8` bigint(20) DEFAULT NULL COMMENT '扩展字段8', + `attribute9` datetime DEFAULT NULL COMMENT '扩展字段9', + `attribute10` datetime DEFAULT NULL COMMENT '扩展字段10', + `community_id` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '小区主键' +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; + +CREATE TABLE `ca_rental` ( + `rental_id` bigint(20) DEFAULT NULL COMMENT '出租房ID', + `grid_id` bigint(20) DEFAULT NULL COMMENT '网格ID', + `house_id` bigint(20) DEFAULT NULL COMMENT '房屋ID', + `house_name` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '房屋编号', + `house_address` varchar(100) COLLATE utf8_bin DEFAULT NULL COMMENT '房屋地址', + `house_use` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '建筑用途', + `house_area` decimal(20,2) DEFAULT NULL COMMENT '建筑面积(平方米)', + `id_type` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '证件代码', + `id_card` varchar(30) COLLATE utf8_bin DEFAULT NULL COMMENT '证件号码', + `resident_name` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '房主姓名', + `telephone` varchar(20) COLLATE utf8_bin DEFAULT NULL COMMENT '房主联系方式', + `curlive_address` varchar(160) COLLATE utf8_bin DEFAULT NULL COMMENT '房主现居详址', + `rent_use` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '出租用途', + `trouble_type` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '隐患类型', + `renter_id` bigint(20) DEFAULT NULL COMMENT '承租人ID', + `renter_card_number` varchar(18) COLLATE utf8_bin DEFAULT NULL COMMENT '承租人公民身份证号码', + `renter_card_type` bigint(20) DEFAULT NULL COMMENT '承租人证件类型', + `renter_name` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '承租人姓名', + `renter_phone` varchar(20) COLLATE utf8_bin DEFAULT NULL COMMENT '承租人联系方式', + `longitude` decimal(10,7) DEFAULT NULL COMMENT '经度', + `latitude` decimal(10,7) DEFAULT NULL COMMENT '纬度', + `point_status` varchar(10) COLLATE utf8_bin DEFAULT '0' COMMENT '标绘状态', + `plat_code` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '数据来源', + `create_by` bigint(20) DEFAULT NULL COMMENT '创建人', + `create_date` datetime DEFAULT NULL COMMENT '创建时间', + `update_by` bigint(20) DEFAULT NULL COMMENT '最后修改人', + `update_date` datetime DEFAULT NULL COMMENT '最后修改时间', + `delete_flag` varchar(10) COLLATE utf8_bin DEFAULT 'normal' COMMENT '删除状态', + `versions` int(11) unsigned zerofill DEFAULT '00000000001' COMMENT '乐观锁', + `attribute1` varchar(240) COLLATE utf8_bin DEFAULT '' COMMENT '承租单位', + `attribute2` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '承租日期', + `attribute3` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '承租期限', + `attribute4` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '扩展字段4', + `attribute5` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '扩展字段5', + `attribute6` bigint(20) DEFAULT NULL COMMENT '扩展字段6', + `attribute7` bigint(20) DEFAULT NULL COMMENT '扩展字段7', + `attribute8` bigint(20) DEFAULT NULL COMMENT '扩展字段8', + `attribute9` datetime DEFAULT NULL COMMENT '扩展字段9', + `attribute10` datetime DEFAULT NULL COMMENT '扩展字段10' +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='出租房信息表'; + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.4__create_wgh_table.sql b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.4__create_wgh_table.sql new file mode 100644 index 0000000000..c8fb0c832d --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.4__create_wgh_table.sql @@ -0,0 +1,358 @@ +DROP TABLE IF EXISTS `ca_bm_grid`; +CREATE TABLE `ca_bm_grid` ( + `grid_id` bigint(20) NOT NULL COMMENT '网格ID', + `grid_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '网格编码。人工填写,编码规则业务规定,不允许重复。', + `grid_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '网格名称', + `gb_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '行政区划的国标编码', + `parent_id` bigint(20) NULL DEFAULT NULL COMMENT '上级网格ID', + `parent_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '上级网格编码', + `grid_classification` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '网格分类。1基础网格 2环保网格 3防火网格 4城管网格 5执法网格 6安监网格等', + `grid_level` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '网格层级。网格层级表的层级\n根据【网格层级表】的层级关系动态展示。\n查询【网格层级表】层级 条件:上层级=网格树返回的网格层级', + `grid_property` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '网格属性。01村庄、02小区、03企业、04学校(幼儿园)、05医院、06驻镇(街)单位、07其他', + `is_end` char(1) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '是否最后一级:0否 1是', + `grid_address` varchar(200) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '网格地址', + `grid_introduce` varchar(1024) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '网格介绍', + `grid_picture` varchar(240) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '宣传图片', + `regin_scope_desc` varchar(1024) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '地图区域范围', + `grid_sort` int(10) NULL DEFAULT NULL COMMENT '展示顺序', + `point_status` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '标绘状态', + `grid_em_center` bigint(10) NULL DEFAULT NULL COMMENT '事件上报中心', + `grid_begin_time` datetime(0) NULL DEFAULT NULL COMMENT '初始日期', + `grid_end_time` datetime(0) NULL DEFAULT NULL COMMENT '终止日期', + `grid_area` varchar(240) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '面积', + `is_valid` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '1' COMMENT '是否有效', + `create_by` bigint(20) NOT NULL COMMENT '创建人', + `create_date` datetime(0) NOT NULL COMMENT '创建时间', + `update_by` bigint(20) NOT NULL, + `update_date` datetime(0) NOT NULL, + `delete_flag` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT 'normal' COMMENT '删除状态: 字典值:normal正常,删除deleted', + `versions` int(10) NULL DEFAULT 1 COMMENT '乐观锁', + `attribute1` varchar(240) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '网格内人口规模', + `attribute2` varchar(240) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '是否成立网格党支部或网格党小组', + `attribute3` varchar(240) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '网格党组织类型', + `attribute4` varchar(240) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '党组织编码', + `attribute5` varchar(240) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '扩展字段', + `attribute6` bigint(20) NULL DEFAULT NULL COMMENT '扩展字段', + `attribute7` bigint(20) NULL DEFAULT NULL COMMENT '扩展字段', + `attribute8` bigint(20) NULL DEFAULT NULL COMMENT '扩展字段', + `attribute9` datetime(0) NULL DEFAULT NULL COMMENT '扩展字段', + `attribute10` datetime(0) NULL DEFAULT NULL COMMENT '扩展字段', + PRIMARY KEY (`grid_id`) USING BTREE, + INDEX `SELECT_PARENT`(`parent_id`) USING BTREE, + INDEX `idx_grid_grid_id`(`grid_id`) USING BTREE, + INDEX `idx_grid_grid_sort`(`grid_sort`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for wgh_base_grid +-- ---------------------------- +DROP TABLE IF EXISTS `wgh_base_grid`; +CREATE TABLE `wgh_base_grid` ( + `coordinate_info` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL, + `grid_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `sub_district_office` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `community` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `street_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `grid_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `community_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `longitude` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `latitude` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for wgh_community +-- ---------------------------- +DROP TABLE IF EXISTS `wgh_community`; +CREATE TABLE `wgh_community` ( + `coordinate_info` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL, + `street_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `street_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `community_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `community_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `longitude` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `latitude` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for wgh_dywg +-- ---------------------------- +DROP TABLE IF EXISTS `wgh_dywg`; +CREATE TABLE `wgh_dywg` ( + `OBJECTID` int(11) NOT NULL, + `BGNAME` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '网格名称', + `STREET` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属街镇', + `COMMUNITY` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属社区', + `BGSQUA` double NULL DEFAULT NULL COMMENT '网格面积', + `ORDATE` datetime(0) NULL DEFAULT NULL COMMENT '初始时间', + `CHDATE` datetime(0) NULL DEFAULT NULL COMMENT '变更时间', + `NOTE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `CONTACTS` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `TELPHONE` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系电话', + `insert_time` datetime(0) NULL DEFAULT NULL COMMENT '插入日期' +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '单元网格' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for wgh_jdb +-- ---------------------------- +DROP TABLE IF EXISTS `wgh_jdb`; +CREATE TABLE `wgh_jdb` ( + `OBJECTID_1` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `OBJECTID` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `MC` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '街道名称', + `person_in_charge` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '责任人', + `phone` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系电话', + `SHAPE_LENG` double NULL DEFAULT NULL, + `insert_time` datetime(0) NULL DEFAULT NULL COMMENT '插入日期' +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '街道办' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for wgh_jqz +-- ---------------------------- +DROP TABLE IF EXISTS `wgh_jqz`; +CREATE TABLE `wgh_jqz` ( + `OBJECTID` int(11) NULL DEFAULT NULL, + `XH` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '序号', + `NAME` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '单位名称', + `AREA` double NULL DEFAULT NULL, + `SPACE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周边安全间距', + `PROBLEM` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '存在问题', + `TYPE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '危险源类型', + `LOCATION` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '经营地址', + `PRINCIPAL` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '负责人', + `PHONE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系电话', + `QTYPE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '企业类型', + `WTYPE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '危化品种类', + `level` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '等级', + `nature` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '性质', + `remarks` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `DWMCJC` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `LAYER` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `SSJDB` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `AMOUNT` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数量', + `YJCS` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '应急措施', + `insert_time` datetime(0) NULL DEFAULT NULL COMMENT '插入日期' +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '加气站信息' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for wgh_jxcs +-- ---------------------------- +DROP TABLE IF EXISTS `wgh_jxcs`; +CREATE TABLE `wgh_jxcs` ( + `OBJECTID` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `JSON_INFO` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `CREAT_TIME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `SSJD` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '所属街道', + `SSSQ` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '所属社区', + `DLM` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '道路名', + `MPH` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '门牌号', + `NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '名称', + `ZTLX` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `TYPE` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '子类型', + `XYDM` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '统一社会信用代码', + `LXR` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '联系人', + `LXDH` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '联系电话', + `USER_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `BZ` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注', + `AVAILABLE` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `ID` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `USER_ID` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '编辑人ID', + `UPDATE_TIM` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '编辑人姓名', + `INSERT_TIME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '插入日期' +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '九小场所信息' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for wgh_jyz +-- ---------------------------- +DROP TABLE IF EXISTS `wgh_jyz`; +CREATE TABLE `wgh_jyz` ( + `OBJECTID` int(11) NULL DEFAULT NULL, + `XH` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '序号', + `NAME` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '单位名称', + `AREA` double NULL DEFAULT NULL, + `SPACE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周边安全间距', + `PROBLEM` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '存在问题', + `TYPE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '危险源类型', + `LOCATION` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '经营地址', + `PRINCIPAL` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '负责人', + `PHONE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系电话', + `QTYPE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '企业类型', + `WTYPE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '危化品种类', + `level` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '等级', + `nature` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '性质', + `remarks` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `DWMCJC` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `LAYER` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `SSJDB` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `AMOUNT` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数量', + `YJCS` varchar(260) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '应急措施', + `insert_time` datetime(0) NULL DEFAULT NULL COMMENT '插入日期' +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '加油站' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for wgh_sjxxb +-- ---------------------------- +DROP TABLE IF EXISTS `wgh_sjxxb`; +CREATE TABLE `wgh_sjxxb` ( + `OBJECTID_1` int(11) NULL DEFAULT NULL, + `OBJECTID` double NULL DEFAULT NULL, + `INFOSOURCENAME` varchar(700) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '事件来源', + `INFOTYPENAME` varchar(700) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '事件类别', + `COMMUNITYNAME` varchar(700) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '社区名称', + `DESCRIPTION` varchar(700) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '事件描述', + `TASKID` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `CASESN` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `ADDRESS` varchar(700) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '事件地址', + `STATUSNAME` varchar(700) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '事件状态', + `INFOBCNAME` varchar(700) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `INFOSCNAME` varchar(700) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `STREETNAME` varchar(700) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '街道名称', + `DISCOVERTIME` datetime(0) NULL DEFAULT NULL, + `insert_time` datetime(0) NULL DEFAULT NULL COMMENT '插入日期' +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '事件信息' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for wgh_sqxx +-- ---------------------------- +DROP TABLE IF EXISTS `wgh_sqxx`; +CREATE TABLE `wgh_sqxx` ( + `OBJECTID` int(11) NULL DEFAULT NULL, + `COMMUAREA` double NULL DEFAULT NULL, + `BELONGTO` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `CONTACTS` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `TELPHONE` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `number_of_grid` double NULL DEFAULT NULL, + `street_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `community_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `COMMNAME` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `JDCJGB` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `WGZ` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `police_name` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `traffic_police_phone` double NULL DEFAULT NULL, + `traffic_police_company` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `peo_police_name` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `peo_police_phone` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `police_station` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `WGY` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `JDLXKS` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `DDY` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `ZHZFXM` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `ZHZFDH` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `ZHZFBM` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `insert_time` datetime(0) NULL DEFAULT NULL +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for wgh_subdistrict_office +-- ---------------------------- +DROP TABLE IF EXISTS `wgh_subdistrict_office`; +CREATE TABLE `wgh_subdistrict_office` ( + `coordinate_info` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL, + `street_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `street_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `longitude` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `latitude` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for wgh_szcgwgh +-- ---------------------------- +DROP TABLE IF EXISTS `wgh_szcgwgh`; +CREATE TABLE `wgh_szcgwgh` ( + `OBJECTID` int(11) NULL DEFAULT NULL, + `NOTE` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `SSSQ` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `SSJD` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `ID` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `insert_time` datetime(0) NULL DEFAULT NULL +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数字城管网格化信息' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for wgh_szzrwg +-- ---------------------------- +DROP TABLE IF EXISTS `wgh_szzrwg`; +CREATE TABLE `wgh_szzrwg` ( + `OBJECTID` int(11) NULL DEFAULT NULL, + `NOTE` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `NAME` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '责任单位', + `PRINCIPAL` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '监管人', + `PHONE` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系方式', + `insert_time` datetime(0) NULL DEFAULT NULL COMMENT '插入日期' +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '市政责任网格信息' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for wgh_whpdw +-- ---------------------------- +DROP TABLE IF EXISTS `wgh_whpdw`; +CREATE TABLE `wgh_whpdw` ( + `OBJECTID` int(11) NULL DEFAULT NULL, + `XH` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '序号', + `NAME` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '单位名称', + `AREA` double NULL DEFAULT NULL, + `SPACE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周边安全间距', + `PROBLEM` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '存在问题', + `TYPE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '危险源类型', + `LOCATION` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '经营地址', + `PERSON` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '安全负责人', + `PHONE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系电话', + `QTYPE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '企业类型', + `WTYPE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '危化品种类', + `AMOUNT` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数量', + `GRADE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '等级', + `NATRUE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '性质', + `YJCS` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '应急措施', + `NOTE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `DWMCJC` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `PRINCIPAL` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '主要负责人', + `USER` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用途', + `LAYER` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `SSJDB` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `insert_time` timestamp(0) NULL DEFAULT NULL COMMENT '插入日期' +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '危化品单位信息' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for wgh_yjbmcs +-- ---------------------------- +DROP TABLE IF EXISTS `wgh_yjbmcs`; +CREATE TABLE `wgh_yjbmcs` ( + `OBJECTID` int(11) NULL DEFAULT NULL, + `GRADE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `ADRESS` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '地址', + `AREA` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '面积(㎡)', + `RNNS` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '容纳人数', + `SFBSP` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `ZYSBCS` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `FZR` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `ZGDW` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `NAME` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `FZRTEL` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `SSJD` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `INSERT_TIME` timestamp(0) NULL DEFAULT NULL +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '应急避难场所信息' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for wgh_yqhjz +-- ---------------------------- +DROP TABLE IF EXISTS `wgh_yqhjz`; +CREATE TABLE `wgh_yqhjz` ( + `OBJECTID` int(11) NULL DEFAULT NULL, + `XH` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '序号', + `NAME` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '单位名称', + `AREA` double NULL DEFAULT NULL, + `SPACE` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周边安全间距', + `TYPE` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '危险源类型', + `LOCATION` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '经营地址', + `PRINCIPAL` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '负责人', + `PHONE` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系电话', + `QTYPE` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '企业类型', + `WTYPE` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '危化品种类', + `AMOUNT` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数量', + `GRADE` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '等级', + `NATRUE` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '性质', + `YJCS` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '应急措施', + `NOTE` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `DWMCJC` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '简称', + `LAYER` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所在图层', + `SSJDB` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属街道办', + `PROBLEM` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '存在问题', + `insert_time` timestamp(0) NULL DEFAULT NULL COMMENT '插入日期' +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '油气合建站信息' ROW_FORMAT = Dynamic; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.5__create_view.sql b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.5__create_view.sql new file mode 100644 index 0000000000..51ee2dd094 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.5__create_view.sql @@ -0,0 +1,26 @@ +CREATE ALGORITHM = UNDEFINED SQL SECURITY DEFINER VIEW `view_grid_comm_street` AS SELECT +`g4`.`grid_id` AS `grid_id`, +`g4`.`grid_name` AS `grid_name`, +`g3`.`grid_id` AS `community_id`, +`g3`.`grid_name` AS `community_name`, +`g2`.`grid_id` AS `street_id`, +`g2`.`grid_name` AS `street_name`, +concat( `g2`.`grid_id`, ':', `g3`.`grid_id`, ':', `g4`.`grid_id` ) AS `grid_id_path` +FROM + (( + `ca_bm_grid` `g4` + JOIN `ca_bm_grid` `g3` ON ((( + `g3`.`grid_id` = `g4`.`parent_id` + ) + AND ( `g3`.`grid_level` = 'level3' ) + AND ( `g3`.`delete_flag` = 'normal' )))) + JOIN `ca_bm_grid` `g2` ON ((( + `g2`.`grid_id` = `g3`.`parent_id` + ) + AND ( `g2`.`grid_level` = 'level2' ) + AND ( `g2`.`delete_flag` = 'normal' )))) +WHERE + (( + `g4`.`grid_level` = 'level4' + ) + AND ( `g4`.`delete_flag` = 'normal' )) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.6__create_dict_category.sql b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.6__create_dict_category.sql new file mode 100644 index 0000000000..b0e8a1b542 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.6__create_dict_category.sql @@ -0,0 +1,47 @@ +DROP TABLE IF EXISTS `ca_bm_category`; +CREATE TABLE `ca_bm_category` ( + `category_id` bigint(20) NOT NULL COMMENT '类别ID', + `category_name` varchar(100) COLLATE utf8_bin DEFAULT NULL COMMENT '名称', + `category_type` varchar(100) COLLATE utf8_bin DEFAULT NULL, + `category_value` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '名称值', + `parent_category_id` bigint(20) DEFAULT NULL COMMENT '父类别ID', + `category_sort` int(11) DEFAULT NULL COMMENT '展示顺序', + `create_by` bigint(20) DEFAULT NULL COMMENT '创建人', + `create_date` datetime DEFAULT NULL COMMENT '创建时间', + `update_by` bigint(20) DEFAULT NULL COMMENT '最后修改人', + `update_date` datetime DEFAULT NULL COMMENT '最后修改时间', + `delete_flag` varchar(10) COLLATE utf8_bin DEFAULT 'normal' COMMENT '删除状态', + `versions` int(11) DEFAULT '1' COMMENT '乐观锁', + `attribute1` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '扩展字段1', + `attribute2` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '扩展字段2', + `attribute3` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '扩展字段3', + `attribute4` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '扩展字段4', + `attribute5` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '扩展字段5', + `attribute6` bigint(20) DEFAULT NULL COMMENT '扩展字段6', + `attribute7` bigint(20) DEFAULT NULL COMMENT '扩展字段7', + `attribute8` bigint(20) DEFAULT NULL COMMENT '扩展字段8', + `attribute9` datetime DEFAULT NULL COMMENT '扩展字段9', + `attribute10` datetime DEFAULT NULL COMMENT '扩展字段10', + PRIMARY KEY (`category_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='多级类型信息表'; + +DROP TABLE IF EXISTS `ca_sys_dict`; +CREATE TABLE `ca_sys_dict` ( + `dict_id` bigint(20) NOT NULL COMMENT '字典ID', + `dict_value` varchar(50) COLLATE utf8_bin NOT NULL COMMENT '字典值,例如:sex/F', + `dict_label` varchar(50) COLLATE utf8_bin NOT NULL COMMENT '1.字典组名称(性别)或者字典名称(女)', + `dict_type` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '字典值时存入字典的值,字典组时存null', + `dict_desc` varchar(200) COLLATE utf8_bin DEFAULT NULL COMMENT '描述', + `dict_sort` int(10) DEFAULT NULL COMMENT '排序', + `create_by` bigint(20) NOT NULL COMMENT '创建人', + `create_date` datetime NOT NULL COMMENT '创建时间', + `update_by` bigint(20) NOT NULL COMMENT '最后修改人', + `update_date` datetime NOT NULL COMMENT '最后修改时间', + `delete_flag` varchar(10) COLLATE utf8_bin NOT NULL DEFAULT 'normal' COMMENT '字典值:normal正常,deleted正常', + `versions` int(10) DEFAULT '1' COMMENT '乐观锁', + PRIMARY KEY (`dict_id`) USING BTREE, + KEY `idx_dicttype` (`dict_type`) USING BTREE, + KEY `idx_delflag` (`delete_flag`) USING BTREE, + KEY `idx_dictvalue` (`dict_value`) USING BTREE, + KEY `PK_INDEX_VLUE` (`dict_value`,`dict_type`,`delete_flag`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='字典信息表,字典值和字典组均存入此表'; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/logback-spring.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/logback-spring.xml index f985020aa1..9b1c2efa20 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/logback-spring.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/logback-spring.xml @@ -145,12 +145,36 @@ --> + + + + ${log.path}/rocketmqclient.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%X{Transaction-Serial}] %-5level %logger{50} - %msg%n + UTF-8 + + + + ${log.path}/rocketmqclient-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + + + + @@ -164,6 +188,10 @@ + + + + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaBmCategoryDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaBmCategoryDao.xml new file mode 100644 index 0000000000..01d9da165c --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaBmCategoryDao.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete from ca_bm_category + + + + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaLoudongDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaLoudongDao.xml new file mode 100644 index 0000000000..24afdf1451 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaLoudongDao.xml @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete from ca_loudong + + + + + + + + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaPingfangDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaPingfangDao.xml new file mode 100644 index 0000000000..f3c7bb973e --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaPingfangDao.xml @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete from ca_pingfang + + + + + + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRentalDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRentalDao.xml new file mode 100644 index 0000000000..c350e49bb1 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRentalDao.xml @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete from ca_rental + + + + + + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml new file mode 100644 index 0000000000..0f00defec3 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete from ca_resident + + + + + + + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRotatorsDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRotatorsDao.xml new file mode 100644 index 0000000000..0c109d744b --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRotatorsDao.xml @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete from ca_rotators + + + + + + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaSysDictDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaSysDictDao.xml new file mode 100644 index 0000000000..25d1c87ea1 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaSysDictDao.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + delete from ca_sys_dict + + + + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghBaseGridDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghBaseGridDao.xml new file mode 100644 index 0000000000..da9b931654 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghBaseGridDao.xml @@ -0,0 +1,11 @@ + + + + + + + delete from wgh_base_grid + + + + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghCommunityDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghCommunityDao.xml new file mode 100644 index 0000000000..0b843deb67 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghCommunityDao.xml @@ -0,0 +1,12 @@ + + + + + + + + delete from wgh_community + + + + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghDywgDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghDywgDao.xml new file mode 100644 index 0000000000..d5334a8e8a --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghDywgDao.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + delete from wgh_dywg + + + + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghJdbDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghJdbDao.xml new file mode 100644 index 0000000000..c6e6c1a7e8 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghJdbDao.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + delete from wgh_jdb + + + + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghJqzDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghJqzDao.xml new file mode 100644 index 0000000000..a0e0b7a610 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghJqzDao.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete from wgh_jdb + + + + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghJxcsDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghJxcsDao.xml new file mode 100644 index 0000000000..9217f3002c --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghJxcsDao.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete from wgh_jxcs + + + + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghJyzDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghJyzDao.xml new file mode 100644 index 0000000000..2b97665feb --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghJyzDao.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete from wgh_jyz + + + + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSjxxbDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSjxxbDao.xml new file mode 100644 index 0000000000..ea94d5912f --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSjxxbDao.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + delete from wgh_sjxxb + + + + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSqxxDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSqxxDao.xml new file mode 100644 index 0000000000..2987884be1 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSqxxDao.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete from wgh_sqxx + + + + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSubdistrictOfficeDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSubdistrictOfficeDao.xml new file mode 100644 index 0000000000..b34fb0e20e --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSubdistrictOfficeDao.xml @@ -0,0 +1,10 @@ + + + + + + + + delete from wgh_subdistrict_office + + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSzcgwghDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSzcgwghDao.xml new file mode 100644 index 0000000000..adcc9df6f8 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSzcgwghDao.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + delete from wgh_szcgwgh + + + + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSzzrwgDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSzzrwgDao.xml new file mode 100644 index 0000000000..cff4414111 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSzzrwgDao.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + delete from wgh_szzrwg + + + + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghWhpdwDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghWhpdwDao.xml new file mode 100644 index 0000000000..3c5a295dc3 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghWhpdwDao.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete from wgh_whpdw + + + + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghYjbmcsDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghYjbmcsDao.xml new file mode 100644 index 0000000000..2f23df803e --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghYjbmcsDao.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + delete from wgh_yjbmcs + + + + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghYqhjzDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghYqhjzDao.xml new file mode 100644 index 0000000000..c9b26071ee --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghYqhjzDao.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete from wgh_yqhjz + + + + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/caBmGridDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/caBmGridDao.xml new file mode 100644 index 0000000000..2fe689c55c --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/caBmGridDao.xml @@ -0,0 +1,23 @@ + + + + + + + + delete from ca_bm_grid + + + + + diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/ConditionResultDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/ConditionResultDTO.java index 4d0a000b8a..386fffd4d5 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/ConditionResultDTO.java +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/ConditionResultDTO.java @@ -96,5 +96,10 @@ public class ConditionResultDTO implements Serializable { * 这个表 是否支持添加 即是否是多对一 eg:居民需求是多个对一个 */ private boolean supportAdd; + + /** + * 是否为多选 1可以多选,0单选 + */ + private Integer multiSelect; } diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/ResiCategoryStatsConfigController.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/ResiCategoryStatsConfigController.java index 3c2004e714..8d16dfdb23 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/ResiCategoryStatsConfigController.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/ResiCategoryStatsConfigController.java @@ -75,7 +75,6 @@ public class ResiCategoryStatsConfigController { @PostMapping("list") public Result> list(@LoginUser TokenDto tokenDTO,@RequestBody ResiCategoryStatsConfigListFormDTO formDTO){ String customerId = tokenDTO.getCustomerId(); -// String customerId = "123123"; return new Result>().ok(resiCategoryStatsConfigService.list(customerId,formDTO)); } diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/IcFormQueryBuilderEntity.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/IcFormQueryBuilderEntity.java index 22f83887ba..a6940e9499 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/IcFormQueryBuilderEntity.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/IcFormQueryBuilderEntity.java @@ -76,7 +76,12 @@ public class IcFormQueryBuilderEntity extends BaseEpmetEntity { * 手机号:mobile; 身份证:id_card;只能输入数字:num */ private String validType; - + + /** + * 是否为多选 1可以多选,0单选 + */ + private Integer multiSelect; + /** * 排序 */ diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormServiceImpl.java index 6002398fbd..0523b83600 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormServiceImpl.java @@ -175,6 +175,7 @@ public class IcFormServiceImpl extends BaseServiceImpl if (CollectionUtils.isEmpty(itemList)) { return "默认配置错误"; } + String defaultBaseInfoGroupId = "default_0"; //设置ic_form_item itemList.forEach(item -> { item.setId(newPrefixed + item.getId()); @@ -183,7 +184,10 @@ public class IcFormServiceImpl extends BaseServiceImpl item.setAreaCode(areaCode); item.setParentItemId(newPrefixed + item.getParentItemId()); //分组Id 为0 说明不村子分组 则直接不设置 仍然为0 - if (!NumConstant.ZERO_STR.equals(item.getItemGroupId())){ + //基础信息分组id:default_0;默认是客户id_0 + if (defaultBaseInfoGroupId.equals(item.getItemGroupId())) { + item.setItemGroupId(customerId.concat("_0")); + } else { item.setItemGroupId(newPrefixed + item.getItemGroupId()); } String optionSourceValue = item.getOptionSourceValue(); @@ -227,7 +231,12 @@ public class IcFormServiceImpl extends BaseServiceImpl wrapperGroup.eq(IcFormItemGroupEntity::getFormCode, formCode); List groupList = icFormItemGroupDao.selectList(wrapperGroup); groupList.forEach(item -> { - item.setId(newPrefixed + item.getId()); + if (defaultBaseInfoGroupId.equals(item.getId())) { + //基础信息分组id默认客户id_0 + item.setId(customerId.concat("_0")); + } else { + item.setId(newPrefixed + item.getId()); + } item.setCustomerId(customerId); item.setFormId(newFormId); item.setCreatedBy("init_user"); diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/ResiCategoryStatsConfigServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/ResiCategoryStatsConfigServiceImpl.java index e95f209aba..a21534cdce 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/ResiCategoryStatsConfigServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/ResiCategoryStatsConfigServiceImpl.java @@ -81,6 +81,9 @@ public class ResiCategoryStatsConfigServiceImpl implements ResiCategoryStatsConf //2.获取ic_resi_category_stats_config 和 ic_resi_category_warn_config 表中的数据 List statsConfigEntityList = icResiCategoryStatsConfigDao.selectList(new QueryWrapper().lambda().eq(IcResiCategoryStatsConfigEntity::getCustomerId,customerId)); + if (!CollectionUtils.isEmpty(statsConfigEntityList)){ + return icResiCategoryStatsConfigDao.listInfo(customerId,formDTO.getIsWarn(),formDTO.getLevel()); + } List warnConfigEntityList = icResiCategoryWarnConfigDao.selectList(new QueryWrapper().lambda().eq(IcResiCategoryWarnConfigEntity::getCustomerId,customerId)); //3.新增不存在的,删除不在tableColumnMap的 diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.29__radio_default.sql b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.29__radio_default.sql new file mode 100644 index 0000000000..f23b014497 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.29__radio_default.sql @@ -0,0 +1,6 @@ +UPDATE ic_form_item +SET DEFAULT_VALUE = '0',UPDATED_TIME=NOW() +WHERE + ITEM_TYPE = 'radio' + AND DEL_FLAG = '0' + AND ( DEFAULT_VALUE IS NULL OR DEFAULT_VALUE = '' ); diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.30__item_query.sql b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.30__item_query.sql new file mode 100644 index 0000000000..cdf0174eab --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.30__item_query.sql @@ -0,0 +1,2 @@ +alter TABLE ic_form_query_builder add COLUMN `MULTI_SELECT` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1可以多选,0单选,默认0' after VALID_TYPE; + diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/logback-spring.xml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/logback-spring.xml index d809abcfd7..594456d25f 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/resources/logback-spring.xml +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/logback-spring.xml @@ -108,6 +108,25 @@ DENY + + + + ${log.path}/rocketmqclient.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%X{Transaction-Serial}] %-5level %logger{50} - %msg%n + UTF-8 + + + + ${log.path}/rocketmqclient-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + @@ -144,6 +163,10 @@ + + + + @@ -157,6 +180,10 @@ + + + + diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcFormItemDao.xml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcFormItemDao.xml index b58666f21c..20974d2afa 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcFormItemDao.xml +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcFormItemDao.xml @@ -85,7 +85,8 @@ IFNULL(i.PLACEHOLDER,'') as PLACEHOLDER, IFNULL(i.COLUMN_NAME,'')as COLUMN_NAME, b.QUERY_TYPE, - b.FUN_TYPE + b.FUN_TYPE, + b.MULTI_SELECT as multiSelect FROM ic_form_query_builder b inner join ic_form_item i on(i.id=b.FORM_ITEM_ID and i.DEL_FLAG='0') LEFT JOIN ic_form_item_group g ON ( i.ITEM_GROUP_ID = g.id ) diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/logback-spring.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/logback-spring.xml index a496703051..3eb3b4432f 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/logback-spring.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/logback-spring.xml @@ -138,6 +138,26 @@ + + + + ${log.path}/rocketmqclient.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%X{Transaction-Serial}] %-5level %logger{50} - %msg%n + UTF-8 + + + + ${log.path}/rocketmqclient-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + @@ -147,6 +167,10 @@ + + + + @@ -164,6 +188,10 @@ + + + + diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/form/GetParentOrgFormDTO.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/form/GetParentOrgFormDTO.java new file mode 100644 index 0000000000..fa1534fc65 --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/form/GetParentOrgFormDTO.java @@ -0,0 +1,33 @@ +package com.epmet.resi.partymember.dto.partyOrg.form; + +import lombok.Data; + +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +/** + * @program: epmet-cloud + * @description: + * @author: wangtong + * @create: 2022-06-10 16:02 + **/ +@Data +public class GetParentOrgFormDTO implements Serializable { + /** + * 党组织类型 + */ + @NotNull(message = "党组织类型不可为空") + private String partyOrgType; + + /** + * 行政组织 机关ID + */ + @NotNull(message = "行政组织id不可为空") + private String agencyId; + + /** + * 客户Id (customer.id) + */ + private String customerId; + +} diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartyMemberPointDTO.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartyMemberPointDTO.java index 1663f19881..2fb53983a9 100644 --- a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartyMemberPointDTO.java +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartyMemberPointDTO.java @@ -16,10 +16,6 @@ public class IcPartyMemberPointDTO implements Serializable { private static final long serialVersionUID = 1L; - /** - * 唯一标识 - */ - private String id; /** * 客户Id (customer.id) @@ -84,7 +80,7 @@ public class IcPartyMemberPointDTO implements Serializable { /** * 总分 */ - private Integer totalScore; + private Integer totalScore = 0; /** * 删除标识:0.未删除 1.已删除 @@ -116,4 +112,4 @@ public class IcPartyMemberPointDTO implements Serializable { */ private Date updatedTime; -} \ No newline at end of file +} diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/IcPartyMemberFromDTO.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/IcPartyMemberFromDTO.java index 42da9bdf94..5ded6b154c 100644 --- a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/IcPartyMemberFromDTO.java +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/IcPartyMemberFromDTO.java @@ -81,4 +81,5 @@ public class IcPartyMemberFromDTO extends PageFormDTO implements Serializable { */ private String payEndDate; private String year; + private String month; } diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/PartyMemberPointListFormDTO.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/PartyMemberPointListFormDTO.java index 5055126aec..4ca728461e 100644 --- a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/PartyMemberPointListFormDTO.java +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/PartyMemberPointListFormDTO.java @@ -10,10 +10,14 @@ import java.io.Serializable; @Data @AllArgsConstructor @NoArgsConstructor -public class PartyMemberPointListFormDTO extends PageFormDTO implements Serializable { +public class PartyMemberPointListFormDTO implements Serializable { private static final long serialVersionUID = 5659445492756209830L; + private Integer page; + + private Integer limit; + /** * 所属党组织id */ diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/ResiPartyMemberOpenFeignClient.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/ResiPartyMemberOpenFeignClient.java index d88cd797b3..0098acd036 100644 --- a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/ResiPartyMemberOpenFeignClient.java +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/ResiPartyMemberOpenFeignClient.java @@ -1,7 +1,11 @@ package com.epmet.resi.partymember.feign; +import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.dto.result.OptionResultDTO; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; +import com.epmet.resi.partymember.dto.partyOrg.result.BranchlistTreeDTO; import com.epmet.resi.partymember.dto.partymember.IcPartyMemberDTO; import com.epmet.resi.partymember.dto.partymember.PartymemberBaseInfoDTO; import com.epmet.resi.partymember.dto.partymember.PartymemberInfoDTO; @@ -48,18 +52,18 @@ public interface ResiPartyMemberOpenFeignClient { Result addPartyMemberBaseInfo(@RequestBody PartyMemberBaseInfoAddFormDTO formDTO); /** - * @return com.epmet.commons.tools.utils.Result> * @param partyBranchId + * @return com.epmet.commons.tools.utils.Result> * @author yinzuomei - * @description 根据党支部id,查询党员列表 + * @description 根据党支部id, 查询党员列表 * @Date 2020/6/18 10:12 **/ @GetMapping(value = "/resi/partymember/partymemberbaseinfo/listPartyMemberBaseInfo/{partyBranchId}") Result> listPartyMemberBaseInfo(@PathVariable("partyBranchId") String partyBranchId); /** - * @return com.epmet.commons.tools.utils.Result * @param partyMemberId 党员库id主键 + * @return com.epmet.commons.tools.utils.Result * @author yinzuomei * @description 根据党员id查询党员信息 * @Date 2020/6/18 15:30 @@ -68,8 +72,8 @@ public interface ResiPartyMemberOpenFeignClient { Result queryPartyMemberBaseInfoById(@PathVariable("partyMemberId") String partyMemberId); /** - * @return com.epmet.commons.tools.utils.Result * @param formDTO + * @return com.epmet.commons.tools.utils.Result * @author yinzuomei * @description 删除党员 * @Date 2020/6/18 17:57 @@ -78,8 +82,8 @@ public interface ResiPartyMemberOpenFeignClient { Result deltePartyMemberBaseInfo(@RequestBody DelPartyMemberBaseInfoFormDTO formDTO); /** - * @return com.epmet.commons.tools.utils.Result> * @param userIdList + * @return com.epmet.commons.tools.utils.Result> * @author yinzuomei * @description 根据用户id查询认证通过的党员信息 * @Date 2020/7/22 12:14 @@ -88,8 +92,8 @@ public interface ResiPartyMemberOpenFeignClient { Result> queryPartymemberInfoByUserId(@RequestBody List userIdList); /** - * @return com.epmet.commons.tools.utils.Result> * @param gridIdList + * @return com.epmet.commons.tools.utils.Result> * @author zy * @description 根据网格id查询认证通过的党员信息 * @Date 2020/7/22 12:14 @@ -98,22 +102,23 @@ public interface ResiPartyMemberOpenFeignClient { Result> getPartymemberInfoByGridId(@RequestBody List gridIdList); /** - * @Description 根据客户ID查询党员 + * @Description 根据客户ID查询党员 * @Param customerId * @author zxc * @date 2021/9/6 3:54 下午 */ @PostMapping(value = "/resi/partymember/partymemberinfo/getpartymemberinfobycustomerid") - Result> getPartyMemberInfoByCustomerId(@RequestParam("customerId")String customerId); + Result> getPartyMemberInfoByCustomerId(@RequestParam("customerId") String customerId); /** * Desc: 查询网格下是否存在党员审核 true:存在,false:不存在 + * * @param gridId * @author zxc * @date 2022/3/15 4:19 下午 */ @PostMapping("/resi/partymember/partymemberconfirmmanual/audit-reset") - Result partyMemberAuditReset(@RequestParam("gridId")String gridId); + Result partyMemberAuditReset(@RequestParam("gridId") String gridId); /** * @Description 同步党员信息 @@ -124,4 +129,10 @@ public interface ResiPartyMemberOpenFeignClient { */ @PostMapping("/resi/partymember/icPartyMember/icPartyMemberSync") Result icPartyMemberSync(@RequestBody IcPartyMemberDTO dto); + + @PostMapping("/resi/partymember/icPartyMember/getPartyMemberByIdCard") + Result getPartyMemberByIdCard(@RequestBody IcPartyMemberDTO dto); + + @PostMapping("/resi/partymember/icPartyOrg/branchlist") + public Result> branchlist(); } diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/fallback/ResiPartyMemberOpenFeignClientFallback.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/fallback/ResiPartyMemberOpenFeignClientFallback.java index 3a10c64914..57ce87c1e4 100644 --- a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/fallback/ResiPartyMemberOpenFeignClientFallback.java +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/fallback/ResiPartyMemberOpenFeignClientFallback.java @@ -1,8 +1,11 @@ package com.epmet.resi.partymember.feign.fallback; import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.dto.result.OptionResultDTO; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.resi.partymember.dto.partyOrg.result.BranchlistTreeDTO; import com.epmet.resi.partymember.dto.partymember.IcPartyMemberDTO; import com.epmet.resi.partymember.dto.partymember.PartymemberBaseInfoDTO; import com.epmet.resi.partymember.dto.partymember.PartymemberInfoDTO; @@ -88,4 +91,14 @@ public class ResiPartyMemberOpenFeignClientFallback implements ResiPartyMemberOp public Result icPartyMemberSync(IcPartyMemberDTO dto) { return ModuleUtils.feignConError(ServiceConstant.RESI_PARTYMEMBER_SERVER, "icPartyMemberSync", dto); } + + @Override + public Result getPartyMemberByIdCard(IcPartyMemberDTO dto) { + return ModuleUtils.feignConError(ServiceConstant.RESI_PARTYMEMBER_SERVER, "getPartyMemberByIdCard", dto); + } + + @Override + public Result> branchlist() { + return ModuleUtils.feignConError(ServiceConstant.RESI_PARTYMEMBER_SERVER, "branchlist", null); + } } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/controller/IcPartyOrgController.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/controller/IcPartyOrgController.java index c0b0af1144..499c2a1d70 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/controller/IcPartyOrgController.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/controller/IcPartyOrgController.java @@ -14,6 +14,7 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.modules.partyOrg.excel.IcPartyOrgExcel; import com.epmet.modules.partyOrg.service.IcPartyOrgService; import com.epmet.resi.partymember.dto.partyOrg.IcPartyOrgDTO; +import com.epmet.resi.partymember.dto.partyOrg.form.GetParentOrgFormDTO; import com.epmet.resi.partymember.dto.partyOrg.form.PartyOrgTreeListDTO; import com.epmet.resi.partymember.dto.partyOrg.result.BranchlistTreeDTO; import com.epmet.resi.partymember.dto.partyOrg.result.IcPartyOrgTreeDTO; @@ -96,6 +97,19 @@ public class IcPartyOrgController { return icPartyOrgService.getTreelist(formDTO); } + /** + * @describe: 列表搜索党组织树(不包含当前级组织) + * @author wangtong + * @date 2022/6/10 14:20 + * @params [tokenDto, formDTO] + * @return com.epmet.commons.tools.utils.Result> + */ + @GetMapping("getSearchTreelist") + public Result> getSearchTreelist(@LoginUser TokenDto tokenDto,PartyOrgTreeListDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + return icPartyOrgService.getSearchTreelist(formDTO); + } + /** * @describe: 当前登录用户所属行政组织,及下级的党组织(只限支部) * @author wangtong @@ -108,6 +122,19 @@ public class IcPartyOrgController { return icPartyOrgService.branchlist(tokenDto); } - + /** + * @describe: 上级党组织列表 + * @author wangtong + * @date 2022/6/10 15:59 + * @params [tokenDto, formDTO] + * @return com.epmet.commons.tools.utils.Result> + */ + @GetMapping("getParentOrgList") + public Result> getParentOrgList(@LoginUser TokenDto tokenDto, GetParentOrgFormDTO formDTO){ + //效验数据 + ValidatorUtils.validateEntity(formDTO); + formDTO.setCustomerId(tokenDto.getCustomerId()); + return icPartyOrgService.getParentOrgList(formDTO); + } } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/dao/IcPartyOrgDao.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/dao/IcPartyOrgDao.java index 3413e87649..93fa4d8a64 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/dao/IcPartyOrgDao.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/dao/IcPartyOrgDao.java @@ -3,7 +3,6 @@ package com.epmet.modules.partyOrg.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.modules.partyOrg.entity.IcPartyOrgEntity; import com.epmet.resi.partymember.dto.partyOrg.form.PartyOrgTreeListDTO; -import com.epmet.resi.partymember.dto.partyOrg.result.BranchlistTreeDTO; import com.epmet.resi.partymember.dto.partyOrg.result.BranchlistTreeSubDTO; import com.epmet.resi.partymember.dto.partyOrg.result.IcPartyOrgTreeDTO; import org.apache.ibatis.annotations.Mapper; @@ -21,7 +20,7 @@ import java.util.List; public interface IcPartyOrgDao extends BaseDao { /** - * @describe: 获取组织列表 + * @describe: 获取当前及下级组织列表 * @author wangtong * @date 2022/5/17 19:00 * @params [] @@ -75,4 +74,34 @@ public interface IcPartyOrgDao extends BaseDao { * @return java.util.List */ List selectAllBranchByAgencyId(@Param("agencyId") String agencyId, @Param("customerId") String customerId); + + /** + * @describe: 获取下级组织列表 + * @author wangtong + * @date 2022/6/10 14:21 + * @params [formDTO] + * @return java.util.List + */ + List getSearchTreelist(PartyOrgTreeListDTO formDTO); + + /** + * @describe: 获取上级党组织 + * @author wangtong + * @date 2022/6/10 16:48 + * @params [agencyPid, customerId, code] + * @return java.util.List + */ + List selectParentOrgByAgencyPid(@Param("agencyId") String agencyId, + @Param("agencyPid") String agencyPid, + @Param("customerId") String customerId, + @Param("partyOrgType") String partyOrgType); + + /** + * @describe: 查询该客户下的一级组织 + * @author wangtong + * @date 2022/6/10 17:29 + * @params [customerId] + * @return com.epmet.modules.partyOrg.entity.IcPartyOrgEntity + */ + IcPartyOrgEntity selectByCustomerIdAndFirstOrg(@Param("customerId") String customerId); } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/IcPartyOrgService.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/IcPartyOrgService.java index 5405a5b531..6397916cc6 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/IcPartyOrgService.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/IcPartyOrgService.java @@ -6,6 +6,7 @@ import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.modules.partyOrg.entity.IcPartyOrgEntity; import com.epmet.resi.partymember.dto.partyOrg.IcPartyOrgDTO; +import com.epmet.resi.partymember.dto.partyOrg.form.GetParentOrgFormDTO; import com.epmet.resi.partymember.dto.partyOrg.form.PartyOrgTreeListDTO; import com.epmet.resi.partymember.dto.partyOrg.result.BranchlistTreeDTO; import com.epmet.resi.partymember.dto.partyOrg.result.IcPartyOrgTreeDTO; @@ -98,4 +99,22 @@ public interface IcPartyOrgService extends BaseService { * @return com.epmet.commons.tools.utils.Result */ Result> branchlist(TokenDto tokenDto); + + /** + * @describe: 列表搜索党组织树(不包含当前级组织) + * @author wangtong + * @date 2022/6/10 14:20 + * @params [formDTO] + * @return com.epmet.commons.tools.utils.Result> + */ + Result> getSearchTreelist(PartyOrgTreeListDTO formDTO); + + /** + * @describe: 上级党组织列表 + * @author wangtong + * @date 2022/6/10 16:01 + * @params [formDTO] + * @return com.epmet.commons.tools.utils.Result> + */ + Result> getParentOrgList(GetParentOrgFormDTO formDTO); } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyOrgServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyOrgServiceImpl.java index b0925ffd7d..70cb443864 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyOrgServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyOrgServiceImpl.java @@ -6,6 +6,7 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.enums.PartyOrgTypeEnum; +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; @@ -14,15 +15,19 @@ import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; 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.dto.CustomerAgencyDTO; import com.epmet.enums.OrgLevelEnums; +import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.modules.partyOrg.dao.IcPartyOrgDao; import com.epmet.modules.partyOrg.entity.IcPartyOrgEntity; import com.epmet.modules.partyOrg.service.IcPartyOrgService; import com.epmet.modules.partymember.dao.IcPartyMemberDao; import com.epmet.modules.partymember.entity.IcPartyMemberEntity; import com.epmet.resi.partymember.dto.partyOrg.IcPartyOrgDTO; +import com.epmet.resi.partymember.dto.partyOrg.form.GetParentOrgFormDTO; import com.epmet.resi.partymember.dto.partyOrg.form.PartyOrgTreeListDTO; import com.epmet.resi.partymember.dto.partyOrg.result.BranchlistTreeDTO; +import com.epmet.resi.partymember.dto.partyOrg.result.BranchlistTreeSubDTO; import com.epmet.resi.partymember.dto.partyOrg.result.IcPartyOrgTreeDTO; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -47,6 +52,9 @@ public class IcPartyOrgServiceImpl extends BaseServiceImpl page(Map params) { @@ -64,8 +72,8 @@ public class IcPartyOrgServiceImpl extends BaseServiceImpl getWrapper(Map params){ - String id = (String)params.get(FieldConstant.ID_HUMP); + 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); @@ -83,47 +91,47 @@ public class IcPartyOrgServiceImpl extends BaseServiceImpl orgList = baseDao.selectAllByOrgId(id); - if(!CollectionUtils.isEmpty(orgList)){ + if (!CollectionUtils.isEmpty(orgList)) { throw new EpmetException("请先删除下级党组织!"); } //判断该组织下是否有党员 List memberList = icPartyMemberDao.selectAllByOrgId(id); - if(!CollectionUtils.isEmpty(memberList)){ + if (!CollectionUtils.isEmpty(memberList)) { throw new EpmetException("该组织下有党员信息暂时不可删除!"); } baseDao.deleteById(id); @@ -214,17 +222,54 @@ public class IcPartyOrgServiceImpl extends BaseServiceImpl> branchlist(TokenDto tokenDto) { - CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(),tokenDto.getUserId()); + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId()); List resultList = new ArrayList<>(); BranchlistTreeDTO result = new BranchlistTreeDTO(); result.setValue(staffInfo.getAgencyId()); // result.setOrgPids(staffInfo.getAgencyPIds()); result.setLabel(staffInfo.getAgencyName()); - result.setChildren(baseDao.selectAllBranchByAgencyId(staffInfo.getAgencyId(),tokenDto.getCustomerId())); + //该行政组织下的所有类型为支部的党组织 + List orgList = baseDao.selectAllBranchByAgencyId(staffInfo.getAgencyId(), tokenDto.getCustomerId()); + if (CollectionUtils.isEmpty(orgList)) { + return new Result>().ok(resultList); + } + result.setChildren(orgList); resultList.add(result); return new Result>().ok(resultList); } + @Override + public Result> getSearchTreelist(PartyOrgTreeListDTO formDTO) { + List list = baseDao.getSearchTreelist(formDTO); + return new Result>().ok(build(list)); + } + + @Override + public Result> getParentOrgList(GetParentOrgFormDTO formDTO) { + Result agencyDTOResult = govOrgOpenFeignClient.getAgencyById(formDTO.getAgencyId()); + if (!agencyDTOResult.success() || null == agencyDTOResult || null == agencyDTOResult.getData()) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "查询行政组织信息错误", "查询行政组织信息错误"); + } + String agencyPid = agencyDTOResult.getData().getPid(); + List list = new ArrayList<>(); + //如果本工作人员的级别是该客户下的最高级别,并且没有一级组织时,添加一级组织选项 + IcPartyOrgEntity entity = baseDao.selectByCustomerIdAndFirstOrg(formDTO.getCustomerId()); + if("0".equals(agencyPid) && null == entity){ + IcPartyOrgTreeDTO firstOrg = new IcPartyOrgTreeDTO(); + firstOrg.setId("0"); + firstOrg.setPartyOrgName("一级组织"); + list.add(firstOrg); + } + //如果类型为支部,则查询该行政组织下的所有党委(列表) + if(PartyOrgTypeEnum.BRANCH.getCode().equals(formDTO.getPartyOrgType())){ + list.addAll(baseDao.selectParentOrgByAgencyPid(formDTO.getAgencyId(),null,formDTO.getCustomerId(),PartyOrgTypeEnum.PARTY.getCode())); + }else{ + //查询该行政组织对应上级所关联的党组织(单个实体类) + list.addAll(baseDao.selectParentOrgByAgencyPid(null,agencyPid,formDTO.getCustomerId(),null)); + } + return new Result>().ok(list); + } + /** * 构建树节点 */ @@ -233,13 +278,13 @@ public class IcPartyOrgServiceImpl extends BaseServiceImpl nodeMap = new LinkedHashMap<>(treeNodes.size()); - for(IcPartyOrgTreeDTO treeNode : treeNodes){ + for (IcPartyOrgTreeDTO treeNode : treeNodes) { nodeMap.put(treeNode.getId(), treeNode); } - for(IcPartyOrgTreeDTO node : nodeMap.values()) { + for (IcPartyOrgTreeDTO node : nodeMap.values()) { IcPartyOrgTreeDTO parent = nodeMap.get(node.getPid()); - if(parent != null && !(node.getId().equals(parent.getId()))){ + if (parent != null && !(node.getId().equals(parent.getId()))) { parent.getChildren().add(node); continue; } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberController.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberController.java index 3390d45acc..a1fdca4c49 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberController.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberController.java @@ -112,6 +112,12 @@ public class IcPartyMemberController implements ResultDataResolver { return new Result(); } + @PostMapping("getPartyMemberByIdCard") + public Result getPartyMemberByIdCard(@RequestBody IcPartyMemberDTO dto){ + IcPartyMemberDTO result = icPartyMemberService.getPartyMemberByIdCard(dto); + return new Result().ok(result); + } + @NoRepeatSubmit @PostMapping("export") public void export(@LoginUser TokenDto tokenDto, @RequestBody IcPartyMemberFromDTO formDTO, HttpServletResponse response) throws Exception { diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberPayRecordDetailController.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberPayRecordDetailController.java index 4c095ac243..68b1b5248b 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberPayRecordDetailController.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberPayRecordDetailController.java @@ -52,6 +52,7 @@ public class IcPartyMemberPayRecordDetailController { @RequestMapping("page") public Result> page(@LoginUser TokenDto tokenDto, @RequestParam Map params){ params.put("customerId",tokenDto.getCustomerId()); + params.put("userId",tokenDto.getUserId()); // PageData page = icPartyMemberPayRecordDetailService.page(params); PageData page = icPartyMemberPayRecordDetailService.getPhrasePage(params); return new Result>().ok(page); diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberPointController.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberPointController.java index 5d32013fbb..7d111cfa92 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberPointController.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberPointController.java @@ -105,8 +105,8 @@ public class IcPartyMemberPointController { @PostMapping("export") public void export(@RequestBody PartyMemberPointListFormDTO formDto, @LoginUser TokenDto tokenDto, HttpServletResponse response) throws Exception { - formDto.setIsPage(false); - formDto.setPageSize(NumConstant.TEN_THOUSAND); + + formDto.setLimit(NumConstant.TEN_THOUSAND); ExcelWriter excelWriter = null; AtomicInteger i = new AtomicInteger(1); @@ -123,8 +123,8 @@ public class IcPartyMemberPointController { item.setIndex(i.getAndIncrement()); }); excelWriter.write(list, writeSheet); - formDto.setPageNo(formDto.getPageNo() + NumConstant.ONE); - } while (CollectionUtils.isNotEmpty(page.getList()) && page.getList().size() == formDto.getPageSize()); + formDto.setPage(formDto.getPage() + NumConstant.ONE); + } while (CollectionUtils.isNotEmpty(page.getList()) && page.getList().size() == formDto.getLimit()); } catch (EpmetException e) { response.reset(); response.setCharacterEncoding("UTF-8"); diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcPartyMemberPointDao.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcPartyMemberPointDao.java index f7a36ea435..ed745c2b90 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcPartyMemberPointDao.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcPartyMemberPointDao.java @@ -42,4 +42,11 @@ public interface IcPartyMemberPointDao extends BaseDao @Param("customerId") String customerId); void updateMember(@Param("partyMemberId") String partyMemberId, @Param("totalScore") Integer totalScore); -} \ No newline at end of file + + int getPoint(@Param("year") String year, + @Param("quarter") String quarter, + @Param("customerId") String customerId, + @Param("partyMemberId") String partyMemberId); + + void updateByPartyMemberId(@Param("entity") IcPartyMemberPointEntity entity); +} diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartyMemberPointService.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartyMemberPointService.java index 701ce482aa..026c402318 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartyMemberPointService.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartyMemberPointService.java @@ -114,4 +114,4 @@ public interface IcPartyMemberPointService extends BaseService getExport(PartyMemberPointListFormDTO form, TokenDto tokenDto); -} \ No newline at end of file +} diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartyMemberService.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartyMemberService.java index 0d84d90723..20373c3ca5 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartyMemberService.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartyMemberService.java @@ -85,6 +85,16 @@ public interface IcPartyMemberService extends BaseService { */ void delete(String[] ids); + /** + * 根据身份证获取党员信息 + * + * @Param dto + * @Return {@link IcPartyMemberDTO} + * @Author zhaoqifeng + * @Date 2022/6/9 10:07 + */ + IcPartyMemberDTO getPartyMemberByIdCard(IcPartyMemberDTO dto); + /** * 党员信息同步 * diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPayRecordDetailServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPayRecordDetailServiceImpl.java index fb1d15b57e..ba21b74d5c 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPayRecordDetailServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPayRecordDetailServiceImpl.java @@ -4,30 +4,29 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; -import com.epmet.commons.tools.constant.StrConstant; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; +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.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.modules.partyOrg.dao.IcPartyOrgDao; +import com.epmet.modules.partyOrg.entity.IcPartyOrgEntity; import com.epmet.modules.partymember.dao.IcPartyMemberPayRecordDetailDao; import com.epmet.modules.partymember.entity.IcPartyMemberPayRecordDetailEntity; -import com.epmet.modules.partymember.entity.IcPartymemberStyleCategoryDictEntity; -import com.epmet.modules.partymember.entity.IcPartymemberStyleEntity; import com.epmet.modules.partymember.redis.IcPartyMemberPayRecordDetailRedis; import com.epmet.modules.partymember.service.IcPartyMemberPayRecordDetailService; import com.epmet.resi.partymember.dto.partymember.IcPartyMemberPayRecordDetailDTO; -import com.epmet.resi.partymember.dto.partymember.IcPartymemberStyleDTO; -import com.epmet.resi.partymember.dto.partymember.form.IcPartyMemberPayRecordDetailFormDTO; -import com.epmet.resi.partymember.dto.partymember.form.PartyMemberStyleFormDTO; -import com.github.pagehelper.PageHelper; -import com.github.pagehelper.PageInfo; 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 javax.annotation.Resource; import java.util.Arrays; +import java.util.Collections; import java.util.List; import java.util.Map; @@ -42,6 +41,8 @@ public class IcPartyMemberPayRecordDetailServiceImpl extends BaseServiceImpl page(Map params) { @@ -59,6 +60,25 @@ public class IcPartyMemberPayRecordDetailServiceImpl extends BaseServiceImpl getPhrasePage(Map params) { + String customerId = (String) params.get("customerId"); + String userId = (String) params.get("userId"); + String orgId = (String) params.get("orgId"); + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, userId); + if (null == staffInfo) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取工作人员信息失败", "获取工作人员信息失败"); + } + if (StringUtils.isBlank(orgId)) { + //获取工作人员所属组织同级的党组织 + LambdaQueryWrapper orgWrapper = new LambdaQueryWrapper<>(); + orgWrapper.eq(IcPartyOrgEntity::getCustomerId, customerId); + orgWrapper.eq(IcPartyOrgEntity::getAgencyId, staffInfo.getAgencyId()); + orgWrapper.ne(IcPartyOrgEntity::getPartyOrgType, NumConstant.FIVE_STR); + IcPartyOrgEntity org = icPartyOrgDao.selectOne(orgWrapper); + if (null == org) { + return new PageData<>(Collections.emptyList(), 0); + } + params.put("orgId",org.getId()); + } IPage page = getPage(params); List list = baseDao.selectListInfo(params); return new PageData<>(list, page.getTotal()); diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java index cc644274f7..e52fe10436 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java @@ -14,13 +14,9 @@ import com.epmet.modules.partymember.entity.IcPartyMemberPointEntity; import com.epmet.modules.partymember.redis.IcPartyMemberPointRedis; import com.epmet.modules.partymember.service.IcPartyMemberPointService; import com.epmet.resi.partymember.dto.partymember.IcPartyMemberPointDTO; -import com.epmet.resi.partymember.dto.partymember.PartyMemberPointListCountDTO; -import com.epmet.resi.partymember.dto.partymember.form.PartyMemberExportFormDTO; import com.epmet.resi.partymember.dto.partymember.form.PartyMemberPointEchoFormDTO; import com.epmet.resi.partymember.dto.partymember.form.PartyMemberPointListFormDTO; -import com.epmet.resi.partymember.dto.partymember.result.IcPartyMemberResultDTO; import com.epmet.resi.partymember.dto.partymember.result.PartyMemberPointEchoResultDTO; -import com.epmet.resi.partymember.dto.partymember.result.PartyMemberPointExportResultDTO; import com.epmet.resi.partymember.dto.partymember.result.PartyMemberPointListResultDTO; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; @@ -29,10 +25,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.sql.Time; import java.time.Year; import java.util.Arrays; -import java.util.Calendar; import java.util.List; import java.util.Map; @@ -82,14 +76,27 @@ public class IcPartyMemberPointServiceImpl extends BaseServiceImpl 0) { - dto.setTotalScore(dto.getTotalScore() - dto.getWarnPoint()); + if (dto.getWarnPoint() != null) { + if (dto.getWarnPoint() > 0) { + dto.setTotalScore(dto.getTotalScore() - dto.getWarnPoint()); + } else { + dto.setTotalScore(dto.getTotalScore() + dto.getWarnPoint()); + } } else { - dto.setTotalScore(dto.getTotalScore() + dto.getWarnPoint()); + dto.setWarnPoint(NumConstant.ZERO); } IcPartyMemberPointEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyMemberPointEntity.class); - if(dto.getYear().equals(Year.now().toString())){ + if (dto.getYear().equals(Year.now().toString())) { baseDao.updateMember(dto.getPartyMemberId(), dto.getTotalScore()); } insert(entity); @@ -98,17 +105,35 @@ public class IcPartyMemberPointServiceImpl extends BaseServiceImpl 0) { - dto.setTotalScore(dto.getTotalScore() - dto.getWarnPoint()); + if (baseDao.getPoint(dto.getYear(), dto.getQuarter(), dto.getCustomerId(), dto.getPartyMemberId()) != NumConstant.ZERO) { + if (dto.getBasePoint() == null) { + dto.setBasePoint(NumConstant.ZERO); + } + if (dto.getReviewPoint() == null) { + dto.setReviewPoint(NumConstant.ZERO); + } + if (dto.getInspirePoint() == null) { + dto.setInspirePoint(NumConstant.ZERO); + } + dto.setTotalScore(dto.getBasePoint() + dto.getInspirePoint() + dto.getReviewPoint()); + if (dto.getWarnPoint() != null) { + if (dto.getWarnPoint() > 0) { + dto.setTotalScore(dto.getTotalScore() - dto.getWarnPoint()); + } else { + dto.setTotalScore(dto.getTotalScore() + dto.getWarnPoint()); + } + } else { + dto.setWarnPoint(NumConstant.ZERO); + } + IcPartyMemberPointEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyMemberPointEntity.class); + if (dto.getYear().equals(Year.now().toString())) { + baseDao.updateMember(dto.getPartyMemberId(), dto.getTotalScore()); + } + baseDao.updateByPartyMemberId(entity); } else { - dto.setTotalScore(dto.getTotalScore() + dto.getWarnPoint()); + save(dto); } - IcPartyMemberPointEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyMemberPointEntity.class); - if(dto.getYear().equals(Year.now().toString())){ - baseDao.updateMember(dto.getPartyMemberId(), dto.getTotalScore()); - } - updateById(entity); + } @Override @@ -129,7 +154,7 @@ public class IcPartyMemberPointServiceImpl extends BaseServiceImpl getList(PartyMemberPointListFormDTO form, TokenDto tokenDto) { - PageHelper.startPage(form.getPageNo(), form.getPageSize(), form.getIsPage()); + PageHelper.startPage(form.getPage(), form.getLimit()); List dto = baseDao.getList(form.getIdCard(), form.getMobile(), form.getName(), form.getOrgId(), form.getYear(), tokenDto.getCustomerId()); PageInfo pageInfo = new PageInfo<>(dto); @@ -160,7 +185,7 @@ public class IcPartyMemberPointServiceImpl extends BaseServiceImpl getExport(PartyMemberPointListFormDTO form, TokenDto tokenDto) { - PageHelper.startPage(form.getPageNo(), form.getPageSize(), form.getIsPage()); + PageHelper.startPage(form.getPage(), form.getLimit()); List dto = baseDao.getList(form.getIdCard(), form.getMobile(), form.getName(), form.getOrgId(), form.getYear(), tokenDto.getCustomerId()); PageInfo pageInfo = new PageInfo<>(dto); @@ -168,4 +193,4 @@ public class IcPartyMemberPointServiceImpl extends BaseServiceImpl list = baseDao.selectList(formDTO); @@ -331,6 +333,24 @@ public class IcPartyMemberServiceImpl extends BaseServiceImpl wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcPartyMemberEntity::getCustomerId, dto.getCustomerId()); + wrapper.eq(IcPartyMemberEntity::getIdCard, dto.getIdCard()); + IcPartyMemberEntity partyMember = baseDao.selectOne(wrapper); + return ConvertUtils.sourceToTarget(partyMember, IcPartyMemberDTO.class); + } + /** * 党员信息同步 * @@ -361,6 +381,21 @@ public class IcPartyMemberServiceImpl extends BaseServiceImpl= 70) { + entity.setIsMxx(NumConstant.ONE_STR); + } else { + entity.setIsMxx(NumConstant.ZERO_STR); + } + if (StringUtils.isBlank(entity.getIsLd())) { + entity.setIsLd(NumConstant.ZERO_STR); + } + if (StringUtils.isBlank(entity.getIsDyzxh())) { + entity.setIsDyzxh(NumConstant.ZERO_STR); + } + if (StringUtils.isBlank(entity.getIsTx())) { + entity.setIsTx(NumConstant.ZERO_STR); + } //判断党员是否已存在,有则更新,没有则添加 if (null != partyMember) { diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyOrg/IcPartyOrgDao.xml b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyOrg/IcPartyOrgDao.xml index 34f4cc1a79..1af1738da2 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyOrg/IcPartyOrgDao.xml +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyOrg/IcPartyOrgDao.xml @@ -96,6 +96,55 @@ AND (AGENCY_ID = #{agencyId} or AGENCY_PIDS LIKE concat('%',#{agencyId}, '%' )) + + + 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 3876ddf432..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/CollectListFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CollectListFormDTO.java index decce16f25..99957503cf 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CollectListFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CollectListFormDTO.java @@ -24,6 +24,10 @@ public class CollectListFormDTO extends PageFormDTO { */ private String startDate; private String endDate; + /** + * 户籍所在地 + */ + private String domicilePlace; private String userId; private String customerId; diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiCollectMemFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiCollectMemFormDTO.java index 12aff48466..7e7cb6e846 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiCollectMemFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiCollectMemFormDTO.java @@ -49,11 +49,26 @@ public class IcResiCollectMemFormDTO implements Serializable { */ private String domicilePlace; + /** + * 户籍所在地行政地区编码 + */ + private String domicilePlaceCode; + + /** + * 户籍所在地行政地区编码全路径,包含自己,英文逗号隔开例如:37,3702,370203 + */ + private String domicilePlaceCodePath; + /** * 学校或公司 */ private String workPlace; + /** + * 备注 + */ + private String remark; + /** * 社区居民信息登记-查询返参用 */ diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ResiCollectFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ResiCollectFormDTO.java index 9778cb6a17..75bc3b1c69 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ResiCollectFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ResiCollectFormDTO.java @@ -86,9 +86,9 @@ public class ResiCollectFormDTO implements Serializable { private String address; /** - * 1自有0租住 + * 房屋状态与ic_house表的RENT_FLAG一致取值1:出租 0:自住 2:闲置 3:未售出 */ - @NotBlank(message = "房子属于自有还是租住?", groups = {InternalShowGroup.class}) + @NotBlank(message = "房子状态不能为空", groups = {InternalShowGroup.class}) private String houseType; /** diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/UserChartFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/UserChartFormDTO.java index 14675f3046..ff71263f95 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/UserChartFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/UserChartFormDTO.java @@ -29,5 +29,9 @@ public class UserChartFormDTO implements Serializable { //token这信息 private String customerId; private String userId; + //无效组织Id集合 + private List agencyIdList; + //无效网格Id集合 + private List gridIdList; } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListExcelResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListExcelResultDTO.java index b98e4489bd..04a34bb814 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListExcelResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListExcelResultDTO.java @@ -31,8 +31,9 @@ public class CollectListExcelResultDTO implements Serializable { /** * 房屋类型,1:自有, 0:租住 + * 房屋状态1:出租 0:自住 2:闲置 3:未售出 */ - @Excel(name = "房屋类型",replace = { "自有_1", "租住_0"}, width = 30, needMerge = true) + @Excel(name = "房屋状态",replace = { "出租_1", "自住_0","闲置_2","未售出_3"}, width = 30, needMerge = true) private String houseType; /** diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListMemberExcelResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListMemberExcelResultDTO.java index 34efe5d146..85208ba924 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListMemberExcelResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListMemberExcelResultDTO.java @@ -56,4 +56,10 @@ public class CollectListMemberExcelResultDTO implements Serializable { */ @Excel(name = "单位或学校", width = 60) private String workPlace; + + /** + * 备注 + */ + @Excel(name = "备注", width = 60) + private String remark; } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListResultDTO.java index f4bd2a1886..0fcaa480d4 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListResultDTO.java @@ -1,5 +1,6 @@ package com.epmet.dto.result; +import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; @@ -38,6 +39,8 @@ public class CollectListResultDTO implements Serializable { */ private Integer totalResi; + private String domicilePlace; + private List list; @@ -73,10 +76,24 @@ public class CollectListResultDTO implements Serializable { */ private String domicilePlace; + /** + * 户籍所在地行政地区编码 + */ + private String domicilePlaceCode; + + /** + * 户籍所在地行政地区编码全路径,包含自己,英文逗号隔开例如:37,3702,370203 + */ + private String domicilePlaceCodePath; + /** * 学校或公司 */ private String workPlace; + /** + * 备注 + */ + private String remark; } } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/GovStaffRoleTemplateDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/GovStaffRoleTemplateDTO.java index bbdba74e4b..0cd96df6cf 100755 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/GovStaffRoleTemplateDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/GovStaffRoleTemplateDTO.java @@ -67,7 +67,7 @@ public class GovStaffRoleTemplateDTO implements Serializable { /** * 排序 */ - private String sort; + private Integer sort; /** * 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 new file mode 100644 index 0000000000..97cc70ea11 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcUserRoleResultDTO.java @@ -0,0 +1,27 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; +import java.util.Map; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2022/5/31 9:44 + */ +@Data +public class IcUserRoleResultDTO implements Serializable { + private static final long serialVersionUID = 6755574567711827403L; + /** + * 是否是志愿者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 2071c9f904..90b0359881 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 @@ -2,6 +2,7 @@ package com.epmet.feign; import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.dto.result.OptionDataResultDTO; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.*; @@ -809,4 +810,10 @@ public interface EpmetUserOpenFeignClient { @PostMapping("/epmetuser/myHome/homeInfo") Result getHomeInfo(); + + @PostMapping("/epmetuser/icresiuser/getVolunteerList") + Result> getVolunteerList(@RequestBody IcResiUserDTO formDTO); + + @PostMapping("/epmetuser/icresiuser/getUserId/{icUserId}") + Result> getUserId(@PathVariable("icUserId") String icUserId); } 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 23554e16d4..55083de3a2 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 @@ -1,6 +1,7 @@ package com.epmet.feign.fallback; import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.dto.result.OptionDataResultDTO; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.Result; @@ -600,4 +601,14 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getHomeInfo"); } + @Override + public Result> getVolunteerList(IcResiUserDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getVolunteerList", formDTO); + } + + @Override + public Result> getUserId(String icUserId) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getUserId", icUserId); + } + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java index 284d4f691c..8e9e6a41c7 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java @@ -53,6 +53,7 @@ import com.epmet.constants.ImportTaskConstants; import com.epmet.dto.IcResiUserDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.enums.IcResiUserTableEnum; import com.epmet.excel.PartyMemberAgeExportExcel; import com.epmet.excel.PartyMemberEducationExportExcel; @@ -1147,4 +1148,44 @@ public class IcResiUserController implements ResultDataResolver { formDTO.setCustomerId(tokenDto.getCustomerId()); return new Result().ok(icResiUserService.getUserByIdCard(formDTO)); } + + /** + * 根据身份证获取居民角色(目前只有是否是志愿者) + * @Param tokenDto + * @Param formDTO + * @Return {@link Result} + * @Author zhaoqifeng + * @Date 2022/5/31 9:47 + */ + @PostMapping("getUserRoleByIdCard") + public Result getUserRoleByIdCard(@LoginUser TokenDto tokenDto, @RequestBody IcResiUserDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + return new Result().ok(icResiUserService.getUserRoleByIdCard(formDTO)); + } + + /** + * 获取组织下的志愿者 + * + * @Param formDTO + * @Return {@link Result>} + * @Author zhaoqifeng + * @Date 2022/6/16 15:22 + */ + @PostMapping("getVolunteerList") + public Result> getVolunteerList(@RequestBody IcResiUserDTO formDTO) { + return new Result>().ok(icResiUserService.getVolunteerList(formDTO.getCustomerId(), formDTO.getAgencyId())); + } + + /** + * 获取居民信息对应的居民用户ID + * + * @Param icUserId + * @Return {@link Result>} + * @Author zhaoqifeng + * @Date 2022/6/16 15:40 + */ + @PostMapping("getUserId/{icUserId}") + public Result> getUserId(@PathVariable("icUserId") String icUserId) { + return new Result>().ok(icResiUserService.getUserId(icUserId)); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiCollectDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiCollectDao.java index 547ef63ca8..db8eb3db7c 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiCollectDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiCollectDao.java @@ -34,6 +34,8 @@ public interface IcResiCollectDao extends BaseDao { */ List getCollectList(CollectListFormDTO formDTO); + List selectMemberList(@Param("id") String id, @Param("domicilePlace") String domicilePlace); + /** * 我上次提交的主表记录 * @param customerId 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 79b2b57f0c..f145fadd97 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 @@ -52,6 +52,12 @@ public interface IcResiUserDao extends BaseDao { **/ void add(@Param("tableName") String tableName, @Param("map") Map map); + /** + * @Author sun + * @Description 居民信息修改先删除字表可能存在的数据 + **/ + void del(@Param("tableName") String tableName, @Param("resiUserId") String resiUserId); + /** * @Author sun * @Description 更新或新增居民信息各表数据 @@ -304,7 +310,7 @@ public interface IcResiUserDao extends BaseDao { IcResiUserEntity selectResiNoDelFlag(@Param("icResiUserId") String icResiUserId); - List userChart(@Param("orgId") String orgId, @Param("orgType") String orgType); + List userChart(@Param("orgId") String orgId, @Param("orgType") String orgType, @Param("agencyIdList") List agencyIdList, @Param("gridIdList") List gridIdList); /** * desc:根据维度获取居民信息表的数据[正常状态的居民] diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiCollectEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiCollectEntity.java index 8b6a20d87b..3b4b8ac3e0 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiCollectEntity.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiCollectEntity.java @@ -69,7 +69,7 @@ public class IcResiCollectEntity extends BaseEpmetEntity { private String address; /** - * 1自由0租住 + * 房屋状态与ic_house表的RENT_FLAG一致取值1:出租 0:自住 2:闲置 3:未售出 */ private String houseType; diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiMemberEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiMemberEntity.java index b93190e5c5..583663a1a1 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiMemberEntity.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiMemberEntity.java @@ -58,8 +58,23 @@ public class IcResiMemberEntity extends BaseEpmetEntity { */ private String domicilePlace; + /** + * 户籍所在地行政地区编码 + */ + private String domicilePlaceCode; + + /** + * 户籍所在地行政地区编码全路径,包含自己,英文逗号隔开例如:37,3702,370203 + */ + private String domicilePlaceCodePath; + /** * 学校或公司 */ private String workPlace; + + /** + * 备注 + */ + private String remark; } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java index 7cb268a6c2..3ef76601bc 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java @@ -25,6 +25,7 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.dto.IcResiUserDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcResiUserEntity; import com.epmet.excel.support.ExportResiUserItemDTO; import com.epmet.resi.partymember.dto.partymember.IcPartyMemberDTO; @@ -90,17 +91,17 @@ public interface IcResiUserService extends BaseService { String staffOrgPath); /** - * @Description 查询个人数据 * @param formDTO + * @Description 查询个人数据 * @author zxc * @date 2021/11/3 9:21 上午 */ PersonDataResultDTO personData(PersonDataFormDTO formDTO); /** - * @Description 根据名字搜索 * @param formDTO * @Description 根据名字搜索 + * @Description 根据名字搜索 * @author zxc * @date 2021/11/3 1:42 下午 */ @@ -279,7 +280,7 @@ public interface IcResiUserService extends BaseService { */ List listHomeUserBrief(String houseId, String customerId); - List> dynamicQuery(String loginUserCustomerId, String formCode, String icResiUser, List showSqlColumns, List conditions, String agencyId, String finalStaffOrgPath); + List> dynamicQuery(String loginUserCustomerId, String formCode, String icResiUser, List showSqlColumns, List conditions, String agencyId, String finalStaffOrgPath); /** * 租客房东黑名单查询个人数据 @@ -332,8 +333,10 @@ public interface IcResiUserService extends BaseService { * @return */ SyncResiResDTO checkUser(String customerId, String idCard, String agencyId); + /** * desc:条件获取居民基础信息 + * * @param formDTO * @return */ @@ -377,21 +380,31 @@ public interface IcResiUserService extends BaseService { IcResiUserInfoDTO getUserByIdCard(IcResiUserDTO formDTO); /** - * @describe: 新增家庭成员 - * @author wangtong - * @date 2022/6/6 10:36 - * @params [dto] - * @return com.epmet.commons.tools.utils.Result - */ + * 根据身份证获取居民角色(目前只有是否是志愿者) + * + * @Param formDTO + * @Return {@link IcUserRoleResultDTO} + * @Author zhaoqifeng + * @Date 2022/5/31 9:50 + */ + IcUserRoleResultDTO getUserRoleByIdCard(IcResiUserDTO formDTO); + + /** + * @return com.epmet.commons.tools.utils.Result + * @describe: 新增家庭成员 + * @author wangtong + * @date 2022/6/6 10:36 + * @params [dto] + */ Result addMember(IcResiUserConfirmSubmitDTO dto); /** - * @describe: 修改家庭成员 - * @author wangtong - * @date 2022/6/6 10:36 - * @params [dto] - * @return com.epmet.commons.tools.utils.Result - */ + * @return com.epmet.commons.tools.utils.Result + * @describe: 修改家庭成员 + * @author wangtong + * @date 2022/6/6 10:36 + * @params [dto] + */ Result editMember(IcResiUserConfirmSubmitDTO dto); /** @@ -402,4 +415,25 @@ public interface IcResiUserService extends BaseService { * @return com.epmet.commons.tools.utils.Result */ Result addWorkMember(IcResiUserConfirmSubmitDTO dto); + + /** + * 获取组织下志愿者列表 + * + * @Param customerId 客户 + * @Param agencyId 组织 + * @Return {@link List} + * @Author zhaoqifeng + * @Date 2022/6/16 14:58 + */ + List getVolunteerList(String customerId, String agencyId); + + /** + * 获取居民信息对应的居民用户ID + * + * @Param icResiUserId + * @Return {@link String} + * @Author zhaoqifeng + * @Date 2022/6/16 15:30 + */ + List getUserId(String icResiUserId); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java index 6829a6eee9..024d3aed37 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java @@ -33,7 +33,6 @@ import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; import com.epmet.commons.tools.security.password.PasswordUtils; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.utils.CpUserDetailRedis; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.CustomerStaffConstant; import com.epmet.constant.RoleKeyConstants; @@ -50,7 +49,6 @@ import com.epmet.entity.GovStaffRoleEntity; import com.epmet.entity.StaffRoleEntity; import com.epmet.entity.UserEntity; import com.epmet.feign.AuthFeignClient; -import com.epmet.feign.EpmetMessageOpenFeignClient; import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.feign.OperCrmOpenFeignClient; import com.epmet.service.CustomerStaffService; @@ -79,550 +77,545 @@ import java.util.stream.Collectors; @Slf4j @Service public class CustomerStaffServiceImpl extends BaseServiceImpl implements CustomerStaffService { - private final Logger logger = LogManager.getLogger(getClass()); - @Autowired - private GovStaffRoleService govStaffRoleService; - @Autowired - private UserService userService; - @Autowired - private StaffRoleService staffRoleService; - @Autowired - private StaffRoleDao staffRoleDao; - @Autowired - private CpUserDetailRedis cpUserDetailRedis; - @Autowired - private AuthFeignClient authFeignClient; - @Autowired - private GovOrgOpenFeignClient govOrgOpenFeignClient; - @Autowired - private CustomerStaffDao customerStaffDao; - @Autowired - private GovStaffRoleDao govStaffRoleDao; + private final Logger logger = LogManager.getLogger(getClass()); @Autowired - private OperCrmOpenFeignClient operCrmOpenFeignClient; + private GovStaffRoleService govStaffRoleService; @Autowired - private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient; - - @Override - public PageData page(Map params) { - IPage page = baseDao.selectPage( - getPage(params, FieldConstant.CREATED_TIME, false), - getWrapper(params) - ); - return getPageData(page, CustomerStaffDTO.class); - } - - @Override - public List list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); - - return ConvertUtils.sourceToTarget(entityList, CustomerStaffDTO.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 CustomerStaffDTO get(String id) { - CustomerStaffEntity entity = baseDao.selectById(id); - return ConvertUtils.sourceToTarget(entity, CustomerStaffDTO.class); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void save(CustomerStaffDTO dto) { - CustomerStaffEntity entity = ConvertUtils.sourceToTarget(dto, CustomerStaffEntity.class); - insert(entity); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(CustomerStaffDTO dto) { - CustomerStaffEntity entity = ConvertUtils.sourceToTarget(dto, CustomerStaffEntity.class); - updateById(entity); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(String[] ids) { - // 逻辑删除(@TableLogic 注解) - baseDao.deleteBatchIds(Arrays.asList(ids)); - } - - @Override - public Result> getCustsomerStaffByPhone(String mobile) { - //判断用户是否存在 - List customerStaffDTOList = baseDao.selectListCustomerStaffDTO(mobile); - if (null == customerStaffDTOList || customerStaffDTOList.size() == 0) { - logger.warn(String.format("根据手机号查询用户异常,手机号:[%s],code[%s],msg[%s]", mobile, EpmetErrorCode.GOV_STAFF_NOT_EXISTS.getCode(), EpmetErrorCode.GOV_STAFF_NOT_EXISTS.getMsg())); - return new Result().error(EpmetErrorCode.GOV_STAFF_NOT_EXISTS.getCode()); - } - return new Result>().ok(customerStaffDTOList); - } + private UserService userService; + @Autowired + private StaffRoleService staffRoleService; + @Autowired + private StaffRoleDao staffRoleDao; + @Autowired + private AuthFeignClient authFeignClient; + @Autowired + private GovOrgOpenFeignClient govOrgOpenFeignClient; + @Autowired + private GovStaffRoleDao govStaffRoleDao; + @Autowired + private OperCrmOpenFeignClient operCrmOpenFeignClient; + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, CustomerStaffDTO.class); + } - @Override - public Result getCustomerStaffInfo(CustomerStaffFormDTO formDTO) { - CustomerStaffDTO customerStaffDTO = baseDao.selectListCustomerStaffInfo(formDTO); - if (null == customerStaffDTO) { - logger.warn(String.format("根据手机号查询用户异常,手机号:[%s],code[%s],msg[%s]", formDTO.getMobile(), EpmetErrorCode.GOV_STAFF_NOT_EXISTS.getCode(), EpmetErrorCode.GOV_STAFF_NOT_EXISTS.getMsg())); - return new Result().error(EpmetErrorCode.GOV_STAFF_NOT_EXISTS.getCode()); - } - //判断用户是否已被禁用 - if (null != customerStaffDTO && UserConstant.DISABLED.equals(customerStaffDTO.getEnableFlag())) { - logger.warn(String.format("根据手机号查询用户异常,手机号:[%s],客户id:[%s],code[%s],msg[%s]", formDTO.getMobile(), formDTO.getCustomerId(), EpmetErrorCode.GOV_STAFF_DISABLED.getCode(), EpmetErrorCode.GOV_STAFF_DISABLED.getMsg())); - return new Result().error(EpmetErrorCode.GOV_STAFF_DISABLED.getCode()); - } - return new Result().ok(customerStaffDTO); - } - - @Override - public Result getCustomerStaffInfoByUserId(CustomerStaffDTO formDTO) { - CustomerStaffDTO customerStaffDTO = baseDao.selectStaffInfoByUserId(formDTO); - return new Result().ok(customerStaffDTO); - } - - @Override - public Result> selectStaffGridListByUserId(List customerStaffGridDTOS) { - if (CollectionUtils.isEmpty(customerStaffGridDTOS)){ - return new Result>().ok(new ArrayList<>()); - } - List gridManager = staffRoleService.listStaffsInRole(UserRoleConstant.GRID_MANAGER, customerStaffGridDTOS.get(0).getPid(), DataScope.getDefault()); - List staffGridListDTOS = baseDao.selectStaffGridListByUserId(customerStaffGridDTOS); - for (GovStaffRoleResultDTO govStaffRoleResultDTO : gridManager) { - if (govStaffRoleResultDTO.getRoleKey().equals(UserRoleConstant.GRID_MANAGER)){ - for (StaffGridListDTO staffGridListDTO : staffGridListDTOS) { - if (staffGridListDTO.getStaffId().equals(govStaffRoleResultDTO.getStaffId())){ - staffGridListDTO.setRoleName(govStaffRoleResultDTO.getRoleName()); - } - } - } - } - return new Result>().ok(staffGridListDTOS); - } - - @Override - public Result> getStaffInfoForHome(StaffsInAgencyFromDTO fromDTO) { - List list = baseDao.selectCustomerStaffList(fromDTO); - if (null == list) { - list = new ArrayList<>(); - } - return new Result>().ok(list); - } - - @Override - public Result> getStaffList(StaffsInAgencyFromDTO fromDTO) { - List list = baseDao.selectStaffList(fromDTO); - if (null == list) { - list = new ArrayList<>(); - } - if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(list)) { - Map> map = govStaffRoleService.getStaffRoles(fromDTO.getStaffList(), fromDTO.getAgencyId()); - list.forEach(item -> { - item.setRoles(map.get(item.getStaffId())); - }); - } - return new Result>().ok(list); - } + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); - @Override - public Result> addStaffInit(StaffInfoFromDTO fromDTO) { - GovStaffRoleDTO govStaffRoleDTO = new GovStaffRoleDTO(); - govStaffRoleDTO.setCustomerId(fromDTO.getCustomerId()); - List roleList = govStaffRoleService.getGovStaffRoleList(govStaffRoleDTO); + return ConvertUtils.sourceToTarget(entityList, CustomerStaffDTO.class); + } - if (null == roleList || roleList.size() == 0) { - return new Result>().error(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg()); - } - List staffRoleList = roleList.stream() - .filter(p -> !RoleKeyConstants.ROLE_KEY_ROOT_MANAGER.equals(p.getRoleKey())) - .map(p -> { - RoleInfoResultDTO staffRoleResultDTO = new RoleInfoResultDTO(); - staffRoleResultDTO.setRoleId(p.getId()); - staffRoleResultDTO.setRoleName(p.getRoleName()); - staffRoleResultDTO.setFullTimeOnly(p.getFullTimeOnly()); - staffRoleResultDTO.setDescription(p.getDescription()); - return staffRoleResultDTO; - }).collect(Collectors.toList()); - return new Result>().ok(staffRoleList); - } - - @Override - public Result editStaffInit(StaffInfoFromDTO fromDTO) { - StaffInitResultDTO resultDTO = new StaffInitResultDTO(); - //获取工作人员信息 - CustomerStaffDTO customerStaffDTO = baseDao.selectStaffInfo(fromDTO); - if (null == customerStaffDTO) { - log.warn("工作人员不存在"); - } - resultDTO.setStaffId(customerStaffDTO.getUserId()); - resultDTO.setName(customerStaffDTO.getRealName()); - resultDTO.setGender(customerStaffDTO.getGender()); - resultDTO.setMobile(customerStaffDTO.getMobile()); - resultDTO.setWorkType(customerStaffDTO.getWorkType()); - //获取角色列表 - GovStaffRoleDTO govStaffRoleDTO = new GovStaffRoleDTO(); - govStaffRoleDTO.setCustomerId(fromDTO.getCustomerId()); - List roleList = govStaffRoleService.getGovStaffRoleList(govStaffRoleDTO); - //获取工作人员角色 - List staffRoles = govStaffRoleService.listRolesByStaffId(fromDTO.getStaffId(), fromDTO.getAgencyId()); - List staffRoleList = roleList - .stream() - .filter(p -> !RoleKeyConstants.ROLE_KEY_ROOT_MANAGER.equals(p.getRoleKey())) - .map(p -> { - StaffRoleResultDTO staffRoleResultDTO = new StaffRoleResultDTO(); - staffRoleResultDTO.setRoleId(p.getId()); - staffRoleResultDTO.setRoleName(p.getRoleName()); - staffRoleResultDTO.setFullTimeOnly(p.getFullTimeOnly()); - staffRoleResultDTO.setDescription(p.getDescription()); - staffRoleResultDTO.setSelected(false); - return staffRoleResultDTO; - }).collect(Collectors.toList()); - - staffRoleList.forEach(role -> staffRoles.forEach(staffRole -> { - if (role.getRoleId().equals(staffRole.getId())) { - role.setSelected(true); - } - })); - resultDTO.setRoleList(staffRoleList); - - return new Result().ok(resultDTO); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public Result addStaff(StaffSubmitFromDTO fromDTO) { - CustomerStaffFormDTO customerStaffFormDTO = new CustomerStaffFormDTO(); - customerStaffFormDTO.setCustomerId(fromDTO.getCustomerId()); - customerStaffFormDTO.setMobile(fromDTO.getMobile()); - CustomerStaffDTO customerStaffDTO = baseDao.selectListCustomerStaffInfo(customerStaffFormDTO); - if (null != customerStaffDTO) { - return new Result().error(EpmetErrorCode.MOBILE_USED.getCode(), EpmetErrorCode.MOBILE_USED.getMsg()); - } - //USER表插入数据 - UserEntity userEntity = new UserEntity(); - userEntity.setFromApp(fromDTO.getApp()); - userEntity.setFromClient(fromDTO.getClient()); - userEntity.setCustomerId(fromDTO.getCustomerId()); - userService.insert(userEntity); - //Customer_Staff表插入数据 - CustomerStaffEntity staffEntity = new CustomerStaffEntity(); - staffEntity.setCustomerId(fromDTO.getCustomerId()); - staffEntity.setUserId(userEntity.getId()); - staffEntity.setRealName(fromDTO.getName()); - staffEntity.setMobile(fromDTO.getMobile()); - staffEntity.setActiveFlag(CustomerStaffConstant.INACTIVE); - staffEntity.setGender(fromDTO.getGender()); - staffEntity.setWorkType(fromDTO.getWorkType()); - staffEntity.setEnableFlag(CustomerStaffConstant.ENABLE); - baseDao.insert(staffEntity); - - //工作人员角色关联表 - fromDTO.getRoles().forEach(role -> { - StaffRoleEntity staffRoleEntity = new StaffRoleEntity(); - staffRoleEntity.setStaffId(userEntity.getId()); - staffRoleEntity.setRoleId(role); - staffRoleEntity.setOrgId(fromDTO.getAgencyId()); - staffRoleEntity.setCustomerId(fromDTO.getCustomerId()); - staffRoleService.insert(staffRoleEntity); - }); - - // 角色放缓存 - CustomerAgencyUserRoleDTO dto = new CustomerAgencyUserRoleDTO(); - List roleKeyValue = govStaffRoleDao.selectRoleKeyName(fromDTO.getRoles()); - dto.setCustomerId(fromDTO.getCustomerId()); - dto.setStaffId(userEntity.getId()); - dto.setAgencyId(fromDTO.getAgencyId()); - Map m = new HashMap(16); - roleKeyValue.forEach(r -> { - m.put(r.getRoleKey(),r.getRoleName()); - }); - dto.setRoles(m); - CustomerStaffRedis.delStaffInfoFormCache(dto.getCustomerId(), dto.getStaffId()); - - return new Result().ok(ConvertUtils.sourceToTarget(staffEntity, CustomerStaffDTO.class)); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public Result editStaff(StaffSubmitFromDTO fromDTO) { - CustomerStaffFormDTO customerStaffFormDTO = new CustomerStaffFormDTO(); - customerStaffFormDTO.setCustomerId(fromDTO.getCustomerId()); - customerStaffFormDTO.setMobile(fromDTO.getMobile()); - CustomerStaffDTO customerStaffDTO = baseDao.selectListCustomerStaffInfo(customerStaffFormDTO); - if (null != customerStaffDTO && !fromDTO.getStaffId().equals(customerStaffDTO.getUserId())){ - return new Result().error(EpmetErrorCode.MOBILE_USED.getCode(), EpmetErrorCode.MOBILE_USED.getMsg()); - } + private QueryWrapper getWrapper(Map params) { + String id = (String) params.get(FieldConstant.ID_HUMP); - CustomerStaffEntity customerStaffEntity = baseDao.selectByUserId(fromDTO.getStaffId()); - //Customer_Staff表插入数据 - CustomerStaffEntity staffEntity = new CustomerStaffEntity(); - staffEntity.setId(customerStaffEntity.getId()); - staffEntity.setRealName(fromDTO.getName()); - staffEntity.setMobile(fromDTO.getMobile()); - staffEntity.setGender(fromDTO.getGender()); - staffEntity.setWorkType(fromDTO.getWorkType()); - baseDao.updateById(staffEntity); - - //清空权限关联 - StaffRoleDTO staffRoleDTO = new StaffRoleDTO(); - staffRoleDTO.setStaffId(fromDTO.getStaffId()); - staffRoleDTO.setOrgId(fromDTO.getAgencyId()); - staffRoleService.clearStaffRoles(staffRoleDTO); - //重新添加角色关联 - fromDTO.getRoles().forEach(role -> { - StaffRoleEntity staffRoleEntity = new StaffRoleEntity(); - staffRoleEntity.setStaffId(fromDTO.getStaffId()); - staffRoleEntity.setRoleId(role); - staffRoleEntity.setOrgId(fromDTO.getAgencyId()); - staffRoleService.insert(staffRoleEntity); - }); - - // 重新查询用户的角色列表(可以取到前端没有传过来的角色,例如根管理员) - List staffRoleEntytiesByStaffIdAndOrgId = staffRoleService.getStaffRoleEntytiesByStaffIdAndOrgId(fromDTO.getAgencyId(), fromDTO.getStaffId()); - List roleIds = new ArrayList<>(); - if (!CollectionUtils.isEmpty(staffRoleEntytiesByStaffIdAndOrgId)) { - roleIds = staffRoleEntytiesByStaffIdAndOrgId.stream().map(sr -> sr.getRoleId()).collect(Collectors.toList()); - } + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); - // redis缓存角色修改 - UpdateCachedRolesFormDTO updateRolesForm = new UpdateCachedRolesFormDTO(); - updateRolesForm.setOrgId(fromDTO.getAgencyId()); - updateRolesForm.setStaffId(fromDTO.getStaffId()); - updateRolesForm.setRoleIds(roleIds); - try { - Result result = authFeignClient.updateCachedRoles(updateRolesForm); - if (!result.success()) { - logger.error("修改用户信息:修改用户已缓存的角色列表失败:{}", result.getInternalMsg()); - } - logger.info("修改用户信息:修改用户已缓存的角色列表成功"); - } catch (Exception e) { - log.error("method exception", e); - logger.error("修改用户信息:修改用户已缓存的角色列表异常:{}", ExceptionUtils.getErrorStackTrace(e)); - } + return wrapper; + } - // 角色放缓存 - CustomerAgencyUserRoleDTO dto = new CustomerAgencyUserRoleDTO(); - List roleKeyValue = govStaffRoleDao.selectRoleKeyName(fromDTO.getRoles()); - dto.setCustomerId(fromDTO.getCustomerId()); - dto.setStaffId(fromDTO.getStaffId()); - dto.setAgencyId(fromDTO.getAgencyId()); - Map m = new HashMap(16); - roleKeyValue.forEach(r -> { - m.put(r.getRoleKey(),r.getRoleName()); - }); - dto.setRoles(m); - CustomerStaffRedis.delStaffInfoFormCache(dto.getCustomerId(), dto.getStaffId()); - - return new Result(); - } - - @Override - public Result getStaffDetail(StaffInfoFromDTO fromDTO) { - StaffDetailResultDTO resultDTO = new StaffDetailResultDTO(); - //获取工作人员信息 - CustomerStaffDTO customerStaffDTO = baseDao.selectStaffInfo(fromDTO); - resultDTO.setStaffId(customerStaffDTO.getUserId()); - resultDTO.setName(customerStaffDTO.getRealName()); - resultDTO.setMobile(customerStaffDTO.getMobile()); - resultDTO.setHeadPhoto(customerStaffDTO.getHeadPhoto()); - resultDTO.setGender(customerStaffDTO.getGender()); - resultDTO.setActiveFlag(customerStaffDTO.getActiveFlag()); - resultDTO.setActiveTime(customerStaffDTO.getActiveTime()); - resultDTO.setEnableFlag(customerStaffDTO.getEnableFlag()); - - //获取工作人员角色 - List staffRoles = govStaffRoleService.listRolesByStaffId(fromDTO.getStaffId(), fromDTO.getAgencyId()); - List roles = staffRoles.stream().map(GovStaffRoleEntity::getRoleName).collect(Collectors.toList()); - resultDTO.setRoles(roles); - return new Result().ok(resultDTO); - } - - @Override - public Result disabledStaff(StaffInfoFromDTO fromDTO) { - CustomerStaffEntity customerStaffEntity = baseDao.selectByUserId(fromDTO.getStaffId()); - CustomerStaffEntity staffEntity = new CustomerStaffEntity(); - staffEntity.setId(customerStaffEntity.getId()); - staffEntity.setEnableFlag(CustomerStaffConstant.DISABLED); - baseDao.updateById(staffEntity); - //2021.8.24 sun 人员禁用时删除工作人员的缓存信息 - CustomerStaffRedis.delStaffInfoFormCache(fromDTO.getCustomerId(), fromDTO.getStaffId()); - return new Result(); - } - - /** - * 根据userId查询网格下未被禁用的人员数量 - * - * @param userIdDTO - * @return - */ - @Override - public Result selectGridStaffCountByUserId(List userIdDTO) { - Result gridStaffCountDTOResult = new Result(); - GridStaffCountDTO gridStaffCountDTO = baseDao.selectGridStaffCountByUserId(userIdDTO); - gridStaffCountDTOResult.setData(gridStaffCountDTO); - return gridStaffCountDTOResult; - } - - @Override - public Result> getDepartmentStaffList(DepartmentInStaffFormDTO formDTO) { - //1:根据userId集合查询人员基本信息 - List staffList = baseDao.selectDepartmentStaffList(formDTO); - //2:根据组织Id查询部门下是领导角色的用户 - List staffRoleDTOS = staffRoleService.listStaffsInRole(UserRoleConstant.DEPT_LEADER, formDTO.getAgencyId(), DataScope.getDefault()); - staffRoleDTOS.forEach(roleDto -> { - staffList.stream().filter(staffDto -> - roleDto.getStaffId().equals(staffDto.getStaffId())).findAny().ifPresent(result -> - result.setRoleName(roleDto.getRoleName())); - }); - return new Result>().ok(staffList); - } - - /** - * @return Result> - * @Description 通过userId列表查询未被禁用的用户信息 - * @Param CommonUserIdListFormDTO :: getUserIdList - * @Author wangc - * @Date 2020.04.24 15:44 - **/ - @Override - public Result> getEnableStaffMsgList(CommonUserIdListFormDTO userIdList) { - if (userIdList.getUserIdList().size() <= NumConstant.ZERO) { - return new Result>().ok(new ArrayList<>()); - } + @Override + public CustomerStaffDTO get(String id) { + CustomerStaffEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, CustomerStaffDTO.class); + } - return new Result>().ok(baseDao.selectEnableStaffMsg(userIdList.getUserIdList(), userIdList.getCustomerId())); - } - - /** - * @param staffIdList - * @return - * @Author sun - * @Description 根据staffId集合查询工作人员基础信息 - **/ - @Override - public CustomerStaffListResultDTO getCustomerStaffList(List staffIdList) { - //1:批量查询人员基本信息 - List staffList = baseDao.selectStaffByIds(staffIdList,null); - //2:批量查询人员拥有的所有角色信息 - List roleList = staffRoleDao.selectStaffRoleList(staffIdList); - CustomerStaffListResultDTO list = new CustomerStaffListResultDTO(); - list.setStaffList(staffList); - list.setRoleList(roleList); - return list; - } - - /** - * @param staffId - * @return - * @Author sun - * @Description 根据staffId查询工作人员基本信息 - **/ - @Override - public CustomerStaffDTO getCustomerStaff(String staffId) { - return baseDao.selectByStaffId(staffId); - } - - /** - * @param staffResetPwFormDTO - * @return void - * @author yinzuomei - * @description 工作端,修改工作人员密码 - * @Date 2020/7/1 10:41 - **/ - @Override - public void resetStaffPassword(StaffResetPwFormDTO staffResetPwFormDTO) { - CustomerStaffDTO customerStaffDTO=this.getCustomerStaff(staffResetPwFormDTO.getStaffId()); - if(null==customerStaffDTO){ - return; - } - //密码加密 - String password = PasswordUtils.encode(staffResetPwFormDTO.getNewPassword()); - logger.info(String.format("密码%s加密后为%s",staffResetPwFormDTO.getNewPassword(),password)); - customerStaffDTO.setPassword(password); - this.update(customerStaffDTO); - } - - /** - * @Description 得到工组人员的头像、名称、所属机关名称 - * @param userId - * @return - * @author wangc - * @date 2020.07.27 14:45 - **/ - @Override - public StaffEtAgencyResultDTO getStaffMsg(IssueInitiatorFormDTO userId) { - StaffEtAgencyResultDTO result = new StaffEtAgencyResultDTO(); - CustomerStaffDTO staff = baseDao.selectByStaffId(userId.getUserId()); - if(null != staff){ - Result agencyResult = govOrgOpenFeignClient.getAgencyByStaff(userId.getUserId()); - if(agencyResult.success() && null != agencyResult.getData()){ - result = ConvertUtils.sourceToTarget(agencyResult.getData(),StaffEtAgencyResultDTO.class); - result.setAgencyId(agencyResult.getData().getId()); - result.setNickname(new StringBuilder(agencyResult.getData().getOrganizationName()).append(ModuleConstant.DASH).append(staff.getRealName()).toString()); - } - } - return result; - } - - /** - * @param formDTO - * @return - * @Author sun - * @Description 根据客户ID、手机号查询政府端工作人员基本信息,校验用户是否存在 - **/ - @Override - public List getCustsomerStaffByIdAndPhone(ThirdCustomerStaffFormDTO formDTO) { - //根据客户Id和手机号查询工作人员信息 - List customerStaffDTOList = baseDao.selectStaff(formDTO); - if (null == customerStaffDTOList || customerStaffDTOList.size() < NumConstant.ONE) { - logger.warn(String.format("根据客户Id和手机号查询用户异常,客户Id:[%s],手机号:[%s],code[%s],msg[%s]", - formDTO.getCustomerId(), formDTO.getMobile(), EpmetErrorCode.GOV_STAFF_NOT_EXISTS.getCode(), - EpmetErrorCode.GOV_STAFF_NOT_EXISTS.getMsg())); - throw new RenException(EpmetErrorCode.GOV_STAFF_NOT_EXISTS.getCode()); - } - return customerStaffDTOList; - } - - /** - * @Description 查询工作人员的信息 - * @param formDTO - * @author zxc - * @date 2020/8/13 1:45 下午 - */ - @Override - public List getStaffInfoList(UserIdsFormDTO formDTO) { - List userIds = formDTO.getUserIds(); - // 1. 根据userId查询人员基本信息 - List staffInfoList = new ArrayList<>(); - userIds.forEach(staffId->{ - CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), staffId); - if (staffInfo ==null){ - log.error("getStaffInfoList fail customerId:{}, staffId:{} not exist in db",formDTO.getCustomerId(), staffId); - return; - } - StaffSinGridResultDTO resultDTO = new StaffSinGridResultDTO(); - resultDTO.setStaffId(staffId); - resultDTO.setStaffName(staffInfo.getRealName()); - resultDTO.setHeadPhoto(staffInfo.getHeadPhoto()); - resultDTO.setGender(staffInfo.getGender()); - - List roleInfoList = new ArrayList<>(); - staffInfo.getRoleMap().forEach((key,value) ->{ - RoleResultDTO dto = new RoleResultDTO(); - dto.setRoleKey(key); - dto.setRoleName(value); - roleInfoList.add(dto); - }); - resultDTO.setRoleList(roleInfoList); - staffInfoList.add(resultDTO); - }); + @Override + @Transactional(rollbackFor = Exception.class) + public void save(CustomerStaffDTO dto) { + CustomerStaffEntity entity = ConvertUtils.sourceToTarget(dto, CustomerStaffEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(CustomerStaffDTO dto) { + CustomerStaffEntity entity = ConvertUtils.sourceToTarget(dto, CustomerStaffEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public Result> getCustsomerStaffByPhone(String mobile) { + //判断用户是否存在 + List customerStaffDTOList = baseDao.selectListCustomerStaffDTO(mobile); + if (null == customerStaffDTOList || customerStaffDTOList.size() == 0) { + logger.warn(String.format("根据手机号查询用户异常,手机号:[%s],code[%s],msg[%s]", mobile, EpmetErrorCode.GOV_STAFF_NOT_EXISTS.getCode(), EpmetErrorCode.GOV_STAFF_NOT_EXISTS.getMsg())); + return new Result().error(EpmetErrorCode.GOV_STAFF_NOT_EXISTS.getCode()); + } + return new Result>().ok(customerStaffDTOList); + } + + + @Override + public Result getCustomerStaffInfo(CustomerStaffFormDTO formDTO) { + CustomerStaffDTO customerStaffDTO = baseDao.selectListCustomerStaffInfo(formDTO); + if (null == customerStaffDTO) { + logger.warn(String.format("根据手机号查询用户异常,手机号:[%s],code[%s],msg[%s]", formDTO.getMobile(), EpmetErrorCode.GOV_STAFF_NOT_EXISTS.getCode(), EpmetErrorCode.GOV_STAFF_NOT_EXISTS.getMsg())); + return new Result().error(EpmetErrorCode.GOV_STAFF_NOT_EXISTS.getCode()); + } + //判断用户是否已被禁用 + if (null != customerStaffDTO && UserConstant.DISABLED.equals(customerStaffDTO.getEnableFlag())) { + logger.warn(String.format("根据手机号查询用户异常,手机号:[%s],客户id:[%s],code[%s],msg[%s]", formDTO.getMobile(), formDTO.getCustomerId(), EpmetErrorCode.GOV_STAFF_DISABLED.getCode(), EpmetErrorCode.GOV_STAFF_DISABLED.getMsg())); + return new Result().error(EpmetErrorCode.GOV_STAFF_DISABLED.getCode()); + } + return new Result().ok(customerStaffDTO); + } + + @Override + public Result getCustomerStaffInfoByUserId(CustomerStaffDTO formDTO) { + CustomerStaffDTO customerStaffDTO = baseDao.selectStaffInfoByUserId(formDTO); + return new Result().ok(customerStaffDTO); + } + + @Override + public Result> selectStaffGridListByUserId(List customerStaffGridDTOS) { + if (CollectionUtils.isEmpty(customerStaffGridDTOS)) { + return new Result>().ok(new ArrayList<>()); + } + List gridManager = staffRoleService.listStaffsInRole(UserRoleConstant.GRID_MANAGER, customerStaffGridDTOS.get(0).getPid(), DataScope.getDefault()); + List staffGridListDTOS = baseDao.selectStaffGridListByUserId(customerStaffGridDTOS); + for (GovStaffRoleResultDTO govStaffRoleResultDTO : gridManager) { + if (govStaffRoleResultDTO.getRoleKey().equals(UserRoleConstant.GRID_MANAGER)) { + for (StaffGridListDTO staffGridListDTO : staffGridListDTOS) { + if (staffGridListDTO.getStaffId().equals(govStaffRoleResultDTO.getStaffId())) { + staffGridListDTO.setRoleName(govStaffRoleResultDTO.getRoleName()); + } + } + } + } + return new Result>().ok(staffGridListDTOS); + } + + @Override + public Result> getStaffInfoForHome(StaffsInAgencyFromDTO fromDTO) { + List list = baseDao.selectCustomerStaffList(fromDTO); + if (null == list) { + list = new ArrayList<>(); + } + return new Result>().ok(list); + } + + @Override + public Result> getStaffList(StaffsInAgencyFromDTO fromDTO) { + List list = baseDao.selectStaffList(fromDTO); + if (null == list) { + list = new ArrayList<>(); + } + if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(list)) { + Map> map = govStaffRoleService.getStaffRoles(fromDTO.getStaffList(), fromDTO.getAgencyId()); + list.forEach(item -> { + item.setRoles(map.get(item.getStaffId())); + }); + } + return new Result>().ok(list); + } + + @Override + public Result> addStaffInit(StaffInfoFromDTO fromDTO) { + GovStaffRoleDTO govStaffRoleDTO = new GovStaffRoleDTO(); + govStaffRoleDTO.setCustomerId(fromDTO.getCustomerId()); + List roleList = govStaffRoleService.getGovStaffRoleList(govStaffRoleDTO); + + if (null == roleList || roleList.size() == 0) { + return new Result>().error(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg()); + } + List staffRoleList = roleList.stream() + .filter(p -> !RoleKeyConstants.ROLE_KEY_ROOT_MANAGER.equals(p.getRoleKey())) + .map(p -> { + RoleInfoResultDTO staffRoleResultDTO = new RoleInfoResultDTO(); + staffRoleResultDTO.setRoleId(p.getId()); + staffRoleResultDTO.setRoleName(p.getRoleName()); + staffRoleResultDTO.setFullTimeOnly(p.getFullTimeOnly()); + staffRoleResultDTO.setDescription(p.getDescription()); + return staffRoleResultDTO; + }).collect(Collectors.toList()); + return new Result>().ok(staffRoleList); + } + + @Override + public Result editStaffInit(StaffInfoFromDTO fromDTO) { + StaffInitResultDTO resultDTO = new StaffInitResultDTO(); + //获取工作人员信息 + CustomerStaffDTO customerStaffDTO = baseDao.selectStaffInfo(fromDTO); + if (null == customerStaffDTO) { + log.warn("工作人员不存在"); + } + resultDTO.setStaffId(customerStaffDTO.getUserId()); + resultDTO.setName(customerStaffDTO.getRealName()); + resultDTO.setGender(customerStaffDTO.getGender()); + resultDTO.setMobile(customerStaffDTO.getMobile()); + resultDTO.setWorkType(customerStaffDTO.getWorkType()); + //获取角色列表 + GovStaffRoleDTO govStaffRoleDTO = new GovStaffRoleDTO(); + govStaffRoleDTO.setCustomerId(fromDTO.getCustomerId()); + List roleList = govStaffRoleService.getGovStaffRoleList(govStaffRoleDTO); + //获取工作人员角色 + List staffRoles = govStaffRoleService.listRolesByStaffId(fromDTO.getStaffId(), fromDTO.getAgencyId()); + List staffRoleList = roleList + .stream() + .filter(p -> !RoleKeyConstants.ROLE_KEY_ROOT_MANAGER.equals(p.getRoleKey())) + .map(p -> { + StaffRoleResultDTO staffRoleResultDTO = new StaffRoleResultDTO(); + staffRoleResultDTO.setRoleId(p.getId()); + staffRoleResultDTO.setRoleName(p.getRoleName()); + staffRoleResultDTO.setFullTimeOnly(p.getFullTimeOnly()); + staffRoleResultDTO.setDescription(p.getDescription()); + staffRoleResultDTO.setSelected(false); + return staffRoleResultDTO; + }).collect(Collectors.toList()); + + staffRoleList.forEach(role -> staffRoles.forEach(staffRole -> { + if (role.getRoleId().equals(staffRole.getId())) { + role.setSelected(true); + } + })); + resultDTO.setRoleList(staffRoleList); + + return new Result().ok(resultDTO); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Result addStaff(StaffSubmitFromDTO fromDTO) { + CustomerStaffFormDTO customerStaffFormDTO = new CustomerStaffFormDTO(); + customerStaffFormDTO.setCustomerId(fromDTO.getCustomerId()); + customerStaffFormDTO.setMobile(fromDTO.getMobile()); + CustomerStaffDTO customerStaffDTO = baseDao.selectListCustomerStaffInfo(customerStaffFormDTO); + if (null != customerStaffDTO) { + return new Result().error(EpmetErrorCode.MOBILE_USED.getCode(), EpmetErrorCode.MOBILE_USED.getMsg()); + } + //USER表插入数据 + UserEntity userEntity = new UserEntity(); + userEntity.setFromApp(fromDTO.getApp()); + userEntity.setFromClient(fromDTO.getClient()); + userEntity.setCustomerId(fromDTO.getCustomerId()); + userService.insert(userEntity); + //Customer_Staff表插入数据 + CustomerStaffEntity staffEntity = new CustomerStaffEntity(); + staffEntity.setCustomerId(fromDTO.getCustomerId()); + staffEntity.setUserId(userEntity.getId()); + staffEntity.setRealName(fromDTO.getName()); + staffEntity.setMobile(fromDTO.getMobile()); + staffEntity.setActiveFlag(CustomerStaffConstant.INACTIVE); + staffEntity.setGender(fromDTO.getGender()); + staffEntity.setWorkType(fromDTO.getWorkType()); + staffEntity.setEnableFlag(CustomerStaffConstant.ENABLE); + staffEntity.setPassword(PasswordUtils.encode("12345678")); + baseDao.insert(staffEntity); + + //工作人员角色关联表 + fromDTO.getRoles().forEach(role -> { + StaffRoleEntity staffRoleEntity = new StaffRoleEntity(); + staffRoleEntity.setStaffId(userEntity.getId()); + staffRoleEntity.setRoleId(role); + staffRoleEntity.setOrgId(fromDTO.getAgencyId()); + staffRoleEntity.setCustomerId(fromDTO.getCustomerId()); + staffRoleService.insert(staffRoleEntity); + }); + + // 角色放缓存 + CustomerAgencyUserRoleDTO dto = new CustomerAgencyUserRoleDTO(); + List roleKeyValue = govStaffRoleDao.selectRoleKeyName(fromDTO.getRoles()); + dto.setCustomerId(fromDTO.getCustomerId()); + dto.setStaffId(userEntity.getId()); + dto.setAgencyId(fromDTO.getAgencyId()); + Map m = new HashMap(16); + roleKeyValue.forEach(r -> { + m.put(r.getRoleKey(), r.getRoleName()); + }); + dto.setRoles(m); + CustomerStaffRedis.delStaffInfoFormCache(dto.getCustomerId(), dto.getStaffId()); + + return new Result().ok(ConvertUtils.sourceToTarget(staffEntity, CustomerStaffDTO.class)); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Result editStaff(StaffSubmitFromDTO fromDTO) { + CustomerStaffFormDTO customerStaffFormDTO = new CustomerStaffFormDTO(); + customerStaffFormDTO.setCustomerId(fromDTO.getCustomerId()); + customerStaffFormDTO.setMobile(fromDTO.getMobile()); + CustomerStaffDTO customerStaffDTO = baseDao.selectListCustomerStaffInfo(customerStaffFormDTO); + if (null != customerStaffDTO && !fromDTO.getStaffId().equals(customerStaffDTO.getUserId())) { + return new Result().error(EpmetErrorCode.MOBILE_USED.getCode(), EpmetErrorCode.MOBILE_USED.getMsg()); + } + + CustomerStaffEntity customerStaffEntity = baseDao.selectByUserId(fromDTO.getStaffId()); + //Customer_Staff表插入数据 + CustomerStaffEntity staffEntity = new CustomerStaffEntity(); + staffEntity.setId(customerStaffEntity.getId()); + staffEntity.setRealName(fromDTO.getName()); + staffEntity.setMobile(fromDTO.getMobile()); + staffEntity.setGender(fromDTO.getGender()); + staffEntity.setWorkType(fromDTO.getWorkType()); + baseDao.updateById(staffEntity); + + //清空权限关联 + StaffRoleDTO staffRoleDTO = new StaffRoleDTO(); + staffRoleDTO.setStaffId(fromDTO.getStaffId()); + staffRoleDTO.setOrgId(fromDTO.getAgencyId()); + staffRoleService.clearStaffRoles(staffRoleDTO); + //重新添加角色关联 + fromDTO.getRoles().forEach(role -> { + StaffRoleEntity staffRoleEntity = new StaffRoleEntity(); + staffRoleEntity.setStaffId(fromDTO.getStaffId()); + staffRoleEntity.setRoleId(role); + staffRoleEntity.setOrgId(fromDTO.getAgencyId()); + staffRoleService.insert(staffRoleEntity); + }); + + // 重新查询用户的角色列表(可以取到前端没有传过来的角色,例如根管理员) + List staffRoleEntytiesByStaffIdAndOrgId = staffRoleService.getStaffRoleEntytiesByStaffIdAndOrgId(fromDTO.getAgencyId(), fromDTO.getStaffId()); + List roleIds = new ArrayList<>(); + if (!CollectionUtils.isEmpty(staffRoleEntytiesByStaffIdAndOrgId)) { + roleIds = staffRoleEntytiesByStaffIdAndOrgId.stream().map(sr -> sr.getRoleId()).collect(Collectors.toList()); + } + + // redis缓存角色修改 + UpdateCachedRolesFormDTO updateRolesForm = new UpdateCachedRolesFormDTO(); + updateRolesForm.setOrgId(fromDTO.getAgencyId()); + updateRolesForm.setStaffId(fromDTO.getStaffId()); + updateRolesForm.setRoleIds(roleIds); + try { + Result result = authFeignClient.updateCachedRoles(updateRolesForm); + if (!result.success()) { + logger.error("修改用户信息:修改用户已缓存的角色列表失败:{}", result.getInternalMsg()); + } + logger.info("修改用户信息:修改用户已缓存的角色列表成功"); + } catch (Exception e) { + log.error("method exception", e); + logger.error("修改用户信息:修改用户已缓存的角色列表异常:{}", ExceptionUtils.getErrorStackTrace(e)); + } + + // 角色放缓存 + CustomerAgencyUserRoleDTO dto = new CustomerAgencyUserRoleDTO(); + List roleKeyValue = govStaffRoleDao.selectRoleKeyName(fromDTO.getRoles()); + dto.setCustomerId(fromDTO.getCustomerId()); + dto.setStaffId(fromDTO.getStaffId()); + dto.setAgencyId(fromDTO.getAgencyId()); + Map m = new HashMap(16); + roleKeyValue.forEach(r -> { + m.put(r.getRoleKey(), r.getRoleName()); + }); + dto.setRoles(m); + CustomerStaffRedis.delStaffInfoFormCache(dto.getCustomerId(), dto.getStaffId()); + + return new Result(); + } + + @Override + public Result getStaffDetail(StaffInfoFromDTO fromDTO) { + StaffDetailResultDTO resultDTO = new StaffDetailResultDTO(); + //获取工作人员信息 + CustomerStaffDTO customerStaffDTO = baseDao.selectStaffInfo(fromDTO); + resultDTO.setStaffId(customerStaffDTO.getUserId()); + resultDTO.setName(customerStaffDTO.getRealName()); + resultDTO.setMobile(customerStaffDTO.getMobile()); + resultDTO.setHeadPhoto(customerStaffDTO.getHeadPhoto()); + resultDTO.setGender(customerStaffDTO.getGender()); + resultDTO.setActiveFlag(customerStaffDTO.getActiveFlag()); + resultDTO.setActiveTime(customerStaffDTO.getActiveTime()); + resultDTO.setEnableFlag(customerStaffDTO.getEnableFlag()); + + //获取工作人员角色 + List staffRoles = govStaffRoleService.listRolesByStaffId(fromDTO.getStaffId(), fromDTO.getAgencyId()); + List roles = staffRoles.stream().map(GovStaffRoleEntity::getRoleName).collect(Collectors.toList()); + resultDTO.setRoles(roles); + return new Result().ok(resultDTO); + } + + @Override + public Result disabledStaff(StaffInfoFromDTO fromDTO) { + CustomerStaffEntity customerStaffEntity = baseDao.selectByUserId(fromDTO.getStaffId()); + CustomerStaffEntity staffEntity = new CustomerStaffEntity(); + staffEntity.setId(customerStaffEntity.getId()); + staffEntity.setEnableFlag(CustomerStaffConstant.DISABLED); + baseDao.updateById(staffEntity); + //2021.8.24 sun 人员禁用时删除工作人员的缓存信息 + CustomerStaffRedis.delStaffInfoFormCache(fromDTO.getCustomerId(), fromDTO.getStaffId()); + return new Result(); + } + + /** + * 根据userId查询网格下未被禁用的人员数量 + * + * @param userIdDTO + * @return + */ + @Override + public Result selectGridStaffCountByUserId(List userIdDTO) { + Result gridStaffCountDTOResult = new Result(); + GridStaffCountDTO gridStaffCountDTO = baseDao.selectGridStaffCountByUserId(userIdDTO); + gridStaffCountDTOResult.setData(gridStaffCountDTO); + return gridStaffCountDTOResult; + } + + @Override + public Result> getDepartmentStaffList(DepartmentInStaffFormDTO formDTO) { + //1:根据userId集合查询人员基本信息 + List staffList = baseDao.selectDepartmentStaffList(formDTO); + //2:根据组织Id查询部门下是领导角色的用户 + List staffRoleDTOS = staffRoleService.listStaffsInRole(UserRoleConstant.DEPT_LEADER, formDTO.getAgencyId(), DataScope.getDefault()); + staffRoleDTOS.forEach(roleDto -> { + staffList.stream().filter(staffDto -> + roleDto.getStaffId().equals(staffDto.getStaffId())).findAny().ifPresent(result -> + result.setRoleName(roleDto.getRoleName())); + }); + return new Result>().ok(staffList); + } + + /** + * @return Result> + * @Description 通过userId列表查询未被禁用的用户信息 + * @Param CommonUserIdListFormDTO :: getUserIdList + * @Author wangc + * @Date 2020.04.24 15:44 + **/ + @Override + public Result> getEnableStaffMsgList(CommonUserIdListFormDTO userIdList) { + if (userIdList.getUserIdList().size() <= NumConstant.ZERO) { + return new Result>().ok(new ArrayList<>()); + } + + return new Result>().ok(baseDao.selectEnableStaffMsg(userIdList.getUserIdList(), userIdList.getCustomerId())); + } + + /** + * @param staffIdList + * @return + * @Author sun + * @Description 根据staffId集合查询工作人员基础信息 + **/ + @Override + public CustomerStaffListResultDTO getCustomerStaffList(List staffIdList) { + //1:批量查询人员基本信息 + List staffList = baseDao.selectStaffByIds(staffIdList, null); + //2:批量查询人员拥有的所有角色信息 + List roleList = staffRoleDao.selectStaffRoleList(staffIdList); + CustomerStaffListResultDTO list = new CustomerStaffListResultDTO(); + list.setStaffList(staffList); + list.setRoleList(roleList); + return list; + } + + /** + * @param staffId + * @return + * @Author sun + * @Description 根据staffId查询工作人员基本信息 + **/ + @Override + public CustomerStaffDTO getCustomerStaff(String staffId) { + return baseDao.selectByStaffId(staffId); + } + + /** + * @param staffResetPwFormDTO + * @return void + * @author yinzuomei + * @description 工作端,修改工作人员密码 + * @Date 2020/7/1 10:41 + **/ + @Override + public void resetStaffPassword(StaffResetPwFormDTO staffResetPwFormDTO) { + CustomerStaffDTO customerStaffDTO = this.getCustomerStaff(staffResetPwFormDTO.getStaffId()); + if (null == customerStaffDTO) { + return; + } + //密码加密 + String password = PasswordUtils.encode(staffResetPwFormDTO.getNewPassword()); + logger.info(String.format("密码%s加密后为%s", staffResetPwFormDTO.getNewPassword(), password)); + customerStaffDTO.setPassword(password); + this.update(customerStaffDTO); + } + + /** + * @param userId + * @return + * @Description 得到工组人员的头像、名称、所属机关名称 + * @author wangc + * @date 2020.07.27 14:45 + **/ + @Override + public StaffEtAgencyResultDTO getStaffMsg(IssueInitiatorFormDTO userId) { + StaffEtAgencyResultDTO result = new StaffEtAgencyResultDTO(); + CustomerStaffDTO staff = baseDao.selectByStaffId(userId.getUserId()); + if (null != staff) { + Result agencyResult = govOrgOpenFeignClient.getAgencyByStaff(userId.getUserId()); + if (agencyResult.success() && null != agencyResult.getData()) { + result = ConvertUtils.sourceToTarget(agencyResult.getData(), StaffEtAgencyResultDTO.class); + result.setAgencyId(agencyResult.getData().getId()); + result.setNickname(new StringBuilder(agencyResult.getData().getOrganizationName()).append(ModuleConstant.DASH).append(staff.getRealName()).toString()); + } + } + return result; + } + + /** + * @param formDTO + * @return + * @Author sun + * @Description 根据客户ID、手机号查询政府端工作人员基本信息,校验用户是否存在 + **/ + @Override + public List getCustsomerStaffByIdAndPhone(ThirdCustomerStaffFormDTO formDTO) { + //根据客户Id和手机号查询工作人员信息 + List customerStaffDTOList = baseDao.selectStaff(formDTO); + if (null == customerStaffDTOList || customerStaffDTOList.size() < NumConstant.ONE) { + logger.warn(String.format("根据客户Id和手机号查询用户异常,客户Id:[%s],手机号:[%s],code[%s],msg[%s]", + formDTO.getCustomerId(), formDTO.getMobile(), EpmetErrorCode.GOV_STAFF_NOT_EXISTS.getCode(), + EpmetErrorCode.GOV_STAFF_NOT_EXISTS.getMsg())); + throw new RenException(EpmetErrorCode.GOV_STAFF_NOT_EXISTS.getCode()); + } + return customerStaffDTOList; + } + + /** + * @param formDTO + * @Description 查询工作人员的信息 + * @author zxc + * @date 2020/8/13 1:45 下午 + */ + @Override + public List getStaffInfoList(UserIdsFormDTO formDTO) { + List userIds = formDTO.getUserIds(); + // 1. 根据userId查询人员基本信息 + List staffInfoList = new ArrayList<>(); + userIds.forEach(staffId -> { + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), staffId); + if (staffInfo == null) { + log.error("getStaffInfoList fail customerId:{}, staffId:{} not exist in db", formDTO.getCustomerId(), staffId); + return; + } + StaffSinGridResultDTO resultDTO = new StaffSinGridResultDTO(); + resultDTO.setStaffId(staffId); + resultDTO.setStaffName(staffInfo.getRealName()); + resultDTO.setHeadPhoto(staffInfo.getHeadPhoto()); + resultDTO.setGender(staffInfo.getGender()); + + List roleInfoList = new ArrayList<>(); + staffInfo.getRoleMap().forEach((key, value) -> { + RoleResultDTO dto = new RoleResultDTO(); + dto.setRoleKey(key); + dto.setRoleName(value); + roleInfoList.add(dto); + }); + resultDTO.setRoleList(roleInfoList); + staffInfoList.add(resultDTO); + }); /*List staffInfoList = customerStaffDao.getStaffInfoList(userIds); if (staffInfoList.size() == NumConstant.ZERO){ @@ -641,14 +634,13 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl govOrgResult = - govOrgOpenFeignClient.staffInfoExt(result); - if(govOrgResult.success() && null != govOrgResult.getData()){ + govOrgOpenFeignClient.staffInfoExt(result); + if (govOrgResult.success() && null != govOrgResult.getData()) { return govOrgResult.getData(); } } - log.warn("com.epmet.service.impl.CustomerStaffServiceImpl.extStaffInfo,根据传入的用户Id未找到对应的工作人员,传参:{}",JSON.toJSONString(staffParam)); + log.warn("com.epmet.service.impl.CustomerStaffServiceImpl.extStaffInfo,根据传入的用户Id未找到对应的工作人员,传参:{}", JSON.toJSONString(staffParam)); return null; } - @Override - public void updateRootManage(UpdateRootManageFormDTO formDTO) { - CustomerStaffDTO dto = baseDao.selectRootManage(formDTO.getOrgId(), formDTO.getRoleKey()); - if (null == dto) { - throw new RenException("查询客户管理员失败"); - } - dto.setRealName(formDTO.getRootManageName()); - dto.setMobile(formDTO.getRootManagePhone()); - update(dto); - } + @Override + public void updateRootManage(UpdateRootManageFormDTO formDTO) { + CustomerStaffDTO dto = baseDao.selectRootManage(formDTO.getOrgId(), formDTO.getRoleKey()); + if (null == dto) { + throw new RenException("查询客户管理员失败"); + } + dto.setRealName(formDTO.getRootManageName()); + dto.setMobile(formDTO.getRootManagePhone()); + update(dto); + } - @Override - public Result> selectCustomerList(CustomerListFormDTO formDTO) { + @Override + public Result> selectCustomerList(CustomerListFormDTO formDTO) { List listResultDTO = new ArrayList<>(); CustomerDTO customerDTO = new CustomerDTO(); - // 1.根据手机号,去 customer_staff表,进行查询; 查询结果 多条:字段 customer_id,user_id + // 1.根据手机号,去 customer_staff表,进行查询; 查询结果 多条:字段 customer_id,user_id List customerStaffList = baseDao.selectListCustomerStaffDTO(formDTO.getPhone()); //sun 2020.11.12 需求变更-之前pc工作端只能是工作端小程序的超级管理员能登陆 现调整为工作端小程序的工作人员均可登陆(使用账号密码登陆) start @@ -711,153 +703,157 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl customerInfo = operCrmOpenFeignClient.getCustomerInfo(customerDTO); - if (!customerInfo.success()) { - logger.warn(String.format("获取客户信息失败,调用%s服务查询客户名称失败,入参%s", ServiceConstant.OPER_CRM_SERVER, JSON.toJSONString(staffDTO.getCustomerId()))); - } else { - if (null != customerInfo.getData()){ - CustomerListResultDTO resultDTO = new CustomerListResultDTO(); - resultDTO.setCustomerId(customerInfo.getData().getId()); - resultDTO.setCustomerName(customerInfo.getData().getCustomerName()); - listResultDTO.add(resultDTO); - } - } - } - //2020.11.12 sun end - return new Result>().ok(listResultDTO); - } - - @Override - public Result selectStaffBasicInfo(String userId, String customerId) { - StaffBasicInfoResultDTO resultDTO = baseDao.selectStaffBasicInfo(userId); - if (null != resultDTO) { - resultDTO.setRoleList(baseDao.selectStaffRoles(userId, resultDTO.getCustomerId())); - CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, userId); - if (null != staffInfo) { - resultDTO.setAgencyId(staffInfo.getAgencyId()); - resultDTO.setAgencyName(staffInfo.getAgencyName()); - resultDTO.setLevel(staffInfo.getLevel()); - resultDTO.setLongitude(staffInfo.getLongitude()); - resultDTO.setLatitude(staffInfo.getLatitude()); - AgencyInfoCache agency = CustomerOrgRedis.getAgencyInfo(staffInfo.getAgencyId()); - if (agency != null){ - resultDTO.setAreaCodePath(!CollectionUtils.isEmpty(agency.getAreaCodePath()) ? agency.getAreaCodePath() : new ArrayList<>()); - resultDTO.setAreaCode(StringUtils.isNotBlank(agency.getAreaCode()) ? agency.getAreaCode() : StrConstant.EPMETY_STR); - resultDTO.setLevel(agency.getLevel()); - } - } - //获取工作人员所属客户名 - CustomerDTO dto = new CustomerDTO(); - dto.setId(customerId); - Result customerResult = operCrmOpenFeignClient.getCustomerInfo(dto); - if (!customerResult.success()) { - throw new RenException(customerResult.getCode(), customerResult.getMsg()); - } - if (null != customerResult.getData()) { - resultDTO.setCustomerName(customerResult.getData().getCustomerName()); - } - } - return new Result().ok(resultDTO); - } - - /** - * @param formDTO - * @return - * @Author sun - * @Description PC工作端登陆-根据客户Id和手机号查询登陆用户信息 - **/ - @Override - public GovWebOperLoginResultDTO getStaffIdAndPwd(GovWebOperLoginFormDTO formDTO) { - //1.根据客户Id和手机号查询用户信息 - return baseDao.selectByCustomerIdAndPhone(formDTO); - } - - /** - * 根据staffId查询用户基本信息 - * @author sun - * @return - */ - @Override - public BasicInfoResultDTO getStaffBasicInfo(StaffBasicInfoFromDTO fromDTO) { - return baseDao.getStaffBasicInfo(fromDTO); - } - - @Override - public List list(String customerId, String realName, String mobile, List userIds) { - return baseDao.listDTOS(customerId, realName, mobile, userIds); - } - - /** - * 【通讯录】工作人员解禁 - * @author sun - */ - @Override - public void enableStaff(EnableStaffFormDTO fromDTO) { - CustomerStaffEntity customerStaffEntity = baseDao.selectByUserId(fromDTO.getStaffId()); - if (null == customerStaffEntity) { - logger.error(String.format("工作人员解禁,未查询到被解禁人信息,被解禁人Id->%s", fromDTO.getStaffId())); - throw new RenException("未查询到被解禁人信息,请核对后操作"); - } - CustomerStaffEntity staffEntity = new CustomerStaffEntity(); - staffEntity.setId(customerStaffEntity.getId()); - staffEntity.setEnableFlag(CustomerStaffConstant.ENABLE); - baseDao.updateById(staffEntity); - } - - /** - * @Author sun - * @Description 根据工作人员姓名批量查询基础信息数据 - **/ - @Override - public List getByRealNames(GetByRealNamesFormDTO formDTO) { - return baseDao.getByRealNames(formDTO); - } - - /** - * @Author sun - * @Description 【事件】网格员服务电话 - **/ - @Override - public List gridMobileList(String gridId, String userId) { - List resultList = new ArrayList<>(); - //1.查询网格下工作人员列表 - CommonGridIdFormDTO dto = new CommonGridIdFormDTO(); - dto.setGridId(gridId); - dto.setUserId(userId); - Result> gridStaffs = govOrgOpenFeignClient.getGridStaffs(dto); - if (!gridStaffs.success()) { - throw new RenException("获取网格下工作人员列表失败!"); - } - if (gridStaffs.getData().size() < NumConstant.ONE) { - return resultList; - } + for (CustomerStaffDTO staffDTO : customerStaffList) { + customerDTO.setId(staffDTO.getCustomerId()); + Result customerInfo = operCrmOpenFeignClient.getCustomerInfo(customerDTO); + if (!customerInfo.success()) { + logger.warn(String.format("获取客户信息失败,调用%s服务查询客户名称失败,入参%s", ServiceConstant.OPER_CRM_SERVER, JSON.toJSONString(staffDTO.getCustomerId()))); + } else { + if (null != customerInfo.getData()) { + CustomerListResultDTO resultDTO = new CustomerListResultDTO(); + resultDTO.setCustomerId(customerInfo.getData().getId()); + resultDTO.setCustomerName(customerInfo.getData().getCustomerName()); + listResultDTO.add(resultDTO); + } + } + } + //2020.11.12 sun end + return new Result>().ok(listResultDTO); + } - //2.查询工作人员中拥有网格长网格员角色的人员列表 - List staffRoleList = staffRoleDao.staffRoleList(gridStaffs.getData()); - - //3.查询工作人员基础信息 - List staffIdList = staffRoleList.stream().map(GridMobileListResultDTO.Role::getStaffId).collect(Collectors.toList()); - staffIdList = staffIdList.stream().distinct().collect(Collectors.toList()); - List list = baseDao.selectStaffByIds(staffIdList, Constant.ENABLE); - - //4.封装数据并返回 - resultList = ConvertUtils.sourceToTarget(list, GridMobileListResultDTO.class); - List roleList = null; - for (GridMobileListResultDTO re : resultList) { - roleList = new ArrayList<>(); - for (GridMobileListResultDTO.Role r : staffRoleList) { - if (re.getStaffId().equals(r.getStaffId())) { - GridMobileListResultDTO.Role role = ConvertUtils.sourceToTarget(r, GridMobileListResultDTO.Role.class); - roleList.add(role); - } - } - re.setGridId(gridId); - re.setRoleList(roleList); - } - return resultList; - } + @Override + public Result selectStaffBasicInfo(String userId, String customerId) { + StaffBasicInfoResultDTO resultDTO = baseDao.selectStaffBasicInfo(userId); + if (null != resultDTO) { + resultDTO.setRoleList(baseDao.selectStaffRoles(userId, resultDTO.getCustomerId())); + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, userId); + if (null != staffInfo) { + resultDTO.setAgencyId(staffInfo.getAgencyId()); + resultDTO.setAgencyName(staffInfo.getAgencyName()); + resultDTO.setLevel(staffInfo.getLevel()); + resultDTO.setLongitude(staffInfo.getLongitude()); + resultDTO.setLatitude(staffInfo.getLatitude()); + AgencyInfoCache agency = CustomerOrgRedis.getAgencyInfo(staffInfo.getAgencyId()); + if (agency != null) { + resultDTO.setAreaCodePath(!CollectionUtils.isEmpty(agency.getAreaCodePath()) ? agency.getAreaCodePath() : new ArrayList<>()); + resultDTO.setAreaCode(StringUtils.isNotBlank(agency.getAreaCode()) ? agency.getAreaCode() : StrConstant.EPMETY_STR); + resultDTO.setLevel(agency.getLevel()); + } + } + //获取工作人员所属客户名 + CustomerDTO dto = new CustomerDTO(); + dto.setId(customerId); + Result customerResult = operCrmOpenFeignClient.getCustomerInfo(dto); + if (!customerResult.success()) { + throw new RenException(customerResult.getCode(), customerResult.getMsg()); + } + if (null != customerResult.getData()) { + resultDTO.setCustomerName(customerResult.getData().getCustomerName()); + } + } + return new Result().ok(resultDTO); + } + + /** + * @param formDTO + * @return + * @Author sun + * @Description PC工作端登陆-根据客户Id和手机号查询登陆用户信息 + **/ + @Override + public GovWebOperLoginResultDTO getStaffIdAndPwd(GovWebOperLoginFormDTO formDTO) { + //1.根据客户Id和手机号查询用户信息 + return baseDao.selectByCustomerIdAndPhone(formDTO); + } + + /** + * 根据staffId查询用户基本信息 + * + * @return + * @author sun + */ + @Override + + public BasicInfoResultDTO getStaffBasicInfo(StaffBasicInfoFromDTO fromDTO) { + return baseDao.getStaffBasicInfo(fromDTO); + } + + @Override + public List list(String customerId, String realName, String mobile, List userIds) { + return baseDao.listDTOS(customerId, realName, mobile, userIds); + } + + /** + * 【通讯录】工作人员解禁 + * + * @author sun + */ + @Override + public void enableStaff(EnableStaffFormDTO fromDTO) { + CustomerStaffEntity customerStaffEntity = baseDao.selectByUserId(fromDTO.getStaffId()); + if (null == customerStaffEntity) { + logger.error(String.format("工作人员解禁,未查询到被解禁人信息,被解禁人Id->%s", fromDTO.getStaffId())); + throw new RenException("未查询到被解禁人信息,请核对后操作"); + } + CustomerStaffEntity staffEntity = new CustomerStaffEntity(); + staffEntity.setId(customerStaffEntity.getId()); + staffEntity.setEnableFlag(CustomerStaffConstant.ENABLE); + baseDao.updateById(staffEntity); + } + + /** + * @Author sun + * @Description 根据工作人员姓名批量查询基础信息数据 + **/ + @Override + public List getByRealNames(GetByRealNamesFormDTO formDTO) { + return baseDao.getByRealNames(formDTO); + } + + /** + * @Author sun + * @Description 【事件】网格员服务电话 + **/ + @Override + public List gridMobileList(String gridId, String userId) { + List resultList = new ArrayList<>(); + //1.查询网格下工作人员列表 + CommonGridIdFormDTO dto = new CommonGridIdFormDTO(); + dto.setGridId(gridId); + dto.setUserId(userId); + Result> gridStaffs = govOrgOpenFeignClient.getGridStaffs(dto); + if (!gridStaffs.success()) { + throw new RenException("获取网格下工作人员列表失败!"); + } + if (gridStaffs.getData().size() < NumConstant.ONE) { + return resultList; + } + + //2.查询工作人员中拥有网格长网格员角色的人员列表 + List staffRoleList = staffRoleDao.staffRoleList(gridStaffs.getData()); + + //3.查询工作人员基础信息 + List staffIdList = staffRoleList.stream().map(GridMobileListResultDTO.Role::getStaffId).collect(Collectors.toList()); + staffIdList = staffIdList.stream().distinct().collect(Collectors.toList()); + List list = baseDao.selectStaffByIds(staffIdList, Constant.ENABLE); + + //4.封装数据并返回 + resultList = ConvertUtils.sourceToTarget(list, GridMobileListResultDTO.class); + List roleList = null; + for (GridMobileListResultDTO re : resultList) { + roleList = new ArrayList<>(); + for (GridMobileListResultDTO.Role r : staffRoleList) { + if (re.getStaffId().equals(r.getStaffId())) { + GridMobileListResultDTO.Role role = ConvertUtils.sourceToTarget(r, GridMobileListResultDTO.Role.class); + roleList.add(role); + } + } + re.setGridId(gridId); + re.setRoleList(roleList); + } + + return resultList; + } } 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 079c51dcf7..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 @@ -23,7 +23,10 @@ import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.feign.ResultDataResolver; import com.epmet.commons.tools.redis.RedisKeys; import com.epmet.commons.tools.redis.RedisUtils; +import com.epmet.commons.tools.redis.common.CustomerOrgRedis; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; +import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; +import com.epmet.commons.tools.redis.common.bean.GridInfoCache; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.EpmetRequestHolder; import com.epmet.commons.tools.utils.FileUtils; @@ -47,6 +50,7 @@ import com.epmet.enums.IcResiUserTableEnum; import com.epmet.excel.handler.IcResiImportDynamicExcelListener; import com.epmet.excel.handler.IcResiVirtualSheetImportListener; import com.epmet.feign.*; +import com.epmet.resi.partymember.feign.ResiPartyMemberOpenFeignClient; import com.epmet.service.IcResiUserImportService; import com.epmet.service.UserService; import com.google.common.cache.Cache; @@ -68,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.*; @@ -87,7 +92,7 @@ import java.util.stream.Collectors; public class IcResiUserImportServiceImpl implements IcResiUserImportService, ResultDataResolver { public static final List controlGroup1 = Arrays.asList("input", "textarea", "datepicker", "daterange"); - public static final List controlGroup2 = Arrays.asList("select", "radio"); + public static final List controlGroup2 = Arrays.asList("select", "radio", "cascader"); /** * 15位身份证号的正则表达式 @@ -165,6 +170,8 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient; @Autowired private OssFeignClient ossFeignClient; + @Autowired + private ResiPartyMemberOpenFeignClient partyMemberOpenFeignClient; /** * 子表中不需要的列。因为主表中需要身份证号,网格等信息,但子表中不需要这些列必填,只要有身份证号即可,因此字表判断的时候需要排除这些列 @@ -504,8 +511,15 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res columnAndValues.put("IS_FLOATING", existingResiMap.get("IS_FLOATING")); } - columnAndValues.put("AGENCY_ID", currUserAgencyId); - columnAndValues.put("PIDS", currUserAgencyPids); + String gridId = columnAndValues.get("GRID_ID"); + AgencyInfoCache agencyInfo = getAgencyInfo(gridId); + if (agencyInfo != null) { + columnAndValues.put("AGENCY_ID", agencyInfo.getId()); + columnAndValues.put("PIDS", agencyInfo.getPids()); + } else { + String msg = String.format("【居民信息导入】根据网格查询组织失败,网格ID:%s", gridId); + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), msg, msg); + } columnAndValues.put("CUSTOMER_ID", EpmetRequestHolder.getHeader(AppClientConstant.CUSTOMER_ID.toLowerCase())); columnAndValues.put("UPDATED_BY", currentUserId); @@ -562,6 +576,11 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res } } + private AgencyInfoCache getAgencyInfo(String gridId) { + GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(gridId); + return CustomerOrgRedis.getAgencyInfo(gridInfo.getPid()); + } + /** * 执行指定的检查以及数据的补充 * @param columnAndValues @@ -629,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(); // 性别 & 生日 & 老年人 @@ -798,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(); @@ -892,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]; @@ -1326,6 +1350,9 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res case "/sys/dict/data/relationship": options = getResultDataOrThrowsException(adminOpenFeignClient.getRelationshipOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; + case "/resi/partymember/icPartyOrg/branchlist": + options = this.listBranchOptions(); + break; default: log.warn("listRemoteOptions url is not supported"); @@ -1368,6 +1395,20 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res } + /** + * 支部列表选项 + * @return + */ + private List listBranchOptions() { + String msg = "查询支部列表失败"; + List branchList = getResultDataOrThrowsException(partyMemberOpenFeignClient.branchlist(), + ServiceConstant.RESI_PARTYMEMBER_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), msg, msg); + //结果平铺展开 + Map resultMap = new HashMap<>(); + branchList.forEach(option-> option.getCurrenNodeAllChild(option,resultMap)); + return branchList; + } + @Override public Map listRemoteCascadeOptions(String pureUri, String cascadeItemId, Map columnWrappers, String currentStaffAgencyId, String query) { ColumnWrapper cascadeItemColumnWrapper = null; @@ -1383,9 +1424,12 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res options = getResultDataOrThrowsException(epmetHeartOpenFeignClient.getDemandOptions(), ServiceConstant.EPMET_USER_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; + case "/resi/partymember/icPartyOrg/branchlist": + options = this.listBranchOptions(); + break; } if (options == null) { - return null; + return new HashMap<>(); } //结果平铺展开 Map resultMap = new HashMap<>(); 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 0ad7275af4..a7d1183196 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 @@ -50,6 +50,7 @@ import com.epmet.constant.UserConstant; import com.epmet.dao.IcPartyMemberDao; import com.epmet.dao.IcResiUserDao; import com.epmet.dao.IcVolunteerDao; +import com.epmet.dao.UserBaseInfoDao; import com.epmet.dto.*; import com.epmet.dto.form.*; import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO; @@ -60,6 +61,7 @@ import com.epmet.excel.support.ExportResiUserItemDTO; import com.epmet.feign.*; import com.epmet.resi.partymember.feign.ResiPartyMemberOpenFeignClient; import com.epmet.service.*; +import com.epmet.dto.result.demand.OptionDTO; import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; @@ -139,6 +141,10 @@ public class IcResiUserServiceImpl extends BaseServiceImpl getWrapper(Map params) { String id = (String) params.get(FieldConstant.ID_HUMP); @@ -264,6 +270,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()); @@ -286,6 +304,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); } @@ -464,6 +484,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()); @@ -539,6 +572,8 @@ public class IcResiUserServiceImpl extends BaseServiceImpl tableMap = new HashMap<>(); formDTO.forEach(d -> { if (!"ic_resi_user".equals(d.getTableName())) { for (LinkedHashMap hash : d.getList()) { @@ -548,6 +583,11 @@ 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()); @@ -1830,19 +1871,34 @@ public class IcResiUserServiceImpl extends BaseServiceImpl result = govOrgOpenFeignClient.getDelAgencyGridIdList(formDTO.getOrgId()); + if (!result.success()) { + throw new EpmetException(String.format("获取当前组织及下级已删除组织、网格列表失败,组织Id->%s", formDTO.getUserId())); + } + formDTO.setAgencyIdList(result.getData().getAgencyIdList()); + formDTO.setGridIdList(result.getData().getGridIdList()); + } + //2.根据入参值查询对应的房屋统计数据 - List list = baseDao.userChart(formDTO.getOrgId(), formDTO.getOrgType()); + List list = baseDao.userChart(formDTO.getOrgId(), formDTO.getOrgType(), formDTO.getAgencyIdList(), formDTO.getGridIdList()); //3.汇总数据 AtomicInteger userTotal = new AtomicInteger(); + AtomicInteger czUserTotal = new AtomicInteger(); + AtomicInteger ldUserTotal = new AtomicInteger(); list.forEach(l -> { userTotal.addAndGet(l.getNum()); if ("0".equals(l.getIsFloating())) { - resultDTO.setCzUserTotal(l.getNum()); + czUserTotal.addAndGet(l.getNum()); } else { - resultDTO.setLdUserTotal(l.getNum()); + ldUserTotal.addAndGet(l.getNum()); } }); resultDTO.setUserTotal(userTotal.get()); + resultDTO.setCzUserTotal(czUserTotal.get()); + resultDTO.setLdUserTotal(ldUserTotal.get()); resultDTO.setCzUserRatio(Double.valueOf((resultDTO.getUserTotal() == 0 || resultDTO.getCzUserTotal() > resultDTO.getUserTotal()) ? "0" : numberFormat.format(((float) resultDTO.getCzUserTotal() / (float) resultDTO.getUserTotal()) * 100))); resultDTO.setLdUserRatio(Double.valueOf((resultDTO.getUserTotal() == 0 || resultDTO.getLdUserTotal() > resultDTO.getUserTotal()) ? "0" : numberFormat.format(((float) resultDTO.getLdUserTotal() / (float) resultDTO.getUserTotal()) * 100))); resultDTO.setOrgId(formDTO.getOrgId()); @@ -2420,6 +2476,123 @@ public class IcResiUserServiceImpl extends BaseServiceImpl} + * @Author zhaoqifeng + * @Date 2022/6/16 14:58 + */ + @Override + public List getVolunteerList(String customerId, String agencyId) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcResiUserEntity::getCustomerId, customerId); + wrapper.and(wq -> wq.eq(IcResiUserEntity::getAgencyId, agencyId).or().like(IcResiUserEntity::getPids, agencyId)); + wrapper.eq(IcResiUserEntity::getIsVolunteer, NumConstant.ONE_STR); + wrapper.eq(IcResiUserEntity::getStatus, NumConstant.ZERO_STR); + List list = baseDao.selectList(wrapper); + if (CollectionUtils.isEmpty(list)) { + return Collections.emptyList(); + } + return list.stream().map(item -> { + OptionDataResultDTO dto = new OptionDataResultDTO(); + dto.setValue(item.getId()); + if (StringUtils.isNotBlank(item.getMobile())) { + dto.setLabel(item.getName().concat("(").concat(item.getMobile().concat(")"))); + } else { + dto.setLabel(item.getName()); + } + return dto; + }).collect(Collectors.toList()); + } + + /** + * 获取居民信息对应的居民用户ID + * + * @param icResiUserId + * @Param icResiUserId + * @Return {@link String} + * @Author zhaoqifeng + * @Date 2022/6/16 15:30 + */ + @Override + public List getUserId(String icResiUserId) { + IcResiUserEntity entity = baseDao.selectById(icResiUserId); + if (null == entity) { + return null; + } + //根据身份证获取小程序端居民信息 + LambdaQueryWrapper baseInfoWrapper = new LambdaQueryWrapper<>(); + baseInfoWrapper.eq(UserBaseInfoEntity::getCustomerId, entity.getCustomerId()); + baseInfoWrapper.eq(UserBaseInfoEntity::getIdNum, entity.getIdCard()); + List baseInfoList = userBaseInfoDao.selectList(baseInfoWrapper); + if (CollectionUtils.isEmpty(baseInfoList)) { + return null; + } + return baseInfoList.stream().map(UserBaseInfoEntity::getUserId).collect(Collectors.toList()); + } + + /** + * 根据身份证获取居民角色(目前只有是否是志愿者) + * + * @param formDTO + * @Param formDTO + * @Return {@link IcUserRoleResultDTO} + * @Author zhaoqifeng + * @Date 2022/5/31 9:50 + */ + @Override + public IcUserRoleResultDTO getUserRoleByIdCard(IcResiUserDTO formDTO) { + IcUserRoleResultDTO result = new IcUserRoleResultDTO(); + Map>> detail = new HashMap<>(); + result.setIsVolunteer(NumConstant.ZERO_STR); + result.setIsPartyMember(NumConstant.ZERO_STR); + //根据身份证获取小程序端居民信息 + LambdaQueryWrapper baseInfoWrapper = new LambdaQueryWrapper<>(); + baseInfoWrapper.eq(UserBaseInfoEntity::getCustomerId, formDTO.getCustomerId()); + baseInfoWrapper.eq(UserBaseInfoEntity::getIdNum, formDTO.getIdCard()); + List baseInfoList = userBaseInfoDao.selectList(baseInfoWrapper); + if (CollectionUtils.isNotEmpty(baseInfoList)) { + for (UserBaseInfoEntity baseInfo : baseInfoList) { + //获取志愿者信息 + Result volunteerResult = epmetHeartOpenFeignClient.queryUserVolunteerInfo(baseInfo.getUserId()); + if (!volunteerResult.success()) { + log.error("志愿者变更-获取小程序志愿者失败"); + continue; + } + if (null != volunteerResult.getData()) { + result.setIsVolunteer(NumConstant.ONE_STR); + break; + } + } + } + //获取党员信息 + com.epmet.resi.partymember.dto.partymember.IcPartyMemberDTO memberFormDTO = new com.epmet.resi.partymember.dto.partymember.IcPartyMemberDTO(); + memberFormDTO.setCustomerId(formDTO.getCustomerId()); + memberFormDTO.setIdCard(formDTO.getIdCard()); + Result 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; + } + /** * desc:根据字段值获取 options * @param customerId diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java index bc88226da3..f72d695c5e 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java @@ -17,6 +17,7 @@ package com.epmet.service.impl; +import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; @@ -45,7 +46,6 @@ import com.epmet.service.IcUserChangeRecordService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.collections4.ListUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -175,7 +175,6 @@ public class IcUserChangeRecordServiceImpl extends BaseServiceImpl"+customerId); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); @@ -198,15 +197,15 @@ public class IcUserChangeRecordServiceImpl extends BaseServiceImpl> icUserList = new ArrayList<>(); do { //一千条一循环查询客户下居民数据 - PageHelper.startPage(pageNo, NumConstant.ONE_THOUSAND); + PageHelper.startPage(pageNo, NumConstant.ONE_THOUSAND,false); icUserList = icResiUserDao.getIcUserList(customerId, columns); - pageNo++; + //不需要分页了 因为sql中已经去掉了一些存在变更记录的数据了 + //pageNo++; //3.遍历封装数据 for (Map map : icUserList){ //存放一个人的类别为是的变更明细数据 - List subList = new ArrayList<>(); - String changeId = UUID.randomUUID().toString().replaceAll("-", ""); + String changeId = IdWorker.getIdStr(); for (IcResiCategoryStatsConfigDTO dto : categoryListResult.getData()){ if(map.containsKey(dto.getColumnName())&&"1".equals(map.get(dto.getColumnName()))){ detailed = new IcUserChangeDetailedEntity(); @@ -228,12 +227,10 @@ public class IcUserChangeRecordServiceImpl extends BaseServiceImpl NumConstant.ZERO) { - detailedList.addAll(subList); - } + if (!hash.containsKey(map.get("CREATED_BY"))) { CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(customerId, map.get("CREATED_BY")); //被删除或被移除的工作人员,名字为空 @@ -256,21 +253,35 @@ public class IcUserChangeRecordServiceImpl extends BaseServiceImpl= NumConstant.FIVE_HUNDRED){ + delAndInsertChangeRecord(customerId, changeList, detailedList); + } } } while (icUserList.size() == NumConstant.ONE_THOUSAND); //4.批量新增数据,先删后增【只删除新增节点的历史数据】 //4-1.删除待处理的人员数据【这类人是指在变更记录表中不存在新增节点数据的人】 + //最后再处理一批 + delAndInsertChangeRecord(customerId, changeList, detailedList); + } + + @Transactional(rollbackFor = Exception.class) + public void delAndInsertChangeRecord(String customerId, List changeList, List detailedList) { + if (CollectionUtils.isEmpty(changeList)) { + log.info("customerId:{}初始变更记录数据 已完成!", customerId); + return; + } List icUserIdList = changeList.stream().map(IcUserChangeRecordEntity::getIcUserId).collect(Collectors.toList()); - List> partition = ListUtils.partition(icUserIdList, NumConstant.FIVE_HUNDRED); - partition.forEach(part -> { - baseDao.delByCustomerId(customerId, "add", part); - icUserChangeDetailedService.delByCustomerId(customerId, "add", part); - }); + baseDao.delByCustomerId(customerId, "add", icUserIdList); + icUserChangeDetailedService.delByCustomerId(customerId, "add", icUserIdList); log.info("初始变更记录数据,总条数->" + changeList.size()); icUserChangeRecordService.insertBatch(changeList); log.info("初始变更记录明细数据,总条数->" + detailedList.size()); icUserChangeDetailedService.insertBatch(detailedList); + changeList.clear(); + detailedList.clear(); + icUserIdList.clear(); } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVolunteerPolyServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVolunteerPolyServiceImpl.java index c2de05f566..f2477ae314 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVolunteerPolyServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVolunteerPolyServiceImpl.java @@ -355,13 +355,15 @@ public class IcVolunteerPolyServiceImpl extends BaseServiceImpl baseInfoWrapper = new LambdaQueryWrapper<>(); baseInfoWrapper.eq(UserBaseInfoEntity::getCustomerId, customerId); baseInfoWrapper.eq(UserBaseInfoEntity::getIdNum, icUser.getIdCard()); - UserBaseInfoEntity baseInfo = userBaseInfoDao.selectOne(baseInfoWrapper); - if (null != baseInfo) { - ResiVolunteerAuthenticateFormDTO formDTO = new ResiVolunteerAuthenticateFormDTO(); - formDTO.setCustomerId(customerId); - formDTO.setUserId(baseInfo.getUserId()); - formDTO.setGridId(icUser.getGridId()); - epmetHeartOpenFeignClient.addVolunteer(formDTO); + List baseInfoList = userBaseInfoDao.selectList(baseInfoWrapper); + if (CollectionUtils.isNotEmpty(baseInfoList)) { + baseInfoList.forEach(baseInfo -> { + ResiVolunteerAuthenticateFormDTO formDTO = new ResiVolunteerAuthenticateFormDTO(); + formDTO.setCustomerId(customerId); + formDTO.setUserId(baseInfo.getUserId()); + formDTO.setGridId(icUser.getGridId()); + epmetHeartOpenFeignClient.addVolunteer(formDTO); + }); } } else { if (!isDyzxh) { diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java index a808b172e7..a9bf66fbd7 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java @@ -402,11 +402,10 @@ public class UserBadgeServiceImpl implements UserBadgeService { public void reloadCustomerBadge(String customerId){ userBadgeRedis.delCustomerBadge(customerId); List userBadgeListResultDTOS = userBadgeDao.selectAllBadge(customerId); - if (CollectionUtils.isEmpty(userBadgeListResultDTOS)){ - throw new RenException("客户徽章缓存初始化未查到数据"); + if (!CollectionUtils.isEmpty(userBadgeListResultDTOS)){ + userBadgeRedis.setCustomerBadge(userBadgeListResultDTOS, customerId); } userBadgeRedis.batchClearUserBadgeCache(customerId); - userBadgeRedis.setCustomerBadge(userBadgeListResultDTOS, customerId); } /** diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.53__ic_resimember_huji.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.53__ic_resimember_huji.sql new file mode 100644 index 0000000000..e10f045969 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.53__ic_resimember_huji.sql @@ -0,0 +1,2 @@ +alter table ic_resi_member add COLUMN DOMICILE_PLACE_CODE VARCHAR(64) DEFAULT '' comment '户籍所在地行政地区编码' AFTER DOMICILE_PLACE; +alter table ic_resi_member add COLUMN DOMICILE_PLACE_CODE_PATH VARCHAR(255) DEFAULT '' comment '户籍所在地行政地区编码全路径,包含自己,英文逗号隔开例如:37,3702,370203' AFTER DOMICILE_PLACE_CODE; \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.54__ic_resicollect_reamrk.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.54__ic_resicollect_reamrk.sql new file mode 100644 index 0000000000..4d12e2fca0 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.54__ic_resicollect_reamrk.sql @@ -0,0 +1,2 @@ +alter table ic_resi_collect MODIFY COLUMN `HOUSE_TYPE` varchar(1) NOT NULL COMMENT '房屋状态与ic_house表的RENT_FLAG一致取值1:出租 0:自住 2:闲置 3:未售出'; +alter table ic_resi_member add COLUMN REMARK VARCHAR(512) DEFAULT '' COMMENT '备注' AFTER WORK_PLACE; \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectDao.xml index ebfe3767fd..d2ca4339c1 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectDao.xml @@ -16,16 +16,19 @@ - + + - select m.`NAME` AS memberName, m.ID_NUM AS memberIdNum, @@ -52,10 +58,16 @@ m.HE_SUAN_COUNT AS heSuanCount, m.YMJZ AS ymjz, m.DOMICILE_PLACE as domicilePlace, - m.WORK_PLACE as workPlace + m.DOMICILE_PLACE_CODE as domicilePlaceCode, + m.DOMICILE_PLACE_CODE_PATH as domicilePlaceCodePath, + m.WORK_PLACE as workPlace, + m.REMARK as remark from ic_resi_member m where m.DEL_FLAG = 0 and m.IC_RESI_COLLECT_ID = #{id} + + AND m.DOMICILE_PLACE LIKE CONCAT('%',#{domicilePlace},'%') + diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiMemberDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiMemberDao.xml index b9bc9300dd..13db077a3c 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiMemberDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiMemberDao.xml @@ -14,7 +14,10 @@ m.HE_SUAN_COUNT, m.YMJZ, m.DOMICILE_PLACE, - m.WORK_PLACE + m.WORK_PLACE, + m.DOMICILE_PLACE_CODE, + m.DOMICILE_PLACE_CODE_PATH, + m.REMARK FROM ic_resi_member m WHERE diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml index 8046c6f51d..edb2455bee 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 @@ -55,6 +55,14 @@ ) + + DELETE + FROM + ${tableName} + WHERE + ic_resi_user = #{resiUserId} + + UPDATE ${tableName} SET @@ -120,6 +128,16 @@ ${subCondition.tableName}.${subCondition.columnName} like concat('%',#{colValue},'%') + + + + + + and ${subCondition.tableName}.${colValue} ='1' + + + + @@ -940,9 +958,20 @@ ic_resi_user WHERE del_flag = '0' + AND status = '0' AND (agency_id = #{orgId} OR pids LIKE CONCAT('%', #{orgId}, '%')) + + + #{agencyId} + + + + + #{gridId} + + AND grid_id = #{orgId} 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..6c5066bbe0 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 @@ -61,7 +61,7 @@