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 32faa70d..2d4dc70a 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 @@ -198,6 +198,71 @@ public class AnnualCompPointController extends JeecgController> + */ + @GetMapping(value = "/listdsh") + public Result> listdsh(AnnualCompPoint annualCompPoint, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(annualCompPoint, req.getParameterMap()); + queryWrapper.eq("annual_comp_state","1"); + Page page = new Page(pageNo, pageSize); + IPage pageList = annualCompPointService.page(page, queryWrapper); + + return Result.OK(pageList); + } + + /** + * 组委会 已审核 + * @param annualCompPoint + * @param pageNo + * @param pageSize + * @param req + * @return {@link Result}<{@link IPage}<{@link AnnualCompPoint}>> + */ + @GetMapping(value = "/listysh") + public Result> listysh(AnnualCompPoint annualCompPoint, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(annualCompPoint, req.getParameterMap()); + queryWrapper.eq("annual_comp_state","2"); + Page page = new Page(pageNo, pageSize); + IPage pageList = annualCompPointService.page(page, queryWrapper); + + return Result.OK(pageList); + } + + + /** + * + * 组委会 带驳回 + * @param annualCompPoint + * @param pageNo + * @param pageSize + * @param req + * @return {@link Result}<{@link IPage}<{@link AnnualCompPoint}>> + */ + @GetMapping(value = "/listdbh") + public Result> listdbh(AnnualCompPoint annualCompPoint, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(annualCompPoint, req.getParameterMap()); + queryWrapper.eq("annual_comp_state","3"); + Page page = new Page(pageNo, pageSize); + IPage pageList = annualCompPointService.page(page, queryWrapper); + + return Result.OK(pageList); + } + /** * 专家 显示所有 diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcomp/controller/AnnualCompController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcomp/controller/AnnualCompController.java index 3859e459..56b062a1 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcomp/controller/AnnualCompController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcomp/controller/AnnualCompController.java @@ -369,8 +369,8 @@ public class AnnualCompController extends JeecgController end) { + return Result.error("开始时间不能大于结束时间"); } String compname = annualCompVo.getCompname(); String annualname = annualCompVo.getAnnualname(); 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 b4b14f9d..06967da0 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 @@ -514,10 +514,14 @@ public class AwardPersionController extends JeecgController queryWrapperaca = QueryGenerator.initQueryWrapper(annualCompAward, request.getParameterMap()); queryWrapperaca.eq("annucompid",list.get(i).getAnnualCompP()); List listaca = annualCompAwardService.list(queryWrapperaca); + if(listaca.size()==0){ + return Result.error("未设置年度比赛奖项"); + } TeamManagement teamManagement = new TeamManagement(); QueryWrapper queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, request.getParameterMap()); queryWrappertm.eq("enroll_code",list.get(i).getEnrollCode()); List listtm = teamManagementService.list(queryWrappertm); + try { for (int l = 0 ; l < listtm.size() ; l++){ SysUser sysUser = sysUserService.getById(listtm.get(l).getUserId()); list.get(i).setStudentorg(sysDepartService.queryDepartsByUsername(sysUser.getUsername()).get(0).getId()); @@ -555,6 +559,9 @@ public class AwardPersionController extends JeecgController queryWrapper = QueryGenerator.initQueryWrapper(chaoseTopicPersion, req.getParameterMap()); + //根据当前登录信息查询题目id,用list去接受 + List topicid =gettopicid(); + if (topicid.isEmpty()){ + return Result.error("请检查比赛流程,未发现选题信息。"); + } + queryWrapper.in("timul",topicid); Page page = new Page<>(pageNo, pageSize); IPage pageList = chaoseTopicPersionService.page(page, queryWrapper); List chooseDtos = new ArrayList<>(); @@ -131,6 +149,53 @@ public class ChaoseTopicPersionController extends JeecgController gettopicid() { + List topicids = new ArrayList<>(); + LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + //根据登录信息查询负责比赛 + List compList =compService.query().eq("comp_admin",loginUser.getUsername()).list(); + //判空 + if (compList.isEmpty()){ + return topicids; + } + //将比赛的id放进一个list里面 + List compIds = compList.stream() + .map(Comp::getId) // 使用方法引用获取每个Comp对象的id + .collect(Collectors.toList()); // 收集到List中 + //根据比赛的id查询年度比赛id,这里没有去卡年度 + List annualCompList = annualCompService.query().in("compid",compIds).list(); + //判空 + if (annualCompList.isEmpty()){ + return topicids; + } + //将年度比赛id存放到一个list里面 + List anncompIds = annualCompList.stream() + .map(AnnualComp::getId) // 使用方法引用获取每个Comp对象的id + .collect(Collectors.toList()); // 收集到List中 + List annualCompPointList = annualCompPointService.query().in("annual_comp_id", anncompIds).list(); + //判空 + if (annualCompPointList.isEmpty()){ + return topicids; + } + //将年度比赛项目id存放到一个list里面 + List anncomppointIds = annualCompPointList.stream() + .map(AnnualCompPoint::getId) // 使用方法引用获取每个Comp对象的id + .collect(Collectors.toList()); // 收集到List中 + + //根据年度比赛项目id查询题目 + List topicList = topicService.query().in("annual_compid",anncomppointIds).list(); + if (topicList.isEmpty()){ + return topicids; + } + topicids =topicList.stream() + .map(Topic::getId) // 使用方法引用获取每个Comp对象的id + .collect(Collectors.toList()); // 收集到List中 + + return topicids; + + } + @GetMapping(value = "/watch") public Result watch(String enrollCode) { QueryWrapper queryWrapper = new QueryWrapper<>(); diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/controller/CompController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/controller/CompController.java index daddfe2a..4a1d2820 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/controller/CompController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/controller/CompController.java @@ -205,6 +205,11 @@ public class CompController extends JeecgController { Integer compOrder = comp.getCompOrder(); String departIds = comp.getCompOrgan(); + List compListsss = compService.query().eq("comp_name",comp.getCompName()).list(); + if (compListsss.size()>0){ + return Result.error("这个比赛名称已存在,请确定比赛名称是否正确"); + } + List list = Arrays.asList(comp.getCompAdmin().split(",")); /* List list1 = new ArrayList<>(); @@ -266,7 +271,7 @@ public class CompController extends JeecgController { System.out.println(compList.get(i).getCompOrder()); int rankold = insertAndRank(parlint, String.valueOf(compList.get(i).getCompOrder())); int scoreold = (int) (( rankold+1) * b + compTypeService.getById(comp.getCompTypeId()).getScorel()); - compService.updatedate(compList.get(i).getId(),scoreold); + compService.updatedatework(compList.get(i).getId(),scoreold); } } /*--------------------------王家东添加开始============================*/ diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/mapper/CompMapper.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/mapper/CompMapper.java index 9cf7e291..c3a11b74 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/mapper/CompMapper.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/mapper/CompMapper.java @@ -30,5 +30,5 @@ public interface CompMapper extends BaseMapper { List getAllCompByType(String compTypeId); @Update("UPDATE comp SET compweight = #{scoreold} WHERE id=#{id}") - void updatedate(String id, int scoreold); + void updatedatework(String id, int scoreold); } diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/service/ICompService.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/service/ICompService.java index 04c22724..38aa93bc 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/service/ICompService.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/service/ICompService.java @@ -22,5 +22,5 @@ public interface ICompService extends IService { List getAllCompByType(String compTypeId); - void updatedate(String id, int scoreold); + void updatedatework(String id, int scoreold); } diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/service/impl/CompServiceImpl.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/service/impl/CompServiceImpl.java index 44a09494..40a9c41c 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/service/impl/CompServiceImpl.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/service/impl/CompServiceImpl.java @@ -42,7 +42,7 @@ public class CompServiceImpl extends ServiceImpl implements IC } @Override - public void updatedate(String id, int scoreold) { - compMapper.updatedate(id,scoreold); + public void updatedatework(String id, int scoreold) { + compMapper.updatedatework(id,scoreold); } } diff --git a/jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPoint.api.ts b/jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPoint.api.ts index 4dc2f7fb..5910f782 100644 --- a/jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPoint.api.ts +++ b/jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPoint.api.ts @@ -6,6 +6,9 @@ const {createConfirm} = useMessage(); enum Api { listZJ = '/AnnualCompPoint/annualCompPoint/listZJ', list = '/AnnualCompPoint/annualCompPoint/listAdmin', + listdsh = '/AnnualCompPoint/annualCompPoint/listdsh', + listdbh = '/AnnualCompPoint/annualCompPoint/listdbh', + listysh = '/AnnualCompPoint/annualCompPoint/listysh', save = '/AnnualCompPoint/annualCompPoint/add', edit = '/AnnualCompPoint/annualCompPoint/edit', deleteOne = '/AnnualCompPoint/annualCompPoint/delete', @@ -15,6 +18,12 @@ enum Api { updatePass = '/AnnualCompPoint/annualCompPoint/updatePass', } +//待审核 +export const listdsh = (params) => defHttp.get({ url: Api.listdsh, params }); +//带驳回 +export const listdbh = (params) => defHttp.get({ url: Api.listdbh, params }); +//带已审核 +export const listysh = (params) => defHttp.get({ url: Api.listysh, params }); /** * 导出api * @param params diff --git a/jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPoint.data.ts b/jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPoint.data.ts index 3b0db7d0..44e50c0d 100644 --- a/jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPoint.data.ts +++ b/jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPoint.data.ts @@ -59,6 +59,18 @@ export const columns: BasicColumn[] = [ return '待驳回'; case "4": return '已驳回'; + case "5": + return '已报名'; + case "6": + return '已选题'; + case "7": + return '已上传作品'; + case "8": + return '已评分'; + case "9": + return '已评奖'; + case "10": + return '积分已汇总'; default: return annualCompState.value; } diff --git a/jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPointListAwaitPass.vue b/jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPointListAwaitPass.vue index 94d8d398..14da6e08 100644 --- a/jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPointListAwaitPass.vue +++ b/jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPointListAwaitPass.vue @@ -63,7 +63,7 @@ import {BasicTable, useTable, TableAction} from '/@/components/Table'; import {useListPage} from '/@/hooks/system/useListPage'; import {columns} from './AnnualCompPoint.data'; import { - list, + listdsh, deleteOne, batchDelete, getImportUrl, @@ -87,7 +87,7 @@ const registerModal = ref(); const {prefixCls, tableContext, onExportXls, onImportXls} = useListPage({ tableProps: { title: '年度比赛项目管理', - api: list, + api: listdsh, columns, canResize: false, useSearchForm: false, @@ -96,7 +96,6 @@ const {prefixCls, tableContext, onExportXls, onImportXls} = useListPage({ fixed: 'right', }, beforeFetch: (params) => { - queryParam.annualCompState=1; return Object.assign(params, queryParam); }, }, diff --git a/jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPointListAwaitReject.vue b/jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPointListAwaitReject.vue index 79963da0..9e08d984 100644 --- a/jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPointListAwaitReject.vue +++ b/jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPointListAwaitReject.vue @@ -64,7 +64,7 @@ import {BasicTable, useTable, TableAction} from '/@/components/Table'; import {useListPage} from '/@/hooks/system/useListPage'; import {columns} from './AnnualCompPoint.data'; import { - list, + listdbh, deleteOne, batchDelete, getImportUrl, @@ -90,7 +90,7 @@ const registerModal1 = ref(); const {prefixCls, tableContext, onExportXls, onImportXls} = useListPage({ tableProps: { title: '年度比赛项目管理', - api: list, + api: listdbh, columns, canResize: false, useSearchForm: false, @@ -99,7 +99,6 @@ const {prefixCls, tableContext, onExportXls, onImportXls} = useListPage({ fixed: 'right', }, beforeFetch: (params) => { - queryParam.annualCompState=3; return Object.assign(params, queryParam); }, }, diff --git a/jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPointListPass.vue b/jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPointListPass.vue index a144a693..807740cd 100644 --- a/jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPointListPass.vue +++ b/jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPointListPass.vue @@ -63,7 +63,7 @@ import {BasicTable, useTable, TableAction} from '/@/components/Table'; import {useListPage} from '/@/hooks/system/useListPage'; import {columns} from './AnnualCompPoint.data'; import { - list, + listysh, deleteOne, batchDelete, getImportUrl, @@ -87,7 +87,7 @@ const registerModal = ref(); const {prefixCls, tableContext, onExportXls, onImportXls} = useListPage({ tableProps: { title: '年度比赛项目管理', - api: list, + api: listysh, // api: () => list({ ...params, compStatus: compStatus }), columns, canResize: false, @@ -97,7 +97,6 @@ const {prefixCls, tableContext, onExportXls, onImportXls} = useListPage({ fixed: 'right', }, beforeFetch: (params) => { - queryParam.annualCompState=2; return Object.assign(params, queryParam); }, },