Commit 87227458cf0db8c4a6f7d5b0c6b5b7177ad88377
1 parent
a6c58825
♻️ refactor(mes): 移除无用的物料产品相关代码
清理了不再使用的物料产品相关方法和接口,简化了代码结构,提高了可维护性。
Showing
4 changed files
with
0 additions
and
30 deletions
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/md/item/MesMdItemController.java
| @@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.mes.controller.admin.md.item; | @@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.mes.controller.admin.md.item; | ||
| 2 | 2 | ||
| 3 | import cn.hutool.core.collection.CollUtil; | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; | 4 | import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; |
| 5 | -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | ||
| 6 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; | 5 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 7 | import cn.iocoder.yudao.framework.common.pojo.PageParam; | 6 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 8 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 7 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| @@ -39,7 +38,6 @@ import java.util.Map; | @@ -39,7 +38,6 @@ import java.util.Map; | ||
| 39 | 38 | ||
| 40 | import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | 39 | import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; |
| 41 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | 40 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 42 | -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; | ||
| 43 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; | 41 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; |
| 44 | 42 | ||
| 45 | @Tag(name = "管理后台 - MES 物料产品") | 43 | @Tag(name = "管理后台 - MES 物料产品") |
| @@ -111,16 +109,6 @@ public class MesMdItemController { | @@ -111,16 +109,6 @@ public class MesMdItemController { | ||
| 111 | return success(new PageResult<>(buildItemVOList(pageResult.getList()), pageResult.getTotal())); | 109 | return success(new PageResult<>(buildItemVOList(pageResult.getList()), pageResult.getTotal())); |
| 112 | } | 110 | } |
| 113 | 111 | ||
| 114 | - @GetMapping("/simple-list") | ||
| 115 | - @Operation(summary = "获得物料产品精简列表", description = "只包含被开启的物料,主要用于前端的下拉选项") | ||
| 116 | - public CommonResult<List<MesMdItemRespVO>> getItemSimpleList() { | ||
| 117 | - List<MesMdItemDO> list = itemService.getItemListByStatus(CommonStatusEnum.ENABLE.getStatus()); | ||
| 118 | - return success(convertList(buildItemVOList(list), item -> new MesMdItemRespVO() | ||
| 119 | - .setId(item.getId()).setName(item.getName()).setCode(item.getCode()) | ||
| 120 | - .setItemTypeId(item.getItemTypeId()).setItemTypeName(item.getItemTypeName()) | ||
| 121 | - .setUnitMeasureId(item.getUnitMeasureId()).setUnitMeasureName(item.getUnitMeasureName()))); | ||
| 122 | - } | ||
| 123 | - | ||
| 124 | @GetMapping("/export-excel") | 112 | @GetMapping("/export-excel") |
| 125 | @Operation(summary = "导出物料产品 Excel") | 113 | @Operation(summary = "导出物料产品 Excel") |
| 126 | @PreAuthorize("@ss.hasPermission('mes:md-item:export')") | 114 | @PreAuthorize("@ss.hasPermission('mes:md-item:export')") |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/dal/mysql/md/item/MesMdItemMapper.java
| @@ -8,7 +8,6 @@ import cn.iocoder.yudao.module.mes.dal.dataobject.md.item.MesMdItemDO; | @@ -8,7 +8,6 @@ import cn.iocoder.yudao.module.mes.dal.dataobject.md.item.MesMdItemDO; | ||
| 8 | import org.apache.ibatis.annotations.Mapper; | 8 | import org.apache.ibatis.annotations.Mapper; |
| 9 | 9 | ||
| 10 | import java.util.Collection; | 10 | import java.util.Collection; |
| 11 | -import java.util.List; | ||
| 12 | 11 | ||
| 13 | /** | 12 | /** |
| 14 | * MES 物料产品 Mapper | 13 | * MES 物料产品 Mapper |
| @@ -40,10 +39,6 @@ public interface MesMdItemMapper extends BaseMapperX<MesMdItemDO> { | @@ -40,10 +39,6 @@ public interface MesMdItemMapper extends BaseMapperX<MesMdItemDO> { | ||
| 40 | return selectCount(MesMdItemDO::getItemTypeId, itemTypeId); | 39 | return selectCount(MesMdItemDO::getItemTypeId, itemTypeId); |
| 41 | } | 40 | } |
| 42 | 41 | ||
| 43 | - default List<MesMdItemDO> selectListByStatus(Integer status) { | ||
| 44 | - return selectList(MesMdItemDO::getStatus, status); | ||
| 45 | - } | ||
| 46 | - | ||
| 47 | default Long selectCountByUnitMeasureId(Long unitMeasureId) { | 42 | default Long selectCountByUnitMeasureId(Long unitMeasureId) { |
| 48 | return selectCount(MesMdItemDO::getUnitMeasureId, unitMeasureId); | 43 | return selectCount(MesMdItemDO::getUnitMeasureId, unitMeasureId); |
| 49 | } | 44 | } |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/md/item/MesMdItemService.java
| @@ -76,14 +76,6 @@ public interface MesMdItemService { | @@ -76,14 +76,6 @@ public interface MesMdItemService { | ||
| 76 | PageResult<MesMdItemDO> getItemPage(MesMdItemPageReqVO pageReqVO); | 76 | PageResult<MesMdItemDO> getItemPage(MesMdItemPageReqVO pageReqVO); |
| 77 | 77 | ||
| 78 | /** | 78 | /** |
| 79 | - * 获得指定状态的物料产品列表 | ||
| 80 | - * | ||
| 81 | - * @param status 状态 | ||
| 82 | - * @return 物料产品列表 | ||
| 83 | - */ | ||
| 84 | - List<MesMdItemDO> getItemListByStatus(Integer status); | ||
| 85 | - | ||
| 86 | - /** | ||
| 87 | * 获得物料产品列表 | 79 | * 获得物料产品列表 |
| 88 | * | 80 | * |
| 89 | * @param ids 编号数组 | 81 | * @param ids 编号数组 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/md/item/MesMdItemServiceImpl.java
| @@ -239,11 +239,6 @@ public class MesMdItemServiceImpl implements MesMdItemService { | @@ -239,11 +239,6 @@ public class MesMdItemServiceImpl implements MesMdItemService { | ||
| 239 | } | 239 | } |
| 240 | 240 | ||
| 241 | @Override | 241 | @Override |
| 242 | - public List<MesMdItemDO> getItemListByStatus(Integer status) { | ||
| 243 | - return itemMapper.selectListByStatus(status); | ||
| 244 | - } | ||
| 245 | - | ||
| 246 | - @Override | ||
| 247 | public List<MesMdItemDO> getItemList(Collection<Long> ids) { | 242 | public List<MesMdItemDO> getItemList(Collection<Long> ids) { |
| 248 | if (CollUtil.isEmpty(ids)) { | 243 | if (CollUtil.isEmpty(ids)) { |
| 249 | return Collections.emptyList(); | 244 | return Collections.emptyList(); |