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

Merge remote-tracking branch 'origin/master'

parents 22665150 75d04a79
...@@ -113,8 +113,6 @@ export default { ...@@ -113,8 +113,6 @@ export default {
}, },
}, },
mounted() { mounted() {
console.log(this.tableData);
console.log(this.loading);
}, },
watch: { watch: {
tableData(val) { tableData(val) {
......
...@@ -22,9 +22,11 @@ ...@@ -22,9 +22,11 @@
<span>&nbsp;</span> <span>&nbsp;</span>
<el-switch <el-switch
v-if="switchBtn" v-if="switchBtn"
v-model="row.check"
@change="$emit('view', row)" @change="$emit('view', row)"
title="核查" title="核查"
v-model="row.check" :active-value="true"
:inactive-value="false"
></el-switch> ></el-switch>
<span>&nbsp;</span> <span>&nbsp;</span>
<el-button <el-button
......
...@@ -66,6 +66,7 @@ ...@@ -66,6 +66,7 @@
notAdd notAdd
notDel notDel
notSearch notSearch
notPagination
:config="tableConfig" :config="tableConfig"
> >
</LayoutTable> </LayoutTable>
...@@ -107,6 +108,7 @@ ...@@ -107,6 +108,7 @@
notAdd notAdd
notDel notDel
notSearch notSearch
notPagination
:config="tableConfig" :config="tableConfig"
> >
</LayoutTable> </LayoutTable>
...@@ -148,6 +150,7 @@ ...@@ -148,6 +150,7 @@
notAdd notAdd
notDel notDel
notSearch notSearch
notPagination
:config="tableConfig" :config="tableConfig"
> >
</LayoutTable> </LayoutTable>
...@@ -189,6 +192,7 @@ ...@@ -189,6 +192,7 @@
notAdd notAdd
notDel notDel
notSearch notSearch
notPagination
:config="tableConfig" :config="tableConfig"
> >
</LayoutTable> </LayoutTable>
...@@ -230,6 +234,7 @@ ...@@ -230,6 +234,7 @@
notAdd notAdd
notDel notDel
notSearch notSearch
notPagination
:config="tableConfig" :config="tableConfig"
> >
</LayoutTable> </LayoutTable>
...@@ -310,7 +315,7 @@ export default { ...@@ -310,7 +315,7 @@ export default {
mixins: [form, table], mixins: [form, table],
components: {}, components: {},
created() { created() {
this.changePath("perform/dept/conf"); this.changePath("perform//staff/conf");
// 获取部门列表 // 获取部门列表
this.$post("/dept/list", { page: 1, size: -1 }).then((res) => { this.$post("/dept/list", { page: 1, size: -1 }).then((res) => {
if (res.code == 1) { if (res.code == 1) {
...@@ -319,6 +324,7 @@ export default { ...@@ -319,6 +324,7 @@ export default {
this.deptArr = []; this.deptArr = [];
} }
}); });
this.checkArr = [];
// this.getKaoQin(); // this.getKaoQin();
}, },
data() { data() {
...@@ -333,30 +339,17 @@ export default { ...@@ -333,30 +339,17 @@ export default {
direction: "rtl", direction: "rtl",
toString: [], toString: [],
toDate: [], toDate: [],
tableData: [ tableData: [],
{
core: "-0.5",
name: "迟到",
simple: "迟到5分钟以内(包含5分钟)",
check: false,
},
],
// 表单校验 // 表单校验
rules: {}, rules: {},
activeName: "1", activeName: "1",
options: [ options: [],
{
value: "1",
label: "工作纪律",
},
{
value: "2",
label: "工作效能",
},
],
type: "", type: "",
keywords: "", keywords: "",
deptArr: [], deptArr: [],
urls: {
saveUrl: "/perform/dept/conf/save",
},
config: { config: {
isshowTabPane: false, isshowTabPane: false,
search: [], search: [],
...@@ -373,36 +366,39 @@ export default { ...@@ -373,36 +366,39 @@ export default {
label: "操作", label: "操作",
width: 100, width: 100,
formatter: (row) => { formatter: (row) => {
return ( if (row.check) {
<table-buttons return <span>不选择</span>;
noAdd } else {
noView return <span style="cursor:pointer">选择</span>;
noEdit }
noDel
switchBtn
row={row}
onEdit={this.eddRules}
onDel={this.toDelRules}
onView={this.switchChange}
/>
);
}, },
}, },
], ],
}, },
cateObj: {}, cateObj: {},
dataArr: [], dataArr: [],
checkArr: [],
}; };
}, },
// watch: {
// query: {
// deep,
// handler(val) {
// console.log(val);
// },
// },
// },
methods: { methods: {
handleRowClick(val) {
val.check = !val.check;
val.check
? this.checkArr.push(val)
: (this.checkArr = this.checkArr.filter((v) => v.id !== val.id));
this.checkArr.length > 0
? this.checkArr.forEach((val) => {
val.ruleId = val.id;
val.ruleName = val.name;
this.tableData.data.forEach((v) => {
val.id == v.id ? (v.check = val.check) : "";
});
})
: "";
this.form.deptConfDetail = this.checkArr;
this.tableData.data = [...this.tableData.data];
this.$forceUpdate(this.tableData.data);
},
typeSelect(val) { typeSelect(val) {
this.getKaoQin(val); this.getKaoQin(val);
}, },
...@@ -423,29 +419,56 @@ export default { ...@@ -423,29 +419,56 @@ export default {
categoryId, categoryId,
type: this.activeName, type: this.activeName,
page: this.query.page, page: this.query.page,
size: -1,
orderColList: this.typeArr, orderColList: this.typeArr,
name: this.searchValue, name: this.searchValue,
}).then((res) => { }).then((res) => {
if (res.code == 1) { if (res.code == 1) {
this.tableData = res.data; this.tableData = res.data;
this.checkArr.length > 0
? this.checkArr.forEach((val) => {
this.tableData.data.forEach((v) => {
val.id == v.id ? (v.check = val.check) : "";
});
})
: this.tableData.data.forEach((v) => {
v.check = false;
});
this.tableData.data = [...this.tableData.data];
this.$forceUpdate(this.tableData); this.$forceUpdate(this.tableData);
} else { } else {
this.tableData = {}; this.tableData = {};
} }
}); });
}, },
switchChange(val) {},
handleClick(val) { handleClick(val) {
this.getData(); this.getData();
this.cateObj = {};
this.type = "";
}, },
/** 编辑 */ /** 编辑 */
edit(row) { edit(row) {
this.reset(); this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
// this.urls.currUrl = "perform/dept/conf/edit"; this.checkArr = [];
this.type = "";
this.activeName = "1";
this.$get("/perform/dept/conf/info", { id: row.id }).then((res) => { this.$get("/perform/dept/conf/info", { id: row.id }).then((res) => {
if (res.code == 1) { if (res.code == 1) {
this.form = res.data; this.form = res.data;
this.checkArr = res.data.deptConfDetail;
res.data.deptConfDetail.length > 0
? res.data.deptConfDetail.forEach((val) => {
val.check = true;
val.id = val.ruleId;
this.tableData.data.forEach((v) => {
v.check = false;
val.ruleId == v.id ? (v.check = true) : "";
});
})
: "";
this.tableData.data = [...this.tableData.data];
this.$forceUpdate(this.tableData);
} else { } else {
this.form = {}; this.form = {};
} }
...@@ -459,14 +482,18 @@ export default { ...@@ -459,14 +482,18 @@ export default {
/** 新增 */ /** 新增 */
add(row) { add(row) {
this.reset(); this.reset();
// this.urls.currUrl = "perform/dept/conf/add";
this.getData(); this.getData();
this.open = true; this.open = true;
this.checkArr = [];
this.type = "";
this.activeName = "1";
this.pageInfo.type = "add"; this.pageInfo.type = "add";
this.title = "新增部门自动考核信息"; this.title = "新增部门自动考核信息";
}, },
/** 查看*/ /** 查看*/
view(row) { view(row) {
console.log(123);
return;
this.reset(); this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl = "perform/dept/conf/view"; this.urls.currUrl = "perform/dept/conf/view";
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<div class="goal_title"> <div class="goal_title">
<img src="../../../../assets/images/u17641.svg" alt="" /> <img src="../../../../assets/images/u17641.svg" alt="" />
<span> <span>
{{ val.deptName ? val.deptName : "--" }} {{ val.deptName ? val.deptName : val.staffNames }}
</span> </span>
</div> </div>
<p class="goal_txt"> <p class="goal_txt">
...@@ -25,19 +25,19 @@ ...@@ -25,19 +25,19 @@
</p> </p>
<p> <p>
<el-tag style="margin: 0 5px 5px 0" <el-tag style="margin: 0 5px 5px 0"
>考勤绩效指标/工作纪律{{ val.attendCount }}</el-tag >考勤绩效指标:{{ val.attendCount }}</el-tag
> >
<el-tag style="margin: 0 5px 5px 0" <el-tag style="margin: 0 5px 5px 0"
>评价绩效指标/工作纪律{{ val.assessCount }}</el-tag >评价绩效指标:{{ val.assessCount }}</el-tag
> >
<el-tag style="margin: 0 5px 5px 0" <el-tag style="margin: 0 5px 5px 0"
>办件绩效指标/工作效能{{ val.workCount }}</el-tag >办件绩效指标:{{ val.workCount }}</el-tag
> >
<el-tag style="margin: 0 5px 5px 0" <el-tag style="margin: 0 5px 5px 0"
>效能绩效指标/工作纪律{{ val.effectCount }}</el-tag >效能绩效指标:{{ val.effectCount }}</el-tag
> >
<el-tag style="margin: 0 5px 5px 0" <el-tag style="margin: 0 5px 5px 0"
>其他绩效指标/工作纪律{{ val.otherCount }}</el-tag >其他绩效指标:{{ val.otherCount }}</el-tag
> >
</p> </p>
<p class="goal_txt"> <p class="goal_txt">
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="窗口负责人管理" name="2"> <el-tab-pane label="窗口负责人管理" name="2">
<div class="content"> <div class="content">
<LayoutTable :data="tableData" notSearch :config="tableConfig"> <LayoutTable :data="tableData" notSearch notDel :config="tableConfig">
</LayoutTable> </LayoutTable>
</div> </div>
</el-tab-pane> </el-tab-pane>
...@@ -99,7 +99,6 @@ export default { ...@@ -99,7 +99,6 @@ export default {
}, },
mixins: [table], mixins: [table],
created() { created() {
console.log(this.tableData);
sessionStorage.removeItem("type"); sessionStorage.removeItem("type");
sessionStorage.setItem("type", this.type); sessionStorage.setItem("type", this.type);
}, },
...@@ -168,6 +167,13 @@ export default { ...@@ -168,6 +167,13 @@ export default {
}) })
: ""; : "";
}, },
// 窗口负责人删除方法
toDel(row) {
this.$get("/window/owner/delete", { id: row }).then((res) => {
this.$message.success(res.msg);
this.getData();
});
},
}, },
data() { data() {
return { return {
...@@ -182,13 +188,11 @@ export default { ...@@ -182,13 +188,11 @@ export default {
{ type: "selection", width: 60 }, { type: "selection", width: 60 },
{ type: "index", label: "序号", width: 50 }, { type: "index", label: "序号", width: 50 },
{ label: "部门名称", prop: "deptName" }, { label: "负责人姓名", prop: "name" },
{ label: "姓名", prop: "name" },
{ label: "工号", prop: "number" }, { label: "所属部门", prop: "deptName" },
{ label: "电话号码", prop: "phone" }, { label: "联系电话", prop: "phone" },
{ {
label: "负责窗口数量", label: "负责窗口数量",
...@@ -197,10 +201,17 @@ export default { ...@@ -197,10 +201,17 @@ export default {
}, },
{ {
label: "创建时间", label: "更新时间",
prop: "createTime", prop: "updateTime",
formatter: this.formatterDate, formatter: this.formatterDate,
}, },
{
label: "更新人员",
prop: "updateUserId",
formatter: this.formatter,
},
{ {
label: "操作", label: "操作",
width: 240, width: 240,
...@@ -208,6 +219,7 @@ export default { ...@@ -208,6 +219,7 @@ export default {
return ( return (
<table-buttons <table-buttons
noAdd noAdd
noView
row={row} row={row}
onEdit={this.toEdit} onEdit={this.toEdit}
onView={this.toView} onView={this.toView}
...@@ -319,6 +331,9 @@ export default { ...@@ -319,6 +331,9 @@ export default {
margin-right: 10px; margin-right: 10px;
} }
} }
/deep/.el-tag {
width: 114px !important;
}
.goal_txt { .goal_txt {
font-family: "微软雅黑", sans-serif; font-family: "微软雅黑", sans-serif;
font-weight: 400; font-weight: 400;
......
...@@ -23,18 +23,22 @@ ...@@ -23,18 +23,22 @@
<Field <Field
label="联系电话:" label="联系电话:"
prop="phone" prop="phone"
maxLength="11"
v-model="form.phone" v-model="form.phone"
placeholder="请输入联系电话" placeholder="请输入联系电话"
/> />
<el-col style="width: 100%;" :span="24"> <el-col style="width: 100%;" :span="12">
<Field <el-form-item label="选择部门">
label="选择部门:" <el-select v-model="form.deptId" style="width: 100%;">
prop="deptId" <el-option
v-model="form.deptId" v-for="item in deptArr"
placeholder="选择部门" :key="item.id"
:enumData="deptGroup" :label="item.deptName"
type="select" :value="item.id"
/> >
</el-option
></el-select>
</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
...@@ -42,48 +46,33 @@ ...@@ -42,48 +46,33 @@
<div class="content_top"> <div class="content_top">
<span>请选择窗口工作人员:</span> <span>请选择窗口工作人员:</span>
<div class="search_box"> <div class="search_box">
<el-select v-model="type" placeholder="请选择部门"> <el-select v-model="deptValue" style="width: 100%;">
<el-option <el-option
v-for="item in options" v-for="item in deptArr"
:key="item.value" :key="item.id"
:label="item.label" :label="item.deptName"
:value="item.value" :value="item.id"
style="width: 200px;"
> >
</el-option> </el-option
</el-select> ></el-select>
<el-input <el-input
v-model="keywords" v-model="keywords"
placeholder="请输入姓名关键字搜索" placeholder="请输入姓名关键字搜索"
style="width: 200px;margin: 0 10px;" style="width: 200px;margin: 0 10px;"
></el-input> ></el-input>
<el-button type="primary"> 搜索 </el-button> <el-button type="primary" @click="handleSearch"> 搜索 </el-button>
</div> </div>
</div> </div>
<div class="table_box"> <div class="table_box">
<el-table <LayoutTable
:data="tableData" :data="tableData"
border notAdd
style="width: 100%" notDel
height="520" notSearch
@selection-change="handleSelectionChange" notPagination
:config="tableConfig"
> >
<el-table-column type="selection" width="55"> </el-table-column> </LayoutTable>
<el-table-column type="index" label="序号" width="50">
</el-table-column>
<el-table-column prop="name" label="姓名" width="180">
</el-table-column>
<el-table-column prop="id" label="工号"> </el-table-column>
<el-table-column prop="deptaName" label="部门"> </el-table-column>
<el-table-column prop="zhiwei" label="职位"> </el-table-column>
<el-table-column prop="status" label="状态"> </el-table-column>
<el-table-column prop="phone" label="手机号"> </el-table-column>
<el-table-column fixed="right" label="操作" width="120">
<template slot-scope="scope">
<span>{{ scope.row.check ? "已选择" : "选择" }}</span>
</template>
</el-table-column>
</el-table>
</div> </div>
</div> </div>
</el-row> </el-row>
...@@ -143,12 +132,23 @@ ...@@ -143,12 +132,23 @@
<script> <script>
import form from "@/assets/mixins/formdialog"; import form from "@/assets/mixins/formdialog";
import table from "@/assets/mixins/table";
export default { export default {
name: "WindowOwnerDetail", name: "WindowOwnerDetail",
mixins: [form], mixins: [form, table],
components: {}, components: {},
created() { created() {
this.changePath("window/owner"); this.changePath("window/owner");
// 获取部门列表
this.$post("/dept/list", { page: 1, size: -1 }).then((res) => {
if (res.code == 1) {
this.deptArr = res.data.data;
} else {
this.deptArr = [];
}
});
// this.getData();
}, },
data() { data() {
return { return {
...@@ -159,68 +159,144 @@ export default { ...@@ -159,68 +159,144 @@ export default {
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
direction: "rtl", direction: "rtl",
deptValue: "",
toString: [], toString: [],
toDate: [], toDate: [],
deptArr: [],
// 表单校验 // 表单校验
rules: {}, rules: {},
deptGroup: { 1: "部门1", 2: "部门2", 3: "部门3", 4: "部门4", 5: "部门5" },
options: [
{
value: "1",
label: "部门1",
},
{
value: "2",
label: "部门2",
},
],
type: "",
keywords: "", keywords: "",
tableData: [ checkArr: [],
{ urls: {
id: "123456", saveUrl: "/window/owner/save",
name: "xxx", },
deptName: "部门1", config: {
zhiwei: "工作人员", isshowTabPane: false,
status: "正式", search: [],
phone: "130****8888", columns: [
check: false, { type: "index", label: "序号", width: 50 },
},
{ { label: "姓名", prop: "name" },
id: "123456",
name: "xxx", { label: "工号", prop: "workNum" },
deptName: "部门1",
zhiwei: "工作人员", { label: "部门", prop: "deptName" },
status: "正式",
phone: "130****8888", { label: "职位", prop: "positionName" },
check: false,
}, { label: "员工状态", prop: "status", formatter: this.formatter },
],
{ label: "手机号码", prop: "phoneNumber" },
{
label: "操作",
width: 100,
formatter: (row) => {
if (row.check) {
return <span>不选择</span>;
} else {
return <span style="cursor:pointer">选择</span>;
}
},
},
],
},
}; };
}, },
methods: { methods: {
handleSelectionChange(val) { handleSearch() {
console.log(val); this.getData();
this.tableData.forEach((v) => (v.check = false)); },
val.forEach((v) => { getData() {
v.check = true; this.$post("/staff/list", {
page: 1,
size: -1,
deptId: this.deptValue,
name: this.keywords,
}).then((res) => {
if (res.code == 1) {
this.tableData = res.data;
this.checkArr.length > 0
? this.checkArr.forEach((val) => {
this.tableData.data.forEach((v) => {
val.id == v.id ? (v.check = val.check) : "";
});
})
: this.tableData.data.forEach((v) => {
v.check = false;
});
this.tableData.data = [...this.tableData.data];
this.$forceUpdate(this.tableData);
} else {
this.deptArr = [];
}
}); });
}, },
handleRowClick(val) {
val.check = !val.check;
val.check
? this.checkArr.push(val)
: (this.checkArr = this.checkArr.filter((v) => v.id !== val.id));
this.checkArr.length > 0
? this.checkArr.forEach((val) => {
val.staffId = val.id;
this.tableData.data.forEach((v) => {
val.id == v.id ? (v.check = val.check) : "";
});
})
: "";
this.tableData.data = [...this.tableData.data];
this.form.windowOwnerDetailList = this.checkArr;
this.$forceUpdate(this.tableData.data);
},
/** 编辑 */ /** 编辑 */
edit(row) { edit(row) {
this.reset(); this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl = "window/owner/edit"; this.deptValue = "";
this.keywords = "";
this.checkArr = [];
this.$get("/window/owner/info", { id: row.id }).then((res) => {
if (res.code == 1) {
this.form = res.data;
this.checkArr = res.data.windowOwnerDetailList;
res.data.windowOwnerDetailList.length > 0
? res.data.windowOwnerDetailList.forEach((val) => {
val.check = true;
val.id = val.staffId;
this.tableData.data.forEach((v) => {
v.check = false;
val.staffId == v.id ? (v.check = true) : "";
});
})
: "";
this.tableData.data = [...this.tableData.data];
this.$forceUpdate(this.tableData);
} else {
this.form = {};
}
this.open = true;
});
this.getData(); this.getData();
// this.urls.currUrl = "window/owner/edit";
// this.getData();
this.pageInfo.type = "edit"; this.pageInfo.type = "edit";
this.title = "修改窗口负责人"; this.title = "修改窗口负责人";
}, },
/** 新增 */ /** 新增 */
add(row) { add(row) {
this.reset(); this.reset();
this.urls.currUrl = "window/owner/add"; // this.urls.currUrl = "window/owner/add";
// this.getData();
this.deptValue = "";
this.checkArr = [];
this.keywords = "";
this.getData(); this.getData();
this.open = true;
this.pageInfo.type = "add"; this.pageInfo.type = "add";
this.title = "新增窗口负责人"; this.title = "新增窗口负责人";
}, },
...@@ -228,8 +304,8 @@ export default { ...@@ -228,8 +304,8 @@ export default {
view(row) { view(row) {
this.reset(); this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl = "window/owner/view"; // this.urls.currUrl = "window/owner/view";
this.getData(); // this.getData();
this.pageInfo.type = "view"; this.pageInfo.type = "view";
this.title = "窗口负责人详细"; this.title = "窗口负责人详细";
}, },
...@@ -250,7 +326,7 @@ export default { ...@@ -250,7 +326,7 @@ export default {
// 表单重置 // 表单重置
reset() { reset() {
this.form = { this.form = {
deptId: 0, deptId: "",
deptName: "", deptName: "",
name: "", name: "",
number: "", number: "",
...@@ -275,7 +351,7 @@ export default { ...@@ -275,7 +351,7 @@ export default {
padding: 0 20px; padding: 0 20px;
.bottom_content { .bottom_content {
width: 100%; width: 100%;
height: 600px; height: 680px;
background-color: rgba(242, 246, 252, 1); background-color: rgba(242, 246, 252, 1);
box-sizing: border-box; box-sizing: border-box;
border-width: 1px; border-width: 1px;
......
...@@ -23,23 +23,50 @@ export default { ...@@ -23,23 +23,50 @@ export default {
type: Object, type: Object,
default: () => {}, default: () => {},
}, },
parameter: {
type: Object,
default: () => {}
}
}, },
data() { data() {
return {}; return {
myChart: null
};
}, },
watch: { watch: {
title(val) { title(val) {
console.log(val); this.myChart && this.myChart.setOption({title:{text:val}})
}, },
parameter: {
handler: function (v) {
this.drawLine(v)
},
deep: true
}
}, },
mounted() { mounted() {
this.drawLine(); this.drawLine();
}, },
methods: { methods: {
drawLine() { drawLine(obj) {
if (obj && this.myChart) {
// 更新
this.myChart.setOption({
xAxis: {
data: obj.x
},
series: [
{
data: obj.y,
},
]
})
return
}
// 基于dom,初始化echarts实例 // 基于dom,初始化echarts实例
let myChart = this.$echarts.init(document.getElementById(this.id)); let myChart = this.$echarts.init(document.getElementById(this.id));
this.myChart = myChart
// 绘制图表 // 绘制图表
myChart.setOption({ myChart.setOption({
title: { text: this.title }, title: { text: this.title },
...@@ -59,7 +86,7 @@ export default { ...@@ -59,7 +86,7 @@ export default {
color:'#6e98ed', color:'#6e98ed',
xAxis: { xAxis: {
type: "category", type: "category",
data: ["部门1", "部门2", "部门3", "部门4", "部门5", "部门6"], data: [],
}, },
grid: { grid: {
left: "3%", left: "3%",
...@@ -72,7 +99,7 @@ export default { ...@@ -72,7 +99,7 @@ export default {
{ {
name: this.legendName, name: this.legendName,
type: "line", type: "line",
data: [10, 20, 30, 90, 100, 100, 120], data: [],
smooth: true, smooth: true,
// itemStyle: { // itemStyle: {
// lineStyle: { // lineStyle: {
......
...@@ -23,23 +23,47 @@ export default { ...@@ -23,23 +23,47 @@ export default {
type: Object, type: Object,
default: () => {}, default: () => {},
}, },
parameter: {
type: Array,
default: () => []
}
}, },
data() { data() {
return {}; return {
myChart: null
};
}, },
watch: { watch: {
title(val) { title(val) {
console.log(val); this.myChart && this.myChart.setOption({title:{text:val}})
}, },
parameter: {
handler: function (v) {
this.drawLine(v)
},
deep: true
}
}, },
mounted() { mounted() {
this.drawLine(); this.drawLine();
}, },
methods: { methods: {
drawLine() { drawLine(obj) {
if (obj && this.myChart) {
// 更新
this.myChart.setOption({
series: [
{
data: obj,
},
]
})
return
}
// 基于dom,初始化echarts实例 // 基于dom,初始化echarts实例
let myChart = this.$echarts.init(document.getElementById(this.id)); let myChart = this.$echarts.init(document.getElementById(this.id));
this.myChart = myChart
// 绘制图表 // 绘制图表
myChart.setOption({ myChart.setOption({
title: { text: this.title }, title: { text: this.title },
...@@ -70,13 +94,7 @@ export default { ...@@ -70,13 +94,7 @@ export default {
name: this.legendName, name: this.legendName,
type: "pie", type: "pie",
radius: "65%", radius: "65%",
data: [ data: this.parameter,
{ value: 1048, name: "部门1" },
{ value: 735, name: "部门2" },
{ value: 580, name: "部门3" },
{ value: 484, name: "部门4" },
{ value: 300, name: "部门5" },
],
emphasis: { emphasis: {
itemStyle: { itemStyle: {
shadowBlur: 10, shadowBlur: 10,
......
...@@ -18,7 +18,8 @@ ...@@ -18,7 +18,8 @@
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="周期" prop="year"> <el-form-item label="周期" prop="year">
<el-date-picker style="width: 100%;" v-model="form.year" type="year" placeholder="选择年"> <el-date-picker style="width: 100%;" format="yyyy" value-format="yyyy" v-model="form.year" type="year"
placeholder="选择年">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
...@@ -29,12 +30,12 @@ ...@@ -29,12 +30,12 @@
:enumData="dict.periodType" placeholder="请选择周期类型" /> :enumData="dict.periodType" placeholder="请选择周期类型" />
</el-col> </el-col>
</el-row> </el-row>
<el-row> <!-- <el-row>
<el-col :span="8"> <el-col :span="8">
<Field label="考核范围" :span="24" prop="assessmentScope" v-model="form.assessmentScope" type="select" <Field label="考核范围" :span="24" prop="assessmentScope" v-model="form.assessmentScope" type="select"
:enumData="dict.assessmentScope" placeholder="请选择考核范围" /> :enumData="dict.assessmentScope" placeholder="请选择考核范围" />
</el-col> </el-col>
</el-row> </el-row> -->
<el-row v-if="form.assessmentScope == 1"> <el-row v-if="form.assessmentScope == 1">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="选择部门"> <el-form-item label="选择部门">
...@@ -65,7 +66,7 @@ ...@@ -65,7 +66,7 @@
<el-input v-model="item.ownerName" placeholder="请输入姓名"></el-input> <el-input v-model="item.ownerName" placeholder="请输入姓名"></el-input>
</el-col> </el-col>
<el-col :span="12" style="padding:0 10px"> <el-col :span="12" style="padding:0 10px">
<el-input v-model="form.leaderMobiles" placeholder="请输入电话"></el-input> <el-input v-model="item.leaderMobiles" placeholder="请输入电话"></el-input>
</el-col> </el-col>
<el-col :span="2"> <el-col :span="2">
<el-button type="primary" icon="el-icon-plus" circle v-if="index == 0" @click="addOwner"></el-button> <el-button type="primary" icon="el-icon-plus" circle v-if="index == 0" @click="addOwner"></el-button>
...@@ -146,10 +147,10 @@ export default { ...@@ -146,10 +147,10 @@ export default {
ownerList: [ ownerList: [
{ ownerId: "", ownerName: "", leaderMobiles: "" } { ownerId: "", ownerName: "", leaderMobiles: "" }
], ],
deptArr:[],//部门下拉 deptArr: [],//部门下拉
staffArr:[],//人员下拉 staffArr: [],//人员下拉
deptId:[],//部门选中 deptId: [],//部门选中
staffId:[],//人员选中数据 staffId: [],//人员选中数据
}; };
}, },
created() { created() {
...@@ -157,20 +158,46 @@ export default { ...@@ -157,20 +158,46 @@ export default {
this.staffList() this.staffList()
}, },
methods: { methods: {
beforeSubmit(form) {
// 个人/部门
const perposeStaffList = []//选中人员
const perposeDeptList = []//选中部门
this.deptId.forEach(element => {
perposeDeptList.push({ deptId: element })
});
this.staffId.forEach(element => {
perposeStaffList.push({ staffId: element })
});
form.perposeStaffList = perposeStaffList
form.perposeDeptList = perposeDeptList
// 负责人
const leaders = []//名
const leaderMobiles = []//电话
this.ownerList.forEach(element => {
leaders.push(element.ownerName)
leaderMobiles.push(element.leaderMobiles)
});
form.leaders = leaders.length > 0 ? leaders.join(",") : ""
form.leaderMobiles = leaderMobiles.length > 0 ? leaderMobiles.join(',') : ""
console.log(form, "入参")
return form
},
// 查询部门列表 // 查询部门列表
deptList(){ deptList() {
this.$post("/dept/list", {page:1,size:-1}).then((res) => { this.$post("/dept/list", { page: 1, size: -1 }).then((res) => {
const {code,data,dict} = res const { code, data, dict } = res
if(code == 1){ if (code == 1) {
this.deptArr = data.data this.deptArr = data.data
console.log(data.data, "部门")
} }
}); });
}, },
// 查询部门列表 // 查询部门列表
staffList(){ staffList() {
this.$post("/staff/list", {page:1,size:-1}).then((res) => { this.$post("/staff/list", { page: 1, size: -1 }).then((res) => {
const {code,data,dict} = res const { code, data, dict } = res
if(code == 1){ if (code == 1) {
this.staffArr = data.data this.staffArr = data.data
} }
}); });
...@@ -194,9 +221,9 @@ export default { ...@@ -194,9 +221,9 @@ export default {
}, },
/** 新增 */ /** 新增 */
add(row) { add(row) {
this.reset();
this.urls.currUrl = "perform/perpose/add"; this.urls.currUrl = "perform/perpose/add";
this.getData(); this.getData();
this.reset();
this.pageInfo.type = "add"; this.pageInfo.type = "add";
this.title = "新增考核目标"; this.title = "新增考核目标";
}, },
...@@ -216,6 +243,33 @@ export default { ...@@ -216,6 +243,33 @@ export default {
/**获取数据后弹框 */ /**获取数据后弹框 */
afterRender(data) { afterRender(data) {
this.open = true; this.open = true;
if (this.pageInfo.type == "add") {
// 新增
this.reset()
this.form.assessmentScope = this.$parent.query.assessmentScope + ''
}else{
// 编辑
this.form.year = this.form.year+''
const leaderMobiles = this.form.leaderMobiles.split(',')
// 回显负责人
const ownerList = []
this.form.leaders.split(',').forEach((v,i)=>{
ownerList.push({ ownerId: "", ownerName: v, leaderMobiles: leaderMobiles[i] || '' })
})
this.ownerList = ownerList
// 回显选中人员
const staffId = []
this.form.perposeStaffList && this.form.perposeStaffList.forEach(v=>{
staffId.push(v.staffId)
})
this.staffId = staffId
// 回显选中部门
const deptId = []
this.form.perposeDeptList && this.form.perposeDeptList.forEach(v=>{
deptId.push(v.deptId)
})
this.deptId = deptId
}
}, },
afterSubmit(data) { afterSubmit(data) {
...@@ -229,20 +283,26 @@ export default { ...@@ -229,20 +283,26 @@ export default {
ownerId: null, ownerId: null,
ownerName: "", ownerName: "",
staffId: null, staffId: null,
assessmentType: null, assessmentType: '1',
assessmentScope: 1, assessmentScope: '1',
compareScope: 1, compareScope: '1',
ratio: 0.0, ratio: 0.0,
periodType: 1, periodType: '1',
year: null, year: "",
month: null, // month: null,
halfYear: 1, // halfYear: 1,
halfYear: 1, // quarter: 1,
quarter: 1,
leaders: "", leaders: "",
leaderMobiles: "", leaderMobiles: "",
remark: "", remark: "",
perposeStaffList: [],
perposeDeptList: []
}; };
this.ownerList = [
{ ownerId: "", ownerName: "", leaderMobiles: "" }
]
this.deptId = []
this.staffId = []
this.resetForm("form"); this.resetForm("form");
}, },
resetForm(refName) { resetForm(refName) {
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
<line-charts <line-charts
:title="'绩效平均分排名'" :title="'绩效平均分排名'"
:id="'jixiaopingjunfen'" :id="'jixiaopingjunfen'"
:parameter="depStatObj.averageScore"
:legendName="'绩效平均分'" :legendName="'绩效平均分'"
:styleObj="{ width: '100%', height: '300px' }" :styleObj="{ width: '100%', height: '300px' }"
/> />
...@@ -50,7 +51,7 @@ ...@@ -50,7 +51,7 @@
<bar-charts <bar-charts
:title="'部门加分排名TOP10'" :title="'部门加分排名TOP10'"
:id="'top_10'" :id="'top_10'"
:parameter="depStatObj.attendScoreAdd" :parameter="depStatObj.totalAddScore"
:legendName="'部门加分分值'" :legendName="'部门加分分值'"
:styleObj="{ width: '100%', height: '300px' }" :styleObj="{ width: '100%', height: '300px' }"
/> />
...@@ -59,6 +60,7 @@ ...@@ -59,6 +60,7 @@
<pie-charts <pie-charts
:title="'部门加分整体分布'" :title="'部门加分整体分布'"
:id="'jiafen'" :id="'jiafen'"
:parameter="depStatObj.pieAddScore"
:legendName="'部门加分'" :legendName="'部门加分'"
:styleObj="{ width: '100%', height: '300px' }" :styleObj="{ width: '100%', height: '300px' }"
/> />
...@@ -67,16 +69,18 @@ ...@@ -67,16 +69,18 @@
<bar-charts <bar-charts
:title="'部门扣分排名TOP10'" :title="'部门扣分排名TOP10'"
:id="'koufen_10'" :id="'koufen_10'"
:parameter="depStatObj.totalSubScore"
:legendName="'部门扣分分值'" :legendName="'部门扣分分值'"
:styleObj="{ width: '100%', height: '300px' }" :styleObj="{ width: '100%', height: '300px' }"
/> />
</div> </div>
<div class="koufen box"> <div class="koufen box">
<pie-charts <pie-charts
:parameter="depStatObj.pieSubScore"
:title="'部门扣分整体分布'" :title="'部门扣分整体分布'"
:id="'koufen'" :id="'koufen'"
:legendName="'部门扣分'" :legendName="'部门扣分'"
:styleObj="{ width: '100%', height: '300px' }" :styleObj="{ onAssessmentScope2width: '100%', height: '300px' }"
/> />
</div> </div>
</div> </div>
...@@ -131,7 +135,7 @@ ...@@ -131,7 +135,7 @@
<el-tab-pane label="目标管理" name="3"> <el-tab-pane label="目标管理" name="3">
<div class="content"> <div class="content">
<div class="top"> <div class="top">
<el-radio-group v-model="type2"> <el-radio-group v-model="type2" @change="onAssessmentScope2">
<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>
</el-radio-group> </el-radio-group>
...@@ -144,17 +148,17 @@ ...@@ -144,17 +148,17 @@
<div class="goal_title"> <div class="goal_title">
<img src="../../../../assets/images/u17641.svg" alt="" /> <img src="../../../../assets/images/u17641.svg" alt="" />
<span> <span>
旷工率不高于10% {{dictString('assessmentType',val.assessmentType)}}{{dictString('compareScope',val.compareScope)}}{{val.ratio}}%
</span> </span>
</div> </div>
<p class="goal_txt"> <p class="goal_txt">
<span>{{ type2 == 1 ? "目标部门:" : "目标个人:" }}</span <span>{{ type2 == 1 ? "目标部门:" : "目标个人:" }}</span
><span>{{ ><span>{{
type2 == 1 ? "全部部门" : "张三、李四、王武、陈真" type2 == 1 ? val.deptPerpose : val.staffPerpose
}}</span> }}</span>
</p> </p>
<p class="goal_txt"> <p class="goal_txt">
<span>周期:</span><span>{{val.periodType}}</span> <span>周期:</span><span>{{val.year}} {{dictString('periodType',val.periodType)}}</span>
</p> </p>
<p class="goal_txt"> <p class="goal_txt">
<span>负责人:</span><span>{{val.leaders}}</span> <span>负责人:</span><span>{{val.leaders}}</span>
...@@ -162,7 +166,7 @@ ...@@ -162,7 +166,7 @@
<p class="goal_txt"> <p class="goal_txt">
<span>最近更新:</span><span>{{val.updateTime}}</span> <span>最近更新:</span><span>{{val.updateTime}}</span>
</p> </p>
<p class="goal_txt"><span>更新人员:</span><span>{{val.updateUserId}}</span></p> <p class="goal_txt"><span>更新人员:</span><span>{{dictString('updateUserId',val.updateUserId)}}</span></p>
<div class="button_box"> <div class="button_box">
<el-button <el-button
type="primary" type="primary"
...@@ -254,17 +258,22 @@ export default { ...@@ -254,17 +258,22 @@ export default {
// this.statArr = row // this.statArr = row
const x = [] const x = []
const y = [] const y = []
const xTop10 = [] const averageScore = [] //平均分数
row.forEach(element => { row.forEach(element => {
x.push(element.deptName) x.push(element.deptName)
y.push(element.totalScore) y.push(element.totalScore)
averageScore.push(element.averageScore)
}); });
this.depStatObj.totalScore.x = x this.depStatObj.totalScore.x = x
this.depStatObj.totalScore.y = y this.depStatObj.totalScore.y = y
// 平均值
this.depStatObj.averageScore.x = x
this.depStatObj.averageScore.y = averageScore
} }
}); });
// 加分top10 // 加分top10
const top10 = {...this.boardQuery,size:10} const top10 = {...this.boardQuery,size:10,orderColList:[{colName:'totalAddScore',sortKind:'desc'}]}
this.$post("/staff/perform/stat/list", top10).then((res) => { this.$post("/staff/perform/stat/list", top10).then((res) => {
const {code,data,dict} = res const {code,data,dict} = res
if(code == 1){ if(code == 1){
...@@ -274,11 +283,28 @@ export default { ...@@ -274,11 +283,28 @@ export default {
const y = [] const y = []
row.forEach(element => { row.forEach(element => {
x.push(element.deptName) x.push(element.deptName)
y.push(element.attendScoreAdd) y.push(element.totalAddScore)
}); });
this.depStatObj.attendScoreAdd.x = x this.depStatObj.totalAddScore.x = x
this.depStatObj.attendScoreAdd.y = y this.depStatObj.totalAddScore.y = y
console.log(this.depStatObj.attendScoreAdd,"`````",data)
}
});
// 减分
const top10Sub = {...this.boardQuery,size:10,orderColList:[{colName:'totalSubScore',sortKind:'desc'}]}
this.$post("/staff/perform/stat/list", top10Sub).then((res) => {
const {code,data,dict} = res
if(code == 1){
const row = data.data || []
// this.statArr = row
const x = []
const y = []
row.forEach(element => {
x.push(element.deptName)
y.push(element.totalSubScore)
});
this.depStatObj.totalSubScore.x = x
this.depStatObj.totalSubScore.y = y
} }
}); });
}, },
...@@ -332,16 +358,24 @@ export default { ...@@ -332,16 +358,24 @@ export default {
this.getData(); this.getData();
}); });
}, },
// 目标管理
getData() { getData() {
this.$post("/perform/perpose/list",this.query).then((res) => { this.$post("/perform/perpose/list",this.query).then((res) => {
console.log(res); console.log(res,"@@@@@@@@@@@@");
if (res.code == 1) { const {code,data,dict} = res
this.dataList = res.data.data; this.dict = dict || {}
if (code == 1) {
this.dataList = data.data;
} else { } else {
this.dataList = []; this.dataList = [];
} }
}); });
}, },
// 字典转换
dictString(key,id){
const keyName = this.dict[key]
return keyName?keyName[id]:""
},
// TAB个人/法人 // TAB个人/法人
onAssessmentScope(v){ onAssessmentScope(v){
if(v == 1){ if(v == 1){
...@@ -357,6 +391,15 @@ export default { ...@@ -357,6 +391,15 @@ export default {
}else{ }else{
this.staffList() this.staffList()
} }
},
onAssessmentScope2(v){
if(v == 1){
this.query.assessmentScope = 1
}else{
this.query.assessmentScope = 2
}
this.getData()
} }
}, },
computed: { computed: {
...@@ -471,15 +514,15 @@ export default { ...@@ -471,15 +514,15 @@ export default {
x:[], x:[],
y:[] y:[]
},//绩效总分排名 },//绩效总分排名
totalAverage:{ averageScore:{
x:[], x:[],
y:[] y:[]
},//绩效平均排名 },//绩效平均排名
attendScoreAdd:{ totalAddScore:{
x:[], x:[],
y:[] y:[]
},//加分 },//加分
attendScoreSub:{ totalSubScore:{
x:[], x:[],
y:[] y:[]
},//减分 },//减分
...@@ -487,19 +530,34 @@ export default { ...@@ -487,19 +530,34 @@ export default {
x:[], x:[],
y:[] y:[]
},//目标对齐 },//目标对齐
pieAddScore:[
{value:0,name:'考勤绩效'},
{value:0,name:'评价绩效'},
{value:0,name:'办件绩效'},
{value:0,name:'效能绩效'},
{value:0,name:'投诉绩效'},
{value:0,name:'其它绩效'},
],//部门加分分布
pieSubScore:[
{value:0,name:'考勤绩效'},
{value:0,name:'评价绩效'},
{value:0,name:'办件绩效'},
{value:0,name:'效能绩效'},
{value:0,name:'投诉绩效'},
{value:0,name:'其它绩效'},
]//部门减分分布
},//按部门 },//按部门
month:"",//月份 month:"",//月份
boardQuery:{ boardQuery:{
page:1, page:1,
size:-1, size:-1,
// year:parseInt(moment().format('YYYY')), year:parseInt(moment().format('YYYY')),
// month:parseInt(moment().format('MM')), month:parseInt(moment().format('MM')),
},//看板查询条件 },//看板查询条件
query:{ query:{
page:1, page:1,
size:-1, size:8,
// assessmentScope:1//考核范围(1.部门,2.个人) assessmentScope:1//考核范围(1.部门,2.个人)
},//目标管理查询条件 },//目标管理查询条件
StatQuery:{ StatQuery:{
page:1, page:1,
...@@ -507,6 +565,7 @@ export default { ...@@ -507,6 +565,7 @@ export default {
year:parseInt(moment().format('YYYY')), year:parseInt(moment().format('YYYY')),
month:parseInt(moment().format('MM')), month:parseInt(moment().format('MM')),
},//对齐方式入参 },//对齐方式入参
dict:{}//字典
}; };
}, },
}; };
......
...@@ -60,5 +60,10 @@ public class PerformInfo { ...@@ -60,5 +60,10 @@ public class PerformInfo {
*/ */
private String performType; private String performType;
/**
* 申诉状态(0.未申诉,1.申诉中,2.申诉拒绝,3.申诉通过)
*/
private Integer appealStatus;
} }
...@@ -16,13 +16,20 @@ import com.mortals.xhx.busiz.req.PerformReq; ...@@ -16,13 +16,20 @@ import com.mortals.xhx.busiz.req.PerformReq;
import com.mortals.xhx.busiz.rsp.PerformDetailInfo; import com.mortals.xhx.busiz.rsp.PerformDetailInfo;
import com.mortals.xhx.busiz.rsp.PerformInfo; import com.mortals.xhx.busiz.rsp.PerformInfo;
import com.mortals.xhx.busiz.rsp.PerformStatInfo; import com.mortals.xhx.busiz.rsp.PerformStatInfo;
import com.mortals.xhx.common.code.AppealResultEnum;
import com.mortals.xhx.common.code.AppealStatusEnum;
import com.mortals.xhx.common.code.PerformTypeEnum; import com.mortals.xhx.common.code.PerformTypeEnum;
import com.mortals.xhx.common.code.ProcessStatusEnum;
import com.mortals.xhx.common.utils.BeanUtil; import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.attendance.model.AttendanceRecordEntity; import com.mortals.xhx.module.attendance.model.AttendanceRecordEntity;
import com.mortals.xhx.module.attendance.model.AttendanceRecordQuery; import com.mortals.xhx.module.attendance.model.AttendanceRecordQuery;
import com.mortals.xhx.module.attendance.service.AttendanceRecordService; import com.mortals.xhx.module.attendance.service.AttendanceRecordService;
import com.mortals.xhx.module.check.model.*; import com.mortals.xhx.module.check.model.*;
import com.mortals.xhx.module.check.model.vo.CheckAllRecordVo;
import com.mortals.xhx.module.check.service.*; import com.mortals.xhx.module.check.service.*;
import com.mortals.xhx.module.perform.model.PerformAttendAppealEntity;
import com.mortals.xhx.module.perform.model.PerformAttendAppealQuery;
import com.mortals.xhx.module.perform.service.PerformAttendAppealService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.formula.functions.T; import org.apache.poi.ss.formula.functions.T;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
...@@ -65,6 +72,11 @@ public class PerformApiController extends AbstractBaseController<PerformReq> { ...@@ -65,6 +72,11 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
private CheckGoworkRecordService checkGoworkRecordService; private CheckGoworkRecordService checkGoworkRecordService;
@Autowired @Autowired
private CheckOtherRecordService checkOtherRecordService; private CheckOtherRecordService checkOtherRecordService;
@Autowired
private CheckAllRecordService checkAllRecordService;
@Autowired
private PerformAttendAppealService appealService;
/** /**
...@@ -119,6 +131,24 @@ public class PerformApiController extends AbstractBaseController<PerformReq> { ...@@ -119,6 +131,24 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
PageInfo pageInfo = buildPageInfo(performReq); PageInfo pageInfo = buildPageInfo(performReq);
//todo 查询全部扣分绩效 //todo 查询全部扣分绩效
if (PerformTypeEnum.全部.getValue().equals(performReq.getPerformType())) { if (PerformTypeEnum.全部.getValue().equals(performReq.getPerformType())) {
CheckAllRecordQuery query = new CheckAllRecordQuery();
query.setCheckTimeStart(performReq.getPerformStartDate());
query.setCheckTimeEnd(performReq.getPerformEndDate());
query.setStaffId(context.getUser().getCustomerId());
List<CheckAllRecordVo> allCheckRecord = checkAllRecordService.getAllCheckRecord(query);
List<PerformInfo> collect = allCheckRecord.stream().map(item -> {
PerformInfo performInfo = new PerformInfo();
BeanUtils.copyProperties(item, performInfo, BeanUtil.getNullPropertyNames(item));
return performInfo;
}).collect(Collectors.toList());
model.put(KEY_RESULT_DATA, collect);
PageInfo pageAllInfo = new PageInfo();
pageAllInfo.setTotalResult(collect.size());
pageAllInfo.setCurrPage(1);
pageAllInfo.setPrePageResult(-1);
model.put(PAGEINFO_KEY, pageAllInfo);
parsePageInfo(model, pageAllInfo);
} else if (PerformTypeEnum.考勤绩效.getValue().equals(performReq.getPerformType())) { } else if (PerformTypeEnum.考勤绩效.getValue().equals(performReq.getPerformType())) {
CheckAttendRecordQuery query = new CheckAttendRecordQuery(); CheckAttendRecordQuery query = new CheckAttendRecordQuery();
...@@ -131,8 +161,15 @@ public class PerformApiController extends AbstractBaseController<PerformReq> { ...@@ -131,8 +161,15 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
PerformInfo performInfo = new PerformInfo(); PerformInfo performInfo = new PerformInfo();
BeanUtils.copyProperties(item, performInfo, BeanUtil.getNullPropertyNames(item)); BeanUtils.copyProperties(item, performInfo, BeanUtil.getNullPropertyNames(item));
performInfo.setPerformType(PerformTypeEnum.考勤绩效.getValue()); performInfo.setPerformType(PerformTypeEnum.考勤绩效.getValue());
//判断是否存在申诉
PerformAttendAppealEntity entity = appealService.selectOne(new PerformAttendAppealQuery().checkRecordId(item.getId()));
Boolean bool = entity.newEntity();
updateAppealStatus(performInfo, bool, entity.getProcessStatus(), entity.getAppealResult());
return performInfo; return performInfo;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
model.put(KEY_RESULT_DATA, collect); model.put(KEY_RESULT_DATA, collect);
model.put(PAGEINFO_KEY, result.getPageInfo()); model.put(PAGEINFO_KEY, result.getPageInfo());
parsePageInfo(model, result.getPageInfo()); parsePageInfo(model, result.getPageInfo());
...@@ -147,6 +184,11 @@ public class PerformApiController extends AbstractBaseController<PerformReq> { ...@@ -147,6 +184,11 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
PerformInfo performInfo = new PerformInfo(); PerformInfo performInfo = new PerformInfo();
BeanUtils.copyProperties(item, performInfo, BeanUtil.getNullPropertyNames(item)); BeanUtils.copyProperties(item, performInfo, BeanUtil.getNullPropertyNames(item));
performInfo.setPerformType(PerformTypeEnum.评价差评绩效.getValue()); performInfo.setPerformType(PerformTypeEnum.评价差评绩效.getValue());
//判断是否存在申诉
PerformAttendAppealEntity entity = appealService.selectOne(new PerformAttendAppealQuery().checkRecordId(item.getId()));
Boolean bool = entity.newEntity();
updateAppealStatus(performInfo, bool, entity.getProcessStatus(), entity.getAppealResult());
return performInfo; return performInfo;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
model.put(KEY_RESULT_DATA, collect); model.put(KEY_RESULT_DATA, collect);
...@@ -163,6 +205,11 @@ public class PerformApiController extends AbstractBaseController<PerformReq> { ...@@ -163,6 +205,11 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
PerformInfo performInfo = new PerformInfo(); PerformInfo performInfo = new PerformInfo();
BeanUtils.copyProperties(item, performInfo, BeanUtil.getNullPropertyNames(item)); BeanUtils.copyProperties(item, performInfo, BeanUtil.getNullPropertyNames(item));
performInfo.setPerformType(PerformTypeEnum.评价投诉绩效.getValue()); performInfo.setPerformType(PerformTypeEnum.评价投诉绩效.getValue());
//判断是否存在申诉
PerformAttendAppealEntity entity = appealService.selectOne(new PerformAttendAppealQuery().checkRecordId(item.getId()));
Boolean bool = entity.newEntity();
updateAppealStatus(performInfo, bool, entity.getProcessStatus(), entity.getAppealResult());
return performInfo; return performInfo;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
model.put(KEY_RESULT_DATA, collect); model.put(KEY_RESULT_DATA, collect);
...@@ -179,6 +226,10 @@ public class PerformApiController extends AbstractBaseController<PerformReq> { ...@@ -179,6 +226,10 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
PerformInfo performInfo = new PerformInfo(); PerformInfo performInfo = new PerformInfo();
BeanUtils.copyProperties(item, performInfo, BeanUtil.getNullPropertyNames(item)); BeanUtils.copyProperties(item, performInfo, BeanUtil.getNullPropertyNames(item));
performInfo.setPerformType(PerformTypeEnum.办件绩效.getValue()); performInfo.setPerformType(PerformTypeEnum.办件绩效.getValue());
//判断是否存在申诉
PerformAttendAppealEntity entity = appealService.selectOne(new PerformAttendAppealQuery().checkRecordId(item.getId()));
Boolean bool = entity.newEntity();
updateAppealStatus(performInfo, bool, entity.getProcessStatus(), entity.getAppealResult());
return performInfo; return performInfo;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
model.put(KEY_RESULT_DATA, collect); model.put(KEY_RESULT_DATA, collect);
...@@ -195,6 +246,10 @@ public class PerformApiController extends AbstractBaseController<PerformReq> { ...@@ -195,6 +246,10 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
PerformInfo performInfo = new PerformInfo(); PerformInfo performInfo = new PerformInfo();
BeanUtils.copyProperties(item, performInfo, BeanUtil.getNullPropertyNames(item)); BeanUtils.copyProperties(item, performInfo, BeanUtil.getNullPropertyNames(item));
performInfo.setPerformType(PerformTypeEnum.效能绩效.getValue()); performInfo.setPerformType(PerformTypeEnum.效能绩效.getValue());
//判断是否存在申诉
PerformAttendAppealEntity entity = appealService.selectOne(new PerformAttendAppealQuery().checkRecordId(item.getId()));
Boolean bool = entity.newEntity();
updateAppealStatus(performInfo, bool, entity.getProcessStatus(), entity.getAppealResult());
return performInfo; return performInfo;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
model.put(KEY_RESULT_DATA, collect); model.put(KEY_RESULT_DATA, collect);
...@@ -211,6 +266,10 @@ public class PerformApiController extends AbstractBaseController<PerformReq> { ...@@ -211,6 +266,10 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
PerformInfo performInfo = new PerformInfo(); PerformInfo performInfo = new PerformInfo();
BeanUtils.copyProperties(item, performInfo, BeanUtil.getNullPropertyNames(item)); BeanUtils.copyProperties(item, performInfo, BeanUtil.getNullPropertyNames(item));
performInfo.setPerformType(PerformTypeEnum.其它绩效.getValue()); performInfo.setPerformType(PerformTypeEnum.其它绩效.getValue());
//判断是否存在申诉
PerformAttendAppealEntity entity = appealService.selectOne(new PerformAttendAppealQuery().checkRecordId(item.getId()));
Boolean bool = entity.newEntity();
updateAppealStatus(performInfo, bool, entity.getProcessStatus(), entity.getAppealResult());
return performInfo; return performInfo;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
model.put(KEY_RESULT_DATA, collect); model.put(KEY_RESULT_DATA, collect);
...@@ -221,7 +280,6 @@ public class PerformApiController extends AbstractBaseController<PerformReq> { ...@@ -221,7 +280,6 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
} }
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);
...@@ -230,6 +288,22 @@ public class PerformApiController extends AbstractBaseController<PerformReq> { ...@@ -230,6 +288,22 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
return rest; return rest;
} }
private static void updateAppealStatus(PerformInfo performInfo, Boolean bool, Integer processStatus, Integer appealResult) {
if (!bool) {
performInfo.setAppealStatus(AppealStatusEnum.未申诉.getValue());
} else {
if (ProcessStatusEnum.未处理.getValue() == processStatus) {
performInfo.setAppealStatus(AppealStatusEnum.申诉中.getValue());
} else {
if (AppealResultEnum.通过.getValue() == appealResult) {
performInfo.setAppealStatus(AppealStatusEnum.申诉通过.getValue());
} else if (AppealResultEnum.不通过.getValue() == appealResult) {
performInfo.setAppealStatus(AppealStatusEnum.申诉拒绝.getValue());
}
}
}
}
/** /**
* 详细 * 详细
...@@ -278,7 +352,6 @@ public class PerformApiController extends AbstractBaseController<PerformReq> { ...@@ -278,7 +352,6 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
} }
public static void main(String[] args) { public static void main(String[] args) {
} }
......
package com.mortals.xhx.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 申诉状态(0.未申诉,1.申诉中,2.申诉拒绝,3.申诉通过)
*
* @author zxfei
*/
public enum AppealStatusEnum {
未申诉(0, "未申诉"),
申诉中(1, "申诉中"),
申诉拒绝(2, "申诉拒绝"),
申诉通过(3, "申诉通过");
private Integer value;
private String desc;
AppealStatusEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
public Integer getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static AppealStatusEnum getByValue(Integer value) {
for (AppealStatusEnum deviceStatusEnum : AppealStatusEnum.values()) {
if (deviceStatusEnum.getValue() == value) {
return deviceStatusEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (AppealStatusEnum item : AppealStatusEnum.values()) {
try {
boolean hasE = false;
for (Integer e : eItem) {
if (item.getValue() == e) {
hasE = true;
break;
}
}
if (!hasE) {
resultMap.put(item.getValue() + "", item.getDesc());
}
} catch (Exception ex) {
}
}
return resultMap;
}
}
\ No newline at end of file
...@@ -7,34 +7,34 @@ import com.mortals.framework.model.BaseEntityLong; ...@@ -7,34 +7,34 @@ import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.perform.model.vo.PerformPerposeDeptVo; import com.mortals.xhx.module.perform.model.vo.PerformPerposeDeptVo;
import lombok.Data; import lombok.Data;
/** /**
* 部门考核目标详细信息实体对象 * 部门考核目标详细信息实体对象
* *
* @author zxfei * @author zxfei
* @date 2023-05-16 * @date 2023-07-12
*/ */
@Data @Data
public class PerformPerposeDeptEntity extends PerformPerposeDeptVo { public class PerformPerposeDeptEntity extends PerformPerposeDeptVo {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 考核目标id * 考核目标id
*/ */
private Long purposeConfId; private Long purposeConfId;
/** /**
* 部门id * 部门id
*/ */
private Long deptId; private Long deptId;
/** /**
* 部门名称 * 部门名称
*/ */
private String deptName; private String deptName;
/** /**
* 备注 * 备注
*/ */
private String remark; private String remark;
@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) {
...@@ -42,7 +42,7 @@ public class PerformPerposeDeptEntity extends PerformPerposeDeptVo { ...@@ -42,7 +42,7 @@ public class PerformPerposeDeptEntity extends PerformPerposeDeptVo {
if (obj instanceof PerformPerposeDeptEntity) { if (obj instanceof PerformPerposeDeptEntity) {
PerformPerposeDeptEntity tmp = (PerformPerposeDeptEntity) obj; PerformPerposeDeptEntity tmp = (PerformPerposeDeptEntity) obj;
if (this.getId() == tmp.getId()) { if (this.getId() == tmp.getId()) {
return true; return true;
} }
} }
return false; return false;
...@@ -50,12 +50,12 @@ public class PerformPerposeDeptEntity extends PerformPerposeDeptVo { ...@@ -50,12 +50,12 @@ public class PerformPerposeDeptEntity extends PerformPerposeDeptVo {
public void initAttrValue(){ public void initAttrValue(){
this.purposeConfId = -1L; this.purposeConfId = -1L;
this.deptId = -1L; this.deptId = -1L;
this.deptName = ""; this.deptName = "";
this.remark = ""; this.remark = "";
} }
} }
\ No newline at end of file
package com.mortals.xhx.module.perform.model; package com.mortals.xhx.module.perform.model;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.ArrayList; import java.util.ArrayList;
import cn.hutool.core.date.DateUtil;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel; import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong; import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.perform.model.vo.PerformPerposeDeptStatVo; import com.mortals.xhx.module.perform.model.vo.PerformPerposeDeptStatVo;
import lombok.Data; import lombok.Data;
/** /**
* 部门目标统计实体对象 * 部门目标统计实体对象
* *
* @author zxfei * @author zxfei
* @date 2023-05-16 * @date 2023-07-12
*/ */
@Data @Data
public class PerformPerposeDeptStatEntity extends PerformPerposeDeptStatVo { public class PerformPerposeDeptStatEntity extends PerformPerposeDeptStatVo {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 部门id号 * 部门id号
*/ */
private Long deptId; private Long deptId;
/** /**
* 部门名称 * 部门名称
*/ */
private String deptName; private String deptName;
/** /**
* 旷工率 * 旷工率
*/ */
private BigDecimal absentRate; private BigDecimal absentRate;
/** /**
* 缺卡率 * 缺卡率
*/ */
private BigDecimal absenceRate; private BigDecimal absenceRate;
/** /**
* 迟到率 * 迟到率
*/ */
private BigDecimal lateRate; private BigDecimal lateRate;
/** /**
* 早退率 * 早退率
*/ */
private BigDecimal earlyRate; private BigDecimal earlyRate;
/** /**
* 请假率 * 请假率
*/ */
private BigDecimal leaveRate; private BigDecimal leaveRate;
/** /**
* 离岗率 * 离岗率
*/ */
private BigDecimal turnoverRate; private BigDecimal turnoverRate;
/** /**
* 睡觉率 * 睡觉率
*/ */
private BigDecimal sleepRate; private BigDecimal sleepRate;
/** /**
* 玩手机率 * 玩手机率
*/ */
private BigDecimal playPhoneRate; private BigDecimal playPhoneRate;
/** /**
* 办件超期率 * 办件超期率
*/ */
private BigDecimal expireWorkRate; private BigDecimal expireWorkRate;
/** /**
* 差评率 * 差评率
*/ */
private BigDecimal negaReviewRate; private BigDecimal negaReviewRate;
/** /**
* 备注 * 备注
*/ */
private String remark; private String remark;
/** /**
* 年 * 年
*/ */
private Integer year; private Integer year;
/** /**
* 月 * 月
*/ */
private Integer month; private Integer month;
/** /**
* 日 * 日
*/ */
private Integer day; private Integer day;
@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) {
...@@ -91,7 +94,7 @@ public class PerformPerposeDeptStatEntity extends PerformPerposeDeptStatVo { ...@@ -91,7 +94,7 @@ public class PerformPerposeDeptStatEntity extends PerformPerposeDeptStatVo {
if (obj instanceof PerformPerposeDeptStatEntity) { if (obj instanceof PerformPerposeDeptStatEntity) {
PerformPerposeDeptStatEntity tmp = (PerformPerposeDeptStatEntity) obj; PerformPerposeDeptStatEntity tmp = (PerformPerposeDeptStatEntity) obj;
if (this.getId() == tmp.getId()) { if (this.getId() == tmp.getId()) {
return true; return true;
} }
} }
return false; return false;
...@@ -99,36 +102,36 @@ public class PerformPerposeDeptStatEntity extends PerformPerposeDeptStatVo { ...@@ -99,36 +102,36 @@ public class PerformPerposeDeptStatEntity extends PerformPerposeDeptStatVo {
public void initAttrValue(){ public void initAttrValue(){
this.deptId = 0L; this.deptId = 0L;
this.deptName = ""; this.deptName = "";
this.absentRate = BigDecimal.valueOf(0.00); this.absentRate = BigDecimal.valueOf(0.00);
this.absenceRate = BigDecimal.valueOf(0.00); this.absenceRate = BigDecimal.valueOf(0.00);
this.lateRate = BigDecimal.valueOf(0.00); this.lateRate = BigDecimal.valueOf(0.00);
this.earlyRate = BigDecimal.valueOf(0.00); this.earlyRate = BigDecimal.valueOf(0.00);
this.leaveRate = BigDecimal.valueOf(0.00); this.leaveRate = BigDecimal.valueOf(0.00);
this.turnoverRate = BigDecimal.valueOf(0.00); this.turnoverRate = BigDecimal.valueOf(0.00);
this.sleepRate = BigDecimal.valueOf(0.00); this.sleepRate = BigDecimal.valueOf(0.00);
this.playPhoneRate = BigDecimal.valueOf(0.00); this.playPhoneRate = BigDecimal.valueOf(0.00);
this.expireWorkRate = BigDecimal.valueOf(0.00); this.expireWorkRate = BigDecimal.valueOf(0.00);
this.negaReviewRate = BigDecimal.valueOf(0.00); this.negaReviewRate = BigDecimal.valueOf(0.00);
this.remark = ""; this.remark = "";
this.year = -1; this.year = DateUtil.year(new Date());
this.month = -1; this.month = DateUtil.month(new Date())+1;
this.day = -1; this.day = DateUtil.dayOfMonth(new Date());
} }
} }
\ No newline at end of file
package com.mortals.xhx.module.perform.model; package com.mortals.xhx.module.perform.model;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.ArrayList; import java.util.ArrayList;
import cn.hutool.core.date.DateUtil;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel; import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong; import com.mortals.framework.model.BaseEntityLong;
...@@ -111,9 +114,9 @@ public class PerformPerposeEntity extends PerformPerposeVo { ...@@ -111,9 +114,9 @@ public class PerformPerposeEntity extends PerformPerposeVo {
this.periodType = 1; this.periodType = 1;
this.year = -1; this.year = DateUtil.year(new Date());
this.month = -1; this.month =DateUtil.month(new Date())+1;
this.halfYear = 1; this.halfYear = 1;
......
...@@ -7,38 +7,38 @@ import com.mortals.framework.model.BaseEntityLong; ...@@ -7,38 +7,38 @@ import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.perform.model.vo.PerformPerposeStaffVo; import com.mortals.xhx.module.perform.model.vo.PerformPerposeStaffVo;
import lombok.Data; import lombok.Data;
/** /**
* 员工考核目标详细信息实体对象 * 员工考核目标详细信息实体对象
* *
* @author zxfei * @author zxfei
* @date 2023-05-16 * @date 2023-07-12
*/ */
@Data @Data
public class PerformPerposeStaffEntity extends PerformPerposeStaffVo { public class PerformPerposeStaffEntity extends PerformPerposeStaffVo {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 考核目标id * 考核目标id
*/ */
private Long purposeConfId; private Long purposeConfId;
/** /**
* 员工id * 员工id
*/ */
private Long staffId; private Long staffId;
/** /**
* 员工名称 * 员工名称
*/ */
private String staffName; private String staffName;
/** /**
* 工号 * 工号
*/ */
private String number; private String number;
/** /**
* 备注 * 备注
*/ */
private String remark; private String remark;
@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) {
...@@ -46,7 +46,7 @@ public class PerformPerposeStaffEntity extends PerformPerposeStaffVo { ...@@ -46,7 +46,7 @@ public class PerformPerposeStaffEntity extends PerformPerposeStaffVo {
if (obj instanceof PerformPerposeStaffEntity) { if (obj instanceof PerformPerposeStaffEntity) {
PerformPerposeStaffEntity tmp = (PerformPerposeStaffEntity) obj; PerformPerposeStaffEntity tmp = (PerformPerposeStaffEntity) obj;
if (this.getId() == tmp.getId()) { if (this.getId() == tmp.getId()) {
return true; return true;
} }
} }
return false; return false;
...@@ -54,14 +54,14 @@ public class PerformPerposeStaffEntity extends PerformPerposeStaffVo { ...@@ -54,14 +54,14 @@ public class PerformPerposeStaffEntity extends PerformPerposeStaffVo {
public void initAttrValue(){ public void initAttrValue(){
this.purposeConfId = -1L; this.purposeConfId = -1L;
this.staffId = -1L; this.staffId = -1L;
this.staffName = ""; this.staffName = "";
this.number = ""; this.number = "";
this.remark = ""; this.remark = "";
} }
} }
\ No newline at end of file
package com.mortals.xhx.module.perform.model; package com.mortals.xhx.module.perform.model;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.ArrayList; import java.util.ArrayList;
import cn.hutool.core.date.DateUtil;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel; import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong; import com.mortals.framework.model.BaseEntityLong;
...@@ -11,7 +14,7 @@ import lombok.Data; ...@@ -11,7 +14,7 @@ import lombok.Data;
* 员工目标统计实体对象 * 员工目标统计实体对象
* *
* @author zxfei * @author zxfei
* @date 2023-07-11 * @date 2023-07-12
*/ */
@Data @Data
public class PerformPerposeStaffStatEntity extends PerformPerposeStaffStatVo { public class PerformPerposeStaffStatEntity extends PerformPerposeStaffStatVo {
...@@ -131,10 +134,10 @@ public class PerformPerposeStaffStatEntity extends PerformPerposeStaffStatVo { ...@@ -131,10 +134,10 @@ public class PerformPerposeStaffStatEntity extends PerformPerposeStaffStatVo {
this.remark = ""; this.remark = "";
this.year = -1; this.year = DateUtil.year(new Date());
this.month = -1; this.month = DateUtil.month(new Date())+1;
this.day = -1; this.day = DateUtil.dayOfMonth(new Date());
} }
} }
\ No newline at end of file
...@@ -7,7 +7,7 @@ import com.mortals.xhx.module.perform.model.PerformPerposeStaffStatEntity; ...@@ -7,7 +7,7 @@ import com.mortals.xhx.module.perform.model.PerformPerposeStaffStatEntity;
* 员工目标统计查询对象 * 员工目标统计查询对象
* *
* @author zxfei * @author zxfei
* @date 2023-07-11 * @date 2023-07-12
*/ */
public class PerformPerposeStaffStatQuery extends PerformPerposeStaffStatEntity { public class PerformPerposeStaffStatQuery extends PerformPerposeStaffStatEntity {
/** 开始 主键ID,主键,自增长 */ /** 开始 主键ID,主键,自增长 */
......
...@@ -4,15 +4,16 @@ import com.mortals.xhx.module.perform.model.PerformPerposeDeptStatEntity; ...@@ -4,15 +4,16 @@ import com.mortals.xhx.module.perform.model.PerformPerposeDeptStatEntity;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import lombok.Data; import lombok.Data;
import com.mortals.framework.annotation.Excel;
import java.math.BigDecimal;
import java.util.Date;
/** /**
* 部门目标统计视图对象 * 部门目标统计视图对象
* *
* @author zxfei * @author zxfei
* @date 2023-05-16 * @date 2023-07-12
*/ */
@Data @Data
public class PerformPerposeDeptStatVo extends BaseEntityLong { public class PerformPerposeDeptStatVo extends BaseEntityLong {
} }
\ No newline at end of file
...@@ -11,7 +11,7 @@ import java.util.Date; ...@@ -11,7 +11,7 @@ import java.util.Date;
* 员工目标统计视图对象 * 员工目标统计视图对象
* *
* @author zxfei * @author zxfei
* @date 2023-07-11 * @date 2023-07-12
*/ */
@Data @Data
public class PerformPerposeStaffStatVo extends BaseEntityLong { public class PerformPerposeStaffStatVo extends BaseEntityLong {
......
package com.mortals.xhx.module.perform.web; package com.mortals.xhx.module.perform.web;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService; import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.base.system.user.model.UserQuery;
import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.common.code.AssessmentScopeEnum;
import com.mortals.xhx.module.perform.model.*;
import com.mortals.xhx.module.perform.service.PerformPerposeDeptService;
import com.mortals.xhx.module.perform.service.PerformPerposeStaffService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -9,7 +16,6 @@ import com.mortals.framework.model.Context; ...@@ -9,7 +16,6 @@ import com.mortals.framework.model.Context;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.module.perform.model.PerformPerposeEntity;
import com.mortals.xhx.module.perform.service.PerformPerposeService; import com.mortals.xhx.module.perform.service.PerformPerposeService;
import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.ArrayUtils;
import com.mortals.framework.util.StringUtils; import com.mortals.framework.util.StringUtils;
...@@ -35,6 +41,13 @@ public class PerformPerposeController extends BaseCRUDJsonBodyMappingController< ...@@ -35,6 +41,13 @@ public class PerformPerposeController extends BaseCRUDJsonBodyMappingController<
@Autowired @Autowired
private ParamService paramService; private ParamService paramService;
@Autowired
private UserService userService;
@Autowired
private PerformPerposeStaffService perposeStaffService;
@Autowired
private PerformPerposeDeptService perposeDeptService;
public PerformPerposeController(){ public PerformPerposeController(){
super.setModuleDesc( "考核目标"); super.setModuleDesc( "考核目标");
...@@ -50,8 +63,28 @@ public class PerformPerposeController extends BaseCRUDJsonBodyMappingController< ...@@ -50,8 +63,28 @@ public class PerformPerposeController extends BaseCRUDJsonBodyMappingController<
this.addDict(model, "halfYear", paramService.getParamBySecondOrganize("PerformPerpose","halfYear")); this.addDict(model, "halfYear", paramService.getParamBySecondOrganize("PerformPerpose","halfYear"));
this.addDict(model, "halfYear", paramService.getParamBySecondOrganize("PerformPerpose","halfYear")); this.addDict(model, "halfYear", paramService.getParamBySecondOrganize("PerformPerpose","halfYear"));
this.addDict(model, "quarter", paramService.getParamBySecondOrganize("PerformPerpose","quarter")); this.addDict(model, "quarter", paramService.getParamBySecondOrganize("PerformPerpose","quarter"));
Map<String, String> collect = userService.find(new UserQuery(), getContext()).stream()
.collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getRealName(), (o, n) -> n));
this.addDict(model, "updateUserId", collect);
super.init(model, context); super.init(model, context);
} }
@Override
protected int editAfter(Long id, Map<String, Object> model, PerformPerposeEntity entity, Context context) throws AppException {
if(AssessmentScopeEnum.个人.getValue()==entity.getAssessmentScope()){
List<PerformPerposeStaffEntity> staffEntities = perposeStaffService.find(new PerformPerposeStaffQuery().purposeConfId(entity.getId()));
entity.setPerposeStaffList(staffEntities);
}else if(AssessmentScopeEnum.部门.getValue()==entity.getAssessmentScope()){
List<PerformPerposeDeptEntity> deptEntities = perposeDeptService.find(new PerformPerposeDeptQuery().purposeConfId(entity.getId()));
entity.setPerposeDeptList(deptEntities);
}
return super.editAfter(id, model, entity, context);
}
} }
\ No newline at end of file
...@@ -8,7 +8,7 @@ import java.util.List; ...@@ -8,7 +8,7 @@ import java.util.List;
* 窗口负责人 DAO接口 * 窗口负责人 DAO接口
* *
* @author zxfei * @author zxfei
* @date 2023-05-16 * @date 2023-07-12
*/ */
public interface WindowOwnerDao extends ICRUDDao<WindowOwnerEntity,Long>{ public interface WindowOwnerDao extends ICRUDDao<WindowOwnerEntity,Long>{
......
package com.mortals.xhx.module.window.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.window.model.WindowOwnerDetailEntity;
import java.util.List;
/**
* 窗口负责人详细Dao
* 窗口负责人详细 DAO接口
*
* @author zxfei
* @date 2023-07-12
*/
public interface WindowOwnerDetailDao extends ICRUDDao<WindowOwnerDetailEntity,Long>{
}
...@@ -11,7 +11,7 @@ import java.util.List; ...@@ -11,7 +11,7 @@ import java.util.List;
* 窗口负责人DaoImpl DAO接口 * 窗口负责人DaoImpl DAO接口
* *
* @author zxfei * @author zxfei
* @date 2023-05-16 * @date 2023-07-12
*/ */
@Repository("windowOwnerDao") @Repository("windowOwnerDao")
public class WindowOwnerDaoImpl extends BaseCRUDDaoMybatis<WindowOwnerEntity,Long> implements WindowOwnerDao { public class WindowOwnerDaoImpl extends BaseCRUDDaoMybatis<WindowOwnerEntity,Long> implements WindowOwnerDao {
......
package com.mortals.xhx.module.window.dao.ibatis;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.window.dao.WindowOwnerDetailDao;
import com.mortals.xhx.module.window.model.WindowOwnerDetailEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 窗口负责人详细DaoImpl DAO接口
*
* @author zxfei
* @date 2023-07-12
*/
@Repository("windowOwnerDetailDao")
public class WindowOwnerDetailDaoImpl extends BaseCRUDDaoMybatis<WindowOwnerDetailEntity,Long> implements WindowOwnerDetailDao {
}
package com.mortals.xhx.module.window.model;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.window.model.vo.WindowOwnerDetailVo;
import lombok.Data;
/**
* 窗口负责人详细实体对象
*
* @author zxfei
* @date 2023-07-12
*/
@Data
public class WindowOwnerDetailEntity extends WindowOwnerDetailVo {
private static final long serialVersionUID = 1L;
/**
* 负责人Id
*/
private Long ownerId;
/**
* 员工id号
*/
private Long staffId;
/**
* 备注
*/
private String remark;
@Override
public int hashCode() {
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj instanceof WindowOwnerDetailEntity) {
WindowOwnerDetailEntity tmp = (WindowOwnerDetailEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
}
}
return false;
}
public void initAttrValue(){
this.ownerId = 0L;
this.staffId = 0L;
this.remark = "";
}
}
\ No newline at end of file
package com.mortals.xhx.module.window.model; package com.mortals.xhx.module.window.model;
import java.util.List; import java.util.List;
import java.util.List;
import java.util.ArrayList; import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel; import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong; import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.window.model.vo.WindowOwnerVo; import com.mortals.xhx.module.window.model.vo.WindowOwnerVo;
import com.mortals.xhx.module.window.model.WindowOwnerDetailEntity;
import lombok.Data; import lombok.Data;
/** /**
* 窗口负责人实体对象 * 窗口负责人实体对象
* *
* @author zxfei * @author zxfei
* @date 2023-05-16 * @date 2023-07-12
*/ */
@Data @Data
public class WindowOwnerEntity extends WindowOwnerVo { public class WindowOwnerEntity extends WindowOwnerVo {
...@@ -44,6 +46,17 @@ public class WindowOwnerEntity extends WindowOwnerVo { ...@@ -44,6 +46,17 @@ public class WindowOwnerEntity extends WindowOwnerVo {
* 备注 * 备注
*/ */
private String remark; private String remark;
/**
* 窗口负责人详细信息
*/
private List<WindowOwnerDetailEntity> windowOwnerDetailList=new ArrayList<>();;
public List<WindowOwnerDetailEntity> getWindowOwnerDetailList(){
return windowOwnerDetailList;
}
public void setWindowOwnerDetailList(List<WindowOwnerDetailEntity> windowOwnerDetailList){
this.windowOwnerDetailList = windowOwnerDetailList;
}
@Override @Override
public int hashCode() { public int hashCode() {
return this.getId().hashCode(); return this.getId().hashCode();
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment