| | |
| | | import com.ruoyi.common.utils.file.FileUploadUtils; |
| | | import com.ruoyi.common.utils.file.FileUtils; |
| | | import com.ruoyi.domain.ArchiveRecords; |
| | | import com.ruoyi.domain.vo.AnalysisResult; |
| | | import com.ruoyi.framework.config.ServerConfig; |
| | | import com.ruoyi.service.IArchiveRecordsService; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | |
| | | return new AjaxResult(200, "查询成功", archiveRecordsService.statisticAya()); |
| | | } |
| | | |
| | | |
| | | @PreAuthorize("@ss.hasPermi('system:records:export')") |
| | | @Log(title = "档案分析结果导出", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/exportAllStatis") |
| | | public void exportAllStatis(HttpServletResponse response) |
| | | { |
| | | List<AnalysisResult> list = archiveRecordsService.statisticAya(); |
| | | ExcelUtil<AnalysisResult> util = new ExcelUtil<AnalysisResult>(AnalysisResult.class); |
| | | util.exportExcel(response, list, "档案分析结果"); |
| | | } |
| | | |
| | | /** |
| | | * 查询档案记录列表 |
| | |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody ArchiveRecords archiveRecords) |
| | | { |
| | | return toAjax(archiveRecordsService.insertArchiveRecords(archiveRecords)); |
| | | int res = archiveRecordsService.insertArchiveRecords(archiveRecords); |
| | | System.out.println(res); |
| | | if(res==0) { |
| | | System.out.println(res); |
| | | |
| | | return new AjaxResult(0, "档案号已经存在了!"); |
| | | } |
| | | else |
| | | return new AjaxResult(200, "添加成功了!"); |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | { |
| | | return toAjax(archiveRecordsService.updateArchiveRecords(archiveRecords)); |
| | | } |
| | | |
| | | @PreAuthorize("@ss.hasPermi('system:records:edit')") |
| | | @Log(title = "档案记录", businessType = BusinessType.UPDATE) |
| | | @PostMapping(value = "/updateSByIds") |
| | | public AjaxResult updateStatusByIds(@RequestBody Long[] ids) |
| | | { |
| | | System.out.println(ids); |
| | | System.out.println("090sdfsdf"); |
| | | return new AjaxResult(0, archiveRecordsService.updateStatusByIds(ids)+""); |
| | | } |
| | | /** |
| | | * 删除档案记录 |
| | | */ |
| | |
| | | return archiveRecordsService.importExcel(file); |
| | | } |
| | | |
| | | |
| | | @PreAuthorize("@ss.hasPermi('system:records:edit')") |
| | | @Log(title = "修改状态", businessType = BusinessType.IMPORT) |
| | | @GetMapping(value = "/updateStatusById/{id}") |
| | | public AjaxResult updateStatusById(@PathVariable("id") String id) |
| | | { |
| | | return new AjaxResult(200, archiveRecordsService.updateArchiveById(Long.parseLong(id))+""); |
| | | } |
| | | } |