Commit 5c7f20c6 authored by 廖旭伟's avatar 廖旭伟

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	base-manager/src/main/resources/config/mybatis-sqlmap-config.xml
parents d139bf94 f18ca5f7
...@@ -81,7 +81,6 @@ ...@@ -81,7 +81,6 @@
<a-button <a-button
type="link" type="link"
class="primary pointer" class="primary pointer"
:disabled="record.used ? true : false"
@click="handleUse(record.id)" @click="handleUse(record.id)"
>使用</a-button >使用</a-button
> >
......
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
</template> </template>
<!-- 类型 --> <!-- 类型 -->
<template slot="appType" slot-scope="text"> <template slot="appType" slot-scope="text">
{{ text.appType === 1 ? "应用程序" : "URL" }} {{ appType[text.appType] }}
</template> </template>
<!-- 上下架 --> <!-- 上下架 -->
<template slot="shelves" slot-scope="text"> <template slot="shelves" slot-scope="text">
...@@ -150,6 +150,13 @@ import { ...@@ -150,6 +150,13 @@ import {
import local from "@/utils/local"; import local from "@/utils/local";
import { mapMutations, mapGetters } from "vuex"; import { mapMutations, mapGetters } from "vuex";
import { pageSizeOptions } from "@/config/pageConfig.js"; import { pageSizeOptions } from "@/config/pageConfig.js";
let appType = {
1: "应用程序",
2: "URL",
3: "微信小程序",
4: "天府通办",
5: "Router",
};
const columns = [ const columns = [
{ {
title: "序号", title: "序号",
...@@ -211,6 +218,7 @@ export default { ...@@ -211,6 +218,7 @@ export default {
return { return {
api: process.env.VUE_APP_API_BASE_URL + "/", api: process.env.VUE_APP_API_BASE_URL + "/",
columns, columns,
appType,
siteId: local.getLocal("siteId"), siteId: local.getLocal("siteId"),
tableData: [], // 表格数据 tableData: [], // 表格数据
loading: false, loading: false,
......
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
</template> </template>
<!-- 类型 --> <!-- 类型 -->
<template slot="appType" slot-scope="text"> <template slot="appType" slot-scope="text">
{{ text.appType === 1 ? "应用程序" : "URL" }} {{ appType[text.appType] }}
</template> </template>
<!-- 上下架 --> <!-- 上下架 -->
<template slot="shelves" slot-scope="text"> <template slot="shelves" slot-scope="text">
...@@ -150,6 +150,13 @@ import { ...@@ -150,6 +150,13 @@ import {
import local from "@/utils/local"; import local from "@/utils/local";
import { mapMutations, mapGetters } from "vuex"; import { mapMutations, mapGetters } from "vuex";
import { pageSizeOptions } from "@/config/pageConfig.js"; import { pageSizeOptions } from "@/config/pageConfig.js";
let appType = {
1: "应用程序",
2: "URL",
3: "微信小程序",
4: "天府通办",
5: "Router",
};
const columns = [ const columns = [
{ {
title: "序号", title: "序号",
...@@ -211,6 +218,7 @@ export default { ...@@ -211,6 +218,7 @@ export default {
return { return {
api: process.env.VUE_APP_API_BASE_URL + "/", api: process.env.VUE_APP_API_BASE_URL + "/",
columns, columns,
appType,
siteId: local.getLocal("siteId"), siteId: local.getLocal("siteId"),
tableData: [], // 表格数据 tableData: [], // 表格数据
loading: false, loading: false,
......
...@@ -83,6 +83,7 @@ ...@@ -83,6 +83,7 @@
<a-radio :value="2"> URL </a-radio> <a-radio :value="2"> URL </a-radio>
<a-radio :value="3" v-if="form.type != 1"> 微信小程序 </a-radio> <a-radio :value="3" v-if="form.type != 1"> 微信小程序 </a-radio>
<a-radio :value="4" v-if="form.type != 2"> 天府通办 </a-radio> <a-radio :value="4" v-if="form.type != 2"> 天府通办 </a-radio>
<a-radio :value="5"> Router </a-radio>
</a-radio-group> </a-radio-group>
</a-form-model-item> </a-form-model-item>
<a-form-model-item <a-form-model-item
...@@ -406,6 +407,7 @@ export default { ...@@ -406,6 +407,7 @@ export default {
// 改变类型 // 改变类型
changeAppType(e) { changeAppType(e) {
let val = e.target.value; let val = e.target.value;
this.$refs.form.clearValidate(["url", "filePath"]);
if (val == 1) { if (val == 1) {
this.form.url = ""; this.form.url = "";
} else { } else {
......
-- ---------------------------- -- ----------------------------
2023-2-21 -- 2023-2-21
-- ---------------------------- -- ----------------------------
ALTER TABLE mortals_sys_window ADD COLUMN `duty` tinyint (1) default 0 COMMENT '无人值守(1.是,0.否)' AFTER hongqi; ALTER TABLE mortals_sys_window ADD COLUMN `duty` tinyint (1) default 0 COMMENT '无人值守(1.是,0.否)' AFTER hongqi;
ALTER TABLE mortals_sys_window ADD COLUMN `dutyContent` varchar (256) default "" COMMENT '显示内容' AFTER duty; ALTER TABLE mortals_sys_window ADD COLUMN `dutyContent` varchar (256) default "" COMMENT '显示内容' AFTER duty;
...@@ -21,7 +21,7 @@ ALTER TABLE mortals_sys_workman ADD COLUMN `operatorId` varchar (128) default " ...@@ -21,7 +21,7 @@ ALTER TABLE mortals_sys_workman ADD COLUMN `operatorId` varchar (128) default "
-- ---------------------------- -- ----------------------------
2023-3-28 -- 2023-3-28
-- ---------------------------- -- ----------------------------
ALTER TABLE mortals_sys_app_info_field ADD COLUMN `fieldTypeValue` varchar (255) default "" COMMENT '字段类型值,当字段类型为多选,单选时候,预设复选值' AFTER fieldType; ALTER TABLE mortals_sys_app_info_field ADD COLUMN `fieldTypeValue` varchar (255) default "" COMMENT '字段类型值,当字段类型为多选,单选时候,预设复选值' AFTER fieldType;
ALTER TABLE mortals_sys_app_info_field ADD COLUMN `defaultValue` varchar (255) default "" COMMENT '字段默认值' AFTER fieldValue; ALTER TABLE mortals_sys_app_info_field ADD COLUMN `defaultValue` varchar (255) default "" COMMENT '字段默认值' AFTER fieldValue;
...@@ -44,14 +44,14 @@ ALTER TABLE mortals_sys_site_matter ADD COLUMN `hot` tinyint(2) DEFAULT '0' ...@@ -44,14 +44,14 @@ ALTER TABLE mortals_sys_site_matter ADD COLUMN `hot` tinyint(2) DEFAULT '0'
ALTER TABLE mortals_sys_site_matter ADD COLUMN `display` tinyint(2) DEFAULT '1' COMMENT '显示(0.否,1.是)' AFTER hot; ALTER TABLE mortals_sys_site_matter ADD COLUMN `display` tinyint(2) DEFAULT '1' COMMENT '显示(0.否,1.是)' AFTER hot;
-- ---------------------------- -- ----------------------------
2023-4-23 -- 2023-4-23
-- ---------------------------- -- ----------------------------
ALTER TABLE mortals_sys_site_theme_matter ADD COLUMN `hot` tinyint(2) DEFAULT '0' COMMENT '热门(0.否,1.是)' AFTER userType; ALTER TABLE mortals_sys_site_theme_matter ADD COLUMN `hot` tinyint(2) DEFAULT '0' COMMENT '热门(0.否,1.是)' AFTER userType;
ALTER TABLE mortals_sys_site_theme_matter ADD COLUMN `display` tinyint(2) DEFAULT '1' COMMENT '显示(0.否,1.是)' AFTER hot; ALTER TABLE mortals_sys_site_theme_matter ADD COLUMN `display` tinyint(2) DEFAULT '1' COMMENT '显示(0.否,1.是)' AFTER hot;
-- ---------------------------- -- ----------------------------
2023-4-25 -- 2023-4-25
-- ---------------------------- -- ----------------------------
-- ---------------------------- -- ----------------------------
-- 站点大厅信息表 -- 站点大厅信息表
...@@ -100,14 +100,14 @@ INSERT INTO `mortals_xhx_resource` VALUES (null, '大厅窗口-菜单管理-维 ...@@ -100,14 +100,14 @@ INSERT INTO `mortals_xhx_resource` VALUES (null, '大厅窗口-菜单管理-维
-- ---------------------------- -- ----------------------------
2023-5-04 -- 2023-5-04
-- ---------------------------- -- ----------------------------
ALTER TABLE mortals_sys_window ADD COLUMN `nameDesc` varchar (256) default "" COMMENT '名称描述' AFTER englishName; ALTER TABLE mortals_sys_window ADD COLUMN `nameDesc` varchar (256) default "" COMMENT '名称描述' AFTER englishName;
ALTER TABLE mortals_sys_window ADD COLUMN `englishNameDesc` varchar (256) default "" COMMENT '英文名称描述' AFTER nameDesc; ALTER TABLE mortals_sys_window ADD COLUMN `englishNameDesc` varchar (256) default "" COMMENT '英文名称描述' AFTER nameDesc;
-- ---------------------------- -- ----------------------------
2023-5-06 -- 2023-5-06
-- ---------------------------- -- ----------------------------
-- ---------------------------- -- ----------------------------
-- 设备表 -- 设备表
...@@ -282,3 +282,79 @@ ALTER TABLE mortals_sys_site ADD COLUMN `complaintHotline` varchar(64) COM ...@@ -282,3 +282,79 @@ ALTER TABLE mortals_sys_site ADD COLUMN `complaintHotline` varchar(64) COM
-- ---------------------------- -- ----------------------------
ALTER TABLE mortals_sys_workman ADD COLUMN `deleted` tinyint(2) DEFAULT '0' COMMENT '是否删除(0.否,1.是)' AFTER modelIds; ALTER TABLE mortals_sys_workman ADD COLUMN `deleted` tinyint(2) DEFAULT '0' COMMENT '是否删除(0.否,1.是)' AFTER modelIds;
-- ----------------------------
-- 2025-3-14
-- ----------------------------
ALTER TABLE mortals_sys_window ADD COLUMN `fileName` varchar (256) default "" COMMENT '附件名称' AFTER englishNameDesc;
ALTER TABLE mortals_sys_window ADD COLUMN `filePath` varchar (256) default "" COMMENT '附件地址' AFTER fileName;
-- ----------------------------
-- 2025-3-17
-- ----------------------------
ALTER TABLE mortals_sys_matter ADD COLUMN `areaName` varchar(255) COMMENT '区域名称';
ALTER TABLE mortals_sys_matter ADD COLUMN `areaLevel` tinyint(2) COMMENT '区域等级(1.省,2.地市州,3.区县,4.街道,5.社区)';
-- ----------------------------
-- 办理渠道
-- ----------------------------
DROP TABLE IF EXISTS `mortals_sys_matter_channel`;
CREATE TABLE `mortals_sys_matter_channel` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键,自增长',
`matterId` bigint(20) NOT NULL DEFAULT 0 COMMENT '基础事项表id',
`matterCode` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '',
`matterName` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '事项名称',
`name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '应用名称',
`description` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '描述信息',
`icon` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '图标',
`url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '跳转地址',
`qrCode` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '二维码图片',
`source` tinyint(2) NULL DEFAULT 0 COMMENT '事项来源 (0.政务网,1.自定义)',
`appType` tinyint(2) NULL DEFAULT 0 COMMENT 'app来源类型 (0.PC端,1.移动端)',
`remark` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注',
`createTime` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`createUserId` bigint(20) NULL DEFAULT NULL COMMENT '创建用户',
`updateTime` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_matterId`(`matterId`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '办理渠道';
-- ----------------------------
-- 2025-3-19
-- ----------------------------
ALTER TABLE mortals_sys_matter ADD COLUMN `remark` varchar(512) COMMENT '备注信息';
-- ----------------------------
-- 社保配置表
-- ----------------------------
DROP TABLE IF EXISTS `mortals_sys_social_security_set`;
CREATE TABLE `mortals_sys_social_security_set` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '序号,主键,自增长',
`siteId` bigint(20) NULL DEFAULT NULL COMMENT '站点id',
`siteName` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '站点名称',
`appid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '接入标识',
`access_key` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '渠道标识-应用标识',
`privat_key` varchar(2048) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '私钥',
`key` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '渠道密钥',
`az400` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '机具编码',
`sm4key` varchar(2048) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '国密4私钥',
`serviceCode` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '政务排号认证',
`bus_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '政务业务认证码',
`orgName` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '机构名称',
`address` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '机具使用地址',
`regionCode` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '区域码',
`orgCode` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '统一社会信用代码',
`enabled` tinyint(1) NULL DEFAULT 1 COMMENT '启用开关',
`remark` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '短信签名',
`createTime` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`createUserId` bigint(20) NULL DEFAULT NULL COMMENT '创建用户',
`updateTime` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '社保配置表';
\ No newline at end of file
This diff is collapsed.
...@@ -241,6 +241,17 @@ ...@@ -241,6 +241,17 @@
<artifactId>DmJdbcDriver18</artifactId> <artifactId>DmJdbcDriver18</artifactId>
<version>8.1.1.193</version> <version>8.1.1.193</version>
</dependency> </dependency>
<!-- Spring Boot Data Elasticsearch依赖 -->
<!--
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-elasticsearch</artifactId>
<version>2.7.18</version>
</dependency>
-->
</dependencies> </dependencies>
......
...@@ -62,7 +62,6 @@ exec "$JAVACMD" $JAVA_OPTS \ ...@@ -62,7 +62,6 @@ exec "$JAVACMD" $JAVA_OPTS \
-Dapp.port="$PORT" \ -Dapp.port="$PORT" \
-Dbasedir="$BASEDIR" \ -Dbasedir="$BASEDIR" \
-Dfile.encoding=utf-8 \ -Dfile.encoding=utf-8 \
-Djava.io.tmpdir=$TEMP_PATH \
-jar $MAIN_CLASS \ -jar $MAIN_CLASS \
> /dev/null & > /dev/null &
......
package com.mortals.xhx.base.framework.aspect; package com.mortals.xhx.base.framework.aspect;
import java.util.Date;
import javax.servlet.http.HttpServletRequest;
import com.mortals.framework.model.OperateLogPdu; import com.mortals.framework.model.OperateLogPdu;
import com.mortals.framework.service.ILogService;
import com.mortals.framework.service.impl.FileLogServiceImpl;
import com.mortals.xhx.base.system.oper.service.OperLogService;
import com.mortals.xhx.system.MessageProducer; import com.mortals.xhx.system.MessageProducer;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.checkerframework.checker.units.qual.A;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import com.mortals.framework.service.ILogService; import java.util.Date;
import com.mortals.framework.service.impl.FileLogServiceImpl;
import com.mortals.xhx.base.system.oper.service.OperLogService;
/** /**
* 操作日志记录 * 操作日志记录
......
//package com.mortals.xhx.base.framework.config;
//
//import org.apache.http.HttpHost;
//import org.elasticsearch.client.RestClient;
//import org.elasticsearch.client.RestHighLevelClient;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.data.elasticsearch.client.ClientConfiguration;
//import org.springframework.data.elasticsearch.client.RestClients;
//import org.springframework.data.elasticsearch.config.AbstractElasticsearchConfiguration;
//import org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate;
//
//@Configuration
//public class ElasticsearchConfig extends AbstractElasticsearchConfiguration {
//
//
// @Value("${elasticSearch.url}")
// private String esUrl;
//
// /**
// * @return
// */
// @Override
// //localhost:9200 写在配置文件中就可以了
// public RestHighLevelClient elasticsearchClient() {
//
// final ClientConfiguration clientConfiguration = ClientConfiguration.builder()
// .connectedTo(esUrl) //localhost:9200
// .build();
//
// return RestClients.create(clientConfiguration).rest();
//
// }
//
//
//}
...@@ -64,6 +64,9 @@ public class AuthUserInterceptor extends BaseInterceptor { ...@@ -64,6 +64,9 @@ public class AuthUserInterceptor extends BaseInterceptor {
String referer = request.getHeader("Referer"); String referer = request.getHeader("Referer");
RedisTemplate<String, String> redisTemplate = cacheService.selectDbRedisTemplate(portalDb); RedisTemplate<String, String> redisTemplate = cacheService.selectDbRedisTemplate(portalDb);
String trustedReferer =redisTemplate.opsForValue().get(RedisKey.KEY_REFERERS_CACHE); String trustedReferer =redisTemplate.opsForValue().get(RedisKey.KEY_REFERERS_CACHE);
if (!ObjectUtils.isEmpty(referer)) { if (!ObjectUtils.isEmpty(referer)) {
//校验host即可 //校验host即可
URI host = URLUtil.getHost(new URL(referer)); URI host = URLUtil.getHost(new URL(referer));
......
...@@ -393,6 +393,7 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE ...@@ -393,6 +393,7 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE
} }
}); });
log.info("用户更新站点树!");
siteService.updateAllSiteTree(null); siteService.updateAllSiteTree(null);
......
//package com.mortals.xhx.busiz;
//import com.nowcoder.community.entity.DiscussPost;
//import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
//import org.springframework.stereotype.Repository;
//
///*
//ElasticsearchRepository<DiscussPost, Integer>
//DiscussPost:接口要处理的实体类
//Integer:实体类中的主键是什么类型
//ElasticsearchRepository:父接口,其中已经事先定义好了对es服务器访问的增删改查各种方法。Spring会给它自动做一个实现,我们直接去调就可以了。
// */
//@Repository
//public interface DiscussPostRepository extends ElasticsearchRepository<DiscussPost, Integer> {
//
//}
...@@ -352,7 +352,9 @@ public class DemoWebApiController { ...@@ -352,7 +352,9 @@ public class DemoWebApiController {
List<MatterEntity> matterList = matterService.getDao().getMatterListByAreaCode(new MatterQuery().areaCode(siteQuery.getAreaCode()).source(SourceEnum.政务网.getValue())); List<MatterEntity> matterList = matterService.getDao().getMatterListByAreaCode(new MatterQuery().areaCode(siteQuery.getAreaCode()).source(SourceEnum.政务网.getValue()));
List<SiteMatterEntity> targetSiteMatterEntities = new ArrayList<>(); List<SiteMatterEntity> targetSiteMatterEntities = new ArrayList<>();
for (MatterEntity matterEntity : matterList) { for (MatterEntity matterEntity : matterList) {
DeptEntity deptEntity = deptService.getExtCache(matterEntity.getDeptCode()); DeptEntity deptEntity =deptService.selectOne(new DeptQuery().deptNumber(matterEntity.getDeptCode()));
//DeptEntity deptEntity = deptService.getExtCache(matterEntity.getDeptCode());
SiteMatterEntity siteMatterEntity = new SiteMatterEntity(); SiteMatterEntity siteMatterEntity = new SiteMatterEntity();
siteMatterEntity.initAttrValue(); siteMatterEntity.initAttrValue();
//SiteEntity siteEntity = siteService.get(siteId); //SiteEntity siteEntity = siteService.get(siteId);
......
//package com.mortals.xhx.busiz.web;
//
//import com.alibaba.fastjson.JSONObject;
//import lombok.extern.slf4j.Slf4j;
//import org.elasticsearch.action.search.SearchRequest;
//import org.elasticsearch.action.search.SearchResponse;
//import org.elasticsearch.client.RequestOptions;
//import org.elasticsearch.client.RestHighLevelClient;
//
//import org.elasticsearch.index.query.QueryBuilders;
//import org.elasticsearch.search.SearchHit;
//import org.elasticsearch.search.builder.SearchSourceBuilder;
//import org.elasticsearch.search.fetch.subphase.highlight.HighlightBuilder;
//import org.elasticsearch.search.fetch.subphase.highlight.HighlightField;
//import org.elasticsearch.search.sort.SortBuilders;
//import org.elasticsearch.search.sort.SortOrder;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.beans.factory.annotation.Qualifier;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import java.io.IOException;
//import java.util.LinkedList;
//
//@RestController
//@RequestMapping("elTest")
//@Slf4j
//public class ElasticsearchTestsController {
//
// @Qualifier("client")
// @Autowired
// private RestHighLevelClient restHighLevelClient;
//
// //判断某id的文档(数据库中的行)是否存在
// public void testExist(){
//
// }
//
// //一次保存一条数据
// public void testInsert() {
// //把id为241的DiscussPost的对象保存到discusspost索引(es的索引相当于数据库的表)
// }
//
//
// //不带高亮的查询
// public void noHighlightQuery() throws IOException {
// SearchRequest searchRequest = new SearchRequest("discusspost");//discusspost是索引名,就是表名
//
// //构建搜索条件
// SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder()
// //在discusspost索引的title和content字段中都查询“互联网寒冬”
// .query(QueryBuilders.multiMatchQuery("互联网寒冬", "title", "content"))
// // matchQuery是模糊查询,会对key进行分词:searchSourceBuilder.query(QueryBuilders.matchQuery(key,value));
// // termQuery是精准查询:searchSourceBuilder.query(QueryBuilders.termQuery(key,value));
// .sort(SortBuilders.fieldSort("type").order(SortOrder.DESC))
// .sort(SortBuilders.fieldSort("score").order(SortOrder.DESC))
// .sort(SortBuilders.fieldSort("createTime").order(SortOrder.DESC))
// //一个可选项,用于控制允许搜索的时间:searchSourceBuilder.timeout(new TimeValue(60, TimeUnit.SECONDS));
// .from(0)// 指定从哪条开始查询
// .size(10);// 需要查出的总记录条数
//
// searchRequest.source(searchSourceBuilder);
// SearchResponse searchResponse = restHighLevelClient.search(searchRequest, RequestOptions.DEFAULT);
//
// System.out.println(JSONObject.toJSON(searchResponse));
//
///* List<DiscussPost> list = new LinkedList<>();
// for (SearchHit hit : searchResponse.getHits().getHits()) {
// DiscussPost discussPost = JSONObject.parseObject(hit.getSourceAsString(), DiscussPost.class);
// System.out.println(discussPost);
// list.add(discussPost);
// }*/
// }
//
//
// //带高亮的查询
// public void highlightQuery() throws Exception{
// SearchRequest searchRequest = new SearchRequest("discusspost");//discusspost是索引名,就是表名
//
// //高亮
// HighlightBuilder highlightBuilder = new HighlightBuilder();
// highlightBuilder.field("title");
// highlightBuilder.field("content");
// highlightBuilder.requireFieldMatch(false);
// highlightBuilder.preTags("<span style='color:red'>");
// highlightBuilder.postTags("</span>");
//
// //构建搜索条件
// SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder()
// .query(QueryBuilders.multiMatchQuery("互联网寒冬", "title", "content"))
// .sort(SortBuilders.fieldSort("type").order(SortOrder.DESC))
// .sort(SortBuilders.fieldSort("score").order(SortOrder.DESC))
// .sort(SortBuilders.fieldSort("createTime").order(SortOrder.DESC))
// .from(0)// 指定从哪条开始查询
// .size(10)// 需要查出的总记录条数
// .highlighter(highlightBuilder);//高亮
//
// searchRequest.source(searchSourceBuilder);
// SearchResponse searchResponse = restHighLevelClient.search(searchRequest, RequestOptions.DEFAULT);
///*
// List<DiscussPost> list = new LinkedList<>();
// for (SearchHit hit : searchResponse.getHits().getHits()) {
// DiscussPost discussPost = JSONObject.parseObject(hit.getSourceAsString(), DiscussPost.class);
//
// // 处理高亮显示的结果
// HighlightField titleField = hit.getHighlightFields().get("title");
// if (titleField != null) {
// discussPost.setTitle(titleField.getFragments()[0].toString());
// }
// HighlightField contentField = hit.getHighlightFields().get("content");
// if (contentField != null) {
// discussPost.setContent(contentField.getFragments()[0].toString());
// }
// System.out.println(discussPost);
// list.add(discussPost);
// }*/
// }
//
//
//}
...@@ -137,4 +137,8 @@ public final class Constant { ...@@ -137,4 +137,8 @@ public final class Constant {
public final static String USER_SITE_TREE = "user:site:tree"; public final static String USER_SITE_TREE = "user:site:tree";
public final static String QR_CODE = "https://tftb.sczwfw.gov.cn:8085/jmopenpub/jmopen_files/unzip/708da07c16d8405bbaaa542d2c64e8f9/dzqyfwsxwbzqyvpty/html/matterDetails.html?";
} }
...@@ -10,6 +10,7 @@ import com.mortals.framework.util.DataUtil; ...@@ -10,6 +10,7 @@ import com.mortals.framework.util.DataUtil;
import com.mortals.xhx.common.code.SourceEnum; import com.mortals.xhx.common.code.SourceEnum;
import com.mortals.xhx.common.code.YesNoEnum; import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.module.dept.model.DeptEntity; import com.mortals.xhx.module.dept.model.DeptEntity;
import com.mortals.xhx.module.dept.model.DeptQuery;
import com.mortals.xhx.module.dept.service.DeptService; import com.mortals.xhx.module.dept.service.DeptService;
import com.mortals.xhx.module.matter.model.MatterEntity; import com.mortals.xhx.module.matter.model.MatterEntity;
import com.mortals.xhx.utils.SpringUtils; import com.mortals.xhx.utils.SpringUtils;
...@@ -201,7 +202,8 @@ public class MatterHtmlParseUtil { ...@@ -201,7 +202,8 @@ public class MatterHtmlParseUtil {
//todo 如果部门编码与初始编码不一致,切不在部门列表中,添加默认部门 //todo 如果部门编码与初始编码不一致,切不在部门列表中,添加默认部门
String sourceDeptCode = params.getOrDefault("deptCode", ""); String sourceDeptCode = params.getOrDefault("deptCode", "");
DeptService deptService = SpringUtils.getBean(DeptService.class); DeptService deptService = SpringUtils.getBean(DeptService.class);
DeptEntity cache = deptService.getCache(deptCode); // DeptEntity cache = deptService.getCache(deptCode);
DeptEntity cache =deptService.selectOne(new DeptQuery().deptNumber(deptCode));
if(ObjectUtils.isEmpty(cache)){ if(ObjectUtils.isEmpty(cache)){
//抓取事项的部门编码未找到 用初始的部门编码 //抓取事项的部门编码未找到 用初始的部门编码
deptCode=sourceDeptCode; deptCode=sourceDeptCode;
......
package com.mortals.xhx.common.utils;
import lombok.extern.slf4j.Slf4j;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import javax.crypto.Cipher;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.spec.SecretKeySpec;
import java.nio.charset.StandardCharsets;
import java.security.AlgorithmParameters;
import java.security.NoSuchAlgorithmException;
/**
* 安全服务工具类
*
* @author zxfei
*/
@Slf4j
public class SecurityUtils {
private static Cipher SM4Cipher = null;
private static Cipher SM4DecryptCipher;
static {
try {
SM4DecryptCipher = Cipher.getInstance("SM4/ECB/PKCS7Padding", new BouncyCastleProvider());
} catch (NoSuchAlgorithmException e) {
throw new RuntimeException(e);
} catch (NoSuchPaddingException e) {
throw new RuntimeException(e);
}
}
private static BouncyCastleProvider bouncyCastleProvider = new BouncyCastleProvider();
public static BouncyCastleProvider geBouncyCastleProvider() {
return bouncyCastleProvider;
}
public synchronized static Cipher getSM4Cipher(String key) {
try {
if (SM4Cipher == null) {
//创建实例之前可能会有一些准备性的耗时工作
Thread.sleep(300);
synchronized (SecurityUtils.class) {
if (SM4Cipher == null) {//二次检查
SM4Cipher = Cipher.getInstance("SM4/ECB/PKCS7Padding", new BouncyCastleProvider());
}
}
}
} catch (Exception e) {
log.error("SM4Cipher init error", e);
}
return SM4Cipher;
}
public synchronized static Cipher getSM4DecryptCipher(String key) {
try {
if (SM4DecryptCipher == null) {
//创建实例之前可能会有一些准备性的耗时工作
Thread.sleep(300);
synchronized (SecurityUtils.class) {
if (SM4DecryptCipher == null) {//二次检查
//SM4DecryptCipher = Cipher.getInstance("SM4/ECB/PKCS7Padding", new BouncyCastleProvider());
SM4DecryptCipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(key.getBytes(StandardCharsets.UTF_8), "SM4"), (AlgorithmParameters) null);
}
}
}
SM4DecryptCipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(key.getBytes(StandardCharsets.UTF_8), "SM4"), (AlgorithmParameters) null);
} catch (Exception e) {
log.error("SM4Cipher init error", e);
}
return SM4DecryptCipher;
}
/**
* 获取Authentication
*/
//public static Authentication getAuthentication() {
// return SecurityContextHolder.getContext().getAuthentication();
// }
/**
* 生成BCryptPasswordEncoder密码
*
* @param password 密码
* @return 加密字符串
*/
public static String encryptPassword(String password) {
BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder();
return passwordEncoder.encode(password);
}
/**
* 判断密码是否相同
*
* @param rawPassword 真实密码
* @param encodedPassword 加密后字符
* @return 结果
*/
public static boolean matchesPassword(String rawPassword, String encodedPassword) {
BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder();
return passwordEncoder.matches(rawPassword, encodedPassword);
}
/**
* 是否为管理员
*
* @param userId 用户ID
* @return 结果
*/
public static boolean isAdmin(Long userId) {
return userId != null && 1L == userId;
}
}
...@@ -33,6 +33,12 @@ public class SyncTreeSiteThread implements Runnable { ...@@ -33,6 +33,12 @@ public class SyncTreeSiteThread implements Runnable {
@Override @Override
public void run() { public void run() {
try {
Thread.sleep(3000);
} catch (InterruptedException e) {
}
SiteService siteService = SpringUtils.getBean(SiteService.class); SiteService siteService = SpringUtils.getBean(SiteService.class);
List<SiteTreeSelect> siteTreeSelects = siteService.siteTree(context); List<SiteTreeSelect> siteTreeSelects = siteService.siteTree(context);
......
...@@ -4,13 +4,9 @@ import com.mortals.framework.service.ICacheService; ...@@ -4,13 +4,9 @@ import com.mortals.framework.service.ICacheService;
import com.mortals.framework.springcloud.service.IApplicationStartedService; import com.mortals.framework.springcloud.service.IApplicationStartedService;
import com.mortals.framework.util.ThreadPool; import com.mortals.framework.util.ThreadPool;
import com.mortals.xhx.base.system.user.service.UserService; import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.feign.user.IUserFeign;
import com.mortals.xhx.module.site.service.SiteService; import com.mortals.xhx.module.site.service.SiteService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import static com.mortals.xhx.common.key.Constant.USER_SITE_TREE; import static com.mortals.xhx.common.key.Constant.USER_SITE_TREE;
...@@ -32,9 +28,12 @@ public class DemoStartedService implements IApplicationStartedService { ...@@ -32,9 +28,12 @@ public class DemoStartedService implements IApplicationStartedService {
log.info("开始服务..[初始化用户站点树]"); log.info("开始服务..[初始化用户站点树]");
//删除redis 中的 站点树 //删除redis 中的 站点树
cacheService.del(USER_SITE_TREE); cacheService.del(USER_SITE_TREE);
//从门户获取所有站点用户 //从门户获取所有站点用户
userService.refreshUser(); try {
userService.refreshUser();
} catch (Exception e) {
log.error("获取所有站点用户失败", e);
}
} }
@Override @Override
......
...@@ -60,7 +60,7 @@ public class AppVersionServiceImpl extends AbstractCRUDServiceImpl<AppVersionDao ...@@ -60,7 +60,7 @@ public class AppVersionServiceImpl extends AbstractCRUDServiceImpl<AppVersionDao
throw new AppException("部署文件不存在!"); throw new AppException("部署文件不存在!");
} }
if (!FileUtil.getSuffix(appVersionEntity.getFilePath()).equals("zip")) { if (!FileUtil.getSuffix(appVersionEntity.getFilePath()).equals("zip")) {
throw new AppException("部署只支持zip文件!"); throw new AppException("部署只支持zip文件!fileName:" + appVersionEntity.getFilePath());
} }
//部署路径是否存在 如果不存在 创建目录, //部署路径是否存在 如果不存在 创建目录,
//文件构成目录 基础path +站点编码+应用编码 /basepath/sitecode/appcode/v2/ //文件构成目录 基础path +站点编码+应用编码 /basepath/sitecode/appcode/v2/
......
...@@ -68,7 +68,7 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE ...@@ -68,7 +68,7 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
@Override @Override
protected String getExtKey(DeptEntity data) { protected String getExtKey(DeptEntity data) {
return data.getDeptNumber(); return data.getDeptNumber()+"_"+data.getSiteId();
} }
/** /**
...@@ -79,8 +79,8 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE ...@@ -79,8 +79,8 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
@Override @Override
protected void saveBefore(DeptEntity entity, Context context) throws AppException { protected void saveBefore(DeptEntity entity, Context context) throws AppException {
super.saveBefore(entity, context); super.saveBefore(entity, context);
//新增校验部门编码是否重复 //新增校验部门编码与站点是否重复
DeptEntity extCache = this.getExtCache(entity.getDeptNumber()); DeptEntity extCache = this.getExtCache(entity.getDeptNumber()+"_"+entity.getSiteId());
if (!ObjectUtils.isEmpty(extCache)) { if (!ObjectUtils.isEmpty(extCache)) {
throw new AppException("部门编码重复!deptCode:" + extCache.getDeptNumber()); throw new AppException("部门编码重复!deptCode:" + extCache.getDeptNumber());
} }
...@@ -95,8 +95,8 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE ...@@ -95,8 +95,8 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
protected void updateBefore(DeptEntity entity, Context context) throws AppException { protected void updateBefore(DeptEntity entity, Context context) throws AppException {
super.updateBefore(entity, context); super.updateBefore(entity, context);
DeptEntity beforeEntity = this.get(entity.getId(), context); DeptEntity beforeEntity = this.get(entity.getId(), context);
if (!beforeEntity.getDeptNumber().equals(entity.getDeptNumber())) { if (!(beforeEntity.getDeptNumber()+"_"+beforeEntity.getSiteId()).equals(entity.getDeptNumber()+"_"+entity.getSiteId())) {
DeptEntity extCache = this.getExtCache(entity.getDeptNumber()); DeptEntity extCache = this.getExtCache(entity.getDeptNumber()+"_"+entity.getSiteId());
if (!ObjectUtils.isEmpty(extCache)) { if (!ObjectUtils.isEmpty(extCache)) {
throw new AppException("部门编码重复!deptCode:" + extCache.getDeptNumber()); throw new AppException("部门编码重复!deptCode:" + extCache.getDeptNumber());
} }
...@@ -142,7 +142,7 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE ...@@ -142,7 +142,7 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
for (Map.Entry<String, String> item : data.entrySet()) { for (Map.Entry<String, String> item : data.entrySet()) {
String deptCode = item.getKey(); String deptCode = item.getKey();
String deptName = item.getValue(); String deptName = item.getValue();
DeptEntity deptEntity = deptService.selectOne(new DeptQuery().deptNumber(deptCode)); DeptEntity deptEntity = deptService.selectOne(new DeptQuery().siteId(siteEntity.getId()).deptNumber(deptCode));
if (ObjectUtils.isEmpty(deptEntity)) { if (ObjectUtils.isEmpty(deptEntity)) {
deptEntity = new DeptEntity(); deptEntity = new DeptEntity();
deptEntity.initAttrValue(); deptEntity.initAttrValue();
......
package com.mortals.xhx.module.matter.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.matter.model.MatterChannelEntity;
import java.util.List;
/**
* 办理渠道Dao
* 办理渠道 DAO接口
*
* @author zxfei
* @date 2025-03-18
*/
public interface MatterChannelDao extends ICRUDDao<MatterChannelEntity,Long>{
}
package com.mortals.xhx.module.matter.dao.ibatis;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.matter.dao.MatterChannelDao;
import com.mortals.xhx.module.matter.model.MatterChannelEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 办理渠道DaoImpl DAO接口
*
* @author zxfei
* @date 2025-03-18
*/
@Repository("matterChannelDao")
public class MatterChannelDaoImpl extends BaseCRUDDaoMybatis<MatterChannelEntity,Long> implements MatterChannelDao {
}
package com.mortals.xhx.module.matter.model;
import java.util.List;
import java.util.ArrayList;
import java.math.BigDecimal;
import cn.hutool.core.date.DateUtil;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.matter.model.vo.MatterChannelVo;
import lombok.Data;
/**
* 办理渠道实体对象
*
* @author zxfei
* @date 2025-03-19
*/
@Data
public class MatterChannelEntity extends MatterChannelVo {
private static final long serialVersionUID = 1L;
/**
* 基础事项表id
*/
private Long matterId;
/**
*
*/
private String matterCode;
/**
* 事项名称
*/
private String matterName;
/**
* 名称
*/
private String name;
/**
* 图标
*/
private String icon;
/**
* 跳转地址
*/
private String url;
/**
* 事项来源 (0.政务网,1.自定义)
*/
private Integer source;
/**
* 备注
*/
private String remark;
/**
* 描述信息
*/
private String description;
/**
* 二维码图片
*/
private String qrCode;
/**
* app来源类型 (0.PC端,1.移动端)
*/
private Integer appType;
@Override
public int hashCode() {
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj instanceof MatterChannelEntity) {
MatterChannelEntity tmp = (MatterChannelEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
}
}
return false;
}
public void initAttrValue(){
this.matterId = 0L;
this.matterCode = "";
this.matterName = "";
this.name = "";
this.icon = "";
this.url = "";
this.source = 0;
this.remark = "";
this.description = "";
this.qrCode = "";
this.appType = 0;
}
}
\ No newline at end of file
package com.mortals.xhx.module.matter.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.matter.model.MatterChannelEntity;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
import com.mortals.framework.annotation.Excel;
import java.math.BigDecimal;
import java.util.Date;
/**
* 办理渠道视图对象
*
* @author zxfei
* @date 2025-03-18
*/
@Data
public class MatterChannelVo extends BaseEntityLong {
/** 主键,自增长列表 */
private List <Long> idList;
}
\ No newline at end of file
package com.mortals.xhx.module.matter.model.vo;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.matter.model.*;
import lombok.Data;
import java.util.List;
import java.util.Objects;
/**
* 自定义导入对象
*
* @author: zxfei
* @date: 2025/3/24 9:44
*/
@Data
public class MatterCustomImportEntity extends BaseEntityLong {
/**
* 区域编码
*/
@Excel(name = "区域编码")
private String areaCode;
/**
* 事项名称
*/
@Excel(name = "事项名称")
private String matterName;
/**
* 部门名称
*/
@Excel(name = "部门名称")
private String deptName;
/**
* 承诺办理时限
*/
@Excel(name = "承诺办理时限")
private String promiseTimeLimitShow;
/**
* 事项详情链接
*/
@Excel(name = "网办地址")
private String url;
/**
* pc详细地址
*/
@Excel(name = "办事指南地址")
private String netApplyUrl;
/**
* 备注信息
*/
@Excel(name = "流程描述")
private String flowDesc;
/**
* 备注信息
*/
@Excel(name = "备注")
private String remark;
/**
* 投诉电话
*/
@Excel(name = "投诉电话")
private String superviseShow;
/**
* 事项类型
*/
@Excel(name = "事项类型")
private String eventTypeShow;
/**
* 网站名称
*/
@Excel(name = "网站名称")
private String webName;
@Override
public int hashCode() {
return Objects.hash(this.areaCode, this.getMatterName());
}
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj instanceof MatterCustomImportEntity) {
MatterCustomImportEntity tmp = (MatterCustomImportEntity) obj;
if ((this.getAreaCode() + this.getMatterName()).equals(tmp.getAreaCode() + tmp.getMatterName())) {
if (this.getId() == tmp.getId()) {
return true;
}
}
}
return false;
}
}
\ No newline at end of file
...@@ -55,4 +55,6 @@ public class MatterInfo { ...@@ -55,4 +55,6 @@ public class MatterInfo {
private String promiseTimeLimitShow; private String promiseTimeLimitShow;
} }
\ No newline at end of file
package com.mortals.xhx.module.matter.model.vo; package com.mortals.xhx.module.matter.model.vo;
import com.mortals.framework.model.BaseEntityLong; import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.matter.model.MatterEntity; import com.mortals.xhx.module.matter.model.*;
import lombok.Data; import lombok.Data;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -26,7 +26,43 @@ public class MatterVo extends BaseEntityLong { ...@@ -26,7 +26,43 @@ public class MatterVo extends BaseEntityLong {
private String genFilePath; private String genFilePath;
/**
* 项受理条件
*/
private List<MatterAcceptEntity> matterAcceptList;
/**
* 事项申请材料
*/
private List<MatterDatumEntity> matterDatumList;
/**
* 办理渠道
*/
private List<MatterChannelEntity> matterChannelList;
/**
* 事项收费标准
*/
private List<MatterChargesEntity> matterChargesList;
/**
* 事项办理流程
*/
private List<MatterFlowlimitEntity> matterFlowlimitList;
/**
* 事项中介服务
*/
private List<MatterIntermediaryEntity> matterIntermediaryList;
/**
* 事项常见问题
*/
private List<MatterQuestionEntity> matterQuestionList;
/**
* 事项设定依据
*/
private List<MatterSetbaseEntity> matterSetbaseList;
/**
* qrcode
*/
private String qrCode;
} }
\ No newline at end of file
package com.mortals.xhx.module.matter.service;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.matter.model.MatterChannelEntity;
import com.mortals.xhx.module.matter.dao.MatterChannelDao;
/**
* MatterChannelService
*
* 办理渠道 service接口
*
* @author zxfei
* @date 2025-03-18
*/
public interface MatterChannelService extends ICRUDService<MatterChannelEntity,Long>{
MatterChannelDao getDao();
}
\ No newline at end of file
...@@ -9,10 +9,14 @@ import com.mortals.framework.service.ICRUDService; ...@@ -9,10 +9,14 @@ import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.matter.dao.MatterDao; import com.mortals.xhx.module.matter.dao.MatterDao;
import com.mortals.xhx.module.matter.model.MatterEntity; import com.mortals.xhx.module.matter.model.MatterEntity;
import com.mortals.xhx.module.matter.model.MatterQuery; import com.mortals.xhx.module.matter.model.MatterQuery;
import com.mortals.xhx.module.matter.model.vo.MatterCustomImportEntity;
import com.mortals.xhx.module.matter.model.vo.MatterInfo; import com.mortals.xhx.module.matter.model.vo.MatterInfo;
import com.mortals.xhx.module.site.model.SiteEntity; import com.mortals.xhx.module.site.model.SiteEntity;
import com.mortals.xhx.module.site.model.SiteMatterEntity; import com.mortals.xhx.module.site.model.SiteMatterEntity;
import org.springframework.web.bind.annotation.RequestBody;
import java.io.IOException;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
...@@ -83,8 +87,16 @@ public interface MatterService extends ICRUDService<MatterEntity, Long> { ...@@ -83,8 +87,16 @@ public interface MatterService extends ICRUDService<MatterEntity, Long> {
* @param context * @param context
* @return * @return
*/ */
Rest<Void> genMatterTxt(MatterQuery matterQuery,Context context); Rest<Void> genMatterCsv(MatterQuery matterQuery, Context context);
Rest<Void> genMatterMarkdown(MatterQuery matterQuery,Context context); Rest<Void> genMatterMarkdown(MatterQuery matterQuery,Context context);
Rest<Void> genMatterTXT(MatterQuery matterQuery, Context context);
Rest<String> doImportCustomData(List<MatterCustomImportEntity> list, Context context);
Rest<byte[]> genQrCode(@RequestBody MatterQuery query) throws IOException;
} }
\ No newline at end of file
package com.mortals.xhx.module.matter.service.impl;
import com.mortals.framework.model.PageInfo;
import org.springframework.beans.BeanUtils;
import java.util.function.Function;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.xhx.module.matter.dao.MatterChannelDao;
import com.mortals.xhx.module.matter.model.MatterChannelEntity;
import com.mortals.xhx.module.matter.service.MatterChannelService;
import lombok.extern.slf4j.Slf4j;
/**
* MatterChannelService
* 办理渠道 service实现
*
* @author zxfei
* @date 2025-03-18
*/
@Service("matterChannelService")
@Slf4j
public class MatterChannelServiceImpl extends AbstractCRUDServiceImpl<MatterChannelDao, MatterChannelEntity, Long> implements MatterChannelService {
}
\ No newline at end of file
...@@ -88,7 +88,9 @@ public class MatterExtServiceImpl extends AbstractCRUDServiceImpl<MatterExtDao, ...@@ -88,7 +88,9 @@ public class MatterExtServiceImpl extends AbstractCRUDServiceImpl<MatterExtDao,
//差集进行插入 //差集进行插入
if (!ObjectUtils.isEmpty(subList)) { if (!ObjectUtils.isEmpty(subList)) {
for (MatterEntity matterEntity : subList) { for (MatterEntity matterEntity : subList) {
DeptEntity deptCache = deptService.getExtCache(matterEntity.getDeptCode()); DeptEntity deptCache = deptService.selectOne(new DeptQuery().deptNumber(matterEntity.getDeptCode()));
// DeptEntity deptCache = deptService.getExtCache(matterEntity.getDeptCode());
matterEntity.setDeptName(deptCache == null ? "" : deptCache.getName()); matterEntity.setDeptName(deptCache == null ? "" : deptCache.getName());
matterEntity.setCreateTime(new Date()); matterEntity.setCreateTime(new Date());
matterEntity.setMatterEdition("0"); matterEntity.setMatterEdition("0");
......
package com.mortals.xhx.module.matter.web;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import com.mortals.framework.model.Context;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.module.matter.model.MatterChannelEntity;
import com.mortals.xhx.module.matter.service.MatterChannelService;
import org.apache.commons.lang3.ArrayUtils;
import com.mortals.framework.util.StringUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject;
import java.util.Arrays;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*;
import com.mortals.xhx.common.code.*;
/**
*
* 办理渠道
*
* @author zxfei
* @date 2025-03-18
*/
@RestController
@RequestMapping("matter/channel")
public class MatterChannelController extends BaseCRUDJsonBodyMappingController<MatterChannelService,MatterChannelEntity,Long> {
@Autowired
private ParamService paramService;
public MatterChannelController(){
super.setModuleDesc( "办理渠道");
}
@Override
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "source", SourceEnum.getEnumMap());
super.init(model, context);
}
}
\ No newline at end of file
...@@ -4,9 +4,6 @@ import com.mortals.framework.common.Rest; ...@@ -4,9 +4,6 @@ import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICRUDCacheService; import com.mortals.framework.service.ICRUDCacheService;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.area.model.AreaEntity;
import com.mortals.xhx.module.area.model.AreaTreeSelect;
import com.mortals.xhx.module.matter.model.MatterEntity; import com.mortals.xhx.module.matter.model.MatterEntity;
import com.mortals.xhx.module.site.dao.SiteDao; import com.mortals.xhx.module.site.dao.SiteDao;
import com.mortals.xhx.module.site.model.SiteEntity; import com.mortals.xhx.module.site.model.SiteEntity;
...@@ -14,10 +11,8 @@ import com.mortals.xhx.module.site.model.SiteQuery; ...@@ -14,10 +11,8 @@ import com.mortals.xhx.module.site.model.SiteQuery;
import com.mortals.xhx.module.site.model.SiteTreeSelect; import com.mortals.xhx.module.site.model.SiteTreeSelect;
import com.mortals.xhx.module.site.model.vo.SiteAreaVo; import com.mortals.xhx.module.site.model.vo.SiteAreaVo;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set;
/** /**
* SiteService * SiteService
......
...@@ -63,23 +63,25 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu ...@@ -63,23 +63,25 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu
// siteBusinessQuery.setBusinessIdNotList(params.getBusinessIdNotList()); // siteBusinessQuery.setBusinessIdNotList(params.getBusinessIdNotList());
siteBusinessQuery.setIsBusiness(IsBusinessEnum.一级业务.getValue()); siteBusinessQuery.setIsBusiness(IsBusinessEnum.一级业务.getValue());
List<SiteBusinessEntity> rootSiteBusiness = this.find(siteBusinessQuery).stream().collect(Collectors.toList()); List<SiteBusinessEntity> rootSiteBusiness = this.find(siteBusinessQuery).stream().collect(Collectors.toList());
//遍历所有一级业务
for (SiteBusinessEntity root : rootSiteBusiness) { for (SiteBusinessEntity root : rootSiteBusiness) {
SiteBusinessQuery query = new SiteBusinessQuery(); SiteBusinessQuery query = new SiteBusinessQuery();
query.setParentId(root.getBusinessId()); query.setParentId(root.getBusinessId());
//根据一级业务找到对应的所有二级业务
List<SiteBusinessEntity> childSiteBusiness = this.find(query, context); List<SiteBusinessEntity> childSiteBusiness = this.find(query, context);
//查询所有二级业务。如果二级业务不全部存在,则把一级业务排除掉 //查询所有二级业务。如果二级业务不全部存在,则把一级业务排除掉
//如果二级业务全部存在,则把一级业务排除掉 排除【[498 500] 子(493 494 498) 500-根
//判断排除的id是否包含所有
Boolean bool = false; Boolean bool = false;
for (SiteBusinessEntity child : childSiteBusiness) { for (SiteBusinessEntity child : childSiteBusiness) {
if (!notIdSet.contains(child.getBusinessId())) { if (!notIdSet.contains(child.getBusinessId())) {
//存在非排除的业务id的孩子id 存在与二级节点中。父节点排除在外
bool = true; bool = true;
break; break;
} }
} }
if (bool) { if (bool) {
//排除掉父id //排除掉父id
notIdSet.remove(root.getId()); notIdSet.remove(root.getBusinessId());
} }
} }
params.setBusinessIdNotList(notIdSet.stream().collect(Collectors.toList())); params.setBusinessIdNotList(notIdSet.stream().collect(Collectors.toList()));
...@@ -93,7 +95,7 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu ...@@ -93,7 +95,7 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu
protected void findAfter(SiteBusinessEntity params, PageInfo pageInfo, Context context, List<SiteBusinessEntity> list) throws AppException { protected void findAfter(SiteBusinessEntity params, PageInfo pageInfo, Context context, List<SiteBusinessEntity> list) throws AppException {
if (!ObjectUtils.isEmpty(params.getBusinessIdNotList())) { if (!ObjectUtils.isEmpty(params.getBusinessIdNotList())) {
//排除掉已经存在的ids //排除掉已经存在的ids
log.info("idNotList:{}", JSON.toJSONString(params.getBusinessIdNotList())); log.info("BusinessIdNotList():{}", JSON.toJSONString(params.getBusinessIdNotList()));
Iterator<SiteBusinessEntity> iterator = list.iterator(); Iterator<SiteBusinessEntity> iterator = list.iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
SiteBusinessQuery siteBusinessQuery = new SiteBusinessQuery(); SiteBusinessQuery siteBusinessQuery = new SiteBusinessQuery();
......
...@@ -785,7 +785,8 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE ...@@ -785,7 +785,8 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
//差集进行插入并更新详细数据 //差集进行插入并更新详细数据
if (!ObjectUtils.isEmpty(subList)) { if (!ObjectUtils.isEmpty(subList)) {
for (MatterEntity matterEntity : subList) { for (MatterEntity matterEntity : subList) {
DeptEntity deptCache = deptService.getExtCache(matterEntity.getDeptCode()); DeptEntity deptCache =deptService.selectOne(new DeptQuery().deptNumber(matterEntity.getDeptCode()));
// DeptEntity deptCache = deptService.getExtCache(matterEntity.getDeptCode());
matterEntity.setDeptName(deptCache == null ? "" : deptCache.getName()); matterEntity.setDeptName(deptCache == null ? "" : deptCache.getName());
matterEntity.setCreateTime(new Date()); matterEntity.setCreateTime(new Date());
matterService.save(matterEntity, context); matterService.save(matterEntity, context);
......
package com.mortals.xhx.module.social.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.social.model.SocialSecuritySetEntity;
import java.util.List;
/**
* 社保配置Dao
* 社保配置 DAO接口
*
* @author zxfei
* @date 2025-03-21
*/
public interface SocialSecuritySetDao extends ICRUDDao<SocialSecuritySetEntity,Long>{
}
package com.mortals.xhx.module.social.dao.ibatis;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.social.dao.SocialSecuritySetDao;
import com.mortals.xhx.module.social.model.SocialSecuritySetEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 社保配置DaoImpl DAO接口
*
* @author zxfei
* @date 2025-03-21
*/
@Repository("socialSecuritySetDao")
public class SocialSecuritySetDaoImpl extends BaseCRUDDaoMybatis<SocialSecuritySetEntity,Long> implements SocialSecuritySetDao {
}
package com.mortals.xhx.module.social.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.social.model.SocialSecuritySetEntity;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
import com.mortals.framework.annotation.Excel;
import java.math.BigDecimal;
import java.util.Date;
/**
* 社保配置视图对象
*
* @author zxfei
* @date 2025-03-21
*/
@Data
public class SocialSecuritySetVo extends BaseEntityLong {
/** 序号,主键,自增长列表 */
private List <Long> idList;
}
\ No newline at end of file
package com.mortals.xhx.module.social.service;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.social.model.SocialSecuritySetEntity;
import com.mortals.xhx.module.social.dao.SocialSecuritySetDao;
/**
* SocialSecuritySetService
*
* 社保配置 service接口
*
* @author zxfei
* @date 2025-03-21
*/
public interface SocialSecuritySetService extends ICRUDService<SocialSecuritySetEntity,Long>{
SocialSecuritySetDao getDao();
}
\ No newline at end of file
package com.mortals.xhx.module.social.service.impl;
import com.mortals.framework.model.PageInfo;
import org.springframework.beans.BeanUtils;
import java.util.function.Function;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.xhx.module.social.dao.SocialSecuritySetDao;
import com.mortals.xhx.module.social.model.SocialSecuritySetEntity;
import com.mortals.xhx.module.social.service.SocialSecuritySetService;
import lombok.extern.slf4j.Slf4j;
/**
* SocialSecuritySetService
* 社保配置 service实现
*
* @author zxfei
* @date 2025-03-21
*/
@Service("socialSecuritySetService")
@Slf4j
public class SocialSecuritySetServiceImpl extends AbstractCRUDServiceImpl<SocialSecuritySetDao, SocialSecuritySetEntity, Long> implements SocialSecuritySetService {
}
\ No newline at end of file
...@@ -228,7 +228,7 @@ public class WindowBusinessServiceImpl extends AbstractCRUDServiceImpl<WindowBus ...@@ -228,7 +228,7 @@ public class WindowBusinessServiceImpl extends AbstractCRUDServiceImpl<WindowBus
//查询数据库 //查询数据库
pageInfo = new PageInfo(); pageInfo = new PageInfo();
pageInfo.setPrePageResult(-1); pageInfo.setPrePageResult(-1);
result = this.dao.getList(new WindowBusinessQuery().siteBusinessId(siteBusinessId), pageInfo); result = this.dao.getList(new WindowBusinessQuery().windowId(windowId), pageInfo);
this.findAfter(entity, pageInfo, context, result.getList()); this.findAfter(entity, pageInfo, context, result.getList());
//无查询结果的不做保存 //无查询结果的不做保存
if (!ObjectUtils.isEmpty(result.getList())) { if (!ObjectUtils.isEmpty(result.getList())) {
......
...@@ -22,9 +22,11 @@ ...@@ -22,9 +22,11 @@
<property name="showSql" value="false" /> <property name="showSql" value="false" />
</plugin> </plugin>
<!-- <plugin interceptor="com.mortals.framework.thirty.dm.DmTransInterceptor">--> <!--
<!-- <property name="showSql" value="false" />--> <plugin interceptor="com.mortals.framework.thirty.dm.DmTransInterceptor">
<!-- </plugin>--> <property name="showSql" value="false" />
</plugin>
-->
</plugins> </plugins>
</configuration> </configuration>
\ No newline at end of file
...@@ -20,11 +20,11 @@ client.global.set("authToken", JSON.parse(response.body).data.token); ...@@ -20,11 +20,11 @@ client.global.set("authToken", JSON.parse(response.body).data.token);
%} %}
###自助终端应用列表 ###自助终端应用列表
#POST {{baseUrl}}/app/interlist
POST {{baseUrl}}/app/interlist POST {{baseUrl}}/app/interlist
Content-Type: application/json Content-Type: application/json
{ {
"idList": [2,3,1],
"siteId": 1, "siteId": 1,
"page": 1, "page": 1,
"size": -1 "size": -1
...@@ -91,7 +91,7 @@ client.global.set("App_id", JSON.parse(response.body).data.id); ...@@ -91,7 +91,7 @@ client.global.set("App_id", JSON.parse(response.body).data.id);
%} %}
###自助终端应用查看 ###自助终端应用查看
GET {{baseUrl}}/app/interinfo?id=19999999999999999999999 GET {{baseUrl}}/app/interinfo?id=235
Accept: application/json Accept: application/json
###自助终端应用编辑 ###自助终端应用编辑
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment