diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcomp/controller/AnnualCompController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcomp/controller/AnnualCompController.java index 56b062a1..ecda6111 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcomp/controller/AnnualCompController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcomp/controller/AnnualCompController.java @@ -400,14 +400,9 @@ public class AnnualCompController extends JeecgController edit(@RequestBody AnnualComp annualComp) { - if (annualComp.getBackinfo() != null && annualComp.getBackinfo() != "") { - annualComp.setState("3"); - annualCompService.updateById(annualComp); - return Result.OK("驳回成功!"); - } else { annualCompService.updateById(annualComp); return Result.OK("编辑成功!"); - } + } @AutoLog(value = "年度比赛管理-驳回") diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/scorepersion/controller/ScorePersionController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/scorepersion/controller/ScorePersionController.java index 21a6f8a2..9f78ef94 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/scorepersion/controller/ScorePersionController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/scorepersion/controller/ScorePersionController.java @@ -286,7 +286,56 @@ public class ScorePersionController extends JeecgController queryWrappercomp = QueryGenerator.initQueryWrapper(comp, request.getParameterMap()); + queryWrappercomp.eq("comp_admin",user.getUsername()); + List list = compService.list(queryWrappercomp); + if(list.size()==0){ + return null; + } + List ids = list.stream().map(Comp::getId).collect(Collectors.toList()); + QueryWrapper queryWrapperAnnual = new QueryWrapper<>(); + queryWrapperAnnual.in(ids.size()!=0,"compid",ids); + List listAnnual = annualCompService.list(queryWrapperAnnual); + if(listAnnual.size()==0){ + return null; + } + List annualIds = listAnnual.stream().map(AnnualComp::getId).collect(Collectors.toList()); + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(scorePersion, request.getParameterMap()); + queryWrapper.in("annual_compid",annualIds); + + AnnualCompPoint annualCompPoint = new AnnualCompPoint(); + QueryWrapper queryWrapperacp = QueryGenerator.initQueryWrapper(annualCompPoint, request.getParameterMap()); + queryWrapperacp.in("annual_comp_id",annualIds); + queryWrapperacp.eq("annual_comp_switch","Y"); // 比赛必须是开启的 + List listacp = annualCompPointService.list(queryWrapperacp); + if(listacp.size()==0){ + return null; + } + List acpIds = listacp.stream().map(AnnualCompPoint::getId).collect(Collectors.toList()); + queryWrapper.in(acpIds.size()!=0,"annual_comp_p",acpIds); + // 过滤选中数据 + String selections = request.getParameter("selections"); + if (oConvertUtils.isNotEmpty(selections)) { + List selectionList = Arrays.asList(selections.split(",")); + queryWrapper.in("id",selectionList); + } + // Step.2 获取导出数据 + List exportList = scorePersionService.list(queryWrapper); + + // Step.3 AutoPoi 导出Excel + ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); + //此处设置的filename无效 ,前端会重更新设置一下 + mv.addObject(NormalExcelConstants.FILE_NAME, "成绩管理"); + mv.addObject(NormalExcelConstants.CLASS, ScorePersion.class); + //update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置-------------------- + ExportParams exportParams=new ExportParams("成绩管理" + "报表", "导出人:" + user.getRealname(), "成绩管理"); + exportParams.setImageBasePath(jeecgBaseConfig.getPath().getUpload()); + //update-end--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置---------------------- + mv.addObject(NormalExcelConstants.PARAMS,exportParams); + mv.addObject(NormalExcelConstants.DATA_LIST, exportList); + return mv; } /** diff --git a/jeecgboot-vue3-master/src/components/Form/index.ts b/jeecgboot-vue3-master/src/components/Form/index.ts index d6515c5b..75460b1b 100644 --- a/jeecgboot-vue3-master/src/components/Form/index.ts +++ b/jeecgboot-vue3-master/src/components/Form/index.ts @@ -14,7 +14,7 @@ export { default as ApiRadioGroup } from './src/components/ApiRadioGroup.vue'; export { default as JAreaLinkage } from './src/jeecg/components/JAreaLinkage.vue'; export { default as JSelectUser } from './src/jeecg/components/JSelectUser.vue'; export { default as JSelectDept } from './src/jeecg/components/JSelectDept.vue'; -// export { default as JCodeEditor } from './src/jeecg/components/JCodeEditor.vue'; + export { default as JCodeEditor } from './src/jeecg/components/JCodeEditor.vue'; export { default as JCategorySelect } from './src/jeecg/components/JCategorySelect.vue'; export { default as JSelectMultiple } from './src/jeecg/components/JSelectMultiple.vue'; export { default as JPopup } from './src/jeecg/components/JPopup.vue';