Commit fe416c54 authored by “yiyousong”'s avatar “yiyousong”
parents f8d5cc01 2dc7268b
<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>
<div>
<a-checkbox :checked="value" @change="onChange">
{{ checkText }}</a-checkbox
>
<slot></slot>
</a-checkbox>
</div>
</template>
......@@ -16,10 +16,6 @@ export default {
checked: {
required: true,
},
checkText: {
required: true,
default: "",
},
},
computed: {
value() {
......@@ -34,5 +30,4 @@ export default {
};
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
<style lang="less" scoped></style>
......@@ -181,19 +181,22 @@
</a-col>
<a-col :span="24">
<a-form-model-item label="中心Logo" prop="logoPath">
<a-upload
:action="api + 'base/file/commonupload'"
list-type="picture-card"
:file-list="fileList"
@preview="handlePreview"
@change="handleChange"
:accept="accept"
>
<div v-if="fileList.length < 1">
<a-icon type="plus" />
<div class="ant-upload-text">上传图片</div>
</div>
</a-upload>
<YUpload
accept=".png,.jpg,.jpeg,.svg"
:limit="1"
v-model="formInfo.logoPath"
listType="picture-card"
></YUpload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item class="site-style" label="站点风貌" prop="govAffairStyle">
<YUpload
accept=".png,.jpg,.jpeg,.svg"
:limit="0"
v-model="formInfo.govAffairStyle"
listType="picture-card"
></YUpload>
</a-form-model-item>
</a-col>
</a-row>
......@@ -237,33 +240,12 @@
</a-row>
<a-form-model-item label="工作日">
<y-checkbox
v-model="formInfo.workday1"
checkText="星期一"
></y-checkbox>
<y-checkbox
v-model="formInfo.workday2"
checkText="星期二"
></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>
v-model="formInfo[key]"
v-for="(v, key) in workday"
:key="key"
>
{{ v }}
</y-checkbox>
</a-form-model-item>
<a-row>
<a-col :span="4">
......@@ -306,9 +288,19 @@
import { modelList, siteSave } from "@/services/basicsetFun";
import YCheckbox from "@/components/ycheckbox/YCheckbox.vue";
import YSwitch from "@/components/yswitch/YSwitch.vue";
import YUpload from "@/components/YUpload.vue";
// import options from "@/utils/city";
import { regionData } from "element-china-area-data";
import { checkPort, checkIp } from "@/utils/validate";
const workday = {
workday1: "星期一",
workday2: "星期二",
workday3: "星期三",
workday4: "星期四",
workday5: "星期五",
workday6: "星期六",
workday7: "星期天",
};
export default {
props: {
formVisible: {
......@@ -323,10 +315,11 @@ export default {
components: {
YCheckbox,
YSwitch,
YUpload,
},
data() {
// 验证手机号码
const changePhone = (rule, value, callback) => {
// 验证手机号码
const changePhone = (rule, value, callback) => {
if (!value) {
callback(new Error("请输入手机号"));
callback();
......@@ -336,17 +329,8 @@ export default {
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 {
workday,
api: process.env.VUE_APP_API_BASE_URL + "/",
accept: "image/jpeg,image/png", // 上传类型
loading: false,
......@@ -396,10 +380,10 @@ export default {
onlineTake: 0, // 在线取号
appointment: 0, // 微预约
gowMap: 0, // 政务地图
govAffairStyle:'', // 站点风貌
}, //表单提交数据
indeterminate: true,
checkAll: false,
fileList: [],
formRules: {
siteName: [
{
......@@ -595,14 +579,12 @@ export default {
},
//重置
resetForm() {
this.fileList = [];
this.cityData = [];
this.$refs.ruleForm.resetFields();
},
// 关闭对话框
closeModal() {
this.fileList = [];
this.$refs.ruleForm.resetFields();
this.resetForm();
this.Visible = false;
},
// 新增
......@@ -614,30 +596,43 @@ export default {
// 编辑
onEdit(data) {
this.$nextTick(() => {
this.formInfo = { ...data };
this.areaInfo.areaID = this.formInfo.areaID;
this.areaInfo.areaCode = this.formInfo.areaCode;
this.areaInfo.areaName = this.formInfo.areaName;
this.cityData = [
this.formInfo.proCode,
this.formInfo.cityCode,
this.formInfo.districtCode,
];
this.formInfo.modelIds = this.formInfo.modelIds.map(Number);
this.formInfo.amWorkStartTime = String(this.formInfo.amWorkStartTime);
this.formInfo.amWorkEndTime = String(this.formInfo.amWorkEndTime);
this.formInfo.pmWorkStartTime = String(this.formInfo.pmWorkStartTime);
this.formInfo.pmWorkEndTime = String(this.formInfo.pmWorkEndTime);
if (this.formInfo.logoPath) {
this.fileList = [
{
uid: -1,
status: "done",
name: this.formInfo.logoPath,
url: this.formInfo.logoPath,
},
];
let {
areaID,
areaCode,
areaName,
proCode,
cityCode,
districtCode,
modelIds,
amWorkStartTime,
amWorkEndTime,
pmWorkStartTime,
pmWorkEndTime,
} = (this.formInfo = data);
this.areaInfo.areaID = areaID;
this.areaInfo.areaCode = areaCode;
this.areaInfo.areaName = areaName;
this.cityData = [proCode, cityCode, districtCode];
if (modelIds) {
this.formInfo.modelIds = modelIds && modelIds.map(Number);
}
[
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 +653,20 @@ export default {
this.loading = false;
if (code === 1) {
this.$message.success(msg);
this.fileList = [];
this.Visible = false;
this.closeModal();
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
handlePreview(info) {
this.$viewerApi({
images: [info.url],
});
},
// 删除logo
// handleRemove() {
// this.formInfo.logoPath = "";
// },
// 地址
oncityChange(val) {
[
......@@ -728,6 +675,7 @@ export default {
this.formInfo.districtCode,
] = val;
},
// 获取详细地址经纬度
getAddress(address) {
this.$refs.ruleForm.validateField("detailAddress", (errVal) => {
if (errVal !== "中心详细地址不能为空") {
......@@ -833,4 +781,5 @@ export default {
margin-bottom: 6px;
}
}
</style>
......@@ -17,14 +17,14 @@
>同步数据</a-button
>
<a-button
type="primary"
v-permission="[1]"
type="primary"
@click="editSiteInfo(siteData[0])"
>编辑</a-button
>
<a-button
type="danger"
v-permission="[1]"
type="danger"
@click="deleteSite(siteData[0].id, 0)"
>删除</a-button
>
......@@ -160,27 +160,14 @@
<a-row>
<a-col :span="16">
<span>工作日:</span>
<span class="work-day" v-if="item.workday1 === 1"
>星期一</span
>
<span class="work-day" v-if="item.workday2 === 1"
>星期二</span
>
<span class="work-day" v-if="item.workday3 === 1"
>星期三</span
>
<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
>
<template v-for="(day, i) in workday">
<span
:key="day"
class="work-day"
v-if="item[`workday${i + 1}`]"
>{{ day }}</span
>
</template>
</a-col>
</a-row>
</div>
......@@ -196,7 +183,9 @@
v-for="(v, i) in item.modelData"
:key="i"
>
<div class="item-text">
{{ v }}
</div>
</div>
</div>
</a-col>
......@@ -267,6 +256,15 @@ import {
getSiteList,
SyncSiteData,
} from "@/services/basicsetFun";
const workday = [
"星期一",
"星期二",
"星期三",
"星期四",
"星期五",
"星期六",
"星期日",
];
export default {
components: {
sitetree,
......@@ -277,6 +275,7 @@ export default {
data() {
return {
workday,
loading: false,
title: "新增站点",
formVisible: false,
......@@ -310,7 +309,7 @@ export default {
if (res.data.code === 1) {
let { data, dict } = res.data.data;
data.forEach((v) => {
v.modelIds = v.modelIds.split(",");
v.modelIds = v.modelIds && v.modelIds.split(",");
v.modelData = Object.keys(dict.modelIds)
.reduce(
(pre, cur) => (
......@@ -329,10 +328,9 @@ export default {
async getSiteInfo() {
this.loading = true;
let res = await siteInfo({ id: this.siteId });
this.loading = false;
if (res.data.code === 1) {
let { data, dict } = res.data;
data.modelIds = data.modelIds.split(",");
data.modelIds = data.modelIds && data.modelIds.split(",");
data.modelData = Object.keys(dict.modelIds)
.reduce(
(pre, cur) => (
......@@ -345,6 +343,7 @@ export default {
});
this.siteData = [data];
}
this.loading = false;
},
// 删除
......@@ -378,18 +377,18 @@ export default {
},
//查看全部
cookAll(text) {
this.allShow = true;
this.details = text;
this.allShow = true;
},
//新增站点
addSiteAll() {
if (this.areaID) {
this.title = "新增站点";
this.formVisible = true;
this.$refs.addsite.onAdd();
} else {
if (!this.areaID) {
this.$message.warning("请先选择区域");
return;
}
this.title = "新增站点";
this.formVisible = true;
this.$refs.addsite.onAdd();
},
// 切换站点
changePage(num) {
......@@ -399,10 +398,11 @@ export default {
this.formVisible = false;
},
// 编辑
editSiteInfo(data) {
editSiteInfo(row) {
this.title = "编辑站点";
this.formVisible = true;
let data = this.$_.cloneDeep(row);
this.$refs.addsite.onEdit(data);
this.formVisible = true;
},
// 同步数据
handleSync(id) {
......@@ -564,18 +564,24 @@ export default {
.item_box {
display: flex;
flex-wrap: wrap;
gap: 10px;
.item {
width: 140px;
height: 54px;
margin-right: 10px;
margin-bottom: 10px;
padding: 6px;
display: flex;
align-items: center;
justify-content: center;
background-color: #38b6ff;
text-align: center;
color: #fff;
border-radius: 5px;
.item-text{
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
}
}
}
......
......@@ -170,6 +170,7 @@ module.exports = {
info: `${BASE_URL}/base/workman/info`,
save: `${BASE_URL}/base/workman/save`,
delete: `${BASE_URL}/base/workman/delete`,
logicDelete: `${BASE_URL}/base/workman/logicDelete`,
downloadTemplate: `${BASE_URL}/base/workman/downloadTemplate`,
importData: `${BASE_URL}/base/workman/importData`,
exportExcel: `${BASE_URL}/base/workman/exportExcel`,
......
......@@ -85,7 +85,7 @@ export async function saveWorkman(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) {
......
......@@ -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;
......@@ -274,3 +274,10 @@ CREATE INDEX idx_datumId ON mortals_sys_matter_datum_file (datumId);
-- ----------------------------
ALTER TABLE mortals_sys_site ADD COLUMN `govAffairStyle` varchar(1024) COMMENT '政务风貌,多个逗号分割' AFTER modelIds;
-- ----------------------------
-- 2024-12-5
-- ----------------------------
ALTER TABLE mortals_sys_workman ADD COLUMN `deleted` tinyint(2) DEFAULT '0' COMMENT '是否删除(0.否,1.是)' AFTER modelIds;
......@@ -412,14 +412,14 @@ public class AppServiceImpl extends AbstractCRUDCacheServiceImpl<AppDao, AppEnti
AppVersionEntity curAppVersionEntity = appVersionEntities.get(0);
// String versionNum = StrUtil.subAfter(curAppVersionEntity.getVersion(), Constant.VERSION_PREFIX, false);
Integer versionNum = curAppVersionEntity.getVersion();
// Integer newVersionNum = versionNum++;
Integer newVersionNum = ++versionNum;
AppVersionEntity appVersionEntity = new AppVersionEntity();
appVersionEntity.initAttrValue();
AppVersionEntity versionEntity = new AppVersionEntity();
versionEntity.initAttrValue();
versionEntity.setAppId(entity.getId());
versionEntity.setAppName(entity.getAppName());
versionEntity.setVersion(versionNum);
versionEntity.setVersion(newVersionNum);
versionEntity.setNotes(entity.getNotes());
versionEntity.setFileName(entity.getFileName());
versionEntity.setFilePath(entity.getFilePath());
......
package com.mortals.xhx.module.workman.model;
import java.util.Date;
import java.util.List;
import java.util.ArrayList;
import java.math.BigDecimal;
import cn.hutool.core.date.DateUtil;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.workman.model.vo.WorkmanVo;
import lombok.Data;
/**
* 工作人员实体对象
*
* @author zxfei
* @date 2022-12-23
* @date 2024-12-05
*/
@Data
public class WorkmanEntity extends WorkmanVo {
private static final long serialVersionUID = 1L;
/**
* 登录用户名
*/
@Excel(name = "用户名")
private String loginName;
/**
* 密码
*/
@Excel(name = "密码")
private String loginPwd;
/**
* 部门id号
......@@ -54,17 +55,14 @@ public class WorkmanEntity extends WorkmanVo {
/**
* 姓名
*/
@Excel(name = "姓名")
private String name;
/**
* 工号
*/
@Excel(name = "工号")
private String number;
/**
* 职务
*/
@Excel(name = "职务")
private String userpost;
/**
* 职称
......@@ -73,12 +71,10 @@ public class WorkmanEntity extends WorkmanVo {
/**
* 政治面貌 (0.中共党员,1.中共预备党员,2.共青团员,3.普通居民,4.其它)
*/
@Excel(name = "政治面貌 ",combo={"中共党员","中共预备党员","共青团员","普通居民","其它"}, readConverterExp = "0=中共党员,1=中共预备党员,2=共青团员,3=普通居民,4=其它")
private Integer politicalstatus;
/**
* 党员 (0.非党员,1.党员,2.党员示范岗,3.党员先锋岗)
*/
@Excel(name = "党员 ",combo={"非党员","党员","党员示范岗","党员先锋岗"}, readConverterExp = "0=非党员,1=党员,2=党员示范岗,3=党员先锋岗")
private Integer dangyuan;
/**
* 党员扩展
......@@ -95,37 +91,30 @@ public class WorkmanEntity extends WorkmanVo {
/**
* 手机
*/
@Excel(name = "手机")
private String mobile;
/**
* 星级
*/
@Excel(name = "星级")
private Integer starlevel;
/**
* 个人简介
*/
@Excel(name = "个人简介")
private String summary;
/**
* 照片
*/
@Excel(name = "照片",height = 90, type = Excel.Type.EXPORT, cellType = Excel.ColumnType.IMAGE)
private String photoPath;
/**
* 岗位职责
*/
@Excel(name = "岗位职责")
private String duty;
/**
* 服务承诺
*/
@Excel(name = "服务承诺")
private String promise;
/**
* 办理事项
*/
@Excel(name = "办理事项")
private String business;
/**
* 是否在线(0.离线,1.在线,2.暂离,3.点击暂离,4.回归,5.登陆)
......@@ -136,430 +125,21 @@ public class WorkmanEntity extends WorkmanVo {
*/
private String modelIds;
/**
* 最后一次登录时间
*/
private Date lastLoginTime;
/**
* 最后一次登录地址
* 是否删除(0.否,1.是)
*/
private String lastLoginAddress;
private Integer deleted;
/**
* 一体化经办人id
*/
private String operatorId;
public WorkmanEntity(){}
/**
* 获取 登录用户名
* @return String
*/
public String getLoginName(){
return loginName;
}
/**
* 设置 登录用户名
* @param loginName
*/
public void setLoginName(String loginName){
this.loginName = loginName;
}
/**
* 获取 密码
* @return String
*/
public String getLoginPwd(){
return loginPwd;
}
/**
* 设置 密码
* @param loginPwd
*/
public void setLoginPwd(String loginPwd){
this.loginPwd = loginPwd;
}
/**
* 获取 部门id号
* @return Long
*/
public Long getDeptId(){
return deptId;
}
/**
* 设置 部门id号
* @param deptId
*/
public void setDeptId(Long deptId){
this.deptId = deptId;
}
/**
* 获取 部门名称
* @return String
*/
public String getDeptName(){
return deptName;
}
/**
* 设置 部门名称
* @param deptName
*/
public void setDeptName(String deptName){
this.deptName = deptName;
}
/**
* 获取 窗口id号
* @return Long
*/
public Long getWindowId(){
return windowId;
}
/**
* 设置 窗口id号
* @param windowId
*/
public void setWindowId(Long windowId){
this.windowId = windowId;
}
/**
* 获取 窗口名称
* @return String
*/
public String getWindowName(){
return windowName;
}
/**
* 设置 窗口名称
* @param windowName
*/
public void setWindowName(String windowName){
this.windowName = windowName;
}
/**
* 获取 站点ID
* @return Long
*/
public Long getSiteId(){
return siteId;
}
/**
* 设置 站点ID
* @param siteId
*/
public void setSiteId(Long siteId){
this.siteId = siteId;
}
/**
* 获取 站点名称
* @return String
*/
public String getSiteName(){
return siteName;
}
/**
* 设置 站点名称
* @param siteName
*/
public void setSiteName(String siteName){
this.siteName = siteName;
}
/**
* 获取 姓名
* @return String
*/
public String getName(){
return name;
}
/**
* 设置 姓名
* @param name
*/
public void setName(String name){
this.name = name;
}
/**
* 获取 工号
* @return String
*/
public String getNumber(){
return number;
}
/**
* 设置 工号
* @param number
*/
public void setNumber(String number){
this.number = number;
}
/**
* 获取 职务
* @return String
*/
public String getUserpost(){
return userpost;
}
/**
* 设置 职务
* @param userpost
*/
public void setUserpost(String userpost){
this.userpost = userpost;
}
/**
* 获取 职称
* @return String
*/
public String getPosttitle(){
return posttitle;
}
/**
* 设置 职称
* @param posttitle
*/
public void setPosttitle(String posttitle){
this.posttitle = posttitle;
}
/**
* 获取 政治面貌 (0.中共党员,1.中共预备党员,2.共青团员,3.普通居民,4.其它)
* @return Integer
*/
public Integer getPoliticalstatus(){
return politicalstatus;
}
/**
* 设置 政治面貌 (0.中共党员,1.中共预备党员,2.共青团员,3.普通居民,4.其它)
* @param politicalstatus
*/
public void setPoliticalstatus(Integer politicalstatus){
this.politicalstatus = politicalstatus;
}
/**
* 获取 党员 (0.非党员,1.党员,2.党员示范岗,3.党员先锋岗)
* @return Integer
*/
public Integer getDangyuan(){
return dangyuan;
}
/**
* 设置 党员 (0.非党员,1.党员,2.党员示范岗,3.党员先锋岗)
* @param dangyuan
*/
public void setDangyuan(Integer dangyuan){
this.dangyuan = dangyuan;
}
/**
* 获取 党员扩展
* @return String
*/
public String getDangyuanext(){
return dangyuanext;
}
/**
* 设置 党员扩展
* @param dangyuanext
*/
public void setDangyuanext(String dangyuanext){
this.dangyuanext = dangyuanext;
}
/**
* 获取 身份证
* @return String
*/
public String getIdCard(){
return idCard;
}
/**
* 设置 身份证
* @param idCard
*/
public void setIdCard(String idCard){
this.idCard = idCard;
}
/**
* 获取 电话
* @return String
*/
public String getPhone(){
return phone;
}
/**
* 设置 电话
* @param phone
*/
public void setPhone(String phone){
this.phone = phone;
}
/**
* 获取 手机
* @return String
*/
public String getMobile(){
return mobile;
}
/**
* 设置 手机
* @param mobile
*/
public void setMobile(String mobile){
this.mobile = mobile;
}
/**
* 获取 星级
* @return Integer
*/
public Integer getStarlevel(){
return starlevel;
}
/**
* 设置 星级
* @param starlevel
*/
public void setStarlevel(Integer starlevel){
this.starlevel = starlevel;
}
/**
* 获取 个人简介
* @return String
*/
public String getSummary(){
return summary;
}
/**
* 设置 个人简介
* @param summary
*/
public void setSummary(String summary){
this.summary = summary;
}
/**
* 获取 照片
* @return String
*/
public String getPhotoPath(){
return photoPath;
}
/**
* 设置 照片
* @param photoPath
*/
public void setPhotoPath(String photoPath){
this.photoPath = photoPath;
}
/**
* 获取 岗位职责
* @return String
*/
public String getDuty(){
return duty;
}
/**
* 设置 岗位职责
* @param duty
*/
public void setDuty(String duty){
this.duty = duty;
}
/**
* 获取 服务承诺
* @return String
*/
public String getPromise(){
return promise;
}
/**
* 设置 服务承诺
* @param promise
*/
public void setPromise(String promise){
this.promise = promise;
}
/**
* 获取 办理事项
* @return String
*/
public String getBusiness(){
return business;
}
/**
* 设置 办理事项
* @param business
*/
public void setBusiness(String business){
this.business = business;
}
/**
* 获取 是否在线(0.离线,1.在线,2.暂离,3.点击暂离,4.回归,5.登陆)
* @return Integer
*/
public Integer getOnline(){
return online;
}
/**
* 设置 是否在线(0.离线,1.在线,2.暂离,3.点击暂离,4.回归,5.登陆)
* @param online
*/
public void setOnline(Integer online){
this.online = online;
}
/**
* 获取 配置站点模块,逗号分隔
* @return String
*/
public String getModelIds(){
return modelIds;
}
/**
* 设置 配置站点模块,逗号分隔
* @param modelIds
*/
public void setModelIds(String modelIds){
this.modelIds = modelIds;
}
/**
* 获取 最后一次登录时间
* @return Date
*/
public Date getLastLoginTime(){
return lastLoginTime;
}
/**
* 设置 最后一次登录时间
* @param lastLoginTime
*/
public void setLastLoginTime(Date lastLoginTime){
this.lastLoginTime = lastLoginTime;
}
/**
* 获取 最后一次登录地址
* @return String
*/
public String getLastLoginAddress(){
return lastLoginAddress;
}
/**
* 设置 最后一次登录地址
* @param lastLoginAddress
*/
public void setLastLoginAddress(String lastLoginAddress){
this.lastLoginAddress = lastLoginAddress;
}
/**
* 获取 一体化经办人id
* @return String
* 最后一次登录时间
*/
public String getOperatorId(){
return operatorId;
}
private Date lastLoginTime;
/**
* 设置 一体化经办人id
* @param operatorId
* 最后一次登录地址
*/
public void setOperatorId(String operatorId){
this.operatorId = operatorId;
}
private String lastLoginAddress;
@Override
public int hashCode() {
return this.getId().hashCode();
......@@ -576,95 +156,36 @@ public class WorkmanEntity extends WorkmanVo {
return false;
}
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",loginName:").append(getLoginName());
sb.append(",loginPwd:").append(getLoginPwd());
sb.append(",deptId:").append(getDeptId());
sb.append(",deptName:").append(getDeptName());
sb.append(",windowId:").append(getWindowId());
sb.append(",windowName:").append(getWindowName());
sb.append(",siteId:").append(getSiteId());
sb.append(",siteName:").append(getSiteName());
sb.append(",name:").append(getName());
sb.append(",number:").append(getNumber());
sb.append(",userpost:").append(getUserpost());
sb.append(",posttitle:").append(getPosttitle());
sb.append(",politicalstatus:").append(getPoliticalstatus());
sb.append(",dangyuan:").append(getDangyuan());
sb.append(",dangyuanext:").append(getDangyuanext());
sb.append(",idCard:").append(getIdCard());
sb.append(",phone:").append(getPhone());
sb.append(",mobile:").append(getMobile());
sb.append(",starlevel:").append(getStarlevel());
sb.append(",summary:").append(getSummary());
sb.append(",photoPath:").append(getPhotoPath());
sb.append(",duty:").append(getDuty());
sb.append(",promise:").append(getPromise());
sb.append(",business:").append(getBusiness());
sb.append(",online:").append(getOnline());
sb.append(",modelIds:").append(getModelIds());
sb.append(",lastLoginTime:").append(getLastLoginTime());
sb.append(",lastLoginAddress:").append(getLastLoginAddress());
return sb.toString();
}
public void initAttrValue(){
this.loginName = "";
this.loginPwd = "";
this.deptId = null;
this.deptName = "";
this.windowId = null;
this.windowName = "";
this.siteId = null;
this.siteName = "";
this.name = "";
this.number = "";
this.userpost = "";
this.posttitle = "";
this.politicalstatus = 0;
this.dangyuan = 0;
this.dangyuanext = "";
this.idCard = "";
this.phone = "";
this.mobile = "";
this.starlevel = 0;
this.summary = "";
this.photoPath = "";
this.duty = null;
this.promise = null;
this.business = null;
this.duty = "";
this.promise = "";
this.business = "";
this.online = 1;
this.modelIds = "";
this.deleted = 0;
this.operatorId = "";
this.lastLoginTime = null;
this.lastLoginAddress = null;
this.lastLoginAddress = "";
}
}
\ No newline at end of file
......@@ -7,7 +7,7 @@ import com.mortals.xhx.module.workman.model.WorkmanEntity;
* 工作人员查询对象
*
* @author zxfei
* @date 2023-03-13
* @date 2024-12-05
*/
public class WorkmanQuery extends WorkmanEntity {
/** 开始 序号,主键,自增长 */
......@@ -225,6 +225,26 @@ public class WorkmanQuery extends WorkmanEntity {
/** 配置站点模块,逗号分隔排除列表 */
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;
......@@ -263,11 +283,6 @@ public class WorkmanQuery extends WorkmanEntity {
/** 最后一次登录地址排除列表 */
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) */
private List<WorkmanQuery> orConditionList;
......@@ -1532,6 +1547,119 @@ public class WorkmanQuery extends WorkmanEntity {
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
......@@ -1741,38 +1869,6 @@ public class WorkmanQuery extends WorkmanEntity {
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
......@@ -2566,6 +2662,79 @@ public class WorkmanQuery extends WorkmanEntity {
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 {
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)
* @return orConditionList
......
......@@ -23,6 +23,12 @@ import java.util.List;
*/
@Data
public class WorkmanVo extends BaseEntityLong {
/** 序号,主键,自增长列表 */
private List <Long> idList;
/** 序号,主键,自增长排除列表 */
private List <Long> idNotList;
private String oldPwd;
private String newPwd;
......@@ -52,18 +58,4 @@ public class WorkmanVo extends BaseEntityLong {
@MobileDesensitize
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;
import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.base.system.upload.service.UploadService;
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.module.area.model.AreaEntity;
import com.mortals.xhx.module.workman.dao.WorkmanDao;
......@@ -103,11 +104,8 @@ public class WorkmanServiceImpl extends AbstractCRUDCacheServiceImpl<WorkmanDao,
@Override
public WorkmanEntity doLogin(String loginName, String password, String loginIp) throws AppException {
WorkmanEntity workmanEntity = this.getExtCache(loginName);
if(ObjectUtils.isEmpty(workmanEntity)){
workmanEntity = this.selectOne(new WorkmanQuery().loginName(loginName));
}
if (workmanEntity == null || !workmanEntity.getLoginName().equals(loginName)) {
WorkmanEntity workmanEntity = this.selectOne(new WorkmanQuery().loginName(loginName).deleted(YesNoEnum.NO.getValue()));
if (ObjectUtils.isEmpty(workmanEntity) ) {
throw new AppException("用户名不存在!");
}
try {
......@@ -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,6 +16,7 @@ import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.base.system.upload.service.UploadService;
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.service.DeptService;
import com.mortals.xhx.module.site.model.SiteEntity;
......@@ -61,6 +62,7 @@ public class WorkmanController extends BaseCRUDJsonBodyMappingController<Workman
super.setModuleDesc("工作人员");
}
@Override
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "politicalstatus", paramService.getParamBySecondOrganize("Workman", "politicalstatus"));
......@@ -72,6 +74,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);
}
/**
*
*/
......
......@@ -32,16 +32,15 @@
<result property="business" column="business" />
<result property="online" column="online" />
<result property="modelIds" column="modelIds" />
<result property="deleted" column="deleted" />
<result property="operatorId" column="operatorId" />
<result property="createTime" column="createTime" />
<result property="createUserId" column="createUserId" />
<result property="updateTime" column="updateTime" />
<result property="lastLoginTime" column="lastLoginTime" />
<result property="lastLoginAddress" column="lastLoginAddress" />
<result property="operatorId" column="operatorId" />
</resultMap>
<!-- 表所有列 -->
<sql id="_columns">
<trim suffixOverrides="," suffix="">
......@@ -126,6 +125,12 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('modelIds') or colPickMode == 1 and data.containsKey('modelIds')))">
a.modelIds,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deleted') or colPickMode == 1 and data.containsKey('deleted')))">
a.deleted,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('operatorId') or colPickMode == 1 and data.containsKey('operatorId')))">
a.operatorId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
a.createTime,
</if>
......@@ -141,26 +146,23 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('lastLoginAddress') or colPickMode == 1 and data.containsKey('lastLoginAddress')))">
a.lastLoginAddress,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('operatorId') or colPickMode == 1 and data.containsKey('operatorId')))">
a.operatorId,
</if>
</trim>
</sql>
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="WorkmanEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_sys_workman
(loginName,loginPwd,deptId,deptName,windowId,windowName,siteId,siteName,name,number,userpost,posttitle,politicalstatus,dangyuan,dangyuanext,idCard,phone,mobile,starlevel,summary,photoPath,duty,promise,business,online,modelIds,createTime,createUserId,updateTime,lastLoginTime,lastLoginAddress,operatorId)
(loginName,loginPwd,deptId,deptName,windowId,windowName,siteId,siteName,name,number,userpost,posttitle,politicalstatus,dangyuan,dangyuanext,idCard,phone,mobile,starlevel,summary,photoPath,duty,promise,business,online,modelIds,deleted,operatorId,createTime,createUserId,updateTime,lastLoginTime,lastLoginAddress)
VALUES
(#{loginName},#{loginPwd},#{deptId},#{deptName},#{windowId},#{windowName},#{siteId},#{siteName},#{name},#{number},#{userpost},#{posttitle},#{politicalstatus},#{dangyuan},#{dangyuanext},#{idCard},#{phone},#{mobile},#{starlevel},#{summary},#{photoPath},#{duty},#{promise},#{business},#{online},#{modelIds},#{createTime},#{createUserId},#{updateTime},#{lastLoginTime},#{lastLoginAddress},#{operatorId})
(#{loginName},#{loginPwd},#{deptId},#{deptName},#{windowId},#{windowName},#{siteId},#{siteName},#{name},#{number},#{userpost},#{posttitle},#{politicalstatus},#{dangyuan},#{dangyuanext},#{idCard},#{phone},#{mobile},#{starlevel},#{summary},#{photoPath},#{duty},#{promise},#{business},#{online},#{modelIds},#{deleted},#{operatorId},#{createTime},#{createUserId},#{updateTime},#{lastLoginTime},#{lastLoginAddress})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_sys_workman
(loginName,loginPwd,deptId,deptName,windowId,windowName,siteId,siteName,name,number,userpost,posttitle,politicalstatus,dangyuan,dangyuanext,idCard,phone,mobile,starlevel,summary,photoPath,duty,promise,business,online,modelIds,createTime,createUserId,updateTime,lastLoginTime,lastLoginAddress,operatorId)
(loginName,loginPwd,deptId,deptName,windowId,windowName,siteId,siteName,name,number,userpost,posttitle,politicalstatus,dangyuan,dangyuanext,idCard,phone,mobile,starlevel,summary,photoPath,duty,promise,business,online,modelIds,deleted,operatorId,createTime,createUserId,updateTime,lastLoginTime,lastLoginAddress)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.loginName},#{item.loginPwd},#{item.deptId},#{item.deptName},#{item.windowId},#{item.windowName},#{item.siteId},#{item.siteName},#{item.name},#{item.number},#{item.userpost},#{item.posttitle},#{item.politicalstatus},#{item.dangyuan},#{item.dangyuanext},#{item.idCard},#{item.phone},#{item.mobile},#{item.starlevel},#{item.summary},#{item.photoPath},#{item.duty},#{item.promise},#{item.business},#{item.online},#{item.modelIds},#{item.createTime},#{item.createUserId},#{item.updateTime},#{item.lastLoginTime},#{item.lastLoginAddress},#{item.operatorId})
(#{item.loginName},#{item.loginPwd},#{item.deptId},#{item.deptName},#{item.windowId},#{item.windowName},#{item.siteId},#{item.siteName},#{item.name},#{item.number},#{item.userpost},#{item.posttitle},#{item.politicalstatus},#{item.dangyuan},#{item.dangyuanext},#{item.idCard},#{item.phone},#{item.mobile},#{item.starlevel},#{item.summary},#{item.photoPath},#{item.duty},#{item.promise},#{item.business},#{item.online},#{item.modelIds},#{item.deleted},#{item.operatorId},#{item.createTime},#{item.createUserId},#{item.updateTime},#{item.lastLoginTime},#{item.lastLoginAddress})
</foreach>
</insert>
......@@ -269,6 +271,15 @@
<if test="(colPickMode==0 and data.containsKey('modelIds')) or (colPickMode==1 and !data.containsKey('modelIds'))">
a.modelIds=#{data.modelIds},
</if>
<if test="(colPickMode==0 and data.containsKey('deleted')) or (colPickMode==1 and !data.containsKey('deleted'))">
a.deleted=#{data.deleted},
</if>
<if test="(colPickMode==0 and data.containsKey('deletedIncrement')) or (colPickMode==1 and !data.containsKey('deletedIncrement'))">
a.deleted=ifnull(a.deleted,0) + #{data.deletedIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('operatorId')) or (colPickMode==1 and !data.containsKey('operatorId'))">
a.operatorId=#{data.operatorId},
</if>
<if test="(colPickMode==0 and data.containsKey('createTime')) or (colPickMode==1 and !data.containsKey('createTime'))">
a.createTime=#{data.createTime},
</if>
......@@ -287,9 +298,6 @@
<if test="(colPickMode==0 and data.containsKey('lastLoginAddress')) or (colPickMode==1 and !data.containsKey('lastLoginAddress'))">
a.lastLoginAddress=#{data.lastLoginAddress},
</if>
<if test="(colPickMode==0 and data.containsKey('operatorId')) or (colPickMode==1 and !data.containsKey('operatorId'))">
a.operatorId=#{data.operatorId},
</if>
</trim>
<trim suffixOverrides="where" suffix="">
where
......@@ -519,6 +527,25 @@
</if>
</foreach>
</trim>
<trim prefix="deleted=(case" suffix="ELSE deleted end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('deleted')) or (colPickMode==1 and !item.containsKey('deleted'))">
when a.id=#{item.id} then #{item.deleted}
</when>
<when test="(colPickMode==0 and item.containsKey('deletedIncrement')) or (colPickMode==1 and !item.containsKey('deletedIncrement'))">
when a.id=#{item.id} then ifnull(a.deleted,0) + #{item.deletedIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="operatorId=(case" suffix="ELSE operatorId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('operatorId')) or (colPickMode==1 and !item.containsKey('operatorId'))">
when a.id=#{item.id} then #{item.operatorId}
</if>
</foreach>
</trim>
<trim prefix="createTime=(case" suffix="ELSE createTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('createTime')) or (colPickMode==1 and !item.containsKey('createTime'))">
......@@ -559,13 +586,6 @@
</if>
</foreach>
</trim>
<trim prefix="operatorId=(case" suffix="ELSE operatorId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('operatorId')) or (colPickMode==1 and !item.containsKey('operatorId'))">
when a.id=#{item.id} then #{item.operatorId}
</if>
</foreach>
</trim>
</trim>
where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
......@@ -677,6 +697,10 @@
<!-- 条件映射-代参数 -->
<sql id="_condition_param_">
<bind name="conditionParamRef" value="${_conditionParam_}"/>
<if test="permissionSql != null and permissionSql != ''">
${permissionSql}
</if>
<if test="conditionParamRef.containsKey('id')">
<if test="conditionParamRef.id != null">
${_conditionType_} a.id=#{${_conditionParam_}.id}
......@@ -1297,6 +1321,54 @@
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('deleted')">
<if test="conditionParamRef.deleted != null ">
${_conditionType_} a.deleted = #{${_conditionParam_}.deleted}
</if>
<if test="conditionParamRef.deleted == null">
${_conditionType_} a.deleted is null
</if>
</if>
<if test="conditionParamRef.containsKey('deletedList') and conditionParamRef.deletedList.size() > 0">
${_conditionType_} a.deleted in
<foreach collection="conditionParamRef.deletedList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('deletedNotList') and conditionParamRef.deletedNotList.size() > 0">
${_conditionType_} a.deleted not in
<foreach collection="conditionParamRef.deletedNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('deletedStart') and conditionParamRef.deletedStart != null">
${_conditionType_} a.deleted <![CDATA[ >= ]]> #{${_conditionParam_}.deletedStart}
</if>
<if test="conditionParamRef.containsKey('deletedEnd') and conditionParamRef.deletedEnd != null">
${_conditionType_} a.deleted <![CDATA[ <= ]]> #{${_conditionParam_}.deletedEnd}
</if>
<if test="conditionParamRef.containsKey('operatorId')">
<if test="conditionParamRef.operatorId != null and conditionParamRef.operatorId != ''">
${_conditionType_} a.operatorId like #{${_conditionParam_}.operatorId}
</if>
<if test="conditionParamRef.operatorId == null">
${_conditionType_} a.operatorId is null
</if>
</if>
<if test="conditionParamRef.containsKey('operatorIdList') and conditionParamRef.operatorIdList.size() > 0">
${_conditionType_} a.operatorId in
<foreach collection="conditionParamRef.operatorIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('operatorIdNotList') and conditionParamRef.operatorIdNotList.size() > 0">
${_conditionType_} a.operatorId not in
<foreach collection="conditionParamRef.operatorIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createTime')">
<if test="conditionParamRef.createTime != null ">
......@@ -1390,39 +1462,158 @@
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('operatorId')">
<if test="conditionParamRef.operatorId != null and conditionParamRef.operatorId != ''">
${_conditionType_} a.operatorId like #{${_conditionParam_}.operatorId}
</if>
<if test="conditionParamRef.operatorId == null">
${_conditionType_} a.operatorId is null
</if>
</if>
<if test="conditionParamRef.containsKey('operatorIdList') and conditionParamRef.operatorIdList.size() > 0">
${_conditionType_} a.operatorId in
<foreach collection="conditionParamRef.operatorIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('operatorIdNotList') and conditionParamRef.operatorIdNotList.size() > 0">
${_conditionType_} a.operatorId not in
<foreach collection="conditionParamRef.operatorIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
</sql>
<sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()">
order by
<if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
field(a.id,
<foreach collection="conditionParamRef.idList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('deptIdList') and conditionParamRef.deptIdList.size() > 0">
field(a.deptId,
<foreach collection="conditionParamRef.deptIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('windowIdList') and conditionParamRef.windowIdList.size() > 0">
field(a.windowId,
<foreach collection="conditionParamRef.windowIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('siteIdList') and conditionParamRef.siteIdList.size() > 0">
field(a.siteId,
<foreach collection="conditionParamRef.siteIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('politicalstatusList') and conditionParamRef.politicalstatusList.size() > 0">
field(a.politicalstatus,
<foreach collection="conditionParamRef.politicalstatusList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('dangyuanList') and conditionParamRef.dangyuanList.size() > 0">
field(a.dangyuan,
<foreach collection="conditionParamRef.dangyuanList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('starlevelList') and conditionParamRef.starlevelList.size() > 0">
field(a.starlevel,
<foreach collection="conditionParamRef.starlevelList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('onlineList') and conditionParamRef.onlineList.size() > 0">
field(a.online,
<foreach collection="conditionParamRef.onlineList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('deletedList') and conditionParamRef.deletedList.size() > 0">
field(a.deleted,
<foreach collection="conditionParamRef.deletedList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('createUserIdList') and conditionParamRef.createUserIdList.size() > 0">
field(a.createUserId,
<foreach collection="conditionParamRef.createUserIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<trim suffixOverrides="," suffix="">
<foreach collection="orderColList" open="" close="" index="index" item="item" separator=",">
${item.colName} ${item.sortKind}
a.${item.colName} ${item.sortKind}
</foreach>
</trim>
</if>
<if test="(orderColList == null or orderColList.isEmpty()) and orderCol != null and !orderCol.isEmpty()">
order by
<if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
field(a.id,
<foreach collection="conditionParamRef.idList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('deptIdList') and conditionParamRef.deptIdList.size() > 0">
field(a.deptId,
<foreach collection="conditionParamRef.deptIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('windowIdList') and conditionParamRef.windowIdList.size() > 0">
field(a.windowId,
<foreach collection="conditionParamRef.windowIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('siteIdList') and conditionParamRef.siteIdList.size() > 0">
field(a.siteId,
<foreach collection="conditionParamRef.siteIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('politicalstatusList') and conditionParamRef.politicalstatusList.size() > 0">
field(a.politicalstatus,
<foreach collection="conditionParamRef.politicalstatusList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('dangyuanList') and conditionParamRef.dangyuanList.size() > 0">
field(a.dangyuan,
<foreach collection="conditionParamRef.dangyuanList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('starlevelList') and conditionParamRef.starlevelList.size() > 0">
field(a.starlevel,
<foreach collection="conditionParamRef.starlevelList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('onlineList') and conditionParamRef.onlineList.size() > 0">
field(a.online,
<foreach collection="conditionParamRef.onlineList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('deletedList') and conditionParamRef.deletedList.size() > 0">
field(a.deleted,
<foreach collection="conditionParamRef.deletedList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('createUserIdList') and conditionParamRef.createUserIdList.size() > 0">
field(a.createUserId,
<foreach collection="conditionParamRef.createUserIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<trim suffixOverrides="," suffix="">
<if test="orderCol.containsKey('id')">
a.id
......@@ -1559,6 +1750,16 @@
<if test='orderCol.modelIds != null and "DESC".equalsIgnoreCase(orderCol.modelIds)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('deleted')">
a.deleted
<if test='orderCol.deleted != null and "DESC".equalsIgnoreCase(orderCol.deleted)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('operatorId')">
a.operatorId
<if test='orderCol.operatorId != null and "DESC".equalsIgnoreCase(orderCol.operatorId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('createTime')">
a.createTime
<if test='orderCol.createTime != null and "DESC".equalsIgnoreCase(orderCol.createTime)'>DESC</if>
......@@ -1584,13 +1785,10 @@
<if test='orderCol.lastLoginAddress != null and "DESC".equalsIgnoreCase(orderCol.lastLoginAddress)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('operatorId')">
a.operatorId
<if test='orderCol.operatorId != null and "DESC".equalsIgnoreCase(orderCol.operatorId)'>DESC</if>
,
</if>
</trim>
</if>
</sql>
<sql id="_group_by_">
<if test="groupList != null and !groupList.isEmpty()">
......
......@@ -9,7 +9,7 @@ Content-Type: application/json
{
"loginName":"admin",
"password":"xhxADMIN8@a",
"password":"admin",
"securityCode":"admin"
}
......
......@@ -3,7 +3,7 @@ POST {{baseUrl}}/workman/doLogin
Content-Type: application/json
{
"loginName":"yangying",
"loginName":"wangtao123",
"loginPwd":"123",
"siteId": 1
}
......@@ -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
......
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