Commit 046fd3e3 authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents a04c8137 c7d6c87e
...@@ -187,7 +187,16 @@ export default { ...@@ -187,7 +187,16 @@ export default {
content={arr[index].content} content={arr[index].content}
placement="top-start" placement="top-start"
> >
<el-tag type={"danger"} size="mini"> <el-tag
type={
arr[index].attendanceSummary.includes("缺卡") ||
arr[index].attendanceSummary.includes("迟到") ||
arr[index].attendanceSummary.includes("早退")
? "danger"
: "success"
}
size="mini"
>
{arr[index].attendanceSummary} {arr[index].attendanceSummary}
</el-tag> </el-tag>
</el-tooltip> </el-tooltip>
......
...@@ -25,11 +25,13 @@ public class RedisKey { ...@@ -25,11 +25,13 @@ public class RedisKey {
/** 考勤统计 **/ /** 考勤统计 **/
public static final String KEY_ATTENDANCE_STAT_CACHE = "attendance:stat"; public static final String KEY_ATTENDANCE_STAT_CACHE = "attendance:stat";
/** 考勤统计时间 **/
public static final String ATTENDANCE_STAT_TIME = "attendanceSummaryTime";
public static final String KEY_HOME_STAT_CACHE = "attendance:home:stat"; public static final String KEY_HOME_STAT_CACHE = "attendance:home:stat";
/** 绩效核查汇总 **/ /** 绩效核查汇总 **/
public static final String KEY_CHECK_SUMMARY_CACHE = "staff:check:summary"; public static final String KEY_CHECK_SUMMARY_CACHE = "staff:check:summary";
/** 绩效核查汇总时间 **/
public static final String STAFF_PERFORM_SUMMARY = "staffPerformSummaryTime";
} }
...@@ -4,6 +4,7 @@ import cn.hutool.core.date.DateUtil; ...@@ -4,6 +4,7 @@ import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.service.ICacheService; import com.mortals.framework.service.ICacheService;
import com.mortals.framework.springcloud.service.IApplicationStartedService; import com.mortals.framework.springcloud.service.IApplicationStartedService;
import com.mortals.framework.util.DateUtils;
import com.mortals.framework.util.StringUtils; import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.common.code.CheckTypeEnum; import com.mortals.xhx.common.code.CheckTypeEnum;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery; import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery;
...@@ -13,9 +14,11 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -13,9 +14,11 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import java.util.Calendar;
import java.util.Date; import java.util.Date;
import static com.mortals.xhx.common.key.RedisKey.KEY_CHECK_SUMMARY_CACHE; import static com.mortals.xhx.common.key.RedisKey.KEY_CHECK_SUMMARY_CACHE;
import static com.mortals.xhx.common.key.RedisKey.STAFF_PERFORM_SUMMARY;
/*** /***
* 绩效汇总任务执行 * 绩效汇总任务执行
...@@ -58,7 +61,18 @@ public class StaffCheckSummaryService implements IApplicationStartedService { ...@@ -58,7 +61,18 @@ public class StaffCheckSummaryService implements IApplicationStartedService {
query.setCheckTimeStart(DateUtil.beginOfMonth(date).toDateStr()); query.setCheckTimeStart(DateUtil.beginOfMonth(date).toDateStr());
query.setCheckTimeEnd(DateUtil.endOfMonth(date).toDateStr()); query.setCheckTimeEnd(DateUtil.endOfMonth(date).toDateStr());
query.setYear(DateUtil.year(date)); query.setYear(DateUtil.year(date));
query.setMonth(DateUtil.month(date)+1); int checkMonth = DateUtil.month(date)+1;
query.setMonth(checkMonth);
Date now = new Date();
int nowMonth = DateUtil.month(now)+1;
if(checkMonth==nowMonth){
//汇总当月绩效
Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.DAY_OF_MONTH,-1);
query.setCheckTimeEnd(DateUtils.getStrDate(calendar.getTime()));
query.setCheckTimeStart(DateUtil.beginOfMonth(calendar.getTime()).toDateStr());
}
} }
if(query.getCheckType() == CheckTypeEnum.考勤绩效.getValue()){ if(query.getCheckType() == CheckTypeEnum.考勤绩效.getValue()){
checkAttendRecordService.summaryCheck(query); checkAttendRecordService.summaryCheck(query);
...@@ -89,6 +103,7 @@ public class StaffCheckSummaryService implements IApplicationStartedService { ...@@ -89,6 +103,7 @@ public class StaffCheckSummaryService implements IApplicationStartedService {
checkWindowWorkmanPerformService.summaryCheck(query); checkWindowWorkmanPerformService.summaryCheck(query);
checkOtherRecordService.summaryCheck(query); checkOtherRecordService.summaryCheck(query);
log.info("绩效分数汇总完成"); log.info("绩效分数汇总完成");
cacheService.set(STAFF_PERFORM_SUMMARY, DateUtils.getCurrStrDateTime());
} }
} }
......
...@@ -41,7 +41,7 @@ public class AttendanceSummaryTaskImpl implements ITaskExcuteService { ...@@ -41,7 +41,7 @@ public class AttendanceSummaryTaskImpl implements ITaskExcuteService {
//考勤汇总前先自动处理前一天的异常考勤数据 //考勤汇总前先自动处理前一天的异常考勤数据
Calendar now = Calendar.getInstance(); Calendar now = Calendar.getInstance();
now.setTime(new Date()); now.setTime(new Date());
// now.add(Calendar.DAY_OF_MONTH, -1); //默认查前一天数据 now.add(Calendar.DAY_OF_MONTH, -1); //默认查前一天数据
// attendanceRecordErrorService.doAutoProcess(now.getTime()); // attendanceRecordErrorService.doAutoProcess(now.getTime());
AttendanceSummaryQuery query = new AttendanceSummaryQuery(); AttendanceSummaryQuery query = new AttendanceSummaryQuery();
......
...@@ -20,6 +20,7 @@ import com.mortals.xhx.module.attendance.model.vo.AttendanceSummaryQuery; ...@@ -20,6 +20,7 @@ import com.mortals.xhx.module.attendance.model.vo.AttendanceSummaryQuery;
import com.mortals.xhx.module.attendance.service.AttendanceGroupStaffService; import com.mortals.xhx.module.attendance.service.AttendanceGroupStaffService;
import com.mortals.xhx.module.attendance.service.AttendanceRecordHikService; import com.mortals.xhx.module.attendance.service.AttendanceRecordHikService;
import com.mortals.xhx.module.attendance.service.AttendanceStatService; import com.mortals.xhx.module.attendance.service.AttendanceStatService;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery;
import com.mortals.xhx.module.dingding.personal.service.IDingPersonService; import com.mortals.xhx.module.dingding.personal.service.IDingPersonService;
import com.mortals.xhx.module.perform.model.PerformAttendRecordEntity; import com.mortals.xhx.module.perform.model.PerformAttendRecordEntity;
import com.mortals.xhx.module.perform.model.PerformAttendRecordQuery; import com.mortals.xhx.module.perform.model.PerformAttendRecordQuery;
...@@ -47,6 +48,7 @@ import java.util.List; ...@@ -47,6 +48,7 @@ import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import static com.mortals.xhx.common.key.RedisKey.KEY_ATTENDANCE_STAT_CACHE; import static com.mortals.xhx.common.key.RedisKey.KEY_ATTENDANCE_STAT_CACHE;
import static com.mortals.xhx.common.key.RedisKey.KEY_CHECK_SUMMARY_CACHE;
/** /**
* AttendanceLeaveRecordService * AttendanceLeaveRecordService
...@@ -243,6 +245,14 @@ public class AttendanceLeaveRecordServiceImpl extends AbstractCRUDServiceImpl<At ...@@ -243,6 +245,14 @@ public class AttendanceLeaveRecordServiceImpl extends AbstractCRUDServiceImpl<At
performAttendRecordService.save(recordEntity, context); performAttendRecordService.save(recordEntity, context);
} }
} }
//汇总考勤绩效分数
StaffCheckSummaryQuery checkSummaryQuery = new StaffCheckSummaryQuery();
checkSummaryQuery.setStaffId(entity.getLeavePersonId());
checkSummaryQuery.setCheckTimeStart(DateUtils.getStrDate(entity.getStartTime()));
checkSummaryQuery.setCheckTimeEnd(checkSummaryQuery.getCheckTimeStart());
checkSummaryQuery.setCheckType(CheckTypeEnum.考勤绩效.getValue());
cacheService.lpush(KEY_CHECK_SUMMARY_CACHE, checkSummaryQuery);
} }
} catch (Exception e) { } catch (Exception e) {
log.error("创建假期考勤异常",e.getMessage()); log.error("创建假期考勤异常",e.getMessage());
......
...@@ -115,12 +115,6 @@ public class AttendanceRecordErrorServiceImpl extends AbstractCRUDServiceImpl<At ...@@ -115,12 +115,6 @@ public class AttendanceRecordErrorServiceImpl extends AbstractCRUDServiceImpl<At
checkAttendUpdate.setUpdateTime(new Date()); checkAttendUpdate.setUpdateTime(new Date());
checkAttendUpdate.setCheckStatus(CheckStatusEnum.已处理.getValue()); checkAttendUpdate.setCheckStatus(CheckStatusEnum.已处理.getValue());
checkAttendRecordService.update(checkAttendUpdate,context); checkAttendRecordService.update(checkAttendUpdate,context);
StaffCheckSummaryQuery query = new StaffCheckSummaryQuery();
query.setStaffId(checkAttendRecord.getStaffId());
query.setCheckTimeStart(DateUtils.getStrDate(checkAttendRecord.getCheckTime()));
query.setCheckTimeEnd(query.getCheckTimeStart());
query.setCheckType(CheckTypeEnum.考勤绩效.getValue());
cacheService.lpush(KEY_CHECK_SUMMARY_CACHE, query);
} }
} }
//异常处理后重新汇总考勤 context!=null时表示页面调用的修改,自动执行处理任务调用时context为null,无需立即汇总 //异常处理后重新汇总考勤 context!=null时表示页面调用的修改,自动执行处理任务调用时context为null,无需立即汇总
...@@ -131,6 +125,13 @@ public class AttendanceRecordErrorServiceImpl extends AbstractCRUDServiceImpl<At ...@@ -131,6 +125,13 @@ public class AttendanceRecordErrorServiceImpl extends AbstractCRUDServiceImpl<At
// AttendSummaryThread summaryThread = new AttendSummaryThread(attendanceStatService, query); // AttendSummaryThread summaryThread = new AttendSummaryThread(attendanceStatService, query);
// ThreadPool.getInstance().execute(summaryThread); // ThreadPool.getInstance().execute(summaryThread);
cacheService.lpush(KEY_ATTENDANCE_STAT_CACHE, query); cacheService.lpush(KEY_ATTENDANCE_STAT_CACHE, query);
//立即汇总考勤绩效分数
StaffCheckSummaryQuery checkSummaryQuery = new StaffCheckSummaryQuery();
checkSummaryQuery.setStaffId(entity.getStaffId());
checkSummaryQuery.setCheckTimeStart(DateUtils.getStrDate(entity.getErrorDateTime()));
checkSummaryQuery.setCheckTimeEnd(checkSummaryQuery.getCheckTimeStart());
checkSummaryQuery.setCheckType(CheckTypeEnum.考勤绩效.getValue());
cacheService.lpush(KEY_CHECK_SUMMARY_CACHE, checkSummaryQuery);
} }
} }
} }
......
...@@ -44,6 +44,9 @@ import java.math.BigDecimal; ...@@ -44,6 +44,9 @@ import java.math.BigDecimal;
import java.math.RoundingMode; import java.math.RoundingMode;
import java.util.*; import java.util.*;
import static com.mortals.xhx.common.key.RedisKey.ATTENDANCE_STAT_TIME;
import static com.mortals.xhx.common.key.RedisKey.STAFF_PERFORM_SUMMARY;
/** /**
* AttendanceStatService * AttendanceStatService
* 考勤汇总信息 service实现 * 考勤汇总信息 service实现
...@@ -625,6 +628,7 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc ...@@ -625,6 +628,7 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc
} }
} }
log.info("完成汇总当前日期请假情况....."); log.info("完成汇总当前日期请假情况.....");
cacheService.set(ATTENDANCE_STAT_TIME, DateUtils.getCurrStrDateTime());
log.info("日期:" + query.getSummaryTime() + ",考勤汇总执行完成,耗时:" + (System.currentTimeMillis() - currentTime) + "毫秒...."); log.info("日期:" + query.getSummaryTime() + ",考勤汇总执行完成,耗时:" + (System.currentTimeMillis() - currentTime) + "毫秒....");
} catch (Exception e) { } catch (Exception e) {
log.error("考勤汇总出错", e); log.error("考勤汇总出错", e);
......
...@@ -13,6 +13,7 @@ import com.mortals.framework.model.PageInfo; ...@@ -13,6 +13,7 @@ import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result; import com.mortals.framework.model.Result;
import com.mortals.framework.service.ICacheService; import com.mortals.framework.service.ICacheService;
import com.mortals.framework.util.DataUtil; import com.mortals.framework.util.DataUtil;
import com.mortals.framework.util.DateUtils;
import com.mortals.framework.utils.ReflectUtils; import com.mortals.framework.utils.ReflectUtils;
import com.mortals.framework.utils.poi.ExcelUtil; import com.mortals.framework.utils.poi.ExcelUtil;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
...@@ -57,7 +58,7 @@ import org.springframework.web.bind.annotation.*; ...@@ -57,7 +58,7 @@ import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*; import static com.mortals.framework.ap.SysConstains.*;
import static com.mortals.xhx.common.key.RedisKey.KEY_ATTENDANCE_STAT_CACHE; import static com.mortals.xhx.common.key.RedisKey.*;
/** /**
* 考勤汇总信息 * 考勤汇总信息
...@@ -165,6 +166,15 @@ public class AttendanceStatController extends BaseCRUDJsonBodyMappingController< ...@@ -165,6 +166,15 @@ public class AttendanceStatController extends BaseCRUDJsonBodyMappingController<
model.put("pageInfo", result.getPageInfo()); model.put("pageInfo", result.getPageInfo());
this.parsePageInfo(model, result.getPageInfo()); this.parsePageInfo(model, result.getPageInfo());
model.put("message_info", busiDesc + "成功"); model.put("message_info", busiDesc + "成功");
String summaryTime = cacheService.get(ATTENDANCE_STAT_TIME);
if(StringUtils.isNotEmpty(summaryTime)){
this.addDict(model,"summaryTime",summaryTime);
}else {
Calendar cal = Calendar.getInstance();
cal.add(Calendar.DAY_OF_MONTH,-1);
summaryTime = DateUtils.getDateTime(cal.getTime(),"yyyy-MM-dd");
this.addDict(model,"summaryTime", summaryTime+" 22:00:00");
}
if (!ObjectUtils.isEmpty(context) && !ObjectUtils.isEmpty(context.getUser())) { if (!ObjectUtils.isEmpty(context) && !ObjectUtils.isEmpty(context.getUser())) {
this.recordSysLog(this.request, busiDesc + " 【成功】"); this.recordSysLog(this.request, busiDesc + " 【成功】");
} }
......
package com.mortals.xhx.module.check.model.vo; package com.mortals.xhx.module.check.model.vo;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong; import com.mortals.framework.model.BaseEntityLong;
import lombok.Data; import lombok.Data;
...@@ -88,5 +89,8 @@ public class CheckAllRecordVo extends BaseEntityLong { ...@@ -88,5 +89,8 @@ public class CheckAllRecordVo extends BaseEntityLong {
private Integer auditStatus; private Integer auditStatus;
private Date updateTime; private Date updateTime;
/**
* 备注
*/
private String remark;
} }
...@@ -221,6 +221,7 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA ...@@ -221,6 +221,7 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
} }
entity.setCheckTime(temp.getErrorTime()); entity.setCheckTime(temp.getErrorTime());
entity.setDeductTime(temp.getErrorTime());
entity.setUpdateTime(new Date()); entity.setUpdateTime(new Date());
entity.setCheckStatus(CheckStatusEnum.已处理.getValue()); //处理状态(1.未处理,2.已处理) entity.setCheckStatus(CheckStatusEnum.已处理.getValue()); //处理状态(1.未处理,2.已处理)
dao.update(entity); dao.update(entity);
......
package com.mortals.xhx.module.check.web; package com.mortals.xhx.module.check.web;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.annotation.UnAuth; import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.common.Rest; import com.mortals.framework.common.Rest;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo; import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result; import com.mortals.framework.model.Result;
import com.mortals.framework.service.ICacheService;
import com.mortals.framework.util.DataUtil; import com.mortals.framework.util.DataUtil;
import com.mortals.framework.util.DateUtils; import com.mortals.framework.util.DateUtils;
import com.mortals.framework.util.StringUtils; import com.mortals.framework.util.StringUtils;
...@@ -31,6 +33,8 @@ import java.time.format.DateTimeFormatter; ...@@ -31,6 +33,8 @@ import java.time.format.DateTimeFormatter;
import java.time.temporal.TemporalAdjusters; import java.time.temporal.TemporalAdjusters;
import java.util.*; import java.util.*;
import static com.mortals.xhx.common.key.RedisKey.STAFF_PERFORM_SUMMARY;
/** /**
* 全部类型核查信息Dao * 全部类型核查信息Dao
*/ */
...@@ -40,6 +44,8 @@ public class CheckAllRecordController extends BaseJsonBodyController { ...@@ -40,6 +44,8 @@ public class CheckAllRecordController extends BaseJsonBodyController {
@Autowired @Autowired
private CheckAllRecordService checkAllRecordService; private CheckAllRecordService checkAllRecordService;
@Autowired
private ICacheService cacheService;
protected void init(Map<String, Object> model, Context context) { protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "checkStatus", CheckStatusEnum.getEnumMap()); this.addDict(model, "checkStatus", CheckStatusEnum.getEnumMap());
...@@ -60,15 +66,11 @@ public class CheckAllRecordController extends BaseJsonBodyController { ...@@ -60,15 +66,11 @@ public class CheckAllRecordController extends BaseJsonBodyController {
int code = 1; int code = 1;
try { try {
PageInfo pageInfo = new PageInfo(-1); PageInfo pageInfo = new PageInfo(-1);
if (StringUtils.isEmpty(query.getCheckTimeStart()) || StringUtils.isEmpty(query.getCheckTimeStart())) { if (StringUtils.isEmpty(query.getCheckTimeStart())) {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
Calendar calendar = Calendar.getInstance(); Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.DAY_OF_MONTH, 1); calendar.add(Calendar.DAY_OF_MONTH,-1);
String startTime = format.format(calendar.getTime()); query.setCheckTimeEnd(DateUtils.getStrDate(calendar.getTime()));
calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH)); query.setCheckTimeStart(DateUtil.beginOfMonth(calendar.getTime()).toDateStr());
String endTime = format.format(calendar.getTime());
query.setCheckTimeStart(startTime);
query.setCheckTimeEnd(endTime);
} }
Result<CheckAllRecordVo> result = checkAllRecordService.getAllCheckRecord(query, pageInfo); Result<CheckAllRecordVo> result = checkAllRecordService.getAllCheckRecord(query, pageInfo);
......
...@@ -151,6 +151,7 @@ public class PerformAttendAppealServiceImpl extends AbstractCRUDServiceImpl<Perf ...@@ -151,6 +151,7 @@ public class PerformAttendAppealServiceImpl extends AbstractCRUDServiceImpl<Perf
checkAttendRecordEntity.setRemark(appealMsg); checkAttendRecordEntity.setRemark(appealMsg);
checkAttendRecordEntity.setCheckResult(CheckResultAddEnum.核查加分.getValue()); checkAttendRecordEntity.setCheckResult(CheckResultAddEnum.核查加分.getValue());
checkAttendRecordEntity.setCheckTime(checkAttendRecordEntity.getErrorTime()); checkAttendRecordEntity.setCheckTime(checkAttendRecordEntity.getErrorTime());
checkAttendRecordEntity.setDeductTime(checkAttendRecordEntity.getErrorTime());
checkAttendRecordEntity.setUpdateTime(new Date()); checkAttendRecordEntity.setUpdateTime(new Date());
checkAttendRecordEntity.setCheckStatus(CheckStatusEnum.已处理.getValue()); //处理状态(1.未处理,2.已处理) checkAttendRecordEntity.setCheckStatus(CheckStatusEnum.已处理.getValue()); //处理状态(1.未处理,2.已处理)
checkAttendRecordEntity.setAuditStatus(AuditStatusEnum.通过.getValue()); checkAttendRecordEntity.setAuditStatus(AuditStatusEnum.通过.getValue());
......
...@@ -191,6 +191,8 @@ public class PerformAttendRecordServiceImpl extends AbstractCRUDServiceImpl<Perf ...@@ -191,6 +191,8 @@ public class PerformAttendRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
BeanUtils.copyProperties(entity, checkAttendRecordEntity, BeanUtil.getNullPropertyNames(entity)); BeanUtils.copyProperties(entity, checkAttendRecordEntity, BeanUtil.getNullPropertyNames(entity));
checkAttendRecordEntity.setId(null); checkAttendRecordEntity.setId(null);
checkAttendRecordEntity.setRecordId(entity.getId()); checkAttendRecordEntity.setRecordId(entity.getId());
checkAttendRecordEntity.setCheckTime(entity.getErrorTime());
checkAttendRecordEntity.setDeductTime(entity.getErrorTime());
if(performStaffConfService.checkRules(entity.getStaffId(),entity.getDeptId(),entity.getRuleId())){ if(performStaffConfService.checkRules(entity.getStaffId(),entity.getDeptId(),entity.getRuleId())){
checkAttendRecordEntity.setCheckStatus(CheckStatusEnum.已处理.getValue()); checkAttendRecordEntity.setCheckStatus(CheckStatusEnum.已处理.getValue());
if(checkAttendRecordEntity.getSubAddType()==SubAddTypeEnum.增加.getValue()){ if(checkAttendRecordEntity.getSubAddType()==SubAddTypeEnum.增加.getValue()){
......
...@@ -103,6 +103,7 @@ public class StaffPerformSummaryEntity extends StaffPerformSummaryVo { ...@@ -103,6 +103,7 @@ public class StaffPerformSummaryEntity extends StaffPerformSummaryVo {
/** /**
* 备注 * 备注
*/ */
@Excel(name = "备注",sort = 15)
private String remark; private String remark;
/** /**
* 年 * 年
......
...@@ -44,8 +44,7 @@ import org.springframework.web.multipart.MultipartFile; ...@@ -44,8 +44,7 @@ import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*; import static com.mortals.framework.ap.SysConstains.*;
import static com.mortals.xhx.common.key.ParamKey.SYS_PARAM_WEIGHT; import static com.mortals.xhx.common.key.ParamKey.SYS_PARAM_WEIGHT;
import static com.mortals.xhx.common.key.RedisKey.KEY_ATTENDANCE_STAT_CACHE; import static com.mortals.xhx.common.key.RedisKey.*;
import static com.mortals.xhx.common.key.RedisKey.KEY_CHECK_SUMMARY_CACHE;
/** /**
* 员工绩效统计 * 员工绩效统计
...@@ -104,6 +103,15 @@ public class StaffPerformSummaryController extends BaseCRUDJsonBodyMappingContro ...@@ -104,6 +103,15 @@ public class StaffPerformSummaryController extends BaseCRUDJsonBodyMappingContro
weightPdu = JSONObject.parseObject(value,WeightPdu.class); weightPdu = JSONObject.parseObject(value,WeightPdu.class);
} }
this.addDict(model,"weightPdu",weightPdu); this.addDict(model,"weightPdu",weightPdu);
String summaryTime = cacheService.get(STAFF_PERFORM_SUMMARY);
if(StringUtils.isNotEmpty(summaryTime)){
this.addDict(model,"summaryTime",summaryTime);
}else {
Calendar cal = Calendar.getInstance();
cal.add(Calendar.DAY_OF_MONTH,-1);
summaryTime = DateUtils.getDateTime(cal.getTime(),"yyyy-MM-dd");
this.addDict(model,"summaryTime", summaryTime+" 22:00:00");
}
return super.doListAfter(query,model,context); return super.doListAfter(query,model,context);
} }
...@@ -149,6 +157,9 @@ public class StaffPerformSummaryController extends BaseCRUDJsonBodyMappingContro ...@@ -149,6 +157,9 @@ public class StaffPerformSummaryController extends BaseCRUDJsonBodyMappingContro
Map<String,Object> condition = new HashMap<>(); Map<String,Object> condition = new HashMap<>();
condition.put("year",year); condition.put("year",year);
condition.put("month",month); condition.put("month",month);
if(query.getStaffId()!=null){
condition.put("staffId",query.getStaffId());
}
this.service.getDao().update(staffPerformSummaryEntity,condition); this.service.getDao().update(staffPerformSummaryEntity,condition);
} }
cacheService.lpush(KEY_CHECK_SUMMARY_CACHE,query); cacheService.lpush(KEY_CHECK_SUMMARY_CACHE,query);
......
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