|
|
|
@ -152,27 +152,35 @@ public class ChaoseTopicPersionController extends JeecgController<ChaoseTopicPer |
|
|
|
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
|
|
|
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
|
|
|
|
HttpServletRequest req,@RequestParam(name="xmtmid",required=true) String xmtmid) { |
|
|
|
|
AnnComGroTop annComGroTop = annComGroTopService.getById(xmtmid); |
|
|
|
|
QueryWrapper<UpfilePersion> queryWrapper = QueryGenerator.initQueryWrapper(upfilePersion, req.getParameterMap()); |
|
|
|
|
queryWrapper.eq("annual_id",annComGroTop.getAnnid()); |
|
|
|
|
queryWrapper.eq("annual_comp_point_id",annComGroTop.getAnnComP()); |
|
|
|
|
queryWrapper.eq("status","0"); |
|
|
|
|
AnnComGroTopP annComGroTopP = new AnnComGroTopP(); |
|
|
|
|
QueryWrapper<AnnComGroTopP> queryWrapperagt = QueryGenerator.initQueryWrapper(annComGroTopP, req.getParameterMap()); |
|
|
|
|
//queryWrapperagt.eq("ann_com_gro_topid",xmtmid);
|
|
|
|
|
queryWrapperagt.eq("annid",annComGroTop.getAnnid()); |
|
|
|
|
queryWrapperagt.eq("ann_com_p",annComGroTop.getAnnComP()); |
|
|
|
|
List<AnnComGroTopP> listact = annComGroTopPService.list(queryWrapperagt); |
|
|
|
|
String str = ""; |
|
|
|
|
for(int i = 0 ; i<listact.size();i++){ |
|
|
|
|
str = str+listact.get(i).getBmcode()+","; |
|
|
|
|
} |
|
|
|
|
if(str!=""){ |
|
|
|
|
queryWrapper.notIn("apply_code",str.split(",")); |
|
|
|
|
AnnComGroTop annComGroTop = new AnnComGroTop(); |
|
|
|
|
QueryWrapper<AnnComGroTop> queryWrappertop = QueryGenerator.initQueryWrapper(annComGroTop, req.getParameterMap()); |
|
|
|
|
queryWrappertop.eq("ann_com_p_g",xmtmid); |
|
|
|
|
List<AnnComGroTop> listtop = annComGroTopService.list(queryWrappertop); |
|
|
|
|
if(listtop.size()>0){ |
|
|
|
|
QueryWrapper<UpfilePersion> queryWrapper = QueryGenerator.initQueryWrapper(upfilePersion, req.getParameterMap()); |
|
|
|
|
queryWrapper.eq("annual_id",listtop.get(0).getAnnid()); |
|
|
|
|
queryWrapper.eq("annual_comp_point_id",listtop.get(0).getAnnComP()); |
|
|
|
|
queryWrapper.eq("status","0"); |
|
|
|
|
AnnComGroTopP annComGroTopP = new AnnComGroTopP(); |
|
|
|
|
QueryWrapper<AnnComGroTopP> queryWrapperagt = QueryGenerator.initQueryWrapper(annComGroTopP, req.getParameterMap()); |
|
|
|
|
//queryWrapperagt.eq("ann_com_gro_topid",xmtmid);
|
|
|
|
|
queryWrapperagt.eq("annid",listtop.get(0).getAnnid()); |
|
|
|
|
queryWrapperagt.eq("ann_com_p",listtop.get(0).getAnnComP()); |
|
|
|
|
List<AnnComGroTopP> listact = annComGroTopPService.list(queryWrapperagt); |
|
|
|
|
String str = ""; |
|
|
|
|
for(int i = 0 ; i<listact.size();i++){ |
|
|
|
|
str = str+listact.get(i).getBmcode()+","; |
|
|
|
|
} |
|
|
|
|
if(str!=""){ |
|
|
|
|
queryWrapper.notIn("apply_code",str.split(",")); |
|
|
|
|
} |
|
|
|
|
Page<UpfilePersion> page = new Page<>(pageNo, pageSize); |
|
|
|
|
IPage<UpfilePersion> pageList = upfilePersionService.page(page, queryWrapper); |
|
|
|
|
return Result.OK(pageList); |
|
|
|
|
}else{ |
|
|
|
|
return Result.OK(null); |
|
|
|
|
} |
|
|
|
|
Page<UpfilePersion> page = new Page<>(pageNo, pageSize); |
|
|
|
|
IPage<UpfilePersion> pageList = upfilePersionService.page(page, queryWrapper); |
|
|
|
|
return Result.OK(pageList); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -185,19 +193,31 @@ public class ChaoseTopicPersionController extends JeecgController<ChaoseTopicPer |
|
|
|
|
@ApiOperation(value = "报名编号-添加", notes = "报名编号-添加") |
|
|
|
|
// @RequiresPermissions("chooseTopicPersion:chaose_topic_persion:add")
|
|
|
|
|
@GetMapping(value = "/bmbhadd") |
|
|
|
|
public Result<String> bmbhadd(@RequestParam(name="ids",required=true) String ids,@RequestParam(name="xmtmid",required=true) String xmtmid) { |
|
|
|
|
public Result<String> bmbhadd(@RequestParam(name="ids",required=true) String ids,@RequestParam(name="xmtmid",required=true) String xmtmid,HttpServletRequest req) { |
|
|
|
|
String strs[] = ids.split(","); |
|
|
|
|
AnnComGroTop annComGroTop = annComGroTopService.getById(xmtmid); |
|
|
|
|
AnnComGroTop annComGroTop = new AnnComGroTop(); |
|
|
|
|
QueryWrapper<AnnComGroTop> queryWrapper = QueryGenerator.initQueryWrapper(annComGroTop, req.getParameterMap()); |
|
|
|
|
queryWrapper.eq("ann_com_p_g",xmtmid); |
|
|
|
|
List<AnnComGroTop> listtop = annComGroTopService.list(queryWrapper); |
|
|
|
|
for (int i = 0 ; i < strs.length ; i++){ |
|
|
|
|
UpfilePersion upfilePersion = upfilePersionService.getById(strs[i]); |
|
|
|
|
AnnComGroTopP annComGroTopP = new AnnComGroTopP(); |
|
|
|
|
annComGroTopP.setAnnComGroTopid(xmtmid); |
|
|
|
|
annComGroTopP.setBmcode(upfilePersion.getApplyCode()); |
|
|
|
|
annComGroTopP.setAnnid(annComGroTop.getAnnid()); |
|
|
|
|
annComGroTopP.setAnnComP(annComGroTop.getAnnComP()); |
|
|
|
|
annComGroTopP.setAnnComPG(annComGroTop.getAnnComPG()); |
|
|
|
|
annComGroTopP.setTopicName(upfilePersion.getTopicName()); |
|
|
|
|
annComGroTopPService.save(annComGroTopP); |
|
|
|
|
for (int k = 0 ; k < listtop.size() ;k++){ |
|
|
|
|
UpfilePersion upfilePersion = upfilePersionService.getById(strs[i]); |
|
|
|
|
ChaoseTopicPersion chaoseTopicPersion = new ChaoseTopicPersion(); |
|
|
|
|
QueryWrapper<ChaoseTopicPersion> queryWrapperctp = QueryGenerator.initQueryWrapper(chaoseTopicPersion, req.getParameterMap()); |
|
|
|
|
queryWrapperctp.eq("bmcode",upfilePersion.getApplyCode()); |
|
|
|
|
List<ChaoseTopicPersion> listctp = chaoseTopicPersionService.list(queryWrapperctp); |
|
|
|
|
if(listtop.get(k).getTopid().equals(listctp.get(0).getTimul())){ |
|
|
|
|
AnnComGroTopP annComGroTopP = new AnnComGroTopP(); |
|
|
|
|
annComGroTopP.setAnnComGroTopid(listtop.get(k).getId()); |
|
|
|
|
annComGroTopP.setBmcode(upfilePersion.getApplyCode()); |
|
|
|
|
annComGroTopP.setAnnid(listtop.get(k).getAnnid()); |
|
|
|
|
annComGroTopP.setAnnComP(listtop.get(k).getAnnComP()); |
|
|
|
|
annComGroTopP.setAnnComPG(listtop.get(k).getAnnComPG()); |
|
|
|
|
annComGroTopP.setTopicName(upfilePersion.getTopicName()); |
|
|
|
|
annComGroTopP.setTopid(listtop.get(k).getTopid()); |
|
|
|
|
annComGroTopPService.save(annComGroTopP); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return Result.OK("绑定成功!"); |
|
|
|
|
} |
|
|
|
|