修改假期,节假日定时器
This commit is contained in:
parent
5739f5c9dd
commit
69e2b67226
|
|
@ -11,7 +11,7 @@ public enum AttStatus {
|
||||||
临时外出("7"),
|
临时外出("7"),
|
||||||
出入异常("8"),
|
出入异常("8"),
|
||||||
打卡地异常("9"),
|
打卡地异常("9"),
|
||||||
出差报备("10"),
|
出差("10"),
|
||||||
法("11"),
|
法("11"),
|
||||||
年("12"),
|
年("12"),
|
||||||
探("13"),
|
探("13"),
|
||||||
|
|
@ -45,7 +45,7 @@ public enum AttStatus {
|
||||||
return "√";
|
return "√";
|
||||||
}else if (this == AttStatus.未){
|
}else if (this == AttStatus.未){
|
||||||
return "旷";
|
return "旷";
|
||||||
}else if (this == AttStatus.出差报备){
|
}else if (this == AttStatus.出差){
|
||||||
return "△";
|
return "△";
|
||||||
}
|
}
|
||||||
return this.name();
|
return this.name();
|
||||||
|
|
|
||||||
|
|
@ -346,7 +346,7 @@ public class AttTasks {
|
||||||
*
|
*
|
||||||
* @return 考勤组集合
|
* @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())).
|
List<AttGroupBean> groupList = Optional.ofNullable(attGroupDao.selectAttGroupList(new AttGroupBean())).
|
||||||
orElseGet(ArrayList::new);
|
orElseGet(ArrayList::new);
|
||||||
|
|
@ -841,7 +841,8 @@ public class AttTasks {
|
||||||
if (items.isEmpty()) {
|
if (items.isEmpty()) {
|
||||||
continue; // 如果列表为空,跳过
|
continue; // 如果列表为空,跳过
|
||||||
}
|
}
|
||||||
|
//五点之前的数据属于过来当天的下班打卡,不计入
|
||||||
|
LocalTime noonEnd = LocalTime.of(5, 0);
|
||||||
// 获取上班时间并转换为 LocalTime 以便比较
|
// 获取上班时间并转换为 LocalTime 以便比较
|
||||||
LocalTime toWorkTime = LocalTime.parse(attGroupBean.getToWorkTime(), timeFormatter);
|
LocalTime toWorkTime = LocalTime.parse(attGroupBean.getToWorkTime(), timeFormatter);
|
||||||
// 初始化变量来保存最接近上班时间的数据项及其索引
|
// 初始化变量来保存最接近上班时间的数据项及其索引
|
||||||
|
|
@ -859,7 +860,7 @@ public class AttTasks {
|
||||||
// 只提取时间部分进行比较
|
// 只提取时间部分进行比较
|
||||||
LocalTime recordTime = LocalTime.parse(item.getAttCurrentTime().substring(11), timeFormatter);
|
LocalTime recordTime = LocalTime.parse(item.getAttCurrentTime().substring(11), timeFormatter);
|
||||||
// 检查是否在上班时间之前并且是目前找到的最接近上班时间的
|
// 检查是否在上班时间之前并且是目前找到的最接近上班时间的
|
||||||
if (recordTime.isBefore(toWorkTime) &&
|
if (recordTime.isBefore(toWorkTime) && recordTime.isAfter(noonEnd) &&
|
||||||
(closestBeforeToWork == null ||
|
(closestBeforeToWork == null ||
|
||||||
recordTime.isAfter(LocalTime.parse(closestBeforeToWork.getAttCurrentTime().substring(11), timeFormatter)))) {
|
recordTime.isAfter(LocalTime.parse(closestBeforeToWork.getAttCurrentTime().substring(11), timeFormatter)))) {
|
||||||
closestBeforeToWork = item;
|
closestBeforeToWork = item;
|
||||||
|
|
@ -1093,7 +1094,7 @@ public class AttTasks {
|
||||||
*
|
*
|
||||||
* @param groupList 考勤组集合
|
* @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);
|
List<AttDayReportBean> dayReportList = attSourceDataDao.selectAttDayReport(pushDate, pushType);
|
||||||
//日报表新增
|
//日报表新增
|
||||||
|
|
|
||||||
|
|
@ -774,7 +774,7 @@ public class ExportFileController {
|
||||||
vo.setLeaveDate(dateString);
|
vo.setLeaveDate(dateString);
|
||||||
personExportVoList.add(vo);
|
personExportVoList.add(vo);
|
||||||
}
|
}
|
||||||
extracted(personExportVoList, LeaveReportingBean.class, "休假报备导出", "休假报备导出", "休假报备导出", response);
|
extracted(personExportVoList, LeaveReportingBean.class, "休假导出", "休假导出", "休假导出", response);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e.toString(), e);
|
log.error(e.toString(), e);
|
||||||
}
|
}
|
||||||
|
|
@ -814,7 +814,7 @@ public class ExportFileController {
|
||||||
vo.setLeaveDate(dateString);
|
vo.setLeaveDate(dateString);
|
||||||
personExportVoList.add(vo);
|
personExportVoList.add(vo);
|
||||||
}
|
}
|
||||||
extracted(personExportVoList, EvectionBean.class, "出差报备导出", "出差报备导出", "出差报备导出", response);
|
extracted(personExportVoList, EvectionBean.class, "出差导出", "出差导出", "出差导出", response);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e.toString(), e);
|
log.error(e.toString(), e);
|
||||||
}
|
}
|
||||||
|
|
@ -924,7 +924,7 @@ public class ExportFileController {
|
||||||
attStatus = "出差";
|
attStatus = "出差";
|
||||||
break;
|
break;
|
||||||
case "19":
|
case "19":
|
||||||
attStatus = "出差报备";
|
attStatus = "育儿假";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
attStatus = "休假";
|
attStatus = "休假";
|
||||||
|
|
@ -967,7 +967,7 @@ public class ExportFileController {
|
||||||
vo.setLeaveDate(dateString);
|
vo.setLeaveDate(dateString);
|
||||||
personExportVoList.add(vo);
|
personExportVoList.add(vo);
|
||||||
}
|
}
|
||||||
extracted(personExportVoList, WechatLeaveReportingBean.class, "数据管理-休假报备导出", "数据管理-休假报备导出", "数据管理-休假报备导出", response);
|
extracted(personExportVoList, WechatLeaveReportingBean.class, "数据管理-休假导出", "数据管理-休假导出", "数据管理-休假导出", response);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e.toString(), e);
|
log.error(e.toString(), e);
|
||||||
}
|
}
|
||||||
|
|
@ -1007,7 +1007,7 @@ public class ExportFileController {
|
||||||
vo.setLeaveDate(dateString);
|
vo.setLeaveDate(dateString);
|
||||||
personExportVoList.add(vo);
|
personExportVoList.add(vo);
|
||||||
}
|
}
|
||||||
extracted(personExportVoList, WechatEvectionBean.class, "数据管理-出差报备导出", "数据管理-出差报备导出", "数据管理-出差报备导出", response);
|
extracted(personExportVoList, WechatEvectionBean.class, "数据管理-出差导出", "数据管理-出差导出", "数据管理-出差导出", response);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e.toString(), e);
|
log.error(e.toString(), e);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ public class RequestReportServiceImpl implements RequestReportService {
|
||||||
if ("临时外出".equals(bean.getLeaveTypes())){
|
if ("临时外出".equals(bean.getLeaveTypes())){
|
||||||
bean.setLeaveTypes("临时外出");
|
bean.setLeaveTypes("临时外出");
|
||||||
} else if ("出差".equals(bean.getLeaveTypes())){
|
} else if ("出差".equals(bean.getLeaveTypes())){
|
||||||
bean.setLeaveTypes("出差报备");
|
bean.setLeaveTypes("出差");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<WorkReportBean> workReportList = dao.getWorkReportList(bean);
|
List<WorkReportBean> workReportList = dao.getWorkReportList(bean);
|
||||||
|
|
|
||||||
|
|
@ -178,7 +178,7 @@ public class WechatController extends BaseController {
|
||||||
attStatus = "出差";
|
attStatus = "出差";
|
||||||
break;
|
break;
|
||||||
case "19":
|
case "19":
|
||||||
attStatus = "出差报备";
|
attStatus = "育儿假";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
attStatus = "休假";
|
attStatus = "休假";
|
||||||
|
|
|
||||||
|
|
@ -11,11 +11,11 @@
|
||||||
leave_start_interval,
|
leave_start_interval,
|
||||||
</if>
|
</if>
|
||||||
leave_end_date,
|
leave_end_date,
|
||||||
<if test="leave_end_interval != null">
|
<if test="leaveEndInterval != null">
|
||||||
leave_end_interval,
|
leave_end_interval,
|
||||||
</if>
|
</if>
|
||||||
leave_duration, source, create_user_id, is_agree, location, host_user_id,host_user_name, remark,examine_status)
|
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},
|
#{leaveStartDate},
|
||||||
<if test="leaveStartInterval != null">
|
<if test="leaveStartInterval != null">
|
||||||
#{leaveStartInterval},
|
#{leaveStartInterval},
|
||||||
|
|
@ -102,7 +102,7 @@
|
||||||
LEFT JOIN sys_user_post p ON p.user_id = l.user_id
|
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
|
LEFT JOIN sys_dict_data d on d.dict_code = p.post_id
|
||||||
WHERE
|
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 '>
|
<if test='params.userId != null '>
|
||||||
and l.user_id = #{params.userId}
|
and l.user_id = #{params.userId}
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@
|
||||||
att_status = CASE
|
att_status = CASE
|
||||||
WHEN att_status in (SELECT dict_value
|
WHEN att_status in (SELECT dict_value
|
||||||
FROM sys_dict_data
|
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}
|
ELSE #{params.attStatus}
|
||||||
END
|
END
|
||||||
where user_id = #{params.userId} and org_id = #{params.orgId}
|
where user_id = #{params.userId} and org_id = #{params.orgId}
|
||||||
|
|
@ -84,7 +84,7 @@
|
||||||
att_status = CASE
|
att_status = CASE
|
||||||
WHEN att_status in (SELECT dict_value
|
WHEN att_status in (SELECT dict_value
|
||||||
FROM sys_dict_data
|
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}
|
ELSE #{params.attStatus}
|
||||||
END
|
END
|
||||||
where is_update = 0 and user_id = #{params.userId} and org_id = #{params.orgId}
|
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
|
from gz_cloud.fc_sup_attendance sup
|
||||||
where sup.attendance_date
|
where sup.attendance_date
|
||||||
<if test=' pushType == "1" '>
|
<if test=' pushType == "1" '>
|
||||||
>= #{pushDate}
|
>= (#{pushDate} - INTERVAL 1 DAY)
|
||||||
</if>
|
</if>
|
||||||
<if test=' pushType == "2" '>
|
<if test=' pushType == "2" '>
|
||||||
= #{pushDate}
|
= #{pushDate}
|
||||||
|
|
@ -177,16 +177,20 @@
|
||||||
<select id="selectAttDayReport" resultType="com.bonus.system.att.entity.AttDayReportBean">
|
<select id="selectAttDayReport" resultType="com.bonus.system.att.entity.AttDayReportBean">
|
||||||
select att_current_day,
|
select att_current_day,
|
||||||
org_id,
|
org_id,
|
||||||
IFNULL(sum(toWorkAttStatus = 1 and offWorkAttStatus = 1), 0) as normalNum,
|
IFNULL(sum(IFNULL(toWorkUpdateAttStatus,toWorkAttStatus) = 1 and IFNULL(offWorkUpdateAttStatus,offWorkAttStatus) = 1), 0) as normalNum,
|
||||||
IFNULL(sum(toWorkAttStatus = 2 or offWorkAttStatus = 2), 0) as lateNum,
|
IFNULL(sum(IFNULL(toWorkUpdateAttStatus,toWorkAttStatus) = 2 or IFNULL(offWorkUpdateAttStatus,offWorkAttStatus) = 2), 0) as lateNum,
|
||||||
IFNULL(sum(toWorkAttStatus = 3 or offWorkAttStatus = 3), 0) as skippingNum,
|
IFNULL(sum(IFNULL(toWorkUpdateAttStatus,toWorkAttStatus) = 3 or IFNULL(offWorkUpdateAttStatus,offWorkAttStatus) = 3), 0) as skippingNum,
|
||||||
IFNULL(sum(toWorkAttStatus = 4 or offWorkAttStatus = 4), 0) as earlyNum,
|
IFNULL(sum(IFNULL(toWorkUpdateAttStatus,toWorkAttStatus) = 4 or IFNULL(offWorkUpdateAttStatus,offWorkAttStatus) = 4), 0) as earlyNum,
|
||||||
IFNULL(sum(toWorkAttStatus = 5 or offWorkAttStatus = 5), 0) as restNum,
|
IFNULL(sum(IFNULL(toWorkUpdateAttStatus,toWorkAttStatus) = 5 or IFNULL(offWorkUpdateAttStatus,offWorkAttStatus) = 5), 0) as restNum,
|
||||||
IFNULL(sum(toWorkAttStatus in (12, 13, 14, 15, 16, 17, 18) or
|
IFNULL(sum(IFNULL(toWorkUpdateAttStatus,toWorkAttStatus) in (SELECT dict_value
|
||||||
offWorkAttStatus in (12, 13, 14, 15, 16, 17, 18)), 0) as leaveNum,
|
FROM sys_dict_data
|
||||||
IFNULL(sum(toWorkAttStatus = 7 or offWorkAttStatus = 7), 0) as outNum,
|
where dict_type = 'att_status' and is_leave = '1') or
|
||||||
IFNULL(sum(toWorkAttStatus = 8 or offWorkAttStatus = 8), 0) as einErrorNum,
|
IFNULL(offWorkUpdateAttStatus,offWorkAttStatus) in (SELECT dict_value
|
||||||
IFNULL(sum(toWorkAttStatus = 9 or offWorkAttStatus = 9), 0) as addressErrorNum
|
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
|
from v_att_update_data
|
||||||
where att_current_day
|
where att_current_day
|
||||||
<if test=' pushType == "1" '>
|
<if test=' pushType == "1" '>
|
||||||
|
|
@ -196,45 +200,45 @@
|
||||||
= #{pushDate}
|
= #{pushDate}
|
||||||
</if>
|
</if>
|
||||||
GROUP BY att_current_day, org_id
|
GROUP BY att_current_day, org_id
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectAttMonthReport" resultType="com.bonus.system.att.entity.AttMonthReportBean">
|
<select id="selectAttMonthReport" resultType="com.bonus.system.att.entity.AttMonthReportBean">
|
||||||
select v.org_id,
|
select v.org_id,
|
||||||
v.user_id,
|
v.user_id,
|
||||||
su.user_name,
|
su.user_name,
|
||||||
so.org_name,
|
so.org_name,
|
||||||
g.group_id,
|
g.group_id,
|
||||||
DATE_FORMAT(att_current_day, '%Y-%m') as attCurrentMonth,
|
DATE_FORMAT(att_current_day, '%Y-%m') as attCurrentMonth,
|
||||||
IFNULL(sum(toWorkAttStatus = 1 and offWorkAttStatus = 1), 0) as normalNum,
|
IFNULL(sum(IFNULL(toWorkUpdateAttStatus,toWorkAttStatus) = 1 and IFNULL(offWorkUpdateAttStatus,offWorkAttStatus) = 1), 0) as normalNum,
|
||||||
IFNULL(sum(toWorkAttStatus = 2 or offWorkAttStatus = 2), 0) as lateNum,
|
IFNULL(sum(IFNULL(toWorkUpdateAttStatus,toWorkAttStatus) = 2 or IFNULL(offWorkUpdateAttStatus,offWorkAttStatus) = 2), 0) as lateNum,
|
||||||
IFNULL(sum(toWorkAttStatus = 3 or offWorkAttStatus = 3), 0) as skippingNum,
|
IFNULL(sum(IFNULL(toWorkUpdateAttStatus,toWorkAttStatus) = 3 or IFNULL(offWorkUpdateAttStatus,offWorkAttStatus) = 3), 0) as skippingNum,
|
||||||
IFNULL(sum(toWorkAttStatus = 4 or offWorkAttStatus = 4), 0) as earlyNum,
|
IFNULL(sum(IFNULL(toWorkUpdateAttStatus,toWorkAttStatus) = 4 or IFNULL(offWorkUpdateAttStatus,offWorkAttStatus) = 4), 0) as earlyNum,
|
||||||
IFNULL(sum(toWorkAttStatus = 5 or offWorkAttStatus = 5), 0) as restNum,
|
IFNULL(sum(IFNULL(toWorkUpdateAttStatus,toWorkAttStatus) = 5 or IFNULL(offWorkUpdateAttStatus,offWorkAttStatus) = 5), 0) as restNum,
|
||||||
IFNULL(sum(toWorkAttStatus in (12, 13, 14, 15, 16, 17, 18) or
|
IFNULL(sum(IFNULL(toWorkUpdateAttStatus,toWorkAttStatus) in (SELECT dict_value
|
||||||
offWorkAttStatus in (12, 13, 14, 15, 16, 17, 18)), 0) as leaveNum,
|
FROM sys_dict_data
|
||||||
IFNULL(sum(toWorkAttStatus = 7 or offWorkAttStatus = 7), 0) as outNum,
|
where dict_type = 'att_status' and is_leave = '1') or
|
||||||
IFNULL(sum(toWorkAttStatus = 8 or offWorkAttStatus = 8), 0) as einErrorNum,
|
IFNULL(offWorkUpdateAttStatus,offWorkAttStatus) in (SELECT dict_value
|
||||||
IFNULL(sum(toWorkAttStatus = 9 or offWorkAttStatus = 9), 0) as addressErrorNum
|
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
|
from v_att_update_data v
|
||||||
left join sys_user su on su.user_id = v.user_id
|
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 sys_organization so on so.id = v.org_id
|
||||||
left join att_group_person_relation g
|
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
|
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')
|
where DATE_FORMAT(att_current_day, '%Y-%m') = DATE_FORMAT(#{pushDate}, '%Y-%m')
|
||||||
and g.group_id is not null
|
and g.group_id is not null
|
||||||
GROUP BY DATE_FORMAT(att_current_day, '%Y-%m'), v.org_id, v.user_id;
|
GROUP BY DATE_FORMAT(att_current_day, '%Y-%m'), v.user_id;
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectHolidayByMonth" resultType="com.bonus.system.att.entity.Holiday">
|
<select id="selectHolidayByMonth" resultType="com.bonus.system.att.entity.Holiday">
|
||||||
select *
|
select *
|
||||||
from sys_holiday
|
from sys_holiday
|
||||||
where `date`
|
where
|
||||||
<if test=' pushType == "1" '>
|
DATE_FORMAT(`date`, '%Y-%m') = DATE_FORMAT(#{pushDate}, '%Y-%m')
|
||||||
>= #{pushDate}
|
|
||||||
</if>
|
|
||||||
<if test=' pushType == "2" '>
|
|
||||||
= #{pushDate}
|
|
||||||
</if>
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getPersonLeaveApplyStatus" resultType="java.lang.Integer">
|
<select id="getPersonLeaveApplyStatus" resultType="java.lang.Integer">
|
||||||
|
|
@ -263,7 +267,7 @@
|
||||||
left join att_group g on g.id = ag.group_id
|
left join att_group g on g.id = ag.group_id
|
||||||
where att_current_day
|
where att_current_day
|
||||||
<if test=' pushType == "1" '>
|
<if test=' pushType == "1" '>
|
||||||
>= #{pushDate}
|
>= (#{pushDate} - INTERVAL 1 DAY)
|
||||||
</if>
|
</if>
|
||||||
<if test=' pushType == "2" '>
|
<if test=' pushType == "2" '>
|
||||||
= #{pushDate}
|
= #{pushDate}
|
||||||
|
|
@ -281,7 +285,7 @@
|
||||||
left join att_group g on g.id = ag.group_id
|
left join att_group g on g.id = ag.group_id
|
||||||
where att_current_day
|
where att_current_day
|
||||||
<if test=' pushType == "1" '>
|
<if test=' pushType == "1" '>
|
||||||
>= #{pushDate}
|
>= (#{pushDate} - INTERVAL 1 DAY)
|
||||||
</if>
|
</if>
|
||||||
<if test=' pushType == "2" '>
|
<if test=' pushType == "2" '>
|
||||||
= #{pushDate}
|
= #{pushDate}
|
||||||
|
|
@ -326,12 +330,12 @@
|
||||||
from zkeco.checkinout c
|
from zkeco.checkinout c
|
||||||
left join zkeco.iclock i on i.sn = c.sn
|
left join zkeco.iclock i on i.sn = c.sn
|
||||||
left join zkeco.userinfo u on u.userid = c.userid
|
left join zkeco.userinfo u on u.userid = c.userid
|
||||||
where DATE_FORMAT(c.checktime, '%Y-%m-%d')
|
where
|
||||||
<if test=' pushType == "1" '>
|
<if test=' pushType == "1" '>
|
||||||
>= #{pushDate}
|
DATE_FORMAT(c.checktime, '%Y-%m-%d') >= (#{pushDate} - INTERVAL 1 DAY)
|
||||||
</if>
|
</if>
|
||||||
<if test=' pushType == "2" '>
|
<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>
|
</if>
|
||||||
and u.name != '') a
|
and u.name != '') a
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
leave_start_interval,
|
leave_start_interval,
|
||||||
</if>
|
</if>
|
||||||
leave_end_date,
|
leave_end_date,
|
||||||
<if test="leave_end_interval != null">
|
<if test="leaveEndInterval != null">
|
||||||
leave_end_interval,
|
leave_end_interval,
|
||||||
</if>
|
</if>
|
||||||
leave_duration,examine_user_id,examine_opinion,examine_time,examine_status,host_user_id,
|
leave_duration,examine_user_id,examine_opinion,examine_time,examine_status,host_user_id,
|
||||||
|
|
@ -43,7 +43,7 @@
|
||||||
leave_start_interval,
|
leave_start_interval,
|
||||||
</if>
|
</if>
|
||||||
leave_end_date,
|
leave_end_date,
|
||||||
<if test="leave_end_interval != null">
|
<if test="leaveEndInterval != null">
|
||||||
leave_end_interval,
|
leave_end_interval,
|
||||||
</if>
|
</if>
|
||||||
leave_duration,examine_user_id,examine_opinion,examine_time,examine_status,host_user_id,
|
leave_duration,examine_user_id,examine_opinion,examine_time,examine_status,host_user_id,
|
||||||
|
|
|
||||||
|
|
@ -11,12 +11,12 @@
|
||||||
leave_start_interval,
|
leave_start_interval,
|
||||||
</if>
|
</if>
|
||||||
leave_end_date,
|
leave_end_date,
|
||||||
<if test="leave_end_interval != null">
|
<if test="leaveEndInterval != null">
|
||||||
leave_end_interval,
|
leave_end_interval,
|
||||||
</if>
|
</if>
|
||||||
leave_duration, source, create_user_id, is_agree, location, host_user_id,host_user_name, remark
|
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)
|
, leave_form_id, submit_id,examine_status,is_outside,is_xizang)
|
||||||
VALUES (#{userId}, #{userName}, #{orgId}, #{orgName}, '出差报备', #{leaveReason},
|
VALUES (#{userId}, #{userName}, #{orgId}, #{orgName}, '出差', #{leaveReason},
|
||||||
#{leaveStartDate},
|
#{leaveStartDate},
|
||||||
<if test="leaveStartInterval != null">
|
<if test="leaveStartInterval != null">
|
||||||
#{leaveStartInterval},
|
#{leaveStartInterval},
|
||||||
|
|
@ -109,7 +109,7 @@
|
||||||
LEFT JOIN sys_user_post p ON p.user_id = l.user_id
|
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
|
LEFT JOIN sys_dict_data d on d.dict_code = p.post_id
|
||||||
WHERE
|
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 '>
|
<if test='bean.userId != null '>
|
||||||
and l.user_id = #{bean.userId}
|
and l.user_id = #{bean.userId}
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -177,7 +177,7 @@
|
||||||
LEFT JOIN sys_user_post p ON p.user_id = l.user_id
|
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
|
LEFT JOIN sys_dict_data d on d.dict_code = p.post_id
|
||||||
WHERE l.is_active = '1'
|
WHERE l.is_active = '1'
|
||||||
AND l.leave_type = '出差报备'
|
AND l.leave_type = '出差'
|
||||||
and l.leave_form_id = #{uuid}
|
and l.leave_form_id = #{uuid}
|
||||||
GROUP BY l.id,
|
GROUP BY l.id,
|
||||||
l.user_id,
|
l.user_id,
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
leave_start_interval,
|
leave_start_interval,
|
||||||
</if>
|
</if>
|
||||||
leave_end_date,
|
leave_end_date,
|
||||||
<if test="leave_end_interval != null">
|
<if test="leaveEndInterval != null">
|
||||||
leave_end_interval,
|
leave_end_interval,
|
||||||
</if>
|
</if>
|
||||||
leave_duration,examine_status,source,create_user_id,is_agree, location, host_user_id, remark,type)
|
leave_duration,examine_status,source,create_user_id,is_agree, location, host_user_id, remark,type)
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
leave_start_interval,
|
leave_start_interval,
|
||||||
</if>
|
</if>
|
||||||
leave_end_date,
|
leave_end_date,
|
||||||
<if test="leave_end_interval != null">
|
<if test="leaveEndInterval != null">
|
||||||
leave_end_interval,
|
leave_end_interval,
|
||||||
</if>
|
</if>
|
||||||
leave_duration,examine_status,source,create_user_id,is_agree, location, host_user_id, remark,type)
|
leave_duration,examine_status,source,create_user_id,is_agree, location, host_user_id, remark,type)
|
||||||
|
|
@ -96,7 +96,7 @@
|
||||||
SELECT #{month} as month,
|
SELECT #{month} as month,
|
||||||
la.org_id as orgId,
|
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 = '轮休' 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 WHEN la.leave_type = '临时外出' and la.examine_status='1' THEN 1 ELSE 0 END) AS outNum,
|
||||||
SUM(
|
SUM(
|
||||||
CASE
|
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 '休假'
|
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
|
else la.leave_type
|
||||||
|
|
@ -229,11 +229,11 @@
|
||||||
</foreach>
|
</foreach>
|
||||||
and la.source=2
|
and la.source=2
|
||||||
</if>
|
</if>
|
||||||
<if test="type!='出差报备' and holidayType==null">
|
<if test="type!='出差' and holidayType==null">
|
||||||
AND la.leave_type = #{type}
|
AND la.leave_type = #{type}
|
||||||
and la.examine_status='1'
|
and la.examine_status='1'
|
||||||
</if>
|
</if>
|
||||||
<if test="type=='出差报备' and holidayType==null">
|
<if test="type=='出差' and holidayType==null">
|
||||||
AND la.leave_type = #{type}
|
AND la.leave_type = #{type}
|
||||||
</if>
|
</if>
|
||||||
<if test="userName!=null and userName!=''">
|
<if test="userName!=null and userName!=''">
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
leave_start_interval,
|
leave_start_interval,
|
||||||
</if>
|
</if>
|
||||||
leave_end_date,
|
leave_end_date,
|
||||||
<if test="leave_end_interval != null">
|
<if test="leaveEndInterval != null">
|
||||||
leave_end_interval,
|
leave_end_interval,
|
||||||
</if>
|
</if>
|
||||||
leave_duration,examine_status,source,create_user_id,is_agree, location, host_user_id, remark,type)
|
leave_duration,examine_status,source,create_user_id,is_agree, location, host_user_id, remark,type)
|
||||||
|
|
@ -118,7 +118,7 @@
|
||||||
SELECT #{month} as month,
|
SELECT #{month} as month,
|
||||||
la.org_id as orgId,
|
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 = '轮休' 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 WHEN la.leave_type = '临时外出' and (la.examine_status='1' or la.examine_status='0') THEN 1 ELSE 0 END) AS outNum,
|
||||||
SUM(
|
SUM(
|
||||||
CASE
|
CASE
|
||||||
|
|
@ -224,14 +224,14 @@
|
||||||
</foreach>
|
</foreach>
|
||||||
and la.source=2
|
and la.source=2
|
||||||
</if>
|
</if>
|
||||||
<if test="type!='出差报备' and holidayType==null">
|
<if test="type!='出差' and holidayType==null">
|
||||||
AND la.leave_type = #{type}
|
AND la.leave_type = #{type}
|
||||||
and (
|
and (
|
||||||
la.examine_status='1' or
|
la.examine_status='1' or
|
||||||
la.examine_status='0'
|
la.examine_status='0'
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
<if test="type=='出差报备' and holidayType==null">
|
<if test="type=='出差' and holidayType==null">
|
||||||
AND la.leave_type = #{type}
|
AND la.leave_type = #{type}
|
||||||
</if>
|
</if>
|
||||||
<if test="userName!=null and userName!=''">
|
<if test="userName!=null and userName!=''">
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
select IFNULL(sum(toWorkAttStatus = 2 or offWorkAttStatus = 2), 0) as lateNum,
|
select IFNULL(sum(toWorkAttStatus = 2 or offWorkAttStatus = 2), 0) as lateNum,
|
||||||
IFNULL(sum(toWorkAttStatus = 4 or offWorkAttStatus = 4), 0) as earlyNum,
|
IFNULL(sum(toWorkAttStatus = 4 or offWorkAttStatus = 4), 0) as earlyNum,
|
||||||
IFNULL(sum(toWorkAttStatus = 3 or offWorkAttStatus = 3), 0) as skippingNum,
|
IFNULL(sum(toWorkAttStatus = 3 or offWorkAttStatus = 3), 0) as skippingNum,
|
||||||
IFNULL(sum(toWorkAttStatus in(12, 13, 14, 15, 16, 17, 18) or
|
IFNULL(sum(toWorkAttStatus in(SELECT dict_value
|
||||||
offWorkAttStatus in(12, 13, 14, 15, 16, 17, 18)), 0) as leaveNum,
|
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 = 9 or offWorkAttStatus = 9), 0) as addressErrorNum,
|
||||||
IFNULL(sum(toWorkAttStatus = 8 or offWorkAttStatus = 8), 0) as einErrorNum
|
IFNULL(sum(toWorkAttStatus = 8 or offWorkAttStatus = 8), 0) as einErrorNum
|
||||||
from v_att_update_data
|
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,
|
select IFNULL(sum(toWorkAttStatus = 2 or offWorkAttStatus = 2), 0) as lateNum,
|
||||||
IFNULL(sum(toWorkAttStatus = 4 or offWorkAttStatus = 4), 0) as earlyNum,
|
IFNULL(sum(toWorkAttStatus = 4 or offWorkAttStatus = 4), 0) as earlyNum,
|
||||||
IFNULL(sum(toWorkAttStatus = 3 or offWorkAttStatus = 3), 0) as skippingNum,
|
IFNULL(sum(toWorkAttStatus = 3 or offWorkAttStatus = 3), 0) as skippingNum,
|
||||||
IFNULL(sum(toWorkAttStatus in(12, 13, 14, 15, 16, 17, 18) or
|
IFNULL(sum(toWorkAttStatus in(SELECT dict_value
|
||||||
offWorkAttStatus in(12, 13, 14, 15, 16, 17, 18)), 0) as leaveNum,
|
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 = 9 or offWorkAttStatus = 9), 0) as addressErrorNum,
|
||||||
IFNULL(sum(toWorkAttStatus = 8 or offWorkAttStatus = 8), 0) as einErrorNum
|
IFNULL(sum(toWorkAttStatus = 8 or offWorkAttStatus = 8), 0) as einErrorNum
|
||||||
from v_att_update_data
|
from v_att_update_data
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
LEFT JOIN sys_user_post p ON p.user_id = l.user_id
|
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
|
LEFT JOIN sys_dict_data d on d.dict_code = p.post_id
|
||||||
WHERE
|
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 != ''"><!-- 开始时间检索 -->
|
<if test="params.params.beginTime != null and params.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
and date_format(l.leave_start_date,'%y%m%d') >= date_format(#{params.params.beginTime},'%y%m%d')
|
and date_format(l.leave_start_date,'%y%m%d') >= date_format(#{params.params.beginTime},'%y%m%d')
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue