| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import cn.hutool.core.lang.UUID; |
| | | import com.baomidou.mybatisplus.core.toolkit.IdWorker; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.dto.ReportPageDto; |
| | | import com.yuanchu.mom.dto.SampleOrderDto; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.service.InsReportService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | |
| | | import java.io.File; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | |
| | | |
| | | @Value("${wordUrl}") |
| | | private String wordUrl; |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "查询检验报告数据") |
| | | @PostMapping("/pageInsReport") |
| | | public Result pageInsReport(@RequestBody Map<String, Object> data) throws Exception { |
| | |
| | | return Result.success(insReportService.pageInsReport(page, reportPageDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "Word转HTML") |
| | | @PostMapping("/wordToHtml") |
| | | @ValueAuth |
| | | public Result wordToHtml(String path) { |
| | | return Result.success("转换成功", insReportService.wordToHtml(path)); |
| | | } |
| | | |
| | | @ApiOperation(value = "报告上传") |
| | | @PostMapping("/inReport") |
| | | @ValueAuth |
| | | public Result inReport(MultipartFile file, Integer id) { |
| | | String urlString; |
| | | String pathName; |
| | |
| | | throw new ErrorException("文件上传失败"); |
| | | } |
| | | } |
| | | |
| | | @ValueClassify("报告编制") |
| | | @ApiOperation(value = "报告还原") |
| | | @PostMapping("/upReportUrl") |
| | | public Result upReportUrl(Integer id) { |
| | | return Result.success(insReportService.upReportUrl(id)); |
| | | } |
| | | |
| | | @ValueClassify("报告编制") |
| | | @ApiOperation(value = "报告在线编制") |
| | | @GetMapping("/upReportFile") |
| | | public Result upReportFile() { |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "提交编制内容") |
| | | @PostMapping("/upReportWriteState") |
| | | public Result<?> upReportWriteState(Integer id){ |
| | | return null; |
| | | @ValueClassify("报告编制") |
| | | @ApiOperation(value = "提交") |
| | | @PostMapping("/writeReport") |
| | | public Result writeReport(Integer id) { |
| | | return Result.success(insReportService.writeReport(id)); |
| | | } |
| | | @ValueClassify("报告编制") |
| | | @ApiOperation(value = "审核") |
| | | @PostMapping("/examineReport") |
| | | public Result examineReport(Integer id, Integer isExamine, String examineTell) { |
| | | return Result.success(insReportService.examineReport(id, isExamine, examineTell)); |
| | | } |
| | | @ValueClassify("报告编制") |
| | | @ApiOperation(value = "批准") |
| | | @PostMapping("/ratifyReport") |
| | | public Result ratifyReport(Integer id, Integer isRatify, String ratifyTell) { |
| | | return Result.success(insReportService.ratifyReport(id, isRatify, ratifyTell)); |
| | | } |
| | | |
| | | } |