Commit 52fceb9b authored by 王启林's avatar 王启林
parents 1570216b a00c6c01
<template>
<!-- 弹出框表单 -->
<el-drawer
:title="title"
:visible.sync="open"
:direction="direction"
size="50%">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<Field label="班次ID" prop="shiftsId" v-model="form.shiftsId" placeholder="请输入班次ID"/>
<Field label="班次名称" 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-drawer
:title="title"
:visible.sync="open"
:direction="direction"
size="50%"
>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<Field
label="班次ID"
prop="shiftsId"
v-model="form.shiftsId"
placeholder="请输入班次ID"
/>
<Field
label="班次名称"
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 />
</el-form>
</el-drawer>
<form-buttons @submit="submitForm" noCancelBtn />
</el-form>
</el-drawer>
</template>
<script>
import form from "@/assets/mixins/formdialog";
export default {
name: "AttendanceClassDetailDetail",
mixins: [form],
components: {
},
created() {
this.changePath("attendance/class/detail")
},
data() {
return {
// 遮罩层
loading: true,
// 弹出层标题
title: "考勤班次详细信息",
// 是否显示弹出层
open: false,
direction:"rtl",
toString:[
],
toDate:[
"goWorkDate",
"offWorkDate",
],
// 表单校验
rules: {
createTime: [
{required: true,message: "请选择创建时间" },
],
}
};
},
import form from "@/assets/mixins/formdialog";
export default {
name: "AttendanceClassDetailDetail",
mixins: [form],
components: {},
created() {
this.changePath("attendance/class/detail");
},
data() {
return {
// 遮罩层
loading: true,
// 弹出层标题
title: "考勤班次详细信息",
// 是否显示弹出层
open: false,
direction: "rtl",
toString: [],
toDate: ["goWorkDate", "offWorkDate"],
// 表单校验
rules: {
createTime: [{ required: true, message: "请选择创建时间" }],
},
};
},
methods: {
/** 编辑 */
edit(row) {
this.reset()
this.query = { id: row.id };
this.urls.currUrl ="attendance/class/detail/edit";
this.getData();
this.pageInfo.type="edit"
this.title = "修改考勤班次详细信息";
},
/** 新增 */
add(row) {
this.reset()
this.urls.currUrl = "attendance/class/detail/add";
this.getData();
this.pageInfo.type="add"
this.title = "新增考勤班次详细信息";
},
/** 查看*/
view(row) {
this.reset()
this.query = { id: row.id };
this.urls.currUrl ="attendance/class/detail/view";
this.getData();
this.pageInfo.type="view"
this.title = "考勤班次详细信息详细";
},
/**取消按钮 */
cancel() {
this.open = false;
},
/**获取数据后弹框 */
afterRender(data) {
this.open = true;
},
methods: {
/** 编辑 */
edit(row) {
this.reset();
this.query = { id: row.id };
this.urls.currUrl = "attendance/class/detail/edit";
this.getData();
this.pageInfo.type = "edit";
this.title = "修改考勤班次详细信息";
},
/** 新增 */
add(row) {
this.reset();
this.urls.currUrl = "attendance/class/detail/add";
this.getData();
this.pageInfo.type = "add";
this.title = "新增考勤班次详细信息";
},
/** 查看*/
view(row) {
this.reset();
this.query = { id: row.id };
this.urls.currUrl = "attendance/class/detail/view";
this.getData();
this.pageInfo.type = "view";
this.title = "考勤班次详细信息详细";
},
/**取消按钮 */
cancel() {
this.open = false;
},
/**获取数据后弹框 */
afterRender(data) {
this.open = true;
},
afterSubmit(data) {
this.open = false;
this.$emit("ok");
},
afterSubmit(data) {
this.open = false;
this.$emit("ok");
},
// 表单重置
reset() {
this.form = {
shiftsId : null,
shiftsName : "",
goWorkDate : null,
goWorkDateBefore : null,
goWorkDateAfter : null,
offWorkDate : null,
offWorkDateBefore : null,
offWorkDateAfter : null,
remark : "",
};
this.resetForm("form");
},
resetForm(refName) {
if (this.$refs[refName]) {
this.$refs[refName].resetFields();
}
},
},
};
// 表单重置
reset() {
this.form = {
shiftsId: null,
shiftsName: "",
goWorkDate: null,
goWorkDateBefore: null,
goWorkDateAfter: null,
offWorkDate: null,
offWorkDateBefore: null,
offWorkDateAfter: null,
remark: "",
};
this.resetForm("form");
},
resetForm(refName) {
if (this.$refs[refName]) {
this.$refs[refName].resetFields();
}
},
},
};
</script>
......@@ -7,7 +7,7 @@
<Field label="班次负责人" prop="classResponsiblePersonId" type="select" :enumData="dict.workManId"
v-model="form.classResponsiblePersonId" placeholder="请选择班次负责人"/>
</el-row>
<el-form-item label="上下班时间" prop="attendanceClassDetailList">
<el-form-item label="上下班考勤时间" prop="attendanceClassDetailList">
<el-button type="text" @click="handleAddAttendanceClassDetail">添加</el-button>
<div class="bancifor" v-for="(item,index) in attendanceClassDetailList" :key="index">
<div class="title flex flex-align-center flex-pack-justify">
......@@ -17,7 +17,7 @@
<el-button type="danger" size="mini" @click="handleDeleteAttendanceClassDetail(index)">删除</el-button>
</div>
<div>
<span>上班时间</span>
<span>上班考勤时间</span>
<el-time-picker
size="mini"
style="width:150px"
......@@ -25,12 +25,12 @@
value-format="HH:mm"
format="HH:mm"
v-model="item.goWorkDate"
placeholder="上班时间">
placeholder="上班考勤时间">
</el-time-picker>
</div>
<div>
<span>打开时段: </span>
<span>上班前</span>
<span>上班前签到</span>
<el-time-picker
size="mini"
style="width:150px"
......@@ -41,7 +41,7 @@
placeholder="未设置">
</el-time-picker>
<span class="ml20">——</span>
<span class="ml20">上班后</span>
<span class="ml20">上班后签到</span>
<el-time-picker
size="mini"
style="width:150px"
......@@ -53,7 +53,7 @@
</el-time-picker>
</div>
<div>
<span>下班时间</span>
<span>下班考勤时间</span>
<el-time-picker
size="mini"
style="width:150px"
......@@ -61,12 +61,12 @@
format="HH:mm"
value-format="HH:mm"
v-model="item.offWorkDate"
placeholder="下班时间">
placeholder="下班考勤时间">
</el-time-picker>
</div>
<div>
<span>打开时段:</span>
<span>下班前</span>
<span>下班前签退</span>
<el-time-picker
size="mini"
style="width:150px"
......@@ -77,7 +77,7 @@
placeholder="未设置">
</el-time-picker>
<span class="ml20">——</span>
<span class="ml20">下班后</span>
<span class="ml20">下班后签退</span>
<el-time-picker
size="mini"
style="width:150px"
......@@ -189,40 +189,40 @@
this.attendanceClassDetailList.push(obj);
},
// 判断添加上下班时间
// 判断添加上下班考勤时间
judgeStatus(arr,index){
console.log(arr,index,'ces')
let status = true
if(arr.length == 0){
}else{
if(arr[index].goWorkDate === ''){
this.$message.error('请选择上班时间')
this.$message.error('请选择上班考勤时间')
status = false
return
}
if(arr[index].goWorkDateBefore === ''){
this.$message.error('请选择允许上班前打卡时间')
this.$message.error('请选择允许上班前签到打卡时间')
status = false
return
}
if(arr[index].goWorkDateAfter === ''){
this.$message.error('请选择允许上班后打卡时间')
this.$message.error('请选择允许上班后签到打卡时间')
status = false
return
}
if(arr[index].offWorkDate === ''){
this.$message.error('请选择下班时间')
this.$message.error('请选择下班考勤时间')
status = false
return
}
if(arr[index].offWorkDateBefore === ''){
this.$message.error('请选择允许下班前打卡时间')
this.$message.error('请选择允许下班前签退打卡时间')
status = false
return
}
if(arr[index].offWorkDateAfter === ''){
this.$message.error('请选择允许下班后打卡时间')
this.$message.error('请选择允许下班后签退打卡时间')
status = false
return
}
......@@ -248,7 +248,7 @@
transFormMinut(arr[index].goWorkDateBefore)
if(currentwokeTime <= lastoffTime){
this.$message.error(`第${index}上班时间需大于第${index-1}上班时间`)
this.$message.error(`第${index}上班考勤时间需大于第${index-1}上班考勤时间`)
status = false
return
}
......
<template>
<!-- 弹出框表单 -->
<el-drawer
:title="title"
:visible.sync="open"
:direction="direction"
size="50%">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<Field label="班次名称" prop="className" 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-drawer
:title="title"
:visible.sync="open"
:direction="direction"
size="50%"
>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<Field
label="班次名称"
prop="className"
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-divider content-position="center">考勤班次详细信息信息</el-divider>
<br />
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
icon="el-icon-plus"
size="mini"
@click="handleAddAttendanceClassDetail"
>添加</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
icon="el-icon-delete"
size="mini"
@click="handleDeleteAttendanceClassDetail"
>删除</el-button
>
</el-col>
</el-row>
</el-row>
<el-divider content-position="center">考勤班次详细信息信息</el-divider>
<br/>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddAttendanceClassDetail">添加</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteAttendanceClassDetail">删除</el-button>
</el-col>
</el-row>
<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 label="序号" align="center" prop="index" width="50" />
<el-table-column label="班次名称" prop="shiftsName">
<template slot-scope="scope">
<el-input
v-model="scope.row.shiftsName"
placeholder="请输入班次名称"
/>
</template>
</el-table-column>
<el-table-column label="上班打卡时间" prop="goWorkDate">
<template slot-scope="scope">
<el-input
v-model="scope.row.goWorkDate"
placeholder="请输入上班打卡时间"
/>
</template>
</el-table-column>
<el-table-column
label="上班打卡前时间段,单位分钟"
prop="goWorkDateBefore"
>
<template slot-scope="scope">
<el-input
v-model="scope.row.goWorkDateBefore"
placeholder="请输入上班打卡前时间段,单位分钟"
/>
</template>
</el-table-column>
<el-table-column
label="上班打卡前时间段,单位分钟"
prop="goWorkDateAfter"
>
<template slot-scope="scope">
<el-input
v-model="scope.row.goWorkDateAfter"
placeholder="请输入上班打卡前时间段,单位分钟"
/>
</template>
</el-table-column>
<el-table-column label="下班打卡时间" prop="offWorkDate">
<template slot-scope="scope">
<el-input
v-model="scope.row.offWorkDate"
placeholder="请输入下班打卡时间"
/>
</template>
</el-table-column>
<el-table-column
label="下班打卡前时间段,单位分钟"
prop="offWorkDateBefore"
>
<template slot-scope="scope">
<el-input
v-model="scope.row.offWorkDateBefore"
placeholder="请输入下班打卡前时间段,单位分钟"
/>
</template>
</el-table-column>
<el-table-column
label="下班打卡前时间段,单位分钟"
prop="offWorkDateAfter"
>
<template slot-scope="scope">
<el-input
v-model="scope.row.offWorkDateAfter"
placeholder="请输入下班打卡前时间段,单位分钟"
/>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark">
<template slot-scope="scope">
<el-input v-model="scope.row.remark" placeholder="请输入备注" />
</template>
</el-table-column>
<el-table-column label="创建用户" prop="createUserId">
<template slot-scope="scope">
<el-input
v-model="scope.row.createUserId"
placeholder="请输入创建用户"
/>
</template>
</el-table-column>
<el-table-column label="创建时间" prop="createTime">
<template slot-scope="scope">
<el-input
v-model="scope.row.createTime"
placeholder="请输入创建时间"
/>
</template>
</el-table-column>
<el-table-column label="更新用户" prop="updateUserId">
<template slot-scope="scope">
<el-input
v-model="scope.row.updateUserId"
placeholder="请输入更新用户"
/>
</template>
</el-table-column>
<el-table-column label="更新时间" prop="updateTime">
<template slot-scope="scope">
<el-input
v-model="scope.row.updateTime"
placeholder="请输入更新时间"
/>
</template>
</el-table-column>
</el-table>
<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 label="序号" align="center" prop="index" width="50"/>
<el-table-column label="班次名称" prop="shiftsName">
<template slot-scope="scope">
<el-input v-model="scope.row.shiftsName" placeholder="请输入班次名称" />
</template>
</el-table-column>
<el-table-column label="上班打卡时间" prop="goWorkDate">
<template slot-scope="scope">
<el-input v-model="scope.row.goWorkDate" placeholder="请输入上班打卡时间" />
</template>
</el-table-column>
<el-table-column label="上班打卡前时间段,单位分钟" prop="goWorkDateBefore">
<template slot-scope="scope">
<el-input v-model="scope.row.goWorkDateBefore" placeholder="请输入上班打卡前时间段,单位分钟" />
</template>
</el-table-column>
<el-table-column label="上班打卡前时间段,单位分钟" prop="goWorkDateAfter">
<template slot-scope="scope">
<el-input v-model="scope.row.goWorkDateAfter" placeholder="请输入上班打卡前时间段,单位分钟" />
</template>
</el-table-column>
<el-table-column label="下班打卡时间" prop="offWorkDate">
<template slot-scope="scope">
<el-input v-model="scope.row.offWorkDate" placeholder="请输入下班打卡时间" />
</template>
</el-table-column>
<el-table-column label="下班打卡前时间段,单位分钟" prop="offWorkDateBefore">
<template slot-scope="scope">
<el-input v-model="scope.row.offWorkDateBefore" placeholder="请输入下班打卡前时间段,单位分钟" />
</template>
</el-table-column>
<el-table-column label="下班打卡前时间段,单位分钟" prop="offWorkDateAfter">
<template slot-scope="scope">
<el-input v-model="scope.row.offWorkDateAfter" placeholder="请输入下班打卡前时间段,单位分钟" />
</template>
</el-table-column>
<el-table-column label="备注" prop="remark">
<template slot-scope="scope">
<el-input v-model="scope.row.remark" placeholder="请输入备注" />
</template>
</el-table-column>
<el-table-column label="创建用户" prop="createUserId">
<template slot-scope="scope">
<el-input v-model="scope.row.createUserId" placeholder="请输入创建用户" />
</template>
</el-table-column>
<el-table-column label="创建时间" prop="createTime">
<template slot-scope="scope">
<el-input v-model="scope.row.createTime" placeholder="请输入创建时间" />
</template>
</el-table-column>
<el-table-column label="更新用户" prop="updateUserId">
<template slot-scope="scope">
<el-input v-model="scope.row.updateUserId" placeholder="请输入更新用户" />
</template>
</el-table-column>
<el-table-column label="更新时间" prop="updateTime">
<template slot-scope="scope">
<el-input v-model="scope.row.updateTime" placeholder="请输入更新时间" />
</template>
</el-table-column>
</el-table>
<form-buttons @submit='submitForm' noCancelBtn />
</el-form>
</el-drawer>
<form-buttons @submit="submitForm" noCancelBtn />
</el-form>
</el-drawer>
</template>
<script>
import form from "@/assets/mixins/formdialog";
export default {
name: "AttendanceClassDetail",
mixins: [form],
components: {
},
created() {
this.changePath("attendance/class")
},
data() {
return {
// 子表选中数据
checkedAttendanceClassDetail: [],
// 考勤班次详细信息表格数据
attendanceClassDetailList: [],
// 遮罩层
loading: true,
// 弹出层标题
title: "考勤班次信息",
// 是否显示弹出层
open: false,
direction:"rtl",
toString:[
],
toDate:[
],
// 表单校验
rules: {
createTime: [
{required: true,message: "请选择创建时间" },
],
}
};
},
import form from "@/assets/mixins/formdialog";
export default {
name: "AttendanceClassDetail",
mixins: [form],
components: {},
created() {
this.changePath("attendance/class");
},
data() {
return {
// 子表选中数据
checkedAttendanceClassDetail: [],
// 考勤班次详细信息表格数据
attendanceClassDetailList: [],
// 遮罩层
loading: true,
// 弹出层标题
title: "考勤班次信息",
// 是否显示弹出层
open: false,
direction: "rtl",
toString: [],
toDate: [],
// 表单校验
rules: {
createTime: [{ required: true, message: "请选择创建时间" }],
},
};
},
methods: {
/** 考勤班次详细信息序号 */
rowAttendanceClassDetailIndex({ row, rowIndex }) {
row.index = rowIndex + 1;
},
/** 考勤班次详细信息添加按钮操作 */
handleAddAttendanceClassDetail() {
let obj = {};
obj.shiftsName = "";
obj.goWorkDate = "";
obj.goWorkDateBefore = "";
obj.goWorkDateAfter = "";
obj.offWorkDate = "";
obj.offWorkDateBefore = "";
obj.offWorkDateAfter = "";
obj.remark = "";
obj.createUserId = "";
obj.createTime = "";
obj.updateUserId = "";
obj.updateTime = "";
this.attendanceClassDetailList.push(obj);
},
/** 考勤班次详细信息删除按钮操作 */
handleDeleteAttendanceClassDetail() {
if (this.checkedAttendanceClassDetail.length == 0) {
this.$alert("请先选择要删除的考勤班次详细信息数据", "提示", { confirmButtonText: "确定", });
} else {
this.attendanceClassDetailList.splice(this.checkedAttendanceClassDetail[0].index - 1, 1);
}
},
/** 单选框选中数据 */
handleAttendanceClassDetailSelectionChange(selection) {
if (selection.length > 1) {
this.$refs.attendanceClassDetail.clearSelection();
this.$refs.attendanceClassDetail.toggleRowSelection(selection.pop());
} else {
this.checkedAttendanceClassDetail = selection;
}
},
// 渲染前置处理
beforeRender(data) {
if(data.entity.attendanceClassDetailList) {
this.attendanceClassDetailList = data.entity.attendanceClassDetailList;
}
return data
},
/** 编辑 */
edit(row) {
this.reset()
this.query = { id: row.id };
this.urls.currUrl ="attendance/class/edit";
this.getData();
this.pageInfo.type="edit"
this.title = "修改考勤班次信息";
},
/** 新增 */
add(row) {
this.reset()
this.urls.currUrl = "attendance/class/add";
this.getData();
this.pageInfo.type="add"
this.title = "新增考勤班次信息";
},
/** 查看*/
view(row) {
this.reset()
this.query = { id: row.id };
this.urls.currUrl ="attendance/class/view";
this.getData();
this.pageInfo.type="view"
this.title = "考勤班次信息详细";
},
/**取消按钮 */
cancel() {
this.open = false;
},
/**获取数据后弹框 */
afterRender(data) {
this.open = true;
},
methods: {
/** 考勤班次详细信息序号 */
rowAttendanceClassDetailIndex({ row, rowIndex }) {
row.index = rowIndex + 1;
},
/** 考勤班次详细信息添加按钮操作 */
handleAddAttendanceClassDetail() {
let obj = {};
obj.shiftsName = "";
obj.goWorkDate = "";
obj.goWorkDateBefore = "";
obj.goWorkDateAfter = "";
obj.offWorkDate = "";
obj.offWorkDateBefore = "";
obj.offWorkDateAfter = "";
obj.remark = "";
obj.createUserId = "";
obj.createTime = "";
obj.updateUserId = "";
obj.updateTime = "";
this.attendanceClassDetailList.push(obj);
},
/** 考勤班次详细信息删除按钮操作 */
handleDeleteAttendanceClassDetail() {
if (this.checkedAttendanceClassDetail.length == 0) {
this.$alert("请先选择要删除的考勤班次详细信息数据", "提示", {
confirmButtonText: "确定",
});
} else {
this.attendanceClassDetailList.splice(
this.checkedAttendanceClassDetail[0].index - 1,
1
);
}
},
/** 单选框选中数据 */
handleAttendanceClassDetailSelectionChange(selection) {
if (selection.length > 1) {
this.$refs.attendanceClassDetail.clearSelection();
this.$refs.attendanceClassDetail.toggleRowSelection(selection.pop());
} else {
this.checkedAttendanceClassDetail = selection;
}
},
// 渲染前置处理
beforeRender(data) {
if (data.entity.attendanceClassDetailList) {
this.attendanceClassDetailList = data.entity.attendanceClassDetailList;
}
return data;
},
/** 编辑 */
edit(row) {
this.reset();
this.query = { id: row.id };
this.urls.currUrl = "attendance/class/edit";
this.getData();
this.pageInfo.type = "edit";
this.title = "修改考勤班次信息";
},
/** 新增 */
add(row) {
this.reset();
this.urls.currUrl = "attendance/class/add";
this.getData();
this.pageInfo.type = "add";
this.title = "新增考勤班次信息";
},
/** 查看*/
view(row) {
this.reset();
this.query = { id: row.id };
this.urls.currUrl = "attendance/class/view";
this.getData();
this.pageInfo.type = "view";
this.title = "考勤班次信息详细";
},
/**取消按钮 */
cancel() {
this.open = false;
},
/**获取数据后弹框 */
afterRender(data) {
this.open = true;
},
afterSubmit(data) {
this.open = false;
this.$emit("ok");
},
afterSubmit(data) {
this.open = false;
this.$emit("ok");
},
// 表单重置
reset() {
this.form = {
className : "",
classResponsiblePersonId : null,
classResponsiblePersonName : "",
remark : "",
};
this.resetForm("form");
},
resetForm(refName) {
if (this.$refs[refName]) {
this.$refs[refName].resetFields();
}
},
},
};
// 表单重置
reset() {
this.form = {
className: "",
classResponsiblePersonId: null,
classResponsiblePersonName: "",
remark: "",
};
this.resetForm("form");
},
resetForm(refName) {
if (this.$refs[refName]) {
this.$refs[refName].resetFields();
}
},
},
};
</script>
......@@ -120,13 +120,15 @@ export default {
// {label: "审批负责人Id", prop: "approverId", formatter: this.formatter},
/* {label: "处理状态", prop: "processStatus", formatter: this.formatter},*/
{label: "状态", prop: "auditResult", formatter: this.formatter},
{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: "操作",
width: 240,
......
......@@ -413,13 +413,20 @@ export default {
name: "staffName",
type: "text",
label: "员工姓名",
fuzzy: false,
fuzzy: true,
},
{
name: "workNum",
type: "text",
label: "员工工号",
fuzzy: true,
},
{
name: "phone",
type: "text",
label: "手机号",
fuzzy: false,
fuzzy: true,
},
{
name: "deptId",
......
......@@ -111,11 +111,11 @@
if(element.attendanceStaffStatEntities.length>0){
element.attendanceStaffStatEntities.forEach(item1 => {
item1.createTime = timestampToTime(item1.createTime,3)
})
})
}
})
return row
return row
},
/** 重写新增方法 */
toAdd(row) {
......@@ -195,13 +195,13 @@
name: "staffName",
type: "text",
label: "员工姓名",
fuzzy: false
fuzzy: true
},
{
name: "phoneNumber",
type: "text",
label: "手机号",
fuzzy: false
fuzzy: true
}
],
columns: [
......@@ -211,7 +211,12 @@
{label: "窗口类别", prop: "windowCategory",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: "onDutyLeave"},
......@@ -296,4 +301,4 @@
margin: 20px 0;
color: #999;
}
</style>
\ No newline at end of file
</style>
......@@ -712,7 +712,7 @@ export default {
indicator: names.map((v) => {
return {
name: v,
max: 150,
max: Math.max(...[...add, ...sub]),
};
}),
center: ["45%", "50%"],
......@@ -734,10 +734,10 @@ export default {
value: add,
name: "加分",
symbol: "rect",
symbolSize: 12,
// symbolSize: 12,
areaStyle: { color: "#56A3F1" }, //雷达覆盖区域背景颜色
label: {
show: true,
show: false,
formatter: function (params) {
return params.value;
},
......
......@@ -95,7 +95,6 @@ export default {
data() {
return {
switchValue: "0",
searchValue: "",
index: -1,
dataArr: [],
......@@ -227,7 +226,7 @@ export default {
type: this.activeName,
page: this.query.page,
orderColList: this.typeArr,
name: this.searchValue,
name: `%${this.searchValue}%`,
}).then((res) => {
if (res.code == 1) {
this.tableData = res.data;
......
......@@ -188,6 +188,8 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
List<PerformInfo> collect = allCheckRecord.stream().map(item -> {
PerformInfo performInfo = new PerformInfo();
BeanUtils.copyProperties(item, performInfo, BeanUtil.getNullPropertyNames(item));
PerformAttendAppealEntity entity = appealService.selectOne(new PerformAttendAppealQuery().checkRecordId(item.getRecordId()));
updateAppealResult(performInfo, entity);
return performInfo;
}).collect(Collectors.toList());
model.put(KEY_RESULT_DATA, collect);
......
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.model.BaseEntityLong;
import com.mortals.xhx.module.attendance.model.vo.AttendanceStatVo;
import java.math.BigDecimal;
import lombok.Data;
/**
* 考勤汇总信息实体对象
*
* @author zxfei
* @date 2023-04-14
* @date 2023-07-18
*/
@Data
public class AttendanceStatEntity extends AttendanceStatVo {
private static final long serialVersionUID = 1L;
......@@ -211,588 +214,22 @@ public class AttendanceStatEntity extends AttendanceStatVo {
*/
@Excel(name = "陪产假")
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(){
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;
}
private String phoneNumer;
/**
* 获取 考勤汇总-会议早退
* @return BigDecimal
* 出勤天数
*/
public BigDecimal getEarlyLeaveMeeting(){
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;
}
private Integer goTimes;
/**
* 获取 陪产假(天)
* @return BigDecimal
* 上午缺卡次数
*/
public BigDecimal getPaternityLeaveDays(){
return paternityLeaveDays;
}
private Integer morningTimes;
/**
* 设置 陪产假(天)
* @param paternityLeaveDays
* 下午缺卡次数
*/
public void setPaternityLeaveDays(BigDecimal paternityLeaveDays){
this.paternityLeaveDays = paternityLeaveDays;
}
private Integer afternoonTimes;
@Override
public int hashCode() {
return this.getId().hashCode();
......@@ -809,61 +246,15 @@ public class AttendanceStatEntity extends AttendanceStatVo {
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(){
this.windowCategory = "考勤机打卡";
this.windowCategory = "";
this.staffId = null;
this.staffId = -1L;
this.staffName = "";
this.deptId = null;
this.deptId = -1L;
this.deptName = "";
......@@ -921,11 +312,11 @@ public class AttendanceStatEntity extends AttendanceStatVo {
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 = "";
......@@ -938,5 +329,13 @@ public class AttendanceStatEntity extends AttendanceStatVo {
this.compensatedLeaveDays = 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;
import java.math.BigDecimal;
import java.util.List;
import com.mortals.xhx.module.attendance.model.AttendanceStatEntity;
/**
* 考勤汇总信息查询对象
*
* @author zxfei
* @date 2023-04-14
* @date 2023-07-18
*/
public class AttendanceStatQuery extends AttendanceStatEntity {
/** 开始 序号,主键,自增长 */
......@@ -641,6 +642,56 @@ public class AttendanceStatQuery extends AttendanceStatEntity {
/** 陪产假(天)排除列表 */
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) */
private List<AttendanceStatQuery> orConditionList;
......@@ -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
......@@ -6319,6 +6645,187 @@ public class AttendanceStatQuery extends AttendanceStatEntity {
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)
* @return orConditionList
......
package com.mortals.xhx.module.attendance.web;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.GoWorkResultEnum;
......@@ -70,6 +71,13 @@ public class AttendanceRecordController extends BaseCRUDJsonBodyMappingControlle
if (query.getGroupId()!=null){
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);
}
......
......@@ -4,6 +4,7 @@ import cn.hutool.core.util.StrUtil;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.util.StringUtils;
import com.mortals.framework.utils.ServletUtils;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
......@@ -21,6 +22,7 @@ import com.mortals.xhx.module.staff.model.StaffQuery;
import com.mortals.xhx.module.staff.service.StaffService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -29,10 +31,8 @@ import org.springframework.web.multipart.MultipartFile;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
*
* 海康考勤打卡记录汇总信息
......@@ -67,6 +67,9 @@ public class AttendanceRecordHikController extends BaseCRUDJsonBodyMappingContro
}
@Override
@Transactional(rollbackFor = Exception.class)
public void doImportDataBefore(List<AttendanceRecordHikEntity> list, boolean updateSupport, Context context) throws AppException {
......@@ -147,6 +150,13 @@ public class AttendanceRecordHikController extends BaseCRUDJsonBodyMappingContro
String staffName = "%" + query.getStaffName() + "%";
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);
}
......
......@@ -137,36 +137,37 @@ public class CheckAllRecordController extends BaseJsonBodyController {
model.put("checkPercent",numberFormat.format(checkPercent));
BigDecimal appealPercent = current.getAppealScore().divide(current.getInitScore(),6,BigDecimal.ROUND_HALF_UP);
model.put("appealPercent",numberFormat.format(appealPercent));
}
CheckAllScoreSummaryVo last = checkAllRecordService.getScoreSummary(lastQuery);
if(last!=null){
BigDecimal huanbi = current.getTotal().subtract(last.getTotal());
huanbi = huanbi.divide(last.getTotal(),6,BigDecimal.ROUND_HALF_UP);
model.put("huanbi",numberFormat.format(huanbi));
}
if (query.getSummaryType() == SummaryTopTypeEnum..getValue()) {
CheckAllScoreSummaryVo last = checkAllRecordService.getScoreSummary(lastQuery);
if(last!=null){
model.put("tongbi",model.get("huanbi"));
BigDecimal huanbi = current.getTotal().subtract(last.getTotal());
huanbi = huanbi.divide(last.getTotal(),6,BigDecimal.ROUND_HALF_UP);
model.put("huanbi",numberFormat.format(huanbi));
}
}else {
String yyyy = query.getCheckTimeStart().substring(0,4);
int lastyear = DataUtil.converStr2Int(yyyy,0);
lastyear--;
if(query.getCheckTimeStart().substring(4).equals("-02-29")){
lastQuery.setCheckTimeStart(lastyear+"-02-28");
if (query.getSummaryType() == SummaryTopTypeEnum..getValue()) {
if(last!=null){
model.put("tongbi",model.get("huanbi"));
}
}else {
lastQuery.setCheckTimeStart(lastyear+query.getCheckTimeStart().substring(4));
}
if(query.getCheckTimeEnd().substring(4).equals("-02-29")){
lastQuery.setCheckTimeEnd(lastyear+"-02-28");
}else {
lastQuery.setCheckTimeEnd(lastyear+query.getCheckTimeEnd().substring(4));
}
CheckAllScoreSummaryVo tb = checkAllRecordService.getScoreSummary(lastQuery);
if(tb!=null){
BigDecimal tongbi = current.getTotal().subtract(tb.getTotal());
tongbi = tongbi.divide(last.getTotal(),6,BigDecimal.ROUND_HALF_UP);
model.put("tongbi",numberFormat.format(tongbi));
String yyyy = query.getCheckTimeStart().substring(0,4);
int lastyear = DataUtil.converStr2Int(yyyy,0);
lastyear--;
if(query.getCheckTimeStart().substring(4).equals("-02-29")){
lastQuery.setCheckTimeStart(lastyear+"-02-28");
}else {
lastQuery.setCheckTimeStart(lastyear+query.getCheckTimeStart().substring(4));
}
if(query.getCheckTimeEnd().substring(4).equals("-02-29")){
lastQuery.setCheckTimeEnd(lastyear+"-02-28");
}else {
lastQuery.setCheckTimeEnd(lastyear+query.getCheckTimeEnd().substring(4));
}
CheckAllScoreSummaryVo tb = checkAllRecordService.getScoreSummary(lastQuery);
if(tb!=null){
BigDecimal tongbi = current.getTotal().subtract(tb.getTotal());
tongbi = tongbi.divide(last.getTotal(),6,BigDecimal.ROUND_HALF_UP);
model.put("tongbi",numberFormat.format(tongbi));
}
}
}
......
......@@ -12,7 +12,7 @@ import lombok.Data;
* 员工基本信息实体对象
*
* @author zxfei
* @date 2023-07-07
* @date 2023-07-18
*/
@Data
public class StaffEntity extends StaffVo {
......@@ -21,10 +21,12 @@ public class StaffEntity extends StaffVo {
/**
* 员工姓名
*/
@Excel(name = "员工姓名")
private String name;
/**
* 性别(1.男,2.女)
*/
@Excel(name = "性别", readConverterExp = "1=男,2.女")
private Integer gender;
/**
* 出生日期
......@@ -37,14 +39,17 @@ public class StaffEntity extends StaffVo {
/**
* 联系电话
*/
@Excel(name = "联系电话")
private String phoneNumber;
/**
* 身份证号码
*/
@Excel(name = "身份证号码")
private String idCard;
/**
* 工号
*/
@Excel(name = "工号")
private String workNum;
/**
* 政治面貌 (1.中共党员,2.中共预备党员,3.共青团员,4.群众,5.其它)
......@@ -57,6 +62,7 @@ public class StaffEntity extends StaffVo {
/**
* 所属部门名称
*/
@Excel(name = "所属部门名称")
private String deptName;
/**
* 职位ID
......@@ -65,14 +71,17 @@ public class StaffEntity extends StaffVo {
/**
* 职位名称
*/
@Excel(name = "职位名称")
private String positionName;
/**
* 员工类型(1.全职,2.兼职,3.实习)
*/
@Excel(name = "员工类型")
private Integer staffType;
/**
* 员工状态(1.正式,2.试用,3.离职)
*/
@Excel(name = "员工状态", readConverterExp = "1=正式,2=试用,3=离职")
private Integer status;
/**
* 员工来源(1.外部,2.内部)
......@@ -85,6 +94,7 @@ public class StaffEntity extends StaffVo {
/**
* 入职时间
*/
@Excel(name = "入职时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date entryDate;
/**
* 转正时间
......@@ -113,6 +123,7 @@ public class StaffEntity extends StaffVo {
/**
* 绩效分数
*/
@Excel(name = "绩效分数")
private BigDecimal score;
/**
* 员工登录名
......
......@@ -51,6 +51,10 @@
<result property="annualLeaveDays" column="annualLeaveDays" />
<result property="compensatedLeaveDays" column="compensatedLeaveDays" />
<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>
......@@ -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')))">
a.paternityLeaveDays,
</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>
</sql>
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="AttendanceStatEntity" useGeneratedKeys="true" keyProperty="id">
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
(#{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 id="insertBatch" parameterType="paramDto">
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
<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>
</insert>
......@@ -474,6 +490,27 @@
<if test="(colPickMode==0 and data.containsKey('paternityLeaveDaysIncrement')) or (colPickMode==1 and !data.containsKey('paternityLeaveDaysIncrement'))">
a.paternityLeaveDays=ifnull(a.paternityLeaveDays,0) + #{data.paternityLeaveDaysIncrement},
</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 suffixOverrides="where" suffix="">
where
......@@ -996,6 +1033,49 @@
</choose>
</foreach>
</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>
where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
......@@ -2306,6 +2386,108 @@
${_conditionType_} a.paternityLeaveDays <![CDATA[ <= ]]> #{${_conditionParam_}.paternityLeaveDaysEnd}
</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 id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()">
......@@ -2549,6 +2731,26 @@
<if test='orderCol.paternityLeaveDays != null and "DESC".equalsIgnoreCase(orderCol.paternityLeaveDays)'>DESC</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>
</if>
</sql>
......@@ -2562,7 +2764,4 @@
</trim>
</if>
</sql>
<select id="queryEntity" resultType="com.mortals.xhx.module.attendance.model.AttendanceStatEntity">
select * from mortals_xhx_attendance_stat where staffId = #{staffId}
</select>
</mapper>
\ No newline at end of file
......@@ -762,3 +762,8 @@ PRIMARY KEY (`id`)
) 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