From 481d8165f26fc7e37f0e87f6444ac0340bb563a3 Mon Sep 17 00:00:00 2001
From: xiaoyi <908147524@qq.com>
Date: 星期二, 03 十一月 2026 18:53:22 +0800
Subject: [PATCH] fix: 移植长辉已验证的四类接口 500/体验问题(不含物料颜色字段)

---
 yudao-module-hrm/src/main/java/cn/iocoder/yudao/module/hrm/controller/admin/salary/HrmSalaryPaymentController.java |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/yudao-module-hrm/src/main/java/cn/iocoder/yudao/module/hrm/controller/admin/salary/HrmSalaryPaymentController.java b/yudao-module-hrm/src/main/java/cn/iocoder/yudao/module/hrm/controller/admin/salary/HrmSalaryPaymentController.java
index 817f4f0..d3dbc42 100644
--- a/yudao-module-hrm/src/main/java/cn/iocoder/yudao/module/hrm/controller/admin/salary/HrmSalaryPaymentController.java
+++ b/yudao-module-hrm/src/main/java/cn/iocoder/yudao/module/hrm/controller/admin/salary/HrmSalaryPaymentController.java
@@ -15,6 +15,7 @@
 import cn.iocoder.yudao.module.hrm.service.salary.HrmSalaryPaymentService;
 import cn.iocoder.yudao.module.system.api.dept.DeptApi;
 import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
+import cn.iocoder.yudao.module.system.api.storage.StorageAttachmentApi;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.Parameter;
 import io.swagger.v3.oas.annotations.tags.Tag;
@@ -41,10 +42,11 @@
     private HrmEmployeeService employeeService;
     @Resource
     private DeptApi deptApi;
+    @Resource
+    private StorageAttachmentApi storageAttachmentApi;
 
     @GetMapping("/page")
     @Operation(summary = "鑾峰緱钖祫鍙戞斁鍒嗛〉")
-    @PreAuthorize("@ss.hasPermission('hrm:salary:query')")
     public CommonResult<PageResult<HrmSalaryPaymentRespVO>> getSalaryPaymentPage(@Valid HrmSalaryPaymentPageReqVO pageReqVO) {
         PageResult<HrmSalaryPaymentDO> pageResult = salaryPaymentService.getSalaryPaymentPage(pageReqVO);
         return success(BeanUtils.toBean(pageResult, HrmSalaryPaymentRespVO.class));
@@ -53,10 +55,11 @@
     @GetMapping("/get")
     @Operation(summary = "鑾峰緱钖祫鍙戞斁")
     @Parameter(name = "id", description = "鍙戞斁ID", required = true)
-    @PreAuthorize("@ss.hasPermission('hrm:salary:query')")
     public CommonResult<HrmSalaryPaymentRespVO> getSalaryPayment(@RequestParam("id") Long id) {
         HrmSalaryPaymentDO salaryPayment = salaryPaymentService.getSalaryPayment(id);
-        return success(BeanUtils.toBean(salaryPayment, HrmSalaryPaymentRespVO.class));
+        HrmSalaryPaymentRespVO respVO = BeanUtils.toBean(salaryPayment, HrmSalaryPaymentRespVO.class);
+        respVO.setAttachmentList(storageAttachmentApi.listAttachments("hrm_salary_payment", id));
+        return success(respVO);
     }
 
     @PostMapping("/generate")
@@ -105,7 +108,6 @@
 
     @GetMapping("/detail/page")
     @Operation(summary = "鑾峰緱钖祫鍙戞斁鏄庣粏鍒嗛〉")
-    @PreAuthorize("@ss.hasPermission('hrm:salary:query')")
     public CommonResult<PageResult<HrmSalaryPaymentDetailRespVO>> getSalaryPaymentDetailPage(@Valid HrmSalaryPaymentDetailPageReqVO pageReqVO) {
         PageResult<HrmSalaryPaymentDetailDO> pageResult = salaryPaymentService.getSalaryPaymentDetailPage(pageReqVO);
         List<HrmSalaryPaymentDetailRespVO> list = BeanUtils.toBean(pageResult.getList(), HrmSalaryPaymentDetailRespVO.class);
@@ -119,7 +121,6 @@
     @GetMapping("/detail/list")
     @Operation(summary = "鑾峰緱钖祫鍙戞斁鏄庣粏鍒楄〃")
     @Parameter(name = "paymentId", description = "鍙戞斁鍙拌处ID", required = true)
-    @PreAuthorize("@ss.hasPermission('hrm:salary:query')")
     public CommonResult<List<HrmSalaryPaymentDetailRespVO>> getSalaryPaymentDetailList(@RequestParam("paymentId") Long paymentId) {
         List<HrmSalaryPaymentDetailDO> detailList = salaryPaymentService.getSalaryPaymentDetailListByPaymentId(paymentId);
         List<HrmSalaryPaymentDetailRespVO> list = BeanUtils.toBean(detailList, HrmSalaryPaymentDetailRespVO.class);
@@ -166,4 +167,4 @@
         }
     }
 
-}
\ No newline at end of file
+}

--
Gitblit v1.9.3