Commit 1afd6f46 authored by 姬鋆屾's avatar 姬鋆屾
parents a8c046ec cebe28e7
...@@ -37,4 +37,15 @@ public class EffectSaveReq extends BaseReq { ...@@ -37,4 +37,15 @@ public class EffectSaveReq extends BaseReq {
* 抓拍图片 * 抓拍图片
*/ */
private String snapPath; private String snapPath;
/**
* 唯一标识
*/
private String ext;
/**
* 名称
*/
private String staffName;
} }
...@@ -170,7 +170,7 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq> ...@@ -170,7 +170,7 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq>
@PostMapping("effect/save") @PostMapping("effect/save")
@UnAuth @UnAuth
public Rest<Void> effectSave(@RequestBody EffectSaveReq req) { public Rest<Void> effectSave(@RequestBody EffectSaveReq req) {
log.info("web Api req==>{}", JSON.toJSONString(req)); log.info("web Api req==>{}", JSON.toJSONString(req));
String busiDesc = "外部效能新增"; String busiDesc = "外部效能新增";
Rest rest = Rest.ok(busiDesc + "成功!"); Rest rest = Rest.ok(busiDesc + "成功!");
try { try {
...@@ -405,7 +405,6 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq> ...@@ -405,7 +405,6 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq>
//效能保存 //效能保存
StaffEntity staffEntity = getStaff(req.getPhone()); StaffEntity staffEntity = getStaff(req.getPhone());
PerformRulesEntity rule = getRule(req.getRuleCode()); PerformRulesEntity rule = getRule(req.getRuleCode());
checkStaffAutoConf(staffEntity, rule);
PerformEffectRecordEntity recordEntity = new PerformEffectRecordEntity(); PerformEffectRecordEntity recordEntity = new PerformEffectRecordEntity();
recordEntity.initAttrValue(); recordEntity.initAttrValue();
recordEntity.setSubMethod(SubMethodEnum.系统自动.getValue()); recordEntity.setSubMethod(SubMethodEnum.系统自动.getValue());
...@@ -426,6 +425,7 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq> ...@@ -426,6 +425,7 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq>
recordEntity.setDeductPerson("系统管理员"); recordEntity.setDeductPerson("系统管理员");
recordEntity.setDeductTime(new Date()); recordEntity.setDeductTime(new Date());
recordEntity.setWorkNum(staffEntity.getWorkNum()); recordEntity.setWorkNum(staffEntity.getWorkNum());
recordEntity.setRemark(req.getExt());
recordEntity.setWindowNum(req.getWindowNum()); recordEntity.setWindowNum(req.getWindowNum());
...@@ -506,13 +506,12 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq> ...@@ -506,13 +506,12 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq>
PerformRulesEntity rule = rulesService.getCache(ruleCode); PerformRulesEntity rule = rulesService.getCache(ruleCode);
if (ObjectUtils.isEmpty(rule)) if (ObjectUtils.isEmpty(rule))
throw new AppException(String.format("当前手机号码未找到匹配的员工!rule:%s", ruleCode)); throw new AppException(String.format("当前手机号码未找到匹配的员工!rule:%s", ruleCode));
return rule; return rule;
} }
private StaffEntity getStaff(String phone) { private StaffEntity getStaff(String phone) {
StaffEntity staffEntity = staffService.selectOne(new StaffQuery().phoneNumber(phone)); StaffEntity staffEntity = staffService.selectOne(new StaffQuery().phoneNumber(phone));
if (ObjectUtils.isEmpty(staffEntity)){ if (ObjectUtils.isEmpty(staffEntity)) {
throw new AppException(String.format("当前手机号码未找到匹配的员工!phone:%s", phone)); throw new AppException(String.format("当前手机号码未找到匹配的员工!phone:%s", phone));
} }
......
...@@ -29,4 +29,6 @@ public class ParamKey { ...@@ -29,4 +29,6 @@ public class ParamKey {
public static String SYS_PARAM_BELONG = "belong"; public static String SYS_PARAM_BELONG = "belong";
public static String SYS_PARAM_XNJC_URL = "xnjc_url";
} }
package com.mortals.xhx.module.perform.service.impl; package com.mortals.xhx.module.perform.service.impl;
import cn.hutool.core.lang.Validator;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
import com.mortals.framework.ap.GlobalSysInfo;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.xhx.busiz.h5.req.EffectSaveReq;
import com.mortals.xhx.busiz.h5.rsp.ApiResp;
import com.mortals.xhx.common.code.*; import com.mortals.xhx.common.code.*;
import com.mortals.xhx.common.utils.BeanUtil; import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.check.model.CheckEffectRecordEntity; import com.mortals.xhx.module.check.model.CheckEffectRecordEntity;
import com.mortals.xhx.module.check.service.CheckEffectRecordService; import com.mortals.xhx.module.check.service.CheckEffectRecordService;
import com.mortals.xhx.module.perform.model.PerformComplainRecordEntity; import com.mortals.xhx.module.perform.dao.PerformEffectRecordDao;
import com.mortals.xhx.module.perform.model.PerformEffectRecordQuery; import com.mortals.xhx.module.perform.model.*;
import com.mortals.xhx.module.perform.model.PerformRulesEntity; import com.mortals.xhx.module.perform.service.*;
import com.mortals.xhx.module.perform.service.PerformRulesService;
import com.mortals.xhx.module.perform.service.PerformStaffConfService;
import com.mortals.xhx.module.staff.model.StaffEntity; import com.mortals.xhx.module.staff.model.StaffEntity;
import com.mortals.xhx.module.staff.model.StaffQuery;
import com.mortals.xhx.module.staff.service.StaffService; import com.mortals.xhx.module.staff.service.StaffService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; 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.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.xhx.module.perform.dao.PerformEffectRecordDao;
import com.mortals.xhx.module.perform.model.PerformEffectRecordEntity;
import com.mortals.xhx.module.perform.service.PerformEffectRecordService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import java.util.Date; import java.util.*;
import java.util.stream.Collectors;
import static com.mortals.xhx.common.key.ParamKey.SYS_PARAM_XNJC_URL;
/** /**
* PerformEffectRecordService * PerformEffectRecordService
...@@ -38,22 +47,27 @@ public class PerformEffectRecordServiceImpl extends AbstractCRUDServiceImpl<Perf ...@@ -38,22 +47,27 @@ public class PerformEffectRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
@Autowired @Autowired
private CheckEffectRecordService checkEffectRecordService; private CheckEffectRecordService checkEffectRecordService;
@Autowired
private PerformRulesCategoryService categoryService;
@Autowired @Autowired
private PerformRulesService rulesService; private PerformRulesService rulesService;
@Autowired @Autowired
private StaffService staffService; private StaffService staffService;
@Autowired @Autowired
private PerformStaffConfService performStaffConfService; private PerformStaffConfService performStaffConfService;
@Autowired
private PerformStaffConfDetailService performStaffConfDetailService;
@Autowired
private PerformErrorRecordService errorRecordService;
@Override @Override
protected void saveBefore(PerformEffectRecordEntity entity, Context context) throws AppException { protected void saveBefore(PerformEffectRecordEntity entity, Context context) throws AppException {
updateStaffRuleNames(entity,context); updateStaffRuleNames(entity, context);
} }
@Override @Override
protected void updateBefore(PerformEffectRecordEntity entity, Context context) throws AppException { protected void updateBefore(PerformEffectRecordEntity entity, Context context) throws AppException {
updateStaffRuleNames(entity,context); updateStaffRuleNames(entity, context);
} }
...@@ -69,7 +83,7 @@ public class PerformEffectRecordServiceImpl extends AbstractCRUDServiceImpl<Perf ...@@ -69,7 +83,7 @@ public class PerformEffectRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
entity.setDeptName(staffCache == null ? "" : staffCache.getDeptName()); entity.setDeptName(staffCache == null ? "" : staffCache.getDeptName());
} }
entity.setDeductTime(new Date()); entity.setDeductTime(new Date());
if(ObjectUtils.isEmpty(entity.getDeductPerson())){ if (ObjectUtils.isEmpty(entity.getDeductPerson())) {
entity.setDeductPerson(context == null ? "" : context.getUser() == null ? "" : context.getUser().getRealName()); entity.setDeductPerson(context == null ? "" : context.getUser() == null ? "" : context.getUser().getRealName());
} }
} }
...@@ -81,15 +95,15 @@ public class PerformEffectRecordServiceImpl extends AbstractCRUDServiceImpl<Perf ...@@ -81,15 +95,15 @@ public class PerformEffectRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
BeanUtils.copyProperties(entity, checkEffectRecordEntity, BeanUtil.getNullPropertyNames(entity)); BeanUtils.copyProperties(entity, checkEffectRecordEntity, BeanUtil.getNullPropertyNames(entity));
checkEffectRecordEntity.setId(null); checkEffectRecordEntity.setId(null);
checkEffectRecordEntity.setRecordId(entity.getId()); checkEffectRecordEntity.setRecordId(entity.getId());
if(performStaffConfService.checkRules(entity.getStaffId(),entity.getDeptId(),entity.getRuleId())){ if (performStaffConfService.checkRules(entity.getStaffId(), entity.getDeptId(), entity.getRuleId())) {
checkEffectRecordEntity.setCheckStatus(CheckStatusEnum.已处理.getValue()); checkEffectRecordEntity.setCheckStatus(CheckStatusEnum.已处理.getValue());
if(checkEffectRecordEntity.getSubAddType()== SubAddTypeEnum.增加.getValue()){ if (checkEffectRecordEntity.getSubAddType() == SubAddTypeEnum.增加.getValue()) {
checkEffectRecordEntity.setCheckResult(CheckResultAddEnum.核查加分.getValue()); checkEffectRecordEntity.setCheckResult(CheckResultAddEnum.核查加分.getValue());
}else { } else {
checkEffectRecordEntity.setCheckResult(CheckResultSubEnum.核查扣分.getValue()); checkEffectRecordEntity.setCheckResult(CheckResultSubEnum.核查扣分.getValue());
} }
checkEffectRecordEntity.setUpdateTime(new Date()); checkEffectRecordEntity.setUpdateTime(new Date());
}else { } else {
checkEffectRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理 checkEffectRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理
} }
checkEffectRecordService.save(checkEffectRecordEntity, context); checkEffectRecordService.save(checkEffectRecordEntity, context);
...@@ -116,7 +130,133 @@ public class PerformEffectRecordServiceImpl extends AbstractCRUDServiceImpl<Perf ...@@ -116,7 +130,133 @@ public class PerformEffectRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
@Override @Override
public void syncEffectRecord(PerformEffectRecordQuery query, Context context) { public void syncEffectRecord(PerformEffectRecordQuery query, Context context) {
log.info("同步效能绩效记录开始");
String phpInUrl = GlobalSysInfo.getParamValue(SYS_PARAM_XNJC_URL, "http://127.0.0.1:11039/zwfw_api_xnjc");
String xnjcUrl = phpInUrl + "/api/kq_alert/leaveList";
Map<String, Object> params = new HashMap<>();
params.put("start", query.getHappenTimeStart());
params.put("end", query.getHappenTimeEnd());
String resp = null;
try {
resp = HttpUtil.createPost(xnjcUrl).form(params).timeout(60000).execute().body();
if (ObjectUtils.isEmpty(resp)) throw new AppException("请求失败!");
ApiResp<List<EffectSaveReq>> rest = JSON.parseObject(resp, new TypeReference<ApiResp<List<EffectSaveReq>>>() {
});
//记录保存
if (rest.getCode() == 0) {
List<EffectSaveReq> list = rest.getData();
for (EffectSaveReq effectSaveReq : list) {
boolean isMobile = Validator.isMobile(effectSaveReq.getPhone());
if (!isMobile) continue;
if (ObjectUtils.isEmpty(effectSaveReq.getRuleCode())) continue;
if (ObjectUtils.isEmpty(effectSaveReq.getPhone())) {
//通过名称查询员工,再看是否有匹配的
if (!ObjectUtils.isEmpty(effectSaveReq.getStaffName())) {
StaffQuery staffQuery = new StaffQuery();
staffQuery.setName(effectSaveReq.getStaffName());
StaffEntity staffEntity = staffService.selectOne(staffQuery);
if (!ObjectUtils.isEmpty(staffEntity)) {
effectSaveReq.setPhone(staffEntity.getPhoneNumber());
}
} else {
continue;
}
}
Long ruleId = null;
PerformRulesEntity rule = rulesService.getCache(effectSaveReq.getRuleCode());
if (ObjectUtils.isEmpty(rule)) {
ruleId = rule.getId();
}
//查询是否存在 如果没有 则保存
PerformEffectRecordQuery effectRecordQuery = new PerformEffectRecordQuery();
effectRecordQuery.setHappenTime(effectSaveReq.getHappenTime());
effectRecordQuery.setWindowNum(effectSaveReq.getWindowNum());
if (!ObjectUtils.isEmpty(ruleId)) {
effectRecordQuery.setRuleId(ruleId);
}
// effectRecordQuery.setRemark(effectSaveReq.getExt());
int count = this.count(effectRecordQuery, context);
if (count > 0) continue;
//保存
effect(effectSaveReq);
}
}
} catch (Exception e) {
log.error("异常:", e);
}
}
private boolean effect(EffectSaveReq req) throws AppException {
//效能保存
StaffEntity staffEntity = getStaff(req.getPhone());
PerformRulesEntity rule = getRule(req.getRuleCode());
PerformEffectRecordEntity recordEntity = new PerformEffectRecordEntity();
recordEntity.initAttrValue();
recordEntity.setSubMethod(SubMethodEnum.系统自动.getValue());
BeanUtils.copyProperties(req, recordEntity);
recordEntity.setStaffId(staffEntity.getId());
recordEntity.setStaffName(staffEntity.getName());
recordEntity.setWorkNum(staffEntity.getWorkNum());
recordEntity.setDeptId(staffEntity.getDeptId());
recordEntity.setDeptName(staffEntity.getDeptName());
recordEntity.setSalaId(staffEntity.getSalaId());
recordEntity.setSalaName(staffEntity.getSalaName());
recordEntity.setSubAddType(rule.getSubAddType());
recordEntity.setScore(rule.getScore());
recordEntity.setRuleId(rule.getId());
recordEntity.setRuleName(rule.getName());
recordEntity.setCategoryId(rule.getCategoryId());
recordEntity.setCategoryName(rule.getCategoryName());
recordEntity.setDeductPerson("系统管理员");
recordEntity.setDeductTime(new Date());
recordEntity.setWorkNum(staffEntity.getWorkNum());
recordEntity.setRemark(req.getExt());
recordEntity.setWindowNum(req.getWindowNum());
recordEntity.setCreateUserId(1L);
recordEntity.setCreateTime(new Date());
PerformRulesCategoryEntity categoryEntity = categoryService.get(rule.getCategoryId());
recordEntity.setCategoryName(categoryEntity == null ? "" : categoryEntity.getName());
PerformEffectRecordEntity save = this.save(recordEntity);
return save.newEntity();
}
private void checkStaffAutoConf(StaffEntity staffEntity, PerformRulesEntity rule) {
Boolean rulePass = false;
//校验当前员工是否存在自动规则中
List<PerformStaffConfEntity> performStaffConfEntities = performStaffConfService.find(new PerformStaffConfQuery());
for (PerformStaffConfEntity performStaffConfEntity : performStaffConfEntities) {
String staffIds = performStaffConfEntity.getStaffIds();
Set<String> split = StrUtil.split(staffIds, ",").stream().collect(Collectors.toSet());
if (split.contains(staffEntity.getId().toString())) {
//查询当前规则
List<PerformStaffConfDetailEntity> staffConfDetailEntities = performStaffConfDetailService.find(new PerformStaffConfDetailQuery().staffConfId(performStaffConfEntity.getId()));
for (PerformStaffConfDetailEntity staffConfDetailEntity : staffConfDetailEntities) {
if (staffConfDetailEntity.getRuleId() == rule.getId()) {
rulePass = true;
break;
}
}
}
if (rulePass) break;
}
if (rulePass) throw new AppException("当前用户与绩效规则未配置自动核查,请在后台配置后再新增!");
}
private PerformRulesEntity getRule(String ruleCode) {
PerformRulesEntity rule = rulesService.getCache(ruleCode);
return rule;
}
private StaffEntity getStaff(String phone) {
StaffEntity staffEntity = staffService.selectOne(new StaffQuery().phoneNumber(phone));
return staffEntity;
} }
} }
\ No newline at end of file
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
<if test="createTimeStart != null and createTimeStart!=''"> AND createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="createTimeStart != null and createTimeStart!=''"> AND createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createTimeEnd != null and createTimeEnd!=''"> AND createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="createTimeEnd != null and createTimeEnd!=''"> AND createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </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="checkTimeStart != null and checkTimeStart!=''"> AND errorTime <![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> <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 FROM mortals_xhx_check_effect_record WHERE 1=1
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if> <if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="createTimeStart != null and createTimeStart!=''"> AND createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="createTimeStart != null and createTimeStart!=''"> AND createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createTimeEnd != null and createTimeEnd!=''"> AND createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="createTimeEnd != null and createTimeEnd!=''"> AND createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </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="checkTimeStart != null and checkTimeStart!=''"> AND happenTime <![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> <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 FROM mortals_xhx_check_complain_record WHERE 1=1
...@@ -35,8 +35,8 @@ ...@@ -35,8 +35,8 @@
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if> <if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="createTimeStart != null and createTimeStart!=''"> AND createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="createTimeStart != null and createTimeStart!=''"> AND createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createTimeEnd != null and createTimeEnd!=''"> AND createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="createTimeEnd != null and createTimeEnd!=''"> AND createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </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="checkTimeStart != null and checkTimeStart!=''"> AND complainTime <![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> <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 FROM mortals_xhx_check_gowork_record WHERE 1=1
...@@ -46,8 +46,8 @@ ...@@ -46,8 +46,8 @@
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if> <if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="createTimeStart != null and createTimeStart!=''"> AND createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="createTimeStart != null and createTimeStart!=''"> AND createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createTimeEnd != null and createTimeEnd!=''"> AND createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="createTimeEnd != null and createTimeEnd!=''"> AND createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </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="checkTimeStart != null and checkTimeStart!=''"> AND goworkTime <![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> <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 FROM mortals_xhx_check_review_record WHERE 1=1
...@@ -58,8 +58,8 @@ ...@@ -58,8 +58,8 @@
<if test="createTimeStart != null and createTimeStart!=''"> AND createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="createTimeStart != null and createTimeStart!=''"> AND createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createTimeEnd != null and createTimeEnd!=''"> AND createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="createTimeEnd != null and createTimeEnd!=''"> AND createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </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="checkTimeStart != null and checkTimeStart!=''"> AND reviewTime <![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> <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 FROM mortals_xhx_check_other_record WHERE 1=1
...@@ -70,8 +70,8 @@ ...@@ -70,8 +70,8 @@
<if test="createTimeStart != null and createTimeStart!=''"> AND createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="createTimeStart != null and createTimeStart!=''"> AND createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createTimeEnd != null and createTimeEnd!=''"> AND createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="createTimeEnd != null and createTimeEnd!=''"> AND createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </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="checkTimeStart != null and checkTimeStart!=''"> AND happenTime <![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> <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>
) AS a ) AS a
where 1=1 where 1=1
...@@ -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,createTime,subAddType,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 FROM mortals_xhx_check_attend_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>
...@@ -102,47 +102,44 @@ ...@@ -102,47 +102,44 @@
<if test="createTimeStart != null and createTimeStart!=''"> AND createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="createTimeStart != null and createTimeStart!=''"> AND createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createTimeEnd != null and createTimeEnd!=''"> AND createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="createTimeEnd != null and createTimeEnd!=''"> AND createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </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="checkTimeStart != null and checkTimeStart!=''"> AND errorTime <![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> <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,createTime,subAddType,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 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>
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if> <if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="createTimeStart != null and createTimeStart!=''"> AND createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="createTimeStart != null and createTimeStart!=''"> AND createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createTimeEnd != null and createTimeEnd!=''"> AND createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="createTimeEnd != null and createTimeEnd!=''"> AND createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="checkTimeStart != null and checkTimeStart!=''"> AND happenTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </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 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 checkTime <![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,createTime,subAddType,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 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>
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if> <if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="createTimeStart != null and createTimeStart!=''"> AND createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="createTimeStart != null and createTimeStart!=''"> AND createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createTimeEnd != null and createTimeEnd!=''"> AND createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="createTimeEnd != null and createTimeEnd!=''"> AND createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="checkTimeStart != null and checkTimeStart!=''"> AND complainTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </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 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 checkTime <![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,createTime,subAddType,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 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>
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if> <if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="createTimeStart != null and createTimeStart!=''"> AND createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="createTimeStart != null and createTimeStart!=''"> AND createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createTimeEnd != null and createTimeEnd!=''"> AND createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="createTimeEnd != null and createTimeEnd!=''"> AND createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="checkTimeStart != null and checkTimeStart!=''"> AND goworkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </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 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 checkTime <![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,createTime, subAddType,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 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>
...@@ -150,11 +147,11 @@ ...@@ -150,11 +147,11 @@
<if test="createTimeStart != null and createTimeStart!=''"> AND createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="createTimeStart != null and createTimeStart!=''"> AND createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createTimeEnd != null and createTimeEnd!=''"> AND createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="createTimeEnd != null and createTimeEnd!=''"> AND createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </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="checkTimeStart != null and checkTimeStart!=''"> AND reviewTime <![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> <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,createTime,subAddType,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 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>
...@@ -162,8 +159,8 @@ ...@@ -162,8 +159,8 @@
<if test="createTimeStart != null and createTimeStart!=''"> AND createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="createTimeStart != null and createTimeStart!=''"> AND createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createTimeEnd != null and createTimeEnd!=''"> AND createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="createTimeEnd != null and createTimeEnd!=''"> AND createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </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="checkTimeStart != null and checkTimeStart!=''"> AND happenTime <![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> <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>
) AS a ) AS a
where 1=1 where 1=1
......
...@@ -86,7 +86,7 @@ Content-Type: application/json ...@@ -86,7 +86,7 @@ Content-Type: application/json
POST {{baseUrl}}/staff/perform/summary/summary POST {{baseUrl}}/staff/perform/summary/summary
Content-Type: application/json Content-Type: application/json
{"checkTimeStart":"2024-02-01","checkTimeEnd":"2024-02-29"} {"checkTimeStart":"2024-02-01","checkTimeEnd":"2024-02-29","checkType":4}
###考勤打卡记录异常信息列表 ###考勤打卡记录异常信息列表
POST {{baseUrl}}/attendance/record/error/doReprocess POST {{baseUrl}}/attendance/record/error/doReprocess
......
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