From a16880eb5b41427334b1e99d8ddb4ecf0b5d5bf2 Mon Sep 17 00:00:00 2001 From: Gitea Date: Thu, 4 Jul 2024 19:50:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=93=E5=AE=B6=E7=BB=91=E5=AE=9A=E4=BD=9C?= =?UTF-8?q?=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../anncomgrotopp/entity/AnnComGroTopP.java | 18 ++ .../ChaoseTopicPersionController.java | 33 +- .../topic/controller/TopicController.java | 22 +- .../views/anncomgrotopp/AnnComGroTopP.data.ts | 4 +- .../components/AnnComGroTopPModal.vue | 2 +- .../components/ChaoseTopicPersion.data.ts | 16 +- .../annualcompgroup/AnnualCompGroup.api.ts | 11 + .../annualcompgroup/AnnualCompGroupList.vue | 4 +- .../annualcompgroup/AnnualCompGroupList1.vue | 282 ++++++++++++++++++ 9 files changed, 363 insertions(+), 29 deletions(-) create mode 100644 jeecgboot-vue3-master/src/views/annualcompgroup/AnnualCompGroupList1.vue diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/anncomgrotopp/entity/AnnComGroTopP.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/anncomgrotopp/entity/AnnComGroTopP.java index f1c4408a..11edc91e 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/anncomgrotopp/entity/AnnComGroTopP.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/anncomgrotopp/entity/AnnComGroTopP.java @@ -72,4 +72,22 @@ public class AnnComGroTopP implements Serializable { @Excel(name = "已评专家数", width = 15) @ApiModelProperty(value = "已评专家数") private java.lang.Integer ypzj; + /**年度*/ + @Excel(name = "年度", width = 15, dictTable = "annual", dicText = "annual_name", dicCode = "id") + @Dict(dictTable = "annual", dicText = "annual_name", dicCode = "id") + @ApiModelProperty(value = "年度") + private java.lang.String annid; + /**年度比赛项目*/ + @Excel(name = "年度比赛项目", width = 15, dictTable = "annual_comp_point", dicText = "obj_name", dicCode = "id") + @Dict(dictTable = "annual_comp_point", dicText = "obj_name", dicCode = "id") + @ApiModelProperty(value = "年度比赛项目") + private java.lang.String annComP; + /**专家组*/ + @Excel(name = "专家组", width = 15, dictTable = "annual_comp_group", dicText = "name", dicCode = "id") + @Dict(dictTable = "annual_comp_group", dicText = "name", dicCode = "id") + @ApiModelProperty(value = "专家组") + private java.lang.String annComPG; + /**作品名称*/ + @ApiModelProperty(value = "作品名称") + private java.lang.String topicName; } diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/chooseTopicPersion/controller/ChaoseTopicPersionController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/chooseTopicPersion/controller/ChaoseTopicPersionController.java index 3e1802be..78759840 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/chooseTopicPersion/controller/ChaoseTopicPersionController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/chooseTopicPersion/controller/ChaoseTopicPersionController.java @@ -34,6 +34,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import lombok.extern.slf4j.Slf4j; import org.jeecg.modules.demo.topic.service.ITopicService; +import org.jeecg.modules.demo.upfile_persion.entity.UpfilePersion; +import org.jeecg.modules.demo.upfile_persion.service.IUpfilePersionService; import org.jeecgframework.poi.excel.ExcelImportUtil; import org.jeecgframework.poi.excel.def.NormalExcelConstants; import org.jeecgframework.poi.excel.entity.ExportParams; @@ -76,6 +78,8 @@ public class ChaoseTopicPersionController extends JeecgController> bmbhlist(ChaoseTopicPersion chaoseTopicPersion, + public Result> bmbhlist(UpfilePersion upfilePersion, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req,@RequestParam(name="xmtmid",required=true) String xmtmid) { AnnComGroTop annComGroTop = annComGroTopService.getById(xmtmid); - QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(chaoseTopicPersion, req.getParameterMap()); - queryWrapper.eq("timul",annComGroTop.getTopid()); - queryWrapper.eq("status","2"); + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(upfilePersion, req.getParameterMap()); + queryWrapper.eq("annual_id",annComGroTop.getAnnid()); + queryWrapper.eq("annual_comp_point_id",annComGroTop.getAnnComP()); + queryWrapper.eq("status","0"); AnnComGroTopP annComGroTopP = new AnnComGroTopP(); QueryWrapper queryWrapperagt = QueryGenerator.initQueryWrapper(annComGroTopP, req.getParameterMap()); //queryWrapperagt.eq("ann_com_gro_topid",xmtmid); - queryWrapperagt.eq("topid",annComGroTop.getTopid()); + queryWrapperagt.eq("annid",annComGroTop.getAnnid()); + queryWrapperagt.eq("ann_com_p",annComGroTop.getAnnComP()); List listact = annComGroTopPService.list(queryWrapperagt); String str = ""; for(int i = 0 ; i page = new Page<>(pageNo, pageSize); - IPage pageList = chaoseTopicPersionService.page(page, queryWrapper); + Page page = new Page<>(pageNo, pageSize); + IPage pageList = upfilePersionService.page(page, queryWrapper); return Result.OK(pageList); } @@ -182,12 +187,16 @@ public class ChaoseTopicPersionController extends JeecgController bmbhadd(@RequestParam(name="ids",required=true) String ids,@RequestParam(name="xmtmid",required=true) String xmtmid) { String strs[] = ids.split(","); + AnnComGroTop annComGroTop = annComGroTopService.getById(xmtmid); for (int i = 0 ; i < strs.length ; i++){ - ChaoseTopicPersion chaoseTopicPersion = chaoseTopicPersionService.getById(strs[i]); + UpfilePersion upfilePersion = upfilePersionService.getById(strs[i]); AnnComGroTopP annComGroTopP = new AnnComGroTopP(); annComGroTopP.setAnnComGroTopid(xmtmid); - annComGroTopP.setTopid(chaoseTopicPersion.getTimul()); - annComGroTopP.setBmcode(chaoseTopicPersion.getBmcode()); + annComGroTopP.setBmcode(upfilePersion.getApplyCode()); + annComGroTopP.setAnnid(annComGroTop.getAnnid()); + annComGroTopP.setAnnComP(annComGroTop.getAnnComP()); + annComGroTopP.setAnnComPG(annComGroTop.getAnnComPG()); + annComGroTopP.setTopicName(upfilePersion.getTopicName()); annComGroTopPService.save(annComGroTopP); } return Result.OK("绑定成功!"); diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/topic/controller/TopicController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/topic/controller/TopicController.java index 73501bbd..c0a66441 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/topic/controller/TopicController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/topic/controller/TopicController.java @@ -124,16 +124,15 @@ public class TopicController extends JeecgController { /** * 添加 * - * @param ids * @return */ @AutoLog(value = "设置题目添加") @ApiOperation(value="设置题目添加", notes="设置题目添加") //@RequiresPermissions("expert:expert:add") @GetMapping(value = "/szadd") - public Result szadd(@RequestParam(name="ids",required=true) String ids,@RequestParam(name="ndbsxzid",required=true) String ndbsxzid) { + public Result szadd(@RequestParam(name="ndbsxzid",required=true) String ndbsxzid,HttpServletRequest req) { AnnualCompGroup annualCompGroup = annualCompGroupService.getById(ndbsxzid); - String str[] =ids.split(","); +/* String str[] =ids.split(","); for (int i = 0 ; i < str.length;i++){ AnnComGroTop annComGroTop = new AnnComGroTop(); annComGroTop.setAnnid(annualCompGroup.getAnnal()); @@ -141,8 +140,23 @@ public class TopicController extends JeecgController { annComGroTop.setAnnComPG(ndbsxzid); annComGroTop.setTopid(str[i]); annComGroTopService.save(annComGroTop); + }*/ + AnnComGroTop annComGroTopnew = new AnnComGroTop(); + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(annComGroTopnew, req.getParameterMap()); + queryWrapper.eq("annid",annualCompGroup.getAnnal()); + queryWrapper.eq("ann_com_p",annualCompGroup.getAnnCompP()); + queryWrapper.eq("ann_com_p_g",ndbsxzid); + List list = annComGroTopService.list(queryWrapper); + if(list.size()==0){ + AnnComGroTop annComGroTop = new AnnComGroTop(); + annComGroTop.setAnnid(annualCompGroup.getAnnal()); + annComGroTop.setAnnComP(annualCompGroup.getAnnCompP()); + annComGroTop.setAnnComPG(ndbsxzid); + annComGroTopService.save(annComGroTop); + return Result.OK(annComGroTop.getId()); + }else{ + return Result.OK(list.get(0).getId()); } - return Result.OK("设置成功!"); } // @ApiOperation(value = "题目管理-教务处待审核", notes = "题目管理-分页列表查询") diff --git a/jeecgboot-vue3-master/src/views/anncomgrotopp/AnnComGroTopP.data.ts b/jeecgboot-vue3-master/src/views/anncomgrotopp/AnnComGroTopP.data.ts index 65c20717..8bd63f38 100644 --- a/jeecgboot-vue3-master/src/views/anncomgrotopp/AnnComGroTopP.data.ts +++ b/jeecgboot-vue3-master/src/views/anncomgrotopp/AnnComGroTopP.data.ts @@ -5,9 +5,9 @@ import { render } from '/@/utils/common/renderUtils'; //列表数据 export const columns: BasicColumn[] = [ { - title: '题目', + title: '作品名称', align: "center", - dataIndex: 'topid_dictText' + dataIndex: 'topicName' }, { title: '报名编号', diff --git a/jeecgboot-vue3-master/src/views/anncomgrotopp/components/AnnComGroTopPModal.vue b/jeecgboot-vue3-master/src/views/anncomgrotopp/components/AnnComGroTopPModal.vue index ae5d3c3c..2f6a0950 100644 --- a/jeecgboot-vue3-master/src/views/anncomgrotopp/components/AnnComGroTopPModal.vue +++ b/jeecgboot-vue3-master/src/views/anncomgrotopp/components/AnnComGroTopPModal.vue @@ -19,7 +19,7 @@ * 新增 */ function add() { - title.value = '绑定报名编号'; + title.value = '绑定作品'; visible.value = true; /* nextTick(() => { registerForm.value.add(); diff --git a/jeecgboot-vue3-master/src/views/anncomgrotopp/components/ChaoseTopicPersion.data.ts b/jeecgboot-vue3-master/src/views/anncomgrotopp/components/ChaoseTopicPersion.data.ts index 95aff3c7..68f54697 100644 --- a/jeecgboot-vue3-master/src/views/anncomgrotopp/components/ChaoseTopicPersion.data.ts +++ b/jeecgboot-vue3-master/src/views/anncomgrotopp/components/ChaoseTopicPersion.data.ts @@ -3,20 +3,20 @@ import {FormSchema} from '/@/components/Table'; //列表数据 export const columns: BasicColumn[] = [ { - title: '报名编号', + title: '作品名称', align: "center", - dataIndex: 'bmcode' + dataIndex: 'topicName' }, { - title: '题目', + title: '报名编号', align: "center", - dataIndex: 'timul_dictText' - }, - { + dataIndex: 'applyCode' + } +/* { title: '状态', align: "center", - dataIndex: 'status_dictText' - } + dataIndex: "待评分" + }*/ ]; //查询数据 export const searchFormSchema: FormSchema[] = [ diff --git a/jeecgboot-vue3-master/src/views/annualcompgroup/AnnualCompGroup.api.ts b/jeecgboot-vue3-master/src/views/annualcompgroup/AnnualCompGroup.api.ts index 9137c820..677c1406 100644 --- a/jeecgboot-vue3-master/src/views/annualcompgroup/AnnualCompGroup.api.ts +++ b/jeecgboot-vue3-master/src/views/annualcompgroup/AnnualCompGroup.api.ts @@ -12,6 +12,7 @@ enum Api { importExcel = '/annualcompgroup/annualCompGroup/importExcel', exportXls = '/annualcompgroup/annualCompGroup/exportXls', queryCompId = '/annualcompgroup/annualCompGroup/queryCompId', + saveTop = '/topic/topic/szadd', } /** @@ -73,3 +74,13 @@ export const saveOrUpdate = (params, isUpdate) => { let url = isUpdate ? Api.edit : Api.save; return defHttp.post({ url: url, params }, { isTransformResponse: false }); } + +/** + * 保存或者更新 + * @param params + * @param isUpdate + */ +export const saveOrUpdateTop = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.saveTop; + return defHttp.get({ url: url, params }, { isTransformResponse: false }); +} diff --git a/jeecgboot-vue3-master/src/views/annualcompgroup/AnnualCompGroupList.vue b/jeecgboot-vue3-master/src/views/annualcompgroup/AnnualCompGroupList.vue index f5963ec0..895f29ce 100644 --- a/jeecgboot-vue3-master/src/views/annualcompgroup/AnnualCompGroupList.vue +++ b/jeecgboot-vue3-master/src/views/annualcompgroup/AnnualCompGroupList.vue @@ -201,11 +201,11 @@ onClick: bdcy.bind(null, record), //this.$Router.push }, - { +/* { label: '设置题目', onClick: sztm.bind(null, record), //this.$Router.push - }, + },*/ ] } diff --git a/jeecgboot-vue3-master/src/views/annualcompgroup/AnnualCompGroupList1.vue b/jeecgboot-vue3-master/src/views/annualcompgroup/AnnualCompGroupList1.vue new file mode 100644 index 00000000..76289887 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/annualcompgroup/AnnualCompGroupList1.vue @@ -0,0 +1,282 @@ + + + + +