Commit 063db303 authored by 廖旭伟's avatar 廖旭伟

考勤汇总时增加异常考勤类型

parent 4f5d03be
...@@ -61,4 +61,9 @@ public class ErrorSummaryVo { ...@@ -61,4 +61,9 @@ public class ErrorSummaryVo {
* 入职时间 * 入职时间
*/ */
private Date entryDate; private Date entryDate;
/** 事假半天 */
private Integer leaveHalfDay;
/** 事假全天 */
private Integer leaveDay;
} }
...@@ -400,6 +400,12 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc ...@@ -400,6 +400,12 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc
if (item.getOvertimeTimes() > 0) { if (item.getOvertimeTimes() > 0) {
attendanceSummary += "早退*" + item.getOvertimeTimes() + "次;"; attendanceSummary += "早退*" + item.getOvertimeTimes() + "次;";
} }
if (item.getLeaveHalfDay() > 0) {
attendanceSummary += "事假半天*" + item.getOvertimeTimes() + "次;";
}
if (item.getLeaveDay() > 0) {
attendanceSummary += "事假全体*" + item.getOvertimeTimes() + "次;";
}
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));
......
...@@ -99,17 +99,19 @@ ...@@ -99,17 +99,19 @@
sum(case processResult when 0 then 1 ELSE 0 end) as morningTimes, sum(case processResult when 0 then 1 ELSE 0 end) as morningTimes,
sum(case processResult when 0 then 1 ELSE 0 end) as afternoonTimes, sum(case processResult when 0 then 1 ELSE 0 end) as afternoonTimes,
sum(case processResult when 1 then 1 ELSE 0 end) as overtimeTimes, sum(case processResult when 1 then 1 ELSE 0 end) as overtimeTimes,
sum(case processResult when 2 then 1 ELSE 0 end) as lateTimes sum(case processResult when 2 then 1 ELSE 0 end) as lateTimes,
sum(case processResult when 4 then 1 ELSE 0 end) as leaveHalfDay,
sum(case processResult when 5 then 1 ELSE 0 end) as leaveDay
from from
mortals_xhx_attendance_record_error e INNER JOIN mortals_xhx_staff s ON e.staffId = s.id mortals_xhx_attendance_record_error e INNER JOIN mortals_xhx_staff s ON e.staffId = s.id
where where
processResult != 3 e.processResult != 3
and e.errorDateTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{summaryTime},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') and e.errorDateTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{summaryTime},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
and e.errorDateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{summaryTime},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') and e.errorDateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{summaryTime},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
<if test="staffId != null and staffId!=''"> AND e.staffId = #{staffId}</if> <if test="staffId != null and staffId!=''"> AND e.staffId = #{staffId}</if>
group by group by
e.staffId, e.staffId,
e.workNum, e.workNum,
DATE_FORMAT(errorDateTime,'%Y-%m-%d') DATE_FORMAT(e.errorDateTime,'%Y-%m-%d')
</select> </select>
</mapper> </mapper>
\ No newline at end of file
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