From a2676bbc66b4eeaaf9f3e0d2d76909cd67e5bdbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AE=B6=E4=B8=9C?= <1654135867@qq.com> Date: Wed, 24 Jul 2024 10:10:03 +0800 Subject: [PATCH 1/4] 24 --- ...petitionProjectRegistrationController.java | 4 +-- .../ChaoseTopicPersionController.java | 7 +++- .../student/AnnualCompPointList.vue | 35 ++++++++++--------- .../components/ChaoseTopicPersionForm.vue | 3 +- 4 files changed, 28 insertions(+), 21 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 3a89a846..5ec50ad6 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 @@ -634,7 +634,7 @@ public class AnnualCompetitionProjectRegistrationController { @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) public Result edit(@RequestBody AnnualCompetitionProjectRegistrationPage annualCompetitionProjectRegistrationPage) { //判断是否为新增,以为前端访问的也是这个页面 - if (annualCompetitionProjectRegistrationPage.getAnnualCompid().length() < 11) {//说明走的新增,判断有点儿问题 + if (annualCompetitionProjectRegistrationPage.getEnrollCode() ==null) {//说明走的新增,判断有点儿问题 annualCompetitionProjectRegistrationPage.setAnnualCompid(annualCompetitionProjectRegistrationPage.getId()); annualCompetitionProjectRegistrationPage.setId(null); String entryFormat = annualCompetitionProjectRegistrationPage.getEntryFormat(); @@ -793,7 +793,7 @@ public class AnnualCompetitionProjectRegistrationController { public Result commitApplication(String id) { AnnualCompetitionProjectRegistration compRegistration = annualCompetitionProjectRegistrationService.query().eq("id", id).one(); String enrollStatic = compRegistration.getEnrollStatic(); - if (!enrollStatic.equals("0") && !enrollStatic.equals("3")) + if (!enrollStatic.equals("1") && !enrollStatic.equals("3") && !enrollStatic.equals("4")) return Result.error("当前状态不需要提交"); compRegistration.setEnrollStatic("1"); compRegistration.setBackinfo(""); diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/chooseTopicPersion/controller/ChaoseTopicPersionController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/chooseTopicPersion/controller/ChaoseTopicPersionController.java index ff587ece..f3bcf1b6 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/chooseTopicPersion/controller/ChaoseTopicPersionController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/chooseTopicPersion/controller/ChaoseTopicPersionController.java @@ -268,7 +268,12 @@ public class ChaoseTopicPersionController extends JeecgController queryWrapper = new QueryWrapper<>(); queryWrapper.eq("bmcode", enrollCode); ChaoseTopicPersion one = chaoseTopicPersionService.getOne(queryWrapper); - one.setStatus(status); + if(one.getBmcode().isEmpty()){ + ChaoseTopicPersion chaoseTopicPersion = new ChaoseTopicPersion(); + chaoseTopicPersion.setBmcode(enrollCode); + one.setStatus(status); + } + if (status.equals("3")) { one.setBlack(black); } else { diff --git a/jeecgboot-vue3-master/src/views/annualCompPoint/student/AnnualCompPointList.vue b/jeecgboot-vue3-master/src/views/annualCompPoint/student/AnnualCompPointList.vue index 38d50570..a79e6063 100644 --- a/jeecgboot-vue3-master/src/views/annualCompPoint/student/AnnualCompPointList.vue +++ b/jeecgboot-vue3-master/src/views/annualCompPoint/student/AnnualCompPointList.vue @@ -220,21 +220,22 @@ { label: '详情', onClick: handleDetail.bind(null, record), - }, - { - label: '项目能力管理', - onClick: handleEditxmnl.bind(null, record), - }, - - { - label: '题目管理', - onClick: handleEdittopic.bind(null, record), - }, - - { - label: '比赛奖项管理', - onClick: handleEditbsjx.bind(null, record), - }, + }, + + // { + // label: '项目能力管理', + // onClick: handleEditxmnl.bind(null, record), + // }, + // + // { + // label: '题目管理', + // onClick: handleEdittopic.bind(null, record), + // }, + // + // { + // label: '比赛奖项管理', + // onClick: handleEditbsjx.bind(null, record), + // }, ]; @@ -250,12 +251,12 @@ onClick: workManage.bind(null, record), }); } - /*if (record.requireTopic === 'Y' && record.annualCompState === '2') { + if (record.requireTopic === 'Y' && record.annualCompState === '2') { actions.unshift({ label: '选题', onClick: handleSubmitandApply.bind(null, record), }); - }*/ + } return actions; } diff --git a/jeecgboot-vue3-master/src/views/chooseTopicPersion/components/ChaoseTopicPersionForm.vue b/jeecgboot-vue3-master/src/views/chooseTopicPersion/components/ChaoseTopicPersionForm.vue index 83810fcc..76ffab6e 100644 --- a/jeecgboot-vue3-master/src/views/chooseTopicPersion/components/ChaoseTopicPersionForm.vue +++ b/jeecgboot-vue3-master/src/views/chooseTopicPersion/components/ChaoseTopicPersionForm.vue @@ -124,7 +124,8 @@ function add(route) { edit(route); } function click1(status1) { - update({enrollCode: formData.bmcode,status:status1}) + console.log(formData) + update({enrollCode: formData.bmcode,status:status1,topicid :formData.timul}) emit('up'); } /** From 5369fc7acbd4edab565ef74a8131bd3051d10b24 Mon Sep 17 00:00:00 2001 From: Gitea Date: Wed, 24 Jul 2024 17:09:20 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=B8=93=E5=AE=B6=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/AnnualCompPointController.java | 148 +++++++++++++++++- 1 file changed, 144 insertions(+), 4 deletions(-) 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 77afcbe8..8ba7429c 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 @@ -68,10 +68,8 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.text.DecimalFormat; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Map; +import java.time.LocalDateTime; +import java.util.*; import java.util.function.Function; import java.util.stream.Collectors; @@ -1038,5 +1036,147 @@ public class AnnualCompPointController extends JeecgController zjsybsjs( HttpServletRequest req) { + //获取当前登录用户 + LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + Map map = new HashMap<>(); + QueryWrapper exqueryWrapper = new QueryWrapper<>(); + exqueryWrapper.eq("user_id", user.getId()); + Expert expert = expertService.getOne(exqueryWrapper); + if(expert!=null){ + QueryWrapper coexqueryWrapper = new QueryWrapper<>(); + coexqueryWrapper.eq("expid", expert.getId()); + List compExpList = compExpService.list(coexqueryWrapper); + if(compExpList.size()>0){ + List compids = compExpList.stream().map(CompExp::getCompid).collect(Collectors.toList()); + QueryWrapper anncoqueryWrapper = new QueryWrapper<>(); + anncoqueryWrapper.in("compid",compids); + List annualCompList = annualCompService.list(anncoqueryWrapper); + List> jxzListMap = new ArrayList<>(); + List> lsListMap = new ArrayList<>(); + if(annualCompList.size()>0){ + List ndbsids = annualCompList.stream().map(AnnualComp::getId).collect(Collectors.toList()); + //进行中年度比赛项目 + AnnualCompPoint annualCompPoint = new AnnualCompPoint(); + QueryWrapper queryWrapperacp = QueryGenerator.initQueryWrapper(annualCompPoint, req.getParameterMap()); + queryWrapperacp.in("annual_comp_id",ndbsids); + queryWrapperacp.le("starttime",new Date()); + queryWrapperacp.ge("endtime",new Date()); + List listacp = annualCompPointService.list(queryWrapperacp); + map.put("jxzndbsxmNumber",listacp.size()); + if(listacp.size()>6){ + for (int p = 0 ; p < 6 ; p++){ + Map mapall1 = new HashMap<>(); + mapall1.put("xh",p+1); + mapall1.put("ndbs",annualCompService.getById(listacp.get(p).getAnnualCompId()).getName()); + mapall1.put("ndbsxm",listacp.get(p).getObjName()); + jxzListMap.add(mapall1); + } + }else{ + for (int o = 0 ; o < listacp.size() ; o++){ + Map mapall2 = new HashMap<>(); + mapall2.put("xh",o+1); + mapall2.put("ndbs",annualCompService.getById(listacp.get(o).getAnnualCompId()).getName()); + mapall2.put("ndbsxm",listacp.get(o).getObjName()); + jxzListMap.add(mapall2); + } + } + map.put("jxzndbsxmList",jxzListMap); + + //历史年度比赛项目 + QueryWrapper queryWrapperacpls = QueryGenerator.initQueryWrapper(annualCompPoint, req.getParameterMap()); + queryWrapperacpls.in("annual_comp_id",ndbsids); + queryWrapperacpls.lt("endtime",new Date()); + List listacpls = annualCompPointService.list(queryWrapperacpls); + map.put("lsndbsxmNumber",listacpls.size()); + if(listacpls.size()>6){ + for (int q = 0 ; q < 6 ; q++){ + Map mapall3 = new HashMap<>(); + mapall3.put("xh",q+1); + mapall3.put("ndbs",annualCompService.getById(listacpls.get(q).getAnnualCompId()).getName()); + mapall3.put("ndbsxm",listacpls.get(q).getObjName()); + lsListMap.add(mapall3); + } + }else{ + for (int w = 0 ; w < listacpls.size() ; w++){ + Map mapall4 = new HashMap<>(); + mapall4.put("xh",w+1); + mapall4.put("ndbs",annualCompService.getById(listacpls.get(w).getAnnualCompId()).getName()); + mapall4.put("ndbsxm",listacpls.get(w).getObjName()); + lsListMap.add(mapall4); + } + } + map.put("lsndbsxmList",lsListMap); + //进行中 国 省 市 校 + int gjj = 0; + int shengj = 0; + int shij = 0; + int xj = 0; + for (int i = 0 ; i < listacp.size() ; i++){ + if(listacp.get(i).getObjLevel().equals("1809121223401168898")){ + //国家 + gjj = gjj+1; + } + if(listacp.get(i).getObjLevel().equals("1809121301201313793")){ + //省 + shengj = shengj+1; + } + if(listacp.get(i).getObjLevel().equals("1809121356582903809")){ + //市 + shij = shij+1; + } + if(listacp.get(i).getObjLevel().equals("1809121454654119937")){ + //校 + xj = xj+1; + } + } + map.put("gjj",gjj); + map.put("shengj",shengj); + map.put("shij",shij); + map.put("xj",xj); + //历史 国 省 市 校 + int gjjls = 0; + int shengjls = 0; + int shijls = 0; + int xjls = 0; + for (int k = 0 ; k < listacpls.size() ; k++){ + if(listacpls.get(k).getObjLevel().equals("1809121223401168898")){ + //国家 + gjjls = gjjls+1; + } + if(listacpls.get(k).getObjLevel().equals("1809121301201313793")){ + //省 + shengjls = shengjls+1; + } + if(listacpls.get(k).getObjLevel().equals("1809121356582903809")){ + //市 + shijls = shijls+1; + } + if(listacpls.get(k).getObjLevel().equals("1809121454654119937")){ + //校 + xjls = xjls+1; + } + } + map.put("gjjls",gjjls); + map.put("shengjls",shengjls); + map.put("shijls",shijls); + map.put("xjls",xjls); + + } + } + + } + return Result.OK(map); + + } + } From 0a2c110591bfbac1149dddd05d2ddcfb6ec0cc8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AE=B6=E4=B8=9C?= <1654135867@qq.com> Date: Wed, 24 Jul 2024 17:46:22 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ChaoseTopicPersionController.java | 47 ++++++++++--------- .../chooseTopicPersion/entity/ChooseEdit.java | 1 + .../ChaoseTopicPersion.api.ts | 2 +- .../ChaoseTopicPersionList.vue | 4 +- .../components/ChaoseTopicPersionForm.vue | 4 +- 5 files changed, 31 insertions(+), 27 deletions(-) diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/chooseTopicPersion/controller/ChaoseTopicPersionController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/chooseTopicPersion/controller/ChaoseTopicPersionController.java index f3bcf1b6..048e76e2 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/chooseTopicPersion/controller/ChaoseTopicPersionController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/chooseTopicPersion/controller/ChaoseTopicPersionController.java @@ -113,17 +113,19 @@ public class ChaoseTopicPersionController extends JeecgController newList = chooseTopicPersionStatus.get("choose_topic_persion_status"); DictModel dictModel = newList.get(0); String value = dictModel.getText(); - dto.setBmcode(bmcode); - dto.setTimul(topicPersion.getTimul()); - dto.setTimul_dictText(topicService.getById(topicPersion.getTimul()).getName()); - dto.setStatus(topicPersion.getStatus()); - dto.setStatus_dictText(value); - dto.setBlack(topicPersion.getBlack()); - dto.setAnnualCompid(one.getAnnualCompid()); - dto.setAnnualCompid_dictText(annualCompPointService.getById(one.getAnnualCompid()).getObjName()); - dto.setEntryFormat(one.getEntryFormat()); - dto.setEntryFormat_dictText(one.getEntryFormat().equals("0") ? "个人" : "团队"); - dto.setTeamName(one.getTeamName()); + if (topicPersion.getTimul()!=null && topicPersion.getBmcode()!=null) { + dto.setBmcode(bmcode); + dto.setTimul(topicPersion.getTimul()); + dto.setTimul_dictText(topicService.getById(topicPersion.getTimul()).getName()); + dto.setStatus(topicPersion.getStatus()); + dto.setStatus_dictText(value); + dto.setBlack(topicPersion.getBlack()); + dto.setAnnualCompid(one.getAnnualCompid()); + dto.setAnnualCompid_dictText(annualCompPointService.getById(one.getAnnualCompid()).getObjName()); + dto.setEntryFormat(one.getEntryFormat()); + dto.setEntryFormat_dictText(one.getEntryFormat().equals("0") ? "个人" : "团队"); + dto.setTeamName(one.getTeamName()); + } chooseDtos.add(dto); } return Result.OK(chooseDtos); @@ -232,12 +234,18 @@ public class ChaoseTopicPersionController extends JeecgController add(@RequestBody ChaoseTopicPersion chaoseTopicPersion) { + public Result add(@RequestBody ChooseEdit chooseEdit) { + System.out.println(chooseEdit); + ChaoseTopicPersion chaoseTopicPersion = new ChaoseTopicPersion(); + String enrollCode = chooseEdit.getEnrollCode(); + chaoseTopicPersion.setBmcode(enrollCode); + chaoseTopicPersion.setTimul(chooseEdit.getTopicid()); + chaoseTopicPersion.setStatus(chooseEdit.getStatus()); QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("bmcode", chaoseTopicPersion.getBmcode()); - ChaoseTopicPersion one = chaoseTopicPersionService.getOne(queryWrapper); - if (one != null) { - return Result.OK("添加失败!"); + queryWrapper.eq("bmcode", enrollCode); + List one = chaoseTopicPersionService.list(queryWrapper); + if (one.size()>0) { + return Result.OK("当前不可选题!"); } chaoseTopicPersionService.save(chaoseTopicPersion); return Result.OK("添加成功!"); @@ -268,12 +276,7 @@ public class ChaoseTopicPersionController extends JeecgController queryWrapper = new QueryWrapper<>(); queryWrapper.eq("bmcode", enrollCode); ChaoseTopicPersion one = chaoseTopicPersionService.getOne(queryWrapper); - if(one.getBmcode().isEmpty()){ - ChaoseTopicPersion chaoseTopicPersion = new ChaoseTopicPersion(); - chaoseTopicPersion.setBmcode(enrollCode); - one.setStatus(status); - } - + one.setStatus(status); if (status.equals("3")) { one.setBlack(black); } else { diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/chooseTopicPersion/entity/ChooseEdit.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/chooseTopicPersion/entity/ChooseEdit.java index 2be12b32..04106715 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/chooseTopicPersion/entity/ChooseEdit.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/chooseTopicPersion/entity/ChooseEdit.java @@ -17,4 +17,5 @@ public class ChooseEdit { private String enrollCode; private String status; private String black; + private String topicid; } diff --git a/jeecgboot-vue3-master/src/views/chooseTopicPersion/ChaoseTopicPersion.api.ts b/jeecgboot-vue3-master/src/views/chooseTopicPersion/ChaoseTopicPersion.api.ts index 9eb1927e..fba0a063 100644 --- a/jeecgboot-vue3-master/src/views/chooseTopicPersion/ChaoseTopicPersion.api.ts +++ b/jeecgboot-vue3-master/src/views/chooseTopicPersion/ChaoseTopicPersion.api.ts @@ -66,7 +66,7 @@ export const batchDelete = (params, handleSuccess) => { }); } export const update = (params) => { - return defHttp.post({ url: Api.edit1, params }); + return defHttp.post({ url: Api.save, params }); } export const update1 = (params) => { return defHttp.post({ url: Api.edit1, params }, { isTransformResponse: false }); diff --git a/jeecgboot-vue3-master/src/views/chooseTopicPersion/ChaoseTopicPersionList.vue b/jeecgboot-vue3-master/src/views/chooseTopicPersion/ChaoseTopicPersionList.vue index efeb5692..987b9ef5 100644 --- a/jeecgboot-vue3-master/src/views/chooseTopicPersion/ChaoseTopicPersionList.vue +++ b/jeecgboot-vue3-master/src/views/chooseTopicPersion/ChaoseTopicPersionList.vue @@ -65,7 +65,7 @@ import {useListPage} from '/@/hooks/system/useListPage'; import {columns} from './ChaoseTopicPersion.data'; import { list, - update, + update1, deleteOne, batchDelete, getImportUrl, @@ -140,7 +140,7 @@ function handleAdd() { */ function handleEdit1(record: Recordable) { console.log(record, "111112") - update({enrollCode: record.bmcode, status: 2}) + update1({enrollCode: record.bmcode, status: 2}) reload() } diff --git a/jeecgboot-vue3-master/src/views/chooseTopicPersion/components/ChaoseTopicPersionForm.vue b/jeecgboot-vue3-master/src/views/chooseTopicPersion/components/ChaoseTopicPersionForm.vue index 76ffab6e..2bca5426 100644 --- a/jeecgboot-vue3-master/src/views/chooseTopicPersion/components/ChaoseTopicPersionForm.vue +++ b/jeecgboot-vue3-master/src/views/chooseTopicPersion/components/ChaoseTopicPersionForm.vue @@ -22,7 +22,7 @@ Date: Thu, 25 Jul 2024 10:16:49 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=93=E5=BC=80?= =?UTF-8?q?=E8=AF=84=E5=88=86=E6=A0=87=E5=87=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/annualCompPoint/committee/AnnualCompPointList.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jeecgboot-vue3-master/src/views/annualCompPoint/committee/AnnualCompPointList.vue b/jeecgboot-vue3-master/src/views/annualCompPoint/committee/AnnualCompPointList.vue index e4a3ec9e..f828318d 100644 --- a/jeecgboot-vue3-master/src/views/annualCompPoint/committee/AnnualCompPointList.vue +++ b/jeecgboot-vue3-master/src/views/annualCompPoint/committee/AnnualCompPointList.vue @@ -433,10 +433,10 @@ label: '作品管理', onClick: workManage.bind(null, record), }); -/* actions.unshift({ + actions.unshift({ label: '评分标准', onClick: pfbz.bind(null, record), - });*/ + }); actions.unshift({