修改假期,节假日定时器

This commit is contained in:
史宗金 2025-01-07 01:47:43 +08:00
parent 5739f5c9dd
commit 69e2b67226
14 changed files with 96 additions and 83 deletions

View File

@ -11,7 +11,7 @@ public enum AttStatus {
临时外出("7"),
出入异常("8"),
打卡地异常("9"),
出差报备("10"),
出差("10"),
("11"),
("12"),
("13"),
@ -45,7 +45,7 @@ public enum AttStatus {
return "";
}else if (this == AttStatus.){
return "";
}else if (this == AttStatus.出差报备){
}else if (this == AttStatus.出差){
return "";
}
return this.name();

View File

@ -346,7 +346,7 @@ public class AttTasks {
*
* @return 考勤组集合
*/
private List<AttGroupBean> getGroupData(String pushDate, int pushType) {
public List<AttGroupBean> getGroupData(String pushDate, int pushType) {
//查出考勤组的数据
List<AttGroupBean> groupList = Optional.ofNullable(attGroupDao.selectAttGroupList(new AttGroupBean())).
orElseGet(ArrayList::new);
@ -841,7 +841,8 @@ public class AttTasks {
if (items.isEmpty()) {
continue; // 如果列表为空跳过
}
//五点之前的数据属于过来当天的下班打卡不计入
LocalTime noonEnd = LocalTime.of(5, 0);
// 获取上班时间并转换为 LocalTime 以便比较
LocalTime toWorkTime = LocalTime.parse(attGroupBean.getToWorkTime(), timeFormatter);
// 初始化变量来保存最接近上班时间的数据项及其索引
@ -859,7 +860,7 @@ public class AttTasks {
// 只提取时间部分进行比较
LocalTime recordTime = LocalTime.parse(item.getAttCurrentTime().substring(11), timeFormatter);
// 检查是否在上班时间之前并且是目前找到的最接近上班时间的
if (recordTime.isBefore(toWorkTime) &&
if (recordTime.isBefore(toWorkTime) && recordTime.isAfter(noonEnd) &&
(closestBeforeToWork == null ||
recordTime.isAfter(LocalTime.parse(closestBeforeToWork.getAttCurrentTime().substring(11), timeFormatter)))) {
closestBeforeToWork = item;
@ -1093,7 +1094,7 @@ public class AttTasks {
*
* @param groupList 考勤组集合
*/
private void createReportData(List<AttGroupBean> groupList, String pushDate, int pushType) {
public void createReportData(List<AttGroupBean> groupList, String pushDate, int pushType) {
//日报表查询
List<AttDayReportBean> dayReportList = attSourceDataDao.selectAttDayReport(pushDate, pushType);
//日报表新增

View File

@ -774,7 +774,7 @@ public class ExportFileController {
vo.setLeaveDate(dateString);
personExportVoList.add(vo);
}
extracted(personExportVoList, LeaveReportingBean.class, "休假报备导出", "休假报备导出", "休假报备导出", response);
extracted(personExportVoList, LeaveReportingBean.class, "休假导出", "休假导出", "休假导出", response);
} catch (Exception e) {
log.error(e.toString(), e);
}
@ -814,7 +814,7 @@ public class ExportFileController {
vo.setLeaveDate(dateString);
personExportVoList.add(vo);
}
extracted(personExportVoList, EvectionBean.class, "出差报备导出", "出差报备导出", "出差报备导出", response);
extracted(personExportVoList, EvectionBean.class, "出差导出", "出差导出", "出差导出", response);
} catch (Exception e) {
log.error(e.toString(), e);
}
@ -924,7 +924,7 @@ public class ExportFileController {
attStatus = "出差";
break;
case "19":
attStatus = "出差报备";
attStatus = "育儿假";
break;
default:
attStatus = "休假";
@ -967,7 +967,7 @@ public class ExportFileController {
vo.setLeaveDate(dateString);
personExportVoList.add(vo);
}
extracted(personExportVoList, WechatLeaveReportingBean.class, "数据管理-休假报备导出", "数据管理-休假报备导出", "数据管理-休假报备导出", response);
extracted(personExportVoList, WechatLeaveReportingBean.class, "数据管理-休假导出", "数据管理-休假导出", "数据管理-休假导出", response);
} catch (Exception e) {
log.error(e.toString(), e);
}
@ -1007,7 +1007,7 @@ public class ExportFileController {
vo.setLeaveDate(dateString);
personExportVoList.add(vo);
}
extracted(personExportVoList, WechatEvectionBean.class, "数据管理-出差报备导出", "数据管理-出差报备导出", "数据管理-出差报备导出", response);
extracted(personExportVoList, WechatEvectionBean.class, "数据管理-出差导出", "数据管理-出差导出", "数据管理-出差导出", response);
} catch (Exception e) {
log.error(e.toString(), e);
}

View File

@ -69,7 +69,7 @@ public class RequestReportServiceImpl implements RequestReportService {
if ("临时外出".equals(bean.getLeaveTypes())){
bean.setLeaveTypes("临时外出");
} else if ("出差".equals(bean.getLeaveTypes())){
bean.setLeaveTypes("出差报备");
bean.setLeaveTypes("出差");
}
}
List<WorkReportBean> workReportList = dao.getWorkReportList(bean);

View File

@ -178,7 +178,7 @@ public class WechatController extends BaseController {
attStatus = "出差";
break;
case "19":
attStatus = "出差报备";
attStatus = "育儿假";
break;
default:
attStatus = "休假";

View File

@ -11,11 +11,11 @@
leave_start_interval,
</if>
leave_end_date,
<if test="leave_end_interval != null">
<if test="leaveEndInterval != null">
leave_end_interval,
</if>
leave_duration, source, create_user_id, is_agree, location, host_user_id,host_user_name, remark,examine_status)
VALUES (#{userId}, #{userName}, #{orgId}, #{orgName}, '休假报备' , #{type}, #{leaveReason},
VALUES (#{userId}, #{userName}, #{orgId}, #{orgName}, '休假' , #{type}, #{leaveReason},
#{leaveStartDate},
<if test="leaveStartInterval != null">
#{leaveStartInterval},
@ -102,7 +102,7 @@
LEFT JOIN sys_user_post p ON p.user_id = l.user_id
LEFT JOIN sys_dict_data d on d.dict_code = p.post_id
WHERE
l.is_active = '1' AND l.leave_type = '休假报备' AND l.source = '1'
l.is_active = '1' AND l.leave_type = '休假' AND l.source = '1'
<if test='params.userId != null '>
and l.user_id = #{params.userId}
</if>

View File

@ -72,7 +72,7 @@
att_status = CASE
WHEN att_status in (SELECT dict_value
FROM sys_dict_data
where dict_type = 'att_status' and is_leave = '1') THEN att_status
where dict_type = 'att_status' and (is_leave = '1' or is_leave = '2') ) THEN att_status
ELSE #{params.attStatus}
END
where user_id = #{params.userId} and org_id = #{params.orgId}
@ -84,7 +84,7 @@
att_status = CASE
WHEN att_status in (SELECT dict_value
FROM sys_dict_data
where dict_type = 'att_status' and is_leave = '1') THEN att_status
where dict_type = 'att_status' and (is_leave = '1' or is_leave = '2')) THEN att_status
ELSE #{params.attStatus}
END
where is_update = 0 and user_id = #{params.userId} and org_id = #{params.orgId}
@ -150,7 +150,7 @@
from gz_cloud.fc_sup_attendance sup
where sup.attendance_date
<if test=' pushType == "1" '>
>= #{pushDate}
>= (#{pushDate} - INTERVAL 1 DAY)
</if>
<if test=' pushType == "2" '>
= #{pushDate}
@ -177,16 +177,20 @@
<select id="selectAttDayReport" resultType="com.bonus.system.att.entity.AttDayReportBean">
select att_current_day,
org_id,
IFNULL(sum(toWorkAttStatus = 1 and offWorkAttStatus = 1), 0) as normalNum,
IFNULL(sum(toWorkAttStatus = 2 or offWorkAttStatus = 2), 0) as lateNum,
IFNULL(sum(toWorkAttStatus = 3 or offWorkAttStatus = 3), 0) as skippingNum,
IFNULL(sum(toWorkAttStatus = 4 or offWorkAttStatus = 4), 0) as earlyNum,
IFNULL(sum(toWorkAttStatus = 5 or offWorkAttStatus = 5), 0) as restNum,
IFNULL(sum(toWorkAttStatus in (12, 13, 14, 15, 16, 17, 18) or
offWorkAttStatus in (12, 13, 14, 15, 16, 17, 18)), 0) as leaveNum,
IFNULL(sum(toWorkAttStatus = 7 or offWorkAttStatus = 7), 0) as outNum,
IFNULL(sum(toWorkAttStatus = 8 or offWorkAttStatus = 8), 0) as einErrorNum,
IFNULL(sum(toWorkAttStatus = 9 or offWorkAttStatus = 9), 0) as addressErrorNum
IFNULL(sum(IFNULL(toWorkUpdateAttStatus,toWorkAttStatus) = 1 and IFNULL(offWorkUpdateAttStatus,offWorkAttStatus) = 1), 0) as normalNum,
IFNULL(sum(IFNULL(toWorkUpdateAttStatus,toWorkAttStatus) = 2 or IFNULL(offWorkUpdateAttStatus,offWorkAttStatus) = 2), 0) as lateNum,
IFNULL(sum(IFNULL(toWorkUpdateAttStatus,toWorkAttStatus) = 3 or IFNULL(offWorkUpdateAttStatus,offWorkAttStatus) = 3), 0) as skippingNum,
IFNULL(sum(IFNULL(toWorkUpdateAttStatus,toWorkAttStatus) = 4 or IFNULL(offWorkUpdateAttStatus,offWorkAttStatus) = 4), 0) as earlyNum,
IFNULL(sum(IFNULL(toWorkUpdateAttStatus,toWorkAttStatus) = 5 or IFNULL(offWorkUpdateAttStatus,offWorkAttStatus) = 5), 0) as restNum,
IFNULL(sum(IFNULL(toWorkUpdateAttStatus,toWorkAttStatus) in (SELECT dict_value
FROM sys_dict_data
where dict_type = 'att_status' and is_leave = '1') or
IFNULL(offWorkUpdateAttStatus,offWorkAttStatus) in (SELECT dict_value
FROM sys_dict_data
where dict_type = 'att_status' and is_leave = '1')), 0) as leaveNum,
IFNULL(sum(IFNULL(toWorkUpdateAttStatus,toWorkAttStatus) = 7 or IFNULL(offWorkUpdateAttStatus,offWorkAttStatus) = 7), 0) as outNum,
IFNULL(sum(IFNULL(toWorkUpdateAttStatus,toWorkAttStatus) = 8 or IFNULL(offWorkUpdateAttStatus,offWorkAttStatus) = 8), 0) as einErrorNum,
IFNULL(sum(IFNULL(toWorkUpdateAttStatus,toWorkAttStatus) = 9 or IFNULL(offWorkUpdateAttStatus,offWorkAttStatus) = 9), 0) as addressErrorNum
from v_att_update_data
where att_current_day
<if test=' pushType == "1" '>
@ -196,45 +200,45 @@
= #{pushDate}
</if>
GROUP BY att_current_day, org_id
</select>
<select id="selectAttMonthReport" resultType="com.bonus.system.att.entity.AttMonthReportBean">
select v.org_id,
v.user_id,
su.user_name,
so.org_name,
g.group_id,
DATE_FORMAT(att_current_day, '%Y-%m') as attCurrentMonth,
IFNULL(sum(toWorkAttStatus = 1 and offWorkAttStatus = 1), 0) as normalNum,
IFNULL(sum(toWorkAttStatus = 2 or offWorkAttStatus = 2), 0) as lateNum,
IFNULL(sum(toWorkAttStatus = 3 or offWorkAttStatus = 3), 0) as skippingNum,
IFNULL(sum(toWorkAttStatus = 4 or offWorkAttStatus = 4), 0) as earlyNum,
IFNULL(sum(toWorkAttStatus = 5 or offWorkAttStatus = 5), 0) as restNum,
IFNULL(sum(toWorkAttStatus in (12, 13, 14, 15, 16, 17, 18) or
offWorkAttStatus in (12, 13, 14, 15, 16, 17, 18)), 0) as leaveNum,
IFNULL(sum(toWorkAttStatus = 7 or offWorkAttStatus = 7), 0) as outNum,
IFNULL(sum(toWorkAttStatus = 8 or offWorkAttStatus = 8), 0) as einErrorNum,
IFNULL(sum(toWorkAttStatus = 9 or offWorkAttStatus = 9), 0) as addressErrorNum
v.user_id,
su.user_name,
so.org_name,
g.group_id,
DATE_FORMAT(att_current_day, '%Y-%m') as attCurrentMonth,
IFNULL(sum(IFNULL(toWorkUpdateAttStatus,toWorkAttStatus) = 1 and IFNULL(offWorkUpdateAttStatus,offWorkAttStatus) = 1), 0) as normalNum,
IFNULL(sum(IFNULL(toWorkUpdateAttStatus,toWorkAttStatus) = 2 or IFNULL(offWorkUpdateAttStatus,offWorkAttStatus) = 2), 0) as lateNum,
IFNULL(sum(IFNULL(toWorkUpdateAttStatus,toWorkAttStatus) = 3 or IFNULL(offWorkUpdateAttStatus,offWorkAttStatus) = 3), 0) as skippingNum,
IFNULL(sum(IFNULL(toWorkUpdateAttStatus,toWorkAttStatus) = 4 or IFNULL(offWorkUpdateAttStatus,offWorkAttStatus) = 4), 0) as earlyNum,
IFNULL(sum(IFNULL(toWorkUpdateAttStatus,toWorkAttStatus) = 5 or IFNULL(offWorkUpdateAttStatus,offWorkAttStatus) = 5), 0) as restNum,
IFNULL(sum(IFNULL(toWorkUpdateAttStatus,toWorkAttStatus) in (SELECT dict_value
FROM sys_dict_data
where dict_type = 'att_status' and is_leave = '1') or
IFNULL(offWorkUpdateAttStatus,offWorkAttStatus) in (SELECT dict_value
FROM sys_dict_data
where dict_type = 'att_status' and is_leave = '1')), 0) as leaveNum,
IFNULL(sum(IFNULL(toWorkUpdateAttStatus,toWorkAttStatus) = 7 or IFNULL(offWorkUpdateAttStatus,offWorkAttStatus) = 7), 0) as outNum,
IFNULL(sum(IFNULL(toWorkUpdateAttStatus,toWorkAttStatus) = 8 or IFNULL(offWorkUpdateAttStatus,offWorkAttStatus) = 8), 0) as einErrorNum,
IFNULL(sum(IFNULL(toWorkUpdateAttStatus,toWorkAttStatus) = 9 or IFNULL(offWorkUpdateAttStatus,offWorkAttStatus) = 9), 0) as addressErrorNum
from v_att_update_data v
left join sys_user su on su.user_id = v.user_id
left join sys_organization so on so.id = v.org_id
left join att_group_person_relation g
on g.user_id = v.user_id and g.org_id = v.org_id and g.is_active = 1
left join sys_user su on su.user_id = v.user_id
left join sys_organization so on so.id = v.org_id
left join att_group_person_relation g
on g.user_id = v.user_id and g.is_active = 1
where DATE_FORMAT(att_current_day, '%Y-%m') = DATE_FORMAT(#{pushDate}, '%Y-%m')
and g.group_id is not null
GROUP BY DATE_FORMAT(att_current_day, '%Y-%m'), v.org_id, v.user_id;
and g.group_id is not null
GROUP BY DATE_FORMAT(att_current_day, '%Y-%m'), v.user_id;
</select>
<select id="selectHolidayByMonth" resultType="com.bonus.system.att.entity.Holiday">
select *
from sys_holiday
where `date`
<if test=' pushType == "1" '>
>= #{pushDate}
</if>
<if test=' pushType == "2" '>
= #{pushDate}
</if>
where
DATE_FORMAT(`date`, '%Y-%m') = DATE_FORMAT(#{pushDate}, '%Y-%m')
</select>
<select id="getPersonLeaveApplyStatus" resultType="java.lang.Integer">
@ -263,7 +267,7 @@
left join att_group g on g.id = ag.group_id
where att_current_day
<if test=' pushType == "1" '>
>= #{pushDate}
>= (#{pushDate} - INTERVAL 1 DAY)
</if>
<if test=' pushType == "2" '>
= #{pushDate}
@ -281,7 +285,7 @@
left join att_group g on g.id = ag.group_id
where att_current_day
<if test=' pushType == "1" '>
>= #{pushDate}
>= (#{pushDate} - INTERVAL 1 DAY)
</if>
<if test=' pushType == "2" '>
= #{pushDate}
@ -326,12 +330,12 @@
from zkeco.checkinout c
left join zkeco.iclock i on i.sn = c.sn
left join zkeco.userinfo u on u.userid = c.userid
where DATE_FORMAT(c.checktime, '%Y-%m-%d')
where
<if test=' pushType == "1" '>
>= #{pushDate}
DATE_FORMAT(c.checktime, '%Y-%m-%d') >= (#{pushDate} - INTERVAL 1 DAY)
</if>
<if test=' pushType == "2" '>
= #{pushDate}
DATE_FORMAT(c.checktime, '%Y-%m-%d %H:%i:%s') BETWEEN concat(#{pushDate},' 00:00:00') AND DATE_ADD(DATE_ADD(concat(#{pushDate},' 00:00:00'), INTERVAL 1 DAY), INTERVAL 5 HOUR) - INTERVAL 1 SECOND
</if>
and u.name != '') a
</select>

View File

@ -16,7 +16,7 @@
leave_start_interval,
</if>
leave_end_date,
<if test="leave_end_interval != null">
<if test="leaveEndInterval != null">
leave_end_interval,
</if>
leave_duration,examine_user_id,examine_opinion,examine_time,examine_status,host_user_id,
@ -43,7 +43,7 @@
leave_start_interval,
</if>
leave_end_date,
<if test="leave_end_interval != null">
<if test="leaveEndInterval != null">
leave_end_interval,
</if>
leave_duration,examine_user_id,examine_opinion,examine_time,examine_status,host_user_id,

View File

@ -11,12 +11,12 @@
leave_start_interval,
</if>
leave_end_date,
<if test="leave_end_interval != null">
<if test="leaveEndInterval != null">
leave_end_interval,
</if>
leave_duration, source, create_user_id, is_agree, location, host_user_id,host_user_name, remark
, leave_form_id, submit_id,examine_status,is_outside,is_xizang)
VALUES (#{userId}, #{userName}, #{orgId}, #{orgName}, '出差报备', #{leaveReason},
VALUES (#{userId}, #{userName}, #{orgId}, #{orgName}, '出差', #{leaveReason},
#{leaveStartDate},
<if test="leaveStartInterval != null">
#{leaveStartInterval},
@ -109,7 +109,7 @@
LEFT JOIN sys_user_post p ON p.user_id = l.user_id
LEFT JOIN sys_dict_data d on d.dict_code = p.post_id
WHERE
l.is_active = '1' AND l.leave_type = '出差报备' AND l.source = '1'
l.is_active = '1' AND l.leave_type = '出差' AND l.source = '1'
<if test='bean.userId != null '>
and l.user_id = #{bean.userId}
</if>
@ -177,7 +177,7 @@
LEFT JOIN sys_user_post p ON p.user_id = l.user_id
LEFT JOIN sys_dict_data d on d.dict_code = p.post_id
WHERE l.is_active = '1'
AND l.leave_type = '出差报备'
AND l.leave_type = '出差'
and l.leave_form_id = #{uuid}
GROUP BY l.id,
l.user_id,

View File

@ -10,7 +10,7 @@
leave_start_interval,
</if>
leave_end_date,
<if test="leave_end_interval != null">
<if test="leaveEndInterval != null">
leave_end_interval,
</if>
leave_duration,examine_status,source,create_user_id,is_agree, location, host_user_id, remark,type)

View File

@ -10,7 +10,7 @@
leave_start_interval,
</if>
leave_end_date,
<if test="leave_end_interval != null">
<if test="leaveEndInterval != null">
leave_end_interval,
</if>
leave_duration,examine_status,source,create_user_id,is_agree, location, host_user_id, remark,type)
@ -96,7 +96,7 @@
SELECT #{month} as month,
la.org_id as orgId,
SUM(CASE WHEN la.leave_type = '轮休' and la.examine_status='1' THEN 1 ELSE 0 END) AS leaveNum,
SUM(CASE WHEN la.leave_type = '出差报备' THEN 1 ELSE 0 END) AS businessTripNum,
SUM(CASE WHEN la.leave_type = '出差' THEN 1 ELSE 0 END) AS businessTripNum,
SUM(CASE WHEN la.leave_type = '临时外出' and la.examine_status='1' THEN 1 ELSE 0 END) AS outNum,
SUM(
CASE
@ -167,7 +167,7 @@
when la.leave_type = '婚假' then '休假'
when la.leave_type = '丧假' then '休假'
when la.leave_type = '探亲假' then '休假'
when la.leave_type = '休假报备' then '休假'
when la.leave_type = '休假' then '休假'
when la.leave_type = '育儿假' then '休假'
when la.leave_type = '陪护假' then '休假'
else la.leave_type
@ -229,11 +229,11 @@
</foreach>
and la.source=2
</if>
<if test="type!='出差报备' and holidayType==null">
<if test="type!='出差' and holidayType==null">
AND la.leave_type = #{type}
and la.examine_status='1'
</if>
<if test="type=='出差报备' and holidayType==null">
<if test="type=='出差' and holidayType==null">
AND la.leave_type = #{type}
</if>
<if test="userName!=null and userName!=''">

View File

@ -10,7 +10,7 @@
leave_start_interval,
</if>
leave_end_date,
<if test="leave_end_interval != null">
<if test="leaveEndInterval != null">
leave_end_interval,
</if>
leave_duration,examine_status,source,create_user_id,is_agree, location, host_user_id, remark,type)
@ -118,7 +118,7 @@
SELECT #{month} as month,
la.org_id as orgId,
SUM(CASE WHEN la.leave_type = '轮休' and (la.examine_status='1' or la.examine_status='0') THEN 1 ELSE 0 END) AS leaveNum,
SUM(CASE WHEN la.leave_type = '出差报备' THEN 1 ELSE 0 END) AS businessTripNum,
SUM(CASE WHEN la.leave_type = '出差' THEN 1 ELSE 0 END) AS businessTripNum,
SUM(CASE WHEN la.leave_type = '临时外出' and (la.examine_status='1' or la.examine_status='0') THEN 1 ELSE 0 END) AS outNum,
SUM(
CASE
@ -224,14 +224,14 @@
</foreach>
and la.source=2
</if>
<if test="type!='出差报备' and holidayType==null">
<if test="type!='出差' and holidayType==null">
AND la.leave_type = #{type}
and (
la.examine_status='1' or
la.examine_status='0'
)
</if>
<if test="type=='出差报备' and holidayType==null">
<if test="type=='出差' and holidayType==null">
AND la.leave_type = #{type}
</if>
<if test="userName!=null and userName!=''">

View File

@ -21,8 +21,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select IFNULL(sum(toWorkAttStatus = 2 or offWorkAttStatus = 2), 0) as lateNum,
IFNULL(sum(toWorkAttStatus = 4 or offWorkAttStatus = 4), 0) as earlyNum,
IFNULL(sum(toWorkAttStatus = 3 or offWorkAttStatus = 3), 0) as skippingNum,
IFNULL(sum(toWorkAttStatus in(12, 13, 14, 15, 16, 17, 18) or
offWorkAttStatus in(12, 13, 14, 15, 16, 17, 18)), 0) as leaveNum,
IFNULL(sum(toWorkAttStatus in(SELECT dict_value
FROM sys_dict_data
where dict_type = 'att_status' and is_leave = '1' ) or
offWorkAttStatus in(SELECT dict_value
FROM sys_dict_data
where dict_type = 'att_status' and is_leave = '1')), 0) as leaveNum,
IFNULL(sum(toWorkAttStatus = 9 or offWorkAttStatus = 9), 0) as addressErrorNum,
IFNULL(sum(toWorkAttStatus = 8 or offWorkAttStatus = 8), 0) as einErrorNum
from v_att_update_data
@ -50,8 +54,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select IFNULL(sum(toWorkAttStatus = 2 or offWorkAttStatus = 2), 0) as lateNum,
IFNULL(sum(toWorkAttStatus = 4 or offWorkAttStatus = 4), 0) as earlyNum,
IFNULL(sum(toWorkAttStatus = 3 or offWorkAttStatus = 3), 0) as skippingNum,
IFNULL(sum(toWorkAttStatus in(12, 13, 14, 15, 16, 17, 18) or
offWorkAttStatus in(12, 13, 14, 15, 16, 17, 18)), 0) as leaveNum,
IFNULL(sum(toWorkAttStatus in(SELECT dict_value
FROM sys_dict_data
where dict_type = 'att_status' and is_leave = '1') or
offWorkAttStatus in(SELECT dict_value
FROM sys_dict_data
where dict_type = 'att_status' and is_leave = '1')), 0) as leaveNum,
IFNULL(sum(toWorkAttStatus = 9 or offWorkAttStatus = 9), 0) as addressErrorNum,
IFNULL(sum(toWorkAttStatus = 8 or offWorkAttStatus = 8), 0) as einErrorNum
from v_att_update_data

View File

@ -31,7 +31,7 @@
LEFT JOIN sys_user_post p ON p.user_id = l.user_id
LEFT JOIN sys_dict_data d on d.dict_code = p.post_id
WHERE
l.is_active = '1' AND l.leave_type = '休假报备' AND (l.source = '1' OR l.source = '3')
l.is_active = '1' AND l.leave_type = '休假' AND (l.source = '1' OR l.source = '3')
<if test="params.params.beginTime != null and params.params.beginTime != ''"><!-- 开始时间检索 -->
and date_format(l.leave_start_date,'%y%m%d') &gt;= date_format(#{params.params.beginTime},'%y%m%d')
</if>