Commit 85f6ed5be6eaec35a89bdded7d7706d68d643f32

Authored by YunaiV
1 parent 46b31f43

♻️ refactor(mes): 移除无用的供应商列表相关代码

清理不再使用的供应商精简列表接口及相关服务方法,优化代码结构。
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/md/vendor/MesMdVendorController.java
1 package cn.iocoder.yudao.module.mes.controller.admin.md.vendor; 1 package cn.iocoder.yudao.module.mes.controller.admin.md.vendor;
2 2
3 import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; 3 import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
4 -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;  
5 import cn.iocoder.yudao.framework.common.pojo.CommonResult; 4 import cn.iocoder.yudao.framework.common.pojo.CommonResult;
6 import cn.iocoder.yudao.framework.common.pojo.PageParam; 5 import cn.iocoder.yudao.framework.common.pojo.PageParam;
7 import cn.iocoder.yudao.framework.common.pojo.PageResult; 6 import cn.iocoder.yudao.framework.common.pojo.PageResult;
@@ -32,7 +31,6 @@ import java.util.List; @@ -32,7 +31,6 @@ import java.util.List;
32 31
33 import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; 32 import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
34 import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; 33 import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
35 -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList;  
36 34
37 @Tag(name = "管理后台 - MES 供应商") 35 @Tag(name = "管理后台 - MES 供应商")
38 @RestController 36 @RestController
@@ -84,14 +82,6 @@ public class MesMdVendorController { @@ -84,14 +82,6 @@ public class MesMdVendorController {
84 return success(BeanUtils.toBean(pageResult, MesMdVendorRespVO.class)); 82 return success(BeanUtils.toBean(pageResult, MesMdVendorRespVO.class));
85 } 83 }
86 84
87 - @GetMapping("/simple-list")  
88 - @Operation(summary = "获得供应商精简列表", description = "只包含被开启的供应商,主要用于前端的下拉选项")  
89 - public CommonResult<List<MesMdVendorRespVO>> getVendorSimpleList() {  
90 - List<MesMdVendorDO> list = vendorService.getVendorListByStatus(CommonStatusEnum.ENABLE.getStatus());  
91 - return success(convertList(list, vendor -> new MesMdVendorRespVO()  
92 - .setId(vendor.getId()).setName(vendor.getName()).setCode(vendor.getCode())));  
93 - }  
94 -  
95 @GetMapping("/export-excel") 85 @GetMapping("/export-excel")
96 @Operation(summary = "导出供应商 Excel") 86 @Operation(summary = "导出供应商 Excel")
97 @PreAuthorize("@ss.hasPermission('mes:md-vendor:export')") 87 @PreAuthorize("@ss.hasPermission('mes:md-vendor:export')")
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/dal/mysql/md/vendor/MesMdVendorMapper.java
@@ -7,8 +7,6 @@ import cn.iocoder.yudao.module.mes.controller.admin.md.vendor.vo.MesMdVendorPage @@ -7,8 +7,6 @@ import cn.iocoder.yudao.module.mes.controller.admin.md.vendor.vo.MesMdVendorPage
7 import cn.iocoder.yudao.module.mes.dal.dataobject.md.vendor.MesMdVendorDO; 7 import cn.iocoder.yudao.module.mes.dal.dataobject.md.vendor.MesMdVendorDO;
8 import org.apache.ibatis.annotations.Mapper; 8 import org.apache.ibatis.annotations.Mapper;
9 9
10 -import java.util.List;  
11 -  
12 /** 10 /**
13 * MES 供应商 Mapper 11 * MES 供应商 Mapper
14 * 12 *
@@ -38,8 +36,4 @@ public interface MesMdVendorMapper extends BaseMapperX&lt;MesMdVendorDO&gt; { @@ -38,8 +36,4 @@ public interface MesMdVendorMapper extends BaseMapperX&lt;MesMdVendorDO&gt; {
38 default MesMdVendorDO selectByNickname(String nickname) { 36 default MesMdVendorDO selectByNickname(String nickname) {
39 return selectOne(MesMdVendorDO::getNickname, nickname); 37 return selectOne(MesMdVendorDO::getNickname, nickname);
40 } 38 }
41 -  
42 - default List<MesMdVendorDO> selectListByStatus(Integer status) {  
43 - return selectList(MesMdVendorDO::getStatus, status);  
44 - }  
45 } 39 }
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/md/vendor/MesMdVendorService.java
@@ -68,14 +68,6 @@ public interface MesMdVendorService { @@ -68,14 +68,6 @@ public interface MesMdVendorService {
68 PageResult<MesMdVendorDO> getVendorPage(MesMdVendorPageReqVO pageReqVO); 68 PageResult<MesMdVendorDO> getVendorPage(MesMdVendorPageReqVO pageReqVO);
69 69
70 /** 70 /**
71 - * 获得指定状态的供应商列表  
72 - *  
73 - * @param status 状态  
74 - * @return 供应商列表  
75 - */  
76 - List<MesMdVendorDO> getVendorListByStatus(Integer status);  
77 -  
78 - /**  
79 * 获得供应商列表 71 * 获得供应商列表
80 * 72 *
81 * @param ids 编号列表 73 * @param ids 编号列表
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/md/vendor/MesMdVendorServiceImpl.java
@@ -164,11 +164,6 @@ public class MesMdVendorServiceImpl implements MesMdVendorService { @@ -164,11 +164,6 @@ public class MesMdVendorServiceImpl implements MesMdVendorService {
164 } 164 }
165 165
166 @Override 166 @Override
167 - public List<MesMdVendorDO> getVendorListByStatus(Integer status) {  
168 - return vendorMapper.selectListByStatus(status);  
169 - }  
170 -  
171 - @Override  
172 public List<MesMdVendorDO> getVendorList(Collection<Long> ids) { 167 public List<MesMdVendorDO> getVendorList(Collection<Long> ids) {
173 if (CollUtil.isEmpty(ids)) { 168 if (CollUtil.isEmpty(ids)) {
174 return Collections.emptyList(); 169 return Collections.emptyList();