能力评价表结构修改、功能重构 11.17

dev
hechao.zhu 1 year ago
parent 71610cabbb
commit 529448937e
  1. 12
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/controller/PersonalAbilityEvaluationController.java
  2. 22
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/entity/DepartAbilityEvaluation.java
  3. 153
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/entity/PersonalAbilityEvaluation.java
  4. 21
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/entity/PersonalAbilityEvaluationCollect.java
  5. 2
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/IPersonalAbilityEvaluationService.java
  6. 75
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/impl/DepartAbilityEvaluationServiceImpl.java
  7. 104
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/impl/PersonalAbilityEvaluationCollectServiceImpl.java
  8. 157
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/impl/PersonalAbilityEvaluationServiceImpl.java
  9. 256
      jeecgboot-vue3-master/src/views/abilityEvaluation/depart/DepartAbilityEvaluation.data.ts
  10. 248
      jeecgboot-vue3-master/src/views/abilityEvaluation/persanlCollect/PersonalAbilityEvaluationCollect.data.ts
  11. 230
      jeecgboot-vue3-master/src/views/abilityEvaluation/persoanl/PersonalAbilityEvaluation.data.ts
  12. 2
      jeecgboot-vue3-master/src/views/awardpersion/AwardPersion.api.ts

@ -68,12 +68,12 @@ public class PersonalAbilityEvaluationController extends JeecgController<Persona
return Result.OK("添加成功!");
}
@ApiOperation(value = "个人能力评价", notes = "个人能力评价")
@PostMapping(value = "/personalAbilityEvaluation")
public Result<String> personalAbilityEvaluation(@RequestBody PersonalAbilityEvaluation personalAbilityEvaluation) {
personalAbilityEvaluationService.personalAbilityEvaluation(personalAbilityEvaluation);
return Result.OK("操作成功!");
}
// @ApiOperation(value = "个人能力评价", notes = "个人能力评价")
// @PostMapping(value = "/personalAbilityEvaluation")
// public Result<String> personalAbilityEvaluation(@RequestBody PersonalAbilityEvaluation personalAbilityEvaluation) {
// personalAbilityEvaluationService.personalAbilityEvaluation(personalAbilityEvaluation);
// return Result.OK("操作成功!");
// }
@ApiOperation(value = "个人能力评价", notes = "个人能力评价")
@PostMapping(value = "/personalAbilityEvaluation2")

@ -147,4 +147,26 @@ public class DepartAbilityEvaluation implements Serializable {
@Excel(name = "能力12", width = 15)
@ApiModelProperty(value = "能力12")
private Double soc12;
/**
* 基础能力id
*/
@Excel(name = "基础能力id", width = 15)
@ApiModelProperty(value = "基础能力id")
private String capacityId;
/**
* 基础能力名称
*/
@Excel(name = "基础能力名称", width = 15)
@ApiModelProperty(value = "基础能力名称")
private String capacityName;
/**
* 能力值
*/
@Excel(name = "能力值", width = 15)
@ApiModelProperty(value = "能力值")
private Double value;
}

@ -110,76 +110,97 @@ public class PersonalAbilityEvaluation implements Serializable {
@Excel(name = "姓名", width = 15)
@ApiModelProperty(value = "姓名")
private String name;
// /**
// * 能力1
// */
// @Excel(name = "能力1", width = 15)
// @ApiModelProperty(value = "能力1")
// private Double soc1;
// /**
// * 能力2
// */
// @Excel(name = "能力2", width = 15)
// @ApiModelProperty(value = "能力2")
// private Double soc2;
// /**
// * 能力3
// */
// @Excel(name = "能力3", width = 15)
// @ApiModelProperty(value = "能力3")
// private Double soc3;
// /**
// * 能力4
// */
// @Excel(name = "能力4", width = 15)
// @ApiModelProperty(value = "能力4")
// private Double soc4;
// /**
// * 能力5
// */
// @Excel(name = "能力5", width = 15)
// @ApiModelProperty(value = "能力5")
// private Double soc5;
// /**
// * 能力6
// */
// @Excel(name = "能力6", width = 15)
// @ApiModelProperty(value = "能力6")
// private Double soc6;
// /**
// * 能力7
// */
// @Excel(name = "能力7", width = 15)
// @ApiModelProperty(value = "能力7")
// private Double soc7;
// /**
// * 能力8
// */
// @Excel(name = "能力8", width = 15)
// @ApiModelProperty(value = "能力8")
// private Double soc8;
// /**
// * 能力9
// */
// @Excel(name = "能力9", width = 15)
// @ApiModelProperty(value = "能力9")
// private Double soc9;
// /**
// * 能力10
// */
// @Excel(name = "能力10", width = 15)
// @ApiModelProperty(value = "能力10")
// private Double soc10;
// /**
// * 能力11
// */
// @Excel(name = "能力11", width = 15)
// @ApiModelProperty(value = "能力11")
// private Double soc11;
// /**
// * 能力12
// */
// @Excel(name = "能力12", width = 15)
// @ApiModelProperty(value = "能力12")
// private Double soc12;
/**
* 能力1
*/
@Excel(name = "能力1", width = 15)
@ApiModelProperty(value = "能力1")
private Double soc1;
/**
* 能力2
*/
@Excel(name = "能力2", width = 15)
@ApiModelProperty(value = "能力2")
private Double soc2;
/**
* 能力3
*/
@Excel(name = "能力3", width = 15)
@ApiModelProperty(value = "能力3")
private Double soc3;
/**
* 能力4
*/
@Excel(name = "能力4", width = 15)
@ApiModelProperty(value = "能力4")
private Double soc4;
/**
* 能力5
*/
@Excel(name = "能力5", width = 15)
@ApiModelProperty(value = "能力5")
private Double soc5;
/**
* 能力6
*/
@Excel(name = "能力6", width = 15)
@ApiModelProperty(value = "能力6")
private Double soc6;
/**
* 能力7
*/
@Excel(name = "能力7", width = 15)
@ApiModelProperty(value = "能力7")
private Double soc7;
/**
* 能力8
*/
@Excel(name = "能力8", width = 15)
@ApiModelProperty(value = "能力8")
private Double soc8;
/**
* 能力9
*/
@Excel(name = "能力9", width = 15)
@ApiModelProperty(value = "能力9")
private Double soc9;
/**
* 能力10
* 基础能力id
*/
@Excel(name = "能力10", width = 15)
@ApiModelProperty(value = "能力10")
private Double soc10;
@Excel(name = "基础能力id", width = 15)
@ApiModelProperty(value = "基础能力id")
private String capacityId;
/**
* 能力11
* 基础能力名称
*/
@Excel(name = "能力11", width = 15)
@ApiModelProperty(value = "能力11")
private Double soc11;
@Excel(name = "基础能力名称", width = 15)
@ApiModelProperty(value = "基础能力名称")
private String capacityName;
/**
* 能力12
* 能力值
*/
@Excel(name = "能力12", width = 15)
@ApiModelProperty(value = "能力12")
private Double soc12;
@Excel(name = "能力值", width = 15)
@ApiModelProperty(value = "能力值")
private Double value;
}

