Commit 046fd3e3 authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents a04c8137 c7d6c87e
......@@ -187,7 +187,16 @@ export default {
content={arr[index].content}
placement="top-start"
>
<el-tag type={"danger"} size="mini">
<el-tag
type={
arr[index].attendanceSummary.includes("缺卡") ||
arr[index].attendanceSummary.includes("迟到") ||
arr[index].attendanceSummary.includes("早退")
? "danger"
: "success"
}
size="mini"
>
{arr[index].attendanceSummary}
</el-tag>
</el-tooltip>
......
......@@ -25,11 +25,13 @@ public class RedisKey {
/** 考勤统计 **/
public static final String KEY_ATTENDANCE_STAT_CACHE = "attendance:stat";
/** 考勤统计时间 **/
public static final String ATTENDANCE_STAT_TIME = "attendanceSummaryTime";
public static final String KEY_HOME_STAT_CACHE = "attendance:home:stat";
/** 绩效核查汇总 **/
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;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.service.ICacheService;
import com.mortals.framework.springcloud.service.IApplicationStartedService;
import com.mortals.framework.util.DateUtils;
import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.common.code.CheckTypeEnum;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery;
......@@ -13,9 +14,11 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils;
import java.util.Calendar;
import java.util.Date;
import static com.mortals.xhx.common.key.RedisKey.KEY_CHECK_SUMMARY_CACHE;
import static com.mortals.xhx.common.key.RedisKey.STAFF_PERFORM_SUMMARY;
/***
* 绩效汇总任务执行
......@@ -58,7 +61,18 @@ public class StaffCheckSummaryService implements IApplicationStartedService {
query.setCheckTimeStart(DateUtil.beginOfMonth(date).toDateStr());
query.setCheckTimeEnd(DateUtil.endOfMonth(date).toDateStr());
query.setYear(DateUtil.year(date));
query.setMonth(DateUtil.month(date)+1);
int checkMonth = DateUtil.month(date)+1;
query.setMonth(checkMonth);
Date now = new Date();
int nowMonth = DateUtil.month(now)+1;
if(checkMonth==nowMonth){
//汇总当月绩效
Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.DAY_OF_MONTH,-1);
query.setCheckTimeEnd(DateUtils.getStrDate(calendar.getTime()));
query.setCheckTimeStart(DateUtil.beginOfMonth(calendar.getTime()).toDateStr());
}
}
if(query.getCheckType() == CheckTypeEnum.考勤绩效.getValue()){
checkAttendRecordService.summaryCheck(query);
......@@ -89,6 +103,7 @@ public class StaffCheckSummaryService implements IApplicationStartedService {
checkWindowWorkmanPerformService.summaryCheck(query);
checkOtherRecordService.summaryCheck(query);
log.info("绩效分数汇总完成");
cacheService.set(STAFF_PERFORM_SUMMARY, DateUtils.getCurrStrDateTime());
}
}
......
......@@ -41,7 +41,7 @@ public class AttendanceSummaryTaskImpl implements ITaskExcuteService {
//考勤汇总前先自动处理前一天的异常考勤数据
Calendar now = Calendar.getInstance();
now.setTime(new Date());
// now.add(Calendar.DAY_OF_MONTH, -1); //默认查前一天数据
now.add(Calendar.DAY_OF_MONTH, -1); //默认查前一天数据
// attendanceRecordErrorService.doAutoProcess(now.getTime());
AttendanceSummaryQuery query = new 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.AttendanceRecordHikService;
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.perform.model.PerformAttendRecordEntity;
import com.mortals.xhx.module.perform.model.PerformAttendRecordQuery;
......@@ -47,6 +48,7 @@ import java.util.List;
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_CHECK_SUMMARY_CACHE;
/**
* AttendanceLeaveRecordService
......@@ -243,6 +245,14 @@ public class AttendanceLeaveRecordServiceImpl extends AbstractCRUDServiceImpl<At
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) {
log.error("创建假期考勤异常",e.getMessage());
......
......@@ -115,12 +115,6 @@ public class AttendanceRecordErrorServiceImpl extends AbstractCRUDServiceImpl<At
checkAttendUpdate.setUpdateTime(new Date());
checkAttendUpdate.setCheckStatus(CheckStatusEnum.已处理.getValue());
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,无需立即汇总
......@@ -131,6 +125,13 @@ public class AttendanceRecordErrorServiceImpl extends AbstractCRUDServiceImpl<At
// AttendSummaryThread summaryThread = new AttendSummaryThread(attendanceStatService, query);
// ThreadPool.getInstance().execute(summaryThread);
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);
}
}
}
......
......@@ -44,6 +44,9 @@ import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.*;
import static com.mortals.xhx.common.key.RedisKey.ATTENDANCE_STAT_TIME;
import static com.mortals.xhx.common.key.RedisKey.STAFF_PERFORM_SUMMARY;
/**
* AttendanceStatService
* 考勤汇总信息 service实现
......@@ -625,6 +628,7 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc
}
}
log.info("完成汇总当前日期请假情况.....");
cacheService.set(ATTENDANCE_STAT_TIME, DateUtils.getCurrStrDateTime());
log.info("日期:" + query.getSummaryTime() + ",考勤汇总执行完成,耗时:" + (System.currentTimeMillis() - currentTime) + "毫秒....");
} catch (Exception e) {
log.error("考勤汇总出错", e);
......
......@@ -13,6 +13,7 @@ import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.framework.service.ICacheService;
import com.mortals.framework.util.DataUtil;
import com.mortals.framework.util.DateUtils;
import com.mortals.framework.utils.ReflectUtils;
import com.mortals.framework.utils.poi.ExcelUtil;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
......@@ -57,7 +58,7 @@ import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*;
import static com.mortals.xhx.common.key.RedisKey.KEY_ATTENDANCE_STAT_CACHE;
import static com.mortals.xhx.common.key.RedisKey.*;
/**
* 考勤汇总信息
......@@ -165,6 +166,15 @@ public class AttendanceStatController extends BaseCRUDJsonBodyMappingController<
model.put("pageInfo", result.getPageInfo());
this.parsePageInfo(model, result.getPageInfo());
model.put("message_info", busiDesc + "成功");
String summaryTime = cacheService.get(ATTENDANCE_STAT_TIME);
if(StringUtils.isNotEmpty(summaryTime)){
this.addDict(model,"summaryTime",summaryTime);
}else {
Calendar cal = Calendar.getInstance();
cal.add(Calendar.DAY_OF_MONTH,-1);
summaryTime = DateUtils.getDateTime(cal.getTime(),"yyyy-MM-dd");
this.addDict(model,"summaryTime", summaryTime+" 22:00:00");
}
if (!ObjectUtils.isEmpty(context) && !ObjectUtils.isEmpty(context.getUser())) {
this.recordSysLog(this.request, busiDesc + " 【成功】");
}
......
package com.mortals.xhx.module.check.model.vo;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import lombok.Data;
......@@ -88,5 +89,8 @@ public class CheckAllRecordVo extends BaseEntityLong {
private Integer auditStatus;
private Date updateTime;
/**
* 备注
*/
private String remark;
}
......@@ -221,6 +221,7 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
}
entity.setCheckTime(temp.getErrorTime());
entity.setDeductTime(temp.getErrorTime());
entity.setUpdateTime(new Date());
entity.setCheckStatus(CheckStatusEnum.已处理.getValue()); //处理状态(1.未处理,2.已处理)
dao.update(entity);
......
package com.mortals.xhx.module.check.web;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.common.Rest;
import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.framework.service.ICacheService;
import com.mortals.framework.util.DataUtil;
import com.mortals.framework.util.DateUtils;
import com.mortals.framework.util.StringUtils;
......@@ -31,6 +33,8 @@ import java.time.format.DateTimeFormatter;
import java.time.temporal.TemporalAdjusters;
import java.util.*;
import static com.mortals.xhx.common.key.RedisKey.STAFF_PERFORM_SUMMARY;
/**
* 全部类型核查信息Dao
*/
......@@ -40,6 +44,8 @@ public class CheckAllRecordController extends BaseJsonBodyController {
@Autowired
private CheckAllRecordService checkAllRecordService;
@Autowired
private ICacheService cacheService;
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "checkStatus", CheckStatusEnum.getEnumMap());
......@@ -60,15 +66,11 @@ public class CheckAllRecordController extends BaseJsonBodyController {
int code = 1;
try {
PageInfo pageInfo = new PageInfo(-1);
if (StringUtils.isEmpty(query.getCheckTimeStart()) || StringUtils.isEmpty(query.getCheckTimeStart())) {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
if (StringUtils.isEmpty(query.getCheckTimeStart())) {
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);
calendar.add(Calendar.DAY_OF_MONTH,-1);
query.setCheckTimeEnd(DateUtils.getStrDate(calendar.getTime()));
query.setCheckTimeStart(DateUtil.beginOfMonth(calendar.getTime()).toDateStr());
}
Result<CheckAllRecordVo> result = checkAllRecordService.getAllCheckRecord(query, pageInfo);
......
......@@ -151,6 +151,7 @@ public class PerformAttendAppealServiceImpl extends AbstractCRUDServiceImpl<Perf
checkAttendRecordEntity.setRemark(appealMsg);
checkAttendRecordEntity.setCheckResult(CheckResultAddEnum.核查加分.getValue());
checkAttendRecordEntity.setCheckTime(checkAttendRecordEntity.getErrorTime());
checkAttendRecordEntity.setDeductTime(checkAttendRecordEntity.getErrorTime());
checkAttendRecordEntity.setUpdateTime(new Date());
checkAttendRecordEntity.setCheckStatus(CheckStatusEnum.已处理.getValue()); //处理状态(1.未处理,2.已处理)
checkAttendRecordEntity.setAuditStatus(AuditStatusEnum.通过.getValue());
......
......@@ -191,6 +191,8 @@ public class PerformAttendRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
BeanUtils.copyProperties(entity, checkAttendRecordEntity, BeanUtil.getNullPropertyNames(entity));
checkAttendRecordEntity.setId(null);
checkAttendRecordEntity.setRecordId(entity.getId());
checkAttendRecordEntity.setCheckTime(entity.getErrorTime());
checkAttendRecordEntity.setDeductTime(entity.getErrorTime());
if(performStaffConfService.checkRules(entity.getStaffId(),entity.getDeptId(),entity.getRuleId())){
checkAttendRecordEntity.setCheckStatus(CheckStatusEnum.已处理.getValue());
if(checkAttendRecordEntity.getSubAddType()==SubAddTypeEnum.增加.getValue()){
......
......@@ -103,6 +103,7 @@ public class StaffPerformSummaryEntity extends StaffPerformSummaryVo {
/**
* 备注
*/
@Excel(name = "备注",sort = 15)
private String remark;
/**
* 年
......
......@@ -44,8 +44,7 @@ import org.springframework.web.multipart.MultipartFile;
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.RedisKey.KEY_ATTENDANCE_STAT_CACHE;
import static com.mortals.xhx.common.key.RedisKey.KEY_CHECK_SUMMARY_CACHE;
import static com.mortals.xhx.common.key.RedisKey.*;
/**
* 员工绩效统计
......@@ -104,6 +103,15 @@ public class StaffPerformSummaryController extends BaseCRUDJsonBodyMappingContro
weightPdu = JSONObject.parseObject(value,WeightPdu.class);
}
this.addDict(model,"weightPdu",weightPdu);
String summaryTime = cacheService.get(STAFF_PERFORM_SUMMARY);
if(StringUtils.isNotEmpty(summaryTime)){
this.addDict(model,"summaryTime",summaryTime);
}else {
Calendar cal = Calendar.getInstance();
cal.add(Calendar.DAY_OF_MONTH,-1);
summaryTime = DateUtils.getDateTime(cal.getTime(),"yyyy-MM-dd");
this.addDict(model,"summaryTime", summaryTime+" 22:00:00");
}
return super.doListAfter(query,model,context);
}
......@@ -149,6 +157,9 @@ public class StaffPerformSummaryController extends BaseCRUDJsonBodyMappingContro
Map<String,Object> condition = new HashMap<>();
condition.put("year",year);
condition.put("month",month);
if(query.getStaffId()!=null){
condition.put("staffId",query.getStaffId());
}
this.service.getDao().update(staffPerformSummaryEntity,condition);
}
cacheService.lpush(KEY_CHECK_SUMMARY_CACHE,query);
......
......@@ -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 * 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="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
......@@ -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="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
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="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
......@@ -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="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
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="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
......@@ -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="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
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="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
......@@ -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="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
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="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
......@@ -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="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
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="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
......@@ -94,7 +94,7 @@
<select id="getListCount" parameterType="com.mortals.xhx.module.check.model.CheckAllRecordQuery" resultType="int">
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="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
......@@ -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="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
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="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
......@@ -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="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
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="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
......@@ -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="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
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="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
......@@ -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="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
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="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
......@@ -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="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
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="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </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