Commit 52fceb9b authored by 王启林's avatar 王启林
parents 1570216b a00c6c01
...@@ -4,37 +4,80 @@ ...@@ -4,37 +4,80 @@
:title="title" :title="title"
:visible.sync="open" :visible.sync="open"
:direction="direction" :direction="direction"
size="50%"> size="50%"
>
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row> <el-row>
<Field label="班次ID" prop="shiftsId" v-model="form.shiftsId" placeholder="请输入班次ID"/> <Field
<Field label="班次名称" prop="shiftsName" v-model="form.shiftsName" placeholder="请输入班次名称"/> label="班次ID"
<Field label="上班打卡时间" prop="goWorkDate" v-model="form.goWorkDate" type="date" /> prop="shiftsId"
<Field label="上班打卡前时间段,单位分钟" prop="goWorkDateBefore" v-model="form.goWorkDateBefore" placeholder="请输入上班打卡前时间段,单位分钟"/> v-model="form.shiftsId"
<Field label="上班打卡前时间段,单位分钟" prop="goWorkDateAfter" v-model="form.goWorkDateAfter" placeholder="请输入上班打卡前时间段,单位分钟"/> placeholder="请输入班次ID"
<Field label="下班打卡时间" prop="offWorkDate" v-model="form.offWorkDate" type="date" /> />
<Field label="下班打卡前时间段,单位分钟" prop="offWorkDateBefore" v-model="form.offWorkDateBefore" placeholder="请输入下班打卡前时间段,单位分钟"/> <Field
<Field label="下班打卡前时间段,单位分钟" prop="offWorkDateAfter" v-model="form.offWorkDateAfter" placeholder="请输入下班打卡前时间段,单位分钟"/> label="班次名称"
<Field label="备注" prop="remark" v-model="form.remark" type="textarea" placeholder="请输入备注"/> prop="shiftsName"
v-model="form.shiftsName"
placeholder="请输入班次名称"
/>
<Field
label="上班打卡时间"
prop="goWorkDate"
v-model="form.goWorkDate"
type="date"
/>
<Field
label="上班打卡前时间段,单位分钟"
prop="goWorkDateBefore"
v-model="form.goWorkDateBefore"
placeholder="请输入上班打卡前时间段,单位分钟"
/>
<Field
label="上班打卡前时间段,单位分钟"
prop="goWorkDateAfter"
v-model="form.goWorkDateAfter"
placeholder="请输入上班打卡前时间段,单位分钟"
/>
<Field
label="下班打卡时间"
prop="offWorkDate"
v-model="form.offWorkDate"
type="date"
/>
<Field
label="下班打卡前时间段,单位分钟"
prop="offWorkDateBefore"
v-model="form.offWorkDateBefore"
placeholder="请输入下班打卡前时间段,单位分钟"
/>
<Field
label="下班打卡前时间段,单位分钟"
prop="offWorkDateAfter"
v-model="form.offWorkDateAfter"
placeholder="请输入下班打卡前时间段,单位分钟"
/>
<Field
label="备注"
prop="remark"
v-model="form.remark"
type="textarea"
placeholder="请输入备注"
/>
</el-row> </el-row>
<form-buttons @submit='submitForm' noCancelBtn /> <form-buttons @submit="submitForm" noCancelBtn />
</el-form> </el-form>
</el-drawer> </el-drawer>
</template> </template>
<script> <script>
import form from "@/assets/mixins/formdialog"; import form from "@/assets/mixins/formdialog";
export default { export default {
name: "AttendanceClassDetailDetail", name: "AttendanceClassDetailDetail",
mixins: [form], mixins: [form],
components: { components: {},
},
created() { created() {
this.changePath("attendance/class/detail") this.changePath("attendance/class/detail");
}, },
data() { data() {
return { return {
...@@ -44,47 +87,41 @@ ...@@ -44,47 +87,41 @@
title: "考勤班次详细信息", title: "考勤班次详细信息",
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
direction:"rtl", direction: "rtl",
toString:[ toString: [],
], toDate: ["goWorkDate", "offWorkDate"],
toDate:[
"goWorkDate",
"offWorkDate",
],
// 表单校验 // 表单校验
rules: { rules: {
createTime: [ createTime: [{ required: true, message: "请选择创建时间" }],
{required: true,message: "请选择创建时间" }, },
],
}
}; };
}, },
methods: { methods: {
/** 编辑 */ /** 编辑 */
edit(row) { edit(row) {
this.reset() this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl ="attendance/class/detail/edit"; this.urls.currUrl = "attendance/class/detail/edit";
this.getData(); this.getData();
this.pageInfo.type="edit" this.pageInfo.type = "edit";
this.title = "修改考勤班次详细信息"; this.title = "修改考勤班次详细信息";
}, },
/** 新增 */ /** 新增 */
add(row) { add(row) {
this.reset() this.reset();
this.urls.currUrl = "attendance/class/detail/add"; this.urls.currUrl = "attendance/class/detail/add";
this.getData(); this.getData();
this.pageInfo.type="add" this.pageInfo.type = "add";
this.title = "新增考勤班次详细信息"; this.title = "新增考勤班次详细信息";
}, },
/** 查看*/ /** 查看*/
view(row) { view(row) {
this.reset() this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl ="attendance/class/detail/view"; this.urls.currUrl = "attendance/class/detail/view";
this.getData(); this.getData();
this.pageInfo.type="view" this.pageInfo.type = "view";
this.title = "考勤班次详细信息详细"; this.title = "考勤班次详细信息详细";
}, },
/**取消按钮 */ /**取消按钮 */
...@@ -104,15 +141,15 @@ ...@@ -104,15 +141,15 @@
// 表单重置 // 表单重置
reset() { reset() {
this.form = { this.form = {
shiftsId : null, shiftsId: null,
shiftsName : "", shiftsName: "",
goWorkDate : null, goWorkDate: null,
goWorkDateBefore : null, goWorkDateBefore: null,
goWorkDateAfter : null, goWorkDateAfter: null,
offWorkDate : null, offWorkDate: null,
offWorkDateBefore : null, offWorkDateBefore: null,
offWorkDateAfter : null, offWorkDateAfter: null,
remark : "", remark: "",
}; };
this.resetForm("form"); this.resetForm("form");
}, },
...@@ -122,5 +159,5 @@ ...@@ -122,5 +159,5 @@
} }
}, },
}, },
}; };
</script> </script>
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<Field label="班次负责人" prop="classResponsiblePersonId" type="select" :enumData="dict.workManId" <Field label="班次负责人" prop="classResponsiblePersonId" type="select" :enumData="dict.workManId"
v-model="form.classResponsiblePersonId" placeholder="请选择班次负责人"/> v-model="form.classResponsiblePersonId" placeholder="请选择班次负责人"/>
</el-row> </el-row>
<el-form-item label="上下班时间" prop="attendanceClassDetailList"> <el-form-item label="上下班考勤时间" prop="attendanceClassDetailList">
<el-button type="text" @click="handleAddAttendanceClassDetail">添加</el-button> <el-button type="text" @click="handleAddAttendanceClassDetail">添加</el-button>
<div class="bancifor" v-for="(item,index) in attendanceClassDetailList" :key="index"> <div class="bancifor" v-for="(item,index) in attendanceClassDetailList" :key="index">
<div class="title flex flex-align-center flex-pack-justify"> <div class="title flex flex-align-center flex-pack-justify">
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<el-button type="danger" size="mini" @click="handleDeleteAttendanceClassDetail(index)">删除</el-button> <el-button type="danger" size="mini" @click="handleDeleteAttendanceClassDetail(index)">删除</el-button>
</div> </div>
<div> <div>
<span>上班时间</span> <span>上班考勤时间</span>
<el-time-picker <el-time-picker
size="mini" size="mini"
style="width:150px" style="width:150px"
...@@ -25,12 +25,12 @@ ...@@ -25,12 +25,12 @@
value-format="HH:mm" value-format="HH:mm"
format="HH:mm" format="HH:mm"
v-model="item.goWorkDate" v-model="item.goWorkDate"
placeholder="上班时间"> placeholder="上班考勤时间">
</el-time-picker> </el-time-picker>
</div> </div>
<div> <div>
<span>打开时段: </span> <span>打开时段: </span>
<span>上班前</span> <span>上班前签到</span>
<el-time-picker <el-time-picker
size="mini" size="mini"
style="width:150px" style="width:150px"
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
placeholder="未设置"> placeholder="未设置">
</el-time-picker> </el-time-picker>
<span class="ml20">——</span> <span class="ml20">——</span>
<span class="ml20">上班后</span> <span class="ml20">上班后签到</span>
<el-time-picker <el-time-picker
size="mini" size="mini"
style="width:150px" style="width:150px"
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
</el-time-picker> </el-time-picker>
</div> </div>
<div> <div>
<span>下班时间</span> <span>下班考勤时间</span>
<el-time-picker <el-time-picker
size="mini" size="mini"
style="width:150px" style="width:150px"
...@@ -61,12 +61,12 @@ ...@@ -61,12 +61,12 @@
format="HH:mm" format="HH:mm"
value-format="HH:mm" value-format="HH:mm"
v-model="item.offWorkDate" v-model="item.offWorkDate"
placeholder="下班时间"> placeholder="下班考勤时间">
</el-time-picker> </el-time-picker>
</div> </div>
<div> <div>
<span>打开时段:</span> <span>打开时段:</span>
<span>下班前</span> <span>下班前签退</span>
<el-time-picker <el-time-picker
size="mini" size="mini"
style="width:150px" style="width:150px"
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
placeholder="未设置"> placeholder="未设置">
</el-time-picker> </el-time-picker>
<span class="ml20">——</span> <span class="ml20">——</span>
<span class="ml20">下班后</span> <span class="ml20">下班后签退</span>
<el-time-picker <el-time-picker
size="mini" size="mini"
style="width:150px" style="width:150px"
...@@ -189,40 +189,40 @@ ...@@ -189,40 +189,40 @@
this.attendanceClassDetailList.push(obj); this.attendanceClassDetailList.push(obj);
}, },
// 判断添加上下班时间 // 判断添加上下班考勤时间
judgeStatus(arr,index){ judgeStatus(arr,index){
console.log(arr,index,'ces') console.log(arr,index,'ces')
let status = true let status = true
if(arr.length == 0){ if(arr.length == 0){
}else{ }else{
if(arr[index].goWorkDate === ''){ if(arr[index].goWorkDate === ''){
this.$message.error('请选择上班时间') this.$message.error('请选择上班考勤时间')
status = false status = false
return return
} }
if(arr[index].goWorkDateBefore === ''){ if(arr[index].goWorkDateBefore === ''){
this.$message.error('请选择允许上班前打卡时间') this.$message.error('请选择允许上班前签到打卡时间')
status = false status = false
return return
} }
if(arr[index].goWorkDateAfter === ''){ if(arr[index].goWorkDateAfter === ''){
this.$message.error('请选择允许上班后打卡时间') this.$message.error('请选择允许上班后签到打卡时间')
status = false status = false
return return
} }
if(arr[index].offWorkDate === ''){ if(arr[index].offWorkDate === ''){
this.$message.error('请选择下班时间') this.$message.error('请选择下班考勤时间')
status = false status = false
return return
} }
if(arr[index].offWorkDateBefore === ''){ if(arr[index].offWorkDateBefore === ''){
this.$message.error('请选择允许下班前打卡时间') this.$message.error('请选择允许下班前签退打卡时间')
status = false status = false
return return
} }
if(arr[index].offWorkDateAfter === ''){ if(arr[index].offWorkDateAfter === ''){
this.$message.error('请选择允许下班后打卡时间') this.$message.error('请选择允许下班后签退打卡时间')
status = false status = false
return return
} }
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
transFormMinut(arr[index].goWorkDateBefore) transFormMinut(arr[index].goWorkDateBefore)
if(currentwokeTime <= lastoffTime){ if(currentwokeTime <= lastoffTime){
this.$message.error(`第${index}上班时间需大于第${index-1}上班时间`) this.$message.error(`第${index}上班考勤时间需大于第${index-1}上班考勤时间`)
status = false status = false
return return
} }
......
...@@ -4,62 +4,133 @@ ...@@ -4,62 +4,133 @@
:title="title" :title="title"
:visible.sync="open" :visible.sync="open"
:direction="direction" :direction="direction"
size="50%"> size="50%"
>
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row> <el-row>
<Field label="班次名称" prop="className" v-model="form.className" placeholder="请输入班次名称"/> <Field
<Field label="班次负责人ID" prop="classResponsiblePersonId" v-model="form.classResponsiblePersonId" placeholder="请输入班次负责人ID"/> label="班次名称"
<Field label="班次负责人名称" prop="classResponsiblePersonName" v-model="form.classResponsiblePersonName" placeholder="请输入班次负责人名称"/> prop="className"
<Field label="备注" prop="remark" v-model="form.remark" type="textarea" placeholder="请输入备注"/> v-model="form.className"
placeholder="请输入班次名称"
/>
<Field
label="班次负责人ID"
prop="classResponsiblePersonId"
v-model="form.classResponsiblePersonId"
placeholder="请输入班次负责人ID"
/>
<Field
label="班次负责人名称"
prop="classResponsiblePersonName"
v-model="form.classResponsiblePersonName"
placeholder="请输入班次负责人名称"
/>
<Field
label="备注"
prop="remark"
v-model="form.remark"
type="textarea"
placeholder="请输入备注"
/>
</el-row> </el-row>
<el-divider content-position="center">考勤班次详细信息信息</el-divider> <el-divider content-position="center">考勤班次详细信息信息</el-divider>
<br/> <br />
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddAttendanceClassDetail">添加</el-button> <el-button
type="primary"
icon="el-icon-plus"
size="mini"
@click="handleAddAttendanceClassDetail"
>添加</el-button
>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteAttendanceClassDetail">删除</el-button> <el-button
type="danger"
icon="el-icon-delete"
size="mini"
@click="handleDeleteAttendanceClassDetail"
>删除</el-button
>
</el-col> </el-col>
</el-row> </el-row>
<el-table :data="attendanceClassDetailList" :row-class-name="rowAttendanceClassDetailIndex" @selection-change="handleAttendanceClassDetailSelectionChange" ref="attendanceClassDetail"> <el-table
:data="attendanceClassDetailList"
:row-class-name="rowAttendanceClassDetailIndex"
@selection-change="handleAttendanceClassDetailSelectionChange"
ref="attendanceClassDetail"
>
<el-table-column type="selection" width="50" align="center" /> <el-table-column type="selection" width="50" align="center" />
<el-table-column label="序号" align="center" prop="index" width="50"/> <el-table-column label="序号" align="center" prop="index" width="50" />
<el-table-column label="班次名称" prop="shiftsName"> <el-table-column label="班次名称" prop="shiftsName">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.shiftsName" placeholder="请输入班次名称" /> <el-input
v-model="scope.row.shiftsName"
placeholder="请输入班次名称"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="上班打卡时间" prop="goWorkDate"> <el-table-column label="上班打卡时间" prop="goWorkDate">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.goWorkDate" placeholder="请输入上班打卡时间" /> <el-input
v-model="scope.row.goWorkDate"
placeholder="请输入上班打卡时间"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="上班打卡前时间段,单位分钟" prop="goWorkDateBefore"> <el-table-column
label="上班打卡前时间段,单位分钟"
prop="goWorkDateBefore"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.goWorkDateBefore" placeholder="请输入上班打卡前时间段,单位分钟" /> <el-input
v-model="scope.row.goWorkDateBefore"
placeholder="请输入上班打卡前时间段,单位分钟"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="上班打卡前时间段,单位分钟" prop="goWorkDateAfter"> <el-table-column
label="上班打卡前时间段,单位分钟"
prop="goWorkDateAfter"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.goWorkDateAfter" placeholder="请输入上班打卡前时间段,单位分钟" /> <el-input
v-model="scope.row.goWorkDateAfter"
placeholder="请输入上班打卡前时间段,单位分钟"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="下班打卡时间" prop="offWorkDate"> <el-table-column label="下班打卡时间" prop="offWorkDate">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.offWorkDate" placeholder="请输入下班打卡时间" /> <el-input
v-model="scope.row.offWorkDate"
placeholder="请输入下班打卡时间"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="下班打卡前时间段,单位分钟" prop="offWorkDateBefore"> <el-table-column
label="下班打卡前时间段,单位分钟"
prop="offWorkDateBefore"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.offWorkDateBefore" placeholder="请输入下班打卡前时间段,单位分钟" /> <el-input
v-model="scope.row.offWorkDateBefore"
placeholder="请输入下班打卡前时间段,单位分钟"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="下班打卡前时间段,单位分钟" prop="offWorkDateAfter"> <el-table-column
label="下班打卡前时间段,单位分钟"
prop="offWorkDateAfter"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.offWorkDateAfter" placeholder="请输入下班打卡前时间段,单位分钟" /> <el-input
v-model="scope.row.offWorkDateAfter"
placeholder="请输入下班打卡前时间段,单位分钟"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" prop="remark"> <el-table-column label="备注" prop="remark">
...@@ -69,42 +140,51 @@ ...@@ -69,42 +140,51 @@
</el-table-column> </el-table-column>
<el-table-column label="创建用户" prop="createUserId"> <el-table-column label="创建用户" prop="createUserId">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.createUserId" placeholder="请输入创建用户" /> <el-input
v-model="scope.row.createUserId"
placeholder="请输入创建用户"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" prop="createTime"> <el-table-column label="创建时间" prop="createTime">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.createTime" placeholder="请输入创建时间" /> <el-input
v-model="scope.row.createTime"
placeholder="请输入创建时间"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="更新用户" prop="updateUserId"> <el-table-column label="更新用户" prop="updateUserId">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.updateUserId" placeholder="请输入更新用户" /> <el-input
v-model="scope.row.updateUserId"
placeholder="请输入更新用户"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="更新时间" prop="updateTime"> <el-table-column label="更新时间" prop="updateTime">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.updateTime" placeholder="请输入更新时间" /> <el-input
v-model="scope.row.updateTime"
placeholder="请输入更新时间"
/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<form-buttons @submit='submitForm' noCancelBtn /> <form-buttons @submit="submitForm" noCancelBtn />
</el-form> </el-form>
</el-drawer> </el-drawer>
</template> </template>
<script> <script>
import form from "@/assets/mixins/formdialog"; import form from "@/assets/mixins/formdialog";
export default { export default {
name: "AttendanceClassDetail", name: "AttendanceClassDetail",
mixins: [form], mixins: [form],
components: { components: {},
},
created() { created() {
this.changePath("attendance/class") this.changePath("attendance/class");
}, },
data() { data() {
return { return {
...@@ -118,17 +198,13 @@ ...@@ -118,17 +198,13 @@
title: "考勤班次信息", title: "考勤班次信息",
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
direction:"rtl", direction: "rtl",
toString:[ toString: [],
], toDate: [],
toDate:[
],
// 表单校验 // 表单校验
rules: { rules: {
createTime: [ createTime: [{ required: true, message: "请选择创建时间" }],
{required: true,message: "请选择创建时间" }, },
],
}
}; };
}, },
...@@ -157,9 +233,14 @@ ...@@ -157,9 +233,14 @@
/** 考勤班次详细信息删除按钮操作 */ /** 考勤班次详细信息删除按钮操作 */
handleDeleteAttendanceClassDetail() { handleDeleteAttendanceClassDetail() {
if (this.checkedAttendanceClassDetail.length == 0) { if (this.checkedAttendanceClassDetail.length == 0) {
this.$alert("请先选择要删除的考勤班次详细信息数据", "提示", { confirmButtonText: "确定", }); this.$alert("请先选择要删除的考勤班次详细信息数据", "提示", {
confirmButtonText: "确定",
});
} else { } else {
this.attendanceClassDetailList.splice(this.checkedAttendanceClassDetail[0].index - 1, 1); this.attendanceClassDetailList.splice(
this.checkedAttendanceClassDetail[0].index - 1,
1
);
} }
}, },
/** 单选框选中数据 */ /** 单选框选中数据 */
...@@ -173,35 +254,35 @@ ...@@ -173,35 +254,35 @@
}, },
// 渲染前置处理 // 渲染前置处理
beforeRender(data) { beforeRender(data) {
if(data.entity.attendanceClassDetailList) { if (data.entity.attendanceClassDetailList) {
this.attendanceClassDetailList = data.entity.attendanceClassDetailList; this.attendanceClassDetailList = data.entity.attendanceClassDetailList;
} }
return data return data;
}, },
/** 编辑 */ /** 编辑 */
edit(row) { edit(row) {
this.reset() this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl ="attendance/class/edit"; this.urls.currUrl = "attendance/class/edit";
this.getData(); this.getData();
this.pageInfo.type="edit" this.pageInfo.type = "edit";
this.title = "修改考勤班次信息"; this.title = "修改考勤班次信息";
}, },
/** 新增 */ /** 新增 */
add(row) { add(row) {
this.reset() this.reset();
this.urls.currUrl = "attendance/class/add"; this.urls.currUrl = "attendance/class/add";
this.getData(); this.getData();
this.pageInfo.type="add" this.pageInfo.type = "add";
this.title = "新增考勤班次信息"; this.title = "新增考勤班次信息";
}, },
/** 查看*/ /** 查看*/
view(row) { view(row) {
this.reset() this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl ="attendance/class/view"; this.urls.currUrl = "attendance/class/view";
this.getData(); this.getData();
this.pageInfo.type="view" this.pageInfo.type = "view";
this.title = "考勤班次信息详细"; this.title = "考勤班次信息详细";
}, },
/**取消按钮 */ /**取消按钮 */
...@@ -221,10 +302,10 @@ ...@@ -221,10 +302,10 @@
// 表单重置 // 表单重置
reset() { reset() {
this.form = { this.form = {
className : "", className: "",
classResponsiblePersonId : null, classResponsiblePersonId: null,
classResponsiblePersonName : "", classResponsiblePersonName: "",
remark : "", remark: "",
}; };
this.resetForm("form"); this.resetForm("form");
}, },
...@@ -234,5 +315,5 @@ ...@@ -234,5 +315,5 @@
} }
}, },
}, },
}; };
</script> </script>
...@@ -120,13 +120,15 @@ export default { ...@@ -120,13 +120,15 @@ export default {
// {label: "审批负责人Id", prop: "approverId", formatter: this.formatter}, // {label: "审批负责人Id", prop: "approverId", formatter: this.formatter},
/* {label: "处理状态", prop: "processStatus", formatter: this.formatter},*/
{label: "状态", prop: "auditResult", formatter: this.formatter},
{label: "审批负责人", prop: "approver"}, {label: "审批负责人", prop: "approver"},
{label: "处理状态", prop: "processStatus", formatter: this.formatter}, {label: "创建用户", prop: "createUserId", formatter: this.formatter},
{label: "审核状态", prop: "auditResult", formatter: this.formatter}, {label: "创建时间", prop: "createTime", formatter: this.formatterDate},
{label: "创建用户", prop: "createUserId", formatter: this.formatter},
{ {
label: "操作", label: "操作",
width: 240, width: 240,
......
...@@ -413,13 +413,20 @@ export default { ...@@ -413,13 +413,20 @@ export default {
name: "staffName", name: "staffName",
type: "text", type: "text",
label: "员工姓名", label: "员工姓名",
fuzzy: false, fuzzy: true,
},
{
name: "workNum",
type: "text",
label: "员工工号",
fuzzy: true,
}, },
{ {
name: "phone", name: "phone",
type: "text", type: "text",
label: "手机号", label: "手机号",
fuzzy: false, fuzzy: true,
}, },
{ {
name: "deptId", name: "deptId",
......
...@@ -195,13 +195,13 @@ ...@@ -195,13 +195,13 @@
name: "staffName", name: "staffName",
type: "text", type: "text",
label: "员工姓名", label: "员工姓名",
fuzzy: false fuzzy: true
}, },
{ {
name: "phoneNumber", name: "phoneNumber",
type: "text", type: "text",
label: "手机号", label: "手机号",
fuzzy: false fuzzy: true
} }
], ],
columns: [ columns: [
...@@ -212,6 +212,11 @@ ...@@ -212,6 +212,11 @@
{label: "员工姓名", prop: "staffName",fixed:'left',width:100}, {label: "员工姓名", prop: "staffName",fixed:'left',width:100},
{label:"部门",prop:"deptName"}, {label:"部门",prop:"deptName"},
{label: "出勤天数", prop: "goTimes",formatter: this.formatter},
{label: "上午缺卡次数", prop: "morningTimes",formatter: this.formatter},
{label: "下午缺卡次数", prop: "afternoonTimes",formatter: this.formatter},
{label: "回单位(天)", prop: "backToUnit"}, {label: "回单位(天)", prop: "backToUnit"},
{label: "因公请假(天)", prop: "onDutyLeave"}, {label: "因公请假(天)", prop: "onDutyLeave"},
......
...@@ -712,7 +712,7 @@ export default { ...@@ -712,7 +712,7 @@ export default {
indicator: names.map((v) => { indicator: names.map((v) => {
return { return {
name: v, name: v,
max: 150, max: Math.max(...[...add, ...sub]),
}; };
}), }),
center: ["45%", "50%"], center: ["45%", "50%"],
...@@ -734,10 +734,10 @@ export default { ...@@ -734,10 +734,10 @@ export default {
value: add, value: add,
name: "加分", name: "加分",
symbol: "rect", symbol: "rect",
symbolSize: 12, // symbolSize: 12,
areaStyle: { color: "#56A3F1" }, //雷达覆盖区域背景颜色 areaStyle: { color: "#56A3F1" }, //雷达覆盖区域背景颜色
label: { label: {
show: true, show: false,
formatter: function (params) { formatter: function (params) {
return params.value; return params.value;
}, },
......
...@@ -95,7 +95,6 @@ export default { ...@@ -95,7 +95,6 @@ export default {
data() { data() {
return { return {
switchValue: "0", switchValue: "0",
searchValue: "", searchValue: "",
index: -1, index: -1,
dataArr: [], dataArr: [],
...@@ -227,7 +226,7 @@ export default { ...@@ -227,7 +226,7 @@ export default {
type: this.activeName, type: this.activeName,
page: this.query.page, page: this.query.page,
orderColList: this.typeArr, orderColList: this.typeArr,
name: this.searchValue, name: `%${this.searchValue}%`,
}).then((res) => { }).then((res) => {
if (res.code == 1) { if (res.code == 1) {
this.tableData = res.data; this.tableData = res.data;
......
...@@ -188,6 +188,8 @@ public class PerformApiController extends AbstractBaseController<PerformReq> { ...@@ -188,6 +188,8 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
List<PerformInfo> collect = allCheckRecord.stream().map(item -> { List<PerformInfo> collect = allCheckRecord.stream().map(item -> {
PerformInfo performInfo = new PerformInfo(); PerformInfo performInfo = new PerformInfo();
BeanUtils.copyProperties(item, performInfo, BeanUtil.getNullPropertyNames(item)); BeanUtils.copyProperties(item, performInfo, BeanUtil.getNullPropertyNames(item));
PerformAttendAppealEntity entity = appealService.selectOne(new PerformAttendAppealQuery().checkRecordId(item.getRecordId()));
updateAppealResult(performInfo, entity);
return performInfo; return performInfo;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
model.put(KEY_RESULT_DATA, collect); model.put(KEY_RESULT_DATA, collect);
......
package com.mortals.xhx.module.attendance.model; package com.mortals.xhx.module.attendance.model;
import java.math.BigDecimal;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel; import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.attendance.model.vo.AttendanceStatVo; import com.mortals.xhx.module.attendance.model.vo.AttendanceStatVo;
import lombok.Data;
import java.math.BigDecimal;
/** /**
* 考勤汇总信息实体对象 * 考勤汇总信息实体对象
* *
* @author zxfei * @author zxfei
* @date 2023-04-14 * @date 2023-07-18
*/ */
@Data
public class AttendanceStatEntity extends AttendanceStatVo { public class AttendanceStatEntity extends AttendanceStatVo {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -211,588 +214,22 @@ public class AttendanceStatEntity extends AttendanceStatVo { ...@@ -211,588 +214,22 @@ public class AttendanceStatEntity extends AttendanceStatVo {
*/ */
@Excel(name = "陪产假") @Excel(name = "陪产假")
private BigDecimal paternityLeaveDays; private BigDecimal paternityLeaveDays;
public AttendanceStatEntity(){}
/**
* 获取 窗口类别
* @return String
*/
public String getWindowCategory(){
return windowCategory;
}
/**
* 设置 窗口类别
* @param windowCategory
*/
public void setWindowCategory(String windowCategory){
this.windowCategory = windowCategory;
}
/**
* 获取 员工ID
* @return Long
*/
public Long getStaffId(){
return staffId;
}
/**
* 设置 员工ID
* @param staffId
*/
public void setStaffId(Long staffId){
this.staffId = staffId;
}
/**
* 获取 员工姓名
* @return String
*/
public String getStaffName(){
return staffName;
}
/**
* 设置 员工姓名
* @param staffName
*/
public void setStaffName(String staffName){
this.staffName = staffName;
}
/**
* 获取 所属部门
* @return Long
*/
public Long getDeptId(){
return deptId;
}
/**
* 设置 所属部门
* @param deptId
*/
public void setDeptId(Long deptId){
this.deptId = deptId;
}
/**
* 获取 所属部门名称
* @return String
*/
public String getDeptName(){
return deptName;
}
/**
* 设置 所属部门名称
* @param deptName
*/
public void setDeptName(String deptName){
this.deptName = deptName;
}
/**
* 获取 回单位(天)
* @return BigDecimal
*/
public BigDecimal getBackToUnit(){
return backToUnit;
}
/**
* 设置 回单位(天)
* @param backToUnit
*/
public void setBackToUnit(BigDecimal backToUnit){
this.backToUnit = backToUnit;
}
/**
* 获取 因公请假(天)
* @return BigDecimal
*/
public BigDecimal getOnDutyLeave(){
return onDutyLeave;
}
/**
* 设置 因公请假(天)
* @param onDutyLeave
*/
public void setOnDutyLeave(BigDecimal onDutyLeave){
this.onDutyLeave = onDutyLeave;
}
/**
* 获取 外出勘验(天)
* @return BigDecimal
*/
public BigDecimal getOutOfOffice(){
return outOfOffice;
}
/**
* 设置 外出勘验(天)
* @param outOfOffice
*/
public void setOutOfOffice(BigDecimal outOfOffice){
this.outOfOffice = outOfOffice;
}
/**
* 获取 值班补班(天)
* @return BigDecimal
*/
public BigDecimal getShiftCompensation(){
return shiftCompensation;
}
/**
* 设置 值班补班(天)
* @param shiftCompensation
*/
public void setShiftCompensation(BigDecimal shiftCompensation){
this.shiftCompensation = shiftCompensation;
}
/**
* 获取 体检(天)
* @return BigDecimal
*/
public BigDecimal getPhysicalExamination(){
return physicalExamination;
}
/**
* 设置 体检(天)
* @param physicalExamination
*/
public void setPhysicalExamination(BigDecimal physicalExamination){
this.physicalExamination = physicalExamination;
}
/**
* 获取 隔离(天)
* @return BigDecimal
*/
public BigDecimal getQuarantine(){
return quarantine;
}
/**
* 设置 隔离(天)
* @param quarantine
*/
public void setQuarantine(BigDecimal quarantine){
this.quarantine = quarantine;
}
/**
* 获取 因公外出(与窗口工作无关/天)
* @return BigDecimal
*/
public BigDecimal getBusinessTrip(){
return businessTrip;
}
/**
* 设置 因公外出(与窗口工作无关/天)
* @param businessTrip
*/
public void setBusinessTrip(BigDecimal businessTrip){
this.businessTrip = businessTrip;
}
/**
* 获取 公休(天)
* @return BigDecimal
*/
public BigDecimal getPublicHoliday(){
return publicHoliday;
}
/**
* 设置 公休(天)
* @param publicHoliday
*/
public void setPublicHoliday(BigDecimal publicHoliday){
this.publicHoliday = publicHoliday;
}
/**
* 获取 病假(天)
* @return BigDecimal
*/
public BigDecimal getSickLeave(){
return sickLeave;
}
/**
* 设置 病假(天)
* @param sickLeave
*/
public void setSickLeave(BigDecimal sickLeave){
this.sickLeave = sickLeave;
}
/**
* 获取 丧假(天)
* @return BigDecimal
*/
public BigDecimal getFuneralLeave(){
return funeralLeave;
}
/**
* 设置 丧假(天)
* @param funeralLeave
*/
public void setFuneralLeave(BigDecimal funeralLeave){
this.funeralLeave = funeralLeave;
}
/**
* 获取 婚假(天)
* @return BigDecimal
*/
public BigDecimal getMarriageLeave(){
return marriageLeave;
}
/**
* 设置 婚假(天)
* @param marriageLeave
*/
public void setMarriageLeave(BigDecimal marriageLeave){
this.marriageLeave = marriageLeave;
}
/**
* 获取 育儿假(天)
* @return BigDecimal
*/
public BigDecimal getChildRearingLeave(){
return childRearingLeave;
}
/**
* 设置 育儿假(天)
* @param childRearingLeave
*/
public void setChildRearingLeave(BigDecimal childRearingLeave){
this.childRearingLeave = childRearingLeave;
}
/**
* 获取 产假(天))
* @return BigDecimal
*/
public BigDecimal getMaternityLeave(){
return maternityLeave;
}
/**
* 设置 产假(天))
* @param maternityLeave
*/
public void setMaternityLeave(BigDecimal maternityLeave){
this.maternityLeave = maternityLeave;
}
/**
* 获取 调回单位(或离职/天)
* @return BigDecimal
*/
public BigDecimal getTransferBack(){
return transferBack;
}
/**
* 设置 调回单位(或离职/天)
* @param transferBack
*/
public void setTransferBack(BigDecimal transferBack){
this.transferBack = transferBack;
}
/**
* 获取 探亲假(天)
* @return BigDecimal
*/
public BigDecimal getHomeLeave(){
return homeLeave;
}
/**
* 设置 探亲假(天)
* @param homeLeave
*/
public void setHomeLeave(BigDecimal homeLeave){
this.homeLeave = homeLeave;
}
/** /**
* 获取 事假(天) * 手机号码
* @return BigDecimal
*/ */
public BigDecimal getPersonalLeave(){ private String phoneNumer;
return personalLeave;
}
/**
* 设置 事假(天)
* @param personalLeave
*/
public void setPersonalLeave(BigDecimal personalLeave){
this.personalLeave = personalLeave;
}
/**
* 获取 考勤汇总-旷工(天)
* @return BigDecimal
*/
public BigDecimal getAbsenteeismDays(){
return absenteeismDays;
}
/**
* 设置 考勤汇总-旷工(天)
* @param absenteeismDays
*/
public void setAbsenteeismDays(BigDecimal absenteeismDays){
this.absenteeismDays = absenteeismDays;
}
/**
* 获取 考勤汇总-其他(天)
* @return BigDecimal
*/
public BigDecimal getOtherDays(){
return otherDays;
}
/**
* 设置 考勤汇总-其他(天)
* @param otherDays
*/
public void setOtherDays(BigDecimal otherDays){
this.otherDays = otherDays;
}
/**
* 获取 考勤汇总-出勤率(%)
* @return BigDecimal
*/
public BigDecimal getAttendanceRate(){
return attendanceRate;
}
/**
* 设置 考勤汇总-出勤率(%)
* @param attendanceRate
*/
public void setAttendanceRate(BigDecimal attendanceRate){
this.attendanceRate = attendanceRate;
}
/**
* 获取 考勤汇总-未按规定打卡(含忘记打卡)
* @return BigDecimal
*/
public BigDecimal getNonCompliancePunch(){
return nonCompliancePunch;
}
/**
* 设置 考勤汇总-未按规定打卡(含忘记打卡)
* @param nonCompliancePunch
*/
public void setNonCompliancePunch(BigDecimal nonCompliancePunch){
this.nonCompliancePunch = nonCompliancePunch;
}
/**
* 获取 考勤汇总-迟到(次)
* @return Integer
*/
public Integer getLateTimes(){
return lateTimes;
}
/**
* 设置 考勤汇总-迟到(次)
* @param lateTimes
*/
public void setLateTimes(Integer lateTimes){
this.lateTimes = lateTimes;
}
/**
* 获取 考勤汇总-上网耍手机(次)
* @return Integer
*/
public Integer getSurfingMobileTimes(){
return surfingMobileTimes;
}
/**
* 设置 考勤汇总-上网耍手机(次)
* @param surfingMobileTimes
*/
public void setSurfingMobileTimes(Integer surfingMobileTimes){
this.surfingMobileTimes = surfingMobileTimes;
}
/**
* 获取 考勤汇总-溜班(次)
* @return Integer
*/
public Integer getOvertimeTimes(){
return overtimeTimes;
}
/**
* 设置 考勤汇总-溜班(次)
* @param overtimeTimes
*/
public void setOvertimeTimes(Integer overtimeTimes){
this.overtimeTimes = overtimeTimes;
}
/**
* 获取 考勤汇总-空岗
* @return BigDecimal
*/
public BigDecimal getVacancy(){
return vacancy;
}
/**
* 设置 考勤汇总-空岗
* @param vacancy
*/
public void setVacancy(BigDecimal vacancy){
this.vacancy = vacancy;
}
/**
* 获取 考勤汇总-未规范着装(次)
* @return Integer
*/
public Integer getNonStandardDressTimes(){
return nonStandardDressTimes;
}
/**
* 设置 考勤汇总-未规范着装(次)
* @param nonStandardDressTimes
*/
public void setNonStandardDressTimes(Integer nonStandardDressTimes){
this.nonStandardDressTimes = nonStandardDressTimes;
}
/**
* 获取 考勤汇总-无故缺席会议
* @return BigDecimal
*/
public BigDecimal getUnexcusedMeetingAbsence(){
return unexcusedMeetingAbsence;
}
/**
* 设置 考勤汇总-无故缺席会议
* @param unexcusedMeetingAbsence
*/
public void setUnexcusedMeetingAbsence(BigDecimal unexcusedMeetingAbsence){
this.unexcusedMeetingAbsence = unexcusedMeetingAbsence;
}
/** /**
* 获取 考勤汇总-会议早退 * 出勤天数
* @return BigDecimal
*/ */
public BigDecimal getEarlyLeaveMeeting(){ private Integer goTimes;
return earlyLeaveMeeting;
}
/**
* 设置 考勤汇总-会议早退
* @param earlyLeaveMeeting
*/
public void setEarlyLeaveMeeting(BigDecimal earlyLeaveMeeting){
this.earlyLeaveMeeting = earlyLeaveMeeting;
}
/**
* 获取 年
* @return Integer
*/
public Integer getYear(){
return year;
}
/**
* 设置 年
* @param year
*/
public void setYear(Integer year){
this.year = year;
}
/**
* 获取 月
* @return Integer
*/
public Integer getMonth(){
return month;
}
/**
* 设置 月
* @param month
*/
public void setMonth(Integer month){
this.month = month;
}
/**
* 获取 日
* @return Integer
*/
public Integer getDay(){
return day;
}
/**
* 设置 日
* @param day
*/
public void setDay(Integer day){
this.day = day;
}
/**
* 获取 备注
* @return String
*/
public String getRemark(){
return remark;
}
/**
* 设置 备注
* @param remark
*/
public void setRemark(String remark){
this.remark = remark;
}
/**
* 获取 哺乳假(天)
* @return BigDecimal
*/
public BigDecimal getBreastfeedingLeaveDays(){
return breastfeedingLeaveDays;
}
/**
* 设置 哺乳假(天)
* @param breastfeedingLeaveDays
*/
public void setBreastfeedingLeaveDays(BigDecimal breastfeedingLeaveDays){
this.breastfeedingLeaveDays = breastfeedingLeaveDays;
}
/**
* 获取 例假(天)
* @return BigDecimal
*/
public BigDecimal getMenstrualLeaveDays(){
return menstrualLeaveDays;
}
/**
* 设置 例假(天)
* @param menstrualLeaveDays
*/
public void setMenstrualLeaveDays(BigDecimal menstrualLeaveDays){
this.menstrualLeaveDays = menstrualLeaveDays;
}
/**
* 获取 年假(天)
* @return BigDecimal
*/
public BigDecimal getAnnualLeaveDays(){
return annualLeaveDays;
}
/**
* 设置 年假(天)
* @param annualLeaveDays
*/
public void setAnnualLeaveDays(BigDecimal annualLeaveDays){
this.annualLeaveDays = annualLeaveDays;
}
/**
* 获取 调休(天)
* @return BigDecimal
*/
public BigDecimal getCompensatedLeaveDays(){
return compensatedLeaveDays;
}
/**
* 设置 调休(天)
* @param compensatedLeaveDays
*/
public void setCompensatedLeaveDays(BigDecimal compensatedLeaveDays){
this.compensatedLeaveDays = compensatedLeaveDays;
}
/** /**
* 获取 陪产假(天) * 上午缺卡次数
* @return BigDecimal
*/ */
public BigDecimal getPaternityLeaveDays(){ private Integer morningTimes;
return paternityLeaveDays;
}
/** /**
* 设置 陪产假(天) * 下午缺卡次数
* @param paternityLeaveDays
*/ */
public void setPaternityLeaveDays(BigDecimal paternityLeaveDays){ private Integer afternoonTimes;
this.paternityLeaveDays = paternityLeaveDays;
}
@Override @Override
public int hashCode() { public int hashCode() {
return this.getId().hashCode(); return this.getId().hashCode();
...@@ -809,61 +246,15 @@ public class AttendanceStatEntity extends AttendanceStatVo { ...@@ -809,61 +246,15 @@ public class AttendanceStatEntity extends AttendanceStatVo {
return false; return false;
} }
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",windowCategory:").append(getWindowCategory());
sb.append(",staffId:").append(getStaffId());
sb.append(",staffName:").append(getStaffName());
sb.append(",deptId:").append(getDeptId());
sb.append(",deptName:").append(getDeptName());
sb.append(",backToUnit:").append(getBackToUnit());
sb.append(",onDutyLeave:").append(getOnDutyLeave());
sb.append(",outOfOffice:").append(getOutOfOffice());
sb.append(",shiftCompensation:").append(getShiftCompensation());
sb.append(",physicalExamination:").append(getPhysicalExamination());
sb.append(",quarantine:").append(getQuarantine());
sb.append(",businessTrip:").append(getBusinessTrip());
sb.append(",publicHoliday:").append(getPublicHoliday());
sb.append(",sickLeave:").append(getSickLeave());
sb.append(",funeralLeave:").append(getFuneralLeave());
sb.append(",marriageLeave:").append(getMarriageLeave());
sb.append(",childRearingLeave:").append(getChildRearingLeave());
sb.append(",maternityLeave:").append(getMaternityLeave());
sb.append(",transferBack:").append(getTransferBack());
sb.append(",homeLeave:").append(getHomeLeave());
sb.append(",personalLeave:").append(getPersonalLeave());
sb.append(",absenteeismDays:").append(getAbsenteeismDays());
sb.append(",otherDays:").append(getOtherDays());
sb.append(",attendanceRate:").append(getAttendanceRate());
sb.append(",nonCompliancePunch:").append(getNonCompliancePunch());
sb.append(",lateTimes:").append(getLateTimes());
sb.append(",surfingMobileTimes:").append(getSurfingMobileTimes());
sb.append(",overtimeTimes:").append(getOvertimeTimes());
sb.append(",vacancy:").append(getVacancy());
sb.append(",nonStandardDressTimes:").append(getNonStandardDressTimes());
sb.append(",unexcusedMeetingAbsence:").append(getUnexcusedMeetingAbsence());
sb.append(",earlyLeaveMeeting:").append(getEarlyLeaveMeeting());
sb.append(",year:").append(getYear());
sb.append(",month:").append(getMonth());
sb.append(",day:").append(getDay());
sb.append(",remark:").append(getRemark());
sb.append(",breastfeedingLeaveDays:").append(getBreastfeedingLeaveDays());
sb.append(",menstrualLeaveDays:").append(getMenstrualLeaveDays());
sb.append(",annualLeaveDays:").append(getAnnualLeaveDays());
sb.append(",compensatedLeaveDays:").append(getCompensatedLeaveDays());
sb.append(",paternityLeaveDays:").append(getPaternityLeaveDays());
return sb.toString();
}
public void initAttrValue(){ public void initAttrValue(){
this.windowCategory = "考勤机打卡"; this.windowCategory = "";
this.staffId = null; this.staffId = -1L;
this.staffName = ""; this.staffName = "";
this.deptId = null; this.deptId = -1L;
this.deptName = ""; this.deptName = "";
...@@ -921,11 +312,11 @@ public class AttendanceStatEntity extends AttendanceStatVo { ...@@ -921,11 +312,11 @@ public class AttendanceStatEntity extends AttendanceStatVo {
this.earlyLeaveMeeting = BigDecimal.valueOf(0); this.earlyLeaveMeeting = BigDecimal.valueOf(0);
this.year = null; this.year = -1;
this.month = null; this.month = -1;
this.day = null; this.day = -1;
this.remark = ""; this.remark = "";
...@@ -938,5 +329,13 @@ public class AttendanceStatEntity extends AttendanceStatVo { ...@@ -938,5 +329,13 @@ public class AttendanceStatEntity extends AttendanceStatVo {
this.compensatedLeaveDays = BigDecimal.valueOf(0.0); this.compensatedLeaveDays = BigDecimal.valueOf(0.0);
this.paternityLeaveDays = BigDecimal.valueOf(0.0); this.paternityLeaveDays = BigDecimal.valueOf(0.0);
this.phoneNumer = "";
this.goTimes = -1;
this.morningTimes = -1;
this.afternoonTimes = -1;
} }
} }
\ No newline at end of file
...@@ -2,11 +2,12 @@ package com.mortals.xhx.module.attendance.model; ...@@ -2,11 +2,12 @@ package com.mortals.xhx.module.attendance.model;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.List; import java.util.List;
import com.mortals.xhx.module.attendance.model.AttendanceStatEntity;
/** /**
* 考勤汇总信息查询对象 * 考勤汇总信息查询对象
* *
* @author zxfei * @author zxfei
* @date 2023-04-14 * @date 2023-07-18
*/ */
public class AttendanceStatQuery extends AttendanceStatEntity { public class AttendanceStatQuery extends AttendanceStatEntity {
/** 开始 序号,主键,自增长 */ /** 开始 序号,主键,自增长 */
...@@ -641,6 +642,56 @@ public class AttendanceStatQuery extends AttendanceStatEntity { ...@@ -641,6 +642,56 @@ public class AttendanceStatQuery extends AttendanceStatEntity {
/** 陪产假(天)排除列表 */ /** 陪产假(天)排除列表 */
private List <BigDecimal> paternityLeaveDaysNotList; private List <BigDecimal> paternityLeaveDaysNotList;
/** 手机号码 */
private List<String> phoneNumerList;
/** 手机号码排除列表 */
private List <String> phoneNumerNotList;
/** 开始 出勤天数 */
private Integer goTimesStart;
/** 结束 出勤天数 */
private Integer goTimesEnd;
/** 增加 出勤天数 */
private Integer goTimesIncrement;
/** 出勤天数列表 */
private List <Integer> goTimesList;
/** 出勤天数排除列表 */
private List <Integer> goTimesNotList;
/** 开始 上午缺卡次数 */
private Integer morningTimesStart;
/** 结束 上午缺卡次数 */
private Integer morningTimesEnd;
/** 增加 上午缺卡次数 */
private Integer morningTimesIncrement;
/** 上午缺卡次数列表 */
private List <Integer> morningTimesList;
/** 上午缺卡次数排除列表 */
private List <Integer> morningTimesNotList;
/** 开始 下午缺卡次数 */
private Integer afternoonTimesStart;
/** 结束 下午缺卡次数 */
private Integer afternoonTimesEnd;
/** 增加 下午缺卡次数 */
private Integer afternoonTimesIncrement;
/** 下午缺卡次数列表 */
private List <Integer> afternoonTimesList;
/** 下午缺卡次数排除列表 */
private List <Integer> afternoonTimesNotList;
/** 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<AttendanceStatQuery> orConditionList; private List<AttendanceStatQuery> orConditionList;
...@@ -4081,6 +4132,281 @@ public class AttendanceStatQuery extends AttendanceStatEntity { ...@@ -4081,6 +4132,281 @@ public class AttendanceStatQuery extends AttendanceStatEntity {
} }
/**
* 获取 手机号码
* @return phoneNumerList
*/
public List<String> getPhoneNumerList(){
return this.phoneNumerList;
}
/**
* 设置 手机号码
* @param phoneNumerList
*/
public void setPhoneNumerList(List<String> phoneNumerList){
this.phoneNumerList = phoneNumerList;
}
/**
* 获取 手机号码
* @return phoneNumerNotList
*/
public List<String> getPhoneNumerNotList(){
return this.phoneNumerNotList;
}
/**
* 设置 手机号码
* @param phoneNumerNotList
*/
public void setPhoneNumerNotList(List<String> phoneNumerNotList){
this.phoneNumerNotList = phoneNumerNotList;
}
/**
* 获取 开始 出勤天数
* @return goTimesStart
*/
public Integer getGoTimesStart(){
return this.goTimesStart;
}
/**
* 设置 开始 出勤天数
* @param goTimesStart
*/
public void setGoTimesStart(Integer goTimesStart){
this.goTimesStart = goTimesStart;
}
/**
* 获取 结束 出勤天数
* @return $goTimesEnd
*/
public Integer getGoTimesEnd(){
return this.goTimesEnd;
}
/**
* 设置 结束 出勤天数
* @param goTimesEnd
*/
public void setGoTimesEnd(Integer goTimesEnd){
this.goTimesEnd = goTimesEnd;
}
/**
* 获取 增加 出勤天数
* @return goTimesIncrement
*/
public Integer getGoTimesIncrement(){
return this.goTimesIncrement;
}
/**
* 设置 增加 出勤天数
* @param goTimesIncrement
*/
public void setGoTimesIncrement(Integer goTimesIncrement){
this.goTimesIncrement = goTimesIncrement;
}
/**
* 获取 出勤天数
* @return goTimesList
*/
public List<Integer> getGoTimesList(){
return this.goTimesList;
}
/**
* 设置 出勤天数
* @param goTimesList
*/
public void setGoTimesList(List<Integer> goTimesList){
this.goTimesList = goTimesList;
}
/**
* 获取 出勤天数
* @return goTimesNotList
*/
public List<Integer> getGoTimesNotList(){
return this.goTimesNotList;
}
/**
* 设置 出勤天数
* @param goTimesNotList
*/
public void setGoTimesNotList(List<Integer> goTimesNotList){
this.goTimesNotList = goTimesNotList;
}
/**
* 获取 开始 上午缺卡次数
* @return morningTimesStart
*/
public Integer getMorningTimesStart(){
return this.morningTimesStart;
}
/**
* 设置 开始 上午缺卡次数
* @param morningTimesStart
*/
public void setMorningTimesStart(Integer morningTimesStart){
this.morningTimesStart = morningTimesStart;
}
/**
* 获取 结束 上午缺卡次数
* @return $morningTimesEnd
*/
public Integer getMorningTimesEnd(){
return this.morningTimesEnd;
}
/**
* 设置 结束 上午缺卡次数
* @param morningTimesEnd
*/
public void setMorningTimesEnd(Integer morningTimesEnd){
this.morningTimesEnd = morningTimesEnd;
}
/**
* 获取 增加 上午缺卡次数
* @return morningTimesIncrement
*/
public Integer getMorningTimesIncrement(){
return this.morningTimesIncrement;
}
/**
* 设置 增加 上午缺卡次数
* @param morningTimesIncrement
*/
public void setMorningTimesIncrement(Integer morningTimesIncrement){
this.morningTimesIncrement = morningTimesIncrement;
}
/**
* 获取 上午缺卡次数
* @return morningTimesList
*/
public List<Integer> getMorningTimesList(){
return this.morningTimesList;
}
/**
* 设置 上午缺卡次数
* @param morningTimesList
*/
public void setMorningTimesList(List<Integer> morningTimesList){
this.morningTimesList = morningTimesList;
}
/**
* 获取 上午缺卡次数
* @return morningTimesNotList
*/
public List<Integer> getMorningTimesNotList(){
return this.morningTimesNotList;
}
/**
* 设置 上午缺卡次数
* @param morningTimesNotList
*/
public void setMorningTimesNotList(List<Integer> morningTimesNotList){
this.morningTimesNotList = morningTimesNotList;
}
/**
* 获取 开始 下午缺卡次数
* @return afternoonTimesStart
*/
public Integer getAfternoonTimesStart(){
return this.afternoonTimesStart;
}
/**
* 设置 开始 下午缺卡次数
* @param afternoonTimesStart
*/
public void setAfternoonTimesStart(Integer afternoonTimesStart){
this.afternoonTimesStart = afternoonTimesStart;
}
/**
* 获取 结束 下午缺卡次数
* @return $afternoonTimesEnd
*/
public Integer getAfternoonTimesEnd(){
return this.afternoonTimesEnd;
}
/**
* 设置 结束 下午缺卡次数
* @param afternoonTimesEnd
*/
public void setAfternoonTimesEnd(Integer afternoonTimesEnd){
this.afternoonTimesEnd = afternoonTimesEnd;
}
/**
* 获取 增加 下午缺卡次数
* @return afternoonTimesIncrement
*/
public Integer getAfternoonTimesIncrement(){
return this.afternoonTimesIncrement;
}
/**
* 设置 增加 下午缺卡次数
* @param afternoonTimesIncrement
*/
public void setAfternoonTimesIncrement(Integer afternoonTimesIncrement){
this.afternoonTimesIncrement = afternoonTimesIncrement;
}
/**
* 获取 下午缺卡次数
* @return afternoonTimesList
*/
public List<Integer> getAfternoonTimesList(){
return this.afternoonTimesList;
}
/**
* 设置 下午缺卡次数
* @param afternoonTimesList
*/
public void setAfternoonTimesList(List<Integer> afternoonTimesList){
this.afternoonTimesList = afternoonTimesList;
}
/**
* 获取 下午缺卡次数
* @return afternoonTimesNotList
*/
public List<Integer> getAfternoonTimesNotList(){
return this.afternoonTimesNotList;
}
/**
* 设置 下午缺卡次数
* @param afternoonTimesNotList
*/
public void setAfternoonTimesNotList(List<Integer> afternoonTimesNotList){
this.afternoonTimesNotList = afternoonTimesNotList;
}
/** /**
* 设置 序号,主键,自增长 * 设置 序号,主键,自增长
* @param id * @param id
...@@ -6319,6 +6645,187 @@ public class AttendanceStatQuery extends AttendanceStatEntity { ...@@ -6319,6 +6645,187 @@ public class AttendanceStatQuery extends AttendanceStatEntity {
return this; return this;
} }
/**
* 设置 手机号码
* @param phoneNumer
*/
public AttendanceStatQuery phoneNumer(String phoneNumer){
setPhoneNumer(phoneNumer);
return this;
}
/**
* 设置 手机号码
* @param phoneNumerList
*/
public AttendanceStatQuery phoneNumerList(List<String> phoneNumerList){
this.phoneNumerList = phoneNumerList;
return this;
}
/**
* 设置 出勤天数
* @param goTimes
*/
public AttendanceStatQuery goTimes(Integer goTimes){
setGoTimes(goTimes);
return this;
}
/**
* 设置 开始 出勤天数
* @param goTimesStart
*/
public AttendanceStatQuery goTimesStart(Integer goTimesStart){
this.goTimesStart = goTimesStart;
return this;
}
/**
* 设置 结束 出勤天数
* @param goTimesEnd
*/
public AttendanceStatQuery goTimesEnd(Integer goTimesEnd){
this.goTimesEnd = goTimesEnd;
return this;
}
/**
* 设置 增加 出勤天数
* @param goTimesIncrement
*/
public AttendanceStatQuery goTimesIncrement(Integer goTimesIncrement){
this.goTimesIncrement = goTimesIncrement;
return this;
}
/**
* 设置 出勤天数
* @param goTimesList
*/
public AttendanceStatQuery goTimesList(List<Integer> goTimesList){
this.goTimesList = goTimesList;
return this;
}
/**
* 设置 出勤天数
* @param goTimesNotList
*/
public AttendanceStatQuery goTimesNotList(List<Integer> goTimesNotList){
this.goTimesNotList = goTimesNotList;
return this;
}
/**
* 设置 上午缺卡次数
* @param morningTimes
*/
public AttendanceStatQuery morningTimes(Integer morningTimes){
setMorningTimes(morningTimes);
return this;
}
/**
* 设置 开始 上午缺卡次数
* @param morningTimesStart
*/
public AttendanceStatQuery morningTimesStart(Integer morningTimesStart){
this.morningTimesStart = morningTimesStart;
return this;
}
/**
* 设置 结束 上午缺卡次数
* @param morningTimesEnd
*/
public AttendanceStatQuery morningTimesEnd(Integer morningTimesEnd){
this.morningTimesEnd = morningTimesEnd;
return this;
}
/**
* 设置 增加 上午缺卡次数
* @param morningTimesIncrement
*/
public AttendanceStatQuery morningTimesIncrement(Integer morningTimesIncrement){
this.morningTimesIncrement = morningTimesIncrement;
return this;
}
/**
* 设置 上午缺卡次数
* @param morningTimesList
*/
public AttendanceStatQuery morningTimesList(List<Integer> morningTimesList){
this.morningTimesList = morningTimesList;
return this;
}
/**
* 设置 上午缺卡次数
* @param morningTimesNotList
*/
public AttendanceStatQuery morningTimesNotList(List<Integer> morningTimesNotList){
this.morningTimesNotList = morningTimesNotList;
return this;
}
/**
* 设置 下午缺卡次数
* @param afternoonTimes
*/
public AttendanceStatQuery afternoonTimes(Integer afternoonTimes){
setAfternoonTimes(afternoonTimes);
return this;
}
/**
* 设置 开始 下午缺卡次数
* @param afternoonTimesStart
*/
public AttendanceStatQuery afternoonTimesStart(Integer afternoonTimesStart){
this.afternoonTimesStart = afternoonTimesStart;
return this;
}
/**
* 设置 结束 下午缺卡次数
* @param afternoonTimesEnd
*/
public AttendanceStatQuery afternoonTimesEnd(Integer afternoonTimesEnd){
this.afternoonTimesEnd = afternoonTimesEnd;
return this;
}
/**
* 设置 增加 下午缺卡次数
* @param afternoonTimesIncrement
*/
public AttendanceStatQuery afternoonTimesIncrement(Integer afternoonTimesIncrement){
this.afternoonTimesIncrement = afternoonTimesIncrement;
return this;
}
/**
* 设置 下午缺卡次数
* @param afternoonTimesList
*/
public AttendanceStatQuery afternoonTimesList(List<Integer> afternoonTimesList){
this.afternoonTimesList = afternoonTimesList;
return this;
}
/**
* 设置 下午缺卡次数
* @param afternoonTimesNotList
*/
public AttendanceStatQuery afternoonTimesNotList(List<Integer> afternoonTimesNotList){
this.afternoonTimesNotList = afternoonTimesNotList;
return this;
}
/** /**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) * 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList * @return orConditionList
......
package com.mortals.xhx.module.attendance.web; package com.mortals.xhx.module.attendance.web;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService; import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.GoWorkResultEnum; import com.mortals.xhx.common.code.GoWorkResultEnum;
...@@ -70,6 +71,13 @@ public class AttendanceRecordController extends BaseCRUDJsonBodyMappingControlle ...@@ -70,6 +71,13 @@ public class AttendanceRecordController extends BaseCRUDJsonBodyMappingControlle
if (query.getGroupId()!=null){ if (query.getGroupId()!=null){
query.setAttendanceGroupId(query.getGroupId()); query.setAttendanceGroupId(query.getGroupId());
} }
if (ObjectUtils.isEmpty(query.getOrderColList())) {
query.setOrderColList(Arrays.asList(new OrderCol("createTime", OrderCol.DESCENDING)));
} else {
query.getOrderColList().add(new OrderCol("createTime", OrderCol.DESCENDING));
}
super.doListBefore(query, model, context); super.doListBefore(query, model, context);
} }
......
...@@ -4,6 +4,7 @@ import cn.hutool.core.util.StrUtil; ...@@ -4,6 +4,7 @@ import cn.hutool.core.util.StrUtil;
import com.mortals.framework.common.Rest; import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.util.StringUtils; import com.mortals.framework.util.StringUtils;
import com.mortals.framework.utils.ServletUtils; import com.mortals.framework.utils.ServletUtils;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
...@@ -21,6 +22,7 @@ import com.mortals.xhx.module.staff.model.StaffQuery; ...@@ -21,6 +22,7 @@ import com.mortals.xhx.module.staff.model.StaffQuery;
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.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
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.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
...@@ -29,10 +31,8 @@ import org.springframework.web.multipart.MultipartFile; ...@@ -29,10 +31,8 @@ import org.springframework.web.multipart.MultipartFile;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.InputStream; import java.io.InputStream;
import java.util.Date; import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/** /**
* *
* 海康考勤打卡记录汇总信息 * 海康考勤打卡记录汇总信息
...@@ -67,6 +67,9 @@ public class AttendanceRecordHikController extends BaseCRUDJsonBodyMappingContro ...@@ -67,6 +67,9 @@ public class AttendanceRecordHikController extends BaseCRUDJsonBodyMappingContro
} }
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void doImportDataBefore(List<AttendanceRecordHikEntity> list, boolean updateSupport, Context context) throws AppException { public void doImportDataBefore(List<AttendanceRecordHikEntity> list, boolean updateSupport, Context context) throws AppException {
...@@ -147,6 +150,13 @@ public class AttendanceRecordHikController extends BaseCRUDJsonBodyMappingContro ...@@ -147,6 +150,13 @@ public class AttendanceRecordHikController extends BaseCRUDJsonBodyMappingContro
String staffName = "%" + query.getStaffName() + "%"; String staffName = "%" + query.getStaffName() + "%";
query.setStaffName(staffName); query.setStaffName(staffName);
} }
if (ObjectUtils.isEmpty(query.getOrderColList())) {
query.setOrderColList(Arrays.asList(new OrderCol("createTime", OrderCol.DESCENDING)));
} else {
query.getOrderColList().add(new OrderCol("createTime", OrderCol.DESCENDING));
}
super.doListBefore(query, model, context); super.doListBefore(query, model, context);
} }
......
...@@ -137,7 +137,7 @@ public class CheckAllRecordController extends BaseJsonBodyController { ...@@ -137,7 +137,7 @@ public class CheckAllRecordController extends BaseJsonBodyController {
model.put("checkPercent",numberFormat.format(checkPercent)); model.put("checkPercent",numberFormat.format(checkPercent));
BigDecimal appealPercent = current.getAppealScore().divide(current.getInitScore(),6,BigDecimal.ROUND_HALF_UP); BigDecimal appealPercent = current.getAppealScore().divide(current.getInitScore(),6,BigDecimal.ROUND_HALF_UP);
model.put("appealPercent",numberFormat.format(appealPercent)); model.put("appealPercent",numberFormat.format(appealPercent));
}
CheckAllScoreSummaryVo last = checkAllRecordService.getScoreSummary(lastQuery); CheckAllScoreSummaryVo last = checkAllRecordService.getScoreSummary(lastQuery);
if(last!=null){ if(last!=null){
BigDecimal huanbi = current.getTotal().subtract(last.getTotal()); BigDecimal huanbi = current.getTotal().subtract(last.getTotal());
...@@ -169,6 +169,7 @@ public class CheckAllRecordController extends BaseJsonBodyController { ...@@ -169,6 +169,7 @@ public class CheckAllRecordController extends BaseJsonBodyController {
model.put("tongbi",numberFormat.format(tongbi)); model.put("tongbi",numberFormat.format(tongbi));
} }
} }
}
model.put("message_info", busiDesc + "成功"); model.put("message_info", busiDesc + "成功");
if (!ObjectUtils.isEmpty(context) && !ObjectUtils.isEmpty(context.getUser())) { if (!ObjectUtils.isEmpty(context) && !ObjectUtils.isEmpty(context.getUser())) {
......
...@@ -12,7 +12,7 @@ import lombok.Data; ...@@ -12,7 +12,7 @@ import lombok.Data;
* 员工基本信息实体对象 * 员工基本信息实体对象
* *
* @author zxfei * @author zxfei
* @date 2023-07-07 * @date 2023-07-18
*/ */
@Data @Data
public class StaffEntity extends StaffVo { public class StaffEntity extends StaffVo {
...@@ -21,10 +21,12 @@ public class StaffEntity extends StaffVo { ...@@ -21,10 +21,12 @@ public class StaffEntity extends StaffVo {
/** /**
* 员工姓名 * 员工姓名
*/ */
@Excel(name = "员工姓名")
private String name; private String name;
/** /**
* 性别(1.男,2.女) * 性别(1.男,2.女)
*/ */
@Excel(name = "性别", readConverterExp = "1=男,2.女")
private Integer gender; private Integer gender;
/** /**
* 出生日期 * 出生日期
...@@ -37,14 +39,17 @@ public class StaffEntity extends StaffVo { ...@@ -37,14 +39,17 @@ public class StaffEntity extends StaffVo {
/** /**
* 联系电话 * 联系电话
*/ */
@Excel(name = "联系电话")
private String phoneNumber; private String phoneNumber;
/** /**
* 身份证号码 * 身份证号码
*/ */
@Excel(name = "身份证号码")
private String idCard; private String idCard;
/** /**
* 工号 * 工号
*/ */
@Excel(name = "工号")
private String workNum; private String workNum;
/** /**
* 政治面貌 (1.中共党员,2.中共预备党员,3.共青团员,4.群众,5.其它) * 政治面貌 (1.中共党员,2.中共预备党员,3.共青团员,4.群众,5.其它)
...@@ -57,6 +62,7 @@ public class StaffEntity extends StaffVo { ...@@ -57,6 +62,7 @@ public class StaffEntity extends StaffVo {
/** /**
* 所属部门名称 * 所属部门名称
*/ */
@Excel(name = "所属部门名称")
private String deptName; private String deptName;
/** /**
* 职位ID * 职位ID
...@@ -65,14 +71,17 @@ public class StaffEntity extends StaffVo { ...@@ -65,14 +71,17 @@ public class StaffEntity extends StaffVo {
/** /**
* 职位名称 * 职位名称
*/ */
@Excel(name = "职位名称")
private String positionName; private String positionName;
/** /**
* 员工类型(1.全职,2.兼职,3.实习) * 员工类型(1.全职,2.兼职,3.实习)
*/ */
@Excel(name = "员工类型")
private Integer staffType; private Integer staffType;
/** /**
* 员工状态(1.正式,2.试用,3.离职) * 员工状态(1.正式,2.试用,3.离职)
*/ */
@Excel(name = "员工状态", readConverterExp = "1=正式,2=试用,3=离职")
private Integer status; private Integer status;
/** /**
* 员工来源(1.外部,2.内部) * 员工来源(1.外部,2.内部)
...@@ -85,6 +94,7 @@ public class StaffEntity extends StaffVo { ...@@ -85,6 +94,7 @@ public class StaffEntity extends StaffVo {
/** /**
* 入职时间 * 入职时间
*/ */
@Excel(name = "入职时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date entryDate; private Date entryDate;
/** /**
* 转正时间 * 转正时间
...@@ -113,6 +123,7 @@ public class StaffEntity extends StaffVo { ...@@ -113,6 +123,7 @@ public class StaffEntity extends StaffVo {
/** /**
* 绩效分数 * 绩效分数
*/ */
@Excel(name = "绩效分数")
private BigDecimal score; private BigDecimal score;
/** /**
* 员工登录名 * 员工登录名
......
...@@ -51,6 +51,10 @@ ...@@ -51,6 +51,10 @@
<result property="annualLeaveDays" column="annualLeaveDays" /> <result property="annualLeaveDays" column="annualLeaveDays" />
<result property="compensatedLeaveDays" column="compensatedLeaveDays" /> <result property="compensatedLeaveDays" column="compensatedLeaveDays" />
<result property="paternityLeaveDays" column="paternityLeaveDays" /> <result property="paternityLeaveDays" column="paternityLeaveDays" />
<result property="phoneNumer" column="phoneNumer" />
<result property="goTimes" column="goTimes" />
<result property="morningTimes" column="morningTimes" />
<result property="afternoonTimes" column="afternoonTimes" />
</resultMap> </resultMap>
...@@ -196,23 +200,35 @@ ...@@ -196,23 +200,35 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('paternityLeaveDays') or colPickMode == 1 and data.containsKey('paternityLeaveDays')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('paternityLeaveDays') or colPickMode == 1 and data.containsKey('paternityLeaveDays')))">
a.paternityLeaveDays, a.paternityLeaveDays,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('phoneNumer') or colPickMode == 1 and data.containsKey('phoneNumer')))">
a.phoneNumer,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('goTimes') or colPickMode == 1 and data.containsKey('goTimes')))">
a.goTimes,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('morningTimes') or colPickMode == 1 and data.containsKey('morningTimes')))">
a.morningTimes,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('afternoonTimes') or colPickMode == 1 and data.containsKey('afternoonTimes')))">
a.afternoonTimes,
</if>
</trim> </trim>
</sql> </sql>
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="AttendanceStatEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="AttendanceStatEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_attendance_stat insert into mortals_xhx_attendance_stat
(windowCategory,staffId,staffName,deptId,deptName,backToUnit,onDutyLeave,outOfOffice,shiftCompensation,physicalExamination,quarantine,businessTrip,publicHoliday,sickLeave,funeralLeave,marriageLeave,childRearingLeave,maternityLeave,transferBack,homeLeave,personalLeave,absenteeismDays,otherDays,attendanceRate,nonCompliancePunch,lateTimes,surfingMobileTimes,overtimeTimes,vacancy,nonStandardDressTimes,unexcusedMeetingAbsence,earlyLeaveMeeting,year,month,day,remark,createUserId,createTime,updateUserId,updateTime,breastfeedingLeaveDays,menstrualLeaveDays,annualLeaveDays,compensatedLeaveDays,paternityLeaveDays) (windowCategory,staffId,staffName,deptId,deptName,backToUnit,onDutyLeave,outOfOffice,shiftCompensation,physicalExamination,quarantine,businessTrip,publicHoliday,sickLeave,funeralLeave,marriageLeave,childRearingLeave,maternityLeave,transferBack,homeLeave,personalLeave,absenteeismDays,otherDays,attendanceRate,nonCompliancePunch,lateTimes,surfingMobileTimes,overtimeTimes,vacancy,nonStandardDressTimes,unexcusedMeetingAbsence,earlyLeaveMeeting,year,month,day,remark,createUserId,createTime,updateUserId,updateTime,breastfeedingLeaveDays,menstrualLeaveDays,annualLeaveDays,compensatedLeaveDays,paternityLeaveDays,phoneNumer,goTimes,morningTimes,afternoonTimes)
VALUES VALUES
(#{windowCategory},#{staffId},#{staffName},#{deptId},#{deptName},#{backToUnit},#{onDutyLeave},#{outOfOffice},#{shiftCompensation},#{physicalExamination},#{quarantine},#{businessTrip},#{publicHoliday},#{sickLeave},#{funeralLeave},#{marriageLeave},#{childRearingLeave},#{maternityLeave},#{transferBack},#{homeLeave},#{personalLeave},#{absenteeismDays},#{otherDays},#{attendanceRate},#{nonCompliancePunch},#{lateTimes},#{surfingMobileTimes},#{overtimeTimes},#{vacancy},#{nonStandardDressTimes},#{unexcusedMeetingAbsence},#{earlyLeaveMeeting},#{year},#{month},#{day},#{remark},#{createUserId},#{createTime},#{updateUserId},#{updateTime},#{breastfeedingLeaveDays},#{menstrualLeaveDays},#{annualLeaveDays},#{compensatedLeaveDays},#{paternityLeaveDays}) (#{windowCategory},#{staffId},#{staffName},#{deptId},#{deptName},#{backToUnit},#{onDutyLeave},#{outOfOffice},#{shiftCompensation},#{physicalExamination},#{quarantine},#{businessTrip},#{publicHoliday},#{sickLeave},#{funeralLeave},#{marriageLeave},#{childRearingLeave},#{maternityLeave},#{transferBack},#{homeLeave},#{personalLeave},#{absenteeismDays},#{otherDays},#{attendanceRate},#{nonCompliancePunch},#{lateTimes},#{surfingMobileTimes},#{overtimeTimes},#{vacancy},#{nonStandardDressTimes},#{unexcusedMeetingAbsence},#{earlyLeaveMeeting},#{year},#{month},#{day},#{remark},#{createUserId},#{createTime},#{updateUserId},#{updateTime},#{breastfeedingLeaveDays},#{menstrualLeaveDays},#{annualLeaveDays},#{compensatedLeaveDays},#{paternityLeaveDays},#{phoneNumer},#{goTimes},#{morningTimes},#{afternoonTimes})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_attendance_stat insert into mortals_xhx_attendance_stat
(windowCategory,staffId,staffName,deptId,deptName,backToUnit,onDutyLeave,outOfOffice,shiftCompensation,physicalExamination,quarantine,businessTrip,publicHoliday,sickLeave,funeralLeave,marriageLeave,childRearingLeave,maternityLeave,transferBack,homeLeave,personalLeave,absenteeismDays,otherDays,attendanceRate,nonCompliancePunch,lateTimes,surfingMobileTimes,overtimeTimes,vacancy,nonStandardDressTimes,unexcusedMeetingAbsence,earlyLeaveMeeting,year,month,day,remark,createUserId,createTime,updateUserId,updateTime,breastfeedingLeaveDays,menstrualLeaveDays,annualLeaveDays,compensatedLeaveDays,paternityLeaveDays) (windowCategory,staffId,staffName,deptId,deptName,backToUnit,onDutyLeave,outOfOffice,shiftCompensation,physicalExamination,quarantine,businessTrip,publicHoliday,sickLeave,funeralLeave,marriageLeave,childRearingLeave,maternityLeave,transferBack,homeLeave,personalLeave,absenteeismDays,otherDays,attendanceRate,nonCompliancePunch,lateTimes,surfingMobileTimes,overtimeTimes,vacancy,nonStandardDressTimes,unexcusedMeetingAbsence,earlyLeaveMeeting,year,month,day,remark,createUserId,createTime,updateUserId,updateTime,breastfeedingLeaveDays,menstrualLeaveDays,annualLeaveDays,compensatedLeaveDays,paternityLeaveDays,phoneNumer,goTimes,morningTimes,afternoonTimes)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.windowCategory},#{item.staffId},#{item.staffName},#{item.deptId},#{item.deptName},#{item.backToUnit},#{item.onDutyLeave},#{item.outOfOffice},#{item.shiftCompensation},#{item.physicalExamination},#{item.quarantine},#{item.businessTrip},#{item.publicHoliday},#{item.sickLeave},#{item.funeralLeave},#{item.marriageLeave},#{item.childRearingLeave},#{item.maternityLeave},#{item.transferBack},#{item.homeLeave},#{item.personalLeave},#{item.absenteeismDays},#{item.otherDays},#{item.attendanceRate},#{item.nonCompliancePunch},#{item.lateTimes},#{item.surfingMobileTimes},#{item.overtimeTimes},#{item.vacancy},#{item.nonStandardDressTimes},#{item.unexcusedMeetingAbsence},#{item.earlyLeaveMeeting},#{item.year},#{item.month},#{item.day},#{item.remark},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime},#{item.breastfeedingLeaveDays},#{item.menstrualLeaveDays},#{item.annualLeaveDays},#{item.compensatedLeaveDays},#{item.paternityLeaveDays}) (#{item.windowCategory},#{item.staffId},#{item.staffName},#{item.deptId},#{item.deptName},#{item.backToUnit},#{item.onDutyLeave},#{item.outOfOffice},#{item.shiftCompensation},#{item.physicalExamination},#{item.quarantine},#{item.businessTrip},#{item.publicHoliday},#{item.sickLeave},#{item.funeralLeave},#{item.marriageLeave},#{item.childRearingLeave},#{item.maternityLeave},#{item.transferBack},#{item.homeLeave},#{item.personalLeave},#{item.absenteeismDays},#{item.otherDays},#{item.attendanceRate},#{item.nonCompliancePunch},#{item.lateTimes},#{item.surfingMobileTimes},#{item.overtimeTimes},#{item.vacancy},#{item.nonStandardDressTimes},#{item.unexcusedMeetingAbsence},#{item.earlyLeaveMeeting},#{item.year},#{item.month},#{item.day},#{item.remark},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime},#{item.breastfeedingLeaveDays},#{item.menstrualLeaveDays},#{item.annualLeaveDays},#{item.compensatedLeaveDays},#{item.paternityLeaveDays},#{item.phoneNumer},#{item.goTimes},#{item.morningTimes},#{item.afternoonTimes})
</foreach> </foreach>
</insert> </insert>
...@@ -474,6 +490,27 @@ ...@@ -474,6 +490,27 @@
<if test="(colPickMode==0 and data.containsKey('paternityLeaveDaysIncrement')) or (colPickMode==1 and !data.containsKey('paternityLeaveDaysIncrement'))"> <if test="(colPickMode==0 and data.containsKey('paternityLeaveDaysIncrement')) or (colPickMode==1 and !data.containsKey('paternityLeaveDaysIncrement'))">
a.paternityLeaveDays=ifnull(a.paternityLeaveDays,0) + #{data.paternityLeaveDaysIncrement}, a.paternityLeaveDays=ifnull(a.paternityLeaveDays,0) + #{data.paternityLeaveDaysIncrement},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('phoneNumer')) or (colPickMode==1 and !data.containsKey('phoneNumer'))">
a.phoneNumer=#{data.phoneNumer},
</if>
<if test="(colPickMode==0 and data.containsKey('goTimes')) or (colPickMode==1 and !data.containsKey('goTimes'))">
a.goTimes=#{data.goTimes},
</if>
<if test="(colPickMode==0 and data.containsKey('goTimesIncrement')) or (colPickMode==1 and !data.containsKey('goTimesIncrement'))">
a.goTimes=ifnull(a.goTimes,0) + #{data.goTimesIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('morningTimes')) or (colPickMode==1 and !data.containsKey('morningTimes'))">
a.morningTimes=#{data.morningTimes},
</if>
<if test="(colPickMode==0 and data.containsKey('morningTimesIncrement')) or (colPickMode==1 and !data.containsKey('morningTimesIncrement'))">
a.morningTimes=ifnull(a.morningTimes,0) + #{data.morningTimesIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('afternoonTimes')) or (colPickMode==1 and !data.containsKey('afternoonTimes'))">
a.afternoonTimes=#{data.afternoonTimes},
</if>
<if test="(colPickMode==0 and data.containsKey('afternoonTimesIncrement')) or (colPickMode==1 and !data.containsKey('afternoonTimesIncrement'))">
a.afternoonTimes=ifnull(a.afternoonTimes,0) + #{data.afternoonTimesIncrement},
</if>
</trim> </trim>
<trim suffixOverrides="where" suffix=""> <trim suffixOverrides="where" suffix="">
where where
...@@ -996,6 +1033,49 @@ ...@@ -996,6 +1033,49 @@
</choose> </choose>
</foreach> </foreach>
</trim> </trim>
<trim prefix="phoneNumer=(case" suffix="ELSE phoneNumer end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('phoneNumer')) or (colPickMode==1 and !item.containsKey('phoneNumer'))">
when a.id=#{item.id} then #{item.phoneNumer}
</if>
</foreach>
</trim>
<trim prefix="goTimes=(case" suffix="ELSE goTimes end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('goTimes')) or (colPickMode==1 and !item.containsKey('goTimes'))">
when a.id=#{item.id} then #{item.goTimes}
</when>
<when test="(colPickMode==0 and item.containsKey('goTimesIncrement')) or (colPickMode==1 and !item.containsKey('goTimesIncrement'))">
when a.id=#{item.id} then ifnull(a.goTimes,0) + #{item.goTimesIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="morningTimes=(case" suffix="ELSE morningTimes end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('morningTimes')) or (colPickMode==1 and !item.containsKey('morningTimes'))">
when a.id=#{item.id} then #{item.morningTimes}
</when>
<when test="(colPickMode==0 and item.containsKey('morningTimesIncrement')) or (colPickMode==1 and !item.containsKey('morningTimesIncrement'))">
when a.id=#{item.id} then ifnull(a.morningTimes,0) + #{item.morningTimesIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="afternoonTimes=(case" suffix="ELSE afternoonTimes end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('afternoonTimes')) or (colPickMode==1 and !item.containsKey('afternoonTimes'))">
when a.id=#{item.id} then #{item.afternoonTimes}
</when>
<when test="(colPickMode==0 and item.containsKey('afternoonTimesIncrement')) or (colPickMode==1 and !item.containsKey('afternoonTimesIncrement'))">
when a.id=#{item.id} then ifnull(a.afternoonTimes,0) + #{item.afternoonTimesIncrement}
</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=")">
...@@ -2306,6 +2386,108 @@ ...@@ -2306,6 +2386,108 @@
${_conditionType_} a.paternityLeaveDays <![CDATA[ <= ]]> #{${_conditionParam_}.paternityLeaveDaysEnd} ${_conditionType_} a.paternityLeaveDays <![CDATA[ <= ]]> #{${_conditionParam_}.paternityLeaveDaysEnd}
</if> </if>
<if test="conditionParamRef.containsKey('phoneNumer')">
<if test="conditionParamRef.phoneNumer != null and conditionParamRef.phoneNumer != ''">
${_conditionType_} a.phoneNumer like #{${_conditionParam_}.phoneNumer}
</if>
<if test="conditionParamRef.phoneNumer == null">
${_conditionType_} a.phoneNumer is null
</if>
</if>
<if test="conditionParamRef.containsKey('phoneNumerList') and conditionParamRef.phoneNumerList.size() > 0">
${_conditionType_} a.phoneNumer in
<foreach collection="conditionParamRef.phoneNumerList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('phoneNumerNotList') and conditionParamRef.phoneNumerNotList.size() > 0">
${_conditionType_} a.phoneNumer not in
<foreach collection="conditionParamRef.phoneNumerNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('goTimes')">
<if test="conditionParamRef.goTimes != null ">
${_conditionType_} a.goTimes = #{${_conditionParam_}.goTimes}
</if>
<if test="conditionParamRef.goTimes == null">
${_conditionType_} a.goTimes is null
</if>
</if>
<if test="conditionParamRef.containsKey('goTimesList') and conditionParamRef.goTimesList.size() > 0">
${_conditionType_} a.goTimes in
<foreach collection="conditionParamRef.goTimesList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('goTimesNotList') and conditionParamRef.goTimesNotList.size() > 0">
${_conditionType_} a.goTimes not in
<foreach collection="conditionParamRef.goTimesNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('goTimesStart') and conditionParamRef.goTimesStart != null">
${_conditionType_} a.goTimes <![CDATA[ >= ]]> #{${_conditionParam_}.goTimesStart}
</if>
<if test="conditionParamRef.containsKey('goTimesEnd') and conditionParamRef.goTimesEnd != null">
${_conditionType_} a.goTimes <![CDATA[ <= ]]> #{${_conditionParam_}.goTimesEnd}
</if>
<if test="conditionParamRef.containsKey('morningTimes')">
<if test="conditionParamRef.morningTimes != null ">
${_conditionType_} a.morningTimes = #{${_conditionParam_}.morningTimes}
</if>
<if test="conditionParamRef.morningTimes == null">
${_conditionType_} a.morningTimes is null
</if>
</if>
<if test="conditionParamRef.containsKey('morningTimesList') and conditionParamRef.morningTimesList.size() > 0">
${_conditionType_} a.morningTimes in
<foreach collection="conditionParamRef.morningTimesList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('morningTimesNotList') and conditionParamRef.morningTimesNotList.size() > 0">
${_conditionType_} a.morningTimes not in
<foreach collection="conditionParamRef.morningTimesNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('morningTimesStart') and conditionParamRef.morningTimesStart != null">
${_conditionType_} a.morningTimes <![CDATA[ >= ]]> #{${_conditionParam_}.morningTimesStart}
</if>
<if test="conditionParamRef.containsKey('morningTimesEnd') and conditionParamRef.morningTimesEnd != null">
${_conditionType_} a.morningTimes <![CDATA[ <= ]]> #{${_conditionParam_}.morningTimesEnd}
</if>
<if test="conditionParamRef.containsKey('afternoonTimes')">
<if test="conditionParamRef.afternoonTimes != null ">
${_conditionType_} a.afternoonTimes = #{${_conditionParam_}.afternoonTimes}
</if>
<if test="conditionParamRef.afternoonTimes == null">
${_conditionType_} a.afternoonTimes is null
</if>
</if>
<if test="conditionParamRef.containsKey('afternoonTimesList') and conditionParamRef.afternoonTimesList.size() > 0">
${_conditionType_} a.afternoonTimes in
<foreach collection="conditionParamRef.afternoonTimesList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('afternoonTimesNotList') and conditionParamRef.afternoonTimesNotList.size() > 0">
${_conditionType_} a.afternoonTimes not in
<foreach collection="conditionParamRef.afternoonTimesNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('afternoonTimesStart') and conditionParamRef.afternoonTimesStart != null">
${_conditionType_} a.afternoonTimes <![CDATA[ >= ]]> #{${_conditionParam_}.afternoonTimesStart}
</if>
<if test="conditionParamRef.containsKey('afternoonTimesEnd') and conditionParamRef.afternoonTimesEnd != null">
${_conditionType_} a.afternoonTimes <![CDATA[ <= ]]> #{${_conditionParam_}.afternoonTimesEnd}
</if>
</sql> </sql>
<sql id="_orderCols_"> <sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()"> <if test="orderColList != null and !orderColList.isEmpty()">
...@@ -2549,6 +2731,26 @@ ...@@ -2549,6 +2731,26 @@
<if test='orderCol.paternityLeaveDays != null and "DESC".equalsIgnoreCase(orderCol.paternityLeaveDays)'>DESC</if> <if test='orderCol.paternityLeaveDays != null and "DESC".equalsIgnoreCase(orderCol.paternityLeaveDays)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('phoneNumer')">
a.phoneNumer
<if test='orderCol.phoneNumer != null and "DESC".equalsIgnoreCase(orderCol.phoneNumer)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('goTimes')">
a.goTimes
<if test='orderCol.goTimes != null and "DESC".equalsIgnoreCase(orderCol.goTimes)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('morningTimes')">
a.morningTimes
<if test='orderCol.morningTimes != null and "DESC".equalsIgnoreCase(orderCol.morningTimes)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('afternoonTimes')">
a.afternoonTimes
<if test='orderCol.afternoonTimes != null and "DESC".equalsIgnoreCase(orderCol.afternoonTimes)'>DESC</if>
,
</if>
</trim> </trim>
</if> </if>
</sql> </sql>
...@@ -2562,7 +2764,4 @@ ...@@ -2562,7 +2764,4 @@
</trim> </trim>
</if> </if>
</sql> </sql>
<select id="queryEntity" resultType="com.mortals.xhx.module.attendance.model.AttendanceStatEntity">
select * from mortals_xhx_attendance_stat where staffId = #{staffId}
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -762,3 +762,8 @@ PRIMARY KEY (`id`) ...@@ -762,3 +762,8 @@ PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='请假记录信息'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='请假记录信息';
ALTER TABLE mortals_xhx_attendance_stat ADD COLUMN `phoneNumer` varchar(64) default '' COMMENT '手机号码' AFTER staffName;
ALTER TABLE mortals_xhx_attendance_stat ADD COLUMN `goTimes` int(9) default 0 COMMENT '出勤天数' AFTER phoneNumer;
ALTER TABLE mortals_xhx_attendance_stat ADD COLUMN `morningTimes` int(9) default 0 COMMENT '上午缺卡次数' AFTER goTimes;
ALTER TABLE mortals_xhx_attendance_stat ADD COLUMN `afternoonTimes` int(9) default 0 COMMENT '下午缺卡次数' AFTER morningTimes;
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