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

Merge remote-tracking branch 'origin/master'

parents e28c882f dd6abf42
...@@ -474,11 +474,14 @@ export default { ...@@ -474,11 +474,14 @@ export default {
icon: "exclamation-circle", icon: "exclamation-circle",
maskClosable: true, maskClosable: true,
onOk() { onOk() {
_this.$refs.form.resetFields();
_this.isTimely = undefined; // 是否及时办理 _this.isTimely = undefined; // 是否及时办理
_this.isPromise = undefined; // 承诺是否及时办理 _this.isPromise = undefined; // 承诺是否及时办理
_this.isLinked = undefined; // 是否有联办机构 _this.isLinked = undefined; // 是否有联办机构
_this.form.deptName = ""; _this.baseform.deptName = "";
_this.$refs.form.resetFields(); _this.baseform.deptCode = "";
_this.baseform.matterNo = "";
_this.curDpt = undefined;
}, },
onCancel() { onCancel() {
console.log("Cancel"); console.log("Cancel");
......
...@@ -96,6 +96,12 @@ ...@@ -96,6 +96,12 @@
<span class="primary pointer" @click="handlePreview(text.id)" <span class="primary pointer" @click="handlePreview(text.id)"
>预览</span >预览</span
> >
<span
class="delete pointer"
v-permission="[1]"
@click="handleDel(text.id)"
>删除</span
>
</a-space> </a-space>
</template> </template>
</a-table> </a-table>
...@@ -118,6 +124,7 @@ import { ...@@ -118,6 +124,7 @@ import {
usedVersion, usedVersion,
previewVersion, previewVersion,
getCategoryList, getCategoryList,
deleteVersion,
} from "@/services/market"; } from "@/services/market";
import CheckSite from "../modal/CheckSite.vue"; import CheckSite from "../modal/CheckSite.vue";
import { pageSizeOptions } from "@/config/pageConfig.js"; import { pageSizeOptions } from "@/config/pageConfig.js";
...@@ -270,6 +277,33 @@ export default { ...@@ -270,6 +277,33 @@ export default {
window.open(routeUrl.href, "_blank"); window.open(routeUrl.href, "_blank");
} }
}, },
// 删除
handleDel(id) {
let _this = this;
_this.$confirm({
title: "系统提示",
content: "删除不可恢复,确定要删除吗?",
okText: "确定",
okType: "danger",
cancelText: "取消",
centered: true,
icon: "exclamation-circle",
maskClosable: true,
async onOk() {
let res = await deleteVersion({ id });
let { code, msg } = res.data;
if (code === 1) {
_this.$message.success(msg);
_this.getVersions();
}
},
onCancel() {
console.log("Cancel");
},
});
},
// 翻页 // 翻页
handleChange(cur) { handleChange(cur) {
this.current = cur; this.current = cur;
......
<template>
<div class="select-box">
<a-select :value="value" placeholder="请选择" @change="changeVal">
<a-select-option v-for="(v, key) in options" :key="key" :value="key">
{{ v }}
</a-select-option>
</a-select>
</div>
</template>
<script>
import local from "@/utils/local";
import { request } from "@/utils/request";
export default {
model: {
prop: "value",
event: "change",
},
props: {
value: {
required: true,
default: "",
},
info: {
type: Object,
required: true,
default: () => {},
},
},
data() {
return {
siteId: local.getLocal("siteId"),
api: process.env.VUE_APP_API_BASE_URL,
options: {},
};
},
watch: {
info: {
handler() {
this.getOptions();
},
deep: true,
immediate: true,
},
},
methods: {
// 获取数据
async getOptions() {
if (this.$_.isEmpty(this.info)) return this.options;
let { serviceApi, fieldTypeValue } = this.info;
let fieldType = JSON.parse(fieldTypeValue);
if (!serviceApi && fieldTypeValue) {
this.options = fieldType;
} else if (serviceApi) {
let res = await request(this.api + serviceApi, "post", {
size: -1,
page: 1,
siteId: this.siteId,
});
if (res.data.code == 1) {
let { data } = res.data.data;
const firstKey = Object.keys(fieldType)[0];
const firstValue = fieldType[firstKey];
data.forEach((v) => {
this.options[v[firstValue]] = v[firstKey];
});
this.$forceUpdate();
}
}
},
changeVal(val) {
this.$emit("change", val);
},
},
beforeDestroy() {
this.options = {};
},
};
</script>
<style lang="less" scoped>
.select-box {
width: 100%;
}
</style>
...@@ -234,7 +234,7 @@ export default { ...@@ -234,7 +234,7 @@ export default {
let { code, msg } = res.data; let { code, msg } = res.data;
if (code === 1) { if (code === 1) {
_this.$message.success(msg); _this.$message.success(msg);
this.selectedRowKeys = []; _this.selectedRowKeys = [];
_this.getCategoryList(); _this.getCategoryList();
} }
}, },
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
<div class="search-box"> <div class="search-box">
<a-input-group compact> <a-input-group compact>
<a-select style="min-width: 100px" v-model="fieldCode"> <a-select style="min-width: 100px" v-model="fieldCode">
<a-select-option value=""> 全部 </a-select-option>
<a-select-option <a-select-option
v-for="v in appTemplate" v-for="v in appTemplate"
:key="v.id" :key="v.id"
...@@ -214,6 +213,9 @@ export default { ...@@ -214,6 +213,9 @@ export default {
this.appTemplate = data.sort((a, b) => { this.appTemplate = data.sort((a, b) => {
return a.fieldOrderNo - b.fieldOrderNo; return a.fieldOrderNo - b.fieldOrderNo;
}); });
if (this.appTemplate.length) {
this.fieldCode = this.appTemplate[0].fieldCode;
}
} }
}, },
// 获取数据列表 // 获取数据列表
...@@ -224,7 +226,7 @@ export default { ...@@ -224,7 +226,7 @@ export default {
size: this.size, size: this.size,
appId: this.appId, appId: this.appId,
fieldCode: this.fieldCode, fieldCode: this.fieldCode,
fieldValue: this.searchVal, fieldValue: `%${this.searchVal}%`,
}); });
this.loading = false; this.loading = false;
if (res.data.code === 1) { if (res.data.code === 1) {
......
...@@ -4,6 +4,12 @@ ...@@ -4,6 +4,12 @@
<a-space> <a-space>
<a-button type="primary" @click="handleAdd"> 新增应用 </a-button> <a-button type="primary" @click="handleAdd"> 新增应用 </a-button>
<a-button type="primary" @click="handleClone"> 克隆 </a-button> <a-button type="primary" @click="handleClone"> 克隆 </a-button>
<a-button type="primary" @click="handleTheme">
批量关联应用主题
</a-button>
<a-button v-permission="[1]" type="danger" @click="handleDelAll">
批量删除
</a-button>
</a-space> </a-space>
<a-input-search <a-input-search
style="width: 300px" style="width: 300px"
...@@ -67,7 +73,7 @@ ...@@ -67,7 +73,7 @@
</template> </template>
<!-- 版本 --> <!-- 版本 -->
<template slot="version" slot-scope="text"> <template slot="version" slot-scope="text">
{{ text.version ? "v" + text.version : "--" }} {{ text.version || text.version == 0 ? "v" + text.version : "--" }}
</template> </template>
<!-- 类型 --> <!-- 类型 -->
<template slot="appType" slot-scope="text"> <template slot="appType" slot-scope="text">
...@@ -91,7 +97,7 @@ ...@@ -91,7 +97,7 @@
> >
<span <span
class="delete pointer" class="delete pointer"
:class="{ unDelete: text.distribute }" :class="{ unDelete: userInfo.id != 1 && text.distribute }"
@click="handleDel(text.distribute, text.id)" @click="handleDel(text.distribute, text.id)"
>删除</span >删除</span
> >
...@@ -114,22 +120,30 @@ ...@@ -114,22 +120,30 @@
:appList="selectedRowKeys" :appList="selectedRowKeys"
:siteVisible.sync="siteVisible" :siteVisible.sync="siteVisible"
></CheckSite> ></CheckSite>
<!-- 批量修改应用主题 -->
<ChangeThem
:themVisible.sync="themVisible"
:themList="categoryList"
:appList="selectedAppList"
@edit="cloneSuccess"
></ChangeThem>
</div> </div>
</template> </template>
<script> <script>
import YSwitch from "../../../../components/yswitch/YSwitch.vue"; import YSwitch from "../../../../components/yswitch/YSwitch.vue";
import { pageSizeOptions } from "@/config/pageConfig.js";
import AddApp from "../modal/AddApp.vue"; import AddApp from "../modal/AddApp.vue";
import CheckSite from "../modal/CheckSite.vue"; import CheckSite from "../modal/CheckSite.vue";
import ChangeThem from "../modal/ChangeThem.vue";
import { import {
getAppList, getAppList,
deleteApp, deleteApp,
saveApp, saveApp,
getCategoryList, getCategoryList,
} from "@/services/market"; } from "@/services/market";
import { mapMutations } from "vuex";
import local from "@/utils/local"; import local from "@/utils/local";
import { mapMutations, mapGetters } from "vuex";
import { pageSizeOptions } from "@/config/pageConfig.js";
const columns = [ const columns = [
{ {
title: "序号", title: "序号",
...@@ -184,6 +198,7 @@ export default { ...@@ -184,6 +198,7 @@ export default {
YSwitch, YSwitch,
AddApp, AddApp,
CheckSite, CheckSite,
ChangeThem,
}, },
data() { data() {
return { return {
...@@ -198,32 +213,21 @@ export default { ...@@ -198,32 +213,21 @@ export default {
size: 10, size: 10,
total: 0, total: 0,
pageSizeOptions, pageSizeOptions,
selectedRowKeys: [], // 表格勾选数据 selectedRowKeys: [], // 表格勾选id列表
selectedAppList: [], // 表格勾选信息列表
AddVisible: false, AddVisible: false,
title: "新增应用", title: "新增应用",
siteVisible: false, siteVisible: false,
themVisible: false,
dict: {}, // 字典 dict: {}, // 字典
categoryList: [], // 应用分类列表 categoryList: [], // 应用分类列表
}; };
}, },
// 进入路由前
// beforeRouteEnter(to, from, text) { computed: {
// if (from.path === "/appmarket/appdetails") { ...mapGetters("site", ["userInfo"]),
// to.meta.isBack = true; },
// } else {
// to.meta.isBack = false;
// }
// text();
// },
// // 详情页返回不刷新数据
// activated() {
// if (!this.$route.meta.isBack) {
// Object.assign(this.$data, this.$options.data());
// this.getAppList();
// } else {
// this.$route.meta.isBack = false;
// }
// },
created() { created() {
this.getCategoryList(); this.getCategoryList();
this.getAppList(); this.getAppList();
...@@ -232,7 +236,6 @@ export default { ...@@ -232,7 +236,6 @@ export default {
...mapMutations("site", ["SET_appDict"]), ...mapMutations("site", ["SET_appDict"]),
// 获取分类列表 // 获取分类列表
async getCategoryList() { async getCategoryList() {
this.loading = true;
let res = await getCategoryList({ let res = await getCategoryList({
page: 1, page: 1,
size: -1, size: -1,
...@@ -243,6 +246,7 @@ export default { ...@@ -243,6 +246,7 @@ export default {
this.categoryList = data; this.categoryList = data;
} }
}, },
// 获取应用列表 // 获取应用列表
async getAppList() { async getAppList() {
this.loading = true; this.loading = true;
...@@ -297,8 +301,17 @@ export default { ...@@ -297,8 +301,17 @@ export default {
this.getAppList(); this.getAppList();
}, },
// 勾选表格 // 勾选表格
onSelectChange(keys) { onSelectChange(keys, rows) {
this.selectedRowKeys = keys; this.selectedRowKeys = keys;
this.selectedAppList = [...this.selectedAppList, ...rows];
let map = new Map();
this.selectedAppList = this.selectedAppList
.filter((v) => {
return !map.has(v.id) && map.set(v.id, 1);
})
.filter((v) => {
return this.selectedRowKeys.some((item) => item == v.id);
});
}, },
// 编辑 // 编辑
handleEdit(row) { handleEdit(row) {
...@@ -306,6 +319,16 @@ export default { ...@@ -306,6 +319,16 @@ export default {
this.$refs.AddApp.onEdit(row); this.$refs.AddApp.onEdit(row);
this.AddVisible = true; this.AddVisible = true;
}, },
// 批量修改应用主题
handleTheme() {
if (!this.selectedRowKeys.length) {
this.$message.warning("请先勾选应用");
return;
}
this.themVisible = true;
},
// 查看 // 查看
handleCheck(id) { handleCheck(id) {
this.$router.push({ this.$router.push({
...@@ -317,7 +340,7 @@ export default { ...@@ -317,7 +340,7 @@ export default {
}, },
// 删除 // 删除
handleDel(distribute, id) { handleDel(distribute, id) {
if (distribute) { if (this.userInfo.id != 1 && distribute) {
this.$confirm({ this.$confirm({
title: "拒绝删除", title: "拒绝删除",
content: "该应用正在使用中。", content: "该应用正在使用中。",
...@@ -359,6 +382,17 @@ export default { ...@@ -359,6 +382,17 @@ export default {
}, },
}); });
}, },
// 批量删除
handleDelAll() {
if (!this.selectedRowKeys.length) {
this.$message.warning("请先勾选应用");
return;
}
let ids = this.selectedRowKeys.join(",");
this.handleDel(0, ids);
},
// 克隆成功 // 克隆成功
cloneSuccess() { cloneSuccess() {
this.selectedRowKeys = []; this.selectedRowKeys = [];
......
...@@ -4,6 +4,12 @@ ...@@ -4,6 +4,12 @@
<a-space> <a-space>
<a-button type="primary" @click="handleAdd"> 新增应用 </a-button> <a-button type="primary" @click="handleAdd"> 新增应用 </a-button>
<a-button type="primary" @click="handleClone"> 克隆 </a-button> <a-button type="primary" @click="handleClone"> 克隆 </a-button>
<a-button type="primary" @click="handleTheme">
批量关联应用主题
</a-button>
<a-button v-permission="[1]" type="danger" @click="handleDelAll">
批量删除
</a-button>
</a-space> </a-space>
<a-input-search <a-input-search
style="width: 300px" style="width: 300px"
...@@ -67,7 +73,7 @@ ...@@ -67,7 +73,7 @@
</template> </template>
<!-- 版本 --> <!-- 版本 -->
<template slot="version" slot-scope="text"> <template slot="version" slot-scope="text">
{{ text.version ? "v" + text.version : "--" }} {{ text.version || text.version == 0 ? "v" + text.version : "--" }}
</template> </template>
<!-- 类型 --> <!-- 类型 -->
<template slot="appType" slot-scope="text"> <template slot="appType" slot-scope="text">
...@@ -91,7 +97,7 @@ ...@@ -91,7 +97,7 @@
> >
<span <span
class="delete pointer" class="delete pointer"
:class="{ unDelete: text.distribute }" :class="{ unDelete: userInfo.id != 1 && text.distribute }"
@click="handleDel(text.distribute, text.id)" @click="handleDel(text.distribute, text.id)"
>删除</span >删除</span
> >
...@@ -114,6 +120,13 @@ ...@@ -114,6 +120,13 @@
:appList="selectedRowKeys" :appList="selectedRowKeys"
:siteVisible.sync="siteVisible" :siteVisible.sync="siteVisible"
></CheckSite> ></CheckSite>
<!-- 批量修改应用主题 -->
<ChangeThem
:themVisible.sync="themVisible"
:themList="categoryList"
:appList="selectedAppList"
@edit="cloneSuccess"
></ChangeThem>
</div> </div>
</template> </template>
...@@ -121,6 +134,7 @@ ...@@ -121,6 +134,7 @@
import YSwitch from "../../../../components/yswitch/YSwitch.vue"; import YSwitch from "../../../../components/yswitch/YSwitch.vue";
import AddApp from "../modal/AddApp.vue"; import AddApp from "../modal/AddApp.vue";
import CheckSite from "../modal/CheckSite.vue"; import CheckSite from "../modal/CheckSite.vue";
import ChangeThem from "../modal/ChangeThem.vue";
import { import {
getAppList, getAppList,
deleteApp, deleteApp,
...@@ -128,7 +142,7 @@ import { ...@@ -128,7 +142,7 @@ import {
getCategoryList, getCategoryList,
} from "@/services/market"; } from "@/services/market";
import local from "@/utils/local"; import local from "@/utils/local";
import { mapMutations } from "vuex"; import { mapMutations, mapGetters } from "vuex";
import { pageSizeOptions } from "@/config/pageConfig.js"; import { pageSizeOptions } from "@/config/pageConfig.js";
const columns = [ const columns = [
{ {
...@@ -184,6 +198,7 @@ export default { ...@@ -184,6 +198,7 @@ export default {
YSwitch, YSwitch,
AddApp, AddApp,
CheckSite, CheckSite,
ChangeThem,
}, },
data() { data() {
return { return {
...@@ -198,15 +213,21 @@ export default { ...@@ -198,15 +213,21 @@ export default {
size: 10, size: 10,
total: 0, total: 0,
pageSizeOptions, pageSizeOptions,
selectedRowKeys: [], // 表格勾选数据 selectedRowKeys: [], // 表格勾选id列表
selectedAppList: [], // 表格勾选信息列表
AddVisible: false, AddVisible: false,
title: "新增应用", title: "新增应用",
siteVisible: false, siteVisible: false,
themVisible: false,
dict: {}, // 字典 dict: {}, // 字典
categoryList: [], // 应用分类列表 categoryList: [], // 应用分类列表
}; };
}, },
computed: {
...mapGetters("site", ["userInfo"]),
},
created() { created() {
this.getCategoryList(); this.getCategoryList();
this.getAppList(); this.getAppList();
...@@ -280,8 +301,17 @@ export default { ...@@ -280,8 +301,17 @@ export default {
this.getAppList(); this.getAppList();
}, },
// 勾选表格 // 勾选表格
onSelectChange(keys) { onSelectChange(keys, rows) {
this.selectedRowKeys = keys; this.selectedRowKeys = keys;
this.selectedAppList = [...this.selectedAppList, ...rows];
let map = new Map();
this.selectedAppList = this.selectedAppList
.filter((v) => {
return !map.has(v.id) && map.set(v.id, 1);
})
.filter((v) => {
return this.selectedRowKeys.some((item) => item == v.id);
});
}, },
// 编辑 // 编辑
handleEdit(row) { handleEdit(row) {
...@@ -289,6 +319,16 @@ export default { ...@@ -289,6 +319,16 @@ export default {
this.$refs.AddApp.onEdit(row); this.$refs.AddApp.onEdit(row);
this.AddVisible = true; this.AddVisible = true;
}, },
// 批量修改应用主题
handleTheme() {
if (!this.selectedRowKeys.length) {
this.$message.warning("请先勾选应用");
return;
}
this.themVisible = true;
},
// 查看 // 查看
handleCheck(id) { handleCheck(id) {
this.$router.push({ this.$router.push({
...@@ -301,7 +341,7 @@ export default { ...@@ -301,7 +341,7 @@ export default {
}, },
// 删除 // 删除
handleDel(distribute, id) { handleDel(distribute, id) {
if (distribute) { if (this.userInfo.id != 1 && distribute) {
this.$confirm({ this.$confirm({
title: "拒绝删除", title: "拒绝删除",
content: "该应用正在使用中。", content: "该应用正在使用中。",
...@@ -343,6 +383,17 @@ export default { ...@@ -343,6 +383,17 @@ export default {
}, },
}); });
}, },
// 批量删除
handleDelAll() {
if (!this.selectedRowKeys.length) {
this.$message.warning("请先勾选应用");
return;
}
let ids = this.selectedRowKeys.join(",");
this.handleDel(0, ids);
},
// 克隆成功 // 克隆成功
cloneSuccess() { cloneSuccess() {
this.selectedRowKeys = []; this.selectedRowKeys = [];
......
...@@ -65,7 +65,13 @@ ...@@ -65,7 +65,13 @@
</a-radio> </a-radio>
</a-radio-group> </a-radio-group>
<!-- 下拉选择框 --> <!-- 下拉选择框 -->
<a-select <AppSelect
v-else-if="v.fieldType == 'select'"
:info="v"
v-model="v.fieldValue"
>
</AppSelect>
<!-- <a-select
v-else-if="v.fieldType == 'select'" v-else-if="v.fieldType == 'select'"
v-model="v.fieldValue" v-model="v.fieldValue"
placeholder="请选择" placeholder="请选择"
...@@ -77,7 +83,7 @@ ...@@ -77,7 +83,7 @@
> >
{{ item }} {{ item }}
</a-select-option> </a-select-option>
</a-select> </a-select> -->
<!-- 日期选择器 --> <!-- 日期选择器 -->
<a-date-picker <a-date-picker
v-else-if="v.fieldType == 'date'" v-else-if="v.fieldType == 'date'"
...@@ -235,12 +241,14 @@ ...@@ -235,12 +241,14 @@
<script> <script>
import YQuillEditor from "@/components/YQuillEditor.vue"; import YQuillEditor from "@/components/YQuillEditor.vue";
import AppSelect from "../components/AppSelect.vue";
import { batchSaveDataset } from "@/services/market"; import { batchSaveDataset } from "@/services/market";
import { request } from "@/utils/request"; import { request } from "@/utils/request";
import local from "@/utils/local"; import local from "@/utils/local";
export default { export default {
components: { components: {
YQuillEditor, YQuillEditor,
AppSelect,
}, },
props: { props: {
title: { title: {
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
</a-select> </a-select>
</a-form-model-item> </a-form-model-item>
<a-form-model-item <a-form-model-item
v-if="form.fieldType == 'table'" v-if="form.fieldType == 'table' || form.fieldType == 'select'"
label="数据接口" label="数据接口"
prop="serviceApi" prop="serviceApi"
> >
...@@ -220,26 +220,6 @@ export default { ...@@ -220,26 +220,6 @@ export default {
}, },
}, },
data() { data() {
// 校验JSON
// const checkJSON = (rule, value, callback) => {
// if (!value) {
// callback(new Error("请输入数据配置"));
// } else {
// try {
// let Obj = JSON.parse(value);
// let isjson =
// Object.prototype.toString.call(Obj).toLowerCase() ==
// "[object object]" && Object.keys(Obj).length;
// if (isjson) {
// callback();
// } else {
// callback(new Error("请输入JSON对象格式"));
// }
// } catch (err) {
// callback(new Error("输入的JSON数据格式有误"));
// }
// }
// };
return { return {
fieldTypeItem, fieldTypeItem,
fieldType: [ fieldType: [
...@@ -287,9 +267,9 @@ export default { ...@@ -287,9 +267,9 @@ export default {
isList: [ isList: [
{ required: true, message: "请选择是否列表显示", trigger: "change" }, { required: true, message: "请选择是否列表显示", trigger: "change" },
], ],
serviceApi: [ // serviceApi: [
{ required: true, message: "请输入数据接口地址", trigger: "blur" }, // { required: true, message: "请输入数据接口地址", trigger: "blur" },
], // ],
}, },
}; };
}, },
......
<template>
<div>
<a-modal v-model="Visible" title="请选择主题">
<a-form-model
ref="form"
:model="form"
:rules="rules"
:label-col="{ span: 4 }"
:wrapper-col="{ span: 20 }"
>
<a-form-model-item label="应用" prop="appThemeName">
<a-select placeholder="请选择主题" v-model="form.appThemeName">
<a-select-option
v-for="v in themList"
:key="v.id"
:value="'' + v.id"
>
{{ v.categoryName }}
</a-select-option>
</a-select>
</a-form-model-item>
</a-form-model>
<div slot="footer">
<a-space size="middle">
<a-button @click="handleCancel">取消</a-button>
<a-button type="primary" @click="handleOk">确定</a-button>
</a-space>
</div>
</a-modal>
</div>
</template>
<script>
import { batchSave } from "@/services/market";
export default {
props: {
themVisible: {
type: Boolean,
required: true,
default: false,
},
themList: {
type: Array,
required: true,
default: () => [],
},
appList: {
type: Array,
required: true,
default: () => [],
},
},
data() {
return {
form: {
appThemeName: undefined,
},
rules: {
appThemeName: [
{ required: true, message: "请选择主题", trigger: "change" },
],
},
};
},
computed: {
Visible: {
get() {
return this.themVisible;
},
set(val) {
this.$emit("update:themVisible", val);
},
},
},
methods: {
// 保存
handleOk() {
this.$refs.form.validate(async (valid) => {
if (valid) {
let arr = this.appList.map((v) => {
return {
...v,
appThemeName: this.form.appThemeName,
};
});
let res = await batchSave(arr);
let { code, msg } = res.data;
if (code == 1) {
this.$message.success(msg);
this.$emit("edit");
this.handleCancel();
}
}
});
},
// 取消
handleCancel() {
this.$refs.form.resetFields();
this.Visible = false;
},
},
};
</script>
<style lang="less" scoped></style>
...@@ -434,7 +434,7 @@ export default { ...@@ -434,7 +434,7 @@ export default {
siteId: this.siteId, siteId: this.siteId,
page: this.rightCurrent, page: this.rightCurrent,
size: this.rightSize, size: this.rightSize,
matterName: this.searchRightVal, matterName: `%${this.searchRightVal}%`,
source: this.rightSource, source: this.rightSource,
deptCode: this.rightDept, deptCode: this.rightDept,
...search, ...search,
......
...@@ -181,7 +181,6 @@ export default { ...@@ -181,7 +181,6 @@ export default {
// 确定 // 确定
handleOk() { handleOk() {
this.$refs.formData.validate(async (valid) => { this.$refs.formData.validate(async (valid) => {
console.log(this.form.parentId);
if (valid) { if (valid) {
this.confirmLoading = true; this.confirmLoading = true;
let res = await saveBusiness({ let res = await saveBusiness({
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
}" }"
:columns="columns" :columns="columns"
:data-source="siteBusinessList" :data-source="siteBusinessList"
:rowKey="(record) => record.id" :rowKey="(record) => record.businessId"
:row-selection="{ :row-selection="{
selectedRowKeys: rowKeys, selectedRowKeys: rowKeys,
onChange: handleChange, onChange: handleChange,
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
<script> <script>
import { getSiteBusinessList } from "@/services/business"; import { getSiteBusinessList } from "@/services/business";
import { addBusinessToWindow } from "@/services/dept"; import { addBusinessToWindow } from "@/services/dept";
import { extractTree } from "@/utils/util"; // import { extractTree } from "@/utils/util";
import local from "@/utils/local"; import local from "@/utils/local";
const columns = [ const columns = [
{ {
...@@ -137,12 +137,7 @@ export default { ...@@ -137,12 +137,7 @@ export default {
await this.getSiteBusinessList(); await this.getSiteBusinessList();
this.formData = info; this.formData = info;
if (info.businessIds.length) { if (info.businessIds.length) {
let arr = extractTree(this.siteBusinessList, "children").map((v) => this.rowKeys = info.businessIds;
Number(v.id)
);
this.rowKeys = arr.filter((v) => {
return info.businessIds.some((val) => v == val);
});
} else { } else {
this.rowKeys = []; this.rowKeys = [];
} }
...@@ -193,17 +188,17 @@ export default { ...@@ -193,17 +188,17 @@ export default {
onSelectRow(record, selected) { onSelectRow(record, selected) {
if (selected && record.children && record.children.length) { if (selected && record.children && record.children.length) {
record.children.forEach((v) => { record.children.forEach((v) => {
this.rowKeys = [...new Set([...this.rowKeys, v.id])]; this.rowKeys = [...new Set([...this.rowKeys, v.businessId])];
}); });
} else if (!selected && record.children && record.children.length) { } else if (!selected && record.children && record.children.length) {
this.rowKeys = this.rowKeys.filter((v) => v != record.id); this.rowKeys = this.rowKeys.filter((v) => v != record.businessId);
record.children.forEach((v) => { record.children.forEach((v) => {
this.rowKeys = this.rowKeys.filter((val) => val != v.id); this.rowKeys = this.rowKeys.filter((val) => val != v.businessId);
}); });
} else if (selected && record.parentId) { } else if (selected && record.parentId) {
this.rowKeys = [...new Set([...this.rowKeys, record.parentId])]; this.rowKeys = [...new Set([...this.rowKeys, record.parentId])];
} else if (!selected) { } else if (!selected) {
this.rowKeys = this.rowKeys.filter((v) => v != record.id); this.rowKeys = this.rowKeys.filter((v) => v != record.businessId);
} }
}, },
// 保存窗口关联业务 // 保存窗口关联业务
......
...@@ -724,21 +724,25 @@ export default { ...@@ -724,21 +724,25 @@ export default {
getAddress(address) { getAddress(address) {
this.$refs.ruleForm.validateField("detailAddress", (errVal) => { this.$refs.ruleForm.validateField("detailAddress", (errVal) => {
if (errVal !== "中心详细地址不能为空") { if (errVal !== "中心详细地址不能为空") {
this.$jsonp(`https://restapi.amap.com/v3/geocode/geo?parameters`, { this.$jsonp(`https://restapi.amap.com/v3/geocode/geo`, {
//官方接口 //官方接口
output: "jsonp", output: "jsonp",
key: "21e7ac78b448640e516f1eddc3ffd720", //key key: "21e7ac78b448640e516f1eddc3ffd720", //key
address: address, //获取输入的位置 address: address, //获取输入的位置
}) })
.then((res) => { .then((res) => {
if (res.status == 1) {
let { location } = res.geocodes[0]; let { location } = res.geocodes[0];
[ [
this.formInfo.longitude, this.formInfo.longitude,
this.formInfo.latitude, this.formInfo.latitude,
] = location.split(","); ] = location.split(",");
}) } else {
.catch(() => {
this.$message.error("经纬度获取失败,请输入正确的地址"); this.$message.error("经纬度获取失败,请输入正确的地址");
}
})
.catch((err) => {
console.log(err);
}); });
} }
}); });
......
...@@ -16,10 +16,16 @@ ...@@ -16,10 +16,16 @@
@click="handleSync(siteData[0].id)" @click="handleSync(siteData[0].id)"
>同步数据</a-button >同步数据</a-button
> >
<a-button type="primary" @click="editSiteInfo(siteData[0])" <a-button
type="primary"
v-permission="[1]"
@click="editSiteInfo(siteData[0])"
>编辑</a-button >编辑</a-button
> >
<a-button type="danger" @click="deleteSite(siteData[0].id, 0)" <a-button
type="danger"
v-permission="[1]"
@click="deleteSite(siteData[0].id, 0)"
>删除</a-button >删除</a-button
> >
</a-space> </a-space>
......
...@@ -12,7 +12,12 @@ ...@@ -12,7 +12,12 @@
{{ v }} {{ v }}
</div> </div>
</div> </div>
<a-tooltip>
<template slot="title">
当前状态:{{ setInfo.messageoff ? "开启" : "关闭" }}
</template>
<YButton v-model="setInfo.messageoff" @change="changeClose"></YButton> <YButton v-model="setInfo.messageoff" @change="changeClose"></YButton>
</a-tooltip>
</div> </div>
</template> </template>
......
...@@ -245,6 +245,10 @@ const rightColumns = [ ...@@ -245,6 +245,10 @@ const rightColumns = [
title: "字段名称", title: "字段名称",
dataIndex: "fieldName", dataIndex: "fieldName",
}, },
{
title: "字段编码",
dataIndex: "fieldCode",
},
{ {
title: "数据类型", title: "数据类型",
scopedSlots: { scopedSlots: {
......
...@@ -78,6 +78,7 @@ export default { ...@@ -78,6 +78,7 @@ export default {
let obj = { let obj = {
productId: row.id, productId: row.id,
productName: row.productName, productName: row.productName,
productCode: row.productCode,
}; };
this.SET_curProduct(obj); this.SET_curProduct(obj);
}, },
......
...@@ -54,6 +54,8 @@ import InformationSkin from "../informationskin/InformationSkin.vue"; ...@@ -54,6 +54,8 @@ import InformationSkin from "../informationskin/InformationSkin.vue";
import SelfService from "../selfservice/SelfService.vue"; import SelfService from "../selfservice/SelfService.vue";
import DesSelfService from "../desSelfservice/DesSelfService.vue"; import DesSelfService from "../desSelfservice/DesSelfService.vue";
import SignDevicekin from "../signdeviceskin/SignDeviceSkin.vue"; import SignDevicekin from "../signdeviceskin/SignDeviceSkin.vue";
import InfoDisSkin from "../infoDisSkin/InfoDisSkin.vue";
import DefaultShow from "../defaultshow/DefaultShow.vue";
import { mapState, mapMutations } from "vuex"; import { mapState, mapMutations } from "vuex";
import { filterItems } from "@/utils"; import { filterItems } from "@/utils";
export default { export default {
...@@ -69,6 +71,8 @@ export default { ...@@ -69,6 +71,8 @@ export default {
SelfService, SelfService,
DesSelfService, DesSelfService,
SignDevicekin, SignDevicekin,
InfoDisSkin,
DefaultShow,
}, },
props: {}, props: {},
data() { data() {
...@@ -82,40 +86,45 @@ export default { ...@@ -82,40 +86,45 @@ export default {
...mapState("site", ["imageResolution", "curSkin", "curSkinIndex"]), ...mapState("site", ["imageResolution", "curSkin", "curSkinIndex"]),
component() { component() {
let str = ""; let str = "";
switch (this.curSkin.productName) { switch (this.curSkin.productCode) {
case "排号机": case "pdj":
str = "LandscapeMode"; str = "LandscapeMode";
break; break;
case "窗口屏": case "ckp":
str = "WindowSkin"; str = "WindowSkin";
break; break;
case "呼叫器": case "hjq":
str = "CallOutSkin"; str = "CallOutSkin";
break; break;
case "集中显示屏": case "jzxsp":
str = "CentralizeSkin"; str = "CentralizeSkin";
break; break;
case "导视机": case "dsj":
str = "SignDevicekin"; str = "SignDevicekin";
break; break;
case "评价器": case "pjq":
str = "AppraiseSkin"; str = "AppraiseSkin";
break; break;
case "自助服务终端": case "zzfwzd":
str = "SelfService"; str = "SelfService";
break; break;
case "填单机": case "tdj":
str = "WriteFormSkin"; str = "WriteFormSkin";
break; break;
case "样表机": case "ybj":
str = "SampleFormSkin"; str = "SampleFormSkin";
break; break;
case "信息发布终端": case "xxfbp":
str = "InformationSkin"; str = "InformationSkin";
break; break;
case "桌面式自助服务终端": case "zmszzfwzd":
str = "DesSelfService"; str = "DesSelfService";
break; break;
case "xxgk":
str = "InfoDisSkin";
break;
default:
str = "DefaultShow";
} }
return str; return str;
}, },
......
<template>
<div class="skin-box">
<!-- 1920*1080 -->
<div
:id="componentsId"
class="across-skin"
v-if="imageResolution === '1'"
:style="{
background: filterItem('1', 0),
}"
></div>
<!-- 竖版 1080*1920 -->
<div
class="vertical-skin"
:id="componentsId"
v-else-if="imageResolution === '2'"
:style="{
background: filterItem('1', 0),
}"
></div>
<!-- 空数据显示 -->
<div class="empty flex aic jcc" v-else>
<a-empty
:image="require('../../../../assets/img/original.png')"
:image-style="{
height: '80px',
}"
>
<span slot="description"> <a href="#API">暂无皮肤模板</a> </span>
</a-empty>
</div>
</div>
</template>
<script>
export default {
props: {
// imgItem: {
// type: Array,
// required: true,
// default: () => {
// return [];
// },
// },
skinFieldList: {
type: Array,
required: true,
default: () => {
return [];
},
},
imageResolution: {
required: true,
default: "1",
},
componentsId: {
required: true,
type: String,
},
},
data() {
return {
api: process.env.VUE_APP_API_IMG_URL,
};
},
methods: {
// 过滤属性类型
filterItem(type, index) {
let arr = this.skinFieldList.filter((v) => {
return v.remark == type;
});
if (arr.length) {
return this.filterValueType(arr[index]);
} else {
return "";
}
},
// 过滤属性值类型
filterValueType(info = {}) {
let value = "";
if (info.fieldType !== "" && info.fieldType === "1" && info.fieldValue) {
value = info.fieldValue;
} else if (
info.fieldType !== "" &&
info.fieldType === "2" &&
info.fieldValue
) {
value = `url(${this.api + info.fieldValue})`;
}
return value;
},
// 过滤导航
filterNav(type) {
let arr = [];
arr = this.skinFieldList.filter((v) => {
return v.remark == type;
});
return arr;
},
},
};
</script>
<style lang="less" scoped>
.across-skin {
width: 1000px;
height: 562.5px;
color: #fff;
background-image: linear-gradient(#26c5ff, #2c66ff);
background-repeat: no-repeat !important;
background-position: center !important;
background-size: 100% 100% !important;
}
.vertical-skin {
height: 1000px;
width: 562px;
padding: 10px;
background-image: linear-gradient(#26c5ff, #2c66ff);
background-repeat: no-repeat !important;
background-position: center !important;
background-size: 100% 100% !important;
}
</style>
<template>
<div class="skin-box">
<!-- 信息公开皮肤 竖版 1080*1920 -->
<div
class="vertical-skin flex flexc aic"
:id="componentsId"
v-if="imageResolution === '2'"
:style="{
background: filterItem('1', 0),
}"
>
<div class="header flex jcc aic">
<div class="title" :style="{ color: filterItem('2', 0) }">
政务信息公开
</div>
</div>
<div class="info flex aic jcc">
<div class="info-item flex flexc aic">
<div class="pic flex aic jcc border">照片</div>
<div
class="name flex aic jcc"
:style="{
color: filterItem('5', 0),
background: filterItem('13', 0),
}"
>
姓名
</div>
</div>
<div class="info-item flex flexc aic">
<div class="pic flex aic jcc border">照片</div>
<div class="name flex aic jcc">姓名</div>
</div>
</div>
<div class="info-list flex1 border flex aic jcc">
信息
</div>
</div>
<!-- 空数据显示 -->
<div class="empty flex aic jcc" v-else>
<a-empty
:image="require('../../../../assets/img/original.png')"
:image-style="{
height: '80px',
}"
>
<span slot="description"> <a href="#API">暂无皮肤模板</a> </span>
</a-empty>
</div>
</div>
</template>
<script>
export default {
props: {
// imgItem: {
// type: Array,
// required: true,
// default: () => {
// return [];
// },
// },
skinFieldList: {
type: Array,
required: true,
default: () => {
return [];
},
},
imageResolution: {
required: true,
default: "1",
},
componentsId: {
required: true,
type: String,
},
},
data() {
return {
api: process.env.VUE_APP_API_IMG_URL,
};
},
methods: {
// 过滤属性类型
filterItem(type, index) {
let arr = this.skinFieldList.filter((v) => {
return v.remark == type;
});
if (arr.length) {
return this.filterValueType(arr[index]);
} else {
return "";
}
},
// 过滤属性值类型
filterValueType(info = {}) {
let value = "";
if (info.fieldType !== "" && info.fieldType === "1" && info.fieldValue) {
value = info.fieldValue;
} else if (
info.fieldType !== "" &&
info.fieldType === "2" &&
info.fieldValue
) {
value = `url(${this.api + info.fieldValue})`;
}
return value;
},
// 过滤导航
filterNav(type) {
let arr = [];
arr = this.skinFieldList.filter((v) => {
return v.remark == type;
});
return arr;
},
},
};
</script>
<style lang="less" scoped>
.across-skin {
width: 1000px;
height: 562.5px;
color: #fff;
background-image: linear-gradient(#26c5ff, #2c66ff);
background-repeat: no-repeat !important;
background-position: center !important;
background-size: 100% 100% !important;
h1 {
color: #fff;
margin: 0px;
}
p {
display: flex;
flex-wrap: wrap;
margin: 0px;
}
.surface-preview-main {
width: 96%;
margin-left: 2%;
height: 100%;
display: flex;
flex-direction: column;
.skin-header {
display: flex;
justify-content: space-between;
height: 100px;
margin-bottom: 40px;
align-items: center;
.skin-header-title {
font-size: 22px;
font-weight: 600;
letter-spacing: 2px;
}
}
}
}
.vertical-skin {
height: 1000px;
width: 562px;
padding-bottom: 10px;
background-image: linear-gradient(#26c5ff, #2c66ff);
background-repeat: no-repeat !important;
background-position: center !important;
background-size: 100% 100% !important;
.header {
height: 80px;
margin-bottom: 20px;
color: #fff;
.title {
font-size: 30px;
font-weight: 600;
}
}
.info {
width: 100%;
gap: 100px;
margin-bottom: 20px;
color: #fff;
.pic {
margin-bottom: 10px;
width: 150px;
height: 180px;
border-radius: 4px;
}
.name {
width: 80px;
height: 26px;
background: #0857e8;
border-radius: 28px;
}
}
.info-list {
width: 94%;
background: #fff;
border-radius: 4px;
}
.border {
border: 1px dashed #ececec;
}
}
</style>
...@@ -72,6 +72,12 @@ const attrType = [ ...@@ -72,6 +72,12 @@ const attrType = [
{ key: "10", label: "信息面板" }, { key: "10", label: "信息面板" },
{ key: "11", label: "头部背景" }, { key: "11", label: "头部背景" },
{ key: "12", label: "底部背景" }, { key: "12", label: "底部背景" },
{ key: "13", label: "数据标题背景" },
{ key: "14", label: "数据背景" },
{ key: "15", label: "公告标题" },
{ key: "16", label: "公告内容" },
{ key: "17", label: "公告标题背景" },
{ key: "18", label: "公告内容背景" },
]; ];
export default { export default {
props: { props: {
......
...@@ -195,6 +195,8 @@ import InformationSkin from "../informationskin/InformationSkin.vue"; ...@@ -195,6 +195,8 @@ import InformationSkin from "../informationskin/InformationSkin.vue";
import SelfService from "../selfservice/SelfService.vue"; import SelfService from "../selfservice/SelfService.vue";
import DesSelfService from "../desSelfservice/DesSelfService.vue"; import DesSelfService from "../desSelfservice/DesSelfService.vue";
import SignDevicekin from "../signdeviceskin/SignDeviceSkin.vue"; import SignDevicekin from "../signdeviceskin/SignDeviceSkin.vue";
import InfoDisSkin from "../infoDisSkin/InfoDisSkin.vue";
import DefaultShow from "../defaultshow/DefaultShow.vue";
import { uploadFile, skinSave, getTemplateList } from "@/services/surface"; import { uploadFile, skinSave, getTemplateList } from "@/services/surface";
import html2canvas from "html2canvas"; import html2canvas from "html2canvas";
import { Empty } from "ant-design-vue"; import { Empty } from "ant-design-vue";
...@@ -213,6 +215,8 @@ export default { ...@@ -213,6 +215,8 @@ export default {
SelfService, SelfService,
DesSelfService, DesSelfService,
SignDevicekin, SignDevicekin,
InfoDisSkin,
DefaultShow,
}, },
props: { props: {
isShow: { isShow: {
...@@ -273,40 +277,45 @@ export default { ...@@ -273,40 +277,45 @@ export default {
}, },
component() { component() {
let str = ""; let str = "";
switch (this.curProduct.productName) { switch (this.curProduct.productCode) {
case "排号机": case "pdj":
str = "LandscapeMode"; str = "LandscapeMode";
break; break;
case "窗口屏": case "ckp":
str = "WindowSkin"; str = "WindowSkin";
break; break;
case "呼叫器": case "hjq":
str = "CallOutSkin"; str = "CallOutSkin";
break; break;
case "集中显示屏": case "jzxsp":
str = "CentralizeSkin"; str = "CentralizeSkin";
break; break;
case "导视机": case "dsj":
str = "SignDevicekin"; str = "SignDevicekin";
break; break;
case "评价器": case "pjq":
str = "AppraiseSkin"; str = "AppraiseSkin";
break; break;
case "自助服务终端": case "zzfwzd":
str = "SelfService"; str = "SelfService";
break; break;
case "填单机": case "tdj":
str = "WriteFormSkin"; str = "WriteFormSkin";
break; break;
case "样表机": case "ybj":
str = "SampleFormSkin"; str = "SampleFormSkin";
break; break;
case "信息发布终端": case "xxfbp":
str = "InformationSkin"; str = "InformationSkin";
break; break;
case "桌面式自助服务终端": case "zmszzfwzd":
str = "DesSelfService"; str = "DesSelfService";
break; break;
case "xxgk":
str = "InfoDisSkin";
break;
default:
str = "DefaultShow";
} }
return str; return str;
}, },
...@@ -351,9 +360,11 @@ export default { ...@@ -351,9 +360,11 @@ export default {
item.fieldOrderNo = 1000; item.fieldOrderNo = 1000;
} }
} }
v.skinFieldList.sort((a, b) => { v.skinFieldList = v.skinFieldList
.sort((a, b) => {
return a.fieldOrderNo - b.fieldOrderNo; return a.fieldOrderNo - b.fieldOrderNo;
}); })
.filter((v) => v.enabled != 0);
}); });
this.skinTemplate = data; this.skinTemplate = data;
// this.formData.skinFieldList = this.skinTemplate[0].skinFieldList; // this.formData.skinFieldList = this.skinTemplate[0].skinFieldList;
......
...@@ -6,8 +6,21 @@ ...@@ -6,8 +6,21 @@
@cancel="handleCancel" @cancel="handleCancel"
:maskClosable="false" :maskClosable="false"
> >
<a-button slot="footer" @click="handleReset">重置</a-button> <template slot="footer">
<a-button slot="footer" type="primary" @click="handleOk">确定</a-button> <a-space>
<a-button @click="handleReset">重置</a-button>
<a-upload
name="file"
:show-upload-list="false"
:action="api + 'base/file/commonupload'"
@change="handleUpload"
>
<a-button type="primary">文件上传</a-button>
</a-upload>
<a-button type="primary" @click="handleOk">确定</a-button>
</a-space>
</template>
<a-form-model <a-form-model
:model="form" :model="form"
ref="form" ref="form"
...@@ -99,6 +112,7 @@ export default { ...@@ -99,6 +112,7 @@ export default {
}, },
data() { data() {
return { return {
api: process.env.VUE_APP_API_BASE_URL + "/",
form: { form: {
name: "", // 参数名称 name: "", // 参数名称
firstOrganize: "", // 一级组织 firstOrganize: "", // 一级组织
...@@ -166,6 +180,15 @@ export default { ...@@ -166,6 +180,15 @@ export default {
} }
}); });
}, },
// 文件上传
handleUpload({ file }) {
if (file.status === "done") {
let { code, url } = file.response;
if (code == 1) {
this.form.paramValue = url;
}
}
},
}, },
}; };
</script> </script>
......
...@@ -449,7 +449,7 @@ export default { ...@@ -449,7 +449,7 @@ export default {
idCard: "", // 身份证 idCard: "", // 身份证
userpost: "", // 职务 userpost: "", // 职务
posttitle: "", // 职称 posttitle: "", // 职称
politicalstatus: undefined, // 政治面貌 politicalstatus: 4, // 政治面貌
dangyuan: undefined, // 称号 dangyuan: undefined, // 称号
dangyuanext: "", // 自定义称号 dangyuanext: "", // 自定义称号
phone: "", // 电话 phone: "", // 电话
......
...@@ -181,15 +181,23 @@ ...@@ -181,15 +181,23 @@
</a-button> </a-button>
</a-dropdown> </a-dropdown>
</div> </div>
<div class="in"> <a-space>
<a-select v-model="searchType" style="width: 120px">
<a-select-option :value="1">
按姓名
</a-select-option>
<a-select-option :value="2">
按工号
</a-select-option>
</a-select>
<a-input-search <a-input-search
placeholder="请输入姓名或者工号搜索" placeholder="请输入关键字搜索"
v-model="searchVal" v-model="searchVal"
enter-button="搜索" enter-button="搜索"
allowClear allowClear
@search="onSearch" @search="onSearch"
/> />
</div> </a-space>
</div> </div>
<div class="table-content"> <div class="table-content">
<!-- 表格 --> <!-- 表格 -->
...@@ -408,6 +416,7 @@ export default { ...@@ -408,6 +416,7 @@ export default {
WorkmanData: [], // 工作人员列表 WorkmanData: [], // 工作人员列表
deptSearch: "", //部门搜索 deptSearch: "", //部门搜索
windowSearch: "", // 窗口搜索 windowSearch: "", // 窗口搜索
searchType: 1, // 搜索类型
searchVal: "", searchVal: "",
visibleAll: false, visibleAll: false,
page: 1, page: 1,
...@@ -458,9 +467,9 @@ export default { ...@@ -458,9 +467,9 @@ export default {
async getWorkmanData(search = {}) { async getWorkmanData(search = {}) {
this.loading = true; this.loading = true;
let obj = {}; let obj = {};
if (/^[\u4e00-\u9fa5]+$/.test(this.searchVal)) { if (this.searchType == 1) {
obj.name = `%${this.searchVal}%`; obj.name = `%${this.searchVal}%`;
} else if (/^[a-zA-z0-9]+$/.test(this.searchVal)) { } else if (this.searchType == 2) {
obj.number = `%${this.searchVal}%`; obj.number = `%${this.searchVal}%`;
} }
let res = await getWorkmanList({ let res = await getWorkmanList({
......
...@@ -285,6 +285,7 @@ module.exports = { ...@@ -285,6 +285,7 @@ module.exports = {
list: `${BASE_URL}/base/app/list`, list: `${BASE_URL}/base/app/list`,
info: `${BASE_URL}/base/app/info`, info: `${BASE_URL}/base/app/info`,
save: `${BASE_URL}/base/app/save`, save: `${BASE_URL}/base/app/save`,
batchSave: `${BASE_URL}/base/app/batchSave`,
delete: `${BASE_URL}/base/app/delete`, delete: `${BASE_URL}/base/app/delete`,
distribute: `${BASE_URL}/base/app/appDistribute`, distribute: `${BASE_URL}/base/app/appDistribute`,
clone: `${BASE_URL}/base/app/cloneAppsBySites`, clone: `${BASE_URL}/base/app/cloneAppsBySites`,
......
...@@ -27,6 +27,10 @@ export async function getAppInfo(data) { ...@@ -27,6 +27,10 @@ export async function getAppInfo(data) {
export async function saveApp(data) { export async function saveApp(data) {
return request(App.save, METHOD.POST, data); return request(App.save, METHOD.POST, data);
} }
// 新增,修改应用(批量)
export async function batchSave(data) {
return request(App.batchSave, METHOD.POST, data);
}
// 删除应用 // 删除应用
export async function deleteApp(data) { export async function deleteApp(data) {
return request(App.delete, METHOD.GET, data); return request(App.delete, METHOD.GET, data);
......
...@@ -218,3 +218,12 @@ ALTER TABLE mortals_sys_app_info_templete_field ADD COLUMN `serviceApiParams` v ...@@ -218,3 +218,12 @@ ALTER TABLE mortals_sys_app_info_templete_field ADD COLUMN `serviceApiParams` v
-- ---------------------------- -- ----------------------------
ALTER TABLE mortals_sys_window_hall ADD COLUMN `siteId` bigint(20) default '1' COMMENT '站点Id'; ALTER TABLE mortals_sys_window_hall ADD COLUMN `siteId` bigint(20) default '1' COMMENT '站点Id';
-- ----------------------------
2024-01-03
-- ----------------------------
ALTER TABLE mortals_sys_site_matter ADD COLUMN `agent` tinyint(2) DEFAULT '0' COMMENT '代办帮办(0.否,1.是)';
ALTER TABLE mortals_sys_site_matter ADD COLUMN `agentName` varchar(64) COMMENT '代办姓名';
ALTER TABLE mortals_sys_site_matter ADD COLUMN `agentPhone` varchar(32) COMMENT '代办电话';
ALTER TABLE mortals_sys_site_matter ADD COLUMN `agentPost` varchar(64) COMMENT '职务';
...@@ -13,10 +13,6 @@ ...@@ -13,10 +13,6 @@
<artifactId>base-manager</artifactId> <artifactId>base-manager</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<description>基础服务管理平台</description> <description>基础服务管理平台</description>
<properties>
</properties>
<profiles> <profiles>
<profile> <profile>
<id>develop</id> <id>develop</id>
...@@ -25,13 +21,13 @@ ...@@ -25,13 +21,13 @@
</activation> </activation>
<properties> <properties>
<profiles.active>develop</profiles.active> <profiles.active>develop</profiles.active>
<profiles.server.path>/zwfw</profiles.server.path> <profiles.server.port>17211</profiles.server.port>
<profiles.publish.path>/home/publish</profiles.publish.path>
<profiles.rabbitmq.host>127.0.0.1</profiles.rabbitmq.host> <profiles.rabbitmq.host>127.0.0.1</profiles.rabbitmq.host>
<profiles.rabbitmq.port>5672</profiles.rabbitmq.port> <profiles.rabbitmq.port>5672</profiles.rabbitmq.port>
<profiles.rabbitmq.username>guest</profiles.rabbitmq.username> <profiles.rabbitmq.username>guest</profiles.rabbitmq.username>
<profiles.rabbitmq.password>guest</profiles.rabbitmq.password> <profiles.rabbitmq.password>guest</profiles.rabbitmq.password>
<profiles.rabbitmq.virtualhost>/</profiles.rabbitmq.virtualhost> <profiles.rabbitmq.virtualhost>/</profiles.rabbitmq.virtualhost>
<profiles.publish.path>/home/publish</profiles.publish.path>
<profiles.nacos.server-addr>127.0.0.1:8848</profiles.nacos.server-addr> <profiles.nacos.server-addr>127.0.0.1:8848</profiles.nacos.server-addr>
<profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group> <profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group>
<profiles.nacos.namespace>smart-gov</profiles.nacos.namespace> <profiles.nacos.namespace>smart-gov</profiles.nacos.namespace>
...@@ -47,7 +43,7 @@ ...@@ -47,7 +43,7 @@
<id>test</id> <id>test</id>
<properties> <properties>
<profiles.active>test</profiles.active> <profiles.active>test</profiles.active>
<profiles.server.path>/base</profiles.server.path> <profiles.server.port>17211</profiles.server.port>
<profiles.publish.path>/home/publish</profiles.publish.path> <profiles.publish.path>/home/publish</profiles.publish.path>
<profiles.rabbitmq.host>192.168.0.98</profiles.rabbitmq.host> <profiles.rabbitmq.host>192.168.0.98</profiles.rabbitmq.host>
<profiles.rabbitmq.port>5672</profiles.rabbitmq.port> <profiles.rabbitmq.port>5672</profiles.rabbitmq.port>
...@@ -69,13 +65,8 @@ ...@@ -69,13 +65,8 @@
<id>product</id> <id>product</id>
<properties> <properties>
<profiles.active>product</profiles.active> <profiles.active>product</profiles.active>
<profiles.server.path>/base</profiles.server.path> <profiles.server.port>17211</profiles.server.port>
<profiles.publish.path>/home/publish</profiles.publish.path> <profiles.publish.path>/home/publish</profiles.publish.path>
<profiles.rabbitmq.host>127.0.0.1</profiles.rabbitmq.host>
<profiles.rabbitmq.port>5672</profiles.rabbitmq.port>
<profiles.rabbitmq.username>taxi_mq</profiles.rabbitmq.username>
<profiles.rabbitmq.password>admin@2020</profiles.rabbitmq.password>
<profiles.rabbitmq.virtualhost>/</profiles.rabbitmq.virtualhost>
<profiles.nacos.server-addr>127.0.0.1:8848</profiles.nacos.server-addr> <profiles.nacos.server-addr>127.0.0.1:8848</profiles.nacos.server-addr>
<profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group> <profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group>
<profiles.nacos.namespace>smart-gov</profiles.nacos.namespace> <profiles.nacos.namespace>smart-gov</profiles.nacos.namespace>
...@@ -91,10 +82,9 @@ ...@@ -91,10 +82,9 @@
<id>yibin</id> <id>yibin</id>
<properties> <properties>
<profiles.active>yibin</profiles.active> <profiles.active>yibin</profiles.active>
<profiles.server.path>/base</profiles.server.path>
<profiles.server.port>17211</profiles.server.port> <profiles.server.port>17211</profiles.server.port>
<profiles.publish.path>/home/publish</profiles.publish.path> <profiles.publish.path>/home/publish</profiles.publish.path>
<profiles.rabbitmq.host>172.15.28.115</profiles.rabbitmq.host> <profiles.rabbitmq.host>172.15.28.117</profiles.rabbitmq.host>
<profiles.rabbitmq.port>5672</profiles.rabbitmq.port> <profiles.rabbitmq.port>5672</profiles.rabbitmq.port>
<profiles.rabbitmq.username>taxi_mq</profiles.rabbitmq.username> <profiles.rabbitmq.username>taxi_mq</profiles.rabbitmq.username>
<profiles.rabbitmq.password>admin@2020</profiles.rabbitmq.password> <profiles.rabbitmq.password>admin@2020</profiles.rabbitmq.password>
...@@ -112,10 +102,9 @@ ...@@ -112,10 +102,9 @@
</profile> </profile>
<profile> <profile>
<id>sngx</id> <id>regtest</id>
<properties> <properties>
<profiles.active>sngx</profiles.active> <profiles.active>regtest</profiles.active>
<profiles.server.path>/base</profiles.server.path>
<profiles.server.port>17211</profiles.server.port> <profiles.server.port>17211</profiles.server.port>
<profiles.publish.path>/home/publish</profiles.publish.path> <profiles.publish.path>/home/publish</profiles.publish.path>
<profiles.rabbitmq.host>127.0.0.1</profiles.rabbitmq.host> <profiles.rabbitmq.host>127.0.0.1</profiles.rabbitmq.host>
...@@ -127,13 +116,58 @@ ...@@ -127,13 +116,58 @@
<profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group> <profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group>
<profiles.nacos.namespace>smart-gov</profiles.nacos.namespace> <profiles.nacos.namespace>smart-gov</profiles.nacos.namespace>
<profiles.log.path>/home/mortals/app/logs</profiles.log.path> <profiles.log.path>/home/mortals/app/logs</profiles.log.path>
<profiles.filepath>/mortals/app/data</profiles.filepath> <profiles.log.level>info</profiles.log.level>
<profiles.log.level>INFO</profiles.log.level> <package.environment>build</package.environment>
<package.environment>yibin</package.environment>
<skipUi>false</skipUi> <skipUi>false</skipUi>
<profiles.holidayUrl>https://timor.tech/api/holiday/year/</profiles.holidayUrl>
</properties> </properties>
</profile> </profile>
<profile>
<id>reg</id>
<properties>
<profiles.active>reg</profiles.active>
<profiles.server.port>17211</profiles.server.port>
<profiles.publish.path>/home/publish</profiles.publish.path>
<profiles.rabbitmq.host>127.0.0.1</profiles.rabbitmq.host>
<profiles.rabbitmq.port>5672</profiles.rabbitmq.port>
<profiles.rabbitmq.username>taxi_mq</profiles.rabbitmq.username>
<profiles.rabbitmq.password>admin@2020</profiles.rabbitmq.password>
<profiles.rabbitmq.virtualhost>/</profiles.rabbitmq.virtualhost>
<profiles.nacos.server-addr>127.0.0.1:8848</profiles.nacos.server-addr>
<profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group>
<profiles.nacos.namespace>smart-gov</profiles.nacos.namespace>
<profiles.log.path>/home/mortals/app/logs</profiles.log.path>
<profiles.log.level>info</profiles.log.level>
<package.environment>build</package.environment>
<skipUi>true</skipUi>
<profiles.holidayUrl>https://timor.tech/api/holiday/year/</profiles.holidayUrl>
</properties>
</profile>
<profile>
<id>yanyuan</id>
<properties>
<profiles.active>yanyuan</profiles.active>
<profiles.server.port>17211</profiles.server.port>
<profiles.publish.path>/home/publish</profiles.publish.path>
<profiles.rabbitmq.host>172.16.30.245</profiles.rabbitmq.host>
<profiles.rabbitmq.port>5672</profiles.rabbitmq.port>
<profiles.rabbitmq.username>taxi_mq</profiles.rabbitmq.username>
<profiles.rabbitmq.password>admin@2020</profiles.rabbitmq.password>
<profiles.rabbitmq.virtualhost>/</profiles.rabbitmq.virtualhost>
<profiles.nacos.server-addr>172.16.30.245:8848</profiles.nacos.server-addr>
<profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group>
<profiles.nacos.namespace>smart-gov</profiles.nacos.namespace>
<profiles.log.path>/home/mortals/app/logs</profiles.log.path>
<package.environment>build</package.environment>
<skipUi>true</skipUi>
<profiles.holidayUrl>https://timor.tech/api/holiday/year/</profiles.holidayUrl>
</properties>
</profile>
</profiles> </profiles>
<dependencies> <dependencies>
......
...@@ -35,7 +35,7 @@ clear_deploy() { ...@@ -35,7 +35,7 @@ clear_deploy() {
SERVICE=$1 SERVICE=$1
EXECPATH=$2 EXECPATH=$2
#清理后台自启服务 #清理后台自启服务
rm -rf ${SERVICE} rm -f ${SERVICE}
#清理执行文件目录 #清理执行文件目录
rm -rf ${EXECPATH} rm -rf ${EXECPATH}
} }
...@@ -81,6 +81,7 @@ start_service() { ...@@ -81,6 +81,7 @@ start_service() {
#部署后台服务 #部署后台服务
project_deploy() { project_deploy() {
writelog "${PROJECT_NAME}_deploy" writelog "${PROJECT_NAME}_deploy"
systemctl stop ${PROJECT_NAME}
clear_deploy ${PROJECT_SERVICE} ${PROJECT_EXECPATH} clear_deploy ${PROJECT_SERVICE} ${PROJECT_EXECPATH}
writelog "${PROJECT_NAME}_clear_finish" writelog "${PROJECT_NAME}_clear_finish"
tar -zvxf ./${PROJECT_FILENAME} -C ${PUBLISH_PATH} tar -zvxf ./${PROJECT_FILENAME} -C ${PUBLISH_PATH}
......
...@@ -18,7 +18,7 @@ set HEAP_DUMP_PATH=%LOG_PATH%/heap_dump.hprof ...@@ -18,7 +18,7 @@ set HEAP_DUMP_PATH=%LOG_PATH%/heap_dump.hprof
set TEMP_PATH=%LOG_PATH%/temp/ set TEMP_PATH=%LOG_PATH%/temp/
if not exist "%TEMP_PATH%" md "%TEMP_PATH%" if not exist "%TEMP_PATH%" md "%TEMP_PATH%"
rem jvm启动参数 rem jvm启动参数
set JAVA_OPTS=-Xms512M -Xmx512M -Xss256K -XX:+UseAdaptiveSizePolicy -XX:+UseParallelGC -XX:+UseParallelOldGC -XX:GCTimeRatio=39 -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+HeapDumpOnOutOfMemoryError set JAVA_OPTS=-Xms512M -Xmx2048M -Xss256K -XX:+UseAdaptiveSizePolicy -XX:+UseParallelGC -XX:+UseParallelOldGC -XX:GCTimeRatio=39 -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+HeapDumpOnOutOfMemoryError
set JAVA_OPTS=%JAVA_OPTS% -XX:+PrintGCDateStamps -Xloggc:%GC_PATH% set JAVA_OPTS=%JAVA_OPTS% -XX:+PrintGCDateStamps -Xloggc:%GC_PATH%
set JAVA_OPTS=%JAVA_OPTS% -XX:ErrorFile=%HS_ERR_PATH% set JAVA_OPTS=%JAVA_OPTS% -XX:ErrorFile=%HS_ERR_PATH%
set JAVA_OPTS=%JAVA_OPTS% -XX:HeapDumpPath=%HEAP_DUMP_PATH% set JAVA_OPTS=%JAVA_OPTS% -XX:HeapDumpPath=%HEAP_DUMP_PATH%
......
package com.mortals.xhx; package com.mortals.xhx;
import com.mortals.framework.springcloud.boot.BaseWebApplication; import com.mortals.framework.springcloud.boot.BaseWebApplication;
import com.mortals.framework.util.HttpUtil; import io.micrometer.core.instrument.MeterRegistry;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.actuate.autoconfigure.metrics.MeterRegistryCustomizer;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan; import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ImportResource; import org.springframework.context.annotation.ImportResource;
import javax.annotation.PostConstruct;
@EnableFeignClients @EnableFeignClients
@SpringBootApplication(scanBasePackages = {"com.mortals"}) @SpringBootApplication(scanBasePackages = {"com.mortals"})
@ServletComponentScan("com.mortals") @ServletComponentScan("com.mortals")
...@@ -17,5 +23,28 @@ public class ManagerBaseApplication extends BaseWebApplication { ...@@ -17,5 +23,28 @@ public class ManagerBaseApplication extends BaseWebApplication {
SpringApplication.run(ManagerBaseApplication.class, args); SpringApplication.run(ManagerBaseApplication.class, args);
} }
/* @Bean
MeterRegistryCustomizer meterRegistryCustomizer(MeterRegistry meterRegistry) {
return meterRegistry1 -> {
meterRegistry.config()
.commonTags("application", "Tenantapp");
};
}*/
/* @Bean
public ServletRegistrationBean<MetricsServlet> getServletRegistrationBean() {
ServletRegistrationBean<MetricsServlet> bean = new ServletRegistrationBean<MetricsServlet>(new MetricsServlet());
bean.addUrlMappings("/metrics");
return bean;
}*/
/* @PostConstruct
public void init() {
DefaultExports.initialize();
}*/
} }
...@@ -22,6 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -22,6 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Primary; import org.springframework.context.annotation.Primary;
import org.springframework.core.annotation.Order; import org.springframework.core.annotation.Order;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
...@@ -106,19 +107,19 @@ public class AuthTokenServiceImpl implements IAuthTokenService { ...@@ -106,19 +107,19 @@ public class AuthTokenServiceImpl implements IAuthTokenService {
Claims claims = parseToken(token); Claims claims = parseToken(token);
String uuid = (String) claims.get(SysConstains.LOGIN_USER_KEY); String uuid = (String) claims.get(SysConstains.LOGIN_USER_KEY);
String userKey = getTokenKey(uuid); String userKey = getTokenKey(uuid);
cacheService.select(portalDb); // cacheService.select(portalDb);
String userStr = cacheService.get(userKey);
RedisTemplate<String, String> redisTemplate = cacheService.selectDbRedisTemplate(portalDb);
String userStr =redisTemplate.opsForValue().get(userKey);
// String userStr = cacheService.get(userKey);
//刷新token时间 //刷新token时间
UserEntity userEntity = JSONObject.parseObject(userStr, UserEntity.class); UserEntity userEntity = JSONObject.parseObject(userStr, UserEntity.class);
if (!ObjectUtils.isEmpty(userEntity)) { if (!ObjectUtils.isEmpty(userEntity)) {
verifyToken(userEntity); verifyToken(userEntity);
} }
cacheService.select(db); // cacheService.select(db);
if (!ObjectUtils.isEmpty(userEntity)) { if (!ObjectUtils.isEmpty(userEntity)) {
// UserEntity temp = userService.selectOne(new UserQuery().loginName(userEntity.getLoginName()));
// if(!ObjectUtils.isEmpty(temp)){
// userEntity.setId(temp.getId());
// }
UserEntity temp = userService.getExtCache(userEntity.getLoginName()); UserEntity temp = userService.getExtCache(userEntity.getLoginName());
if (!ObjectUtils.isEmpty(temp)) { if (!ObjectUtils.isEmpty(temp)) {
userEntity.setId(temp.getId()); userEntity.setId(temp.getId());
......
...@@ -3,15 +3,14 @@ package com.mortals.xhx.base.system.param.web; ...@@ -3,15 +3,14 @@ package com.mortals.xhx.base.system.param.web;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.annotation.RepeatSubmit; import com.mortals.framework.annotation.RepeatSubmit;
import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.common.code.PageDisplayType; import com.mortals.framework.common.code.PageDisplayType;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.util.FileUtil; import com.mortals.framework.util.FileUtil;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.mortals.framework.web.BaseCRUDJsonMappingController; import com.mortals.framework.web.BaseCRUDJsonMappingController;
import com.mortals.xhx.base.system.param.model.ParamEntity; import com.mortals.xhx.base.system.param.model.ParamEntity;
...@@ -50,6 +49,27 @@ public class ParamController extends BaseCRUDJsonBodyMappingController<ParamServ ...@@ -50,6 +49,27 @@ public class ParamController extends BaseCRUDJsonBodyMappingController<ParamServ
} }
@RequestMapping(method = {RequestMethod.GET,RequestMethod.POST},value = "key")
@UnAuth
public String getValueByKey(@RequestParam(name = "key") String key) {
JSONObject jsonObject = new JSONObject();
String busiDesc = "通过key查询参数值" + this.getModuleDesc();
try {
String value = this.service.getValueByKey(key);
jsonObject.put(KEY_RESULT_DATA, value);
recordSysLog(request, busiDesc + " 【成功】");
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
jsonObject.put(KEY_RESULT_MSG, busiDesc + "成功!");
} catch (Exception e) {
log.error("获取异常", e);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE);
jsonObject.put(KEY_RESULT_MSG, super.convertException(e));
}
return jsonObject.toJSONString();
}
private Map<String, Object> getPageDisplayType() { private Map<String, Object> getPageDisplayType() {
PageDisplayType[] pageDisplayTypes = PageDisplayType.values(); PageDisplayType[] pageDisplayTypes = PageDisplayType.values();
Map<String, Object> result = new HashMap<>(pageDisplayTypes.length); Map<String, Object> result = new HashMap<>(pageDisplayTypes.length);
......
...@@ -52,7 +52,7 @@ public class UploadController extends BaseController { ...@@ -52,7 +52,7 @@ public class UploadController extends BaseController {
@RequestMapping(value = "commonupload") @RequestMapping(value = "commonupload")
public String doFileUpload(MultipartFile file, @RequestParam(value = "prePath",defaultValue = "file/fileupload") String prePath) { public String doFileUpload(MultipartFile file, @RequestParam(value = "prePath",defaultValue = "/file/fileupload") String prePath) {
Map<String, Object> model = new HashMap<>(); Map<String, Object> model = new HashMap<>();
String jsonStr = ""; String jsonStr = "";
try { try {
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
package com.mortals.xhx.base.system.user.service.impl; package com.mortals.xhx.base.system.user.service.impl;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.ap.SysConstains; import com.mortals.framework.ap.SysConstains;
import com.mortals.framework.common.Rest; import com.mortals.framework.common.Rest;
import com.mortals.framework.common.code.UserType; import com.mortals.framework.common.code.UserType;
...@@ -467,15 +468,17 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE ...@@ -467,15 +468,17 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
//eba467f81fb265befdf1f6ab041d39ab 原始admin密码 //eba467f81fb265befdf1f6ab041d39ab 原始admin密码
System.out.println(SecurityUtil.md5DoubleEncoding("adminADMIN@123!@#"));
System.out.println(SecurityUtil.md5DoubleEncoding("123456"));
System.out.println(SecurityUtil.md5DoubleEncoding("Qt123456@"));
/*
//宜宾一体化账号密码 //宜宾一体化账号密码
System.out.println(SecurityUtil.md5DoubleEncoding("yibinYTH@123!@#")); System.out.println(SecurityUtil.md5DoubleEncoding("yibinYTH@123!@#"));
//P@ssw0rd123 //P@ssw0rd123
System.out.println(SecurityUtil.md5DoubleEncoding("P@ssw0rd123")); System.out.println(SecurityUtil.md5DoubleEncoding("P@ssw0rd123"));*/
} }
} }
\ No newline at end of file
...@@ -12,4 +12,30 @@ public class RedisKey { ...@@ -12,4 +12,30 @@ public class RedisKey {
public static final String KEY_USER_MENU_CACHE = "user:menu"; public static final String KEY_USER_MENU_CACHE = "user:menu";
/**
* 大厅业务缓存
*/
public static final String KEY_SEARCH_HALL_BUSINESS_CACHE = "base:search:hall:business:";
/**
* 站点业务id缓存
*/
public static final String KEY_SEARCH_SITEBUSINESSID_CACHE = "base:search:sitebusinessid:";
/**
* 窗口id缓存
*/
public static final String KEY_SEARCH_WINDOWID_CACHE = "base:search:windowId:";
/**
* 窗口id列表缓存
*/
public static final String KEY_SEARCH_WINDOWID_LIST_CACHE = "base:search:windowId:list:";
/**
* 缓存过期时间(秒)
*/
public static final Long KEY_SEARCH_TIMEOUTT_CACHE = 3600L;
} }
package com.mortals.xhx.common.utils;
import cn.hutool.core.util.StrUtil;
import com.mortals.xhx.common.code.AreaLevelEnum;
public class AreaMatchCodeUtil {
public static String getMatchCode(String matchCode, Integer areaLevel) {
if (AreaLevelEnum.地市州.getValue() == areaLevel) {
return StrUtil.padAfter(matchCode, 4, "0");
} else if (AreaLevelEnum.区县.getValue() == areaLevel) {
return StrUtil.padAfter(matchCode, 7, "0");
} else if (AreaLevelEnum.街道.getValue() == areaLevel) {
return StrUtil.padAfter(matchCode, 10, "0");
} else if (AreaLevelEnum.社区.getValue() == areaLevel) {
return StrUtil.padAfter(matchCode, 12, "0");
} else {
return matchCode;
}
}
}
...@@ -504,7 +504,8 @@ public class MatterDetailHtmlParseUtil { ...@@ -504,7 +504,8 @@ public class MatterDetailHtmlParseUtil {
//String url = "http://www.sczwfw.gov.cn/jiq/front/transition/ywTransToDetail?areaCode=513426000000&itemCode=511F3000300009-513426000000-000-11513426MB1541028A-1-00&taskType=7&deptCode=009075316"; //String url = "http://www.sczwfw.gov.cn/jiq/front/transition/ywTransToDetail?areaCode=513426000000&itemCode=511F3000300009-513426000000-000-11513426MB1541028A-1-00&taskType=7&deptCode=009075316";
// 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=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=511A0000400004-511500000000-000-1151120000870212XU-1-00&taskType=1&deptCode=3922757070285361152";
String url = "https://www.sczwfw.gov.cn/jiq/front/transition/ywTransToDetail?areaCode=511500000000&itemCode=512036008003-511500000000-000-11511200MB1503849K-1-00&taskType=20&deptCode=3907787168696946688";
Document dom = MatterDetailHtmlParseUtil.getDomByHtml(url); Document dom = MatterDetailHtmlParseUtil.getDomByHtml(url);
Map<String, String> baseInfoMap = MatterDetailHtmlParseUtil.getbaseInfoMapByHtml(dom); Map<String, String> baseInfoMap = MatterDetailHtmlParseUtil.getbaseInfoMapByHtml(dom);
......
...@@ -237,13 +237,13 @@ public class MatterHtmlParseUtil { ...@@ -237,13 +237,13 @@ public class MatterHtmlParseUtil {
public static void main(String[] args) { public static void main(String[] args) {
/* String url = "http://www.sczwfw.gov.cn/jiq/interface/item/tags"; String url = "http://www.sczwfw.gov.cn/jiq/interface/item/tags";
HashMap<String, String> params = new HashMap<>(); HashMap<String, String> params = new HashMap<>();
params.put("dxType", "21"); params.put("dxType", "54");
params.put("areaCode", "510107000000"); params.put("areaCode", "511503003999");
params.put("deptCode", ""); params.put("deptCode", "");
params.put("searchtext", ""); params.put("searchtext", "");
params.put("pageno", "5"); params.put("pageno", "1");
params.put("taskType", ""); params.put("taskType", "");
Rest<List<MatterEntity>> rest = MatterHtmlParseUtil.getMatterList(params, url); Rest<List<MatterEntity>> rest = MatterHtmlParseUtil.getMatterList(params, url);
......
...@@ -28,6 +28,7 @@ import com.mortals.xhx.utils.SpringUtils; ...@@ -28,6 +28,7 @@ import com.mortals.xhx.utils.SpringUtils;
import lombok.extern.apachecommons.CommonsLog; import lombok.extern.apachecommons.CommonsLog;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -120,6 +121,7 @@ public class SyncGovMatterDetailThread implements Runnable { ...@@ -120,6 +121,7 @@ public class SyncGovMatterDetailThread implements Runnable {
log.info("同步站点事项详细条数....." + unSyncDetailMatterList.size()); log.info("同步站点事项详细条数....." + unSyncDetailMatterList.size());
unSyncDetailMatterList.parallelStream().forEach(matterEntity -> { unSyncDetailMatterList.parallelStream().forEach(matterEntity -> {
matterService.buildMatterDetail(matterEntity, context); matterService.buildMatterDetail(matterEntity, context);
matterEntity.setUpdateTime(new Date());
matterService.update(matterEntity, context); matterService.update(matterEntity, context);
}); });
} }
...@@ -150,8 +152,13 @@ public class SyncGovMatterDetailThread implements Runnable { ...@@ -150,8 +152,13 @@ public class SyncGovMatterDetailThread implements Runnable {
Rest<String> townThemeRest = siteThemeMatterService.syncTownThemeMatterBySiteId(siteEntity, dxType, context); Rest<String> townThemeRest = siteThemeMatterService.syncTownThemeMatterBySiteId(siteEntity, dxType, context);
log.info("同步站点乡镇主题事项:" + JSON.toJSONString(townThemeRest)); log.info("同步站点乡镇主题事项:" + JSON.toJSONString(townThemeRest));
} else { } else {
cacheService.hdel(RedisCacheKeys.getSyncMatterLockKey() + siteEntity.getAreaCode(), siteEntity.getAreaCode()); try {
cacheService.del(RedisCacheKeys.getSyncMatterLockKey() + siteEntity.getAreaCode(), siteEntity.getAreaCode());
log.info("同步站点乡镇主题事项失败:" + themeTownRest.getData()); log.info("同步站点乡镇主题事项失败:" + themeTownRest.getData());
}catch (Exception e){
log.error("同步站点乡镇主题事项失败",e);
}
} }
} }
log.info("同步站点事项结束....."); log.info("同步站点事项结束.....");
......
package com.mortals.xhx.daemon.applicationservice; package com.mortals.xhx.daemon.applicationservice;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICacheService; import com.mortals.framework.service.ICacheService;
import com.mortals.framework.service.IUser; import com.mortals.framework.service.IUser;
...@@ -12,6 +13,7 @@ import com.mortals.xhx.common.pdu.user.UserPdu; ...@@ -12,6 +13,7 @@ import com.mortals.xhx.common.pdu.user.UserPdu;
import com.mortals.xhx.common.utils.BeanUtil; import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.common.utils.SyncTreeSiteThread; import com.mortals.xhx.common.utils.SyncTreeSiteThread;
import com.mortals.xhx.feign.user.IUserFeign; import com.mortals.xhx.feign.user.IUserFeign;
import com.mortals.xhx.module.site.model.SiteEntity;
import com.mortals.xhx.module.site.model.SiteTreeSelect; import com.mortals.xhx.module.site.model.SiteTreeSelect;
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;
...@@ -45,13 +47,33 @@ public class DemoStartedService implements IApplicationStartedService { ...@@ -45,13 +47,33 @@ public class DemoStartedService implements IApplicationStartedService {
@Override @Override
public void start() { public void start() {
ThreadPool.getInstance().init(10); ThreadPool.getInstance().init(6);
logger.info("开始服务..[初始化用户站点树]"); logger.info("开始服务..[初始化用户站点树]");
//删除redis 中的 站点树 //删除redis 中的 站点树
cacheService.del(USER_SITE_TREE); cacheService.del(USER_SITE_TREE);
siteService.updateAllSiteTree(null); siteService.updateAllSiteTree(null);
//测试获取站点
/*
int i=0;
while (true) {
SiteEntity siteCache = siteService.getCache("1");
if (ObjectUtils.isEmpty(siteCache)) {
log.error("siteCache is null");
}else {
log.info("count==>"+i);
}
try {
Thread.sleep(50);
i++;
} catch (InterruptedException e) {
}
}*/
/* UserEntity userEntity = new UserEntity(); /* UserEntity userEntity = new UserEntity();
userEntity.initAttrValue(); userEntity.initAttrValue();
userEntity.setId(0L); userEntity.setId(0L);
......
...@@ -50,7 +50,7 @@ public class SyncHolidayTaskImpl implements ITaskExcuteService { ...@@ -50,7 +50,7 @@ public class SyncHolidayTaskImpl implements ITaskExcuteService {
@Autowired @Autowired
private HolidayService holidayService; private HolidayService holidayService;
@Value("${holidayUrl:https://timor.tech/api/holiday/year/2023}") @Value("${holidayUrl:https://timor.tech/api/holiday/year/2024}")
private String holidayUrl; private String holidayUrl;
...@@ -63,6 +63,7 @@ public class SyncHolidayTaskImpl implements ITaskExcuteService { ...@@ -63,6 +63,7 @@ public class SyncHolidayTaskImpl implements ITaskExcuteService {
private void syncHoliday() throws AppException { private void syncHoliday() throws AppException {
holidayUrl += DateUtil.year(new Date()); holidayUrl += DateUtil.year(new Date());
log.info("holidayUrl:{}", holidayUrl);
String holidayJson = HttpUtil.get(holidayUrl); String holidayJson = HttpUtil.get(holidayUrl);
ObjectMapper mapper = new ObjectMapper(); ObjectMapper mapper = new ObjectMapper();
......
...@@ -3,6 +3,7 @@ package com.mortals.xhx.module.base.service.impl; ...@@ -3,6 +3,7 @@ package com.mortals.xhx.module.base.service.impl;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.ListUtil; import cn.hutool.core.collection.ListUtil;
import com.mortals.framework.common.Rest; import com.mortals.framework.common.Rest;
import com.mortals.xhx.common.utils.AreaMatchCodeUtil;
import com.mortals.xhx.common.utils.BeanUtil; import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.area.model.AreaEntity; import com.mortals.xhx.module.area.model.AreaEntity;
import com.mortals.xhx.module.area.model.AreaQuery; import com.mortals.xhx.module.area.model.AreaQuery;
...@@ -43,6 +44,7 @@ public class BaseAreaServiceImpl extends AbstractCRUDServiceImpl<BaseAreaDao, Ba ...@@ -43,6 +44,7 @@ public class BaseAreaServiceImpl extends AbstractCRUDServiceImpl<BaseAreaDao, Ba
String areaCode = baseAreaEntity.getAreaCode(); String areaCode = baseAreaEntity.getAreaCode();
String matchCode = areaCode.replaceAll("(0)+$", ""); String matchCode = areaCode.replaceAll("(0)+$", "");
matchCode = AreaMatchCodeUtil.getMatchCode(matchCode, baseAreaEntity.getAreaLevel());
BaseAreaQuery baseAreaQuery = new BaseAreaQuery(); BaseAreaQuery baseAreaQuery = new BaseAreaQuery();
baseAreaQuery.setAreaCode(matchCode + "%"); baseAreaQuery.setAreaCode(matchCode + "%");
List<BaseAreaEntity> baseAreaEntityList =this.find(baseAreaQuery); List<BaseAreaEntity> baseAreaEntityList =this.find(baseAreaQuery);
......
package com.mortals.xhx.module.matter.service; package com.mortals.xhx.module.matter.service;
import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.matter.dao.MatterDatumDao; import com.mortals.xhx.module.matter.dao.MatterDatumDao;
import com.mortals.xhx.module.matter.dao.MatterExtDao; import com.mortals.xhx.module.matter.dao.MatterExtDao;
import com.mortals.xhx.module.matter.model.MatterDatumEntity; import com.mortals.xhx.module.matter.model.MatterDatumEntity;
import java.util.List;
/** /**
* MatterDatumService * MatterDatumService
* <p> * <p>
...@@ -16,4 +21,8 @@ import com.mortals.xhx.module.matter.model.MatterDatumEntity; ...@@ -16,4 +21,8 @@ import com.mortals.xhx.module.matter.model.MatterDatumEntity;
public interface MatterDatumService extends ICRUDService<MatterDatumEntity, Long> { public interface MatterDatumService extends ICRUDService<MatterDatumEntity, Long> {
MatterDatumDao getDao(); MatterDatumDao getDao();
List<MatterDatumEntity> findMatterList(MatterDatumEntity query , Context context);
} }
\ No newline at end of file
...@@ -83,4 +83,13 @@ public class MatterDatumServiceImpl extends AbstractCRUDServiceImpl<MatterDatumD ...@@ -83,4 +83,13 @@ public class MatterDatumServiceImpl extends AbstractCRUDServiceImpl<MatterDatumD
} }
/**
* @param query
* @param context
* @return
*/
@Override
public List<MatterDatumEntity> findMatterList(MatterDatumEntity query, Context context) {
return null;
}
} }
\ No newline at end of file
...@@ -284,8 +284,9 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter ...@@ -284,8 +284,9 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
@Override @Override
public Result<MatterEntity> findSubList(MatterEntity matterQuery, PageInfo pageInfo, Context context) throws AppException { public Result<MatterEntity> findSubList(MatterEntity matterQuery, PageInfo pageInfo, Context context) throws AppException {
SiteEntity siteCache = siteService.getCache(matterQuery.getSiteId().toString()); // SiteEntity siteCache = siteService.getCache(matterQuery.getSiteId().toString());
if(ObjectUtils.isEmpty(siteCache)) throw new AppException("查询站点id不能为空!"); SiteEntity siteCache = siteService.get(matterQuery.getSiteId());
if(ObjectUtils.isEmpty(siteCache)) throw new AppException("查询站点id不能为空!siteId:"+matterQuery.getSiteId());
if (ObjectUtils.isEmpty(matterQuery.getAreaCode())) { if (ObjectUtils.isEmpty(matterQuery.getAreaCode())) {
matterQuery.setAreaCode(siteCache == null ? null : siteCache.getAreaCode()); matterQuery.setAreaCode(siteCache == null ? null : siteCache.getAreaCode());
} }
...@@ -1200,7 +1201,6 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter ...@@ -1200,7 +1201,6 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
} }
if (!ObjectUtils.isEmpty(matterExtEntities)) { if (!ObjectUtils.isEmpty(matterExtEntities)) {
//先删除后添加 //先删除后添加
......
...@@ -4,22 +4,32 @@ import com.mortals.framework.annotation.UnAuth; ...@@ -4,22 +4,32 @@ import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.common.Rest; 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.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.framework.web.BasePhpCRUDJsonMappingController; import com.mortals.framework.web.BasePhpCRUDJsonMappingController;
import com.mortals.xhx.base.system.param.service.ParamService; import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.module.matter.model.MatterDatumEntity; import com.mortals.xhx.module.matter.model.MatterDatumEntity;
import com.mortals.xhx.module.matter.model.MatterDatumFileEntity; import com.mortals.xhx.module.matter.model.MatterDatumFileEntity;
import com.mortals.xhx.module.matter.model.MatterDatumFileQuery; import com.mortals.xhx.module.matter.model.MatterDatumFileQuery;
import com.mortals.xhx.module.matter.model.MatterEntity;
import com.mortals.xhx.module.matter.service.MatterDatumFileService; import com.mortals.xhx.module.matter.service.MatterDatumFileService;
import com.mortals.xhx.module.matter.service.MatterDatumService; import com.mortals.xhx.module.matter.service.MatterDatumService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import static com.mortals.framework.ap.SysConstains.MESSAGE_INFO;
import static com.mortals.framework.ap.SysConstains.PAGEINFO_KEY;
/** /**
* 事项申请材料 * 事项申请材料
* *
...@@ -92,4 +102,37 @@ public class MatterDatumController extends BaseCRUDJsonBodyMappingController<Mat ...@@ -92,4 +102,37 @@ public class MatterDatumController extends BaseCRUDJsonBodyMappingController<Mat
model.put(KEY_RESULT_DATA,collect); model.put(KEY_RESULT_DATA,collect);
return super.doListAfter(query, model, context); return super.doListAfter(query, model, context);
} }
/**
* 查询的材料 名称去重 并且
* @param query
* @return
*/
@PostMapping(value = "matterlist")
@UnAuth
public Rest<Object> matterlist(@RequestBody MatterDatumEntity query) {
Rest<Object> ret = new Rest<>();
Map<String, Object> model = new HashMap<>();
Context context = this.getContext();
String busiDesc = "查询材料" + this.getModuleDesc();
int code = VALUE_RESULT_SUCCESS;
try {
List<MatterDatumEntity> list = this.service.findMatterList(query, context);
model.put(KEY_RESULT_DATA, list);
model.put(MESSAGE_INFO, busiDesc + "成功");
if (!ObjectUtils.isEmpty(getContext()) && !ObjectUtils.isEmpty(getContext().getUser())) {
recordSysLog(request, busiDesc + " 【成功】");
}
} catch (Exception e) {
code = VALUE_RESULT_FAILURE;
this.doException(request, busiDesc, model, e);
}
this.init(model, context);
ret.setCode(code);
ret.setData(model);
ret.setMsg(model.get(MESSAGE_INFO) == null ? "" : model.remove(MESSAGE_INFO).toString());
return ret;
}
} }
\ No newline at end of file
package com.mortals.xhx.module.site.model; package com.mortals.xhx.module.site.model;
import java.util.List; import java.util.List;
import java.util.ArrayList; 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.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel; import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong; import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.site.model.vo.SiteMatterVo; import com.mortals.xhx.module.site.model.vo.SiteMatterVo;
import lombok.Data;
/** /**
* 站点事项实体对象 * 站点事项实体对象
* *
* @author zxfei * @author zxfei
* @date 2023-04-12 * @date 2024-01-04
*/ */
@Data
public class SiteMatterEntity extends SiteMatterVo { public class SiteMatterEntity extends SiteMatterVo {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -32,10 +35,6 @@ public class SiteMatterEntity extends SiteMatterVo { ...@@ -32,10 +35,6 @@ public class SiteMatterEntity extends SiteMatterVo {
* 事项名称 * 事项名称
*/ */
private String matterName; private String matterName;
/**
* 事项编码
*/
private String matterCode;
/** /**
* 部门ID * 部门ID
*/ */
...@@ -44,6 +43,10 @@ public class SiteMatterEntity extends SiteMatterVo { ...@@ -44,6 +43,10 @@ public class SiteMatterEntity extends SiteMatterVo {
* 部门名称 * 部门名称
*/ */
private String deptName; private String deptName;
/**
* 事项编码
*/
private String matterCode;
/** /**
* 事项类型 * 事项类型
*/ */
...@@ -52,10 +55,6 @@ public class SiteMatterEntity extends SiteMatterVo { ...@@ -52,10 +55,6 @@ public class SiteMatterEntity extends SiteMatterVo {
* 事项来源 * 事项来源
*/ */
private Integer source; private Integer source;
/**
* 部门编号
*/
private String deptCode;
/** /**
* 热门(0.否,1.是) * 热门(0.否,1.是)
*/ */
...@@ -64,182 +63,26 @@ public class SiteMatterEntity extends SiteMatterVo { ...@@ -64,182 +63,26 @@ public class SiteMatterEntity extends SiteMatterVo {
* 显示(0.否,1.是) * 显示(0.否,1.是)
*/ */
private Integer display; private Integer display;
public SiteMatterEntity(){}
/**
* 获取 站点ID
* @return Long
*/
public Long getSiteId(){
return siteId;
}
/**
* 设置 站点ID
* @param siteId
*/
public void setSiteId(Long siteId){
this.siteId = siteId;
}
/**
* 获取 站点名称
* @return String
*/
public String getSiteName(){
return siteName;
}
/**
* 设置 站点名称
* @param siteName
*/
public void setSiteName(String siteName){
this.siteName = siteName;
}
/**
* 获取 事项ID
* @return Long
*/
public Long getMatterId(){
return matterId;
}
/**
* 设置 事项ID
* @param matterId
*/
public void setMatterId(Long matterId){
this.matterId = matterId;
}
/**
* 获取 事项名称
* @return String
*/
public String getMatterName(){
return matterName;
}
/**
* 设置 事项名称
* @param matterName
*/
public void setMatterName(String matterName){
this.matterName = matterName;
}
/**
* 获取 事项编码
* @return String
*/
public String getMatterCode(){
return matterCode;
}
/**
* 设置 事项编码
* @param matterCode
*/
public void setMatterCode(String matterCode){
this.matterCode = matterCode;
}
/**
* 获取 部门ID
* @return Long
*/
public Long getDeptId(){
return deptId;
}
/** /**
* 设置 部门ID * 部门编号
* @param deptId
*/
public void setDeptId(Long deptId){
this.deptId = deptId;
}
/**
* 获取 部门名称
* @return String
*/
public String getDeptName(){
return deptName;
}
/**
* 设置 部门名称
* @param deptName
*/
public void setDeptName(String deptName){
this.deptName = deptName;
}
/**
* 获取 事项类型
* @return String
*/
public String getEventTypeShow(){
return eventTypeShow;
}
/**
* 设置 事项类型
* @param eventTypeShow
*/
public void setEventTypeShow(String eventTypeShow){
this.eventTypeShow = eventTypeShow;
}
/**
* 获取 事项来源
* @return Integer
*/
public Integer getSource(){
return source;
}
/**
* 设置 事项来源
* @param source
*/
public void setSource(Integer source){
this.source = source;
}
/**
* 获取 部门编号
* @return String
*/
public String getDeptCode(){
return deptCode;
}
/**
* 设置 部门编号
* @param deptCode
*/ */
public void setDeptCode(String deptCode){ private String deptCode;
this.deptCode = deptCode;
}
/** /**
* 获取 热门(0.否,1.是) * 代办帮办(0.否,1.是)
* @return Integer
*/ */
public Integer getHot(){ private Integer agent;
return hot;
}
/** /**
* 设置 热门(0.否,1.是) * 代办姓名
* @param hot
*/ */
public void setHot(Integer hot){ private String agentName;
this.hot = hot;
}
/** /**
* 获取 显示(0.否,1.是) * 代办电话
* @return Integer
*/ */
public Integer getDisplay(){ private String agentPhone;
return display;
}
/** /**
* 设置 显示(0.否,1.是) * 职务
* @param display
*/ */
public void setDisplay(Integer display){ private String agentPost;
this.display = display;
}
@Override @Override
public int hashCode() { public int hashCode() {
return this.getId().hashCode(); return this.getId().hashCode();
...@@ -256,47 +99,22 @@ public class SiteMatterEntity extends SiteMatterVo { ...@@ -256,47 +99,22 @@ public class SiteMatterEntity extends SiteMatterVo {
return false; return false;
} }
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",siteId:").append(getSiteId());
sb.append(",siteName:").append(getSiteName());
sb.append(",matterId:").append(getMatterId());
sb.append(",matterName:").append(getMatterName());
sb.append(",matterCode:").append(getMatterCode());
sb.append(",deptId:").append(getDeptId());
sb.append(",deptName:").append(getDeptName());
sb.append(",eventTypeShow:").append(getEventTypeShow());
sb.append(",source:").append(getSource());
sb.append(",deptCode:").append(getDeptCode());
sb.append(",hot:").append(getHot());
sb.append(",display:").append(getDisplay());
return sb.toString();
}
public void initAttrValue(){ public void initAttrValue(){
this.siteId = null; this.siteId = null;
this.siteName = "";
this.siteName = null;
this.matterId = null; this.matterId = null;
this.matterName = "";
this.matterName = null;
this.matterCode = null;
this.deptId = null; this.deptId = null;
this.deptName = "";
this.deptName = null; this.matterCode = "";
this.eventTypeShow = "";
this.eventTypeShow = null;
this.source = 0; this.source = 0;
this.deptCode = null;
this.hot = 0; this.hot = 0;
this.display = 0;
this.display =1; this.deptCode = "";
this.agent = 0;
this.agentName = "";
this.agentPhone = "";
this.agentPost = "";
} }
} }
\ No newline at end of file
...@@ -53,4 +53,10 @@ public class SiteBusinessVo extends BaseEntityLong { ...@@ -53,4 +53,10 @@ public class SiteBusinessVo extends BaseEntityLong {
private List<Long> idNotList; private List<Long> idNotList;
/** 业务ID列表 */
private List <Long> businessIdList;
/** 业务ID排除列表 */
private List <Long> businessIdNotList;
} }
\ No newline at end of file
...@@ -14,5 +14,4 @@ import lombok.Data; ...@@ -14,5 +14,4 @@ import lombok.Data;
public class SiteHallVo extends BaseEntityLong { public class SiteHallVo extends BaseEntityLong {
} }
\ No newline at end of file
...@@ -40,11 +40,13 @@ public class SiteMatterServiceImpl extends AbstractCRUDServiceImpl<SiteMatterDao ...@@ -40,11 +40,13 @@ public class SiteMatterServiceImpl extends AbstractCRUDServiceImpl<SiteMatterDao
@Override @Override
protected void findAfter(SiteMatterEntity params, PageInfo pageInfo, Context context, List<SiteMatterEntity> list) throws AppException { protected void findAfter(SiteMatterEntity params, PageInfo pageInfo, Context context, List<SiteMatterEntity> list) throws AppException {
// List<Long> matterIdlist = list.parallelStream().map(item -> item.getMatterId()).collect(Collectors.toList());
//Map<Long, MatterEntity> matterEntityMap = matterService.find(new MatterQuery().idList(matterIdlist)).parallelStream().collect(Collectors.toMap(x -> x.getId(), y -> y, (o, n) -> n)); if (!ObjectUtils.isEmpty(list)) {
List<Long> matterIdlist = list.stream().map(item -> item.getMatterId()).collect(Collectors.toList());
Map<Long, MatterEntity> matterEntityMap = matterService.find(new MatterQuery().idList(matterIdlist)).parallelStream().collect(Collectors.toMap(x -> x.getId(), y -> y, (o, n) -> n));
list.forEach(item -> { list.forEach(item -> {
if (!ObjectUtils.isEmpty(item.getMatterId())) { if (!ObjectUtils.isEmpty(item.getMatterId())) {
MatterEntity matterEntity = matterService.get(item.getMatterId()); MatterEntity matterEntity = matterEntityMap.get(item.getMatterId());
if (!ObjectUtils.isEmpty(matterEntity)) { if (!ObjectUtils.isEmpty(matterEntity)) {
item.setBelongDept(matterEntity.getBelongDept()); item.setBelongDept(matterEntity.getBelongDept());
item.setWindowToTheSceneNum(matterEntity.getWindowToTheSceneNum()); item.setWindowToTheSceneNum(matterEntity.getWindowToTheSceneNum());
...@@ -54,6 +56,7 @@ public class SiteMatterServiceImpl extends AbstractCRUDServiceImpl<SiteMatterDao ...@@ -54,6 +56,7 @@ public class SiteMatterServiceImpl extends AbstractCRUDServiceImpl<SiteMatterDao
} }
} }
}); });
}
super.findAfter(params, pageInfo, context, list); super.findAfter(params, pageInfo, context, list);
} }
......
package com.mortals.xhx.module.site.service.impl; package com.mortals.xhx.module.site.service.impl;
import cn.hutool.core.collection.ListUtil; import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.core.util.URLUtil; import cn.hutool.core.util.URLUtil;
import cn.hutool.core.util.ZipUtil; import cn.hutool.core.util.ZipUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
...@@ -26,6 +27,7 @@ import com.mortals.xhx.common.key.Constant; ...@@ -26,6 +27,7 @@ import com.mortals.xhx.common.key.Constant;
import com.mortals.xhx.common.pdu.RespData; import com.mortals.xhx.common.pdu.RespData;
import com.mortals.xhx.common.pdu.device.DevicePdu; import com.mortals.xhx.common.pdu.device.DevicePdu;
import com.mortals.xhx.common.pdu.user.UserPdu; import com.mortals.xhx.common.pdu.user.UserPdu;
import com.mortals.xhx.common.utils.AreaMatchCodeUtil;
import com.mortals.xhx.common.utils.MatterHtmlParseUtil; import com.mortals.xhx.common.utils.MatterHtmlParseUtil;
import com.mortals.xhx.common.utils.SyncTreeSiteThread; import com.mortals.xhx.common.utils.SyncTreeSiteThread;
import com.mortals.xhx.feign.device.IDeviceFeign; import com.mortals.xhx.feign.device.IDeviceFeign;
...@@ -208,10 +210,10 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE ...@@ -208,10 +210,10 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
//新加的站点 只需要更新全树 //新加的站点 只需要更新全树
//更新同步部门相关 //更新同步部门相关
deptService.syncDeptBySiteId(entity, context); //deptService.syncDeptBySiteId(entity, context);
//通知php系统更新 //通知php系统更新
String phpUrl = GlobalSysInfo.getParamValue(PARAM_SERVER_PHP_HTTP_URL, "http://172.15.28.116:8090"); String phpUrl = GlobalSysInfo.getParamValue(PARAM_SERVER_PHP_HTTP_URL, "http://127.0.0.1:11078/zwfw_api");
HashMap<String, String> paramsMap = new HashMap<>(); HashMap<String, String> paramsMap = new HashMap<>();
paramsMap.put("siteid", entity.getId().toString()); paramsMap.put("siteid", entity.getId().toString());
...@@ -388,20 +390,13 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE ...@@ -388,20 +390,13 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
public List<SiteTreeSelect> getSiteTree(Context context) { public List<SiteTreeSelect> getSiteTree(Context context) {
// List<SiteTreeSelect> siteTreeSelects = siteTreeMap.get(context.getUser().getId()); // List<SiteTreeSelect> siteTreeSelects = siteTreeMap.get(context.getUser().getId());
List<SiteTreeSelect> collect = getSiteTreeSelects(context.getUser().getId().toString()); List<SiteTreeSelect> collect = getSiteTreeSelects(context.getUser().getId().toString());
log.info("siteTree:{}", JSON.toJSONString(collect)); // log.info("siteTree:{}", JSON.toJSONString(collect));
if (!ObjectUtils.isEmpty(collect)) { if (!ObjectUtils.isEmpty(collect)) {
return collect; return collect;
} else { } else {
//反全站点树 如果没有全站点树,则临时构建 admin 为全站点树 //反全站点树 如果没有全站点树,则临时构建 admin 为全站点树
return getSiteTreeSelects("1"); return getSiteTreeSelects("1");
} }
//如果所属站点为空返回全节点树
// if (!ObjectUtils.isEmpty(siteTreeSelects)) {
// return siteTreeSelects;
// } else {
// return siteTreeMap.get(1);
// }
} }
private List<SiteTreeSelect> getSiteTreeSelects(String userId) { private List<SiteTreeSelect> getSiteTreeSelects(String userId) {
...@@ -432,6 +427,7 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE ...@@ -432,6 +427,7 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
throw new AppException(String.format("区域不存在!区域编码:%s", areaCode)); throw new AppException(String.format("区域不存在!区域编码:%s", areaCode));
} }
String matchCode = areaCode.replaceAll("(0)+$", ""); String matchCode = areaCode.replaceAll("(0)+$", "");
matchCode = AreaMatchCodeUtil.getMatchCode(matchCode, areaEntity.getAreaLevel());
SiteQuery siteQuery = new SiteQuery(); SiteQuery siteQuery = new SiteQuery();
siteQuery.setAreaCode(matchCode + "%"); siteQuery.setAreaCode(matchCode + "%");
List<SiteEntity> siteEntities = this.find(siteQuery); List<SiteEntity> siteEntities = this.find(siteQuery);
...@@ -439,8 +435,6 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE ...@@ -439,8 +435,6 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
PageInfo pageInfo = new PageInfo(); PageInfo pageInfo = new PageInfo();
pageInfo.setCurrPage(1); pageInfo.setCurrPage(1);
pageInfo.setPrePageResult(10); pageInfo.setPrePageResult(10);
return siteEntities; return siteEntities;
} }
...@@ -450,17 +444,22 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE ...@@ -450,17 +444,22 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
if (ObjectUtils.isEmpty(siteId)) { if (ObjectUtils.isEmpty(siteId)) {
throw new AppException("站点Id不能为空!"); throw new AppException("站点Id不能为空!");
} }
SiteEntity siteCache = this.getCache(siteId.toString()); SiteEntity siteCache = this.get(siteId);
if (ObjectUtils.isEmpty(siteCache)) { if (ObjectUtils.isEmpty(siteCache)) {
throw new AppException("站点不存在,siteId:" + siteId); throw new AppException("站点不存在,siteId:" + siteId);
} }
//siteList.add(siteCache); //siteList.add(siteCache);
AreaEntity areaEntity = areaService.getExtCache(siteCache.getAreaCode()); AreaEntity areaEntity = areaService.getExtCache(siteCache.getAreaCode());
if (ObjectUtils.isEmpty(areaEntity)) {
areaEntity = areaService.selectOne(new AreaQuery().areaCode(siteCache.getAreaCode()));
if (ObjectUtils.isEmpty(areaEntity)) { if (ObjectUtils.isEmpty(areaEntity)) {
throw new AppException(String.format("区域不存在!区域编码:%s", siteCache.getAreaCode())); throw new AppException(String.format("区域不存在!区域编码:%s", siteCache.getAreaCode()));
} }
}
String matchCode = siteCache.getAreaCode().replaceAll("(0)+$", ""); String matchCode = siteCache.getAreaCode().replaceAll("(0)+$", "");
matchCode = AreaMatchCodeUtil.getMatchCode(matchCode, areaEntity.getAreaLevel());
SiteQuery siteQuery = new SiteQuery(); SiteQuery siteQuery = new SiteQuery();
siteQuery.setAreaCode(matchCode + "%"); siteQuery.setAreaCode(matchCode + "%");
List<SiteEntity> siteEntities = this.find(siteQuery); List<SiteEntity> siteEntities = this.find(siteQuery);
...@@ -488,6 +487,7 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE ...@@ -488,6 +487,7 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
throw new AppException(String.format("区域不存在!区域编码:%s", query.getAreaCode())); throw new AppException(String.format("区域不存在!区域编码:%s", query.getAreaCode()));
} }
String matchCode = query.getAreaCode().replaceAll("(0)+$", ""); String matchCode = query.getAreaCode().replaceAll("(0)+$", "");
matchCode = AreaMatchCodeUtil.getMatchCode(matchCode, areaEntity.getAreaLevel());
SiteQuery siteQuery = new SiteQuery(); SiteQuery siteQuery = new SiteQuery();
siteQuery.setAreaCode(matchCode + "%"); siteQuery.setAreaCode(matchCode + "%");
List<SiteEntity> siteEntities = this.find(siteQuery); List<SiteEntity> siteEntities = this.find(siteQuery);
...@@ -528,6 +528,9 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE ...@@ -528,6 +528,9 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
siteAreaVo.setAreaCode(child.getAreaCode()); siteAreaVo.setAreaCode(child.getAreaCode());
siteAreaVo.setAreaName(child.getName()); siteAreaVo.setAreaName(child.getName());
String matchCode = child.getAreaCode().replaceAll("(0)+$", ""); String matchCode = child.getAreaCode().replaceAll("(0)+$", "");
//不足位数,补零 5115 020 120 01 市 区 街道 社区
matchCode = AreaMatchCodeUtil.getMatchCode(matchCode, child.getAreaLevel());
SiteQuery siteQuery = new SiteQuery(); SiteQuery siteQuery = new SiteQuery();
siteQuery.setAreaCode(matchCode + "%"); siteQuery.setAreaCode(matchCode + "%");
if (!ObjectUtils.isEmpty(query.getSiteName())) { if (!ObjectUtils.isEmpty(query.getSiteName())) {
...@@ -857,4 +860,16 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE ...@@ -857,4 +860,16 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
} }
public static void main(String[] args) {
String matchCode = "511530000000".replaceAll("(0)+$", "");
System.out.println(matchCode);
matchCode=StrUtil.padAfter(matchCode,7,"0");
System.out.println(matchCode);
}
} }
\ No newline at end of file
...@@ -160,27 +160,18 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic ...@@ -160,27 +160,18 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic
String busiDesc = "根据区域编码查询站点列表" + this.getModuleDesc(); String busiDesc = "根据区域编码查询站点列表" + this.getModuleDesc();
try { try {
if (!ObjectUtils.isEmpty(site.getSiteName())) { if (!ObjectUtils.isEmpty(site.getSiteName())) {
// SiteEntity siteEntity = this.service.selectOne(new SiteQuery().siteName(site.getSiteName()));
List<SiteEntity> siteEntities = this.service.find(new SiteQuery().siteName(site.getSiteName())); List<SiteEntity> siteEntities = this.service.find(new SiteQuery().siteName(site.getSiteName()));
if (!ObjectUtils.isEmpty(siteEntities)) { if (!ObjectUtils.isEmpty(siteEntities)) {
site.setAreaCodeList(siteEntities.stream().map(i -> i.getAreaCode()).collect(Collectors.toList())); site.setAreaCodeList(siteEntities.stream().map(i -> i.getAreaCode()).collect(Collectors.toList()));
} }
/* if (!ObjectUtils.isEmpty(siteEntity)) {
site.setAreaCode(siteEntity.getAreaCode());
}*/
} }
if (!ObjectUtils.isEmpty(site.getAreaName())) { if (!ObjectUtils.isEmpty(site.getAreaName())) {
//AreaEntity areaEntity = areaService.selectOne(new AreaQuery().name(site.getAreaName()));
List<AreaEntity> areaEntities = areaService.find(new AreaQuery().name(site.getAreaName())); List<AreaEntity> areaEntities = areaService.find(new AreaQuery().name(site.getAreaName()));
if (!ObjectUtils.isEmpty(areaEntities)) { if (!ObjectUtils.isEmpty(areaEntities)) {
// site.setAreaCode(areaEntity.getAreaCode());
site.setAreaCodeList(areaEntities.stream().map(i -> i.getAreaCode()).collect(Collectors.toList())); site.setAreaCodeList(areaEntities.stream().map(i -> i.getAreaCode()).collect(Collectors.toList()));
} }
} }
if (ObjectUtils.isEmpty(site.getAreaCodeList())) { if (ObjectUtils.isEmpty(site.getAreaCodeList())) {
site.setAreaCodeList(Arrays.asList(site.getAreaCode())); site.setAreaCodeList(Arrays.asList(site.getAreaCode()));
} }
...@@ -189,9 +180,9 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic ...@@ -189,9 +180,9 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic
}).distinct().collect(Collectors.toList()); }).distinct().collect(Collectors.toList());
//List<SiteEntity> siteEntityList = this.service.getFlatSitesByAreaCode(site.getAreaCode(), getContext()); //List<SiteEntity> siteEntityList = this.service.getFlatSitesByAreaCode(site.getAreaCode(), getContext());
if (!ObjectUtils.isEmpty(site.getSiteName())) { /* if (!ObjectUtils.isEmpty(site.getSiteName())) {
siteEntityList = siteEntityList.stream().filter(item -> site.getSiteName().equals(item.getSiteName())).collect(Collectors.toList()); siteEntityList = siteEntityList.stream().filter(item -> site.getSiteName().equals(item.getSiteName())).collect(Collectors.toList());
} }*/
if (!ObjectUtils.isEmpty(getContext()) && !ObjectUtils.isEmpty(getContext().getUser())) { if (!ObjectUtils.isEmpty(getContext()) && !ObjectUtils.isEmpty(getContext().getUser())) {
recordSysLog(request, busiDesc + " 【成功】"); recordSysLog(request, busiDesc + " 【成功】");
} }
......
package com.mortals.xhx.module.site.web; package com.mortals.xhx.module.site.web;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
import com.mortals.framework.annotation.UnAuth; import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.common.Rest; import com.mortals.framework.common.Rest;
import com.mortals.framework.model.Result;
import com.mortals.framework.service.ICacheService;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService; import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.module.business.model.BusinessEntity; import com.mortals.xhx.module.business.model.BusinessEntity;
import com.mortals.xhx.module.site.model.*; import com.mortals.xhx.module.site.model.*;
import com.mortals.xhx.module.window.model.WindowBusinessEntity;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
...@@ -13,27 +19,13 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -13,27 +19,13 @@ import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import com.mortals.framework.model.Context; 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.site.service.SiteHallService; import com.mortals.xhx.module.site.service.SiteHallService;
import org.apache.commons.lang3.ArrayUtils;
import com.mortals.framework.util.StringUtils;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; 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 static com.mortals.xhx.common.key.RedisKey.*;
/** /**
* 站点大厅信息 * 站点大厅信息
...@@ -47,6 +39,8 @@ public class SiteHallController extends BaseCRUDJsonBodyMappingController<SiteHa ...@@ -47,6 +39,8 @@ public class SiteHallController extends BaseCRUDJsonBodyMappingController<SiteHa
@Autowired @Autowired
private ParamService paramService; private ParamService paramService;
@Autowired
private ICacheService cacheService;
public SiteHallController() { public SiteHallController() {
super.setModuleDesc("站点大厅信息"); super.setModuleDesc("站点大厅信息");
...@@ -71,7 +65,21 @@ public class SiteHallController extends BaseCRUDJsonBodyMappingController<SiteHa ...@@ -71,7 +65,21 @@ public class SiteHallController extends BaseCRUDJsonBodyMappingController<SiteHa
String busiDesc = "根据大厅查询所属业务"; String busiDesc = "根据大厅查询所属业务";
int code = VALUE_RESULT_SUCCESS; int code = VALUE_RESULT_SUCCESS;
try { try {
Rest<List<BusinessEntity>> rest = this.service.getBusinessByHall(siteHall, getContext()); if (ObjectUtils.isEmpty(siteHall.getId())) {
return Rest.fail("大厅ID不能为空!");
}
Rest<List<BusinessEntity>> rest = null;
String cacheResult = cacheService.get(KEY_SEARCH_HALL_BUSINESS_CACHE + siteHall.getId(), String.class);
if (!ObjectUtils.isEmpty(cacheResult)) {
rest = JSON.parseObject(cacheResult, new TypeReference<Rest<List<BusinessEntity>>>() {
});
} else {
//查询数据库
rest = this.service.getBusinessByHall(siteHall, getContext());
if(rest.getCode()== YesNoEnum.YES.getValue()){
cacheService.set(KEY_SEARCH_HALL_BUSINESS_CACHE + siteHall.getId(), JSON.toJSONString(rest), KEY_SEARCH_TIMEOUTT_CACHE);
}
}
if (!ObjectUtils.isEmpty(getContext()) && !ObjectUtils.isEmpty(getContext().getUser())) { if (!ObjectUtils.isEmpty(getContext()) && !ObjectUtils.isEmpty(getContext().getUser())) {
recordSysLog(request, busiDesc + " 【成功】"); recordSysLog(request, busiDesc + " 【成功】");
......
...@@ -155,7 +155,9 @@ public class SkinBaseServiceImpl extends AbstractCRUDServiceImpl<SkinBaseDao, Sk ...@@ -155,7 +155,9 @@ public class SkinBaseServiceImpl extends AbstractCRUDServiceImpl<SkinBaseDao, Sk
@Override @Override
protected void updateAfter(SkinBaseEntity entity, Context context) throws AppException { protected void updateAfter(SkinBaseEntity entity, Context context) throws AppException {
saveSkinFields(entity, context); saveSkinFields(entity, context);
super.updateBefore(entity, context);
SendSkinRefreshTask sendSkinRefreshTask = new SendSkinRefreshTask();
ThreadPool.getInstance().execute(sendSkinRefreshTask);
} }
private void saveSkinFields(SkinBaseEntity entity, Context context) { private void saveSkinFields(SkinBaseEntity entity, Context context) {
...@@ -202,13 +204,15 @@ public class SkinBaseServiceImpl extends AbstractCRUDServiceImpl<SkinBaseDao, Sk ...@@ -202,13 +204,15 @@ public class SkinBaseServiceImpl extends AbstractCRUDServiceImpl<SkinBaseDao, Sk
} }
private void genTemplateCss(SkinBaseEntity entity, Context context) { private void genTemplateCss(SkinBaseEntity entity, Context context) {
//加载模板,合成模板数据 //加载模板,合成模板数据
Map data = new HashMap(); Map data = new HashMap();
List<SkinFieldEntity> collect = entity.getSkinFieldList().stream().map(field -> { List<SkinFieldEntity> collect = entity.getSkinFieldList().stream().map(field -> {
SkinFieldEntity skinFieldEntity = new SkinFieldEntity(); SkinFieldEntity skinFieldEntity = new SkinFieldEntity();
BeanUtils.copyProperties(field, skinFieldEntity, BeanUtil.getNullPropertyNames(field)); BeanUtils.copyProperties(field, skinFieldEntity, BeanUtil.getNullPropertyNames(field));
updateUrl(skinFieldEntity); // updateUrl(skinFieldEntity);
return skinFieldEntity; return skinFieldEntity;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
...@@ -222,7 +226,7 @@ public class SkinBaseServiceImpl extends AbstractCRUDServiceImpl<SkinBaseDao, Sk ...@@ -222,7 +226,7 @@ public class SkinBaseServiceImpl extends AbstractCRUDServiceImpl<SkinBaseDao, Sk
InputStream inputStream = new ByteArrayInputStream(sw.toString().getBytes(Constant.UTF8)); InputStream inputStream = new ByteArrayInputStream(sw.toString().getBytes(Constant.UTF8));
MultipartFile file = getMultipartFile(inputStream, "file.css"); MultipartFile file = getMultipartFile(inputStream, "file.css");
String filePath = uploadService.saveFileUpload(file, "file/fileupload", context.getUser()); String filePath = uploadService.saveFileUpload(file, "/file/fileupload", context.getUser());
entity.setCssFilePath(filePath); entity.setCssFilePath(filePath);
} catch (Exception e) { } catch (Exception e) {
......
...@@ -54,5 +54,10 @@ public class WindowBusinessVo extends BaseEntityLong { ...@@ -54,5 +54,10 @@ public class WindowBusinessVo extends BaseEntityLong {
@JSONField(serialize = true) @JSONField(serialize = true)
private String hallName; private String hallName;
/**
* 查询缓存是否开启
*/
private Integer searchCache;
} }
\ No newline at end of file
...@@ -2,12 +2,16 @@ package com.mortals.xhx.module.window.service.impl; ...@@ -2,12 +2,16 @@ package com.mortals.xhx.module.window.service.impl;
import cn.hutool.core.collection.ListUtil; import cn.hutool.core.collection.ListUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
import com.alibaba.fastjson.serializer.SerializerFeature; import com.alibaba.fastjson.serializer.SerializerFeature;
import com.mortals.framework.ap.GlobalSysInfo; import com.mortals.framework.ap.GlobalSysInfo;
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.model.PageInfo; import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.framework.service.ICacheService;
import com.mortals.framework.util.HttpUtil; import com.mortals.framework.util.HttpUtil;
import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.common.utils.BeanUtil; import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.business.model.BusinessEntity; import com.mortals.xhx.module.business.model.BusinessEntity;
import com.mortals.xhx.module.business.model.BusinessQuery; import com.mortals.xhx.module.business.model.BusinessQuery;
...@@ -18,6 +22,7 @@ import com.mortals.xhx.module.window.model.*; ...@@ -18,6 +22,7 @@ import com.mortals.xhx.module.window.model.*;
import com.mortals.xhx.module.window.service.WindowHallService; import com.mortals.xhx.module.window.service.WindowHallService;
import com.mortals.xhx.module.window.service.WindowService; import com.mortals.xhx.module.window.service.WindowService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.formula.functions.T;
import org.checkerframework.checker.units.qual.A; import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -33,6 +38,7 @@ import java.util.stream.Collectors; ...@@ -33,6 +38,7 @@ import java.util.stream.Collectors;
import static com.mortals.framework.util.HttpUtil.HEADER_CONTENT_TYPE; import static com.mortals.framework.util.HttpUtil.HEADER_CONTENT_TYPE;
import static com.mortals.xhx.common.key.Constant.PARAM_SERVER_PHP_HTTP_URL; import static com.mortals.xhx.common.key.Constant.PARAM_SERVER_PHP_HTTP_URL;
import static com.mortals.xhx.common.key.RedisKey.*;
/** /**
* WindowBusinessService * WindowBusinessService
...@@ -48,20 +54,94 @@ public class WindowBusinessServiceImpl extends AbstractCRUDServiceImpl<WindowBus ...@@ -48,20 +54,94 @@ public class WindowBusinessServiceImpl extends AbstractCRUDServiceImpl<WindowBus
private WindowService windowService; private WindowService windowService;
@Autowired @Autowired
private WindowHallService windowHallService; private WindowHallService windowHallService;
@Autowired
private ICacheService cacheService;
/**
* @param entity
* @param pageInfo
* @param context
* @return
* @throws AppException
*/
@Override @Override
protected void findAfter(WindowBusinessEntity entity, PageInfo pageInfo, Context context, List<WindowBusinessEntity> list) throws AppException { public Result<WindowBusinessEntity> find(WindowBusinessEntity entity, PageInfo pageInfo, Context context) throws AppException {
WindowBusinessEntity query = this.findBefore(entity, pageInfo, context);
//判断查询结果是否用缓存
if (!ObjectUtils.isEmpty(query) && !ObjectUtils.isEmpty(query.getSearchCache()) && !ObjectUtils.isEmpty(query.getSearchCache() == YesNoEnum.YES.getValue())) {
//根据查询条件 获取缓存,如果缓存有则直接取缓存,否则读数据库后 再写入缓存
return getWindowBusinessEntityCacheResult(entity, pageInfo, context, query);
} else {
Result<WindowBusinessEntity> result = this.dao.getList(query, pageInfo);
this.findAfter(entity, pageInfo, context, result.getList());
return result;
}
}
Map<Long, WindowEntity> collect = windowService.getCacheList().stream().collect(Collectors.toMap(x -> x.getId(), y -> y, (o, n) -> n)); private Result<WindowBusinessEntity> getWindowBusinessEntityCacheResult(WindowBusinessEntity entity, PageInfo pageInfo, Context context, WindowBusinessEntity query) {
//Map<Long, WindowEntity> collect = windowService.findToMap(new WindowQuery(), context); Result<WindowBusinessEntity> result = null;
Map<Long, WindowHallEntity> windowHallEntityMap = windowHallService.getCacheList().stream().collect(Collectors.toMap(x -> x.getId(), y -> y, (o, n) -> n)); if (!ObjectUtils.isEmpty(query.getSiteBusinessId())) {
Long siteBusinessId = query.getSiteBusinessId();
String cacheResult = cacheService.get(KEY_SEARCH_SITEBUSINESSID_CACHE + siteBusinessId, String.class);
if (!ObjectUtils.isEmpty(cacheResult)) {
result = JSON.parseObject(cacheResult, new TypeReference<Result<WindowBusinessEntity>>() {
});
} else {
//查询数据库
result = this.dao.getList(query, pageInfo);
this.findAfter(entity, pageInfo, context, result.getList());
if (!ObjectUtils.isEmpty(result.getList())) {
cacheService.set(KEY_SEARCH_SITEBUSINESSID_CACHE + siteBusinessId, JSON.toJSONString(result), KEY_SEARCH_TIMEOUTT_CACHE);
}
}
} else if (!ObjectUtils.isEmpty(query.getWindowId())) {
Long windowId = query.getWindowId();
String cacheResult = cacheService.get(KEY_SEARCH_WINDOWID_CACHE + windowId, String.class);
if (!ObjectUtils.isEmpty(cacheResult)) {
result = JSON.parseObject(cacheResult, new TypeReference<Result<WindowBusinessEntity>>() {
});
} else {
//查询数据库
result = this.dao.getList(query, pageInfo);
this.findAfter(entity, pageInfo, context, result.getList());
//无查询结果的不做保存
if (!ObjectUtils.isEmpty(result.getList())) {
cacheService.set(KEY_SEARCH_WINDOWID_CACHE + windowId, JSON.toJSONString(result), KEY_SEARCH_TIMEOUTT_CACHE);
}
}
} else if (!ObjectUtils.isEmpty(query.getWindowIdList())) {
String windowIdlist = query.getWindowIdList().stream().map(String::valueOf).collect(Collectors.joining("#"));
String cacheResult = cacheService.get(KEY_SEARCH_WINDOWID_LIST_CACHE + windowIdlist, String.class);
if (!ObjectUtils.isEmpty(cacheResult)) {
result = JSON.parseObject(cacheResult, new TypeReference<Result<WindowBusinessEntity>>() {
});
} else {
//查询数据库
result = this.dao.getList(query, pageInfo);
this.findAfter(entity, pageInfo, context, result.getList());
if (!ObjectUtils.isEmpty(result.getList())) {
cacheService.set(KEY_SEARCH_WINDOWID_LIST_CACHE + windowIdlist, JSON.toJSONString(result), KEY_SEARCH_TIMEOUTT_CACHE);
}
}
} else {
result = this.dao.getList(query, pageInfo);
this.findAfter(entity, pageInfo, context, result.getList());
}
return result;
}
//Map<Long, WindowHallEntity> windowHallEntityMap = windowHallService.find(new WindowHallQuery(), context).parallelStream().collect(Collectors.toMap(x -> x.getWindowId(), Function.identity())); @Override
protected void findAfter(WindowBusinessEntity entity, PageInfo pageInfo, Context context, List<WindowBusinessEntity> list) throws AppException {
// Map<Long, WindowEntity> collect = windowService.getCacheList().stream().collect(Collectors.toMap(x -> x.getId(), y -> y, (o, n) -> n));
//Map<Long, WindowEntity> collect = windowService.findToMap(new WindowQuery(), context);
Map<Long, WindowHallEntity> windowHallEntityMap = windowHallService.getCacheList().stream().collect(Collectors.toMap(x -> x.getWindowId(), y -> y, (o, n) -> n));
// Map<Long, WindowHallEntity> windowHallEntityMap = windowHallService.find(new WindowHallQuery(), context).parallelStream().collect(Collectors.toMap(x -> x.getWindowId(), Function.identity()));
Iterator iterator = list.iterator(); Iterator iterator = list.iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
WindowBusinessEntity item = (WindowBusinessEntity) iterator.next(); WindowBusinessEntity item = (WindowBusinessEntity) iterator.next();
WindowEntity windowEntity = collect.get(item.getWindowId()); //WindowEntity windowEntity = collect.get(item.getWindowId());
WindowEntity windowEntity = windowService.getCache(item.getWindowId().toString());
if (!ObjectUtils.isEmpty(item.getWindowId()) && !ObjectUtils.isEmpty(windowEntity)) { if (!ObjectUtils.isEmpty(item.getWindowId()) && !ObjectUtils.isEmpty(windowEntity)) {
item.setDeptId(windowEntity.getDeptId()); item.setDeptId(windowEntity.getDeptId());
item.setDeptName(windowEntity.getDeptName()); item.setDeptName(windowEntity.getDeptName());
...@@ -88,37 +168,37 @@ public class WindowBusinessServiceImpl extends AbstractCRUDServiceImpl<WindowBus ...@@ -88,37 +168,37 @@ public class WindowBusinessServiceImpl extends AbstractCRUDServiceImpl<WindowBus
*/ */
@Override @Override
protected void removeBefore(Long[] ids, Context context) throws AppException { protected void removeBefore(Long[] ids, Context context) throws AppException {
Arrays.asList(ids).forEach(id -> { /* Arrays.asList(ids).forEach(id -> {
WindowBusinessEntity windowBusinessEntity = this.get(id, context); WindowBusinessEntity windowBusinessEntity = this.get(id, context);
pushChangeMsg(windowBusinessEntity); pushChangeMsg(windowBusinessEntity);
}); });*/
super.removeBefore(ids, context); super.removeBefore(ids, context);
} }
/** /* *//**
* @param entity * @param entity
* @param context * @param context
* @throws AppException * @throws AppException
*/ *//*
@Override @Override
protected void saveAfter(WindowBusinessEntity entity, Context context) throws AppException { protected void saveAfter(WindowBusinessEntity entity, Context context) throws AppException {
//通知php更新 //通知php更新
pushChangeMsg(entity); pushChangeMsg(entity);
super.saveAfter(entity, context); super.saveAfter(entity, context);
} }*/
/** /* *//**
* @param entity * @param entity
* @param context * @param context
* @throws AppException * @throws AppException
*/ *//*
@Override @Override
protected void updateAfter(WindowBusinessEntity entity, Context context) throws AppException { protected void updateAfter(WindowBusinessEntity entity, Context context) throws AppException {
pushChangeMsg(entity); pushChangeMsg(entity);
super.updateAfter(entity, context); super.updateAfter(entity, context);
} }*/
private void pushChangeMsg(WindowBusinessEntity entity) { private void pushChangeMsg(WindowBusinessEntity entity) {
String phpUrl = GlobalSysInfo.getParamValue(PARAM_SERVER_PHP_HTTP_URL, "http://172.15.28.116:8090"); String phpUrl = GlobalSysInfo.getParamValue(PARAM_SERVER_PHP_HTTP_URL, "http://172.15.28.116:8090");
......
...@@ -10,6 +10,7 @@ import com.mortals.framework.model.PageInfo; ...@@ -10,6 +10,7 @@ import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result; import com.mortals.framework.model.Result;
import com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl;
import com.mortals.framework.util.HttpUtil; import com.mortals.framework.util.HttpUtil;
import com.mortals.framework.util.ThreadPool;
import com.mortals.xhx.common.utils.BeanUtil; import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.business.model.BusinessEntity; import com.mortals.xhx.module.business.model.BusinessEntity;
import com.mortals.xhx.module.business.model.BusinessQuery; import com.mortals.xhx.module.business.model.BusinessQuery;
...@@ -132,7 +133,24 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W ...@@ -132,7 +133,24 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
} }
return windowBusinessEntity; return windowBusinessEntity;
}).filter(f -> f != null).collect(Collectors.toList()); }).filter(f -> f != null).collect(Collectors.toList());
if (!ObjectUtils.isEmpty(windowBusinessEntities)) {
windowBusinessService.save(windowBusinessEntities, context); windowBusinessService.save(windowBusinessEntities, context);
WindowBusinessQuery condition = new WindowBusinessQuery();
condition.setWindowId(windowId);
condition.setSiteBusinessIdList(windowBusinessEntities.stream().map(i -> i.getSiteBusinessId()).collect(Collectors.toList()));
Runnable runnable = new Runnable() {
@Override
public void run() {
pushChangeMsg(condition);
}
};
ThreadPool.getInstance().execute(runnable);
}
//批量推送
} }
/** /**
...@@ -220,25 +238,6 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W ...@@ -220,25 +238,6 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
pushChangeMsg(entity.getId()); pushChangeMsg(entity.getId());
} }
private void pushChangeMsg(Long windowId) {
String phpUrl = GlobalSysInfo.getParamValue(PARAM_SERVER_PHP_HTTP_URL, "http://172.15.28.116:8090");
phpUrl += "/api/window/winNameChange";
HashMap<String, Object> paramsMap = new HashMap<>();
paramsMap.put("windowid", windowId);
paramsMap.put("typeinfo", 1);
phpUrl += "/api/window/winNameChange";
String resp = null;
try {
Map<String, String> header = new HashMap<>();
header.put(HEADER_CONTENT_TYPE, "application/json");
log.info("\n thirdPartyUrl=>{} \n reqbody=>{} ", phpUrl, JSON.toJSONString(paramsMap));
resp = HttpUtil.doPost(phpUrl, header, JSON.toJSONString(paramsMap, SerializerFeature.WriteMapNullValue));
log.info("thirdPartyUrl =>resp:{}", resp);
} catch (Exception e) {
log.error("异常:", e);
}
}
/** /**
...@@ -272,4 +271,46 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W ...@@ -272,4 +271,46 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
} }
return successMsg.toString(); return successMsg.toString();
} }
private void pushChangeMsg(Long windowId) {
String phpUrl = GlobalSysInfo.getParamValue(PARAM_SERVER_PHP_HTTP_URL, "http://127.0.0.1:11078/zwfw_api");
phpUrl += "/api/window/winNameChange";
HashMap<String, Object> paramsMap = new HashMap<>();
paramsMap.put("windowid", windowId);
paramsMap.put("typeinfo", 1);
phpUrl += "/api/window/winNameChange";
String resp = null;
try {
Map<String, String> header = new HashMap<>();
header.put(HEADER_CONTENT_TYPE, "application/json");
log.info("\n thirdPartyUrl=>{} \n reqbody=>{} ", phpUrl, JSON.toJSONString(paramsMap));
resp = HttpUtil.doPost(phpUrl, header, JSON.toJSONString(paramsMap, SerializerFeature.WriteMapNullValue));
log.info("thirdPartyUrl =>resp:{}", resp);
} catch (Exception e) {
log.error("异常:", e);
}
}
private void pushChangeMsg(WindowBusinessQuery entity) {
String phpUrl = GlobalSysInfo.getParamValue(PARAM_SERVER_PHP_HTTP_URL, "http://127.0.0.1:11078/zwfw_api");
phpUrl += "/api/window/winNameChange";
HashMap<String, Object> paramsMap = new HashMap<>();
paramsMap.put("windowid", entity.getWindowId());
paramsMap.put("bussinessid", entity.getSiteBusinessIdList().stream().map(String::valueOf).collect(Collectors.joining(",")));
paramsMap.put("typeinfo", 2);
String resp = null;
try {
Map<String, String> header = new HashMap<>();
header.put(HEADER_CONTENT_TYPE, "application/json");
log.info("\n thirdPartyUrl=>{} \n reqbody=>{} ", phpUrl, JSON.toJSONString(paramsMap));
resp = HttpUtil.doPost(phpUrl, header, JSON.toJSONString(paramsMap, SerializerFeature.WriteMapNullValue));
log.info("thirdPartyUrl =>resp:{}", resp);
} catch (Exception e) {
log.error("异常:", e);
}
}
} }
\ No newline at end of file
...@@ -3,6 +3,8 @@ package com.mortals.xhx.module.window.web; ...@@ -3,6 +3,8 @@ package com.mortals.xhx.module.window.web;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.annotation.UnAuth; import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.common.Rest; import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.util.DataUtil; import com.mortals.framework.util.DataUtil;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.framework.web.BasePhpCRUDJsonMappingController; import com.mortals.framework.web.BasePhpCRUDJsonMappingController;
...@@ -32,7 +34,6 @@ public class WindowBusinessController extends BaseCRUDJsonBodyMappingController< ...@@ -32,7 +34,6 @@ public class WindowBusinessController extends BaseCRUDJsonBodyMappingController<
private ParamService paramService; private ParamService paramService;
public WindowBusinessController() { public WindowBusinessController() {
super.setFormClass(WindowBusinessForm.class);
super.setModuleDesc("窗口业务"); super.setModuleDesc("窗口业务");
} }
......
package com.mortals.xhx.module.window.web;
import com.mortals.framework.web.BaseCRUDFormLong;
import com.mortals.xhx.module.window.model.WindowBusinessEntity;
import com.mortals.xhx.module.window.model.WindowBusinessQuery;
/**
* WindowBusiness
*
* 窗口业务 Form
*
* @author zxfei
* @date 2022-01-12
*/
public class WindowBusinessForm extends BaseCRUDFormLong<WindowBusinessEntity> {
private WindowBusinessEntity entity = new WindowBusinessEntity();
private WindowBusinessQuery query = new WindowBusinessQuery();
public WindowBusinessForm(){
}
@Override
public WindowBusinessEntity getEntity() {
return entity;
}
public void setWindowBusiness(WindowBusinessEntity entity) {
this.entity = entity;
}
@Override
public WindowBusinessQuery getQuery() {
return query;
}
public void setQuery(WindowBusinessQuery query) {
this.query = query;
}
}
\ No newline at end of file
...@@ -57,7 +57,6 @@ public class WindowController extends BaseCRUDJsonBodyMappingController<WindowSe ...@@ -57,7 +57,6 @@ public class WindowController extends BaseCRUDJsonBodyMappingController<WindowSe
public WindowController() { public WindowController() {
super.setFormClass(WindowForm.class);
super.setModuleDesc("站点部门窗口"); super.setModuleDesc("站点部门窗口");
} }
......
package com.mortals.xhx.module.window.web;
import com.mortals.framework.web.BaseCRUDFormLong;
import com.mortals.xhx.module.window.model.WindowEntity;
import com.mortals.xhx.module.window.model.WindowQuery;
/**
* Window
*
* 站点部门窗口 Form
*
* @author zxfei
* @date 2022-01-12
*/
public class WindowForm extends BaseCRUDFormLong<WindowEntity> {
private WindowEntity entity = new WindowEntity();
private WindowQuery query = new WindowQuery();
public WindowForm(){
}
@Override
public WindowEntity getEntity() {
return entity;
}
public void setWindow(WindowEntity entity) {
this.entity = entity;
}
@Override
public WindowQuery getQuery() {
return query;
}
public void setQuery(WindowQuery query) {
this.query = query;
}
}
\ No newline at end of file
...@@ -43,7 +43,6 @@ public class WindowMatterController extends BaseCRUDJsonBodyMappingController<Wi ...@@ -43,7 +43,6 @@ public class WindowMatterController extends BaseCRUDJsonBodyMappingController<Wi
private ParamService paramService; private ParamService paramService;
public WindowMatterController() { public WindowMatterController() {
super.setFormClass(WindowMatterForm.class);
super.setModuleDesc("窗口事项"); super.setModuleDesc("窗口事项");
} }
......
package com.mortals.xhx.module.window.web;
import com.mortals.framework.web.BaseCRUDFormLong;
import com.mortals.xhx.module.window.model.WindowMatterEntity;
import com.mortals.xhx.module.window.model.WindowMatterQuery;
/**
* WindowMatter
*
* 窗口事项 Form
*
* @author zxfei
* @date 2022-01-12
*/
public class WindowMatterForm extends BaseCRUDFormLong<WindowMatterEntity> {
private WindowMatterEntity entity = new WindowMatterEntity();
private WindowMatterQuery query = new WindowMatterQuery();
public WindowMatterForm(){
}
@Override
public WindowMatterEntity getEntity() {
return entity;
}
public void setWindowMatter(WindowMatterEntity entity) {
this.entity = entity;
}
@Override
public WindowMatterQuery getQuery() {
return query;
}
public void setQuery(WindowMatterQuery query) {
this.query = query;
}
}
\ No newline at end of file
...@@ -11,6 +11,7 @@ import com.mortals.framework.util.StringUtils; ...@@ -11,6 +11,7 @@ import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.base.system.upload.service.UploadService; import com.mortals.xhx.base.system.upload.service.UploadService;
import com.mortals.xhx.base.system.user.service.UserService; import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.common.utils.ZipUtils; import com.mortals.xhx.common.utils.ZipUtils;
import com.mortals.xhx.module.area.model.AreaEntity;
import com.mortals.xhx.module.workman.dao.WorkmanDao; import com.mortals.xhx.module.workman.dao.WorkmanDao;
import com.mortals.xhx.module.workman.model.WorkmanEntity; import com.mortals.xhx.module.workman.model.WorkmanEntity;
import com.mortals.xhx.module.workman.model.WorkmanQuery; import com.mortals.xhx.module.workman.model.WorkmanQuery;
...@@ -49,6 +50,11 @@ public class WorkmanServiceImpl extends AbstractCRUDCacheServiceImpl<WorkmanDao, ...@@ -49,6 +50,11 @@ public class WorkmanServiceImpl extends AbstractCRUDCacheServiceImpl<WorkmanDao,
@Autowired @Autowired
private WorkmanService workmanService; private WorkmanService workmanService;
@Override
protected String getExtKey(WorkmanEntity data) {
return data.getLoginName();
}
@Override @Override
protected void saveBefore(WorkmanEntity entity, Context context) throws AppException { protected void saveBefore(WorkmanEntity entity, Context context) throws AppException {
...@@ -97,7 +103,11 @@ public class WorkmanServiceImpl extends AbstractCRUDCacheServiceImpl<WorkmanDao, ...@@ -97,7 +103,11 @@ public class WorkmanServiceImpl extends AbstractCRUDCacheServiceImpl<WorkmanDao,
@Override @Override
public WorkmanEntity doLogin(String loginName, String password, String loginIp) throws AppException { public WorkmanEntity doLogin(String loginName, String password, String loginIp) throws AppException {
WorkmanEntity workmanEntity = this.selectOne(new WorkmanQuery().loginName(loginName));
WorkmanEntity workmanEntity = this.getExtCache(loginName);
if(ObjectUtils.isEmpty(workmanEntity)){
workmanEntity = this.selectOne(new WorkmanQuery().loginName(loginName));
}
if (workmanEntity == null || !workmanEntity.getLoginName().equals(loginName)) { if (workmanEntity == null || !workmanEntity.getLoginName().equals(loginName)) {
throw new AppException("用户名不存在!"); throw new AppException("用户名不存在!");
} }
......
...@@ -3,7 +3,7 @@ spring: ...@@ -3,7 +3,7 @@ spring:
allow-bean-definition-overriding: true allow-bean-definition-overriding: true
application: application:
log: log:
level: @profiles.log.level@ level: info
path: @profiles.log.path@ path: @profiles.log.path@
......
...@@ -37,6 +37,7 @@ spring: ...@@ -37,6 +37,7 @@ spring:
group: ${spring.cloud.nacos.discovery.group} group: ${spring.cloud.nacos.discovery.group}
namespace: ${spring.cloud.nacos.discovery.namespace} # Nacos 命名空间 dev 的编号 namespace: ${spring.cloud.nacos.discovery.namespace} # Nacos 命名空间 dev 的编号
file-extension: yaml file-extension: yaml
druid: druid:
mysql: mysql:
usePingMethod: false usePingMethod: false
...@@ -51,4 +52,19 @@ application: ...@@ -51,4 +52,19 @@ application:
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/* 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/* 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/*
holidayUrl: @profiles.holidayUrl@ holidayUrl: @profiles.holidayUrl@
management:
security:
enabled: false
#prometheus+grafana+springboot2监控集成配置
metrics:
export:
prometheus:
enabled: true
jmx:
enabled: true
endpoints:
web:
exposure:
include: '*'
base-path: /metrics
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
<result property="isList" column="isList" /> <result property="isList" column="isList" />
<result property="fieldOrderNo" column="fieldOrderNo" /> <result property="fieldOrderNo" column="fieldOrderNo" />
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="serviceApi" column="serviceApi" />
<result property="serviceApiParams" column="serviceApiParams" />
<result property="createTime" column="createTime" /> <result property="createTime" column="createTime" />
<result property="createUserId" column="createUserId" /> <result property="createUserId" column="createUserId" />
<result property="updateTime" column="updateTime" /> <result property="updateTime" column="updateTime" />
...@@ -57,7 +59,7 @@ ...@@ -57,7 +59,7 @@
<!-- 子表所有列 --> <!-- 子表所有列 -->
<sql id="_columns_sub"> <sql id="_columns_sub">
<trim suffixOverrides="," suffix=""> <trim suffixOverrides="," suffix="">
b.id,b.datasetId,b.fieldCode,b.fieldName,b.fieldType,b.fieldTypeValue,b.dataType,b.fieldValue,b.defaultValue,b.fieldLen,b.fieldNull,b.isList,b.fieldOrderNo,b.remark,b.createTime,b.createUserId,b.updateTime,b.updateUserId, b.id,b.datasetId,b.fieldCode,b.fieldName,b.fieldType,b.fieldTypeValue,b.dataType,b.fieldValue,b.defaultValue,b.fieldLen,b.fieldNull,b.isList,b.fieldOrderNo,b.remark,b.createTime,b.createUserId,b.updateTime,b.updateUserId,b.serviceApi,b.serviceApiParams,
</trim> </trim>
</sql> </sql>
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
......
...@@ -20,7 +20,7 @@ client.global.set("authToken", JSON.parse(response.body).data.token); ...@@ -20,7 +20,7 @@ client.global.set("authToken", JSON.parse(response.body).data.token);
%} %}
###自助终端应用列表 ###自助终端应用列表
POST {{baseUrl}}/app/list POST http://112.19.80.237:11078/base/app/list
Content-Type: application/json Content-Type: application/json
{ {
......
...@@ -54,7 +54,7 @@ POST {{baseUrl}}/base/area/genSubAreaByAreaName ...@@ -54,7 +54,7 @@ POST {{baseUrl}}/base/area/genSubAreaByAreaName
Content-Type: application/json Content-Type: application/json
{ {
"areaCode": "510900000000" "areaCode": "513232000000"
} }
......
...@@ -9,6 +9,11 @@ ...@@ -9,6 +9,11 @@
"baseUrl": "http://192.168.0.98:11078/base" "baseUrl": "http://192.168.0.98:11078/base"
}, },
"base-yanyuan-test": {
"baseUrl": "http://192.168.0.119:11078/base"
},
"base-test-https": { "base-test-https": {
"baseUrl": "https://192.168.0.98:31071/basics_api/base" "baseUrl": "https://192.168.0.98:31071/basics_api/base"
}, },
...@@ -18,19 +23,16 @@ ...@@ -18,19 +23,16 @@
}, },
"base-test1": { "base-test1": {
"baseUrl": "http://8.136.255.30:11078/base" "baseUrl": "http://8.136.255.30:21026/base"
},
"base-yibintest": {
"baseUrl": "http://192.168.2.169:11078/base"
},
"base-yibin": {
"baseUrl": "http://10.12.185.213:11078/base"
}, },
"base-yibin-web": { "base-yibin-web": {
"baseUrl": "http://112.19.80.237:11078/base" "baseUrl": "http://112.19.80.237:11078/base"
}, },
"base-reg-web": {
"baseUrl": "http://8.136.255.30:1129/base"
},
"base-yibin-web-https": { "base-yibin-web-https": {
"baseUrl": "https://ybswxxcx.zwfwhfgjjfzj.yibin.gov.cn/base" "baseUrl": "https://ybswxxcx.zwfwhfgjjfzj.yibin.gov.cn/base"
}, },
......
...@@ -20,9 +20,12 @@ POST {{baseUrl}}/matter/list ...@@ -20,9 +20,12 @@ POST {{baseUrl}}/matter/list
Content-Type: application/json Content-Type: application/json
{ {
"siteId": 22, "siteId": 1,
"matterName": "%%",
"page": 1, "page": 1,
"size": 2 "size": 10,
"deptCode":"zyl",
"source": ""
} }
###微官网事项列表 ###微官网事项列表
......
...@@ -4,6 +4,8 @@ POST {{baseUrl}}/matter/datum/list ...@@ -4,6 +4,8 @@ POST {{baseUrl}}/matter/datum/list
Content-Type: application/json Content-Type: application/json
{ {
"materialName": "%违法%",
"page":1, "page":1,
"size":10 "size":10
} }
......
###站点业务列表 ###站点业务列表
POST {{baseUrl}}/site/business/list POST {{baseUrl}}/site/business/interlist
Content-Type: application/json Content-Type: application/json
{ {
"idNotList": [11,18,17,14,27,28],
"siteId": 1, "siteId": 22
"page":3,
"size":1
} }
###站点业务列表 ###站点业务列表
......
...@@ -75,8 +75,8 @@ Accept: application/json ...@@ -75,8 +75,8 @@ Accept: application/json
###构建站点树 ###构建站点树
GET {{baseUrl}}/site/siteTree GET {{baseUrl}}/site/siteTree
#Authorization: {{authToken}} Authorization: {{authToken}}
Authorization: eyJhbGciOiJIUzI1NiJ9.eyJsb2dpbl91c2VyX2tleSI6IjIwNjY6MTM1OWYxYTQzZDNkNDljMmJkMDI5YzE5NThiNmFiZDAifQ.OQtNgxm9AH_TOuvAbbabJV0iMIbP3tj9pm6wofFqSis #Authorization: eyJhbGciOiJIUzI1NiJ9.eyJsb2dpbl91c2VyX2tleSI6IjIwNjY6MTM1OWYxYTQzZDNkNDljMmJkMDI5YzE5NThiNmFiZDAifQ.OQtNgxm9AH_TOuvAbbabJV0iMIbP3tj9pm6wofFqSis
Accept: application/json Accept: application/json
...@@ -90,7 +90,7 @@ POST {{baseUrl}}/site/getFlatSitesByAreaCode ...@@ -90,7 +90,7 @@ POST {{baseUrl}}/site/getFlatSitesByAreaCode
Content-Type: application/json Content-Type: application/json
{ {
"areaCode":"511502000000" "siteName": "%高新%"
} }
###根据区域等级获取站点列表 ###根据区域等级获取站点列表
...@@ -98,7 +98,7 @@ POST {{baseUrl}}/site/getAreaSitesByAreaLevel ...@@ -98,7 +98,7 @@ POST {{baseUrl}}/site/getAreaSitesByAreaLevel
Content-Type: application/json Content-Type: application/json
{ {
"siteName":"徐州区办事处" "siteName":"%高新%"
} }
###站点列表 ###站点列表
...@@ -115,7 +115,7 @@ POST {{baseUrl}}/site/syncGovMatterBySiteId ...@@ -115,7 +115,7 @@ POST {{baseUrl}}/site/syncGovMatterBySiteId
Content-Type: application/json Content-Type: application/json
{ {
"id":22 "id":23
} }
......
###站点事项列表 ###站点事项列表
POST {{baseUrl}}/site/matter/list POST {{baseUrl}}/site/matter/interlist
Content-Type: application/json Content-Type: application/json
{ {"size":"12","siteId":"1","page":"1","display":1,"source":0}
"siteId": 22,
"page": 1,
"deptId": 510,
"display": 1,
"source": 0,
"size": 10
}
###站点事项更新与保存 ###站点事项更新与保存
......
...@@ -4,8 +4,8 @@ POST {{baseUrl}}/login/login ...@@ -4,8 +4,8 @@ POST {{baseUrl}}/login/login
Content-Type: application/json Content-Type: application/json
{ {
"loginName":"banana", "loginName":"admin",
"password":"gxjG123!@#", "password":"xhxADMIN8@a",
"securityCode":"admin" "securityCode":"admin"
} }
......
###窗口业务列表 ###窗口业务列表
POST {{baseUrl}}/window/business/list POST {{baseUrl}}/window/business/interlist
Content-Type: application/json Content-Type: application/json
{"windowIdList":["77","78","79","80","81","82","83","84","85","86","87","88","89","90","91","92","93","94","95","96","97","98","99"],"size":-1} {"windowIdList":["77","78","79","80","81","82","83","84","85","86","87","88","89","90","91","92","93","94","95","96","97","98","99"],"size":-1}
###窗口业务列表缓存
POST {{baseUrl}}/window/business/interlist
Content-Type: application/json
{"siteBusinessId":212,"searchCache": 1}
###窗口业务列表缓存2
POST {{baseUrl}}/window/business/interlist
Content-Type: application/json
{"windowId":1,"size":-1}
###窗口业务列表缓存3
POST {{baseUrl}}/window/business/interlist
Content-Type: application/json
{"searchCache": 1,"windowIdList":["78","79","80","81","82","83","84","85","86","87","88","89","90","91","92","93","94","95","96","97","98","99"],"size":-1}
###窗口业务更新与保存 ###窗口业务更新与保存
POST {{baseUrl}}/window/business/save POST {{baseUrl}}/window/business/save
Content-Type: application/json Content-Type: application/json
......
###站点部门窗口列表 ###站点部门窗口列表
POST {{baseUrl}}/window/list POST http://112.19.80.237:11078/base/window/list
Content-Type: application/json Content-Type: application/json
{ {
......
...@@ -9,7 +9,7 @@ Content-Type: application/json ...@@ -9,7 +9,7 @@ Content-Type: application/json
###工作人员列表 ###工作人员列表
POST {{baseUrl}}/workman/list POST {{baseUrl}}/workman/interlist
Content-Type: application/json Content-Type: application/json
{ {
......
...@@ -91,6 +91,18 @@ ...@@ -91,6 +91,18 @@
<version>1.6.12</version> <version>1.6.12</version>
</dependency> </dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-core</artifactId>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
</dependencies> </dependencies>
<build> <build>
......
...@@ -8,7 +8,9 @@ BASEDIR=$( ( ...@@ -8,7 +8,9 @@ BASEDIR=$( (
)) ))
SHELL_LOG="${BASEDIR}/${SHELL_NAME}.log" SHELL_LOG="${BASEDIR}/${SHELL_NAME}.log"
BASE_PATH="/home"
OPT_PATH="/home/usr/local" OPT_PATH="/home/usr/local"
SOFT_PATH="/usr/local"
PUBLISH_PATH="/home/publish" PUBLISH_PATH="/home/publish"
LOCK_FILE="/tmp/deploy.lock" LOCK_FILE="/tmp/deploy.lock"
SERVICE_PATH="/usr/lib/systemd/system" SERVICE_PATH="/usr/lib/systemd/system"
...@@ -23,7 +25,7 @@ LOG_TIME='date "+%H-%M-%S"' ...@@ -23,7 +25,7 @@ LOG_TIME='date "+%H-%M-%S"'
#java #java
JAVA_FILENAME="jdk1.8.tar.gz" JAVA_FILENAME="jdk1.8.tar.gz"
JAVA_ARM_FILENAME="jdk-8u341-linux-aarch64.tar.gz" JAVA_ARM_FILENAME="jdk-8u341-linux-aarch64.tar.gz"
JAVA_HOME="${OPT_PATH}/java/jdk1.8" JAVA_HOME="${SOFT_PATH}/java/jdk1.8"
# nginx # nginx
NGINX="nginx" NGINX="nginx"
...@@ -36,9 +38,9 @@ NGINX_CONF_PATH="/etc/nginx/conf.d" ...@@ -36,9 +38,9 @@ NGINX_CONF_PATH="/etc/nginx/conf.d"
# mysql变量 # mysql变量
MYSQL="mysql" MYSQL="mysql"
MYSQL_CENTOS_FILENAME="mysql-5.7.39-linux-glibc2.12-x86_64.tar.gz" MYSQL_CENTOS_FILENAME="mysql-5.7.39-linux-glibc2.12-x86_64.tar.gz"
MYSQL_EXECPATH="${OPT_PATH}/${MYSQL}" MYSQL_EXECPATH="${SOFT_PATH}/${MYSQL}"
MYSQL_CONF_PATH="/etc/my.cnf" MYSQL_CONF_PATH="/etc/my.cnf"
MYSQL_DATA_PATH="${MYSQL_EXECPATH}/data" MYSQL_DATA_PATH="${BASE_PATH}/${MYSQL}/data"
MYSQL_HOST="127.0.0.1" MYSQL_HOST="127.0.0.1"
MYSQL_PORT="3306" MYSQL_PORT="3306"
MYSQL_USER="root" MYSQL_USER="root"
...@@ -495,8 +497,8 @@ nacos_deploy() { ...@@ -495,8 +497,8 @@ nacos_deploy() {
rm -rf ${NACOS_SERVICE} rm -rf ${NACOS_SERVICE}
rm -rf ${NACOS_EXECPATH} rm -rf ${NACOS_EXECPATH}
mkdir -p ${NACOS_EXECPATH} mkdir -p ${NACOS_EXECPATH}
writelog "tar -zvxf $BASEDIR/release/nacos/${NACOS_FILENAME} -C ${NACOS_EXECPATH} --strip-components 1" writelog "tar -zvxf $BASEDIR/release/nacos/${NACOS_FILENAME} -C ${NACOS_EXECPATH} --strip-components 2"
tar -zvxf $BASEDIR/release/nacos/${NACOS_FILENAME} -C ${NACOS_EXECPATH} --strip-components 1 tar -zvxf $BASEDIR/release/nacos/${NACOS_FILENAME} -C ${NACOS_EXECPATH} --strip-components 2
writelog "${NACOS}_deploy init db..." writelog "${NACOS}_deploy init db..."
writelog " mysql -h${MYSQL_HOST} -P${MYSQL_PORT} -u${MYSQL_USER} -p${MYSQL_PASSWORD} <${NACOS_EXECPATH}/db/nacos.sql" writelog " mysql -h${MYSQL_HOST} -P${MYSQL_PORT} -u${MYSQL_USER} -p${MYSQL_PASSWORD} <${NACOS_EXECPATH}/db/nacos.sql"
mysql -h${MYSQL_HOST} -P${MYSQL_PORT} -u${MYSQL_USER} -p${MYSQL_PASSWORD} <${NACOS_EXECPATH}/db/nacos.sql mysql -h${MYSQL_HOST} -P${MYSQL_PORT} -u${MYSQL_USER} -p${MYSQL_PASSWORD} <${NACOS_EXECPATH}/db/nacos.sql
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
"echarts": "^5.3.3", "echarts": "^5.3.3",
"element-ui": "^2.15.8", "element-ui": "^2.15.8",
"font-awesome": "^4.7.0", "font-awesome": "^4.7.0",
"gsap": "^3.12.2",
"heatmap.js": "^2.0.5", "heatmap.js": "^2.0.5",
"highlight.js": "^11.5.1", "highlight.js": "^11.5.1",
"js-export-excel": "^1.1.4", "js-export-excel": "^1.1.4",
...@@ -28,11 +29,13 @@ ...@@ -28,11 +29,13 @@
"secure-ls": "^1.2.6", "secure-ls": "^1.2.6",
"swiper": "5", "swiper": "5",
"three": "^0.155.0", "three": "^0.155.0",
"v-scale-screen": "1.0.2",
"v-viewer": "^1.6.4", "v-viewer": "^1.6.4",
"vue": "^2.6.14", "vue": "^2.6.14",
"vue-highlightjs": "^1.3.3", "vue-highlightjs": "^1.3.3",
"vue-lazyload": "1.3.3", "vue-lazyload": "1.3.3",
"vue-router": "^3.5.1", "vue-router": "^3.5.1",
"vuedraggable": "^2.24.3",
"vuex": "^3.6.2", "vuex": "^3.6.2",
"vuex-persistedstate": "^4.1.0" "vuex-persistedstate": "^4.1.0"
}, },
...@@ -6434,6 +6437,11 @@ ...@@ -6434,6 +6437,11 @@
"integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
"dev": true "dev": true
}, },
"node_modules/gsap": {
"version": "3.12.2",
"resolved": "https://registry.npmjs.org/gsap/-/gsap-3.12.2.tgz",
"integrity": "sha512-EkYnpG8qHgYBFAwsgsGEqvT1WUidX0tt/ijepx7z8EUJHElykg91RvW1XbkT59T0gZzzszOpjQv7SE41XuIXyQ=="
},
"node_modules/gzip-size": { "node_modules/gzip-size": {
"version": "6.0.0", "version": "6.0.0",
"resolved": "https://registry.npmmirror.com/gzip-size/-/gzip-size-6.0.0.tgz", "resolved": "https://registry.npmmirror.com/gzip-size/-/gzip-size-6.0.0.tgz",
...@@ -10419,6 +10427,11 @@ ...@@ -10419,6 +10427,11 @@
"websocket-driver": "^0.7.4" "websocket-driver": "^0.7.4"
} }
}, },
"node_modules/sortablejs": {
"version": "1.10.2",
"resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.10.2.tgz",
"integrity": "sha512-YkPGufevysvfwn5rfdlGyrGjt7/CRHwvRPogD/lC+TnvcN29jDpCifKP+rBqf+LRldfXSTh+0CGLcSg0VIxq3A=="
},
"node_modules/source-map": { "node_modules/source-map": {
"version": "0.6.1", "version": "0.6.1",
"resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz",
...@@ -11269,6 +11282,17 @@ ...@@ -11269,6 +11282,17 @@
"uuid": "dist/bin/uuid" "uuid": "dist/bin/uuid"
} }
}, },
"node_modules/v-scale-screen": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/v-scale-screen/-/v-scale-screen-1.0.2.tgz",
"integrity": "sha512-qMXPglHIs8KnhzDBdEBLcIoF3q7jgFCTWNIVPD5M0FGBkD+amYjbFUoLdKol/Xylm+pli4AHOZOqwyL6xX62SA==",
"engines": {
"node": ">=12"
},
"peerDependencies": {
"vue": "^2.6.14"
}
},
"node_modules/v-viewer": { "node_modules/v-viewer": {
"version": "1.6.4", "version": "1.6.4",
"resolved": "https://registry.npmmirror.com/v-viewer/-/v-viewer-1.6.4.tgz", "resolved": "https://registry.npmmirror.com/v-viewer/-/v-viewer-1.6.4.tgz",
...@@ -11501,6 +11525,14 @@ ...@@ -11501,6 +11525,14 @@
"integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==", "integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==",
"dev": true "dev": true
}, },
"node_modules/vuedraggable": {
"version": "2.24.3",
"resolved": "https://registry.npmjs.org/vuedraggable/-/vuedraggable-2.24.3.tgz",
"integrity": "sha512-6/HDXi92GzB+Hcs9fC6PAAozK1RLt1ewPTLjK0anTYguXLAeySDmcnqE8IC0xa7shvSzRjQXq3/+dsZ7ETGF3g==",
"dependencies": {
"sortablejs": "1.10.2"
}
},
"node_modules/vuex": { "node_modules/vuex": {
"version": "3.6.2", "version": "3.6.2",
"resolved": "https://registry.npmmirror.com/vuex/-/vuex-3.6.2.tgz", "resolved": "https://registry.npmmirror.com/vuex/-/vuex-3.6.2.tgz",
...@@ -17075,6 +17107,11 @@ ...@@ -17075,6 +17107,11 @@
"integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
"dev": true "dev": true
}, },
"gsap": {
"version": "3.12.2",
"resolved": "https://registry.npmjs.org/gsap/-/gsap-3.12.2.tgz",
"integrity": "sha512-EkYnpG8qHgYBFAwsgsGEqvT1WUidX0tt/ijepx7z8EUJHElykg91RvW1XbkT59T0gZzzszOpjQv7SE41XuIXyQ=="
},
"gzip-size": { "gzip-size": {
"version": "6.0.0", "version": "6.0.0",
"resolved": "https://registry.npmmirror.com/gzip-size/-/gzip-size-6.0.0.tgz", "resolved": "https://registry.npmmirror.com/gzip-size/-/gzip-size-6.0.0.tgz",
...@@ -20039,6 +20076,11 @@ ...@@ -20039,6 +20076,11 @@
"websocket-driver": "^0.7.4" "websocket-driver": "^0.7.4"
} }
}, },
"sortablejs": {
"version": "1.10.2",
"resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.10.2.tgz",
"integrity": "sha512-YkPGufevysvfwn5rfdlGyrGjt7/CRHwvRPogD/lC+TnvcN29jDpCifKP+rBqf+LRldfXSTh+0CGLcSg0VIxq3A=="
},
"source-map": { "source-map": {
"version": "0.6.1", "version": "0.6.1",
"resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz",
...@@ -20645,6 +20687,12 @@ ...@@ -20645,6 +20687,12 @@
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
"dev": true "dev": true
}, },
"v-scale-screen": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/v-scale-screen/-/v-scale-screen-1.0.2.tgz",
"integrity": "sha512-qMXPglHIs8KnhzDBdEBLcIoF3q7jgFCTWNIVPD5M0FGBkD+amYjbFUoLdKol/Xylm+pli4AHOZOqwyL6xX62SA==",
"requires": {}
},
"v-viewer": { "v-viewer": {
"version": "1.6.4", "version": "1.6.4",
"resolved": "https://registry.npmmirror.com/v-viewer/-/v-viewer-1.6.4.tgz", "resolved": "https://registry.npmmirror.com/v-viewer/-/v-viewer-1.6.4.tgz",
...@@ -20835,6 +20883,14 @@ ...@@ -20835,6 +20883,14 @@
"integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==", "integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==",
"dev": true "dev": true
}, },
"vuedraggable": {
"version": "2.24.3",
"resolved": "https://registry.npmjs.org/vuedraggable/-/vuedraggable-2.24.3.tgz",
"integrity": "sha512-6/HDXi92GzB+Hcs9fC6PAAozK1RLt1ewPTLjK0anTYguXLAeySDmcnqE8IC0xa7shvSzRjQXq3/+dsZ7ETGF3g==",
"requires": {
"sortablejs": "1.10.2"
}
},
"vuex": { "vuex": {
"version": "3.6.2", "version": "3.6.2",
"resolved": "https://registry.npmmirror.com/vuex/-/vuex-3.6.2.tgz", "resolved": "https://registry.npmmirror.com/vuex/-/vuex-3.6.2.tgz",
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
"secure-ls": "^1.2.6", "secure-ls": "^1.2.6",
"swiper": "5", "swiper": "5",
"three": "^0.155.0", "three": "^0.155.0",
"v-scale-screen": "1.0.2",
"v-viewer": "^1.6.4", "v-viewer": "^1.6.4",
"vue": "^2.6.14", "vue": "^2.6.14",
"vue-highlightjs": "^1.3.3", "vue-highlightjs": "^1.3.3",
......
...@@ -20,6 +20,9 @@ export function getBumenList(params) { ...@@ -20,6 +20,9 @@ export function getBumenList(params) {
export function getTaskList(params) { export function getTaskList(params) {
return http.get(`${BASEURL}/admin/take/takelist`, params); return http.get(`${BASEURL}/admin/take/takelist`, params);
} }
export function getTakeableList(params) {
return http.get(`${BASEURL}/admin/take/takeablelist`, params);
}
//排队办理记录报表接口 //排队办理记录报表接口
export function getQueueData(params) { export function getQueueData(params) {
return http.post(`${BASEURL}/inter/reportform/quelist`, params); return http.post(`${BASEURL}/inter/reportform/quelist`, params);
......
...@@ -90,7 +90,7 @@ import YSelect from "@/components/YSelect.vue"; ...@@ -90,7 +90,7 @@ import YSelect from "@/components/YSelect.vue";
import YRangePicker from "@/components/YRangePicker.vue"; import YRangePicker from "@/components/YRangePicker.vue";
import storage from "@/utils/js/Storage"; import storage from "@/utils/js/Storage";
import { mapMutations } from "vuex"; import { mapMutations } from "vuex";
import { getDatingList, getBumenList, getTaskList } from "@/api/dataAdmin"; import { getDatingList, getBumenList, getTaskList ,getTakeableList} from "@/api/dataAdmin";
import { debounce } from "lodash"; import { debounce } from "lodash";
const style = [ const style = [
{ {
...@@ -123,6 +123,7 @@ export default { ...@@ -123,6 +123,7 @@ export default {
searchForm: { searchForm: {
id: "", // 排队机id id: "", // 排队机id
style: "", // 状态 style: "", // 状态
device_type:"",//设备类型
time: [ time: [
this.$moment().format("YYYY-MM-DD"), this.$moment().format("YYYY-MM-DD"),
this.$moment().format("YYYY-MM-DD"), this.$moment().format("YYYY-MM-DD"),
...@@ -136,7 +137,7 @@ export default { ...@@ -136,7 +137,7 @@ export default {
created() { created() {
this.getDatingListArr(); this.getDatingListArr();
this.getBumenListArr(); this.getBumenListArr();
this.getTaskList(); this.getTakeableList();
}, },
methods: { methods: {
...mapMutations("search", ["set_searForm", "set_isExport", "reset"]), ...mapMutations("search", ["set_searForm", "set_isExport", "reset"]),
...@@ -163,23 +164,42 @@ export default { ...@@ -163,23 +164,42 @@ export default {
if (res.code == 1) { if (res.code == 1) {
let { data } = res.data; let { data } = res.data;
this.deptList = data; this.deptList = data;
} }
}, },
//获取排号机设备列表 //获取排号机设备列表
async getTaskList() { async getTakeableList() {
let res = await getTaskList({ let res = await getTakeableList({
page: 1, page: 1,
size: -1, size: -1,
}); });
if (res.code == 1) { if (res.code == 1) {
let { data } = res.data; let { data } = res;
this.deviceData = data; this.deviceData = data;
// console.log(this.deviceData)
} }
}, },
// async getTaskList() {
// let res = await getTaskList({
// page: 1,
// size: -1,
// });
// if (res.code == 1) {
// let { data } = res.data;
// this.deviceData = data;
// console.log(this.deviceData)
// }
// },
// 搜索 // 搜索
handleSearch() { handleSearch() {
if(this.searchForm.id){
let device = this.deviceData.filter((i)=>{
return this.searchForm.id == i.id
})
this.searchForm.device_type = device[0].device_type
}
this.set_searForm(this.searchForm); this.set_searForm(this.searchForm);
}, },
......
...@@ -18,6 +18,7 @@ Vue.use(GlobalComponents); ...@@ -18,6 +18,7 @@ Vue.use(GlobalComponents);
import common from "./utils/commin"; import common from "./utils/commin";
Vue.use(common); Vue.use(common);
// 公共样式 // 公共样式
import "@/assets/css/normalize.css"; import "@/assets/css/normalize.css";
import "@/assets/css/reset.css"; import "@/assets/css/reset.css";
......
...@@ -232,8 +232,9 @@ export default { ...@@ -232,8 +232,9 @@ export default {
size: 10, size: 10,
total: 0, total: 0,
searchForm: { searchForm: {
search: "", status: "", // 状态
check_real: "-1", title: "",
sectionid: "", // 部门
time: [ time: [
this.$moment().format("YYYY-MM-DD"), this.$moment().format("YYYY-MM-DD"),
this.$moment().format("YYYY-MM-DD"), this.$moment().format("YYYY-MM-DD"),
......
...@@ -78,11 +78,36 @@ ...@@ -78,11 +78,36 @@
<div class="card"> <div class="card">
<div class="cardTitle">附件</div> <div class="cardTitle">附件</div>
<div class="cardContent" v-if="fromData.url"> <div class="cardContent" v-if="fromData.url">
<template v-for="(item, index) in fromData.url">
<img <img
v-for="(item, index) in fromData.url" v-if="/\.(jpg|jpeg|png|GIF|JPG|PNG)$/.test(item)"
:key="index" :key="index"
:src="process.env.VUE_APP_API_BASE_URL + item" :src="baseUrl + item"
@click="$viewerApi({ images: [baseUrl + item] })"
/> />
<video
width="320"
height="240"
v-if="/\.(mp4|rmvb|avi|)$/.test(item)"
:key="index"
:src="baseUrl + item"
></video>
<audio
controls
v-if="/\.(mp3|wav|)$/.test(item)"
:key="index"
:src="baseUrl + item"
></audio>
<a-button
:href="baseUrl + item"
v-else
:key="index"
type="primary"
>
点击下载
</a-button>
</template>
</div> </div>
<div v-else>--</div> <div v-else>--</div>
</div> </div>
...@@ -273,6 +298,7 @@ export default { ...@@ -273,6 +298,7 @@ export default {
data() { data() {
return { return {
fromData: {}, fromData: {},
baseUrl: process.env.VUE_APP_API_PHP_URL,
}; };
}, },
computed: { computed: {
...@@ -285,6 +311,7 @@ export default { ...@@ -285,6 +311,7 @@ export default {
}, },
}, },
}, },
methods: { methods: {
onClose() { onClose() {
this.Visible = false; this.Visible = false;
......
...@@ -256,6 +256,9 @@ export default { ...@@ -256,6 +256,9 @@ export default {
async getDataList(searchForm) { async getDataList(searchForm) {
let list = []; let list = [];
let listTotal = 0; let listTotal = 0;
this.searchForm.keyword
? ""
: (this.searchForm.keyword = this.searchForm.info);
let res = await getWLLZList({ let res = await getWLLZList({
page: this.current, page: this.current,
size: this.size, size: this.size,
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</div> </div>
</div> </div>
<div slot="footer" class="btn-box"> <div slot="footer" class="btn-box">
<a-button type="primary" @click="checkAnalyse">查看业务分析</a-button> <!-- <a-button type="primary" @click="checkAnalyse">查看业务分析</a-button> -->
</div> </div>
</a-modal> </a-modal>
</div> </div>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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