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