Commit 289ac0c055bbd35e8941ac81fd93c8d13b4b67fc

Authored by YunaiV
1 parent 85f6ed5b

♻️ refactor(workorder): 移除工单列表相关代码

删除不再使用的工单列表接口和相关逻辑,简化代码结构,提升可维护性。
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/workorder/MesProWorkorderController.java
... ... @@ -36,7 +36,6 @@ import java.util.*;
36 36  
37 37 import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
38 38 import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
39   -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList;
40 39 import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet;
41 40  
42 41 @Tag(name = "管理后台 - MES 生产工单")
... ... @@ -104,18 +103,6 @@ public class MesProWorkOrderController {
104 103 return success(new PageResult<>(buildWorkOrderRespVOList(pageResult.getList()), pageResult.getTotal()));
105 104 }
106 105  
107   - @GetMapping("/simple-list")
108   - @Operation(summary = "获得生产工单精简列表", description = "主要用于前端的下拉选项")
109   - @Parameter(name = "type", description = "工单类型", example = "2")
110   - public CommonResult<List<MesProWorkOrderRespVO>> getWorkOrderSimpleList(
111   - @RequestParam(value = "type", required = false) Integer type) {
112   - List<MesProWorkOrderDO> list = workOrderService.getWorkOrderList(type);
113   - return success(convertList(list, wo -> new MesProWorkOrderRespVO()
114   - .setId(wo.getId()).setCode(wo.getCode()).setName(wo.getName())
115   - .setType(wo.getType()).setVendorId(wo.getVendorId())
116   - .setStatus(wo.getStatus())));
117   - }
118   -
119 106 @GetMapping("/export-excel")
120 107 @Operation(summary = "导出生产工单 Excel")
121 108 @PreAuthorize("@ss.hasPermission('mes:pro-work-order:export')")
... ...
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/pro/workorder/MesProWorkorderService.java
... ... @@ -122,14 +122,6 @@ public interface MesProWorkOrderService {
122 122 void cancelWorkOrder(Long id);
123 123  
124 124 /**
125   - * 获得工单列表
126   - *
127   - * @param type 工单类型(可选,为 null 时查询全部)
128   - * @return 工单列表
129   - */
130   - List<MesProWorkOrderDO> getWorkOrderList(Integer type);
131   -
132   - /**
133 125 * 累加工单的已生产数量
134 126 *
135 127 * @param id 工单编号
... ...
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/pro/workorder/MesProWorkorderServiceImpl.java
... ... @@ -6,7 +6,6 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
6 6 import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
7 7 import cn.iocoder.yudao.module.mes.controller.admin.pro.workorder.vo.MesProWorkOrderPageReqVO;
8 8 import cn.iocoder.yudao.module.mes.controller.admin.pro.workorder.vo.MesProWorkOrderSaveReqVO;
9   -import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
10 9 import cn.iocoder.yudao.module.mes.dal.dataobject.md.item.MesMdItemBatchConfigDO;
11 10 import cn.iocoder.yudao.module.mes.dal.dataobject.pro.workorder.MesProWorkOrderDO;
12 11 import cn.iocoder.yudao.module.mes.dal.mysql.pro.workorder.MesProWorkOrderMapper;
... ... @@ -239,13 +238,6 @@ public class MesProWorkOrderServiceImpl implements MesProWorkOrderService {
239 238 }
240 239  
241 240 @Override
242   - public List<MesProWorkOrderDO> getWorkOrderList(Integer type) {
243   - return workOrderMapper.selectList(new LambdaQueryWrapperX<MesProWorkOrderDO>()
244   - .eqIfPresent(MesProWorkOrderDO::getType, type)
245   - .orderByDesc(MesProWorkOrderDO::getId));
246   - }
247   -
248   - @Override
249 241 public void updateProducedQuantity(Long id, BigDecimal incrQuantityProduced) {
250 242 // 校验工单存在
251 243 validateWorkOrderExists(id);
... ...