|
|
@ -337,6 +337,15 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint, |
|
|
|
@GetMapping(value = "/cjhz") |
|
|
|
@GetMapping(value = "/cjhz") |
|
|
|
public Result<String> cjhz(@RequestParam(name = "id", required = true) String id,HttpServletRequest req) { |
|
|
|
public Result<String> cjhz(@RequestParam(name = "id", required = true) String id,HttpServletRequest req) { |
|
|
|
AnnualCompPoint annualCompPoint = annualCompPointService.getById(id); |
|
|
|
AnnualCompPoint annualCompPoint = annualCompPointService.getById(id); |
|
|
|
|
|
|
|
QueryWrapper<ScorePersion> queryWrappersc = new QueryWrapper<>(); |
|
|
|
|
|
|
|
queryWrappersc.eq("annual_compid",annualCompPoint.getAnnualCompId()); |
|
|
|
|
|
|
|
queryWrappersc.eq("annual_comp_p",annualCompPoint.getId()); |
|
|
|
|
|
|
|
List<ScorePersion> listsc = scorePersionService.list(queryWrappersc); |
|
|
|
|
|
|
|
if(listsc.size()>0){ |
|
|
|
|
|
|
|
for (int k = 0 ; k < listsc.size() ; k++){ |
|
|
|
|
|
|
|
scorePersionService.removeById(listsc.get(k).getId()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
QueryWrapper<ExpScore> queryWrapper = new QueryWrapper<>(); |
|
|
|
QueryWrapper<ExpScore> queryWrapper = new QueryWrapper<>(); |
|
|
|
queryWrapper.select("bmcode,SUM(score) as score"); |
|
|
|
queryWrapper.select("bmcode,SUM(score) as score"); |
|
|
|
queryWrapper.eq("ann_com_p",id); |
|
|
|
queryWrapper.eq("ann_com_p",id); |
|
|
@ -516,12 +525,22 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint, |
|
|
|
if(list.size()==0){ |
|
|
|
if(list.size()==0){ |
|
|
|
return Result.error("未设置年度比赛奖项!"); |
|
|
|
return Result.error("未设置年度比赛奖项!"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
QueryWrapper<AwardPersion> queryWrapperap = new QueryWrapper<>(); |
|
|
|
|
|
|
|
queryWrapperap.eq("annal_comp",annualCompPoint.getAnnualCompId()); |
|
|
|
|
|
|
|
queryWrapperap.eq("annual_comp_p",annualCompPoint.getId()); |
|
|
|
|
|
|
|
List<AwardPersion> listap = awardPersionService.list(queryWrapperap); |
|
|
|
|
|
|
|
if(listap.size()>0){ |
|
|
|
|
|
|
|
for (int k = 0 ; k < listap.size() ; k++){ |
|
|
|
|
|
|
|
awardPersionService.removeById(listap.get(k).getId()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
QueryWrapper<ScorePersion> queryWrappersp = new QueryWrapper<>(); |
|
|
|
QueryWrapper<ScorePersion> queryWrappersp = new QueryWrapper<>(); |
|
|
|
queryWrappersp.eq("annualid",annualCompService.getById(annualCompPoint.getAnnualCompId()).getAnnualid()); |
|
|
|
queryWrappersp.eq("annualid",annualCompService.getById(annualCompPoint.getAnnualCompId()).getAnnualid()); |
|
|
|
queryWrappersp.eq("annual_compid",annualCompPoint.getAnnualCompId()); |
|
|
|
queryWrappersp.eq("annual_compid",annualCompPoint.getAnnualCompId()); |
|
|
|
queryWrappersp.eq("annual_comp_p",id); |
|
|
|
queryWrappersp.eq("annual_comp_p",id); |
|
|
|
queryWrappersp.orderByAsc("sort"); |
|
|
|
queryWrappersp.orderByAsc("sort"); |
|
|
|
List<ScorePersion> listsp = scorePersionService.list(queryWrappersp); |
|
|
|
List<ScorePersion> listsp = scorePersionService.list(queryWrappersp); |
|
|
|
|
|
|
|
try { |
|
|
|
for (int i = 0 ; i<list.size();i++){ |
|
|
|
for (int i = 0 ; i<list.size();i++){ |
|
|
|
if(list.get(i).getIsFirstPrize().equals("Y")){ |
|
|
|
if(list.get(i).getIsFirstPrize().equals("Y")){ |
|
|
|
String name1 = list.get(i).getFirstPrize(); |
|
|
|
String name1 = list.get(i).getFirstPrize(); |
|
|
@ -643,9 +662,12 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint, |
|
|
|
awardPersionService.save(awardPersion); |
|
|
|
awardPersionService.save(awardPersion); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
annualCompPoint.setIsPj(1); |
|
|
|
|
|
|
|
annualCompPointService.updateById(annualCompPoint); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}catch (Exception e){ |
|
|
|
|
|
|
|
return Result.error("参与评奖人数少于年度比赛奖项设置的数量"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
annualCompPoint.setIsPj(1); |
|
|
|
|
|
|
|
annualCompPointService.updateById(annualCompPoint); |
|
|
|
|
|
|
|
|
|
|
|
return Result.OK("成功!"); |
|
|
|
return Result.OK("成功!"); |
|
|
|
} |
|
|
|
} |
|
|
@ -684,6 +706,7 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint, |
|
|
|
queryWrappersp.eq("annual_comp_p",awardPersion.getAnnualCompP()); |
|
|
|
queryWrappersp.eq("annual_comp_p",awardPersion.getAnnualCompP()); |
|
|
|
queryWrappersp.orderByAsc("sort"); |
|
|
|
queryWrappersp.orderByAsc("sort"); |
|
|
|
List<ScorePersion> listsp = scorePersionService.list(queryWrappersp); |
|
|
|
List<ScorePersion> listsp = scorePersionService.list(queryWrappersp); |
|
|
|
|
|
|
|
try { |
|
|
|
for (int i = 0 ; i<list.size();i++){ |
|
|
|
for (int i = 0 ; i<list.size();i++){ |
|
|
|
if(list.get(i).getIsFirstPrize().equals("Y")){ |
|
|
|
if(list.get(i).getIsFirstPrize().equals("Y")){ |
|
|
|
String name1 = list.get(i).getFirstPrize(); |
|
|
|
String name1 = list.get(i).getFirstPrize(); |
|
|
@ -816,9 +839,12 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint, |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
annualCompPoint.setIsPj(1); |
|
|
|
|
|
|
|
annualCompPointService.updateById(annualCompPoint); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}catch (Exception e){ |
|
|
|
|
|
|
|
return Result.error("参与评奖人数少于年度比赛奖项设置的数量"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
annualCompPoint.setIsPj(1); |
|
|
|
|
|
|
|
annualCompPointService.updateById(annualCompPoint); |
|
|
|
|
|
|
|
|
|
|
|
return Result.OK("成功!"); |
|
|
|
return Result.OK("成功!"); |
|
|
|
} |
|
|
|
} |
|
|
|