测试问题修改

This commit is contained in:
方亮 2026-02-04 15:12:36 +08:00
parent 5d82ee93d1
commit daef609649
8 changed files with 43 additions and 25 deletions

View File

@ -28,9 +28,12 @@ public class AttJobTask {
* 考勤模版数据定时器 凌晨10分启动一次一天仅仅一次 * 考勤模版数据定时器 凌晨10分启动一次一天仅仅一次
*/ */
// @Scheduled(cron = "0 10 0 * * ?") // @Scheduled(cron = "0 10 0 * * ?")
public void getAttTempDataTask() { public void getAttTempDataTask(String today) {
log.info("--------考勤模版数据定时器开启------"); log.info("--------考勤模版数据定时器开启------");
String today = DateUtil.today(); if (StringUtils.isEmpty(today)) {
today = DateUtil.today();
}
log.info("考勤模版数据日期:{}", today);
service.insertAttDateHistory(today, SecurityConstants.INNER); service.insertAttDateHistory(today, SecurityConstants.INNER);
log.info("--------考勤模版数据定时器完毕------"); log.info("--------考勤模版数据定时器完毕------");
} }
@ -95,9 +98,11 @@ public class AttJobTask {
*/ */
// @Scheduled(cron = "0 10 6-23 * * ?") // @Scheduled(cron = "0 10 6-23 * * ?")
@Async @Async
public void getDayReportDataTask() { public void getDayReportDataTask(String today) {
log.info("--------报表数据生成--日报表定时器开启------"); log.info("--------报表数据生成--日报表定时器开启------");
String today = DateUtil.today(); if (StringUtils.isEmpty(today)) {
today = DateUtil.today();
}
service.getDayReportData(today, SecurityConstants.INNER); service.getDayReportData(today, SecurityConstants.INNER);
log.info("--------报表数据生成--日报表定时器完毕------"); log.info("--------报表数据生成--日报表定时器完毕------");
} }

View File

@ -119,7 +119,7 @@ public interface AttGroupDao {
* *
* @return list bean * @return list bean
*/ */
List<SysTree> getAttGroupCheckPerson(Long groupId); List<SysTree> getAttGroupCheckPerson(@Param("groupId") Long groupId);
/** /**
* 根据组织编号获取人员 * 根据组织编号获取人员

View File

@ -117,4 +117,6 @@ public class AttRateBean {
*/ */
private String startMonth; private String startMonth;
private int[] orgIds;
} }

View File

@ -29,7 +29,7 @@ public class WorkerRepairCardServiceImpl implements WorkerRepairCardService {
int count = dao.selectRepairCardDictCount(bean); int count = dao.selectRepairCardDictCount(bean);
//2.再查补卡时间的月份补卡多少次 //2.再查补卡时间的月份补卡多少次
int repairCardCount = dao.selectRepairCardCount(bean); int repairCardCount = dao.selectRepairCardCount(bean);
if(repairCardCount> count){ if(repairCardCount >= count){
return AjaxResult.error("每月最多补卡"+count+"次,您的补卡次数已用完"); return AjaxResult.error("每月最多补卡"+count+"次,您的补卡次数已用完");
}else{ }else{
if(bean.getAttType() == 1){ if(bean.getAttType() == 1){

View File

@ -33,7 +33,7 @@ public class NewAttTask {
/** /**
* 考勤模版数据定时器 凌晨10分启动一次一天仅仅一次 * 考勤模版数据定时器 凌晨10分启动一次一天仅仅一次
*/ */
@Scheduled(cron = "0 10 0 * * ?") // @Scheduled(cron = "0 10 0 * * ?")
@Async @Async
public void getAttTempDataTask() { public void getAttTempDataTask() {
log.info("--------考勤模版数据定时器开启------"); log.info("--------考勤模版数据定时器开启------");
@ -48,7 +48,7 @@ public class NewAttTask {
* 1.数据拉取考勤定时器 每隔1个小时获取一次数据(从早上 5 点开始每小时执行一次) * 1.数据拉取考勤定时器 每隔1个小时获取一次数据(从早上 5 点开始每小时执行一次)
* 2.考勤数据应用步骤一考勤数据更新 * 2.考勤数据应用步骤一考勤数据更新
*/ */
@Scheduled(cron = "0 0 5-23 * * ?") // @Scheduled(cron = "0 0 5-23 * * ?")
@Async @Async
public void getAttDataPullTask() { public void getAttDataPullTask() {
log.info("--------数据拉取(考勤)定时器开启------"); log.info("--------数据拉取(考勤)定时器开启------");
@ -63,7 +63,7 @@ public class NewAttTask {
* 1.数据拉取考勤定时器 * 1.数据拉取考勤定时器
* 2.考勤数据应用步骤一考勤数据更新 * 2.考勤数据应用步骤一考勤数据更新
*/ */
@Scheduled(cron = "0 40 8 * * ?") // @Scheduled(cron = "0 40 8 * * ?")
@Async @Async
public void getEightAttDataPullTask() { public void getEightAttDataPullTask() {
log.info("--------数据拉取(考勤)定时器开启------"); log.info("--------数据拉取(考勤)定时器开启------");
@ -79,7 +79,7 @@ public class NewAttTask {
* 每天12点将当天未打卡考勤人员上班置为旷工 * 每天12点将当天未打卡考勤人员上班置为旷工
* 每天晚上22点将下班未打卡置为旷工 * 每天晚上22点将下班未打卡置为旷工
*/ */
@Scheduled(cron = "0 0 12,22 * * ?") // @Scheduled(cron = "0 0 12,22 * * ?")
@Async @Async
public void getAbsenteeismDataTask() { public void getAbsenteeismDataTask() {
log.info("--------旷工判断定时器开启------"); log.info("--------旷工判断定时器开启------");
@ -93,7 +93,7 @@ public class NewAttTask {
* 昨日下班卡更新 * 昨日下班卡更新
* 每天7点将昨天数据更新一下 * 每天7点将昨天数据更新一下
*/ */
@Scheduled(cron = "0 0 7 * * ?") // @Scheduled(cron = "0 0 7 * * ?")
@Async @Async
public void getYesterdayAttDataTask() { public void getYesterdayAttDataTask() {
log.info("--------昨日下班卡更新定时器开启------"); log.info("--------昨日下班卡更新定时器开启------");
@ -111,7 +111,7 @@ public class NewAttTask {
* 请假数据应用--法假 * 请假数据应用--法假
* 每天更新一次1点更新 * 每天更新一次1点更新
*/ */
@Scheduled(cron = "0 0 1 * * ?") // @Scheduled(cron = "0 0 1 * * ?")
@Async @Async
public void getLegalHolidayDataTask() { public void getLegalHolidayDataTask() {
log.info("--------请假数据应用--法假定时器开启------"); log.info("--------请假数据应用--法假定时器开启------");
@ -124,7 +124,7 @@ public class NewAttTask {
* 请假数据应用--请假 * 请假数据应用--请假
* 每天更新两次上午8点下午18点45天前数据 * 每天更新两次上午8点下午18点45天前数据
*/ */
@Scheduled(cron = "0 0 8,18 * * ?") // @Scheduled(cron = "0 0 8,18 * * ?")
@Async @Async
public void getLeaveDataTask() { public void getLeaveDataTask() {
log.info("--------请假数据应用--请假定时器开启------"); log.info("--------请假数据应用--请假定时器开启------");
@ -138,7 +138,7 @@ public class NewAttTask {
* 报表数据生成--日报表 * 报表数据生成--日报表
* 6点10分开始,一小时更新一次 * 6点10分开始,一小时更新一次
*/ */
@Scheduled(cron = "0 10 6-23 * * ?") // @Scheduled(cron = "0 10 6-23 * * ?")
@Async @Async
public void getDayReportDataTask() { public void getDayReportDataTask() {
log.info("--------报表数据生成--日报表定时器开启------"); log.info("--------报表数据生成--日报表定时器开启------");
@ -152,7 +152,7 @@ public class NewAttTask {
* 报表数据生成--月报表 * 报表数据生成--月报表
* 月初生成之后修改 * 月初生成之后修改
*/ */
@Scheduled(cron = "0 15 1 1 * ?") // @Scheduled(cron = "0 15 1 1 * ?")
@Async @Async
public void getMonthReportDataTempTask() { public void getMonthReportDataTempTask() {
log.info("--------报表数据生成--月报表定时器开启------"); log.info("--------报表数据生成--月报表定时器开启------");
@ -165,7 +165,7 @@ public class NewAttTask {
* 报表数据生成--月报表 * 报表数据生成--月报表
* 每日数据变化修改之后修改 * 每日数据变化修改之后修改
*/ */
@Scheduled(cron = "0 0 8,10,17,19,23 * * ?") // @Scheduled(cron = "0 0 8,10,17,19,23 * * ?")
@Async @Async
public void getMonthReportDataTask() { public void getMonthReportDataTask() {
log.info("--------报表数据生成--月报表定时器开启------"); log.info("--------报表数据生成--月报表定时器开启------");

View File

@ -23,10 +23,14 @@
WHERE WHERE
att_current_month between #{startMonth} AND #{endMonth} att_current_month between #{startMonth} AND #{endMonth}
<if test="userName != null and userName != ''"> <if test="userName != null and userName != ''">
AND `name` = #{userName} AND locate(#{userName}, `name`)
</if> </if>
<if test="orgId != null "> <if test='orgIds != null'>
AND `org_id` = #{orgId} and org_id in (
<foreach collection="orgIds" item="item" separator=",">
#{item}
</foreach>
)
</if> </if>
<if test="outsideAttNum == '预警'"> <if test="outsideAttNum == '预警'">
AND `outside_att_num` >= 5 AND `outside_att_num` >= 5

View File

@ -58,15 +58,21 @@
where is_active = 1 where is_active = 1
union union
select CONCAT('user', '|',su.user_id) as id, select CONCAT('user', '|',su.user_id) as id,
user_name as name, user_name as name,
CONCAT('org', '|', suo.org_id ) as parnet_id, CONCAT('org', '|', suo.org_id ) as parnet_id,
su.user_id, su.user_id,
suo.org_id, suo.org_id,
IF(agpr.user_id IS NULL,false,true) AS isChecked IF(agpr.user_id IS NULL,false,true) AS isChecked
from sys_user su from sys_user su
left join sys_user_org suo on suo.user_id = su.user_id and suo.is_active = 1 left join sys_user_org suo on suo.user_id = su.user_id and suo.is_active = 1
left join att_group_person_relation agpr on agpr.user_id = su.user_id and agpr.is_active = 1 left join att_group_person_relation agpr on agpr.user_id = su.user_id and agpr.is_active = 1
where su.is_active = 1 where su.is_active = 1
<if test="groupId==null">
AND agpr.group_id IS NULL
</if>
<if test="groupId!=null">
AND (agpr.group_id = #{groupId} OR agpr.group_id IS NULL)
</if>
</select> </select>
<select id="getUserByOrg" resultType="com.bonus.common.core.domain.AttGroupCheckOrgBean"> <select id="getUserByOrg" resultType="com.bonus.common.core.domain.AttGroupCheckOrgBean">

View File

@ -43,7 +43,8 @@
</select> </select>
<select id="selectRepairCardCount" resultType="int"> <select id="selectRepairCardCount" resultType="int">
select count(1) from att_reapir_card where is_active = 1 and current_day like concat(LEFT(#{currentDay},7),'%') select count(1) from att_reapir_card where is_active = 1
and current_day like concat(LEFT(#{currentDay},7),'%') and user_id = #{userId}
</select> </select>
<insert id="insertAttSourceData"> <insert id="insertAttSourceData">