Commit 4e04b09a authored by 赵啸非's avatar 赵啸非

修改考勤汇总

parent 3408a0e2
......@@ -189,6 +189,7 @@ import drawerShow from "./drawershow";
import table from "@/assets/mixins/table";
import TabPane from "@/components/tabPane.vue";
import { timestampToTime } from "@/assets/utils/dateFormat";
import {formatterDateOnly} from "@/assets/utils/table";
export default {
name: "AttendanceRecordList",
components: {
......@@ -401,10 +402,10 @@ export default {
{ prop: "recordId", label: "考勤记录ID", width: 100 },
{ prop: "shiftsId", label: "班次ID", width: 100 },
{ prop: "shiftsName", label: "班次名称", width: 100 },
{ prop: "goWorkDate", label: "上班打卡时间", width: 100 },
{ prop: "goWorkResult", label: "上班打卡结果", width: 100 },
{ prop: "offWorkDate", label: "下班打卡时间", width: 100 },
{ prop: "offWorkResult", label: "下班打卡结果", width: 100 },
{ prop: "goWorkDate", label: "上班打卡时间", width: 100 , formatter: this.formatterDate},
{ prop: "goWorkResult", label: "上班打卡结果", width: 100, formatter: this.formatter },
{ prop: "offWorkDate", label: "下班打卡时间", width: 100 , formatter: this.formatterDate},
{ prop: "offWorkResult", label: "下班打卡结果", width: 100 , formatter: this.formatter},
{ prop: "remark", label: "备注", width: 100 },
],
config: {
......@@ -466,7 +467,7 @@ export default {
{
label: "打卡日期",
prop: "attendanceDate",
formatter: this.formatterDate,
formatter: this.formatterDateOnly,
},
{ label: "员工姓名", prop: "staffName" },
{
......@@ -482,21 +483,21 @@ export default {
{ label: "打卡结果", prop: "punchResult", formatter: this.formatter },
{ label: "考勤类型", prop: "attendType", formatter: this.formatter },
// {label: "考勤打卡记录详细信息",
// width: 120,
// prop: "subColumns",
// formatter: (row) => {
// let widthsize = this.columnSet.reduce((pre, cur) => {
// return pre + Number(cur.width);
// }, 50);
// return (
// <el-popover placement="right" width={widthsize} trigger="click">
// {this.renderTable(row.attendanceRecordDetailList)}
// <el-button type="text" slot="reference">详细</el-button>
// </el-popover>
// );
// },
// },
{label: "考勤打卡记录详细信息",
width: 120,
prop: "subColumns",
formatter: (row) => {
let widthsize = this.columnSet.reduce((pre, cur) => {
return pre + Number(cur.width);
}, 50);
return (
<el-popover placement="right" width={widthsize} trigger="click">
{this.renderTable(row.attendanceRecordDetailList)}
<el-button type="text" slot="reference">详细</el-button>
</el-popover>
);
},
},
// {
// label: "操作",
// width: 240,
......
......@@ -135,6 +135,6 @@ public class AttendanceRecordEntity extends AttendanceRecordVo {
this.attendType = "现场打卡";
this.punchResult = 0;
this.punchResult = 1;
}
}
\ No newline at end of file
......@@ -5,9 +5,7 @@ import cn.hutool.core.util.StrUtil;
import com.mortals.framework.service.IUser;
import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.base.system.upload.service.UploadService;
import com.mortals.xhx.common.code.ErrorStatusEnum;
import com.mortals.xhx.common.code.GoWorkResultEnum;
import com.mortals.xhx.common.code.ProcessStatusEnum;
import com.mortals.xhx.common.code.*;
import com.mortals.xhx.module.attendance.model.*;
import com.mortals.xhx.module.attendance.service.*;
import com.mortals.xhx.module.dept.service.DeptService;
......@@ -403,8 +401,34 @@ public class AttendanceRecordHikServiceImpl extends AbstractCRUDServiceImpl<Atte
attendanceRecordEntity.setShiftsId(attendanceClassDetailService.selectOne(new AttendanceClassDetailQuery().id(detailEntityList.get(0).getShiftsId())).getClassId());
attendanceRecordEntity.setAttendanceRecordDetailList(detailEntityList);
attendanceRecordEntity.setAttendType("现场打卡");
//判断签到 只要存在一次正常打卡详细记录 就判断签到
for (AttendanceRecordDetailEntity detailEntity : detailEntityList) {
if (GoWorkResultEnum.正常.getValue() == detailEntity.getGoWorkResult() || GoWorkResultEnum.迟到.getValue() == detailEntity.getOffWorkResult()) {
attendanceRecordEntity.setSignInResult(YesNoEnum.YES.getValue());
break;
}
}
for (AttendanceRecordDetailEntity detailEntity : detailEntityList) {
if (OffWorkResultEnum.正常.getValue() == detailEntity.getOffWorkResult() ) {
attendanceRecordEntity.setSignOutResult(YesNoEnum.YES.getValue());
break;
}
}
for (AttendanceRecordDetailEntity detailEntity : detailEntityList) {
if (OffWorkResultEnum.缺卡.getValue() == detailEntity.getOffWorkResult() ) {
attendanceRecordEntity.setPunchResult(YesNoEnum.NO.getValue());
break;
}
if (OffWorkResultEnum.缺卡.getValue() == detailEntity.getOffWorkResult() ) {
attendanceRecordEntity.setPunchResult(YesNoEnum.NO.getValue());
break;
}
}
attendanceRecordEntity.setAttendType("现场打卡");
attendanceRecordService.save(attendanceRecordEntity, context);
}
......
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