|
|
@ -113,6 +113,7 @@ public class ChaoseTopicPersionController extends JeecgController<ChaoseTopicPer |
|
|
|
List<DictModel> newList = chooseTopicPersionStatus.get("choose_topic_persion_status"); |
|
|
|
List<DictModel> newList = chooseTopicPersionStatus.get("choose_topic_persion_status"); |
|
|
|
DictModel dictModel = newList.get(0); |
|
|
|
DictModel dictModel = newList.get(0); |
|
|
|
String value = dictModel.getText(); |
|
|
|
String value = dictModel.getText(); |
|
|
|
|
|
|
|
if (topicPersion.getTimul()!=null && topicPersion.getBmcode()!=null) { |
|
|
|
dto.setBmcode(bmcode); |
|
|
|
dto.setBmcode(bmcode); |
|
|
|
dto.setTimul(topicPersion.getTimul()); |
|
|
|
dto.setTimul(topicPersion.getTimul()); |
|
|
|
dto.setTimul_dictText(topicService.getById(topicPersion.getTimul()).getName()); |
|
|
|
dto.setTimul_dictText(topicService.getById(topicPersion.getTimul()).getName()); |
|
|
@ -124,6 +125,7 @@ public class ChaoseTopicPersionController extends JeecgController<ChaoseTopicPer |
|
|
|
dto.setEntryFormat(one.getEntryFormat()); |
|
|
|
dto.setEntryFormat(one.getEntryFormat()); |
|
|
|
dto.setEntryFormat_dictText(one.getEntryFormat().equals("0") ? "个人" : "团队"); |
|
|
|
dto.setEntryFormat_dictText(one.getEntryFormat().equals("0") ? "个人" : "团队"); |
|
|
|
dto.setTeamName(one.getTeamName()); |
|
|
|
dto.setTeamName(one.getTeamName()); |
|
|
|
|
|
|
|
} |
|
|
|
chooseDtos.add(dto); |
|
|
|
chooseDtos.add(dto); |
|
|
|
} |
|
|
|
} |
|
|
|
return Result.OK(chooseDtos); |
|
|
|
return Result.OK(chooseDtos); |
|
|
@ -232,12 +234,18 @@ public class ChaoseTopicPersionController extends JeecgController<ChaoseTopicPer |
|
|
|
@ApiOperation(value = "比赛选题-添加", notes = "比赛选题-添加") |
|
|
|
@ApiOperation(value = "比赛选题-添加", notes = "比赛选题-添加") |
|
|
|
// @RequiresPermissions("chooseTopicPersion:chaose_topic_persion:add")
|
|
|
|
// @RequiresPermissions("chooseTopicPersion:chaose_topic_persion:add")
|
|
|
|
@PostMapping(value = "/add") |
|
|
|
@PostMapping(value = "/add") |
|
|
|
public Result<String> add(@RequestBody ChaoseTopicPersion chaoseTopicPersion) { |
|
|
|
public Result<String> add(@RequestBody ChooseEdit chooseEdit) { |
|
|
|
|
|
|
|
System.out.println(chooseEdit); |
|
|
|
|
|
|
|
ChaoseTopicPersion chaoseTopicPersion = new ChaoseTopicPersion(); |
|
|
|
|
|
|
|
String enrollCode = chooseEdit.getEnrollCode(); |
|
|
|
|
|
|
|
chaoseTopicPersion.setBmcode(enrollCode); |
|
|
|
|
|
|
|
chaoseTopicPersion.setTimul(chooseEdit.getTopicid()); |
|
|
|
|
|
|
|
chaoseTopicPersion.setStatus(chooseEdit.getStatus()); |
|
|
|
QueryWrapper<ChaoseTopicPersion> queryWrapper = new QueryWrapper<>(); |
|
|
|
QueryWrapper<ChaoseTopicPersion> queryWrapper = new QueryWrapper<>(); |
|
|
|
queryWrapper.eq("bmcode", chaoseTopicPersion.getBmcode()); |
|
|
|
queryWrapper.eq("bmcode", enrollCode); |
|
|
|
ChaoseTopicPersion one = chaoseTopicPersionService.getOne(queryWrapper); |
|
|
|
List<ChaoseTopicPersion> one = chaoseTopicPersionService.list(queryWrapper); |
|
|
|
if (one != null) { |
|
|
|
if (one.size()>0) { |
|
|
|
return Result.OK("添加失败!"); |
|
|
|
return Result.OK("当前不可选题!"); |
|
|
|
} |
|
|
|
} |
|
|
|
chaoseTopicPersionService.save(chaoseTopicPersion); |
|
|
|
chaoseTopicPersionService.save(chaoseTopicPersion); |
|
|
|
return Result.OK("添加成功!"); |
|
|
|
return Result.OK("添加成功!"); |
|
|
@ -268,12 +276,7 @@ public class ChaoseTopicPersionController extends JeecgController<ChaoseTopicPer |
|
|
|
QueryWrapper<ChaoseTopicPersion> queryWrapper = new QueryWrapper<>(); |
|
|
|
QueryWrapper<ChaoseTopicPersion> queryWrapper = new QueryWrapper<>(); |
|
|
|
queryWrapper.eq("bmcode", enrollCode); |
|
|
|
queryWrapper.eq("bmcode", enrollCode); |
|
|
|
ChaoseTopicPersion one = chaoseTopicPersionService.getOne(queryWrapper); |
|
|
|
ChaoseTopicPersion one = chaoseTopicPersionService.getOne(queryWrapper); |
|
|
|
if(one.getBmcode().isEmpty()){ |
|
|
|
|
|
|
|
ChaoseTopicPersion chaoseTopicPersion = new ChaoseTopicPersion(); |
|
|
|
|
|
|
|
chaoseTopicPersion.setBmcode(enrollCode); |
|
|
|
|
|
|
|
one.setStatus(status); |
|
|
|
one.setStatus(status); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (status.equals("3")) { |
|
|
|
if (status.equals("3")) { |
|
|
|
one.setBlack(black); |
|
|
|
one.setBlack(black); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|