| | |
| | | |
| | | import com.moral.api.pojo.bo.ExcelBO; |
| | | import com.moral.api.pojo.vo.excel.ExcelVo; |
| | | import com.moral.api.pojo.vo.excel.HnExcelVo; |
| | | import com.moral.api.pojo.vo.excel.SyExcelVo; |
| | | import com.moral.api.service.ExcelService; |
| | | import com.moral.api.service.HnExcelService; |
| | |
| | | return new ResultMessage(ResponseCodeEnum.SUCCESS.getCode(), ResponseCodeEnum.SUCCESS.getMsg(),syExcelVo); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 浑南区质量报告导出 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/hnExcelExport") |
| | | public ResultMessage hnExcelExport(Integer id) throws ParseException { |
| | | if (id==null){ |
| | | return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(), ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg()); |
| | | } |
| | | |
| | | HnExcelVo hnExcelVo = hnExcelService.hnExport(id); |
| | | if (hnExcelVo==null){ |
| | | return ResultMessage.fail(ResponseCodeEnum.TARGET_IS_NULL.getCode(), ResponseCodeEnum.TARGET_IS_NULL.getMsg()); |
| | | } |
| | | return new ResultMessage(ResponseCodeEnum.SUCCESS.getCode(), ResponseCodeEnum.SUCCESS.getMsg(),hnExcelVo); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 天数据补充 |
| | | * @param request |
| | | * @return |
| | | * @throws IOException |
| | | */ |
| | | @PostMapping("rexcelImport") |
| | | public ResultMessage rexcelImport(HttpServletRequest request) throws IOException { |
| | | |
| | | List<MultipartFile> files = ((MultipartHttpServletRequest) request).getFiles("files"); |
| | | |
| | | excelService.rexcelImport(files); |
| | | return ResultMessage.ok(1); |
| | | } |
| | | |
| | | |
| | | } |