修改考勤规则记录所在时间
This commit is contained in:
parent
bd059632ce
commit
830e77d4bf
|
|
@ -160,7 +160,7 @@ public class MsgTasks {
|
|||
* 考勤设置历史时间消息推送
|
||||
*每天早七晚十一
|
||||
*/
|
||||
// @Scheduled(cron = "0 10 0,7,10 * * ?")
|
||||
// @Scheduled(cron = "0 10 0,7,22 * * ?")
|
||||
@Scheduled(initialDelay = 6000 * 2,fixedDelay = 60000 * 30)
|
||||
@Async
|
||||
public void getAttSettingHistoryTask(){
|
||||
|
|
@ -169,10 +169,10 @@ public class MsgTasks {
|
|||
// 解析 startDate 字符串到 LocalDate 对象
|
||||
LocalDate date = LocalDate.parse(startDate, DateTimeFormatter.ISO_LOCAL_DATE);
|
||||
// 向前推30天
|
||||
LocalDate newDate = date.minusDays(30);
|
||||
LocalDate newDate = date.minusDays(60);
|
||||
// 如果需要将结果格式化为特定格式的字符串,可以使用以下代码
|
||||
String formattedNewDate = newDate.format(DateTimeFormatter.ISO_LOCAL_DATE);
|
||||
//向前推2个月的时间检索,缺少哪一天推送哪一天
|
||||
//向前推1个月的时间检索,缺少哪一天推送哪一天
|
||||
List<String> dateListOne = noticeService.getAttSettingDate(startDate);
|
||||
List<String> dateList = getStrDateListBetween(formattedNewDate, startDate);
|
||||
// 从 dateList 中移除所有在 dateListOne 中存在的元素
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@
|
|||
END
|
||||
where user_id = #{params.userId} and org_id = #{params.orgId}
|
||||
AND att_current_day = #{params.attCurrentDay} and att_type = #{params.attType};
|
||||
|
||||
update att_data_update set att_current_time = #{params.attCurrentTime},
|
||||
att_address = #{params.attAddress}, att_lon = #{params.attLon}, att_lat = #{params.attLat},
|
||||
data_source = #{params.dataSource},
|
||||
|
|
@ -93,17 +94,16 @@
|
|||
</update>
|
||||
|
||||
<update id="updateAttData">
|
||||
update att_data set att_status = #{v.attStatus}
|
||||
where user_id = #{v.userId} and org_id = #{v.orgId}
|
||||
and att_current_day = #{v.attCurrentDay} and att_type = #{v.attType}
|
||||
update att_data set att_status = #{v.attStatus},org_id = #{v.orgId}
|
||||
where user_id = #{v.userId} and att_current_day = #{v.attCurrentDay} and att_type = #{v.attType}
|
||||
<if test='type == "1"'>
|
||||
and att_status = 0
|
||||
</if>
|
||||
</update>
|
||||
|
||||
<update id="updateAttUpdateData">
|
||||
update att_data_update set att_status = #{v.attStatus}
|
||||
where is_update = 0 and user_id = #{v.userId} and org_id = #{v.orgId}
|
||||
update att_data_update set att_status = #{v.attStatus},org_id = #{v.orgId}
|
||||
where is_update = 0 and user_id = #{v.userId}
|
||||
and att_current_day = #{v.attCurrentDay} and att_type = #{v.attType}
|
||||
<if test='type == "1"'>
|
||||
and att_status = 0
|
||||
|
|
@ -278,13 +278,7 @@
|
|||
left join sys_user su on su.id_number = asd.id_number
|
||||
left join att_setting_history ag on ag.user_id = su.user_id and ag.current_day = #{pushDate}
|
||||
left join att_group g on g.id = ag.group_id
|
||||
where att_current_day
|
||||
<if test=' pushType == "1" '>
|
||||
>= #{pushDate}
|
||||
</if>
|
||||
<if test=' pushType == "2" '>
|
||||
= #{pushDate}
|
||||
</if>
|
||||
where att_current_day = #{pushDate}
|
||||
and g.id is not null and asd.data_source = 1
|
||||
union
|
||||
select asd.*,
|
||||
|
|
@ -296,13 +290,7 @@
|
|||
left join sys_user su on su.user_name = asd.name
|
||||
left join att_setting_history ag on ag.user_id = su.user_id and ag.current_day = #{pushDate}
|
||||
left join att_group g on g.id = ag.group_id
|
||||
where att_current_day
|
||||
<if test=' pushType == "1" '>
|
||||
>= #{pushDate}
|
||||
</if>
|
||||
<if test=' pushType == "2" '>
|
||||
= #{pushDate}
|
||||
</if>
|
||||
where att_current_day = #{pushDate}
|
||||
and g.id is not null
|
||||
and asd.data_source in (2,3)
|
||||
and (asd.att_type = 1
|
||||
|
|
|
|||
|
|
@ -29,9 +29,9 @@
|
|||
</foreach>
|
||||
</insert>
|
||||
<insert id="insertAttSettingHistoryData">
|
||||
replace into att_setting_history(user_id, group_id, org_id,current_day) values
|
||||
replace into att_setting_history(user_id, group_id, current_day) values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.userId},#{item.groupId},#{item.orgId},#{item.currentDay})
|
||||
(#{item.userId},#{item.groupId},#{item.currentDay})
|
||||
</foreach>
|
||||
</insert>
|
||||
<update id="updateStatus">
|
||||
|
|
@ -123,7 +123,6 @@
|
|||
FROM
|
||||
(
|
||||
SELECT
|
||||
org_id,
|
||||
group_id,
|
||||
user_id,
|
||||
#{currentDay} as currentDay
|
||||
|
|
|
|||
Loading…
Reference in New Issue