Commit 9d7be967 authored by 姬鋆屾's avatar 姬鋆屾
parents f05532d6 7a16b11e
package com.mortals.xhx.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 核查结果(1.加分或扣分,2.不扣分)枚举类
*
* @author zxfei
*/
public enum CheckResultAddEnum {
核查加分("核查加分", "核查加分"),
核查不加分("核查不加分", "核查不加分");
private String value;
private String desc;
CheckResultAddEnum(String value, String desc) {
this.value = value;
this.desc = desc;
}
public String getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static CheckResultAddEnum getByValue(String value) {
for (CheckResultAddEnum checkResultEnum : CheckResultAddEnum.values()) {
if (checkResultEnum.getValue() == value) {
return checkResultEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(String... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (CheckResultAddEnum item : CheckResultAddEnum.values()) {
try {
boolean hasE = false;
for (String e : eItem) {
if (item.getValue() == e) {
hasE = true;
break;
}
}
if (!hasE) {
resultMap.put(item.getValue() + "", item.getDesc());
}
} catch (Exception ex) {
}
}
return resultMap;
}
}
\ No newline at end of file
package com.mortals.xhx.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 核查结果(1.加分或扣分,2.不扣分)枚举类
*
* @author zxfei
*/
public enum CheckResultSubEnum {
核查扣分("核查扣分", "核查扣分"),
核查不扣分("核查不扣分", "核查不扣分");
private String value;
private String desc;
CheckResultSubEnum(String value, String desc) {
this.value = value;
this.desc = desc;
}
public String getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static CheckResultSubEnum getByValue(String value) {
for (CheckResultSubEnum checkResultEnum : CheckResultSubEnum.values()) {
if (checkResultEnum.getValue() == value) {
return checkResultEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(String... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (CheckResultSubEnum item : CheckResultSubEnum.values()) {
try {
boolean hasE = false;
for (String e : eItem) {
if (item.getValue() == e) {
hasE = true;
break;
}
}
if (!hasE) {
resultMap.put(item.getValue() + "", item.getDesc());
}
} catch (Exception ex) {
}
}
return resultMap;
}
}
\ No newline at end of file
......@@ -75,11 +75,11 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
protected void saveAfter(CheckAttendRecordEntity entity, Context context) throws AppException {
//发送钉钉通知信息
if (SubMethodEnum.系统自动.getValue() == entity.getSubMethod()) {
AttendPostServiceThread attendPostServiceThread = new AttendPostServiceThread(entity);
ThreadPool.getInstance().execute(attendPostServiceThread);
//sendCheckDingTalk(entity);
/* AttendPostServiceThread attendPostServiceThread = new AttendPostServiceThread(entity);
ThreadPool.getInstance().execute(attendPostServiceThread);*/
sendCheckDingTalk(entity);
}
/* try {
try {
StaffCheckSummaryQuery query = new StaffCheckSummaryQuery();
query.setStaffId(entity.getStaffId());
query.setCheckTimeStart(DateUtils.getStrDate(entity.getCheckTime()));
......@@ -87,7 +87,7 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
summaryCheck(query);
} catch (Exception e) {
log.error("汇总已审核的核查记录出错", e);
}*/
}
}
@Override
......@@ -132,17 +132,16 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
// sendCheckDingTalk(entity);
try {
CheckAttendRecordEntity temp = this.get(entity.getId());
if (temp != null) {
AttendPostServiceThread attendPostServiceThread = new AttendPostServiceThread(entity);
ThreadPool.getInstance().execute(attendPostServiceThread);
/* StaffCheckSummaryQuery query = new StaffCheckSummaryQuery();
/* AttendPostServiceThread attendPostServiceThread = new AttendPostServiceThread(entity);
ThreadPool.getInstance().execute(attendPostServiceThread);*/
sendCheckDingTalk(entity);
StaffCheckSummaryQuery query = new StaffCheckSummaryQuery();
query.setStaffId(temp.getStaffId());
summaryCheck(query);*/
summaryCheck(query);
}
} catch (Exception e) {
log.error("汇总已审核的核查记录出错", e);
......
......@@ -59,6 +59,8 @@ public class CheckAttendRecordController extends BaseCRUDJsonBodyMappingControll
this.addDict(model, "subAddType", SubAddTypeEnum.getEnumMap());
this.addDict(model, "checkType", CheckTypeEnum.getEnumMap());
this.addDict(model, "checkResult", CheckResultEnum.getEnumMap());
this.addDict(model, "checkResultAdd", CheckResultAddEnum.getEnumMap());
this.addDict(model, "checkResultSub", CheckResultSubEnum.getEnumMap());
super.init(model, context);
}
......
......@@ -51,6 +51,8 @@ public class CheckComplainRecordController extends BaseCRUDJsonBodyMappingContro
this.addDict(model, "subAddType", SubAddTypeEnum.getEnumMap());
this.addDict(model, "checkType", CheckTypeEnum.getEnumMap());
this.addDict(model, "checkResult", CheckResultEnum.getEnumMap());
this.addDict(model, "checkResultAdd", CheckResultAddEnum.getEnumMap());
this.addDict(model, "checkResultSub", CheckResultSubEnum.getEnumMap());
}
@Override
......
......@@ -52,6 +52,8 @@ public class CheckEffectRecordController extends BaseCRUDJsonBodyMappingControll
this.addDict(model, "subAddType", SubAddTypeEnum.getEnumMap());
this.addDict(model, "checkType", CheckTypeEnum.getEnumMap());
this.addDict(model, "checkResult", CheckResultEnum.getEnumMap());
this.addDict(model, "checkResultAdd", CheckResultAddEnum.getEnumMap());
this.addDict(model, "checkResultSub", CheckResultSubEnum.getEnumMap());
}
@Override
......
......@@ -52,6 +52,8 @@ public class CheckGoworkRecordController extends BaseCRUDJsonBodyMappingControll
this.addDict(model, "subAddType", SubAddTypeEnum.getEnumMap());
this.addDict(model, "checkType", CheckTypeEnum.getEnumMap());
this.addDict(model, "checkResult", CheckResultEnum.getEnumMap());
this.addDict(model, "checkResultAdd", CheckResultAddEnum.getEnumMap());
this.addDict(model, "checkResultSub", CheckResultSubEnum.getEnumMap());
}
@Override
......
......@@ -52,6 +52,8 @@ public class CheckOtherRecordController extends BaseCRUDJsonBodyMappingControlle
this.addDict(model, "subAddType", SubAddTypeEnum.getEnumMap());
this.addDict(model, "checkType", CheckTypeEnum.getEnumMap());
this.addDict(model, "checkResult", CheckResultEnum.getEnumMap());
this.addDict(model, "checkResultAdd", CheckResultAddEnum.getEnumMap());
this.addDict(model, "checkResultSub", CheckResultSubEnum.getEnumMap());
}
@Override
......
package com.mortals.xhx.module.check.web;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
......@@ -10,44 +11,51 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import com.mortals.framework.model.Context;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.module.check.model.CheckReviewRecordEntity;
import com.mortals.xhx.module.check.service.CheckReviewRecordService;
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.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject;
import java.util.Arrays;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*;
/**
*
* 评价差评绩效核查信息
*
* @author zxfei
* @date 2023-07-11
*/
* 评价差评绩效核查信息
*
* @author zxfei
* @date 2023-07-11
*/
@RestController
@RequestMapping("check/review/record")
public class CheckReviewRecordController extends BaseCRUDJsonBodyMappingController<CheckReviewRecordService,CheckReviewRecordEntity,Long> {
public class CheckReviewRecordController extends BaseCRUDJsonBodyMappingController<CheckReviewRecordService, CheckReviewRecordEntity, Long> {
@Autowired
private ParamService paramService;
public CheckReviewRecordController(){
super.setModuleDesc( "评价差评绩效核查信息");
public CheckReviewRecordController() {
super.setModuleDesc("评价差评绩效核查信息");
}
@Override
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "reviewResult", paramService.getParamBySecondOrganize("CheckReviewRecord","reviewResult"));
this.addDict(model, "reviewSource", paramService.getParamBySecondOrganize("CheckReviewRecord","reviewSource"));
this.addDict(model, "reviewResult", paramService.getParamBySecondOrganize("CheckReviewRecord", "reviewResult"));
this.addDict(model, "reviewSource", paramService.getParamBySecondOrganize("CheckReviewRecord", "reviewSource"));
this.addDict(model, "checkStatus", CheckStatusEnum.getEnumMap());
this.addDict(model, "subMethod", SubMethodEnum.getEnumMap());
......@@ -55,6 +63,8 @@ public class CheckReviewRecordController extends BaseCRUDJsonBodyMappingControll
this.addDict(model, "checkType", CheckTypeEnum.getEnumMap());
this.addDict(model, "checkResult", CheckResultEnum.getEnumMap());
this.addDict(model, "checkResultAdd", CheckResultAddEnum.getEnumMap());
this.addDict(model, "checkResultSub", CheckResultSubEnum.getEnumMap());
}
@Override
......@@ -69,6 +79,7 @@ public class CheckReviewRecordController extends BaseCRUDJsonBodyMappingControll
/**
* 审核
*
* @param entity
* @return
*/
......
......@@ -41,10 +41,10 @@ public class PerformAttendRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
checkAttendRecordEntity.setRecordId(entity.getId());
if (entity.getSubMethod() == SubMethodEnum.系统自动.getValue()) {
checkAttendRecordEntity.setCheckStatus(CheckStatusEnum.已处理.getValue()); //自动扣分相设置为已处理
checkAttendRecordEntity.setCheckTime(new Date());
} else {
checkAttendRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理
}
checkAttendRecordEntity.setCheckTime(new Date());
checkAttendRecordService.save(checkAttendRecordEntity, context);
}
......
......@@ -40,10 +40,10 @@ public class PerformComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Pe
checkComplainRecordEntity.setRecordId(entity.getId());
if(entity.getSubMethod()== SubMethodEnum.系统自动.getValue()){
checkComplainRecordEntity.setCheckStatus(CheckStatusEnum.已处理.getValue()); //自动扣分相设置为已处理
checkComplainRecordEntity.setCheckTime(new Date());
}else {
checkComplainRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理
}
checkComplainRecordEntity.setCheckTime(new Date());
checkComplainRecordService.save(checkComplainRecordEntity,context);
}
......
......@@ -40,10 +40,10 @@ public class PerformEffectRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
checkEffectRecordEntity.setRecordId(entity.getId());
if(entity.getSubMethod()== SubMethodEnum.系统自动.getValue()){
checkEffectRecordEntity.setCheckStatus(CheckStatusEnum.已处理.getValue()); //自动扣分相设置为已处理
checkEffectRecordEntity.setCheckTime(new Date());
}else {
checkEffectRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理
}
checkEffectRecordEntity.setCheckTime(new Date());
checkEffectRecordService.save(checkEffectRecordEntity,context);
}
......
......@@ -40,10 +40,10 @@ public class PerformGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
checkGoworkRecordEntity.setRecordId(entity.getId());
if(entity.getSubMethod()== SubMethodEnum.系统自动.getValue()){
checkGoworkRecordEntity.setCheckStatus(CheckStatusEnum.已处理.getValue()); //自动扣分相设置为已处理
checkGoworkRecordEntity.setCheckTime(new Date());
}else {
checkGoworkRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理
}
checkGoworkRecordEntity.setCheckTime(new Date());
checkGoworkRecordService.save(checkGoworkRecordEntity,context);
}
......
......@@ -40,10 +40,10 @@ public class PerformOtherRecordServiceImpl extends AbstractCRUDServiceImpl<Perfo
checkOtherRecordEntity.setRecordId(entity.getId());
if(entity.getSubMethod()== SubMethodEnum.系统自动.getValue()){
checkOtherRecordEntity.setCheckStatus(CheckStatusEnum.已处理.getValue()); //自动扣分相设置为已处理
checkOtherRecordEntity.setCheckTime(new Date());
}else {
checkOtherRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理
}
checkOtherRecordEntity.setCheckTime(new Date());
checkOtherRecordService.save(checkOtherRecordEntity,context);
}
......
......@@ -39,12 +39,11 @@ public class PerformReviewRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
checkReviewRecordEntity.setRecordId(entity.getId());
if(entity.getSubMethod()== SubMethodEnum.系统自动.getValue()){
checkReviewRecordEntity.setCheckStatus(CheckStatusEnum.已处理.getValue()); //自动扣分相设置为已处理
checkReviewRecordEntity.setCheckTime(new Date());
}else {
checkReviewRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理
}
//checkReviewRecordEntity.s
checkReviewRecordService.save(checkReviewRecordEntity,context);
}
......
package com.mortals.xhx.module.staff.model;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.ArrayList;
import cn.hutool.core.date.DateUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.staff.model.vo.StaffPerformSummaryVo;
import lombok.Data;
/**
* 员工绩效统计实体对象
*
* @author zxfei
* @date 2023-07-14
*/
* 员工绩效统计实体对象
*
* @author zxfei
* @date 2023-07-18
*/
@Data
public class StaffPerformSummaryEntity extends StaffPerformSummaryVo {
private static final long serialVersionUID = 1L;
/**
* 人员id
*/
* 人员id
*/
private Long staffId;
/**
* 工号
*/
* 所属中心
*/
@Excel(name = "所属中心")
private String belongCenter;
/**
* 工号
*/
@Excel(name = "工号")
private String workNum;
/**
* 人员名称
*/
* 人员名称
*/
@Excel(name = "人员名称")
private String staffName;
/**
* 部门id号
*/
* 部门id号
*/
private Long deptId;
/**
* 部门名称
*/
* 部门名称
*/
@Excel(name = "部门名称")
private String deptName;
/**
* 考勤绩效指标分数
*/
* 考勤绩效指标分数
*/
@Excel(name = "考勤绩效指标分数")
private BigDecimal attendScore;
/**
* 评价绩效指标分数
*/
* 评价绩效指标分数
*/
@Excel(name = "评价绩效指标分数")
private BigDecimal reviewScore;
/**
* 投诉绩效指标分数
*/
* 投诉绩效指标分数
*/
@Excel(name = "投诉绩效指标分数")
private BigDecimal complainScore;
/**
* 办件绩效分数
*/
* 办件绩效分数
*/
@Excel(name = "办件绩效分数")
private BigDecimal goworkScore;
/**
* 效能绩效分数
*/
* 效能绩效分数
*/
@Excel(name = "效能绩效分数")
private BigDecimal effectScore;
/**
* 其它绩效分数
*/
* 其它绩效分数
*/
@Excel(name = "其它绩效分数")
private BigDecimal otherScore;
/**
* 累计异常分数
*/
* 累计异常分数
*/
@Excel(name = "累计异常分数")
private BigDecimal errorScore;
/**
* 当月得分数
*/
* 当月得分数
*/
@Excel(name = "当月得分数")
private BigDecimal totalScore;
/**
* 备注
*/
* 备注
*/
private String remark;
/**
* 年
*/
* 年
*/
@Excel(name = "年")
private Integer year;
/**
* 月
*/
* 月
*/
@Excel(name = "月")
private Integer month;
@Override
public int hashCode() {
return this.getId().hashCode();
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
......@@ -91,7 +112,7 @@ public class StaffPerformSummaryEntity extends StaffPerformSummaryVo {
if (obj instanceof StaffPerformSummaryEntity) {
StaffPerformSummaryEntity tmp = (StaffPerformSummaryEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
return true;
}
}
return false;
......@@ -99,36 +120,38 @@ public class StaffPerformSummaryEntity extends StaffPerformSummaryVo {
public void initAttrValue(){
this.staffId = 0L;
this.staffId = 0L;
this.workNum = "";
this.workNum = "";
this.staffName = "";
this.staffName = "";
this.deptId = 0L;
this.deptId = 0L;
this.deptName = "";
this.deptName = "";
this.attendScore = new BigDecimal(0);
this.attendScore = new BigDecimal(0);
this.reviewScore = new BigDecimal(0);
this.reviewScore = new BigDecimal(0);
this.complainScore = new BigDecimal(0);
this.complainScore = new BigDecimal(0);
this.goworkScore = new BigDecimal(0);
this.goworkScore = new BigDecimal(0);
this.effectScore = new BigDecimal(0);
this.effectScore = new BigDecimal(0);
this.otherScore = new BigDecimal(0);
this.otherScore = new BigDecimal(0);
this.errorScore = new BigDecimal(0);
this.errorScore = new BigDecimal(0);
this.totalScore = new BigDecimal(0);
this.totalScore = new BigDecimal(0);
this.remark = "";
this.remark = "";
this.year = DateUtil.year(new Date());
this.year = -1;
this.month = DateUtil.month(new Date())+1;
this.month = -1;
this.belongCenter = "宜宾市民中心";
}
}
\ No newline at end of file
......@@ -767,3 +767,5 @@ ALTER TABLE mortals_xhx_attendance_stat ADD COLUMN `goTimes` int(9) default
ALTER TABLE mortals_xhx_attendance_stat ADD COLUMN `morningTimes` int(9) default 0 COMMENT '上午缺卡次数' AFTER goTimes;
ALTER TABLE mortals_xhx_attendance_stat ADD COLUMN `afternoonTimes` int(9) default 0 COMMENT '下午缺卡次数' AFTER morningTimes;
ALTER TABLE mortals_xhx_staff_perform_summary ADD COLUMN `belongCenter` varchar(512) DEFAULT '宜宾市民中心' COMMENT '所属中心' AFTER staffName;
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