diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java index 7fa877a9..ac96dfb2 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java @@ -51,6 +51,7 @@ import org.jeecg.modules.demo.scorepersion.entity.ScorePersion; import org.jeecg.modules.demo.scorepersion.service.IScorePersionService; import org.jeecg.modules.demo.teamseq.entity.TeamSeq; import org.jeecg.modules.demo.teamseq.service.ITeamSeqService; +import org.jeecg.modules.demo.teamseq.vo.TeamSeqVo; import org.jeecg.modules.demo.upfile_persion.entity.UpfilePersion; import org.jeecg.modules.demo.upfile_persion.service.IUpfilePersionService; import org.jeecg.modules.system.entity.SysUser; @@ -188,7 +189,9 @@ public class AnnualCompPointController extends JeecgController()).stream().forEach(point -> { TeamSeq teamSeq = iTeamSeqService.getOne(new LambdaQueryWrapper().eq(TeamSeq::getPointId, point.getId())); if (!ObjectUtils.isEmpty(teamSeq)) { - BeanUtils.copyProperties(teamSeq, point); + TeamSeqVo teamSeqVo = new TeamSeqVo(); + BeanUtils.copyProperties(teamSeq, teamSeqVo); + BeanUtils.copyProperties(teamSeqVo, point); } }); return Result.OK(pageList); @@ -402,12 +405,12 @@ public class AnnualCompPointController extends JeecgController() // .eq(AnnualCompPoint::getAnnualCompId, annualCompId) - .eq(AnnualCompPoint::getId, personalCompScore.getAnnualCompP()) - .eq(AnnualCompPoint::getIsPj, new Integer(1)) + .eq(AnnualCompPoint::getId, personalCompScore.getAnnualCompP()) + .eq(AnnualCompPoint::getIsPj, new Integer(1)) ); List saveList = new LinkedList<>(); @@ -157,7 +157,7 @@ public class PersonalCompScoreServiceImpl extends ServiceImpl score = new AtomicReference<>((double) 0); if (StringUtils.equals("Y", entryForm)) { //团队赛 Optional.ofNullable(managementList).orElse(new ArrayList<>()).forEach(e -> { - // 参与形式是团队时,队长积分*0.5,职员积分*0.2 + /*// 参与形式是团队时,队长积分*0.5,职员积分*0.2 //captain 是否队长 if (StringUtils.equals("0", e.getCaptain())) { score.set(ComputeUtils.mul2(baseScore, ZERO_POINT_FIVE)); } else { score.set(ComputeUtils.mul2(baseScore, ZERO_POINT_TWO)); - } + }*/ + //modify by zhc 8.23 + score.set(ComputeUtils.mul2(baseScore, this.covertVal(annualCompPoint, e))); PersonalCompScore bean = new PersonalCompScore(); bean.setAnnualCompId(annualCompId); bean.setAnnualCompP(annualCompPoint.getId()); @@ -180,7 +182,7 @@ public class PersonalCompScoreServiceImpl extends ServiceImpl().eq(SysDepart::getOrgCode,sysUser.getOrgCode())); + SysDepart sysDepart = iSysDepartService.getOne(new LambdaQueryWrapper().eq(SysDepart::getOrgCode, sysUser.getOrgCode())); bean.setDepet(sysDepart.getId()); bean.setScore(score.get()); saveList.add(bean); @@ -195,7 +197,7 @@ public class PersonalCompScoreServiceImpl extends ServiceImpl().eq(SysDepart::getOrgCode,sysUser.getOrgCode())); + SysDepart sysDepart = iSysDepartService.getOne(new LambdaQueryWrapper().eq(SysDepart::getOrgCode, sysUser.getOrgCode())); bean.setDepet(sysDepart.getId()); bean.setScore(score.get()); saveList.add(bean); @@ -215,4 +217,40 @@ public class PersonalCompScoreServiceImpl extends ServiceImpl impl @Override public void saveOrUpdate4TeamSeq(AnnualCompPoint point) { this.remove(new LambdaQueryWrapper().eq(TeamSeq::getPointId,point.getId())); + TeamSeqVo vo = new TeamSeqVo(); + BeanUtils.copyProperties(point,vo); + vo.setPointId(point.getId()); TeamSeq teamSeq = new TeamSeq(); - BeanUtils.copyProperties(point,teamSeq); - teamSeq.setId(null); - teamSeq.setPointId(point.getId()); + BeanUtils.copyProperties(vo,teamSeq); this.save(teamSeq); } } diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/teamseq/vo/TeamSeqVo.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/teamseq/vo/TeamSeqVo.java new file mode 100644 index 00000000..7d633711 --- /dev/null +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/teamseq/vo/TeamSeqVo.java @@ -0,0 +1,80 @@ +package org.jeecg.modules.demo.teamseq.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.jeecgframework.poi.excel.annotation.Excel; + +/** + * @Description: TODO + * @Author: Z.H.C + * @CreateTime: 2024-08-23 09:24 + * @Version: 1.0 + */ +@Data +public class TeamSeqVo { + + /** + * 年度比赛项目id + */ + @Excel(name = "年度比赛项目id", width = 15) + @ApiModelProperty(value = "年度比赛项目id") + private String pointId; + + + /** + * 第1序号 + */ + @Excel(name = "第1序号", width = 15) + @ApiModelProperty(value = "第1序号") + private Integer teamSeqFirst; + /** + * 第1序号比值 + */ + @Excel(name = "第1序号比值", width = 15) + @ApiModelProperty(value = "第1序号比值") + private Integer teamSeqFirstVal; + + /** + * 第2序号 + */ + @ApiModelProperty(value = "第1序号") + private Integer teamSeqSecond; + /** + * 第2序号比值 + */ + @ApiModelProperty(value = "第2序号比值") + private Integer teamSeqSecondVal; + + /** + * 第3序号 + */ + @ApiModelProperty(value = "第3序号") + private Integer teamSeqThird; + /** + * 第3序号比值 + */ + @ApiModelProperty(value = "第3序号比值") + private Integer teamSeqThirdVal; + + /** + * 第4序号 + */ + @ApiModelProperty(value = "第4序号") + private Integer teamSeqFourth; + /** + * 第4序号比值 + */ + @ApiModelProperty(value = "第4序号比值") + private Integer teamSeqFourthVal; + + /** + * 第5序号 + */ + @ApiModelProperty(value = "第5序号") + private Integer teamSeqFifth; + /** + * 第5序号比值 + */ + @ApiModelProperty(value = "第5序号比值") + private Integer teamSeqFifthVal; +}