|
|
@ -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.annualCompPoint.service.IAnnualCompPointService; |
|
|
|
import org.jeecg.modules.demo.annualcompetitionprojectregistration.entity.AnnualCompetitionProjectRegistration; |
|
|
|
import org.jeecg.modules.demo.annualcompetitionprojectregistration.entity.AnnualCompetitionProjectRegistration; |
|
|
|
import org.jeecg.modules.demo.annualcompetitionprojectregistration.service.IAnnualCompetitionProjectRegistrationService; |
|
|
|
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.entity.Topic; |
|
|
|
import org.jeecg.modules.demo.topic.service.ITopicService; |
|
|
|
import org.jeecg.modules.demo.topic.service.ITopicService; |
|
|
|
|
|
|
|
|
|
|
@ -58,8 +56,6 @@ public class TopicController extends JeecgController<Topic, ITopicService> { |
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
private IAnnualCompetitionProjectRegistrationService annualCompetitionProjectRegistrationService; |
|
|
|
private IAnnualCompetitionProjectRegistrationService annualCompetitionProjectRegistrationService; |
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
private IAnnualCompGroupService annualCompGroupService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
|
|
private IAnnComGroTopService annComGroTopService; |
|
|
|
private IAnnComGroTopService annComGroTopService; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -88,84 +84,8 @@ public class TopicController extends JeecgController<Topic, ITopicService> { |
|
|
|
return Result.OK(pageList); |
|
|
|
return Result.OK(pageList); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//@AutoLog(value = "题目管理-分页列表查询")
|
|
|
|
|
|
|
|
@ApiOperation(value = "设置题目", notes = "设置题目") |
|
|
|
|
|
|
|
@GetMapping(value = "/szlist") |
|
|
|
|
|
|
|
public Result<IPage<Topic>> 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<Topic> 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<AnnComGroTop> queryWrapper1 = QueryGenerator.initQueryWrapper(annComGroTop, req.getParameterMap()); |
|
|
|
|
|
|
|
queryWrapper1.eq("ann_com_p_g",ndbsxzid); |
|
|
|
|
|
|
|
List<AnnComGroTop> listagt = annComGroTopService.list(queryWrapper1); |
|
|
|
|
|
|
|
String str = ""; |
|
|
|
|
|
|
|
for(int i = 0 ; i<listagt.size();i++){ |
|
|
|
|
|
|
|
str = str+listagt.get(i).getTopid()+","; |
|
|
|
|
|
|
|
queryWrapper.notIn("id",str.split(",")); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
Page<Topic> page = new Page<Topic>(pageNo, pageSize); |
|
|
|
|
|
|
|
IPage<Topic> pageList = topicService.page(page, queryWrapper); |
|
|
|
|
|
|
|
return Result.OK(pageList); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 添加 |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @return |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
@AutoLog(value = "设置题目添加") |
|
|
|
|
|
|
|
@ApiOperation(value="设置题目添加", notes="设置题目添加") |
|
|
|
|
|
|
|
//@RequiresPermissions("expert:expert:add")
|
|
|
|
|
|
|
|
@GetMapping(value = "/szadd") |
|
|
|
|
|
|
|
public Result<String> 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<AnnComGroTop> 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<AnnComGroTop> list = annComGroTopService.list(queryWrapper); |
|
|
|
|
|
|
|
if(list.size()==0){ |
|
|
|
|
|
|
|
Topic topic = new Topic(); |
|
|
|
|
|
|
|
QueryWrapper<Topic> queryWrappertopic = QueryGenerator.initQueryWrapper(topic, req.getParameterMap()); |
|
|
|
|
|
|
|
queryWrappertopic.eq("annual_compid",annualCompGroup.getAnnCompP()); |
|
|
|
|
|
|
|
List<Topic> 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 = "题目管理-分页列表查询")
|
|
|
|
// @ApiOperation(value = "题目管理-教务处待审核", notes = "题目管理-分页列表查询")
|
|
|
|
// @GetMapping(value = "/list1")
|
|
|
|
// @GetMapping(value = "/list1")
|
|
|
|