1、年度积分问题修改 11.23

dev
zhc077 1 year ago
parent 004424b230
commit 78fbce0ccb
  1. 4
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/impl/PersonalAbilityEvaluationCollectServiceImpl.java
  2. 4
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/impl/PersonalAbilityEvaluationServiceImpl.java
  3. 160
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/entity/AnnualCompPoint.java
  4. 57
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualScore/entity/PersonalCompTotalScore.java
  5. 22
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualScore/service/impl/PersonalCompScoreServiceImpl.java
  6. 2
      jeecgboot-vue3-master/src/views/annualCompPoint/committee/AnnualCompPoint.data.ts
  7. 59
      jeecgboot-vue3-master/src/views/annualScore/persoanlCompScore/PersonalCompScore.data.ts
  8. 26
      jeecgboot-vue3-master/src/views/annualScore/personalCompTotalScore/PersonalCompTotalScore.data.ts

@ -73,7 +73,7 @@ public class PersonalAbilityEvaluationCollectServiceImpl extends ServiceImpl<Per
// TeamManagement management = iTeamManagementService.getOne(new LambdaQueryWrapper<TeamManagement>() // TeamManagement management = iTeamManagementService.getOne(new LambdaQueryWrapper<TeamManagement>()
// .eq(TeamManagement::getEnrollCode, enrollCode)); // .eq(TeamManagement::getEnrollCode, enrollCode));
SysUser sysUser = iSysUserService.getOne(new LambdaQueryWrapper<SysUser>().eq(SysUser::getWorkNo, workNo)); SysUser sysUser = iSysUserService.getOne(new LambdaQueryWrapper<SysUser>().eq(SysUser::getWorkNo, workNo));
SysDepart sysDepart = iSysDepartService.getById(sysUser.getOrgCode()); // SysDepart sysDepart = iSysDepartService.getDepartByOrgCode(sysUser.getOrgCode());
//每个学生同一类型能力指标分组查询 //每个学生同一类型能力指标分组查询
List<PersonalAbilityEvaluation> evaluationList4User = iPersonalAbilityEvaluationService.list(new LambdaQueryWrapper<PersonalAbilityEvaluation>() List<PersonalAbilityEvaluation> evaluationList4User = iPersonalAbilityEvaluationService.list(new LambdaQueryWrapper<PersonalAbilityEvaluation>()
@ -82,7 +82,7 @@ public class PersonalAbilityEvaluationCollectServiceImpl extends ServiceImpl<Per
Optional.ofNullable(evaluationList4User).orElse(new LinkedList<>()).stream().forEach(en -> { Optional.ofNullable(evaluationList4User).orElse(new LinkedList<>()).stream().forEach(en -> {
PersonalAbilityEvaluationCollect person = new PersonalAbilityEvaluationCollect(); PersonalAbilityEvaluationCollect person = new PersonalAbilityEvaluationCollect();
person.setAnnualCompP(projectId); person.setAnnualCompP(projectId);
person.setDepetId(sysDepart.getId()); person.setDepetId(sysUser.getDepartIds());
person.setWorkOn(workNo); person.setWorkOn(workNo);
person.setName(sysUser.getRealname()); person.setName(sysUser.getRealname());
double sum = evaluationList4User.stream().mapToDouble(e -> e.getValue()).sum(); double sum = evaluationList4User.stream().mapToDouble(e -> e.getValue()).sum();

@ -123,7 +123,7 @@ public class PersonalAbilityEvaluationServiceImpl extends ServiceImpl<PersonalAb
TeamManagement management = iTeamManagementService.getOne(new LambdaQueryWrapper<TeamManagement>() TeamManagement management = iTeamManagementService.getOne(new LambdaQueryWrapper<TeamManagement>()
.eq(TeamManagement::getEnrollCode, e.getEnrollCode())); .eq(TeamManagement::getEnrollCode, e.getEnrollCode()));
SysUser sysUser = iSysUserService.getById(management.getUserId()); SysUser sysUser = iSysUserService.getById(management.getUserId());
SysDepart sysDepart = iSysDepartService.getById(sysUser.getOrgCode()); // SysDepart sysDepart = iSysDepartService.getDepartByOrgCode(sysUser.getOrgCode());
//遍历每一类能力指标 //遍历每一类能力指标
compskillList.forEach(compskill -> { compskillList.forEach(compskill -> {
@ -133,7 +133,7 @@ public class PersonalAbilityEvaluationServiceImpl extends ServiceImpl<PersonalAb
person.setAnnualCompP(projectId); person.setAnnualCompP(projectId);
person.setWorkOn(sysUser.getWorkNo()); person.setWorkOn(sysUser.getWorkNo());
person.setName(sysUser.getRealname()); person.setName(sysUser.getRealname());
person.setDepetId(sysDepart.getId()); person.setDepetId(sysUser.getDepartIds());
Basicsskill basicsskill = iBasicsskillService.getById(compskill.getCapacityid()); Basicsskill basicsskill = iBasicsskillService.getById(compskill.getCapacityid());
person.setCapacityId(compskill.getCapacityid()); person.setCapacityId(compskill.getCapacityid());

@ -1,22 +1,20 @@
package org.jeecg.modules.demo.annualCompPoint.entity; package org.jeecg.modules.demo.annualCompPoint.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/** /**
* @Description: 年度比赛项目管理 * @Description: 年度比赛项目管理
@ -32,168 +30,240 @@ import lombok.experimental.Accessors;
public class AnnualCompPoint implements Serializable { public class AnnualCompPoint implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/**主键*/ /**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键") @ApiModelProperty(value = "主键")
private String id; private String id;
/**创建人*/ /**
* 创建人
*/
@ApiModelProperty(value = "创建人") @ApiModelProperty(value = "创建人")
private String createBy; private String createBy;
/**创建日期*/ /**
* 创建日期
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期") @ApiModelProperty(value = "创建日期")
private Date createTime; private Date createTime;
/**更新人*/ /**
* 更新人
*/
@ApiModelProperty(value = "更新人") @ApiModelProperty(value = "更新人")
private String updateBy; private String updateBy;
/**更新日期*/ /**
* 更新日期
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期") @ApiModelProperty(value = "更新日期")
private Date updateTime; private Date updateTime;
/**所属部门*/ /**
* 所属部门
*/
@ApiModelProperty(value = "所属部门") @ApiModelProperty(value = "所属部门")
private String sysOrgCode; private String sysOrgCode;
/**年度比赛id*/ /**
* 年度比赛id
*/
@Excel(name = "年度比赛id", width = 15) @Excel(name = "年度比赛id", width = 15)
@Dict(dictTable = "annual_comp", dicCode = "id", dicText = "name") @Dict(dictTable = "annual_comp", dicCode = "id", dicText = "name")
@ApiModelProperty(value = "年度比赛id") @ApiModelProperty(value = "年度比赛id")
private String annualCompId; private String annualCompId;
/**项目名称*/ /**
* 项目名称
*/
@Excel(name = "项目名称", width = 15) @Excel(name = "项目名称", width = 15)
@ApiModelProperty(value = "项目名称") @ApiModelProperty(value = "项目名称")
private String objName; private String objName;
/**简介*/ /**
* 简介
*/
@Excel(name = "简介", width = 15) @Excel(name = "简介", width = 15)
@ApiModelProperty(value = "简介") @ApiModelProperty(value = "简介")
private String introduce; private String introduce;
/**项目层次*/ /**
* 项目层次
*/
@Excel(name = "项目层次", width = 15) @Excel(name = "项目层次", width = 15)
@Dict(dictTable = "obj_level", dicCode = "id", dicText = "level_name") @Dict(dictTable = "obj_level", dicCode = "id", dicText = "level_name")
@ApiModelProperty(value = "项目层次") @ApiModelProperty(value = "项目层次")
private String objLevel; private String objLevel;
/**参与形式*/ /**
* 参与形式
*/
@Excel(name = "参与形式", width = 15) @Excel(name = "参与形式", width = 15)
@ApiModelProperty(value = "参与形式") @ApiModelProperty(value = "参与形式")
private String entryForm; private String entryForm;
/**队伍人数*/ /**
* 队伍人数
*/
@Excel(name = "队伍人数", width = 15) @Excel(name = "队伍人数", width = 15)
@ApiModelProperty(value = "队伍人数") @ApiModelProperty(value = "队伍人数")
private Integer teamNumber; private Integer teamNumber;
/**指导老师人数*/ /**
* 指导老师人数
*/
@Excel(name = "指导老师人数", width = 15) @Excel(name = "指导老师人数", width = 15)
@ApiModelProperty(value = "指导老师人数") @ApiModelProperty(value = "指导老师人数")
private Integer teacherNumber; private Integer teacherNumber;
/**是否需要领队*/ /**
* 是否需要领队
*/
@Excel(name = "是否需要领队", width = 15) @Excel(name = "是否需要领队", width = 15)
@ApiModelProperty(value = "是否需要领队") @ApiModelProperty(value = "是否需要领队")
private String requireLeader; private String requireLeader;
/**是否需要队伍名称*/ /**
* 是否需要队伍名称
*/
@Excel(name = "是否需要队伍名称", width = 15) @Excel(name = "是否需要队伍名称", width = 15)
@ApiModelProperty(value = "是否需要队伍名称") @ApiModelProperty(value = "是否需要队伍名称")
private String requireTeamName; private String requireTeamName;
/**是否报名*/ /**
* 是否报名
*/
@Excel(name = "是否报名", width = 15) @Excel(name = "是否报名", width = 15)
@ApiModelProperty(value = "是否报名") @ApiModelProperty(value = "是否报名")
private String requireApply; private String requireApply;
/**是否选题*/ /**
* 是否选题
*/
@Excel(name = "是否选题", width = 15) @Excel(name = "是否选题", width = 15)
@ApiModelProperty(value = "是否选题") @ApiModelProperty(value = "是否选题")
private String requireTopic; private String requireTopic;
/**是否上传作品*/ /**
* 是否上传作品
*/
@Excel(name = "是否上传作品", width = 15) @Excel(name = "是否上传作品", width = 15)
@ApiModelProperty(value = "是否上传作品") @ApiModelProperty(value = "是否上传作品")
private String requireUploadWorks; private String requireUploadWorks;
/**上传作品限制数量*/ /**
* 上传作品限制数量
*/
@Excel(name = "是否上传作品", width = 15) @Excel(name = "是否上传作品", width = 15)
@ApiModelProperty(value = "上传作品限制数量") @ApiModelProperty(value = "上传作品限制数量")
private Integer workCount; private Integer workCount;
/**上传作品类型*/ /**
* 上传作品类型
*/
@Excel(name = "上传作品类型", width = 15) @Excel(name = "上传作品类型", width = 15)
@ApiModelProperty(value = "上传作品类型") @ApiModelProperty(value = "上传作品类型")
private String uploadWorksType; private String uploadWorksType;
/**是否评分*/ /**
* 是否评分
*/
@Excel(name = "是否评分", width = 15) @Excel(name = "是否评分", width = 15)
@ApiModelProperty(value = "是否评分") @ApiModelProperty(value = "是否评分")
private String requireScore; private String requireScore;
/**开始时间*/ /**
* 开始时间
*/
@Excel(name = "开始时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") @Excel(name = "开始时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "开始时间") @ApiModelProperty(value = "开始时间")
private Date starttime; private Date starttime;
/**结束时间*/ /**
* 结束时间
*/
@Excel(name = "结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") @Excel(name = "结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "结束时间") @ApiModelProperty(value = "结束时间")
private Date endtime; private Date endtime;
/**年度比赛状态*/ /**
* 年度比赛状态
*/
@Excel(name = "年度比赛状态", width = 15) @Excel(name = "年度比赛状态", width = 15)
@ApiModelProperty(value = "年度比赛状态") @ApiModelProperty(value = "年度比赛状态")
private String annualCompState; private String annualCompState;
/**开关*/ /**
* 开关
*/
@Excel(name = "开关", width = 15) @Excel(name = "开关", width = 15)
@ApiModelProperty(value = "开关") @ApiModelProperty(value = "开关")
private String annualCompSwitch; private String annualCompSwitch;
/**驳回信息*/ /**
* 驳回信息
*/
@Excel(name = "驳回信息", width = 15) @Excel(name = "驳回信息", width = 15)
@ApiModelProperty(value = "驳回信息") @ApiModelProperty(value = "驳回信息")
private String backinfo; private String backinfo;
/**报名开始时间*/ /**
* 报名开始时间
*/
@Excel(name = "报名开始时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") @Excel(name = "报名开始时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "报名开始时间") @ApiModelProperty(value = "报名开始时间")
private Date applyStartTime; private Date applyStartTime;
/**报名结束时间*/ /**
* 报名结束时间
*/
@Excel(name = "报名结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") @Excel(name = "报名结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "报名结束时间") @ApiModelProperty(value = "报名结束时间")
private Date applyEndTime; private Date applyEndTime;
/**选题开始时间*/ /**
* 选题开始时间
*/
@Excel(name = "选题开始时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") @Excel(name = "选题开始时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "选题开始时间") @ApiModelProperty(value = "选题开始时间")
private Date topicStartTime; private Date topicStartTime;
/**选题结束时间*/ /**
* 选题结束时间
*/
@Excel(name = "选题结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") @Excel(name = "选题结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "选题结束时间") @ApiModelProperty(value = "选题结束时间")
private Date topicEndTime; private Date topicEndTime;
/**上传作品开始时间*/ /**
* 上传作品开始时间
*/
@Excel(name = "上传作品开始时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") @Excel(name = "上传作品开始时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "上传作品开始时间") @ApiModelProperty(value = "上传作品开始时间")
private Date uploadStartTime; private Date uploadStartTime;
/**上传作品结束时间*/ /**
* 上传作品结束时间
*/
@Excel(name = "上传作品结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") @Excel(name = "上传作品结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "上传作品结束时间") @ApiModelProperty(value = "上传作品结束时间")
private Date uploadEndTime; private Date uploadEndTime;
/**评分开始时间*/ /**
* 评分开始时间
*/
@Excel(name = "评分开始时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") @Excel(name = "评分开始时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "评分开始时间") @ApiModelProperty(value = "评分开始时间")
private Date scoreStartTime; private Date scoreStartTime;
/**评分结束时间*/ /**
* 评分结束时间
*/
@Excel(name = "评分结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") @Excel(name = "评分结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "评分结束时间") @ApiModelProperty(value = "评分结束时间")
private Date scoreEndTime; private Date scoreEndTime;
/**是否成绩汇总*/ /**
* 是否成绩汇总
*/
@Excel(name = "是否成绩汇总", width = 15) @Excel(name = "是否成绩汇总", width = 15)
@ApiModelProperty(value = "是否成绩汇总") @ApiModelProperty(value = "是否成绩汇总")
private Integer isCjhz; private Integer isCjhz;
/**是否评奖*/ /**
* 是否评奖
*/
@Excel(name = "是否评奖", width = 15) @Excel(name = "是否评奖", width = 15)
@ApiModelProperty(value = "是否评奖") @ApiModelProperty(value = "是否评奖")
private Integer isPj; private Integer isPj;

@ -1,22 +1,20 @@
package org.jeecg.modules.demo.annualScore.entity; package org.jeecg.modules.demo.annualScore.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/** /**
* @Description: 个人总积分 * @Description: 个人总积分
@ -32,43 +30,64 @@ import lombok.experimental.Accessors;
public class PersonalCompTotalScore implements Serializable { public class PersonalCompTotalScore implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/**主键*/ /**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键") @ApiModelProperty(value = "主键")
private String id; private String id;
/**创建人*/ /**
* 创建人
*/
@ApiModelProperty(value = "创建人") @ApiModelProperty(value = "创建人")
private String createBy; private String createBy;
/**创建日期*/ /**
* 创建日期
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期") @ApiModelProperty(value = "创建日期")
private Date createTime; private Date createTime;
/**更新人*/ /**
* 更新人
*/
@ApiModelProperty(value = "更新人") @ApiModelProperty(value = "更新人")
private String updateBy; private String updateBy;
/**更新日期*/ /**
* 更新日期
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期") @ApiModelProperty(value = "更新日期")
private Date updateTime; private Date updateTime;
/**院系*/ /**
* 院系
*/
@Excel(name = "院系", width = 15) @Excel(name = "院系", width = 15)
@ApiModelProperty(value = "院系") @ApiModelProperty(value = "院系")
@Dict(dictTable = "sys_depart",dicCode = "id",dicText = "depart_name")
private String depet; private String depet;
/**学号*/ /**
* 学号
*/
@Excel(name = "学号", width = 15) @Excel(name = "学号", width = 15)
@ApiModelProperty(value = "学号") @ApiModelProperty(value = "学号")
private String workOn; private String workOn;
/**姓名*/ /**
* 姓名
*/
@Excel(name = "姓名", width = 15) @Excel(name = "姓名", width = 15)
@ApiModelProperty(value = "姓名") @ApiModelProperty(value = "姓名")
private String name; private String name;
/**总积分*/ /**
* 总积分
*/
@Excel(name = "总积分", width = 15) @Excel(name = "总积分", width = 15)
@ApiModelProperty(value = "总积分") @ApiModelProperty(value = "总积分")
private Double score; private Double score;
/**描述*/ /**
* 描述
*/
@Excel(name = "描述", width = 15) @Excel(name = "描述", width = 15)
@ApiModelProperty(value = "描述") @ApiModelProperty(value = "描述")
private String remark; private String remark;

@ -2,6 +2,7 @@ package org.jeecg.modules.demo.annualScore.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.jeecg.common.util.ComputeUtils; import org.jeecg.common.util.ComputeUtils;
import org.jeecg.modules.demo.annualCompPoint.entity.AnnualCompPoint; import org.jeecg.modules.demo.annualCompPoint.entity.AnnualCompPoint;
@ -42,6 +43,7 @@ import java.util.concurrent.atomic.AtomicReference;
* @Version: V1.0 * @Version: V1.0
*/ */
@Service @Service
@Slf4j
public class PersonalCompScoreServiceImpl extends ServiceImpl<PersonalCompScoreMapper, PersonalCompScore> implements IPersonalCompScoreService { public class PersonalCompScoreServiceImpl extends ServiceImpl<PersonalCompScoreMapper, PersonalCompScore> implements IPersonalCompScoreService {
@Autowired @Autowired
@ -98,22 +100,25 @@ public class PersonalCompScoreServiceImpl extends ServiceImpl<PersonalCompScoreM
List<PersonalCompScore> saveList = new LinkedList<>(); List<PersonalCompScore> saveList = new LinkedList<>();
if (!ObjectUtils.isEmpty(annualCompPoint)) { if (!ObjectUtils.isEmpty(annualCompPoint)) {
//年度比赛项目 奖项设置
AnnualCompAward annualCompAward = iAnnualCompAwardService.getOne(new LambdaQueryWrapper<AnnualCompAward>()
.eq(AnnualCompAward::getAnnucompid, annualCompPoint.getId()));
if (ObjectUtils.isEmpty(annualCompAward)) return;
//1、根据年度比赛项目id,查询获取管理(award_persion)列表,即参赛人员及获取奖项顺序号 //1、根据年度比赛项目id,查询获取管理(award_persion)列表,即参赛人员及获取奖项顺序号
List<AwardPersion> awardPersionList = iAwardPersionService.list(new LambdaQueryWrapper<AwardPersion>() List<AwardPersion> awardPersionList = iAwardPersionService.list(new LambdaQueryWrapper<AwardPersion>()
.eq(AwardPersion::getAnnualCompP, annualCompPoint.getId())); .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 -> { Optional.ofNullable(awardPersionList).orElse(new LinkedList<>()).forEach(en -> {
//2.1、比赛奖项设置 根据awardsort奖项顺序,获取对应的奖项权重值 //2.1、比赛奖项设置 根据awardsort奖项顺序,获取对应的奖项权重值
//奖项顺序与奖项权重值映射关系: wardsort(1:first_weight,2:second_weight,3:third_weight,4:fourth_weight,5:fifth_weight //奖项顺序与奖项权重值映射关系: 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; String weightVal;
switch (en.getAwardsort()) { switch (en.getAwardsort()) {
case 1: case 1:
weightVal = annualCompAward.getFifthWeight(); weightVal = annualCompAward.getFirstWeight();
break; break;
case 2: case 2:
weightVal = annualCompAward.getSecondWeight(); weightVal = annualCompAward.getSecondWeight();
@ -140,6 +145,7 @@ public class PersonalCompScoreServiceImpl extends ServiceImpl<PersonalCompScoreM
if (ObjectUtils.isEmpty(managementList)) return; if (ObjectUtils.isEmpty(managementList)) return;
//3、计算积分 项目分值*项目奖项权重值/100 //3、计算积分 项目分值*项目奖项权重值/100
log.info("***************年度比赛项目-{},项目分值:{},奖项权重值:{}", annualCompPoint.getObjName(), compweight_val, weightVal);
double baseScore = ComputeUtils.mul(compweight_val, ComputeUtils.div2(new Double(weightVal), ONE_HUNDRED)); double baseScore = ComputeUtils.mul(compweight_val, ComputeUtils.div2(new Double(weightVal), ONE_HUNDRED));
AtomicReference<Double> score = new AtomicReference<>((double) 0); AtomicReference<Double> score = new AtomicReference<>((double) 0);
if (StringUtils.equals("Y", entryForm)) { //团队赛 if (StringUtils.equals("Y", entryForm)) { //团队赛
@ -159,8 +165,8 @@ public class PersonalCompScoreServiceImpl extends ServiceImpl<PersonalCompScoreM
SysUser sysUser = iSysUserService.getById(e.getUserId()); SysUser sysUser = iSysUserService.getById(e.getUserId());
bean.setWorkOn(sysUser.getWorkNo()); bean.setWorkOn(sysUser.getWorkNo());
bean.setName(sysUser.getRealname()); bean.setName(sysUser.getRealname());
SysDepart sysDepart = iSysDepartService.getById(sysUser.getOrgCode()); // SysDepart sysDepart = iSysDepartService.getDepartByOrgCode(sysUser.getOrgCode());
bean.setDepet(sysDepart.getId()); bean.setDepet(sysUser.getDepartIds());
bean.setScore(score.get()); bean.setScore(score.get());
saveList.add(bean); saveList.add(bean);
}); });
@ -174,8 +180,8 @@ public class PersonalCompScoreServiceImpl extends ServiceImpl<PersonalCompScoreM
SysUser sysUser = iSysUserService.getById(teamManagement.getUserId()); SysUser sysUser = iSysUserService.getById(teamManagement.getUserId());
bean.setWorkOn(sysUser.getWorkNo()); bean.setWorkOn(sysUser.getWorkNo());
bean.setName(sysUser.getRealname()); bean.setName(sysUser.getRealname());
SysDepart sysDepart = iSysDepartService.getById(sysUser.getOrgCode()); // SysDepart sysDepart = iSysDepartService.getDepartByOrgCode(sysUser.getOrgCode());
bean.setDepet(sysDepart.getId()); bean.setDepet(sysUser.getDepartIds());
bean.setScore(score.get()); bean.setScore(score.get());
saveList.add(bean); saveList.add(bean);
} }

@ -69,6 +69,8 @@ export const columns: BasicColumn[] = [
return '已评分'; return '已评分';
case "9": case "9":
return '已评奖'; return '已评奖';
case "10":
return '个人积分已汇总';
default: default:
return annualCompState.value; return annualCompState.value;
} }

@ -1,11 +1,6 @@
import {BasicColumn, FormSchema} from '/@/components/Table'; import {BasicColumn, FormSchema} from '/@/components/Table';
//列表数据 //列表数据
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{
title: '所属院系',
align: "center",
dataIndex: 'depet_dictText'
},
{ {
title: '年度', title: '年度',
align: "center", align: "center",
@ -22,15 +17,20 @@ export const columns: BasicColumn[] = [
dataIndex: 'annualCompP_dictText' dataIndex: 'annualCompP_dictText'
}, },
{ {
title: '学号', title: '所属院系',
align: "center", align: "center",
dataIndex: 'workOn' dataIndex: 'depet_dictText'
}, },
{ {
title: '姓名', title: '姓名',
align: "center", align: "center",
dataIndex: 'name' dataIndex: 'name'
}, },
{
title: '学号',
align: "center",
dataIndex: 'workOn'
},
{ {
title: '个人积分', title: '个人积分',
align: "center", align: "center",
@ -44,6 +44,24 @@ export const columns: BasicColumn[] = [
]; ];
//查询数据 //查询数据
export const searchFormSchema: FormSchema[] = [ export const searchFormSchema: FormSchema[] = [
{
label: "年度",
field: 'annualId',
component: 'JDictSelectTag',
componentProps: {
dictCode: "annual,annual_name,id"
},
colProps: {span: 6},
},
{
label: "年度比赛项目",
field: 'annualCompP',
component: 'JDictSelectTag',
componentProps: {
dictCode: "annual_comp_point,obj_name,id"
},
colProps: {span: 6},
},
{ {
label: "院系", label: "院系",
field: 'depet', field: 'depet',
@ -56,10 +74,11 @@ export const searchFormSchema: FormSchema[] = [
{ {
label: "学号", label: "学号",
field: 'workOn', field: 'workOn',
component: 'JDictSelectTag', // component: 'JDictSelectTag',
componentProps: { // componentProps: {
dictCode: "sys_user,work_no,work_no" // dictCode: "sys_user,work_no,work_no"
}, // },
component: 'Input',
colProps: {span: 6}, colProps: {span: 6},
}, },
{ {
@ -68,15 +87,6 @@ export const searchFormSchema: FormSchema[] = [
component: 'Input', component: 'Input',
colProps: {span: 6}, colProps: {span: 6},
}, },
{
label: "年度",
field: 'annualId',
component: 'JDictSelectTag',
componentProps: {
dictCode: "annual,annual_name,id"
},
colProps: {span: 6},
},
// { // {
// label: "年度比赛", // label: "年度比赛",
// field: 'annualCompId', // field: 'annualCompId',
@ -86,15 +96,6 @@ export const searchFormSchema: FormSchema[] = [
// }, // },
// colProps: {span: 6}, // colProps: {span: 6},
// }, // },
{
label: "年度比赛项目",
field: 'annualCompP',
component: 'JDictSelectTag',
componentProps: {
dictCode: "annual_comp_point,obj_name,id"
},
colProps: {span: 6},
},
]; ];
//表单数据 //表单数据
export const formSchema: FormSchema[] = [ export const formSchema: FormSchema[] = [

@ -1,23 +1,20 @@
import {BasicColumn} from '/@/components/Table'; import {BasicColumn, FormSchema} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据 //列表数据
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ {
title: '院系', title: '院系',
align: "center", align: "center",
dataIndex: 'depet' dataIndex: 'depet_dictText'
}, },
{ {
title: '学号', title: '姓名',
align: "center", align: "center",
dataIndex: 'workOn' dataIndex: 'name'
}, },
{ {
title: '姓名', title: '学号',
align: "center", align: "center",
dataIndex: 'name' dataIndex: 'workOn'
}, },
{ {
title: '总积分', title: '总积分',
@ -44,11 +41,11 @@ export const searchFormSchema: FormSchema[] = [
{ {
label: "学号", label: "学号",
field: 'workOn', field: 'workOn',
// component: 'Input', component: 'Input',
component: 'JDictSelectTag', // component: 'JDictSelectTag',
componentProps:{ // componentProps:{
dictCode:"sys_user,work_no,work_no" // dictCode:"sys_user,work_no,work_no"
}, // },
colProps: {span: 6}, colProps: {span: 6},
}, },
{ {
@ -93,7 +90,6 @@ export const formSchema: FormSchema[] = [
]; ];
/** /**
* formSchema * formSchema
* @param param * @param param

Loading…
Cancel
Save