Commit 9b3bfd33 authored by 廖旭伟's avatar 廖旭伟

Merge remote-tracking branch 'origin/master'

parents 710e0586 f4db9714
<template>
<a-table
:columns="columns"
:data-source="data"
:bordered="bordered"
:defaultExpandAllRows="DefaultExpandAllRows"
:expandRowByClick="ExpandRowByClick"
:showHeader="ShowHeader"
:pagination="Pagination"
:rowKey="rowKey"
@change="handleTableChange"
v-bind="$attrs"
v-on="$listeners"
>
<template
slot-scope="text, record, index"
:slot="slot"
v-for="slot in Object.keys($scopedSlots).filter(
(key) => key !== 'expandedRowRender'
)"
>
<slot :name="slot" v-bind="{ text, record, index }"></slot>
</template>
<template :slot="slot" v-for="slot in Object.keys($slots)">
<slot :name="slot"></slot>
</template>
<template
slot-scope="record, index, indent, expanded"
:slot="$scopedSlots.expandedRowRender ? 'expandedRowRender' : ''"
>
<slot
v-bind="{ record, index, indent, expanded }"
:name="$scopedSlots.expandedRowRender ? 'expandedRowRender' : ''"
></slot>
</template>
</a-table>
</template>
<script>
import { pageSizeOptions } from "@/config/pageConfig.js";
export default {
props: {
columns: {
required: true,
type: Array,
default: () => [],
},
data: {
required: true,
type: Array,
default: () => [],
},
pageSize: {
required: true,
type: Number,
default: 10,
},
page: {
required: true,
type: Number,
default: 1,
},
total: {
required: true,
type: Number,
default: 0,
},
bordered: {
type: Boolean,
default: true,
},
defaultExpandAllRows: {
type: Boolean,
default: false,
},
expandRowByClick: {
type: Boolean,
default: false,
},
showHeader: {
type: Boolean,
default: true,
},
rowKey: {
type: [String, Function],
default: "id",
},
pagination: {
type: Object,
default: () => {},
},
pageSizeOptions: {
type: Array,
default: () => pageSizeOptions,
},
},
data() {
return {};
},
computed: {
Bordered() {
return !!this.bordered;
},
DefaultExpandAllRows() {
return !!this.defaultExpandAllRows;
},
ExpandRowByClick() {
return !!this.expandRowByClick;
},
ShowHeader() {
return !!this.showHeader;
},
PageSize: {
get() {
return this.pageSize;
},
set(value) {
this.$emit("update:pageSize", value);
},
},
Current: {
get() {
return this.page;
},
set(value) {
this.$emit("update:page", value);
},
},
Pagination() {
return {
showTotal: (total) => `共 ${total} 条`,
total: this.total,
current: this.Current,
pageSize: this.pageSize,
showSizeChanger: true,
showQuickJumper: true,
pageSizeOptions: this.pageSizeOptions,
...this.pagination,
};
},
},
methods: {
handleTableChange(pagination, filters, sorter, { currentDataSource }) {
let { current, pageSize } = pagination;
this.Current = current;
this.PageSize = pageSize;
if (this.$listeners.changePagination) {
this.$listeners.changePagination();
}
this.$emit("change", pagination, filters, sorter, { currentDataSource });
},
},
};
</script>
<style lang="less" scoped></style>
<template>
<div class="y-upload">
<a-upload
v-if="listType == 'text' || listType == 'picture'"
:name="name"
:listType="listType"
:multiple="multiple"
:action="action"
:accept="accept"
:beforeUpload="beforeUpload"
:file-list="FileList"
v-bind="$attrs"
v-on="$listeners"
@change="handleChange"
@preview="handlePreview"
>
<slot>
<a-button type="primary"> <a-icon type="upload" />点击上传</a-button>
</slot>
</a-upload>
<a-upload
v-else-if="listType == 'picture-card'"
:name="name"
:listType="listType"
:multiple="multiple"
:action="action"
:accept="accept"
:beforeUpload="beforeUpload"
:file-list="FileList"
v-bind="$attrs"
v-on="$listeners"
@change="handleChange"
@preview="handlePreview"
>
<slot>
<div>
<a-icon type="plus" />
<div class="ant-upload-text">点击上传</div>
</div>
</slot>
</a-upload>
<!-- 视频、音频预览 -->
<div class="modal" v-if="previewVisible">
<video
v-if="previewData.type == 'video'"
:src="previewData.url"
autoplay
muted
controls
></video>
<audio
v-if="previewData.type == 'audio'"
:src="previewData.url"
autoplay
controls
></audio>
<a-icon type="close-circle" @click="previewVisible = false" />
</div>
</div>
</template>
<script>
// import { uploadFile } from "@/services/user";
export default {
model: {
prop: "value",
event: "onChange",
},
components: {},
props: {
name: {
type: String,
default: "file",
},
listType: {
type: String,
default: "text",
},
multiple: {
type: Boolean,
default: false,
},
value: {
type: [String, Array],
default: "",
},
// 文件限制
accept: {
type: String,
default: "",
},
// 上传数量
limit: {
type: Number,
validator: (value) => {
return value >= 0;
},
default: 1, // 0为不限制
},
// 上传文件大小限制mb 0为不限制
MB: {
type: Number,
validator: (value) => {
return value >= 0;
},
default: 10,
},
action: {
type: String,
default: "/base/file/commonupload",
},
},
data() {
return {
FileList: [],
imageType: ["png", "jpg", "jpeg", "gif", "svg"],
videoType: ["mp4", "avi", "wmv", "rmvb", "flv", "mkv"],
audioType: [
"mp3",
"wav",
"amr",
"aac",
"ogg",
"wma",
"flac",
"ape",
"mid",
"m4a",
"m4r",
"m4p",
"m4b",
],
previewData: {
type: "",
url: "",
},
previewVisible: false,
};
},
watch: {
value: {
handler(newValue) {
if (newValue) {
if (Array.isArray(newValue)) {
this.FileList = newValue.map((v) => {
let index = v.lastIndexOf("/");
let name = v.slice(index + 1);
return {
uid: v,
name,
status: "done",
url: v,
};
});
} else {
this.FileList = newValue.split(",").map((v) => {
let index = v.lastIndexOf("/");
let name = v.slice(index + 1);
return {
uid: v,
name,
status: "done",
url: v,
};
});
}
} else {
this.FileList = [];
}
},
deep: true,
immediate: true,
},
},
computed: {},
created() {},
methods: {
customRequest() {
console.log(arguments);
},
handleChange({ file, fileList }) {
this.FileList = [...fileList];
if (file.status == "done" || file.status == "removed") {
if (file.response && file.response.code == -1) {
this.$message.error(file.response.msg);
fileList = fileList.filter((file) => file.response.code != -1);
}
if (this.limit) {
this.FileList = [...fileList].slice(-this.limit);
}
this.FileList = this.FileList.map((v) => {
if (v.response) {
v.url = v.response.url;
}
return v;
});
let value;
if (Array.isArray(this.value)) {
value = this.FileList.map((v) => v.url);
} else {
value = this.FileList.map((v) => v.url).join(",");
}
this.$emit("onChange", value);
this.$emit("onSuccess", { file, fileList });
}
},
beforeUpload(file) {
let isType = true;
let isExceed = true;
return new Promise((resolve) => {
if (this.accept) {
const fileType = this.accept.split(","); // 限制文件类型
let index = file.name.lastIndexOf(".");
let type = file.name.slice(index);
isType = fileType.includes(type);
}
if (!isType) {
let msg = this.accept.replaceAll(",", "或者");
this.$message.error(`请上传${msg}文件!`);
}
if (this.MB) {
isExceed = file.size / 1024 / 1024 <= this.MB;
}
if (!isExceed) {
this.$message.error(`文件大小不能超过${this.MB}MB!`);
}
if (isType && isExceed) {
resolve(file);
}
});
},
// 预览
handlePreview(file) {
let { url } = file;
if (!url) return;
let index = url.lastIndexOf(".");
let type = url.slice(index + 1);
if (this.imageType.includes(type)) {
this.$viewerApi({
images: [url],
});
} else if (this.videoType.includes(type)) {
this.previewData.type = "video";
this.previewData.url = url;
this.previewVisible = true;
} else if (this.audioType.includes(type)) {
this.previewData.type = "audio";
this.previewData.url = url;
this.previewVisible = true;
} else {
let a = document.createElement("a");
a.href = url;
a.download = file.name;
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
}
},
handleDownload(file) {
console.log(file);
},
},
};
</script>
<style lang="less" scoped>
/deep/.ant-upload-picture-card-wrapper {
display: flex;
flex-wrap: wrap;
}
.modal {
width: 100%;
height: 100%;
position: fixed;
left: 0px;
top: 0px;
background: rgba(0, 0, 0, 0.5);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 10px;
z-index: 999;
video {
height: 400px;
}
.anticon-close-circle {
font-size: 36px;
color: #fff;
cursor: pointer;
}
}
</style>
<template> <template>
<div> <div>
<a-checkbox :checked="value" @change="onChange"> <a-checkbox :checked="value" @change="onChange">
{{ checkText }}</a-checkbox <slot></slot>
> </a-checkbox>
</div> </div>
</template> </template>
...@@ -16,10 +16,6 @@ export default { ...@@ -16,10 +16,6 @@ export default {
checked: { checked: {
required: true, required: true,
}, },
checkText: {
required: true,
default: "",
},
}, },
computed: { computed: {
value() { value() {
...@@ -34,5 +30,4 @@ export default { ...@@ -34,5 +30,4 @@ export default {
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped></style>
</style>
\ No newline at end of file
...@@ -88,7 +88,16 @@ ...@@ -88,7 +88,16 @@
<a-input <a-input
v-model="formInfo.leadingOfficialTelephone" v-model="formInfo.leadingOfficialTelephone"
type="text" type="text"
placeholder="请输入负责人电话电话" placeholder="请输入负责人电话"
/>
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="投诉电话" prop="complaintHotline">
<a-input
v-model="formInfo.complaintHotline"
type="text"
placeholder="请输入投诉电话"
/> />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
...@@ -181,19 +190,26 @@ ...@@ -181,19 +190,26 @@
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="中心Logo" prop="logoPath"> <a-form-model-item label="中心Logo" prop="logoPath">
<a-upload <YUpload
:action="api + 'base/file/commonupload'" accept=".png,.jpg,.jpeg,.svg"
list-type="picture-card" :limit="1"
:file-list="fileList" v-model="formInfo.logoPath"
@preview="handlePreview" listType="picture-card"
@change="handleChange" ></YUpload>
:accept="accept" </a-form-model-item>
> </a-col>
<div v-if="fileList.length < 1"> <a-col :span="24">
<a-icon type="plus" /> <a-form-model-item
<div class="ant-upload-text">上传图片</div> class="site-style"
</div> label="站点风貌"
</a-upload> prop="govAffairStyle"
>
<YUpload
accept=".png,.jpg,.jpeg,.svg"
:limit="0"
v-model="formInfo.govAffairStyle"
listType="picture-card"
></YUpload>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
...@@ -237,33 +253,12 @@ ...@@ -237,33 +253,12 @@
</a-row> </a-row>
<a-form-model-item label="工作日"> <a-form-model-item label="工作日">
<y-checkbox <y-checkbox
v-model="formInfo.workday1" v-model="formInfo[key]"
checkText="星期一" v-for="(v, key) in workday"
></y-checkbox> :key="key"
<y-checkbox >
v-model="formInfo.workday2" {{ v }}
checkText="星期二" </y-checkbox>
></y-checkbox>
<y-checkbox
v-model="formInfo.workday3"
checkText="星期三"
></y-checkbox>
<y-checkbox
v-model="formInfo.workday4"
checkText="星期四"
></y-checkbox>
<y-checkbox
v-model="formInfo.workday5"
checkText="星期五"
></y-checkbox>
<y-checkbox
v-model="formInfo.workday6"
checkText="星期六"
></y-checkbox>
<y-checkbox
v-model="formInfo.workday7"
checkText="星期天"
></y-checkbox>
</a-form-model-item> </a-form-model-item>
<a-row> <a-row>
<a-col :span="4"> <a-col :span="4">
...@@ -306,9 +301,19 @@ ...@@ -306,9 +301,19 @@
import { modelList, siteSave } from "@/services/basicsetFun"; import { modelList, siteSave } from "@/services/basicsetFun";
import YCheckbox from "@/components/ycheckbox/YCheckbox.vue"; import YCheckbox from "@/components/ycheckbox/YCheckbox.vue";
import YSwitch from "@/components/yswitch/YSwitch.vue"; import YSwitch from "@/components/yswitch/YSwitch.vue";
import YUpload from "@/components/YUpload.vue";
// import options from "@/utils/city"; // import options from "@/utils/city";
import { regionData } from "element-china-area-data"; import { regionData } from "element-china-area-data";
import { checkPort, checkIp } from "@/utils/validate"; import { checkPort, checkIp } from "@/utils/validate";
const workday = {
workday1: "星期一",
workday2: "星期二",
workday3: "星期三",
workday4: "星期四",
workday5: "星期五",
workday6: "星期六",
workday7: "星期天",
};
export default { export default {
props: { props: {
formVisible: { formVisible: {
...@@ -323,6 +328,7 @@ export default { ...@@ -323,6 +328,7 @@ export default {
components: { components: {
YCheckbox, YCheckbox,
YSwitch, YSwitch,
YUpload,
}, },
data() { data() {
// 验证手机号码 // 验证手机号码
...@@ -336,17 +342,8 @@ export default { ...@@ -336,17 +342,8 @@ export default {
callback(); callback();
} }
}; };
// const changeLandline = (rule, value, callback) => {
// if (!value) {
// callback(new Error("请输入中心座机号"));
// callback();
// } else if (!/^[0][1-9]{2,3}-[0-9]{5,10}$/.test(value)) {
// callback(new Error("格式:区号-电话号码"));
// } else {
// callback();
// }
// };
return { return {
workday,
api: process.env.VUE_APP_API_BASE_URL + "/", api: process.env.VUE_APP_API_BASE_URL + "/",
accept: "image/jpeg,image/png", // 上传类型 accept: "image/jpeg,image/png", // 上传类型
loading: false, loading: false,
...@@ -396,10 +393,11 @@ export default { ...@@ -396,10 +393,11 @@ export default {
onlineTake: 0, // 在线取号 onlineTake: 0, // 在线取号
appointment: 0, // 微预约 appointment: 0, // 微预约
gowMap: 0, // 政务地图 gowMap: 0, // 政务地图
govAffairStyle: "", // 站点风貌
complaintHotline: "", // 投诉电话
}, //表单提交数据 }, //表单提交数据
indeterminate: true, indeterminate: true,
checkAll: false, checkAll: false,
fileList: [],
formRules: { formRules: {
siteName: [ siteName: [
{ {
...@@ -595,14 +593,12 @@ export default { ...@@ -595,14 +593,12 @@ export default {
}, },
//重置 //重置
resetForm() { resetForm() {
this.fileList = [];
this.cityData = []; this.cityData = [];
this.$refs.ruleForm.resetFields(); this.$refs.ruleForm.resetFields();
}, },
// 关闭对话框 // 关闭对话框
closeModal() { closeModal() {
this.fileList = []; this.resetForm();
this.$refs.ruleForm.resetFields();
this.Visible = false; this.Visible = false;
}, },
// 新增 // 新增
...@@ -614,30 +610,43 @@ export default { ...@@ -614,30 +610,43 @@ export default {
// 编辑 // 编辑
onEdit(data) { onEdit(data) {
this.$nextTick(() => { this.$nextTick(() => {
this.formInfo = { ...data }; let {
this.areaInfo.areaID = this.formInfo.areaID; areaID,
this.areaInfo.areaCode = this.formInfo.areaCode; areaCode,
this.areaInfo.areaName = this.formInfo.areaName; areaName,
this.cityData = [ proCode,
this.formInfo.proCode, cityCode,
this.formInfo.cityCode, districtCode,
this.formInfo.districtCode, modelIds,
]; amWorkStartTime,
this.formInfo.modelIds = this.formInfo.modelIds.map(Number); amWorkEndTime,
this.formInfo.amWorkStartTime = String(this.formInfo.amWorkStartTime); pmWorkStartTime,
this.formInfo.amWorkEndTime = String(this.formInfo.amWorkEndTime); pmWorkEndTime,
this.formInfo.pmWorkStartTime = String(this.formInfo.pmWorkStartTime); } = (this.formInfo = data);
this.formInfo.pmWorkEndTime = String(this.formInfo.pmWorkEndTime); this.areaInfo.areaID = areaID;
if (this.formInfo.logoPath) { this.areaInfo.areaCode = areaCode;
this.fileList = [ this.areaInfo.areaName = areaName;
{ this.cityData = [proCode, cityCode, districtCode];
uid: -1, if (modelIds) {
status: "done", this.formInfo.modelIds = modelIds && modelIds.map(Number);
name: this.formInfo.logoPath,
url: this.formInfo.logoPath,
},
];
} }
[
this.formInfo.amWorkStartTime,
this.formInfo.amWorkEndTime,
this.formInfo.pmWorkStartTime,
this.formInfo.pmWorkEndTime,
] = [
amWorkStartTime,
amWorkEndTime,
pmWorkStartTime,
pmWorkEndTime,
].map((v) => {
if (v) {
return String(v);
} else {
return "";
}
});
}); });
}, },
// 保存 // 保存
...@@ -658,68 +667,20 @@ export default { ...@@ -658,68 +667,20 @@ export default {
this.loading = false; this.loading = false;
if (code === 1) { if (code === 1) {
this.$message.success(msg); this.$message.success(msg);
this.fileList = []; this.closeModal();
this.Visible = false;
this.$parent.getSiteList({ areaID: this.areaInfo.areaID }); this.$parent.getSiteList({ areaID: this.areaInfo.areaID });
} }
} }
}); });
}, },
// 上传限制
beforeUpload(file) {
const isJpgOrPng =
file.type === "image/jpeg" || file.type === "image/png";
if (!isJpgOrPng) {
this.$message.error("请上传jpeg或者png图片!");
}
const isLt10M = file.size / 1024 / 1024 < 10;
if (!isLt10M) {
this.$message.error("图片大小不能超过10MB!");
}
return isJpgOrPng && isLt10M;
},
// 上传图片
handleChange({ file, fileList }) {
if (
file.status &&
file.status != "removed" &&
file.response &&
file.response.code == -1
) {
this.$message.error(file.response.msg);
fileList = fileList.filter((file) => file.response.code != -1);
}
this.fileList = [...fileList].slice(-1);
this.fileList = this.fileList.map((v) => {
if (v.response) {
v.url = v.response.url;
}
return v;
});
if (this.fileList[0]) {
this.formInfo.logoPath = this.fileList[0].url;
} else {
this.formInfo.logoPath = "";
}
// if (info.file.status === "uploading") {
// this.loading = true;
// return;
// }
// if (info.file.status === "done") {
// this.formInfo.logoPath = info.file.response.url;
// this.loading = false;
// }
},
// 预览logo // 预览logo
handlePreview(info) { handlePreview(info) {
this.$viewerApi({ this.$viewerApi({
images: [info.url], images: [info.url],
}); });
}, },
// 删除logo
// handleRemove() {
// this.formInfo.logoPath = "";
// },
// 地址 // 地址
oncityChange(val) { oncityChange(val) {
[ [
...@@ -728,6 +689,7 @@ export default { ...@@ -728,6 +689,7 @@ export default {
this.formInfo.districtCode, this.formInfo.districtCode,
] = val; ] = val;
}, },
// 获取详细地址经纬度
getAddress(address) { getAddress(address) {
this.$refs.ruleForm.validateField("detailAddress", (errVal) => { this.$refs.ruleForm.validateField("detailAddress", (errVal) => {
if (errVal !== "中心详细地址不能为空") { if (errVal !== "中心详细地址不能为空") {
......
...@@ -17,14 +17,14 @@ ...@@ -17,14 +17,14 @@
>同步数据</a-button >同步数据</a-button
> >
<a-button <a-button
type="primary"
v-permission="[1]" v-permission="[1]"
type="primary"
@click="editSiteInfo(siteData[0])" @click="editSiteInfo(siteData[0])"
>编辑</a-button >编辑</a-button
> >
<a-button <a-button
type="danger"
v-permission="[1]" v-permission="[1]"
type="danger"
@click="deleteSite(siteData[0].id, 0)" @click="deleteSite(siteData[0].id, 0)"
>删除</a-button >删除</a-button
> >
...@@ -160,27 +160,14 @@ ...@@ -160,27 +160,14 @@
<a-row> <a-row>
<a-col :span="16"> <a-col :span="16">
<span>工作日:</span> <span>工作日:</span>
<span class="work-day" v-if="item.workday1 === 1" <template v-for="(day, i) in workday">
>星期一</span <span
> :key="day"
<span class="work-day" v-if="item.workday2 === 1" class="work-day"
>星期二</span v-if="item[`workday${i + 1}`]"
> >{{ day }}</span
<span class="work-day" v-if="item.workday3 === 1" >
>星期三</span </template>
>
<span class="work-day" v-if="item.workday4 === 1"
>星期四</span
>
<span class="work-day" v-if="item.workday5 === 1"
>星期五</span
>
<span class="work-day" v-if="item.workday6 === 1"
>星期六</span
>
<span class="work-day" v-if="item.workday7 === 1"
>星期天</span
>
</a-col> </a-col>
</a-row> </a-row>
</div> </div>
...@@ -196,7 +183,9 @@ ...@@ -196,7 +183,9 @@
v-for="(v, i) in item.modelData" v-for="(v, i) in item.modelData"
:key="i" :key="i"
> >
<div class="item-text">
{{ v }} {{ v }}
</div>
</div> </div>
</div> </div>
</a-col> </a-col>
...@@ -267,6 +256,15 @@ import { ...@@ -267,6 +256,15 @@ import {
getSiteList, getSiteList,
SyncSiteData, SyncSiteData,
} from "@/services/basicsetFun"; } from "@/services/basicsetFun";
const workday = [
"星期一",
"星期二",
"星期三",
"星期四",
"星期五",
"星期六",
"星期日",
];
export default { export default {
components: { components: {
sitetree, sitetree,
...@@ -277,6 +275,7 @@ export default { ...@@ -277,6 +275,7 @@ export default {
data() { data() {
return { return {
workday,
loading: false, loading: false,
title: "新增站点", title: "新增站点",
formVisible: false, formVisible: false,
...@@ -310,7 +309,7 @@ export default { ...@@ -310,7 +309,7 @@ export default {
if (res.data.code === 1) { if (res.data.code === 1) {
let { data, dict } = res.data.data; let { data, dict } = res.data.data;
data.forEach((v) => { data.forEach((v) => {
v.modelIds = v.modelIds.split(","); v.modelIds = v.modelIds && v.modelIds.split(",");
v.modelData = Object.keys(dict.modelIds) v.modelData = Object.keys(dict.modelIds)
.reduce( .reduce(
(pre, cur) => ( (pre, cur) => (
...@@ -329,10 +328,9 @@ export default { ...@@ -329,10 +328,9 @@ export default {
async getSiteInfo() { async getSiteInfo() {
this.loading = true; this.loading = true;
let res = await siteInfo({ id: this.siteId }); let res = await siteInfo({ id: this.siteId });
this.loading = false;
if (res.data.code === 1) { if (res.data.code === 1) {
let { data, dict } = res.data; let { data, dict } = res.data;
data.modelIds = data.modelIds.split(","); data.modelIds = data.modelIds && data.modelIds.split(",");
data.modelData = Object.keys(dict.modelIds) data.modelData = Object.keys(dict.modelIds)
.reduce( .reduce(
(pre, cur) => ( (pre, cur) => (
...@@ -345,6 +343,7 @@ export default { ...@@ -345,6 +343,7 @@ export default {
}); });
this.siteData = [data]; this.siteData = [data];
} }
this.loading = false;
}, },
// 删除 // 删除
...@@ -378,18 +377,18 @@ export default { ...@@ -378,18 +377,18 @@ export default {
}, },
//查看全部 //查看全部
cookAll(text) { cookAll(text) {
this.allShow = true;
this.details = text; this.details = text;
this.allShow = true;
}, },
//新增站点 //新增站点
addSiteAll() { addSiteAll() {
if (this.areaID) { if (!this.areaID) {
this.title = "新增站点";
this.formVisible = true;
this.$refs.addsite.onAdd();
} else {
this.$message.warning("请先选择区域"); this.$message.warning("请先选择区域");
return;
} }
this.title = "新增站点";
this.formVisible = true;
this.$refs.addsite.onAdd();
}, },
// 切换站点 // 切换站点
changePage(num) { changePage(num) {
...@@ -399,10 +398,11 @@ export default { ...@@ -399,10 +398,11 @@ export default {
this.formVisible = false; this.formVisible = false;
}, },
// 编辑 // 编辑
editSiteInfo(data) { editSiteInfo(row) {
this.title = "编辑站点"; this.title = "编辑站点";
this.formVisible = true; let data = this.$_.cloneDeep(row);
this.$refs.addsite.onEdit(data); this.$refs.addsite.onEdit(data);
this.formVisible = true;
}, },
// 同步数据 // 同步数据
handleSync(id) { handleSync(id) {
...@@ -564,18 +564,24 @@ export default { ...@@ -564,18 +564,24 @@ export default {
.item_box { .item_box {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: 10px;
.item { .item {
width: 140px; width: 140px;
height: 54px; height: 54px;
margin-right: 10px;
margin-bottom: 10px;
padding: 6px; padding: 6px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background-color: #38b6ff; background-color: #38b6ff;
text-align: center;
color: #fff; color: #fff;
border-radius: 5px; border-radius: 5px;
.item-text{
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
} }
} }
} }
......
...@@ -170,6 +170,7 @@ module.exports = { ...@@ -170,6 +170,7 @@ module.exports = {
info: `${BASE_URL}/base/workman/info`, info: `${BASE_URL}/base/workman/info`,
save: `${BASE_URL}/base/workman/save`, save: `${BASE_URL}/base/workman/save`,
delete: `${BASE_URL}/base/workman/delete`, delete: `${BASE_URL}/base/workman/delete`,
logicDelete: `${BASE_URL}/base/workman/logicDelete`,
downloadTemplate: `${BASE_URL}/base/workman/downloadTemplate`, downloadTemplate: `${BASE_URL}/base/workman/downloadTemplate`,
importData: `${BASE_URL}/base/workman/importData`, importData: `${BASE_URL}/base/workman/importData`,
exportExcel: `${BASE_URL}/base/workman/exportExcel`, exportExcel: `${BASE_URL}/base/workman/exportExcel`,
......
...@@ -85,7 +85,7 @@ export async function saveWorkman(data) { ...@@ -85,7 +85,7 @@ export async function saveWorkman(data) {
} }
// 删除工作人员 // 删除工作人员
export async function delWorkman(data) { export async function delWorkman(data) {
return request(workman.delete, METHOD.GET, data); return request(workman.logicDelete, METHOD.GET, data);
} }
// 编辑工作人员 // 编辑工作人员
export async function editWorkman(data) { export async function editWorkman(data) {
......
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>release</id>
<formats>
<format>tar.gz</format>
</formats>
<!-- 需要打包的文件集 -->
<fileSets>
<fileSet>
<directory>${project.parent.basedir}/base-manager-ui/admin/dist</directory>
<includes>
<include>**/*</include>
</includes>
<outputDirectory>/dist</outputDirectory>
</fileSet>
</fileSets>
</assembly>
\ No newline at end of file
...@@ -14,20 +14,18 @@ ...@@ -14,20 +14,18 @@
<fileMode>0755</fileMode> <fileMode>0755</fileMode>
</fileSet> </fileSet>
<fileSet> <fileSet>
<directory>${project.parent.basedir}/dist/${project.parent.artifactId}/boot</directory> <directory>${project.parent.basedir}/dist/${project.parent.artifactId}/boot</directory>
<outputDirectory>boot</outputDirectory> <outputDirectory>boot</outputDirectory>
<fileMode>0755</fileMode> <fileMode>0755</fileMode>
</fileSet> </fileSet>
<!-- <fileSet> <fileSet>
<directory>./db</directory> <directory>./db</directory>
<includes> <includes>
<include>*.sql</include> <include>*.sql</include>
<include>service.exe</include>
<include>service.xml</include>
</includes> </includes>
<outputDirectory>db</outputDirectory> <outputDirectory>db</outputDirectory>
<fileMode>0755</fileMode> <fileMode>0755</fileMode>
</fileSet>--> </fileSet>
</fileSets> </fileSets>
<files> <files>
......
...@@ -12,7 +12,7 @@ INSERT INTO `mortals_xhx_task` VALUES (null, '统计站点部门事项数', 'Sta ...@@ -12,7 +12,7 @@ INSERT INTO `mortals_xhx_task` VALUES (null, '统计站点部门事项数', 'Sta
-- ---------------------------- -- ----------------------------
2023-3-11 -- 2023-3-11
-- ---------------------------- -- ----------------------------
ALTER TABLE mortals_sys_workman ADD COLUMN `operatorId` varchar (128) default "" COMMENT '一体化经办人id' AFTER modelIds; ALTER TABLE mortals_sys_workman ADD COLUMN `operatorId` varchar (128) default "" COMMENT '一体化经办人id' AFTER modelIds;
...@@ -159,7 +159,7 @@ PRIMARY KEY (`id`) ...@@ -159,7 +159,7 @@ PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='设备应用黑名单'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='设备应用黑名单';
-- ---------------------------- -- ----------------------------
2023-5-07 -- 2023-5-07
-- ---------------------------- -- ----------------------------
ALTER TABLE mortals_sys_site ADD COLUMN `onlineTake` tinyint(2) DEFAULT '1' COMMENT '在线取号(0.否,1.是)' AFTER workday7; ALTER TABLE mortals_sys_site ADD COLUMN `onlineTake` tinyint(2) DEFAULT '1' COMMENT '在线取号(0.否,1.是)' AFTER workday7;
ALTER TABLE mortals_sys_site ADD COLUMN `appointment` tinyint(2) DEFAULT '1' COMMENT '在线取号(0.否,1.是)' AFTER onlineTake; ALTER TABLE mortals_sys_site ADD COLUMN `appointment` tinyint(2) DEFAULT '1' COMMENT '在线取号(0.否,1.是)' AFTER onlineTake;
...@@ -167,7 +167,7 @@ ALTER TABLE mortals_sys_site ADD COLUMN `gowMap` tinyint(2) DEFAULT '1' COMM ...@@ -167,7 +167,7 @@ ALTER TABLE mortals_sys_site ADD COLUMN `gowMap` tinyint(2) DEFAULT '1' COMM
-- ---------------------------- -- ----------------------------
2023-6-15 -- 2023-6-15
-- ---------------------------- -- ----------------------------
-- ---------------------------- -- ----------------------------
-- 自助终端应用分类表 -- 自助终端应用分类表
...@@ -189,20 +189,20 @@ PRIMARY KEY (`id`) ...@@ -189,20 +189,20 @@ PRIMARY KEY (`id`)
-- ---------------------------- -- ----------------------------
2023-7-05 -- 2023-7-05
-- ---------------------------- -- ----------------------------
ALTER TABLE mortals_sys_app_category ADD COLUMN `cover` varchar(256) DEFAULT '' COMMENT '封面' AFTER sort; ALTER TABLE mortals_sys_app_category ADD COLUMN `cover` varchar(256) DEFAULT '' COMMENT '封面' AFTER sort;
ALTER TABLE mortals_sys_app_category ADD COLUMN `remark` varchar(256) DEFAULT '' COMMENT '备注' AFTER cover; ALTER TABLE mortals_sys_app_category ADD COLUMN `remark` varchar(256) DEFAULT '' COMMENT '备注' AFTER cover;
-- ---------------------------- -- ----------------------------
2023-08-29 -- 2023-08-29
-- ---------------------------- -- ----------------------------
ALTER TABLE `mortals_sys_model` ADD COLUMN `type` tinyint(2) DEFAULT '1' COMMENT '模块分类' AFTER `sort`; ALTER TABLE `mortals_sys_model` ADD COLUMN `type` tinyint(2) DEFAULT '1' COMMENT '模块分类' AFTER `sort`;
-- ---------------------------- -- ----------------------------
2023-9-11 -- 2023-9-11
-- ---------------------------- -- ----------------------------
ALTER TABLE mortals_sys_app_info_field ADD COLUMN `serviceApi` varchar(255) default '' COMMENT '事件服务接口请求地址'; ALTER TABLE mortals_sys_app_info_field ADD COLUMN `serviceApi` varchar(255) default '' COMMENT '事件服务接口请求地址';
ALTER TABLE mortals_sys_app_info_field ADD COLUMN `serviceApiParams` varchar(1024) default '' COMMENT '事件服务接口请求参数'; ALTER TABLE mortals_sys_app_info_field ADD COLUMN `serviceApiParams` varchar(1024) default '' COMMENT '事件服务接口请求参数';
...@@ -214,14 +214,14 @@ ALTER TABLE mortals_sys_app_info_templete_field ADD COLUMN `serviceApiParams` v ...@@ -214,14 +214,14 @@ ALTER TABLE mortals_sys_app_info_templete_field ADD COLUMN `serviceApiParams` v
-- ---------------------------- -- ----------------------------
2023-10-17 -- 2023-10-17
-- ---------------------------- -- ----------------------------
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 -- 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 `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 `agentName` varchar(64) COMMENT '代办姓名';
...@@ -230,7 +230,7 @@ ALTER TABLE mortals_sys_site_matter ADD COLUMN `agentPost` varchar(64) CO ...@@ -230,7 +230,7 @@ ALTER TABLE mortals_sys_site_matter ADD COLUMN `agentPost` varchar(64) CO
-- ---------------------------- -- ----------------------------
2024-02-29 -- 2024-02-29
-- ---------------------------- -- ----------------------------
UPDATE mortals_sys_skin_base SET imageResolution="1920x1080" WHERE imageResolution="1"; UPDATE mortals_sys_skin_base SET imageResolution="1920x1080" WHERE imageResolution="1";
...@@ -239,7 +239,7 @@ UPDATE mortals_sys_skin_base SET imageResolution="1280x1280" WHERE imageResoluti ...@@ -239,7 +239,7 @@ UPDATE mortals_sys_skin_base SET imageResolution="1280x1280" WHERE imageResoluti
-- ---------------------------- -- ----------------------------
2024-03-08 -- 2024-03-08
-- ---------------------------- -- ----------------------------
ALTER TABLE mortals_sys_site_matter ADD COLUMN `hallCheckIn` tinyint(2) DEFAULT '0' COMMENT '大厅事项入驻(0.否,1.是)' AFTER agentPost; ALTER TABLE mortals_sys_site_matter ADD COLUMN `hallCheckIn` tinyint(2) DEFAULT '0' COMMENT '大厅事项入驻(0.否,1.是)' AFTER agentPost;
...@@ -253,3 +253,32 @@ INSERT INTO mortals_xhx_task VALUES (null, '同步全部站点事项材料附件 ...@@ -253,3 +253,32 @@ INSERT INTO mortals_xhx_task VALUES (null, '同步全部站点事项材料附件
-- 2024-07-20 -- 2024-07-20
-- ---------------------------- -- ----------------------------
INSERT INTO `mortals_sys_base_area`(`id`, `ancestors`, `name`, `iid`, `pid`, `haveSonArea`, `haveSonDept`, `haveGetDept`, `haveGetMatterList`, `areaCode`, `areaLevel`, `shortName`, `domain`, `status`, `createTime`, `createUserId`, `updateTime`) VALUES (null, '', '巴中经济开发区', 'f190133f82dd46f0ae2e2116a8b9b13b', '60a505e9dfa643e9826902e0810de55f', 'false', 'True', 'false', 'false', '511971000000', 3, '巴中经济开发区', 'bzsbzq.sczwfw.gov.cn', 1, '2021-07-19 11:59:30', NULL, NULL); INSERT INTO `mortals_sys_base_area`(`id`, `ancestors`, `name`, `iid`, `pid`, `haveSonArea`, `haveSonDept`, `haveGetDept`, `haveGetMatterList`, `areaCode`, `areaLevel`, `shortName`, `domain`, `status`, `createTime`, `createUserId`, `updateTime`) VALUES (null, '', '巴中经济开发区', 'f190133f82dd46f0ae2e2116a8b9b13b', '60a505e9dfa643e9826902e0810de55f', 'false', 'True', 'false', 'false', '511971000000', 3, '巴中经济开发区', 'bzsbzq.sczwfw.gov.cn', 1, '2021-07-19 11:59:30', NULL, NULL);
-- ----------------------------
-- 2024-11-20 索引添加
-- ----------------------------
CREATE INDEX idx_matterId ON mortals_sys_matter_accept (matterId);
CREATE INDEX idx_matterId ON mortals_sys_matter_datum (matterId);
CREATE INDEX idx_matterId ON mortals_sys_matter_charges (matterId);
CREATE INDEX idx_matterId ON mortals_sys_matter_flowlimit (matterId);
CREATE INDEX idx_matterId ON mortals_sys_matter_intermediary (matterId);
CREATE INDEX idx_matterId ON mortals_sys_matter_question (matterId);
CREATE INDEX idx_matterId ON mortals_sys_matter_setbase (matterId);
CREATE INDEX idx_datumId ON mortals_sys_matter_datum_file (datumId);
-- ----------------------------
-- 2024-12-4 站点风貌添加
-- ----------------------------
ALTER TABLE mortals_sys_site ADD COLUMN `govAffairStyle` varchar(1024) COMMENT '政务风貌,多个逗号分割' AFTER modelIds;
ALTER TABLE mortals_sys_site ADD COLUMN `complaintHotline` varchar(64) COMMENT '投诉电话' AFTER govAffairStyle;
-- ----------------------------
-- 2024-12-5
-- ----------------------------
ALTER TABLE mortals_sys_workman ADD COLUMN `deleted` tinyint(2) DEFAULT '0' COMMENT '是否删除(0.否,1.是)' AFTER modelIds;
This diff is collapsed.
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
<id>product</id> <id>product</id>
<properties> <properties>
<profiles.active>product</profiles.active> <profiles.active>product</profiles.active>
<profiles.server.debug>-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5513</profiles.server.debug>
<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>
</properties> </properties>
</profile> </profile>
...@@ -101,8 +102,6 @@ ...@@ -101,8 +102,6 @@
<properties> <properties>
<profiles.active>yanyuan</profiles.active> <profiles.active>yanyuan</profiles.active>
<profiles.nacos.server-addr>172.16.30.245:8848</profiles.nacos.server-addr> <profiles.nacos.server-addr>172.16.30.245:8848</profiles.nacos.server-addr>
<profiles.trustedReferer>127.0.0.1,localhost,10.233.82.175,172.16.30.245,172.16.30.246,172.16.30.247,172.16.30.248</profiles.trustedReferer>
<profiles.req.json.check>true</profiles.req.json.check>
</properties> </properties>
</profile> </profile>
...@@ -315,51 +314,9 @@ ...@@ -315,51 +314,9 @@
</executions> </executions>
</plugin> </plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<configuration>
<skip>${skipUi}</skip>
</configuration>
<executions>
<execution>
<id>exec-npm-install</id>
<phase>generate-resources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>yarn</executable>
<arguments>
<argument></argument>
</arguments>
<workingDirectory>${project.parent.basedir}/base-manager-ui/admin</workingDirectory>
</configuration>
</execution>
<execution>
<id>exec-npm-run-build</id>
<phase>generate-resources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>yarn</executable>
<arguments>
<argument>run</argument>
<arguments>${package.environment}</arguments>
</arguments>
<workingDirectory>${project.parent.basedir}/base-manager-ui/admin</workingDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin> <plugin>
<artifactId>maven-assembly-plugin</artifactId> <artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version> <version>3.3.0</version>
<executions> <executions>
<execution> <execution>
<id>make-assembly</id> <id>make-assembly</id>
...@@ -376,22 +333,6 @@ ...@@ -376,22 +333,6 @@
<outputDirectory>${project.parent.basedir}/dist/${project.artifactId}</outputDirectory> <outputDirectory>${project.parent.basedir}/dist/${project.artifactId}</outputDirectory>
</configuration> </configuration>
</execution> </execution>
<execution>
<id>make-assembly-ui</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<skipAssembly>${skipUi}</skipAssembly>
<finalName>${project.artifactId}-ui</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>./assembly/assembly-manager-ui.xml</descriptor>
</descriptors>
<outputDirectory>${project.parent.basedir}/dist/${project.artifactId}</outputDirectory>
</configuration>
</execution>
</executions> </executions>
</plugin> </plugin>
</plugins> </plugins>
......
#!/bin/sh
RETVAL=$?
SHELL_NAME="deploy"
BASEDIR=$(dirname $0)
BASEDIR=$( (
cd "$BASEDIR"
pwd
))
LOCK_FILE="/tmp/deploy.lock"
# 时间变量
CDATE=$(date "+%Y-%m-%d")
CTIME=$(date "+%H:%M:%S")
SHELL_LOG="${BASEDIR}/${SHELL_NAME}.log"
JAVA_HOME="/usr/local/java/jdk1.8"
SERVICE_PATH="/usr/lib/systemd/system"
PUBLISH_PATH="/home/publish"
PROJECT_NAME="@project.artifactId@"
PROJECT_EXECPATH="${PUBLISH_PATH}/${PROJECT_NAME}"
PROJECT_FILENAME="${PROJECT_NAME}.tar.gz"
PROJECT_SERVICE="${SERVICE_PATH}/${PROJECT_NAME}.service"
#写日志
writelog() {
LOGINFO=$1
echo "${CDATE} ${CTIME}: ${SHELL_NAME} : ${LOGINFO}" >>${SHELL_LOG}
echo ${LOGINFO}
}
#清理目标
clear_deploy() {
SERVICE=$1
EXECPATH=$2
#清理后台自启服务
rm -f ${SERVICE}
#清理执行文件目录
}
build_service() {
SERVICE=$1
EXECPATH=$2
echo "" >${SERVICE}
echo "[Unit]" >>${SERVICE}
echo "Description=${PROJECT_NAME}" >>${SERVICE}
echo "After=network.target" >>${SERVICE}
echo "" >>${SERVICE}
echo "[Service]" >>${SERVICE}
echo "Environment=\"JAVA_HOME=$JAVA_HOME\"" >>${SERVICE}
echo "Type=forking" >>${SERVICE}
echo "ExecStartPre=-/bin/sleep 5s" >>${SERVICE}
echo "ExecStart=${EXECPATH}/bin/start.sh" >>${SERVICE}
echo "ExecStop=${EXECPATH}/bin/shutdown.sh" >>${SERVICE}
echo "PrivateTmp=true" >>${SERVICE}
echo "" >>${SERVICE}
echo "[Install]" >>${SERVICE}
echo "WantedBy=multi-user.target" >>${SERVICE}
writelog "${PROJECT_NAME}服务创建完成!"
}
#启动服务与nginx
start_service() {
systemctl enable ${PROJECT_NAME}
systemctl daemon-reload
writelog "${PROJECT_NAME}服务启动..."
systemctl stop ${PROJECT_NAME}&&systemctl start ${PROJECT_NAME}
project_status=$(systemctl status "${PROJECT_NAME}"|grep Active |awk '{print $2}')
jcpid=$(ps -ef | grep -v "grep" | grep "${PROJECT_NAME} " | awk '{print $2}')
writelog "${PROJECT_NAME}服务启动,PID is ${jcpid} ,status:${project_status}"
}
#部署后台服务
project_deploy() {
writelog "${PROJECT_NAME}_deploy"
clear_deploy ${PROJECT_SERVICE} ${PROJECT_EXECPATH}
writelog "${PROJECT_NAME}_clear_finish"
tar -zvxf ./${PROJECT_FILENAME} -C ${PUBLISH_PATH}
build_service ${PROJECT_SERVICE} ${PROJECT_EXECPATH}
start_service
writelog "${PROJECT_NAME}_deploy_finish"
}
#主函数
main() {
echo "后台服务部署"
project_deploy
exit ${RETVAL}
}
main $1
...@@ -61,11 +61,9 @@ public class AuthUserInterceptor extends BaseInterceptor { ...@@ -61,11 +61,9 @@ public class AuthUserInterceptor extends BaseInterceptor {
@Override @Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
throws Exception { throws Exception {
//response.setContentType("application/json");
String referer = request.getHeader("Referer"); String referer = request.getHeader("Referer");
RedisTemplate<String, String> redisTemplate = cacheService.selectDbRedisTemplate(portalDb); RedisTemplate<String, String> redisTemplate = cacheService.selectDbRedisTemplate(portalDb);
String trustedReferer =redisTemplate.opsForValue().get(RedisKey.KEY_REFERERS_CACHE); String trustedReferer =redisTemplate.opsForValue().get(RedisKey.KEY_REFERERS_CACHE);
// String referer = cacheService.get(RedisKey.KEY_REFERERS_CACHE);
if (!ObjectUtils.isEmpty(referer)) { if (!ObjectUtils.isEmpty(referer)) {
//校验host即可 //校验host即可
URI host = URLUtil.getHost(new URL(referer)); URI host = URLUtil.getHost(new URL(referer));
...@@ -79,20 +77,6 @@ public class AuthUserInterceptor extends BaseInterceptor { ...@@ -79,20 +77,6 @@ public class AuthUserInterceptor extends BaseInterceptor {
} }
} }
} }
HttpServletResponse httpResponse = response;
Cookie[] cookies = request.getCookies();
if (cookies != null) {
for (Cookie cookie : cookies) {
cookie.setHttpOnly(true);
cookie.setSecure(true);
cookie.setPath("/");
cookie.setMaxAge(3600);
httpResponse.addCookie(cookie);
}
}
if (handler instanceof HandlerMethod) { if (handler instanceof HandlerMethod) {
HandlerMethod handlerMethod = (HandlerMethod) handler; HandlerMethod handlerMethod = (HandlerMethod) handler;
Method method = handlerMethod.getMethod(); Method method = handlerMethod.getMethod();
......
...@@ -62,24 +62,5 @@ public class OperLogController extends BaseCRUDJsonBodyMappingController<OperLog ...@@ -62,24 +62,5 @@ public class OperLogController extends BaseCRUDJsonBodyMappingController<OperLog
}); });
} }
/* @Override
protected void init(HttpServletRequest request, HttpServletResponse response, OperLogForm form,
Map<String, Object> model, Context context) {
Map<String, Object> status = new HashMap<String, Object>(1);
// 返回日志类型
status.put("operType", OperTypeEnum.getEnumMap());
model.put(KEY_RESULT_DICT, status);
super.init(request, response, form, model, context);
}
@Override
protected void doListBefore(HttpServletRequest request, HttpServletResponse response, OperLogForm form, Map<String, Object> model, Context context) throws AppException {
form.getQuery().setOrderColList(new ArrayList<OrderCol>() {
{
add(new OrderCol("a.logDate", "desc"));
}
});
}*/
} }
\ No newline at end of file
...@@ -3,7 +3,10 @@ package com.mortals.xhx.base.system.upload.web; ...@@ -3,7 +3,10 @@ package com.mortals.xhx.base.system.upload.web;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.framework.web.BaseController; import com.mortals.framework.web.BaseController;
import com.mortals.xhx.base.system.resource.model.ResourceEntity;
import com.mortals.xhx.base.system.resource.service.ResourceService;
import com.mortals.xhx.base.system.upload.service.UploadService; import com.mortals.xhx.base.system.upload.service.UploadService;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
...@@ -23,10 +26,18 @@ import java.util.Map; ...@@ -23,10 +26,18 @@ import java.util.Map;
@RestController @RestController
@RequestMapping("file") @RequestMapping("file")
public class UploadController extends BaseController { public class UploadController extends BaseController {
protected String moduleDesc = "";
@Resource @Resource
private UploadService uploadService; private UploadService uploadService;
public UploadController() {
this.setModuleDesc("资源信息");
}
public void setModuleDesc(String moduleDesc) {
this.moduleDesc = moduleDesc;
}
@RequestMapping(value = "upload") @RequestMapping(value = "upload")
public String doFileUpload(HttpServletRequest request, UploadForm form) { public String doFileUpload(HttpServletRequest request, UploadForm form) {
Map<String, Object> model = new HashMap<>(); Map<String, Object> model = new HashMap<>();
...@@ -52,7 +63,7 @@ public class UploadController extends BaseController { ...@@ -52,7 +63,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 {
...@@ -97,7 +108,7 @@ public class UploadController extends BaseController { ...@@ -97,7 +108,7 @@ public class UploadController extends BaseController {
* @param fileName 文件名称 * @param fileName 文件名称
*/ */
@GetMapping("preview/{fileName}") @GetMapping("preview/{fileName}")
public void preView(@PathVariable(value="fileName") String fileName, HttpServletResponse response) { public void preView(@PathVariable(value = "fileName") String fileName, HttpServletResponse response) {
try { try {
uploadService.preview(fileName, response); uploadService.preview(fileName, response);
} catch (Exception e) { } catch (Exception e) {
...@@ -111,7 +122,7 @@ public class UploadController extends BaseController { ...@@ -111,7 +122,7 @@ public class UploadController extends BaseController {
* @param fileName 文件名称 * @param fileName 文件名称
*/ */
@GetMapping("fileupload/{fileName}") @GetMapping("fileupload/{fileName}")
public void fileupload(@PathVariable(value="fileName") String fileName, HttpServletResponse response) { public void fileupload(@PathVariable(value = "fileName") String fileName, HttpServletResponse response) {
try { try {
uploadService.uploadDownload(fileName, response); uploadService.uploadDownload(fileName, response);
} catch (Exception e) { } catch (Exception e) {
......
...@@ -395,23 +395,6 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE ...@@ -395,23 +395,6 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE
siteService.updateAllSiteTree(null); siteService.updateAllSiteTree(null);
/* //单独更新全站点
UserEntity userEntity = new UserEntity();
userEntity.initAttrValue();
userEntity.setId(0L);
Context contextTemp = new Context();
contextTemp.setUser(userEntity);
SyncTreeSiteThread syncTreeSiteThread = new SyncTreeSiteThread(contextTemp);
ThreadPool.getInstance().execute(syncTreeSiteThread);
userEntity = new UserEntity();
userEntity.initAttrValue();
userEntity.setId(1L);
contextTemp = new Context();
contextTemp.setUser(userEntity);
syncTreeSiteThread = new SyncTreeSiteThread(contextTemp);
ThreadPool.getInstance().execute(syncTreeSiteThread);
*/
} }
...@@ -429,7 +412,7 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE ...@@ -429,7 +412,7 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE
List<UserEntity> newUserList = userPduList.stream().map(newUser -> { List<UserEntity> newUserList = userPduList.stream().map(newUser -> {
UserEntity userEntity = new UserEntity(); UserEntity userEntity = new UserEntity();
userEntity.initAttrValue(); userEntity.initAttrValue();
BeanUtils.copyProperties(newUser, userEntity, new String[]{ "lastLoginTime", "lastLoginAddress"}); BeanUtils.copyProperties(newUser, userEntity, new String[]{"lastLoginTime", "lastLoginAddress"});
return userEntity; return userEntity;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
...@@ -497,8 +480,8 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE ...@@ -497,8 +480,8 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE
System.out.println(SecurityUtil.md5DoubleEncoding("xhxADMIN8@a")); System.out.println(SecurityUtil.md5DoubleEncoding("xhxADMIN8@a"));
// System.out.println(SecurityUtil.md5DoubleEncoding("123")); // System.out.println(SecurityUtil.md5DoubleEncoding("123"));
// System.out.println(SecurityUtil.md5DoubleEncoding("Qt123456@")); // System.out.println(SecurityUtil.md5DoubleEncoding("Qt123456@"));
/* /*
//宜宾一体化账号密码 //宜宾一体化账号密码
......
...@@ -81,10 +81,28 @@ public class MatterDetailHtmlParseUtil { ...@@ -81,10 +81,28 @@ public class MatterDetailHtmlParseUtil {
String blankSampleExp = "//div[@id=\"zhezhao\"]//div[@class='zhezhao4']"; String blankSampleExp = "//div[@id=\"zhezhao\"]//div[@class='zhezhao4']";
String sampleExp = "//div[@id=\"zhezhao\"]//div[@class='zhezhao2']"; String sampleExp = "//div[@id=\"zhezhao\"]//div[@class='zhezhao2']";
String baseInfoExp = "//div[@id=\"zhezhao\"]//div[@class='zhezhao3']"; String baseInfoExp = "//div[@id=\"zhezhao\"]//div[@class='zhezhao3']";
String baseInfoTableNameExp = "//*[@id=\"material\"]//tr//td[2]/span[1]";
// String baseInfoTableNameExp = "//*[@id=\"material\"]//tr/td[2]/span[1]";
String baseInfoTableMustExp = "//*[@id=\"material\"]//tr/td[3]/span[1]";
try { try {
Elements baseInfoTableNameElements = dom.selectXpath(baseInfoTableNameExp);
Elements baseInfoTableMustElements = dom.selectXpath(baseInfoTableMustExp);
int size = baseInfoTableNameElements.size();
int size1 = baseInfoTableMustElements.size();
Map<String, String> nameMustMap = new HashMap<>();
if (size == size1) {
for (int i = 0; i < size; i++) {
Element element = baseInfoTableNameElements.get(i);
Element element1 = baseInfoTableMustElements.get(i);
if (!ObjectUtils.isEmpty(element)&&!ObjectUtils.isEmpty(element1)) {
nameMustMap.put(element.text(), element1.text());
}
}
}
Elements elements = dom.selectXpath(blankSampleExp); Elements elements = dom.selectXpath(blankSampleExp);
int rowNum = elements.size(); int rowNum = elements.size();
for (int i = 1; i <= rowNum; i++) { for (int i = 1; i <= rowNum; i++) {
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
List<MatterDatumFileEntity> datumFileEntities = new ArrayList<>(); List<MatterDatumFileEntity> datumFileEntities = new ArrayList<>();
...@@ -111,20 +129,8 @@ public class MatterDetailHtmlParseUtil { ...@@ -111,20 +129,8 @@ public class MatterDetailHtmlParseUtil {
List<String> allGroup = ReUtil.findAllGroup1("'(.*?)'", onclickStr); List<String> allGroup = ReUtil.findAllGroup1("'(.*?)'", onclickStr);
if (!ObjectUtils.isEmpty(allGroup)) { if (!ObjectUtils.isEmpty(allGroup)) {
/* String encryUrl = "http://www.sczwfw.gov.cn/jiq/interface/item/annex/encryptUrl?id=" + allGroup.get(0);
String resp = HttpUtil.get(encryUrl);
JSONObject obj = JSON.parseObject(resp);
String code = obj.getString("code");
String data = obj.getString("data");
if ("0".equals(code)) {
fileEntity.setFileUrl(data);
fileEntity.setLocalFileUrl(data);
}*/
fileEntity.setFileUrl(allGroup.get(0)); fileEntity.setFileUrl(allGroup.get(0));
} }
// fileEntity.setFileUrl(node.firstChild().attr("href").trim());
datumFileEntities.add(fileEntity); datumFileEntities.add(fileEntity);
} }
} }
...@@ -151,25 +157,13 @@ public class MatterDetailHtmlParseUtil { ...@@ -151,25 +157,13 @@ public class MatterDetailHtmlParseUtil {
List<String> allGroup = ReUtil.findAllGroup1("'(.*?)'", onclickStr); List<String> allGroup = ReUtil.findAllGroup1("'(.*?)'", onclickStr);
if (!ObjectUtils.isEmpty(allGroup)) { if (!ObjectUtils.isEmpty(allGroup)) {
/* String encryUrl = "http://www.sczwfw.gov.cn/jiq/interface/item/annex/encryptUrl?id=" + allGroup.get(0);
String resp = HttpUtil.get(encryUrl);
JSONObject obj = JSON.parseObject(resp);
String code = obj.getString("code");
String data = obj.getString("data");
if ("0".equals(code)) {
fileEntity.setFileUrl(data);
fileEntity.setLocalFileUrl(data);
}*/
fileEntity.setFileUrl(allGroup.get(0)); fileEntity.setFileUrl(allGroup.get(0));
} }
// fileEntity.setFileUrl(node.firstChild().attr("href").trim());
datumSampleFileEntities.add(fileEntity); datumSampleFileEntities.add(fileEntity);
} }
map.put("sampleList", datumSampleFileEntities); map.put("sampleList", datumSampleFileEntities);
} }
//查询基本信息 //查询基本信息
String tempxPath2 = baseInfoExp + String.format("[%d]//table//tr//td", i); String tempxPath2 = baseInfoExp + String.format("[%d]//table//tr//td", i);
Elements baseinfoList = dom.selectXpath(tempxPath2); Elements baseinfoList = dom.selectXpath(tempxPath2);
...@@ -184,6 +178,11 @@ public class MatterDetailHtmlParseUtil { ...@@ -184,6 +178,11 @@ public class MatterDetailHtmlParseUtil {
baseInfoMap.put(prenode.text().trim(), node.text().trim()); baseInfoMap.put(prenode.text().trim(), node.text().trim());
} }
} }
String name = baseInfoMap.get("材料名称");
String must = nameMustMap.get(name);
if(!ObjectUtils.isEmpty(must)){
baseInfoMap.put("材料必要性", must);
}
map.put("baseinfo", baseInfoMap); map.put("baseinfo", baseInfoMap);
mapList.add(map); mapList.add(map);
} }
...@@ -441,7 +440,8 @@ public class MatterDetailHtmlParseUtil { ...@@ -441,7 +440,8 @@ public class MatterDetailHtmlParseUtil {
// String url = "http://www.sczwfw.gov.cn/jiq/front/transition/ywTransToDetail?areaCode=511500000000&itemCode=511A0151400000-511500000000-000-511501-7-1-00&taskType=1&deptCode=511501-7"; // String url = "http://www.sczwfw.gov.cn/jiq/front/transition/ywTransToDetail?areaCode=511500000000&itemCode=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 = "http://www.sczwfw.gov.cn/jiq/front/transition/ywTransToDetail?areaCode=511500000000&itemCode=512036008003-511500000000-000-11511200MB1503849K-1-00&taskType=20&deptCode=3907787168696946688"; // String url = "http://www.sczwfw.gov.cn/jiq/front/transition/ywTransToDetail?areaCode=511500000000&itemCode=512036008003-511500000000-000-11511200MB1503849K-1-00&taskType=20&deptCode=3907787168696946688";
String url = "https://www.sczwfw.gov.cn/jiq/front/transition/ywTransToDetail?areaCode=511500000000&itemCode=511A0101600004-511500000000-000-11511200008702584B-1-00&taskType=1&deptCode=511501-7"; //String url = "https://www.sczwfw.gov.cn/jiq/front/transition/ywTransToDetail?areaCode=511500000000&itemCode=511A0101600004-511500000000-000-11511200008702584B-1-00&taskType=1&deptCode=511501-7";
String url = "http://www.sczwfw.gov.cn/jiq/front/transition/ywTransToDetail?areaCode=511500000000&itemCode=511A0358400001-511500000000-000-11511200MB1666138E-1-00&taskType=1&deptCode=11511200008702664Y";
Document dom = MatterDetailHtmlParseUtil.getDomByHtml(url); Document dom = MatterDetailHtmlParseUtil.getDomByHtml(url);
Map<String, String> baseInfoMap = MatterDetailHtmlParseUtil.getbaseInfoMapByHtml(dom); Map<String, String> baseInfoMap = MatterDetailHtmlParseUtil.getbaseInfoMapByHtml(dom);
......
...@@ -9,7 +9,10 @@ import com.mortals.framework.common.Rest; ...@@ -9,7 +9,10 @@ import com.mortals.framework.common.Rest;
import com.mortals.framework.util.DataUtil; import com.mortals.framework.util.DataUtil;
import com.mortals.xhx.common.code.SourceEnum; import com.mortals.xhx.common.code.SourceEnum;
import com.mortals.xhx.common.code.YesNoEnum; import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.module.dept.model.DeptEntity;
import com.mortals.xhx.module.dept.service.DeptService;
import com.mortals.xhx.module.matter.model.MatterEntity; import com.mortals.xhx.module.matter.model.MatterEntity;
import com.mortals.xhx.utils.SpringUtils;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.jsoup.Jsoup; import org.jsoup.Jsoup;
import org.jsoup.nodes.Document; import org.jsoup.nodes.Document;
...@@ -126,7 +129,7 @@ public class MatterHtmlParseUtil { ...@@ -126,7 +129,7 @@ public class MatterHtmlParseUtil {
log.info("error href ,title:" + title); log.info("error href ,title:" + title);
} }
buildMatter(matterEntityList, title, href, evaluationUrl, netApplyUrl); buildMatter(matterEntityList, title, href, evaluationUrl, netApplyUrl,params);
} }
elements = dom.selectXpath(matterListLiExp); elements = dom.selectXpath(matterListLiExp);
...@@ -171,7 +174,7 @@ public class MatterHtmlParseUtil { ...@@ -171,7 +174,7 @@ public class MatterHtmlParseUtil {
} }
} }
buildMatter(matterEntityList, title, href, evaluationUrl, netApplyUrl); buildMatter(matterEntityList, title, href, evaluationUrl, netApplyUrl,params);
} }
break; break;
...@@ -187,13 +190,23 @@ public class MatterHtmlParseUtil { ...@@ -187,13 +190,23 @@ public class MatterHtmlParseUtil {
return Rest.ok(matterEntityList); return Rest.ok(matterEntityList);
} }
private static void buildMatter(List<MatterEntity> matterEntityList, String title, String href, String evaluationUrl, String netApplyUrl) { private static void buildMatter(List<MatterEntity> matterEntityList, String title, String href, String evaluationUrl, String netApplyUrl,Map<String, String> params) {
UrlBuilder builder = UrlBuilder.ofHttp(href, CharsetUtil.CHARSET_UTF_8); UrlBuilder builder = UrlBuilder.ofHttp(href, CharsetUtil.CHARSET_UTF_8);
String itemCode = builder.getQuery().get("itemCode").toString(); String itemCode = builder.getQuery().get("itemCode").toString();
String taskType = builder.getQuery().get("taskType").toString(); String taskType = builder.getQuery().get("taskType").toString();
String deptCode = builder.getQuery().get("deptCode").toString(); String deptCode = builder.getQuery().get("deptCode").toString();
String areaCode = builder.getQuery().get("areaCode").toString(); String areaCode = builder.getQuery().get("areaCode").toString();
//todo 如果部门编码与初始编码不一致,切不在部门列表中,添加默认部门
String sourceDeptCode = params.getOrDefault("deptCode", "");
DeptService deptService = SpringUtils.getBean(DeptService.class);
DeptEntity cache = deptService.getCache(deptCode);
if(ObjectUtils.isEmpty(cache)){
//抓取事项的部门编码未找到 用初始的部门编码
deptCode=sourceDeptCode;
}
MatterEntity matterEntity = new MatterEntity(); MatterEntity matterEntity = new MatterEntity();
matterEntity.initAttrValue(); matterEntity.initAttrValue();
matterEntity.setTcode(itemCode); matterEntity.setTcode(itemCode);
......
...@@ -72,7 +72,7 @@ public class SyncGovMatterDetailThread implements Runnable { ...@@ -72,7 +72,7 @@ public class SyncGovMatterDetailThread implements Runnable {
@Override @Override
public void run() { public void run() {
log.info("同步站点事项开始....."); log.info("同步站点事项开始.....");
Rest<String> deptRest = deptService.syncDeptBySiteId(siteEntity, context); deptService.syncDeptBySiteId(siteEntity, context);
//log.info("同步站点部门:" + JSON.toJSONString(deptRest)); //log.info("同步站点部门:" + JSON.toJSONString(deptRest));
Rest<String> rest = siteService.syncMatterBySiteId(siteEntity, context); Rest<String> rest = siteService.syncMatterBySiteId(siteEntity, context);
//Rest<String> rest = Rest.ok(); //Rest<String> rest = Rest.ok();
......
...@@ -10,6 +10,7 @@ import lombok.extern.slf4j.Slf4j; ...@@ -10,6 +10,7 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import static com.mortals.xhx.common.key.Constant.USER_SITE_TREE; import static com.mortals.xhx.common.key.Constant.USER_SITE_TREE;
...@@ -22,6 +23,8 @@ public class DemoStartedService implements IApplicationStartedService { ...@@ -22,6 +23,8 @@ public class DemoStartedService implements IApplicationStartedService {
private ICacheService cacheService; private ICacheService cacheService;
@Autowired @Autowired
private SiteService siteService; private SiteService siteService;
@Autowired
private UserService userService;
@Override @Override
public void start() { public void start() {
...@@ -29,7 +32,9 @@ public class DemoStartedService implements IApplicationStartedService { ...@@ -29,7 +32,9 @@ public class DemoStartedService implements IApplicationStartedService {
log.info("开始服务..[初始化用户站点树]"); log.info("开始服务..[初始化用户站点树]");
//删除redis 中的 站点树 //删除redis 中的 站点树
cacheService.del(USER_SITE_TREE); cacheService.del(USER_SITE_TREE);
siteService.updateAllSiteTree(null);
//从门户获取所有站点用户
userService.refreshUser();
} }
@Override @Override
......
package com.mortals.xhx.daemon.task;
import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.service.ITask;
import com.mortals.framework.service.ITaskExcuteService;
import com.mortals.framework.utils.ServletUtils;
import com.mortals.xhx.base.system.upload.service.UploadService;
import com.mortals.xhx.module.matter.model.MatterDatumFileEntity;
import com.mortals.xhx.module.matter.model.MatterDatumFileQuery;
import com.mortals.xhx.module.matter.service.MatterDatumFileService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StopWatch;
import org.springframework.web.multipart.MultipartFile;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.ConnectException;
import java.net.SocketTimeoutException;
import java.util.ArrayList;
import java.util.List;
import static com.mortals.xhx.common.key.Constant.MAX_RETRY_COUNT;
/**
* 同步全部站点事项材料附件
*
* @author: zxfei
* @date: 2024/2/27 15:34
*/
@Slf4j
//@Service("SyncMatterDaumFileTask")
public class SyncMatterDaumFileTaskImpl implements ITaskExcuteService {
@Autowired
private MatterDatumFileService matterDatumFileService;
@Autowired
private UploadService uploadService;
@Override
public void excuteTask(ITask task) throws AppException {
log.info("开始同步材料列表附件! 分页获取");
int total = matterDatumFileService.count(new MatterDatumFileQuery(), null);
int page = total / 1000 + 1;
StopWatch stopWatch = new StopWatch("watch daum file");
for (int i = 1; i <= page; i++) {
try {
stopWatch.start("同步附件");
PageInfo pageInfo = new PageInfo();
pageInfo.setCurrPage(i);
pageInfo.setPrePageResult(1000);
List<MatterDatumFileEntity> datumFileEntities = matterDatumFileService.find(new MatterDatumFileQuery(), pageInfo, null).getList();
List<MatterDatumFileEntity> updateList = new ArrayList<>();
for (MatterDatumFileEntity datumFileEntity : datumFileEntities) {
String localFileUrl = datumFileEntity.getLocalFileUrl();
if (ObjectUtils.isEmpty(localFileUrl) && !ObjectUtils.isEmpty(datumFileEntity.getFileUrl())) {
String encryUrl = "http://www.sczwfw.gov.cn/jiq/interface/item/annex/encryptUrl?id=" + datumFileEntity.getFileUrl();
// Thread.sleep(300);
String resp = HttpUtil.get(encryUrl, 60000);
JSONObject obj = JSON.parseObject(resp);
String code = obj.getString("code");
String data = obj.getString("data");
if ("0".equals(code)) {
//下载文件
int reCount = 0;
while (reCount < 3) {
try {
byte[] fileData = HttpUtil.downloadBytes(data);
InputStream inputStream = new ByteArrayInputStream(fileData);
MultipartFile file = ServletUtils.getMultipartFile(inputStream, datumFileEntity.getFileName());
String filePath = uploadService.saveFileUpload(file, "file/fileupload/daumfile", null);
if (!ObjectUtils.isEmpty(filePath)) {
datumFileEntity.setLocalFileUrl("/" + filePath);
MatterDatumFileEntity updateEntity = new MatterDatumFileEntity();
updateEntity.setId(datumFileEntity.getId());
updateEntity.setLocalFileUrl(datumFileEntity.getLocalFileUrl());
updateList.add(updateEntity);
}
break;
} catch (Exception e) {
log.error("下载附件异常,id:{},url:{}",datumFileEntity.getFileUrl(),data, e);
reCount++;
try {
Thread.sleep(2000);
} catch (InterruptedException ie) {
}
}
}
}
}
}
if (!ObjectUtils.isEmpty(updateList)) {
log.info("开始更新附件本地地址==》{}", updateList.size());
matterDatumFileService.update(updateList);
}
log.info("同步材料附件{}条完成,耗时:{}s", updateList.size(), stopWatch.getLastTaskTimeMillis() / 1000);
} catch (Exception e) {
log.error("同步材料附件异常", e);
}
stopWatch.stop();
}
}
@Override
public void stopTask(ITask task) throws AppException {
}
public static void main(String[] args) {
int total = 1001;
int page = total / 1000;
System.out.println(page);
}
}
...@@ -36,54 +36,10 @@ public class SyncUserTaskImpl implements ITaskExcuteService { ...@@ -36,54 +36,10 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
@Autowired @Autowired
private UserService userService; private UserService userService;
@Autowired
private IUserFeign userFeign;
@Override @Override
public void excuteTask(ITask task) throws AppException { public void excuteTask(ITask task) throws AppException {
userService.refreshUser();
log.info("同步用户"); log.info("同步用户");
/* UserPdu userPdu = new UserPdu(); userService.refreshUser();
userPdu.setPage(1);
userPdu.setSize(-1);
Rest<RespData<List<UserPdu>>> list = userFeign.list(userPdu);
userService.updateUserList(list.getData().getData());*/
//resourceService.updateUserList();
/* UserPdu userPdu = new UserPdu();
userPdu.setPage(1);
userPdu.setSize(-1);
Rest<RespData<List<UserPdu>>> list = userFeign.list(userPdu);
*//* List<UserPdu> firstList = list.getData().getData();
List<UserEntity> secondList = userService.find(new UserQuery());
//交叉对比后,多的新增 少的删除
List<UserEntity> diffList = secondList.parallelStream()
.filter(item -> !firstList.parallelStream().map(e -> e.getId()).collect(Collectors.toList()).contains(item.getId()))
.collect(Collectors.toList());*//*
//log.info("diffList:{}",JSON.toJSONString(diffList));
//更新本地用户信息,并且更新用户站点树
list.getData().getData().forEach(user -> {
//查询用户是否存在,
//UserEntity userEntity = userService.get(user.getId());
UserEntity userEntity =userService.selectOne(new UserQuery().loginName(user.getLoginName()));
if (ObjectUtils.isEmpty(userEntity)) {
//新增
UserEntity entity = new UserEntity();
entity.initAttrValue();
BeanUtils.copyProperties(user, entity, BeanUtil.getNullPropertyNames(user));
userService.save(entity);
Context context = new Context();
context.setUser(entity);
new Thread(new SyncTreeSiteThread(siteService, context)).start();
}
});*/
} }
......
...@@ -13,5 +13,5 @@ import java.util.List; ...@@ -13,5 +13,5 @@ import java.util.List;
public interface AppDao extends ICRUDDao<AppEntity,Long>{ public interface AppDao extends ICRUDDao<AppEntity,Long>{
String doSting();
} }
...@@ -17,5 +17,12 @@ import java.util.List; ...@@ -17,5 +17,12 @@ import java.util.List;
public class AppDaoImpl extends BaseCRUDDaoMybatis<AppEntity,Long> implements AppDao { public class AppDaoImpl extends BaseCRUDDaoMybatis<AppEntity,Long> implements AppDao {
/**
* @return
*/
@Override
public String doSting() {
//todo
return null;
}
} }
...@@ -33,4 +33,6 @@ public interface AppService extends ICRUDService<AppEntity, Long> { ...@@ -33,4 +33,6 @@ public interface AppService extends ICRUDService<AppEntity, Long> {
AppDao getAppDao(); AppDao getAppDao();
} }
\ No newline at end of file
...@@ -12,6 +12,7 @@ import com.mortals.framework.exception.AppException; ...@@ -12,6 +12,7 @@ import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.model.OrderCol; import com.mortals.framework.model.OrderCol;
import com.mortals.framework.model.PageInfo; import com.mortals.framework.model.PageInfo;
import com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.xhx.base.system.upload.service.UploadService; import com.mortals.xhx.base.system.upload.service.UploadService;
import com.mortals.xhx.common.code.YesNoEnum; import com.mortals.xhx.common.code.YesNoEnum;
...@@ -49,7 +50,7 @@ import static com.mortals.xhx.common.key.Constant.CUSTAPP_ROOT_PATH; ...@@ -49,7 +50,7 @@ import static com.mortals.xhx.common.key.Constant.CUSTAPP_ROOT_PATH;
*/ */
@Service("appService") @Service("appService")
@Slf4j @Slf4j
public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, Long> implements AppService { public class AppServiceImpl extends AbstractCRUDCacheServiceImpl<AppDao, AppEntity, Long> implements AppService {
@Autowired @Autowired
private UploadService uploadService; private UploadService uploadService;
...@@ -110,42 +111,8 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L ...@@ -110,42 +111,8 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L
} else { } else {
item.setAppIconUrl(item.getAppIconPath()); item.setAppIconUrl(item.getAppIconPath());
} }
};
super.findAfter(params, pageInfo, context, list);
}
private void sortAppByIdList(AppEntity params, List<AppEntity> list) {
if (!ObjectUtils.isEmpty(params.getIdList())) {
log.info("请求的排序id列表:{}", JSON.toJSONString(params.getIdList()));
try {
//去除idlist中不存在的
Set<Long> idSet = list.stream().map(item -> item.getId()).collect(Collectors.toSet());
List<Long> idList = params.getIdList();
Iterator<Long> ite = idList.iterator();
while (ite.hasNext()) {
Long next = ite.next();
if (!idSet.contains(next)) {
ite.remove();
}
}
//根据idList进行排序
for (int i = 0; i < idList.size(); i++) {
Long id = idList.get(i);
for (int j = 0; j < list.size(); j++) {
if (id.equals(list.get(j).getId())) {
//判断位置是否一直
if (i != j) {
//交换
Collections.swap(list, i, j);
}
}
}
}
} catch (Exception e) {
log.error("排序异常!", e);
}
} }
super.findAfter(params, pageInfo, context, list);
} }
private void checkDeviceBlackApp(AppEntity params, List<AppEntity> list) { private void checkDeviceBlackApp(AppEntity params, List<AppEntity> list) {
...@@ -445,14 +412,14 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L ...@@ -445,14 +412,14 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L
AppVersionEntity curAppVersionEntity = appVersionEntities.get(0); AppVersionEntity curAppVersionEntity = appVersionEntities.get(0);
// String versionNum = StrUtil.subAfter(curAppVersionEntity.getVersion(), Constant.VERSION_PREFIX, false); // String versionNum = StrUtil.subAfter(curAppVersionEntity.getVersion(), Constant.VERSION_PREFIX, false);
Integer versionNum = curAppVersionEntity.getVersion(); Integer versionNum = curAppVersionEntity.getVersion();
// Integer newVersionNum = versionNum++; Integer newVersionNum = ++versionNum;
AppVersionEntity appVersionEntity = new AppVersionEntity(); AppVersionEntity appVersionEntity = new AppVersionEntity();
appVersionEntity.initAttrValue(); appVersionEntity.initAttrValue();
AppVersionEntity versionEntity = new AppVersionEntity(); AppVersionEntity versionEntity = new AppVersionEntity();
versionEntity.initAttrValue(); versionEntity.initAttrValue();
versionEntity.setAppId(entity.getId()); versionEntity.setAppId(entity.getId());
versionEntity.setAppName(entity.getAppName()); versionEntity.setAppName(entity.getAppName());
versionEntity.setVersion(++versionNum); versionEntity.setVersion(newVersionNum);
versionEntity.setNotes(entity.getNotes()); versionEntity.setNotes(entity.getNotes());
versionEntity.setFileName(entity.getFileName()); versionEntity.setFileName(entity.getFileName());
versionEntity.setFilePath(entity.getFilePath()); versionEntity.setFilePath(entity.getFilePath());
......
package com.mortals.xhx.module.base.web; package com.mortals.xhx.module.base.web;
import com.mortals.framework.annotation.UnAuth; import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.service.ICacheService; import com.mortals.framework.service.ICacheService;
import com.mortals.framework.util.ThreadPool; import com.mortals.framework.util.ThreadPool;
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.common.keys.RedisCacheKeys; import com.mortals.xhx.common.keys.RedisCacheKeys;
import com.mortals.xhx.common.utils.SyncGovMatterDetailThread; import com.mortals.xhx.common.utils.SyncGovMatterDetailThread;
import com.mortals.xhx.common.utils.SyncSubAreaThread; import com.mortals.xhx.common.utils.SyncSubAreaThread;
...@@ -99,7 +101,13 @@ public class BaseAreaController extends BaseCRUDJsonBodyMappingController<BaseAr ...@@ -99,7 +101,13 @@ public class BaseAreaController extends BaseCRUDJsonBodyMappingController<BaseAr
if (!bool) { if (!bool) {
throw new AppException("当前正在同步区域数据中,请勿重复提交!"); throw new AppException("当前正在同步区域数据中,请勿重复提交!");
} }
ThreadPool.getInstance().execute(new SyncSubAreaThread(this.service, baseAreaEntity, getContext()));
Rest<String> rest = this.service.genSubAreaByRootName(baseAreaEntity, getContext());
if(YesNoEnum.NO.getValue()==rest.getCode()){
throw new AppException("更新子区域失败,"+rest.getMsg());
}
// ThreadPool.getInstance().execute(new SyncSubAreaThread(this.service, baseAreaEntity, getContext()));
recordSysLog(request, busiDesc + " 【成功】"); recordSysLog(request, busiDesc + " 【成功】");
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS); jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
jsonObject.put(KEY_RESULT_MSG, "初始同步区域数据命令下发成功!"); jsonObject.put(KEY_RESULT_MSG, "初始同步区域数据命令下发成功!");
......
...@@ -1108,6 +1108,9 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter ...@@ -1108,6 +1108,9 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
Map<String, String> baseInfoMap = MatterDetailHtmlParseUtil.getbaseInfoMapByHtml(dom); Map<String, String> baseInfoMap = MatterDetailHtmlParseUtil.getbaseInfoMapByHtml(dom);
Integer matterEditionRemote = DataUtil.converStr2Int(baseInfoMap.getOrDefault("事项版本", "0"), 0); Integer matterEditionRemote = DataUtil.converStr2Int(baseInfoMap.getOrDefault("事项版本", "0"), 0);
//由于附件连接有效性,强制更新材料属性与附件地址
saveDatumInfo(matterEntity, context, dom, sqclInfoSetting);
if (matterEditionLocal >= matterEditionRemote) { if (matterEditionLocal >= matterEditionRemote) {
return Rest.fail("本地事项版本大于等于远端,不需要更新!"); return Rest.fail("本地事项版本大于等于远端,不需要更新!");
} }
...@@ -1118,8 +1121,7 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter ...@@ -1118,8 +1121,7 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
matterEntity.setDeptName(extCache == null ? "" : extCache.getName()); matterEntity.setDeptName(extCache == null ? "" : extCache.getName());
//构建基础信息参数 //构建基础信息参数
savebaseInfo(matterEntity, baseInfoMap, baseInfoSetting); savebaseInfo(matterEntity, baseInfoMap, baseInfoSetting);
//更新材料属性
saveDatumInfo(matterEntity, context, dom, sqclInfoSetting);
//更新受理条件 //更新受理条件
saveSltjInfo(matterEntity, context, dom); saveSltjInfo(matterEntity, context, dom);
//更新办理流程 //更新办理流程
......
...@@ -2,6 +2,9 @@ package com.mortals.xhx.module.site.model; ...@@ -2,6 +2,9 @@ package com.mortals.xhx.module.site.model;
import java.util.Date; import java.util.Date;
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;
...@@ -11,7 +14,7 @@ import lombok.Data; ...@@ -11,7 +14,7 @@ import lombok.Data;
* 站点实体对象 * 站点实体对象
* *
* @author zxfei * @author zxfei
* @date 2023-05-07 * @date 2024-12-11
*/ */
@Data @Data
public class SiteEntity extends SiteVo { public class SiteEntity extends SiteVo {
...@@ -161,6 +164,14 @@ public class SiteEntity extends SiteVo { ...@@ -161,6 +164,14 @@ public class SiteEntity extends SiteVo {
* 部署模块,逗号分隔 * 部署模块,逗号分隔
*/ */
private String modelIds; private String modelIds;
/**
* 政务风貌,多个逗号分割
*/
private String govAffairStyle;
/**
* 投诉电话
*/
private String complaintHotline;
@Override @Override
public int hashCode() { public int hashCode() {
return this.getId().hashCode(); return this.getId().hashCode();
...@@ -178,74 +189,43 @@ public class SiteEntity extends SiteVo { ...@@ -178,74 +189,43 @@ public class SiteEntity extends SiteVo {
} }
public void initAttrValue(){ public void initAttrValue(){
this.siteName = ""; this.siteName = "";
this.siteCode = ""; this.siteCode = "";
this.proCode = "";
this.areaID = ""; this.areaID = "";
this.areaCode = ""; this.areaCode = "";
this.areaName = "";
this.proCode = "";
this.cityCode = ""; this.cityCode = "";
this.districtCode = ""; this.districtCode = "";
this.siteIp = ""; this.siteIp = "";
this.sitePort = ""; this.sitePort = "";
this.longitude = ""; this.longitude = "";
this.latitude = ""; this.latitude = "";
this.siteTel = ""; this.siteTel = "";
this.detailAddress = ""; this.detailAddress = "";
this.siteRemark = ""; this.siteRemark = "";
this.amWorkStartTime = null; this.amWorkStartTime = null;
this.amWorkEndTime = null; this.amWorkEndTime = null;
this.pmWorkStartTime = null; this.pmWorkStartTime = null;
this.pmWorkEndTime = null; this.pmWorkEndTime = null;
this.workday1 = 0;
this.workday1 = 1; this.workday2 = 0;
this.workday3 = 0;
this.workday2 = 1; this.workday4 = 0;
this.workday5 = 0;
this.workday3 = 1;
this.workday4 = 1;
this.workday5 = 1;
this.workday6 = 0; this.workday6 = 0;
this.workday7 = 0; this.workday7 = 0;
this.level = 1;
this.building = 1;
this.modelIds = "";
this.areaName = "";
this.onlineTake = 1; this.onlineTake = 1;
this.appointment = 1; this.appointment = 1;
this.gowMap = 1; this.gowMap = 1;
this.level = 0;
this.building = 0;
this.logoPath = ""; this.logoPath = "";
this.englishName = ""; this.englishName = "";
this.leadingOfficial = "";
this.leadingOfficialTelephone = "";
this.modelIds = "";
this.govAffairStyle = "";
this.complaintHotline = "";
} }
} }
\ No newline at end of file
...@@ -7,7 +7,7 @@ import com.mortals.xhx.module.site.model.SiteEntity; ...@@ -7,7 +7,7 @@ import com.mortals.xhx.module.site.model.SiteEntity;
* 站点查询对象 * 站点查询对象
* *
* @author zxfei * @author zxfei
* @date 2023-05-07 * @date 2024-12-11
*/ */
public class SiteQuery extends SiteEntity { public class SiteQuery extends SiteEntity {
/** 开始 序号,主键,自增长 */ /** 开始 序号,主键,自增长 */
...@@ -329,6 +329,11 @@ public class SiteQuery extends SiteEntity { ...@@ -329,6 +329,11 @@ public class SiteQuery extends SiteEntity {
/** 部署模块,逗号分隔排除列表 */ /** 部署模块,逗号分隔排除列表 */
private List <String> modelIdsNotList; private List <String> modelIdsNotList;
/** 政务风貌,多个逗号分割 */
private List<String> govAffairStyleList;
/** 政务风貌,多个逗号分割排除列表 */
private List <String> govAffairStyleNotList;
/** 开始 创建时间 */ /** 开始 创建时间 */
private String createTimeStart; private String createTimeStart;
...@@ -356,6 +361,11 @@ public class SiteQuery extends SiteEntity { ...@@ -356,6 +361,11 @@ public class SiteQuery extends SiteEntity {
/** 结束 修改时间 */ /** 结束 修改时间 */
private String updateTimeEnd; private String updateTimeEnd;
/** 投诉电话 */
private List<String> complaintHotlineList;
/** 投诉电话排除列表 */
private List <String> complaintHotlineNotList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */ /** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<SiteQuery> orConditionList; private List<SiteQuery> orConditionList;
...@@ -2185,6 +2195,38 @@ public class SiteQuery extends SiteEntity { ...@@ -2185,6 +2195,38 @@ public class SiteQuery extends SiteEntity {
this.modelIdsNotList = modelIdsNotList; this.modelIdsNotList = modelIdsNotList;
} }
/**
* 获取 政务风貌,多个逗号分割
* @return govAffairStyleList
*/
public List<String> getGovAffairStyleList(){
return this.govAffairStyleList;
}
/**
* 设置 政务风貌,多个逗号分割
* @param govAffairStyleList
*/
public void setGovAffairStyleList(List<String> govAffairStyleList){
this.govAffairStyleList = govAffairStyleList;
}
/**
* 获取 政务风貌,多个逗号分割
* @return govAffairStyleNotList
*/
public List<String> getGovAffairStyleNotList(){
return this.govAffairStyleNotList;
}
/**
* 设置 政务风貌,多个逗号分割
* @param govAffairStyleNotList
*/
public void setGovAffairStyleNotList(List<String> govAffairStyleNotList){
this.govAffairStyleNotList = govAffairStyleNotList;
}
/** /**
* 获取 开始 创建时间 * 获取 开始 创建时间
* @return createTimeStart * @return createTimeStart
...@@ -2330,6 +2372,38 @@ public class SiteQuery extends SiteEntity { ...@@ -2330,6 +2372,38 @@ public class SiteQuery extends SiteEntity {
this.updateTimeEnd = updateTimeEnd; this.updateTimeEnd = updateTimeEnd;
} }
/**
* 获取 投诉电话
* @return complaintHotlineList
*/
public List<String> getComplaintHotlineList(){
return this.complaintHotlineList;
}
/**
* 设置 投诉电话
* @param complaintHotlineList
*/
public void setComplaintHotlineList(List<String> complaintHotlineList){
this.complaintHotlineList = complaintHotlineList;
}
/**
* 获取 投诉电话
* @return complaintHotlineNotList
*/
public List<String> getComplaintHotlineNotList(){
return this.complaintHotlineNotList;
}
/**
* 设置 投诉电话
* @param complaintHotlineNotList
*/
public void setComplaintHotlineNotList(List<String> complaintHotlineNotList){
this.complaintHotlineNotList = complaintHotlineNotList;
}
/** /**
* 设置 序号,主键,自增长 * 设置 序号,主键,自增长
* @param id * @param id
...@@ -3417,6 +3491,25 @@ public class SiteQuery extends SiteEntity { ...@@ -3417,6 +3491,25 @@ public class SiteQuery extends SiteEntity {
} }
/**
* 设置 政务风貌,多个逗号分割
* @param govAffairStyle
*/
public SiteQuery govAffairStyle(String govAffairStyle){
setGovAffairStyle(govAffairStyle);
return this;
}
/**
* 设置 政务风貌,多个逗号分割
* @param govAffairStyleList
*/
public SiteQuery govAffairStyleList(List<String> govAffairStyleList){
this.govAffairStyleList = govAffairStyleList;
return this;
}
/** /**
* 设置 创建用户 * 设置 创建用户
* @param createUserId * @param createUserId
...@@ -3472,6 +3565,25 @@ public class SiteQuery extends SiteEntity { ...@@ -3472,6 +3565,25 @@ public class SiteQuery extends SiteEntity {
} }
/**
* 设置 投诉电话
* @param complaintHotline
*/
public SiteQuery complaintHotline(String complaintHotline){
setComplaintHotline(complaintHotline);
return this;
}
/**
* 设置 投诉电话
* @param complaintHotlineList
*/
public SiteQuery complaintHotlineList(List<String> complaintHotlineList){
this.complaintHotlineList = complaintHotlineList;
return this;
}
/** /**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) * 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList * @return orConditionList
......
...@@ -8,6 +8,7 @@ import com.mortals.framework.service.ICRUDService; ...@@ -8,6 +8,7 @@ import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.area.model.AreaEntity; import com.mortals.xhx.module.area.model.AreaEntity;
import com.mortals.xhx.module.area.model.AreaTreeSelect; import com.mortals.xhx.module.area.model.AreaTreeSelect;
import com.mortals.xhx.module.matter.model.MatterEntity; import com.mortals.xhx.module.matter.model.MatterEntity;
import com.mortals.xhx.module.site.dao.SiteDao;
import com.mortals.xhx.module.site.model.SiteEntity; import com.mortals.xhx.module.site.model.SiteEntity;
import com.mortals.xhx.module.site.model.SiteQuery; import com.mortals.xhx.module.site.model.SiteQuery;
import com.mortals.xhx.module.site.model.SiteTreeSelect; import com.mortals.xhx.module.site.model.SiteTreeSelect;
...@@ -28,6 +29,9 @@ import java.util.Set; ...@@ -28,6 +29,9 @@ import java.util.Set;
*/ */
public interface SiteService extends ICRUDCacheService<SiteEntity, Long> { public interface SiteService extends ICRUDCacheService<SiteEntity, Long> {
SiteDao getDao();
/** /**
* 区域站点树 * 区域站点树
* *
...@@ -69,4 +73,8 @@ public interface SiteService extends ICRUDCacheService<SiteEntity, Long> { ...@@ -69,4 +73,8 @@ public interface SiteService extends ICRUDCacheService<SiteEntity, Long> {
void deleteBysiteIdAndSource(Long siteId, Integer source, Context context); void deleteBysiteIdAndSource(Long siteId, Integer source, Context context);
void updateAllSiteTree(Context context); void updateAllSiteTree(Context context);
void updateSiteInfo(SiteEntity siteEntity, Context context);
} }
\ No newline at end of file
...@@ -8,15 +8,21 @@ import com.mortals.framework.model.Context; ...@@ -8,15 +8,21 @@ 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.model.Result;
import com.mortals.framework.service.ICacheService; import com.mortals.framework.service.ICacheService;
import com.mortals.framework.util.StringUtils;
import com.mortals.framework.util.ThreadPool; import com.mortals.framework.util.ThreadPool;
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.base.system.user.model.UserEntity; import com.mortals.xhx.base.system.user.model.UserEntity;
import com.mortals.xhx.common.code.AreaLevelEnum; import com.mortals.xhx.common.code.AreaLevelEnum;
import com.mortals.xhx.common.code.YesNoEnum; import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.common.key.Constant;
import com.mortals.xhx.common.keys.RedisCacheKeys; import com.mortals.xhx.common.keys.RedisCacheKeys;
import com.mortals.xhx.common.pdu.RespData;
import com.mortals.xhx.common.pdu.user.UserPdu;
import com.mortals.xhx.common.utils.SyncDeptThread; import com.mortals.xhx.common.utils.SyncDeptThread;
import com.mortals.xhx.common.utils.SyncGovMatterDetailThread; import com.mortals.xhx.common.utils.SyncGovMatterDetailThread;
import com.mortals.xhx.common.utils.SyncTreeSiteThread;
import com.mortals.xhx.feign.user.IUserFeign;
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;
import com.mortals.xhx.module.area.service.AreaService; import com.mortals.xhx.module.area.service.AreaService;
...@@ -34,6 +40,7 @@ import com.mortals.xhx.module.site.service.SiteService; ...@@ -34,6 +40,7 @@ import com.mortals.xhx.module.site.service.SiteService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -58,15 +65,12 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic ...@@ -58,15 +65,12 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic
@Autowired @Autowired
private ICacheService cacheService; private ICacheService cacheService;
@Autowired @Autowired
private MatterService matterService;
@Autowired
private DeptService deptService;
@Autowired
private SiteService siteService; private SiteService siteService;
@Autowired @Autowired
private SiteMatterService siteMatterService;
@Autowired
private AreaService areaService; private AreaService areaService;
@Autowired
@Lazy
private IUserFeign userFeign;
public SiteController() { public SiteController() {
super.setModuleDesc("站点"); super.setModuleDesc("站点");
...@@ -536,4 +540,77 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic ...@@ -536,4 +540,77 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic
return jsonObject.toJSONString(); return jsonObject.toJSONString();
} }
/**
* 外部站点添加
*/
@PostMapping(value = "api/add")
@UnAuth
public String apiAdd(@RequestBody SiteEntity siteEntity) {
JSONObject jsonObject = new JSONObject();
String busiDesc = "外部站点添加" + this.getModuleDesc();
try {
String areaCode = siteEntity.getAreaCode();
String siteName = siteEntity.getSiteName();
if (ObjectUtils.isEmpty(areaCode)) {
throw new AppException("区域编码不能为空!");
}
SiteEntity one = this.service.selectOne(new SiteQuery().areaCode(areaCode).siteName(siteName), getContext());
if (!ObjectUtils.isEmpty(one)) throw new AppException("当前区域下站点名称已存在!");
AreaEntity areaEntity = areaService.selectOne(new AreaQuery().areaCode(areaCode), getContext());
siteEntity.initAttrValue();
//查询是否有站点了,如果有站点,这强制更新为站点 id=1的数据
SiteEntity site = this.service.get(1L);
if (!ObjectUtils.isEmpty(site)) {
siteEntity.setId(site.getId());
}
siteEntity.setAreaCode(areaCode);
siteEntity.setSiteName(siteName);
if (!ObjectUtils.isEmpty(areaEntity)) {
siteEntity.setAreaID(areaEntity.getIid());
siteEntity.setAreaName(areaEntity.getName());
siteEntity.setAreaLevel(areaEntity.getAreaLevel());
}
if (!ObjectUtils.isEmpty(siteEntity.getId())) {
List<SiteEntity> siteEntities = this.service.find(new SiteQuery().areaCode(siteEntity.getAreaCode()));
siteEntity.setSiteCode(siteEntity.getAreaCode() + Constant.SITE_SPLIT_MARK + StringUtils.lpad(siteEntities.size() + 1, Constant.SITE_CODE_NUM));
this.service.getDao().update(siteEntity);
//todo 更新用户站点树
/* Rest<String> rest = userFeign.synchSiteAuth();
if (rest.getCode().equals(YesNoEnum.YES.getValue())) {
UserPdu userPdu = new UserPdu();
userPdu.setPage(1);
userPdu.setSize(-1);
Rest<RespData<List<UserPdu>>> list = userFeign.list(userPdu);
this.service.updateUserList(list.getData().getData());
// ThreadPool.getInstance().execute(new SyncTreeSiteThread(this,context));
this.service.updateAllSiteTree(null);*/
} else {
this.service.save(siteEntity, getContext());
}
//todo 更新相关表中的站点名称,站点编码,站点ID
this.service.updateSiteInfo(siteEntity, getContext());
recordSysLog(request, busiDesc + " 【成功】");
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
jsonObject.put(KEY_RESULT_DATA, siteEntity);
jsonObject.put(KEY_RESULT_MSG, "外部站点添加成功!");
} 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();
}
} }
\ No newline at end of file
...@@ -26,7 +26,10 @@ import com.mortals.xhx.feign.skin.ISkinFillFeign; ...@@ -26,7 +26,10 @@ import com.mortals.xhx.feign.skin.ISkinFillFeign;
import com.mortals.xhx.feign.skin.ISkinSampleFeign; import com.mortals.xhx.feign.skin.ISkinSampleFeign;
import com.mortals.xhx.module.app.model.AppEntity; import com.mortals.xhx.module.app.model.AppEntity;
import com.mortals.xhx.module.app.model.AppQuery; import com.mortals.xhx.module.app.model.AppQuery;
import com.mortals.xhx.module.app.model.AppVersionEntity;
import com.mortals.xhx.module.app.model.AppVersionQuery;
import com.mortals.xhx.module.app.service.AppService; import com.mortals.xhx.module.app.service.AppService;
import com.mortals.xhx.module.app.service.AppVersionService;
import com.mortals.xhx.module.model.model.ModelEntity; import com.mortals.xhx.module.model.model.ModelEntity;
import com.mortals.xhx.module.model.model.ModelQuery; import com.mortals.xhx.module.model.model.ModelQuery;
import com.mortals.xhx.module.model.service.ModelService; import com.mortals.xhx.module.model.service.ModelService;
...@@ -93,6 +96,8 @@ public class SkinBaseServiceImpl extends AbstractCRUDServiceImpl<SkinBaseDao, Sk ...@@ -93,6 +96,8 @@ public class SkinBaseServiceImpl extends AbstractCRUDServiceImpl<SkinBaseDao, Sk
private AppService appService; private AppService appService;
@Autowired @Autowired
private ModelService modelService; private ModelService modelService;
@Autowired
private AppVersionService appVersionService;
@Override @Override
protected void validData(SkinBaseEntity entity, Context context) throws AppException { protected void validData(SkinBaseEntity entity, Context context) throws AppException {
...@@ -329,12 +334,31 @@ public class SkinBaseServiceImpl extends AbstractCRUDServiceImpl<SkinBaseDao, Sk ...@@ -329,12 +334,31 @@ public class SkinBaseServiceImpl extends AbstractCRUDServiceImpl<SkinBaseDao, Sk
File file = new File(filePath); File file = new File(filePath);
if (file.exists()) { if (file.exists()) {
try { try {
zip.putNextEntry(new ZipEntry(StrUtil.subAfter(cssFilePath, "/", false))); //读取css文件 提取图片地址
List<String> cssLines = FileUtil.readUtf8Lines(file);
for (String cssLine : cssLines) {
String cssFileUrl = StrUtil.subBetween(cssLine, "url(", ")");
if (!ObjectUtils.isEmpty(cssFileUrl)) {
String cssFileUrlPath = uploadService.getFilePath(cssFileUrl);
File cssFile = new File(cssFileUrlPath);
log.info("cssFileUrl:{} ,存在:{}", cssFileUrl, cssFile.exists());
if (cssFile.exists()) {
zip.putNextEntry(new ZipEntry(StrUtil.removePrefix(cssFileUrlPath, "/")));
IOUtils.write(FileUtil.readBytes(cssFile), zip);
zip.flush();
zip.closeEntry();
}
}
}
zip.putNextEntry(new ZipEntry(StrUtil.removePrefix(filePath, "/")));
IOUtils.write(FileUtil.readBytes(file), zip); IOUtils.write(FileUtil.readBytes(file), zip);
zip.flush(); zip.flush();
zip.closeEntry(); zip.closeEntry();
} catch (Exception e) { } catch (Exception e) {
log.error("异常", e.getMessage()); // log.error("异常", e.getMessage());
} }
} }
...@@ -343,7 +367,7 @@ public class SkinBaseServiceImpl extends AbstractCRUDServiceImpl<SkinBaseDao, Sk ...@@ -343,7 +367,7 @@ public class SkinBaseServiceImpl extends AbstractCRUDServiceImpl<SkinBaseDao, Sk
file = new File(filePath); file = new File(filePath);
if (file.exists()) { if (file.exists()) {
try { try {
zip.putNextEntry(new ZipEntry(StrUtil.subAfter(previewImagePath, "/", false))); zip.putNextEntry(new ZipEntry(StrUtil.removePrefix(filePath, "/")));
IOUtils.write(FileUtil.readBytes(file), zip); IOUtils.write(FileUtil.readBytes(file), zip);
zip.flush(); zip.flush();
zip.closeEntry(); zip.closeEntry();
...@@ -363,7 +387,7 @@ public class SkinBaseServiceImpl extends AbstractCRUDServiceImpl<SkinBaseDao, Sk ...@@ -363,7 +387,7 @@ public class SkinBaseServiceImpl extends AbstractCRUDServiceImpl<SkinBaseDao, Sk
File file = new File(filePath); File file = new File(filePath);
if (file.exists()) { if (file.exists()) {
try { try {
zip.putNextEntry(new ZipEntry(StrUtil.subAfter(fieldValue, "/", false))); zip.putNextEntry(new ZipEntry(StrUtil.removePrefix(filePath, "/")));
IOUtils.write(FileUtil.readBytes(file), zip); IOUtils.write(FileUtil.readBytes(file), zip);
zip.flush(); zip.flush();
zip.closeEntry(); zip.closeEntry();
...@@ -381,7 +405,7 @@ public class SkinBaseServiceImpl extends AbstractCRUDServiceImpl<SkinBaseDao, Sk ...@@ -381,7 +405,7 @@ public class SkinBaseServiceImpl extends AbstractCRUDServiceImpl<SkinBaseDao, Sk
File file = new File(filePath); File file = new File(filePath);
if (file.exists()) { if (file.exists()) {
try { try {
zip.putNextEntry(new ZipEntry(StrUtil.subAfter(fieldValue, "/", false))); zip.putNextEntry(new ZipEntry(StrUtil.removePrefix(filePath, "/")));
IOUtils.write(FileUtil.readBytes(file), zip); IOUtils.write(FileUtil.readBytes(file), zip);
zip.flush(); zip.flush();
zip.closeEntry(); zip.closeEntry();
...@@ -394,7 +418,7 @@ public class SkinBaseServiceImpl extends AbstractCRUDServiceImpl<SkinBaseDao, Sk ...@@ -394,7 +418,7 @@ public class SkinBaseServiceImpl extends AbstractCRUDServiceImpl<SkinBaseDao, Sk
file = new File(filePath); file = new File(filePath);
if (file.exists()) { if (file.exists()) {
try { try {
zip.putNextEntry(new ZipEntry(StrUtil.subAfter(appIconPath, "/", false))); zip.putNextEntry(new ZipEntry(StrUtil.removePrefix(filePath, "/")));
IOUtils.write(FileUtil.readBytes(file), zip); IOUtils.write(FileUtil.readBytes(file), zip);
zip.flush(); zip.flush();
zip.closeEntry(); zip.closeEntry();
...@@ -413,7 +437,31 @@ public class SkinBaseServiceImpl extends AbstractCRUDServiceImpl<SkinBaseDao, Sk ...@@ -413,7 +437,31 @@ public class SkinBaseServiceImpl extends AbstractCRUDServiceImpl<SkinBaseDao, Sk
File file = new File(filePath); File file = new File(filePath);
if (file.exists()) { if (file.exists()) {
try { try {
zip.putNextEntry(new ZipEntry(StrUtil.subAfter(fieldValue, "/", false))); zip.putNextEntry(new ZipEntry(StrUtil.removePrefix(filePath, "/")));
IOUtils.write(FileUtil.readBytes(file), zip);
zip.flush();
zip.closeEntry();
} catch (Exception e) {
log.error("异常", e.getMessage());
}
}
}
//应用版本
List<Long> appIdList = appService.find(new AppQuery().siteId(1L)).stream().map(i -> i.getId()).collect(Collectors.toList());
AppVersionQuery appVersionQuery = new AppVersionQuery();
if (!ObjectUtils.isEmpty(appIdList)) {
appVersionQuery.setAppIdList(appIdList);
}
appVersionQuery.setUsed(1);
List<AppVersionEntity> appVersionEntities = appVersionService.find(appVersionQuery);
for (AppVersionEntity appVersionEntity : appVersionEntities) {
String filePath = appVersionEntity.getFilePath();
filePath = uploadService.getFilePath(filePath);
File file = new File(filePath);
if (file.exists()) {
try {
zip.putNextEntry(new ZipEntry(StrUtil.removePrefix(filePath, "/")));
IOUtils.write(FileUtil.readBytes(file), zip); IOUtils.write(FileUtil.readBytes(file), zip);
zip.flush(); zip.flush();
zip.closeEntry(); zip.closeEntry();
......
...@@ -139,9 +139,9 @@ public class SkinBaseController extends BaseCRUDJsonBodyMappingController<SkinBa ...@@ -139,9 +139,9 @@ public class SkinBaseController extends BaseCRUDJsonBodyMappingController<SkinBa
/** /**
* 获取皮肤所有相关资源文件并压缩打包成zip * 获取皮肤所有相关资源文件并压缩打包成zip
*/ */
@GetMapping(value = "skinzip") @GetMapping(value = "zip")
@UnAuth @UnAuth
public void skinzip() { public void zip() {
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
try { try {
SkinBaseEntity query = new SkinBaseEntity(); SkinBaseEntity query = new SkinBaseEntity();
......
...@@ -30,6 +30,7 @@ import org.springframework.stereotype.Service; ...@@ -30,6 +30,7 @@ import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.xhx.module.window.dao.WindowBusinessDao; import com.mortals.xhx.module.window.dao.WindowBusinessDao;
import com.mortals.xhx.module.window.service.WindowBusinessService; import com.mortals.xhx.module.window.service.WindowBusinessService;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import java.util.*; import java.util.*;
...@@ -133,15 +134,11 @@ public class WindowBusinessServiceImpl extends AbstractCRUDServiceImpl<WindowBus ...@@ -133,15 +134,11 @@ public class WindowBusinessServiceImpl extends AbstractCRUDServiceImpl<WindowBus
@Override @Override
protected void findAfter(WindowBusinessEntity entity, PageInfo pageInfo, Context context, List<WindowBusinessEntity> list) throws AppException { 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.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 = windowService.getCache(item.getWindowId().toString());
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());
...@@ -176,7 +173,7 @@ public class WindowBusinessServiceImpl extends AbstractCRUDServiceImpl<WindowBus ...@@ -176,7 +173,7 @@ public class WindowBusinessServiceImpl extends AbstractCRUDServiceImpl<WindowBus
} }
/* *//** /* *//**
* @param entity * @param entity
* @param context * @param context
* @throws AppException * @throws AppException
...@@ -189,7 +186,9 @@ public class WindowBusinessServiceImpl extends AbstractCRUDServiceImpl<WindowBus ...@@ -189,7 +186,9 @@ public class WindowBusinessServiceImpl extends AbstractCRUDServiceImpl<WindowBus
}*/ }*/
/* *//** /* */
/**
* @param entity * @param entity
* @param context * @param context
* @throws AppException * @throws AppException
...@@ -199,7 +198,6 @@ public class WindowBusinessServiceImpl extends AbstractCRUDServiceImpl<WindowBus ...@@ -199,7 +198,6 @@ public class WindowBusinessServiceImpl extends AbstractCRUDServiceImpl<WindowBus
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");
phpUrl += "/api/window/winNameChange"; phpUrl += "/api/window/winNameChange";
......
...@@ -7,7 +7,7 @@ import com.mortals.xhx.module.workman.model.WorkmanEntity; ...@@ -7,7 +7,7 @@ import com.mortals.xhx.module.workman.model.WorkmanEntity;
* 工作人员查询对象 * 工作人员查询对象
* *
* @author zxfei * @author zxfei
* @date 2023-03-13 * @date 2024-12-05
*/ */
public class WorkmanQuery extends WorkmanEntity { public class WorkmanQuery extends WorkmanEntity {
/** 开始 序号,主键,自增长 */ /** 开始 序号,主键,自增长 */
...@@ -225,6 +225,26 @@ public class WorkmanQuery extends WorkmanEntity { ...@@ -225,6 +225,26 @@ public class WorkmanQuery extends WorkmanEntity {
/** 配置站点模块,逗号分隔排除列表 */ /** 配置站点模块,逗号分隔排除列表 */
private List <String> modelIdsNotList; private List <String> modelIdsNotList;
/** 开始 是否删除(0.否,1.是) */
private Integer deletedStart;
/** 结束 是否删除(0.否,1.是) */
private Integer deletedEnd;
/** 增加 是否删除(0.否,1.是) */
private Integer deletedIncrement;
/** 是否删除(0.否,1.是)列表 */
private List <Integer> deletedList;
/** 是否删除(0.否,1.是)排除列表 */
private List <Integer> deletedNotList;
/** 一体化经办人id */
private List<String> operatorIdList;
/** 一体化经办人id排除列表 */
private List <String> operatorIdNotList;
/** 开始 创建时间 */ /** 开始 创建时间 */
private String createTimeStart; private String createTimeStart;
...@@ -263,11 +283,6 @@ public class WorkmanQuery extends WorkmanEntity { ...@@ -263,11 +283,6 @@ public class WorkmanQuery extends WorkmanEntity {
/** 最后一次登录地址排除列表 */ /** 最后一次登录地址排除列表 */
private List <String> lastLoginAddressNotList; private List <String> lastLoginAddressNotList;
/** 一体化经办人id */
private List<String> operatorIdList;
/** 一体化经办人id排除列表 */
private List <String> operatorIdNotList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */ /** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<WorkmanQuery> orConditionList; private List<WorkmanQuery> orConditionList;
...@@ -1532,6 +1547,119 @@ public class WorkmanQuery extends WorkmanEntity { ...@@ -1532,6 +1547,119 @@ public class WorkmanQuery extends WorkmanEntity {
this.modelIdsNotList = modelIdsNotList; this.modelIdsNotList = modelIdsNotList;
} }
/**
* 获取 开始 是否删除(0.否,1.是)
* @return deletedStart
*/
public Integer getDeletedStart(){
return this.deletedStart;
}
/**
* 设置 开始 是否删除(0.否,1.是)
* @param deletedStart
*/
public void setDeletedStart(Integer deletedStart){
this.deletedStart = deletedStart;
}
/**
* 获取 结束 是否删除(0.否,1.是)
* @return $deletedEnd
*/
public Integer getDeletedEnd(){
return this.deletedEnd;
}
/**
* 设置 结束 是否删除(0.否,1.是)
* @param deletedEnd
*/
public void setDeletedEnd(Integer deletedEnd){
this.deletedEnd = deletedEnd;
}
/**
* 获取 增加 是否删除(0.否,1.是)
* @return deletedIncrement
*/
public Integer getDeletedIncrement(){
return this.deletedIncrement;
}
/**
* 设置 增加 是否删除(0.否,1.是)
* @param deletedIncrement
*/
public void setDeletedIncrement(Integer deletedIncrement){
this.deletedIncrement = deletedIncrement;
}
/**
* 获取 是否删除(0.否,1.是)
* @return deletedList
*/
public List<Integer> getDeletedList(){
return this.deletedList;
}
/**
* 设置 是否删除(0.否,1.是)
* @param deletedList
*/
public void setDeletedList(List<Integer> deletedList){
this.deletedList = deletedList;
}
/**
* 获取 是否删除(0.否,1.是)
* @return deletedNotList
*/
public List<Integer> getDeletedNotList(){
return this.deletedNotList;
}
/**
* 设置 是否删除(0.否,1.是)
* @param deletedNotList
*/
public void setDeletedNotList(List<Integer> deletedNotList){
this.deletedNotList = deletedNotList;
}
/**
* 获取 一体化经办人id
* @return operatorIdList
*/
public List<String> getOperatorIdList(){
return this.operatorIdList;
}
/**
* 设置 一体化经办人id
* @param operatorIdList
*/
public void setOperatorIdList(List<String> operatorIdList){
this.operatorIdList = operatorIdList;
}
/**
* 获取 一体化经办人id
* @return operatorIdNotList
*/
public List<String> getOperatorIdNotList(){
return this.operatorIdNotList;
}
/**
* 设置 一体化经办人id
* @param operatorIdNotList
*/
public void setOperatorIdNotList(List<String> operatorIdNotList){
this.operatorIdNotList = operatorIdNotList;
}
/** /**
* 获取 开始 创建时间 * 获取 开始 创建时间
* @return createTimeStart * @return createTimeStart
...@@ -1741,38 +1869,6 @@ public class WorkmanQuery extends WorkmanEntity { ...@@ -1741,38 +1869,6 @@ public class WorkmanQuery extends WorkmanEntity {
this.lastLoginAddressNotList = lastLoginAddressNotList; this.lastLoginAddressNotList = lastLoginAddressNotList;
} }
/**
* 获取 一体化经办人id
* @return operatorIdList
*/
public List<String> getOperatorIdList(){
return this.operatorIdList;
}
/**
* 设置 一体化经办人id
* @param operatorIdList
*/
public void setOperatorIdList(List<String> operatorIdList){
this.operatorIdList = operatorIdList;
}
/**
* 获取 一体化经办人id
* @return operatorIdNotList
*/
public List<String> getOperatorIdNotList(){
return this.operatorIdNotList;
}
/**
* 设置 一体化经办人id
* @param operatorIdNotList
*/
public void setOperatorIdNotList(List<String> operatorIdNotList){
this.operatorIdNotList = operatorIdNotList;
}
/** /**
* 设置 序号,主键,自增长 * 设置 序号,主键,自增长
* @param id * @param id
...@@ -2566,6 +2662,79 @@ public class WorkmanQuery extends WorkmanEntity { ...@@ -2566,6 +2662,79 @@ public class WorkmanQuery extends WorkmanEntity {
return this; return this;
} }
/**
* 设置 是否删除(0.否,1.是)
* @param deleted
*/
public WorkmanQuery deleted(Integer deleted){
setDeleted(deleted);
return this;
}
/**
* 设置 开始 是否删除(0.否,1.是)
* @param deletedStart
*/
public WorkmanQuery deletedStart(Integer deletedStart){
this.deletedStart = deletedStart;
return this;
}
/**
* 设置 结束 是否删除(0.否,1.是)
* @param deletedEnd
*/
public WorkmanQuery deletedEnd(Integer deletedEnd){
this.deletedEnd = deletedEnd;
return this;
}
/**
* 设置 增加 是否删除(0.否,1.是)
* @param deletedIncrement
*/
public WorkmanQuery deletedIncrement(Integer deletedIncrement){
this.deletedIncrement = deletedIncrement;
return this;
}
/**
* 设置 是否删除(0.否,1.是)
* @param deletedList
*/
public WorkmanQuery deletedList(List<Integer> deletedList){
this.deletedList = deletedList;
return this;
}
/**
* 设置 是否删除(0.否,1.是)
* @param deletedNotList
*/
public WorkmanQuery deletedNotList(List<Integer> deletedNotList){
this.deletedNotList = deletedNotList;
return this;
}
/**
* 设置 一体化经办人id
* @param operatorId
*/
public WorkmanQuery operatorId(String operatorId){
setOperatorId(operatorId);
return this;
}
/**
* 设置 一体化经办人id
* @param operatorIdList
*/
public WorkmanQuery operatorIdList(List<String> operatorIdList){
this.operatorIdList = operatorIdList;
return this;
}
/** /**
* 设置 创建用户 * 设置 创建用户
...@@ -2642,25 +2811,6 @@ public class WorkmanQuery extends WorkmanEntity { ...@@ -2642,25 +2811,6 @@ public class WorkmanQuery extends WorkmanEntity {
return this; return this;
} }
/**
* 设置 一体化经办人id
* @param operatorId
*/
public WorkmanQuery operatorId(String operatorId){
setOperatorId(operatorId);
return this;
}
/**
* 设置 一体化经办人id
* @param operatorIdList
*/
public WorkmanQuery operatorIdList(List<String> operatorIdList){
this.operatorIdList = operatorIdList;
return this;
}
/** /**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) * 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList * @return orConditionList
......
...@@ -23,6 +23,12 @@ import java.util.List; ...@@ -23,6 +23,12 @@ import java.util.List;
*/ */
@Data @Data
public class WorkmanVo extends BaseEntityLong { public class WorkmanVo extends BaseEntityLong {
/** 序号,主键,自增长列表 */
private List <Long> idList;
/** 序号,主键,自增长排除列表 */
private List <Long> idNotList;
private String oldPwd; private String oldPwd;
private String newPwd; private String newPwd;
...@@ -52,18 +58,4 @@ public class WorkmanVo extends BaseEntityLong { ...@@ -52,18 +58,4 @@ public class WorkmanVo extends BaseEntityLong {
@MobileDesensitize @MobileDesensitize
private String mobile; private String mobile;
public static void main(String[] args) {
WorkmanEntity workmanEntity = new WorkmanEntity();
ArrayList<WorkmanQuery> andConditionList = new ArrayList<>();
WorkmanQuery workmanQuery = new WorkmanQuery();
workmanQuery.setName("张三");
workmanQuery.setNumber("123");
andConditionList.add(workmanQuery);
workmanEntity.setAndConditionList(andConditionList);
System.out.println(JSON.toJSONString(workmanEntity));
}
} }
\ No newline at end of file
...@@ -10,6 +10,7 @@ import com.mortals.framework.util.SecurityUtil; ...@@ -10,6 +10,7 @@ import com.mortals.framework.util.SecurityUtil;
import com.mortals.framework.util.StringUtils; 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.code.YesNoEnum;
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.area.model.AreaEntity;
import com.mortals.xhx.module.workman.dao.WorkmanDao; import com.mortals.xhx.module.workman.dao.WorkmanDao;
...@@ -103,11 +104,8 @@ public class WorkmanServiceImpl extends AbstractCRUDCacheServiceImpl<WorkmanDao, ...@@ -103,11 +104,8 @@ 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.getExtCache(loginName); WorkmanEntity workmanEntity = this.selectOne(new WorkmanQuery().loginName(loginName).deleted(YesNoEnum.NO.getValue()));
if(ObjectUtils.isEmpty(workmanEntity)){ if (ObjectUtils.isEmpty(workmanEntity) ) {
workmanEntity = this.selectOne(new WorkmanQuery().loginName(loginName));
}
if (workmanEntity == null || !workmanEntity.getLoginName().equals(loginName)) {
throw new AppException("用户名不存在!"); throw new AppException("用户名不存在!");
} }
try { try {
...@@ -272,6 +270,16 @@ public class WorkmanServiceImpl extends AbstractCRUDCacheServiceImpl<WorkmanDao, ...@@ -272,6 +270,16 @@ public class WorkmanServiceImpl extends AbstractCRUDCacheServiceImpl<WorkmanDao,
} }
/**
* @param key
*/
@Override
public void removeCache(String key) {
WorkmanEntity cache = this.getCache(key);
if (ObjectUtils.isEmpty(cache)) return;
String extKey = this.getExtKey(cache);
if (ObjectUtils.isEmpty(extKey)) return;
super.removeCache(extKey);
super.removeCache(key);
}
} }
\ No newline at end of file
...@@ -16,7 +16,9 @@ import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; ...@@ -16,7 +16,9 @@ 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.base.system.upload.service.UploadService; import com.mortals.xhx.base.system.upload.service.UploadService;
import com.mortals.xhx.common.code.OnlineEnum; import com.mortals.xhx.common.code.OnlineEnum;
import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.module.dept.model.DeptEntity; import com.mortals.xhx.module.dept.model.DeptEntity;
import com.mortals.xhx.module.dept.model.DeptQuery;
import com.mortals.xhx.module.dept.service.DeptService; import com.mortals.xhx.module.dept.service.DeptService;
import com.mortals.xhx.module.site.model.SiteEntity; import com.mortals.xhx.module.site.model.SiteEntity;
import com.mortals.xhx.module.site.service.SiteService; import com.mortals.xhx.module.site.service.SiteService;
...@@ -61,6 +63,7 @@ public class WorkmanController extends BaseCRUDJsonBodyMappingController<Workman ...@@ -61,6 +63,7 @@ public class WorkmanController extends BaseCRUDJsonBodyMappingController<Workman
super.setModuleDesc("工作人员"); super.setModuleDesc("工作人员");
} }
@Override @Override
protected void init(Map<String, Object> model, Context context) { protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "politicalstatus", paramService.getParamBySecondOrganize("Workman", "politicalstatus")); this.addDict(model, "politicalstatus", paramService.getParamBySecondOrganize("Workman", "politicalstatus"));
...@@ -72,6 +75,20 @@ public class WorkmanController extends BaseCRUDJsonBodyMappingController<Workman ...@@ -72,6 +75,20 @@ public class WorkmanController extends BaseCRUDJsonBodyMappingController<Workman
} }
/**
* @param query
* @param model
* @param context
* @throws AppException
*/
@Override
protected void doListBefore(WorkmanEntity query, Map<String, Object> model, Context context) throws AppException {
if (!ObjectUtils.isEmpty(query)) {
query.setDeleted(YesNoEnum.NO.getValue());
}
super.doListBefore(query, model, context);
}
/** /**
* *
*/ */
...@@ -202,6 +219,8 @@ public class WorkmanController extends BaseCRUDJsonBodyMappingController<Workman ...@@ -202,6 +219,8 @@ public class WorkmanController extends BaseCRUDJsonBodyMappingController<Workman
if (!ObjectUtils.isEmpty(siteId)) { if (!ObjectUtils.isEmpty(siteId)) {
siteEntity = siteService.get(Long.parseLong(siteId)); siteEntity = siteService.get(Long.parseLong(siteId));
} }
if (!ObjectUtils.isEmpty(deptId)) { if (!ObjectUtils.isEmpty(deptId)) {
deptEntity = deptService.get(Long.parseLong(deptId)); deptEntity = deptService.get(Long.parseLong(deptId));
} }
...@@ -224,11 +243,21 @@ public class WorkmanController extends BaseCRUDJsonBodyMappingController<Workman ...@@ -224,11 +243,21 @@ public class WorkmanController extends BaseCRUDJsonBodyMappingController<Workman
if (ObjectUtils.isEmpty(workmanEntity.getLoginPwd()) || "".equals(workmanEntity.getLoginPwd().trim())) { if (ObjectUtils.isEmpty(workmanEntity.getLoginPwd()) || "".equals(workmanEntity.getLoginPwd().trim())) {
workmanEntity.setLoginPwd("123"); workmanEntity.setLoginPwd("123");
} }
if (!ObjectUtils.isEmpty(workmanEntity.getDeptName())) {
DeptEntity dept = deptService.selectOne(new DeptQuery().name(workmanEntity.getDeptName()).siteId(siteEntity.getId()));
if(!ObjectUtils.isEmpty(dept)){
workmanEntity.setDeptId(dept.getId());
workmanEntity.setDeptName(dept.getName());
}
}
if (!ObjectUtils.isEmpty(deptEntity)) { if (!ObjectUtils.isEmpty(deptEntity)) {
workmanEntity.setDeptId(deptEntity.getId()); workmanEntity.setDeptId(deptEntity.getId());
workmanEntity.setDeptName(deptEntity.getName()); workmanEntity.setDeptName(deptEntity.getName());
} }
if (!ObjectUtils.isEmpty(windowEntity)) { if (!ObjectUtils.isEmpty(windowEntity)) {
workmanEntity.setWindowId(windowEntity.getId()); workmanEntity.setWindowId(windowEntity.getId());
workmanEntity.setWindowName(windowEntity.getName()); workmanEntity.setWindowName(windowEntity.getName());
......
...@@ -24,9 +24,8 @@ POST {{baseUrl}}/app/interlist ...@@ -24,9 +24,8 @@ POST {{baseUrl}}/app/interlist
Content-Type: application/json Content-Type: application/json
{ {
"idList": [2,3,1],
"siteId": 1, "siteId": 1,
"appTypeNotList": [4],
"aaa": 111,
"page": 1, "page": 1,
"size": -1 "size": -1
} }
......
...@@ -9,6 +9,10 @@ ...@@ -9,6 +9,10 @@
"baseUrl": "http://192.168.0.98:11071/base" "baseUrl": "http://192.168.0.98:11071/base"
}, },
"base-product": {
"baseUrl": "http://192.168.0.250:11071/base"
},
"base-yanyuan-test": { "base-yanyuan-test": {
"baseUrl": "http://192.168.0.119:11078/base" "baseUrl": "http://192.168.0.119:11078/base"
}, },
......
...@@ -45,12 +45,14 @@ Content-Type: application/json ...@@ -45,12 +45,14 @@ Content-Type: application/json
###基础事项列表 ###基础事项列表
POST {{baseUrl}}/site/matter/list POST {{baseUrl}}/site/matter/interlist
Content-Type: application/json Content-Type: application/json
{ {
"page": 1, "page": 1,
"size": 10 "size": 10,
"siteId": 1,
"matterName": "特种设备作业人员资格认定取证"
} }
###微官网事项列表 ###微官网事项列表
...@@ -151,7 +153,7 @@ client.global.set("Matter_id", JSON.parse(response.body).data.id); ...@@ -151,7 +153,7 @@ client.global.set("Matter_id", JSON.parse(response.body).data.id);
%} %}
###基础事项查看 ###基础事项查看
GET {{baseUrl}}/matter/interinfo?id=34081 GET {{baseUrl}}/matter/interinfo?id=40248
Accept: application/json Accept: application/json
###基础事项编辑 ###基础事项编辑
......
...@@ -109,9 +109,20 @@ POST {{baseUrl}}/site/getAreaSitesByAreaLevel ...@@ -109,9 +109,20 @@ POST {{baseUrl}}/site/getAreaSitesByAreaLevel
Content-Type: application/json Content-Type: application/json
{ {
"areaLevel":2
"areaLevelList": [3,4,5]
} }
###根据区域等级获取站点列表
POST {{baseUrl}}/site/getSitesGroupByAreaLevel
Content-Type: application/json
{
"areaLevel":3,
"areaLevelList": [3]
}
###站点列表 ###站点列表
POST {{baseUrl}}/site/getAreaSitesBySite POST {{baseUrl}}/site/getAreaSitesBySite
Content-Type: application/json Content-Type: application/json
......
...@@ -9,7 +9,7 @@ Content-Type: application/json ...@@ -9,7 +9,7 @@ Content-Type: application/json
{ {
"loginName":"admin", "loginName":"admin",
"password":"xhxADMIN8@a", "password":"admin",
"securityCode":"admin" "securityCode":"admin"
} }
...@@ -217,7 +217,7 @@ Content-Type: application/json ...@@ -217,7 +217,7 @@ Content-Type: application/json
{ {
"page":1, "page":1,
"secondOrganize": "hongqi" "name": "%domain%"
} }
......
...@@ -3,7 +3,7 @@ POST {{baseUrl}}/workman/doLogin ...@@ -3,7 +3,7 @@ POST {{baseUrl}}/workman/doLogin
Content-Type: application/json Content-Type: application/json
{ {
"loginName":"yangying", "loginName":"wangtao123",
"loginPwd":"123", "loginPwd":"123",
"siteId": 1 "siteId": 1
} }
...@@ -40,7 +40,14 @@ Accept: application/json ...@@ -40,7 +40,14 @@ Accept: application/json
###工作人员删除 ###工作人员删除
GET {{baseUrl}}/workman/delete?id={{Workman_id}} GET {{baseUrl}}/workman/delete?id=35
Authorization: {{authToken}}
Accept: application/json
###工作人员逻辑删除
GET {{baseUrl}}/workman/logicDelete?id=36
Authorization: {{authToken}}
Accept: application/json Accept: application/json
......
...@@ -316,6 +316,22 @@ img { ...@@ -316,6 +316,22 @@ img {
background-color: rgba(5, 149, 253, 1); background-color: rgba(5, 149, 253, 1);
} }
.ant-table-fixed-header .ant-table-scroll .ant-table-header {
overflow: hidden !important;
margin-bottom: 0 !important;
padding-right: 6px;
tr:only-child > th:last-child {
border-right-color: #f0f0f0 !important;
}
}
.ant-table-placeholder {
width: calc(100% - 6px);
}
// .ant-table-header {
// background: #fff;
// }
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 6px; width: 6px;
height: 6px; height: 6px;
......
...@@ -73,6 +73,11 @@ Vue.config.productionTip = false; ...@@ -73,6 +73,11 @@ Vue.config.productionTip = false;
import Viewer from "v-viewer"; import Viewer from "v-viewer";
import "viewerjs/dist/viewer.css"; import "viewerjs/dist/viewer.css";
Vue.use(Viewer); Vue.use(Viewer);
// echarts
import * as echarts from "echarts";
Vue.prototype.$echarts = echarts;
// 图片懒加载插件 // 图片懒加载插件
import VueLazyload from "vue-lazyload"; import VueLazyload from "vue-lazyload";
Vue.use(VueLazyload, { Vue.use(VueLazyload, {
......
<template> <template>
<div class="h-full w-full flex flex-col"> <div class="h-full w-full flex flex-col">
<div class="total-info"> <div class="total-info">
<span class="mr-[30px]">次数:{{ total ?? 0 }}</span> <span class="mr-[30px]">异常次数:{{ total ?? 0 }}</span>
<span>统计时间段:{{ time[0] }} - {{ time[1] }}</span> <span>统计时间段:{{ time[0] }} - {{ time[1] }}</span>
</div> </div>
<div class="reportforms-out-box"> <div class="reportforms-out-box">
...@@ -56,6 +56,4 @@ export default { ...@@ -56,6 +56,4 @@ export default {
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped></style>
</style>
<template> <template>
<div class="h-full w-full flex flex-col"> <div class="h-full w-full flex flex-col">
<div class="total-info"> <div class="total-info">
<span class="mr-[30px]">次数:{{ total ?? 0 }}</span> <span class="mr-[30px]">异常次数:{{ total ?? 0 }}</span>
<span>统计时间段:{{ time[0] }} - {{ time[1] }}</span> <span>统计时间段:{{ time[0] }} - {{ time[1] }}</span>
</div> </div>
<div class="reportforms-out-box"> <div class="reportforms-out-box">
...@@ -56,6 +56,4 @@ export default { ...@@ -56,6 +56,4 @@ export default {
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped></style>
</style>
<template> <template>
<div class="h-full w-full flex flex-col"> <div class="h-full w-full flex flex-col">
<div class="total-info"> <div class="total-info">
<span class="mr-[30px]" v-if="isShow">评价次数{{ total || 0 }}</span> <span class="mr-[30px]">{{ totalTitle }}{{ total || 0 }}</span>
<span>统计时间段:{{ time[0] }} - {{ time[1] }}</span> <span>统计时间段:{{ time[0] }} - {{ time[1] }}</span>
</div> </div>
<div class="reportforms-out-box"> <div class="reportforms-out-box">
...@@ -30,6 +30,16 @@ export default { ...@@ -30,6 +30,16 @@ export default {
mixins: [common], mixins: [common],
data() { data() {
return { return {
pathList: {
"/home/dataManagement/evaluationRecordReport/windowsEvaluation":
"评价次数",
"/home/dataManagement/evaluationRecordReport/departmentEvaluation":
"评价次数",
"/home/dataManagement/evaluationRecordReport/matterEvaluation":
"评价次数",
"/home/dataManagement/evaluationRecordReport/windowLeft": "暂离记录",
"/home/dataManagement/evaluationRecordReport/staffLeft": "暂离记录",
},
total: 0, total: 0,
time: [ time: [
this.$moment().format("YYYY-MM-DD"), this.$moment().format("YYYY-MM-DD"),
...@@ -38,6 +48,10 @@ export default { ...@@ -38,6 +48,10 @@ export default {
}; };
}, },
computed: { computed: {
totalTitle() {
let path = this.$route.path;
return this.pathList[path];
},
tabsList() { tabsList() {
return getItemData( return getItemData(
this.$router.options.routes, this.$router.options.routes,
...@@ -45,14 +59,17 @@ export default { ...@@ -45,14 +59,17 @@ export default {
"evaluationRecordReport" "evaluationRecordReport"
); );
}, },
isShow(){ isShow() {
let val = this.$route.path let val = this.$route.path;
if ((val=='/home/dataManagement/evaluationRecordReport/windowLeft')||(val=='/home/dataManagement/evaluationRecordReport/staffLeft')) { if (
return false val == "/home/dataManagement/evaluationRecordReport/windowLeft" ||
}else{ val == "/home/dataManagement/evaluationRecordReport/staffLeft"
return true ) {
return false;
} else {
return true;
} }
} },
}, },
mounted() {}, mounted() {},
methods: { methods: {
...@@ -68,6 +85,4 @@ export default { ...@@ -68,6 +85,4 @@ export default {
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped></style>
</style>
<template> <template>
<div class="h-full w-full flex flex-col"> <div class="h-full w-full flex flex-col">
<div class="total-info"> <div class="total-info">
<span class="mr-[30px]">次数{{ total ?? 0 }}</span> <span class="mr-[30px]">{{ totalTitle }}{{ total ?? 0 }}</span>
<span>统计时间段:{{ time[0] }} - {{ time[1] }}</span> <span>统计时间段:{{ time[0] }} - {{ time[1] }}</span>
</div> </div>
<div class="reportforms-out-box"> <div class="reportforms-out-box">
...@@ -30,6 +30,11 @@ export default { ...@@ -30,6 +30,11 @@ export default {
mixins: [common], mixins: [common],
data() { data() {
return { return {
pathList: {
"/home/dataManagement/pickUp/pickUpRecord": "取件记录",
"/home/dataManagement/pickUp/depositRecord": "存件记录",
"/home/dataManagement/pickUp/otherRecord": "其他记录",
},
total: 0, total: 0,
time: [ time: [
this.$moment().format("YYYY-MM-DD"), this.$moment().format("YYYY-MM-DD"),
...@@ -38,6 +43,10 @@ export default { ...@@ -38,6 +43,10 @@ export default {
}; };
}, },
computed: { computed: {
totalTitle() {
let path = this.$route.path;
return this.pathList[path];
},
tabsList() { tabsList() {
return getItemData(this.$router.options.routes, "name", "pickUp"); return getItemData(this.$router.options.routes, "name", "pickUp");
}, },
...@@ -56,6 +65,4 @@ export default { ...@@ -56,6 +65,4 @@ export default {
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped></style>
</style>
<template> <template>
<div class="h-full w-full flex flex-col"> <div class="h-full w-full flex flex-col">
<div class="total-info"> <div class="total-info">
<span <span class="mr-[30px]">{{ totalTitle }}{{ total ?? 0 }}</span>
v-if="$route.path == '/home/dataManagement/queueCall/queueRecord'"
class="mr-[30px]"
>取号次数:{{ total ?? 0 }}</span
>
<span
v-if="$route.path == '/home/dataManagement/queueCall/numAcquisition'"
class="mr-[30px]"
>取号次数:{{ total ?? 0 }}</span
>
<span
v-if="$route.path == '/home/dataManagement/queueCall/callRecord'"
class="mr-[30px]"
>呼叫次数:{{ total ?? 0 }}</span
>
<span>统计时间段:{{ time[0] }} - {{ time[1] }}</span> <span>统计时间段:{{ time[0] }} - {{ time[1] }}</span>
</div> </div>
<div class="reportforms-out-box"> <div class="reportforms-out-box">
...@@ -53,6 +39,11 @@ export default { ...@@ -53,6 +39,11 @@ export default {
mixins: [common], mixins: [common],
data() { data() {
return { return {
pathList: {
"/home/dataManagement/queueCall/queueRecord": "取号次数",
"/home/dataManagement/queueCall/numAcquisition": "取号次数",
"/home/dataManagement/queueCall/callRecord": "呼叫次数",
},
total: 0, total: 0,
time: [ time: [
this.$moment().format("YYYY-MM-DD"), this.$moment().format("YYYY-MM-DD"),
...@@ -61,6 +52,10 @@ export default { ...@@ -61,6 +52,10 @@ export default {
}; };
}, },
computed: { computed: {
totalTitle() {
let path = this.$route.path;
return this.pathList[path];
},
tabsList() { tabsList() {
return getItemData(this.$router.options.routes, "name", "queueCall"); return getItemData(this.$router.options.routes, "name", "queueCall");
}, },
...@@ -79,6 +74,4 @@ export default { ...@@ -79,6 +74,4 @@ export default {
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped></style>
</style>
...@@ -90,7 +90,7 @@ export default { ...@@ -90,7 +90,7 @@ export default {
area: [], area: [],
sign: [], sign: [],
chart: null, chart: null,
dayValue: "", dayValue: "0",
}; };
}, },
components: { components: {
......
...@@ -123,8 +123,6 @@ export default { ...@@ -123,8 +123,6 @@ export default {
.ant-layout-content { .ant-layout-content {
background: #fff; background: #fff;
flex: 1; flex: 1;
overflow-y: auto;
overflow-x: hidden;
} }
} }
&::before { &::before {
...@@ -152,4 +150,3 @@ export default { ...@@ -152,4 +150,3 @@ export default {
} }
} }
</style> </style>
...@@ -427,12 +427,6 @@ export default { ...@@ -427,12 +427,6 @@ export default {
// } // }
} }
&:nth-child(1) { &:nth-child(1) {
.type-list {
border-style: solid;
border-right-width: 2px;
border-image: linear-gradient(180deg, #0000 0%, #fff 30%, #0000 90%) 1;
// border-image-slice: 2;
}
.item-logo { .item-logo {
background: linear-gradient(180deg, #c7e1f6 0%, #ffffff 85%); background: linear-gradient(180deg, #c7e1f6 0%, #ffffff 85%);
} }
...@@ -440,6 +434,8 @@ export default { ...@@ -440,6 +434,8 @@ export default {
&:nth-child(2) { &:nth-child(2) {
.type-list { .type-list {
border-style: solid; border-style: solid;
border-width: 0px;
border-left-width: 2px;
border-right-width: 2px; border-right-width: 2px;
border-image: linear-gradient(180deg, #0000 0%, #fff 30%, #0000 90%) 1; border-image: linear-gradient(180deg, #0000 0%, #fff 30%, #0000 90%) 1;
// border-image-slice: 2; // border-image-slice: 2;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -113,6 +113,9 @@ public class OperLogServiceImpl extends AbstractCRUDServiceImpl<OperLogDao,OperL ...@@ -113,6 +113,9 @@ public class OperLogServiceImpl extends AbstractCRUDServiceImpl<OperLogDao,OperL
operLogEntity.setContent(content); operLogEntity.setContent(content);
save(operLogEntity, null); save(operLogEntity, null);
} }
private void formatterLogContent(OperLogEntity operLogEntity, String content, String id, OperTypeEnum operType) { private void formatterLogContent(OperLogEntity operLogEntity, String content, String id, OperTypeEnum operType) {
if (operType == OperTypeEnum.SAVE) { if (operType == OperTypeEnum.SAVE) {
......
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