feat: bug-813 零部件打包详情查询接口返回工厂编号

This commit is contained in:
曹鹏飞 2025-10-11 11:01:53 +08:00
parent 0b399d3ef6
commit 7dfa50c084
2 changed files with 12 additions and 7 deletions

View File

@ -11,7 +11,6 @@ import com.nflg.wms.admin.util.ThymeleafUtil;
import com.nflg.wms.common.pojo.ApiResult; import com.nflg.wms.common.pojo.ApiResult;
import com.nflg.wms.common.pojo.PageData; import com.nflg.wms.common.pojo.PageData;
import com.nflg.wms.common.pojo.dto.ZWM3A19DTO; import com.nflg.wms.common.pojo.dto.ZWM3A19DTO;
import com.nflg.wms.common.pojo.dto.ZWM3A19ITEMDTO;
import com.nflg.wms.common.pojo.qo.ComponentOrderQO; import com.nflg.wms.common.pojo.qo.ComponentOrderQO;
import com.nflg.wms.common.pojo.qo.ComponentPackingEditInputQO; import com.nflg.wms.common.pojo.qo.ComponentPackingEditInputQO;
import com.nflg.wms.common.pojo.qo.ComponentPackingInputQO; import com.nflg.wms.common.pojo.qo.ComponentPackingInputQO;
@ -30,10 +29,7 @@ import jakarta.validation.constraints.NotNull;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.Collections; import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
@ -168,13 +164,15 @@ public class ComponentPackingController {
/** /**
* 装箱单详情列表 * 装箱单详情列表
* *
* @param packingId 装箱单号或是分销凭证号 * @param packingId 装箱单号或是分销凭证号
* @return 装箱单详情列表 * @return 装箱单详情列表
*/ */
@GetMapping("pda/taskitem") @GetMapping("pda/taskitem")
public ApiResult<List<ComponentPackingItemPdaVO>> getPackingPdaItem(@RequestParam @NotNull Long packingId) { public ApiResult<List<ComponentPackingItemPdaVO>> getPackingPdaItem(@RequestParam @NotNull Long packingId) {
WmsComponentPacking packing = wmscomponentPackingService.getById(packingId);
VUtil.trueThrowBusinessError(Objects.isNull(packing)).throwMessage("装箱单不存在");
// 查询退库单对应的明细项 // 查询退库单对应的明细项
List<WmsComponentPackingItem> tasks = wmsComponentPackingItemService.lambdaQuery() List<WmsComponentPackingItem> tasks = wmsComponentPackingItemService.lambdaQuery()
.select(WmsComponentPackingItem::getId, WmsComponentPackingItem::getIdnrk, .select(WmsComponentPackingItem::getId, WmsComponentPackingItem::getIdnrk,
@ -192,6 +190,9 @@ public class ComponentPackingController {
List<ComponentPackingItemPdaVO> daVos = tasks.stream() List<ComponentPackingItemPdaVO> daVos = tasks.stream()
.map(item -> Convert.convert(ComponentPackingItemPdaVO.class, item)) .map(item -> Convert.convert(ComponentPackingItemPdaVO.class, item))
.collect(Collectors.toList()); .collect(Collectors.toList());
daVos.forEach(vo -> {
vo.setFactoryNo(packing.getFactoryNo());
});
return ApiResult.success(daVos); return ApiResult.success(daVos);
} }

View File

@ -54,4 +54,8 @@ public class ComponentPackingItemPdaVO {
return menge.subtract(outQty); return menge.subtract(outQty);
} }
/**
* 工厂
*/
private String factoryNo;
} }