Commit 3dd6e2e1 authored by 廖旭伟's avatar 廖旭伟

Merge remote-tracking branch 'origin/master'

parents 22955ead be7f8631
...@@ -11,11 +11,11 @@ ...@@ -11,11 +11,11 @@
<router-link to="/"> <router-link to="/">
<img <img
src="../assets/images/logo.png" src="../assets/images/logo.png"
style="margin-bottom:5px;margin-left: 24px;" style="margin-bottom: 5px; margin-left: 24px"
height="40" height="40"
alt="" alt=""
/> />
<b style="color:white;font-size:20px;"> <b style="color: white; font-size: 20px">
&nbsp;&nbsp;&nbsp;智慧政务绩效管理系统 &nbsp;&nbsp;&nbsp;智慧政务绩效管理系统
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</b> </b>
...@@ -43,14 +43,14 @@ ...@@ -43,14 +43,14 @@
</el-badge> </el-badge>
</div> --> </div> -->
<div class="controllBar" @click="returnHome"> <div class="controllBar" @click="returnHome">
<i class="el-icon-s-home" style="font-size: 15px;margin-right: 10px"> <i class="el-icon-s-home" style="font-size: 15px; margin-right: 10px">
首页</i 首页</i
> >
</div> </div>
<div class="layout-profile"> <div class="layout-profile">
<el-dropdown @command="handleCommand"> <el-dropdown @command="handleCommand">
<span class="el-dropdown-link" style="color:white"> <span class="el-dropdown-link" style="color: white">
{{ userData.currUserName }} {{ userData.currUserName }}
<i class="el-icon-arrow-down el-icon&#45;&#45;right"></i> <i class="el-icon-arrow-down el-icon&#45;&#45;right"></i>
</span> </span>
...@@ -124,9 +124,7 @@ export default { ...@@ -124,9 +124,7 @@ export default {
beforeDestroy() { beforeDestroy() {
console.log("beforeDestroy"); console.log("beforeDestroy");
}, },
mounted() { mounted() {},
console.log(this.menu);
},
computed: { computed: {
group() { group() {
const relativeGroup = this.$store.state.group; const relativeGroup = this.$store.state.group;
......
...@@ -5,26 +5,39 @@ ...@@ -5,26 +5,39 @@
<div class="title"> <div class="title">
部门绩效总分排名TOP10 部门绩效总分排名TOP10
<div class="button_box"> <div class="button_box">
<span>今年</span> <span
<span class="check">本月</span> :class="{ check: v.value == depAttendanceTopDate }"
<span>今日</span> v-for="v in searchTimes"
:key="v.value"
@click="changeDate('depAttendanceTopDate', v.value)"
>{{ v.label }}</span
>
</div> </div>
</div> </div>
<dv-scroll-ranking-board <dv-scroll-ranking-board
:config="config" :config="config"
style="width:100%;height:75%" style="width: 100%; height: 75%"
/> />
</div> </div>
<div class="left_mid"> <div class="left_mid">
<div class="button_box"> <div class="title">
<span>今年</span> 异常分值分布情况
<span class="check">本月</span> <div class="button_box">
<span>今日</span> <span
:class="{ check: v.value == abnormalDisDate }"
v-for="v in searchTimes"
:key="v.value"
@click="changeDate('abnormalDisDate', v.value)"
>{{ v.label }}</span
>
</div>
</div> </div>
<div id="leida" style="width: 100%;height: 100%;"></div>
<div id="leida" style="width: 100%; height: 90%"></div>
</div> </div>
<div class="left_down"> <div class="left_down">
<div id="rulePie" style="width: 100%;height: 100%;"></div> <div class="title">绩效规则分布情况</div>
<div id="rulePie" style="width: 100%; height: 90%"></div>
</div> </div>
</div> </div>
<div class="mid"> <div class="mid">
...@@ -138,7 +151,7 @@ ...@@ -138,7 +151,7 @@
<div class="mid_down"> <div class="mid_down">
<div class="down_content"> <div class="down_content">
<img class="content_title" src="../../../assets/images/title.png" /> <img class="content_title" src="../../../assets/images/title.png" />
<div style="margin: 20px 0;"> <div style="margin: 20px 0">
<el-radio-group v-model="type" border> <el-radio-group v-model="type" border>
<el-radio-button label="1">部门评估</el-radio-button> <el-radio-button label="1">部门评估</el-radio-button>
<el-radio-button label="2">个人评估</el-radio-button> <el-radio-button label="2">个人评估</el-radio-button>
...@@ -150,7 +163,7 @@ ...@@ -150,7 +163,7 @@
<el-select <el-select
v-model="form.region" v-model="form.region"
placeholder="请选择部门" placeholder="请选择部门"
style="width: 100%;" style="width: 100%"
> >
<el-option label="区域一" value="shanghai"></el-option> <el-option label="区域一" value="shanghai"></el-option>
<el-option label="区域二" value="beijing"></el-option> <el-option label="区域二" value="beijing"></el-option>
...@@ -161,21 +174,21 @@ ...@@ -161,21 +174,21 @@
type="date" type="date"
placeholder="选择日期" placeholder="选择日期"
v-model="form.date1" v-model="form.date1"
style="width: 100%;" style="width: 100%"
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="请选择类型:" style="text-align: left;"> <el-form-item label="请选择类型:" style="text-align: left">
<el-radio-group v-model="form.resource"> <el-radio-group v-model="form.resource">
<el-radio label="0">按年</el-radio> <el-radio :label="1">按年</el-radio>
<el-radio label="1">按月</el-radio> <el-radio :label="2">按月</el-radio>
<el-radio label="2">按天</el-radio> <el-radio :label="3">按天</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button
type="primary" type="primary"
@click="onSubmit" @click="onSubmit"
style="margin-top: 20px;transform: translateX(-50%);" style="margin-top: 20px; transform: translateX(-50%)"
>立即创建</el-button >立即创建</el-button
> >
</el-form-item> </el-form-item>
...@@ -187,28 +200,39 @@ ...@@ -187,28 +200,39 @@
<div class="right"> <div class="right">
<div class="right_top"> <div class="right_top">
<div class="button_box"> <div class="button_box">
<span>今年</span> <span
<span class="check">本月</span> :class="{ check: v.value == personageAttTopDate }"
<span>今日</span> v-for="v in searchTimes"
</div> :key="v.value"
<div class="title"> @click="changeDate('personageAttTopDate', v.value)"
个人绩效总分排名TOP10 >{{ v.label }}</span
>
</div> </div>
<div class="title">个人绩效总分排名TOP10</div>
<dv-scroll-ranking-board <dv-scroll-ranking-board
:config="personConfig" :config="personConfig"
style="width:100%;height:75%" style="width: 100%; height: 75%"
/> />
</div> </div>
<div class="right_mid"> <div class="right_mid">
<div class="button_box"> <div class="title">
<span>今年</span> 申诉分值分布情况
<span class="check">本月</span> <div class="button_box">
<span>今日</span> <span
:class="{ check: v.value == appealDate }"
v-for="v in searchTimes"
:key="v.value"
@click="changeDate('appealDate', v.value)"
>{{ v.label }}</span
>
</div>
</div> </div>
<div id="shensuPie" style="width: 100%;height: 100%;"></div>
<div id="shensuPie" style="width: 100%; height: 90%"></div>
</div> </div>
<div class="right_down"> <div class="right_down">
<div id="recordPie" style="width: 100%;height: 100%;"></div> <div class="title">反馈记录整体情况</div>
<div id="recordPie" style="width: 100%; height: 90%"></div>
</div> </div>
</div> </div>
</div> </div>
...@@ -218,96 +242,184 @@ ...@@ -218,96 +242,184 @@
export default { export default {
data() { data() {
return { return {
type: "1", // 时间搜索选项
searchTimes: [
{
label: "今年",
value: 1,
},
{
label: "本月",
value: 2,
},
{
label: "今日",
value: 3,
},
],
depAttendanceTopDate: 2, // 部门绩效top搜索
abnormalDisDate: 2, // 异常分值分布搜索
personageAttTopDate: 2, // 个人绩效排名top搜索
appealDate: 2, // 申诉分值分布搜索
form: { form: {
date1: "", date1: "",
type: [], type: [],
resource: "", resource: "",
}, },
config: {},//部门绩效总分top10 config: {}, //部门绩效总分top10
personConfig: {},//个人绩效总分top10 personConfig: {}, //个人绩效总分top10
cricleData: [
{ value: 756, name: "考勤绩效" },
{ value: 690, name: "评价绩效" },
{ value: 559, name: "办件绩效" },
{ value: 1278, name: "效能绩效" },
],
// 个人绩效总分排名 // 个人绩效总分排名
staffQuery:{ staffQuery: {
page:1, page: 1,
size:10, size: 10,
}, },
// 部门 // 部门
depQuery:{ depQuery: {
page:1, page: 1,
size:10, size: 10,
}, },
leidaEchart: null, // 异常分值分布情况echart实例
rulePie: null, // 绩效规则分布echart实例
shensuPie: null, // 申诉分值分布情况echart实例
recordPie: null, // 反馈记录整体情况echart实例
timer: null,
}; };
}, },
mounted() { mounted() {
this.drawLeiDa(); this.staffStatList();
this.drawRulePie(); this.getException();
this.drawCorePie(); this.depStatList();
this.drawRecordPie(); this.getAttendanceRules();
this.getFeedback();
this.staffStatList() this.autoUpdata();
this.depStatList() this.getAppealTotal();
}, },
methods: { methods: {
// 设配echarts
adapterEcharts() {
this.leidaEchart && this.leidaEchart.resize();
this.rulePie && this.rulePie.resize();
this.shensuPie && this.shensuPie.resize();
this.recordPie && this.recordPie.resize();
},
// 个人绩效总分排名 // 个人绩效总分排名
staffStatList(){ staffStatList() {
this.$post("/staff/perform/stat/list", this.staffQuery).then((res) => { this.$post("/staff/perform/stat/summary/top", {
const {code,data} = res summaryType: this.personageAttTopDate,
if(code == 1){ }).then((res) => {
const row = data.data || [] const { code, data } = res;
const depArr = [] if (code == 1) {
row.forEach(element => { const row = data.map((v) => {
depArr.push({ return {
name:element.staffName, name: v.staffName,
value:element.totalScore value: v.totalScore,
}) };
});
this.personConfig = { data: row };
}
});
},
// 获取异常分值分布情况
getException() {
this.$post("/staff/perform/stat/summary/exception", {
summaryType: this.abnormalDisDate,
}).then((res) => {
const { code, data } = res;
if (code == 1) {
let names = data.map((v) => v.name);
let add = data.map((v) => v.add);
let sub = data.map((v) => v.sub);
this.$nextTick(() => {
this.drawLeiDa(names, add, sub);
}); });
this.personConfig = {data:depArr}
console.log(row,"个人")
} }
}); });
}, },
// 部门绩效总分排名 // 部门绩效总分排名
depStatList(){ depStatList() {
this.$post("/dept/perform/stat/list", this.depQuery).then((res) => { this.$post("/dept/perform/stat/summary/top", {
const {code,data} = res summaryType: this.depAttendanceTopDate,
if(code == 1){ }).then((res) => {
const row = data.data || [] const { code, data } = res;
const depArr = [] if (code == 1) {
row.forEach(element => { const row = data.map((v) => {
depArr.push({ return {
name:element.deptName, name: v.deptName,
value:element.totalScore value: v.totalScore,
}) };
});
this.config = { data: row };
}
});
},
// 获取绩效规则分布情况
getAttendanceRules() {
this.$post("/perform/rules/summary").then((res) => {
const { code, data } = res;
if (code == 1) {
let { list, totalScore } = data;
let arr = list.map((v) => {
return {
name: v.typeName,
value: v.score,
};
}); });
this.config = {data:depArr} this.$nextTick(() => {
// console.log(row,depArr,"部门") this.drawRulePie(arr, totalScore);
});
}
});
},
// 获取反馈记录整体情况数据
getFeedback() {
this.$post("/feedback/summary").then((res) => {
const { code, data } = res;
if (code == 1) {
let { notStart, total, ended, progress } = data;
let names = ["未开始", "进行中", "已完结", "全部问卷"];
let values = [notStart, progress, ended, total];
this.$nextTick(() => {
this.drawRecordPie(names, values);
});
}
});
},
// 获取申诉分布情况统计数据
getAppealTotal() {
this.$post("/perform/attend/appeal/perform/summary", {
summaryType: this.appealDate,
}).then((res) => {
const { code, data } = res;
if (code == 1) {
console.log(res);
// this.$nextTick(() => {
// });
} }
}); });
}, },
drawLeiDa() { // 异常分值分布情况echarts
drawLeiDa(names = [], add = [], sub = []) {
// 基于dom,初始化echarts实例 // 基于dom,初始化echarts实例
let myChart = this.$echarts.init(document.getElementById("leida")); let chartDom = document.getElementById("leida");
// 避免刷新数据时重新初始化图表
this.leidaEchart = this.$echarts.getInstanceByDom(chartDom);
if (!this.leidaEchart) {
this.leidaEchart = this.$echarts.init(chartDom);
}
// 绘制图表 // 绘制图表
myChart.setOption({ this.leidaEchart.setOption({
title: {
text: "异常分值分布情况",
left: "left",
textStyle: {
fontSize: 18,
},
},
color: ["#56A3F1", "#FF917C"], color: ["#56A3F1", "#FF917C"],
tooltip: {}, tooltip: {
confine: true,
},
legend: { legend: {
data: ["加分", "扣分"], data: names,
right: 0, right: 0,
bottom: "50px", bottom: "50px",
orient: "vertical", orient: "vertical",
...@@ -336,15 +448,14 @@ export default { ...@@ -336,15 +448,14 @@ export default {
}, },
}, },
{ {
indicator: [ indicator: names.map((v) => {
{ text: "考勤绩效", max: 150 }, return {
{ text: "办件绩效", max: 150 }, name: v,
{ text: "评价绩效", max: 150 }, max: 150,
{ text: "效能绩效", max: 120 }, };
{ text: "其他绩效", max: 108 }, }),
], center: ["45%", "50%"],
center: ["45%", "60%"], radius: "70%",
radius: 80,
axisName: { axisName: {
color: "#fff", color: "#fff",
backgroundColor: "#666", backgroundColor: "#666",
...@@ -359,20 +470,20 @@ export default { ...@@ -359,20 +470,20 @@ export default {
radarIndex: 1, radarIndex: 1,
data: [ data: [
{ {
value: [120, 118, 130, 100, 99, 70], value: add,
name: "加分", name: "加分",
symbol: "rect", symbol: "rect",
symbolSize: 12, symbolSize: 12,
areaStyle: { color: "#56A3F1" }, //雷达覆盖区域背景颜色 areaStyle: { color: "#56A3F1" }, //雷达覆盖区域背景颜色
label: { label: {
show: true, show: true,
formatter: function(params) { formatter: function (params) {
return params.value; return params.value;
}, },
}, },
}, },
{ {
value: [100, 93, 50, 90, 70, 60], value: sub,
areaStyle: { color: "#FF917C" }, //雷达覆盖区域背景颜色 areaStyle: { color: "#FF917C" }, //雷达覆盖区域背景颜色
name: "扣分", name: "扣分",
}, },
...@@ -380,17 +491,18 @@ export default { ...@@ -380,17 +491,18 @@ export default {
}, },
], ],
}); });
window.addEventListener("resize", this.adapterEcharts);
}, },
drawRulePie() { // 绩效规则分布echarts
drawRulePie(data, total) {
// 基于dom,初始化echarts实例 // 基于dom,初始化echarts实例
let myChart = this.$echarts.init(document.getElementById("rulePie")); let chartDom = document.getElementById("rulePie");
myChart.setOption({ // 避免刷新数据时重新初始化图表
title: { this.rulePie = this.$echarts.getInstanceByDom(chartDom);
text: "绩效规则分布情况", if (!this.rulePie) {
textStyle: { this.rulePie = this.$echarts.init(chartDom);
fontSize: 18, }
}, this.rulePie.setOption({
},
tooltip: { tooltip: {
trigger: "item", trigger: "item",
}, },
...@@ -427,19 +539,15 @@ export default { ...@@ -427,19 +539,15 @@ export default {
}, },
}, },
formatter: (name) => { formatter: (name) => {
// formatter格式化函数动态呈现数据
console.log(name);
var total = 0; // 用于计算总数
var target; // 遍历拿到数据 var target; // 遍历拿到数据
for (var i = 0; i < this.cricleData.length; i++) { for (var i = 0; i < data.length; i++) {
total += this.cricleData[i].value; if (data[i].name == name) {
if (this.cricleData[i].name == name) { target = data[i].value;
target = this.cricleData[i].value;
} }
} }
var v = ((target / total) * 100).toFixed(2); var v = ((target / total) * 100).toFixed(2);
return `{oneone|${name}} {twotwo|${target}分} {threethree|${v}%}`; return `{oneone|${name}} {twotwo|${target}分} {threethree|${v}%}`;
// 富文本第一列样式应用 富文本第二列样式应用 富文本第三列样式应用 // 富文本第一列样式应用 富文本第二列样式应用 富文本第三列样式应用
}, },
}, },
series: [ series: [
...@@ -447,34 +555,33 @@ export default { ...@@ -447,34 +555,33 @@ export default {
type: "pie", type: "pie",
radius: ["40%", "70%"], radius: ["40%", "70%"],
// avoidLabelOverlap: false, // avoidLabelOverlap: false,
data,
left: "-50%", left: "-50%",
top: "10%", top: "10%",
label: { label: {
position: "center", position: "center",
fontSize: 16, fontSize: 16,
formatter: () => { formatter: () => {
let str = "" + "\n" + `${756 + 690 + 559 + 1278}`; return "" + "\n" + total;
return str;
}, },
}, },
labelLine: { labelLine: {
show: false, show: false,
}, },
data: this.cricleData,
}, },
], ],
}); });
window.addEventListener("resize", this.adapterEcharts);
}, },
// 申诉分值分布情况echarts
drawCorePie() { drawCorePie() {
// 基于dom,初始化echarts实例 let chartDom = document.getElementById("shensuPie");
let myChart = this.$echarts.init(document.getElementById("shensuPie")); // 避免刷新数据时重新初始化图表
myChart.setOption({ this.shensuPie = this.$echarts.getInstanceByDom(chartDom);
title: { if (!this.shensuPie) {
text: "绩效规则分布情况", this.shensuPie = this.$echarts.init(chartDom);
textStyle: { }
fontSize: 18, this.shensuPie.setOption({
},
},
tooltip: { tooltip: {
trigger: "item", trigger: "item",
}, },
...@@ -564,34 +671,28 @@ export default { ...@@ -564,34 +671,28 @@ export default {
}, },
], ],
}); });
window.addEventListener("resize", this.adapterEcharts);
}, },
// 反馈记录整体情况echarts
drawRecordPie() { drawRecordPie(names = [], values = []) {
let xData = ["未开始", "进行中", "已完结", "全部问卷"];
let yData = [2, 8, 116, 126];
let colorList = ["#97e7ff", "#75f5ff", "#00deff", "#0093ff", "#2a5fcf"]; let colorList = ["#97e7ff", "#75f5ff", "#00deff", "#0093ff", "#2a5fcf"];
let visualMapPiecesData = []; let visualMapPiecesData = [];
// visualMap: { for (var i = 0; i < names.length; i++) {
// pieces: [
// { value: 123, label: '123(自定义特殊颜色)', color: 'grey' }
// ]
// }
for (var i = 0; i < xData.length; i++) {
visualMapPiecesData.push({ visualMapPiecesData.push({
value: yData[i], value: values[i],
label: xData[i], label: names[i],
color: colorList[i], color: colorList[i],
}); });
} }
// 基于dom,初始化echarts实例 // 基于dom,初始化echarts实例
let myChart = this.$echarts.init(document.getElementById("recordPie")); let chartDom = document.getElementById("recordPie");
myChart.setOption({ // 避免刷新数据时重新初始化图表
title: { this.recordPie = this.$echarts.getInstanceByDom(chartDom);
text: "绩效规则分布情况", if (!this.recordPie) {
textStyle: { this.recordPie = this.$echarts.init(chartDom);
fontSize: 18, }
},
}, this.recordPie.setOption({
tooltip: { tooltip: {
trigger: "item", trigger: "item",
}, },
...@@ -608,7 +709,7 @@ export default { ...@@ -608,7 +709,7 @@ export default {
radiusAxis: { radiusAxis: {
show: true, show: true,
type: "category", type: "category",
data: xData, data: names,
}, },
visualMap: { visualMap: {
...@@ -626,12 +727,12 @@ export default { ...@@ -626,12 +727,12 @@ export default {
series: [ series: [
{ {
type: "bar", type: "bar",
data: yData, data: values,
coordinateSystem: "polar", coordinateSystem: "polar",
itemStyle: { itemStyle: {
normal: { normal: {
// 定制显示(按顺序) // 定制显示(按顺序)
color: function(params) { color: function (params) {
return colorList[params.dataIndex]; return colorList[params.dataIndex];
}, },
}, },
...@@ -639,7 +740,56 @@ export default { ...@@ -639,7 +740,56 @@ export default {
}, },
], ],
}); });
window.addEventListener("resize", this.adapterEcharts);
},
// 改变日期搜索
changeDate(type, date) {
switch (type) {
case "depAttendanceTopDate":
this.depAttendanceTopDate = date;
this.depStatList();
break;
case "abnormalDisDate":
this.abnormalDisDate = date;
this.getException();
break;
case "personageAttTopDate":
this.personageAttTopDate = date;
this.staffStatList();
break;
case "appealDate":
this.appealDate = date;
break;
}
},
// 获取年
getYear() {
return new Date().getFullYear();
}, },
// 获取月
getMonth() {
return new Date().getMonth() + 1;
},
// 获取日
getDay() {
return new Date().getDate();
},
// 1分值自动刷新数据
autoUpdata() {
this.timer = setInterval(() => {
this.staffStatList();
this.getException();
this.depStatList();
this.getAttendanceRules();
this.getFeedback();
}, 1000 * 60);
},
},
beforeDestroy() {
// 解绑事件
window.removeEventListener("resize", this.adapterEcharts);
clearInterval(this.timer);
}, },
}; };
</script> </script>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -91,7 +91,18 @@ public class UserEntity extends UserVo implements IUser { ...@@ -91,7 +91,18 @@ public class UserEntity extends UserVo implements IUser {
*/ */
private Long customerId; private Long customerId;
/**
* 钉钉userId
*/
private String dingUserId;
public String getDingUserId() {
return dingUserId;
}
public void setDingUserId(String dingUserId) {
this.dingUserId = dingUserId;
}
public UserEntity(){} public UserEntity(){}
/** /**
......
...@@ -162,6 +162,14 @@ public class UserQuery extends UserEntity { ...@@ -162,6 +162,14 @@ public class UserQuery extends UserEntity {
/** 最后一次登录地址排除列表 */ /** 最后一次登录地址排除列表 */
private List <String> lastLoginAddressNotList; private List <String> lastLoginAddressNotList;
/** 钉钉userId */
private List<String> dingUserIdList;
/** 钉钉userId排除列表 */
private List <String> dingUserIdNotList;
/** 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<UserQuery> orConditionList; private List<UserQuery> orConditionList;
...@@ -1606,4 +1614,23 @@ public class UserQuery extends UserEntity { ...@@ -1606,4 +1614,23 @@ public class UserQuery extends UserEntity {
this.andConditionList = andConditionList; this.andConditionList = andConditionList;
} }
/**
* 设置 钉钉userId
* @param dingUserId
*/
public UserQuery dingUserId(String dingUserId){
setDingUserId(dingUserId);
return this;
}
/**
* 设置 钉钉userId
* @param dingUserIdList
*/
public UserQuery dingUserIdList(List<String> dingUserIdList){
this.dingUserIdList = dingUserIdList;
return this;
}
} }
\ No newline at end of file
package com.mortals.xhx.busiz.h5.req;
import com.mortals.xhx.busiz.BaseReq;
import lombok.Data;
@Data
public class DingTalkReq extends BaseReq {
/**
* 授权码
*/
private String code;
}
package com.mortals.xhx.busiz.h5.web;
import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.ap.CookieService;
import com.mortals.framework.ap.GlobalSysInfo;
import com.mortals.framework.ap.SysConstains;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.service.IAuthTokenService;
import com.mortals.framework.service.ICacheService;
import com.mortals.framework.service.IUser;
import com.mortals.framework.util.AESUtil;
import com.mortals.framework.util.DateUtils;
import com.mortals.framework.util.HttpUtil;
import com.mortals.framework.util.StringUtils;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.login.web.LoginForm;
import com.mortals.xhx.base.system.menu.model.MenuEntity;
import com.mortals.xhx.base.system.menu.service.MenuService;
import com.mortals.xhx.base.system.resource.service.ResourceService;
import com.mortals.xhx.base.system.user.model.UserEntity;
import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.base.system.valid.service.ValidCodeService;
import com.mortals.xhx.busiz.h5.req.DingTalkReq;
import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.common.key.RedisKey;
import com.mortals.xhx.common.pdu.HomeStatInfo;
import com.mortals.xhx.module.dept.model.DeptQuery;
import com.mortals.xhx.module.dept.service.DeptService;
import com.mortals.xhx.module.dingding.IDingTalkService;
import com.mortals.xhx.module.dingding.personal.service.IDingPersonService;
import com.mortals.xhx.module.staff.model.StaffQuery;
import com.mortals.xhx.module.staff.service.StaffService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.List;
import java.util.Set;
import static com.mortals.xhx.common.key.ErrorCode.ERROR_TOKEN_EXPIRED;
import static com.mortals.xhx.common.key.ErrorCode.ERROR_TOKEN_EXPIRED_CONTENT;
/**
* 钉钉授权登录
*
* @author:
* @date: 2023/7/15 10:26
*/
@RestController
@Slf4j
@RequestMapping("dingtalk")
public class DingTalkLoginController extends BaseCRUDJsonBodyMappingController<UserService, UserEntity, Long> {
@Autowired
private UserService userService;
@Autowired
private ValidCodeService validCodeService;
@Autowired
private ResourceService resourceService;
@Autowired
private MenuService menuService;
@Autowired
private ICacheService cacheService;
@Autowired
private IAuthTokenService authTokenService;
@Autowired
private StaffService staffService;
@Autowired
private DeptService deptService;
@Autowired
private IDingPersonService dingPersonService;
@RequestMapping("authlogin")
public String login(@RequestBody DingTalkReq req) throws Exception {
JSONObject ret = new JSONObject();
UserEntity userEntity = null;
try {
if (ObjectUtils.isEmpty(req.getCode())) {
throw new AppException("钉钉 code 不能为空!");
}
//根据code 查询钉钉用户id
Rest<String> personRest = dingPersonService.getPersonByCode(req.getCode());
if (personRest.getCode() == YesNoEnum.NO.getValue()) {
throw new AppException(String.format("获取钉钉用户异常,{}", personRest.getMsg()));
}
//根据钉钉的用户查询系统绑定的用户
recordSysLog(request, userEntity, "用户登录系统成功!");
// 返回拥有的菜单数据
Set<String> urls = resourceService.findUrlSetByUserId(userEntity.getId());
List<MenuEntity> outlookBarList = menuService.findTreeMenu(userEntity, urls);
String currUserName = userEntity.getRealName();
if (currUserName == null || currUserName.trim().length() == 0) {
currUserName = "管理员";
}
JSONObject data = new JSONObject();
data.put("currUserName", currUserName);
data.put("barList", outlookBarList);
data.put("id", userEntity.getId());
data.put("userType", userEntity.getUserType());
userEntity.setLoginTime(System.currentTimeMillis());
userEntity.setToken(IdUtil.fastSimpleUUID());
userEntity.setExpireTime(DateUtils.addCurrDate(7).getTime());
// userEntity.setMenuUrl(generateMenuUrlCode(urls));
String token = authTokenService.createToken(userEntity);
data.put("token", token);
//设置token 和过期时间
//data.put("expiresTime", DateUtils.addCurrDate(7).getTime());
//this.generateBlackCookie(request, response, loginName, urls);
ret.put(KEY_RESULT_DATA, data);
ret.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
ret.put(KEY_RESULT_MSG, "用户登录系统成功!");
ret.put("resources", urls);
return ret.toJSONString();
} catch (Exception e) {
log.error("dinding login error ", e);
ret.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE);
ret.put(KEY_RESULT_MSG, super.convertException(e));
return ret.toJSONString();
}
}
@RequestMapping("logout")
public void logout(HttpServletRequest request, HttpServletResponse response) throws Exception {
recordSysLog(request, "退出登录");
super.removeCurrUser(request);
this.deleteBlackCookie(request, response);
}
protected void deleteBlackCookie(HttpServletRequest request, HttpServletResponse response) {
try {
CookieService.deleteCookieForAuth(request, response);
} catch (Throwable e) {
}
}
@RequestMapping("parseToken")
public IUser parseToken() throws Exception {
IUser userEntity = authTokenService.getLoginUser(request);
if (!ObjectUtils.isEmpty(userEntity)) {
authTokenService.verifyToken(userEntity);
return userEntity;
}
return null;
}
}
...@@ -7,6 +7,7 @@ import com.mortals.framework.common.Rest; ...@@ -7,6 +7,7 @@ import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo; import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.xhx.busiz.h5.req.FeedbackReq; import com.mortals.xhx.busiz.h5.req.FeedbackReq;
import com.mortals.xhx.busiz.h5.req.FeedbackSaveReq; import com.mortals.xhx.busiz.h5.req.FeedbackSaveReq;
import com.mortals.xhx.common.code.YesNoEnum; import com.mortals.xhx.common.code.YesNoEnum;
...@@ -75,17 +76,20 @@ public class FeedbackApiController extends AbstractBaseController<FeedbackReq> { ...@@ -75,17 +76,20 @@ public class FeedbackApiController extends AbstractBaseController<FeedbackReq> {
feedbackReq.setFeedBackEndDate(DateUtil.endOfMonth(DateUtil.parse(feedbackReq.getFeedBackStartDate()).toJdkDate()).toDateStr()); feedbackReq.setFeedBackEndDate(DateUtil.endOfMonth(DateUtil.parse(feedbackReq.getFeedBackStartDate()).toJdkDate()).toDateStr());
} }
//PageInfo pageInfo = buildPageInfo(feedbackReq); //PageInfo pageInfo = buildPageInfo(feedbackReq);
//todo PageInfo pageAllInfo = buildPageInfo(feedbackReq);
PageInfo pageAllInfo = new PageInfo();
if (YesNoEnum.YES.getValue() == feedbackReq.getFeedbackStatus()) { if (YesNoEnum.YES.getValue() == feedbackReq.getFeedbackStatus()) {
//已反馈 //已反馈
//查询我已经回答过的 //查询我已经回答过的
List<Long> feedbackIdList = answerService.find(new FeedbackAnswerQuery().staffId(context.getUser().getCustomerId())).stream().map(i -> i.getFeedbackId()).distinct().collect(Collectors.toList()); List<Long> feedbackIdList = answerService.find(new FeedbackAnswerQuery().staffId(context.getUser().getCustomerId())).stream().map(i -> i.getFeedbackId()).distinct().collect(Collectors.toList());
FeedbackQuery feedbackQuery = new FeedbackQuery(); FeedbackQuery feedbackQuery = new FeedbackQuery();
feedbackQuery.setIdList(feedbackIdList); feedbackQuery.setIdList(feedbackIdList);
List<FeedbackEntity> feedbackEntities = feedbackService.find(feedbackQuery);
model.put(KEY_RESULT_DATA, feedbackEntities); Result<FeedbackEntity> result = feedbackService.find(feedbackQuery, pageAllInfo, null);
pageAllInfo.setTotalResult(feedbackEntities.size());
model.put(PAGEINFO_KEY, result.getPageInfo());
model.put(KEY_RESULT_DATA, result.getList());
parsePageInfo(model, result.getPageInfo());
} else { } else {
//未反馈 //未反馈
//查询我的反馈 但是还未回答的 //查询我的反馈 但是还未回答的
...@@ -96,17 +100,16 @@ public class FeedbackApiController extends AbstractBaseController<FeedbackReq> { ...@@ -96,17 +100,16 @@ public class FeedbackApiController extends AbstractBaseController<FeedbackReq> {
feedbackStaffQuery.setStaffId(context.getUser().getCustomerId()); feedbackStaffQuery.setStaffId(context.getUser().getCustomerId());
List<Long> unfinFeedbackList = feedbackStaffService.find(feedbackStaffQuery).stream().map(i -> i.getFeedbackId()).distinct().collect(Collectors.toList()); List<Long> unfinFeedbackList = feedbackStaffService.find(feedbackStaffQuery).stream().map(i -> i.getFeedbackId()).distinct().collect(Collectors.toList());
model.put(KEY_RESULT_DATA, unfinFeedbackList); FeedbackQuery feedbackQuery = new FeedbackQuery();
pageAllInfo.setTotalResult(unfinFeedbackList.size()); feedbackQuery.setIdList(unfinFeedbackList);
} Result<FeedbackEntity> result = feedbackService.find(feedbackQuery, pageAllInfo, null);
pageAllInfo.setCurrPage(1);
pageAllInfo.setPrePageResult(-1);
model.put(PAGEINFO_KEY, pageAllInfo);
parsePageInfo(model, pageAllInfo);
model.put(PAGEINFO_KEY, result.getPageInfo());
model.put(KEY_RESULT_DATA, result.getList());
parsePageInfo(model, result.getPageInfo());
}
rest.setData(model); rest.setData(model);
recordSysLog(request, busiDesc + " 【成功】"); recordSysLog(request, busiDesc + " 【成功】");
} catch (Exception e) { } catch (Exception e) {
log.error(busiDesc, e); log.error(busiDesc, e);
......
...@@ -186,16 +186,13 @@ public class InspectApiController extends AbstractBaseController<PerformReq> { ...@@ -186,16 +186,13 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
PageInfo pageAllInfo = new PageInfo(); PageInfo pageAllInfo = new PageInfo();
pageAllInfo.setTotalResult(collect.size()); pageAllInfo.setTotalResult(collect.size());
pageAllInfo.setCurrPage(1); pageAllInfo.setCurrPage(1);
pageAllInfo.setPrePageResult(-1); pageAllInfo.setPrePageResult(10);
model.put(PAGEINFO_KEY, pageAllInfo); model.put(PAGEINFO_KEY, pageAllInfo);
parsePageInfo(model, pageAllInfo); parsePageInfo(model, pageAllInfo);
} }
// model.put(KEY_RESULT_DATA, result.getList()); // model.put(KEY_RESULT_DATA, result.getList());
// model.put(PAGEINFO_KEY, result.getPageInfo()); // model.put(PAGEINFO_KEY, result.getPageInfo());
// parsePageInfo(model, result.getPageInfo()); // parsePageInfo(model, result.getPageInfo());
rest.setData(model); rest.setData(model);
recordSysLog(request, busiDesc + " 【成功】"); recordSysLog(request, busiDesc + " 【成功】");
} catch (Exception e) { } catch (Exception e) {
......
...@@ -9,18 +9,11 @@ public class RedisKey { ...@@ -9,18 +9,11 @@ public class RedisKey {
* 登录 key * 登录 key
*/ */
public static final String KEY_MENU_CACHE = "iot:base:MenuCacheKey:"; public static final String KEY_MENU_CACHE = "iot:base:MenuCacheKey:";
/**
* 设备心跳上报
*/
public static final String KEY_DEVICE_ONLINE_CACHE = "device:online:";
public static final String KEY_SITE_CACHE = "siteDict";
public static final String KEY_PLATFORM_CACHE = "platformDict"; /**
* 钉钉 访问token
public static final String KEY_PRODUCT_CACHE = "productDict"; */
public static final String KEY_DINGTALK_ACCESSTOKEN_CACHE = "dingtalk:token:";
public static final String KEY_TOKEN_API_CACHE = "token:api:";
} }
...@@ -83,9 +83,9 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR ...@@ -83,9 +83,9 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
msg.setMsgtype("link"); msg.setMsgtype("link");
Link link = new Link(); Link link = new Link();
link.setPicUrl("测试图片链接"); link.setPicUrl("测试图片链接");
link.setMessageUrl("测试消息链接"); link.setMessageUrl("http://www.baidu.com");
link.setText("测试文本"); link.setText("你有一条绩效考核核查通知,请及时查看!");
link.setTitle("测试标题"); link.setTitle("绩效考核核查通知");
msg.setLink(link); msg.setLink(link);
workMsgReq.setUseridList(personRest.getMsg()); workMsgReq.setUseridList(personRest.getMsg());
......
...@@ -7,9 +7,12 @@ import com.dingtalk.api.response.OapiGettokenResponse; ...@@ -7,9 +7,12 @@ import com.dingtalk.api.response.OapiGettokenResponse;
import com.hikvision.artemis.sdk.config.ArtemisConfig; import com.hikvision.artemis.sdk.config.ArtemisConfig;
import com.mortals.framework.common.Rest; import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.service.ICacheService;
import com.mortals.xhx.common.key.RedisKey;
import com.mortals.xhx.common.pdu.ApiRespPdu; import com.mortals.xhx.common.pdu.ApiRespPdu;
import com.mortals.xhx.module.dingding.personal.service.IDingPersonService; import com.mortals.xhx.module.dingding.personal.service.IDingPersonService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
...@@ -32,7 +35,7 @@ public abstract class AbstractDingTalkService implements IDingPersonService { ...@@ -32,7 +35,7 @@ public abstract class AbstractDingTalkService implements IDingPersonService {
protected Long agentId; protected Long agentId;
/** /**
* AgentId * domain
*/ */
@Value("${dingtalk.domain:https://oapi.dingtalk.com}") @Value("${dingtalk.domain:https://oapi.dingtalk.com}")
protected String domain; protected String domain;
...@@ -49,43 +52,38 @@ public abstract class AbstractDingTalkService implements IDingPersonService { ...@@ -49,43 +52,38 @@ public abstract class AbstractDingTalkService implements IDingPersonService {
@Value("${dingtalk.AppSecret:''}") @Value("${dingtalk.AppSecret:''}")
protected String appSecret; protected String appSecret;
/** @Autowired
* getToken private ICacheService cacheService;
*/
@Value("${dingtalk.gettoken:https://oapi.dingtalk.com/gettoken}")
protected String getTokneUrl;
protected String dingToken;
protected DingTalkClient getDingTalkClient(String path) { protected DingTalkClient getDingTalkClient(String path) {
DingTalkClient client = new DefaultDingTalkClient(domain + path); DingTalkClient client = new DefaultDingTalkClient(domain + path);
return client; return client;
} }
protected void checkToken() {
if (ObjectUtils.isEmpty(dingToken)) {
dingToken = getToken().getData();
}
}
@Override @Override
public Rest<String> getToken() { public String getToken() {
try { try {
DingTalkClient client = getDingTalkClient("/gettoken"); String dingToken = cacheService.get(RedisKey.KEY_DINGTALK_ACCESSTOKEN_CACHE);
OapiGettokenRequest req = new OapiGettokenRequest(); if (ObjectUtils.isEmpty(dingToken)) {
req.setAppkey(appKey); DingTalkClient client = getDingTalkClient("/gettoken");
req.setAppsecret(appSecret); OapiGettokenRequest req = new OapiGettokenRequest();
OapiGettokenResponse rsp = client.execute(req); req.setAppkey(appKey);
log.info("OapiGettokenResponse:{}",rsp.getBody()); req.setAppsecret(appSecret);
if (rsp.getErrcode() == 0) { OapiGettokenResponse rsp = client.execute(req);
return Rest.ok(rsp.getAccessToken()); log.info("OapiGettokenResponse:{}", rsp.getBody());
if (rsp.getErrcode() == 0) {
cacheService.setex(RedisKey.KEY_DINGTALK_ACCESSTOKEN_CACHE, rsp.getAccessToken(), 4800);
return rsp.getAccessToken();
} else {
throw new AppException(String.format("code:{},errorMsg:{}", rsp.getErrcode(), rsp.getErrmsg()));
}
} else { } else {
throw new AppException(rsp.getMessage()); return dingToken;
} }
} catch (Exception e) { } catch (Exception e) {
log.error("获取TOKEN异常", e); log.error("获取TOKEN异常", e);
return Rest.fail(e.getMessage()); throw new AppException(e.getMessage());
} }
} }
......
...@@ -3,5 +3,5 @@ package com.mortals.xhx.module.dingding; ...@@ -3,5 +3,5 @@ package com.mortals.xhx.module.dingding;
import com.mortals.framework.common.Rest; import com.mortals.framework.common.Rest;
public interface IDingTalkService { public interface IDingTalkService {
Rest<String> getToken(); String getToken();
} }
...@@ -25,6 +25,14 @@ public interface IDingPersonService extends IDingTalkService { ...@@ -25,6 +25,14 @@ public interface IDingPersonService extends IDingTalkService {
*/ */
Rest<String> getPersonByMobile(String mobile); Rest<String> getPersonByMobile(String mobile);
/**
* 根据code获取钉钉用户id
*
* @param code
* @return
*/
Rest<String> getPersonByCode(String code);
/** /**
* 发送工作消息 * 发送工作消息
......
...@@ -4,8 +4,10 @@ import com.alibaba.fastjson.JSON; ...@@ -4,8 +4,10 @@ import com.alibaba.fastjson.JSON;
import com.dingtalk.api.DingTalkClient; import com.dingtalk.api.DingTalkClient;
import com.dingtalk.api.request.OapiMessageCorpconversationAsyncsendV2Request; import com.dingtalk.api.request.OapiMessageCorpconversationAsyncsendV2Request;
import com.dingtalk.api.request.OapiV2UserGetbymobileRequest; import com.dingtalk.api.request.OapiV2UserGetbymobileRequest;
import com.dingtalk.api.request.OapiV2UserGetuserinfoRequest;
import com.dingtalk.api.response.OapiMessageCorpconversationAsyncsendV2Response; import com.dingtalk.api.response.OapiMessageCorpconversationAsyncsendV2Response;
import com.dingtalk.api.response.OapiV2UserGetbymobileResponse; import com.dingtalk.api.response.OapiV2UserGetbymobileResponse;
import com.dingtalk.api.response.OapiV2UserGetuserinfoResponse;
import com.mortals.framework.common.Rest; import com.mortals.framework.common.Rest;
import com.mortals.xhx.module.dingding.AbstractDingTalkService; import com.mortals.xhx.module.dingding.AbstractDingTalkService;
import com.mortals.xhx.module.dingding.personal.model.req.workmsg.WorkMsgReq; import com.mortals.xhx.module.dingding.personal.model.req.workmsg.WorkMsgReq;
...@@ -24,12 +26,11 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID ...@@ -24,12 +26,11 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
public Rest<String> getPersonByMobile(String mobile) { public Rest<String> getPersonByMobile(String mobile) {
try { try {
DingTalkClient client = getDingTalkClient("/topapi/v2/user/getbymobile"); DingTalkClient client = getDingTalkClient("/topapi/v2/user/getbymobile");
checkToken();
OapiV2UserGetbymobileRequest req = new OapiV2UserGetbymobileRequest(); OapiV2UserGetbymobileRequest req = new OapiV2UserGetbymobileRequest();
req.setMobile(mobile); req.setMobile(mobile);
log.info("getPersonByMobile:{}",mobile); log.info("getPersonByMobile:{}", mobile);
OapiV2UserGetbymobileResponse rsp = client.execute(req, dingToken); OapiV2UserGetbymobileResponse rsp = client.execute(req, getToken());
log.info("OapiV2UserGetbymobileResponse:{}",rsp.getBody()); log.info("OapiV2UserGetbymobileResponse:{}", rsp.getBody());
if (rsp.getErrcode() == 0) { if (rsp.getErrcode() == 0) {
return Rest.ok(rsp.getResult().getUserid()); return Rest.ok(rsp.getResult().getUserid());
} else { } else {
...@@ -41,18 +42,38 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID ...@@ -41,18 +42,38 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
} }
} }
@Override
public Rest<String> getPersonByCode(String code) {
try {
DingTalkClient client = getDingTalkClient("/topapi/v2/user/getuserinfo");
OapiV2UserGetuserinfoRequest req = new OapiV2UserGetuserinfoRequest();
req.setCode(code);
log.info("getPersonByCode:{}", code);
OapiV2UserGetuserinfoResponse rsp = client.execute(req, getToken());
log.info("OapiV2UserGetuserinfoResponse:{}", rsp.getBody());
if (rsp.getErrcode() == 0) {
return Rest.ok(rsp.getResult().getUserid());
} else {
return Rest.fail(String.format("code:%s,msg:%s", rsp.getErrcode(), rsp.getErrmsg()));
}
} catch (ApiException e) {
log.info("根据code查询人员异常", e);
return Rest.fail(e.getMessage());
}
}
@Override @Override
public Rest<String> sendWorkMsg(WorkMsgReq workMsgReq) { public Rest<String> sendWorkMsg(WorkMsgReq workMsgReq) {
try { try {
DingTalkClient client = getDingTalkClient("/topapi/message/corpconversation/asyncsend_v2"); DingTalkClient client = getDingTalkClient("/topapi/message/corpconversation/asyncsend_v2");
checkToken();
OapiMessageCorpconversationAsyncsendV2Request req = new OapiMessageCorpconversationAsyncsendV2Request(); OapiMessageCorpconversationAsyncsendV2Request req = new OapiMessageCorpconversationAsyncsendV2Request();
req.setAgentId(agentId); req.setAgentId(agentId);
req.setUseridList(workMsgReq.getUseridList()); req.setUseridList(workMsgReq.getUseridList());
req.setMsg(JSON.toJSONString(workMsgReq.getMsg())); req.setMsg(JSON.toJSONString(workMsgReq.getMsg()));
log.info("sendWorkMsg:{}", JSON.toJSONString(workMsgReq)); log.info("sendWorkMsg:{}", JSON.toJSONString(workMsgReq));
OapiMessageCorpconversationAsyncsendV2Response rsp = client.execute(req, dingToken); OapiMessageCorpconversationAsyncsendV2Response rsp = client.execute(req, getToken());
log.info("OapiMessageResponse:{}",rsp.getBody()); log.info("OapiMessageResponse:{}", rsp.getBody());
if (rsp.getErrcode() == 0) { if (rsp.getErrcode() == 0) {
return Rest.ok(rsp.getMsg(), rsp.getRequestId()); return Rest.ok(rsp.getMsg(), rsp.getRequestId());
} else { } else {
......
...@@ -11,236 +11,245 @@ import com.mortals.xhx.module.perform.model.vo.PerformAttendAppealVo; ...@@ -11,236 +11,245 @@ import com.mortals.xhx.module.perform.model.vo.PerformAttendAppealVo;
import com.mortals.xhx.module.perform.model.PerformAttendAppealFilesEntity; import com.mortals.xhx.module.perform.model.PerformAttendAppealFilesEntity;
import lombok.Data; import lombok.Data;
/** /**
* 绩效记录申诉信息实体对象 * 绩效记录申诉信息实体对象
* *
* @author zxfei * @author zxfei
* @date 2023-07-12 * @date 2023-07-15
*/ */
@Data @Data
public class PerformAttendAppealEntity extends PerformAttendAppealVo { public class PerformAttendAppealEntity extends PerformAttendAppealVo {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 核查记录Id * 核查记录Id
*/ */
private Long checkRecordId; private Long checkRecordId;
/** /**
* 员工ID * 员工ID
*/ */
private Long staffId; private Long staffId;
/** /**
* 员工姓名 * 员工姓名
*/ */
private String staffName; private String staffName;
/** /**
* 工号 * 工号
*/ */
private String workNum; private String workNum;
/** /**
* 所属部门 * 所属部门
*/ */
private Long deptId; private Long deptId;
/** /**
* 所属部门名称 * 所属部门名称
*/ */
private String deptName; private String deptName;
/** /**
* 所属考勤组ID * 所属考勤组ID
*/ */
private Long attendanceGroupId; private Long attendanceGroupId;
/** /**
* 所属考勤组名称 * 所属考勤组名称
*/ */
private String attendanceGroupName; private String attendanceGroupName;
/** /**
* 扣分时间 * 扣分时间
*/ */
private Date attendanceDate; private Date attendanceDate;
/** /**
* 绩效规则id * 绩效规则id
*/ */
private Long ruleId; private Long ruleId;
/** /**
* 规则名称 * 规则名称
*/ */
private String ruleName; private String ruleName;
/** /**
* 扣分方式(1.系统自动,2.人工添加,3.大厅巡查) * 扣分方式(1.系统自动,2.人工添加,3.大厅巡查)
*/ */
private Integer subMethod; private Integer subMethod;
/** /**
* 增减类型(1.增加,2.扣除) * 增减类型(1.增加,2.扣除)
*/ */
private Integer subAddType; private Integer subAddType;
/** /**
* 扣分或增加分值 * 扣分或增加分值
*/ */
private BigDecimal score; private BigDecimal score;
/** /**
* 上下班时间 * 上下班时间
*/ */
private String goOffTimeStr; private String goOffTimeStr;
/** /**
* 异常时间 * 异常时间
*/ */
private Date errorTime; private Date errorTime;
/** /**
* 实际打卡时间 * 实际打卡时间
*/ */
private Date actualAttendTime; private Date actualAttendTime;
/** /**
* 异常处理结果 * 异常处理结果
*/ */
private String errorResult; private String errorResult;
/** /**
* 核查人员 * 核查人员
*/ */
@Excel(name = "核查人员") @Excel(name = "核查人员")
private String checkPerson; private String checkPerson;
/** /**
* 核查时间 * 核查时间
*/ */
private Date checkTime; private Date checkTime;
/** /**
* 核查说明 * 核查说明
*/ */
@Excel(name = "核查说明") @Excel(name = "核查说明")
private String checkDesc; private String checkDesc;
/** /**
* 核查结果 * 核查结果
*/ */
@Excel(name = "核查结果") @Excel(name = "核查结果")
private String checkResult; private String checkResult;
/** /**
* 处理状态(1.未处理,2.已处理) * 处理状态(1.未处理,2.已处理)
*/ */
private Integer processStatus; private Integer processStatus;
/** /**
* 申诉说明 * 申诉说明
*/ */
@Excel(name = "申诉说明") @Excel(name = "申诉说明")
private String appealDesc; private String appealDesc;
/** /**
* 申诉时间 * 申诉时间
*/ */
private Date appealTime; private Date appealTime;
/** /**
* 申诉结果(1.通过,2.不通过) * 申诉结果(1.通过,2.不通过)
*/ */
private Integer appealResult; private Integer appealResult;
/** /**
* 说明 * 说明
*/ */
@Excel(name = "说明") @Excel(name = "说明")
private String remark; private String remark;
/** /**
* 违规类型, * 违规类型,
*/ */
private String violationType; private String violationType;
/** /**
* 评价结果(1.非常不满意,2.差评) * 评价结果(1.非常不满意,2.差评)
*/ */
private Integer reviewResult; private Integer reviewResult;
/** /**
* 评价时间 * 评价时间
*/ */
private Date reviewTime; private Date reviewTime;
/** /**
* 评价来源(窗口评价系统,导视系统,自助服务系统,微官网,其它) * 评价来源(窗口评价系统,导视系统,自助服务系统,微官网,其它)
*/ */
@Excel(name = "评价来源", readConverterExp = "评价来源(窗口评价系统,导视系统,自助服务系统,微官网,其它)") @Excel(name = "评价来源", readConverterExp = "评价来源(窗口评价系统,导视系统,自助服务系统,微官网,其它)")
private String reviewSource; private String reviewSource;
/** /**
* 评价设备 * 评价设备
*/ */
private String reviewDevice; private String reviewDevice;
/** /**
* 投诉标题 * 投诉标题
*/ */
@Excel(name = "投诉标题") @Excel(name = "投诉标题")
private String complainTitle; private String complainTitle;
/** /**
* 投诉内容 * 投诉内容
*/ */
@Excel(name = "投诉内容") @Excel(name = "投诉内容")
private String complainContent; private String complainContent;
/** /**
* 投诉人真实姓名 * 投诉人真实姓名
*/ */
private String complainRealName; private String complainRealName;
/** /**
* 联系电话 * 联系电话
*/ */
@Excel(name = "联系电话") @Excel(name = "联系电话")
private String contact; private String contact;
/** /**
* 投诉时间 * 投诉时间
*/ */
private Date complainTime; private Date complainTime;
/** /**
* 投诉来源 * 投诉来源
*/ */
private String complainSource; private String complainSource;
/** /**
* 投诉设备 * 投诉设备
*/ */
private String complainDevice; private String complainDevice;
/** /**
* 办件编码 * 办件编码
*/ */
@Excel(name = "办件编码") @Excel(name = "办件编码")
private String goworkCode; private String goworkCode;
/** /**
* 办件所属部门 * 办件所属部门
*/ */
@Excel(name = "办件所属部门") @Excel(name = "办件所属部门")
private String goworkDepts; private String goworkDepts;
/** /**
* 事项名称 * 事项名称
*/ */
@Excel(name = "事项名称") @Excel(name = "事项名称")
private String matterlName; private String matterlName;
/** /**
* 办理时间 * 办理时间
*/ */
@Excel(name = "办理时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "办理时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date goworkTime; private Date goworkTime;
/** /**
* 违规类型(1.脱岗,2.离岗,3.玩手机,4.睡觉) * 违规类型(1.脱岗,2.离岗,3.玩手机,4.睡觉)
*/ */
@Excel(name = "违规类型", readConverterExp = "1=脱岗,2.离岗,3.玩手机,4.睡觉") @Excel(name = "违规类型", readConverterExp = "1=脱岗,2.离岗,3.玩手机,4.睡觉")
private Integer irregularType; private Integer irregularType;
/** /**
* 发生时间 * 发生时间
*/ */
@Excel(name = "发生时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "发生时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date happenTime; private Date happenTime;
/** /**
* 持续时间,秒 * 持续时间,秒
*/ */
private Integer duration; private Integer duration;
/** /**
* 报警时间 * 报警时间
*/ */
private Date alarmTime; private Date alarmTime;
/** /**
* 图片凭证地址 * 图片凭证地址
*/ */
private String snapPath; private String snapPath;
/** /**
* 违规类型(1.工作纪律) * 违规类型(1.工作纪律)
*/ */
private Integer irregularOtherType; private Integer irregularOtherType;
/** /**
* 绩效类型【attend:考勤绩效,review:评价差评绩效,complain:评价投诉绩效,gowork:办件绩效,effect:效能绩效,other:其它绩效】 * 绩效类型【attend:考勤绩效,review:评价差评绩效,complain:评价投诉绩效,gowork:办件绩效,effect:效能绩效,other:其它绩效】
*/ */
private String performType; private String performType;
/** /**
* 绩效记录申诉附件信息信息 * 扣分人员
*/ */
@Excel(name = "扣分人员")
private String deductPerson;
/**
* 扣分时间
*/
private Date deductTime;
/**
* 绩效记录申诉附件信息信息
*/
private List<PerformAttendAppealFilesEntity> performAttendAppealFilesList=new ArrayList<>();; private List<PerformAttendAppealFilesEntity> performAttendAppealFilesList=new ArrayList<>();;
public List<PerformAttendAppealFilesEntity> getPerformAttendAppealFilesList(){ public List<PerformAttendAppealFilesEntity> getPerformAttendAppealFilesList(){
return performAttendAppealFilesList; return performAttendAppealFilesList;
} }
public void setPerformAttendAppealFilesList(List<PerformAttendAppealFilesEntity> performAttendAppealFilesList){ public void setPerformAttendAppealFilesList(List<PerformAttendAppealFilesEntity> performAttendAppealFilesList){
...@@ -248,7 +257,7 @@ public class PerformAttendAppealEntity extends PerformAttendAppealVo { ...@@ -248,7 +257,7 @@ public class PerformAttendAppealEntity extends PerformAttendAppealVo {
} }
@Override @Override
public int hashCode() { public int hashCode() {
return this.getId().hashCode(); return this.getId().hashCode();
} }
@Override @Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
...@@ -256,7 +265,7 @@ public class PerformAttendAppealEntity extends PerformAttendAppealVo { ...@@ -256,7 +265,7 @@ public class PerformAttendAppealEntity extends PerformAttendAppealVo {
if (obj instanceof PerformAttendAppealEntity) { if (obj instanceof PerformAttendAppealEntity) {
PerformAttendAppealEntity tmp = (PerformAttendAppealEntity) obj; PerformAttendAppealEntity tmp = (PerformAttendAppealEntity) obj;
if (this.getId() == tmp.getId()) { if (this.getId() == tmp.getId()) {
return true; return true;
} }
} }
return false; return false;
...@@ -264,104 +273,108 @@ public class PerformAttendAppealEntity extends PerformAttendAppealVo { ...@@ -264,104 +273,108 @@ public class PerformAttendAppealEntity extends PerformAttendAppealVo {
public void initAttrValue(){ public void initAttrValue(){
this.checkRecordId = -1L; this.checkRecordId = -1L;
this.staffId = -1L;
this.staffName = "";
this.staffId = -1L; this.workNum = "";
this.staffName = ""; this.deptId = -1L;
this.workNum = ""; this.deptName = "";
this.deptId = -1L; this.attendanceGroupId = -1L;
this.deptName = ""; this.attendanceGroupName = "";
this.attendanceGroupId = -1L; this.attendanceDate = null;
this.attendanceGroupName = ""; this.ruleId = -1L;
this.attendanceDate = null; this.ruleName = "";
this.ruleId = -1L; this.subMethod = 1;
this.ruleName = ""; this.subAddType = 1;
this.subMethod = 1; this.score = BigDecimal.valueOf(0.00);
this.subAddType = 1; this.goOffTimeStr = "";
this.score = BigDecimal.valueOf(0.00); this.errorTime = null;
this.goOffTimeStr = ""; this.actualAttendTime = null;
this.errorTime = null; this.errorResult = "";
this.actualAttendTime = null; this.checkPerson = "";
this.errorResult = ""; this.checkTime = null;
this.checkPerson = ""; this.checkDesc = "";
this.checkTime = null; this.checkResult = "";
this.checkDesc = ""; this.processStatus = 1;
this.checkResult = ""; this.appealDesc = "";
this.processStatus = 1; this.appealTime = null;
this.appealDesc = ""; this.appealResult = 2;
this.appealTime = null; this.remark = "";
this.appealResult = 2; this.violationType = "";
this.remark = ""; this.reviewResult = -1;
this.violationType = ""; this.reviewTime = null;
this.reviewResult = -1; this.reviewSource = "";
this.reviewTime = null; this.reviewDevice = "";
this.reviewSource = ""; this.complainTitle = "";
this.reviewDevice = ""; this.complainContent = "";
this.complainTitle = ""; this.complainRealName = "";
this.complainContent = ""; this.contact = "";
this.complainRealName = ""; this.complainTime = null;
this.contact = ""; this.complainSource = "";
this.complainTime = null; this.complainDevice = "";
this.complainSource = ""; this.goworkCode = "";
this.complainDevice = ""; this.goworkDepts = "";
this.goworkCode = ""; this.matterlName = "";
this.goworkDepts = ""; this.goworkTime = null;
this.matterlName = ""; this.irregularType = -1;
this.goworkTime = null; this.happenTime = null;
this.irregularType = -1; this.duration = 0;
this.happenTime = null; this.alarmTime = null;
this.duration = 0; this.snapPath = "";
this.alarmTime = null; this.irregularOtherType = -1;
this.snapPath = ""; this.performType = "";
this.irregularOtherType = -1; this.deductPerson = "";
this.performType = ""; this.deductTime = null;
} }
} }
\ No newline at end of file
package com.mortals.xhx.module.window.service.impl; package com.mortals.xhx.module.window.service.impl;
import com.mortals.xhx.module.dept.model.DeptEntity; import com.mortals.xhx.module.dept.model.DeptEntity;
import com.mortals.xhx.module.dept.service.DeptService; import com.mortals.xhx.module.dept.service.DeptService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -13,17 +14,20 @@ import com.mortals.xhx.module.window.model.WindowOwnerDetailEntity; ...@@ -13,17 +14,20 @@ import com.mortals.xhx.module.window.model.WindowOwnerDetailEntity;
import com.mortals.xhx.module.window.model.WindowOwnerDetailQuery; import com.mortals.xhx.module.window.model.WindowOwnerDetailQuery;
import com.mortals.xhx.module.window.service.WindowOwnerDetailService; import com.mortals.xhx.module.window.service.WindowOwnerDetailService;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import java.util.Date; import java.util.Date;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
/** /**
* WindowOwnerService * WindowOwnerService
* 窗口负责人 service实现 * 窗口负责人 service实现
* *
* @author zxfei * @author zxfei
* @date 2023-07-12 * @date 2023-07-12
*/ */
@Service("windowOwnerService") @Service("windowOwnerService")
@Slf4j @Slf4j
public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerDao, WindowOwnerEntity, Long> implements WindowOwnerService { public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerDao, WindowOwnerEntity, Long> implements WindowOwnerService {
...@@ -31,37 +35,54 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD ...@@ -31,37 +35,54 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD
private WindowOwnerDetailService windowOwnerDetailService; private WindowOwnerDetailService windowOwnerDetailService;
@Autowired @Autowired
private DeptService deptService; private DeptService deptService;
@Override
protected void saveBefore(WindowOwnerEntity entity, Context context) throws AppException {
if (!ObjectUtils.isEmpty(entity.getWindowOwnerDetailList())) {
entity.setWindowCount(entity.getWindowOwnerDetailList().size());
}
}
@Override
protected void updateBefore(WindowOwnerEntity entity, Context context) throws AppException {
if (!ObjectUtils.isEmpty(entity.getWindowOwnerDetailList())) {
entity.setWindowCount(entity.getWindowOwnerDetailList().size());
}
}
@Override @Override
protected void saveAfter(WindowOwnerEntity entity, Context context) throws AppException { protected void saveAfter(WindowOwnerEntity entity, Context context) throws AppException {
if(!ObjectUtils.isEmpty(entity.getWindowOwnerDetailList())){ if (!ObjectUtils.isEmpty(entity.getWindowOwnerDetailList())) {
entity.getWindowOwnerDetailList().stream().peek(item->{ entity.getWindowOwnerDetailList().stream().peek(item -> {
item.setOwnerId(entity.getId()); item.setOwnerId(entity.getId());
item.setCreateUserId(this.getContextUserId(context)); item.setCreateUserId(this.getContextUserId(context));
item.setCreateTime(new Date()); item.setCreateTime(new Date());
}).count(); }).count();
DeptEntity deptEntity = deptService.get(entity.getId()); DeptEntity deptEntity = deptService.get(entity.getId());
entity.setDeptName(deptEntity==null?"":deptEntity.getDeptName()); entity.setDeptName(deptEntity == null ? "" : deptEntity.getDeptName());
entity.setNumber(entity.getWindowOwnerDetailList().size()+""); entity.setNumber(entity.getWindowOwnerDetailList().size() + "");
windowOwnerDetailService.save(entity.getWindowOwnerDetailList()); windowOwnerDetailService.save(entity.getWindowOwnerDetailList());
} }
super.saveAfter(entity, context); super.saveAfter(entity, context);
} }
@Override @Override
protected void updateAfter(WindowOwnerEntity entity, Context context) throws AppException { protected void updateAfter(WindowOwnerEntity entity, Context context) throws AppException {
if(!ObjectUtils.isEmpty(entity.getWindowOwnerDetailList())){ if (!ObjectUtils.isEmpty(entity.getWindowOwnerDetailList())) {
Long[] windowOwnerDetailIds = windowOwnerDetailService.find(new WindowOwnerDetailQuery().ownerId(entity.getId())).stream().map(WindowOwnerDetailEntity::getId).toArray(Long[]::new); Long[] windowOwnerDetailIds = windowOwnerDetailService.find(new WindowOwnerDetailQuery().ownerId(entity.getId())).stream().map(WindowOwnerDetailEntity::getId).toArray(Long[]::new);
windowOwnerDetailService.remove(windowOwnerDetailIds,context); windowOwnerDetailService.remove(windowOwnerDetailIds, context);
entity.getWindowOwnerDetailList().stream().peek(item ->{ entity.getWindowOwnerDetailList().stream().peek(item -> {
item.setOwnerId(entity.getId()); item.setOwnerId(entity.getId());
item.setCreateUserId(this.getContextUserId(context)); item.setCreateUserId(this.getContextUserId(context));
item.setCreateTime(new Date()); item.setCreateTime(new Date());
item.setUpdateUserId(this.getContextUserId(context)); item.setUpdateUserId(this.getContextUserId(context));
item.setUpdateTime(new Date()); item.setUpdateTime(new Date());
}).count(); }).count();
entity.setNumber(entity.getWindowOwnerDetailList().size()+""); entity.setNumber(entity.getWindowOwnerDetailList().size() + "");
windowOwnerDetailService.save(entity.getWindowOwnerDetailList()); windowOwnerDetailService.save(entity.getWindowOwnerDetailList());
} }
super.updateAfter(entity, context); super.updateAfter(entity, context);
...@@ -70,7 +91,7 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD ...@@ -70,7 +91,7 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD
@Override @Override
protected void removeAfter(Long[] ids, Context context, int result) throws AppException { protected void removeAfter(Long[] ids, Context context, int result) throws AppException {
List<WindowOwnerDetailEntity> windowOwnerDetaillist = windowOwnerDetailService.find(new WindowOwnerDetailQuery().ownerIdList(Arrays.asList(ids))); List<WindowOwnerDetailEntity> windowOwnerDetaillist = windowOwnerDetailService.find(new WindowOwnerDetailQuery().ownerIdList(Arrays.asList(ids)));
windowOwnerDetailService.removeList(windowOwnerDetaillist,context); windowOwnerDetailService.removeList(windowOwnerDetaillist, context);
super.removeAfter(ids, context, result); super.removeAfter(ids, context, result);
} }
} }
\ No newline at end of file
...@@ -15,10 +15,6 @@ ...@@ -15,10 +15,6 @@
<result property="email" column="email" /> <result property="email" column="email" />
<result property="qq" column="qq" /> <result property="qq" column="qq" />
<result property="userType" column="userType" /> <result property="userType" column="userType" />
<result property="deptId" column="deptId" />
<result property="deptName" column="deptName" />
<result property="siteIds" column="siteIds" />
<result property="areaCodes" column="areaCodes" />
<result property="status" column="status" /> <result property="status" column="status" />
<result property="customerId" column="customerId" /> <result property="customerId" column="customerId" />
<result property="createTime" column="createTime" /> <result property="createTime" column="createTime" />
...@@ -26,6 +22,11 @@ ...@@ -26,6 +22,11 @@
<result property="createUserName" column="createUserName" /> <result property="createUserName" column="createUserName" />
<result property="lastLoginTime" column="lastLoginTime" /> <result property="lastLoginTime" column="lastLoginTime" />
<result property="lastLoginAddress" column="lastLoginAddress" /> <result property="lastLoginAddress" column="lastLoginAddress" />
<result property="deptId" column="deptId" />
<result property="deptName" column="deptName" />
<result property="siteIds" column="siteIds" />
<result property="areaCodes" column="areaCodes" />
<result property="dingUserId" column="dingUserId" />
</resultMap> </resultMap>
...@@ -63,18 +64,6 @@ ...@@ -63,18 +64,6 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('userType') or colPickMode == 1 and data.containsKey('userType')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('userType') or colPickMode == 1 and data.containsKey('userType')))">
a.userType, a.userType,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deptId') or colPickMode == 1 and data.containsKey('deptId')))">
a.deptId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deptName') or colPickMode == 1 and data.containsKey('deptName')))">
a.deptName,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('siteIds') or colPickMode == 1 and data.containsKey('siteIds')))">
a.siteIds,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('areaCodes') or colPickMode == 1 and data.containsKey('areaCodes')))">
a.areaCodes,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('status') or colPickMode == 1 and data.containsKey('status')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('status') or colPickMode == 1 and data.containsKey('status')))">
a.status, a.status,
</if> </if>
...@@ -96,23 +85,38 @@ ...@@ -96,23 +85,38 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('lastLoginAddress') or colPickMode == 1 and data.containsKey('lastLoginAddress')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('lastLoginAddress') or colPickMode == 1 and data.containsKey('lastLoginAddress')))">
a.lastLoginAddress, a.lastLoginAddress,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deptId') or colPickMode == 1 and data.containsKey('deptId')))">
a.deptId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deptName') or colPickMode == 1 and data.containsKey('deptName')))">
a.deptName,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('siteIds') or colPickMode == 1 and data.containsKey('siteIds')))">
a.siteIds,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('areaCodes') or colPickMode == 1 and data.containsKey('areaCodes')))">
a.areaCodes,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('dingUserId') or colPickMode == 1 and data.containsKey('dingUserId')))">
a.dingUserId,
</if>
</trim> </trim>
</sql> </sql>
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="UserEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="UserEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_user insert into mortals_xhx_user
(loginName,loginPwd,loginLimitAddress,realName,mobile,phone,email,qq,userType,deptId,deptName,siteIds,areaCodes,status,customerId,createTime,createUserId,createUserName,lastLoginTime,lastLoginAddress) (loginName,loginPwd,loginLimitAddress,realName,mobile,phone,email,qq,userType,status,customerId,createTime,createUserId,createUserName,lastLoginTime,lastLoginAddress,deptId,deptName,siteIds,areaCodes,dingUserId)
VALUES VALUES
(#{loginName},#{loginPwd},#{loginLimitAddress},#{realName},#{mobile},#{phone},#{email},#{qq},#{userType},#{deptId},#{deptName},#{siteIds},#{areaCodes},#{status},#{customerId},#{createTime},#{createUserId},#{createUserName},#{lastLoginTime},#{lastLoginAddress}) (#{loginName},#{loginPwd},#{loginLimitAddress},#{realName},#{mobile},#{phone},#{email},#{qq},#{userType},#{status},#{customerId},#{createTime},#{createUserId},#{createUserName},#{lastLoginTime},#{lastLoginAddress},#{deptId},#{deptName},#{siteIds},#{areaCodes},#{dingUserId})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_user insert into mortals_xhx_user
(loginName,loginPwd,loginLimitAddress,realName,mobile,phone,email,qq,userType,deptId,deptName,siteIds,areaCodes,status,customerId,createTime,createUserId,createUserName,lastLoginTime,lastLoginAddress) (loginName,loginPwd,loginLimitAddress,realName,mobile,phone,email,qq,userType,status,customerId,createTime,createUserId,createUserName,lastLoginTime,lastLoginAddress,deptId,deptName,siteIds,areaCodes,dingUserId)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.loginName},#{item.loginPwd},#{item.loginLimitAddress},#{item.realName},#{item.mobile},#{item.phone},#{item.email},#{item.qq},#{item.userType},#{item.deptId},#{item.deptName},#{item.siteIds},#{item.areaCodes},#{item.status},#{item.customerId},#{item.createTime},#{item.createUserId},#{item.createUserName},#{item.lastLoginTime},#{item.lastLoginAddress}) (#{item.loginName},#{item.loginPwd},#{item.loginLimitAddress},#{item.realName},#{item.mobile},#{item.phone},#{item.email},#{item.qq},#{item.userType},#{item.status},#{item.customerId},#{item.createTime},#{item.createUserId},#{item.createUserName},#{item.lastLoginTime},#{item.lastLoginAddress},#{item.deptId},#{item.deptName},#{item.siteIds},#{item.areaCodes},#{item.dingUserId})
</foreach> </foreach>
</insert> </insert>
...@@ -152,21 +156,6 @@ ...@@ -152,21 +156,6 @@
<if test="(colPickMode==0 and data.containsKey('userTypeIncrement')) or (colPickMode==1 and !data.containsKey('userTypeIncrement'))"> <if test="(colPickMode==0 and data.containsKey('userTypeIncrement')) or (colPickMode==1 and !data.containsKey('userTypeIncrement'))">
a.userType=ifnull(a.userType,0) + #{data.userTypeIncrement}, a.userType=ifnull(a.userType,0) + #{data.userTypeIncrement},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('deptId')) or (colPickMode==1 and !data.containsKey('deptId'))">
a.deptId=#{data.deptId},
</if>
<if test="(colPickMode==0 and data.containsKey('deptIdIncrement')) or (colPickMode==1 and !data.containsKey('deptIdIncrement'))">
a.deptId=ifnull(a.deptId,0) + #{data.deptIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('deptName')) or (colPickMode==1 and !data.containsKey('deptName'))">
a.deptName=#{data.deptName},
</if>
<if test="(colPickMode==0 and data.containsKey('siteIds')) or (colPickMode==1 and !data.containsKey('siteIds'))">
a.siteIds=#{data.siteIds},
</if>
<if test="(colPickMode==0 and data.containsKey('areaCodes')) or (colPickMode==1 and !data.containsKey('areaCodes'))">
a.areaCodes=#{data.areaCodes},
</if>
<if test="(colPickMode==0 and data.containsKey('status')) or (colPickMode==1 and !data.containsKey('status'))"> <if test="(colPickMode==0 and data.containsKey('status')) or (colPickMode==1 and !data.containsKey('status'))">
a.status=#{data.status}, a.status=#{data.status},
</if> </if>
...@@ -197,6 +186,24 @@ ...@@ -197,6 +186,24 @@
<if test="(colPickMode==0 and data.containsKey('lastLoginAddress')) or (colPickMode==1 and !data.containsKey('lastLoginAddress'))"> <if test="(colPickMode==0 and data.containsKey('lastLoginAddress')) or (colPickMode==1 and !data.containsKey('lastLoginAddress'))">
a.lastLoginAddress=#{data.lastLoginAddress}, a.lastLoginAddress=#{data.lastLoginAddress},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('deptId')) or (colPickMode==1 and !data.containsKey('deptId'))">
a.deptId=#{data.deptId},
</if>
<if test="(colPickMode==0 and data.containsKey('deptIdIncrement')) or (colPickMode==1 and !data.containsKey('deptIdIncrement'))">
a.deptId=ifnull(a.deptId,0) + #{data.deptIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('deptName')) or (colPickMode==1 and !data.containsKey('deptName'))">
a.deptName=#{data.deptName},
</if>
<if test="(colPickMode==0 and data.containsKey('siteIds')) or (colPickMode==1 and !data.containsKey('siteIds'))">
a.siteIds=#{data.siteIds},
</if>
<if test="(colPickMode==0 and data.containsKey('areaCodes')) or (colPickMode==1 and !data.containsKey('areaCodes'))">
a.areaCodes=#{data.areaCodes},
</if>
<if test="(colPickMode==0 and data.containsKey('dingUserId')) or (colPickMode==1 and !data.containsKey('dingUserId'))">
a.dingUserId=#{data.dingUserId},
</if>
</trim> </trim>
<trim suffixOverrides="where" suffix=""> <trim suffixOverrides="where" suffix="">
where where
...@@ -277,39 +284,6 @@ ...@@ -277,39 +284,6 @@
</choose> </choose>
</foreach> </foreach>
</trim> </trim>
<trim prefix="deptId=(case" suffix="ELSE deptId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('deptId')) or (colPickMode==1 and !item.containsKey('deptId'))">
when a.id=#{item.id} then #{item.deptId}
</when>
<when test="(colPickMode==0 and item.containsKey('deptIdIncrement')) or (colPickMode==1 and !item.containsKey('deptIdIncrement'))">
when a.id=#{item.id} then ifnull(a.deptId,0) + #{item.deptIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="deptName=(case" suffix="ELSE deptName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('deptName')) or (colPickMode==1 and !item.containsKey('deptName'))">
when a.id=#{item.id} then #{item.deptName}
</if>
</foreach>
</trim>
<trim prefix="siteIds=(case" suffix="ELSE siteIds end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('siteIds')) or (colPickMode==1 and !item.containsKey('siteIds'))">
when a.id=#{item.id} then #{item.siteIds}
</if>
</foreach>
</trim>
<trim prefix="areaCodes=(case" suffix="ELSE areaCodes end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('areaCodes')) or (colPickMode==1 and !item.containsKey('areaCodes'))">
when a.id=#{item.id} then #{item.areaCodes}
</if>
</foreach>
</trim>
<trim prefix="status=(case" suffix="ELSE status end),"> <trim prefix="status=(case" suffix="ELSE status end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<choose> <choose>
...@@ -374,6 +348,46 @@ ...@@ -374,6 +348,46 @@
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="deptId=(case" suffix="ELSE deptId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('deptId')) or (colPickMode==1 and !item.containsKey('deptId'))">
when a.id=#{item.id} then #{item.deptId}
</when>
<when test="(colPickMode==0 and item.containsKey('deptIdIncrement')) or (colPickMode==1 and !item.containsKey('deptIdIncrement'))">
when a.id=#{item.id} then ifnull(a.deptId,0) + #{item.deptIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="deptName=(case" suffix="ELSE deptName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('deptName')) or (colPickMode==1 and !item.containsKey('deptName'))">
when a.id=#{item.id} then #{item.deptName}
</if>
</foreach>
</trim>
<trim prefix="siteIds=(case" suffix="ELSE siteIds end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('siteIds')) or (colPickMode==1 and !item.containsKey('siteIds'))">
when a.id=#{item.id} then #{item.siteIds}
</if>
</foreach>
</trim>
<trim prefix="areaCodes=(case" suffix="ELSE areaCodes end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('areaCodes')) or (colPickMode==1 and !item.containsKey('areaCodes'))">
when a.id=#{item.id} then #{item.areaCodes}
</if>
</foreach>
</trim>
<trim prefix="dingUserId=(case" suffix="ELSE dingUserId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('dingUserId')) or (colPickMode==1 and !item.containsKey('dingUserId'))">
when a.id=#{item.id} then #{item.dingUserId}
</if>
</foreach>
</trim>
</trim> </trim>
where id in where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")"> <foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
...@@ -712,96 +726,6 @@ ...@@ -712,96 +726,6 @@
${_conditionType_} a.userType <![CDATA[ <= ]]> #{${_conditionParam_}.userTypeEnd} ${_conditionType_} a.userType <![CDATA[ <= ]]> #{${_conditionParam_}.userTypeEnd}
</if> </if>
<if test="conditionParamRef.containsKey('deptId')">
<if test="conditionParamRef.deptId != null ">
${_conditionType_} a.deptId = #{${_conditionParam_}.deptId}
</if>
<if test="conditionParamRef.deptId == null">
${_conditionType_} a.deptId is null
</if>
</if>
<if test="conditionParamRef.containsKey('deptIdList') and conditionParamRef.deptIdList.size() > 0">
${_conditionType_} a.deptId in
<foreach collection="conditionParamRef.deptIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('deptIdNotList') and conditionParamRef.deptIdNotList.size() > 0">
${_conditionType_} a.deptId not in
<foreach collection="conditionParamRef.deptIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('deptIdStart') and conditionParamRef.deptIdStart != null">
${_conditionType_} a.deptId <![CDATA[ >= ]]> #{${_conditionParam_}.deptIdStart}
</if>
<if test="conditionParamRef.containsKey('deptIdEnd') and conditionParamRef.deptIdEnd != null">
${_conditionType_} a.deptId <![CDATA[ <= ]]> #{${_conditionParam_}.deptIdEnd}
</if>
<if test="conditionParamRef.containsKey('deptName')">
<if test="conditionParamRef.deptName != null and conditionParamRef.deptName != ''">
${_conditionType_} a.deptName like #{${_conditionParam_}.deptName}
</if>
<if test="conditionParamRef.deptName == null">
${_conditionType_} a.deptName is null
</if>
</if>
<if test="conditionParamRef.containsKey('deptNameList') and conditionParamRef.deptNameList.size() > 0">
${_conditionType_} a.deptName in
<foreach collection="conditionParamRef.deptNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('deptNameNotList') and conditionParamRef.deptNameNotList.size() > 0">
${_conditionType_} a.deptName not in
<foreach collection="conditionParamRef.deptNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('siteIds')">
<if test="conditionParamRef.siteIds != null and conditionParamRef.siteIds != ''">
${_conditionType_} a.siteIds like #{${_conditionParam_}.siteIds}
</if>
<if test="conditionParamRef.siteIds == null">
${_conditionType_} a.siteIds is null
</if>
</if>
<if test="conditionParamRef.containsKey('siteIdsList') and conditionParamRef.siteIdsList.size() > 0">
${_conditionType_} a.siteIds in
<foreach collection="conditionParamRef.siteIdsList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('siteIdsNotList') and conditionParamRef.siteIdsNotList.size() > 0">
${_conditionType_} a.siteIds not in
<foreach collection="conditionParamRef.siteIdsNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('areaCodes')">
<if test="conditionParamRef.areaCodes != null and conditionParamRef.areaCodes != ''">
${_conditionType_} a.areaCodes like #{${_conditionParam_}.areaCodes}
</if>
<if test="conditionParamRef.areaCodes == null">
${_conditionType_} a.areaCodes is null
</if>
</if>
<if test="conditionParamRef.containsKey('areaCodesList') and conditionParamRef.areaCodesList.size() > 0">
${_conditionType_} a.areaCodes in
<foreach collection="conditionParamRef.areaCodesList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('areaCodesNotList') and conditionParamRef.areaCodesNotList.size() > 0">
${_conditionType_} a.areaCodes not in
<foreach collection="conditionParamRef.areaCodesNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('status')"> <if test="conditionParamRef.containsKey('status')">
<if test="conditionParamRef.status != null "> <if test="conditionParamRef.status != null ">
${_conditionType_} a.status = #{${_conditionParam_}.status} ${_conditionType_} a.status = #{${_conditionParam_}.status}
...@@ -955,6 +879,117 @@ ...@@ -955,6 +879,117 @@
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('deptId')">
<if test="conditionParamRef.deptId != null ">
${_conditionType_} a.deptId = #{${_conditionParam_}.deptId}
</if>
<if test="conditionParamRef.deptId == null">
${_conditionType_} a.deptId is null
</if>
</if>
<if test="conditionParamRef.containsKey('deptIdList') and conditionParamRef.deptIdList.size() > 0">
${_conditionType_} a.deptId in
<foreach collection="conditionParamRef.deptIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('deptIdNotList') and conditionParamRef.deptIdNotList.size() > 0">
${_conditionType_} a.deptId not in
<foreach collection="conditionParamRef.deptIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('deptIdStart') and conditionParamRef.deptIdStart != null">
${_conditionType_} a.deptId <![CDATA[ >= ]]> #{${_conditionParam_}.deptIdStart}
</if>
<if test="conditionParamRef.containsKey('deptIdEnd') and conditionParamRef.deptIdEnd != null">
${_conditionType_} a.deptId <![CDATA[ <= ]]> #{${_conditionParam_}.deptIdEnd}
</if>
<if test="conditionParamRef.containsKey('deptName')">
<if test="conditionParamRef.deptName != null and conditionParamRef.deptName != ''">
${_conditionType_} a.deptName like #{${_conditionParam_}.deptName}
</if>
<if test="conditionParamRef.deptName == null">
${_conditionType_} a.deptName is null
</if>
</if>
<if test="conditionParamRef.containsKey('deptNameList') and conditionParamRef.deptNameList.size() > 0">
${_conditionType_} a.deptName in
<foreach collection="conditionParamRef.deptNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('deptNameNotList') and conditionParamRef.deptNameNotList.size() > 0">
${_conditionType_} a.deptName not in
<foreach collection="conditionParamRef.deptNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('siteIds')">
<if test="conditionParamRef.siteIds != null and conditionParamRef.siteIds != ''">
${_conditionType_} a.siteIds like #{${_conditionParam_}.siteIds}
</if>
<if test="conditionParamRef.siteIds == null">
${_conditionType_} a.siteIds is null
</if>
</if>
<if test="conditionParamRef.containsKey('siteIdsList') and conditionParamRef.siteIdsList.size() > 0">
${_conditionType_} a.siteIds in
<foreach collection="conditionParamRef.siteIdsList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('siteIdsNotList') and conditionParamRef.siteIdsNotList.size() > 0">
${_conditionType_} a.siteIds not in
<foreach collection="conditionParamRef.siteIdsNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('areaCodes')">
<if test="conditionParamRef.areaCodes != null and conditionParamRef.areaCodes != ''">
${_conditionType_} a.areaCodes like #{${_conditionParam_}.areaCodes}
</if>
<if test="conditionParamRef.areaCodes == null">
${_conditionType_} a.areaCodes is null
</if>
</if>
<if test="conditionParamRef.containsKey('areaCodesList') and conditionParamRef.areaCodesList.size() > 0">
${_conditionType_} a.areaCodes in
<foreach collection="conditionParamRef.areaCodesList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('areaCodesNotList') and conditionParamRef.areaCodesNotList.size() > 0">
${_conditionType_} a.areaCodes not in
<foreach collection="conditionParamRef.areaCodesNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('dingUserId')">
<if test="conditionParamRef.dingUserId != null and conditionParamRef.dingUserId != ''">
${_conditionType_} a.dingUserId like #{${_conditionParam_}.dingUserId}
</if>
<if test="conditionParamRef.dingUserId == null">
${_conditionType_} a.dingUserId is null
</if>
</if>
<if test="conditionParamRef.containsKey('dingUserIdList') and conditionParamRef.dingUserIdList.size() > 0">
${_conditionType_} a.dingUserId in
<foreach collection="conditionParamRef.dingUserIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('dingUserIdNotList') and conditionParamRef.dingUserIdNotList.size() > 0">
${_conditionType_} a.dingUserId not in
<foreach collection="conditionParamRef.dingUserIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
</sql> </sql>
<sql id="_orderCols_"> <sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()"> <if test="orderColList != null and !orderColList.isEmpty()">
...@@ -1018,26 +1053,6 @@ ...@@ -1018,26 +1053,6 @@
<if test='orderCol.userType != null and "DESC".equalsIgnoreCase(orderCol.userType)'>DESC</if> <if test='orderCol.userType != null and "DESC".equalsIgnoreCase(orderCol.userType)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('deptId')">
a.deptId
<if test='orderCol.deptId != null and "DESC".equalsIgnoreCase(orderCol.deptId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('deptName')">
a.deptName
<if test='orderCol.deptName != null and "DESC".equalsIgnoreCase(orderCol.deptName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('siteIds')">
a.siteIds
<if test='orderCol.siteIds != null and "DESC".equalsIgnoreCase(orderCol.siteIds)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('areaCodes')">
a.areaCodes
<if test='orderCol.areaCodes != null and "DESC".equalsIgnoreCase(orderCol.areaCodes)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('status')"> <if test="orderCol.containsKey('status')">
a.status a.status
<if test='orderCol.status != null and "DESC".equalsIgnoreCase(orderCol.status)'>DESC</if> <if test='orderCol.status != null and "DESC".equalsIgnoreCase(orderCol.status)'>DESC</if>
...@@ -1073,6 +1088,31 @@ ...@@ -1073,6 +1088,31 @@
<if test='orderCol.lastLoginAddress != null and "DESC".equalsIgnoreCase(orderCol.lastLoginAddress)'>DESC</if> <if test='orderCol.lastLoginAddress != null and "DESC".equalsIgnoreCase(orderCol.lastLoginAddress)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('deptId')">
a.deptId
<if test='orderCol.deptId != null and "DESC".equalsIgnoreCase(orderCol.deptId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('deptName')">
a.deptName
<if test='orderCol.deptName != null and "DESC".equalsIgnoreCase(orderCol.deptName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('siteIds')">
a.siteIds
<if test='orderCol.siteIds != null and "DESC".equalsIgnoreCase(orderCol.siteIds)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('areaCodes')">
a.areaCodes
<if test='orderCol.areaCodes != null and "DESC".equalsIgnoreCase(orderCol.areaCodes)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('dingUserId')">
a.dingUserId
<if test='orderCol.dingUserId != null and "DESC".equalsIgnoreCase(orderCol.dingUserId)'>DESC</if>
,
</if>
</trim> </trim>
</if> </if>
</sql> </sql>
......
...@@ -641,3 +641,13 @@ CREATE TABLE mortals_xhx_staff_perform_summary( ...@@ -641,3 +641,13 @@ CREATE TABLE mortals_xhx_staff_perform_summary(
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='员工绩效统计'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='员工绩效统计';
-- ----------------------------
2023-7-15
-- ----------------------------
ALTER TABLE mortals_xhx_perform_attend_appeal ADD COLUMN `deductPerson` varchar(128) DEFAULT '' COMMENT '扣分人员' AFTER subMethod;
ALTER TABLE mortals_xhx_perform_attend_appeal ADD COLUMN `deductTime` datetime COMMENT '扣分时间' AFTER deductPerson;
ALTER TABLE mortals_xhx_user ADD COLUMN `dingUserId` varchar(64) DEFAULT '' COMMENT '钉钉userId' AFTER customerId;
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