From cf9a5039e6db9d1d5963e3fe1a37d00169ec2ef7 Mon Sep 17 00:00:00 2001 From: whyclxw <810412026@qq.com> Date: 星期三, 25 六月 2025 11:18:22 +0800 Subject: [PATCH] 验收报告修改 --- src/main/java/com/whyc/controller/MaterialController.java | 34 ++++++++++++++++++++++++++++++++-- 1 files changed, 32 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/whyc/controller/MaterialController.java b/src/main/java/com/whyc/controller/MaterialController.java index 55b91c2..a6967d0 100644 --- a/src/main/java/com/whyc/controller/MaterialController.java +++ b/src/main/java/com/whyc/controller/MaterialController.java @@ -11,7 +11,9 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; +import javax.servlet.http.HttpServletResponse; import java.io.IOException; +import java.util.Arrays; import java.util.List; @Api(tags = "鐗╂枡绠$悊") @@ -61,6 +63,7 @@ return service.getAttachByMaterialId(materialId); } + @ApiOperation(value = "鏍规嵁鐗╂枡鍨嬪彿锛�'-','_'涔嬪墠鐨勯儴鍒嗭級鏌ヨ鐗╂枡鐨勫巻鍙茬増鏈�",notes = "9.3淇敼鍚庝娇鐢�") @GetMapping("getMaterialVersion") public Response getMaterialVersion(@RequestParam String subModel){ @@ -76,8 +79,35 @@ /**鐗╂枡id-鐗╂枡缂栫爜-鐗╂枡鍨嬪彿*/ @ApiOperation(value = "杩藉姞闄勪欢",notes = "materialStr涓簀son瀛楃涓�,鍖呭惈id,subCode,subModel") @PostMapping("attachment") - public Response addAttachment(@RequestParam MultipartFile multipartFile,@RequestParam String materialStr){ + public Response addAttachment(@RequestParam String materialStr, @RequestParam MultipartFile... file) throws IOException { Material material = ActionUtil.getGson().fromJson(materialStr, Material.class); - return service.addAttachment(multipartFile,material); + List<MultipartFile> multipartFileList = Arrays.asList(file); + return service.addAttachment(multipartFileList,material); + } + + @ApiOperation("鐗╂枡鍥剧焊瀵规瘮") + @GetMapping("dwgCompare") + public Response dwgCompare(@RequestParam int materialId,@RequestParam int materialId2) throws IOException { + return service.dwgCompare(materialId,materialId2); + } + + /**鐗╂枡id-鐗╂枡缂栫爜-鐗╂枡鍨嬪彿*/ + @ApiOperation(value = "鏇存柊鍥剧墖鎴栬�呭浘绾�",notes = "materialStr涓簀son瀛楃涓�,鍖呭惈id,subCode,subModel") + @PutMapping("picOrDwg") + public Response updatePicOrDwg(@RequestParam String materialStr, @RequestPart MultipartFile file) throws IOException { + Material material = ActionUtil.getGson().fromJson(materialStr, Material.class); + return service.updatePicOrDwg(file,material); + } + + @PostMapping("checkNaming") + @ApiOperation("鍛藉悕瑙勮寖鏍¢獙") + public void checkNaming( HttpServletResponse response,@RequestParam MultipartFile file) throws IOException, InvalidFormatException { + service.checkNaming(file.getInputStream(),response); + } + + @ApiOperation("鐗╂枡鎺ㄩ�佸脊绐椾娇鐢�") + @GetMapping("getMaterialDialog") + public Response getMaterialDialog(@RequestParam String subCode,@RequestParam String subName,@RequestParam String subModel) { + return service.getMaterialDialog(subCode,subName,subModel); } } -- Gitblit v1.9.1