From 30c34b32416f96520624d766075d2f820d420e04 Mon Sep 17 00:00:00 2001 From: skyouc Date: 星期四, 21 八月 2025 15:46:38 +0800 Subject: [PATCH] 调拔单查询接口 --- rsf-server/src/main/java/com/vincent/rsf/server/api/service/ReceiveMsgService.java | 10 +++++ rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/ReceiveMsgServiceImpl.java | 21 ++++++++++ rsf-server/src/main/java/com/vincent/rsf/server/api/controller/erp/params/TransferInfoDto.java | 21 ++++++++++ rsf-server/src/main/java/com/vincent/rsf/server/api/controller/erp/ErpQueryController.java | 17 ++++++++ rsf-server/src/main/java/com/vincent/rsf/server/api/controller/erp/params/QueryOrderParam.java | 2 5 files changed, 69 insertions(+), 2 deletions(-) diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/api/controller/erp/ErpQueryController.java b/rsf-server/src/main/java/com/vincent/rsf/server/api/controller/erp/ErpQueryController.java index 3f875a4..9ae3145 100644 --- a/rsf-server/src/main/java/com/vincent/rsf/server/api/controller/erp/ErpQueryController.java +++ b/rsf-server/src/main/java/com/vincent/rsf/server/api/controller/erp/ErpQueryController.java @@ -10,6 +10,7 @@ import com.vincent.rsf.framework.common.R; import com.vincent.rsf.server.manager.entity.Loc; +import com.vincent.rsf.server.manager.entity.Transfer; import com.vincent.rsf.server.manager.service.MatnrGroupService; import com.vincent.rsf.server.system.controller.BaseController; import io.swagger.annotations.Api; @@ -86,5 +87,19 @@ return receiveMsgService.syncLocsDetl(pageParam, wrapper); } - + /** + * @author Ryan + * @date 2025/8/21 + * @description: 璋冩嫈鍗曚俊鎭煡璇� + * @version 1.0 + */ + @PostMapping("/query/transfer") + @ApiOperation("鏌ヨ璋冩嫈鍗曞強鏄庣粏") + @OperationLog("璋冩嫈鍗曞強鏄庣粏鏌ヨ") + public R queryTransfer(@RequestBody QueryOrderParam queryParams) { + if (Objects.isNull(queryParams)) { + throw new CoolException("鍙傛暟涓嶈兘涓虹┖锛侊紒"); + } + return receiveMsgService.queryTransfer(queryParams); + } } diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/api/controller/erp/params/QueryOrderParam.java b/rsf-server/src/main/java/com/vincent/rsf/server/api/controller/erp/params/QueryOrderParam.java index 26f2703..c0ee2a8 100644 --- a/rsf-server/src/main/java/com/vincent/rsf/server/api/controller/erp/params/QueryOrderParam.java +++ b/rsf-server/src/main/java/com/vincent/rsf/server/api/controller/erp/params/QueryOrderParam.java @@ -14,7 +14,7 @@ @ApiModel(value = "QueryOrderParam", description = "璁㈠崟鏌ヨ鎺ュ彛鍙傛暟") public class QueryOrderParam implements Serializable { - @ApiModelProperty("鍗曟嵁绫诲瀷锛歿in: 鍏ュ簱鍗曪紝 out: 鍑哄簱鍗曪紝 check: 鐩樼偣鍗晑") + @ApiModelProperty("鍗曟嵁绫诲瀷锛歿in: 鍏ュ簱鍗曪紝 out: 鍑哄簱鍗曪紝 check: 鐩樼偣鍗�, revise: 璋冩嫈鍗晑") private String type; @ApiModelProperty("璁㈠崟鍙�") diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/api/controller/erp/params/TransferInfoDto.java b/rsf-server/src/main/java/com/vincent/rsf/server/api/controller/erp/params/TransferInfoDto.java new file mode 100644 index 0000000..62d8f6b --- /dev/null +++ b/rsf-server/src/main/java/com/vincent/rsf/server/api/controller/erp/params/TransferInfoDto.java @@ -0,0 +1,21 @@ +package com.vincent.rsf.server.api.controller.erp.params; + +import com.vincent.rsf.server.manager.entity.Transfer; +import com.vincent.rsf.server.manager.entity.TransferItem; +import io.swagger.annotations.ApiModel; +import lombok.Data; +import lombok.experimental.Accessors; +import lombok.experimental.Delegate; + +import java.util.List; + +@Data +@Accessors(chain = true) +@ApiModel(value = "TransferInfoDto", description = "璋冩嫈鍗曟槑缁嗕俊鎭�") +public class TransferInfoDto { + + @Delegate + private Transfer transfer; + + private List<TransferItem> items; +} diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/api/service/ReceiveMsgService.java b/rsf-server/src/main/java/com/vincent/rsf/server/api/service/ReceiveMsgService.java index 0b2d737..1dd28c7 100644 --- a/rsf-server/src/main/java/com/vincent/rsf/server/api/service/ReceiveMsgService.java +++ b/rsf-server/src/main/java/com/vincent/rsf/server/api/service/ReceiveMsgService.java @@ -2,11 +2,13 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.vincent.rsf.framework.common.R; import com.vincent.rsf.server.api.controller.erp.params.*; import com.vincent.rsf.server.common.domain.BaseParam; import com.vincent.rsf.server.common.domain.PageParam; import com.vincent.rsf.server.manager.entity.Loc; +import com.vincent.rsf.server.manager.entity.Transfer; import java.util.List; @@ -129,4 +131,12 @@ * @version 1.0 */ R syncOrderDelete(List<SyncOrderParams> orders); + + /** + * @author Ryan + * @date 2025/8/21 + * @description: 璋冩嫈鍗曟槑缁嗘煡璇� + * @version 1.0 + */ + R queryTransfer(QueryOrderParam transferParams); } diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/ReceiveMsgServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/ReceiveMsgServiceImpl.java index 20d0dd0..c607f9d 100644 --- a/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/ReceiveMsgServiceImpl.java +++ b/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/ReceiveMsgServiceImpl.java @@ -24,6 +24,7 @@ import com.vincent.rsf.server.system.utils.SerialRuleUtils; import com.vincent.rsf.server.api.service.ReceiveMsgService; import lombok.extern.slf4j.Slf4j; +import org.apache.poi.ss.formula.functions.T; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -610,4 +611,24 @@ }); return R.ok(); } + + /** + * @author Ryan + * @date 2025/8/21 + * @description: 璋冩嫈鍗曟槑缁嗘煡璇� + * @version 1.0 + */ + @Override + public R queryTransfer(QueryOrderParam queryParams) { + Transfer transfer = transferService.getOne(new LambdaQueryWrapper<Transfer>() + .in(Transfer::getCode, queryParams.getOrderNo())); + if (Objects.isNull(transfer)) { + throw new CoolException("鍗曟嵁涓嶅瓨鍦紒锛�"); + } + List<TransferItem> orderItems = transferItemService.list(new LambdaQueryWrapper<TransferItem>() + .eq(TransferItem::getTransferId, transfer.getId())); + TransferInfoDto wkorderDto = new TransferInfoDto(); + wkorderDto.setTransfer(transfer).setItems(orderItems); + return R.ok().add(wkorderDto); + } } -- Gitblit v1.9.1