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

修改考勤汇总

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