|
|
|
@ -8,14 +8,12 @@ import org.jeecg.modules.demo.abilityEvaluation.entity.PersonalAbilityEvaluation |
|
|
|
|
import org.jeecg.modules.demo.abilityEvaluation.mapper.DepartAbilityEvaluationMapper; |
|
|
|
|
import org.jeecg.modules.demo.abilityEvaluation.service.IDepartAbilityEvaluationService; |
|
|
|
|
import org.jeecg.modules.demo.abilityEvaluation.service.IPersonalAbilityEvaluationService; |
|
|
|
|
import org.jeecg.modules.demo.basicsskill.service.IBasicsskillService; |
|
|
|
|
import org.jeecg.modules.system.entity.SysDepart; |
|
|
|
|
import org.jeecg.modules.system.service.ISysDepartService; |
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
import java.util.Date; |
|
|
|
|
import java.util.LinkedList; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Map; |
|
|
|
|
import java.util.*; |
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -30,6 +28,11 @@ public class DepartAbilityEvaluationServiceImpl extends ServiceImpl<DepartAbilit |
|
|
|
|
@Autowired |
|
|
|
|
private IPersonalAbilityEvaluationService iPersonalAbilityEvaluationService; |
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
private ISysDepartService iSysDepartService; |
|
|
|
|
|
|
|
|
|
private final static String PARENT_ID = "1693446350597038081"; |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void collectAbilityEvaluation(DepartAbilityEvaluation departAbilityEvaluation) { |
|
|
|
|
|
|
|
|
@ -51,7 +54,7 @@ public class DepartAbilityEvaluationServiceImpl extends ServiceImpl<DepartAbilit |
|
|
|
|
.collect(Collectors.groupingBy(PersonalAbilityEvaluation::getCapacityId)); |
|
|
|
|
|
|
|
|
|
List<DepartAbilityEvaluation> saveList = new LinkedList<>(); |
|
|
|
|
depetListMap.keySet().stream().forEach(k -> { |
|
|
|
|
Optional.ofNullable(depetListMap).orElse(new LinkedHashMap<>()).keySet().stream().forEach(k -> { |
|
|
|
|
List<PersonalAbilityEvaluation> evaluationList = depetListMap.get(k); |
|
|
|
|
DepartAbilityEvaluation bean = new DepartAbilityEvaluation(); |
|
|
|
|
bean.setAnnualId(departAbilityEvaluation.getAnnualId()); |
|
|
|
@ -64,4 +67,17 @@ public class DepartAbilityEvaluationServiceImpl extends ServiceImpl<DepartAbilit |
|
|
|
|
}); |
|
|
|
|
this.saveBatch(saveList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void collectAllDepart(DepartAbilityEvaluation param) { |
|
|
|
|
|
|
|
|
|
this.remove(new LambdaQueryWrapper<DepartAbilityEvaluation>().eq(DepartAbilityEvaluation::getAnnualId, param.getAnnualId())); |
|
|
|
|
List<SysDepart> departList = iSysDepartService.list(new LambdaQueryWrapper<SysDepart>().eq(SysDepart::getParentId, PARENT_ID)); |
|
|
|
|
Optional.ofNullable(departList).orElse(new LinkedList<>()).stream().forEach(e -> { |
|
|
|
|
DepartAbilityEvaluation depart = new DepartAbilityEvaluation(); |
|
|
|
|
depart.setAnnualId(param.getAnnualId()); |
|
|
|
|
depart.setDepetId(e.getId()); |
|
|
|
|
this.collectAbilityEvaluation(depart); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|