| | |
| | | |
| | | @ApiOperation(value = "标准树下修改记录文件上传") |
| | | @PostMapping("/uploadRecordFile") |
| | | public Result uploadRecordFile(@RequestParam("file") MultipartFile file,Long recordId) { |
| | | standardProductListUpdateRecordService.uploadRecordFile(file,recordId); |
| | | public Result uploadRecordFile(@RequestParam("file") MultipartFile file,Long id) { |
| | | standardProductListUpdateRecordService.uploadRecordFile(file,id); |
| | | return Result.success(); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @ApiOperation("查询标准库是否存在审核中状态") |
| | | @GetMapping("/productListCheck") |
| | | @GetMapping("/existCheckingRecord") |
| | | public Result existCheckingRecord(){ |
| | | return Result.success(standardProductListService.existCheckingRecord()); |
| | | } |
| | |
| | | * 标准树下修改记录文件上传 |
| | | * |
| | | * @param file |
| | | * @param recordId |
| | | * @param id |
| | | */ |
| | | void uploadRecordFile(MultipartFile file,Long recordId); |
| | | void uploadRecordFile(MultipartFile file,Long id); |
| | | } |
| | |
| | | QueryWrapper<StandardProductList> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("check_status",StandardProductListChcekTypeEnums.WAIT_CHECK.getCode()); |
| | | List<StandardProductList> unCheckStandardProductListArray = standardProductListMapper.selectList(queryWrapper); |
| | | |
| | | if(CollectionUtils.isEmpty(unCheckStandardProductListArray)){ |
| | | throw new RuntimeException("暂无修改数据"); |
| | | } |
| | | List<Long> standardProductListIds = new ArrayList<>(); |
| | | // 插入修改记录 |
| | | standardProductListUpdateRecordMapper.insert(standardProductListUpdateRecord); |
| | |
| | | * 标准树下修改记录文件上传 |
| | | * |
| | | * @param file |
| | | * @param recordId |
| | | * @param id |
| | | */ |
| | | @Override |
| | | public void uploadRecordFile(MultipartFile file, Long recordId) { |
| | | public void uploadRecordFile(MultipartFile file, Long id) { |
| | | try { |
| | | MinioResult result = minioUtils.upload(bucketName, file, true); |
| | | // 保存路径 |
| | | StandardProductListUpdateRecord standardProductListUpdateRecord = new StandardProductListUpdateRecord(); |
| | | standardProductListUpdateRecord.setId(recordId); |
| | | standardProductListUpdateRecord.setId(id); |
| | | standardProductListUpdateRecord.setFileName(result.getOriginalName()); |
| | | standardProductListUpdateRecord.setFilePath(result.getBucketFileName()); |
| | | standardProductListUpdateRecord.setFilePreviewPath(result.getPreviewExpiry()); |