Commit f67db33a authored by 廖旭伟's avatar 廖旭伟

绩效汇总分数bug修改

parent 75cd5018
package com.mortals.xhx.daemon.applicationservice;
import cn.hutool.core.date.DateUtil;
import com.mortals.framework.service.ICacheService;
import com.mortals.framework.springcloud.service.IApplicationStartedService;
import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.common.code.CheckTypeEnum;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery;
import com.mortals.xhx.module.check.service.*;
......@@ -10,6 +12,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils;
import java.util.Date;
import static com.mortals.xhx.common.key.RedisKey.KEY_CHECK_SUMMARY_CACHE;
/***
......@@ -44,6 +48,11 @@ public class StaffCheckSummaryService implements IApplicationStartedService {
try {
StaffCheckSummaryQuery query = cacheService.brpop(KEY_CHECK_SUMMARY_CACHE,60, StaffCheckSummaryQuery.class);
if(!ObjectUtils.isEmpty(query)){
if(StringUtils.isNotEmpty(query.getCheckTimeStart())){
Date date = DateUtil.parse(query.getCheckTimeStart(),"yyyy-MM-dd");
query.setCheckTimeStart(DateUtil.beginOfMonth(date).toDateStr());
query.setCheckTimeEnd(DateUtil.endOfMonth(date).toDateStr());
}
if(query.getCheckType() == CheckTypeEnum.考勤绩效.getValue()){
checkAttendRecordService.summaryCheck(query);
}
......@@ -100,4 +109,5 @@ public class StaffCheckSummaryService implements IApplicationStartedService {
public int getOrder() {
return 30;
}
}
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