From ca8fa3945543785ae062d11ab7cee3f845d8a618 Mon Sep 17 00:00:00 2001 From: Gitea Date: Tue, 30 Jul 2024 16:47:33 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=89=80=E6=9C=89=E7=94=A8=E5=88=B0?= =?UTF-8?q?=E6=AF=94=E8=B5=9B=E8=B4=9F=E8=B4=A3=E4=BA=BA=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E7=AD=89=E4=BA=8E=E4=B8=8D=E7=94=A8like?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...petitionProjectRegistrationController.java | 6 +++--- .../controller/AnnualCompGroupController.java | 17 +++++++++++++---- .../controller/AwardPersionController.java | 19 ++++++++++++++----- .../controller/ScorePersionController.java | 15 ++++++++++++--- .../controller/ScoreStaController.java | 17 +++++++++++++---- 5 files changed, 55 insertions(+), 19 deletions(-) diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java index 2aa65af5..d25084e9 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java @@ -995,7 +995,7 @@ public class AnnualCompetitionProjectRegistrationController { LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); Comp comp = new Comp(); QueryWrapper queryWrappercomp = QueryGenerator.initQueryWrapper(comp, req.getParameterMap()); - queryWrappercomp.like("comp_admin", user.getUsername()); + queryWrappercomp.eq("comp_admin", user.getUsername()); List list = compService.list(queryWrappercomp); Map map = new HashMap<>(); if (list.size() > 0) { @@ -1774,7 +1774,7 @@ public class AnnualCompetitionProjectRegistrationController { LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); Comp comp = new Comp(); QueryWrapper queryWrappercomp = QueryGenerator.initQueryWrapper(comp, req.getParameterMap()); - queryWrappercomp.like("comp_admin", user.getUsername()); + queryWrappercomp.eq("comp_admin", user.getUsername()); List list = compService.list(queryWrappercomp); Map map = new HashMap<>(); if (list.size() > 0) { @@ -2129,7 +2129,7 @@ public class AnnualCompetitionProjectRegistrationController { LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); Comp comp = new Comp(); QueryWrapper queryWrappercomp = QueryGenerator.initQueryWrapper(comp, req.getParameterMap()); - queryWrappercomp.like("comp_admin",user.getUsername()); + queryWrappercomp.eq("comp_admin",user.getUsername()); List list = compService.list(queryWrappercomp); List ids = list.stream().map(Comp::getId).collect(Collectors.toList()); QueryWrapper queryWrapperAnnual = new QueryWrapper<>(); diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompgroup/controller/AnnualCompGroupController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompgroup/controller/AnnualCompGroupController.java index 8172749f..32f5160f 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompgroup/controller/AnnualCompGroupController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompgroup/controller/AnnualCompGroupController.java @@ -95,21 +95,30 @@ public class AnnualCompGroupController extends JeecgController queryWrappercomp = QueryGenerator.initQueryWrapper(comp, req.getParameterMap()); - queryWrappercomp.like("comp_admin",user.getUsername()); + queryWrappercomp.eq("comp_admin",user.getUsername()); List list = compService.list(queryWrappercomp); + if(list.size()==0){ + return Result.error("未绑定比赛"); + } List ids = list.stream().map(Comp::getId).collect(Collectors.toList()); QueryWrapper queryWrapperAnnual = new QueryWrapper<>(); - queryWrapperAnnual.in(ids.size()!=0,"compid",ids); + queryWrapperAnnual.in("compid",ids); List listAnnual = annualCompService.list(queryWrapperAnnual); + if(listAnnual.size()==0){ + return Result.error("未创建年度比赛"); + } List annualIds = listAnnual.stream().map(AnnualComp::getId).collect(Collectors.toList()); QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(annualCompGroup, req.getParameterMap()); queryWrapper.in(annualIds.size()!=0,"annal_comp",annualIds); AnnualCompPoint annualCompPoint = new AnnualCompPoint(); QueryWrapper queryWrapperacp = QueryGenerator.initQueryWrapper(annualCompPoint, req.getParameterMap()); - queryWrapperacp.in(annualIds.size()!=0,"annual_comp_id",annualIds); + queryWrapperacp.in("annual_comp_id",annualIds); queryWrapperacp.eq("annual_comp_switch","Y"); // 比赛必须是开启的 List listacp = annualCompPointService.list(queryWrapperacp); + if(listacp.size()==0){ + return Result.error("未创建年度比赛项目"); + } List acpIds = listacp.stream().map(AnnualCompPoint::getId).collect(Collectors.toList()); queryWrapper.in(acpIds.size()!=0,"ann_comp_p",acpIds); @@ -190,7 +199,7 @@ public class AnnualCompGroupController extends JeecgController queryWrapper = QueryGenerator.initQueryWrapper(comp, req.getParameterMap()); - queryWrapper.like("comp_admin",user.getUsername()); + queryWrapper.eq("comp_admin",user.getUsername()); List list = compService.list(queryWrapper); String str = ""; for(int i = 0 ; i < list.size() ; i++){ diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/controller/AwardPersionController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/controller/AwardPersionController.java index 5b2bbbc8..b4b14f9d 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/controller/AwardPersionController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/controller/AwardPersionController.java @@ -127,23 +127,32 @@ public class AwardPersionController extends JeecgController queryWrappercomp = QueryGenerator.initQueryWrapper(comp, req.getParameterMap()); - queryWrappercomp.like("comp_admin",user.getUsername()); + queryWrappercomp.eq("comp_admin",user.getUsername()); List list = compService.list(queryWrappercomp); + if(list.size()==0){ + return Result.error("未绑定比赛"); + } List ids = list.stream().map(Comp::getId).collect(Collectors.toList()); QueryWrapper queryWrapperAnnual = new QueryWrapper<>(); - queryWrapperAnnual.in(ids.size()!=0,"compid",ids); + queryWrapperAnnual.in("compid",ids); List listAnnual = annualCompService.list(queryWrapperAnnual); + if(listAnnual.size()==0){ + return Result.error("未创建年度比赛"); + } List annualIds = listAnnual.stream().map(AnnualComp::getId).collect(Collectors.toList()); QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(awardPersion, req.getParameterMap()); - queryWrapper.in(annualIds.size()!=0,"annal_comp",annualIds); + queryWrapper.in("annal_comp",annualIds); AnnualCompPoint annualCompPoint = new AnnualCompPoint(); QueryWrapper queryWrapperacp = QueryGenerator.initQueryWrapper(annualCompPoint, req.getParameterMap()); - queryWrapperacp.in(annualIds.size()!=0,"annual_comp_id",annualIds); + queryWrapperacp.in("annual_comp_id",annualIds); queryWrapperacp.eq("annual_comp_switch","Y"); // 比赛必须是开启的 List listacp = annualCompPointService.list(queryWrapperacp); + if(listacp.size()==0){ + return Result.error("未创建年度比赛项目"); + } List acpIds = listacp.stream().map(AnnualCompPoint::getId).collect(Collectors.toList()); - queryWrapper.in(acpIds.size()!=0,"annual_comp_p",acpIds); + queryWrapper.in("annual_comp_p",acpIds); Page page = new Page(pageNo, pageSize); IPage pageList = awardPersionService.page(page, queryWrapper); diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/scorepersion/controller/ScorePersionController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/scorepersion/controller/ScorePersionController.java index 8b1fe80e..21a6f8a2 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/scorepersion/controller/ScorePersionController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/scorepersion/controller/ScorePersionController.java @@ -105,21 +105,30 @@ public class ScorePersionController extends JeecgController queryWrappercomp = QueryGenerator.initQueryWrapper(comp, req.getParameterMap()); - queryWrappercomp.like("comp_admin",user.getUsername()); + queryWrappercomp.eq("comp_admin",user.getUsername()); List list = compService.list(queryWrappercomp); + if(list.size()==0){ + return Result.error("未绑定比赛"); + } List ids = list.stream().map(Comp::getId).collect(Collectors.toList()); QueryWrapper queryWrapperAnnual = new QueryWrapper<>(); queryWrapperAnnual.in(ids.size()!=0,"compid",ids); List listAnnual = annualCompService.list(queryWrapperAnnual); + if(listAnnual.size()==0){ + return Result.error("未创建年度比赛"); + } List annualIds = listAnnual.stream().map(AnnualComp::getId).collect(Collectors.toList()); QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(scorePersion, req.getParameterMap()); - queryWrapper.in(annualIds.size()!=0,"annual_compid",annualIds); + queryWrapper.in("annual_compid",annualIds); AnnualCompPoint annualCompPoint = new AnnualCompPoint(); QueryWrapper queryWrapperacp = QueryGenerator.initQueryWrapper(annualCompPoint, req.getParameterMap()); - queryWrapperacp.in(annualIds.size()!=0,"annual_comp_id",annualIds); + queryWrapperacp.in("annual_comp_id",annualIds); queryWrapperacp.eq("annual_comp_switch","Y"); // 比赛必须是开启的 List listacp = annualCompPointService.list(queryWrapperacp); + if(listacp.size()==0){ + return Result.error("未创建年度比赛项目"); + } List acpIds = listacp.stream().map(AnnualCompPoint::getId).collect(Collectors.toList()); queryWrapper.in(acpIds.size()!=0,"annual_comp_p",acpIds); diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/scoresta/controller/ScoreStaController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/scoresta/controller/ScoreStaController.java index b276a960..9615ed40 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/scoresta/controller/ScoreStaController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/scoresta/controller/ScoreStaController.java @@ -87,23 +87,32 @@ public class ScoreStaController extends JeecgController queryWrappercomp = QueryGenerator.initQueryWrapper(comp, req.getParameterMap()); - queryWrappercomp.like("comp_admin",user.getUsername()); + queryWrappercomp.eq("comp_admin",user.getUsername()); List list = compService.list(queryWrappercomp); + if(list.size()==0){ + return Result.error("未绑定比赛"); + } List ids = list.stream().map(Comp::getId).collect(Collectors.toList()); QueryWrapper queryWrapperAnnual = new QueryWrapper<>(); - queryWrapperAnnual.in(ids.size()!=0,"compid",ids); + queryWrapperAnnual.in("compid",ids); List listAnnual = annualCompService.list(queryWrapperAnnual); + if(listAnnual.size()==0){ + return Result.error("未创建年度比赛"); + } List annualIds = listAnnual.stream().map(AnnualComp::getId).collect(Collectors.toList()); QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(scoreSta, req.getParameterMap()); - queryWrapper.in(annualIds.size()!=0,"annal_comp",annualIds); + queryWrapper.in("annal_comp",annualIds); AnnualCompPoint annualCompPoint = new AnnualCompPoint(); QueryWrapper queryWrapperacp = QueryGenerator.initQueryWrapper(annualCompPoint, req.getParameterMap()); queryWrapperacp.in(annualIds.size()!=0,"annual_comp_id",annualIds); queryWrapperacp.eq("annual_comp_switch","Y"); // 比赛必须是开启的 List listacp = annualCompPointService.list(queryWrapperacp); + if(listacp.size()==0){ + return Result.error("未创建年度比赛项目"); + } List acpIds = listacp.stream().map(AnnualCompPoint::getId).collect(Collectors.toList()); - queryWrapper.in(acpIds.size()!=0,"annual_compid",acpIds); + queryWrapper.in("annual_compid",acpIds); Page page = new Page(pageNo, pageSize); From 29839f5649aebbf4923b5d21c76fea7f8a9de2c6 Mon Sep 17 00:00:00 2001 From: zhc077 <565291854@qq.com> Date: Tue, 30 Jul 2024 17:43:32 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E8=83=BD=E5=8A=9B?= =?UTF-8?q?=E9=87=8F=E5=8C=96=20=E4=BF=AE=E6=94=B9=207.30?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/PersonalAbilityEvaluationServiceImpl.java | 2 +- .../service/impl/PersonalCompScoreServiceImpl.java | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) 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 8445b7da..58ec2db4 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 @@ -127,7 +127,7 @@ public class PersonalAbilityEvaluationServiceImpl extends ServiceImpl score = new AtomicReference<>((double) 0); if (StringUtils.equals("Y", entryForm)) { //团队赛 Optional.ofNullable(managementList).orElse(new ArrayList<>()).forEach(e -> { From 1b097cdf70b96f9d76e4b7ffa42502b1c14629f3 Mon Sep 17 00:00:00 2001 From: Gitea Date: Tue, 30 Jul 2024 17:47:57 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=88=90=E7=BB=A9=E6=B1=87=E6=80=BB?= =?UTF-8?q?=E5=90=8E=E6=9B=B4=E6=96=B0=E4=BD=9C=E5=93=81=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E4=B8=BA=E5=B7=B2=E8=AF=84=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/AnnualCompPointController.java | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) 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 5e637449..32faa70d 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 @@ -50,6 +50,8 @@ import org.jeecg.modules.demo.expscore.service.IExpScoreService; import org.jeecg.modules.demo.score_management.entity.ScoreManagement; import org.jeecg.modules.demo.scorepersion.entity.ScorePersion; import org.jeecg.modules.demo.scorepersion.service.IScorePersionService; +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; import org.jeecg.modules.system.service.ISysUserService; import org.jeecgframework.poi.excel.ExcelImportUtil; @@ -124,6 +126,9 @@ public class AnnualCompPointController extends JeecgController queryWrapperup = new QueryWrapper<>(); + queryWrapperup.eq("apply_code",list.get(b).getBmcode()); + List listup = upfilePersionService.list(queryWrapperup); + if(listup.size()>0){ + up = listup.get(0); + up.setStatus(1); + upfilePersionService.updateById(up); + } + } return Result.OK("成功!"); } /** @@ -484,6 +501,18 @@ public class AnnualCompPointController extends JeecgController queryWrapperup = new QueryWrapper<>(); + queryWrapperup.eq("apply_code",list.get(b).getBmcode()); + List listup = upfilePersionService.list(queryWrapperup); + if(listup.size()>0){ + up = listup.get(0); + up.setStatus(1); + upfilePersionService.updateById(up); + } + } return Result.OK("成功!"); }