From b20f26652b83b3cee96451f61b3092e53c1b3d55 Mon Sep 17 00:00:00 2001 From: pang.jiabao <pang_jiabao@163.com> Date: 星期三, 14 八月 2024 20:34:50 +0800 Subject: [PATCH] 合格品校验 --- src/main/java/com/zy/asrs/controller/OrderController.java | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/zy/asrs/controller/OrderController.java b/src/main/java/com/zy/asrs/controller/OrderController.java index fd50042..bf673f9 100644 --- a/src/main/java/com/zy/asrs/controller/OrderController.java +++ b/src/main/java/com/zy/asrs/controller/OrderController.java @@ -12,12 +12,14 @@ import com.zy.asrs.entity.result.WrkTraceVo; import com.zy.asrs.service.*; +import com.zy.asrs.utils.FileSaveExampleUtil; import com.zy.common.model.DetlDto; import com.zy.common.web.BaseController; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; import java.util.*; @@ -417,4 +419,32 @@ return R.ok(); } + @RequestMapping(value = "/order/insert/labelUp/file/auth") +// @ManagerAuth + public R insertLabelUpFile(@RequestParam("orderId") String orderId,@RequestParam MultipartFile file){ + String[] split = orderId.split("-"); + int id = Integer.parseInt(split[1]); + System.out.println("---寮�濮�---"); + String savePath = "D:/order/labelUp/file/"+id+"/"; // 鎸囧畾淇濆瓨鏂囦欢鐨勮矾寰� + try{ + FileSaveExampleUtil.saveFile(file, savePath); + }catch (Exception e){ + return R.error(); + } + return R.ok(); + } + + @RequestMapping(value = "/order/view/labelUp/file/auth") +// @ManagerAuth + public R viewLabelUpFile(@RequestParam("orderId") Long orderId){ +// int id = Integer.parseInt(orderId); + String savePath = "D:/order/labelUp/file/"+orderId+"/"; // 鎸囧畾淇濆瓨鏂囦欢鐨勮矾寰� + try{ + List<FileSaveExampleUtil.FileDTO> fileDTOS = FileSaveExampleUtil.viewFileList(savePath); + return R.ok(fileDTOS); + }catch (Exception e){ + return R.error(); + } + } + } -- Gitblit v1.9.1