Commit 5ddda379 authored by 廖旭伟's avatar 廖旭伟

页面新增绩效记录时保存人员大厅信息;手动汇总绩效时初始化一次汇总月份的绩效分数

parent 87753cc4
......@@ -93,6 +93,8 @@ public class PerformAttendRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
StaffEntity staffCache = staffService.getCache(entity.getStaffId().toString());
entity.setStaffName(staffCache == null ? "" : staffCache.getName());
entity.setDeptName(staffCache == null ? "" : staffCache.getDeptName());
entity.setSalaId(staffCache == null ? null : staffCache.getSalaId());
entity.setSalaName(staffCache == null ? "" : staffCache.getSalaName());
}
entity.setErrorResult(entity.getRuleName());
entity.setDeductTime(new Date());
......
......@@ -82,6 +82,8 @@ public class PerformEffectRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
StaffEntity staffCache = staffService.getCache(entity.getStaffId().toString());
entity.setStaffName(staffCache == null ? "" : staffCache.getName());
entity.setDeptName(staffCache == null ? "" : staffCache.getDeptName());
entity.setSalaId(staffCache == null ? null : staffCache.getSalaId());
entity.setSalaName(staffCache == null ? "" : staffCache.getSalaName());
}
entity.setDeductTime(new Date());
if (ObjectUtils.isEmpty(entity.getDeductPerson())) {
......
......@@ -65,6 +65,8 @@ public class PerformGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
StaffEntity staffCache = staffService.getCache(entity.getStaffId().toString());
entity.setStaffName(staffCache == null ? "" : staffCache.getName());
entity.setDeptName(staffCache == null ? "" : staffCache.getDeptName());
entity.setSalaId(staffCache == null ? null : staffCache.getSalaId());
entity.setSalaName(staffCache == null ? "" : staffCache.getSalaName());
}
entity.setDeductTime(new Date());
if(ObjectUtils.isEmpty(entity.getDeductPerson())){
......
......@@ -66,6 +66,8 @@ public class PerformOtherRecordServiceImpl extends AbstractCRUDServiceImpl<Perfo
StaffEntity staffCache = staffService.getCache(entity.getStaffId().toString());
entity.setStaffName(staffCache == null ? "" : staffCache.getName());
entity.setDeptName(staffCache == null ? "" : staffCache.getDeptName());
entity.setSalaId(staffCache == null ? null : staffCache.getSalaId());
entity.setSalaName(staffCache == null ? "" : staffCache.getSalaName());
}
entity.setDeductTime(new Date());
......
......@@ -30,7 +30,7 @@ public class StaffPerformSummaryEntity extends StaffPerformSummaryVo {
/**
* 所属中心
*/
@Excel(name = "所属中心")
//@Excel(name = "所属中心")
private String belongCenter;
/**
* 工号
......
package com.mortals.xhx.module.staff.web;
import cn.hutool.core.date.DateUtil;
import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.service.ICacheService;
import com.mortals.framework.util.DateUtils;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.pdu.WeightPdu;
......@@ -30,15 +32,12 @@ import com.mortals.xhx.module.staff.service.StaffPerformSummaryService;
import org.apache.commons.lang3.ArrayUtils;
import com.mortals.framework.util.StringUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject;
import java.util.Arrays;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
......@@ -118,6 +117,28 @@ public class StaffPerformSummaryController extends BaseCRUDJsonBodyMappingContro
String busiDesc = "执行绩效汇总任务";
int code = 1;
try {
if(StringUtils.isNotEmpty(query.getCheckTimeStart())){
Date date = DateUtils.StrToDateTime(query.getCheckTimeStart());
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
int year = calendar.get(Calendar.YEAR);
int month = calendar.get(Calendar.MONTH) + 1;
StaffPerformSummaryEntity staffPerformSummaryEntity = new StaffPerformSummaryEntity();
staffPerformSummaryEntity.setReviewScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setOtherScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setGoworkScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setEffectScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setComplainScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setAttendScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setTotalScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setErrorScore(BigDecimal.ZERO);
Map<String,Object> condition = new HashMap<>();
condition.put("year",year);
condition.put("month",month);
this.service.getDao().update(staffPerformSummaryEntity,condition);
}
cacheService.lpush(KEY_CHECK_SUMMARY_CACHE,query);
model.put("message_info", "开始执行绩效汇总,请稍后查看");
} catch (Exception var9) {
......
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