@ -159,4 +159,25 @@ public class PersonalAbilityEvaluationCollect implements Serializable {
@Excel(name = "能力12", width = 15)
@ApiModelProperty(value = "能力12")
private Double soc12;
/**
* 基础能力id
*/
@Excel(name = "基础能力id", width = 15)
@ApiModelProperty(value = "基础能力id")
private String capacityId;
/**
* 基础能力名称
*/
@Excel(name = "基础能力名称", width = 15)
@ApiModelProperty(value = "基础能力名称")
private String capacityName;
/**
* 能力值
*/
@Excel(name = "能力值", width = 15)
@ApiModelProperty(value = "能力值")
private Double value;
}

@ -11,7 +11,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public interface IPersonalAbilityEvaluationService extends IService<PersonalAbilityEvaluation> {
void personalAbilityEvaluation(PersonalAbilityEvaluation personalAbilityEvaluation);
void personalAbilityEvaluation2(PersonalAbilityEvaluation personalAbilityEvaluation);
}

@ -8,11 +8,14 @@ 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.entity.Basicsskill;
import org.jeecg.modules.demo.basicsskill.service.IBasicsskillService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;
/**
@ -27,63 +30,39 @@ public class DepartAbilityEvaluationServiceImpl extends ServiceImpl<DepartAbilit
@Autowired
private IPersonalAbilityEvaluationService iPersonalAbilityEvaluationService;
@Autowired
private IBasicsskillService iBasicsskillService;
@Override
public void collectAbilityEvaluation(DepartAbilityEvaluation departAbilityEvaluation) {
//id不为空时,为重新汇总,删除该学院年度下的所有数据,重新汇总
if (StringUtils.isNotBlank(departAbilityEvaluation.getId())) {
DepartAbilityEvaluation evaluation = this.getById(departAbilityEvaluation.getId());
this.remove(new LambdaQueryWrapper<DepartAbilityEvaluation>()
.eq(DepartAbilityEvaluation::getAnnualId, evaluation.getAnnualId())
.eq(DepartAbilityEvaluation::getDepetId, evaluation.getDepetId())
);
}
List<PersonalAbilityEvaluation> abilityEvaluationList = iPersonalAbilityEvaluationService.list(new LambdaQueryWrapper<PersonalAbilityEvaluation>()
.eq(PersonalAbilityEvaluation::getAnnualId, departAbilityEvaluation.getAnnualId())
.eq(PersonalAbilityEvaluation::getDepetId, departAbilityEvaluation.getDepetId())
.groupBy(PersonalAbilityEvaluation::getCapacityId)
);
double sum4Soc1 = 0;
double sum4Soc2 = 0;
double sum4Soc3 = 0;
double sum4Soc4 = 0;
double sum4Soc5 = 0;
double sum4Soc6 = 0;
double sum4Soc7 = 0;
double sum4Soc8 = 0;
double sum4Soc9 = 0;
double sum4Soc10 = 0;
double sum4Soc11 = 0;
double sum4Soc12 = 0;
List<DepartAbilityEvaluation> saveList = new LinkedList<>();
if (!ObjectUtils.isEmpty(abilityEvaluationList)) {
sum4Soc1 = abilityEvaluationList.stream().mapToDouble(b -> b.getSoc1()).sum();
sum4Soc2 = abilityEvaluationList.stream().mapToDouble(b -> b.getSoc2()).sum();
sum4Soc3 = abilityEvaluationList.stream().mapToDouble(b -> b.getSoc3()).sum();
sum4Soc4 = abilityEvaluationList.stream().mapToDouble(b -> b.getSoc4()).sum();
sum4Soc5 = abilityEvaluationList.stream().mapToDouble(b -> b.getSoc5()).sum();
sum4Soc6 = abilityEvaluationList.stream().mapToDouble(b -> b.getSoc6()).sum();
sum4Soc7 = abilityEvaluationList.stream().mapToDouble(b -> b.getSoc7()).sum();
sum4Soc8 = abilityEvaluationList.stream().mapToDouble(b -> b.getSoc8()).sum();
sum4Soc9 = abilityEvaluationList.stream().mapToDouble(b -> b.getSoc9()).sum();
sum4Soc10 = abilityEvaluationList.stream().mapToDouble(b -> b.getSoc10()).sum();
sum4Soc11 = abilityEvaluationList.stream().mapToDouble(b -> b.getSoc11()).sum();
sum4Soc12 = abilityEvaluationList.stream().mapToDouble(b -> b.getSoc12()).sum();
abilityEvaluationList.stream().forEach(e -> {
DepartAbilityEvaluation bean = new DepartAbilityEvaluation();
Basicsskill basicsskill = iBasicsskillService.getById(e.getCapacityId());
bean.setCapacityId(e.getCapacityId());
bean.setCapacityName(basicsskill.getName());
bean.setValue(abilityEvaluationList.stream().mapToDouble(b -> b.getValue()).sum());
bean.setCreateTime(new Date());
saveList.add(bean);
});
}
departAbilityEvaluation.setSoc1(sum4Soc1);
departAbilityEvaluation.setSoc2(sum4Soc2);
departAbilityEvaluation.setSoc3(sum4Soc3);
departAbilityEvaluation.setSoc4(sum4Soc4);
departAbilityEvaluation.setSoc5(sum4Soc5);
departAbilityEvaluation.setSoc6(sum4Soc6);
departAbilityEvaluation.setSoc7(sum4Soc7);
departAbilityEvaluation.setSoc8(sum4Soc8);
departAbilityEvaluation.setSoc9(sum4Soc9);
departAbilityEvaluation.setSoc10(sum4Soc10);
departAbilityEvaluation.setSoc11(sum4Soc11);
departAbilityEvaluation.setSoc12(sum4Soc12);
//id不为空,院系的某一年度已汇总过,重新汇算
if (StringUtils.isNotBlank(departAbilityEvaluation.getId())) {
departAbilityEvaluation.setUpdateTime(new Date());
this.updateById(departAbilityEvaluation);
} else {
//首次汇总
departAbilityEvaluation.setCreateTime(new Date());
this.save(departAbilityEvaluation);
}
this.saveBatch(saveList);
}
}

@ -18,8 +18,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils;
import java.util.LinkedList;
import java.util.List;
import java.util.*;
import java.util.stream.Collectors;
/**
@ -45,73 +44,56 @@ public class PersonalAbilityEvaluationCollectServiceImpl extends ServiceImpl<Per
private ISysUserService iSysUserService;
/**
* @description: 每次先删除然后再汇总本次项目下所有参赛者的个人能力量化
* @param: [projectId]
* @return: void
* @author: z.h.c
* @date: 23/11/10 08:11
* @Title: batchSave
* @Description:
* @Params: [projectId]
* @Return: void
* @Author: z.h.c
* @Date: 2023/11/17 15:49
*/
@Transactional(rollbackFor = Exception.class)
@Override
public void batchSave(String projectId) {
//删除该项目下所有人的能力量化汇总数据
this.remove(new LambdaQueryWrapper<PersonalAbilityEvaluationCollect>()
List<PersonalAbilityEvaluationCollect> evaluationCollects = this.list(new LambdaQueryWrapper<PersonalAbilityEvaluationCollect>()
.eq(PersonalAbilityEvaluationCollect::getAnnualCompP, projectId));
//该项目下参赛者们学号列表
Set<String> workNoSet = evaluationCollects.stream().map(en -> en.getWorkOn()).collect(Collectors.toSet());
//删除该项目下参赛者们的能力量化汇总数据,用于重新汇总
this.remove(new LambdaQueryWrapper<PersonalAbilityEvaluationCollect>()
.in(PersonalAbilityEvaluationCollect::getWorkOn, workNoSet));
List<PersonalAbilityEvaluationCollect> saveList = new LinkedList<>();
//该项目,本次新增的个人能力数据
List<PersonalAbilityEvaluation> evaluationList = iPersonalAbilityEvaluationService.list(new LambdaQueryWrapper<PersonalAbilityEvaluation>()
.eq(PersonalAbilityEvaluation::getAnnualCompP, projectId));
// 报名编号列表,要重新汇总的个人能力
List<String> enrollCodeList = evaluationList.stream().map(b -> b.getEnrollCode()).collect(Collectors.toList());
if (!ObjectUtils.isEmpty(enrollCodeList)) {
for (String enrollCode : enrollCodeList) {
//查询每个人的个人能力数据,用于重新汇总
List<PersonalAbilityEvaluation> list4UserAbilityEvaluation = iPersonalAbilityEvaluationService.list(new LambdaQueryWrapper<PersonalAbilityEvaluation>()
.eq(PersonalAbilityEvaluation::getEnrollCode, enrollCode));
if (!ObjectUtils.isEmpty(list4UserAbilityEvaluation)) {
double sum4Soc1 = list4UserAbilityEvaluation.stream().mapToDouble(b -> b.getSoc1()).sum();
double sum4Soc2 = list4UserAbilityEvaluation.stream().mapToDouble(b -> b.getSoc2()).sum();
double sum4Soc3 = list4UserAbilityEvaluation.stream().mapToDouble(b -> b.getSoc3()).sum();
double sum4Soc4 = list4UserAbilityEvaluation.stream().mapToDouble(b -> b.getSoc4()).sum();
double sum4Soc5 = list4UserAbilityEvaluation.stream().mapToDouble(b -> b.getSoc5()).sum();
double sum4Soc6 = list4UserAbilityEvaluation.stream().mapToDouble(b -> b.getSoc6()).sum();
double sum4Soc7 = list4UserAbilityEvaluation.stream().mapToDouble(b -> b.getSoc7()).sum();
double sum4Soc8 = list4UserAbilityEvaluation.stream().mapToDouble(b -> b.getSoc8()).sum();
double sum4Soc9 = list4UserAbilityEvaluation.stream().mapToDouble(b -> b.getSoc9()).sum();
double sum4Soc10 = list4UserAbilityEvaluation.stream().mapToDouble(b -> b.getSoc10()).sum();
double sum4Soc11 = list4UserAbilityEvaluation.stream().mapToDouble(b -> b.getSoc11()).sum();
double sum4Soc12 = list4UserAbilityEvaluation.stream().mapToDouble(b -> b.getSoc12()).sum();
PersonalAbilityEvaluationCollect person = new PersonalAbilityEvaluationCollect();
person.setAnnualCompP(projectId);
TeamManagement management = iTeamManagementService.getOne(new LambdaQueryWrapper<TeamManagement>()
.eq(TeamManagement::getEnrollCode, enrollCode));
SysUser sysUser = iSysUserService.getById(management.getUserId());
person.setWorkOn(sysUser.getWorkNo());
person.setName(sysUser.getRealname());
SysDepart sysDepart = iSysDepartService.getById(sysUser.getOrgCode());
person.setDepetId(sysDepart.getId());
person.setSoc1(sum4Soc1);
person.setSoc2(sum4Soc2);
person.setSoc3(sum4Soc3);
person.setSoc4(sum4Soc4);
person.setSoc5(sum4Soc5);
person.setSoc6(sum4Soc6);
person.setSoc7(sum4Soc7);
person.setSoc8(sum4Soc8);
person.setSoc9(sum4Soc9);
person.setSoc10(sum4Soc10);
person.setSoc11(sum4Soc11);
person.setSoc12(sum4Soc12);
saveList.add(person);
}
}
this.saveBatch(saveList);
}
//根据学号重新汇总
Optional.ofNullable(workNoSet).orElse(new LinkedHashSet<>()).stream().forEach(workNo -> {
// TeamManagement management = iTeamManagementService.getOne(new LambdaQueryWrapper<TeamManagement>()
// .eq(TeamManagement::getEnrollCode, enrollCode));
SysUser sysUser = iSysUserService.getOne(new LambdaQueryWrapper<SysUser>().eq(SysUser::getWorkNo, workNo));
SysDepart sysDepart = iSysDepartService.getById(sysUser.getOrgCode());
//每个学生同一类型能力指标分组查询
List<PersonalAbilityEvaluation> evaluationList4User = iPersonalAbilityEvaluationService.list(new LambdaQueryWrapper<PersonalAbilityEvaluation>()
.eq(PersonalAbilityEvaluation::getWorkOn, workNo)
.groupBy(PersonalAbilityEvaluation::getCapacityId));
Optional.ofNullable(evaluationList4User).orElse(new LinkedList<>()).stream().forEach(en -> {
PersonalAbilityEvaluationCollect person = new PersonalAbilityEvaluationCollect();
person.setAnnualCompP(projectId);
person.setDepetId(sysDepart.getId());
person.setWorkOn(workNo);
person.setName(sysUser.getRealname());
double sum = evaluationList4User.stream().mapToDouble(e -> e.getValue()).sum();
person.setValue(sum);
person.setCapacityId(en.getCapacityId());
person.setCapacityName(en.getCapacityName());
saveList.add(person);
});
});
this.saveBatch(saveList);
}
}

