Commit 2ba11ef2 authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents a0311ab0 93640b69
...@@ -24,8 +24,7 @@ export default { ...@@ -24,8 +24,7 @@ export default {
beforeCreate() { beforeCreate() {
Vue.prototype.$app = this; Vue.prototype.$app = this;
}, },
created() { created() {},
},
methods: {}, methods: {},
}; };
...@@ -58,4 +57,43 @@ export default { ...@@ -58,4 +57,43 @@ export default {
} }
} }
} }
/deep/.el-menu--horizontal > .el-menu-item.is-active,
/deep/.el-tabs__item.is-active {
border-bottom: 2px solid #409eff;
color: #409eff;
font-weight: 600;
}
/deep/.el-tabs__item.is-active {
border-bottom: 3px solid #409eff;
}
/deep/.el-tabs__item:hover {
color: #303133;
}
/deep/.el-tabs__active-bar {
color: unset;
background-color: unset;
}
/deep/.el-tabs__item {
width: 120px;
color: #909399;
}
/deep/.el-card,
/deep/.page {
// -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
// box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
padding: 0;
}
/deep/.el-table th {
background: #fafafa !important;
color: rgba(0, 0, 0, 0.85) !important;
}
/deep/.el-table .cell {
font-size: 14px;
}
/deep/.el-drawer__header {
margin-bottom: 0;
padding-bottom: 20px;
}
</style> </style>
...@@ -11,13 +11,8 @@ html * { ...@@ -11,13 +11,8 @@ html * {
} }
html, html,
body { body {
/* height: 100%; */
/* min-height: 100%; */
font-family: "Microsoft Yahei", "Helvetica Neue", Helvetica, STHeiTi, Arial, sans-serif; font-family: "Microsoft Yahei", "Helvetica Neue", Helvetica, STHeiTi, Arial, sans-serif;
} }
body {
overflow-y: scroll;
}
body, body,
div, div,
dl, dl,
...@@ -251,6 +246,11 @@ a { ...@@ -251,6 +246,11 @@ a {
#operatorUserCabinCheckBox .el-checkbox__label { #operatorUserCabinCheckBox .el-checkbox__label {
display: inline; display: inline;
} }
.el-table th,
.el-table tr {
height: 54px;
text-align: center;
}
.page-statistics .chart { .page-statistics .chart {
margin-bottom: 80px; margin-bottom: 80px;
border: 1px solid #ededed; border: 1px solid #ededed;
...@@ -295,7 +295,7 @@ a { ...@@ -295,7 +295,7 @@ a {
word-break: break-word; word-break: break-word;
} }
.el-button--primary { .el-button--primary {
background: linear-gradient(90deg, #5ab6ff, #2e9aff) !important; background: linear-gradient(180deg, #5ab6ff, #2e9aff) !important;
color: #fff !important; color: #fff !important;
text-align: center !important; text-align: center !important;
} }
...@@ -275,7 +275,11 @@ a { ...@@ -275,7 +275,11 @@ a {
#operatorUserCabinCheckBox .el-checkbox__label { #operatorUserCabinCheckBox .el-checkbox__label {
display: inline; display: inline;
} }
.el-table th,
.el-table tr {
height: 54px;
text-align: center;
}
// 统计页面隔日期变色 // 统计页面隔日期变色
.page-statistics { .page-statistics {
.chart { .chart {
...@@ -333,7 +337,7 @@ a { ...@@ -333,7 +337,7 @@ a {
} }
} }
.el-button--primary { .el-button--primary {
background: linear-gradient(90deg, #5ab6ff, #2e9aff) !important; background: linear-gradient(180deg, #5ab6ff, #2e9aff) !important;
color: #fff !important; color: #fff !important;
text-align: center !important; text-align: center !important;
} }
export const timestampToTime = (timestamp, transLength) => { export const timestampToTime = (timestamp, transLength) => {
// 时间戳为10位需*1000,时间戳为13位不需乘1000 // 时间戳为10位需*1000,时间戳为13位不需乘1000
let date = null; let date = null;
if (timestamp) {
if (timestamp.length < 13) { if (timestamp.length < 13) {
date = new Date(timestamp * 1000); date = new Date(timestamp * 1000);
} else { } else {
...@@ -19,13 +20,17 @@ export const timestampToTime = (timestamp, transLength) => { ...@@ -19,13 +20,17 @@ export const timestampToTime = (timestamp, transLength) => {
let m = let m =
(date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes()) + (date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes()) +
":"; ":";
let s = date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds(); let s =
date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
switch (transLength) { switch (transLength) {
case 3: case 3:
return Y + M + D; return Y + M + D;
case 6: case 6:
return Y + M + D + h + m + s; return Y + M + D + h + m + s;
} }
} else {
return "";
}
}; };
// 小时:分钟 ==》 转分钟 // 小时:分钟 ==》 转分钟
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
:width="column.width" :width="column.width"
:sortable="column.sortable" :sortable="column.sortable"
:show-overflow-tooltip="column.tooltip" :show-overflow-tooltip="column.tooltip"
:align="column.align || 'left'" :align="column.align || 'center'"
:formatter="column.formatter" :formatter="column.formatter"
:reserve-selection="column.reserveSelection" :reserve-selection="column.reserveSelection"
:subColumns="column.subColumns" :subColumns="column.subColumns"
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
:label="sunColumn.label" :label="sunColumn.label"
:width="sunColumn.width" :width="sunColumn.width"
:sortable="sunColumn.sortable" :sortable="sunColumn.sortable"
:align="sunColumn.align || 'left'" :align="sunColumn.align || 'center'"
:formatter="sunColumn.formatter" :formatter="sunColumn.formatter"
/> />
</el-table-column> </el-table-column>
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
:width="column.width" :width="column.width"
:sortable="column.sortable" :sortable="column.sortable"
:show-overflow-tooltip="column.tooltip" :show-overflow-tooltip="column.tooltip"
:align="column.align || 'left'" :align="column.align || 'center'"
:formatter="column.formatter" :formatter="column.formatter"
:reserve-selection="column.reserveSelection" :reserve-selection="column.reserveSelection"
:subColumns="column.subColumns" :subColumns="column.subColumns"
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
:label="sunColumn.label" :label="sunColumn.label"
:width="sunColumn.width" :width="sunColumn.width"
:sortable="sunColumn.sortable" :sortable="sunColumn.sortable"
:align="sunColumn.align || 'left'" :align="sunColumn.align || 'center'"
:formatter="sunColumn.formatter" :formatter="sunColumn.formatter"
/> />
</el-table-column> </el-table-column>
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
:label="column.label" :label="column.label"
:width="column.width" :width="column.width"
:show-overflow-tooltip="column.tooltip" :show-overflow-tooltip="column.tooltip"
:align="column.align || 'left'" :align="column.align || 'center'"
:formatter='column.formatter' :formatter='column.formatter'
> >
</el-table-column> </el-table-column>
......
...@@ -12,9 +12,12 @@ ...@@ -12,9 +12,12 @@
:headers="headers" :headers="headers"
class="upload-file-uploader" class="upload-file-uploader"
ref="upload" ref="upload"
:disabled="pageInfoType == 'view'"
> >
<!-- 上传按钮 --> <!-- 上传按钮 -->
<el-button size="mini" type="primary">选取文件</el-button> <el-button size="mini" type="success" :disabled="pageInfoType == 'view'"
>选取文件</el-button
>
<!-- 上传提示 --> <!-- 上传提示 -->
<div class="el-upload__tip" slot="tip" v-if="showTip"> <div class="el-upload__tip" slot="tip" v-if="showTip">
...@@ -95,6 +98,10 @@ export default { ...@@ -95,6 +98,10 @@ export default {
type: String, type: String,
default: "", default: "",
}, },
pageInfoType: {
type: String,
default: "",
},
}, },
data() { data() {
return { return {
......
...@@ -108,6 +108,21 @@ ...@@ -108,6 +108,21 @@
>{{ $label }}</el-radio >{{ $label }}</el-radio
> >
</el-radio-group> </el-radio-group>
<el-radio-group
:disabled="disabled"
v-model="field"
@change="emit"
v-if="type === 'radioCol'"
style="display: flex;margin-top: 12px;"
>
<el-radio
v-for="($label, $value) in enumData"
:key="$value"
:label="$value"
style="margin-bottom: 15px;"
>{{ $label }}</el-radio
>
</el-radio-group>
<el-checkbox-group <el-checkbox-group
:disabled="disabled" :disabled="disabled"
......
...@@ -43,16 +43,16 @@ ...@@ -43,16 +43,16 @@
</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: 14px; margin-right: 10px">
首页</i 返回系统首页</i
> >
</div> </div>
<a class="controllBar" :href="portal" style="color: #fff;"> <a class="controllBar" :href="portal" style="color: #fff;">
<i <i
class="el-icon-arrow-left" class="el-icon-arrow-left"
style="font-size: 15px; margin-right: 10px" style="font-size: 14px; margin-right: 10px"
> >
返回门户</i 返回平台门户</i
> >
</a> </a>
...@@ -210,16 +210,19 @@ export default { ...@@ -210,16 +210,19 @@ export default {
.layout-menu-wrapper { .layout-menu-wrapper {
height: 72px; height: 72px;
line-height: 72px; line-height: 72px;
font-size: 14px; font-size: 16px;
color: #eee; color: #eee;
background: linear-gradient(90deg, #1845c6, #2999ff) !important; background: linear-gradient(90deg, #1845c6, #2999ff) !important;
.layout-logo { .layout-logo {
height: 50px; height: 100%;
.el-icon-menu { .el-icon-menu {
display: none; display: none;
} }
a { a {
margin: auto; margin: auto;
display: block;
width: 300px;
height: 100%;
} }
img { img {
vertical-align: middle; vertical-align: middle;
...@@ -228,6 +231,8 @@ export default { ...@@ -228,6 +231,8 @@ export default {
.menu-list { .menu-list {
li { li {
width: 140px;
text-align: center;
span { span {
display: block; display: block;
padding: 0 6px; padding: 0 6px;
...@@ -251,10 +256,10 @@ export default { ...@@ -251,10 +256,10 @@ export default {
} }
.controllBar { .controllBar {
background-color: rgba(255, 255, 255, 0.2); background-color: rgba(255, 255, 255, 0.2);
width: 120px; width: 150px;
height: 44px; height: 44px;
line-height: 44px; line-height: 44px;
margin-top: 34px; margin-top: 36px;
transform: translateY(-50%); transform: translateY(-50%);
text-align: center; text-align: center;
border-radius: 5px; border-radius: 5px;
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
v-model="form[item.name]" v-model="form[item.name]"
:filterable="item.filterable" :filterable="item.filterable"
:multiple="item.multiple" :multiple="item.multiple"
clearable="true" :clearable="true"
@change="item.change" @change="item.change"
@clear="item.clear" @clear="item.clear"
v-if="item.type === 'select'" v-if="item.type === 'select'"
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
v-if="item.type === 'cascader'" v-if="item.type === 'cascader'"
v-model="selectedTreeID" v-model="selectedTreeID"
:filterable="item.filterable" :filterable="item.filterable"
clearable="true" :clearable="true"
change-on-select change-on-select
@change="treeSelecteds" @change="treeSelecteds"
:options="treeDatas" :options="treeDatas"
...@@ -187,7 +187,11 @@ ...@@ -187,7 +187,11 @@
import Qs from "qs"; import Qs from "qs";
import { type } from "@/assets/utils"; import { type } from "@/assets/utils";
import { isArray } from "util"; import { isArray } from "util";
import { getFirstDay, getLastDay } from "@/assets/utils/dateFormat.js"; import {
getFirstDay,
getLastDay,
timestampToTime,
} from "@/assets/utils/dateFormat.js";
export default { export default {
props: { props: {
search: { search: {
...@@ -251,6 +255,20 @@ export default { ...@@ -251,6 +255,20 @@ export default {
delete this.form.summaryTimeStart; delete this.form.summaryTimeStart;
delete this.form.summaryTimeEnd; delete this.form.summaryTimeEnd;
} }
if (this.$route.name == "attendance/record/hik/list") {
if (this.form.attendanceDateStart && this.form.attendanceDateEnd) {
let startValue = Date.parse(this.form.attendanceDateStart);
let endValue = Date.parse(this.form.attendanceDateEnd);
if (startValue > endValue) {
this.$message.error("查询-结束的日期需大于开始日期");
this.form.attendanceDateEnd = "";
return false;
}
} else {
this.form.attendanceDateStart = getFirstDay();
this.form.attendanceDateEnd = getFirstDay();
}
}
let params = JSON.parse(JSON.stringify(this.form)); //不更改原始数据 let params = JSON.parse(JSON.stringify(this.form)); //不更改原始数据
let data = this.decode(params); let data = this.decode(params);
...@@ -398,6 +416,20 @@ export default { ...@@ -398,6 +416,20 @@ export default {
delete this.form.summaryTimeStart; delete this.form.summaryTimeStart;
delete this.form.summaryTimeEnd; delete this.form.summaryTimeEnd;
} }
if (this.$route.name == "attendance/record/hik/list") {
if (this.form.attendanceDateStart && this.form.attendanceDateEnd) {
let startValue = Date.parse(this.form.attendanceDateStart);
let endValue = Date.parse(this.form.attendanceDateEnd);
if (startValue > endValue) {
this.$message.error("查询-结束的日期需大于开始日期");
this.form.attendanceDateEnd = "";
return false;
}
} else {
this.form.attendanceDateStart = timestampToTime(new Date(), 3);
this.form.attendanceDateEnd = timestampToTime(new Date(), 3);
}
}
let params = JSON.parse(JSON.stringify(this.form)); //不更改原始数据 let params = JSON.parse(JSON.stringify(this.form)); //不更改原始数据
let data = this.decode(params); let data = this.decode(params);
...@@ -527,6 +559,9 @@ export default { ...@@ -527,6 +559,9 @@ export default {
.el-input { .el-input {
width: 170px; width: 170px;
} }
.el-form-item {
margin-bottom: 10px;
}
.el-select .el-input { .el-select .el-input {
width: 140px; width: 140px;
} }
...@@ -536,6 +571,7 @@ export default { ...@@ -536,6 +571,7 @@ export default {
.search-form-wapper { .search-form-wapper {
.el-form-item { .el-form-item {
width: 100%; width: 100%;
margin-bottom: 10px;
.el-form-item__label { .el-form-item__label {
min-width: 70px; min-width: 70px;
} }
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
size="mini" size="mini"
@click="config.methods.add" @click="config.methods.add"
title="新增" title="新增"
style="margin-left: 10px;"
>新增</el-button >新增</el-button
> >
<el-button <el-button
...@@ -55,6 +56,7 @@ ...@@ -55,6 +56,7 @@
icon="el-icon-delete" icon="el-icon-delete"
type="danger" type="danger"
size="mini" size="mini"
style="margin-left: 10px;"
title="批量删除" title="批量删除"
>批量删除</el-button >批量删除</el-button
> >
...@@ -233,7 +235,7 @@ ...@@ -233,7 +235,7 @@
v-if="!isShowButton('notPagination') ? false : data.pageInfo.totalResult" v-if="!isShowButton('notPagination') ? false : data.pageInfo.totalResult"
> >
<Pagination <Pagination
style="float: left" style="float: right"
:total="data.pageInfo.totalResult" :total="data.pageInfo.totalResult"
:prePageResult="data.pageInfo.prePageResult" :prePageResult="data.pageInfo.prePageResult"
/> />
...@@ -344,11 +346,11 @@ export default { ...@@ -344,11 +346,11 @@ export default {
.table-head { .table-head {
display: block; display: block;
width: 100%; width: 100%;
.el-button { .el-button {
margin-bottom: 5px; margin-bottom: 5px;
} }
.table-head-left { .table-head-left {
margin-bottom: 10px;
display: block; display: block;
width: 100%; width: 100%;
} }
...@@ -358,39 +360,41 @@ export default { ...@@ -358,39 +360,41 @@ export default {
width: 100%; width: 100%;
} }
} }
.table-body,
.table-foot {
padding: 0 10px;
}
} }
} }
.layout-table { .layout-table {
.table-head { .table-head {
margin-bottom: 10px;
//padding-bottom: 12px; //padding-bottom: 12px;
// padding-top: 7px; // padding-top: 7px;
border-bottom: 1px solid #ededed; // border-bottom: 1px solid #ededed;
.el-breadcrumb { .el-breadcrumb {
margin-right: 30px; margin-right: 30px;
} }
.table-head-left .buttons { .table-head-left .buttons {
button + button { button + button {
margin-left: 10px; margin-left: 10px;
margin-bottom: 10px;
} }
button + span { button + span {
margin-left: 10px; margin-left: 10px;
margin-bottom: 10px;
} }
span + span { span + span {
margin-left: 10px; margin-left: 10px;
margin-bottom: 10px;
} }
span + button { span + button {
margin-left: 10px; margin-left: 10px;
margin-bottom: 10px;
} }
} }
} }
.table-body,
.table-foot {
padding: 0 10px;
}
.table-form { .table-form {
padding-top: 10px; padding-top: 10px;
margin-top: 10px;
overflow: hidden; overflow: hidden;
} }
.search-form-wapper { .search-form-wapper {
......
<template> <template>
<div style="margin-bottom:15px;"> <div>
<el-menu <el-menu
:default-active="activeName" :default-active="activeName"
class="el-menu-demo" class="el-menu-demo"
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
icon="el-icon-delete" icon="el-icon-delete"
size="mini" size="mini"
title="删除" title="删除"
style="margin-left: 0;margin-right: 5px" style="margin-left: 0;margin-right: 5px;color: #FA4D4C;"
>删除</el-button >删除</el-button
> >
</Confirm> </Confirm>
......
<template> <template>
<div :style="menuPageCss" class="pages page-layout"> <div :style="menuPageCss" class="pages page-layout">
<LayoutHeader v-if="menuPage !== 'left'" @changePath="changePath"></LayoutHeader> <LayoutHeader
<LayoutHeaderLeft @toggle="toggle" :isOpen="isOpen" v-if="menuPage === 'left'" /> v-if="menuPage !== 'left'"
@changePath="changePath"
></LayoutHeader>
<LayoutHeaderLeft
@toggle="toggle"
:isOpen="isOpen"
v-if="menuPage === 'left'"
/>
<div class="layout"> <div class="layout">
<router-view :class="{ active: !isOpen }" /> <router-view :class="{ active: !isOpen }" />
</div> </div>
...@@ -53,7 +60,6 @@ export default { ...@@ -53,7 +60,6 @@ export default {
.layout { .layout {
padding: 15px 15px 0 15px; padding: 15px 15px 0 15px;
box-sizing: border-box; box-sizing: border-box;
} }
.page { .page {
...@@ -71,7 +77,7 @@ export default { ...@@ -71,7 +77,7 @@ export default {
} }
.page-layout { .page-layout {
background: #eee; background: #f0f2f5;
height: 100vh; height: 100vh;
overflow: auto; overflow: auto;
} }
...@@ -83,13 +89,13 @@ export default { ...@@ -83,13 +89,13 @@ export default {
/* 滚动条上的滚动滑块 */ /* 滚动条上的滚动滑块 */
.page-layout::-webkit-scrollbar-thumb { .page-layout::-webkit-scrollbar-thumb {
background: #CCCCCC; background: #cccccc;
border-radius: 4px; border-radius: 4px;
} }
/* 滚动条轨道 */ /* 滚动条轨道 */
.page-layout::-webkit-scrollbar-track { .page-layout::-webkit-scrollbar-track {
background: #EEEEEE; background: #eeeeee;
border-radius: 4px; border-radius: 4px;
} }
</style> </style>
<template> <template>
<!-- 班次表单 --> <!-- 班次表单 -->
<el-drawer :title="title" :visible.sync="open" size="55%"> <el-drawer :title="title" :visible.sync="open" size="55%">
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form
ref="form"
:model="form"
:rules="rules"
label-width="140px"
style="padding-right:10px;"
>
<el-row> <el-row>
<Field <Field
label="班次名称" label="班次名称"
......
...@@ -6,17 +6,16 @@ ...@@ -6,17 +6,16 @@
</template> </template>
<script> <script>
/** 表单弹出框模式需引入 */ /** 表单弹出框模式需引入 */
import dialogShow from "./dialogshow"; import dialogShow from "./dialogshow";
import table from "@/assets/mixins/table"; import table from "@/assets/mixins/table";
export default { export default {
name: "AttendanceClassList", name: "AttendanceClassList",
components: { components: {
dialogShow dialogShow,
}, },
mixins: [table], mixins: [table],
created() { created() {},
},
methods: { methods: {
renderTable(tableData) { renderTable(tableData) {
return ( return (
...@@ -31,8 +30,8 @@ ...@@ -31,8 +30,8 @@
prop={options.prop} prop={options.prop}
label={options.label} label={options.label}
width={options.width} width={options.width}
> align="center"
</el-table-column> ></el-table-column>
); );
}, },
/** 重写新增方法 */ /** 重写新增方法 */
...@@ -47,18 +46,47 @@ ...@@ -47,18 +46,47 @@
toView(row) { toView(row) {
this.$refs.dialogform.view(row); this.$refs.dialogform.view(row);
}, },
}, },
data() { data() {
return { return {
/** 子表列元素 */ /** 子表列元素 */
columnSet:[ columnSet: [
{prop:"goWorkDate",label:"上班打卡时间",width:150}, {
{prop:"goWorkDateBefore",label:"上班前打卡(分钟)",width:150}, prop: "goWorkDate",
{prop:"goWorkDateAfter",label:"上班后打卡(分钟)",width:150}, label: "上班打卡时间",
{prop:"offWorkDate",label:"下班打卡时间",width:150}, width: 150,
{prop:"offWorkDateBefore",label:"下班前打卡(分钟)",width:150}, align: "center",
{prop:"offWorkDateAfter",label:"下班后打卡(分钟)",width:150}, },
{
prop: "goWorkDateBefore",
label: "上班前打卡(分钟)",
width: 150,
align: "center",
},
{
prop: "goWorkDateAfter",
label: "上班后打卡(分钟)",
width: 150,
align: "center",
},
{
prop: "offWorkDate",
label: "下班打卡时间",
width: 150,
align: "center",
},
{
prop: "offWorkDateBefore",
label: "下班前打卡(分钟)",
width: 150,
align: "center",
},
{
prop: "offWorkDateAfter",
label: "下班后打卡(分钟)",
width: 150,
align: "center",
},
// {prop:"remark",label:"备注",width:150}, // {prop:"remark",label:"备注",width:150},
// {prop:"classId",label:"班次ID",width:150}, // {prop:"classId",label:"班次ID",width:150},
], ],
...@@ -68,16 +96,17 @@ ...@@ -68,16 +96,17 @@
name: "className", name: "className",
type: "text", type: "text",
label: "班次名称", label: "班次名称",
fuzzy: true fuzzy: true,
} },
], ],
isshowTabPane:true, isshowTabPane: true,
columns: [ columns: [
{type: "selection", width: 60}, { type: "selection", width: 60 },
{type: "index",label: "序号",width: 50}, { type: "index", label: "序号", width: 50 },
{label: "班次名称", prop: "className"}, { label: "班次名称", prop: "className" },
// {label: "考勤时间", prop: "className"}, // {label: "考勤时间", prop: "className"},
{label: "考勤班次详细信息", {
label: "考勤班次详细信息",
width: 200, width: 200,
prop: "subColumns", prop: "subColumns",
formatter: (row) => { formatter: (row) => {
...@@ -87,7 +116,9 @@ ...@@ -87,7 +116,9 @@
return ( return (
<el-popover placement="right" width={widthsize} trigger="click"> <el-popover placement="right" width={widthsize} trigger="click">
{this.renderTable(row.attendanceClassDetailList)} {this.renderTable(row.attendanceClassDetailList)}
<el-button type="text" slot="reference">详细</el-button> <el-button type="text" slot="reference">
详细
</el-button>
</el-popover> </el-popover>
); );
}, },
...@@ -95,15 +126,22 @@ ...@@ -95,15 +126,22 @@
{ {
label: "操作", label: "操作",
width: 240, width: 240,
formatter: row => { formatter: (row) => {
return ( return (
<table-buttons noAdd noView row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} /> <table-buttons
noAdd
noView
row={row}
onEdit={this.toEdit}
onView={this.toView}
onDel={this.toDel}
/>
); );
} },
} },
] ],
} },
};
}
}; };
},
};
</script> </script>
<template> <template>
<div class="container" v-if="open"> <div class="container" v-if="open">
<el-card style="min-height:80vh;padding: 0 10px"> <el-card style="min-height:80vh;">
<div class="head"> <div class="head">
<el-button type="primary" size="mini" @click="backTo" <el-button type="primary" size="mini" @click="backTo"
>返回上一级</el-button >返回上一级</el-button
> >
</div> </div>
<tab-pane :activeName="activeName" :thirdList="thirdList"></tab-pane> <tab-pane :activeName="activeName" :thirdList="thirdList"></tab-pane>
<div style="padding: 0 10px;">
<div class="mt20"> <div class="mt20">
<div>考勤组名称</div> <div>考勤组名称</div>
<el-input <el-input
...@@ -136,27 +137,37 @@ ...@@ -136,27 +137,37 @@
<el-button type="primary" @click="saveSetform">保存设置</el-button> <el-button type="primary" @click="saveSetform">保存设置</el-button>
<el-button @click="allReset">全部重置</el-button> <el-button @click="allReset">全部重置</el-button>
</div> </div>
</div>
</el-card> </el-card>
<!-- 设置考勤人员 --> <!-- 设置考勤人员 -->
<el-drawer <el-drawer
title="考勤人员" :title="
size="70%" drawer1
? '考勤人员'
: drawer2
? '考勤组负责人'
: drawer3
? '考勤时间'
: drawer4
? '打卡方式'
: ''
"
size="50%"
:beforeClose="closedrawer" :beforeClose="closedrawer"
:visible.sync="drawer" :visible.sync="drawer"
direction="rtl" direction="rtl"
> >
<div style="padding:20px"> <div style="padding:10px 10px 10px 20px">
<!-- 考勤人员 --> <!-- 考勤人员 -->
<div v-if="drawer1"> <div v-if="drawer1">
<div>参与考勤人员({{ this.attendArr.length }})</div> <div>参与考勤人员({{ this.attendArr.length }})</div>
<el-input <el-input
@focus="selectGroup(true)" @focus="selectGroup(true)"
type="textarea" type="textarea"
maxlength="20" maxlength="200"
autosize :autosize="{ minRows: 2, maxRows: 100 }"
v-model="persons" v-model="persons"
style="width:80%" style="width:100%;margin-top: 10px;"
size="mini"
placeholder="请选择" placeholder="请选择"
> >
</el-input> </el-input>
...@@ -165,7 +176,10 @@ ...@@ -165,7 +176,10 @@
<!-- 考勤组 --> <!-- 考勤组 -->
<div class="mt10" v-if="drawer2"> <div class="mt10" v-if="drawer2">
<div>考勤组负责人:</div> <div>考勤组负责人:</div>
<el-select v-model="groupResponsibleEntity.responsibleId"> <el-select
v-model="groupResponsibleEntity.responsibleId"
style="width: 100%;margin-top: 10px;"
>
<el-option <el-option
v-for="($label, $value) in responsiableList" v-for="($label, $value) in responsiableList"
:key="$value" :key="$value"
...@@ -192,10 +206,25 @@ ...@@ -192,10 +206,25 @@
<!-- 考勤时间 --> <!-- 考勤时间 -->
<div class="mt20" v-if="drawer3"> <div class="mt20" v-if="drawer3">
<!-- --> <!-- -->
<div>班制设定</div>
<el-radio-group v-model="setParams.type" @change="changeRadio"> <el-radio-group v-model="setParams.type" @change="changeRadio">
<div class="mt10" v-for="(item, index) in paibanType" :key="index"> <div
<el-radio :label="item.value">{{ item.label }}</el-radio> v-for="(item, index) in paibanType"
<div class="tips">{{ item.des }}</div> :key="index"
style="margin: 30px 0;"
class="radio_box"
>
<el-radio :label="item.value"
><span style="font-size: 16px;font-weight: 600;">
{{ item.label }}</span
></el-radio
>
<div
class="tips"
style="font-size: 14px;margin-top: 10px;margin-left: 28px;"
>
{{ item.des }}
</div>
</div> </div>
</el-radio-group> </el-radio-group>
</div> </div>
...@@ -275,13 +304,14 @@ ...@@ -275,13 +304,14 @@
</div> </div>
<div v-if="setParams.type != 2"> <div v-if="setParams.type != 2">
<div>自动排休</div>
<div class="mt10"> <div class="mt10">
<el-checkbox v-model="holidays" :true-label="1" :false-label="0" <el-checkbox v-model="holidays" :true-label="1" :false-label="0"
>法定节假日自动排休</el-checkbox >法定节假日自动排休</el-checkbox
> >
</div> </div>
<div class="mt10"> <div style="margin-top: 30px;">
<div>特殊日期</div> <div>特殊日期</div>
</div> </div>
...@@ -332,15 +362,19 @@ ...@@ -332,15 +362,19 @@
<div>考勤方式</div> <div>考勤方式</div>
<el-radio-group v-model="setParams.attendanceType"> <el-radio-group v-model="setParams.attendanceType">
<div <div
class="mt10"
v-for="(item, index) in attendanceType" v-for="(item, index) in attendanceType"
:key="index" :key="index"
style="margin: 30px 0;"
>
<el-radio :label="item.value"
><span style="font-size: 16px;font-weight: 600;">
{{ item.label }}</span
></el-radio
> >
<el-radio :label="item.value">{{ item.label }}</el-radio>
</div> </div>
</el-radio-group> </el-radio-group>
</div> </div>
<div class="button_box" style="width: 100%;margin: 20px"> <div class="button_box" style="width: 100%;margin: 20px 0">
<el-button type="primary" @click="() => (drawer = false)" <el-button type="primary" @click="() => (drawer = false)"
>保存</el-button >保存</el-button
> >
...@@ -1392,7 +1426,7 @@ export default { ...@@ -1392,7 +1426,7 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.container { .container {
font-size: 15px; font-size: 16px;
} }
.labelClass { .labelClass {
width: 200px; width: 200px;
...@@ -1401,9 +1435,19 @@ export default { ...@@ -1401,9 +1435,19 @@ export default {
margin-left: 5px; margin-left: 5px;
margin-right: 5px; margin-right: 5px;
color: #606266; color: #606266;
background-color: #fff; background-color: transparent;
} }
/deep/.el-card.is-always-shadow {
box-shadow: unset;
-webkit-box-shadow: unset;
}
/deep/.el-card {
border: unset;
}
/deep/.el-card__body {
padding: 0;
}
.contentClass { .contentClass {
width: 600px; width: 600px;
} }
...@@ -1427,8 +1471,12 @@ export default { ...@@ -1427,8 +1471,12 @@ export default {
} }
.head { .head {
position: absolute; position: absolute;
right: 45px; right: 10px;
z-index: 99; z-index: 99;
top: 6px;
}
/deep/.el-textarea__inner {
height: 500px !important;
font-size: 14px;
} }
</style> </style>
<template> <template>
<div class="page"> <div class="page">
<LayoutTable :data="tableData" notDel :config="tableConfig" v-if="isshow"></LayoutTable> <LayoutTable
:data="tableData"
notDel
:config="tableConfig"
v-if="isshow"
></LayoutTable>
<group-template ref="groupTemplate" @ok="okFn" /> <group-template ref="groupTemplate" @ok="okFn" />
</div> </div>
</template> </template>
<script> <script>
/** 表单弹出框模式需引入 */ /** 表单弹出框模式需引入 */
import groupTemplate from "./groupTemplate"; import groupTemplate from "./groupTemplate";
import table from "@/assets/mixins/table"; import table from "@/assets/mixins/table";
export default { export default {
name: "AttendanceGroupList", name: "AttendanceGroupList",
components: { components: {
groupTemplate groupTemplate,
}, },
mixins: [table], mixins: [table],
created() { created() {},
},
methods: { methods: {
renderTable(tableData) { renderTable(tableData) {
return ( return (
...@@ -31,13 +35,12 @@ ...@@ -31,13 +35,12 @@
prop={options.prop} prop={options.prop}
label={options.label} label={options.label}
width={options.width} width={options.width}
> ></el-table-column>
</el-table-column>
); );
}, },
/** 重写新增方法 */ /** 重写新增方法 */
toAdd(row) { toAdd(row) {
this.isshow = false this.isshow = false;
this.$refs.groupTemplate.add(row); this.$refs.groupTemplate.add(row);
// this.$router.push( // this.$router.push(
// { // {
...@@ -47,7 +50,7 @@ ...@@ -47,7 +50,7 @@
}, },
/** 重写编辑方法 */ /** 重写编辑方法 */
toEdit(row) { toEdit(row) {
this.isshow = false this.isshow = false;
this.$refs.groupTemplate.edit(row); this.$refs.groupTemplate.edit(row);
// this.$router.push( // this.$router.push(
// { // {
...@@ -57,47 +60,58 @@ ...@@ -57,47 +60,58 @@
}, },
/** 重写查看方法 */ /** 重写查看方法 */
toView(row) { toView(row) {
this.isshow = false this.isshow = false;
this.$refs.groupTemplate.view(row); this.$refs.groupTemplate.view(row);
}, },
okFn(val){ okFn(val) {
this.getData() this.getData();
this.isshow = val this.isshow = val;
} },
}, },
data() { data() {
return { return {
isshow:true, isshow: true,
/** 子表列元素 */ /** 子表列元素 */
columnSet:[ columnSet: [
{prop:"groupId",label:"考勤组",width:100}, { prop: "groupId", label: "考勤组", width: 100 },
{prop:"groupName",label:"考勤组名称",width:100}, { prop: "groupName", label: "考勤组名称", width: 100 },
{prop:"staffId",label:"员工ID",width:100}, { prop: "staffId", label: "员工ID", width: 100 },
{prop:"staffName",label:"员工姓名",width:100}, { prop: "staffName", label: "员工姓名", width: 100 },
{prop:"partAttendance",label:"是否参与考勤,",width:100}, { prop: "partAttendance", label: "是否参与考勤,", width: 100 },
{prop:"remark",label:"备注",width:100}, { prop: "remark", label: "备注", width: 100 },
], ],
config: { config: {
isshowTabPane:true, isshowTabPane: true,
search: [ search: [
{ {
name: "staffName", name: "staffName",
type: "text", type: "text",
label: "考勤组名称", label: "考勤组名称",
fuzzy: true fuzzy: true,
}, },
], ],
columns: [ columns: [
{type: "selection", width: 60,fixed:'left'}, { type: "selection", width: 60, fixed: "left" },
{type: "index",label: "序号",width: 50,fixed:'left'}, { type: "index", label: "序号", width: 50, fixed: "left" },
{label: "考勤组名称", prop: "groupName",width:200,fixed:'left'}, { label: "考勤组名称", prop: "groupName", width: 200, fixed: "left" },
{label: "人数", prop: "personNum",width: 80,fixed:'left'}, { label: "人数", prop: "personNum", width: 80, fixed: "left" },
{label: "负责人", prop: "responsibleName",width: 80,fixed:'left'},//未 {
label: "负责人",
prop: "responsibleName",
width: 80,
fixed: "left",
}, //未
{label: "类型", prop: "type",formatter: this.formatterattendType,width: 100,fixed:'left'}, {
label: "类型",
prop: "type",
formatter: this.formatterattendType,
width: 100,
fixed: "left",
},
// {label: "创建用户", prop: "createUserId", formatter: this.formatter}, // {label: "创建用户", prop: "createUserId", formatter: this.formatter},
...@@ -105,7 +119,11 @@ ...@@ -105,7 +119,11 @@
// {label: "考勤方式", prop: "attendanceType"}, // {label: "考勤方式", prop: "attendanceType"},
{label: "考勤时间", prop: "attendanceTime",formatter:this.formatterBanci},//未 {
label: "考勤时间",
prop: "attendanceTime",
formatter: this.formatterBanci,
}, //未
// {label: "考勤组人员信息", // {label: "考勤组人员信息",
// width: 120, // width: 120,
...@@ -125,15 +143,27 @@ ...@@ -125,15 +143,27 @@
{ {
label: "操作", label: "操作",
width: 240, width: 240,
formatter: row => { formatter: (row) => {
return ( return (
<table-buttons noAdd noView row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} /> <table-buttons
noAdd
noView
row={row}
onEdit={this.toEdit}
onView={this.toView}
onDel={this.toDel}
/>
); );
} },
} },
] ],
} },
};
}
}; };
},
};
</script> </script>
<style lang="less" scoped>
.table-head {
padding-left: 10px;
}
</style>
...@@ -79,22 +79,18 @@ ...@@ -79,22 +79,18 @@
placeholder="请输入请假事由" placeholder="请输入请假事由"
:disabled="pageInfo.type == 'view'" :disabled="pageInfo.type == 'view'"
/> />
<el-row>
<Field <Field
label="审核结果" label="审核结果"
prop="auditResult" prop="auditResult"
v-model="form.auditResult" v-model="form.auditResult"
type="radio" type="radioCol"
:enumData="dict.auditResult" :enumData="dict.auditResult"
placeholder="请选择审核结果" placeholder="请选择审核结果"
:disabled="pageInfo.type == 'view'" :disabled="pageInfo.type == 'view'"
/> />
<Field </el-row>
label="审核说明"
prop="auditDesc"
v-model="form.auditDesc"
placeholder="请输入审核说明"
:disabled="pageInfo.type == 'view'"
/>
<Field <Field
label="审批负责人" label="审批负责人"
prop="approverId" prop="approverId"
...@@ -104,6 +100,24 @@ ...@@ -104,6 +100,24 @@
:enumData="dict.approverId" :enumData="dict.approverId"
:disabled="pageInfo.type == 'view'" :disabled="pageInfo.type == 'view'"
/> />
<Field
label="申请时间"
prop="createTime"
v-model="form.createTime"
type="datetime"
disabled
/>
<el-row>
<Field
label="审核说明"
prop="auditDesc"
type="textarea"
v-model="form.auditDesc"
placeholder="请输入审核说明"
:disabled="pageInfo.type == 'view'"
style="width: 100%;"
/>
</el-row>
<!-- <Field label="审批负责人" prop="approver" v-model="form.approver" placeholder="请输入审批负责人"/> --> <!-- <Field label="审批负责人" prop="approver" v-model="form.approver" placeholder="请输入审批负责人"/> -->
<!-- <Field label="附件" prop="attachment" v-model="form.attachment" type="textarea" placeholder="请输入附件"/> --> <!-- <Field label="附件" prop="attachment" v-model="form.attachment" type="textarea" placeholder="请输入附件"/> -->
<Field <Field
...@@ -113,13 +127,7 @@ ...@@ -113,13 +127,7 @@
type="textarea" type="textarea"
placeholder="请输入备注" placeholder="请输入备注"
:disabled="pageInfo.type == 'view'" :disabled="pageInfo.type == 'view'"
/> style="width: 100%;"
<Field
label="申请时间"
prop="createTime"
v-model="form.createTime"
type="datetime"
disabled
/> />
</el-row> </el-row>
<el-form-item label="附件路径" prop="attachmentPathList"> <el-form-item label="附件路径" prop="attachmentPathList">
...@@ -127,7 +135,7 @@ ...@@ -127,7 +135,7 @@
@input="uploadFn" @input="uploadFn"
:value="form.attachmentPathList" :value="form.attachmentPathList"
:fileNumber="1" :fileNumber="1"
:disabled="pageInfo.type == 'view'" :pageInfoType="pageInfo.type"
/> />
</el-form-item> </el-form-item>
<form-buttons <form-buttons
......
...@@ -144,7 +144,7 @@ export default { ...@@ -144,7 +144,7 @@ export default {
{ {
label: "钉钉原始时间(换算时长)", label: "钉钉原始时间(换算时长)",
width: 165, width: 190,
formatter: (row) => { formatter: (row) => {
return ( return (
(row.sourceDingTime ? row.sourceDingTime : "--") + (row.sourceDingTime ? row.sourceDingTime : "--") +
......
...@@ -95,7 +95,7 @@ export default { ...@@ -95,7 +95,7 @@ export default {
{ {
name: "deptId", name: "deptId",
type: "select", type: "select",
label: "全部部门", label: "部门",
}, },
// { // {
// name: "groupId", // name: "groupId",
...@@ -111,12 +111,12 @@ export default { ...@@ -111,12 +111,12 @@ export default {
{ {
name: "errorStatus", name: "errorStatus",
type: "select", type: "select",
label: "全部异常状态", label: "异常状态",
}, },
{ {
name: "processStatus", name: "processStatus",
type: "select", type: "select",
label: "全部处理状态", label: "处理状态",
}, },
{ {
name: "errorDateTimeStart", name: "errorDateTimeStart",
...@@ -134,12 +134,12 @@ export default { ...@@ -134,12 +134,12 @@ export default {
label: "员工姓名", label: "员工姓名",
fuzzy: true, fuzzy: true,
}, },
{ // {
name: "phoneNumber", // name: "phoneNumber",
type: "text", // type: "text",
label: "手机号", // label: "手机号",
fuzzy: true, // fuzzy: true,
}, // },
], ],
columns: [ columns: [
{ type: "selection", width: 60, fixed: "left" }, { type: "selection", width: 60, fixed: "left" },
...@@ -157,6 +157,7 @@ export default { ...@@ -157,6 +157,7 @@ export default {
{ {
label: "异常时间", label: "异常时间",
prop: "errorDateTime", prop: "errorDateTime",
width: 160,
formatter: this.formatterDate, formatter: this.formatterDate,
}, },
{ {
...@@ -175,11 +176,13 @@ export default { ...@@ -175,11 +176,13 @@ export default {
label: "实际打卡时间", label: "实际打卡时间",
prop: "actualAttendanceDateTime", prop: "actualAttendanceDateTime",
formatter: this.formatterDate, formatter: this.formatterDate,
width: 160,
}, },
{ {
label: "处理时间", label: "处理时间",
prop: "operDateTime", prop: "operDateTime",
formatter: this.formatterDate, formatter: this.formatterDate,
width: 160,
}, },
{ {
label: "处理状态", label: "处理状态",
...@@ -190,7 +193,7 @@ export default { ...@@ -190,7 +193,7 @@ export default {
{ label: "备注", prop: "remark", formatter: this.formatters }, { label: "备注", prop: "remark", formatter: this.formatters },
{ {
label: "操作", label: "操作",
width: 240, width: 100,
formatter: (row) => { formatter: (row) => {
if (row.processStatus == 0 || !row.processStatus) { if (row.processStatus == 0 || !row.processStatus) {
return ( return (
......
...@@ -35,7 +35,8 @@ ...@@ -35,7 +35,8 @@
v-if="showBtn" v-if="showBtn"
style="margin-left: 10px" style="margin-left: 10px"
@click="formatData" @click="formatData"
>生成打卡记录</el-button :loading="btnLoading"
>极速计算结果</el-button
> >
</LayoutTable> </LayoutTable>
<dialog-show ref="dialogform" @ok="getData" /> <dialog-show ref="dialogform" @ok="getData" />
...@@ -122,10 +123,7 @@ ...@@ -122,10 +123,7 @@
</div> </div>
</el-drawer> </el-drawer>
<div class="mask" v-if="progress"> <div class="mask" v-if="progress">
<el-progress <el-progress :stroke-width="26" :percentage="percent"></el-progress>
:stroke-width="26"
:percentage="percent"
></el-progress>
</div> </div>
</div> </div>
</template> </template>
...@@ -134,7 +132,11 @@ ...@@ -134,7 +132,11 @@
/** 表单弹出框模式需引入 */ /** 表单弹出框模式需引入 */
import dialogShow from "./dialogshow"; import dialogShow from "./dialogshow";
import table from "@/assets/mixins/table"; import table from "@/assets/mixins/table";
import { timestampToTime } from "@/assets/utils/dateFormat"; import {
timestampToTime,
getFirstDay,
getLastDay,
} from "@/assets/utils/dateFormat";
export default { export default {
name: "AttendanceRecordHikList", name: "AttendanceRecordHikList",
components: { components: {
...@@ -142,13 +144,16 @@ export default { ...@@ -142,13 +144,16 @@ export default {
}, },
mixins: [table], mixins: [table],
created() { created() {
this.query.attendanceDateStart = timestampToTime(new Date(), 3);
this.query.attendanceDateEnd = timestampToTime(new Date(), 3);
JSON.parse(sessionStorage.getItem("userData")).id == 1 JSON.parse(sessionStorage.getItem("userData")).id == 1
? (this.showBtn = true) ? (this.showBtn = true)
: (this.showBtn = false); : (this.showBtn = false);
}, },
methods: { methods: {
// 生成打卡记录 // 极速计算结果
formatData() { formatData() {
this.btnLoading = true;
let params = {}; let params = {};
for (let value of this.config.search) { for (let value of this.config.search) {
if (this.query[value.name]) { if (this.query[value.name]) {
...@@ -161,6 +166,7 @@ export default { ...@@ -161,6 +166,7 @@ export default {
this.$post("/attendance/record/hik/addAttendanceRecord", { this.$post("/attendance/record/hik/addAttendanceRecord", {
...params, ...params,
}).then((res) => { }).then((res) => {
this.btnLoading = false;
if (res.code == 1) { if (res.code == 1) {
this.$message.success("生成打卡记录成功!"); this.$message.success("生成打卡记录成功!");
} }
...@@ -276,12 +282,11 @@ export default { ...@@ -276,12 +282,11 @@ export default {
toView(row) { toView(row) {
this.$refs.dialogform.view(row); this.$refs.dialogform.view(row);
}, },
afterRender(data) { afterRender(data) {},
console.log(this.tableData.data);
},
}, },
data() { data() {
return { return {
btnLoading: false,
showBtn: false, showBtn: false,
progress: false, progress: false,
isExport: false, isExport: false,
......
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
@click="lookexportHis" @click="lookexportHis"
>导出记录</el-button >导出记录</el-button
> >
<el-button <!-- <el-button
slot="table-head-left2" slot="table-head-left2"
style="margin-left: 10px" style="margin-left: 10px"
icon="el-icon-tickets" icon="el-icon-tickets"
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
size="mini" size="mini"
@click="setdialog(1)" @click="setdialog(1)"
>导出表格设置</el-button >导出表格设置</el-button
> > -->
</LayoutTable> </LayoutTable>
<drawer-show ref="drawerform" @ok="getData" /> <drawer-show ref="drawerform" @ok="getData" />
<!-- 导出记录查看 --> <!-- 导出记录查看 -->
...@@ -573,12 +573,12 @@ export default { ...@@ -573,12 +573,12 @@ export default {
fuzzy: true, fuzzy: true,
}, },
{ // {
name: "workNum", // name: "workNum",
type: "text", // type: "text",
label: "员工工号", // label: "员工工号",
fuzzy: true, // fuzzy: true,
}, // },
{ {
name: "phone", name: "phone",
type: "text", type: "text",
...@@ -646,30 +646,30 @@ export default { ...@@ -646,30 +646,30 @@ export default {
formatter: this.formatter, formatter: this.formatter,
show: true, show: true,
}, },
{ // {
label: "签到结果", // label: "签到结果",
prop: "signInResult", // prop: "signInResult",
formatter: this.formatter, // formatter: this.formatter,
show: true, // show: true,
}, // },
{ // {
label: "签退结果", // label: "签退结果",
prop: "signOutResult", // prop: "signOutResult",
formatter: this.formatter, // formatter: this.formatter,
show: true, // show: true,
}, // },
{ // {
label: "打卡结果", // label: "打卡结果",
prop: "punchResult", // prop: "punchResult",
formatter: this.formatter, // formatter: this.formatter,
show: true, // show: true,
}, // },
{ // {
label: "考勤类型", // label: "考勤类型",
prop: "attendType", // prop: "attendType",
formatter: this.formatter, // formatter: this.formatter,
show: true, // show: true,
}, // },
// { // {
// label: "考勤打卡记录详细信息", // label: "考勤打卡记录详细信息",
......
...@@ -206,6 +206,7 @@ export default { ...@@ -206,6 +206,7 @@ export default {
show: true, show: true,
label: item + "(" + getMyDay(new Date(item)) + ")", label: item + "(" + getMyDay(new Date(item)) + ")",
prop: "attendanceStaffStatEntities", prop: "attendanceStaffStatEntities",
width: 100,
formatter: (row) => { formatter: (row) => {
if ( if (
row.attendanceStaffStatEntities && row.attendanceStaffStatEntities &&
...@@ -226,7 +227,7 @@ export default { ...@@ -226,7 +227,7 @@ export default {
this.$forceUpdate(); this.$forceUpdate();
}, },
beforeRender(row) { beforeRender(row) {
this.tableData.dict=row.dict; this.tableData.dict = row.dict;
row.data.forEach((element) => { row.data.forEach((element) => {
if ( if (
element.attendanceStaffStatEntities && element.attendanceStaffStatEntities &&
...@@ -255,7 +256,6 @@ export default { ...@@ -255,7 +256,6 @@ export default {
{(v.goWorkDate = timestampToTime(v.goWorkDate, 6))} {(v.goWorkDate = timestampToTime(v.goWorkDate, 6))}
{" "} 打卡结果: {" "} 打卡结果:
{this.tableData.dict.goWorkResult[v.goWorkResult]} {this.tableData.dict.goWorkResult[v.goWorkResult]}
</span> </span>
)} )}
{v.offWorkResult == 1 ? ( {v.offWorkResult == 1 ? (
...@@ -263,7 +263,6 @@ export default { ...@@ -263,7 +263,6 @@ export default {
打卡时间: 打卡时间:
{(v.offWorkDate = timestampToTime(v.offWorkDate, 6))} {(v.offWorkDate = timestampToTime(v.offWorkDate, 6))}
{" "} 打卡结果: {" "} 打卡结果:
{this.tableData.dict.offWorkResult[v.offWorkResult]} {this.tableData.dict.offWorkResult[v.offWorkResult]}
</span> </span>
) : ( ) : (
...@@ -357,6 +356,7 @@ export default { ...@@ -357,6 +356,7 @@ export default {
}, },
data() { data() {
return { return {
isExport: false,
config: { config: {
showType: "tableSelect", showType: "tableSelect",
isshowTabPane: true, isshowTabPane: true,
...@@ -397,12 +397,6 @@ export default { ...@@ -397,12 +397,6 @@ export default {
label: "员工姓名", label: "员工姓名",
fuzzy: true, fuzzy: true,
}, },
{
name: "phoneNumber",
type: "text",
label: "手机号",
fuzzy: true,
},
], ],
columns: [ columns: [
{ type: "selection", width: 60, fixed: "left", show: true }, { type: "selection", width: 60, fixed: "left", show: true },
...@@ -485,6 +479,7 @@ export default { ...@@ -485,6 +479,7 @@ export default {
label: "因公外出(与窗口工作无关/天)", label: "因公外出(与窗口工作无关/天)",
prop: "businessTrip", prop: "businessTrip",
show: true, show: true,
width: 140,
}, },
{ label: "公休(天)", prop: "publicHoliday", show: true }, { label: "公休(天)", prop: "publicHoliday", show: true },
...@@ -497,9 +492,19 @@ export default { ...@@ -497,9 +492,19 @@ export default {
{ label: "育儿假(天)", prop: "childRearingLeave", show: true }, { label: "育儿假(天)", prop: "childRearingLeave", show: true },
{ label: "产假(陪护假/天)", prop: "maternityLeave", show: true }, {
label: "产假(陪护假/天)",
prop: "maternityLeave",
show: true,
width: 140,
},
{ label: "调回单位(或离职/天)", prop: "transferBack", show: true }, {
label: "调回单位(或离职/天)",
prop: "transferBack",
show: true,
width: 140,
},
{ label: "探亲假(天)", prop: "homeLeave", show: true }, { label: "探亲假(天)", prop: "homeLeave", show: true },
...@@ -513,6 +518,7 @@ export default { ...@@ -513,6 +518,7 @@ export default {
label: "未按规定打卡(含忘记打卡)", label: "未按规定打卡(含忘记打卡)",
prop: "nonCompliancePunch", prop: "nonCompliancePunch",
show: true, show: true,
width: 140,
}, },
{ label: "迟到(次)", prop: "lateTimes", show: true }, { label: "迟到(次)", prop: "lateTimes", show: true },
...@@ -533,6 +539,7 @@ export default { ...@@ -533,6 +539,7 @@ export default {
label: "无故缺席会议(次)", label: "无故缺席会议(次)",
prop: "unexcusedMeetingAbsence", prop: "unexcusedMeetingAbsence",
show: true, show: true,
width: 140,
}, },
{ label: "会议早退", prop: "earlyLeaveMeeting", show: true }, { label: "会议早退", prop: "earlyLeaveMeeting", show: true },
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
:disabled="isExport" :disabled="isExport"
size="mini" size="mini"
slot="table-head-left2" slot="table-head-left2"
style="margin-left: 10px;"
>导出</el-button >导出</el-button
> >
</LayoutTable> </LayoutTable>
......
...@@ -213,7 +213,7 @@ export default { ...@@ -213,7 +213,7 @@ export default {
{ {
label: "异常时间", label: "异常时间",
prop: "errorTime", prop: "errorTime",
width: 150, width: 240,
formatter: this.formatterDate, formatter: this.formatterDate,
}, },
...@@ -226,7 +226,7 @@ export default { ...@@ -226,7 +226,7 @@ export default {
{ {
label: "实际打卡时间", label: "实际打卡时间",
prop: "actualAttendTime", prop: "actualAttendTime",
width: 150, width: 240,
formatter: this.formatterDate, formatter: this.formatterDate,
}, },
......
<template> <template>
<div className="page"> <div className="page">
<el-card style="height:80vh;overflow:scroll-y"> <el-card style="height:80vh;overflow:scroll-y;padding: 10px;">
<LayoutTable <LayoutTable
notPagination notPagination
:data="tableData" :data="tableData"
...@@ -92,3 +92,8 @@ export default { ...@@ -92,3 +92,8 @@ export default {
}, },
}; };
</script> </script>
<style lang="less" scoped>
/deep/.el-card__body {
padding: 0 !important;
}
</style>
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<h1>没有访问权限,或是账号过期。</h1> <h1>没有访问权限,或是账号过期。</h1>
<div> <div>
<el-button>重新登录</el-button> <el-button>重新登录</el-button>
<el-button @click='goHome'>回首页</el-button> <el-button @click='goHome'>系统首页</el-button>
</div> </div>
</div> </div>
</template> </template>
......
...@@ -196,4 +196,7 @@ export default { ...@@ -196,4 +196,7 @@ export default {
/deep/ .buttons { /deep/ .buttons {
margin-bottom: 10px; margin-bottom: 10px;
} }
/deep/.el-tabs__nav {
text-align: center;
}
</style> </style>
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
native-type="submit" native-type="submit"
:loading="loading" :loading="loading"
@click="onSubmit" @click="onSubmit"
style="font-size: 20px;"
>登录</el-button >登录</el-button
> >
</el-form-item> </el-form-item>
...@@ -139,7 +140,7 @@ export default { ...@@ -139,7 +140,7 @@ export default {
text-align: center; text-align: center;
.des, .des,
.tips { .tips {
font-size: 14px; font-size: 18px;
white-space: nowrap; white-space: nowrap;
margin-bottom: 20px; margin-bottom: 20px;
margin-top: 10px; margin-top: 10px;
...@@ -153,8 +154,8 @@ export default { ...@@ -153,8 +154,8 @@ export default {
border-radius: 15px; border-radius: 15px;
h1 { h1 {
text-align: center; text-align: center;
font-size: 30px; font-size: 40px;
font-weight: 500; font-weight: 600;
} }
button { button {
margin-top: 10px; margin-top: 10px;
...@@ -172,7 +173,7 @@ export default { ...@@ -172,7 +173,7 @@ export default {
} }
.el-input__inner { .el-input__inner {
border-color: #409eff; border-color: #409eff;
border-radius: 20px; border-radius: 8px;
} }
.el-input--small .el-input__inner { .el-input--small .el-input__inner {
height: 52px; height: 52px;
...@@ -184,10 +185,10 @@ export default { ...@@ -184,10 +185,10 @@ export default {
} }
button { button {
width: 80%; width: 80%;
border-radius: 20px; border-radius: 8px;
height: 52px; height: 52px;
background: linear-gradient( background: linear-gradient(
90deg, 180deg,
rgba(24, 69, 198, 1) 0%, rgba(24, 69, 198, 1) 0%,
rgba(41, 153, 255, 1) 100% rgba(41, 153, 255, 1) 100%
); );
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
:title="title" :title="title"
:visible.sync="open" :visible.sync="open"
:direction="direction" :direction="direction"
size="50%" size="35%"
> >
<el-form <el-form
ref="form" ref="form"
...@@ -57,23 +57,65 @@ ...@@ -57,23 +57,65 @@
</div> </div>
<div class="history"> <div class="history">
<span>考勤授权:</span> <span>考勤授权:</span>
<el-switch v-model="form.kaoqin"> </el-switch> <el-switch
:active-value="1"
:inactive-value="0"
v-model="form.attendCheck"
>
</el-switch>
</div> </div>
<div class="history"> <div class="history">
<span>评价授权:</span> <span>评价授权:</span>
<el-switch v-model="form.kaoqin"> </el-switch> <el-switch
:active-value="1"
:inactive-value="0"
v-model="form.complainCheck"
>
</el-switch>
</div> </div>
<div class="history"> <div class="history">
<span>投诉授权:</span> <span>投诉授权:</span>
<el-switch v-model="form.kaoqin"> </el-switch> <el-switch
:active-value="1"
:inactive-value="0"
v-model="form.reviewCheck"
>
</el-switch>
</div> </div>
<div class="history"> <div class="history">
<span>办件授权:</span> <span>办件授权:</span>
<el-switch v-model="form.kaoqin"> </el-switch> <el-switch
:active-value="1"
:inactive-value="0"
v-model="form.goworkCheck"
>
</el-switch>
</div>
<div class="history">
<span>效能授权:</span>
<el-switch
:active-value="1"
:inactive-value="0"
v-model="form.effectCheck"
>
</el-switch>
</div>
<div class="history">
<span>其他授权:</span>
<el-switch
:active-value="1"
:inactive-value="0"
v-model="form.otherCheck"
>
</el-switch>
</div> </div>
</div> </div>
<form-buttons @submit="submitForm" noCancelBtn /> <form-buttons
@submit="submitForm"
noCancelBtn
style="position: absolute; left: -100px;"
/>
</el-form> </el-form>
</el-drawer> </el-drawer>
</div> </div>
......
<template> <template>
<div class="page"> <div class="page">
<div style="margin:10px 0"> <div>
<tab-pane <tab-pane
:thirdList="thirdList" :thirdList="thirdList"
:activeName="activeName" :activeName="activeName"
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
</div> </div>
</div> </div>
</div> --> </div> -->
<el-row :gutter="20"> <el-row :gutter="20" style="padding-top: 10px;">
<el-col :span="6" :xs="12" class="mytree"> <el-col :span="6" :xs="12" class="mytree">
<div class="titles">选择部门</div> <div class="titles">选择部门</div>
<!-- default-expand-all --> <!-- default-expand-all -->
...@@ -378,23 +378,23 @@ export default { ...@@ -378,23 +378,23 @@ export default {
width: 240, width: 240,
formatter: (row) => { formatter: (row) => {
return ( return (
<table-buttons
noAdd
noDel
noEdit
row={row}
onView={this.toView}
onEdit={this.toEdit}
/>
// <table-buttons // <table-buttons
// noAdd // noAdd
// noAuth
// noDel // noDel
// noEdit // noEdit
// row={row} // row={row}
// onView={this.toView} // onView={this.toView}
// onEdit={this.toEdit} // onEdit={this.toEdit}
// /> // />
<table-buttons
noAdd
noAuth
noDel
noEdit
row={row}
onView={this.toView}
onEdit={this.toEdit}
/>
); );
}, },
}, },
...@@ -445,6 +445,7 @@ export default { ...@@ -445,6 +445,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.page { .page {
min-width: 1400px; min-width: 1400px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
} }
.hisList { .hisList {
padding: 15px; padding: 15px;
......
...@@ -17,8 +17,8 @@ module.exports = { ...@@ -17,8 +17,8 @@ module.exports = {
hot: true,//自动保存 hot: true,//自动保存
proxy: { proxy: {
'/attendance': { '/attendance': {
//target: 'http://192.168.0.98:11039', target: 'http://192.168.0.98:11039',
target: 'http://112.19.80.237:11039', // target: 'http://112.19.80.237:11039',
// target: 'http://localhost:17500', // target: 'http://localhost:17500',
changeOrigin: true, changeOrigin: true,
secure: false, secure: false,
......
...@@ -35,14 +35,15 @@ public class AttendanceSummaryTaskImpl implements ITaskExcuteService { ...@@ -35,14 +35,15 @@ public class AttendanceSummaryTaskImpl implements ITaskExcuteService {
//考勤汇总前先自动处理前一天的异常考勤数据 //考勤汇总前先自动处理前一天的异常考勤数据
Calendar now = Calendar.getInstance(); Calendar now = Calendar.getInstance();
now.setTime(new Date()); now.setTime(new Date());
now.add(Calendar.DAY_OF_MONTH, -1); //默认查前一天数据 // now.add(Calendar.DAY_OF_MONTH, -1); //默认查前一天数据
// attendanceRecordErrorService.doAutoProcess(now.getTime()); // attendanceRecordErrorService.doAutoProcess(now.getTime());
AttendanceSummaryQuery query = new AttendanceSummaryQuery(); AttendanceSummaryQuery query = new AttendanceSummaryQuery();
query.setSummaryTimeEnd(DateUtils.getStrDate(now.getTime())); query.setSummaryTimeEnd(DateUtils.getStrDate(now.getTime()));
now.add(Calendar.DAY_OF_MONTH, -19); //now.add(Calendar.DAY_OF_MONTH, -10);
query.setSummaryTimeStart(DateUtils.getStrDate(now.getTime())); query.setSummaryTimeStart(DateUtils.getStrDate(now.getTime()));
//重新汇总最近20天的考勤数据 log.info("考勤汇总时间:"+DateUtils.getDateTime(now.getTime(),"yyyy-MM-dd HH:mm:ss"));
//重新汇总最近10天的考勤数据
cacheService.lpush(KEY_ATTENDANCE_STAT_CACHE,query); cacheService.lpush(KEY_ATTENDANCE_STAT_CACHE,query);
} }
......
...@@ -40,6 +40,8 @@ public class AttendanceSummaryQuery { ...@@ -40,6 +40,8 @@ public class AttendanceSummaryQuery {
private List<Long> idList; private List<Long> idList;
private Integer dayOfWeek;
public AttendanceSummaryQuery(String summaryTime) { public AttendanceSummaryQuery(String summaryTime) {
this.summaryTime = summaryTime; this.summaryTime = summaryTime;
} }
......
...@@ -2,6 +2,8 @@ package com.mortals.xhx.module.attendance.model.vo; ...@@ -2,6 +2,8 @@ package com.mortals.xhx.module.attendance.model.vo;
import lombok.Data; import lombok.Data;
import java.util.Date;
/** /**
* 考勤异常汇总 * 考勤异常汇总
*/ */
...@@ -15,6 +17,10 @@ public class ErrorSummaryVo { ...@@ -15,6 +17,10 @@ public class ErrorSummaryVo {
* 员工姓名 * 员工姓名
*/ */
private String staffName; private String staffName;
/**
* 工号
*/
private String workNum;
/** /**
* 年 * 年
*/ */
...@@ -40,4 +46,12 @@ public class ErrorSummaryVo { ...@@ -40,4 +46,12 @@ public class ErrorSummaryVo {
* 考勤汇总-早退(次) * 考勤汇总-早退(次)
*/ */
private Integer overtimeTimes; private Integer overtimeTimes;
/**
* 员工状态(1.正式,2.试用,3.离职)
*/
private Integer status;
/**
* 离职时间
*/
private Date leaveDate;
} }
...@@ -46,4 +46,12 @@ public class LeaveSummaryVo { ...@@ -46,4 +46,12 @@ public class LeaveSummaryVo {
* 结束时间 * 结束时间
*/ */
private Date endTime; private Date endTime;
/**
* 员工状态(1.正式,2.试用,3.离职)
*/
private Integer status;
/**
* 离职时间
*/
private Date leaveDate;
} }
...@@ -3,6 +3,7 @@ package com.mortals.xhx.module.attendance.model.vo; ...@@ -3,6 +3,7 @@ package com.mortals.xhx.module.attendance.model.vo;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date;
/** /**
* 假期余额汇总 * 假期余额汇总
...@@ -129,4 +130,12 @@ public class VacationBalanceSummaryVo { ...@@ -129,4 +130,12 @@ public class VacationBalanceSummaryVo {
* 探亲假(天) * 探亲假(天)
*/ */
private BigDecimal homeLeave; private BigDecimal homeLeave;
/**
* 员工状态(1.正式,2.试用,3.离职)
*/
private Integer status;
/**
* 离职时间
*/
private Date leaveDate;
} }
package com.mortals.xhx.module.attendance.service.impl; package com.mortals.xhx.module.attendance.service.impl;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.mortals.framework.model.PageInfo; import com.mortals.framework.model.PageInfo;
...@@ -8,10 +9,7 @@ import com.mortals.framework.model.Result; ...@@ -8,10 +9,7 @@ import com.mortals.framework.model.Result;
import com.mortals.framework.service.ICacheService; import com.mortals.framework.service.ICacheService;
import com.mortals.framework.util.DateUtils; import com.mortals.framework.util.DateUtils;
import com.mortals.framework.util.StringUtils; import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.common.code.GoWorkResultEnum; import com.mortals.xhx.common.code.*;
import com.mortals.xhx.common.code.LeaveTypeEnum;
import com.mortals.xhx.common.code.OffWorkResultEnum;
import com.mortals.xhx.common.code.ProcessStatusEnum;
import com.mortals.xhx.common.key.RedisKey; import com.mortals.xhx.common.key.RedisKey;
import com.mortals.xhx.common.pdu.HomeStatInfo; import com.mortals.xhx.common.pdu.HomeStatInfo;
import com.mortals.xhx.common.utils.BeanUtil; import com.mortals.xhx.common.utils.BeanUtil;
...@@ -43,10 +41,7 @@ import org.springframework.util.ObjectUtils; ...@@ -43,10 +41,7 @@ import org.springframework.util.ObjectUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode; import java.math.RoundingMode;
import java.util.Arrays; import java.util.*;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
/** /**
* AttendanceStatService * AttendanceStatService
...@@ -204,27 +199,62 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc ...@@ -204,27 +199,62 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc
} }
} else { } else {
//判断是否为周末 //判断是否为周末
Calendar calendar = Calendar.getInstance(); // Calendar calendar = Calendar.getInstance();
calendar.setTime(DateUtils.StrToDate(query.getSummaryTime())); // calendar.setTime(DateUtils.StrToDate(query.getSummaryTime()));
int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK); // int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);
if (dayOfWeek == Calendar.SATURDAY || dayOfWeek == Calendar.SUNDAY) { // if (dayOfWeek == Calendar.SATURDAY || dayOfWeek == Calendar.SUNDAY) {
isReturn = true; // isReturn = true;
} // }
} }
Date today = DateUtils.getCurrDate(); // Date today = DateUtils.getCurrDate();
if (DateUtils.StrToDate(query.getSummaryTime()).compareTo(today) >= 0) { // if (DateUtils.StrToDate(query.getSummaryTime()).compareTo(today) >= 0) {
//当天不统计 // //当天不统计
isReturn = true; // isReturn = true;
} // }
if (isReturn) { if (isReturn) {
return; return;
} }
log.info("开始汇总[" + query.getSummaryTime() + "]考勤....."); log.info("开始汇总[" + query.getSummaryTime() + "]考勤.....");
//汇总当前删除数据,避免update耗时
Date summaryDate = DateUtils.StrToDateTime(query.getSummaryTime());
Calendar cal = Calendar.getInstance();
cal.setTime(summaryDate);
int dayOfWeek = cal.get(Calendar.DAY_OF_WEEK);
query.setDayOfWeek(dayOfWeek);
int y = cal.get(Calendar.YEAR);
int m = cal.get(Calendar.MONTH)+1;
int d = cal.get(Calendar.DATE);
Map<String, Object> condition = new HashMap<>();
condition.put("year",y);
condition.put("month",m);
condition.put("day",d);
this.dao.delete(condition);
AttendanceStaffStatEntity staffStatDelete = new AttendanceStaffStatEntity();
staffStatDelete.setYear(y);
staffStatDelete.setMonth(m);
staffStatDelete.setDay(d);
attendanceStaffStatService.remove(staffStatDelete,null);
//汇总当前日期假期余额 //汇总当前日期假期余额
List<VacationBalanceSummaryVo> vacationBalanceSummaryVoList = attendanceSummaryDao.getVacationBalanceSummary(query); List<VacationBalanceSummaryVo> vacationBalanceSummaryVoList = attendanceSummaryDao.getVacationBalanceSummary(query);
if (CollectionUtils.isNotEmpty(vacationBalanceSummaryVoList)) { if (CollectionUtils.isNotEmpty(vacationBalanceSummaryVoList)) {
log.info("考勤人数:"+vacationBalanceSummaryVoList.size());
List<AttendanceStatEntity> insertList = new ArrayList<>();
List<AttendanceStatEntity> updateList = new ArrayList<>();
for (VacationBalanceSummaryVo item : vacationBalanceSummaryVoList) { for (VacationBalanceSummaryVo item : vacationBalanceSummaryVoList) {
if(item.getStatus() == StaffSatusEnum.离职.getValue()){
//离职状态时判断当前汇总日期是否在离职后
if(item.getLeaveDate()!=null){
String leaveDateStr = DateUtils.getStrDate(item.getLeaveDate());
if(DateUtils.StrToDate(leaveDateStr).compareTo(DateUtils.StrToDate(query.getSummaryTime())) < 0){
//离职日期在统计日期之前不统计
continue;
}
}else {
//没有离职日期也不统计
continue;
}
}
AttendanceStatEntity temp = this.selectOne(new AttendanceStatQuery().staffId(item.getStaffId()).year(item.getYear()).month(item.getMonth()).day(item.getDay())); AttendanceStatEntity temp = this.selectOne(new AttendanceStatQuery().staffId(item.getStaffId()).year(item.getYear()).month(item.getMonth()).day(item.getDay()));
if (temp == null) { if (temp == null) {
AttendanceStatEntity attendanceStatEntity = new AttendanceStatEntity(); AttendanceStatEntity attendanceStatEntity = new AttendanceStatEntity();
...@@ -241,12 +271,33 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc ...@@ -241,12 +271,33 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc
attendanceStatEntity.setCreateTime(new Date()); attendanceStatEntity.setCreateTime(new Date());
attendanceStatEntity.setCreateUserId(1l); attendanceStatEntity.setCreateUserId(1l);
attendanceStatEntity.setGoTimes(1); //默认当天全勤 attendanceStatEntity.setGoTimes(1); //默认当天全勤
this.dao.insert(attendanceStatEntity); //this.dao.insert(attendanceStatEntity);
insertList.add(attendanceStatEntity);
} else { } else {
//BeanUtils.copyProperties(item, temp, BeanUtil.getNullPropertyNames(item)); //BeanUtils.copyProperties(item, temp, BeanUtil.getNullPropertyNames(item));
temp.setUpdateTime(new Date()); //temp.setUpdateTime(new Date());
this.dao.update(temp); //this.dao.update(temp);
AttendanceStatEntity attendanceStatEntity = new AttendanceStatEntity();
attendanceStatEntity.initAttrValue();
attendanceStatEntity.setStaffId(item.getStaffId());
attendanceStatEntity.setStaffName(item.getStaffName());
attendanceStatEntity.setDeptId(item.getDeptId());
attendanceStatEntity.setDeptName(item.getDeptName());
attendanceStatEntity.setPhoneNumer(item.getPhoneNumber());
attendanceStatEntity.setYear(item.getYear());
attendanceStatEntity.setMonth(item.getMonth());
attendanceStatEntity.setDay(item.getDay());
attendanceStatEntity.setGoTimes(1); //默认当天全勤
attendanceStatEntity.setId(temp.getId());
attendanceStatEntity.setUpdateTime(new Date());
updateList.add(attendanceStatEntity);
}
}
if(insertList.size()>0){
this.dao.insertBatch(insertList);
} }
if(updateList.size()>0){
this.dao.updateBatch(updateList);
} }
} }
log.info("完成汇总当前日期假期余额....."); log.info("完成汇总当前日期假期余额.....");
...@@ -254,15 +305,35 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc ...@@ -254,15 +305,35 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc
//汇总当前日期异常考勤 //汇总当前日期异常考勤
List<ErrorSummaryVo> errorSummaryVoList = attendanceSummaryDao.getErrorSummary(query); List<ErrorSummaryVo> errorSummaryVoList = attendanceSummaryDao.getErrorSummary(query);
if (CollectionUtils.isNotEmpty(errorSummaryVoList)) { if (CollectionUtils.isNotEmpty(errorSummaryVoList)) {
List<AttendanceStatEntity> updateList = new ArrayList<>();
List<AttendanceStaffStatEntity> addStaffStat = new ArrayList<>();
List<AttendanceStaffStatEntity> updateStaffStat = new ArrayList<>();
for (ErrorSummaryVo item : errorSummaryVoList) { for (ErrorSummaryVo item : errorSummaryVoList) {
if(item.getStatus() == StaffSatusEnum.离职.getValue()){
//离职状态时判断当前汇总日期是否在离职后
if(item.getLeaveDate()!=null){
String leaveDateStr = DateUtils.getStrDate(item.getLeaveDate());
if(DateUtils.StrToDate(leaveDateStr).compareTo(DateUtils.StrToDate(query.getSummaryTime())) < 0){
//离职日期在统计日期之前不统计
continue;
}
}else {
//没有离职日期也不统计
continue;
}
}
AttendanceStatEntity temp = this.selectOne(new AttendanceStatQuery().staffId(item.getStaffId()).year(item.getYear()).month(item.getMonth()).day(item.getDay())); AttendanceStatEntity temp = this.selectOne(new AttendanceStatQuery().staffId(item.getStaffId()).year(item.getYear()).month(item.getMonth()).day(item.getDay()));
String staffName ="";
if (temp != null) { if (temp != null) {
staffName = temp.getStaffName();
BeanUtils.copyProperties(item, temp, BeanUtil.getNullPropertyNames(item)); BeanUtils.copyProperties(item, temp, BeanUtil.getNullPropertyNames(item));
temp.setGoTimes(0); //默认只要有异常考勤,当天就不算全勤 temp.setGoTimes(0); //默认只要有异常考勤,当天就不算全勤
if (item.getMorningTimes() > 0) { if (item.getMorningTimes() > 0) {
temp.setNonCompliancePunch(new BigDecimal(item.getMorningTimes())); temp.setNonCompliancePunch(new BigDecimal(item.getMorningTimes()));
} }
this.dao.update(temp); //this.dao.update(temp);
temp.setStaffName(staffName);
updateList.add(temp);
} }
String attendanceSummary = ""; String attendanceSummary = "";
if (item.getMorningTimes() > 0) { if (item.getMorningTimes() > 0) {
...@@ -295,28 +366,58 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc ...@@ -295,28 +366,58 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc
staffStat.setRemark(JSON.toJSONString(detailEntities)); staffStat.setRemark(JSON.toJSONString(detailEntities));
} }
} }
staffStat.setStaffName(staffName);
AttendanceStaffStatEntity staffStatTemp = attendanceStaffStatService.selectOne(new AttendanceStaffStatQuery().staffId(item.getStaffId()).year(item.getYear()).month(item.getMonth()).day(item.getDay())); AttendanceStaffStatEntity staffStatTemp = attendanceStaffStatService.selectOne(new AttendanceStaffStatQuery().staffId(item.getStaffId()).year(item.getYear()).month(item.getMonth()).day(item.getDay()));
if (staffStatTemp != null) { if (staffStatTemp != null) {
staffStat.setId(staffStatTemp.getId()); staffStat.setId(staffStatTemp.getId());
staffStat.setUpdateTime(new Date()); staffStat.setUpdateTime(new Date());
attendanceStaffStatService.update(staffStat); //attendanceStaffStatService.update(staffStat);
updateStaffStat.add(staffStat);
} else { } else {
staffStat.setCreateTime(DateUtils.StrToDate(query.getSummaryTime())); staffStat.setCreateTime(DateUtils.StrToDate(query.getSummaryTime()));
staffStat.setCreateUserId(1l); staffStat.setCreateUserId(1l);
attendanceStaffStatService.save(staffStat); //attendanceStaffStatService.save(staffStat);
addStaffStat.add(staffStat);
}
} }
if(updateList.size()>0){
this.dao.updateBatch(updateList);
}
if(addStaffStat.size()>0){
attendanceStaffStatService.save(addStaffStat);
}
if(updateStaffStat.size()>0){
attendanceStaffStatService.update(updateStaffStat);
} }
} }
log.info("完成汇总当前日期异常考勤....."); log.info("完成汇总当前日期异常考勤.....");
//汇总当前日期请假情况 //汇总当前日期请假情况
List<LeaveSummaryVo> leaveSummaryVoList = attendanceSummaryDao.getLeaveSummary(query); List<LeaveSummaryVo> leaveSummaryVoList = attendanceSummaryDao.getLeaveSummary(query);
if (CollectionUtils.isNotEmpty(leaveSummaryVoList)) { if (CollectionUtils.isNotEmpty(leaveSummaryVoList)) {
List<AttendanceStatEntity> updateList = new ArrayList<>();
List<AttendanceStaffStatEntity> addStaffStat = new ArrayList<>();
List<AttendanceStaffStatEntity> updateStaffStat = new ArrayList<>();
BigDecimal day = new BigDecimal(3600 * 8); //一天按8小时折算 BigDecimal day = new BigDecimal(3600 * 8); //一天按8小时折算
BigDecimal oneDay = new BigDecimal(1); BigDecimal oneDay = new BigDecimal(1);
for (LeaveSummaryVo item : leaveSummaryVoList) { for (LeaveSummaryVo item : leaveSummaryVoList) {
if(item.getStatus() == StaffSatusEnum.离职.getValue()){
//离职状态时判断当前汇总日期是否在离职后
if(item.getLeaveDate()!=null){
String leaveDateStr = DateUtils.getStrDate(item.getLeaveDate());
if(DateUtils.StrToDate(leaveDateStr).compareTo(DateUtils.StrToDate(query.getSummaryTime())) < 0){
//离职日期在统计日期之前不统计
continue;
}
}else {
//没有离职日期也不统计
continue;
}
}
String attendanceSummary = ""; String attendanceSummary = "";
AttendanceStatEntity temp = this.selectOne(new AttendanceStatQuery().staffId(item.getStaffId()).year(item.getYear()).month(item.getMonth()).day(item.getDay())); AttendanceStatEntity temp = this.selectOne(new AttendanceStatQuery().staffId(item.getStaffId()).year(item.getYear()).month(item.getMonth()).day(item.getDay()));
String staffName ="";
if (temp != null) { if (temp != null) {
staffName = temp.getStaffName();
BigDecimal leaveTime = new BigDecimal(item.getDuration()).divide(day, 1, BigDecimal.ROUND_HALF_DOWN); BigDecimal leaveTime = new BigDecimal(item.getDuration()).divide(day, 1, BigDecimal.ROUND_HALF_DOWN);
String endStr = DateUtils.getStrDate(item.getEndTime()); String endStr = DateUtils.getStrDate(item.getEndTime());
String dayStr = query.getSummaryTime(); String dayStr = query.getSummaryTime();
...@@ -417,7 +518,9 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc ...@@ -417,7 +518,9 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc
temp.setOtherDays(leaveTime); temp.setOtherDays(leaveTime);
break; break;
} }
this.dao.update(temp); //this.dao.update(temp);
temp.setStaffName(staffName);
updateList.add(temp);
} }
AttendanceStaffStatEntity staffStat = new AttendanceStaffStatEntity(); AttendanceStaffStatEntity staffStat = new AttendanceStaffStatEntity();
...@@ -425,15 +528,27 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc ...@@ -425,15 +528,27 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc
BeanUtils.copyProperties(item, staffStat, BeanUtil.getNullPropertyNames(item)); BeanUtils.copyProperties(item, staffStat, BeanUtil.getNullPropertyNames(item));
staffStat.setAttendanceSummary(attendanceSummary); staffStat.setAttendanceSummary(attendanceSummary);
AttendanceStaffStatEntity staffStatTemp = attendanceStaffStatService.selectOne(new AttendanceStaffStatQuery().staffId(item.getStaffId()).year(item.getYear()).month(item.getMonth()).day(item.getDay())); AttendanceStaffStatEntity staffStatTemp = attendanceStaffStatService.selectOne(new AttendanceStaffStatQuery().staffId(item.getStaffId()).year(item.getYear()).month(item.getMonth()).day(item.getDay()));
staffStat.setStaffName(staffName);
if (staffStatTemp != null) { if (staffStatTemp != null) {
staffStat.setId(staffStatTemp.getId()); staffStat.setId(staffStatTemp.getId());
staffStat.setUpdateTime(new Date()); staffStat.setUpdateTime(new Date());
attendanceStaffStatService.update(staffStat); //attendanceStaffStatService.update(staffStat);
updateStaffStat.add(staffStat);
} else { } else {
staffStat.setCreateTime(DateUtils.StrToDate(query.getSummaryTime())); staffStat.setCreateTime(DateUtils.StrToDate(query.getSummaryTime()));
staffStat.setCreateUserId(1l); staffStat.setCreateUserId(1l);
attendanceStaffStatService.save(staffStat); //attendanceStaffStatService.save(staffStat);
addStaffStat.add(staffStat);
}
}
if(updateList.size()>0){
this.dao.updateBatch(updateList);
}
if(addStaffStat.size()>0){
attendanceStaffStatService.save(addStaffStat);
} }
if(updateStaffStat.size()>0){
attendanceStaffStatService.update(updateStaffStat);
} }
} }
log.info("完成汇总当前日期请假情况....."); log.info("完成汇总当前日期请假情况.....");
......
...@@ -178,10 +178,10 @@ public class FixWorkOtherAttendance extends AttendanceWorkAbstract { ...@@ -178,10 +178,10 @@ public class FixWorkOtherAttendance extends AttendanceWorkAbstract {
recordDetailEntity.setShiftsName(classDetailEntity.getClassName()); recordDetailEntity.setShiftsName(classDetailEntity.getClassName());
recordDetailEntity.setGoWorkResult(GoWorkResultEnum.缺卡.getValue()); recordDetailEntity.setGoWorkResult(GoWorkResultEnum.缺卡.getValue());
recordDetailEntity.setGoWorkDate(DateUtil.parse(commonData.getDateStr() + " " + DateUtil.formatTime(classDetailEntity.getGoWorkDate()))); //recordDetailEntity.setGoWorkDate(DateUtil.parse(commonData.getDateStr() + " " + DateUtil.formatTime(classDetailEntity.getGoWorkDate())));
recordDetailEntity.setOffWorkResult(GoWorkResultEnum.缺卡.getValue()); recordDetailEntity.setOffWorkResult(GoWorkResultEnum.缺卡.getValue());
recordDetailEntity.setOffWorkDate(DateUtil.parse(commonData.getDateStr() + " " + DateUtil.formatTime(classDetailEntity.getOffWorkDate()))); //recordDetailEntity.setOffWorkDate(DateUtil.parse(commonData.getDateStr() + " " + DateUtil.formatTime(classDetailEntity.getOffWorkDate())));
recordDetailEntity.setOrderNum(orderNum); recordDetailEntity.setOrderNum(orderNum);
commonData.getDetailEntityList().add(recordDetailEntity); commonData.getDetailEntityList().add(recordDetailEntity);
......
...@@ -428,6 +428,8 @@ public class AttendanceRecordController extends BaseCRUDJsonBodyMappingControlle ...@@ -428,6 +428,8 @@ public class AttendanceRecordController extends BaseCRUDJsonBodyMappingControlle
if (!existSet.contains(i)) { if (!existSet.contains(i)) {
AttendanceRecordDetailEntity recordDetailEntity = new AttendanceRecordDetailEntity(); AttendanceRecordDetailEntity recordDetailEntity = new AttendanceRecordDetailEntity();
recordDetailEntity.initAttrValue(); recordDetailEntity.initAttrValue();
recordDetailEntity.setOffWorkDate(null);
recordDetailEntity.setGoWorkDate(null);
recordDetailEntity.setOrderNum(i); recordDetailEntity.setOrderNum(i);
return recordDetailEntity; return recordDetailEntity;
} }
......
...@@ -140,6 +140,32 @@ public class StaffEntity extends StaffVo { ...@@ -140,6 +140,32 @@ public class StaffEntity extends StaffVo {
* 最后登录时间 * 最后登录时间
*/ */
private Date lastLoginTime; private Date lastLoginTime;
/**
* 考勤授权(0.不启用,1.启用)
*/
private Integer attendCheck;
/**
* 评价授权(0.不启用,1.启用)
*/
private Integer complainCheck;
/**
* 投诉授权(0.不启用,1.启用)
*/
private Integer reviewCheck;
/**
* 办件授权(0.不启用,1.启用)
*/
private Integer goworkCheck;
/**
* 效能授权(0.不启用,1.启用)
*/
private Integer effectCheck;
/**
* 其他授权(0.不启用,1.启用)
*/
private Integer otherCheck;
@Override @Override
public int hashCode() { public int hashCode() {
return this.getId().hashCode(); return this.getId().hashCode();
...@@ -211,5 +237,17 @@ public class StaffEntity extends StaffVo { ...@@ -211,5 +237,17 @@ public class StaffEntity extends StaffVo {
this.loginPwd = ""; this.loginPwd = "";
this.lastLoginTime = null; this.lastLoginTime = null;
this.attendCheck = 0;
this.complainCheck = 0;
this.reviewCheck = 0;
this.goworkCheck = 0;
this.effectCheck = 0;
this.otherCheck = 0;
} }
} }
\ No newline at end of file
...@@ -288,6 +288,96 @@ public class StaffQuery extends StaffEntity { ...@@ -288,6 +288,96 @@ public class StaffQuery extends StaffEntity {
/** 结束 最后登录时间 */ /** 结束 最后登录时间 */
private String lastLoginTimeEnd; private String lastLoginTimeEnd;
/** 开始 考勤授权(0.不启用,1.启用) */
private Integer attendCheckStart;
/** 结束 考勤授权(0.不启用,1.启用) */
private Integer attendCheckEnd;
/** 增加 考勤授权(0.不启用,1.启用) */
private Integer attendCheckIncrement;
/** 考勤授权(0.不启用,1.启用)列表 */
private List <Integer> attendCheckList;
/** 考勤授权(0.不启用,1.启用)排除列表 */
private List <Integer> attendCheckNotList;
/** 开始 评价授权(0.不启用,1.启用) */
private Integer complainCheckStart;
/** 结束 评价授权(0.不启用,1.启用) */
private Integer complainCheckEnd;
/** 增加 评价授权(0.不启用,1.启用) */
private Integer complainCheckIncrement;
/** 评价授权(0.不启用,1.启用)列表 */
private List <Integer> complainCheckList;
/** 评价授权(0.不启用,1.启用)排除列表 */
private List <Integer> complainCheckNotList;
/** 开始 投诉授权(0.不启用,1.启用) */
private Integer reviewCheckStart;
/** 结束 投诉授权(0.不启用,1.启用) */
private Integer reviewCheckEnd;
/** 增加 投诉授权(0.不启用,1.启用) */
private Integer reviewCheckIncrement;
/** 投诉授权(0.不启用,1.启用)列表 */
private List <Integer> reviewCheckList;
/** 投诉授权(0.不启用,1.启用)排除列表 */
private List <Integer> reviewCheckNotList;
/** 开始 办件授权(0.不启用,1.启用) */
private Integer goworkCheckStart;
/** 结束 办件授权(0.不启用,1.启用) */
private Integer goworkCheckEnd;
/** 增加 办件授权(0.不启用,1.启用) */
private Integer goworkCheckIncrement;
/** 办件授权(0.不启用,1.启用)列表 */
private List <Integer> goworkCheckList;
/** 办件授权(0.不启用,1.启用)排除列表 */
private List <Integer> goworkCheckNotList;
/** 开始 效能授权(0.不启用,1.启用) */
private Integer effectCheckStart;
/** 结束 效能授权(0.不启用,1.启用) */
private Integer effectCheckEnd;
/** 增加 效能授权(0.不启用,1.启用) */
private Integer effectCheckIncrement;
/** 效能授权(0.不启用,1.启用)列表 */
private List <Integer> effectCheckList;
/** 效能授权(0.不启用,1.启用)排除列表 */
private List <Integer> effectCheckNotList;
/** 开始 其他授权(0.不启用,1.启用) */
private Integer otherCheckStart;
/** 结束 其他授权(0.不启用,1.启用) */
private Integer otherCheckEnd;
/** 增加 其他授权(0.不启用,1.启用) */
private Integer otherCheckIncrement;
/** 其他授权(0.不启用,1.启用)列表 */
private List <Integer> otherCheckList;
/** 其他授权(0.不启用,1.启用)排除列表 */
private List <Integer> otherCheckNotList;
/** 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<StaffQuery> orConditionList; private List<StaffQuery> orConditionList;
...@@ -1859,6 +1949,491 @@ public class StaffQuery extends StaffEntity { ...@@ -1859,6 +1949,491 @@ public class StaffQuery extends StaffEntity {
this.lastLoginTimeEnd = lastLoginTimeEnd; this.lastLoginTimeEnd = lastLoginTimeEnd;
} }
/**
* 获取 开始 考勤授权(0.不启用,1.启用)
* @return attendCheckStart
*/
public Integer getAttendCheckStart(){
return this.attendCheckStart;
}
/**
* 设置 开始 考勤授权(0.不启用,1.启用)
* @param attendCheckStart
*/
public void setAttendCheckStart(Integer attendCheckStart){
this.attendCheckStart = attendCheckStart;
}
/**
* 获取 结束 考勤授权(0.不启用,1.启用)
* @return $attendCheckEnd
*/
public Integer getAttendCheckEnd(){
return this.attendCheckEnd;
}
/**
* 设置 结束 考勤授权(0.不启用,1.启用)
* @param attendCheckEnd
*/
public void setAttendCheckEnd(Integer attendCheckEnd){
this.attendCheckEnd = attendCheckEnd;
}
/**
* 获取 增加 考勤授权(0.不启用,1.启用)
* @return attendCheckIncrement
*/
public Integer getAttendCheckIncrement(){
return this.attendCheckIncrement;
}
/**
* 设置 增加 考勤授权(0.不启用,1.启用)
* @param attendCheckIncrement
*/
public void setAttendCheckIncrement(Integer attendCheckIncrement){
this.attendCheckIncrement = attendCheckIncrement;
}
/**
* 获取 考勤授权(0.不启用,1.启用)
* @return attendCheckList
*/
public List<Integer> getAttendCheckList(){
return this.attendCheckList;
}
/**
* 设置 考勤授权(0.不启用,1.启用)
* @param attendCheckList
*/
public void setAttendCheckList(List<Integer> attendCheckList){
this.attendCheckList = attendCheckList;
}
/**
* 获取 考勤授权(0.不启用,1.启用)
* @return attendCheckNotList
*/
public List<Integer> getAttendCheckNotList(){
return this.attendCheckNotList;
}
/**
* 设置 考勤授权(0.不启用,1.启用)
* @param attendCheckNotList
*/
public void setAttendCheckNotList(List<Integer> attendCheckNotList){
this.attendCheckNotList = attendCheckNotList;
}
/**
* 获取 开始 评价授权(0.不启用,1.启用)
* @return complainCheckStart
*/
public Integer getComplainCheckStart(){
return this.complainCheckStart;
}
/**
* 设置 开始 评价授权(0.不启用,1.启用)
* @param complainCheckStart
*/
public void setComplainCheckStart(Integer complainCheckStart){
this.complainCheckStart = complainCheckStart;
}
/**
* 获取 结束 评价授权(0.不启用,1.启用)
* @return $complainCheckEnd
*/
public Integer getComplainCheckEnd(){
return this.complainCheckEnd;
}
/**
* 设置 结束 评价授权(0.不启用,1.启用)
* @param complainCheckEnd
*/
public void setComplainCheckEnd(Integer complainCheckEnd){
this.complainCheckEnd = complainCheckEnd;
}
/**
* 获取 增加 评价授权(0.不启用,1.启用)
* @return complainCheckIncrement
*/
public Integer getComplainCheckIncrement(){
return this.complainCheckIncrement;
}
/**
* 设置 增加 评价授权(0.不启用,1.启用)
* @param complainCheckIncrement
*/
public void setComplainCheckIncrement(Integer complainCheckIncrement){
this.complainCheckIncrement = complainCheckIncrement;
}
/**
* 获取 评价授权(0.不启用,1.启用)
* @return complainCheckList
*/
public List<Integer> getComplainCheckList(){
return this.complainCheckList;
}
/**
* 设置 评价授权(0.不启用,1.启用)
* @param complainCheckList
*/
public void setComplainCheckList(List<Integer> complainCheckList){
this.complainCheckList = complainCheckList;
}
/**
* 获取 评价授权(0.不启用,1.启用)
* @return complainCheckNotList
*/
public List<Integer> getComplainCheckNotList(){
return this.complainCheckNotList;
}
/**
* 设置 评价授权(0.不启用,1.启用)
* @param complainCheckNotList
*/
public void setComplainCheckNotList(List<Integer> complainCheckNotList){
this.complainCheckNotList = complainCheckNotList;
}
/**
* 获取 开始 投诉授权(0.不启用,1.启用)
* @return reviewCheckStart
*/
public Integer getReviewCheckStart(){
return this.reviewCheckStart;
}
/**
* 设置 开始 投诉授权(0.不启用,1.启用)
* @param reviewCheckStart
*/
public void setReviewCheckStart(Integer reviewCheckStart){
this.reviewCheckStart = reviewCheckStart;
}
/**
* 获取 结束 投诉授权(0.不启用,1.启用)
* @return $reviewCheckEnd
*/
public Integer getReviewCheckEnd(){
return this.reviewCheckEnd;
}
/**
* 设置 结束 投诉授权(0.不启用,1.启用)
* @param reviewCheckEnd
*/
public void setReviewCheckEnd(Integer reviewCheckEnd){
this.reviewCheckEnd = reviewCheckEnd;
}
/**
* 获取 增加 投诉授权(0.不启用,1.启用)
* @return reviewCheckIncrement
*/
public Integer getReviewCheckIncrement(){
return this.reviewCheckIncrement;
}
/**
* 设置 增加 投诉授权(0.不启用,1.启用)
* @param reviewCheckIncrement
*/
public void setReviewCheckIncrement(Integer reviewCheckIncrement){
this.reviewCheckIncrement = reviewCheckIncrement;
}
/**
* 获取 投诉授权(0.不启用,1.启用)
* @return reviewCheckList
*/
public List<Integer> getReviewCheckList(){
return this.reviewCheckList;
}
/**
* 设置 投诉授权(0.不启用,1.启用)
* @param reviewCheckList
*/
public void setReviewCheckList(List<Integer> reviewCheckList){
this.reviewCheckList = reviewCheckList;
}
/**
* 获取 投诉授权(0.不启用,1.启用)
* @return reviewCheckNotList
*/
public List<Integer> getReviewCheckNotList(){
return this.reviewCheckNotList;
}
/**
* 设置 投诉授权(0.不启用,1.启用)
* @param reviewCheckNotList
*/
public void setReviewCheckNotList(List<Integer> reviewCheckNotList){
this.reviewCheckNotList = reviewCheckNotList;
}
/**
* 获取 开始 办件授权(0.不启用,1.启用)
* @return goworkCheckStart
*/
public Integer getGoworkCheckStart(){
return this.goworkCheckStart;
}
/**
* 设置 开始 办件授权(0.不启用,1.启用)
* @param goworkCheckStart
*/
public void setGoworkCheckStart(Integer goworkCheckStart){
this.goworkCheckStart = goworkCheckStart;
}
/**
* 获取 结束 办件授权(0.不启用,1.启用)
* @return $goworkCheckEnd
*/
public Integer getGoworkCheckEnd(){
return this.goworkCheckEnd;
}
/**
* 设置 结束 办件授权(0.不启用,1.启用)
* @param goworkCheckEnd
*/
public void setGoworkCheckEnd(Integer goworkCheckEnd){
this.goworkCheckEnd = goworkCheckEnd;
}
/**
* 获取 增加 办件授权(0.不启用,1.启用)
* @return goworkCheckIncrement
*/
public Integer getGoworkCheckIncrement(){
return this.goworkCheckIncrement;
}
/**
* 设置 增加 办件授权(0.不启用,1.启用)
* @param goworkCheckIncrement
*/
public void setGoworkCheckIncrement(Integer goworkCheckIncrement){
this.goworkCheckIncrement = goworkCheckIncrement;
}
/**
* 获取 办件授权(0.不启用,1.启用)
* @return goworkCheckList
*/
public List<Integer> getGoworkCheckList(){
return this.goworkCheckList;
}
/**
* 设置 办件授权(0.不启用,1.启用)
* @param goworkCheckList
*/
public void setGoworkCheckList(List<Integer> goworkCheckList){
this.goworkCheckList = goworkCheckList;
}
/**
* 获取 办件授权(0.不启用,1.启用)
* @return goworkCheckNotList
*/
public List<Integer> getGoworkCheckNotList(){
return this.goworkCheckNotList;
}
/**
* 设置 办件授权(0.不启用,1.启用)
* @param goworkCheckNotList
*/
public void setGoworkCheckNotList(List<Integer> goworkCheckNotList){
this.goworkCheckNotList = goworkCheckNotList;
}
/**
* 获取 开始 效能授权(0.不启用,1.启用)
* @return effectCheckStart
*/
public Integer getEffectCheckStart(){
return this.effectCheckStart;
}
/**
* 设置 开始 效能授权(0.不启用,1.启用)
* @param effectCheckStart
*/
public void setEffectCheckStart(Integer effectCheckStart){
this.effectCheckStart = effectCheckStart;
}
/**
* 获取 结束 效能授权(0.不启用,1.启用)
* @return $effectCheckEnd
*/
public Integer getEffectCheckEnd(){
return this.effectCheckEnd;
}
/**
* 设置 结束 效能授权(0.不启用,1.启用)
* @param effectCheckEnd
*/
public void setEffectCheckEnd(Integer effectCheckEnd){
this.effectCheckEnd = effectCheckEnd;
}
/**
* 获取 增加 效能授权(0.不启用,1.启用)
* @return effectCheckIncrement
*/
public Integer getEffectCheckIncrement(){
return this.effectCheckIncrement;
}
/**
* 设置 增加 效能授权(0.不启用,1.启用)
* @param effectCheckIncrement
*/
public void setEffectCheckIncrement(Integer effectCheckIncrement){
this.effectCheckIncrement = effectCheckIncrement;
}
/**
* 获取 效能授权(0.不启用,1.启用)
* @return effectCheckList
*/
public List<Integer> getEffectCheckList(){
return this.effectCheckList;
}
/**
* 设置 效能授权(0.不启用,1.启用)
* @param effectCheckList
*/
public void setEffectCheckList(List<Integer> effectCheckList){
this.effectCheckList = effectCheckList;
}
/**
* 获取 效能授权(0.不启用,1.启用)
* @return effectCheckNotList
*/
public List<Integer> getEffectCheckNotList(){
return this.effectCheckNotList;
}
/**
* 设置 效能授权(0.不启用,1.启用)
* @param effectCheckNotList
*/
public void setEffectCheckNotList(List<Integer> effectCheckNotList){
this.effectCheckNotList = effectCheckNotList;
}
/**
* 获取 开始 其他授权(0.不启用,1.启用)
* @return otherCheckStart
*/
public Integer getOtherCheckStart(){
return this.otherCheckStart;
}
/**
* 设置 开始 其他授权(0.不启用,1.启用)
* @param otherCheckStart
*/
public void setOtherCheckStart(Integer otherCheckStart){
this.otherCheckStart = otherCheckStart;
}
/**
* 获取 结束 其他授权(0.不启用,1.启用)
* @return $otherCheckEnd
*/
public Integer getOtherCheckEnd(){
return this.otherCheckEnd;
}
/**
* 设置 结束 其他授权(0.不启用,1.启用)
* @param otherCheckEnd
*/
public void setOtherCheckEnd(Integer otherCheckEnd){
this.otherCheckEnd = otherCheckEnd;
}
/**
* 获取 增加 其他授权(0.不启用,1.启用)
* @return otherCheckIncrement
*/
public Integer getOtherCheckIncrement(){
return this.otherCheckIncrement;
}
/**
* 设置 增加 其他授权(0.不启用,1.启用)
* @param otherCheckIncrement
*/
public void setOtherCheckIncrement(Integer otherCheckIncrement){
this.otherCheckIncrement = otherCheckIncrement;
}
/**
* 获取 其他授权(0.不启用,1.启用)
* @return otherCheckList
*/
public List<Integer> getOtherCheckList(){
return this.otherCheckList;
}
/**
* 设置 其他授权(0.不启用,1.启用)
* @param otherCheckList
*/
public void setOtherCheckList(List<Integer> otherCheckList){
this.otherCheckList = otherCheckList;
}
/**
* 获取 其他授权(0.不启用,1.启用)
* @return otherCheckNotList
*/
public List<Integer> getOtherCheckNotList(){
return this.otherCheckNotList;
}
/**
* 设置 其他授权(0.不启用,1.启用)
* @param otherCheckNotList
*/
public void setOtherCheckNotList(List<Integer> otherCheckNotList){
this.otherCheckNotList = otherCheckNotList;
}
/** /**
* 设置 序号,主键,自增长 * 设置 序号,主键,自增长
* @param id * @param id
...@@ -2725,6 +3300,329 @@ public class StaffQuery extends StaffEntity { ...@@ -2725,6 +3300,329 @@ public class StaffQuery extends StaffEntity {
return this; return this;
} }
/**
* 设置 考勤授权(0.不启用,1.启用)
* @param attendCheck
*/
public StaffQuery attendCheck(Integer attendCheck){
setAttendCheck(attendCheck);
return this;
}
/**
* 设置 开始 考勤授权(0.不启用,1.启用)
* @param attendCheckStart
*/
public StaffQuery attendCheckStart(Integer attendCheckStart){
this.attendCheckStart = attendCheckStart;
return this;
}
/**
* 设置 结束 考勤授权(0.不启用,1.启用)
* @param attendCheckEnd
*/
public StaffQuery attendCheckEnd(Integer attendCheckEnd){
this.attendCheckEnd = attendCheckEnd;
return this;
}
/**
* 设置 增加 考勤授权(0.不启用,1.启用)
* @param attendCheckIncrement
*/
public StaffQuery attendCheckIncrement(Integer attendCheckIncrement){
this.attendCheckIncrement = attendCheckIncrement;
return this;
}
/**
* 设置 考勤授权(0.不启用,1.启用)
* @param attendCheckList
*/
public StaffQuery attendCheckList(List<Integer> attendCheckList){
this.attendCheckList = attendCheckList;
return this;
}
/**
* 设置 考勤授权(0.不启用,1.启用)
* @param attendCheckNotList
*/
public StaffQuery attendCheckNotList(List<Integer> attendCheckNotList){
this.attendCheckNotList = attendCheckNotList;
return this;
}
/**
* 设置 评价授权(0.不启用,1.启用)
* @param complainCheck
*/
public StaffQuery complainCheck(Integer complainCheck){
setComplainCheck(complainCheck);
return this;
}
/**
* 设置 开始 评价授权(0.不启用,1.启用)
* @param complainCheckStart
*/
public StaffQuery complainCheckStart(Integer complainCheckStart){
this.complainCheckStart = complainCheckStart;
return this;
}
/**
* 设置 结束 评价授权(0.不启用,1.启用)
* @param complainCheckEnd
*/
public StaffQuery complainCheckEnd(Integer complainCheckEnd){
this.complainCheckEnd = complainCheckEnd;
return this;
}
/**
* 设置 增加 评价授权(0.不启用,1.启用)
* @param complainCheckIncrement
*/
public StaffQuery complainCheckIncrement(Integer complainCheckIncrement){
this.complainCheckIncrement = complainCheckIncrement;
return this;
}
/**
* 设置 评价授权(0.不启用,1.启用)
* @param complainCheckList
*/
public StaffQuery complainCheckList(List<Integer> complainCheckList){
this.complainCheckList = complainCheckList;
return this;
}
/**
* 设置 评价授权(0.不启用,1.启用)
* @param complainCheckNotList
*/
public StaffQuery complainCheckNotList(List<Integer> complainCheckNotList){
this.complainCheckNotList = complainCheckNotList;
return this;
}
/**
* 设置 投诉授权(0.不启用,1.启用)
* @param reviewCheck
*/
public StaffQuery reviewCheck(Integer reviewCheck){
setReviewCheck(reviewCheck);
return this;
}
/**
* 设置 开始 投诉授权(0.不启用,1.启用)
* @param reviewCheckStart
*/
public StaffQuery reviewCheckStart(Integer reviewCheckStart){
this.reviewCheckStart = reviewCheckStart;
return this;
}
/**
* 设置 结束 投诉授权(0.不启用,1.启用)
* @param reviewCheckEnd
*/
public StaffQuery reviewCheckEnd(Integer reviewCheckEnd){
this.reviewCheckEnd = reviewCheckEnd;
return this;
}
/**
* 设置 增加 投诉授权(0.不启用,1.启用)
* @param reviewCheckIncrement
*/
public StaffQuery reviewCheckIncrement(Integer reviewCheckIncrement){
this.reviewCheckIncrement = reviewCheckIncrement;
return this;
}
/**
* 设置 投诉授权(0.不启用,1.启用)
* @param reviewCheckList
*/
public StaffQuery reviewCheckList(List<Integer> reviewCheckList){
this.reviewCheckList = reviewCheckList;
return this;
}
/**
* 设置 投诉授权(0.不启用,1.启用)
* @param reviewCheckNotList
*/
public StaffQuery reviewCheckNotList(List<Integer> reviewCheckNotList){
this.reviewCheckNotList = reviewCheckNotList;
return this;
}
/**
* 设置 办件授权(0.不启用,1.启用)
* @param goworkCheck
*/
public StaffQuery goworkCheck(Integer goworkCheck){
setGoworkCheck(goworkCheck);
return this;
}
/**
* 设置 开始 办件授权(0.不启用,1.启用)
* @param goworkCheckStart
*/
public StaffQuery goworkCheckStart(Integer goworkCheckStart){
this.goworkCheckStart = goworkCheckStart;
return this;
}
/**
* 设置 结束 办件授权(0.不启用,1.启用)
* @param goworkCheckEnd
*/
public StaffQuery goworkCheckEnd(Integer goworkCheckEnd){
this.goworkCheckEnd = goworkCheckEnd;
return this;
}
/**
* 设置 增加 办件授权(0.不启用,1.启用)
* @param goworkCheckIncrement
*/
public StaffQuery goworkCheckIncrement(Integer goworkCheckIncrement){
this.goworkCheckIncrement = goworkCheckIncrement;
return this;
}
/**
* 设置 办件授权(0.不启用,1.启用)
* @param goworkCheckList
*/
public StaffQuery goworkCheckList(List<Integer> goworkCheckList){
this.goworkCheckList = goworkCheckList;
return this;
}
/**
* 设置 办件授权(0.不启用,1.启用)
* @param goworkCheckNotList
*/
public StaffQuery goworkCheckNotList(List<Integer> goworkCheckNotList){
this.goworkCheckNotList = goworkCheckNotList;
return this;
}
/**
* 设置 效能授权(0.不启用,1.启用)
* @param effectCheck
*/
public StaffQuery effectCheck(Integer effectCheck){
setEffectCheck(effectCheck);
return this;
}
/**
* 设置 开始 效能授权(0.不启用,1.启用)
* @param effectCheckStart
*/
public StaffQuery effectCheckStart(Integer effectCheckStart){
this.effectCheckStart = effectCheckStart;
return this;
}
/**
* 设置 结束 效能授权(0.不启用,1.启用)
* @param effectCheckEnd
*/
public StaffQuery effectCheckEnd(Integer effectCheckEnd){
this.effectCheckEnd = effectCheckEnd;
return this;
}
/**
* 设置 增加 效能授权(0.不启用,1.启用)
* @param effectCheckIncrement
*/
public StaffQuery effectCheckIncrement(Integer effectCheckIncrement){
this.effectCheckIncrement = effectCheckIncrement;
return this;
}
/**
* 设置 效能授权(0.不启用,1.启用)
* @param effectCheckList
*/
public StaffQuery effectCheckList(List<Integer> effectCheckList){
this.effectCheckList = effectCheckList;
return this;
}
/**
* 设置 效能授权(0.不启用,1.启用)
* @param effectCheckNotList
*/
public StaffQuery effectCheckNotList(List<Integer> effectCheckNotList){
this.effectCheckNotList = effectCheckNotList;
return this;
}
/**
* 设置 其他授权(0.不启用,1.启用)
* @param otherCheck
*/
public StaffQuery otherCheck(Integer otherCheck){
setOtherCheck(otherCheck);
return this;
}
/**
* 设置 开始 其他授权(0.不启用,1.启用)
* @param otherCheckStart
*/
public StaffQuery otherCheckStart(Integer otherCheckStart){
this.otherCheckStart = otherCheckStart;
return this;
}
/**
* 设置 结束 其他授权(0.不启用,1.启用)
* @param otherCheckEnd
*/
public StaffQuery otherCheckEnd(Integer otherCheckEnd){
this.otherCheckEnd = otherCheckEnd;
return this;
}
/**
* 设置 增加 其他授权(0.不启用,1.启用)
* @param otherCheckIncrement
*/
public StaffQuery otherCheckIncrement(Integer otherCheckIncrement){
this.otherCheckIncrement = otherCheckIncrement;
return this;
}
/**
* 设置 其他授权(0.不启用,1.启用)
* @param otherCheckList
*/
public StaffQuery otherCheckList(List<Integer> otherCheckList){
this.otherCheckList = otherCheckList;
return this;
}
/**
* 设置 其他授权(0.不启用,1.启用)
* @param otherCheckNotList
*/
public StaffQuery otherCheckNotList(List<Integer> otherCheckNotList){
this.otherCheckNotList = otherCheckNotList;
return this;
}
/** /**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) * 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
......
package com.mortals.xhx.module.staff.model.vo;
import lombok.Data;
@Data
public class StaffCheckAuthorizePdu {
private Long staffId;
/** 核查类型枚举CheckTypeEnum(1.考勤绩效,2.评价绩效,3.办件绩效,4.效能绩效,5.其它绩效,6.投诉绩效) */
private Integer type;
}
package com.mortals.xhx.module.staff.service; package com.mortals.xhx.module.staff.service;
import com.mortals.framework.common.Rest; import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICRUDCacheService; import com.mortals.framework.service.ICRUDCacheService;
import com.mortals.xhx.module.staff.model.StaffEntity; import com.mortals.xhx.module.staff.model.StaffEntity;
import com.mortals.xhx.module.staff.model.vo.StaffCheckAuthorizePdu;
import com.mortals.xhx.module.staff.model.vo.StaffInfoVo; import com.mortals.xhx.module.staff.model.vo.StaffInfoVo;
import java.util.List; import java.util.List;
...@@ -30,4 +32,11 @@ public interface StaffService extends ICRUDCacheService<StaffEntity,Long> { ...@@ -30,4 +32,11 @@ public interface StaffService extends ICRUDCacheService<StaffEntity,Long> {
*/ */
Rest<Void> syncPersons(Context context); Rest<Void> syncPersons(Context context);
/**
* 绩效考核授权
* @param pdu
* @return
*/
int checkAuthorize(StaffCheckAuthorizePdu pdu,Context context) throws AppException;
} }
\ No newline at end of file
...@@ -34,6 +34,7 @@ import com.mortals.xhx.module.staff.model.StaffEntity; ...@@ -34,6 +34,7 @@ import com.mortals.xhx.module.staff.model.StaffEntity;
import com.mortals.xhx.module.staff.model.StaffLeaveEntity; import com.mortals.xhx.module.staff.model.StaffLeaveEntity;
import com.mortals.xhx.module.staff.model.StaffLeaveQuery; import com.mortals.xhx.module.staff.model.StaffLeaveQuery;
import com.mortals.xhx.module.staff.model.StaffQuery; import com.mortals.xhx.module.staff.model.StaffQuery;
import com.mortals.xhx.module.staff.model.vo.StaffCheckAuthorizePdu;
import com.mortals.xhx.module.staff.model.vo.StaffInfoVo; import com.mortals.xhx.module.staff.model.vo.StaffInfoVo;
import com.mortals.xhx.module.staff.service.StaffLeaveService; import com.mortals.xhx.module.staff.service.StaffLeaveService;
import com.mortals.xhx.module.staff.service.StaffService; import com.mortals.xhx.module.staff.service.StaffService;
...@@ -203,6 +204,7 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta ...@@ -203,6 +204,7 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
if (!ObjectUtils.isEmpty(key)) { if (!ObjectUtils.isEmpty(key)) {
StaffEntity staff = item.getValue(); StaffEntity staff = item.getValue();
staff.setStatus(StaffSatusEnum.离职.getValue()); staff.setStatus(StaffSatusEnum.离职.getValue());
staff.setLeaveDate(new Date());
staff.setUpdateTime(new Date()); staff.setUpdateTime(new Date());
staff.setUpdateUserId(1L); staff.setUpdateUserId(1L);
this.update(staff); this.update(staff);
...@@ -361,6 +363,76 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta ...@@ -361,6 +363,76 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
return params; return params;
} }
@Override
public int checkAuthorize(StaffCheckAuthorizePdu pdu,Context context) throws AppException {
StaffEntity temp = this.get(pdu.getStaffId());
if(temp == null){
throw new AppException("人员信息ID不正确");
}
CheckTypeEnum checkTypeEnum = CheckTypeEnum.getByValue(pdu.getType());
if(checkTypeEnum==null){
throw new AppException("考核类型不正确");
}
StaffEntity update = new StaffEntity();
update.setId(pdu.getStaffId());
//1.考勤绩效,2.评价绩效,3.办件绩效,4.效能绩效,5.其它绩效,6.投诉绩效
switch(checkTypeEnum){
case 考勤绩效:
if(temp.getAttendCheck()==1){
update.setAttendCheck(0);
}else {
update.setAttendCheck(1);
}
break;
case 评价绩效:
if(temp.getComplainCheck()==1){
update.setComplainCheck(0);
}else {
update.setComplainCheck(1);
}
break;
case 办件绩效:
if(temp.getGoworkCheck()==1){
update.setGoworkCheck(0);
}else {
update.setGoworkCheck(1);
}
break;
case 效能绩效:
if(temp.getEffectCheck()==1){
update.setEffectCheck(0);
}else {
update.setEffectCheck(1);
}
break;
case 其它绩效:
if(temp.getOtherCheck()==1){
update.setOtherCheck(0);
}else {
update.setOtherCheck(1);
}
break;
case 投诉绩效:
if(temp.getReviewCheck()==1){
update.setReviewCheck(0);
}else {
update.setReviewCheck(1);
}
break;
default:
if(temp.getOtherCheck()==1){
update.setOtherCheck(0);
}else {
update.setOtherCheck(1);
}
}
update.setUpdateTime(new Date());
if(context.getUser()!=null) {
update.setUpdateUserId(context.getUser().getId());
}
return dao.update(update);
}
public static void main(String[] args) { public static void main(String[] args) {
System.out.println("1" + StrUtil.padPre("125", 7, "0")); System.out.println("1" + StrUtil.padPre("125", 7, "0"));
......
...@@ -28,12 +28,14 @@ import com.mortals.xhx.module.job.model.JobQuery; ...@@ -28,12 +28,14 @@ import com.mortals.xhx.module.job.model.JobQuery;
import com.mortals.xhx.module.job.service.JobService; import com.mortals.xhx.module.job.service.JobService;
import com.mortals.xhx.module.staff.model.StaffEntity; import com.mortals.xhx.module.staff.model.StaffEntity;
import com.mortals.xhx.module.staff.model.vo.HolidayListVo; import com.mortals.xhx.module.staff.model.vo.HolidayListVo;
import com.mortals.xhx.module.staff.model.vo.StaffCheckAuthorizePdu;
import com.mortals.xhx.module.staff.model.vo.StaffInfoVo; import com.mortals.xhx.module.staff.model.vo.StaffInfoVo;
import com.mortals.xhx.module.staff.service.StaffService; import com.mortals.xhx.module.staff.service.StaffService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.*; import java.util.*;
...@@ -221,5 +223,34 @@ public class StaffController extends BaseCRUDJsonBodyMappingController<StaffServ ...@@ -221,5 +223,34 @@ public class StaffController extends BaseCRUDJsonBodyMappingController<StaffServ
public String delete(Long[] id) { public String delete(Long[] id) {
return super.delete(id); return super.delete(id);
} }
@PostMapping(value = "check/authorize")
public String checkAuthorize(StaffCheckAuthorizePdu pdu) {
Map<String, Object> model = new HashMap();
if (pdu.getStaffId() == null) {
return this.createFailJsonResp("请选择待授权" + this.getModuleDesc() + "信息");
} else {
JSONObject ret = new JSONObject();
String busiDesc = "授权" + this.getModuleDesc();
Context context = this.getContext();
try {
this.service.checkAuthorize(pdu,context);
if (!ObjectUtils.isEmpty(context) && !ObjectUtils.isEmpty(context.getUser())) {
this.recordSysLog(this.request, busiDesc + " 【成功】");
}
} catch (Exception var8) {
this.doException(this.request, busiDesc, model, var8);
Object msg = model.get("message_info");
return this.createFailJsonResp(msg == null ? "系统异常" : msg.toString());
}
this.init(model, context);
ret.put("data", model);
ret.put("code", 1);
ret.put("msg", model.remove("message_info"));
return ret.toJSONString();
}
}
} }
...@@ -5,65 +5,78 @@ ...@@ -5,65 +5,78 @@
<!-- 汇总当前日期假期余额 --> <!-- 汇总当前日期假期余额 -->
<select id="getVacationBalanceSummary" parameterType="com.mortals.xhx.module.attendance.model.vo.AttendanceSummaryQuery" resultType="com.mortals.xhx.module.attendance.model.vo.VacationBalanceSummaryVo"> <select id="getVacationBalanceSummary" parameterType="com.mortals.xhx.module.attendance.model.vo.AttendanceSummaryQuery" resultType="com.mortals.xhx.module.attendance.model.vo.VacationBalanceSummaryVo">
SELECT SELECT DISTINCT
s.id AS staffId, s.id AS staffId,
s.`name` AS staffName, s.`name` AS staffName,
s.phoneNumber, s.phoneNumber,
s.workNum, s.workNum,
s.deptId, s.deptId,
s.deptName, s.deptName,
s.`status`,
s.leaveDate,
DATE_FORMAT(STR_TO_DATE(#{summaryTime},'%Y-%m-%d'),'%Y') as `year`, DATE_FORMAT(STR_TO_DATE(#{summaryTime},'%Y-%m-%d'),'%Y') as `year`,
DATE_FORMAT(STR_TO_DATE(#{summaryTime},'%Y-%m-%d'),'%m') as `month`, DATE_FORMAT(STR_TO_DATE(#{summaryTime},'%Y-%m-%d'),'%m') as `month`,
DATE_FORMAT(STR_TO_DATE(#{summaryTime},'%Y-%m-%d'),'%d') as `day`, DATE_FORMAT(STR_TO_DATE(#{summaryTime},'%Y-%m-%d'),'%d') as `day`,
IFNULL(b.personalLeaveDays,0) as personalLeaveDays, 0 as personalLeaveDays,
IFNULL(b.compensatedLeaveDays,0) as compensatedLeaveDays, 0 as compensatedLeaveDays,
IFNULL(b.sickLeaveDays,0) as sickLeaveDays, 0 as sickLeaveDays,
IFNULL(b.annualLeaveDays,0) as annualLeaveDays, 0 as annualLeaveDays,
IFNULL(b.marriageLeaveDays,0) as marriageLeaveDays, 0 as marriageLeaveDays,
IFNULL(b.maternityLeaveDays,0) as maternityLeaveDays, 0 as maternityLeaveDays,
IFNULL(b.paternityLeaveDays,0) as paternityLeaveDays, 0 as paternityLeaveDays,
IFNULL(b.menstrualLeaveDays,0) as menstrualLeaveDays, 0 as menstrualLeaveDays,
IFNULL(b.breastfeedingLeaveDays,0) as breastfeedingLeaveDays, 0 as breastfeedingLeaveDays,
IFNULL(b.bereavementLeaveDays,0) as bereavementLeaveDays, 0 as bereavementLeaveDays,
IFNULL(b.backToUnit,0) as backToUnit, 0 as backToUnit,
IFNULL(b.onDutyLeave,0) as onDutyLeave, 0 as onDutyLeave,
IFNULL(b.outOfOffice,0) as outOfOffice, 0 as outOfOffice,
IFNULL(b.shiftCompensation,0) as shiftCompensation, 0 as shiftCompensation,
IFNULL(b.physicalExamination,0) as physicalExamination, 0 as physicalExamination,
IFNULL(b.quarantine,0) as quarantine, 0 as quarantine,
IFNULL(b.businessTrip,0) as businessTrip, 0 as businessTrip,
IFNULL(b.publicHoliday,0) as publicHoliday, 0 as publicHoliday,
IFNULL(b.childRearingLeave,0) as childRearingLeave, 0 as childRearingLeave,
IFNULL(b.transferBack,0) as transferBack, 0 as transferBack,
IFNULL(b.homeLeave,0) as homeLeave 0 as homeLeave
FROM FROM
mortals_xhx_staff s mortals_xhx_staff s,
LEFT JOIN mortals_xhx_attendance_vacation_balance b ON s.id = b.staffId mortals_xhx_attendance_group_staff gs,
WHERE 1=1 mortals_xhx_attendance_group_fixedwork f
<if test="staffId != null and staffId!=''"> AND s.id = #{staffId}</if> WHERE
s.id = gs.staffId
AND gs.groupId = f.groupId
<if test="dayOfWeek != null and dayOfWeek == 2"> AND f.monday = 1</if>
<if test="dayOfWeek != null and dayOfWeek == 3"> AND f.tuesday = 1</if>
<if test="dayOfWeek != null and dayOfWeek == 4"> AND f.wednesday = 1</if>
<if test="dayOfWeek != null and dayOfWeek == 5"> AND f.thursday = 1</if>
<if test="dayOfWeek != null and dayOfWeek == 6"> AND f.friday = 1</if>
<if test="dayOfWeek != null and dayOfWeek == 7"> AND f.saturday = 1</if>
<if test="dayOfWeek != null and dayOfWeek == 1"> AND f.sunday = 1</if>
</select> </select>
<!-- 汇总当前日期请假情况 --> <!-- 汇总当前日期请假情况 -->
<select id="getLeaveSummary" parameterType="com.mortals.xhx.module.attendance.model.vo.AttendanceSummaryQuery" resultType="com.mortals.xhx.module.attendance.model.vo.LeaveSummaryVo"> <select id="getLeaveSummary" parameterType="com.mortals.xhx.module.attendance.model.vo.AttendanceSummaryQuery" resultType="com.mortals.xhx.module.attendance.model.vo.LeaveSummaryVo">
SELECT SELECT
leavePersonId AS staffId, r.leavePersonId AS staffId,
leavePerson AS staffName, r.leavePerson AS staffName,
leaveType, ANY_VALUE(s.`status`) as `status`,
IFNULL(sum(duration),0) as duration, ANY_VALUE(s.leaveDate) as leaveDate,
r.leaveType,
IFNULL(sum(r.duration),0) as duration,
ANY_VALUE(DATE_FORMAT(STR_TO_DATE(#{summaryTime},'%Y-%m-%d'),'%Y')) as `year`, ANY_VALUE(DATE_FORMAT(STR_TO_DATE(#{summaryTime},'%Y-%m-%d'),'%Y')) as `year`,
ANY_VALUE(DATE_FORMAT(STR_TO_DATE(#{summaryTime},'%Y-%m-%d'),'%m')) as `month`, ANY_VALUE(DATE_FORMAT(STR_TO_DATE(#{summaryTime},'%Y-%m-%d'),'%m')) as `month`,
ANY_VALUE(DATE_FORMAT(STR_TO_DATE(#{summaryTime},'%Y-%m-%d'),'%d')) as `day`, ANY_VALUE(DATE_FORMAT(STR_TO_DATE(#{summaryTime},'%Y-%m-%d'),'%d')) as `day`,
ANY_VALUE(startTime) as startTime, ANY_VALUE(r.startTime) as startTime,
ANY_VALUE(endTime) as endTime ANY_VALUE(r.endTime) as endTime
FROM FROM
mortals_xhx_attendance_leave_record mortals_xhx_attendance_leave_record r INNER JOIN mortals_xhx_staff s ON r.leavePersonId = s.id
WHERE WHERE
auditResult = 1 r.auditResult = 1
AND processStatus = 2 AND r.processStatus = 2
AND STR_TO_DATE(date_format(startTime,'%Y-%m-%d'),'%Y-%m-%d') <![CDATA[ <= ]]> STR_TO_DATE(#{summaryTime},'%Y-%m-%d') AND STR_TO_DATE(date_format(r.startTime,'%Y-%m-%d'),'%Y-%m-%d') <![CDATA[ <= ]]> STR_TO_DATE(#{summaryTime},'%Y-%m-%d')
AND STR_TO_DATE(date_format(endTime,'%Y-%m-%d'),'%Y-%m-%d') <![CDATA[ >= ]]> STR_TO_DATE(#{summaryTime},'%Y-%m-%d') AND STR_TO_DATE(date_format(r.endTime,'%Y-%m-%d'),'%Y-%m-%d') <![CDATA[ >= ]]> STR_TO_DATE(#{summaryTime},'%Y-%m-%d')
<if test="staffId != null and staffId!=''"> AND leavePersonId = #{staffId}</if> <if test="staffId != null and staffId!=''"> AND leavePersonId = #{staffId}</if>
GROUP BY leavePersonId,leavePerson,leaveType GROUP BY r.leavePersonId,r.leavePerson,r.leaveType
</select> </select>
...@@ -71,7 +84,9 @@ ...@@ -71,7 +84,9 @@
<select id="getErrorSummary" parameterType="com.mortals.xhx.module.attendance.model.vo.AttendanceSummaryQuery" resultType="com.mortals.xhx.module.attendance.model.vo.ErrorSummaryVo"> <select id="getErrorSummary" parameterType="com.mortals.xhx.module.attendance.model.vo.AttendanceSummaryQuery" resultType="com.mortals.xhx.module.attendance.model.vo.ErrorSummaryVo">
select select
e.staffId, e.staffId,
e.staffName, e.workNum,
ANY_VALUE(s.`status`) as `status`,
ANY_VALUE(s.leaveDate) as leaveDate,
ANY_VALUE(DATE_FORMAT(errorDateTime,'%Y')) as `year`, ANY_VALUE(DATE_FORMAT(errorDateTime,'%Y')) as `year`,
ANY_VALUE(DATE_FORMAT(errorDateTime,'%m')) as `month`, ANY_VALUE(DATE_FORMAT(errorDateTime,'%m')) as `month`,
ANY_VALUE(DATE_FORMAT(errorDateTime,'%d')) as `day`, ANY_VALUE(DATE_FORMAT(errorDateTime,'%d')) as `day`,
...@@ -80,7 +95,7 @@ ...@@ -80,7 +95,7 @@
sum(case processResult when 1 then 1 ELSE 0 end) as overtimeTimes, sum(case processResult when 1 then 1 ELSE 0 end) as overtimeTimes,
sum(case processResult when 2 then 1 ELSE 0 end) as lateTimes sum(case processResult when 2 then 1 ELSE 0 end) as lateTimes
from from
mortals_xhx_attendance_record_error e mortals_xhx_attendance_record_error e INNER JOIN mortals_xhx_staff s ON e.staffId = s.id
where where
processResult != 4 processResult != 4
and e.errorDateTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{summaryTime},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') and e.errorDateTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{summaryTime},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
...@@ -88,7 +103,7 @@ ...@@ -88,7 +103,7 @@
<if test="staffId != null and staffId!=''"> AND e.staffId = #{staffId}</if> <if test="staffId != null and staffId!=''"> AND e.staffId = #{staffId}</if>
group by group by
e.staffId, e.staffId,
e.staffName, e.workNum,
DATE_FORMAT(errorDateTime,'%Y-%m-%d') DATE_FORMAT(errorDateTime,'%Y-%m-%d')
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -37,7 +37,12 @@ ...@@ -37,7 +37,12 @@
<result property="loginName" column="loginName" /> <result property="loginName" column="loginName" />
<result property="loginPwd" column="loginPwd" /> <result property="loginPwd" column="loginPwd" />
<result property="lastLoginTime" column="lastLoginTime" /> <result property="lastLoginTime" column="lastLoginTime" />
<result property="attendCheck" column="attendCheck" />
<result property="complainCheck" column="complainCheck" />
<result property="reviewCheck" column="reviewCheck" />
<result property="goworkCheck" column="goworkCheck" />
<result property="effectCheck" column="effectCheck" />
<result property="otherCheck" column="otherCheck" />
</resultMap> </resultMap>
...@@ -140,23 +145,41 @@ ...@@ -140,23 +145,41 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('lastLoginTime') or colPickMode == 1 and data.containsKey('lastLoginTime')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('lastLoginTime') or colPickMode == 1 and data.containsKey('lastLoginTime')))">
a.lastLoginTime, a.lastLoginTime,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('attendCheck') or colPickMode == 1 and data.containsKey('attendCheck')))">
a.attendCheck,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('complainCheck') or colPickMode == 1 and data.containsKey('complainCheck')))">
a.complainCheck,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('reviewCheck') or colPickMode == 1 and data.containsKey('reviewCheck')))">
a.reviewCheck,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('goworkCheck') or colPickMode == 1 and data.containsKey('goworkCheck')))">
a.goworkCheck,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('effectCheck') or colPickMode == 1 and data.containsKey('effectCheck')))">
a.effectCheck,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('otherCheck') or colPickMode == 1 and data.containsKey('otherCheck')))">
a.otherCheck,
</if>
</trim> </trim>
</sql> </sql>
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="StaffEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="StaffEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_staff insert into mortals_xhx_staff
(name,gender,birthday,photoPath,phoneNumber,idCard,workNum,politicalstatus,deptId,deptName,positionId,positionName,staffType,status,source,registerPath,entryDate,regularDate,leaveDate,remark,createUserId,createTime,updateUserId,updateTime,remarkId,picUri,serverIndexCode,score,loginName,loginPwd,lastLoginTime) (name,gender,birthday,photoPath,phoneNumber,idCard,workNum,politicalstatus,deptId,deptName,positionId,positionName,staffType,status,source,registerPath,entryDate,regularDate,leaveDate,remark,createUserId,createTime,updateUserId,updateTime,remarkId,picUri,serverIndexCode,score,loginName,loginPwd,lastLoginTime,attendCheck,complainCheck,reviewCheck,goworkCheck,effectCheck,otherCheck)
VALUES VALUES
(#{name},#{gender},#{birthday},#{photoPath},#{phoneNumber},#{idCard},#{workNum},#{politicalstatus},#{deptId},#{deptName},#{positionId},#{positionName},#{staffType},#{status},#{source},#{registerPath},#{entryDate},#{regularDate},#{leaveDate},#{remark},#{createUserId},#{createTime},#{updateUserId},#{updateTime},#{remarkId},#{picUri},#{serverIndexCode},#{score},#{loginName},#{loginPwd},#{lastLoginTime}) (#{name},#{gender},#{birthday},#{photoPath},#{phoneNumber},#{idCard},#{workNum},#{politicalstatus},#{deptId},#{deptName},#{positionId},#{positionName},#{staffType},#{status},#{source},#{registerPath},#{entryDate},#{regularDate},#{leaveDate},#{remark},#{createUserId},#{createTime},#{updateUserId},#{updateTime},#{remarkId},#{picUri},#{serverIndexCode},#{score},#{loginName},#{loginPwd},#{lastLoginTime},#{attendCheck},#{complainCheck},#{reviewCheck},#{goworkCheck},#{effectCheck},#{otherCheck})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_staff insert into mortals_xhx_staff
(name,gender,birthday,photoPath,phoneNumber,idCard,workNum,politicalstatus,deptId,deptName,positionId,positionName,staffType,status,source,registerPath,entryDate,regularDate,leaveDate,remark,createUserId,createTime,updateUserId,updateTime,remarkId,picUri,serverIndexCode,score,loginName,loginPwd,lastLoginTime) (name,gender,birthday,photoPath,phoneNumber,idCard,workNum,politicalstatus,deptId,deptName,positionId,positionName,staffType,status,source,registerPath,entryDate,regularDate,leaveDate,remark,createUserId,createTime,updateUserId,updateTime,remarkId,picUri,serverIndexCode,score,loginName,loginPwd,lastLoginTime,attendCheck,complainCheck,reviewCheck,goworkCheck,effectCheck,otherCheck)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.name},#{item.gender},#{item.birthday},#{item.photoPath},#{item.phoneNumber},#{item.idCard},#{item.workNum},#{item.politicalstatus},#{item.deptId},#{item.deptName},#{item.positionId},#{item.positionName},#{item.staffType},#{item.status},#{item.source},#{item.registerPath},#{item.entryDate},#{item.regularDate},#{item.leaveDate},#{item.remark},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime},#{item.remarkId},#{item.picUri},#{item.serverIndexCode},#{item.score},#{item.loginName},#{item.loginPwd},#{item.lastLoginTime}) (#{item.name},#{item.gender},#{item.birthday},#{item.photoPath},#{item.phoneNumber},#{item.idCard},#{item.workNum},#{item.politicalstatus},#{item.deptId},#{item.deptName},#{item.positionId},#{item.positionName},#{item.staffType},#{item.status},#{item.source},#{item.registerPath},#{item.entryDate},#{item.regularDate},#{item.leaveDate},#{item.remark},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime},#{item.remarkId},#{item.picUri},#{item.serverIndexCode},#{item.score},#{item.loginName},#{item.loginPwd},#{item.lastLoginTime},#{item.attendCheck},#{item.complainCheck},#{item.reviewCheck},#{item.goworkCheck},#{item.effectCheck},#{item.otherCheck})
</foreach> </foreach>
</insert> </insert>
...@@ -289,6 +312,42 @@ ...@@ -289,6 +312,42 @@
<if test="(colPickMode==0 and data.containsKey('lastLoginTime')) or (colPickMode==1 and !data.containsKey('lastLoginTime'))"> <if test="(colPickMode==0 and data.containsKey('lastLoginTime')) or (colPickMode==1 and !data.containsKey('lastLoginTime'))">
a.lastLoginTime=#{data.lastLoginTime}, a.lastLoginTime=#{data.lastLoginTime},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('attendCheck')) or (colPickMode==1 and !data.containsKey('attendCheck'))">
a.attendCheck=#{data.attendCheck},
</if>
<if test="(colPickMode==0 and data.containsKey('attendCheckIncrement')) or (colPickMode==1 and !data.containsKey('attendCheckIncrement'))">
a.attendCheck=ifnull(a.attendCheck,0) + #{data.attendCheckIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('complainCheck')) or (colPickMode==1 and !data.containsKey('complainCheck'))">
a.complainCheck=#{data.complainCheck},
</if>
<if test="(colPickMode==0 and data.containsKey('complainCheckIncrement')) or (colPickMode==1 and !data.containsKey('complainCheckIncrement'))">
a.complainCheck=ifnull(a.complainCheck,0) + #{data.complainCheckIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('reviewCheck')) or (colPickMode==1 and !data.containsKey('reviewCheck'))">
a.reviewCheck=#{data.reviewCheck},
</if>
<if test="(colPickMode==0 and data.containsKey('reviewCheckIncrement')) or (colPickMode==1 and !data.containsKey('reviewCheckIncrement'))">
a.reviewCheck=ifnull(a.reviewCheck,0) + #{data.reviewCheckIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('goworkCheck')) or (colPickMode==1 and !data.containsKey('goworkCheck'))">
a.goworkCheck=#{data.goworkCheck},
</if>
<if test="(colPickMode==0 and data.containsKey('goworkCheckIncrement')) or (colPickMode==1 and !data.containsKey('goworkCheckIncrement'))">
a.goworkCheck=ifnull(a.goworkCheck,0) + #{data.goworkCheckIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('effectCheck')) or (colPickMode==1 and !data.containsKey('effectCheck'))">
a.effectCheck=#{data.effectCheck},
</if>
<if test="(colPickMode==0 and data.containsKey('effectCheckIncrement')) or (colPickMode==1 and !data.containsKey('effectCheckIncrement'))">
a.effectCheck=ifnull(a.effectCheck,0) + #{data.effectCheckIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('otherCheck')) or (colPickMode==1 and !data.containsKey('otherCheck'))">
a.otherCheck=#{data.otherCheck},
</if>
<if test="(colPickMode==0 and data.containsKey('otherCheckIncrement')) or (colPickMode==1 and !data.containsKey('otherCheckIncrement'))">
a.otherCheck=ifnull(a.otherCheck,0) + #{data.otherCheckIncrement},
</if>
</trim> </trim>
<trim suffixOverrides="where" suffix=""> <trim suffixOverrides="where" suffix="">
where where
...@@ -568,6 +627,78 @@ ...@@ -568,6 +627,78 @@
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="attendCheck=(case" suffix="ELSE attendCheck end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('attendCheck')) or (colPickMode==1 and !item.containsKey('attendCheck'))">
when a.id=#{item.id} then #{item.attendCheck}
</when>
<when test="(colPickMode==0 and item.containsKey('attendCheckIncrement')) or (colPickMode==1 and !item.containsKey('attendCheckIncrement'))">
when a.id=#{item.id} then ifnull(a.attendCheck,0) + #{item.attendCheckIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="complainCheck=(case" suffix="ELSE complainCheck end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('complainCheck')) or (colPickMode==1 and !item.containsKey('complainCheck'))">
when a.id=#{item.id} then #{item.complainCheck}
</when>
<when test="(colPickMode==0 and item.containsKey('complainCheckIncrement')) or (colPickMode==1 and !item.containsKey('complainCheckIncrement'))">
when a.id=#{item.id} then ifnull(a.complainCheck,0) + #{item.complainCheckIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="reviewCheck=(case" suffix="ELSE reviewCheck end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('reviewCheck')) or (colPickMode==1 and !item.containsKey('reviewCheck'))">
when a.id=#{item.id} then #{item.reviewCheck}
</when>
<when test="(colPickMode==0 and item.containsKey('reviewCheckIncrement')) or (colPickMode==1 and !item.containsKey('reviewCheckIncrement'))">
when a.id=#{item.id} then ifnull(a.reviewCheck,0) + #{item.reviewCheckIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="goworkCheck=(case" suffix="ELSE goworkCheck end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('goworkCheck')) or (colPickMode==1 and !item.containsKey('goworkCheck'))">
when a.id=#{item.id} then #{item.goworkCheck}
</when>
<when test="(colPickMode==0 and item.containsKey('goworkCheckIncrement')) or (colPickMode==1 and !item.containsKey('goworkCheckIncrement'))">
when a.id=#{item.id} then ifnull(a.goworkCheck,0) + #{item.goworkCheckIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="effectCheck=(case" suffix="ELSE effectCheck end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('effectCheck')) or (colPickMode==1 and !item.containsKey('effectCheck'))">
when a.id=#{item.id} then #{item.effectCheck}
</when>
<when test="(colPickMode==0 and item.containsKey('effectCheckIncrement')) or (colPickMode==1 and !item.containsKey('effectCheckIncrement'))">
when a.id=#{item.id} then ifnull(a.effectCheck,0) + #{item.effectCheckIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="otherCheck=(case" suffix="ELSE otherCheck end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('otherCheck')) or (colPickMode==1 and !item.containsKey('otherCheck'))">
when a.id=#{item.id} then #{item.otherCheck}
</when>
<when test="(colPickMode==0 and item.containsKey('otherCheckIncrement')) or (colPickMode==1 and !item.containsKey('otherCheckIncrement'))">
when a.id=#{item.id} then ifnull(a.otherCheck,0) + #{item.otherCheckIncrement}
</when>
</choose>
</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=")">
...@@ -1380,6 +1511,167 @@ ...@@ -1380,6 +1511,167 @@
<if test="conditionParamRef.containsKey('lastLoginTimeEnd') and conditionParamRef.lastLoginTimeEnd != null and conditionParamRef.lastLoginTimeEnd!=''"> <if test="conditionParamRef.containsKey('lastLoginTimeEnd') and conditionParamRef.lastLoginTimeEnd != null and conditionParamRef.lastLoginTimeEnd!=''">
${_conditionType_} a.lastLoginTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.lastLoginTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') ${_conditionType_} a.lastLoginTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.lastLoginTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if> </if>
<if test="conditionParamRef.containsKey('attendCheck')">
<if test="conditionParamRef.attendCheck != null ">
${_conditionType_} a.attendCheck = #{${_conditionParam_}.attendCheck}
</if>
<if test="conditionParamRef.attendCheck == null">
${_conditionType_} a.attendCheck is null
</if>
</if>
<if test="conditionParamRef.containsKey('attendCheckList') and conditionParamRef.attendCheckList.size() > 0">
${_conditionType_} a.attendCheck in
<foreach collection="conditionParamRef.attendCheckList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('attendCheckNotList') and conditionParamRef.attendCheckNotList.size() > 0">
${_conditionType_} a.attendCheck not in
<foreach collection="conditionParamRef.attendCheckNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('attendCheckStart') and conditionParamRef.attendCheckStart != null">
${_conditionType_} a.attendCheck <![CDATA[ >= ]]> #{${_conditionParam_}.attendCheckStart}
</if>
<if test="conditionParamRef.containsKey('attendCheckEnd') and conditionParamRef.attendCheckEnd != null">
${_conditionType_} a.attendCheck <![CDATA[ <= ]]> #{${_conditionParam_}.attendCheckEnd}
</if>
<if test="conditionParamRef.containsKey('complainCheck')">
<if test="conditionParamRef.complainCheck != null ">
${_conditionType_} a.complainCheck = #{${_conditionParam_}.complainCheck}
</if>
<if test="conditionParamRef.complainCheck == null">
${_conditionType_} a.complainCheck is null
</if>
</if>
<if test="conditionParamRef.containsKey('complainCheckList') and conditionParamRef.complainCheckList.size() > 0">
${_conditionType_} a.complainCheck in
<foreach collection="conditionParamRef.complainCheckList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('complainCheckNotList') and conditionParamRef.complainCheckNotList.size() > 0">
${_conditionType_} a.complainCheck not in
<foreach collection="conditionParamRef.complainCheckNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('complainCheckStart') and conditionParamRef.complainCheckStart != null">
${_conditionType_} a.complainCheck <![CDATA[ >= ]]> #{${_conditionParam_}.complainCheckStart}
</if>
<if test="conditionParamRef.containsKey('complainCheckEnd') and conditionParamRef.complainCheckEnd != null">
${_conditionType_} a.complainCheck <![CDATA[ <= ]]> #{${_conditionParam_}.complainCheckEnd}
</if>
<if test="conditionParamRef.containsKey('reviewCheck')">
<if test="conditionParamRef.reviewCheck != null ">
${_conditionType_} a.reviewCheck = #{${_conditionParam_}.reviewCheck}
</if>
<if test="conditionParamRef.reviewCheck == null">
${_conditionType_} a.reviewCheck is null
</if>
</if>
<if test="conditionParamRef.containsKey('reviewCheckList') and conditionParamRef.reviewCheckList.size() > 0">
${_conditionType_} a.reviewCheck in
<foreach collection="conditionParamRef.reviewCheckList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('reviewCheckNotList') and conditionParamRef.reviewCheckNotList.size() > 0">
${_conditionType_} a.reviewCheck not in
<foreach collection="conditionParamRef.reviewCheckNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('reviewCheckStart') and conditionParamRef.reviewCheckStart != null">
${_conditionType_} a.reviewCheck <![CDATA[ >= ]]> #{${_conditionParam_}.reviewCheckStart}
</if>
<if test="conditionParamRef.containsKey('reviewCheckEnd') and conditionParamRef.reviewCheckEnd != null">
${_conditionType_} a.reviewCheck <![CDATA[ <= ]]> #{${_conditionParam_}.reviewCheckEnd}
</if>
<if test="conditionParamRef.containsKey('goworkCheck')">
<if test="conditionParamRef.goworkCheck != null ">
${_conditionType_} a.goworkCheck = #{${_conditionParam_}.goworkCheck}
</if>
<if test="conditionParamRef.goworkCheck == null">
${_conditionType_} a.goworkCheck is null
</if>
</if>
<if test="conditionParamRef.containsKey('goworkCheckList') and conditionParamRef.goworkCheckList.size() > 0">
${_conditionType_} a.goworkCheck in
<foreach collection="conditionParamRef.goworkCheckList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('goworkCheckNotList') and conditionParamRef.goworkCheckNotList.size() > 0">
${_conditionType_} a.goworkCheck not in
<foreach collection="conditionParamRef.goworkCheckNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('goworkCheckStart') and conditionParamRef.goworkCheckStart != null">
${_conditionType_} a.goworkCheck <![CDATA[ >= ]]> #{${_conditionParam_}.goworkCheckStart}
</if>
<if test="conditionParamRef.containsKey('goworkCheckEnd') and conditionParamRef.goworkCheckEnd != null">
${_conditionType_} a.goworkCheck <![CDATA[ <= ]]> #{${_conditionParam_}.goworkCheckEnd}
</if>
<if test="conditionParamRef.containsKey('effectCheck')">
<if test="conditionParamRef.effectCheck != null ">
${_conditionType_} a.effectCheck = #{${_conditionParam_}.effectCheck}
</if>
<if test="conditionParamRef.effectCheck == null">
${_conditionType_} a.effectCheck is null
</if>
</if>
<if test="conditionParamRef.containsKey('effectCheckList') and conditionParamRef.effectCheckList.size() > 0">
${_conditionType_} a.effectCheck in
<foreach collection="conditionParamRef.effectCheckList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('effectCheckNotList') and conditionParamRef.effectCheckNotList.size() > 0">
${_conditionType_} a.effectCheck not in
<foreach collection="conditionParamRef.effectCheckNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('effectCheckStart') and conditionParamRef.effectCheckStart != null">
${_conditionType_} a.effectCheck <![CDATA[ >= ]]> #{${_conditionParam_}.effectCheckStart}
</if>
<if test="conditionParamRef.containsKey('effectCheckEnd') and conditionParamRef.effectCheckEnd != null">
${_conditionType_} a.effectCheck <![CDATA[ <= ]]> #{${_conditionParam_}.effectCheckEnd}
</if>
<if test="conditionParamRef.containsKey('otherCheck')">
<if test="conditionParamRef.otherCheck != null ">
${_conditionType_} a.otherCheck = #{${_conditionParam_}.otherCheck}
</if>
<if test="conditionParamRef.otherCheck == null">
${_conditionType_} a.otherCheck is null
</if>
</if>
<if test="conditionParamRef.containsKey('otherCheckList') and conditionParamRef.otherCheckList.size() > 0">
${_conditionType_} a.otherCheck in
<foreach collection="conditionParamRef.otherCheckList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('otherCheckNotList') and conditionParamRef.otherCheckNotList.size() > 0">
${_conditionType_} a.otherCheck not in
<foreach collection="conditionParamRef.otherCheckNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('otherCheckStart') and conditionParamRef.otherCheckStart != null">
${_conditionType_} a.otherCheck <![CDATA[ >= ]]> #{${_conditionParam_}.otherCheckStart}
</if>
<if test="conditionParamRef.containsKey('otherCheckEnd') and conditionParamRef.otherCheckEnd != null">
${_conditionType_} a.otherCheck <![CDATA[ <= ]]> #{${_conditionParam_}.otherCheckEnd}
</if>
</sql> </sql>
<sql id="_orderCols_"> <sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()"> <if test="orderColList != null and !orderColList.isEmpty()">
...@@ -1553,6 +1845,36 @@ ...@@ -1553,6 +1845,36 @@
<if test='orderCol.lastLoginTime != null and "DESC".equalsIgnoreCase(orderCol.lastLoginTime)'>DESC</if> <if test='orderCol.lastLoginTime != null and "DESC".equalsIgnoreCase(orderCol.lastLoginTime)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('attendCheck')">
a.attendCheck
<if test='orderCol.attendCheck != null and "DESC".equalsIgnoreCase(orderCol.attendCheck)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('complainCheck')">
a.complainCheck
<if test='orderCol.complainCheck != null and "DESC".equalsIgnoreCase(orderCol.complainCheck)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('reviewCheck')">
a.reviewCheck
<if test='orderCol.reviewCheck != null and "DESC".equalsIgnoreCase(orderCol.reviewCheck)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('goworkCheck')">
a.goworkCheck
<if test='orderCol.goworkCheck != null and "DESC".equalsIgnoreCase(orderCol.goworkCheck)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('effectCheck')">
a.effectCheck
<if test='orderCol.effectCheck != null and "DESC".equalsIgnoreCase(orderCol.effectCheck)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('otherCheck')">
a.otherCheck
<if test='orderCol.otherCheck != null and "DESC".equalsIgnoreCase(orderCol.otherCheck)'>DESC</if>
,
</if>
</trim> </trim>
</if> </if>
</sql> </sql>
......
...@@ -884,3 +884,16 @@ CREATE TABLE `mortals_sys_holiday` ...@@ -884,3 +884,16 @@ CREATE TABLE `mortals_sys_holiday`
-- 2023-12-05 员工绩效分数初始化任务 -- 2023-12-05 员工绩效分数初始化任务
-- -------------- -- --------------
INSERT INTO `mortals_xhx_task` (`name`, `taskKey`, `status`, `excuteService`, `excuteParam`, `excuteHost`, `excuteStrategy`, `excuteDate`, `excuteTime`, `remark`, `lastExcuteHost`, `lastExcuteTime`, `interimExcuteStatus`, `createTime`, `createUserId`, `createUserName`) VALUES ('员工绩效分数初始化任务', 'StaffPerformInitDataTask', '0', 'StaffPerformInitDataTask', NULL, NULL, '1', '0', '00:10', NULL, NULL, NULL, '0', NOW(), '1', '系统管理员'); INSERT INTO `mortals_xhx_task` (`name`, `taskKey`, `status`, `excuteService`, `excuteParam`, `excuteHost`, `excuteStrategy`, `excuteDate`, `excuteTime`, `remark`, `lastExcuteHost`, `lastExcuteTime`, `interimExcuteStatus`, `createTime`, `createUserId`, `createUserName`) VALUES ('员工绩效分数初始化任务', 'StaffPerformInitDataTask', '0', 'StaffPerformInitDataTask', NULL, NULL, '1', '0', '00:10', NULL, NULL, NULL, '0', NOW(), '1', '系统管理员');
-- ----------
-- 2024-01-08 更新人员信息离职时间,人员信息表增加考核授权
-- ----------
update mortals_xhx_staff s INNER JOIN mortals_xhx_staff_leave l ON s.id = l.staffId SET s.leaveDate = l.leaveDate;
ALTER TABLE `mortals_xhx_staff` ADD COLUMN `attendCheck` TINYINT (2) DEFAULT '0' COMMENT '考勤授权(0.不启用,1.启用)',
ADD COLUMN `complainCheck` TINYINT (2) DEFAULT '0' COMMENT '评价授权(0.不启用,1.启用)',
ADD COLUMN `reviewCheck` TINYINT (2) DEFAULT '0' COMMENT '投诉授权(0.不启用,1.启用)',
ADD COLUMN `goworkCheck` TINYINT (2) DEFAULT '0' COMMENT '办件授权(0.不启用,1.启用)',
ADD COLUMN `effectCheck` TINYINT (2) DEFAULT '0' COMMENT '效能授权(0.不启用,1.启用)',
ADD COLUMN `otherCheck` TINYINT (2) DEFAULT '0' COMMENT '其他授权(0.不启用,1.启用)';
\ No newline at end of file
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