From 33bcaec535996fb1c6ba82457372921e1c651509 Mon Sep 17 00:00:00 2001 From: xd <844539747@qq.com> Date: Mon, 6 May 2024 17:16:24 +0800 Subject: [PATCH] '123' --- ABAP_AS_WITH_POOL.jcoDestination | 2 +- .../customer/CustomerController.java | 26 ++++++++--- .../service/impl/CustomerServiceImpl.java | 4 ++ .../mapper/customer/CustomerMapper.xml | 1 + ruoyi-ui/src/api/customer/customer.js | 9 ++++ .../src/views/customer/customer/index.vue | 45 ++++++++++++++----- ruoyi-ui/src/views/quot/quot/index.vue | 7 ++- 7 files changed, 75 insertions(+), 19 deletions(-) diff --git a/ABAP_AS_WITH_POOL.jcoDestination b/ABAP_AS_WITH_POOL.jcoDestination index e7778db..d7275de 100644 --- a/ABAP_AS_WITH_POOL.jcoDestination +++ b/ABAP_AS_WITH_POOL.jcoDestination @@ -1,5 +1,5 @@ #for tests only ! -#Mon May 06 14:44:29 CST 2024 +#Mon May 06 17:03:41 CST 2024 jco.destination.pool_capacity=10 jco.client.lang=ZH jco.client.ashost=172.19.0.125 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/customer/CustomerController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/customer/CustomerController.java index ebec916..194655c 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/customer/CustomerController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/customer/CustomerController.java @@ -126,23 +126,39 @@ public class CustomerController extends BaseController public AjaxResult commitCustomer(@RequestBody Customer customer) { String cus_id = customer.getCusId(); + customer.setUpdateBy(getUsername()); + customer.setCusApprovalStatus("1");//客户提交 状态设置为 审核中 + + //TODO 提交校验 + if(StringUtils.isEmpty(cus_id)){ customer.setCusId(UUID.fastUUID().toString()); customer.setCusCode(IdUtils.createNo("KH_",2)); customer.setCreateBy(getUsername()); customerService.insertCustomer(customer); - //提交OA中间表 TODO - //.... return success(); }else{ - customer.setUpdateBy(getUsername()); customerService.updateCustomer(customer); - //提交OA中间表 TODO - //.... return success(); } } + /** + * 提交客户信息-SAP + */ + @PreAuthorize("@ss.hasPermi('customer:customer:commitSAP')") + @Log(title = "客户信息提交", businessType = BusinessType.OTHER) + @PostMapping("/commitSAPCustomer") + public AjaxResult commitSAPCustomer(@RequestBody Customer customer) + { + customer.setUpdateBy(getUsername()); + customer.setCusApprovalStatus("2");//客户提交 状态设置为 已审核 + customerService.updateCustomer(customer); + //TODO 提交校验 调用SAP rfc接口 更新客户凭证号 + return success(); + + } + /** * 删除客户管理 */ diff --git a/ruoyi-system/src/main/java/com/ruoyi/customer/service/impl/CustomerServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/customer/service/impl/CustomerServiceImpl.java index bd8c7b5..fe40f69 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/customer/service/impl/CustomerServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/customer/service/impl/CustomerServiceImpl.java @@ -2,6 +2,7 @@ package com.ruoyi.customer.service.impl; import java.util.List; import com.ruoyi.common.annotation.DataScope; +import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.uuid.UUID; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -60,6 +61,8 @@ public class CustomerServiceImpl implements ICustomerService @Override public int insertCustomer(Customer customer) { + customer.setCreateTime(DateUtils.getNowDate()); + customer.setUpdateTime(DateUtils.getNowDate()); int rows = customerMapper.insertCustomer(customer); insertBank(customer); return rows; @@ -75,6 +78,7 @@ public class CustomerServiceImpl implements ICustomerService @Override public int updateCustomer(Customer customer) { + customer.setUpdateTime(DateUtils.getNowDate()); customerMapper.deleteBankByCusId(customer.getCusId()); insertBank(customer); return customerMapper.updateCustomer(customer); diff --git a/ruoyi-system/src/main/resources/mapper/customer/CustomerMapper.xml b/ruoyi-system/src/main/resources/mapper/customer/CustomerMapper.xml index 09f1d9c..a4689bd 100644 --- a/ruoyi-system/src/main/resources/mapper/customer/CustomerMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/customer/CustomerMapper.xml @@ -56,6 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" LEFT JOIN sys_user u on u.user_name=a.create_by + LEFT JOIN sys_dept d on u.dept_id = d.dept_id diff --git a/ruoyi-ui/src/api/customer/customer.js b/ruoyi-ui/src/api/customer/customer.js index 38435f2..dcdefae 100644 --- a/ruoyi-ui/src/api/customer/customer.js +++ b/ruoyi-ui/src/api/customer/customer.js @@ -44,6 +44,15 @@ export function commitCustomer(data) { }) } +//提交客户信息-SAP +export function commitSAPCustomer(data) { + return request({ + url: '/customer/customer/commitSAPCustomer', + method: 'post', + data: data + }) +} + // 删除客户管理 export function delCustomer(cusId) { return request({ diff --git a/ruoyi-ui/src/views/customer/customer/index.vue b/ruoyi-ui/src/views/customer/customer/index.vue index 12a4eb9..491c28b 100644 --- a/ruoyi-ui/src/views/customer/customer/index.vue +++ b/ruoyi-ui/src/views/customer/customer/index.vue @@ -42,6 +42,7 @@ :key="dict.value" :label="dict.label" :value="dict.value" + v-if="(!cusApprovalStatusHidden && (dict.value == '1' || dict.value == '2')) || cusApprovalStatusHidden " /> @@ -107,7 +108,7 @@ @@ -298,26 +299,26 @@ - + - + @@ -472,7 +473,7 @@ - +