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); + + } + } 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 3b689d95..67f0ec6f 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..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("添加成功!"); 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/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({ 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/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 83810fcc..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 @@