From f73dad756121e3e12df88adeed0132342ddf115e Mon Sep 17 00:00:00 2001 From: zhang <zc857179121@qq.com> Date: 星期五, 29 八月 2025 15:45:00 +0800 Subject: [PATCH] 跑酷 --- rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/LocItemServiceImpl.java | 31 +++++++++++++++++++++++++------ 1 files changed, 25 insertions(+), 6 deletions(-) diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/LocItemServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/LocItemServiceImpl.java index 62b4973..e5294ef 100644 --- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/LocItemServiceImpl.java +++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/LocItemServiceImpl.java @@ -2,11 +2,12 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.vincent.rsf.framework.exception.CoolException; -import com.vincent.rsf.server.api.controller.params.TaskInParam; +import com.vincent.rsf.server.api.controller.erp.params.TaskInParam; import com.vincent.rsf.server.api.entity.dto.InTaskMsgDto; import com.vincent.rsf.server.api.service.WcsService; import com.vincent.rsf.server.api.utils.LocUtils; import com.vincent.rsf.server.common.constant.Constants; +import com.vincent.rsf.server.manager.controller.params.CheckLocQueryParams; import com.vincent.rsf.server.manager.controller.params.LocToTaskParams; import com.vincent.rsf.server.manager.entity.*; import com.vincent.rsf.server.manager.enums.*; @@ -73,11 +74,11 @@ String siteNo = map.getSiteNo(); List<LocItem> items = map.getItems(); Map<Long, List<LocItem>> listMap = items.stream().collect(Collectors.groupingBy(LocItem::getLocId)); - AsnOrder order; + WkOrder order; Wave wave; if (!Objects.isNull(map.getSourceId())) { if (map.getType().equals(Constants.TASK_TYPE_WAVE_OUT_STOCK)) { - order = new AsnOrder(); + order = new WkOrder(); wave = waveService.getById(map.getSourceId()); } else { wave = new Wave(); @@ -85,7 +86,7 @@ } } else { wave = new Wave(); - order = new AsnOrder(); + order = new WkOrder(); } listMap.keySet().forEach(key -> { @@ -116,7 +117,8 @@ .setCreateTime(new Date()) .setUpdateTime(new Date()) .setTaskStatus(TaskStsType.GENERATE_OUT.id) - .setBarcode(loc.getBarcode()); + .setBarcode(loc.getBarcode()) + .setMemo(map.getMemo()); List<LocItem> locItems = this.list(new LambdaQueryWrapper<LocItem>().eq(LocItem::getLocId, key)); if (locItems.isEmpty()) { @@ -218,6 +220,7 @@ .setSourceId(order.getId()); } else if (map.getType().equals(Constants.TASK_TYPE_WAVE_OUT_STOCK)) { taskItem.setSourceId(wave.getId()) + .setWkType(Short.parseShort(OrderWorkType.ORDER_WORK_TYPE_OTHER.type)) .setSourceCode(wave.getCode()) .setSource(item.getSource()); } else if (map.getType().equals(Constants.TASK_TYPE_OUT_CHECK) || map.getType().equals(Constants.TASK_TYPE_OUT_STOCK)) { @@ -332,7 +335,8 @@ .setSort(Constants.TASK_SORT_DEFAULT_VALUE) .setUpdateTime(new Date()) .setTaskStatus(TaskStsType.GENERATE_IN.id) - .setBarcode(orgLoc.getBarcode()); + .setBarcode(orgLoc.getBarcode()) + .setMemo(map.getMemo()); if (!taskService.save(task)) { throw new CoolException("鏂板缓绉诲簱浠诲姟澶辫触锛侊紒"); @@ -362,4 +366,19 @@ } return task; } + + /** + * @author Ryan + * @date 2025/7/16 + * @description: 鑾峰彇褰撳墠鐗╂枡鎵�鏈夊簱瀛樹俊鎭� + * @version 1.0 + */ + @Override + public List<LocItem> listByMatnr(CheckLocQueryParams matnr) { + LambdaQueryWrapper<LocItem> wrapper = new LambdaQueryWrapper<LocItem>() + .eq(StringUtils.isNotBlank(matnr.getLocCode()), LocItem::getLocCode, matnr.getLocCode()) +// .eq(StringUtils.isNotBlank(matnr.getChannel()), LocItem::getChannel, matnr.getChannel()) + .in(!matnr.getMatnrCode().isEmpty(), LocItem::getMatnrCode, matnr.getMatnrCode()); + return this.baseMapper.listByMatnr(LocStsType.LOC_STS_TYPE_F.type, matnr.getChannel(), wrapper); + } } -- Gitblit v1.9.1