From cbadfd8e691ab335965202a984db16e55ac8e42c Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 30 十月 2026 17:51:06 +0800
Subject: [PATCH] 诚发五金:按技术方案重构业务功能并补齐库结构
---
yudao-module-srm/src/main/java/cn/iocoder/yudao/module/srm/controller/admin/supplier/SrmSupplierController.java | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/yudao-module-srm/src/main/java/cn/iocoder/yudao/module/srm/controller/admin/supplier/SrmSupplierController.java b/yudao-module-srm/src/main/java/cn/iocoder/yudao/module/srm/controller/admin/supplier/SrmSupplierController.java
index 85770d4..a5d6a2f 100644
--- a/yudao-module-srm/src/main/java/cn/iocoder/yudao/module/srm/controller/admin/supplier/SrmSupplierController.java
+++ b/yudao-module-srm/src/main/java/cn/iocoder/yudao/module/srm/controller/admin/supplier/SrmSupplierController.java
@@ -63,7 +63,6 @@
@GetMapping("/get")
@Operation(summary = "鑾峰彇渚涘簲鍟嗚鎯�")
@Parameter(name = "id", description = "缂栧彿", required = true)
- @PreAuthorize("@ss.hasPermission('srm:supplier:query')")
public CommonResult<SrmSupplierRespVO> getSupplier(@RequestParam("id") Long id) {
SrmSupplierDO supplier = supplierService.getSupplier(id);
return success(BeanUtils.toBean(supplier, SrmSupplierRespVO.class));
@@ -71,7 +70,6 @@
@GetMapping("/page")
@Operation(summary = "渚涘簲鍟嗗垎椤垫煡璇�")
- @PreAuthorize("@ss.hasPermission('srm:supplier:query')")
public CommonResult<PageResult<SrmSupplierRespVO>> getSupplierPage(@Valid SrmSupplierPageReqVO pageReqVO) {
PageResult<SrmSupplierDO> pageResult = supplierService.getSupplierPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, SrmSupplierRespVO.class));
@@ -103,6 +101,8 @@
SrmSupplierExcelVO excelVO = BeanUtils.toBean(supplier, SrmSupplierExcelVO.class);
excelVO.setType(toTypeLabel(supplier.getType()));
excelVO.setStatus(toStatusLabel(supplier.getStatus()));
+ excelVO.setOnlineStatusLabel(toOnlineStatusLabel(supplier.getOnlineStatus()));
+ excelVO.setPurchaseCategoryLabel(toPurchaseCategoryLabel(supplier.getPurchaseCategory()));
excelList.add(excelVO);
}
ExcelUtils.write(response, "渚涘簲鍟嗘暟鎹�.xlsx", "渚涘簲鍟�", SrmSupplierExcelVO.class, excelList);
@@ -163,6 +163,20 @@
/**
* 鐘舵�� 0 鍚敤 / 1 绂佺敤 -> 涓枃鏂囨锛涚┖鍊艰繑鍥炵┖
*/
+ private static String toPurchaseCategoryLabel(Integer purchaseCategory) {
+ if (purchaseCategory == null || purchaseCategory == 0) {
+ return "鏈垎绫�";
+ }
+ return purchaseCategory == 2 ? "鍘熻緟鏂�" : "浠g悊鍟嗗搧";
+ }
+
+ private static String toOnlineStatusLabel(Integer onlineStatus) {
+ if (onlineStatus == null) {
+ return "鍦ㄧ嚎";
+ }
+ return onlineStatus == 2 ? "绂荤嚎" : "鍦ㄧ嚎";
+ }
+
private static String toStatusLabel(Integer status) {
if (status == null) {
return null;
--
Gitblit v1.9.3