Browse Source

Merge branch 'dev_guidance' into develop

dev_shibei_match
zhaoqifeng 4 years ago
parent
commit
3c9eb71a27
  1. 1
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java
  2. 5
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideServiceImpl.java
  3. 139
      epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.7__create_guide_table.sql
  4. 12
      epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.8__insert_default_guidecategory.sql
  5. 2
      epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideDao.xml

1
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java

@ -598,6 +598,7 @@ public class EpmetUserServiceImpl implements EpmetUserService {
log.error("getStaffInfo have any agency staffId:{}",staffId);
return null;
}
result.setAgencyId(agencyDTO.getId());
result.setAgencyName(agencyDTO.getOrganizationName());
StaffOrgRelationResultDTO fromOrgTypeDto = govOrgService.getStaffFromOrgType(staffId);
String fromOrgType = OrgTypeEnum.AGENCY.getCode();

5
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideServiceImpl.java

@ -114,7 +114,6 @@ public class GuideServiceImpl extends BaseServiceImpl<GuideDao, GuideEntity> imp
public void save(GuideDTO dto) {
GuideEntity entity = ConvertUtils.sourceToTarget(dto, GuideEntity.class);
insert(entity);
ConvertUtils.sourceToTarget(entity, GuideDTO.class);
}
@Override
@ -176,7 +175,7 @@ public class GuideServiceImpl extends BaseServiceImpl<GuideDao, GuideEntity> imp
throw new RenException(EpmetErrorCode.GUIDE_IS_NULL.getCode());
}
//保存办事指南表
GuideDTO guideDTO = new GuideDTO();
GuideEntity guideDTO = new GuideEntity();
guideDTO.setCustomerId(tokenDto.getCustomerId());
guideDTO.setOrgId(formDTO.getOrgId());
guideDTO.setOrgType(formDTO.getOrgType());
@ -197,7 +196,7 @@ public class GuideServiceImpl extends BaseServiceImpl<GuideDao, GuideEntity> imp
guideDTO.setPid(result.getData().getAgencyId());
}
guideDTO.setPids(result.getData().getPids().concat(":").concat(result.getData().getAgencyId()));
save(guideDTO);
insert(guideDTO);
//保存办事指南内容模块
if (CollectionUtils.isNotEmpty(formDTO.getModuleList())) {
List<GuideModuleEntity> guideModuleList = formDTO.getModuleList().stream().map(item -> {

139
epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.7__create_guide_table.sql

@ -0,0 +1,139 @@
CREATE TABLE `guide` (
`ID` varchar(64) NOT NULL COMMENT 'ID 唯一标识',
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID',
`ORG_TYPE` varchar(255) DEFAULT NULL COMMENT '机关agency 网格grid 部门dept',
`ORG_ID` varchar(64) NOT NULL COMMENT '发布单位ID',
`ORG_NAME` varchar(128) DEFAULT NULL COMMENT '发布单位名',
`PID` varchar(64) NOT NULL COMMENT '所属组织机构ID(customer_agency.id)',
`PIDS` varchar(1024) NOT NULL COMMENT '所有上级组织ID,英文:隔开',
`TITLE` varchar(128) NOT NULL COMMENT '标题',
`CATEGORY_CODE` varchar(32) NOT NULL COMMENT '分类ID',
`DEL_FLAG` int(11) 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 `guide_attachment` (
`ID` varchar(64) NOT NULL COMMENT '唯一标识',
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID',
`GUIDE_ID` varchar(64) NOT NULL COMMENT '办事指南ID',
`ATTACHMENT_NAME` varchar(128) DEFAULT NULL COMMENT '附件名',
`ATTACHMENT_SIZE` int(11) DEFAULT NULL COMMENT '文件大小 单位byte',
`ATTACHMENT_FORMAT` varchar(32) DEFAULT NULL COMMENT '文件格式 word、excel、pdf',
`ATTACHMENT_TYPE` varchar(32) DEFAULT NULL COMMENT '类型 ',
`ATTACHMENT_URL` varchar(256) DEFAULT NULL COMMENT '附件地址',
`DURATION` int(11) DEFAULT NULL COMMENT '语音或视频时长,秒',
`SORT` int(11) NOT NULL COMMENT '排序',
`DEL_FLAG` int(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=DYNAMIC COMMENT='办事指南附件';
CREATE TABLE `guide_category` (
`ID` varchar(64) NOT NULL COMMENT '主键',
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id,产品默认配置此列存储default',
`CATEGORY_NAME` varchar(64) NOT NULL COMMENT '分类名,客户内唯一',
`CATEGORY_CODE` varchar(64) NOT NULL COMMENT '分类编码:分类名的全拼; eg:gongjijin',
`SORT` int(11) NOT NULL COMMENT '排序',
`STATUS` varchar(10) NOT NULL COMMENT '状态 禁用disable 启用enable',
`DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除、1已删除',
`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 '更新时间',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='指南分类';
CREATE TABLE `guide_collection` (
`ID` varchar(64) NOT NULL COMMENT '主键',
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id',
`GUIDE_ID` varchar(64) NOT NULL COMMENT '指南ID',
`USER_ID` varchar(64) NOT NULL COMMENT '用户ID',
`APP` varchar(64) NOT NULL COMMENT '用户所属客户端 居民端resi 工作端gov',
`DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除、1已删除',
`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 '更新时间',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='指南收藏表';
CREATE TABLE `guide_external_link` (
`ID` varchar(64) NOT NULL COMMENT '主键',
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id',
`GUIDE_ID` varchar(64) NOT NULL COMMENT '指南ID',
`DESCRIPTION` varchar(64) NOT NULL COMMENT '链接说明',
`EXTERNAL_LINK` varchar(255) NOT NULL COMMENT '外部链接',
`SORT` int(11) NOT NULL COMMENT '排序',
`DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除、1已删除',
`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 '更新时间',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='指南外链表';
CREATE TABLE `guide_module` (
`ID` varchar(64) NOT NULL COMMENT '主键',
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id',
`GUIDE_ID` varchar(64) NOT NULL COMMENT '指南ID',
`MODULE_ID` varchar(64) NOT NULL COMMENT '模块ID',
`MODULE_CONTENT` longtext,
`DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除、1已删除',
`REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁',
`CREATED_BY` varchar(64) NOT NULL COMMENT '创建人',
`CREATED_TIME` datetime DEFAULT NULL COMMENT '创建时间',
`UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人',
`UPDATED_TIME` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='指南模块关联表';
CREATE TABLE `guide_module_dict` (
`ID` varchar(64) NOT NULL COMMENT '主键',
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id',
`MODULE_VALUE` varchar(64) NOT NULL COMMENT '模块key',
`MODULE_NAME` varchar(64) NOT NULL COMMENT '模块名',
`SORT` int(11) NOT NULL COMMENT '排序',
`STATUS` varchar(10) NOT NULL COMMENT '状态 禁用disable 启用enable',
`DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除、1已删除',
`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 '更新时间',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='指南模块字典表';
CREATE TABLE `guide_module_dict_default` (
`ID` varchar(64) NOT NULL COMMENT '主键',
`MODULE_VALUE` varchar(64) NOT NULL COMMENT '模块key',
`MODULE_NAME` varchar(64) NOT NULL COMMENT '模块名',
`SORT` int(11) NOT NULL COMMENT '排序',
`STATUS` varchar(10) NOT NULL COMMENT '状态 禁用disable 启用enable',
`DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除、1已删除',
`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 '更新时间',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='指南模块默认字典表';

12
epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.8__insert_default_guidecategory.sql

@ -0,0 +1,12 @@
INSERT INTO `epmet_gov_voice`.`guide_category` (`ID`, `CUSTOMER_ID`, `CATEGORY_NAME`, `CATEGORY_CODE`, `SORT`, `STATUS`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1', 'default', '社保', 'shebao', 0, 'enable', '0', 0, 'default', '2021-09-08 14:21:09', 'default', '2021-09-08 14:21:19');
INSERT INTO `epmet_gov_voice`.`guide_category` (`ID`, `CUSTOMER_ID`, `CATEGORY_NAME`, `CATEGORY_CODE`, `SORT`, `STATUS`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('2', 'default', '驾驶行驶', 'jiashixingshi', 1, 'enable', '0', 0, 'default', '2021-09-08 14:21:09', 'default', '2021-09-08 14:21:19');
INSERT INTO `epmet_gov_voice`.`guide_category` (`ID`, `CUSTOMER_ID`, `CATEGORY_NAME`, `CATEGORY_CODE`, `SORT`, `STATUS`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3', 'default', '公积金', 'gongjijin', 2, 'enable', '0', 0, 'default', '2021-09-08 14:21:09', 'default', '2021-09-08 14:21:19');
INSERT INTO `epmet_gov_voice`.`guide_category` (`ID`, `CUSTOMER_ID`, `CATEGORY_NAME`, `CATEGORY_CODE`, `SORT`, `STATUS`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('4', 'default', '出入境', 'churujing', 3, 'enable', '0', 0, 'default', '2021-09-08 14:21:09', 'default', '2021-09-08 14:21:19');
INSERT INTO `epmet_gov_voice`.`guide_category` (`ID`, `CUSTOMER_ID`, `CATEGORY_NAME`, `CATEGORY_CODE`, `SORT`, `STATUS`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5', 'default', '婚育收养', 'hunyushouyang', 4, 'enable', '0', 0, 'default', '2021-09-08 14:21:09', 'default', '2021-09-08 14:21:19');
INSERT INTO `epmet_gov_voice`.`guide_category` (`ID`, `CUSTOMER_ID`, `CATEGORY_NAME`, `CATEGORY_CODE`, `SORT`, `STATUS`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('6', 'default', '户政', 'huzheng', 5, 'enable', '0', 0, 'default', '2021-09-08 14:21:09', 'default', '2021-09-08 14:21:19');
INSERT INTO `epmet_gov_voice`.`guide_category` (`ID`, `CUSTOMER_ID`, `CATEGORY_NAME`, `CATEGORY_CODE`, `SORT`, `STATUS`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('7', 'default', '教育培训', 'jiaoyupeixun', 6, 'enable', '0', 0, 'default', '2021-09-08 14:21:09', 'default', '2021-09-08 14:21:19');
INSERT INTO `epmet_gov_voice`.`guide_category` (`ID`, `CUSTOMER_ID`, `CATEGORY_NAME`, `CATEGORY_CODE`, `SORT`, `STATUS`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('8', 'default', '劳动就业', 'laodongjiuye', 7, 'enable', '0', 0, 'default', '2021-09-08 14:21:09', 'default', '2021-09-08 14:21:19');
INSERT INTO `epmet_gov_voice`.`guide_category` (`ID`, `CUSTOMER_ID`, `CATEGORY_NAME`, `CATEGORY_CODE`, `SORT`, `STATUS`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('9', 'default', '办税指南', 'banshuizhinan', 8, 'enable', '0', 0, 'default', '2021-09-08 14:21:09', 'default', '2021-09-08 14:21:19');
INSERT INTO `epmet_gov_voice`.`guide_category` (`ID`, `CUSTOMER_ID`, `CATEGORY_NAME`, `CATEGORY_CODE`, `SORT`, `STATUS`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('10', 'default', '人才', 'rencai', 9, 'enable', '0', 0, 'default', '2021-09-08 14:21:09', 'default', '2021-09-08 14:21:19');
INSERT INTO `epmet_gov_voice`.`guide_category` (`ID`, `CUSTOMER_ID`, `CATEGORY_NAME`, `CATEGORY_CODE`, `SORT`, `STATUS`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('11', 'default', '职业资格', 'zhiyezige', 10, 'enable', '0', 0, 'default', '2021-09-08 14:21:09', 'default', '2021-09-08 14:21:19');
INSERT INTO `epmet_gov_voice`.`guide_category` (`ID`, `CUSTOMER_ID`, `CATEGORY_NAME`, `CATEGORY_CODE`, `SORT`, `STATUS`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('12', 'default', '医疗健康', 'yiliaojiankang', 11, 'enable', '0', 0, 'default', '2021-09-08 14:21:09', 'default', '2021-09-08 14:21:19');

2
epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideDao.xml

@ -64,7 +64,7 @@
g.TITLE AS "title",
gc.CATEGORY_NAME AS categoryName,
g.CREATED_BY AS createdId,
g.UPDATED_TIME AS updatedTime,
g.UPDATED_TIME AS updatedTime
FROM
guide g
INNER JOIN guide_category gc ON g.CATEGORY_CODE = gc.CATEGORY_CODE AND gc.DEL_FLAG = 0 AND gc.CUSTOMER_ID = #{customerId}

Loading…
Cancel
Save