Commit 77293de4 authored by 廖旭伟's avatar 廖旭伟

汇总已审核的核查

parent 8e2957ce
...@@ -2,6 +2,9 @@ package com.mortals.xhx.module.check.dao; ...@@ -2,6 +2,9 @@ package com.mortals.xhx.module.check.dao;
import com.mortals.framework.dao.ICRUDDao; import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.check.model.CheckAttendRecordEntity; import com.mortals.xhx.module.check.model.CheckAttendRecordEntity;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo;
import java.util.List; import java.util.List;
/** /**
* 考勤绩效记录核查信息Dao * 考勤绩效记录核查信息Dao
...@@ -13,5 +16,10 @@ import java.util.List; ...@@ -13,5 +16,10 @@ import java.util.List;
public interface CheckAttendRecordDao extends ICRUDDao<CheckAttendRecordEntity,Long>{ public interface CheckAttendRecordDao extends ICRUDDao<CheckAttendRecordEntity,Long>{
/**
* 汇总已审核的核查记录
* @param query
* @return
*/
List<StaffCheckSummaryVo> summaryCheck(StaffCheckSummaryQuery query);
} }
...@@ -2,6 +2,9 @@ package com.mortals.xhx.module.check.dao; ...@@ -2,6 +2,9 @@ package com.mortals.xhx.module.check.dao;
import com.mortals.framework.dao.ICRUDDao; import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.check.model.CheckComplainRecordEntity; import com.mortals.xhx.module.check.model.CheckComplainRecordEntity;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo;
import java.util.List; import java.util.List;
/** /**
* 评价绩效投诉核查信息Dao * 评价绩效投诉核查信息Dao
...@@ -13,5 +16,10 @@ import java.util.List; ...@@ -13,5 +16,10 @@ import java.util.List;
public interface CheckComplainRecordDao extends ICRUDDao<CheckComplainRecordEntity,Long>{ public interface CheckComplainRecordDao extends ICRUDDao<CheckComplainRecordEntity,Long>{
/**
* 汇总已审核的核查记录
* @param query
* @return
*/
List<StaffCheckSummaryVo> summaryCheck(StaffCheckSummaryQuery query);
} }
...@@ -2,6 +2,9 @@ package com.mortals.xhx.module.check.dao; ...@@ -2,6 +2,9 @@ package com.mortals.xhx.module.check.dao;
import com.mortals.framework.dao.ICRUDDao; import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.check.model.CheckEffectRecordEntity; import com.mortals.xhx.module.check.model.CheckEffectRecordEntity;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo;
import java.util.List; import java.util.List;
/** /**
* 效能绩效核查信息Dao * 效能绩效核查信息Dao
...@@ -13,5 +16,10 @@ import java.util.List; ...@@ -13,5 +16,10 @@ import java.util.List;
public interface CheckEffectRecordDao extends ICRUDDao<CheckEffectRecordEntity,Long>{ public interface CheckEffectRecordDao extends ICRUDDao<CheckEffectRecordEntity,Long>{
/**
* 汇总已审核的核查记录
* @param query
* @return
*/
List<StaffCheckSummaryVo> summaryCheck(StaffCheckSummaryQuery query);
} }
...@@ -2,6 +2,9 @@ package com.mortals.xhx.module.check.dao; ...@@ -2,6 +2,9 @@ package com.mortals.xhx.module.check.dao;
import com.mortals.framework.dao.ICRUDDao; import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.check.model.CheckGoworkRecordEntity; import com.mortals.xhx.module.check.model.CheckGoworkRecordEntity;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo;
import java.util.List; import java.util.List;
/** /**
* 办件绩效核查信息Dao * 办件绩效核查信息Dao
...@@ -13,5 +16,10 @@ import java.util.List; ...@@ -13,5 +16,10 @@ import java.util.List;
public interface CheckGoworkRecordDao extends ICRUDDao<CheckGoworkRecordEntity,Long>{ public interface CheckGoworkRecordDao extends ICRUDDao<CheckGoworkRecordEntity,Long>{
/**
* 汇总已审核的核查记录
* @param query
* @return
*/
List<StaffCheckSummaryVo> summaryCheck(StaffCheckSummaryQuery query);
} }
...@@ -2,6 +2,9 @@ package com.mortals.xhx.module.check.dao; ...@@ -2,6 +2,9 @@ package com.mortals.xhx.module.check.dao;
import com.mortals.framework.dao.ICRUDDao; import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.check.model.CheckOtherRecordEntity; import com.mortals.xhx.module.check.model.CheckOtherRecordEntity;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo;
import java.util.List; import java.util.List;
/** /**
* 其它绩效核查信息Dao * 其它绩效核查信息Dao
...@@ -13,5 +16,10 @@ import java.util.List; ...@@ -13,5 +16,10 @@ import java.util.List;
public interface CheckOtherRecordDao extends ICRUDDao<CheckOtherRecordEntity,Long>{ public interface CheckOtherRecordDao extends ICRUDDao<CheckOtherRecordEntity,Long>{
/**
* 汇总已审核的核查记录
* @param query
* @return
*/
List<StaffCheckSummaryVo> summaryCheck(StaffCheckSummaryQuery query);
} }
...@@ -2,6 +2,9 @@ package com.mortals.xhx.module.check.dao; ...@@ -2,6 +2,9 @@ package com.mortals.xhx.module.check.dao;
import com.mortals.framework.dao.ICRUDDao; import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.check.model.CheckReviewRecordEntity; import com.mortals.xhx.module.check.model.CheckReviewRecordEntity;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo;
import java.util.List; import java.util.List;
/** /**
* 评价差评绩效核查信息Dao * 评价差评绩效核查信息Dao
...@@ -13,5 +16,10 @@ import java.util.List; ...@@ -13,5 +16,10 @@ import java.util.List;
public interface CheckReviewRecordDao extends ICRUDDao<CheckReviewRecordEntity,Long>{ public interface CheckReviewRecordDao extends ICRUDDao<CheckReviewRecordEntity,Long>{
/**
* 汇总已审核的核查记录
* @param query
* @return
*/
List<StaffCheckSummaryVo> summaryCheck(StaffCheckSummaryQuery query);
} }
package com.mortals.xhx.module.check.dao.ibatis; package com.mortals.xhx.module.check.dao.ibatis;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.check.dao.CheckAttendRecordDao; import com.mortals.xhx.module.check.dao.CheckAttendRecordDao;
import com.mortals.xhx.module.check.model.CheckAttendRecordEntity; import com.mortals.xhx.module.check.model.CheckAttendRecordEntity;
...@@ -17,5 +19,8 @@ import java.util.List; ...@@ -17,5 +19,8 @@ import java.util.List;
public class CheckAttendRecordDaoImpl extends BaseCRUDDaoMybatis<CheckAttendRecordEntity,Long> implements CheckAttendRecordDao { public class CheckAttendRecordDaoImpl extends BaseCRUDDaoMybatis<CheckAttendRecordEntity,Long> implements CheckAttendRecordDao {
@Override
public List<StaffCheckSummaryVo> summaryCheck(StaffCheckSummaryQuery query) {
return this.getSqlSession().selectList(this.getSqlId("getSummaryCheckList"), query);
}
} }
package com.mortals.xhx.module.check.dao.ibatis; package com.mortals.xhx.module.check.dao.ibatis;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.check.dao.CheckComplainRecordDao; import com.mortals.xhx.module.check.dao.CheckComplainRecordDao;
import com.mortals.xhx.module.check.model.CheckComplainRecordEntity; import com.mortals.xhx.module.check.model.CheckComplainRecordEntity;
...@@ -17,5 +19,8 @@ import java.util.List; ...@@ -17,5 +19,8 @@ import java.util.List;
public class CheckComplainRecordDaoImpl extends BaseCRUDDaoMybatis<CheckComplainRecordEntity,Long> implements CheckComplainRecordDao { public class CheckComplainRecordDaoImpl extends BaseCRUDDaoMybatis<CheckComplainRecordEntity,Long> implements CheckComplainRecordDao {
@Override
public List<StaffCheckSummaryVo> summaryCheck(StaffCheckSummaryQuery query) {
return this.getSqlSession().selectList(this.getSqlId("getSummaryCheckList"), query);
}
} }
package com.mortals.xhx.module.check.dao.ibatis; package com.mortals.xhx.module.check.dao.ibatis;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.check.dao.CheckEffectRecordDao; import com.mortals.xhx.module.check.dao.CheckEffectRecordDao;
import com.mortals.xhx.module.check.model.CheckEffectRecordEntity; import com.mortals.xhx.module.check.model.CheckEffectRecordEntity;
...@@ -17,5 +19,8 @@ import java.util.List; ...@@ -17,5 +19,8 @@ import java.util.List;
public class CheckEffectRecordDaoImpl extends BaseCRUDDaoMybatis<CheckEffectRecordEntity,Long> implements CheckEffectRecordDao { public class CheckEffectRecordDaoImpl extends BaseCRUDDaoMybatis<CheckEffectRecordEntity,Long> implements CheckEffectRecordDao {
@Override
public List<StaffCheckSummaryVo> summaryCheck(StaffCheckSummaryQuery query) {
return this.getSqlSession().selectList(this.getSqlId("getSummaryCheckList"), query);
}
} }
package com.mortals.xhx.module.check.dao.ibatis; package com.mortals.xhx.module.check.dao.ibatis;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.check.dao.CheckGoworkRecordDao; import com.mortals.xhx.module.check.dao.CheckGoworkRecordDao;
import com.mortals.xhx.module.check.model.CheckGoworkRecordEntity; import com.mortals.xhx.module.check.model.CheckGoworkRecordEntity;
...@@ -17,5 +19,8 @@ import java.util.List; ...@@ -17,5 +19,8 @@ import java.util.List;
public class CheckGoworkRecordDaoImpl extends BaseCRUDDaoMybatis<CheckGoworkRecordEntity,Long> implements CheckGoworkRecordDao { public class CheckGoworkRecordDaoImpl extends BaseCRUDDaoMybatis<CheckGoworkRecordEntity,Long> implements CheckGoworkRecordDao {
@Override
public List<StaffCheckSummaryVo> summaryCheck(StaffCheckSummaryQuery query) {
return this.getSqlSession().selectList(this.getSqlId("getSummaryCheckList"), query);
}
} }
package com.mortals.xhx.module.check.dao.ibatis; package com.mortals.xhx.module.check.dao.ibatis;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.check.dao.CheckOtherRecordDao; import com.mortals.xhx.module.check.dao.CheckOtherRecordDao;
import com.mortals.xhx.module.check.model.CheckOtherRecordEntity; import com.mortals.xhx.module.check.model.CheckOtherRecordEntity;
...@@ -17,5 +19,8 @@ import java.util.List; ...@@ -17,5 +19,8 @@ import java.util.List;
public class CheckOtherRecordDaoImpl extends BaseCRUDDaoMybatis<CheckOtherRecordEntity,Long> implements CheckOtherRecordDao { public class CheckOtherRecordDaoImpl extends BaseCRUDDaoMybatis<CheckOtherRecordEntity,Long> implements CheckOtherRecordDao {
@Override
public List<StaffCheckSummaryVo> summaryCheck(StaffCheckSummaryQuery query) {
return this.getSqlSession().selectList(this.getSqlId("getSummaryCheckList"), query);
}
} }
package com.mortals.xhx.module.check.dao.ibatis; package com.mortals.xhx.module.check.dao.ibatis;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.check.dao.CheckReviewRecordDao; import com.mortals.xhx.module.check.dao.CheckReviewRecordDao;
import com.mortals.xhx.module.check.model.CheckReviewRecordEntity; import com.mortals.xhx.module.check.model.CheckReviewRecordEntity;
...@@ -17,5 +19,8 @@ import java.util.List; ...@@ -17,5 +19,8 @@ import java.util.List;
public class CheckReviewRecordDaoImpl extends BaseCRUDDaoMybatis<CheckReviewRecordEntity,Long> implements CheckReviewRecordDao { public class CheckReviewRecordDaoImpl extends BaseCRUDDaoMybatis<CheckReviewRecordEntity,Long> implements CheckReviewRecordDao {
@Override
public List<StaffCheckSummaryVo> summaryCheck(StaffCheckSummaryQuery query) {
return this.getSqlSession().selectList(this.getSqlId("getSummaryCheckList"), query);
}
} }
package com.mortals.xhx.module.check.model.vo;
import lombok.Data;
/**
* 员工绩效核查汇总查询条件
*/
@Data
public class StaffCheckSummaryQuery {
/**员工ID*/
private Long staffId;
/** 开始 核查时间 */
private String checkTimeStart;
/** 结束 核查时间 */
private String checkTimeEnd;
}
package com.mortals.xhx.module.check.model.vo;
import lombok.Data;
import java.math.BigDecimal;
/**
* 员工绩效核查汇总结果视图
*/
@Data
public class StaffCheckSummaryVo {
/**
* 员工ID
*/
private Long staffId;
/**
* 员工姓名
*/
private String staffName;
/**
* 工号
*/
private String workNum;
/**
* 所属部门
*/
private Long deptId;
/**
* 所属部门名称
*/
private String deptName;
/**
* 汇总分值
*/
private BigDecimal sumScore;
/**
* 年
*/
private Integer year;
/**
* 月
*/
private Integer month;
}
package com.mortals.xhx.module.check.service; package com.mortals.xhx.module.check.service;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.check.model.CheckAttendRecordEntity; import com.mortals.xhx.module.check.model.CheckAttendRecordEntity;
import com.mortals.xhx.module.check.dao.CheckAttendRecordDao; import com.mortals.xhx.module.check.dao.CheckAttendRecordDao;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo;
import java.util.List;
/** /**
* CheckAttendRecordService * CheckAttendRecordService
* *
...@@ -13,4 +20,19 @@ import com.mortals.xhx.module.check.dao.CheckAttendRecordDao; ...@@ -13,4 +20,19 @@ import com.mortals.xhx.module.check.dao.CheckAttendRecordDao;
public interface CheckAttendRecordService extends ICRUDService<CheckAttendRecordEntity,Long>{ public interface CheckAttendRecordService extends ICRUDService<CheckAttendRecordEntity,Long>{
CheckAttendRecordDao getDao(); CheckAttendRecordDao getDao();
/**
* 核查人工审核
* @param entity
* @param context
* @throws AppException
*/
void examine(CheckAttendRecordEntity entity, Context context) throws AppException;
/**
* 汇总已审核的核查记录
* @param query
* @return
*/
List<StaffCheckSummaryVo> summaryCheck(StaffCheckSummaryQuery query) throws AppException;
} }
\ No newline at end of file
package com.mortals.xhx.module.check.service; package com.mortals.xhx.module.check.service;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.check.model.CheckComplainRecordEntity; import com.mortals.xhx.module.check.model.CheckComplainRecordEntity;
import com.mortals.xhx.module.check.dao.CheckComplainRecordDao; import com.mortals.xhx.module.check.dao.CheckComplainRecordDao;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo;
import java.util.List;
/** /**
* CheckComplainRecordService * CheckComplainRecordService
* *
...@@ -13,4 +20,19 @@ import com.mortals.xhx.module.check.dao.CheckComplainRecordDao; ...@@ -13,4 +20,19 @@ import com.mortals.xhx.module.check.dao.CheckComplainRecordDao;
public interface CheckComplainRecordService extends ICRUDService<CheckComplainRecordEntity,Long>{ public interface CheckComplainRecordService extends ICRUDService<CheckComplainRecordEntity,Long>{
CheckComplainRecordDao getDao(); CheckComplainRecordDao getDao();
/**
* 核查人工审核
* @param entity
* @param context
* @throws AppException
*/
void examine(CheckComplainRecordEntity entity, Context context) throws AppException;
/**
* 汇总已审核的核查记录
* @param query
* @return
*/
List<StaffCheckSummaryVo> summaryCheck(StaffCheckSummaryQuery query) throws AppException;
} }
\ No newline at end of file
package com.mortals.xhx.module.check.service; package com.mortals.xhx.module.check.service;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.check.model.CheckEffectRecordEntity; import com.mortals.xhx.module.check.model.CheckEffectRecordEntity;
import com.mortals.xhx.module.check.dao.CheckEffectRecordDao; import com.mortals.xhx.module.check.dao.CheckEffectRecordDao;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo;
import java.util.List;
/** /**
* CheckEffectRecordService * CheckEffectRecordService
* *
...@@ -13,4 +20,19 @@ import com.mortals.xhx.module.check.dao.CheckEffectRecordDao; ...@@ -13,4 +20,19 @@ import com.mortals.xhx.module.check.dao.CheckEffectRecordDao;
public interface CheckEffectRecordService extends ICRUDService<CheckEffectRecordEntity,Long>{ public interface CheckEffectRecordService extends ICRUDService<CheckEffectRecordEntity,Long>{
CheckEffectRecordDao getDao(); CheckEffectRecordDao getDao();
/**
* 核查人工审核
* @param entity
* @param context
* @throws AppException
*/
void examine(CheckEffectRecordEntity entity, Context context) throws AppException;
/**
* 汇总已审核的核查记录
* @param query
* @return
*/
List<StaffCheckSummaryVo> summaryCheck(StaffCheckSummaryQuery query) throws AppException;
} }
\ No newline at end of file
package com.mortals.xhx.module.check.service; package com.mortals.xhx.module.check.service;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.check.model.CheckGoworkRecordEntity; import com.mortals.xhx.module.check.model.CheckGoworkRecordEntity;
import com.mortals.xhx.module.check.dao.CheckGoworkRecordDao; import com.mortals.xhx.module.check.dao.CheckGoworkRecordDao;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo;
import java.util.List;
/** /**
* CheckGoworkRecordService * CheckGoworkRecordService
* *
...@@ -13,4 +20,19 @@ import com.mortals.xhx.module.check.dao.CheckGoworkRecordDao; ...@@ -13,4 +20,19 @@ import com.mortals.xhx.module.check.dao.CheckGoworkRecordDao;
public interface CheckGoworkRecordService extends ICRUDService<CheckGoworkRecordEntity,Long>{ public interface CheckGoworkRecordService extends ICRUDService<CheckGoworkRecordEntity,Long>{
CheckGoworkRecordDao getDao(); CheckGoworkRecordDao getDao();
/**
* 核查人工审核
* @param entity
* @param context
* @throws AppException
*/
void examine(CheckGoworkRecordEntity entity, Context context) throws AppException;
/**
* 汇总已审核的核查记录
* @param query
* @return
*/
List<StaffCheckSummaryVo> summaryCheck(StaffCheckSummaryQuery query) throws AppException;
} }
\ No newline at end of file
package com.mortals.xhx.module.check.service; package com.mortals.xhx.module.check.service;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.check.model.CheckOtherRecordEntity; import com.mortals.xhx.module.check.model.CheckOtherRecordEntity;
import com.mortals.xhx.module.check.dao.CheckOtherRecordDao; import com.mortals.xhx.module.check.dao.CheckOtherRecordDao;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo;
import java.util.List;
/** /**
* CheckOtherRecordService * CheckOtherRecordService
* *
...@@ -13,4 +20,19 @@ import com.mortals.xhx.module.check.dao.CheckOtherRecordDao; ...@@ -13,4 +20,19 @@ import com.mortals.xhx.module.check.dao.CheckOtherRecordDao;
public interface CheckOtherRecordService extends ICRUDService<CheckOtherRecordEntity,Long>{ public interface CheckOtherRecordService extends ICRUDService<CheckOtherRecordEntity,Long>{
CheckOtherRecordDao getDao(); CheckOtherRecordDao getDao();
/**
* 核查人工审核
* @param entity
* @param context
* @throws AppException
*/
void examine(CheckOtherRecordEntity entity, Context context) throws AppException;
/**
* 汇总已审核的核查记录
* @param query
* @return
*/
List<StaffCheckSummaryVo> summaryCheck(StaffCheckSummaryQuery query) throws AppException;
} }
\ No newline at end of file
package com.mortals.xhx.module.check.service; package com.mortals.xhx.module.check.service;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.check.model.CheckReviewRecordEntity; import com.mortals.xhx.module.check.model.CheckReviewRecordEntity;
import com.mortals.xhx.module.check.dao.CheckReviewRecordDao; import com.mortals.xhx.module.check.dao.CheckReviewRecordDao;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo;
import java.util.List;
/** /**
* CheckReviewRecordService * CheckReviewRecordService
* *
...@@ -13,4 +20,19 @@ import com.mortals.xhx.module.check.dao.CheckReviewRecordDao; ...@@ -13,4 +20,19 @@ import com.mortals.xhx.module.check.dao.CheckReviewRecordDao;
public interface CheckReviewRecordService extends ICRUDService<CheckReviewRecordEntity,Long>{ public interface CheckReviewRecordService extends ICRUDService<CheckReviewRecordEntity,Long>{
CheckReviewRecordDao getDao(); CheckReviewRecordDao getDao();
/**
* 核查人工审核
* @param entity
* @param context
* @throws AppException
*/
void examine(CheckReviewRecordEntity entity, Context context) throws AppException;
/**
* 汇总已审核的核查记录
* @param query
* @return
*/
List<StaffCheckSummaryVo> summaryCheck(StaffCheckSummaryQuery query) throws AppException;
} }
\ No newline at end of file
package com.mortals.xhx.module.check.service.impl; package com.mortals.xhx.module.check.service.impl;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.service.IUser;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.util.DateUtils;
import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.common.code.CheckStatusEnum;
import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.check.dao.CheckAttendRecordDao; import com.mortals.xhx.module.check.dao.CheckAttendRecordDao;
import com.mortals.xhx.module.check.model.CheckAttendRecordEntity; import com.mortals.xhx.module.check.model.CheckAttendRecordEntity;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo;
import com.mortals.xhx.module.check.service.CheckAttendRecordService; import com.mortals.xhx.module.check.service.CheckAttendRecordService;
import com.mortals.xhx.module.staff.model.StaffPerformSummaryEntity;
import com.mortals.xhx.module.staff.model.StaffPerformSummaryQuery;
import com.mortals.xhx.module.staff.service.StaffPerformSummaryService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
/** /**
* CheckAttendRecordService * CheckAttendRecordService
* 考勤绩效记录核查信息 service实现 * 考勤绩效记录核查信息 service实现
...@@ -18,4 +39,111 @@ import lombok.extern.slf4j.Slf4j; ...@@ -18,4 +39,111 @@ import lombok.extern.slf4j.Slf4j;
@Slf4j @Slf4j
public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckAttendRecordDao, CheckAttendRecordEntity, Long> implements CheckAttendRecordService { public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckAttendRecordDao, CheckAttendRecordEntity, Long> implements CheckAttendRecordService {
@Autowired
private StaffPerformSummaryService staffPerformSummaryService;
@Override
protected void saveAfter(CheckAttendRecordEntity entity, Context context) throws AppException {
try{
StaffCheckSummaryQuery query = new StaffCheckSummaryQuery();
query.setStaffId(entity.getStaffId());
query.setCheckTimeStart(DateUtils.getStrDate(entity.getCheckTime()));
query.setCheckTimeEnd(query.getCheckTimeStart());
summaryCheck(query);
}catch (Exception e){
log.error("汇总已审核的核查记录出错",e);
}
}
@Override
public void examine(CheckAttendRecordEntity entity, Context context) throws AppException {
if(entity.getId()==null){
throw new AppException("核查记录ID不能为空");
}
if (context != null && context.getUser()!=null) {
IUser user = context.getUser();
entity.setUpdateUserId(user.getId());
entity.setCheckPerson(user.getRealName());
}
entity.setCheckTime(new Date());
entity.setUpdateTime(entity.getCheckTime());
entity.setCheckStatus(CheckStatusEnum.已处理.getValue()); //处理状态(1.未处理,2.已处理)
dao.update(entity);
try{
CheckAttendRecordEntity temp = this.get(entity.getId());
if(temp!=null) {
StaffCheckSummaryQuery query = new StaffCheckSummaryQuery();
query.setStaffId(temp.getStaffId());
summaryCheck(query);
}
}catch (Exception e){
log.error("汇总已审核的核查记录出错",e);
}
}
@Override
public List<StaffCheckSummaryVo> summaryCheck(StaffCheckSummaryQuery query) throws AppException {
if(StringUtils.isEmpty(query.getCheckTimeStart())||StringUtils.isEmpty(query.getCheckTimeStart())){
SimpleDateFormat format=new SimpleDateFormat("yyyy-MM-dd");
Calendar calendar=Calendar.getInstance();
calendar.set(Calendar.DAY_OF_MONTH, 1);
String startTime = format.format(calendar.getTime());
calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
String endTime = format.format(calendar.getTime());
query.setCheckTimeStart(startTime);
query.setCheckTimeEnd(endTime);
}
List<StaffCheckSummaryVo> summaryVoList = dao.summaryCheck(query);
if(CollectionUtils.isNotEmpty(summaryVoList)){
for(StaffCheckSummaryVo vo:summaryVoList){
StaffPerformSummaryEntity staffPerformSummaryEntity = new StaffPerformSummaryEntity();
BeanUtils.copyProperties(vo,staffPerformSummaryEntity, BeanUtil.getNullPropertyNames(vo));
staffPerformSummaryEntity.setAttendScore(vo.getSumScore());
StaffPerformSummaryQuery summaryQuery = new StaffPerformSummaryQuery();
summaryQuery.setStaffId(vo.getStaffId());
summaryQuery.setYear(vo.getYear());
summaryQuery.setMonth(vo.getMonth());
StaffPerformSummaryEntity temp = staffPerformSummaryService.selectOne(summaryQuery);
if(temp!=null){
if(temp.getAssessScore()==null){
staffPerformSummaryEntity.setAssessScore(new BigDecimal(0));
}
if(temp.getOtherScore()==null){
staffPerformSummaryEntity.setOtherScore(new BigDecimal(0));
}
if(temp.getWorkScore()==null){
staffPerformSummaryEntity.setWorkScore(new BigDecimal(0));
}
if(temp.getEffectScore()==null){
staffPerformSummaryEntity.setEffectScore(new BigDecimal(0));
}
BigDecimal erro = new BigDecimal(0);
erro.add(staffPerformSummaryEntity.getAssessScore());
erro.add(staffPerformSummaryEntity.getAttendScore());
erro.add(staffPerformSummaryEntity.getOtherScore());
erro.add(staffPerformSummaryEntity.getWorkScore());
erro.add(staffPerformSummaryEntity.getEffectScore());
staffPerformSummaryEntity.setErrorScore(erro);
BigDecimal total = new BigDecimal(100);
staffPerformSummaryEntity.setTotalScore(total.subtract(erro));
staffPerformSummaryEntity.setId(temp.getId());
staffPerformSummaryEntity.setUpdateTime(new Date());
staffPerformSummaryService.update(staffPerformSummaryEntity);
}else {
staffPerformSummaryEntity.setAssessScore(new BigDecimal(0));
staffPerformSummaryEntity.setOtherScore(new BigDecimal(0));
staffPerformSummaryEntity.setWorkScore(new BigDecimal(0));
staffPerformSummaryEntity.setEffectScore(new BigDecimal(0));
staffPerformSummaryEntity.setErrorScore(vo.getSumScore());
BigDecimal total = new BigDecimal(100);
staffPerformSummaryEntity.setTotalScore(total.subtract(vo.getSumScore()));
staffPerformSummaryEntity.setCreateUserId(1l);
staffPerformSummaryEntity.setCreateTime(new Date());
staffPerformSummaryService.save(staffPerformSummaryEntity);
}
}
}
return summaryVoList;
}
} }
\ No newline at end of file
package com.mortals.xhx.module.check.service.impl; package com.mortals.xhx.module.check.service.impl;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.service.IUser;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.util.DateUtils;
import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.common.code.CheckStatusEnum;
import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.check.dao.CheckComplainRecordDao; import com.mortals.xhx.module.check.dao.CheckComplainRecordDao;
import com.mortals.xhx.module.check.model.CheckComplainRecordEntity; import com.mortals.xhx.module.check.model.CheckComplainRecordEntity;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo;
import com.mortals.xhx.module.check.service.CheckComplainRecordService; import com.mortals.xhx.module.check.service.CheckComplainRecordService;
import com.mortals.xhx.module.staff.model.StaffPerformSummaryEntity;
import com.mortals.xhx.module.staff.model.StaffPerformSummaryQuery;
import com.mortals.xhx.module.staff.service.StaffPerformSummaryService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
/** /**
* CheckComplainRecordService * CheckComplainRecordService
* 评价绩效投诉核查信息 service实现 * 评价绩效投诉核查信息 service实现
...@@ -18,4 +39,114 @@ import lombok.extern.slf4j.Slf4j; ...@@ -18,4 +39,114 @@ import lombok.extern.slf4j.Slf4j;
@Slf4j @Slf4j
public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<CheckComplainRecordDao, CheckComplainRecordEntity, Long> implements CheckComplainRecordService { public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<CheckComplainRecordDao, CheckComplainRecordEntity, Long> implements CheckComplainRecordService {
@Autowired
private StaffPerformSummaryService staffPerformSummaryService;
@Override
protected void saveAfter(CheckComplainRecordEntity entity, Context context) throws AppException {
try{
StaffCheckSummaryQuery query = new StaffCheckSummaryQuery();
query.setStaffId(entity.getStaffId());
query.setCheckTimeStart(DateUtils.getStrDate(entity.getCheckTime()));
query.setCheckTimeEnd(query.getCheckTimeStart());
summaryCheck(query);
}catch (Exception e){
log.error("汇总已审核的核查记录出错",e);
}
}
@Override
public void examine(CheckComplainRecordEntity entity, Context context) throws AppException {
if(entity.getId()==null){
throw new AppException("核查记录ID不能为空");
}
if (context != null && context.getUser()!=null) {
IUser user = context.getUser();
entity.setUpdateUserId(user.getId());
entity.setCheckPerson(user.getRealName());
}
entity.setCheckTime(new Date());
entity.setUpdateTime(entity.getCheckTime());
entity.setCheckStatus(CheckStatusEnum.已处理.getValue()); //处理状态(1.未处理,2.已处理)
dao.update(entity);
try{
CheckComplainRecordEntity temp = this.get(entity.getId());
if(temp!=null) {
StaffCheckSummaryQuery query = new StaffCheckSummaryQuery();
query.setStaffId(temp.getStaffId());
summaryCheck(query);
}
}catch (Exception e){
log.error("汇总已审核的核查记录出错",e);
}
}
@Override
public List<StaffCheckSummaryVo> summaryCheck(StaffCheckSummaryQuery query) throws AppException {
if(StringUtils.isEmpty(query.getCheckTimeStart())||StringUtils.isEmpty(query.getCheckTimeStart())){
SimpleDateFormat format=new SimpleDateFormat("yyyy-MM-dd");
Calendar calendar=Calendar.getInstance();
calendar.set(Calendar.DAY_OF_MONTH, 1);
String startTime = format.format(calendar.getTime());
calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
String endTime = format.format(calendar.getTime());
query.setCheckTimeStart(startTime);
query.setCheckTimeEnd(endTime);
}
List<StaffCheckSummaryVo> summaryVoList = dao.summaryCheck(query);
if(CollectionUtils.isNotEmpty(summaryVoList)){
for(StaffCheckSummaryVo vo:summaryVoList){
StaffPerformSummaryEntity staffPerformSummaryEntity = new StaffPerformSummaryEntity();
BeanUtils.copyProperties(vo,staffPerformSummaryEntity, BeanUtil.getNullPropertyNames(vo));
staffPerformSummaryEntity.setAssessScore(vo.getSumScore());
StaffPerformSummaryQuery summaryQuery = new StaffPerformSummaryQuery();
summaryQuery.setStaffId(vo.getStaffId());
summaryQuery.setYear(vo.getYear());
summaryQuery.setMonth(vo.getMonth());
StaffPerformSummaryEntity temp = staffPerformSummaryService.selectOne(summaryQuery);
if(temp!=null){
if(temp.getAttendScore()==null){
staffPerformSummaryEntity.setAttendScore(new BigDecimal(0));
}
if(temp.getOtherScore()==null){
staffPerformSummaryEntity.setOtherScore(new BigDecimal(0));
}
if(temp.getWorkScore()==null){
staffPerformSummaryEntity.setWorkScore(new BigDecimal(0));
}
if(temp.getEffectScore()==null){
staffPerformSummaryEntity.setEffectScore(new BigDecimal(0));
}
BigDecimal erro = new BigDecimal(0);
erro.add(staffPerformSummaryEntity.getAssessScore());
erro.add(staffPerformSummaryEntity.getAttendScore());
erro.add(staffPerformSummaryEntity.getOtherScore());
erro.add(staffPerformSummaryEntity.getWorkScore());
erro.add(staffPerformSummaryEntity.getEffectScore());
staffPerformSummaryEntity.setErrorScore(erro);
BigDecimal total = new BigDecimal(100);
staffPerformSummaryEntity.setTotalScore(total.subtract(erro));
staffPerformSummaryEntity.setId(temp.getId());
staffPerformSummaryEntity.setUpdateTime(new Date());
staffPerformSummaryService.update(staffPerformSummaryEntity);
staffPerformSummaryEntity.setId(temp.getId());
staffPerformSummaryEntity.setUpdateTime(new Date());
staffPerformSummaryService.update(staffPerformSummaryEntity);
}else {
staffPerformSummaryEntity.setAttendScore(new BigDecimal(0));
staffPerformSummaryEntity.setOtherScore(new BigDecimal(0));
staffPerformSummaryEntity.setWorkScore(new BigDecimal(0));
staffPerformSummaryEntity.setEffectScore(new BigDecimal(0));
staffPerformSummaryEntity.setErrorScore(vo.getSumScore());
BigDecimal total = new BigDecimal(100);
staffPerformSummaryEntity.setTotalScore(total.subtract(vo.getSumScore()));
staffPerformSummaryEntity.setCreateUserId(1l);
staffPerformSummaryEntity.setCreateTime(new Date());
staffPerformSummaryService.save(staffPerformSummaryEntity);
}
}
}
return summaryVoList;
}
} }
\ No newline at end of file
package com.mortals.xhx.module.check.service.impl; package com.mortals.xhx.module.check.service.impl;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.service.IUser;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.util.DateUtils;
import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.common.code.CheckStatusEnum;
import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.check.dao.CheckEffectRecordDao; import com.mortals.xhx.module.check.dao.CheckEffectRecordDao;
import com.mortals.xhx.module.check.model.CheckEffectRecordEntity; import com.mortals.xhx.module.check.model.CheckEffectRecordEntity;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo;
import com.mortals.xhx.module.check.service.CheckEffectRecordService; import com.mortals.xhx.module.check.service.CheckEffectRecordService;
import com.mortals.xhx.module.staff.model.StaffPerformSummaryEntity;
import com.mortals.xhx.module.staff.model.StaffPerformSummaryQuery;
import com.mortals.xhx.module.staff.service.StaffPerformSummaryService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
/** /**
* CheckEffectRecordService * CheckEffectRecordService
* 效能绩效核查信息 service实现 * 效能绩效核查信息 service实现
...@@ -18,4 +39,114 @@ import lombok.extern.slf4j.Slf4j; ...@@ -18,4 +39,114 @@ import lombok.extern.slf4j.Slf4j;
@Slf4j @Slf4j
public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckEffectRecordDao, CheckEffectRecordEntity, Long> implements CheckEffectRecordService { public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckEffectRecordDao, CheckEffectRecordEntity, Long> implements CheckEffectRecordService {
@Autowired
private StaffPerformSummaryService staffPerformSummaryService;
@Override
protected void saveAfter(CheckEffectRecordEntity entity, Context context) throws AppException {
try{
StaffCheckSummaryQuery query = new StaffCheckSummaryQuery();
query.setStaffId(entity.getStaffId());
query.setCheckTimeStart(DateUtils.getStrDate(entity.getCheckTime()));
query.setCheckTimeEnd(query.getCheckTimeStart());
summaryCheck(query);
}catch (Exception e){
log.error("汇总已审核的核查记录出错",e);
}
}
@Override
public void examine(CheckEffectRecordEntity entity, Context context) throws AppException {
if(entity.getId()==null){
throw new AppException("核查记录ID不能为空");
}
if (context != null && context.getUser()!=null) {
IUser user = context.getUser();
entity.setUpdateUserId(user.getId());
entity.setCheckPerson(user.getRealName());
}
entity.setCheckTime(new Date());
entity.setUpdateTime(entity.getCheckTime());
entity.setCheckStatus(CheckStatusEnum.已处理.getValue()); //处理状态(1.未处理,2.已处理)
dao.update(entity);
try{
CheckEffectRecordEntity temp = this.get(entity.getId());
if(temp!=null) {
StaffCheckSummaryQuery query = new StaffCheckSummaryQuery();
query.setStaffId(temp.getStaffId());
summaryCheck(query);
}
}catch (Exception e){
log.error("汇总已审核的核查记录出错",e);
}
}
@Override
public List<StaffCheckSummaryVo> summaryCheck(StaffCheckSummaryQuery query) throws AppException {
if(StringUtils.isEmpty(query.getCheckTimeStart())||StringUtils.isEmpty(query.getCheckTimeStart())){
SimpleDateFormat format=new SimpleDateFormat("yyyy-MM-dd");
Calendar calendar=Calendar.getInstance();
calendar.set(Calendar.DAY_OF_MONTH, 1);
String startTime = format.format(calendar.getTime());
calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
String endTime = format.format(calendar.getTime());
query.setCheckTimeStart(startTime);
query.setCheckTimeEnd(endTime);
}
List<StaffCheckSummaryVo> summaryVoList = dao.summaryCheck(query);
if(CollectionUtils.isNotEmpty(summaryVoList)){
for(StaffCheckSummaryVo vo:summaryVoList){
StaffPerformSummaryEntity staffPerformSummaryEntity = new StaffPerformSummaryEntity();
BeanUtils.copyProperties(vo,staffPerformSummaryEntity, BeanUtil.getNullPropertyNames(vo));
staffPerformSummaryEntity.setEffectScore(vo.getSumScore());
StaffPerformSummaryQuery summaryQuery = new StaffPerformSummaryQuery();
summaryQuery.setStaffId(vo.getStaffId());
summaryQuery.setYear(vo.getYear());
summaryQuery.setMonth(vo.getMonth());
StaffPerformSummaryEntity temp = staffPerformSummaryService.selectOne(summaryQuery);
if(temp!=null){
if(temp.getAssessScore()==null){
staffPerformSummaryEntity.setAssessScore(new BigDecimal(0));
}
if(temp.getOtherScore()==null){
staffPerformSummaryEntity.setOtherScore(new BigDecimal(0));
}
if(temp.getWorkScore()==null){
staffPerformSummaryEntity.setWorkScore(new BigDecimal(0));
}
if(temp.getAttendScore()==null){
staffPerformSummaryEntity.setAttendScore(new BigDecimal(0));
}
BigDecimal erro = new BigDecimal(0);
erro.add(staffPerformSummaryEntity.getAssessScore());
erro.add(staffPerformSummaryEntity.getAttendScore());
erro.add(staffPerformSummaryEntity.getOtherScore());
erro.add(staffPerformSummaryEntity.getWorkScore());
erro.add(staffPerformSummaryEntity.getEffectScore());
staffPerformSummaryEntity.setErrorScore(erro);
BigDecimal total = new BigDecimal(100);
staffPerformSummaryEntity.setTotalScore(total.subtract(erro));
staffPerformSummaryEntity.setId(temp.getId());
staffPerformSummaryEntity.setUpdateTime(new Date());
staffPerformSummaryService.update(staffPerformSummaryEntity);
staffPerformSummaryEntity.setId(temp.getId());
staffPerformSummaryEntity.setUpdateTime(new Date());
staffPerformSummaryService.update(staffPerformSummaryEntity);
}else {
staffPerformSummaryEntity.setAttendScore(new BigDecimal(0));
staffPerformSummaryEntity.setAssessScore(new BigDecimal(0));
staffPerformSummaryEntity.setOtherScore(new BigDecimal(0));
staffPerformSummaryEntity.setWorkScore(new BigDecimal(0));
staffPerformSummaryEntity.setErrorScore(vo.getSumScore());
BigDecimal total = new BigDecimal(100);
staffPerformSummaryEntity.setTotalScore(total.subtract(vo.getSumScore()));
staffPerformSummaryEntity.setCreateUserId(1l);
staffPerformSummaryEntity.setCreateTime(new Date());
staffPerformSummaryService.save(staffPerformSummaryEntity);
}
}
}
return summaryVoList;
}
} }
\ No newline at end of file
package com.mortals.xhx.module.check.service.impl; package com.mortals.xhx.module.check.service.impl;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.service.IUser;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.util.DateUtils;
import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.common.code.CheckStatusEnum;
import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.check.dao.CheckGoworkRecordDao; import com.mortals.xhx.module.check.dao.CheckGoworkRecordDao;
import com.mortals.xhx.module.check.model.CheckGoworkRecordEntity; import com.mortals.xhx.module.check.model.CheckGoworkRecordEntity;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo;
import com.mortals.xhx.module.check.service.CheckGoworkRecordService; import com.mortals.xhx.module.check.service.CheckGoworkRecordService;
import com.mortals.xhx.module.staff.model.StaffPerformSummaryEntity;
import com.mortals.xhx.module.staff.model.StaffPerformSummaryQuery;
import com.mortals.xhx.module.staff.service.StaffPerformSummaryService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
/** /**
* CheckGoworkRecordService * CheckGoworkRecordService
* 办件绩效核查信息 service实现 * 办件绩效核查信息 service实现
...@@ -18,4 +39,115 @@ import lombok.extern.slf4j.Slf4j; ...@@ -18,4 +39,115 @@ import lombok.extern.slf4j.Slf4j;
@Slf4j @Slf4j
public class CheckGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<CheckGoworkRecordDao, CheckGoworkRecordEntity, Long> implements CheckGoworkRecordService { public class CheckGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<CheckGoworkRecordDao, CheckGoworkRecordEntity, Long> implements CheckGoworkRecordService {
@Autowired
private StaffPerformSummaryService staffPerformSummaryService;
@Override
protected void saveAfter(CheckGoworkRecordEntity entity, Context context) throws AppException {
try{
StaffCheckSummaryQuery query = new StaffCheckSummaryQuery();
query.setStaffId(entity.getStaffId());
query.setCheckTimeStart(DateUtils.getStrDate(entity.getCheckTime()));
query.setCheckTimeEnd(query.getCheckTimeStart());
summaryCheck(query);
}catch (Exception e){
log.error("汇总已审核的核查记录出错",e);
}
}
@Override
public void examine(CheckGoworkRecordEntity entity, Context context) throws AppException {
if(entity.getId()==null){
throw new AppException("核查记录ID不能为空");
}
if (context != null && context.getUser()!=null) {
IUser user = context.getUser();
entity.setUpdateUserId(user.getId());
entity.setCheckPerson(user.getRealName());
}
entity.setCheckTime(new Date());
entity.setUpdateTime(entity.getCheckTime());
entity.setCheckStatus(CheckStatusEnum.已处理.getValue()); //处理状态(1.未处理,2.已处理)
dao.update(entity);
try{
CheckGoworkRecordEntity temp = this.get(entity.getId());
if(temp!=null) {
StaffCheckSummaryQuery query = new StaffCheckSummaryQuery();
query.setStaffId(temp.getStaffId());
summaryCheck(query);
}
}catch (Exception e){
log.error("汇总已审核的核查记录出错",e);
}
}
@Override
public List<StaffCheckSummaryVo> summaryCheck(StaffCheckSummaryQuery query) throws AppException {
if(StringUtils.isEmpty(query.getCheckTimeStart())||StringUtils.isEmpty(query.getCheckTimeStart())){
SimpleDateFormat format=new SimpleDateFormat("yyyy-MM-dd");
Calendar calendar=Calendar.getInstance();
calendar.set(Calendar.DAY_OF_MONTH, 1);
String startTime = format.format(calendar.getTime());
calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
String endTime = format.format(calendar.getTime());
query.setCheckTimeStart(startTime);
query.setCheckTimeEnd(endTime);
}
List<StaffCheckSummaryVo> summaryVoList = dao.summaryCheck(query);
if(CollectionUtils.isNotEmpty(summaryVoList)){
for(StaffCheckSummaryVo vo:summaryVoList){
StaffPerformSummaryEntity staffPerformSummaryEntity = new StaffPerformSummaryEntity();
BeanUtils.copyProperties(vo,staffPerformSummaryEntity, BeanUtil.getNullPropertyNames(vo));
staffPerformSummaryEntity.setWorkScore(vo.getSumScore());
StaffPerformSummaryQuery summaryQuery = new StaffPerformSummaryQuery();
summaryQuery.setStaffId(vo.getStaffId());
summaryQuery.setYear(vo.getYear());
summaryQuery.setMonth(vo.getMonth());
StaffPerformSummaryEntity temp = staffPerformSummaryService.selectOne(summaryQuery);
if(temp!=null){
if(temp.getAssessScore()==null){
staffPerformSummaryEntity.setAssessScore(new BigDecimal(0));
}
if(temp.getOtherScore()==null){
staffPerformSummaryEntity.setOtherScore(new BigDecimal(0));
}
if(temp.getAttendScore()==null){
staffPerformSummaryEntity.setAttendScore(new BigDecimal(0));
}
if(temp.getEffectScore()==null){
staffPerformSummaryEntity.setEffectScore(new BigDecimal(0));
}
BigDecimal erro = new BigDecimal(0);
erro.add(staffPerformSummaryEntity.getAssessScore());
erro.add(staffPerformSummaryEntity.getAttendScore());
erro.add(staffPerformSummaryEntity.getOtherScore());
erro.add(staffPerformSummaryEntity.getWorkScore());
erro.add(staffPerformSummaryEntity.getEffectScore());
staffPerformSummaryEntity.setErrorScore(erro);
BigDecimal total = new BigDecimal(100);
staffPerformSummaryEntity.setTotalScore(total.subtract(erro));
staffPerformSummaryEntity.setId(temp.getId());
staffPerformSummaryEntity.setUpdateTime(new Date());
staffPerformSummaryService.update(staffPerformSummaryEntity);
staffPerformSummaryEntity.setId(temp.getId());
staffPerformSummaryEntity.setUpdateTime(new Date());
staffPerformSummaryService.update(staffPerformSummaryEntity);
}else {
staffPerformSummaryEntity.setAttendScore(new BigDecimal(0));
staffPerformSummaryEntity.setAssessScore(new BigDecimal(0));
staffPerformSummaryEntity.setOtherScore(new BigDecimal(0));
staffPerformSummaryEntity.setEffectScore(new BigDecimal(0));
staffPerformSummaryEntity.setErrorScore(vo.getSumScore());
BigDecimal total = new BigDecimal(100);
staffPerformSummaryEntity.setTotalScore(total.subtract(vo.getSumScore()));
staffPerformSummaryEntity.setCreateUserId(1l);
staffPerformSummaryEntity.setCreateTime(new Date());
staffPerformSummaryService.save(staffPerformSummaryEntity);
}
}
}
return summaryVoList;
}
} }
\ No newline at end of file
package com.mortals.xhx.module.check.service.impl; package com.mortals.xhx.module.check.service.impl;
import com.mortals.framework.service.IUser;
import com.mortals.framework.util.DateUtils;
import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.common.code.CheckStatusEnum;
import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo;
import com.mortals.xhx.module.staff.model.StaffPerformSummaryEntity;
import com.mortals.xhx.module.staff.model.StaffPerformSummaryQuery;
import com.mortals.xhx.module.staff.service.StaffPerformSummaryService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
...@@ -7,6 +20,13 @@ import com.mortals.xhx.module.check.dao.CheckOtherRecordDao; ...@@ -7,6 +20,13 @@ import com.mortals.xhx.module.check.dao.CheckOtherRecordDao;
import com.mortals.xhx.module.check.model.CheckOtherRecordEntity; import com.mortals.xhx.module.check.model.CheckOtherRecordEntity;
import com.mortals.xhx.module.check.service.CheckOtherRecordService; import com.mortals.xhx.module.check.service.CheckOtherRecordService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
/** /**
* CheckOtherRecordService * CheckOtherRecordService
* 其它绩效核查信息 service实现 * 其它绩效核查信息 service实现
...@@ -18,4 +38,114 @@ import lombok.extern.slf4j.Slf4j; ...@@ -18,4 +38,114 @@ import lombok.extern.slf4j.Slf4j;
@Slf4j @Slf4j
public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOtherRecordDao, CheckOtherRecordEntity, Long> implements CheckOtherRecordService { public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOtherRecordDao, CheckOtherRecordEntity, Long> implements CheckOtherRecordService {
@Autowired
private StaffPerformSummaryService staffPerformSummaryService;
@Override
protected void saveAfter(CheckOtherRecordEntity entity, Context context) throws AppException {
try{
StaffCheckSummaryQuery query = new StaffCheckSummaryQuery();
query.setStaffId(entity.getStaffId());
query.setCheckTimeStart(DateUtils.getStrDate(entity.getCheckTime()));
query.setCheckTimeEnd(query.getCheckTimeStart());
summaryCheck(query);
}catch (Exception e){
log.error("汇总已审核的核查记录出错",e);
}
}
@Override
public void examine(CheckOtherRecordEntity entity, Context context) throws AppException {
if(entity.getId()==null){
throw new AppException("核查记录ID不能为空");
}
if (context != null && context.getUser()!=null) {
IUser user = context.getUser();
entity.setUpdateUserId(user.getId());
entity.setCheckPerson(user.getRealName());
}
entity.setCheckTime(new Date());
entity.setUpdateTime(entity.getCheckTime());
entity.setCheckStatus(CheckStatusEnum.已处理.getValue()); //处理状态(1.未处理,2.已处理)
dao.update(entity);
try{
CheckOtherRecordEntity temp = this.get(entity.getId());
if(temp!=null) {
StaffCheckSummaryQuery query = new StaffCheckSummaryQuery();
query.setStaffId(temp.getStaffId());
summaryCheck(query);
}
}catch (Exception e){
log.error("汇总已审核的核查记录出错",e);
}
}
@Override
public List<StaffCheckSummaryVo> summaryCheck(StaffCheckSummaryQuery query) throws AppException {
if(StringUtils.isEmpty(query.getCheckTimeStart())||StringUtils.isEmpty(query.getCheckTimeStart())){
SimpleDateFormat format=new SimpleDateFormat("yyyy-MM-dd");
Calendar calendar=Calendar.getInstance();
calendar.set(Calendar.DAY_OF_MONTH, 1);
String startTime = format.format(calendar.getTime());
calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
String endTime = format.format(calendar.getTime());
query.setCheckTimeStart(startTime);
query.setCheckTimeEnd(endTime);
}
List<StaffCheckSummaryVo> summaryVoList = dao.summaryCheck(query);
if(CollectionUtils.isNotEmpty(summaryVoList)){
for(StaffCheckSummaryVo vo:summaryVoList){
StaffPerformSummaryEntity staffPerformSummaryEntity = new StaffPerformSummaryEntity();
BeanUtils.copyProperties(vo,staffPerformSummaryEntity, BeanUtil.getNullPropertyNames(vo));
staffPerformSummaryEntity.setOtherScore(vo.getSumScore());
StaffPerformSummaryQuery summaryQuery = new StaffPerformSummaryQuery();
summaryQuery.setStaffId(vo.getStaffId());
summaryQuery.setYear(vo.getYear());
summaryQuery.setMonth(vo.getMonth());
StaffPerformSummaryEntity temp = staffPerformSummaryService.selectOne(summaryQuery);
if(temp!=null){
if(temp.getAssessScore()==null){
staffPerformSummaryEntity.setAssessScore(new BigDecimal(0));
}
if(temp.getAttendScore()==null){
staffPerformSummaryEntity.setAttendScore(new BigDecimal(0));
}
if(temp.getWorkScore()==null){
staffPerformSummaryEntity.setWorkScore(new BigDecimal(0));
}
if(temp.getEffectScore()==null){
staffPerformSummaryEntity.setEffectScore(new BigDecimal(0));
}
BigDecimal erro = new BigDecimal(0);
erro.add(staffPerformSummaryEntity.getAssessScore());
erro.add(staffPerformSummaryEntity.getAttendScore());
erro.add(staffPerformSummaryEntity.getOtherScore());
erro.add(staffPerformSummaryEntity.getWorkScore());
erro.add(staffPerformSummaryEntity.getEffectScore());
staffPerformSummaryEntity.setErrorScore(erro);
BigDecimal total = new BigDecimal(100);
staffPerformSummaryEntity.setTotalScore(total.subtract(erro));
staffPerformSummaryEntity.setId(temp.getId());
staffPerformSummaryEntity.setUpdateTime(new Date());
staffPerformSummaryService.update(staffPerformSummaryEntity);
staffPerformSummaryEntity.setId(temp.getId());
staffPerformSummaryEntity.setUpdateTime(new Date());
staffPerformSummaryService.update(staffPerformSummaryEntity);
}else {
staffPerformSummaryEntity.setAttendScore(new BigDecimal(0));
staffPerformSummaryEntity.setAssessScore(new BigDecimal(0));
staffPerformSummaryEntity.setWorkScore(new BigDecimal(0));
staffPerformSummaryEntity.setEffectScore(new BigDecimal(0));
staffPerformSummaryEntity.setErrorScore(vo.getSumScore());
BigDecimal total = new BigDecimal(100);
staffPerformSummaryEntity.setTotalScore(total.subtract(vo.getSumScore()));
staffPerformSummaryEntity.setCreateUserId(1l);
staffPerformSummaryEntity.setCreateTime(new Date());
staffPerformSummaryService.save(staffPerformSummaryEntity);
}
}
}
return summaryVoList;
}
} }
\ No newline at end of file
package com.mortals.xhx.module.check.service.impl; package com.mortals.xhx.module.check.service.impl;
import com.mortals.framework.service.IUser;
import com.mortals.framework.util.DateUtils;
import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.common.code.CheckStatusEnum;
import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo;
import com.mortals.xhx.module.staff.model.StaffPerformSummaryEntity;
import com.mortals.xhx.module.staff.model.StaffPerformSummaryQuery;
import com.mortals.xhx.module.staff.service.StaffPerformSummaryService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
...@@ -7,6 +20,13 @@ import com.mortals.xhx.module.check.dao.CheckReviewRecordDao; ...@@ -7,6 +20,13 @@ import com.mortals.xhx.module.check.dao.CheckReviewRecordDao;
import com.mortals.xhx.module.check.model.CheckReviewRecordEntity; import com.mortals.xhx.module.check.model.CheckReviewRecordEntity;
import com.mortals.xhx.module.check.service.CheckReviewRecordService; import com.mortals.xhx.module.check.service.CheckReviewRecordService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
/** /**
* CheckReviewRecordService * CheckReviewRecordService
* 评价差评绩效核查信息 service实现 * 评价差评绩效核查信息 service实现
...@@ -18,4 +38,114 @@ import lombok.extern.slf4j.Slf4j; ...@@ -18,4 +38,114 @@ import lombok.extern.slf4j.Slf4j;
@Slf4j @Slf4j
public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckReviewRecordDao, CheckReviewRecordEntity, Long> implements CheckReviewRecordService { public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckReviewRecordDao, CheckReviewRecordEntity, Long> implements CheckReviewRecordService {
@Autowired
private StaffPerformSummaryService staffPerformSummaryService;
@Override
protected void saveAfter(CheckReviewRecordEntity entity, Context context) throws AppException {
try{
StaffCheckSummaryQuery query = new StaffCheckSummaryQuery();
query.setStaffId(entity.getStaffId());
query.setCheckTimeStart(DateUtils.getStrDate(entity.getCheckTime()));
query.setCheckTimeEnd(query.getCheckTimeStart());
summaryCheck(query);
}catch (Exception e){
log.error("汇总已审核的核查记录出错",e);
}
}
@Override
public void examine(CheckReviewRecordEntity entity, Context context) throws AppException {
if(entity.getId()==null){
throw new AppException("核查记录ID不能为空");
}
if (context != null && context.getUser()!=null) {
IUser user = context.getUser();
entity.setUpdateUserId(user.getId());
entity.setCheckPerson(user.getRealName());
}
entity.setCheckTime(new Date());
entity.setUpdateTime(entity.getCheckTime());
entity.setCheckStatus(CheckStatusEnum.已处理.getValue()); //处理状态(1.未处理,2.已处理)
dao.update(entity);
try{
CheckReviewRecordEntity temp = this.get(entity.getId());
if(temp!=null) {
StaffCheckSummaryQuery query = new StaffCheckSummaryQuery();
query.setStaffId(temp.getStaffId());
summaryCheck(query);
}
}catch (Exception e){
log.error("汇总已审核的核查记录出错",e);
}
}
@Override
public List<StaffCheckSummaryVo> summaryCheck(StaffCheckSummaryQuery query) throws AppException {
if(StringUtils.isEmpty(query.getCheckTimeStart())||StringUtils.isEmpty(query.getCheckTimeStart())){
SimpleDateFormat format=new SimpleDateFormat("yyyy-MM-dd");
Calendar calendar=Calendar.getInstance();
calendar.set(Calendar.DAY_OF_MONTH, 1);
String startTime = format.format(calendar.getTime());
calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
String endTime = format.format(calendar.getTime());
query.setCheckTimeStart(startTime);
query.setCheckTimeEnd(endTime);
}
List<StaffCheckSummaryVo> summaryVoList = dao.summaryCheck(query);
if(CollectionUtils.isNotEmpty(summaryVoList)){
for(StaffCheckSummaryVo vo:summaryVoList){
StaffPerformSummaryEntity staffPerformSummaryEntity = new StaffPerformSummaryEntity();
BeanUtils.copyProperties(vo,staffPerformSummaryEntity, BeanUtil.getNullPropertyNames(vo));
staffPerformSummaryEntity.setAssessScore(vo.getSumScore());
StaffPerformSummaryQuery summaryQuery = new StaffPerformSummaryQuery();
summaryQuery.setStaffId(vo.getStaffId());
summaryQuery.setYear(vo.getYear());
summaryQuery.setMonth(vo.getMonth());
StaffPerformSummaryEntity temp = staffPerformSummaryService.selectOne(summaryQuery);
if(temp!=null){
if(temp.getAttendScore()==null){
staffPerformSummaryEntity.setAttendScore(new BigDecimal(0));
}
if(temp.getOtherScore()==null){
staffPerformSummaryEntity.setOtherScore(new BigDecimal(0));
}
if(temp.getWorkScore()==null){
staffPerformSummaryEntity.setWorkScore(new BigDecimal(0));
}
if(temp.getEffectScore()==null){
staffPerformSummaryEntity.setEffectScore(new BigDecimal(0));
}
BigDecimal erro = new BigDecimal(0);
erro.add(staffPerformSummaryEntity.getAssessScore());
erro.add(staffPerformSummaryEntity.getAttendScore());
erro.add(staffPerformSummaryEntity.getOtherScore());
erro.add(staffPerformSummaryEntity.getWorkScore());
erro.add(staffPerformSummaryEntity.getEffectScore());
staffPerformSummaryEntity.setErrorScore(erro);
BigDecimal total = new BigDecimal(100);
staffPerformSummaryEntity.setTotalScore(total.subtract(erro));
staffPerformSummaryEntity.setId(temp.getId());
staffPerformSummaryEntity.setUpdateTime(new Date());
staffPerformSummaryService.update(staffPerformSummaryEntity);
staffPerformSummaryEntity.setId(temp.getId());
staffPerformSummaryEntity.setUpdateTime(new Date());
staffPerformSummaryService.update(staffPerformSummaryEntity);
}else {
staffPerformSummaryEntity.setAttendScore(new BigDecimal(0));
staffPerformSummaryEntity.setOtherScore(new BigDecimal(0));
staffPerformSummaryEntity.setWorkScore(new BigDecimal(0));
staffPerformSummaryEntity.setEffectScore(new BigDecimal(0));
staffPerformSummaryEntity.setErrorScore(vo.getSumScore());
BigDecimal total = new BigDecimal(100);
staffPerformSummaryEntity.setTotalScore(total.subtract(vo.getSumScore()));
staffPerformSummaryEntity.setCreateUserId(1l);
staffPerformSummaryEntity.setCreateTime(new Date());
staffPerformSummaryService.save(staffPerformSummaryEntity);
}
}
}
return summaryVoList;
}
} }
\ No newline at end of file
...@@ -48,5 +48,36 @@ public class CheckAttendRecordController extends BaseCRUDJsonBodyMappingControll ...@@ -48,5 +48,36 @@ public class CheckAttendRecordController extends BaseCRUDJsonBodyMappingControll
super.init(model, context); super.init(model, context);
} }
/**
* 审核
* @param entity
* @return
*/
@PostMapping({"examine"})
public String examine(@RequestBody CheckAttendRecordEntity entity) {
Map<String, Object> model = new HashMap();
Context context = this.getContext();
int code = 1;
String busiDesc = "考勤绩效核查审核";
try {
this.service.examine(entity, context);
model.put("id", entity.getId());
model.put("entity", entity);
model.put("message_info", busiDesc + "成功");
this.recordSysLog(this.request, busiDesc + " 【成功】 [id:" + entity.getId() + "]");
} catch (Exception var9) {
this.doException(this.request, busiDesc, model, var9);
model.put("entity", entity);
this.init(model, context);
code = this.saveException(entity, model, context, var9);
}
this.init(model, context);
JSONObject ret = new JSONObject();
ret.put("code", code);
ret.put("msg", model.remove("message_info"));
ret.put("data", model);
return ret.toJSONString();
}
} }
\ No newline at end of file
...@@ -48,5 +48,35 @@ public class CheckComplainRecordController extends BaseCRUDJsonBodyMappingContro ...@@ -48,5 +48,35 @@ public class CheckComplainRecordController extends BaseCRUDJsonBodyMappingContro
super.init(model, context); super.init(model, context);
} }
/**
* 审核
* @param entity
* @return
*/
@PostMapping({"examine"})
public String examine(@RequestBody CheckComplainRecordEntity entity) {
Map<String, Object> model = new HashMap();
Context context = this.getContext();
int code = 1;
String busiDesc = "考勤绩效核查审核";
try {
this.service.examine(entity, context);
model.put("id", entity.getId());
model.put("entity", entity);
model.put("message_info", busiDesc + "成功");
this.recordSysLog(this.request, busiDesc + " 【成功】 [id:" + entity.getId() + "]");
} catch (Exception var9) {
this.doException(this.request, busiDesc, model, var9);
model.put("entity", entity);
this.init(model, context);
code = this.saveException(entity, model, context, var9);
}
this.init(model, context);
JSONObject ret = new JSONObject();
ret.put("code", code);
ret.put("msg", model.remove("message_info"));
ret.put("data", model);
return ret.toJSONString();
}
} }
\ No newline at end of file
...@@ -49,5 +49,35 @@ public class CheckEffectRecordController extends BaseCRUDJsonBodyMappingControll ...@@ -49,5 +49,35 @@ public class CheckEffectRecordController extends BaseCRUDJsonBodyMappingControll
super.init(model, context); super.init(model, context);
} }
/**
* 审核
* @param entity
* @return
*/
@PostMapping({"examine"})
public String examine(@RequestBody CheckEffectRecordEntity entity) {
Map<String, Object> model = new HashMap();
Context context = this.getContext();
int code = 1;
String busiDesc = "考勤绩效核查审核";
try {
this.service.examine(entity, context);
model.put("id", entity.getId());
model.put("entity", entity);
model.put("message_info", busiDesc + "成功");
this.recordSysLog(this.request, busiDesc + " 【成功】 [id:" + entity.getId() + "]");
} catch (Exception var9) {
this.doException(this.request, busiDesc, model, var9);
model.put("entity", entity);
this.init(model, context);
code = this.saveException(entity, model, context, var9);
}
this.init(model, context);
JSONObject ret = new JSONObject();
ret.put("code", code);
ret.put("msg", model.remove("message_info"));
ret.put("data", model);
return ret.toJSONString();
}
} }
\ No newline at end of file
...@@ -48,5 +48,35 @@ public class CheckGoworkRecordController extends BaseCRUDJsonBodyMappingControll ...@@ -48,5 +48,35 @@ public class CheckGoworkRecordController extends BaseCRUDJsonBodyMappingControll
super.init(model, context); super.init(model, context);
} }
/**
* 审核
* @param entity
* @return
*/
@PostMapping({"examine"})
public String examine(@RequestBody CheckGoworkRecordEntity entity) {
Map<String, Object> model = new HashMap();
Context context = this.getContext();
int code = 1;
String busiDesc = "考勤绩效核查审核";
try {
this.service.examine(entity, context);
model.put("id", entity.getId());
model.put("entity", entity);
model.put("message_info", busiDesc + "成功");
this.recordSysLog(this.request, busiDesc + " 【成功】 [id:" + entity.getId() + "]");
} catch (Exception var9) {
this.doException(this.request, busiDesc, model, var9);
model.put("entity", entity);
this.init(model, context);
code = this.saveException(entity, model, context, var9);
}
this.init(model, context);
JSONObject ret = new JSONObject();
ret.put("code", code);
ret.put("msg", model.remove("message_info"));
ret.put("data", model);
return ret.toJSONString();
}
} }
\ No newline at end of file
...@@ -49,5 +49,35 @@ public class CheckOtherRecordController extends BaseCRUDJsonBodyMappingControlle ...@@ -49,5 +49,35 @@ public class CheckOtherRecordController extends BaseCRUDJsonBodyMappingControlle
super.init(model, context); super.init(model, context);
} }
/**
* 审核
* @param entity
* @return
*/
@PostMapping({"examine"})
public String examine(@RequestBody CheckOtherRecordEntity entity) {
Map<String, Object> model = new HashMap();
Context context = this.getContext();
int code = 1;
String busiDesc = "考勤绩效核查审核";
try {
this.service.examine(entity, context);
model.put("id", entity.getId());
model.put("entity", entity);
model.put("message_info", busiDesc + "成功");
this.recordSysLog(this.request, busiDesc + " 【成功】 [id:" + entity.getId() + "]");
} catch (Exception var9) {
this.doException(this.request, busiDesc, model, var9);
model.put("entity", entity);
this.init(model, context);
code = this.saveException(entity, model, context, var9);
}
this.init(model, context);
JSONObject ret = new JSONObject();
ret.put("code", code);
ret.put("msg", model.remove("message_info"));
ret.put("data", model);
return ret.toJSONString();
}
} }
\ No newline at end of file
...@@ -50,5 +50,35 @@ public class CheckReviewRecordController extends BaseCRUDJsonBodyMappingControll ...@@ -50,5 +50,35 @@ public class CheckReviewRecordController extends BaseCRUDJsonBodyMappingControll
super.init(model, context); super.init(model, context);
} }
/**
* 审核
* @param entity
* @return
*/
@PostMapping({"examine"})
public String examine(@RequestBody CheckReviewRecordEntity entity) {
Map<String, Object> model = new HashMap();
Context context = this.getContext();
int code = 1;
String busiDesc = "考勤绩效核查审核";
try {
this.service.examine(entity, context);
model.put("id", entity.getId());
model.put("entity", entity);
model.put("message_info", busiDesc + "成功");
this.recordSysLog(this.request, busiDesc + " 【成功】 [id:" + entity.getId() + "]");
} catch (Exception var9) {
this.doException(this.request, busiDesc, model, var9);
model.put("entity", entity);
this.init(model, context);
code = this.saveException(entity, model, context, var9);
}
this.init(model, context);
JSONObject ret = new JSONObject();
ret.put("code", code);
ret.put("msg", model.remove("message_info"));
ret.put("data", model);
return ret.toJSONString();
}
} }
\ No newline at end of file
package com.mortals.xhx.module.perform.service; package com.mortals.xhx.module.perform.service;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.perform.model.PerformAttendRecordEntity; import com.mortals.xhx.module.perform.model.PerformAttendRecordEntity;
import com.mortals.xhx.module.perform.dao.PerformAttendRecordDao; import com.mortals.xhx.module.perform.dao.PerformAttendRecordDao;
...@@ -13,4 +14,13 @@ import com.mortals.xhx.module.perform.dao.PerformAttendRecordDao; ...@@ -13,4 +14,13 @@ import com.mortals.xhx.module.perform.dao.PerformAttendRecordDao;
public interface PerformAttendRecordService extends ICRUDService<PerformAttendRecordEntity,Long>{ public interface PerformAttendRecordService extends ICRUDService<PerformAttendRecordEntity,Long>{
PerformAttendRecordDao getDao(); PerformAttendRecordDao getDao();
/**
* 修改处理状态
* @param id
* @param status
* @throws AppException
*/
void updateProcessStatus(Long id,Integer status) throws AppException;
} }
\ No newline at end of file
package com.mortals.xhx.module.perform.service; package com.mortals.xhx.module.perform.service;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.perform.model.PerformComplainRecordEntity; import com.mortals.xhx.module.perform.model.PerformComplainRecordEntity;
import com.mortals.xhx.module.perform.dao.PerformComplainRecordDao; import com.mortals.xhx.module.perform.dao.PerformComplainRecordDao;
...@@ -13,4 +14,13 @@ import com.mortals.xhx.module.perform.dao.PerformComplainRecordDao; ...@@ -13,4 +14,13 @@ import com.mortals.xhx.module.perform.dao.PerformComplainRecordDao;
public interface PerformComplainRecordService extends ICRUDService<PerformComplainRecordEntity,Long>{ public interface PerformComplainRecordService extends ICRUDService<PerformComplainRecordEntity,Long>{
PerformComplainRecordDao getDao(); PerformComplainRecordDao getDao();
/**
* 修改处理状态
* @param id
* @param status
* @throws AppException
*/
void updateProcessStatus(Long id,Integer status) throws AppException;
} }
\ No newline at end of file
package com.mortals.xhx.module.perform.service; package com.mortals.xhx.module.perform.service;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.perform.model.PerformEffectRecordEntity; import com.mortals.xhx.module.perform.model.PerformEffectRecordEntity;
import com.mortals.xhx.module.perform.dao.PerformEffectRecordDao; import com.mortals.xhx.module.perform.dao.PerformEffectRecordDao;
...@@ -13,4 +14,13 @@ import com.mortals.xhx.module.perform.dao.PerformEffectRecordDao; ...@@ -13,4 +14,13 @@ import com.mortals.xhx.module.perform.dao.PerformEffectRecordDao;
public interface PerformEffectRecordService extends ICRUDService<PerformEffectRecordEntity,Long>{ public interface PerformEffectRecordService extends ICRUDService<PerformEffectRecordEntity,Long>{
PerformEffectRecordDao getDao(); PerformEffectRecordDao getDao();
/**
* 修改处理状态
* @param id
* @param status
* @throws AppException
*/
void updateProcessStatus(Long id,Integer status) throws AppException;
} }
\ No newline at end of file
package com.mortals.xhx.module.perform.service; package com.mortals.xhx.module.perform.service;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.perform.model.PerformGoworkRecordEntity; import com.mortals.xhx.module.perform.model.PerformGoworkRecordEntity;
import com.mortals.xhx.module.perform.dao.PerformGoworkRecordDao; import com.mortals.xhx.module.perform.dao.PerformGoworkRecordDao;
...@@ -13,4 +14,13 @@ import com.mortals.xhx.module.perform.dao.PerformGoworkRecordDao; ...@@ -13,4 +14,13 @@ import com.mortals.xhx.module.perform.dao.PerformGoworkRecordDao;
public interface PerformGoworkRecordService extends ICRUDService<PerformGoworkRecordEntity,Long>{ public interface PerformGoworkRecordService extends ICRUDService<PerformGoworkRecordEntity,Long>{
PerformGoworkRecordDao getDao(); PerformGoworkRecordDao getDao();
/**
* 修改处理状态
* @param id
* @param status
* @throws AppException
*/
void updateProcessStatus(Long id,Integer status) throws AppException;
} }
\ No newline at end of file
package com.mortals.xhx.module.perform.service; package com.mortals.xhx.module.perform.service;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.perform.model.PerformOtherRecordEntity; import com.mortals.xhx.module.perform.model.PerformOtherRecordEntity;
import com.mortals.xhx.module.perform.dao.PerformOtherRecordDao; import com.mortals.xhx.module.perform.dao.PerformOtherRecordDao;
...@@ -13,4 +14,13 @@ import com.mortals.xhx.module.perform.dao.PerformOtherRecordDao; ...@@ -13,4 +14,13 @@ import com.mortals.xhx.module.perform.dao.PerformOtherRecordDao;
public interface PerformOtherRecordService extends ICRUDService<PerformOtherRecordEntity,Long>{ public interface PerformOtherRecordService extends ICRUDService<PerformOtherRecordEntity,Long>{
PerformOtherRecordDao getDao(); PerformOtherRecordDao getDao();
/**
* 修改处理状态
* @param id
* @param status
* @throws AppException
*/
void updateProcessStatus(Long id,Integer status) throws AppException;
} }
\ No newline at end of file
package com.mortals.xhx.module.perform.service; package com.mortals.xhx.module.perform.service;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.perform.model.PerformReviewRecordEntity; import com.mortals.xhx.module.perform.model.PerformReviewRecordEntity;
import com.mortals.xhx.module.perform.dao.PerformReviewRecordDao; import com.mortals.xhx.module.perform.dao.PerformReviewRecordDao;
...@@ -13,4 +14,13 @@ import com.mortals.xhx.module.perform.dao.PerformReviewRecordDao; ...@@ -13,4 +14,13 @@ import com.mortals.xhx.module.perform.dao.PerformReviewRecordDao;
public interface PerformReviewRecordService extends ICRUDService<PerformReviewRecordEntity,Long>{ public interface PerformReviewRecordService extends ICRUDService<PerformReviewRecordEntity,Long>{
PerformReviewRecordDao getDao(); PerformReviewRecordDao getDao();
/**
* 修改处理状态
* @param id
* @param status
* @throws AppException
*/
void updateProcessStatus(Long id,Integer status) throws AppException;
} }
\ No newline at end of file
package com.mortals.xhx.module.perform.service.impl; package com.mortals.xhx.module.perform.service.impl;
import com.mortals.xhx.common.code.CheckStatusEnum;
import com.mortals.xhx.common.code.SubMethodEnum;
import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.check.model.CheckAttendRecordEntity;
import com.mortals.xhx.module.check.service.CheckAttendRecordService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
...@@ -7,6 +14,9 @@ import com.mortals.xhx.module.perform.dao.PerformAttendRecordDao; ...@@ -7,6 +14,9 @@ import com.mortals.xhx.module.perform.dao.PerformAttendRecordDao;
import com.mortals.xhx.module.perform.model.PerformAttendRecordEntity; import com.mortals.xhx.module.perform.model.PerformAttendRecordEntity;
import com.mortals.xhx.module.perform.service.PerformAttendRecordService; import com.mortals.xhx.module.perform.service.PerformAttendRecordService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import java.util.Date;
/** /**
* PerformAttendRecordService * PerformAttendRecordService
* 考勤绩效记录信息 service实现 * 考勤绩效记录信息 service实现
...@@ -18,4 +28,41 @@ import lombok.extern.slf4j.Slf4j; ...@@ -18,4 +28,41 @@ import lombok.extern.slf4j.Slf4j;
@Slf4j @Slf4j
public class PerformAttendRecordServiceImpl extends AbstractCRUDServiceImpl<PerformAttendRecordDao, PerformAttendRecordEntity, Long> implements PerformAttendRecordService { public class PerformAttendRecordServiceImpl extends AbstractCRUDServiceImpl<PerformAttendRecordDao, PerformAttendRecordEntity, Long> implements PerformAttendRecordService {
@Autowired
private CheckAttendRecordService checkAttendRecordService;
@Override
protected void saveAfter(PerformAttendRecordEntity entity, Context context) throws AppException {
CheckAttendRecordEntity checkAttendRecordEntity = new CheckAttendRecordEntity();
checkAttendRecordEntity.initAttrValue();
BeanUtils.copyProperties(entity,checkAttendRecordEntity, BeanUtil.getNullPropertyNames(entity));
checkAttendRecordEntity.setId(null);
checkAttendRecordEntity.setRecordId(entity.getId());
if(entity.getSubMethod()== SubMethodEnum.系统自动.getValue()){
checkAttendRecordEntity.setCheckStatus(CheckStatusEnum.已处理.getValue()); //自动扣分相设置为已处理
}else {
checkAttendRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理
}
checkAttendRecordService.save(checkAttendRecordEntity,context);
}
@Override
public void updateProcessStatus(Long id, Integer status) throws AppException {
if(id==null){
throw new AppException("考勤绩效记录Id不能为空");
}
PerformAttendRecordEntity entity = this.get(id);
if(entity==null){
throw new AppException("无效的考勤绩效记录Id");
}
if(status==null){
status=1; //处理状态(1.未核查,2.已核查)
}
PerformAttendRecordEntity update = new PerformAttendRecordEntity();
update.setId(id);
update.setProcessStatus(status);
update.setUpdateTime(new Date());
dao.update(update);
}
} }
\ No newline at end of file
package com.mortals.xhx.module.perform.service.impl; package com.mortals.xhx.module.perform.service.impl;
import com.mortals.xhx.common.code.CheckStatusEnum;
import com.mortals.xhx.common.code.SubMethodEnum;
import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.check.model.CheckComplainRecordEntity;
import com.mortals.xhx.module.check.service.CheckComplainRecordService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
...@@ -7,6 +14,9 @@ import com.mortals.xhx.module.perform.dao.PerformComplainRecordDao; ...@@ -7,6 +14,9 @@ import com.mortals.xhx.module.perform.dao.PerformComplainRecordDao;
import com.mortals.xhx.module.perform.model.PerformComplainRecordEntity; import com.mortals.xhx.module.perform.model.PerformComplainRecordEntity;
import com.mortals.xhx.module.perform.service.PerformComplainRecordService; import com.mortals.xhx.module.perform.service.PerformComplainRecordService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import java.util.Date;
/** /**
* PerformComplainRecordService * PerformComplainRecordService
* 评价绩效投诉记录信息 service实现 * 评价绩效投诉记录信息 service实现
...@@ -18,4 +28,41 @@ import lombok.extern.slf4j.Slf4j; ...@@ -18,4 +28,41 @@ import lombok.extern.slf4j.Slf4j;
@Slf4j @Slf4j
public class PerformComplainRecordServiceImpl extends AbstractCRUDServiceImpl<PerformComplainRecordDao, PerformComplainRecordEntity, Long> implements PerformComplainRecordService { public class PerformComplainRecordServiceImpl extends AbstractCRUDServiceImpl<PerformComplainRecordDao, PerformComplainRecordEntity, Long> implements PerformComplainRecordService {
@Autowired
private CheckComplainRecordService checkComplainRecordService;
@Override
protected void saveAfter(PerformComplainRecordEntity entity, Context context) throws AppException {
CheckComplainRecordEntity checkComplainRecordEntity = new CheckComplainRecordEntity();
checkComplainRecordEntity.initAttrValue();
BeanUtils.copyProperties(entity,checkComplainRecordEntity, BeanUtil.getNullPropertyNames(entity));
checkComplainRecordEntity.setId(null);
checkComplainRecordEntity.setRecordId(entity.getId());
if(entity.getSubMethod()== SubMethodEnum.系统自动.getValue()){
checkComplainRecordEntity.setCheckStatus(CheckStatusEnum.已处理.getValue()); //自动扣分相设置为已处理
}else {
checkComplainRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理
}
checkComplainRecordService.save(checkComplainRecordEntity,context);
}
@Override
public void updateProcessStatus(Long id, Integer status) throws AppException {
if(id==null){
throw new AppException("评价绩效投诉记录Id不能为空");
}
PerformComplainRecordEntity entity = this.get(id);
if(entity==null){
throw new AppException("无效的评价绩效投诉记录Id");
}
if(status==null){
status=1; //处理状态(1.未核查,2.已核查)
}
PerformComplainRecordEntity update = new PerformComplainRecordEntity();
update.setId(id);
update.setProcessStatus(status);
update.setUpdateTime(new Date());
dao.update(update);
}
} }
\ No newline at end of file
package com.mortals.xhx.module.perform.service.impl; package com.mortals.xhx.module.perform.service.impl;
import com.mortals.xhx.common.code.CheckStatusEnum;
import com.mortals.xhx.common.code.SubMethodEnum;
import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.check.model.CheckEffectRecordEntity;
import com.mortals.xhx.module.check.service.CheckEffectRecordService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
...@@ -7,6 +14,9 @@ import com.mortals.xhx.module.perform.dao.PerformEffectRecordDao; ...@@ -7,6 +14,9 @@ import com.mortals.xhx.module.perform.dao.PerformEffectRecordDao;
import com.mortals.xhx.module.perform.model.PerformEffectRecordEntity; import com.mortals.xhx.module.perform.model.PerformEffectRecordEntity;
import com.mortals.xhx.module.perform.service.PerformEffectRecordService; import com.mortals.xhx.module.perform.service.PerformEffectRecordService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import java.util.Date;
/** /**
* PerformEffectRecordService * PerformEffectRecordService
* 效能绩效记录信息 service实现 * 效能绩效记录信息 service实现
...@@ -18,4 +28,41 @@ import lombok.extern.slf4j.Slf4j; ...@@ -18,4 +28,41 @@ import lombok.extern.slf4j.Slf4j;
@Slf4j @Slf4j
public class PerformEffectRecordServiceImpl extends AbstractCRUDServiceImpl<PerformEffectRecordDao, PerformEffectRecordEntity, Long> implements PerformEffectRecordService { public class PerformEffectRecordServiceImpl extends AbstractCRUDServiceImpl<PerformEffectRecordDao, PerformEffectRecordEntity, Long> implements PerformEffectRecordService {
@Autowired
private CheckEffectRecordService checkEffectRecordService;
@Override
protected void saveAfter(PerformEffectRecordEntity entity, Context context) throws AppException {
CheckEffectRecordEntity checkEffectRecordEntity = new CheckEffectRecordEntity();
checkEffectRecordEntity.initAttrValue();
BeanUtils.copyProperties(entity,checkEffectRecordEntity, BeanUtil.getNullPropertyNames(entity));
checkEffectRecordEntity.setId(null);
checkEffectRecordEntity.setRecordId(entity.getId());
if(entity.getSubMethod()== SubMethodEnum.系统自动.getValue()){
checkEffectRecordEntity.setCheckStatus(CheckStatusEnum.已处理.getValue()); //自动扣分相设置为已处理
}else {
checkEffectRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理
}
checkEffectRecordService.save(checkEffectRecordEntity,context);
}
@Override
public void updateProcessStatus(Long id, Integer status) throws AppException {
if(id==null){
throw new AppException("效能绩效记录Id不能为空");
}
PerformEffectRecordEntity entity = this.get(id);
if(entity==null){
throw new AppException("无效的效能绩效记录Id");
}
if(status==null){
status=1; //处理状态(1.未核查,2.已核查)
}
PerformEffectRecordEntity update = new PerformEffectRecordEntity();
update.setId(id);
update.setProcessStatus(status);
update.setUpdateTime(new Date());
dao.update(update);
}
} }
\ No newline at end of file
package com.mortals.xhx.module.perform.service.impl; package com.mortals.xhx.module.perform.service.impl;
import com.mortals.xhx.common.code.CheckStatusEnum;
import com.mortals.xhx.common.code.SubMethodEnum;
import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.check.model.CheckGoworkRecordEntity;
import com.mortals.xhx.module.check.service.CheckGoworkRecordService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
...@@ -7,6 +14,9 @@ import com.mortals.xhx.module.perform.dao.PerformGoworkRecordDao; ...@@ -7,6 +14,9 @@ import com.mortals.xhx.module.perform.dao.PerformGoworkRecordDao;
import com.mortals.xhx.module.perform.model.PerformGoworkRecordEntity; import com.mortals.xhx.module.perform.model.PerformGoworkRecordEntity;
import com.mortals.xhx.module.perform.service.PerformGoworkRecordService; import com.mortals.xhx.module.perform.service.PerformGoworkRecordService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import java.util.Date;
/** /**
* PerformGoworkRecordService * PerformGoworkRecordService
* 办件绩效记录信息 service实现 * 办件绩效记录信息 service实现
...@@ -18,4 +28,41 @@ import lombok.extern.slf4j.Slf4j; ...@@ -18,4 +28,41 @@ import lombok.extern.slf4j.Slf4j;
@Slf4j @Slf4j
public class PerformGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<PerformGoworkRecordDao, PerformGoworkRecordEntity, Long> implements PerformGoworkRecordService { public class PerformGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<PerformGoworkRecordDao, PerformGoworkRecordEntity, Long> implements PerformGoworkRecordService {
@Autowired
private CheckGoworkRecordService checkGoworkRecordService;
@Override
protected void saveAfter(PerformGoworkRecordEntity entity, Context context) throws AppException {
CheckGoworkRecordEntity checkGoworkRecordEntity = new CheckGoworkRecordEntity();
checkGoworkRecordEntity.initAttrValue();
BeanUtils.copyProperties(entity,checkGoworkRecordEntity, BeanUtil.getNullPropertyNames(entity));
checkGoworkRecordEntity.setId(null);
checkGoworkRecordEntity.setRecordId(entity.getId());
if(entity.getSubMethod()== SubMethodEnum.系统自动.getValue()){
checkGoworkRecordEntity.setCheckStatus(CheckStatusEnum.已处理.getValue()); //自动扣分相设置为已处理
}else {
checkGoworkRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理
}
checkGoworkRecordService.save(checkGoworkRecordEntity,context);
}
@Override
public void updateProcessStatus(Long id, Integer status) throws AppException {
if(id==null){
throw new AppException("办件绩效记录Id不能为空");
}
PerformGoworkRecordEntity entity = this.get(id);
if(entity==null){
throw new AppException("无效的办件绩效记录Id");
}
if(status==null){
status=1; //处理状态(1.未核查,2.已核查)
}
PerformGoworkRecordEntity update = new PerformGoworkRecordEntity();
update.setId(id);
update.setProcessStatus(status);
update.setUpdateTime(new Date());
dao.update(update);
}
} }
\ No newline at end of file
package com.mortals.xhx.module.perform.service.impl; package com.mortals.xhx.module.perform.service.impl;
import com.mortals.xhx.common.code.CheckStatusEnum;
import com.mortals.xhx.common.code.SubMethodEnum;
import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.check.model.CheckOtherRecordEntity;
import com.mortals.xhx.module.check.service.CheckOtherRecordService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
...@@ -7,6 +14,9 @@ import com.mortals.xhx.module.perform.dao.PerformOtherRecordDao; ...@@ -7,6 +14,9 @@ import com.mortals.xhx.module.perform.dao.PerformOtherRecordDao;
import com.mortals.xhx.module.perform.model.PerformOtherRecordEntity; import com.mortals.xhx.module.perform.model.PerformOtherRecordEntity;
import com.mortals.xhx.module.perform.service.PerformOtherRecordService; import com.mortals.xhx.module.perform.service.PerformOtherRecordService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import java.util.Date;
/** /**
* PerformOtherRecordService * PerformOtherRecordService
* 其它绩效记录信息 service实现 * 其它绩效记录信息 service实现
...@@ -18,4 +28,41 @@ import lombok.extern.slf4j.Slf4j; ...@@ -18,4 +28,41 @@ import lombok.extern.slf4j.Slf4j;
@Slf4j @Slf4j
public class PerformOtherRecordServiceImpl extends AbstractCRUDServiceImpl<PerformOtherRecordDao, PerformOtherRecordEntity, Long> implements PerformOtherRecordService { public class PerformOtherRecordServiceImpl extends AbstractCRUDServiceImpl<PerformOtherRecordDao, PerformOtherRecordEntity, Long> implements PerformOtherRecordService {
@Autowired
private CheckOtherRecordService checkOtherRecordService;
@Override
protected void saveAfter(PerformOtherRecordEntity entity, Context context) throws AppException {
CheckOtherRecordEntity checkOtherRecordEntity = new CheckOtherRecordEntity();
checkOtherRecordEntity.initAttrValue();
BeanUtils.copyProperties(entity,checkOtherRecordEntity, BeanUtil.getNullPropertyNames(entity));
checkOtherRecordEntity.setId(null);
checkOtherRecordEntity.setRecordId(entity.getId());
if(entity.getSubMethod()== SubMethodEnum.系统自动.getValue()){
checkOtherRecordEntity.setCheckStatus(CheckStatusEnum.已处理.getValue()); //自动扣分相设置为已处理
}else {
checkOtherRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理
}
checkOtherRecordService.save(checkOtherRecordEntity,context);
}
@Override
public void updateProcessStatus(Long id, Integer status) throws AppException {
if(id==null){
throw new AppException("其它绩效记录Id不能为空");
}
PerformOtherRecordEntity entity = this.get(id);
if(entity==null){
throw new AppException("无效的其它绩效记录Id");
}
if(status==null){
status=1; //处理状态(1.未核查,2.已核查)
}
PerformOtherRecordEntity update = new PerformOtherRecordEntity();
update.setId(id);
update.setProcessStatus(status);
update.setUpdateTime(new Date());
dao.update(update);
}
} }
\ No newline at end of file
package com.mortals.xhx.module.perform.service.impl; package com.mortals.xhx.module.perform.service.impl;
import com.mortals.xhx.common.code.CheckStatusEnum;
import com.mortals.xhx.common.code.SubMethodEnum;
import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.check.model.CheckReviewRecordEntity;
import com.mortals.xhx.module.check.service.CheckReviewRecordService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
...@@ -7,6 +14,9 @@ import com.mortals.xhx.module.perform.dao.PerformReviewRecordDao; ...@@ -7,6 +14,9 @@ import com.mortals.xhx.module.perform.dao.PerformReviewRecordDao;
import com.mortals.xhx.module.perform.model.PerformReviewRecordEntity; import com.mortals.xhx.module.perform.model.PerformReviewRecordEntity;
import com.mortals.xhx.module.perform.service.PerformReviewRecordService; import com.mortals.xhx.module.perform.service.PerformReviewRecordService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import java.util.Date;
/** /**
* PerformReviewRecordService * PerformReviewRecordService
* 评价差评绩效记录信息 service实现 * 评价差评绩效记录信息 service实现
...@@ -18,4 +28,40 @@ import lombok.extern.slf4j.Slf4j; ...@@ -18,4 +28,40 @@ import lombok.extern.slf4j.Slf4j;
@Slf4j @Slf4j
public class PerformReviewRecordServiceImpl extends AbstractCRUDServiceImpl<PerformReviewRecordDao, PerformReviewRecordEntity, Long> implements PerformReviewRecordService { public class PerformReviewRecordServiceImpl extends AbstractCRUDServiceImpl<PerformReviewRecordDao, PerformReviewRecordEntity, Long> implements PerformReviewRecordService {
@Autowired
private CheckReviewRecordService checkReviewRecordService;
@Override
protected void saveAfter(PerformReviewRecordEntity entity, Context context) throws AppException {
CheckReviewRecordEntity checkReviewRecordEntity = new CheckReviewRecordEntity();
BeanUtils.copyProperties(entity,checkReviewRecordEntity, BeanUtil.getNullPropertyNames(entity));
checkReviewRecordEntity.setId(null);
checkReviewRecordEntity.setRecordId(entity.getId());
if(entity.getSubMethod()== SubMethodEnum.系统自动.getValue()){
checkReviewRecordEntity.setCheckStatus(CheckStatusEnum.已处理.getValue()); //自动扣分相设置为已处理
}else {
checkReviewRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理
}
checkReviewRecordService.save(checkReviewRecordEntity,context);
}
@Override
public void updateProcessStatus(Long id, Integer status) throws AppException {
if(id==null){
throw new AppException("评价差评绩效记录Id不能为空");
}
PerformReviewRecordEntity entity = this.get(id);
if(entity==null){
throw new AppException("无效的评价差评绩效记录Id");
}
if(status==null){
status=1; //处理状态(1.未核查,2.已核查)
}
PerformReviewRecordEntity update = new PerformReviewRecordEntity();
update.setId(id);
update.setProcessStatus(status);
update.setUpdateTime(new Date());
dao.update(update);
}
} }
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.check.dao.ibatis.CheckAttendRecordDaoImpl">
<!-- 汇总已审核的核查记录 -->
<select id="getSummaryCheckList" parameterType="com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery" resultType="com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo">
SELECT
staffId,staffName,workNum,deptId,deptName,
DATE_FORMAT(checkTime,'%Y') as `year`,
DATE_FORMAT(checkTime,'%m') as `month`,
SUM(CASE subAddType WHEN 1 THEN score ELSE score*-1 END) as sumScore
FROM
mortals_xhx_check_attend_record
WHERE checkStatus = 2
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
GROUP BY
staffId,staffName,workNum,deptId,deptName,DATE_FORMAT(checkTime,'%Y-%m')
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.check.dao.ibatis.CheckComplainRecordDaoImpl">
<!-- 汇总已审核的核查记录 -->
<select id="getSummaryCheckList" parameterType="com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery" resultType="com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo">
SELECT
staffId,staffName,workNum,deptId,deptName,
DATE_FORMAT(checkTime,'%Y') as `year`,
DATE_FORMAT(checkTime,'%m') as `month`,
SUM(CASE subAddType WHEN 1 THEN score ELSE score*-1 END) as sumScore
FROM
(
SELECT
id,recordId,staffId,staffName,workNum,deptId,deptName,subAddType,score,checkTime
FROM
mortals_xhx_check_complain_record
WHERE
checkStatus = 2
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
UNION
SELECT
id,recordId,staffId,staffName,workNum,deptId,deptName,subAddType,score,checkTime
FROM
mortals_xhx_check_review_record
WHERE
checkStatus = 2
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
) AS t
GROUP BY
staffId,staffName,workNum,deptId,deptName,DATE_FORMAT(checkTime,'%Y-%m')
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.check.dao.ibatis.CheckEffectRecordDaoImpl">
<!-- 汇总已审核的核查记录 -->
<select id="getSummaryCheckList" parameterType="com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery" resultType="com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo">
SELECT
staffId,staffName,workNum,deptId,deptName,
DATE_FORMAT(checkTime,'%Y') as `year`,
DATE_FORMAT(checkTime,'%m') as `month`,
SUM(CASE subAddType WHEN 1 THEN score ELSE score*-1 END) as sumScore
FROM
mortals_xhx_check_effect_record
WHERE checkStatus = 2
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
GROUP BY
staffId,staffName,workNum,deptId,deptName,DATE_FORMAT(checkTime,'%Y-%m')
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.check.dao.ibatis.CheckGoworkRecordDaoImpl">
<!-- 汇总已审核的核查记录 -->
<select id="getSummaryCheckList" parameterType="com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery" resultType="com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo">
SELECT
staffId,staffName,workNum,deptId,deptName,
DATE_FORMAT(checkTime,'%Y') as `year`,
DATE_FORMAT(checkTime,'%m') as `month`,
SUM(CASE subAddType WHEN 1 THEN score ELSE score*-1 END) as sumScore
FROM
mortals_xhx_check_gowork_record
WHERE checkStatus = 2
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
GROUP BY
staffId,staffName,workNum,deptId,deptName,DATE_FORMAT(checkTime,'%Y-%m')
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.check.dao.ibatis.CheckOtherRecordDaoImpl">
<!-- 汇总已审核的核查记录 -->
<select id="getSummaryCheckList" parameterType="com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery" resultType="com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo">
SELECT
staffId,staffName,workNum,deptId,deptName,
DATE_FORMAT(checkTime,'%Y') as `year`,
DATE_FORMAT(checkTime,'%m') as `month`,
SUM(CASE subAddType WHEN 1 THEN score ELSE score*-1 END) as sumScore
FROM
mortals_xhx_check_other_record
WHERE checkStatus = 2
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
GROUP BY
staffId,staffName,workNum,deptId,deptName,DATE_FORMAT(checkTime,'%Y-%m')
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.check.dao.ibatis.CheckReviewRecordDaoImpl">
<!-- 汇总已审核的核查记录 -->
<select id="getSummaryCheckList" parameterType="com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery" resultType="com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo">
SELECT
staffId,staffName,workNum,deptId,deptName,
DATE_FORMAT(checkTime,'%Y') as `year`,
DATE_FORMAT(checkTime,'%m') as `month`,
SUM(CASE subAddType WHEN 1 THEN score ELSE score*-1 END) as sumScore
FROM
(
SELECT
id,recordId,staffId,staffName,workNum,deptId,deptName,subAddType,score,checkTime
FROM
mortals_xhx_check_complain_record
WHERE
checkStatus = 2
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
UNION
SELECT
id,recordId,staffId,staffName,workNum,deptId,deptName,subAddType,score,checkTime
FROM
mortals_xhx_check_review_record
WHERE
checkStatus = 2
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
) AS t
GROUP BY
staffId,staffName,workNum,deptId,deptName,DATE_FORMAT(checkTime,'%Y-%m')
</select>
</mapper>
\ No newline at end of file
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