From f367137583b21386ca7e3bed23f6bd66bdc6a90e Mon Sep 17 00:00:00 2001 From: Gitea Date: Wed, 20 Nov 2024 18:24:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../topic/controller/TopicController.java | 80 ------------------- 1 file changed, 80 deletions(-) diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/topic/controller/TopicController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/topic/controller/TopicController.java index d412ee2b..9ca77226 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/topic/controller/TopicController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/topic/controller/TopicController.java @@ -17,8 +17,6 @@ import org.jeecg.modules.demo.annualCompPoint.entity.AnnualCompPoint; import org.jeecg.modules.demo.annualCompPoint.service.IAnnualCompPointService; import org.jeecg.modules.demo.annualcompetitionprojectregistration.entity.AnnualCompetitionProjectRegistration; import org.jeecg.modules.demo.annualcompetitionprojectregistration.service.IAnnualCompetitionProjectRegistrationService; -import org.jeecg.modules.demo.annualcompgroup.entity.AnnualCompGroup; -import org.jeecg.modules.demo.annualcompgroup.service.IAnnualCompGroupService; import org.jeecg.modules.demo.topic.entity.Topic; import org.jeecg.modules.demo.topic.service.ITopicService; @@ -58,8 +56,6 @@ public class TopicController extends JeecgController { @Autowired private IAnnualCompetitionProjectRegistrationService annualCompetitionProjectRegistrationService; @Autowired - private IAnnualCompGroupService annualCompGroupService; - @Autowired private IAnnComGroTopService annComGroTopService; /** @@ -88,84 +84,8 @@ public class TopicController extends JeecgController { return Result.OK(pageList); } - //@AutoLog(value = "题目管理-分页列表查询") - @ApiOperation(value = "设置题目", notes = "设置题目") - @GetMapping(value = "/szlist") - public Result> szlist(Topic topic, - @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, - @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, - HttpServletRequest req,@RequestParam(name="ndbsxzid",required=true) String ndbsxzid) { - AnnualCompGroup annualCompGroup = annualCompGroupService.getById(ndbsxzid); - LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); - String orgCode = user.getOrgCode(); - topic.setSysOrgCode(orgCode); - QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(topic, req.getParameterMap()); - queryWrapper.eq("annual_compid",annualCompGroup.getAnnCompP()); - queryWrapper.eq("status",2); - queryWrapper.eq("isopen","Y"); - if (topicService.list(queryWrapper).size()==0){ - return Result.error("暂无年度比赛项目对应题目,请先去添加"); - }else { - AnnComGroTop annComGroTop = new AnnComGroTop(); - QueryWrapper queryWrapper1 = QueryGenerator.initQueryWrapper(annComGroTop, req.getParameterMap()); - queryWrapper1.eq("ann_com_p_g",ndbsxzid); - List listagt = annComGroTopService.list(queryWrapper1); - String str = ""; - for(int i = 0 ; i page = new Page(pageNo, pageSize); - IPage pageList = topicService.page(page, queryWrapper); - return Result.OK(pageList); - } - } - /** - * 添加 - * - * @return - */ - @AutoLog(value = "设置题目添加") - @ApiOperation(value="设置题目添加", notes="设置题目添加") - //@RequiresPermissions("expert:expert:add") - @GetMapping(value = "/szadd") - public Result szadd(@RequestParam(name="ndbsxzid",required=true) String ndbsxzid,HttpServletRequest req) { - AnnualCompGroup annualCompGroup = annualCompGroupService.getById(ndbsxzid); -/* String str[] =ids.split(","); - for (int i = 0 ; i < str.length;i++){ - AnnComGroTop annComGroTop = new AnnComGroTop(); - annComGroTop.setAnnid(annualCompGroup.getAnnal()); - annComGroTop.setAnnComP(annualCompGroup.getAnnCompP()); - annComGroTop.setAnnComPG(ndbsxzid); - annComGroTop.setTopid(str[i]); - annComGroTopService.save(annComGroTop); - }*/ - AnnComGroTop annComGroTopnew = new AnnComGroTop(); - QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(annComGroTopnew, req.getParameterMap()); - queryWrapper.eq("annid",annualCompGroup.getAnnal()); - queryWrapper.eq("ann_com_p",annualCompGroup.getAnnCompP()); - queryWrapper.eq("ann_com_p_g",ndbsxzid); - List list = annComGroTopService.list(queryWrapper); - if(list.size()==0){ - Topic topic = new Topic(); - QueryWrapper queryWrappertopic = QueryGenerator.initQueryWrapper(topic, req.getParameterMap()); - queryWrappertopic.eq("annual_compid",annualCompGroup.getAnnCompP()); - List listTopic = topicService.list(queryWrappertopic); - for (int i = 0 ; i < listTopic.size() ;i++){ - AnnComGroTop annComGroTop = new AnnComGroTop(); - annComGroTop.setAnnid(annualCompGroup.getAnnal()); - annComGroTop.setAnnComP(annualCompGroup.getAnnCompP()); - annComGroTop.setAnnComPG(ndbsxzid); - annComGroTop.setTopid(listTopic.get(i).getId()); - annComGroTopService.save(annComGroTop); - } - return Result.OK(ndbsxzid); - }else{ - return Result.OK(ndbsxzid); - } - } // @ApiOperation(value = "题目管理-教务处待审核", notes = "题目管理-分页列表查询") // @GetMapping(value = "/list1")