main
王家东 4 months ago
parent 4ba49e8453
commit 0a2c110591
  1. 47
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/chooseTopicPersion/controller/ChaoseTopicPersionController.java
  2. 1
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/chooseTopicPersion/entity/ChooseEdit.java
  3. 2
      jeecgboot-vue3-master/src/views/chooseTopicPersion/ChaoseTopicPersion.api.ts
  4. 4
      jeecgboot-vue3-master/src/views/chooseTopicPersion/ChaoseTopicPersionList.vue
  5. 4
      jeecgboot-vue3-master/src/views/chooseTopicPersion/components/ChaoseTopicPersionForm.vue

@ -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 {

@ -17,4 +17,5 @@ public class ChooseEdit {
private String enrollCode;
private String status;
private String black;
private String topicid;
}

@ -66,7 +66,7 @@ export const batchDelete = (params, handleSuccess) => {
});
}
export const update = (params) => {
return defHttp.post({ url: Api.edit1, params });
return defHttp.post({ url: Api.save, params });
}
export const update1 = (params) => {
return defHttp.post({ url: Api.edit1, params }, { isTransformResponse: false });

@ -65,7 +65,7 @@ import {useListPage} from '/@/hooks/system/useListPage';
import {columns} from './ChaoseTopicPersion.data';
import {
list,
update,
update1,
deleteOne,
batchDelete,
getImportUrl,
@ -140,7 +140,7 @@ function handleAdd() {
*/
function handleEdit1(record: Recordable) {
console.log(record, "111112")
update({enrollCode: record.bmcode, status: 2})
update1({enrollCode: record.bmcode, status: 2})
reload()
}

@ -22,7 +22,7 @@
<!-- {{formData1}}-->
<a-select
v-if="isTimeSelect"
v-model:value="formData.id"
v-model:value="formData.timul"
style="width: 400px" :disabled="formData.status!=0&&formData.status!=3"
:default-value="formData.id"
@change="selectChange"
@ -125,7 +125,7 @@ function add(route) {
}
function click1(status1) {
console.log(formData)
update({enrollCode: formData.bmcode,status:status1,topicid :formData.timul})
update({enrollCode: formData.bmcode,status:status1,topicid : formData.timul})
emit('up');
}
/**

Loading…
Cancel
Save