Commit c27953eb authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/reg' into reg

parents 36b2b609 614ccbaa
...@@ -73,7 +73,7 @@ public class AttendanceStatEntity extends AttendanceStatVo { ...@@ -73,7 +73,7 @@ public class AttendanceStatEntity extends AttendanceStatVo {
/** /**
* 上午缺卡次数 * 上午缺卡次数
*/ */
@Excel(name = "缺卡次数") @Excel(name = "考勤汇总-未按规定打卡(缺卡次数(次))",sort = 9)
private Integer morningTimes; private Integer morningTimes;
/** /**
* 下午缺卡次数 * 下午缺卡次数
...@@ -162,18 +162,18 @@ public class AttendanceStatEntity extends AttendanceStatVo { ...@@ -162,18 +162,18 @@ public class AttendanceStatEntity extends AttendanceStatVo {
/** /**
* 考勤汇总-旷工(天) * 考勤汇总-旷工(天)
*/ */
@Excel(name = "考勤汇总-旷工") //@Excel(name = "考勤汇总-旷工")
private BigDecimal absenteeismDays; private BigDecimal absenteeismDays;
/** /**
* 考勤汇总-其他(天) * 考勤汇总-其他(天)
*/ */
@Excel(name = "考勤汇总-其他") //@Excel(name = "考勤汇总-其他")
private BigDecimal otherDays; private BigDecimal otherDays;
/** /**
* 考勤汇总-未按规定打卡(含忘记打卡) * 考勤汇总-未按规定打卡(含忘记打卡)
*/ */
@Excel(name = "考勤汇总-未按规定打卡(缺卡次数(次))",sort = 9) //@Excel(name = "考勤汇总-未按规定打卡(缺卡次数(次))",sort = 9)
private BigDecimal nonCompliancePunch; private BigDecimal nonCompliancePunch;
/** /**
* 考勤汇总-迟到(次) * 考勤汇总-迟到(次)
...@@ -183,7 +183,7 @@ public class AttendanceStatEntity extends AttendanceStatVo { ...@@ -183,7 +183,7 @@ public class AttendanceStatEntity extends AttendanceStatVo {
/** /**
* 考勤汇总-上网耍手机(次) * 考勤汇总-上网耍手机(次)
*/ */
@Excel(name = "考勤汇总-上网耍手机") //@Excel(name = "考勤汇总-上网耍手机")
private Integer surfingMobileTimes; private Integer surfingMobileTimes;
/** /**
* 考勤汇总-溜班(次) * 考勤汇总-溜班(次)
...@@ -193,22 +193,22 @@ public class AttendanceStatEntity extends AttendanceStatVo { ...@@ -193,22 +193,22 @@ public class AttendanceStatEntity extends AttendanceStatVo {
/** /**
* 考勤汇总-空岗 * 考勤汇总-空岗
*/ */
@Excel(name = "考勤汇总-空岗") //@Excel(name = "考勤汇总-空岗")
private BigDecimal vacancy; private BigDecimal vacancy;
/** /**
* 考勤汇总-未规范着装(次) * 考勤汇总-未规范着装(次)
*/ */
@Excel(name = "考勤汇总-未规范着装") //@Excel(name = "考勤汇总-未规范着装")
private Integer nonStandardDressTimes; private Integer nonStandardDressTimes;
/** /**
* 考勤汇总-无故缺席会议 * 考勤汇总-无故缺席会议
*/ */
@Excel(name = "考勤汇总-无故缺席会议") //@Excel(name = "考勤汇总-无故缺席会议")
private BigDecimal unexcusedMeetingAbsence; private BigDecimal unexcusedMeetingAbsence;
/** /**
* 考勤汇总-会议早退 * 考勤汇总-会议早退
*/ */
@Excel(name = "考勤汇总-会议早退") //@Excel(name = "考勤汇总-会议早退")
private BigDecimal earlyLeaveMeeting; private BigDecimal earlyLeaveMeeting;
/** /**
* 年 * 年
......
...@@ -411,24 +411,33 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc ...@@ -411,24 +411,33 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc
updateList.add(temp); updateList.add(temp);
} }
String attendanceSummary = ""; String attendanceSummary = "";
int normal = 4; //正常次数
if (item.getMorningTimes() > 0) { if (item.getMorningTimes() > 0) {
attendanceSummary += "缺卡*" + item.getMorningTimes() + "次;"; attendanceSummary += "缺卡*" + item.getMorningTimes() + "次;";
normal= normal-item.getMorningTimes();
} }
if (item.getLateTimes() > 0) { if (item.getLateTimes() > 0) {
attendanceSummary += "迟到*" + item.getLateTimes() + "次;"; attendanceSummary += "迟到*" + item.getLateTimes() + "次;";
normal= normal-item.getLateTimes();
} }
if (item.getOvertimeTimes() > 0) { if (item.getOvertimeTimes() > 0) {
attendanceSummary += "早退*" + item.getOvertimeTimes() + "次;"; attendanceSummary += "早退*" + item.getOvertimeTimes() + "次;";
normal= normal-item.getOvertimeTimes();
} }
if (item.getLeaveHalfDay() > 0) { if (item.getLeaveHalfDay() > 0) {
attendanceSummary += "事假半天*" + item.getLeaveHalfDay() + "次;"; attendanceSummary += "事假半天*" + item.getLeaveHalfDay() + "次;";
normal = normal-2;
} }
if (item.getLeaveDay() > 0) { if (item.getLeaveDay() > 0) {
attendanceSummary += "事假全天*" + item.getLeaveDay() + "次;"; attendanceSummary += "事假全天*" + item.getLeaveDay() + "次;";
normal = 0;
} }
AttendanceStaffStatEntity staffStat = new AttendanceStaffStatEntity(); AttendanceStaffStatEntity staffStat = new AttendanceStaffStatEntity();
staffStat.initAttrValue(); staffStat.initAttrValue();
BeanUtils.copyProperties(item, staffStat, BeanUtil.getNullPropertyNames(item)); BeanUtils.copyProperties(item, staffStat, BeanUtil.getNullPropertyNames(item));
if(normal>0){
attendanceSummary = "正常*"+normal + "次;" + attendanceSummary;
}
staffStat.setAttendanceSummary(attendanceSummary); staffStat.setAttendanceSummary(attendanceSummary);
if (!ObjectUtils.isEmpty(attendanceSummary)) { if (!ObjectUtils.isEmpty(attendanceSummary)) {
...@@ -540,7 +549,7 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc ...@@ -540,7 +549,7 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc
if (leaveTypeEnum == null) { if (leaveTypeEnum == null) {
leaveTypeEnum = LeaveTypeEnum.事假; //默认为事假 leaveTypeEnum = LeaveTypeEnum.事假; //默认为事假
} }
attendanceSummary = leaveTypeEnum.getDesc() + "*1"; attendanceSummary = leaveTypeEnum.getDesc() + "*1";
switch (leaveTypeEnum) { switch (leaveTypeEnum) {
case 事假: case 事假:
temp.setPersonalLeave(leaveTime); temp.setPersonalLeave(leaveTime);
......
...@@ -340,21 +340,21 @@ public class AttendanceStatController extends BaseCRUDJsonBodyMappingController< ...@@ -340,21 +340,21 @@ public class AttendanceStatController extends BaseCRUDJsonBodyMappingController<
if(isNull(entity.getNonCompliancePunch())){ if(isNull(entity.getNonCompliancePunch())){
entity.setNonCompliancePunch(null); entity.setNonCompliancePunch(null);
} }
if(entity.getLateTimes()!=null && entity.getLateTimes()==0){ // if(entity.getLateTimes()!=null && entity.getLateTimes()==0){
entity.setLateTimes(null); // entity.setLateTimes(null);
} // }
if(entity.getSurfingMobileTimes()!=null && entity.getSurfingMobileTimes()==0){ // if(entity.getSurfingMobileTimes()!=null && entity.getSurfingMobileTimes()==0){
entity.setSurfingMobileTimes(null); // entity.setSurfingMobileTimes(null);
} // }
if(entity.getOvertimeTimes()!=null && entity.getOvertimeTimes()==0){ // if(entity.getOvertimeTimes()!=null && entity.getOvertimeTimes()==0){
entity.setOvertimeTimes(null); // entity.setOvertimeTimes(null);
} // }
if(isNull(entity.getVacancy())){ if(isNull(entity.getVacancy())){
entity.setVacancy(null); entity.setVacancy(null);
} }
if(entity.getNonStandardDressTimes()!=null && entity.getNonStandardDressTimes()==0){ // if(entity.getNonStandardDressTimes()!=null && entity.getNonStandardDressTimes()==0){
entity.setNonStandardDressTimes(null); // entity.setNonStandardDressTimes(null);
} // }
if(isNull(entity.getUnexcusedMeetingAbsence())){ if(isNull(entity.getUnexcusedMeetingAbsence())){
entity.setUnexcusedMeetingAbsence(null); entity.setUnexcusedMeetingAbsence(null);
} }
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
count(1) as workDays, count(1) as workDays,
sum(s.goWorks) AS goWorks, sum(s.goWorks) AS goWorks,
ROUND(IFNULL(sum(s.goWorks),0)/count(1),4) as attendanceRate, ROUND(IFNULL(sum(s.goWorks),0)/count(1),4) as attendanceRate,
count(1)*4 as sumCheck, sum(4-s.morningTimes-s.lateTimes-s.overtimeTimes) as sumCheck,
sum(s.goTimes) AS goTimes, sum(s.goTimes) AS goTimes,
sum(s.morningTimes) AS morningTimes, sum(s.morningTimes) AS morningTimes,
sum(s.afternoonTimes) AS afternoonTimes, sum(s.afternoonTimes) AS afternoonTimes,
...@@ -45,12 +45,12 @@ ...@@ -45,12 +45,12 @@
sum(s.otherDays) AS otherDays, sum(s.otherDays) AS otherDays,
sum(s.nonCompliancePunch) AS nonCompliancePunch, sum(s.nonCompliancePunch) AS nonCompliancePunch,
sum(s.surfingMobileTimes) AS surfingMobileTimes, sum(s.surfingMobileTimes) AS surfingMobileTimes,
sum(s.overtimeTimes) AS overtimeTimes, sum(IFNULL(s.overtimeTimes,0)) AS overtimeTimes,
sum(s.vacancy) AS vacancy, sum(s.vacancy) AS vacancy,
sum(s.nonStandardDressTimes) AS nonStandardDressTimes, sum(s.nonStandardDressTimes) AS nonStandardDressTimes,
sum(s.unexcusedMeetingAbsence) AS unexcusedMeetingAbsence, sum(s.unexcusedMeetingAbsence) AS unexcusedMeetingAbsence,
sum(s.earlyLeaveMeeting) AS earlyLeaveMeeting, sum(s.earlyLeaveMeeting) AS earlyLeaveMeeting,
sum(s.lateTimes) AS lateTimes, sum(IFNULL(s.lateTimes,0)) AS lateTimes,
sum(s.leaveTime) AS leaveTime sum(s.leaveTime) AS leaveTime
FROM FROM
mortals_xhx_attendance_stat s mortals_xhx_attendance_stat s
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
count(1) as workDays, count(1) as workDays,
sum(s.goWorks) AS goWorks, sum(s.goWorks) AS goWorks,
ROUND(IFNULL(sum(s.goWorks),0)/count(1),4) as attendanceRate, ROUND(IFNULL(sum(s.goWorks),0)/count(1),4) as attendanceRate,
count(1)*4 as sumCheck, sum(4-s.morningTimes-s.lateTimes-s.overtimeTimes) as sumCheck,
sum(s.goTimes) AS goTimes, sum(s.goTimes) AS goTimes,
sum(s.morningTimes) AS morningTimes, sum(s.morningTimes) AS morningTimes,
sum(s.afternoonTimes) AS afternoonTimes, sum(s.afternoonTimes) AS afternoonTimes,
...@@ -120,12 +120,12 @@ ...@@ -120,12 +120,12 @@
sum(s.otherDays) AS otherDays, sum(s.otherDays) AS otherDays,
sum(s.nonCompliancePunch) AS nonCompliancePunch, sum(s.nonCompliancePunch) AS nonCompliancePunch,
sum(s.surfingMobileTimes) AS surfingMobileTimes, sum(s.surfingMobileTimes) AS surfingMobileTimes,
sum(s.overtimeTimes) AS overtimeTimes, sum(IFNULL(s.overtimeTimes,0)) AS overtimeTimes,
sum(s.vacancy) AS vacancy, sum(s.vacancy) AS vacancy,
sum(s.nonStandardDressTimes) AS nonStandardDressTimes, sum(s.nonStandardDressTimes) AS nonStandardDressTimes,
sum(s.unexcusedMeetingAbsence) AS unexcusedMeetingAbsence, sum(s.unexcusedMeetingAbsence) AS unexcusedMeetingAbsence,
sum(s.earlyLeaveMeeting) AS earlyLeaveMeeting, sum(s.earlyLeaveMeeting) AS earlyLeaveMeeting,
sum(s.lateTimes) AS lateTimes, sum(IFNULL(s.lateTimes,0)) AS lateTimes,
sum(s.leaveTime) AS leaveTime sum(s.leaveTime) AS leaveTime
FROM FROM
mortals_xhx_attendance_stat s mortals_xhx_attendance_stat s
......
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