|
|
|
@ -216,7 +216,7 @@ public class AnnualCompGroupController extends JeecgController<AnnualCompGroup, |
|
|
|
|
*/ |
|
|
|
|
@ApiOperation(value="获取已有的题目id", notes="获取已有的题目id") |
|
|
|
|
@GetMapping(value = "/queryTmId") |
|
|
|
|
public Result<String> queryTmId(HttpServletRequest req,@RequestParam(name="ndid",required=true) String ndid,@RequestParam(name="ndbsid",required=true) String ndbsid,@RequestParam(name="ndbsxmid",required=true) String ndbsxmid) { |
|
|
|
|
public Result<String> queryTmId(HttpServletRequest req,@RequestParam(name="ndid",required=true) String ndid,@RequestParam(name="ndbsid",required=true) String ndbsid,@RequestParam(name="ndbsxmid",required=true) String ndbsxmid,@RequestParam(name="staid",required=true) String staid) { |
|
|
|
|
ScoreSta scoreSta = new ScoreSta(); |
|
|
|
|
QueryWrapper<ScoreSta> queryWrapper = QueryGenerator.initQueryWrapper(scoreSta, req.getParameterMap()); |
|
|
|
|
queryWrapper.eq("annual_id",ndid); |
|
|
|
@ -224,19 +224,39 @@ public class AnnualCompGroupController extends JeecgController<AnnualCompGroup, |
|
|
|
|
queryWrapper.eq("annual_compid",ndbsxmid); |
|
|
|
|
List<ScoreSta> list = scoreStaService.list(queryWrapper); |
|
|
|
|
String str = ""; |
|
|
|
|
for(int i = 0 ; i < list.size() ; i++){ |
|
|
|
|
if(list.size()==1){ |
|
|
|
|
str = "id!='"+list.get(i).getTopicid()+"'"; |
|
|
|
|
}else{ |
|
|
|
|
if(i==list.size()-1){ |
|
|
|
|
str = str + "id!='"+list.get(i).getTopicid()+"'";; |
|
|
|
|
}else { |
|
|
|
|
str = "id!='"+list.get(i).getTopicid()+"' and "+str; |
|
|
|
|
if(staid.equals("")){ |
|
|
|
|
for(int i = 0 ; i < list.size() ; i++){ |
|
|
|
|
if(list.size()==1){ |
|
|
|
|
str = "id!='"+list.get(i).getTopicid()+"'"; |
|
|
|
|
}else{ |
|
|
|
|
if(i==list.size()-1){ |
|
|
|
|
str = str + "id!='"+list.get(i).getTopicid()+"'";; |
|
|
|
|
}else { |
|
|
|
|
str = "id!='"+list.get(i).getTopicid()+"' and "+str; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}else { |
|
|
|
|
ScoreSta scoreSta1 = scoreStaService.getById(staid); |
|
|
|
|
for(int i = 0 ; i < list.size() ; i++){ |
|
|
|
|
if(list.size()==1){ |
|
|
|
|
if(!scoreSta1.getTopicid().equals(list.get(i).getTopicid())){ |
|
|
|
|
str = "id!='"+list.get(i).getTopicid()+"'"; |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
if(i==list.size()-1){ |
|
|
|
|
if(!scoreSta1.getTopicid().equals(list.get(i).getTopicid())){ |
|
|
|
|
str = str + "id!='"+list.get(i).getTopicid()+"'";; |
|
|
|
|
} |
|
|
|
|
}else { |
|
|
|
|
if(!scoreSta1.getTopicid().equals(list.get(i).getTopicid())){ |
|
|
|
|
str = "id!='"+list.get(i).getTopicid()+"' and "+str; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return Result.OK(str); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|