From 3fd8d1f2e73a843acd330e8e8b84f5800f858407 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 10 十一月 2026 11:42:21 +0800
Subject: [PATCH] feat(seal): 印章详情视图与编辑删除接口

---
 yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pd/seal/PdSealController.java |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pd/seal/PdSealController.java b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pd/seal/PdSealController.java
index 4291a36..7a25f94 100644
--- a/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pd/seal/PdSealController.java
+++ b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pd/seal/PdSealController.java
@@ -32,6 +32,10 @@
     public CommonResult<List<Map<String,Object>>> available(){ return success(service.seals(true)); }
     @PostMapping("/upload") @PreAuthorize("@ss.hasPermission('mes:pd-seal:manage')")
     public CommonResult<Long> upload(@RequestParam String name,@RequestParam MultipartFile file) throws Exception { return success(service.upload(name,file,getLoginUserId())); }
+    @PutMapping("/update") @PreAuthorize("@ss.hasPermission('mes:pd-seal:manage')")
+    public CommonResult<Boolean> update(@RequestParam long id,@RequestParam String name,@RequestParam(required=false) MultipartFile file) throws Exception { service.update(id,name,file); return success(true); }
+    @DeleteMapping("/delete") @PreAuthorize("@ss.hasPermission('mes:pd-seal:manage')")
+    public CommonResult<Boolean> delete(@RequestParam long id){ service.delete(id); return success(true); }
     @PutMapping("/enabled") @PreAuthorize("@ss.hasPermission('mes:pd-seal:manage')")
     public CommonResult<Boolean> enabled(@RequestParam long id,@RequestParam boolean enabled){service.setEnabled(id,enabled);return success(true);}
     public record ApplyReq(Long projectId, Long sealId, String reason) {}
@@ -44,6 +48,17 @@
     }
     @GetMapping("/applications") @PreAuthorize("@ss.hasPermission('mes:pd-project:export')")
     public CommonResult<List<Map<String,Object>>> applications(@RequestParam(required=false) Long projectId){ return success(service.applications(getLoginUserId(),projectId)); }
+    /** 瀹℃壒璇︽儏浣跨敤锛氱櫥褰曞嵆鍙闂紝鍙鑼冨洿鍦� Service 鍐呮寜鐢宠浜�/瀹℃壒浜�/绠$悊鏉冮檺鏍¢獙 */
+    @GetMapping("/application")
+    public CommonResult<Map<String,Object>> application(@RequestParam long id){ return success(service.applicationDetail(id,getLoginUserId())); }
+    @GetMapping("/application/image")
+    public void applicationImage(@RequestParam long id,HttpServletResponse response) throws java.io.IOException {
+        byte[] image=service.applicationImage(id,getLoginUserId());
+        response.setContentType("image/png");
+        response.setHeader("Cache-Control","no-store, private");
+        response.setHeader("X-Content-Type-Options","nosniff");
+        response.getOutputStream().write(image);
+    }
     @GetMapping("/download") @PreAuthorize("@ss.hasPermission('mes:pd-project:export')")
     public void download(@RequestParam long id,HttpServletResponse response) throws Exception {byte[] bytes=service.download(id,getLoginUserId()); response.setContentType("application/vnd.openxmlformats-officedocument.wordprocessingml.document"); response.setHeader("Content-Disposition","attachment; filename=tracking.docx"); response.getOutputStream().write(bytes);}
 }

--
Gitblit v1.9.3