From 60485f797e8dacf54b5d8848f68ea21117e41385 Mon Sep 17 00:00:00 2001 From: ly19960718 <1622779752@qq.com> Date: Sat, 15 May 2021 21:45:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E5=90=8D=E5=A2=9E=E5=8A=A0=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=8A=A5=E5=90=8D=E6=9C=BA=E6=9E=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/tenlion/pojo/dtos/apply/ApplyDTO.java | 34 +++++++++++++++++++ .../service/apply/impl/ApplyServiceImpl.java | 23 +++++++++++-- 2 files changed, 54 insertions(+), 3 deletions(-) diff --git a/src/main/java/cn/com/tenlion/pojo/dtos/apply/ApplyDTO.java b/src/main/java/cn/com/tenlion/pojo/dtos/apply/ApplyDTO.java index 31da470..881d593 100644 --- a/src/main/java/cn/com/tenlion/pojo/dtos/apply/ApplyDTO.java +++ b/src/main/java/cn/com/tenlion/pojo/dtos/apply/ApplyDTO.java @@ -89,6 +89,15 @@ public class ApplyDTO { @ApiModelProperty(name = "准考证码", value = "准考证码") private String distributionCardCode; + @ApiModelProperty(name = "applyUserNum1", value = "预计报名人数") + private Integer applyUserNum1; + @ApiModelProperty(name = "applyUserNum2", value = "已报名人数") + private Integer applyUserNum2; + @ApiModelProperty(name = "applyUserNum3", value = "已通过审核人数") + private Integer applyUserNum3; + + + public String getApplyInstitutionId() { return applyInstitutionId; @@ -354,4 +363,29 @@ public class ApplyDTO { public void setApplyWorkTypeName(String applyWorkTypeName) { this.applyWorkTypeName = applyWorkTypeName; } + + + public Integer getApplyUserNum1() { + return applyUserNum1; + } + + public void setApplyUserNum1(Integer applyUserNum1) { + this.applyUserNum1 = applyUserNum1; + } + + public Integer getApplyUserNum2() { + return applyUserNum2; + } + + public void setApplyUserNum2(Integer applyUserNum2) { + this.applyUserNum2 = applyUserNum2; + } + + public Integer getApplyUserNum3() { + return applyUserNum3; + } + + public void setApplyUserNum3(Integer applyUserNum3) { + this.applyUserNum3 = applyUserNum3; + } } diff --git a/src/main/java/cn/com/tenlion/service/apply/impl/ApplyServiceImpl.java b/src/main/java/cn/com/tenlion/service/apply/impl/ApplyServiceImpl.java index 776e395..71ed134 100644 --- a/src/main/java/cn/com/tenlion/service/apply/impl/ApplyServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/apply/impl/ApplyServiceImpl.java @@ -172,6 +172,23 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic } PageHelper.startPage(page.getPage(), page.getRows()); List applyDTOs = list(page.getParams()); + for (ApplyDTO applyDTO : applyDTOs) { + //统计机构报名数量 + List states = new ArrayList<>(); + states.add("0"); + states.add("1"); + states.add("2"); + states.add("-1"); + Integer num2 = countApplyNum(applyDTO.getApplyWorkTypeId(),applyDTO.getApplyInstitutionId(),states); + //统计机构报名审核通过数量 + states.clear(); + states.add("2"); + Integer num3 = countApplyNum(applyDTO.getApplyWorkTypeId(),applyDTO.getApplyInstitutionId(),states); + Object applyClassPlanUserNum = ConfigManager.getInstance().getConfig().get("applyClassPlanUserNum"); + applyDTO.setApplyUserNum1(applyClassPlanUserNum == null ? 0:Integer.valueOf(applyClassPlanUserNum.toString())); + applyDTO.setApplyUserNum2(num2); + applyDTO.setApplyUserNum3(num3); + } PageInfo pageInfo = new PageInfo<>(applyDTOs); return new SuccessResultList<>(applyDTOs, pageInfo.getPageNum(), pageInfo.getTotal()); } @@ -401,9 +418,9 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic if(!(applyDTO.getApplyAuditState() == -1 || applyDTO.getApplyAuditState() == 1)){ throw new SearchException("暂不能修改信息"); } - if(checkApplyIsFirst(creator,applyWorkTypeId,null) != 0){ - throw new SaveException("您选择的工种已报名过其他培训机构"); - } +// if(checkApplyIsFirst(creator,applyWorkTypeId,null) != 0){ +// throw new SaveException("您选择的工种已报名过其他培训机构"); +// } if(!examCheckService.getExamCheckFailOrBack(applyWorkTypeId,applyInstitutionId)){ throw new SaveException("该机构以截止报名");