|
@@ -3,6 +3,8 @@ package com.jeeplus.test.program.configuration.projectList.controller;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.jeeplus.aop.demo.annotation.DemoMode;
|
|
|
+import com.jeeplus.aop.logging.annotation.ApiLog;
|
|
|
import com.jeeplus.common.utils.ResponseUtil;
|
|
|
import com.jeeplus.test.utils.FreemarkerUtil;
|
|
|
import freemarker.template.Configuration;
|
|
@@ -23,6 +25,7 @@ import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
import org.springframework.http.ResponseEntity;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
@@ -139,6 +142,22 @@ public class ProjectListController {
|
|
|
return ResponseEntity.ok(s);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 批量删除字典
|
|
|
+ */
|
|
|
+ @DemoMode
|
|
|
+ @ApiLog("批量删除项目信息")
|
|
|
+ @PreAuthorize("hasAuthority('program:registered:del')")
|
|
|
+ @DeleteMapping("delete")
|
|
|
+ public ResponseEntity delete(String ids) {
|
|
|
+ String idArray[] = ids.split ( "," );
|
|
|
+ for(String id: idArray){
|
|
|
+ projectListService.deleteById ( id );
|
|
|
+ }
|
|
|
+ return ResponseEntity.ok ( "删除信息成功!" );
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 合同信息列表查询
|
|
|
* @param dto
|
|
@@ -224,12 +243,19 @@ public class ProjectListController {
|
|
|
*/
|
|
|
@GetMapping("/exportFile")
|
|
|
@ApiOperation(value = "导出")
|
|
|
- public void exportFileUploadList(ProgramProjectListInfo info, HttpServletResponse response) throws Exception{
|
|
|
- List<ExportFileDto> infos = projectListService.exportList(info);
|
|
|
- EasyPoiUtil.exportExcel(infos, "项目登记列表信息", "项目登记列表信息", ExportFileDto.class, "", response );
|
|
|
+ public void exportFileUploadList(ProgramProjectListInfo info,String tabType, HttpServletResponse response) throws Exception{
|
|
|
+ List<ExportFileDto> infos = projectListService.exportList(info,tabType);
|
|
|
+ String title = "项目登记列表信息";
|
|
|
+ String sheetName = "项目登记列表信息";
|
|
|
+ if("2022".equals(tabType)){
|
|
|
+ title = "2022年" + title;
|
|
|
+ sheetName = "2022年" + sheetName;
|
|
|
+ }
|
|
|
+ EasyPoiUtil.exportExcel(infos, title, sheetName, ExportFileDto.class, "", response );
|
|
|
}
|
|
|
|
|
|
|
|
|
+
|
|
|
/**
|
|
|
* 根据项目id生成报告号
|
|
|
* @param id
|