|
|
@ -153,6 +153,22 @@ public class CompController extends JeecgController<Comp, ICompService> { |
|
|
|
} |
|
|
|
} |
|
|
|
String join = Joiner.on(",").join(list1); |
|
|
|
String join = Joiner.on(",").join(list1); |
|
|
|
comp.setCompAdmin(join); |
|
|
|
comp.setCompAdmin(join); |
|
|
|
|
|
|
|
/*--------------------------王家东添加开始============================*/ |
|
|
|
|
|
|
|
//获取比赛类型
|
|
|
|
|
|
|
|
Double comptypeweight = compTypeService.getById(comp.getCompTypeId()).getScore(); |
|
|
|
|
|
|
|
int comptyp = (int) Math.round(comptypeweight); |
|
|
|
|
|
|
|
//得到排序排序加大一便将比赛类型数据减一,最大值是10
|
|
|
|
|
|
|
|
int csort; |
|
|
|
|
|
|
|
if (comp.getCompOrder()==10 || comp.getCompOrder()>10){ |
|
|
|
|
|
|
|
csort = comptyp - 10; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
csort =comptyp - comp.getCompOrder(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
comp.setCompweight(csort); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*--------------------------王家东添加开始============================*/ |
|
|
|
compService.save(comp); |
|
|
|
compService.save(comp); |
|
|
|
return Result.OK("添加成功!"); |
|
|
|
return Result.OK("添加成功!"); |
|
|
|
} |
|
|
|
} |
|
|
@ -168,6 +184,22 @@ public class CompController extends JeecgController<Comp, ICompService> { |
|
|
|
// @RequiresPermissions("comp::comp::update")
|
|
|
|
// @RequiresPermissions("comp::comp::update")
|
|
|
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
|
|
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
|
|
|
public Result<String> edit(@RequestBody Comp comp) { |
|
|
|
public Result<String> edit(@RequestBody Comp comp) { |
|
|
|
|
|
|
|
/*--------------------------王家东添加开始============================*/ |
|
|
|
|
|
|
|
//获取比赛类型
|
|
|
|
|
|
|
|
Double comptypeweight = compTypeService.getById(comp.getCompTypeId()).getScore(); |
|
|
|
|
|
|
|
int comptyp = (int) Math.round(comptypeweight); |
|
|
|
|
|
|
|
//得到排序排序加大一便将比赛类型数据减一,最大值是10
|
|
|
|
|
|
|
|
int csort; |
|
|
|
|
|
|
|
if (comp.getCompOrder()==10 || comp.getCompOrder()>10){ |
|
|
|
|
|
|
|
csort = comptyp - 10; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
csort =comptyp - comp.getCompOrder(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
comp.setCompweight(csort); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*--------------------------王家东添加开始============================*/ |
|
|
|
compService.updateById(comp); |
|
|
|
compService.updateById(comp); |
|
|
|
return Result.OK("编辑成功!"); |
|
|
|
return Result.OK("编辑成功!"); |
|
|
|
} |
|
|
|
} |
|
|
|