|
@@ -6,22 +6,20 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.ims.common.utils.StringUtils;
|
|
import com.ims.common.utils.StringUtils;
|
|
import com.ims.eval.cache.CacheContext;
|
|
import com.ims.eval.cache.CacheContext;
|
|
import com.ims.eval.config.CustomException;
|
|
import com.ims.eval.config.CustomException;
|
|
-import com.ims.eval.entity.EvaluateRule;
|
|
|
|
-import com.ims.eval.entity.IndicatorType;
|
|
|
|
-import com.ims.eval.entity.OrganizationEvaluationRule;
|
|
|
|
|
|
+import com.ims.eval.entity.*;
|
|
import com.ims.eval.dao.OrganizationEvaluationRuleMapper;
|
|
import com.ims.eval.dao.OrganizationEvaluationRuleMapper;
|
|
import com.ims.eval.entity.dto.request.OrganizationEvaluationRuleDTO;
|
|
import com.ims.eval.entity.dto.request.OrganizationEvaluationRuleDTO;
|
|
|
|
+import com.ims.eval.service.IDeptResponsibilityService;
|
|
import com.ims.eval.service.IEvaluateRuleService;
|
|
import com.ims.eval.service.IEvaluateRuleService;
|
|
import com.ims.eval.service.IOrganizationEvaluationRuleService;
|
|
import com.ims.eval.service.IOrganizationEvaluationRuleService;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
+import com.ims.eval.service.IOrganizationEvaluationService;
|
|
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 org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.io.Serializable;
|
|
import java.io.Serializable;
|
|
-import java.util.Collection;
|
|
|
|
-import java.util.Date;
|
|
|
|
-import java.util.List;
|
|
|
|
|
|
+import java.util.*;
|
|
|
|
|
|
/**
|
|
/**
|
|
* <p>
|
|
* <p>
|
|
@@ -38,6 +36,13 @@ public class OrganizationEvaluationRuleServiceImpl extends ServiceImpl<Organizat
|
|
@Autowired
|
|
@Autowired
|
|
private IEvaluateRuleService evaluateRuleService;
|
|
private IEvaluateRuleService evaluateRuleService;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private IOrganizationEvaluationService organizationEvaluationService;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private IDeptResponsibilityService deptResponsibilityService;
|
|
|
|
+
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public IPage<OrganizationEvaluationRule> list(Integer pageNum, Integer pageSize, String id, String organizationName, String organizationId, String organizationType, String binSection, String binStage, String evaluationCycle) {
|
|
public IPage<OrganizationEvaluationRule> list(Integer pageNum, Integer pageSize, String id, String organizationName, String organizationId, String organizationType, String binSection, String binStage, String evaluationCycle) {
|
|
@@ -180,6 +185,35 @@ public class OrganizationEvaluationRuleServiceImpl extends ServiceImpl<Organizat
|
|
return list;
|
|
return list;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ public List<OrganizationEvaluationRule> getOrganizationRuleId(String evalOrRespId, String type) {
|
|
|
|
+
|
|
|
|
+ List<String> ids = new ArrayList<>();
|
|
|
|
+ if("mb".equals(type)){
|
|
|
|
+ DeptResponsibility deptResponsibility = deptResponsibilityService.getById(evalOrRespId);
|
|
|
|
+ if(null == deptResponsibility){
|
|
|
|
+ throw new CustomException("考评记录为空");
|
|
|
|
+ }
|
|
|
|
+ ids = Arrays.asList(deptResponsibility.getOrganizationEvaluationRuleId().split(","));
|
|
|
|
+ }
|
|
|
|
+ if("kp".equals(type)){
|
|
|
|
+ OrganizationEvaluation organizationEvaluation = organizationEvaluationService.getById(evalOrRespId);
|
|
|
|
+ if(null == organizationEvaluation){
|
|
|
|
+ throw new CustomException("考评记录为空");
|
|
|
|
+ }
|
|
|
|
+ ids = Arrays.asList(organizationEvaluation.getOrganizationEvaluationRuleId().split(","));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if(ids.size()<=0){
|
|
|
|
+ throw new CustomException("考评记录重配置为空");
|
|
|
|
+ }
|
|
|
|
+// QueryWrapper<OrganizationEvaluationRule> qw = new QueryWrapper<>();
|
|
|
|
+// qw.lambda().in(OrganizationEvaluationRule::getId, ids);
|
|
|
|
+ List<OrganizationEvaluationRule> list = baseMapper.selectOrganizationRuleId(ids);
|
|
|
|
+
|
|
|
|
+ return list;
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
@Transactional
|
|
@Transactional
|