Commit a55f8d07 authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents 3aeb3bfd 537ce757
......@@ -50,7 +50,7 @@ public class PerformErrorMessagePerformApiController extends AbstractBaseControl
if(StringUtils.isNotEmpty(query.getErrorTimeStart())){
try {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Date date = sdf.parse(query.getYearmonth());
Date date = sdf.parse(query.getErrorTimeStart());
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
summaryQuery.setYear(calendar.get(Calendar.YEAR));
......
......@@ -8,6 +8,7 @@ import com.mortals.framework.common.Rest;
import com.mortals.framework.service.ICacheService;
import com.mortals.framework.util.DataUtil;
import com.mortals.framework.util.DateUtils;
import com.mortals.framework.util.StringUtils;
import com.mortals.framework.util.ThreadPool;
import com.mortals.xhx.base.system.user.model.UserEntity;
import com.mortals.xhx.base.system.user.service.UserService;
......@@ -77,6 +78,9 @@ public class AttendanceLeaveRecordServiceImpl extends AbstractCRUDServiceImpl<At
@Autowired
private PerformRulesService performRulesService;
/** 员工事假请假数据key 员工id+开始时间+结束时间*/
private static String LEAVE_REIDS_KEY ="attendance:leave:";
@Override
protected void updateAfter(AttendanceLeaveRecordEntity entity, Context context) throws AppException {
super.updateAfter(entity, context);
......@@ -228,20 +232,16 @@ public class AttendanceLeaveRecordServiceImpl extends AbstractCRUDServiceImpl<At
//以半天4小时为计算单位进行扣分
int multiple = entity.getDuration() / 14400;
if (multiple > 0) {
synchronized (this) {
String redisKey = entity.getLeavePersonId()+"_"+entity.getLeavePerson()+"_"+DateUtils.getDateTimeStr(entity.getStartTime(),"yyyyMMddHHmmss")+"_"+DateUtils.getDateTimeStr(entity.getEndTime(),"yyyyMMddHHmmss");
String leaveKey = cacheService.get(LEAVE_REIDS_KEY + redisKey);
if(StringUtils.isEmpty(leaveKey)) {
cacheService.set(LEAVE_REIDS_KEY + redisKey, redisKey, 300); //五分钟内不会重复
PerformAttendRecordEntity recordEntity = conversionLeaveRecord(entity);
recordEntity.setCreateTime(new Date());
recordEntity.setCreateUserId(1l);
recordEntity.setErrorTime(entity.getStartTime());
recordEntity.setScore(recordEntity.getScore().multiply(new BigDecimal(multiple)));
PerformAttendRecordQuery query = new PerformAttendRecordQuery();
query.setStaffId(recordEntity.getStaffId());
query.setRuleId(recordEntity.getRuleId());
query.setErrorTime(recordEntity.getErrorTime());
PerformAttendRecordEntity temp = performAttendRecordService.selectOne(query);
if (ObjectUtils.isEmpty(temp)) {
performAttendRecordService.save(recordEntity, context);
}
performAttendRecordService.save(recordEntity, context);
}
}
}
......
......@@ -129,13 +129,15 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
}
//添加绩效异常信息
try {
PerformErrorMessageEntity errorMessageEntity = new PerformErrorMessageEntity();
errorMessageEntity.initAttrValue();
BeanUtils.copyProperties(entity, errorMessageEntity, BeanUtil.getNullPropertyNames(entity));
errorMessageEntity.setCheckRecordId(entity.getId());
errorMessageEntity.setErrorTime(entity.getErrorTime());
errorMessageEntity.setPerformType(PerformTypeEnum.考勤绩效.getValue());
performErrorMessageService.save(errorMessageEntity);
if(!entity.getErrorTime().after(new Date())){
PerformErrorMessageEntity errorMessageEntity = new PerformErrorMessageEntity();
errorMessageEntity.initAttrValue();
BeanUtils.copyProperties(entity, errorMessageEntity, BeanUtil.getNullPropertyNames(entity));
errorMessageEntity.setCheckRecordId(entity.getId());
errorMessageEntity.setErrorTime(entity.getErrorTime());
errorMessageEntity.setPerformType(PerformTypeEnum.考勤绩效.getValue());
performErrorMessageService.save(errorMessageEntity);
}
}catch (Exception e) {
log.error("新增绩效异常信息核查状态出错", e);
}
......
......@@ -120,17 +120,17 @@ public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckE
@Override
protected void saveAfter(CheckEffectRecordEntity entity, Context context) throws AppException {
//添加绩效异常信息
try {
PerformErrorMessageEntity errorMessageEntity = new PerformErrorMessageEntity();
errorMessageEntity.initAttrValue();
BeanUtils.copyProperties(entity, errorMessageEntity, BeanUtil.getNullPropertyNames(entity));
errorMessageEntity.setCheckRecordId(entity.getId());
errorMessageEntity.setErrorTime(entity.getHappenTime());
errorMessageEntity.setPerformType(PerformTypeEnum.效能绩效.getValue());
performErrorMessageService.save(errorMessageEntity);
}catch (Exception e) {
log.error("新增绩效异常信息核查状态出错", e);
}
// try {
// PerformErrorMessageEntity errorMessageEntity = new PerformErrorMessageEntity();
// errorMessageEntity.initAttrValue();
// BeanUtils.copyProperties(entity, errorMessageEntity, BeanUtil.getNullPropertyNames(entity));
// errorMessageEntity.setCheckRecordId(entity.getId());
// errorMessageEntity.setErrorTime(entity.getHappenTime());
// errorMessageEntity.setPerformType(PerformTypeEnum.效能绩效.getValue());
// performErrorMessageService.save(errorMessageEntity);
// }catch (Exception e) {
// log.error("新增绩效异常信息核查状态出错", e);
// }
try{
StaffCheckSummaryQuery query = new StaffCheckSummaryQuery();
......@@ -147,18 +147,19 @@ public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckE
@Override
protected void removeAfter(Long[] ids, Context context, int result) throws AppException {
try {
PerformErrorMessageQuery query = new PerformErrorMessageQuery();
query.setPerformType(PerformTypeEnum.效能绩效.getValue());
query.setCheckRecordIdList(Arrays.asList(ids));
List<PerformErrorMessageEntity> errorList = performErrorMessageService.find(query);
if (CollectionUtils.isNotEmpty(errorList)) {
Long[] deleteIds = errorList.stream().map(i -> i.getId()).toArray(Long[]::new);
performErrorMessageService.remove(deleteIds, context);
}
}catch (Exception e){
log.error("删除绩效异常信息核查状态出错", e);
}
super.removeAfter(ids, context, result);
// try {
// PerformErrorMessageQuery query = new PerformErrorMessageQuery();
// query.setPerformType(PerformTypeEnum.效能绩效.getValue());
// query.setCheckRecordIdList(Arrays.asList(ids));
// List<PerformErrorMessageEntity> errorList = performErrorMessageService.find(query);
// if (CollectionUtils.isNotEmpty(errorList)) {
// Long[] deleteIds = errorList.stream().map(i -> i.getId()).toArray(Long[]::new);
// performErrorMessageService.remove(deleteIds, context);
// }
// }catch (Exception e){
// log.error("删除绩效异常信息核查状态出错", e);
// }
}
private void sendCheckDingTalk(CheckEffectRecordEntity entity) {
......@@ -210,19 +211,19 @@ public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckE
entity.setCheckStatus(CheckStatusEnum.已处理.getValue()); //处理状态(1.未处理,2.已处理)
dao.update(entity);
//更新绩效异常信息核查状态
try {
PerformErrorMessageEntity errorMessageEntity = performErrorMessageService.selectOne(new PerformErrorMessageQuery().checkRecordId(entity.getId()).performType(PerformTypeEnum.效能绩效.getValue()));
if(errorMessageEntity!=null){
PerformErrorMessageEntity updateEntity = new PerformErrorMessageEntity();
updateEntity.setId(errorMessageEntity.getId());
updateEntity.setCheckStatus(CheckStatusEnum.已处理.getValue());
updateEntity.setCheckTime(entity.getCheckTime());
updateEntity.setUpdateTime(new Date());
performErrorMessageService.update(updateEntity);
}
}catch (Exception e){
log.error("更新绩效异常信息核查状态出错", e);
}
// try {
// PerformErrorMessageEntity errorMessageEntity = performErrorMessageService.selectOne(new PerformErrorMessageQuery().checkRecordId(entity.getId()).performType(PerformTypeEnum.效能绩效.getValue()));
// if(errorMessageEntity!=null){
// PerformErrorMessageEntity updateEntity = new PerformErrorMessageEntity();
// updateEntity.setId(errorMessageEntity.getId());
// updateEntity.setCheckStatus(CheckStatusEnum.已处理.getValue());
// updateEntity.setCheckTime(entity.getCheckTime());
// updateEntity.setUpdateTime(new Date());
// performErrorMessageService.update(updateEntity);
// }
// }catch (Exception e){
// log.error("更新绩效异常信息核查状态出错", e);
// }
try{
if(!ObjectUtils.isEmpty(temp.getRecordId())){
PerformEffectRecordEntity recordEntity = recordService.get(temp.getRecordId());
......
......@@ -265,6 +265,15 @@ public class PerformAttendAppealEntity extends PerformAttendAppealVo {
* 申诉人姓名
*/
private String appealPerson;
/**
* 处理时间
*/
private Date processTime;
/**
* 处理人员
*/
@Excel(name = "处理人员")
private String processPerson;
/**
* 绩效记录申诉附件信息信息
*/
......@@ -405,5 +414,9 @@ public class PerformAttendAppealEntity extends PerformAttendAppealVo {
this.appealPersonId = null;
this.appealPerson = "";
this.processTime = null;
this.processPerson = "";
}
}
\ No newline at end of file
......@@ -526,6 +526,18 @@ public class PerformAttendAppealQuery extends PerformAttendAppealEntity {
/** 申诉人姓名排除列表 */
private List <String> appealPersonNotList;
/** 开始 处理时间 */
private String processTimeStart;
/** 结束 处理时间 */
private String processTimeEnd;
/** 处理人员 */
private List<String> processPersonList;
/** 处理人员排除列表 */
private List <String> processPersonNotList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<PerformAttendAppealQuery> orConditionList;
......@@ -3336,6 +3348,70 @@ public class PerformAttendAppealQuery extends PerformAttendAppealEntity {
this.salaNameNotList = salaNameNotList;
}
/**
* 获取 开始 处理时间
* @return processTimeStart
*/
public String getProcessTimeStart(){
return this.processTimeStart;
}
/**
* 设置 开始 处理时间
* @param processTimeStart
*/
public void setProcessTimeStart(String processTimeStart){
this.processTimeStart = processTimeStart;
}
/**
* 获取 结束 处理时间
* @return processTimeEnd
*/
public String getProcessTimeEnd(){
return this.processTimeEnd;
}
/**
* 设置 结束 处理时间
* @param processTimeEnd
*/
public void setProcessTimeEnd(String processTimeEnd){
this.processTimeEnd = processTimeEnd;
}
/**
* 获取 处理人员
* @return processPersonList
*/
public List<String> getProcessPersonList(){
return this.processPersonList;
}
/**
* 设置 处理人员
* @param processPersonList
*/
public void setProcessPersonList(List<String> processPersonList){
this.processPersonList = processPersonList;
}
/**
* 获取 处理人员
* @return processPersonNotList
*/
public List<String> getProcessPersonNotList(){
return this.processPersonNotList;
}
/**
* 设置 处理人员
* @param processPersonNotList
*/
public void setProcessPersonNotList(List<String> processPersonNotList){
this.processPersonNotList = processPersonNotList;
}
/**
* 设置 序号,主键,自增长
* @param id
......@@ -4945,6 +5021,23 @@ public class PerformAttendAppealQuery extends PerformAttendAppealEntity {
return this;
}
/**
* 设置 处理人员
* @param processPerson
*/
public PerformAttendAppealQuery processPerson(String processPerson){
setProcessPerson(processPerson);
return this;
}
/**
* 设置 处理人员
* @param processPersonList
*/
public PerformAttendAppealQuery processPersonList(List<String> processPersonList){
this.processPersonList = processPersonList;
return this;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
......
......@@ -4,10 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.model.Context;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.AppealStatusEnum;
import com.mortals.xhx.common.code.CheckStatusEnum;
import com.mortals.xhx.common.code.PerformTypeEnum;
import com.mortals.xhx.common.code.SubAddTypeEnum;
import com.mortals.xhx.common.code.*;
import com.mortals.xhx.module.check.model.*;
import com.mortals.xhx.module.check.service.*;
import com.mortals.xhx.module.perform.model.PerformAttendAppealEntity;
......@@ -89,27 +86,80 @@ public class PerformErrorMessageController extends BaseCRUDJsonBodyMappingContro
ret.put("data", entity);
if(entity.getPerformType().equals(PerformTypeEnum.考勤绩效.getValue())){
CheckAttendRecordEntity checkAttendRecordEntity = checkAttendRecordService.get(entity.getCheckRecordId());
ret.put("checkRecordData", checkAttendRecordEntity);
ret.put(PerformTypeEnum.考勤绩效.getValue(), checkAttendRecordEntity);
this.addDict(model, "checkStatus", CheckStatusEnum.getEnumMap());
this.addDict(model, "subMethod", SubMethodEnum.getEnumMap());
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());
}
if(entity.getPerformType().equals(PerformTypeEnum.效能绩效.getValue())){
CheckEffectRecordEntity checkEffectRecordEntity = checkEffectRecordService.get(entity.getCheckRecordId());
ret.put("checkRecordData", checkEffectRecordEntity);
ret.put(PerformTypeEnum.效能绩效.getValue(), checkEffectRecordEntity);
this.addDict(model, "irregularType", IrregularTypeEnum.getEnumMap());
this.addDict(model, "checkStatus", CheckStatusEnum.getEnumMap());
this.addDict(model, "subMethod", SubMethodEnum.getEnumMap(SubMethodEnum.大厅巡查.getValue(),SubMethodEnum.申诉冲销.getValue()));
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());
this.addDict(model, "processStatus", ProcessStatusEnum.getEnumMap());
}
if(entity.getPerformType().equals(PerformTypeEnum.办件绩效.getValue())){
CheckGoworkRecordEntity checkGoworkRecordEntity = checkGoworkRecordService.get(entity.getCheckRecordId());
ret.put("checkRecordData", checkGoworkRecordEntity);
ret.put(PerformTypeEnum.办件绩效.getValue(), checkGoworkRecordEntity);
this.addDict(model, "checkStatus", CheckStatusEnum.getEnumMap());
this.addDict(model, "subMethod", SubMethodEnum.getEnumMap());
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());
}
if(entity.getPerformType().equals(PerformTypeEnum.评价差评绩效.getValue())){
CheckReviewRecordEntity checkReviewRecordEntity = checkReviewRecordService.get(entity.getCheckRecordId());
ret.put("checkRecordData", checkReviewRecordEntity);
ret.put(PerformTypeEnum.评价差评绩效.getValue(), checkReviewRecordEntity);
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());
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());
this.addDict(model, "reviewSource", ReviewSourceEnum.getEnumMap());
}
if(entity.getPerformType().equals(PerformTypeEnum.评价投诉绩效.getValue())){
CheckComplainRecordEntity checkComplainRecordEntity = checkComplainRecordService.get(entity.getCheckRecordId());
ret.put("checkRecordData", checkComplainRecordEntity);
ret.put(PerformTypeEnum.评价投诉绩效.getValue(), checkComplainRecordEntity);
this.addDict(model, "checkStatus", CheckStatusEnum.getEnumMap());
this.addDict(model, "subMethod", SubMethodEnum.getEnumMap());
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());
this.addDict(model, "complainSource", ReviewSourceEnum.getEnumMap());
}
if(entity.getPerformType().equals(PerformTypeEnum.其它绩效.getValue())){
CheckOtherRecordEntity checkOtherRecordEntity = checkOtherRecordService.get(entity.getCheckRecordId());
ret.put("checkRecordData", checkOtherRecordEntity);
ret.put(PerformTypeEnum.其它绩效.getValue(), checkOtherRecordEntity);
this.addDict(model, "irregularOtherType", paramService.getParamBySecondOrganize("CheckOtherRecord","irregularOtherType"));
this.addDict(model, "checkStatus", CheckStatusEnum.getEnumMap());
this.addDict(model, "subMethod", SubMethodEnum.getEnumMap());
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());
}
if (!ObjectUtils.isEmpty(context) && !ObjectUtils.isEmpty(context.getUser())) {
this.recordSysLog(this.request, busiDesc + " 【成功】");
......
......@@ -82,6 +82,8 @@
<result property="salaName" column="salaName" />
<result property="appealPersonId" column="appealPersonId" />
<result property="appealPerson" column="appealPerson" />
<result property="processTime" column="processTime" />
<result property="processPerson" column="processPerson" />
<result property="checkStatus" column="checkStatus" />
</resultMap>
<!-- 获取列表 -->
......@@ -1538,5 +1540,40 @@
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('processTime')">
<if test="conditionParamRef.processTime != null ">
${_conditionType_} a.processTime = #{${_conditionParam_}.processTime}
</if>
<if test="conditionParamRef.processTime == null">
${_conditionType_} a.processTime is null
</if>
</if>
<if test="conditionParamRef.containsKey('processTimeStart') and conditionParamRef.processTimeStart != null and conditionParamRef.processTimeStart!=''">
${_conditionType_} a.processTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.processTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('processTimeEnd') and conditionParamRef.processTimeEnd != null and conditionParamRef.processTimeEnd!=''">
${_conditionType_} a.processTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.processTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('processPerson')">
<if test="conditionParamRef.processPerson != null and conditionParamRef.processPerson != ''">
${_conditionType_} a.processPerson like #{${_conditionParam_}.processPerson}
</if>
<if test="conditionParamRef.processPerson == null">
${_conditionType_} a.processPerson is null
</if>
</if>
<if test="conditionParamRef.containsKey('processPersonList') and conditionParamRef.processPersonList.size() > 0">
${_conditionType_} a.processPerson in
<foreach collection="conditionParamRef.processPersonList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('processPersonNotList') and conditionParamRef.processPersonNotList.size() > 0">
${_conditionType_} a.processPerson not in
<foreach collection="conditionParamRef.processPersonNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
</sql>
</mapper>
\ No newline at end of file
......@@ -1324,5 +1324,7 @@ PRIMARY KEY (`id`)
ALTER TABLE `mortals_xhx_perform_attend_appeal` ADD COLUMN `appealPersonId` bigint(20) COMMENT '申诉人id' AFTER `performType`,
ADD COLUMN `appealPerson` varchar(64) COMMENT '申诉人姓名' AFTER `appealPersonId`,
ADD COLUMN `processTime` datetime COMMENT '处理时间' AFTER `processStatus`,
ADD COLUMN `processPerson` varchar(128) COMMENT '处理人员' AFTER `processTime`,
ADD KEY `appealPerson` (`appealPerson`) USING BTREE;
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