From 8f1df9b9e984ca9ddccd7f93179a3d5797521449 Mon Sep 17 00:00:00 2001 From: JIAL <2287346125@qq.com> Date: Fri, 14 Jun 2024 15:12:48 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ABAP_AS_WITH_POOL.jcoDestination | 4 +- .../hainanOrder/HaiNanOrderController.java | 17 +- .../quoteMobile/QuoteMobileController.java | 34 ++ .../web/utils/SapFunction/SapRfcUtils.java | 39 ++ .../com/ruoyi/contract/damain/Contract.java | 92 +++++ .../ruoyi/hainanOrder/domain/HNMaterial.java | 92 +++++ .../hainanOrder/mapper/HaiNanOrderMapper.java | 8 + .../service/HaiNanOrderService.java | 19 + .../service/impl/HaiNanOrderServiceImpl.java | 10 +- .../mobile/quoteMobile/domain/MQuote.java | 17 + .../quoteMobile/mapper/QuoteMobileMapper.java | 16 + .../service/QuoteMobileService.java | 26 ++ .../service/impl/QuoteMobileServiceImpl.java | 29 ++ .../mapper/hainanOrder/HaiNanOrderMapper.xml | 31 +- .../mobile/quoteMobile/QuoteMobileMapper.xml | 7 + ruoyi-ui/src/api/hainanOrder/order.js | 10 +- .../src/api/mobile/quoteMobile/quoteMobile.js | 10 + ruoyi-ui/src/router/index.js | 29 +- .../components/Tools/MaterialDialog/index.vue | 23 +- .../Tools/Mobile/CustomerSelect/index.vue | 156 ++++++++ .../views/hainanOrder/operation/addOrder.vue | 330 ++++++++++++---- ruoyi-ui/src/views/mobile/index.vue | 146 +++++++ .../src/views/mobile/quoteMobile/index.vue | 96 +++++ .../mobile/quoteMobile/operation/add.vue | 374 ++++++++++++++++++ 24 files changed, 1523 insertions(+), 92 deletions(-) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/web/controller/mobile/quoteMobile/QuoteMobileController.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/contract/damain/Contract.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/hainanOrder/domain/HNMaterial.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/mobile/quoteMobile/domain/MQuote.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/mobile/quoteMobile/mapper/QuoteMobileMapper.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/mobile/quoteMobile/service/QuoteMobileService.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/mobile/quoteMobile/service/impl/QuoteMobileServiceImpl.java create mode 100644 ruoyi-system/src/main/resources/mapper/mobile/quoteMobile/QuoteMobileMapper.xml create mode 100644 ruoyi-ui/src/api/mobile/quoteMobile/quoteMobile.js create mode 100644 ruoyi-ui/src/views/components/Tools/Mobile/CustomerSelect/index.vue create mode 100644 ruoyi-ui/src/views/mobile/index.vue create mode 100644 ruoyi-ui/src/views/mobile/quoteMobile/index.vue create mode 100644 ruoyi-ui/src/views/mobile/quoteMobile/operation/add.vue diff --git a/ABAP_AS_WITH_POOL.jcoDestination b/ABAP_AS_WITH_POOL.jcoDestination index f67dcdb..a23a01d 100644 --- a/ABAP_AS_WITH_POOL.jcoDestination +++ b/ABAP_AS_WITH_POOL.jcoDestination @@ -1,5 +1,5 @@ #for tests only ! -#Tue Jun 04 13:59:05 CST 2024 +#Fri Jun 14 15:11:13 CST 2024 jco.destination.pool_capacity=10 jco.client.lang=ZH jco.client.ashost=172.19.0.120 @@ -7,5 +7,5 @@ jco.client.saprouter= jco.client.user=RFC jco.client.sysnr=00 jco.destination.peak_limit=10 -jco.client.passwd=g]8^b-oV5)bg?0=#[a~}U*AcfC4BmB/D}?F8E5.6%iG`lg]L +jco.client.passwd=654321 jco.client.client=300 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/hainanOrder/HaiNanOrderController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/hainanOrder/HaiNanOrderController.java index 1907bd0..453f74c 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/hainanOrder/HaiNanOrderController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/hainanOrder/HaiNanOrderController.java @@ -3,6 +3,7 @@ package com.ruoyi.web.controller.hainanOrder; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.hainanOrder.domain.HNCustomer; +import com.ruoyi.hainanOrder.domain.HNMaterial; import com.ruoyi.hainanOrder.domain.HNParams; import com.ruoyi.hainanOrder.service.HaiNanOrderService; import org.springframework.beans.factory.annotation.Autowired; @@ -40,9 +41,15 @@ public class HaiNanOrderController extends BaseController { } @PostMapping("materialList") - public AjaxResult materialList(@RequestBody HNParams HNParams) { + public TableDataInfo materialList(@RequestParam("matnr") String matnr, @RequestParam("maktx3") String maktx3, + @RequestParam("maktx") String maktx, @RequestParam("maktx4") String maktx4, + @RequestParam("diany") String diany, @RequestParam("maktx5") String maktx5, + @RequestParam("maktx2") String maktx2) { - return null; + startPage(); + List materialList = haiNanOrderService.materialList(matnr, maktx3, maktx, maktx4, diany, maktx5, maktx2); + + return getDataTable(materialList); } @PostMapping("customList") @@ -56,4 +63,10 @@ public class HaiNanOrderController extends BaseController { // return null; } + @PostMapping("contractList") + public TableDataInfo contractList(@RequestParam("kunnr") String kunnr, + @RequestParam("name1") String name1) { + return null; + } + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/mobile/quoteMobile/QuoteMobileController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/mobile/quoteMobile/QuoteMobileController.java new file mode 100644 index 0000000..db380c8 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/mobile/quoteMobile/QuoteMobileController.java @@ -0,0 +1,34 @@ +package com.ruoyi.web.controller.mobile.quoteMobile; + +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.mobile.quoteMobile.service.QuoteMobileService; +import com.ruoyi.quot.domain.Quot; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +/** + * @ClassName QuoteMobileController + * @Description TODO + * @Author JIAL + * @Date 2024/6/12 10:07 + * @Version 1.0 + */ +@RestController +@RequestMapping("/quoteMobile/quote") +public class QuoteMobileController extends BaseController { + + @Autowired + QuoteMobileService quoteMobileService; + + @PostMapping("list") + public AjaxResult quoteList(Quot quot) { + List quotList = quoteMobileService.quoteList(quot); + + return AjaxResult.success(quotList) ; + } +} 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 2136654..461ebbd 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 @@ -1,6 +1,7 @@ package com.ruoyi.web.utils.SapFunction; import com.ruoyi.common.utils.StringUtils; +import com.ruoyi.contract.damain.Contract; import com.ruoyi.customer.domain.Bank; import com.ruoyi.customer.domain.BankCode; import com.ruoyi.customer.domain.Customer; @@ -300,6 +301,44 @@ public class SapRfcUtils { return countrys; } + /** + * @title getContract + * @description 获取合同数据 + * @author JIAL + * @param: param + * @updateTime 2024/6/11 16:09 + * @return: java.util.List + */ + public static List getContract(Object param) { + JCoFunction function = null; + Contract contract = null; + List contractList = new ArrayList<>(); + + JCoDestination destination = ConnectToSAP.connect(); + try { + function = destination.getRepository().getFunctionTemplate("ZYC_HTCX").getFunction(); + if (function == null) + throw new RuntimeException("RFC_SYSTEM_INFO not found in SAP."); + JCoParameterList input = function.getImportParameterList(); + input.setValue("HTH", StringUtils.isNotNull(param)?param:"X");//输入参数 + input.setValue("KHNAME", StringUtils.isNotNull(param)?param:"X");//输入参数 + input.setValue("CTRQB", StringUtils.isNotNull(param)?param:"X");//输入参数 + input.setValue("FLAG40", StringUtils.isNotNull(param)?param:"X");//输入参数 + input.setValue("FLAG40", StringUtils.isNotNull(param)?param:"X");//输入参数 + function.execute(destination); + JCoTable table = function.getTableParameterList().getTable("OUTHT"); + for(int i = 0; i customList(@Param("kunnr") String kunnr, @Param("name1")String name1); + + List materialList(@Param("matnr") String matnr, @Param("maktx3") String maktx3, + @Param("maktx") String maktx, @Param("maktx4") String maktx4, + @Param("diany") String diany, @Param("maktx5") String maktx5, + @Param("maktx2") String maktx2); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/hainanOrder/service/HaiNanOrderService.java b/ruoyi-system/src/main/java/com/ruoyi/hainanOrder/service/HaiNanOrderService.java index 977bd30..89e3665 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/hainanOrder/service/HaiNanOrderService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/hainanOrder/service/HaiNanOrderService.java @@ -1,6 +1,9 @@ package com.ruoyi.hainanOrder.service; +import com.ruoyi.common.annotation.DataSource; +import com.ruoyi.common.enums.DataSourceType; import com.ruoyi.hainanOrder.domain.HNCustomer; +import com.ruoyi.hainanOrder.domain.HNMaterial; import com.ruoyi.hainanOrder.domain.HNParams; import com.ruoyi.hainanOrder.domain.HaiNanOrder; @@ -36,4 +39,20 @@ public interface HaiNanOrderService { */ List customList(String kunnr, String name1); + /** + * @title materialList + * @description 获取物料列表 + * @author JIAL + * @param: matnr + * @param: maktx3 + * @param: maktx + * @param: maktx4 + * @param: diany + * @param: maktx5 + * @param: maktx2 + * @updateTime 2024/6/4 16:37 + * @return: java.util.List + */ + List materialList(String matnr, String maktx3, String maktx, + String maktx4, String diany, String maktx5, String maktx2); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/hainanOrder/service/impl/HaiNanOrderServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/hainanOrder/service/impl/HaiNanOrderServiceImpl.java index bc5c2fa..9d0526c 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/hainanOrder/service/impl/HaiNanOrderServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/hainanOrder/service/impl/HaiNanOrderServiceImpl.java @@ -3,6 +3,7 @@ package com.ruoyi.hainanOrder.service.impl; import com.ruoyi.common.annotation.DataSource; import com.ruoyi.common.enums.DataSourceType; import com.ruoyi.hainanOrder.domain.HNCustomer; +import com.ruoyi.hainanOrder.domain.HNMaterial; import com.ruoyi.hainanOrder.domain.HaiNanOrder; import com.ruoyi.hainanOrder.domain.HNParams; import com.ruoyi.hainanOrder.mapper.HaiNanOrderMapper; @@ -25,7 +26,7 @@ public class HaiNanOrderServiceImpl implements HaiNanOrderService { HaiNanOrderMapper haiNanOrderMapper; @Override - @DataSource(DataSourceType.ORDER) + @DataSource(DataSourceType.MASTER) public List orderList(HNParams HNParams) { return haiNanOrderMapper.orderList(HNParams); } @@ -35,4 +36,11 @@ public class HaiNanOrderServiceImpl implements HaiNanOrderService { public List customList(String kunnr, String name1) { return haiNanOrderMapper.customList(kunnr, name1); } + + @Override + @DataSource(DataSourceType.MASTER) + public List materialList(String matnr, String maktx3, String maktx, + String maktx4, String diany, String maktx5, String maktx2) { + return haiNanOrderMapper.materialList(matnr, maktx3, maktx, maktx4, diany, maktx5, maktx2); + } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/mobile/quoteMobile/domain/MQuote.java b/ruoyi-system/src/main/java/com/ruoyi/mobile/quoteMobile/domain/MQuote.java new file mode 100644 index 0000000..c384911 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/mobile/quoteMobile/domain/MQuote.java @@ -0,0 +1,17 @@ +package com.ruoyi.mobile.quoteMobile.domain; + +/** + * @ClassName MQuote + * @Description TODO + * @Author JIAL + * @Date 2024/6/12 10:26 + * @Version 1.0 + */ +public class MQuote { + String quot_customer_name; //客户 + String quot_project; //项目名称 + String quot_approval_status; //提交状态 + String quot_inquiry_date; //询价日期 + String quot_quotation_date; //报价日期 + String create_time; //创建日期 +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/mobile/quoteMobile/mapper/QuoteMobileMapper.java b/ruoyi-system/src/main/java/com/ruoyi/mobile/quoteMobile/mapper/QuoteMobileMapper.java new file mode 100644 index 0000000..09da363 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/mobile/quoteMobile/mapper/QuoteMobileMapper.java @@ -0,0 +1,16 @@ +package com.ruoyi.mobile.quoteMobile.mapper; + +import com.ruoyi.quot.domain.Quot; + +import java.util.List; + +/** + * @ClassName QuoteMobileMapper + * @Description TODO + * @Author JIAL + * @Date 2024/6/12 10:11 + * @Version 1.0 + */ +public interface QuoteMobileMapper { + List quoteList(); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/mobile/quoteMobile/service/QuoteMobileService.java b/ruoyi-system/src/main/java/com/ruoyi/mobile/quoteMobile/service/QuoteMobileService.java new file mode 100644 index 0000000..167c4ab --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/mobile/quoteMobile/service/QuoteMobileService.java @@ -0,0 +1,26 @@ +package com.ruoyi.mobile.quoteMobile.service; + +import com.ruoyi.hainanOrder.domain.HNParams; +import com.ruoyi.hainanOrder.domain.HaiNanOrder; +import com.ruoyi.quot.domain.Quot; + +import java.util.List; + +/** + * @ClassName QuoteMobileService + * @Description TODO + * @Author JIAL + * @Date 2024/6/12 10:10 + * @Version 1.0 + */ +public interface QuoteMobileService { + + /** + * @title quoteList + * @description 获取报价列表 + * @author JIAL + * @updateTime 2024/6/12 11:10 + * @return: java.util.List + */ + List quoteList(Quot quot); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/mobile/quoteMobile/service/impl/QuoteMobileServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/mobile/quoteMobile/service/impl/QuoteMobileServiceImpl.java new file mode 100644 index 0000000..3343ce6 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/mobile/quoteMobile/service/impl/QuoteMobileServiceImpl.java @@ -0,0 +1,29 @@ +package com.ruoyi.mobile.quoteMobile.service.impl; + +import com.ruoyi.mobile.quoteMobile.mapper.QuoteMobileMapper; +import com.ruoyi.mobile.quoteMobile.service.QuoteMobileService; +import com.ruoyi.quot.domain.Quot; +import com.ruoyi.quot.mapper.QuotMapper; +import org.apache.ibatis.jdbc.Null; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @ClassName QuoteMobileServiceImpl + * @Description TODO + * @Author JIAL + * @Date 2024/6/12 10:11 + * @Version 1.0 + */ +@Service +public class QuoteMobileServiceImpl implements QuoteMobileService { + @Autowired + QuotMapper quotMapper; + + @Override + public List quoteList(Quot quot) { + return quotMapper.selectQuotList(quot); + } +} diff --git a/ruoyi-system/src/main/resources/mapper/hainanOrder/HaiNanOrderMapper.xml b/ruoyi-system/src/main/resources/mapper/hainanOrder/HaiNanOrderMapper.xml index fd97257..a498cf0 100644 --- a/ruoyi-system/src/main/resources/mapper/hainanOrder/HaiNanOrderMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/hainanOrder/HaiNanOrderMapper.xml @@ -98,7 +98,7 @@ LEFT JOIN sapuser s on s.sapid=a.kunnr1 LEFT JOIN sapuser sb on sb.sapid=a.kunnrgwds - LEFT JOIN sys_user tuser2 ON tuser2.id =a.create_by + LEFT JOIN sys_user tuser2 ON tuser2.user_name =a.create_by @@ -169,4 +169,33 @@ GROUP BY kunnr,name1,name2 + + diff --git a/ruoyi-system/src/main/resources/mapper/mobile/quoteMobile/QuoteMobileMapper.xml b/ruoyi-system/src/main/resources/mapper/mobile/quoteMobile/QuoteMobileMapper.xml new file mode 100644 index 0000000..7236532 --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/mobile/quoteMobile/QuoteMobileMapper.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/ruoyi-ui/src/api/hainanOrder/order.js b/ruoyi-ui/src/api/hainanOrder/order.js index 2bee4d1..4c44f20 100644 --- a/ruoyi-ui/src/api/hainanOrder/order.js +++ b/ruoyi-ui/src/api/hainanOrder/order.js @@ -13,7 +13,7 @@ export function getMaterialList(query) { return request({ url: '/orderManage_Hn/order/materialList', method: 'post', - data: query + params: query }) } @@ -25,4 +25,12 @@ export function getCustomList(query) { }) } +export function getContractList(query) { + return request({ + url: '/orderManage_Hn/order/contractList', + method: 'post', + params: query + }) +} + diff --git a/ruoyi-ui/src/api/mobile/quoteMobile/quoteMobile.js b/ruoyi-ui/src/api/mobile/quoteMobile/quoteMobile.js new file mode 100644 index 0000000..6ac714c --- /dev/null +++ b/ruoyi-ui/src/api/mobile/quoteMobile/quoteMobile.js @@ -0,0 +1,10 @@ +import request from '@/utils/request' + +//查询报价列表 +export function getQuoteList(param) { + return request({ + url: '/quoteMobile/quote/list', + method: 'post', + params: param + }) +} diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js index 382d157..f63ffa7 100644 --- a/ruoyi-ui/src/router/index.js +++ b/ruoyi-ui/src/router/index.js @@ -99,7 +99,6 @@ export const constantRoutes = [ path: '/hainanOrder/index', component: Layout, hidden: true, - permissions: ['hainanOrder:operation:list'], children: [ { path: '', @@ -108,7 +107,33 @@ export const constantRoutes = [ meta: { title: '海南订单新建', activeMenu: '/hainanOrder/operation' } } ] - } + }, + { + path: '/quoteMobile/index', + component: Layout, + hidden: true, + children: [ + { + path: '', + component: () => import('@/views/mobile/quoteMobile/index'), + name: 'quoteMobile', + meta: { title: '报价单列表', activeMenu: '/mobile/quoteMobile' } + } + ] + }, + { + path: '/quoteMobile/add', + component: Layout, + hidden: true, + children: [ + { + path: '', + component: () => import('@/views/mobile/quoteMobile/operation/add'), + name: 'quoteMobile', + meta: { title: '新建报价单', activeMenu: '/mobile/quoteMobile/operation' } + } + ] + }, ] // 动态路由,基于用户权限动态去加载 diff --git a/ruoyi-ui/src/views/components/Tools/MaterialDialog/index.vue b/ruoyi-ui/src/views/components/Tools/MaterialDialog/index.vue index ac88bd9..9c15e51 100644 --- a/ruoyi-ui/src/views/components/Tools/MaterialDialog/index.vue +++ b/ruoyi-ui/src/views/components/Tools/MaterialDialog/index.vue @@ -1,6 +1,6 @@