Commit dae8bffc authored by 廖旭伟's avatar 廖旭伟

Merge remote-tracking branch 'origin/master'

parents 7ccecf10 6b1c92f1
......@@ -6,11 +6,11 @@
<a-button type="primary" @click="handleAdd">新增</a-button>
<a-button type="danger" @click="handleDelAll">批量删除</a-button>
</a-space>
<div class="search-box">
<div class="search-box" v-if="searchTemplate.length">
<a-input-group compact>
<a-select style="min-width: 100px" v-model="fieldCode">
<a-select-option
v-for="v in appTemplate"
v-for="v in searchTemplate"
:key="v.id"
:value="v.fieldCode"
>
......@@ -153,7 +153,9 @@ export default {
previewVisible: false,
previewData: {}, // 预览信息
appTemplate: [], // 字段模板列表
searchTemplate: [], //关联搜索字段模板列表
selectedRowKeys: [],
orConditionList: [],
};
},
computed: {
......@@ -190,14 +192,25 @@ export default {
return {
title: v.fieldName,
dataIndex: v.fieldCode,
customRender: (text, record) => {
let row = record.appInfoFieldList.find(
(item) => item.fieldCode == v.fieldCode
);
if (row && row.fieldTypeValue && !row.serviceApiParams) {
let fieldTypeValue = JSON.parse(row.fieldTypeValue);
return fieldTypeValue[text];
} else {
return text;
}
},
};
}
});
return [index, ...arr, action];
},
},
created() {
this.getTempleteList();
async created() {
await this.getTempleteList();
this.getDatasetList();
},
methods: {
......@@ -210,11 +223,15 @@ export default {
});
if (res.data.code === 1) {
let { data } = res.data.data;
this.appTemplate = data.sort((a, b) => {
let arr = data.sort((a, b) => {
return a.fieldOrderNo - b.fieldOrderNo;
});
if (this.appTemplate.length) {
this.fieldCode = this.appTemplate[0].fieldCode;
this.appTemplate = arr;
this.searchTemplate = data.filter((v) => {
return v.defaultValue == 1;
});
if (this.searchTemplate.length) {
this.fieldCode = this.searchTemplate[0].fieldCode;
}
}
},
......@@ -227,6 +244,16 @@ export default {
appId: this.appId,
fieldCode: this.fieldCode,
fieldValue: `%${this.searchVal}%`,
// orConditionList: [
// {
// fieldCode: this.fieldCode,
// fieldValue: `%${this.searchVal}%`,
// },
// {
// fieldCode: "top",
// fieldValue: `%%`,
// },
// ],
});
this.loading = false;
if (res.data.code === 1) {
......@@ -275,7 +302,8 @@ export default {
// 编辑
handleEdit(row) {
this.title = "编辑";
this.$refs.AddData.onEdit(row);
let data = this.$_.cloneDeep(row);
this.$refs.AddData.onEdit(data);
this.AddVisible = true;
},
// 选择
......
......@@ -120,6 +120,18 @@ export default {
title: "允许为空",
scopedSlots: { customRender: "fieldNull" },
},
{
title: "关联搜索",
dataIndex: "defaultValue",
customRender: (text) => {
return <a-tag> {text == 1 ? "" : ""} </a-tag>;
},
},
{
title: "默认值",
dataIndex: "fieldValue",
},
{
title: "操作",
width: "110px",
......@@ -239,5 +251,4 @@ export default {
};
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
<style lang="less" scoped></style>
......@@ -363,7 +363,7 @@ export default {
if (v.id) {
delete v.id;
}
v.fieldValue = undefined;
// v.fieldValue = v.fieldValue ?? undefined;
if (v.fieldType == "upload") {
v.fileList = [];
}
......@@ -396,30 +396,32 @@ export default {
},
// 编辑
onEdit(data) {
data.appInfoFieldList.forEach((v) => {
if (v.fieldType == "upload") {
if (v.fieldValue) {
let arr = v.fieldValue.split(",");
v.fileList = arr.map((v, i) => {
return {
uid: i,
name: v,
status: "done",
url: v,
};
});
} else {
v.fileList = [];
}
} else if (v.fieldType == "checkbox") {
if (v.fieldValue) {
v.checkbox = v.fieldValue.split(",");
} else {
v.checkbox = [];
setTimeout(() => {
data.appInfoFieldList.forEach((v) => {
if (v.fieldType == "upload") {
if (v.fieldValue) {
let arr = v.fieldValue.split(",");
v.fileList = arr.map((v, i) => {
return {
uid: i,
name: v,
status: "done",
url: v,
};
});
} else {
v.fileList = [];
}
} else if (v.fieldType == "checkbox") {
if (v.fieldValue) {
v.checkbox = v.fieldValue.split(",");
} else {
v.checkbox = [];
}
}
}
});
this.form = { ...data };
});
this.form = { ...data };
}, 10);
},
// 更改文件名称
......
......@@ -137,6 +137,15 @@
<a-radio :value="1"></a-radio>
</a-radio-group>
</a-form-model-item>
<a-form-model-item label="关联搜索" prop="defaultValue">
<a-radio-group v-model="form.defaultValue">
<a-radio value="0"></a-radio>
<a-radio value="1"></a-radio>
</a-radio-group>
</a-form-model-item>
<a-form-model-item label="默认值" prop="fieldValue">
<a-input v-model="form.fieldValue" placeholder="请输入默认值" />
</a-form-model-item>
<a-form-model-item label="排序" prop="fieldOrderNo">
<a-input-number v-model="form.fieldOrderNo" :min="0" />
</a-form-model-item>
......@@ -151,7 +160,9 @@
</a-form-model>
<div slot="footer">
<a-button @click="handleReset">重置</a-button>
<a-button type="primary" @click="handleOk">确定</a-button>
<a-button type="primary" @click="handleOk" :loading="loading"
>确定</a-button
>
</div>
</a-modal>
</div>
......@@ -221,6 +232,7 @@ export default {
},
data() {
return {
loading: false,
fieldTypeItem,
fieldType: [
{
......@@ -245,7 +257,8 @@ export default {
isList: 0, //字段是否列表显示(0.否,1.是)
fieldOrderNo: 99, // 排序号
fieldTypeValue: "", // 字段类型值
defaultValue: "", // 字段默认值
defaultValue: "1", // 字段默认值(用作关联搜索)
fieldValue: "", // 字段值
serviceApi: "", // 动态数据接口
serviceApiParams: "", // 动态数据参数配置
remark: "", //
......@@ -307,6 +320,7 @@ export default {
handleOk() {
this.$refs.form.validate(async (valid) => {
if (valid) {
this.loading = true;
let bol = this.templeteList.some((v) => v.fieldType == "table");
if (bol && !this.form.id && this.form.fieldType == "table") {
this.$message.warn("只能存在一个表格");
......@@ -333,6 +347,7 @@ export default {
? JSON.stringify(apiParamsObj)
: "",
});
this.loading = false;
let { code, msg } = res.data;
if (code === 1) {
this.$message.success(msg);
......
......@@ -13,10 +13,9 @@
style="width: 120px"
v-model="leftSource"
class="select-department"
placeholder="事项来源"
placeholder="全部来源"
:allowClear="true"
>
<a-select-option value=""> 全部来源 </a-select-option>
<a-select-option :value="0"> 一体化添加 </a-select-option>
<a-select-option :value="1"> 手动添加 </a-select-option>
</a-select>
......@@ -25,13 +24,10 @@
style="min-width: 120px"
v-model="leftDept"
class="select-department"
placeholder="部门搜索"
placeholder="全部部门"
optionFilterProp="label"
:allowClear="true"
>
<a-select-option value="" label="全部部门">
全部部门
</a-select-option>
<a-select-option
v-for="v in deptList"
:key="v.id"
......@@ -149,23 +145,21 @@
style="width: 120px"
v-model="rightSource"
class="select-department"
placeholder="事项来源"
placeholder="全部来源"
allowClear
>
<a-select-option value=""> 全部来源 </a-select-option>
<a-select-option :value="0"> 一体化事项 </a-select-option>
<a-select-option :value="1"> 自建事项 </a-select-option>
</a-select>
<a-select
showSearch
allowClear
style="min-width: 120px"
v-model="rightDept"
class="select-department"
placeholder="部门搜索"
placeholder="全部部门"
optionFilterProp="label"
>
<a-select-option value="" label="全部部门">
全部部门
</a-select-option>
<a-select-option
v-for="v in deptList"
:key="v.id"
......@@ -358,10 +352,10 @@ export default {
rightColumns,
leftLoading: false,
rightLoading: false,
leftSource: "", // 左边来源
leftDept: "", // 左边部门搜索
rightDept: "", // 右边部门搜索
rightSource: "", // 右边来源
leftSource: undefined, // 左边来源
leftDept: undefined, // 左边部门搜索
rightDept: undefined, // 右边部门搜索
rightSource: undefined, // 右边来源
selectedRowKeys: [],
matterSiteData: [], // 站点事项
matterDataList: [], //事项列表数据
......
......@@ -75,12 +75,10 @@
style="min-width: 120px"
v-model="deptSearch"
class="select-department"
placeholder="部门搜索"
placeholder="全部部门"
optionFilterProp="label"
allowClear
>
<a-select-option value="" label="全部部门">
全部部门
</a-select-option>
<a-select-option
v-for="v in deptList"
:key="v.id"
......@@ -352,7 +350,7 @@ export default {
Leftloading: false,
rightloading: false,
leftSearchVal: "", // 左边搜索
deptSearch: "", // 右边
deptSearch: undefined, // 右边
rightSearchVal: "", // 右边搜索
SiteBusinessData: [], // 站点业务
SiteMatterData: [], //站点事项
......@@ -852,4 +850,4 @@ export default {
.site-business {
margin-bottom: 0px !important;
}
</style>
\ No newline at end of file
</style>
<template>
<template>
<div class="basicset-tab4">
<div class="left">
<div class="header">
......@@ -13,7 +13,7 @@
allowClear
v-model="dept"
class="select-department"
placeholder="部门搜索"
placeholder="全部部门"
optionFilterProp="label"
>
<a-select-option
......@@ -30,7 +30,7 @@
allowClear
v-model="source"
class="select-department"
placeholder="事项来源"
placeholder="全部来源"
>
<a-select-option :value="0"> 一体化添加 </a-select-option>
<a-select-option :value="1"> 手动添加 </a-select-option>
......
......@@ -181,6 +181,7 @@ export default {
// 确定
handleOk() {
this.$refs.formData.validate(async (valid) => {
console.log(this.form.parentId);
if (valid) {
this.confirmLoading = true;
let res = await saveBusiness({
......@@ -190,8 +191,9 @@ export default {
let { code, msg, data } = res.data;
if (code === 1) {
if (!this.form.id) {
let businessId = data.id ? data.id : data.entity.id;
let result = await addInBusiness({
businessIds: String(data.entity.id),
businessIds: String(businessId),
siteId: this.siteId,
});
if (result.data.code === 1) {
......
......@@ -199,7 +199,7 @@ export default {
}
}
.show-skin {
margin-bottom: 20px;
margin-bottom: 10px;
-transform: scale(0.9);
img {
width: 100%;
......
<template>
<div class="system flex flexc">
<a-tabs :activeKey="activeKey" @change="changeRouter">
<a-tab-pane key="/system/user">
<!-- <a-tab-pane key="/system/user">
<span slot="tab">
<a-icon type="user" />
用户管理
......@@ -24,7 +24,7 @@
<a-icon type="deployment-unit" />
维度管理
</span>
</a-tab-pane>
</a-tab-pane> -->
<a-tab-pane key="/system/parameter">
<span slot="tab">
<a-icon type="container" />
......
......@@ -156,6 +156,10 @@ export default {
this.loading = false;
if (res.data.code == 1) {
let { data, total, dict } = res.data.data;
if (!data.length && this.current > 1) {
this.current -= 1;
this.getDimensionList();
}
this.tableData = data;
this.total = total;
this.dict = dict;
......
......@@ -213,6 +213,7 @@ export default {
this.dict = dict;
if (!data.length && this.current > 1) {
this.current -= 1;
this.getSystemParameterList();
}
this.total = total;
this.tableData = data;
......
......@@ -166,6 +166,10 @@ export default {
this.loading = false;
if (res.data.code == 1) {
let { data, total, dict } = res.data.data;
if (!data.length && this.current > 1) {
this.current -= 1;
this.getResourceList();
}
this.tableData = data;
this.total = total;
this.dict = dict;
......
......@@ -141,6 +141,10 @@ export default {
this.loading = false;
if (res.data.code == 1) {
let { data, total } = res.data.data;
if (!data.length && this.current > 1) {
this.current -= 1;
this.getRoleList();
}
this.tableData = data;
this.total = total;
}
......
......@@ -64,13 +64,14 @@
<AddUserRole
ref="AddUserRole"
:addVisible.sync="addVisible"
:roleList="roleList"
@addSuccess="getUserList"
></AddUserRole>
</div>
</template>
<script>
import { getUserList } from "@/services/system";
import { getUserList, getRoleList } from "@/services/system";
import { pageSizeOptions } from "@/config/pageConfig.js";
import AddUserRole from "./modal/AddUserRole.vue";
import { mapState } from "vuex";
......@@ -98,8 +99,15 @@ export default {
title: "所属角色",
dataIndex: "roleIds",
customRender: (text) => {
if (text && this.dict.roleIds) {
return <a-tag>{this.dict.roleIds[text]}</a-tag>;
if (text && this.roleList.length) {
let obj = {};
this.roleList.forEach((v) => {
obj[v.id] = v.name;
});
let roleIds = text.split(",");
return roleIds.map((v) => {
return <a-tag>{obj[v]}</a-tag>;
});
}
},
},
......@@ -130,6 +138,7 @@ export default {
realName: "",
},
tableData: [],
roleList: [], // 角色列表
selectedRowKeys: [],
dict: {}, // 字典
addVisible: false,
......@@ -141,9 +150,22 @@ export default {
...mapState("site", ["userInfo"]),
},
created() {
this.getRoleList();
this.getUserList();
},
methods: {
// 获取角色列表
async getRoleList() {
let res = await getRoleList({
page: 1,
size: -1,
});
if (res.data.code == 1) {
let { data } = res.data.data;
this.roleList = data;
}
},
// 获取用户列表
async getUserList() {
this.loading = true;
......@@ -155,6 +177,10 @@ export default {
this.loading = false;
if (res.data.code == 1) {
let { data, total, dict } = res.data.data;
if (!data.length && this.current > 1) {
this.current -= 1;
this.getUserList();
}
let { name } = this.userInfo;
if (this.loginNames.includes(name)) {
this.tableData = data;
......
......@@ -38,7 +38,7 @@
</template>
<script>
import { getRoleList, saveUser } from "@/services/system";
import { saveUser } from "@/services/system";
export default {
components: {},
......@@ -48,6 +48,11 @@ export default {
type: Boolean,
default: false,
},
roleList: {
required: true,
type: Array,
default: () => [],
},
},
data() {
return {
......@@ -55,7 +60,6 @@ export default {
form: {
roleIds: [],
},
roleList: [],
rules: {
roleIds: [{ required: true, message: "请选择角色", trigger: "change" }],
},
......@@ -71,21 +75,8 @@ export default {
},
},
},
created() {
this.getRoleList();
},
created() {},
methods: {
// 获取角色列表
async getRoleList() {
let res = await getRoleList({
page: 1,
size: -1,
});
if (res.data.code == 1) {
let { data } = res.data.data;
this.roleList = data;
}
},
// 新增
onAdd() {
Object.assign(this.form, this.$options.data().form);
......@@ -96,7 +87,7 @@ export default {
this.$nextTick(() => {
this.form = { ...row };
if (this.form.roleIds) {
this.form.roleIds = this.form.roleIds.split(",");
this.form.roleIds = this.form.roleIds.split(",").map(Number);
} else {
this.form.roleIds = [];
}
......
......@@ -306,7 +306,7 @@ const options = {
meta: {
icon: "global",
},
redirect: "system/user",
redirect: "system/parameter",
children: [
{
path: "user",
......
......@@ -244,107 +244,6 @@ UPDATE mortals_sys_skin_base SET imageResolution="1280x1280" WHERE imageResoluti
ALTER TABLE mortals_sys_site_matter ADD COLUMN `hallCheckIn` tinyint(2) DEFAULT '0' COMMENT '大厅事项入驻(0.否,1.是)' AFTER agentPost;
-- ----------------------------
2024-04-08
-- ----------------------------
-- ----------------------------
-- 排号汇总表
-- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_ph_queue`;
CREATE TABLE mortals_xhx_ph_queue(
`id` bigint(20) AUTO_INCREMENT COMMENT '序号,主键,自增长',
`ordernumber` varchar(64) NOT NULL COMMENT '预约编号,为空现场取号',
`style` char(8) NOT NULL DEFAULT '未叫号' COMMENT '叫号状态 (未叫号,叫号中,完成)',
`business` varchar(128) NOT NULL COMMENT '业务名',
`window_name` varchar(128) NOT NULL COMMENT '窗口名',
`window_fromnum` varchar(128) NOT NULL COMMENT '窗口编号',
`flownum` varchar(64) NOT NULL COMMENT '流水编号,当天的第xxx号',
`formernum` varchar(32) NOT NULL COMMENT '呼叫转移号',
`people_idcard` varchar(64) NOT NULL COMMENT '身份证号',
`people_name` varchar(64) NOT NULL COMMENT '姓名',
`people_sex` char(6) NOT NULL COMMENT '性别',
`people_phone` varchar(20) NOT NULL COMMENT '手机号',
`workman_name` varchar(32) NOT NULL COMMENT '工作人员姓名',
`workman_number` varchar(20) NOT NULL COMMENT '工作人员工号',
`taketime` datetime COMMENT '取号时间',
`calltime` datetime COMMENT '叫号时间',
`endtime` datetime COMMENT '结束时间',
`wait_time` int(9) NOT NULL DEFAULT '0' COMMENT '等待时间,单位s',
`handle_time` int(9) NOT NULL DEFAULT '0' COMMENT '办理时间,单位s',
`device_name` varchar(128) NOT NULL COMMENT '取号设备名',
`call_name` varchar(128) NOT NULL COMMENT '呼叫设备',
`matter_name` varchar(256) NOT NULL COMMENT '事项名',
`queueid` varchar(128) NOT NULL COMMENT '排号队列ID,唯一',
`wy_signin` varchar(16) NOT NULL DEFAULT '现场取号' COMMENT '取号方式 (现场取号,微信取号)',
`section_name` varchar(128) NOT NULL COMMENT '部门名称',
`hall_name` varchar(128) NOT NULL COMMENT '大厅名称',
`device_type` varchar(32) NOT NULL DEFAULT '排号机' COMMENT '取号设备类型',
`site_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '站点Id',
`site_code` varchar(128) NOT NULL COMMENT '站点编码',
`site_name` varchar(128) COMMENT '站点名称',
`ext_num` varchar(128) NOT NULL COMMENT '扩展编号',
`create_user_id` bigint(20) COMMENT '创建用户',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime COMMENT '更新时间',
PRIMARY KEY (`id`)
,KEY `style` (`style`) USING BTREE
,KEY `business` (`business`) USING BTREE
,KEY `window_fromnum` (`window_fromnum`) USING BTREE
,KEY `people_idcard` (`people_idcard`) USING BTREE
,KEY `people_phone` (`people_phone`) USING BTREE
,KEY `workman_number` (`workman_number`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='排号汇总';
-- ----------------------------
-- 评价汇总表
-- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_pj_evaluate`;
CREATE TABLE mortals_xhx_pj_evaluate(
`id` bigint(20) AUTO_INCREMENT COMMENT '序号,主键,自增长',
`people_idcard` varchar(64) NOT NULL COMMENT '评价人身份证号',
`people_name` varchar(64) NOT NULL COMMENT '评价人姓名',
`people_sex` char(6) NOT NULL COMMENT '评价人性别',
`people_phone` varchar(20) NOT NULL COMMENT '评价人手机号',
`pj_option` varchar(32) NOT NULL COMMENT '评价选项(非常满意,满意,基本满意,不满意,非常不满意)',
`content_tag` varchar(255) NOT NULL COMMENT '评价标签',
`pic_url` varchar(128) NOT NULL COMMENT '评价人图片地址',
`section_name` varchar(128) NOT NULL COMMENT '部门',
`hall_name` varchar(128) NOT NULL COMMENT '大厅',
`pj_source` varchar(20) NOT NULL COMMENT '评价来源 (安卓,导视机,微信)',
`opinion` varchar(512) COMMENT '手输意见',
`window_name` varchar(128) NOT NULL COMMENT '窗口名',
`window_fromnum` varchar(128) NOT NULL COMMENT '窗口编号',
`flounum` varchar(20) COMMENT '排号编号',
`pjxt` varchar(32) DEFAULT '窗口评价' COMMENT '窗口评价(自助服务终端,背靠背评价,微官网)',
`workman_name` varchar(32) NOT NULL COMMENT '工作人员姓名',
`workman_number` varchar(20) NOT NULL COMMENT '工作人员工号',
`devicenum` varchar(64) COMMENT '评价器mac',
`evaluatestatus` varchar(32) DEFAULT '等待评价' COMMENT '评价状态(等待评价,完成,截图有误,用户截图签名超时,用户评价超时,收到图片等待签名',
`evaluatetype` char(8) DEFAULT '截图' COMMENT '截图还是评价 (截图,评价)',
`photobefor` varchar(256) NOT NULL COMMENT '截图地址',
`photoautograph` varchar(256) COMMENT '签字图片',
`picture` varchar(256) NOT NULL COMMENT '抓拍评价人照片',
`process` varchar(256) NOT NULL COMMENT '音频视频地址',
`eyevaluate` varchar(16) DEFAULT '未标记' COMMENT '评价标记(未标记,标记非恶意差评,标记恶意差评)',
`pj_type` varchar(16) NOT NULL DEFAULT '窗口评价' COMMENT '评价指向 (窗口评价,部门评价,排号评价)',
`pj_time` datetime COMMENT '评价时间',
`site_id` bigint(20) DEFAULT '0' COMMENT '站点Id',
`site_code` varchar(128) COMMENT '站点编码',
`site_name` varchar(128) COMMENT '站点名称',
`ext_num` varchar(128) COMMENT '扩展编号',
`create_user_id` bigint(20) COMMENT '创建用户',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime COMMENT '更新时间',
PRIMARY KEY (`id`)
,KEY `people_idcard` (`people_idcard`) USING BTREE
,KEY `people_phone` (`people_phone`) USING BTREE
,KEY `pj_option` (`pj_option`) USING BTREE
,KEY `pj_source` (`pj_source`) USING BTREE
,KEY `site_id` (`site_id`) USING BTREE
,KEY `site_code` (`site_code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='评价汇总';
ALTER TABLE mortals_sys_dept ADD COLUMN `inNum` int(9) DEFAULT '0' COMMENT '入驻事项数量' AFTER updateTime;
......
......@@ -58,6 +58,7 @@ build_service() {
echo "[Service]" >>${SERVICE}
echo "Environment=\"JAVA_HOME=$JAVA_HOME\"" >>${SERVICE}
echo "Type=forking" >>${SERVICE}
echo "ExecStartPre=-/bin/sleep 5s" >>${SERVICE}
echo "ExecStart=${EXECPATH}/bin/start.sh" >>${SERVICE}
echo "ExecStop=${EXECPATH}/bin/shutdown.sh" >>${SERVICE}
echo "PrivateTmp=true" >>${SERVICE}
......@@ -82,7 +83,6 @@ start_service() {
project_deploy() {
writelog "${PROJECT_NAME}_deploy"
systemctl stop ${PROJECT_NAME}
sleep 5
clear_deploy ${PROJECT_SERVICE} ${PROJECT_EXECPATH}
writelog "${PROJECT_NAME}_clear_finish"
tar -zvxf ./${PROJECT_FILENAME} -C ${PUBLISH_PATH}
......
......@@ -27,6 +27,7 @@ import com.mortals.xhx.base.system.menu.model.MenuEntity;
import com.mortals.xhx.base.system.menu.service.MenuService;
import com.mortals.xhx.base.system.resource.model.ResourceEntity;
import com.mortals.xhx.base.system.resource.service.ResourceService;
import com.mortals.xhx.base.system.role.model.RoleUserEntity;
import com.mortals.xhx.base.system.role.model.RoleUserQuery;
import com.mortals.xhx.base.system.role.service.RoleUserService;
import com.mortals.xhx.base.system.user.dao.UserDao;
......@@ -273,6 +274,18 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE
return super.find(params, pageInfo, null);
}
@Override
protected void findAfter(UserEntity params, PageInfo pageInfo, Context context, List<UserEntity> list) throws AppException {
list.stream().peek(item -> {
RoleUserQuery roleUserQuery = new RoleUserQuery();
roleUserQuery.setUserId(item.getId());
String roleIds = roleUserService.find(roleUserQuery).stream().map(RoleUserEntity::getRoleId).map(String::valueOf).collect(Collectors.joining(","));
item.setRoleIds(roleIds);
}).count();
super.findAfter(params, pageInfo, context, list);
}
@Override
public UserEntity createUser(IUser currUser, Long customerId, String customerName, String loginName, String password,
String userName, String mobile) throws AppException {
......
......@@ -11,6 +11,11 @@ import com.mortals.framework.model.Context;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.framework.web.BaseCRUDJsonMappingController;
import com.mortals.xhx.base.framework.annotation.Operlog;
import com.mortals.xhx.base.system.role.model.RoleQuery;
import com.mortals.xhx.base.system.role.model.RoleUserEntity;
import com.mortals.xhx.base.system.role.model.RoleUserQuery;
import com.mortals.xhx.base.system.role.service.RoleService;
import com.mortals.xhx.base.system.role.service.RoleUserService;
import com.mortals.xhx.base.system.user.model.UserEntity;
import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.common.code.UserStatus;
......@@ -26,6 +31,7 @@ import javax.servlet.http.HttpServletResponse;
import java.util.Base64;
import java.util.HashMap;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 用户信息
......@@ -37,6 +43,12 @@ import java.util.Map;
@RequestMapping("user")
public class UserController extends BaseCRUDJsonBodyMappingController<UserService, UserEntity, Long> {
@Autowired
private RoleService roleService;
@Autowired
private RoleUserService roleUserService;
public UserController() {
super.setModuleDesc("用户信息");
}
......@@ -46,6 +58,8 @@ public class UserController extends BaseCRUDJsonBodyMappingController<UserServic
Map<String, Object> statsus = new HashMap<String, Object>();
statsus.put("userType", IBaseEnum.getEnumMap(UserType.class));
statsus.put("status", UserStatus.getEnumMap());
this.addDict(model, "roleIds", roleService.find(new RoleQuery()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getName())));
model.put(KEY_RESULT_DICT, statsus);
}
......@@ -59,14 +73,15 @@ public class UserController extends BaseCRUDJsonBodyMappingController<UserServic
}
}
/* @Override
protected void saveBefore(UserEntity entity, Map<String, Object> model, Context context) throws AppException {
if (!ObjectUtils.isEmpty(entity.getLoginName())&&service.existUser(entity.getLoginName(), entity.getId())) {
throw new AppException("登录名已存在!");
}
super.saveBefore(entity, model, context);
}*/
@Override
protected int editAfter(Long id, Map<String, Object> model, UserEntity entity, Context context) throws AppException {
RoleUserQuery roleUserQuery = new RoleUserQuery();
roleUserQuery.setUserId(entity.getId());
String roleIds = roleUserService.find(roleUserQuery).stream().map(RoleUserEntity::getRoleId).map(String::valueOf).collect(Collectors.joining(","));
entity.setRoleIds(roleIds);
return super.editAfter(id, model, entity, context);
}
@RequestMapping(value = "change/password", method = RequestMethod.POST)
@Operlog(msg = "密码修改成功!")
......
......@@ -464,7 +464,8 @@ public class MatterDetailHtmlParseUtil {
// String url = "http://www.sczwfw.gov.cn/jiq/front/transition/ywTransToDetail?areaCode=511500000000&itemCode=511A0151400000-511500000000-000-511501-7-1-00&taskType=1&deptCode=511501-7";
// String url = "http://www.sczwfw.gov.cn/jiq/front/transition/ywTransToDetail?areaCode=511500000000&itemCode=511A0000400004-511500000000-000-1151120000870212XU-1-00&taskType=1&deptCode=3922757070285361152";
String url = "http://www.sczwfw.gov.cn/jiq/front/transition/ywTransToDetail?areaCode=511500000000&itemCode=512036008003-511500000000-000-11511200MB1503849K-1-00&taskType=20&deptCode=3907787168696946688";
// String url = "http://www.sczwfw.gov.cn/jiq/front/transition/ywTransToDetail?areaCode=511500000000&itemCode=512036008003-511500000000-000-11511200MB1503849K-1-00&taskType=20&deptCode=3907787168696946688";
String url = "https://www.sczwfw.gov.cn/jiq/front/transition/ywTransToDetail?areaCode=511500000000&itemCode=511A0101600004-511500000000-000-11511200008702584B-1-00&taskType=1&deptCode=511501-7";
Document dom = MatterDetailHtmlParseUtil.getDomByHtml(url);
Map<String, String> baseInfoMap = MatterDetailHtmlParseUtil.getbaseInfoMapByHtml(dom);
......
package com.mortals.xhx.module.app.service.impl;
import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.app.model.*;
import com.mortals.xhx.module.app.service.AppDatasetService;
import com.mortals.xhx.module.app.service.AppInfoFieldService;
import com.mortals.xhx.module.app.service.AppService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
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.app.dao.AppInfoTempleteFieldDao;
import com.mortals.xhx.module.app.model.AppInfoTempleteFieldEntity;
import com.mortals.xhx.module.app.service.AppInfoTempleteFieldService;
import org.springframework.util.ObjectUtils;
import java.util.ArrayList;
import java.util.List;
/**
* AppInfoTempleteFieldService
* 自助终端应用模板信息字段 service实现
*
* @author zxfei
* @date 2022-11-28
*/
* AppInfoTempleteFieldService
* 自助终端应用模板信息字段 service实现
*
* @author zxfei
* @date 2022-11-28
*/
@Service("appInfoTempleteFieldService")
public class AppInfoTempleteFieldServiceImpl extends AbstractCRUDServiceImpl<AppInfoTempleteFieldDao, AppInfoTempleteFieldEntity, Long> implements AppInfoTempleteFieldService {
@Autowired
private AppService appService;
@Autowired
private AppDatasetService appDatasetService;
@Autowired
private AppInfoFieldService appInfoFieldService;
/**
* @param entity
* @param context
* @throws AppException
*/
@Override
protected void saveAfter(AppInfoTempleteFieldEntity entity, Context context) throws AppException {
//同步添加已有模板数据
AppDatasetQuery appDatasetQuery = new AppDatasetQuery();
appDatasetQuery.setAppId(entity.getAppId());
List<AppDatasetEntity> appDatasetEntities = appDatasetService.find(appDatasetQuery, context);
// 判断该数据集 是否已经存在 没存在 再添加
ArrayList<AppInfoFieldEntity> fieldSaveList = new ArrayList<>();
for (AppDatasetEntity appDatasetEntity : appDatasetEntities) {
AppInfoFieldQuery appInfoFieldQuery = new AppInfoFieldQuery();
appInfoFieldQuery.setDatasetId(appDatasetEntity.getId());
appInfoFieldQuery.setFieldCode(entity.getFieldCode());
appInfoFieldQuery.setFieldType(entity.getFieldType());
AppInfoFieldEntity appInfoFieldEntity = appInfoFieldService.selectOne(appInfoFieldQuery, context);
if (ObjectUtils.isEmpty(appInfoFieldEntity)) {
AppInfoFieldEntity fieldEntity = new AppInfoFieldEntity();
fieldEntity.initAttrValue();
BeanUtils.copyProperties(entity, fieldEntity, BeanUtil.getNullPropertyNames(entity));
fieldEntity.setDatasetId(appDatasetEntity.getId());
fieldEntity.setId(null);
fieldSaveList.add(fieldEntity);
}
}
if (!ObjectUtils.isEmpty(fieldSaveList)) {
appInfoFieldService.save(fieldSaveList, context);
}
super.saveAfter(entity, context);
}
}
\ No newline at end of file
......@@ -49,14 +49,11 @@ import static com.mortals.framework.ap.SysConstains.*;
@RequestMapping("app/dataset")
public class AppDatasetController extends BaseCRUDJsonBodyMappingController<AppDatasetService, AppDatasetEntity, Long> {
@Autowired
private ParamService paramService;
public AppDatasetController() {
super.setModuleDesc("自助终端应用数据集");
}
/**
* @param query
* @return
......@@ -75,38 +72,46 @@ public class AppDatasetController extends BaseCRUDJsonBodyMappingController<AppD
@Override
protected void doListBefore(AppDatasetEntity query, Map<String, Object> model, Context context) throws AppException {
if (!ObjectUtils.isEmpty(query.getOrConditionList())||!ObjectUtils.isEmpty(query.getAndConditionList())) {
if (!ObjectUtils.isEmpty(query.getOrConditionList()) || !ObjectUtils.isEmpty(query.getAndConditionList())) {
AppDatasetQuery appDatasetQuery = new AppDatasetQuery();
if (!ObjectUtils.isEmpty(query.getOrConditionList())){
appDatasetQuery.setOrConditionList(query.getOrConditionList());
}
if(!ObjectUtils.isEmpty(query.getAndConditionList())){
if (!ObjectUtils.isEmpty(query.getAndConditionList())) {
appDatasetQuery.setOrConditionList(query.getAndConditionList());
}
appDatasetQuery.setAppId(query.getAppId());
PageInfo pageInfo = this.buildPageInfo(query);
Result<AppInfoFieldEntity> customResult = this.service.findCustomList(appDatasetQuery, pageInfo, context);
//根据查询条件的数量去除数量不足的结果
int count = query.getOrConditionList().size();
List<Long> datasetIdList = customResult.getList().stream().map(item -> item.getDatasetId()).collect(Collectors.toList());
Map<Long, Long> collect = datasetIdList.stream().collect(Collectors.groupingBy(x -> x, Collectors.counting()));
List<Long> dataSets = collect.entrySet().stream().map(entrySet -> {
if (entrySet.getValue() == count) {
return entrySet.getKey();
if (!ObjectUtils.isEmpty(query.getOrConditionList())) {
appDatasetQuery.setOrConditionList(query.getOrConditionList());
appDatasetQuery.setAppId(query.getAppId());
appDatasetQuery.setOrderCols(query.getOrderCols());
PageInfo pageInfo = this.buildPageInfo(query);
Result<AppInfoFieldEntity> customResult = this.service.findCustomList(appDatasetQuery, pageInfo, context);
//根据查询条件的数量去除数量不足的结果
int count = query.getOrConditionList().size();
List<Long> datasetIdList = customResult.getList().stream().map(item -> item.getDatasetId()).collect(Collectors.toList());
Map<Long, Long> collect = datasetIdList.stream().collect(Collectors.groupingBy(x -> x, Collectors.counting()));
List<Long> dataSets = collect.entrySet().stream().map(entrySet -> {
if (entrySet.getValue() == count) {
return entrySet.getKey();
} else {
return null;
}
}).filter(f -> f != null).collect(Collectors.toList());
if (!ObjectUtils.isEmpty(dataSets)) {
//排序-
List<Long> orderList = new ArrayList<>();
for (Long dataId : datasetIdList) {
if(dataSets.contains(dataId)){
orderList.add(dataId);
}
}
query.setIdList(orderList);
} else {
return null;
query.setIdList(ListUtil.toList(0L));
}
}).filter(f -> f != null).collect(Collectors.toList());
if (!ObjectUtils.isEmpty(dataSets)) {
query.setIdList(dataSets);
}else{
query.setIdList(ListUtil.toList(0L));
query.setOrConditionList(null);
}
query.setOrConditionList(null);
}
if (!ObjectUtils.isEmpty(query.getFieldCode()) || !ObjectUtils.isEmpty(query.getFieldName())) {
......@@ -122,6 +127,7 @@ public class AppDatasetController extends BaseCRUDJsonBodyMappingController<AppD
List<Long> datasetIdList = customResult.getList().stream().map(item -> item.getDatasetId()).collect(Collectors.toList());
if (!ObjectUtils.isEmpty(datasetIdList)) {
query.setIdList(datasetIdList);
//query.setOrderColList();
} else {
query.setIdList(ListUtil.toList(0L));
}
......
package com.mortals.xhx.module.base.service;
import com.mortals.framework.common.Rest;
import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.base.model.BaseAreaEntity;
import java.util.List;
/**
* BaseAreaService
*
* 区域 service接口
*
* @author zxfei
* @date 2022-11-22
*/
public interface BaseAreaService extends ICRUDService<BaseAreaEntity,Long>{
* BaseAreaService
* <p>
* 区域 service接口
*
* @author zxfei
* @date 2022-11-22
*/
public interface BaseAreaService extends ICRUDService<BaseAreaEntity, Long> {
/**
* 根据顶点名称生成子节点
* @param baseAreaEntity
*
* @param baseAreaEntity
* @param context
*/
Rest<String> genSubAreaByRootName(BaseAreaEntity baseAreaEntity, Context context);
Rest<List<String>> getSubAreaByRootName(BaseAreaEntity baseAreaEntity, Context context);
}
\ No newline at end of file
......@@ -69,37 +69,24 @@ public class BaseAreaServiceImpl extends AbstractCRUDServiceImpl<BaseAreaDao, Ba
return Rest.ok("初始化区域数据成功!");
}
/**
* 递归列表
* @param baseAreaEntity
* @param context
* @return
*/
private void recursionFn(List<BaseAreaEntity> list, BaseAreaEntity t) {
// 得到子节点列表
List<BaseAreaEntity> childList = getChildList(list, t);
t.setChildren(childList);
for (BaseAreaEntity tChild : childList) {
if (hasChild(list, tChild)) {
recursionFn(list, tChild);
}
}
}
@Override
public Rest<List<String>> getSubAreaByRootName(BaseAreaEntity baseAreaEntity, Context context) {
/**
* 得到子节点列表
*/
private List<BaseAreaEntity> getChildList(List<BaseAreaEntity> list, BaseAreaEntity t) {
return list.stream().map(item -> {
if (!ObjectUtils.isEmpty(item.getPid()) && item.getPid() == t.getIid()) {
return item;
}
return null;
}).filter(f -> f != null).collect(Collectors.toList());
}
String areaCode = baseAreaEntity.getAreaCode();
String matchCode = areaCode.replaceAll("(0)+$", "");
matchCode = AreaMatchCodeUtil.getMatchCode(matchCode, baseAreaEntity.getAreaLevel());
BaseAreaQuery baseAreaQuery = new BaseAreaQuery();
baseAreaQuery.setAreaCode(matchCode + "%");
List<BaseAreaEntity> baseAreaEntityList =this.find(baseAreaQuery);
List<String> areaCodeList = baseAreaEntityList.stream().map(i -> i.getAreaCode()).collect(Collectors.toList());
/**
* 判断是否有子节点
*/
private boolean hasChild(List<BaseAreaEntity> list, BaseAreaEntity t) {
return getChildList(list, t).size() > 0 ? true : false;
return Rest.ok(areaCodeList);
}
}
\ No newline at end of file
......@@ -41,6 +41,9 @@ public interface DeptService extends ICRUDCacheService<DeptEntity, Long> {
Rest<String> syncDeptBySiteId(SiteEntity siteEntity, Context context);
Rest<List<DeptEntity>> getDeptByWeb(String areaCode, Context context);
Rest<Map<String, List<DeptVo>>> getBusinessByDept(DeptQuery deptQuery, Context context);
......
......@@ -88,7 +88,7 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
protected void updateBefore(DeptEntity entity, Context context) throws AppException {
super.updateBefore(entity, context);
DeptEntity beforeEntity = this.get(entity.getId(), context);
if(!beforeEntity.getDeptNumber().equals(entity.getDeptNumber())){
if (!beforeEntity.getDeptNumber().equals(entity.getDeptNumber())) {
DeptEntity extCache = this.getExtCache(entity.getDeptNumber());
if (!ObjectUtils.isEmpty(extCache)) {
throw new AppException("部门编码重复!deptCode:" + extCache.getDeptNumber());
......@@ -156,6 +156,39 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
return Rest.ok("当前站点同步添加部门成功!");
}
/**
* @param areaCode
* @param context
* @return
*/
@Override
public Rest<List<DeptEntity>> getDeptByWeb(String areaCode, Context context) {
String url = GlobalSysInfo.getParamValue(Constant.GOV_DEPT_URL, "http://www.sczwfw.gov.cn/jiq/front/channel/deptSwitch");
Map<String, String> params = new HashMap<>();
params.put("areaCode", areaCode);
Rest<Map<String, String>> rest = MatterHtmlParseUtil.syncDeptBySiteId(params, url);
ArrayList<DeptEntity> deptEntities = new ArrayList<>();
if (rest.getCode() == YesNoEnum.YES.getValue() && rest.getData().keySet().size() > 0) {
int sortN = 1;
Map<String, String> data = rest.getData();
for (Map.Entry<String, String> item : data.entrySet()) {
String deptCode = item.getKey();
String deptName = item.getValue();
DeptEntity deptEntity = new DeptEntity();
deptEntity.initAttrValue();
deptEntity.setDeptNumber(deptCode);
deptEntity.setName(deptName);
deptEntity.setSort(sortN);
deptEntity.setSource(SourceEnum.政务网.getValue());
deptEntities.add(deptEntity);
sortN++;
}
} else {
return Rest.fail(deptEntities);
}
return Rest.ok(deptEntities);
}
@Override
public Rest<Map<String, List<DeptVo>>> getBusinessByDept(DeptQuery deptQuery, Context context) {
......
......@@ -22,6 +22,11 @@ public class MatterVo extends BaseEntityLong {
private List <String> eventTypeShowNotList;
private Integer isSub;
private String genFilePath;
}
\ No newline at end of file
......@@ -2,9 +2,12 @@ package com.mortals.xhx.module.matter.service;
import com.mortals.framework.common.Rest;
import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.matter.model.MatterEntity;
import com.mortals.xhx.module.matter.model.MatterExtEntity;
import com.mortals.xhx.module.site.model.SiteEntity;
import java.util.List;
/**
* MatterExtService
*
......@@ -31,4 +34,8 @@ public interface MatterExtService extends ICRUDService<MatterExtEntity,Long>{
*/
Rest<String> syncDelMatterBySiteId(SiteEntity siteEntity, Context context);
Rest<List<MatterEntity>> getWebMatterListByAreaCode(String Code, Context context);
}
\ No newline at end of file
......@@ -273,5 +273,28 @@ public class MatterExtServiceImpl extends AbstractCRUDServiceImpl<MatterExtDao,
return Rest.ok("同步删除成功!");
}
/**
* @param Code
* @param context
* @return
*/
@Override
public Rest<List<MatterEntity>> getWebMatterListByAreaCode(String areaCode, Context context) {
List<DeptEntity> deptEntities = deptService.getDeptByWeb(areaCode, context).getData();
List<MatterEntity> govMatterList = deptEntities.parallelStream().flatMap(deptEntity -> {
HashMap<String, String> params = new HashMap<>();
params.put("areaCode",areaCode);
params.put("dxType", "6");
params.put("deptCode", deptEntity.getDeptNumber());
params.put("searchtext", "");
params.put("taskType", "");
List<MatterEntity> deptMatterList = this.getMatters(params, context);
return deptMatterList.stream();
}).collect(Collectors.toList());
return Rest.ok(govMatterList);
}
}
\ No newline at end of file
......@@ -21,6 +21,9 @@ import com.mortals.xhx.common.code.SourceEnum;
import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.common.utils.MatterDetailHtmlParseUtil;
import com.mortals.xhx.module.base.model.BaseAreaEntity;
import com.mortals.xhx.module.base.model.BaseAreaQuery;
import com.mortals.xhx.module.base.service.BaseAreaService;
import com.mortals.xhx.module.dept.model.DeptEntity;
import com.mortals.xhx.module.dept.service.DeptService;
import com.mortals.xhx.module.matter.dao.MatterDao;
......@@ -41,6 +44,7 @@ import com.mortals.xhx.module.site.service.SiteThemeService;
import com.mortals.xhx.module.window.model.WindowMatterQuery;
import com.mortals.xhx.module.window.service.WindowMatterService;
import io.netty.handler.timeout.ReadTimeoutException;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
......@@ -48,6 +52,7 @@ import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
......@@ -105,6 +110,8 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
private SiteThemeService siteThemeService;
@Autowired
private WindowMatterService windowMatterService;
@Autowired
private BaseAreaService baseAreaService;
@Override
......@@ -1069,7 +1076,7 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
if (matterEditionLocal >= matterEditionRemote) {
//bool = true;
msg = "本地事项版本大于等于远端,不需要更新!!";
// break;
// break;
// return Rest.fail("本地事项版本大于等于远端,不需要更新!");
}
......@@ -1426,7 +1433,7 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
Map<String, String> baseInfoMap = MatterDetailHtmlParseUtil.getbaseInfoMapByHtml(dom);
StringBuilder sb1 = new StringBuilder();
for (Map.Entry<String, String> entry : baseInfoMap.entrySet()) {
if(sb1.length()>360){
if (sb1.length() > 360) {
sb.append(sb1);
sb.append("\n");
sb1 = new StringBuilder();
......@@ -1443,7 +1450,7 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
for (Map<String, Object> sqclMap : sqclList) {
Map<String, String> baseinfoMap = (HashMap<String, String>) sqclMap.get("baseinfo");
for (Map.Entry<String, String> entry : baseinfoMap.entrySet()) {
if(!"材料名称".equals(entry.getKey())){
if (!"材料名称".equals(entry.getKey())) {
continue;
}
sb.append(entry.getKey()).append(" ").append(entry.getValue());
......@@ -1509,7 +1516,7 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
List<Map<String, Object>> cjwtMapList = MatterDetailHtmlParseUtil.getCjwtMapByHtml(dom);
for (Map<String, Object> bllcMap : cjwtMapList) {
for (Map.Entry<String, Object> entry : bllcMap.entrySet()) {
if(sb3.length()>360){
if (sb3.length() > 360) {
sb.append(sb3);
sb.append("\n");
sb3 = new StringBuilder();
......@@ -1521,7 +1528,7 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
}
sb.append(sb3);
strList.add(sb.toString());
log.info("事项名称:{}",matterEntity.getMatterName());
log.info("事项名称:{}", matterEntity.getMatterName());
break;
} catch (Exception e) {
log.error("异常", e);
......@@ -1537,7 +1544,7 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
//todo 实时爬取后组合
String path = "E:\\temp.csv";
FileUtil.writeUtf8Lines(strList,path);
FileUtil.writeUtf8Lines(strList, path);
return Rest.ok();
}
......@@ -1546,7 +1553,16 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
@Override
public Rest<Void> genMatterMarkdown(MatterQuery matterQuery, Context context) {
List<String> strList = new ArrayList<>();
List<MatterEntity> mattersList = this.find(matterQuery);
BaseAreaQuery baseAreaQuery = new BaseAreaQuery();
baseAreaQuery.setAreaCode(matterQuery.getAreaCode());
BaseAreaEntity baseAreaEntity = baseAreaService.selectOne(baseAreaQuery);
List<MatterEntity> mattersList = matterExtService.getWebMatterListByAreaCode(matterQuery.getAreaCode(), context).getData();
//List<MatterEntity> mattersList = this.find(matterQuery);
int total = 0;
int page = 1;
for (MatterEntity matterEntity : mattersList) {
if (ObjectUtils.isEmpty(matterEntity.getUrl())) {
continue;
......@@ -1554,36 +1570,76 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
StringBuilder sb = new StringBuilder();
int reCount = 0;
while (reCount < MAX_RETRY_COUNT) {
try {
Document dom = Jsoup.connect(matterEntity.getUrl())
.ignoreContentType(true)
.ignoreHttpErrors(true)
.timeout(60 * 1000).get();
//基本属性
sb.append("# "+matterEntity.getMatterName()+"\n");
sb.append("# " + matterEntity.getMatterName() + "\n");
sb.append("\n");
sb.append("## 基本信息\n");
Map<String, String> baseInfoMap = MatterDetailHtmlParseUtil.getbaseInfoMapByHtml(dom);
sb.append(String.format("| **名称** \t| %s \t|", "", ""));
sb.append("\n");
sb.append("|-------:\t|---\t|");
sb.append("\n");
for (Map.Entry<String, String> entry : baseInfoMap.entrySet()) {
sb.append(entry.getKey()).append(" ").append(entry.getValue());
sb.append(String.format("| **%s** \t| %s \t|", entry.getKey(), entry.getValue()));
sb.append("\n");
}
sb.append("\n");
//更新材料属性
sb.append("## 申请材料\n");
/**
* | | **材料名称** | **材料必要性** | **原件和复印件** | **纸质/电子** | **纸质材料份数** | **要求提供材料的依据** |
* |--- |:---: |--- |--- |--- |--- |--- |
* | 1 | 参保人银行账户信息 | 123 | 123 | 123 | 123 | 1131 |
*/
List<Map<String, Object>> sqclList = MatterDetailHtmlParseUtil.getsqclInfoMapByHtml(dom);
for (Map<String, Object> sqclMap : sqclList) {
Map<String, String> baseinfoMap = (HashMap<String, String>) sqclMap.get("baseinfo");
for (Map.Entry<String, String> entry : baseinfoMap.entrySet()) {
if("要求提供材料的依据".equals(entry.getKey())) continue;
sb.append(entry.getKey()).append(" ").append(entry.getValue());
sb.append("\n");
if (!ObjectUtils.isEmpty(sqclList)) {
Map<String, Object> map = sqclList.get(0);
Map<String, String> baseinfoHeadMap = (HashMap<String, String>) map.get("baseinfo");
sb.append("| \t");
for (Map.Entry<String, String> entry : baseinfoHeadMap.entrySet()) {
String key = entry.getKey();
if ("要求提供材料的依据".equals(entry.getKey())) continue;
sb.append(String.format("| **%s** \t", key));
}
sb.append("|\n");
sb.append("|:---:\t");
for (Map.Entry<String, String> entry : baseinfoHeadMap.entrySet()) {
if ("要求提供材料的依据".equals(entry.getKey())) continue;
sb.append("|:---:\t");
}
sb.append("|\n");
int count = 1;
for (Map<String, Object> sqclMap : sqclList) {
sb.append(String.format("| %d \t", count));
count++;
Map<String, String> baseinfoMap = (HashMap<String, String>) sqclMap.get("baseinfo");
for (Map.Entry<String, String> entry : baseinfoMap.entrySet()) {
if ("要求提供材料的依据".equals(entry.getKey())) continue;
sb.append(String.format("| %s \t", entry.getValue()));
/* sb.append(entry.getKey()).append(" ").append(entry.getValue());
sb.append("\n");
*/
}
sb.append("|\n");
}
}
//更新受理条件
sb.append("\n");
sb.append("## 受理条件\n");
......@@ -1596,10 +1652,9 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
List<Map<String, Object>> bllcMapList = MatterDetailHtmlParseUtil.getbllcMapByHtml(dom);
for (Map<String, Object> bllcMap : bllcMapList) {
for (Map.Entry<String, Object> entry : bllcMap.entrySet()) {
if("sort".equals(entry.getKey())){
if ("sort".equals(entry.getKey())) {
sb.append("流程").append(":").append(entry.getValue());
}else{
} else {
sb.append(entry.getKey()).append(" ").append(entry.getValue());
}
sb.append("\n");
......@@ -1615,31 +1670,29 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
sb.append(sfbzStr);
//设定依据
/* sb.append(matterEntity.getMatterName()).append("-设定依据,");
sb.append("\n");
sb.append("## 设定依据\n");
List<Map<String, Object>> sdyjMapList = MatterDetailHtmlParseUtil.getSdyjMapByHtml(dom);
StringBuilder sb2 = new StringBuilder();
for (Map<String, Object> bllcMap : sdyjMapList) {
for (Map.Entry<String, Object> entry : bllcMap.entrySet()) {
if(sb2.length()>360){
sb.append(sb2);
sb.append("\n");
sb2 = new StringBuilder();
sb.append(matterEntity.getMatterName()).append("-设定依据,");
}
if ("sort".equals(entry.getKey())) continue;
sb2.append(entry.getKey()).append(" ").append(entry.getValue());
sb2.append("\n");
}
sb2.append("\n");
}
sb.append(sb2);*/
sb.append(sb2);
//中介服务
sb.append("\n");
sb.append("## 中介服务\n");
Map<String, String> zjfwMap = MatterDetailHtmlParseUtil.getZjfwMapByHtml(dom);
if(zjfwMap.size()>0){
if (zjfwMap.size() > 0) {
for (Map.Entry<String, String> entry : zjfwMap.entrySet()) {
sb.append(entry.getKey()).append(" ").append(entry.getValue());
}
}else{
} else {
sb.append("无\n");
}
......@@ -1651,11 +1704,11 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
for (Map<String, Object> bllcMap : cjwtMapList) {
for (Map.Entry<String, Object> entry : bllcMap.entrySet()) {
sb.append(entry.getKey()).append(" ").append(entry.getValue());
sb.append("\n");
sb.append("\n\n");
}
}
strList.add(sb.toString());
log.info("事项名称:{}",matterEntity.getMatterName());
log.info("事项名称:{}", matterEntity.getMatterName());
break;
} catch (Exception e) {
log.error("异常", e);
......@@ -1666,9 +1719,38 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
}
}
}
total++;
if (total > 200) {
total = 0;
String fileName = "gov" + page + ".md";
if (!ObjectUtils.isEmpty(baseAreaEntity)) {
fileName = baseAreaEntity.getName() + page + ".md";
}
String genFilePath = matterQuery.getGenFilePath();
String path = "";
if (!ObjectUtils.isEmpty(genFilePath)) {
path = genFilePath + fileName;
} else {
path = "E:\\md\\" + fileName;
}
FileUtil.writeUtf8Lines(strList, path);
page++;
strList = new ArrayList<>();
}
// break;
}
/* String fileName = "gov-1.md";
if (!ObjectUtils.isEmpty(baseAreaEntity)) {
fileName = baseAreaEntity.getName() + ".md";
}
String path = "E:\\gov.md";
FileUtil.writeUtf8Lines(strList,path);
String path = "E:\\" + fileName;
FileUtil.writeUtf8Lines(strList, path);*/
return Rest.ok();
}
......
......@@ -14,6 +14,9 @@ import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.framework.config.InterceptorConfig;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.JointInfoShowEnum;
import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.module.base.model.BaseAreaEntity;
import com.mortals.xhx.module.base.service.BaseAreaService;
import com.mortals.xhx.module.matter.model.MatterEntity;
import com.mortals.xhx.module.matter.model.MatterQuery;
import com.mortals.xhx.module.matter.service.MatterService;
......@@ -29,6 +32,7 @@ import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
......@@ -53,6 +57,8 @@ public class MatterController extends BaseCRUDJsonBodyMappingController<MatterSe
private SiteThemeService siteThemeService;
@Autowired
private MatterService matterService;
@Autowired
private BaseAreaService baseAreaService;
public MatterController() {
super.setModuleDesc("基础事项");
......@@ -203,10 +209,10 @@ public class MatterController extends BaseCRUDJsonBodyMappingController<MatterSe
int code = VALUE_RESULT_SUCCESS;
try {
/* Runnable runnable = new Runnable() {
*//**
*
*//*
/* Runnable runnable = new Runnable() {
*//**
*
*//*
@Override
public void run() {
matterService.genMatterTxt(query, getContext());
......@@ -239,7 +245,20 @@ public class MatterController extends BaseCRUDJsonBodyMappingController<MatterSe
int code = VALUE_RESULT_SUCCESS;
try {
this.service.genMatterMarkdown(query, getContext());
if (!ObjectUtils.isEmpty(query.getIsSub()) && YesNoEnum.YES.getValue() == query.getIsSub()) {
BaseAreaEntity baseAreaEntity = new BaseAreaEntity();
baseAreaEntity.setAreaCode(query.getAreaCode());
List<String> subAreaCodeList = baseAreaService.getSubAreaByRootName(baseAreaEntity, context).getData();
for (String subAreaCode : subAreaCodeList) {
MatterQuery matterEntity = new MatterQuery();
matterEntity.setAreaCode(subAreaCode);
matterEntity.setGenFilePath(query.getGenFilePath());
this.service.genMatterMarkdown(matterEntity, getContext());
}
}else{
this.service.genMatterMarkdown(query, getContext());
}
model.put(MESSAGE_INFO, busiDesc + "成功");
} catch (Exception e) {
......
......@@ -179,6 +179,7 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
workmanEntityCondition.setSiteName(oldSite.getSiteName());
workmanService.updateBatch(workmanEntity, workmanEntityCondition, context);
}
@Override
......@@ -376,6 +377,12 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
Rest<Void> rest1 = deviceFeign.refreshMessage(devicePdu);
log.info("调用刷新结果:{}", JSON.toJSONString(rest1));
refresh = false;
//刷新站点树
cacheService.del(USER_SITE_TREE);
this.updateAllSiteTree(context);
}
}
......
......@@ -34,4 +34,11 @@ public class WindowVo extends BaseEntityLong {
/** 序号,主键,自增长排除列表 */
private List <Long> idNotList;
/** 开始 创建时间 */
private String createTimeStart;
/** 结束 创建时间 */
private String createTimeEnd;
}
\ No newline at end of file
......@@ -45,4 +45,5 @@ application:
auth:
unloginUrl: /refresh,/error,/login/login,/login/index,/login/logout,/securitycode/createCode,/file/common/*,/test*,/padsign/*,/terminal/*,/resource/list,/api/asset/*,/api/*,/flow/*,/uploads/*,/project/file/*,/file/*,/assessment/*
uncheckUrl: /refresh,/error,/login/login,/login/index,/login/logout,/securitycode/createCode,/file/common/*,/test*,/padsign/*,/terminal/*,/resource/list,/api/asset/*,/api/*,/flow/*,/uploads/*,/project/file/*,/file/*,/assessment/*
dm:
enable: true
......@@ -21,5 +21,10 @@
<property name="enableExecutorTime" value="false" />
<property name="showSql" value="false" />
</plugin>
<!-- <plugin interceptor="com.mortals.framework.thirty.dm.DmTransInterceptor">
</plugin>-->
</plugins>
</configuration>
\ No newline at end of file
......@@ -70,6 +70,7 @@
(#{appId},#{createTime},#{updateUserId},#{updateTime})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_sys_app_dataset
......@@ -375,14 +376,56 @@
<sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()">
order by
<if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
field(a.id,
<foreach collection="conditionParamRef.idList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('appIdList') and conditionParamRef.appIdList.size() > 0">
field(a.appId,
<foreach collection="conditionParamRef.appIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('updateUserIdList') and conditionParamRef.updateUserIdList.size() > 0">
field(a.updateUserId,
<foreach collection="conditionParamRef.updateUserIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<trim suffixOverrides="," suffix="">
<foreach collection="orderColList" open="" close="" index="index" item="item" separator=",">
${item.colName} ${item.sortKind}
a.${item.colName} ${item.sortKind}
</foreach>
</trim>
</if>
<if test="(orderColList == null or orderColList.isEmpty()) and orderCol != null and !orderCol.isEmpty()">
order by
<if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
field(a.id,
<foreach collection="conditionParamRef.idList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('appIdList') and conditionParamRef.appIdList.size() > 0">
field(a.appId,
<foreach collection="conditionParamRef.appIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('updateUserIdList') and conditionParamRef.updateUserIdList.size() > 0">
field(a.updateUserId,
<foreach collection="conditionParamRef.updateUserIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<trim suffixOverrides="," suffix="">
<if test="orderCol.containsKey('id')">
a.id
......@@ -411,6 +454,8 @@
</if>
</trim>
</if>
</sql>
<sql id="_group_by_">
<if test="groupList != null and !groupList.isEmpty()">
......
......@@ -15,18 +15,7 @@
<if test="condition.appId!=null and condition.appId!=''">
and a.appId = #{condition.appId,jdbcType=VARCHAR}
</if>
<include refid="_second_condition_"/>
<!-- <if test="condition.fieldCode!=null and condition.fieldCode!=''">
and b.fieldCode = #{condition.fieldCode,jdbcType=VARCHAR}
</if>
<if test="condition.fieldName!=null and condition.fieldName!=''">
and b.fieldName = #{condition.fieldName,jdbcType=VARCHAR}
</if>
<if test="condition.fieldValue != null and condition.fieldValue != ''">
and b.fieldValue like #{condition.fieldValue}
</if>-->
</trim>
</trim>
</select>
......@@ -45,54 +34,19 @@
and a.appId = #{condition.appId,jdbcType=VARCHAR}
</if>
<include refid="_second_condition_"/>
<!-- <if test="condition.fieldCode!=null and condition.fieldCode!=''">
and b.fieldCode = #{condition.fieldCode,jdbcType=VARCHAR}
</if>
<if test="condition.fieldName!=null and condition.fieldName!=''">
and b.fieldName = #{condition.fieldName,jdbcType=VARCHAR}
</if>
<if test="condition.fieldValue != null and condition.fieldValue != ''">
and b.fieldValue like #{condition.fieldValue}
</if>-->
</trim>
</trim>
<if test="(orderColList == null or orderColList.isEmpty()) and orderCol != null and !orderCol.isEmpty()">
order by
IF
( `fieldCode` = 'top', '0', '1' ),
`fieldValue` DESC,
IF
( `fieldType` = 'date', '0', '1' ),
`fieldValue` DESC;
CASE
WHEN fieldType = 'date' THEN STR_TO_DATE(fieldValue, '%Y-%m-%d')
ELSE NULL
END
<trim prefix="," suffixOverrides="," suffix="">
<if test="orderCol.containsKey('id')">
a.id
<if test='orderCol.id != null and "DESC".equalsIgnoreCase(orderCol.id)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('appId')">
a.appId
<if test='orderCol.appId != null and "DESC".equalsIgnoreCase(orderCol.appId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('createTime')">
a.createTime
<if test='orderCol.createTime != null and "DESC".equalsIgnoreCase(orderCol.createTime)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('updateUserId')">
a.updateUserId
<if test='orderCol.updateUserId != null and "DESC".equalsIgnoreCase(orderCol.updateUserId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('updateTime')">
a.updateTime
<if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
,
</if>
</trim>
</if>
</select>
<!-- 条件映射 -->
......
......@@ -19,7 +19,10 @@ Content-Type: application/json
{
"page": 1,
"size": 10
"size": 10,
"appId": 226,
"fieldCode": "top",
"fieldValue": "%%"
}
###自助终端应用数据集列表1
......@@ -32,17 +35,21 @@ Content-Type: application/json
{
"fieldName": "部门",
"fieldValue": "市公安局"
},{
},
{
"fieldName": "员工姓名",
"fieldValue": "%黄%"
},
{
"fieldValueList": ["员工姓名"]
"fieldValueList": [
"员工姓名"
]
}
],
"page": 1,
"size": 10
}
......
......@@ -37,7 +37,11 @@ Content-Type: application/json
POST {{baseUrl}}/matter/genMatterMarkdown
Content-Type: application/json
{}
{"areaCode": "510100000000",
"genFilePath": "/home/md/",
"isSub": 1
}
###基础事项列表
......
###站点部门窗口列表
POST http://112.19.80.237:11078/base/window/list
POST {{baseUrl}}/window/interlist
Content-Type: application/json
{
......@@ -8,6 +8,7 @@ Content-Type: application/json
"page":1,
"size":10,
"name": "",
"createTimeStart": "2024-01-01",
"fromnum": "1E%"
}
......
......@@ -65,6 +65,7 @@ build_service() {
echo "[Service]" >>${SERVICE}
echo "Environment=\"JAVA_HOME=$JAVA_HOME\"" >>${SERVICE}
echo "Type=forking" >>${SERVICE}
echo "ExecStartPre=-/bin/sleep 5s" >>${SERVICE}
echo "ExecStart=${EXECPATH}/bin/start.sh" >>${SERVICE}
echo "ExecStop=${EXECPATH}/bin/shutdown.sh" >>${SERVICE}
echo "PrivateTmp=true" >>${SERVICE}
......
......@@ -157,11 +157,13 @@ public class UserController extends BaseCRUDJsonBodyMappingController<UserServic
public String changePassword(@RequestBody UserEntity entity) {
JSONObject ret = new JSONObject();
try {
String busiDesc = this.getModuleDesc() + "密码修改";
String oldPwd = LoginAESUtil.decrypt(entity.getOldPwd(),AES_KEY,AES_IV,LoginAESUtil.AES_CBC);
String newPwd = LoginAESUtil.decrypt(entity.getNewPwd(),AES_KEY,AES_IV,LoginAESUtil.AES_CBC);
entity.setOldPwd(oldPwd);
entity.setNewPwd(newPwd);
service.updateUserPwd(super.getCurUser().getLoginName(), entity.getOldPwd(), entity.getNewPwd());
recordSysLog(request, busiDesc + "【成功】");
ret.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
ret.put(KEY_RESULT_MSG, "密码修改成功!");
} catch (Exception e) {
......@@ -285,11 +287,13 @@ public class UserController extends BaseCRUDJsonBodyMappingController<UserServic
public String resetPassword(@RequestBody UserEntity entity) {
JSONObject ret = new JSONObject();
try {
String busiDesc = this.getModuleDesc() + "密码重置";
String newPwd = LoginAESUtil.decrypt(entity.getNewPwd(),AES_KEY,AES_IV,LoginAESUtil.AES_CBC);
entity.setNewPwd(newPwd);
String loginName = LoginAESUtil.decrypt(entity.getLoginName(),AES_KEY,AES_IV,LoginAESUtil.AES_CBC);
entity.setLoginName(loginName);
service.resetUserPwd(entity.getLoginName(), entity.getNewPwd(),this.getContext());
recordSysLog(request, busiDesc + "【成功】");
ret.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
ret.put(KEY_RESULT_MSG, "密码修改成功!");
} catch (Exception e) {
......
......@@ -51,6 +51,7 @@ build_service() {
echo "[Service]" >>${SERVICE}
echo "Environment=\"JAVA_HOME=$JAVA_HOME\"" >>${SERVICE}
echo "Type=forking" >>${SERVICE}
echo "ExecStartPre=-/bin/sleep 5s" >>${SERVICE}
echo "ExecStart=${EXECPATH}/bin/start.sh" >>${SERVICE}
echo "ExecStop=${EXECPATH}/bin/shutdown.sh" >>${SERVICE}
echo "PrivateTmp=true" >>${SERVICE}
......
......@@ -152,6 +152,15 @@ spring:
metadata:
response-timeout: 200000
connect-timeout: 200000
# 报表系统
- id: bill-manager
#uri: http://192.168.0.98:21080
uri: lb://bill-manager
predicates:
- Path=/bill/**
metadata:
response-timeout: 200000
connect-timeout: 200000
nacos:
# Nacos 作为注册中心的配置项,对应 NacosDiscoveryProperties 配置类
discovery:
......
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