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
}
......
......@@ -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.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;
/**
* 员工登录名
......
......@@ -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