Commit 6beb8da5 authored by 廖旭伟's avatar 廖旭伟

绩效汇总增加最近一次汇总时间展示,绩效分数详情展示考勤异常时间,绩效详情展示增加结束时间范围为最近一次汇总时间

parent 5d396746
...@@ -31,5 +31,6 @@ public class RedisKey { ...@@ -31,5 +31,6 @@ public class RedisKey {
/** 绩效核查汇总 **/ /** 绩效核查汇总 **/
public static final String KEY_CHECK_SUMMARY_CACHE = "staff:check:summary"; public static final String KEY_CHECK_SUMMARY_CACHE = "staff:check:summary";
/** 绩效核查汇总时间 **/
public static final String STAFF_PERFORM_SUMMARY = "staffPerformSummaryTime";
} }
...@@ -4,6 +4,7 @@ import cn.hutool.core.date.DateUtil; ...@@ -4,6 +4,7 @@ import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.service.ICacheService; import com.mortals.framework.service.ICacheService;
import com.mortals.framework.springcloud.service.IApplicationStartedService; import com.mortals.framework.springcloud.service.IApplicationStartedService;
import com.mortals.framework.util.DateUtils;
import com.mortals.framework.util.StringUtils; import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.common.code.CheckTypeEnum; import com.mortals.xhx.common.code.CheckTypeEnum;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery; import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery;
...@@ -16,6 +17,7 @@ import org.springframework.util.ObjectUtils; ...@@ -16,6 +17,7 @@ import org.springframework.util.ObjectUtils;
import java.util.Date; import java.util.Date;
import static com.mortals.xhx.common.key.RedisKey.KEY_CHECK_SUMMARY_CACHE; import static com.mortals.xhx.common.key.RedisKey.KEY_CHECK_SUMMARY_CACHE;
import static com.mortals.xhx.common.key.RedisKey.STAFF_PERFORM_SUMMARY;
/*** /***
* 绩效汇总任务执行 * 绩效汇总任务执行
...@@ -89,6 +91,7 @@ public class StaffCheckSummaryService implements IApplicationStartedService { ...@@ -89,6 +91,7 @@ public class StaffCheckSummaryService implements IApplicationStartedService {
checkWindowWorkmanPerformService.summaryCheck(query); checkWindowWorkmanPerformService.summaryCheck(query);
checkOtherRecordService.summaryCheck(query); checkOtherRecordService.summaryCheck(query);
log.info("绩效分数汇总完成"); log.info("绩效分数汇总完成");
cacheService.set(STAFF_PERFORM_SUMMARY, DateUtils.getCurrStrDateTime());
} }
} }
......
...@@ -20,6 +20,7 @@ import com.mortals.xhx.module.attendance.model.vo.AttendanceSummaryQuery; ...@@ -20,6 +20,7 @@ import com.mortals.xhx.module.attendance.model.vo.AttendanceSummaryQuery;
import com.mortals.xhx.module.attendance.service.AttendanceGroupStaffService; import com.mortals.xhx.module.attendance.service.AttendanceGroupStaffService;
import com.mortals.xhx.module.attendance.service.AttendanceRecordHikService; import com.mortals.xhx.module.attendance.service.AttendanceRecordHikService;
import com.mortals.xhx.module.attendance.service.AttendanceStatService; import com.mortals.xhx.module.attendance.service.AttendanceStatService;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery;
import com.mortals.xhx.module.dingding.personal.service.IDingPersonService; import com.mortals.xhx.module.dingding.personal.service.IDingPersonService;
import com.mortals.xhx.module.perform.model.PerformAttendRecordEntity; import com.mortals.xhx.module.perform.model.PerformAttendRecordEntity;
import com.mortals.xhx.module.perform.model.PerformAttendRecordQuery; import com.mortals.xhx.module.perform.model.PerformAttendRecordQuery;
...@@ -47,6 +48,7 @@ import java.util.List; ...@@ -47,6 +48,7 @@ import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import static com.mortals.xhx.common.key.RedisKey.KEY_ATTENDANCE_STAT_CACHE; import static com.mortals.xhx.common.key.RedisKey.KEY_ATTENDANCE_STAT_CACHE;
import static com.mortals.xhx.common.key.RedisKey.KEY_CHECK_SUMMARY_CACHE;
/** /**
* AttendanceLeaveRecordService * AttendanceLeaveRecordService
...@@ -243,6 +245,14 @@ public class AttendanceLeaveRecordServiceImpl extends AbstractCRUDServiceImpl<At ...@@ -243,6 +245,14 @@ public class AttendanceLeaveRecordServiceImpl extends AbstractCRUDServiceImpl<At
performAttendRecordService.save(recordEntity, context); performAttendRecordService.save(recordEntity, context);
} }
} }
//汇总考勤绩效分数
StaffCheckSummaryQuery checkSummaryQuery = new StaffCheckSummaryQuery();
checkSummaryQuery.setStaffId(entity.getLeavePersonId());
checkSummaryQuery.setCheckTimeStart(DateUtils.getStrDate(entity.getStartTime()));
checkSummaryQuery.setCheckTimeEnd(checkSummaryQuery.getCheckTimeStart());
checkSummaryQuery.setCheckType(CheckTypeEnum.考勤绩效.getValue());
cacheService.lpush(KEY_CHECK_SUMMARY_CACHE, checkSummaryQuery);
} }
} catch (Exception e) { } catch (Exception e) {
log.error("创建假期考勤异常",e.getMessage()); log.error("创建假期考勤异常",e.getMessage());
......
...@@ -115,12 +115,6 @@ public class AttendanceRecordErrorServiceImpl extends AbstractCRUDServiceImpl<At ...@@ -115,12 +115,6 @@ public class AttendanceRecordErrorServiceImpl extends AbstractCRUDServiceImpl<At
checkAttendUpdate.setUpdateTime(new Date()); checkAttendUpdate.setUpdateTime(new Date());
checkAttendUpdate.setCheckStatus(CheckStatusEnum.已处理.getValue()); checkAttendUpdate.setCheckStatus(CheckStatusEnum.已处理.getValue());
checkAttendRecordService.update(checkAttendUpdate,context); checkAttendRecordService.update(checkAttendUpdate,context);
StaffCheckSummaryQuery query = new StaffCheckSummaryQuery();
query.setStaffId(checkAttendRecord.getStaffId());
query.setCheckTimeStart(DateUtils.getStrDate(checkAttendRecord.getCheckTime()));
query.setCheckTimeEnd(query.getCheckTimeStart());
query.setCheckType(CheckTypeEnum.考勤绩效.getValue());
cacheService.lpush(KEY_CHECK_SUMMARY_CACHE, query);
} }
} }
//异常处理后重新汇总考勤 context!=null时表示页面调用的修改,自动执行处理任务调用时context为null,无需立即汇总 //异常处理后重新汇总考勤 context!=null时表示页面调用的修改,自动执行处理任务调用时context为null,无需立即汇总
...@@ -131,6 +125,13 @@ public class AttendanceRecordErrorServiceImpl extends AbstractCRUDServiceImpl<At ...@@ -131,6 +125,13 @@ public class AttendanceRecordErrorServiceImpl extends AbstractCRUDServiceImpl<At
// AttendSummaryThread summaryThread = new AttendSummaryThread(attendanceStatService, query); // AttendSummaryThread summaryThread = new AttendSummaryThread(attendanceStatService, query);
// ThreadPool.getInstance().execute(summaryThread); // ThreadPool.getInstance().execute(summaryThread);
cacheService.lpush(KEY_ATTENDANCE_STAT_CACHE, query); cacheService.lpush(KEY_ATTENDANCE_STAT_CACHE, query);
//立即汇总考勤绩效分数
StaffCheckSummaryQuery checkSummaryQuery = new StaffCheckSummaryQuery();
checkSummaryQuery.setStaffId(entity.getStaffId());
checkSummaryQuery.setCheckTimeStart(DateUtils.getStrDate(entity.getErrorDateTime()));
checkSummaryQuery.setCheckTimeEnd(checkSummaryQuery.getCheckTimeStart());
checkSummaryQuery.setCheckType(CheckTypeEnum.考勤绩效.getValue());
cacheService.lpush(KEY_CHECK_SUMMARY_CACHE, checkSummaryQuery);
} }
} }
} }
......
package com.mortals.xhx.module.check.model.vo; package com.mortals.xhx.module.check.model.vo;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong; import com.mortals.framework.model.BaseEntityLong;
import lombok.Data; import lombok.Data;
...@@ -88,5 +89,8 @@ public class CheckAllRecordVo extends BaseEntityLong { ...@@ -88,5 +89,8 @@ public class CheckAllRecordVo extends BaseEntityLong {
private Integer auditStatus; private Integer auditStatus;
private Date updateTime; private Date updateTime;
/**
* 备注
*/
private String remark;
} }
...@@ -6,6 +6,7 @@ import com.mortals.framework.common.Rest; ...@@ -6,6 +6,7 @@ import com.mortals.framework.common.Rest;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo; import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result; import com.mortals.framework.model.Result;
import com.mortals.framework.service.ICacheService;
import com.mortals.framework.util.DataUtil; import com.mortals.framework.util.DataUtil;
import com.mortals.framework.util.DateUtils; import com.mortals.framework.util.DateUtils;
import com.mortals.framework.util.StringUtils; import com.mortals.framework.util.StringUtils;
...@@ -31,6 +32,8 @@ import java.time.format.DateTimeFormatter; ...@@ -31,6 +32,8 @@ import java.time.format.DateTimeFormatter;
import java.time.temporal.TemporalAdjusters; import java.time.temporal.TemporalAdjusters;
import java.util.*; import java.util.*;
import static com.mortals.xhx.common.key.RedisKey.STAFF_PERFORM_SUMMARY;
/** /**
* 全部类型核查信息Dao * 全部类型核查信息Dao
*/ */
...@@ -40,6 +43,8 @@ public class CheckAllRecordController extends BaseJsonBodyController { ...@@ -40,6 +43,8 @@ public class CheckAllRecordController extends BaseJsonBodyController {
@Autowired @Autowired
private CheckAllRecordService checkAllRecordService; private CheckAllRecordService checkAllRecordService;
@Autowired
private ICacheService cacheService;
protected void init(Map<String, Object> model, Context context) { protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "checkStatus", CheckStatusEnum.getEnumMap()); this.addDict(model, "checkStatus", CheckStatusEnum.getEnumMap());
...@@ -68,8 +73,13 @@ public class CheckAllRecordController extends BaseJsonBodyController { ...@@ -68,8 +73,13 @@ public class CheckAllRecordController extends BaseJsonBodyController {
calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH)); calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
String endTime = format.format(calendar.getTime()); String endTime = format.format(calendar.getTime());
query.setCheckTimeStart(startTime); query.setCheckTimeStart(startTime);
String summaryTime = cacheService.get(STAFF_PERFORM_SUMMARY);
if(StringUtils.isNotEmpty(summaryTime)){
query.setCheckTimeEnd(summaryTime);
}else {
query.setCheckTimeEnd(endTime); query.setCheckTimeEnd(endTime);
} }
}
Result<CheckAllRecordVo> result = checkAllRecordService.getAllCheckRecord(query, pageInfo); Result<CheckAllRecordVo> result = checkAllRecordService.getAllCheckRecord(query, pageInfo);
model.put("data", result.getList()); model.put("data", result.getList());
......
...@@ -191,6 +191,7 @@ public class PerformAttendRecordServiceImpl extends AbstractCRUDServiceImpl<Perf ...@@ -191,6 +191,7 @@ public class PerformAttendRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
BeanUtils.copyProperties(entity, checkAttendRecordEntity, BeanUtil.getNullPropertyNames(entity)); BeanUtils.copyProperties(entity, checkAttendRecordEntity, BeanUtil.getNullPropertyNames(entity));
checkAttendRecordEntity.setId(null); checkAttendRecordEntity.setId(null);
checkAttendRecordEntity.setRecordId(entity.getId()); checkAttendRecordEntity.setRecordId(entity.getId());
checkAttendRecordEntity.setCheckTime(entity.getErrorTime());
if(performStaffConfService.checkRules(entity.getStaffId(),entity.getDeptId(),entity.getRuleId())){ if(performStaffConfService.checkRules(entity.getStaffId(),entity.getDeptId(),entity.getRuleId())){
checkAttendRecordEntity.setCheckStatus(CheckStatusEnum.已处理.getValue()); checkAttendRecordEntity.setCheckStatus(CheckStatusEnum.已处理.getValue());
if(checkAttendRecordEntity.getSubAddType()==SubAddTypeEnum.增加.getValue()){ if(checkAttendRecordEntity.getSubAddType()==SubAddTypeEnum.增加.getValue()){
......
...@@ -44,8 +44,7 @@ import org.springframework.web.multipart.MultipartFile; ...@@ -44,8 +44,7 @@ import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*; import static com.mortals.framework.ap.SysConstains.*;
import static com.mortals.xhx.common.key.ParamKey.SYS_PARAM_WEIGHT; import static com.mortals.xhx.common.key.ParamKey.SYS_PARAM_WEIGHT;
import static com.mortals.xhx.common.key.RedisKey.KEY_ATTENDANCE_STAT_CACHE; import static com.mortals.xhx.common.key.RedisKey.*;
import static com.mortals.xhx.common.key.RedisKey.KEY_CHECK_SUMMARY_CACHE;
/** /**
* 员工绩效统计 * 员工绩效统计
...@@ -104,6 +103,10 @@ public class StaffPerformSummaryController extends BaseCRUDJsonBodyMappingContro ...@@ -104,6 +103,10 @@ public class StaffPerformSummaryController extends BaseCRUDJsonBodyMappingContro
weightPdu = JSONObject.parseObject(value,WeightPdu.class); weightPdu = JSONObject.parseObject(value,WeightPdu.class);
} }
this.addDict(model,"weightPdu",weightPdu); this.addDict(model,"weightPdu",weightPdu);
String summaryTime = cacheService.get(STAFF_PERFORM_SUMMARY);
if(StringUtils.isNotEmpty(summaryTime)){
this.addDict(model,"summaryTime",summaryTime);
}
return super.doListAfter(query,model,context); return super.doListAfter(query,model,context);
} }
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<select id="getList" parameterType="com.mortals.xhx.module.check.model.CheckAllRecordQuery" resultType="com.mortals.xhx.module.check.model.vo.CheckAllRecordVo"> <select id="getList" parameterType="com.mortals.xhx.module.check.model.CheckAllRecordQuery" resultType="com.mortals.xhx.module.check.model.vo.CheckAllRecordVo">
SELECT * FROM ( SELECT * FROM (
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,checkStatus,checkResult,auditStatus,createTime,score,subMethod,checkTime,deductTime,1 AS checkType ,'attend' AS performType,updateTime FROM mortals_xhx_check_attend_record WHERE 1=1 SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,checkStatus,checkResult,auditStatus,createTime,score,subMethod,checkTime,deductTime,1 AS checkType ,'attend' AS performType,updateTime,DATE_FORMAT(errorTime,'%Y-%m-%d %k:%i:%s') as remark FROM mortals_xhx_check_attend_record WHERE score>0
<if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if> <if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if> <if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if> <if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND errorTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeEnd != null and checkTimeEnd!=''"> AND errorTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if> <if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
UNION UNION
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,checkStatus,checkResult,auditStatus,createTime,score,subMethod,checkTime,deductTime,4 AS checkType ,'effect' AS performType,updateTime FROM mortals_xhx_check_effect_record WHERE 1=1 SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,checkStatus,checkResult,auditStatus,createTime,score,subMethod,checkTime,deductTime,4 AS checkType ,'effect' AS performType,updateTime,remark FROM mortals_xhx_check_effect_record WHERE 1=1
<if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if> <if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if> <if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if> <if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND happenTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeEnd != null and checkTimeEnd!=''"> AND happenTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if> <if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
UNION UNION
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,checkStatus,checkResult,auditStatus,createTime,score,subMethod,checkTime, deductTime,2 AS checkType ,'complain' AS performType,updateTime FROM mortals_xhx_check_complain_record WHERE 1=1 SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,checkStatus,checkResult,auditStatus,createTime,score,subMethod,checkTime, deductTime,2 AS checkType ,'complain' AS performType,updateTime,remark FROM mortals_xhx_check_complain_record WHERE 1=1
<if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if> <if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if> <if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if> <if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND complainTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeEnd != null and checkTimeEnd!=''"> AND complainTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if> <if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
UNION UNION
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName, subAddType,checkStatus,checkResult,auditStatus,createTime,score,subMethod,checkTime, deductTime,3 AS checkType ,'gowork' AS performType,updateTime FROM mortals_xhx_check_gowork_record WHERE 1=1 SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName, subAddType,checkStatus,checkResult,auditStatus,createTime,score,subMethod,checkTime, deductTime,3 AS checkType ,'gowork' AS performType,updateTime,remark FROM mortals_xhx_check_gowork_record WHERE 1=1
<if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if> <if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if> <if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if> <if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND goworkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeEnd != null and checkTimeEnd!=''"> AND goworkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if> <if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
UNION UNION
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,checkStatus,checkResult,auditStatus,createTime,score,subMethod,checkTime, deductTime,2 AS checkType ,'review' AS performType,updateTime FROM mortals_xhx_check_review_record WHERE 1=1 SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,checkStatus,checkResult,auditStatus,createTime,score,subMethod,checkTime, deductTime,2 AS checkType ,'review' AS performType,updateTime,remark FROM mortals_xhx_check_review_record WHERE 1=1
<if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if> <if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if> <if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if> <if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND reviewTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeEnd != null and checkTimeEnd!=''"> AND reviewTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if> <if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
UNION UNION
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,checkStatus,checkResult,auditStatus,createTime,score,subMethod,checkTime, deductTime,5 AS checkType ,'other' AS performType,updateTime FROM mortals_xhx_check_other_record WHERE 1=1 SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,checkStatus,checkResult,auditStatus,createTime,score,subMethod,checkTime, deductTime,5 AS checkType ,'other' AS performType,updateTime,remark FROM mortals_xhx_check_other_record WHERE 1=1
<if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if> <if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if> <if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if> <if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
<select id="getListCount" parameterType="com.mortals.xhx.module.check.model.CheckAllRecordQuery" resultType="int"> <select id="getListCount" parameterType="com.mortals.xhx.module.check.model.CheckAllRecordQuery" resultType="int">
SELECT count(1) FROM ( SELECT count(1) FROM (
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,checkStatus,checkResult,auditStatus,createTime,score,subMethod,checkTime,deductTime,1 AS checkType ,'attend' AS performType,updateTime FROM mortals_xhx_check_attend_record WHERE 1=1 SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,checkStatus,checkResult,auditStatus,createTime,score,subMethod,checkTime,deductTime,1 AS checkType ,'attend' AS performType,updateTime,remark FROM mortals_xhx_check_attend_record WHERE score>0
<if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if> <if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if> <if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if> <if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND errorTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeEnd != null and checkTimeEnd!=''"> AND errorTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if> <if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
UNION UNION
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,checkStatus,checkResult,auditStatus,createTime,score,subMethod,checkTime,deductTime,4 AS checkType ,'effect' AS performType,updateTime FROM mortals_xhx_check_effect_record WHERE 1=1 SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,checkStatus,checkResult,auditStatus,createTime,score,subMethod,checkTime,deductTime,4 AS checkType ,'effect' AS performType,updateTime,remark FROM mortals_xhx_check_effect_record WHERE 1=1
<if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if> <if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if> <if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if> <if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND happenTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeEnd != null and checkTimeEnd!=''"> AND happenTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if> <if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
UNION UNION
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,checkStatus,checkResult,auditStatus,createTime,score,subMethod,checkTime, deductTime,6 AS checkType ,'complain' AS performType,updateTime FROM mortals_xhx_check_complain_record WHERE 1=1 SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,checkStatus,checkResult,auditStatus,createTime,score,subMethod,checkTime, deductTime,6 AS checkType ,'complain' AS performType,updateTime,remark FROM mortals_xhx_check_complain_record WHERE 1=1
<if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if> <if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if> <if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if> <if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND complainTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeEnd != null and checkTimeEnd!=''"> AND complainTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if> <if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
UNION UNION
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName, subAddType,checkStatus,checkResult,auditStatus,createTime,score,subMethod,checkTime, deductTime,3 AS checkType ,'gowork' AS performType,updateTime FROM mortals_xhx_check_gowork_record WHERE 1=1 SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName, subAddType,checkStatus,checkResult,auditStatus,createTime,score,subMethod,checkTime, deductTime,3 AS checkType ,'gowork' AS performType,updateTime,remark FROM mortals_xhx_check_gowork_record WHERE 1=1
<if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if> <if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if> <if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if> <if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND goworkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeEnd != null and checkTimeEnd!=''"> AND goworkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if> <if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
UNION UNION
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,checkStatus,checkResult,auditStatus,createTime,score,subMethod,checkTime, deductTime,2 AS checkType ,'review' AS performType,updateTime FROM mortals_xhx_check_review_record WHERE 1=1 SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,checkStatus,checkResult,auditStatus,createTime,score,subMethod,checkTime, deductTime,2 AS checkType ,'review' AS performType,updateTime,remark FROM mortals_xhx_check_review_record WHERE 1=1
<if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if> <if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if> <if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if> <if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND reviewTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeEnd != null and checkTimeEnd!=''"> AND reviewTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if> <if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
UNION UNION
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,checkStatus,checkResult,auditStatus,createTime,score,subMethod,checkTime, deductTime,5 AS checkType ,'other' AS performType,updateTime FROM mortals_xhx_check_other_record WHERE 1=1 SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,checkStatus,checkResult,auditStatus,createTime,score,subMethod,checkTime, deductTime,5 AS checkType ,'other' AS performType,updateTime,remark FROM mortals_xhx_check_other_record WHERE 1=1
<if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if> <if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if> <if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if> <if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
......
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