@ -16,6 +16,8 @@ import org.jeecg.modules.demo.annualcompetitionprojectregistration.entity.TeamMa
import org.jeecg.modules.demo.annualcompetitionprojectregistration.service.ITeamManagementService;
import org.jeecg.modules.demo.awardpersion.entity.AwardPersion;
import org.jeecg.modules.demo.awardpersion.service.IAwardPersionService;
import org.jeecg.modules.demo.basicsskill.entity.Basicsskill;
import org.jeecg.modules.demo.basicsskill.service.IBasicsskillService;
import org.jeecg.modules.demo.compskill.entity.Compskill;
import org.jeecg.modules.demo.compskill.service.ICompskillService;
import org.jeecg.modules.demo.scorepersion.entity.ScorePersion;
@ -27,7 +29,6 @@ import org.jeecg.modules.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
import org.springframework.util.ObjectUtils;
import java.util.LinkedList;
@ -55,6 +56,9 @@ public class PersonalAbilityEvaluationServiceImpl extends ServiceImpl<PersonalAb
@Autowired
private ICompskillService iCompskillService;
@Autowired
private IBasicsskillService iBasicsskillService;
@Autowired
private ISysDepartService iSysDepartService;
@ -72,80 +76,8 @@ public class PersonalAbilityEvaluationServiceImpl extends ServiceImpl<PersonalAb
private static final Integer ONE_HUNDRED = 100;
/**
* @description: 只统计已获奖的个人能力依赖获奖管理数据列表
* @param: [param]
* @return: void
* @author: z.h.c
* @date: 23/11/8 16:02
*/
@Override
public void personalAbilityEvaluation(PersonalAbilityEvaluation param) {
// //年度比赛项目id
// String projectId = param.getAnnualCompP();
// String enrollCode = param.getEnrollCode();
// Assert.notNull(projectId, "年度比赛项目id为空");
// Assert.notNull(enrollCode, "报名编号为空");
//
// //年度比赛项目
// AnnualCompPoint annualCompPoint = iAnnualCompPointService.getById(projectId);
// Assert.notNull(annualCompPoint, "年度比赛项目不存在");
//
// //年度比赛
// AnnualComp annualComp = iAnnualCompService.getById(annualCompPoint.getAnnualCompId());
// if (ObjectUtils.isEmpty(annualComp)) return;
//
// TeamManagement management = iTeamManagementService.getOne(new LambdaQueryWrapper<TeamManagement>()
// .eq(TeamManagement::getEnrollCode, enrollCode));
// if (ObjectUtils.isEmpty(management)) return;
//
//
// //根据年度比赛项目和报名编号查询 查询个人获奖表
// AwardPersion awardPersion = iAwardPersionService.getOne(new LambdaQueryWrapper<AwardPersion>()
// .eq(AwardPersion::getAnnualCompP, projectId)
// .eq(AwardPersion::getEnrollCode, enrollCode)
// .last("limit 1"));
//
// if (ObjectUtils.isEmpty(awardPersion)) return;
//
// //查询获奖个人对应的分数
// ScorePersion scorePersion = iScorePersionService.getOne(new LambdaQueryWrapper<ScorePersion>()
// .eq(ScorePersion::getEnrollCode, enrollCode)
// .eq(ScorePersion::getAnnualCompP, projectId)
// .last("limit 1"));
// if (ObjectUtils.isEmpty(scorePersion)) return;
//
// String score = scorePersion.getScore();
// if (StringUtils.isBlank(score)) return;
//
// Double score_d = Double.valueOf(score);
//
// PersonalAbilityEvaluation person = new PersonalAbilityEvaluation();
// person.setAnnualId(annualComp.getAnnualid());
// person.setAnnualCompId(annualCompPoint.getAnnualCompId());
// person.setAnnualCompP(projectId);
// SysUser sysUser = iSysUserService.getById(management.getUserId());
// person.setWorkOn(sysUser.getWorkNo());
// person.setName(sysUser.getRealname());
// SysDepart sysDepart = iSysDepartService.getById(sysUser.getOrgCode());
// person.setDepetId(sysDepart.getId());
//
// //查询项目各能力权值
// List<Compskill> compskillList = iCompskillService.list(new LambdaQueryWrapper<Compskill>().eq(Compskill::getAnnucompid, projectId));
// if (!ObjectUtils.isEmpty(compskillList)) {
// //计算能力量化各类指标 能力量化值 = 直接按项目的能力权值和项目奖项得分算
// //能力量化值 = 项目得分*项目的能力权值/100
// this.convertScore(compskillList, person, score_d);
// }
// this.save(person);
}
/**
* @description:
* 1在年度项目管理操作列添加个人能力评价操作
* @description: 1在年度项目管理操作列添加个人能力评价操作
* 2个人能力评价可以重复操作
* 3在个人能力评价中自动完成个人能力汇总功能
* 4实现方法每次操作个人能力评价都删除该项目下的个人能力评价数据和个人能力评价汇总数据再重新增加
@ -171,6 +103,10 @@ public class PersonalAbilityEvaluationServiceImpl extends ServiceImpl<PersonalAb
AnnualCompPoint annualCompPoint = iAnnualCompPointService.getById(projectId);
if (ObjectUtils.isEmpty(annualCompPoint)) return;
//查询项目各能力权值
List<Compskill> compskillList = iCompskillService.list(new LambdaQueryWrapper<Compskill>().eq(Compskill::getAnnucompid, projectId));
if (ObjectUtils.isEmpty(compskillList)) return;
//根据年度比赛项目查询个人获奖表
List<AwardPersion> awardPersionList = iAwardPersionService.list(new LambdaQueryWrapper<AwardPersion>().eq(AwardPersion::getAnnualCompP, projectId));
@ -183,26 +119,31 @@ public class PersonalAbilityEvaluationServiceImpl extends ServiceImpl<PersonalAb
.last("limit 1"));
if (!ObjectUtils.isEmpty(scorePersion) && StringUtils.isNotBlank(scorePersion.getScore())) {
PersonalAbilityEvaluation person = new PersonalAbilityEvaluation();
person.setAnnualId(annualComp.getAnnualid());
person.setAnnualCompId(annualCompPoint.getAnnualCompId());
person.setAnnualCompP(projectId);
TeamManagement management = iTeamManagementService.getOne(new LambdaQueryWrapper<TeamManagement>()
.eq(TeamManagement::getEnrollCode, e.getEnrollCode()));
SysUser sysUser = iSysUserService.getById(management.getUserId());
person.setWorkOn(sysUser.getWorkNo());
person.setName(sysUser.getRealname());
SysDepart sysDepart = iSysDepartService.getById(sysUser.getOrgCode());
person.setDepetId(sysDepart.getId());
//查询项目各能力权值
List<Compskill> compskillList = iCompskillService.list(new LambdaQueryWrapper<Compskill>().eq(Compskill::getAnnucompid, projectId));
if (!ObjectUtils.isEmpty(compskillList)) {
//遍历每一类能力指标
compskillList.forEach(compskill -> {
PersonalAbilityEvaluation person = new PersonalAbilityEvaluation();
person.setAnnualId(annualComp.getAnnualid());
person.setAnnualCompId(annualCompPoint.getAnnualCompId());
person.setAnnualCompP(projectId);
person.setWorkOn(sysUser.getWorkNo());
person.setName(sysUser.getRealname());
person.setDepetId(sysDepart.getId());
Basicsskill basicsskill = iBasicsskillService.getById(compskill.getCapacityid());
person.setCapacityId(compskill.getCapacityid());
person.setCapacityName(basicsskill.getName());
//计算能力量化各类指标 能力量化值 = 直接按项目的能力权值和项目奖项得分算
//能力量化值 = 项目得分*项目的能力权值/100
this.convertScore(compskillList, person, Double.valueOf(scorePersion.getScore()));
}
saveList.add(person);
this.convertScore(compskill.getWeight(), person, Double.valueOf(scorePersion.getScore()));
saveList.add(person);
});
}
});
@ -217,46 +158,8 @@ public class PersonalAbilityEvaluationServiceImpl extends ServiceImpl<PersonalAb
}
PersonalAbilityEvaluation convertScore(List<Compskill> compskillList, PersonalAbilityEvaluation person, final double score_d) {
for (int i = 1; i <= compskillList.size(); i++) {
if (i == 1) {
person.setSoc1(ComputeUtils.mul(score_d, ComputeUtils.div2(compskillList.get(i - 1).getWeight().doubleValue(), ONE_HUNDRED)));
}
if (i == 2) {
person.setSoc2(ComputeUtils.mul(score_d, ComputeUtils.div2(compskillList.get(i - 1).getWeight().doubleValue(), ONE_HUNDRED)));
}
if (i == 3) {
person.setSoc3(ComputeUtils.mul(score_d, ComputeUtils.div2(compskillList.get(i - 1).getWeight().doubleValue(), ONE_HUNDRED)));
}
if (i == 4) {
person.setSoc4(ComputeUtils.mul(score_d, ComputeUtils.div2(compskillList.get(i - 1).getWeight().doubleValue(), ONE_HUNDRED)));
}
if (i == 5) {
person.setSoc5(ComputeUtils.mul(score_d, ComputeUtils.div2(compskillList.get(i - 1).getWeight().doubleValue(), ONE_HUNDRED)));
}
if (i == 6) {
person.setSoc6(ComputeUtils.mul(score_d, ComputeUtils.div2(compskillList.get(i - 1).getWeight().doubleValue(), ONE_HUNDRED)));
}
if (i == 7) {
person.setSoc7(ComputeUtils.mul(score_d, ComputeUtils.div2(compskillList.get(i - 1).getWeight().doubleValue(), ONE_HUNDRED)));
}
if (i == 8) {
person.setSoc8(ComputeUtils.mul(score_d, ComputeUtils.div2(compskillList.get(i - 1).getWeight().doubleValue(), ONE_HUNDRED)));
}
if (i == 9) {
person.setSoc9(ComputeUtils.mul(score_d, ComputeUtils.div2(compskillList.get(i - 1).getWeight().doubleValue(), ONE_HUNDRED)));
}
if (i == 10) {
person.setSoc10(ComputeUtils.mul(score_d, ComputeUtils.div2(compskillList.get(i - 1).getWeight().doubleValue(), ONE_HUNDRED)));
}
if (i == 11) {
person.setSoc11(ComputeUtils.mul(score_d, ComputeUtils.div2(compskillList.get(i - 1).getWeight().doubleValue(), ONE_HUNDRED)));
}
if (i == 12) {
person.setSoc12(ComputeUtils.mul(score_d, ComputeUtils.div2(compskillList.get(i - 1).getWeight().doubleValue(), ONE_HUNDRED)));
}
}
PersonalAbilityEvaluation convertScore(double weight, PersonalAbilityEvaluation person, final double score_d) {
person.setValue(ComputeUtils.mul(score_d, ComputeUtils.div2(weight, ONE_HUNDRED)));
return person;
}
}

@ -12,65 +12,75 @@ export const columns: BasicColumn[] = [
dataIndex: 'annualId_dictText'
},
{
title: '能力1',
align: "center",
dataIndex: 'soc1'
},
{
title: '能力2',
align: "center",
dataIndex: 'soc2'
},
{
title: '能力3',
align: "center",
dataIndex: 'soc3'
},
{
title: '能力4',
align: "center",
dataIndex: 'soc4'
},
{
title: '能力5',
align: "center",
dataIndex: 'soc5'
},
{
title: '能力6',
align: "center",
dataIndex: 'soc6'
},
{
title: '能力7',
align: "center",
dataIndex: 'soc7'
},
{
title: '能力8',
align: "center",
dataIndex: 'soc8'
},
{
title: '能力9',
align: "center",
dataIndex: 'soc9'
},
{
title: '能力10',
align: "center",
dataIndex: 'soc10'
},
{
title: '能力11',
align: "center",
dataIndex: 'soc11'
},
{
title: '能力12',
align: "center",
dataIndex: 'soc12'
},
title: '能力名称',
align:"center",
dataIndex: 'capacityName'
},
{
title: '能力值',
align:"center",
dataIndex: 'value'
},
// {
// title: '能力1',
// align: "center",
// dataIndex: 'soc1'
// },
// {
// title: '能力2',
// align: "center",
// dataIndex: 'soc2'
// },
// {
// title: '能力3',
// align: "center",
// dataIndex: 'soc3'
// },
// {
// title: '能力4',
// align: "center",
// dataIndex: 'soc4'
// },
// {
// title: '能力5',
// align: "center",
// dataIndex: 'soc5'
// },
// {
// title: '能力6',
// align: "center",
// dataIndex: 'soc6'
// },
// {
// title: '能力7',
// align: "center",
// dataIndex: 'soc7'
// },
// {
// title: '能力8',
// align: "center",
// dataIndex: 'soc8'
// },
// {
// title: '能力9',
// align: "center",
// dataIndex: 'soc9'
// },
// {
// title: '能力10',
// align: "center",
// dataIndex: 'soc10'
// },
// {
// title: '能力11',
// align: "center",
// dataIndex: 'soc11'
// },
// {
// title: '能力12',
// align: "center",
// dataIndex: 'soc12'
// },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
@ -122,65 +132,81 @@ export const formSchema: FormSchema[] = [
},
},
{
label: '能力1',
field: 'soc1',
component: 'InputNumber',
},
{
label: '能力2',
field: 'soc2',
component: 'InputNumber',
},
{
label: '能力3',
field: 'soc3',
component: 'InputNumber',
},
{
label: '能力4',
field: 'soc4',
component: 'InputNumber',
},
{
label: '能力5',
field: 'soc5',
component: 'InputNumber',
},
{
label: '能力6',
field: 'soc6',
component: 'InputNumber',
},
{
label: '能力7',
field: 'soc7',
component: 'InputNumber',
},
{
label: '能力8',
field: 'soc8',
component: 'InputNumber',
},
{
label: '能力9',
field: 'soc9',
component: 'InputNumber',
},
{
label: '能力10',
field: 'soc10',
component: 'InputNumber',
},
{
label: '能力11',
field: 'soc11',
component: 'InputNumber',
label: '能力名称',
field: 'capacityName',
component: 'Input',
componentProps:{
disabled: true,
}
},
{
label: '能力12',
field: 'soc12',
label: '能力值',
field: 'value',
component: 'InputNumber',
},
componentProps:{
disabled: true,
}
},
// {
// label: '能力1',
// field: 'soc1',
// component: 'InputNumber',
// },
// {
// label: '能力2',
// field: 'soc2',
// component: 'InputNumber',
// },
// {
// label: '能力3',
// field: 'soc3',
// component: 'InputNumber',
// },
// {
// label: '能力4',
// field: 'soc4',
// component: 'InputNumber',
// },
// {
// label: '能力5',
// field: 'soc5',
// component: 'InputNumber',
// },
// {
// label: '能力6',
// field: 'soc6',
// component: 'InputNumber',
// },
// {
// label: '能力7',
// field: 'soc7',
// component: 'InputNumber',
// },
// {
// label: '能力8',
// field: 'soc8',
// component: 'InputNumber',
// },
// {
// label: '能力9',
// field: 'soc9',
// component: 'InputNumber',
// },
// {
// label: '能力10',
// field: 'soc10',
// component: 'InputNumber',
// },
// {
// label: '能力11',
// field: 'soc11',
// component: 'InputNumber',
// },
// {
// label: '能力12',
// field: 'soc12',
// component: 'InputNumber',
// },
// TODO 主键隐藏字段,目前写死为ID
{

@ -17,65 +17,75 @@ export const columns: BasicColumn[] = [
dataIndex: 'name'
},
{
title: '能力1',
align: "center",
dataIndex: 'soc1'
},
{
title: '能力2',
align: "center",
dataIndex: 'soc2'
},
{
title: '能力3',
align: "center",
dataIndex: 'soc3'
},
{
title: '能力4',
align: "center",
dataIndex: 'soc4'
},
{
title: '能力5',
align: "center",
dataIndex: 'soc5'
},
{
title: '能力6',
align: "center",
dataIndex: 'soc6'
},
{
title: '能力7',
align: "center",
dataIndex: 'soc7'
},
{
title: '能力8',
align: "center",
dataIndex: 'soc8'
},
{
title: '能力9',
align: "center",
dataIndex: 'soc9'
},
{
title: '能力10',
align: "center",
dataIndex: 'soc10'
},
{
title: '能力11',
align: "center",
dataIndex: 'soc11'
},
{
title: '能力12',
align: "center",
dataIndex: 'soc12'
},
title: '能力名称',
align:"center",
dataIndex: 'capacityName'
},
{
title: '能力值',
align:"center",
dataIndex: 'value'
},
// {
// title: '能力1',
// align: "center",
// dataIndex: 'soc1'
// },
// {
// title: '能力2',
// align: "center",
// dataIndex: 'soc2'
// },
// {
// title: '能力3',
// align: "center",
// dataIndex: 'soc3'
// },
// {
// title: '能力4',
// align: "center",
// dataIndex: 'soc4'
// },
// {
// title: '能力5',
// align: "center",
// dataIndex: 'soc5'
// },
// {
// title: '能力6',
// align: "center",
// dataIndex: 'soc6'
// },
// {
// title: '能力7',
// align: "center",
// dataIndex: 'soc7'
// },
// {
// title: '能力8',
// align: "center",
// dataIndex: 'soc8'
// },
// {
// title: '能力9',
// align: "center",
// dataIndex: 'soc9'
// },
// {
// title: '能力10',
// align: "center",
// dataIndex: 'soc10'
// },
// {
// title: '能力11',
// align: "center",
// dataIndex: 'soc11'
// },
// {
// title: '能力12',
// align: "center",
// dataIndex: 'soc12'
// },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
@ -122,65 +132,75 @@ export const formSchema: FormSchema[] = [
component: 'Input',
},
{
label: '能力1',
field: 'soc1',
component: 'InputNumber',
},
{
label: '能力2',
field: 'soc2',
component: 'InputNumber',
},
{
label: '能力3',
field: 'soc3',
component: 'InputNumber',
},
{
label: '能力4',
field: 'soc4',
component: 'InputNumber',
},
{
label: '能力5',
field: 'soc5',
component: 'InputNumber',
},
{
label: '能力6',
field: 'soc6',
component: 'InputNumber',
},
{
label: '能力7',
field: 'soc7',
component: 'InputNumber',
},
{
label: '能力8',
field: 'soc8',
component: 'InputNumber',
},
{
label: '能力9',
field: 'soc9',
component: 'InputNumber',
},
{
label: '能力10',
field: 'soc10',
component: 'InputNumber',
},
{
label: '能力11',
field: 'soc11',
component: 'InputNumber',
label: '能力名称',
field: 'capacityName',
component: 'Input',
},
{
label: '能力12',
field: 'soc12',
label: '能力值',
field: 'value',
component: 'InputNumber',
},
// {
// label: '能力1',
// field: 'soc1',
// component: 'InputNumber',
// },
// {
// label: '能力2',
// field: 'soc2',
// component: 'InputNumber',
// },
// {
// label: '能力3',
// field: 'soc3',
// component: 'InputNumber',
// },
// {
// label: '能力4',
// field: 'soc4',
// component: 'InputNumber',
// },
// {
// label: '能力5',
// field: 'soc5',
// component: 'InputNumber',
// },
// {
// label: '能力6',
// field: 'soc6',
// component: 'InputNumber',
// },
// {
// label: '能力7',
// field: 'soc7',
// component: 'InputNumber',
// },
// {
// label: '能力8',
// field: 'soc8',
// component: 'InputNumber',
// },
// {
// label: '能力9',
// field: 'soc9',
// component: 'InputNumber',
// },
// {
// label: '能力10',
// field: 'soc10',
// component: 'InputNumber',
// },
// {
// label: '能力11',
// field: 'soc11',
// component: 'InputNumber',
// },
// {
// label: '能力12',
// field: 'soc12',
// component: 'InputNumber',
// },
// TODO 主键隐藏字段,目前写死为ID
{

@ -35,65 +35,75 @@ export const columns: BasicColumn[] = [
dataIndex: 'name'
},
{
title: '能力1',
title: '能力名称',
align:"center",
dataIndex: 'soc1'
dataIndex: 'capacityName'
},
{
title: '能力2',
title: '能力',
align:"center",
dataIndex: 'soc2'
},
{
title: '能力3',
align:"center",
dataIndex: 'soc3'
},
{
title: '能力4',
align:"center",
dataIndex: 'soc4'
},
{
title: '能力5',
align:"center",
dataIndex: 'soc5'
},
{
title: '能力6',
align:"center",
dataIndex: 'soc6'
},
{
title: '能力7',
align:"center",
dataIndex: 'soc7'
},
{
title: '能力8',
align:"center",
dataIndex: 'soc8'
},
{
title: '能力9',
align:"center",
dataIndex: 'soc9'
},
{
title: '能力10',
align:"center",
dataIndex: 'soc10'
},
{
title: '能力11',
align:"center",
dataIndex: 'soc11'
},
{
title: '能力12',
align:"center",
dataIndex: 'soc12'
},
dataIndex: 'value'
},
// {
// title: '能力1',
// align:"center",
// dataIndex: 'soc1'
// },
// {
// title: '能力2',
// align:"center",
// dataIndex: 'soc2'
// },
// {
// title: '能力3',
// align:"center",
// dataIndex: 'soc3'
// },
// {
// title: '能力4',
// align:"center",
// dataIndex: 'soc4'
// },
// {
// title: '能力5',
// align:"center",
// dataIndex: 'soc5'
// },
// {
// title: '能力6',
// align:"center",
// dataIndex: 'soc6'
// },
// {
// title: '能力7',
// align:"center",
// dataIndex: 'soc7'
// },
// {
// title: '能力8',
// align:"center",
// dataIndex: 'soc8'
// },
// {
// title: '能力9',
// align:"center",
// dataIndex: 'soc9'
// },
// {
// title: '能力10',
// align:"center",
// dataIndex: 'soc10'
// },
// {
// title: '能力11',
// align:"center",
// dataIndex: 'soc11'
// },
// {
// title: '能力12',
// align:"center",
// dataIndex: 'soc12'
// },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
@ -182,65 +192,65 @@ export const formSchema: FormSchema[] = [
component: 'Input',
},
{
label: '能力1',
field: 'soc1',
component: 'InputNumber',
},
{
label: '能力2',
field: 'soc2',
component: 'InputNumber',
},
{
label: '能力3',
field: 'soc3',
component: 'InputNumber',
},
{
label: '能力4',
field: 'soc4',
component: 'InputNumber',
},
{
label: '能力5',
field: 'soc5',
component: 'InputNumber',
},
{
label: '能力6',
field: 'soc6',
component: 'InputNumber',
},
{
label: '能力7',
field: 'soc7',
component: 'InputNumber',
},
{
label: '能力8',
field: 'soc8',
component: 'InputNumber',
},
{
label: '能力9',
field: 'soc9',
component: 'InputNumber',
},
{
label: '能力10',
field: 'soc10',
component: 'InputNumber',
},
{
label: '能力11',
field: 'soc11',
component: 'InputNumber',
label: '能力名称',
field: 'capacityName',
component: 'Input',
},
{
label: '能力12',
field: 'soc12',
label: '能力值',
field: 'value',
component: 'InputNumber',
},
// {
// label: '能力3',
// field: 'soc3',
// component: 'InputNumber',
// },
// {
// label: '能力4',
// field: 'soc4',
// component: 'InputNumber',
// },
// {
// label: '能力5',
// field: 'soc5',
// component: 'InputNumber',
// },
// {
// label: '能力6',
// field: 'soc6',
// component: 'InputNumber',
// },
// {
// label: '能力7',
// field: 'soc7',
// component: 'InputNumber',
// },
// {
// label: '能力8',
// field: 'soc8',
// component: 'InputNumber',
// },
// {
// label: '能力9',
// field: 'soc9',
// component: 'InputNumber',
// },
// {
// label: '能力10',
// field: 'soc10',
// component: 'InputNumber',
// },
// {
// label: '能力11',
// field: 'soc11',
// component: 'InputNumber',
// },
// {
// label: '能力12',
// field: 'soc12',
// component: 'InputNumber',
// },
// TODO 主键隐藏字段,目前写死为ID
{
label: '',

@ -15,7 +15,7 @@ enum Api {
exportXlsMb = '/awardpersion/awardPersion/exportXlsMb',
queryCompId = '/annualcompgroup/annualCompGroup/queryCompId',
queryOptions = '/awardpersion/awardPersion/queryOptions',
personalAbilityEvaluation = '/abilityEvaluation/personalAbilityEvaluation/personalAbilityEvaluation',
personalAbilityEvaluation = '/abilityEvaluation/personalAbilityEvaluation/personalAbilityEvaluation2',
}

Loading…
Cancel
Save