Commit 85048cf6 authored by 廖旭伟's avatar 廖旭伟

绩效依据配置自动考核指标的规则在核查时无需处理

parent 94dcb91b
...@@ -13,4 +13,13 @@ import com.mortals.xhx.module.perform.dao.PerformStaffConfDao; ...@@ -13,4 +13,13 @@ import com.mortals.xhx.module.perform.dao.PerformStaffConfDao;
public interface PerformStaffConfService extends ICRUDService<PerformStaffConfEntity,Long>{ public interface PerformStaffConfService extends ICRUDService<PerformStaffConfEntity,Long>{
PerformStaffConfDao getDao(); PerformStaffConfDao getDao();
/**
* 检测人员规则是否配置自动核查
* @param staffId
* @param deptId
* @param rulesId
* @return
*/
boolean checkRules(Long staffId,Long deptId,Long rulesId);
} }
\ No newline at end of file
...@@ -19,6 +19,7 @@ import com.mortals.xhx.module.perform.model.PerformRulesCategoryEntity; ...@@ -19,6 +19,7 @@ import com.mortals.xhx.module.perform.model.PerformRulesCategoryEntity;
import com.mortals.xhx.module.perform.model.PerformRulesEntity; import com.mortals.xhx.module.perform.model.PerformRulesEntity;
import com.mortals.xhx.module.perform.service.PerformRulesCategoryService; import com.mortals.xhx.module.perform.service.PerformRulesCategoryService;
import com.mortals.xhx.module.perform.service.PerformRulesService; 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.service.StaffService; import com.mortals.xhx.module.staff.service.StaffService;
import org.checkerframework.checker.units.qual.A; import org.checkerframework.checker.units.qual.A;
...@@ -67,6 +68,8 @@ public class PerformAttendRecordServiceImpl extends AbstractCRUDServiceImpl<Perf ...@@ -67,6 +68,8 @@ public class PerformAttendRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
private PerformRulesService rulesService; private PerformRulesService rulesService;
@Autowired @Autowired
private StaffService staffService; private StaffService staffService;
@Autowired
private PerformStaffConfService performStaffConfService;
@Override @Override
protected void saveBefore(PerformAttendRecordEntity entity, Context context) throws AppException { protected void saveBefore(PerformAttendRecordEntity entity, Context context) throws AppException {
...@@ -185,7 +188,17 @@ public class PerformAttendRecordServiceImpl extends AbstractCRUDServiceImpl<Perf ...@@ -185,7 +188,17 @@ 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.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理 if(performStaffConfService.checkRules(entity.getStaffId(),entity.getDeptId(),entity.getRuleId())){
checkAttendRecordEntity.setCheckStatus(CheckStatusEnum.已处理.getValue());
if(checkAttendRecordEntity.getSubAddType()==SubAddTypeEnum.增加.getValue()){
checkAttendRecordEntity.setCheckResult(CheckResultAddEnum.核查加分.getValue());
}else {
checkAttendRecordEntity.setCheckResult(CheckResultSubEnum.核查扣分.getValue());
}
checkAttendRecordEntity.setUpdateTime(new Date());
}else {
checkAttendRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理
}
checkAttendRecordService.save(checkAttendRecordEntity, context); checkAttendRecordService.save(checkAttendRecordEntity, context);
} }
......
package com.mortals.xhx.module.perform.service.impl; package com.mortals.xhx.module.perform.service.impl;
import com.mortals.xhx.common.code.CheckStatusEnum; import com.mortals.xhx.common.code.*;
import com.mortals.xhx.common.code.SubMethodEnum;
import com.mortals.xhx.common.utils.BeanUtil; import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.check.model.CheckComplainRecordEntity; import com.mortals.xhx.module.check.model.CheckComplainRecordEntity;
import com.mortals.xhx.module.check.service.CheckComplainRecordService; import com.mortals.xhx.module.check.service.CheckComplainRecordService;
import com.mortals.xhx.module.perform.model.PerformAttendRecordEntity; import com.mortals.xhx.module.perform.model.PerformAttendRecordEntity;
import com.mortals.xhx.module.perform.model.PerformRulesEntity; import com.mortals.xhx.module.perform.model.PerformRulesEntity;
import com.mortals.xhx.module.perform.service.PerformRulesService; 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.service.StaffService; import com.mortals.xhx.module.staff.service.StaffService;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
...@@ -36,12 +36,12 @@ public class PerformComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Pe ...@@ -36,12 +36,12 @@ public class PerformComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Pe
@Autowired @Autowired
private CheckComplainRecordService checkComplainRecordService; private CheckComplainRecordService checkComplainRecordService;
@Autowired @Autowired
private PerformRulesService rulesService; private PerformRulesService rulesService;
@Autowired @Autowired
private StaffService staffService; private StaffService staffService;
@Autowired
private PerformStaffConfService performStaffConfService;
@Override @Override
protected void saveBefore(PerformComplainRecordEntity entity, Context context) throws AppException { protected void saveBefore(PerformComplainRecordEntity entity, Context context) throws AppException {
...@@ -79,7 +79,17 @@ public class PerformComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Pe ...@@ -79,7 +79,17 @@ public class PerformComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Pe
BeanUtils.copyProperties(entity,checkComplainRecordEntity, BeanUtil.getNullPropertyNames(entity)); BeanUtils.copyProperties(entity,checkComplainRecordEntity, BeanUtil.getNullPropertyNames(entity));
checkComplainRecordEntity.setId(null); checkComplainRecordEntity.setId(null);
checkComplainRecordEntity.setRecordId(entity.getId()); checkComplainRecordEntity.setRecordId(entity.getId());
checkComplainRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理 if(performStaffConfService.checkRules(entity.getStaffId(),entity.getDeptId(),entity.getRuleId())){
checkComplainRecordEntity.setCheckStatus(CheckStatusEnum.已处理.getValue());
if(checkComplainRecordEntity.getSubAddType()== SubAddTypeEnum.增加.getValue()){
checkComplainRecordEntity.setCheckResult(CheckResultAddEnum.核查加分.getValue());
}else {
checkComplainRecordEntity.setCheckResult(CheckResultSubEnum.核查扣分.getValue());
}
checkComplainRecordEntity.setUpdateTime(new Date());
}else {
checkComplainRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理
}
checkComplainRecordService.save(checkComplainRecordEntity,context); checkComplainRecordService.save(checkComplainRecordEntity,context);
} }
......
package com.mortals.xhx.module.perform.service.impl; package com.mortals.xhx.module.perform.service.impl;
import com.mortals.xhx.common.code.CheckStatusEnum; import com.mortals.xhx.common.code.*;
import com.mortals.xhx.common.code.SubMethodEnum;
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.model.PerformComplainRecordEntity;
import com.mortals.xhx.module.perform.model.PerformRulesEntity; import com.mortals.xhx.module.perform.model.PerformRulesEntity;
import com.mortals.xhx.module.perform.service.PerformRulesService; 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.service.StaffService; import com.mortals.xhx.module.staff.service.StaffService;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
...@@ -42,6 +42,8 @@ public class PerformEffectRecordServiceImpl extends AbstractCRUDServiceImpl<Perf ...@@ -42,6 +42,8 @@ public class PerformEffectRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
private PerformRulesService rulesService; private PerformRulesService rulesService;
@Autowired @Autowired
private StaffService staffService; private StaffService staffService;
@Autowired
private PerformStaffConfService performStaffConfService;
@Override @Override
protected void saveBefore(PerformEffectRecordEntity entity, Context context) throws AppException { protected void saveBefore(PerformEffectRecordEntity entity, Context context) throws AppException {
...@@ -78,7 +80,17 @@ public class PerformEffectRecordServiceImpl extends AbstractCRUDServiceImpl<Perf ...@@ -78,7 +80,17 @@ 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());
checkEffectRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理 if(performStaffConfService.checkRules(entity.getStaffId(),entity.getDeptId(),entity.getRuleId())){
checkEffectRecordEntity.setCheckStatus(CheckStatusEnum.已处理.getValue());
if(checkEffectRecordEntity.getSubAddType()== SubAddTypeEnum.增加.getValue()){
checkEffectRecordEntity.setCheckResult(CheckResultAddEnum.核查加分.getValue());
}else {
checkEffectRecordEntity.setCheckResult(CheckResultSubEnum.核查扣分.getValue());
}
checkEffectRecordEntity.setUpdateTime(new Date());
}else {
checkEffectRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理
}
checkEffectRecordService.save(checkEffectRecordEntity, context); checkEffectRecordService.save(checkEffectRecordEntity, context);
} }
......
package com.mortals.xhx.module.perform.service.impl; package com.mortals.xhx.module.perform.service.impl;
import com.mortals.xhx.common.code.CheckStatusEnum; import com.mortals.xhx.common.code.*;
import com.mortals.xhx.common.code.SubMethodEnum;
import com.mortals.xhx.common.utils.BeanUtil; import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.check.model.CheckGoworkRecordEntity; import com.mortals.xhx.module.check.model.CheckGoworkRecordEntity;
import com.mortals.xhx.module.check.service.CheckGoworkRecordService; import com.mortals.xhx.module.check.service.CheckGoworkRecordService;
import com.mortals.xhx.module.perform.model.PerformEffectRecordEntity; import com.mortals.xhx.module.perform.model.PerformEffectRecordEntity;
import com.mortals.xhx.module.perform.model.PerformRulesEntity; import com.mortals.xhx.module.perform.model.PerformRulesEntity;
import com.mortals.xhx.module.perform.service.PerformRulesService; 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.service.StaffService; import com.mortals.xhx.module.staff.service.StaffService;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
...@@ -41,6 +41,8 @@ public class PerformGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<Perf ...@@ -41,6 +41,8 @@ public class PerformGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
private PerformRulesService rulesService; private PerformRulesService rulesService;
@Autowired @Autowired
private StaffService staffService; private StaffService staffService;
@Autowired
private PerformStaffConfService performStaffConfService;
@Override @Override
protected void saveBefore(PerformGoworkRecordEntity entity, Context context) throws AppException { protected void saveBefore(PerformGoworkRecordEntity entity, Context context) throws AppException {
...@@ -77,9 +79,17 @@ public class PerformGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<Perf ...@@ -77,9 +79,17 @@ public class PerformGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
BeanUtils.copyProperties(entity,checkGoworkRecordEntity, BeanUtil.getNullPropertyNames(entity)); BeanUtils.copyProperties(entity,checkGoworkRecordEntity, BeanUtil.getNullPropertyNames(entity));
checkGoworkRecordEntity.setId(null); checkGoworkRecordEntity.setId(null);
checkGoworkRecordEntity.setRecordId(entity.getId()); checkGoworkRecordEntity.setRecordId(entity.getId());
if(performStaffConfService.checkRules(entity.getStaffId(),entity.getDeptId(),entity.getRuleId())){
checkGoworkRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理 checkGoworkRecordEntity.setCheckStatus(CheckStatusEnum.已处理.getValue());
if(checkGoworkRecordEntity.getSubAddType()== SubAddTypeEnum.增加.getValue()){
checkGoworkRecordEntity.setCheckResult(CheckResultAddEnum.核查加分.getValue());
}else {
checkGoworkRecordEntity.setCheckResult(CheckResultSubEnum.核查扣分.getValue());
}
checkGoworkRecordEntity.setUpdateTime(new Date());
}else {
checkGoworkRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理
}
checkGoworkRecordService.save(checkGoworkRecordEntity,context); checkGoworkRecordService.save(checkGoworkRecordEntity,context);
} }
......
package com.mortals.xhx.module.perform.service.impl; package com.mortals.xhx.module.perform.service.impl;
import com.mortals.xhx.common.code.CheckStatusEnum; import com.mortals.xhx.common.code.*;
import com.mortals.xhx.common.code.SubMethodEnum;
import com.mortals.xhx.common.utils.BeanUtil; import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.check.model.CheckOtherRecordEntity; import com.mortals.xhx.module.check.model.CheckOtherRecordEntity;
import com.mortals.xhx.module.check.service.CheckOtherRecordService; import com.mortals.xhx.module.check.service.CheckOtherRecordService;
import com.mortals.xhx.module.perform.model.PerformGoworkRecordEntity; import com.mortals.xhx.module.perform.model.PerformGoworkRecordEntity;
import com.mortals.xhx.module.perform.model.PerformRulesEntity; import com.mortals.xhx.module.perform.model.PerformRulesEntity;
import com.mortals.xhx.module.perform.service.PerformRulesService; 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.service.StaffService; import com.mortals.xhx.module.staff.service.StaffService;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
...@@ -41,6 +41,8 @@ public class PerformOtherRecordServiceImpl extends AbstractCRUDServiceImpl<Perfo ...@@ -41,6 +41,8 @@ public class PerformOtherRecordServiceImpl extends AbstractCRUDServiceImpl<Perfo
private PerformRulesService rulesService; private PerformRulesService rulesService;
@Autowired @Autowired
private StaffService staffService; private StaffService staffService;
@Autowired
private PerformStaffConfService performStaffConfService;
@Override @Override
protected void saveBefore(PerformOtherRecordEntity entity, Context context) throws AppException { protected void saveBefore(PerformOtherRecordEntity entity, Context context) throws AppException {
...@@ -81,7 +83,17 @@ public class PerformOtherRecordServiceImpl extends AbstractCRUDServiceImpl<Perfo ...@@ -81,7 +83,17 @@ public class PerformOtherRecordServiceImpl extends AbstractCRUDServiceImpl<Perfo
BeanUtils.copyProperties(entity,checkOtherRecordEntity, BeanUtil.getNullPropertyNames(entity)); BeanUtils.copyProperties(entity,checkOtherRecordEntity, BeanUtil.getNullPropertyNames(entity));
checkOtherRecordEntity.setId(null); checkOtherRecordEntity.setId(null);
checkOtherRecordEntity.setRecordId(entity.getId()); checkOtherRecordEntity.setRecordId(entity.getId());
checkOtherRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理 if(performStaffConfService.checkRules(entity.getStaffId(),entity.getDeptId(),entity.getRuleId())){
checkOtherRecordEntity.setCheckStatus(CheckStatusEnum.已处理.getValue());
if(checkOtherRecordEntity.getSubAddType()== SubAddTypeEnum.增加.getValue()){
checkOtherRecordEntity.setCheckResult(CheckResultAddEnum.核查加分.getValue());
}else {
checkOtherRecordEntity.setCheckResult(CheckResultSubEnum.核查扣分.getValue());
}
checkOtherRecordEntity.setUpdateTime(new Date());
}else {
checkOtherRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理
}
checkOtherRecordService.save(checkOtherRecordEntity,context); checkOtherRecordService.save(checkOtherRecordEntity,context);
} }
......
package com.mortals.xhx.module.perform.service.impl; package com.mortals.xhx.module.perform.service.impl;
import com.mortals.xhx.common.code.CheckStatusEnum; import com.mortals.xhx.common.code.*;
import com.mortals.xhx.common.code.SubMethodEnum;
import com.mortals.xhx.common.utils.BeanUtil; import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.check.model.CheckReviewRecordEntity; import com.mortals.xhx.module.check.model.CheckReviewRecordEntity;
import com.mortals.xhx.module.check.service.CheckReviewRecordService; import com.mortals.xhx.module.check.service.CheckReviewRecordService;
import com.mortals.xhx.module.perform.model.PerformOtherRecordEntity; import com.mortals.xhx.module.perform.model.PerformOtherRecordEntity;
import com.mortals.xhx.module.perform.model.PerformRulesEntity; import com.mortals.xhx.module.perform.model.PerformRulesEntity;
import com.mortals.xhx.module.perform.service.PerformRulesService; 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.service.StaffService; import com.mortals.xhx.module.staff.service.StaffService;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
...@@ -42,6 +42,8 @@ public class PerformReviewRecordServiceImpl extends AbstractCRUDServiceImpl<Perf ...@@ -42,6 +42,8 @@ public class PerformReviewRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
private PerformRulesService rulesService; private PerformRulesService rulesService;
@Autowired @Autowired
private StaffService staffService; private StaffService staffService;
@Autowired
private PerformStaffConfService performStaffConfService;
@Override @Override
protected void saveBefore(PerformReviewRecordEntity entity, Context context) throws AppException { protected void saveBefore(PerformReviewRecordEntity entity, Context context) throws AppException {
...@@ -77,7 +79,17 @@ public class PerformReviewRecordServiceImpl extends AbstractCRUDServiceImpl<Perf ...@@ -77,7 +79,17 @@ public class PerformReviewRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
BeanUtils.copyProperties(entity, checkReviewRecordEntity, BeanUtil.getNullPropertyNames(entity)); BeanUtils.copyProperties(entity, checkReviewRecordEntity, BeanUtil.getNullPropertyNames(entity));
checkReviewRecordEntity.setId(null); checkReviewRecordEntity.setId(null);
checkReviewRecordEntity.setRecordId(entity.getId()); checkReviewRecordEntity.setRecordId(entity.getId());
checkReviewRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理 if(performStaffConfService.checkRules(entity.getStaffId(),entity.getDeptId(),entity.getRuleId())){
checkReviewRecordEntity.setCheckStatus(CheckStatusEnum.已处理.getValue());
if(checkReviewRecordEntity.getSubAddType()== SubAddTypeEnum.增加.getValue()){
checkReviewRecordEntity.setCheckResult(CheckResultAddEnum.核查加分.getValue());
}else {
checkReviewRecordEntity.setCheckResult(CheckResultSubEnum.核查扣分.getValue());
}
checkReviewRecordEntity.setUpdateTime(new Date());
}else {
checkReviewRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理
}
checkReviewRecordService.save(checkReviewRecordEntity, context); checkReviewRecordService.save(checkReviewRecordEntity, context);
} }
......
...@@ -7,8 +7,7 @@ import com.mortals.xhx.base.system.user.model.UserQuery; ...@@ -7,8 +7,7 @@ import com.mortals.xhx.base.system.user.model.UserQuery;
import com.mortals.xhx.base.system.user.service.UserService; import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.common.code.CheckTypeEnum; import com.mortals.xhx.common.code.CheckTypeEnum;
import com.mortals.xhx.module.perform.model.*; import com.mortals.xhx.module.perform.model.*;
import com.mortals.xhx.module.perform.service.PerformRulesCategoryService; import com.mortals.xhx.module.perform.service.*;
import com.mortals.xhx.module.perform.service.PerformStaffConfDetailService;
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.model.StaffQuery;
import com.mortals.xhx.module.staff.service.StaffService; import com.mortals.xhx.module.staff.service.StaffService;
...@@ -19,7 +18,6 @@ import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; ...@@ -19,7 +18,6 @@ import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.xhx.module.perform.dao.PerformStaffConfDao; import com.mortals.xhx.module.perform.dao.PerformStaffConfDao;
import com.mortals.xhx.module.perform.service.PerformStaffConfService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
...@@ -44,9 +42,12 @@ public class PerformStaffConfServiceImpl extends AbstractCRUDServiceImpl<Perform ...@@ -44,9 +42,12 @@ public class PerformStaffConfServiceImpl extends AbstractCRUDServiceImpl<Perform
private StaffService staffService; private StaffService staffService;
@Autowired @Autowired
private PerformRulesCategoryService performRulesCategoryService; private PerformRulesCategoryService performRulesCategoryService;
@Autowired
private PerformRulesService performRulesService;
@Autowired @Autowired
private UserService userService; private UserService userService;
@Autowired
private PerformDeptConfDetailService performDeptConfDetailService;
@Override @Override
...@@ -108,6 +109,10 @@ public class PerformStaffConfServiceImpl extends AbstractCRUDServiceImpl<Perform ...@@ -108,6 +109,10 @@ public class PerformStaffConfServiceImpl extends AbstractCRUDServiceImpl<Perform
protected void saveAfter(PerformStaffConfEntity entity, Context context) throws AppException { protected void saveAfter(PerformStaffConfEntity entity, Context context) throws AppException {
if (CollectionUtils.isNotEmpty(entity.getStaffConfDetail())) { if (CollectionUtils.isNotEmpty(entity.getStaffConfDetail())) {
for (PerformStaffConfDetailEntity item : entity.getStaffConfDetail()) { for (PerformStaffConfDetailEntity item : entity.getStaffConfDetail()) {
PerformRulesEntity rulesEntity = performRulesService.get(item.getRuleId());
if(rulesEntity!=null){
item.setRuleName(rulesEntity.getName());
}
item.setStaffConfId(entity.getId()); item.setStaffConfId(entity.getId());
item.setCreateTime(entity.getCreateTime()); item.setCreateTime(entity.getCreateTime());
item.setCreateUser(entity.getCreateUser()); item.setCreateUser(entity.getCreateUser());
...@@ -145,6 +150,10 @@ public class PerformStaffConfServiceImpl extends AbstractCRUDServiceImpl<Perform ...@@ -145,6 +150,10 @@ public class PerformStaffConfServiceImpl extends AbstractCRUDServiceImpl<Perform
Long[] detailIds = performStaffConfDetailService.find(new PerformStaffConfDetailQuery().staffConfId(entity.getId())).stream().map(PerformStaffConfDetailEntity::getId).toArray(Long[]::new); Long[] detailIds = performStaffConfDetailService.find(new PerformStaffConfDetailQuery().staffConfId(entity.getId())).stream().map(PerformStaffConfDetailEntity::getId).toArray(Long[]::new);
performStaffConfDetailService.remove(detailIds, context); performStaffConfDetailService.remove(detailIds, context);
for (PerformStaffConfDetailEntity item : entity.getStaffConfDetail()) { for (PerformStaffConfDetailEntity item : entity.getStaffConfDetail()) {
PerformRulesEntity rulesEntity = performRulesService.get(item.getRuleId());
if(rulesEntity!=null){
item.setRuleName(rulesEntity.getName());
}
item.setStaffConfId(entity.getId()); item.setStaffConfId(entity.getId());
item.setCreateTime(entity.getCreateTime()); item.setCreateTime(entity.getCreateTime());
item.setCreateUser(entity.getCreateUser()); item.setCreateUser(entity.getCreateUser());
...@@ -193,4 +202,27 @@ public class PerformStaffConfServiceImpl extends AbstractCRUDServiceImpl<Perform ...@@ -193,4 +202,27 @@ public class PerformStaffConfServiceImpl extends AbstractCRUDServiceImpl<Perform
} }
} }
} }
@Override
public boolean checkRules(Long staffId, Long deptId, Long rulesId) {
boolean result = false;
PerformStaffConfEntity staffConfEntity = this.selectOne(new PerformStaffConfQuery().staffIds(String.valueOf(staffId)));
if(staffConfEntity!=null){
List<PerformStaffConfDetailEntity> detailEntities = performStaffConfDetailService.find(new PerformStaffConfDetailQuery().staffConfId(staffConfEntity.getId()).ruleId(rulesId));
if(CollectionUtils.isNotEmpty(detailEntities)){
result = true;
}else {
PerformDeptConfDetailEntity deptConfDetailEntity = performDeptConfDetailService.selectOne(new PerformDeptConfDetailQuery().deptId(deptId).ruleId(rulesId));
if(deptConfDetailEntity!=null){
result = true;
}
}
}else {
PerformDeptConfDetailEntity deptConfDetailEntity = performDeptConfDetailService.selectOne(new PerformDeptConfDetailQuery().deptId(deptId).ruleId(rulesId));
if(deptConfDetailEntity!=null){
result = true;
}
}
return result;
}
} }
\ No newline at end of file
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
SUM(CASE subAddType WHEN 1 THEN score ELSE score*-1 END) as sumScore SUM(CASE subAddType WHEN 1 THEN score ELSE score*-1 END) as sumScore
FROM FROM
mortals_xhx_check_attend_record mortals_xhx_check_attend_record
WHERE 1 = 1 and auditStatus = 1 WHERE checkStatus = 2 and auditStatus = 1
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if> <if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <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>
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
SUM(CASE subAddType WHEN 2 THEN score ELSE 0 END) as attendScoreSub SUM(CASE subAddType WHEN 2 THEN score ELSE 0 END) as attendScoreSub
FROM FROM
mortals_xhx_check_attend_record mortals_xhx_check_attend_record
WHERE 1 = 1 and auditStatus = 1 WHERE checkStatus = 2 and auditStatus = 1
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if> <if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <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>
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
SUM(CASE subAddType WHEN 2 THEN score ELSE 0 END) as attendScoreSub SUM(CASE subAddType WHEN 2 THEN score ELSE 0 END) as attendScoreSub
FROM FROM
mortals_xhx_check_attend_record mortals_xhx_check_attend_record
WHERE 1 = 1 and auditStatus = 1 WHERE checkStatus = 2 and auditStatus = 1
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if> <if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <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>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
SUM(CASE subAddType WHEN 1 THEN score ELSE score*-1 END) as sumScore SUM(CASE subAddType WHEN 1 THEN score ELSE score*-1 END) as sumScore
FROM FROM
mortals_xhx_check_complain_record mortals_xhx_check_complain_record
WHERE 1 = 1 and auditStatus = 1 WHERE checkStatus = 2 and auditStatus = 1
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if> <if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <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>
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
SUM(CASE subAddType WHEN 2 THEN score ELSE 0 END) as complainScoreSub SUM(CASE subAddType WHEN 2 THEN score ELSE 0 END) as complainScoreSub
FROM FROM
mortals_xhx_check_complain_record mortals_xhx_check_complain_record
WHERE 1 = 1 and auditStatus = 1 WHERE checkStatus = 2 and auditStatus = 1
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if> <if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <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>
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
SUM(CASE subAddType WHEN 2 THEN score ELSE 0 END) as complainScoreSub SUM(CASE subAddType WHEN 2 THEN score ELSE 0 END) as complainScoreSub
FROM FROM
mortals_xhx_check_complain_record mortals_xhx_check_complain_record
WHERE 1 = 1 and auditStatus = 1 WHERE checkStatus = 2 and auditStatus = 1
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if> <if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <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>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
SUM(CASE subAddType WHEN 1 THEN score ELSE score*-1 END) as sumScore SUM(CASE subAddType WHEN 1 THEN score ELSE score*-1 END) as sumScore
FROM FROM
mortals_xhx_check_effect_record mortals_xhx_check_effect_record
WHERE 1 = 1 and auditStatus = 1 WHERE checkStatus = 2 and auditStatus = 1
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if> <if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <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>
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
SUM(CASE subAddType WHEN 2 THEN score ELSE 0 END) as effectScoreSub SUM(CASE subAddType WHEN 2 THEN score ELSE 0 END) as effectScoreSub
FROM FROM
mortals_xhx_check_effect_record mortals_xhx_check_effect_record
WHERE 1 = 1 and auditStatus = 1 WHERE checkStatus = 2 and auditStatus = 1
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if> <if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <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>
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
SUM(CASE subAddType WHEN 2 THEN score ELSE 0 END) as effectScoreSub SUM(CASE subAddType WHEN 2 THEN score ELSE 0 END) as effectScoreSub
FROM FROM
mortals_xhx_check_effect_record mortals_xhx_check_effect_record
WHERE 1 = 1 and auditStatus = 1 WHERE checkStatus = 2 and auditStatus = 1
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if> <if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <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>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
SUM(CASE subAddType WHEN 1 THEN score ELSE score*-1 END) as sumScore SUM(CASE subAddType WHEN 1 THEN score ELSE score*-1 END) as sumScore
FROM FROM
mortals_xhx_check_gowork_record mortals_xhx_check_gowork_record
WHERE 1 = 1 and auditStatus = 1 WHERE checkStatus = 2 and auditStatus = 1
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if> <if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <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>
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
SUM(CASE subAddType WHEN 2 THEN score ELSE 0 END) as goworkScoreSub SUM(CASE subAddType WHEN 2 THEN score ELSE 0 END) as goworkScoreSub
FROM FROM
mortals_xhx_check_gowork_record mortals_xhx_check_gowork_record
WHERE 1 = 1 and auditStatus = 1 WHERE checkStatus = 2 and auditStatus = 1
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if> <if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <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>
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
SUM(CASE subAddType WHEN 2 THEN score ELSE 0 END) as goworkScoreSub SUM(CASE subAddType WHEN 2 THEN score ELSE 0 END) as goworkScoreSub
FROM FROM
mortals_xhx_check_gowork_record mortals_xhx_check_gowork_record
WHERE 1 = 1 and auditStatus = 1 WHERE checkStatus = 2 and auditStatus = 1
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if> <if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <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>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
SUM(CASE subAddType WHEN 1 THEN score ELSE score*-1 END) as sumScore SUM(CASE subAddType WHEN 1 THEN score ELSE score*-1 END) as sumScore
FROM FROM
mortals_xhx_check_other_record mortals_xhx_check_other_record
WHERE 1 = 1 and auditStatus = 1 WHERE checkStatus = 2 and auditStatus = 1
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if> <if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <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>
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
SUM(CASE subAddType WHEN 2 THEN score ELSE 0 END) as otherScoreSub SUM(CASE subAddType WHEN 2 THEN score ELSE 0 END) as otherScoreSub
FROM FROM
mortals_xhx_check_other_record mortals_xhx_check_other_record
WHERE 1 = 1 and auditStatus = 1 WHERE checkStatus = 2 and auditStatus = 1
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if> <if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <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>
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
SUM(CASE subAddType WHEN 2 THEN score ELSE 0 END) as otherScoreSub SUM(CASE subAddType WHEN 2 THEN score ELSE 0 END) as otherScoreSub
FROM FROM
mortals_xhx_check_other_record mortals_xhx_check_other_record
WHERE 1 = 1 and auditStatus = 1 WHERE checkStatus = 2 and auditStatus = 1
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if> <if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <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>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
SUM(CASE subAddType WHEN 1 THEN score ELSE score*-1 END) as sumScore SUM(CASE subAddType WHEN 1 THEN score ELSE score*-1 END) as sumScore
FROM FROM
mortals_xhx_check_review_record mortals_xhx_check_review_record
WHERE 1 = 1 and auditStatus = 1 WHERE checkStatus = 2 and auditStatus = 1
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if> <if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <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>
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
SUM(CASE subAddType WHEN 2 THEN score ELSE 0 END) as reviewScoreSub SUM(CASE subAddType WHEN 2 THEN score ELSE 0 END) as reviewScoreSub
FROM FROM
mortals_xhx_check_review_record mortals_xhx_check_review_record
WHERE 1 = 1 and auditStatus = 1 WHERE checkStatus = 2 and auditStatus = 1
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if> <if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <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>
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
SUM(CASE subAddType WHEN 2 THEN score ELSE 0 END) as reviewScoreSub SUM(CASE subAddType WHEN 2 THEN score ELSE 0 END) as reviewScoreSub
FROM FROM
mortals_xhx_check_review_record mortals_xhx_check_review_record
WHERE 1 = 1 and auditStatus = 1 WHERE checkStatus = 2 and auditStatus = 1
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if> <if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <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>
......
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