Merge branch 'gst4base' of http://182.92.169.222:3000/zhc077/hnjd_comp into gst4base

gst4base
JayChou 2 months ago
commit 396c19dd29
  1. 7
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcomp/controller/AnnualCompController.java
  2. 51
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/scorepersion/controller/ScorePersionController.java
  3. 2
      jeecgboot-vue3-master/src/components/Form/index.ts

@ -400,14 +400,9 @@ public class AnnualCompController extends JeecgController<AnnualComp, IAnnualCom
//@RequiresPermissions("annualcomp:annual_comp:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> 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 = "年度比赛管理-驳回")

@ -286,7 +286,56 @@ public class ScorePersionController extends JeecgController<ScorePersion, IScore
//@RequiresPermissions("scorepersion:score_persion:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ScorePersion scorePersion) {
return super.exportXls(request, scorePersion, ScorePersion.class, "成绩管理");
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
Comp comp = new Comp();
QueryWrapper<Comp> queryWrappercomp = QueryGenerator.initQueryWrapper(comp, request.getParameterMap());
queryWrappercomp.eq("comp_admin",user.getUsername());
List<Comp> list = compService.list(queryWrappercomp);
if(list.size()==0){
return null;
}
List<String> ids = list.stream().map(Comp::getId).collect(Collectors.toList());
QueryWrapper<AnnualComp> queryWrapperAnnual = new QueryWrapper<>();
queryWrapperAnnual.in(ids.size()!=0,"compid",ids);
List<AnnualComp> listAnnual = annualCompService.list(queryWrapperAnnual);
if(listAnnual.size()==0){
return null;
}
List<String> annualIds = listAnnual.stream().map(AnnualComp::getId).collect(Collectors.toList());
QueryWrapper<ScorePersion> queryWrapper = QueryGenerator.initQueryWrapper(scorePersion, request.getParameterMap());
queryWrapper.in("annual_compid",annualIds);
AnnualCompPoint annualCompPoint = new AnnualCompPoint();
QueryWrapper<AnnualCompPoint> queryWrapperacp = QueryGenerator.initQueryWrapper(annualCompPoint, request.getParameterMap());
queryWrapperacp.in("annual_comp_id",annualIds);
queryWrapperacp.eq("annual_comp_switch","Y"); // 比赛必须是开启的
List<AnnualCompPoint> listacp = annualCompPointService.list(queryWrapperacp);
if(listacp.size()==0){
return null;
}
List<String> 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<String> selectionList = Arrays.asList(selections.split(","));
queryWrapper.in("id",selectionList);
}
// Step.2 获取导出数据
List<ScorePersion> 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;
}
/**

@ -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';

Loading…
Cancel
Save