From ccf9a95bda40c41d4a46cc7af26bcfba06a9bac1 Mon Sep 17 00:00:00 2001 From: Gitea Date: Mon, 29 Jul 2024 10:33:22 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E5=A7=94=E4=BC=9A=E5=88=86=E6=9E=90?= =?UTF-8?q?=E6=8A=A5=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...petitionProjectRegistrationController.java | 39 ++++++++++--------- 1 file changed, 21 insertions(+), 18 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 ef03d1a8..05841c76 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 @@ -1234,6 +1234,7 @@ public class AnnualCompetitionProjectRegistrationController { public Result xssybsjs( HttpServletRequest req) { //获取当前登录用户 LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + String wonk = sysUserService.getById(user.getId()).getWorkNo(); TeamManagement teamManagement = new TeamManagement(); QueryWrapper queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap()); queryWrappertm.eq("user_id",user.getId()); @@ -1382,8 +1383,9 @@ public class AnnualCompetitionProjectRegistrationController { map.put("xj",0); } //获奖数 + QueryWrapper queryWrapperaphj = new QueryWrapper<>(); - queryWrapperaphj.eq("studentcode",user.getUsername()); + queryWrapperaphj.eq("studentcode",wonk); queryWrapperaphj.in(bmbhs.size()!=0,"enroll_code",bmbhs); List listhj = awardPersionService.list(queryWrapperaphj); map.put("hjNumber",listhj.size()); @@ -1391,7 +1393,7 @@ public class AnnualCompetitionProjectRegistrationController { AwardPersion awardPersion1 = new AwardPersion(); QueryWrapper queryWrapperap1 = QueryGenerator.initQueryWrapper(awardPersion1, req.getParameterMap()); queryWrapperap1.eq("awardsort",1); - queryWrapperap1.eq("studentcode",user.getUsername()); + queryWrapperap1.eq("studentcode",wonk); queryWrapperap1.in(bmbhs.size()!=0,"enroll_code",bmbhs); List list1 = awardPersionService.list(queryWrapperap1); map.put("ydjNumber",list1.size()); @@ -1399,7 +1401,7 @@ public class AnnualCompetitionProjectRegistrationController { AwardPersion awardPersion2 = new AwardPersion(); QueryWrapper queryWrapperap2 = QueryGenerator.initQueryWrapper(awardPersion2, req.getParameterMap()); queryWrapperap2.eq("awardsort",2); - queryWrapperap2.eq("studentcode",user.getUsername()); + queryWrapperap2.eq("studentcode",wonk); queryWrapperap2.in(bmbhs.size()!=0,"enroll_code",bmbhs); List list2 = awardPersionService.list(queryWrapperap2); map.put("edjNumber",list2.size()); @@ -1407,7 +1409,7 @@ public class AnnualCompetitionProjectRegistrationController { AwardPersion awardPersion3 = new AwardPersion(); QueryWrapper queryWrapperap3 = QueryGenerator.initQueryWrapper(awardPersion3, req.getParameterMap()); queryWrapperap3.eq("awardsort",3); - queryWrapperap3.eq("studentcode",user.getUsername()); + queryWrapperap3.eq("studentcode",wonk); queryWrapperap3.in(bmbhs.size()!=0,"enroll_code",bmbhs); List list3 = awardPersionService.list(queryWrapperap3); map.put("sdjNumber",list3.size()); @@ -1415,7 +1417,7 @@ public class AnnualCompetitionProjectRegistrationController { AwardPersion awardPersion4 = new AwardPersion(); QueryWrapper queryWrapperap4 = QueryGenerator.initQueryWrapper(awardPersion4, req.getParameterMap()); queryWrapperap4.eq("awardsort",4); - queryWrapperap4.eq("studentcode",user.getUsername()); + queryWrapperap4.eq("studentcode",wonk); queryWrapperap4.in(bmbhs.size()!=0,"enroll_code",bmbhs); List list4 = awardPersionService.list(queryWrapperap4); map.put("sidjNumber",list4.size()); @@ -1423,14 +1425,14 @@ public class AnnualCompetitionProjectRegistrationController { AwardPersion awardPersion5 = new AwardPersion(); QueryWrapper queryWrapperap5 = QueryGenerator.initQueryWrapper(awardPersion5, req.getParameterMap()); queryWrapperap5.eq("awardsort",5); - queryWrapperap5.eq("studentcode",user.getUsername()); + queryWrapperap5.eq("studentcode",wonk); queryWrapperap5.in(bmbhs.size()!=0,"enroll_code",bmbhs); List list5 = awardPersionService.list(queryWrapperap5); map.put("wdjNumber",list5.size()); //所有奖项(前六条) AwardPersion awardPersionAll = new AwardPersion(); QueryWrapper queryWrapperapAll = QueryGenerator.initQueryWrapper(awardPersionAll, req.getParameterMap()); - queryWrapperapAll.eq("studentcode",user.getUsername()); + queryWrapperapAll.eq("studentcode",wonk); queryWrapperapAll.in(bmbhs.size()!=0,"enroll_code",bmbhs); List listAll = awardPersionService.list(queryWrapperapAll); List> allApListMap = new ArrayList<>(); @@ -1443,7 +1445,7 @@ public class AnnualCompetitionProjectRegistrationController { QueryWrapper queryWrapperpcs = new QueryWrapper<>(); queryWrapperpcs.eq("annual_comp_id",listAll.get(y).getAnnalComp()); queryWrapperpcs.eq("annual_comp_p",listAll.get(y).getAnnualCompP()); - queryWrapperpcs.eq("work_on",user.getUsername()); + queryWrapperpcs.eq("work_on",wonk); List listpcs = personalCompScoreService.list(queryWrapperpcs); if(listpcs.size()==0){ mapall1.put("jf",0); @@ -1462,7 +1464,7 @@ public class AnnualCompetitionProjectRegistrationController { QueryWrapper queryWrapperpcs = new QueryWrapper<>(); queryWrapperpcs.eq("annual_comp_id",listAll.get(n).getAnnalComp()); queryWrapperpcs.eq("annual_comp_p",listAll.get(n).getAnnualCompP()); - queryWrapperpcs.eq("work_on",user.getUsername()); + queryWrapperpcs.eq("work_on",wonk); List listpcs = personalCompScoreService.list(queryWrapperpcs); if(listpcs.size()==0){ mapall2.put("jf",0); @@ -1490,6 +1492,7 @@ public class AnnualCompetitionProjectRegistrationController { public Result xsfxbg( HttpServletRequest req) { //获取当前登录用户 LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + String wonk = sysUserService.getById(user.getId()).getWorkNo(); TeamManagement teamManagement = new TeamManagement(); QueryWrapper queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap()); queryWrappertm.eq("user_id",user.getId()); @@ -1643,7 +1646,7 @@ public class AnnualCompetitionProjectRegistrationController { } //获奖数 QueryWrapper queryWrapperaphj = new QueryWrapper<>(); - queryWrapperaphj.eq("studentcode",user.getUsername()); + queryWrapperaphj.eq("studentcode",wonk); queryWrapperaphj.in(bmbhs.size()!=0,"enroll_code",bmbhs); List listhj = awardPersionService.list(queryWrapperaphj); map.put("hjNumber",listhj.size()); @@ -1651,7 +1654,7 @@ public class AnnualCompetitionProjectRegistrationController { AwardPersion awardPersion1 = new AwardPersion(); QueryWrapper queryWrapperap1 = QueryGenerator.initQueryWrapper(awardPersion1, req.getParameterMap()); queryWrapperap1.eq("awardsort",1); - queryWrapperap1.eq("studentcode",user.getUsername()); + queryWrapperap1.eq("studentcode",wonk); queryWrapperap1.in(bmbhs.size()!=0,"enroll_code",bmbhs); List list1 = awardPersionService.list(queryWrapperap1); map.put("ydjNumber",list1.size()); @@ -1659,7 +1662,7 @@ public class AnnualCompetitionProjectRegistrationController { AwardPersion awardPersion2 = new AwardPersion(); QueryWrapper queryWrapperap2 = QueryGenerator.initQueryWrapper(awardPersion2, req.getParameterMap()); queryWrapperap2.eq("awardsort",2); - queryWrapperap2.eq("studentcode",user.getUsername()); + queryWrapperap2.eq("studentcode",wonk); queryWrapperap2.in(bmbhs.size()!=0,"enroll_code",bmbhs); List list2 = awardPersionService.list(queryWrapperap2); map.put("edjNumber",list2.size()); @@ -1667,7 +1670,7 @@ public class AnnualCompetitionProjectRegistrationController { AwardPersion awardPersion3 = new AwardPersion(); QueryWrapper queryWrapperap3 = QueryGenerator.initQueryWrapper(awardPersion3, req.getParameterMap()); queryWrapperap3.eq("awardsort",3); - queryWrapperap3.eq("studentcode",user.getUsername()); + queryWrapperap3.eq("studentcode",wonk); queryWrapperap3.in(bmbhs.size()!=0,"enroll_code",bmbhs); List list3 = awardPersionService.list(queryWrapperap3); map.put("sdjNumber",list3.size()); @@ -1675,7 +1678,7 @@ public class AnnualCompetitionProjectRegistrationController { AwardPersion awardPersion4 = new AwardPersion(); QueryWrapper queryWrapperap4 = QueryGenerator.initQueryWrapper(awardPersion4, req.getParameterMap()); queryWrapperap4.eq("awardsort",4); - queryWrapperap4.eq("studentcode",user.getUsername()); + queryWrapperap4.eq("studentcode",wonk); queryWrapperap4.in(bmbhs.size()!=0,"enroll_code",bmbhs); List list4 = awardPersionService.list(queryWrapperap4); map.put("sidjNumber",list4.size()); @@ -1683,14 +1686,14 @@ public class AnnualCompetitionProjectRegistrationController { AwardPersion awardPersion5 = new AwardPersion(); QueryWrapper queryWrapperap5 = QueryGenerator.initQueryWrapper(awardPersion5, req.getParameterMap()); queryWrapperap5.eq("awardsort",5); - queryWrapperap5.eq("studentcode",user.getUsername()); + queryWrapperap5.eq("studentcode",wonk); queryWrapperap5.in(bmbhs.size()!=0,"enroll_code",bmbhs); List list5 = awardPersionService.list(queryWrapperap5); map.put("wdjNumber",list5.size()); //所有奖项(前六条) AwardPersion awardPersionAll = new AwardPersion(); QueryWrapper queryWrapperapAll = QueryGenerator.initQueryWrapper(awardPersionAll, req.getParameterMap()); - queryWrapperapAll.eq("studentcode",user.getUsername()); + queryWrapperapAll.eq("studentcode",wonk); queryWrapperapAll.in(bmbhs.size()!=0,"enroll_code",bmbhs); List listAll = awardPersionService.list(queryWrapperapAll); List> allApListMap = new ArrayList<>(); @@ -1712,7 +1715,7 @@ public class AnnualCompetitionProjectRegistrationController { QueryWrapper queryWrapperpcs = new QueryWrapper<>(); queryWrapperpcs.eq("annual_comp_id",listAll.get(y).getAnnalComp()); queryWrapperpcs.eq("annual_comp_p",listAll.get(y).getAnnualCompP()); - queryWrapperpcs.eq("work_on",user.getUsername()); + queryWrapperpcs.eq("work_on",wonk); List listpcs = personalCompScoreService.list(queryWrapperpcs); if(listpcs.size()==0){ mapall1.put("jf",0); @@ -1740,7 +1743,7 @@ public class AnnualCompetitionProjectRegistrationController { QueryWrapper queryWrapperpcs = new QueryWrapper<>(); queryWrapperpcs.eq("annual_comp_id",listAll.get(n).getAnnalComp()); queryWrapperpcs.eq("annual_comp_p",listAll.get(n).getAnnualCompP()); - queryWrapperpcs.eq("work_on",user.getUsername()); + queryWrapperpcs.eq("work_on",wonk); List listpcs = personalCompScoreService.list(queryWrapperpcs); if(listpcs.size()==0){ mapall2.put("jf",0);