diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/impl/PersonalAbilityEvaluationCollectServiceImpl.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/impl/PersonalAbilityEvaluationCollectServiceImpl.java index 357779dc..9ebdbf6c 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/impl/PersonalAbilityEvaluationCollectServiceImpl.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/impl/PersonalAbilityEvaluationCollectServiceImpl.java @@ -73,7 +73,7 @@ public class PersonalAbilityEvaluationCollectServiceImpl extends ServiceImpl() // .eq(TeamManagement::getEnrollCode, enrollCode)); SysUser sysUser = iSysUserService.getOne(new LambdaQueryWrapper().eq(SysUser::getWorkNo, workNo)); - SysDepart sysDepart = iSysDepartService.getById(sysUser.getOrgCode()); +// SysDepart sysDepart = iSysDepartService.getDepartByOrgCode(sysUser.getOrgCode()); //每个学生同一类型能力指标分组查询 List evaluationList4User = iPersonalAbilityEvaluationService.list(new LambdaQueryWrapper() @@ -82,7 +82,7 @@ public class PersonalAbilityEvaluationCollectServiceImpl extends ServiceImpl()).stream().forEach(en -> { PersonalAbilityEvaluationCollect person = new PersonalAbilityEvaluationCollect(); person.setAnnualCompP(projectId); - person.setDepetId(sysDepart.getId()); + person.setDepetId(sysUser.getDepartIds()); person.setWorkOn(workNo); person.setName(sysUser.getRealname()); double sum = evaluationList4User.stream().mapToDouble(e -> e.getValue()).sum(); diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/impl/PersonalAbilityEvaluationServiceImpl.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/impl/PersonalAbilityEvaluationServiceImpl.java index 9aae2635..df11f183 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/impl/PersonalAbilityEvaluationServiceImpl.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/impl/PersonalAbilityEvaluationServiceImpl.java @@ -123,7 +123,7 @@ public class PersonalAbilityEvaluationServiceImpl extends ServiceImpl() .eq(TeamManagement::getEnrollCode, e.getEnrollCode())); SysUser sysUser = iSysUserService.getById(management.getUserId()); - SysDepart sysDepart = iSysDepartService.getById(sysUser.getOrgCode()); +// SysDepart sysDepart = iSysDepartService.getDepartByOrgCode(sysUser.getOrgCode()); //遍历每一类能力指标 compskillList.forEach(compskill -> { @@ -133,7 +133,7 @@ public class PersonalAbilityEvaluationServiceImpl extends ServiceImpl implements IPersonalCompScoreService { @Autowired @@ -98,22 +100,25 @@ public class PersonalCompScoreServiceImpl extends ServiceImpl saveList = new LinkedList<>(); if (!ObjectUtils.isEmpty(annualCompPoint)) { + //年度比赛项目 奖项设置 + AnnualCompAward annualCompAward = iAnnualCompAwardService.getOne(new LambdaQueryWrapper() + .eq(AnnualCompAward::getAnnucompid, annualCompPoint.getId())); + if (ObjectUtils.isEmpty(annualCompAward)) return; + //1、根据年度比赛项目id,查询获取管理(award_persion)列表,即参赛人员及获取奖项顺序号 List awardPersionList = iAwardPersionService.list(new LambdaQueryWrapper() .eq(AwardPersion::getAnnualCompP, annualCompPoint.getId())); - //2、遍历获奖理理(award_persion)列表,根据奖项id查询比赛奖项设置表(annual_comp_award) + //2、遍历获奖管理(award_persion)列表,根据奖项id查询比赛奖项设置表(annual_comp_award) Optional.ofNullable(awardPersionList).orElse(new LinkedList<>()).forEach(en -> { //2.1、比赛奖项设置 根据awardsort奖项顺序,获取对应的奖项权重值 //奖项顺序与奖项权重值映射关系: wardsort(1:first_weight,2:second_weight,3:third_weight,4:fourth_weight,5:fifth_weight - AnnualCompAward annualCompAward = iAnnualCompAwardService.getById(en.getId()); - if (ObjectUtils.isEmpty(annualCompAward)) return; //奖项权重值 百分比 String weightVal; switch (en.getAwardsort()) { case 1: - weightVal = annualCompAward.getFifthWeight(); + weightVal = annualCompAward.getFirstWeight(); break; case 2: weightVal = annualCompAward.getSecondWeight(); @@ -140,6 +145,7 @@ public class PersonalCompScoreServiceImpl extends ServiceImpl score = new AtomicReference<>((double) 0); if (StringUtils.equals("Y", entryForm)) { //团队赛 @@ -159,8 +165,8 @@ public class PersonalCompScoreServiceImpl extends ServiceImpl