From 840c62fd3d9053e4dc3fff94618f54e898d8ca3c Mon Sep 17 00:00:00 2001 From: xd <844539747@qq.com> Date: Fri, 17 May 2024 13:25:22 +0800 Subject: [PATCH] '123' --- ABAP_AS_WITH_POOL.jcoDestination | 2 +- .../controller/common/SapRfcController.java | 14 ++ .../web/utils/SapFunction/SapRfcUtils.java | 61 +++++++ ruoyi-ui/src/api/common/sapRfc.js | 9 ++ .../components/Tools/CustomerSelect/index.vue | 150 ++++++++++++++++++ .../components/Tools/PeopleSelect/index.vue | 25 +-- .../noticeUserSelect/index.vue | 2 +- ruoyi-ui/src/views/quot/quot/index.vue | 26 ++- 8 files changed, 267 insertions(+), 22 deletions(-) create mode 100644 ruoyi-ui/src/views/components/Tools/CustomerSelect/index.vue diff --git a/ABAP_AS_WITH_POOL.jcoDestination b/ABAP_AS_WITH_POOL.jcoDestination index cc7ac88..9697602 100644 --- a/ABAP_AS_WITH_POOL.jcoDestination +++ b/ABAP_AS_WITH_POOL.jcoDestination @@ -1,5 +1,5 @@ #for tests only ! -#Wed May 15 15:21:44 CST 2024 +#Fri May 17 13:23:58 CST 2024 jco.destination.pool_capacity=10 jco.client.lang=ZH jco.client.ashost=172.19.0.120 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/SapRfcController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/SapRfcController.java index 3e0b737..a500493 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/SapRfcController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/SapRfcController.java @@ -60,6 +60,20 @@ public class SapRfcController @Autowired private RedisCache redisCache; + /** + * 获取SAP 客户数据 + * @param rfcResult + * @return + */ + @GetMapping("/listCustomer") + public AjaxResult listCustomer(RfcResult rfcResult) + { + List res = SapRfcUtils.listCustomer(rfcResult); + return AjaxResult.success(res); + } + + + /** * 获取SAP 国家数据 * @param customer diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/utils/SapFunction/SapRfcUtils.java b/ruoyi-admin/src/main/java/com/ruoyi/web/utils/SapFunction/SapRfcUtils.java index 6e3f7d6..0738126 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/utils/SapFunction/SapRfcUtils.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/utils/SapFunction/SapRfcUtils.java @@ -11,6 +11,39 @@ import java.util.List; public class SapRfcUtils { + /** + * 获取SAP 国家数据 + * @param param + * @return + */ + public static List listCustomer(RfcResult param) { + JCoFunction function = null; + RfcResult rfcResult = null; + List rfcResults = new ArrayList<>(); + + JCoDestination destination = ConnectToSAP.connect(); + try { + function = destination.getRepository().getFunctionTemplate("ZOA03_SEND_COM").getFunction(); + if (function == null) + throw new RuntimeException("RFC_SYSTEM_INFO not found in SAP."); + JCoParameterList input = function.getImportParameterList(); + input.getStructure("KH").setValue("KUNNR",param.getValue()); + input.getStructure("KH").setValue("NAME1",param.getLabel()); + function.execute(destination); + JCoTable table = function.getTableParameterList().getTable("OUTKH"); + for(int i = 0; i countrys = new ArrayList<>(); + + JCoDestination destination = ConnectToSAP.connect(); + try { + function = destination.getRepository().getFunctionTemplate("ZOA03_SEND_COM").getFunction(); + if (function == null) + throw new RuntimeException("RFC_SYSTEM_INFO not found in SAP."); + JCoParameterList input = function.getImportParameterList(); + input.getStructure("KH").setValue("NAME1","无锡"); + function.execute(destination); + JCoTable table = function.getTableParameterList().getTable("OUTKH"); + for(int i = 0; i + + + + + + + + + + 搜索 + + + + + + + + + + + + + + + diff --git a/ruoyi-ui/src/views/components/Tools/PeopleSelect/index.vue b/ruoyi-ui/src/views/components/Tools/PeopleSelect/index.vue index 21c7022..183ee86 100644 --- a/ruoyi-ui/src/views/components/Tools/PeopleSelect/index.vue +++ b/ruoyi-ui/src/views/components/Tools/PeopleSelect/index.vue @@ -6,7 +6,8 @@ :width="width || '900px'" :height="height || '650px'" :before-close="handleClose" - append-to-body> + append-to-body + class="customer-dialog">
@@ -141,8 +142,6 @@
- - - +