diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/scoresta/controller/ScoreStaController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/scoresta/controller/ScoreStaController.java index 0534484d..b276a960 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/scoresta/controller/ScoreStaController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/scoresta/controller/ScoreStaController.java @@ -126,6 +126,36 @@ public class ScoreStaController extends JeecgController addScoreSta(@RequestParam(name="topicid",required=true) String topicid,@RequestParam(name="acpid",required=true) String acpid,HttpServletRequest req) { + ScoreSta scoreSta = new ScoreSta(); + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(scoreSta, req.getParameterMap()); + queryWrapper.eq("annual_compid",acpid); + queryWrapper.eq("topicid",topicid); + List list = scoreStaService.list(queryWrapper); + if(list.size()==0){ + AnnualCompPoint annualCompPoint = annualCompPointService.getById(acpid); + AnnualComp annualComp = annualCompService.getById(annualCompPoint.getAnnualCompId()); + scoreSta.setAnnualId(annualComp.getAnnualid()); + scoreSta.setAnnalComp(annualComp.getId()); + scoreSta.setAnnualCompid(acpid); + scoreSta.setTopicid(topicid); + scoreStaService.save(scoreSta); + return Result.OK(scoreSta.getId()); + }else{ + return Result.OK(list.get(0).getId()); + } + + } + /** * 编辑 * 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 749523b7..e2e7136c 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 @@ -233,6 +233,35 @@ public class TopicController extends JeecgController { return Result.OK(list); } + @ApiOperation(value = "题目评分标准", notes = "题目评分标准-分页列表查询") + @GetMapping(value = "/list5") + public Result> list5(@RequestParam(name="acpid",required=true) String acpid,Topic topic, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, + HttpServletRequest req) { +/* LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + String orgCode = user.getOrgCode(); + topic.setSysOrgCode(orgCode);*/ + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(topic, req.getParameterMap()); + queryWrapper.eq("annual_compid",acpid); + Page page = new Page(pageNo, pageSize); + IPage pageList = topicService.page(page, queryWrapper); + if(pageList.getRecords().size()==0){ + Topic topic1 = new Topic(); + topic1.setAnnualCompid(acpid); + AnnualCompPoint annualCompPoint = annualCompPointService.getById(acpid); + topic1.setNumber("ZC"); + topic1.setName(annualCompPoint.getObjName()); + topic1.setStatus(2); + topic1.setIsopen("Y"); + topicService.save(topic1); + IPage pageList1 = topicService.page(page, queryWrapper); + return Result.OK(pageList1); + }else { + return Result.OK(pageList); + } + } + @PostMapping(value = "/select") public Result select(@RequestBody Topic topic) { QueryWrapper queryWrapper= new QueryWrapper<>(); diff --git a/jeecgboot-vue3-master/src/views/annualCompPoint/committee/AnnualCompPointList.vue b/jeecgboot-vue3-master/src/views/annualCompPoint/committee/AnnualCompPointList.vue index a1ab7c67..94b75e36 100644 --- a/jeecgboot-vue3-master/src/views/annualCompPoint/committee/AnnualCompPointList.vue +++ b/jeecgboot-vue3-master/src/views/annualCompPoint/committee/AnnualCompPointList.vue @@ -199,6 +199,15 @@ query: {annualCompPointId: record.id} }); } + /** + * 评分标准 + */ + function pfbz(record: Recordable) { + router.push({ + path: '/topic/topic/list5', + query: {acpid: record.id} + }); + } /** * 个人积分汇总 @@ -365,6 +374,10 @@ label: '作品管理', onClick: workManage.bind(null, record), }); + actions.unshift({ + label: '评分标准', + onClick: pfbz.bind(null, record), + }); // if (record.requireUploadWorks === 'Y' && record.annualCompState === "2") { // actions.unshift({ // label: '上传作品', diff --git a/jeecgboot-vue3-master/src/views/topic/Topic.api.ts b/jeecgboot-vue3-master/src/views/topic/Topic.api.ts index 5ef8f2f0..688d928c 100644 --- a/jeecgboot-vue3-master/src/views/topic/Topic.api.ts +++ b/jeecgboot-vue3-master/src/views/topic/Topic.api.ts @@ -8,6 +8,7 @@ enum Api { list1 = '/topic/topic/list1', list2 = '/topic/topic/list2', list3 = '/topic/topic/list3', + list5 = '/topic/topic/list5', select = '/topic/topic/select', save = '/topic/topic/add', edit = '/topic/topic/edit', @@ -15,6 +16,12 @@ enum Api { deleteBatch = '/topic/topic/deleteBatch', importExcel = '/topic/topic/importExcel', exportXls = '/topic/topic/exportXls', + addScoreSta = '/scoresta/scoreSta/addScoreSta', +} + +export const addScoreSta = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.addScoreSta; + return defHttp.get({ url: url, params }, { isTransformResponse: false }); } /** @@ -36,6 +43,7 @@ export const list = (params) => defHttp.get({url: Api.list, params}); export const list1 = (params) => defHttp.get({url: Api.list1, params}); export const list2 = (params) => defHttp.get({url: Api.list2, params}); export const list3 = (params) => defHttp.get({url: Api.list3, params}); +export const list5 = (params) => defHttp.get({url: Api.list5, params}); export const Update = (params) => defHttp.post({url: Api.edit, params}); export const select = (params) => defHttp.post({url: Api.select, params}); diff --git a/jeecgboot-vue3-master/src/views/topic/TopicList5.vue b/jeecgboot-vue3-master/src/views/topic/TopicList5.vue new file mode 100644 index 00000000..c9992421 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/topic/TopicList5.vue @@ -0,0 +1,292 @@ + + + + +