| | |
| | | import com.ycl.common.group.Add; |
| | | import com.ycl.common.group.Update; |
| | | import com.ycl.common.utils.ProjectCodeGenerator; |
| | | import com.ycl.common.utils.excel.OutputExcelUtils; |
| | | import com.ycl.domain.excel.ProjectExcelTemplate; |
| | | import com.ycl.domain.form.DocumentInfoForm; |
| | | import com.ycl.domain.form.ProjectInfoForm; |
| | | import com.ycl.domain.query.ProjectInfoQuery; |
| | |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.constraints.NotEmpty; |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public Result generateProjectCode() { |
| | | return Result.ok().data(ProjectCodeGenerator.generateProjectCode()); |
| | | }; |
| | | |
| | | @GetMapping("/getManagerFlag/{recordId}") |
| | | public Result getManagerFlag(@PathVariable("recordId") Integer recordId) { |
| | | return projectInfoService.getManagerFlag(recordId); |
| | | } |
| | | |
| | | /** |
| | | * 导出模板 |
| | | * @param response |
| | | * @return |
| | | */ |
| | | @PostMapping("/export/template") |
| | | public void exportTemplate(HttpServletResponse response, |
| | | @RequestBody List<String> fieldList |
| | | ) throws IOException { |
| | | OutputExcelUtils.export(response, "导入模板", "项目信息", null, ProjectExcelTemplate.class ,fieldList); |
| | | } |
| | | |
| | | } |