From c64d0dbb2441dbbe51821903d5dc770346bb5f7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B8=B8=E7=86=9F=E5=90=B4=E5=BD=A6=E7=A5=96?= Date: Tue, 21 Oct 2025 23:08:02 +0800 Subject: [PATCH] feat(ifsInventory): add inventory query controller and endpoint --- .../IfsInventoryQueryController.java | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/main/java/com/gaotao/modules/api/controller/IfsInventoryQueryController.java diff --git a/src/main/java/com/gaotao/modules/api/controller/IfsInventoryQueryController.java b/src/main/java/com/gaotao/modules/api/controller/IfsInventoryQueryController.java new file mode 100644 index 0000000..63edde5 --- /dev/null +++ b/src/main/java/com/gaotao/modules/api/controller/IfsInventoryQueryController.java @@ -0,0 +1,46 @@ +package com.gaotao.modules.api.controller; + +import com.gaotao.common.utils.R; +import com.gaotao.modules.api.entity.IfsInventoryPartInStock; +import com.gaotao.modules.api.service.IfsApiService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; +import java.util.Map; + +/** + * IFS库存查询控制器 - rqrq + * + * @Description 提供IFS库存在库查询接口 - rqrq + * @Author rqrq + * @Date 2025/10/21 + */ +@RestController +@RequestMapping("/api/ifsInventory") +public class IfsInventoryQueryController { + + @Autowired + private IfsApiService ifsApiService; + + /** + * @Description 查询IFS库存在库信息 - rqrq + * @Title getInventoryPartInStock + * @param params 查询参数(包含site和partNo) + * @return R + * @author rqrq + * @date 2025/10/21 + */ + @PostMapping("/getInventoryPartInStock") + public R getInventoryPartInStock(@RequestBody Map params) throws Exception { + String site = params.get("site"); + String partNo = params.get("partNo"); + + List rows = ifsApiService.getInventoryPartInStock(site, partNo); + return R.ok().put("rows", rows); + } +} +