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