Ver código fonte

feat(customer): 添加客户信息ERP推送功能

- 在CustomerInfoDTO中新增fax、belongCompanyId、currencyCode字段
- 添加BusConn、CustInfo、DlvAddr、GathBn等ERP推送实体类
- 实现customerInfoJson方法生成客户信息JSON格式数据
- 添加RemoteComStaffService等远程服务接口及实现
- 更新订单退货服务orderReturnToJson方法
- 修改CustomerInfoServiceImpl中的状态更新逻辑
- 添加相关的依赖和服务引用配置
hurx 8 horas atrás
pai
commit
7189472861
33 arquivos alterados com 817 adições e 5 exclusões
  1. 6 0
      ruoyi-api/ruoyi-api-customer/src/main/java/org/dromara/customer/api/RemoteCustomerService.java
  2. 15 0
      ruoyi-api/ruoyi-api-customer/src/main/java/org/dromara/customer/api/domain/dto/CustomerInfoDTO.java
  3. 31 0
      ruoyi-api/ruoyi-api-customer/src/main/java/org/dromara/customer/api/erp/domain/push/BusConn.java
  4. 128 0
      ruoyi-api/ruoyi-api-customer/src/main/java/org/dromara/customer/api/erp/domain/push/CustInfo.java
  5. 43 0
      ruoyi-api/ruoyi-api-customer/src/main/java/org/dromara/customer/api/erp/domain/push/DlvAddr.java
  6. 40 0
      ruoyi-api/ruoyi-api-customer/src/main/java/org/dromara/customer/api/erp/domain/push/GathBn.java
  7. 6 0
      ruoyi-api/ruoyi-api-external/src/main/java/org/dromara/external/api/service/RemoteCustInfoService.java
  8. 70 0
      ruoyi-api/ruoyi-api-order/src/main/java/org/dromara/product/api/domain/push/SalBkApl.java
  9. 65 0
      ruoyi-api/ruoyi-api-order/src/main/java/org/dromara/product/api/domain/push/SalBkDet.java
  10. 2 0
      ruoyi-api/ruoyi-api-system/src/main/java/org/dromara/system/api/RemoteComCompanyService.java
  11. 2 0
      ruoyi-api/ruoyi-api-system/src/main/java/org/dromara/system/api/RemoteComCurrencyService.java
  12. 2 0
      ruoyi-api/ruoyi-api-system/src/main/java/org/dromara/system/api/RemoteComCustomerLevelService.java
  13. 2 1
      ruoyi-api/ruoyi-api-system/src/main/java/org/dromara/system/api/RemoteComCustomerTypeService.java
  14. 2 0
      ruoyi-api/ruoyi-api-system/src/main/java/org/dromara/system/api/RemoteComDeptService.java
  15. 2 0
      ruoyi-api/ruoyi-api-system/src/main/java/org/dromara/system/api/RemoteComStaffService.java
  16. 5 0
      ruoyi-api/ruoyi-api-system/src/main/java/org/dromara/system/api/RemoteComWarehouseService.java
  17. 2 0
      ruoyi-api/ruoyi-api-system/src/main/java/org/dromara/system/api/RemoteCreditLevelService.java
  18. 5 0
      ruoyi-modules/ruoyi-customer/pom.xml
  19. 33 1
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/dubbo/RemoteCustomerServiceImpl.java
  20. 2 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/ICustomerInfoService.java
  21. 137 2
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/CustomerInfoServiceImpl.java
  22. 15 0
      ruoyi-modules/ruoyi-external/src/main/java/org/dromara/external/dubbo/RemoteCustInfoServiceImpl.java
  23. 5 0
      ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/controller/OrderReturnController.java
  24. 2 0
      ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/service/IOrderReturnService.java
  25. 96 1
      ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/service/impl/OrderReturnServiceImpl.java
  26. 10 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/dubbo/RemoteComCompanyServiceImpl.java
  27. 10 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/dubbo/RemoteComCurrencyServiceImpl.java
  28. 10 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/dubbo/RemoteComCustomerLevelServiceImpl.java
  29. 10 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/dubbo/RemoteComCustomerTypeServiceImpl.java
  30. 11 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/dubbo/RemoteComDeptServiceImpl.java
  31. 11 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/dubbo/RemoteComStaffServiceImpl.java
  32. 26 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/dubbo/RemoteComWarehouseServiceImpl.java
  33. 11 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/dubbo/RemoteCreditLevelServiceImpl.java

+ 6 - 0
ruoyi-api/ruoyi-api-customer/src/main/java/org/dromara/customer/api/RemoteCustomerService.java

@@ -48,4 +48,10 @@ public interface RemoteCustomerService {
      */
     Boolean isNeedAffirmOrder(Long customerId);
 
+    String selectCustomerShippingAddressNoById(Long addressId);
+
+    /**
+     * 客户详细信息 拼接json格式
+     */
+    String customerInfoJson(Long customerId);
 }

+ 15 - 0
ruoyi-api/ruoyi-api-customer/src/main/java/org/dromara/customer/api/domain/dto/CustomerInfoDTO.java

@@ -51,5 +51,20 @@ public class CustomerInfoDTO implements Serializable {
      */
     private String regCountyNo;
 
+    /**
+     * 传真
+     */
+    private String fax;
+
+    /**
+     * 所属公司
+     */
+    private Long belongCompanyId;
+
+    /**
+     * 交易币别编码
+     */
+    private String currencyCode;
+
 
 }

+ 31 - 0
ruoyi-api/ruoyi-api-customer/src/main/java/org/dromara/customer/api/erp/domain/push/BusConn.java

@@ -0,0 +1,31 @@
+package org.dromara.customer.api.erp.domain.push;
+
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+/**
+ * 业务联系人 - ERP推送
+ *
+ * @author LionLi
+ * @date 2026-06-09
+ */
+@Data
+public class BusConn implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /** 客户 */
+    private String CustId;
+
+    /** 来源客户联系人 */
+    private String FrLkmId;
+
+    /** 主要联系人 */
+    private Boolean IsMainPer;
+
+    /** 标识号 */
+    private Integer RowCd;
+}

+ 128 - 0
ruoyi-api/ruoyi-api-customer/src/main/java/org/dromara/customer/api/erp/domain/push/CustInfo.java

@@ -0,0 +1,128 @@
+package org.dromara.customer.api.erp.domain.push;
+
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * 客户信息 - ERP推送
+ *
+ * @author LionLi
+ * @date 2026-06-09
+ */
+@Data
+public class CustInfo implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /** 编号 */
+    private String CustId;
+
+    /** 名称 */
+    private String CustNm;
+
+    /** 业务人员 */
+    private String PerId;
+
+    /** 联系地址 */
+    private String Addr;
+
+    /** 资本额 */
+    private BigDecimal CapAmt;
+
+    /** 结账日(半月结) */
+    private Integer ChkHalfDa;
+
+    /** 结账日 */
+    private Integer ChkoutDa;
+
+    /** 结账日(周结) */
+    private Integer ChkWeekDa;
+
+    /** 城市 */
+    private String CityId;
+
+    /** 国家/地区 */
+    private String CountryId;
+
+    /** 信用等级 */
+    private String CreCls;
+
+    /** 企业规模 */
+    private String CropSclId;
+
+    /** 公司 */
+    private String CU_comCo;
+
+    /** 销售开票类型 */
+    private String CU_SalesInvoice;
+
+    /** 交易币别 */
+    private String CurId;
+
+    /** 客户来源 */
+    private String CustSrcId;
+
+    /** 类别 */
+    private String CustTyId;
+
+    /** 电子邮件 */
+    private String Email;
+
+    /** 传真号码 */
+    private String FaxNo;
+
+    /** 客户等级 */
+    private String GadId;
+
+    /** 收款条件 */
+    private Integer GathCnd;
+
+    /** 收款天数 */
+    private Integer GathDays;
+
+    /** 发票地址 */
+    private String InvoAddr;
+
+    /** 发票抬头 */
+    private String InvoTt;
+
+    /** 网址 */
+    private String LkUrl;
+
+    /** 办公电话 */
+    private String OfiTel;
+
+    /** 负责人 */
+    private String Principal;
+
+    /** 省份 */
+    private String PrvnId;
+
+    /** QQ/MSN */
+    private String QQMSN;
+
+    /** 备注 */
+    private String Remark;
+
+    /** 业务助理 */
+    private String SalAsstId;
+
+    /** 简称 */
+    private String SrtNm;
+
+    /** 统一社会信用代码 */
+    private String TaxChkNo;
+
+    /** 行业别 */
+    private String TradTy;
+
+    /** 有效期从 */
+    private Integer ValidityFromDate;
+
+    /** 有效期至 */
+    private Integer ValidityToDate;
+}

+ 43 - 0
ruoyi-api/ruoyi-api-customer/src/main/java/org/dromara/customer/api/erp/domain/push/DlvAddr.java

@@ -0,0 +1,43 @@
+package org.dromara.customer.api.erp.domain.push;
+
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+/**
+ * 送货地址 - ERP推送
+ *
+ * @author LionLi
+ * @date 2026-06-09
+ */
+@Data
+public class DlvAddr implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /** 地址 */
+    private String Addr;
+
+    /** 地址编号 */
+    private String AddrNo;
+
+    /** 客户 */
+    private String CustId;
+
+    /** 联系人 */
+    private String ConnPer;
+
+    /** 联系人职称 */
+    private String ConnPos;
+
+    /** 联系电话 */
+    private String ConnTel;
+
+    /** 主要送货地址 */
+    private Boolean IsMainAddr;
+
+    /** 邮政编码 */
+    private String PtC;
+}

+ 40 - 0
ruoyi-api/ruoyi-api-customer/src/main/java/org/dromara/customer/api/erp/domain/push/GathBn.java

@@ -0,0 +1,40 @@
+package org.dromara.customer.api.erp.domain.push;
+
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+/**
+ * 银行账户 - ERP推送
+ *
+ * @author LionLi
+ * @date 2026-06-09
+ */
+@Data
+public class GathBn implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /** 银行账号 */
+    private String BnAccNo;
+
+    /** 客户 */
+    private String CustId;
+
+    /** 开户银行 */
+    private String AccBn;
+
+    /** 账户名称 */
+    private String AccNm;
+
+    /** 主账户 */
+    private Boolean MainAcc;
+
+    /** 序号 */
+    private Integer RowNo;
+
+    /** 联系电话 */
+    private String TelNo;
+}

+ 6 - 0
ruoyi-api/ruoyi-api-external/src/main/java/org/dromara/external/api/service/RemoteCustInfoService.java

@@ -0,0 +1,6 @@
+package org.dromara.external.api.service;
+
+public interface RemoteCustInfoService {
+
+    String customerInfoJson();
+}

+ 70 - 0
ruoyi-api/ruoyi-api-order/src/main/java/org/dromara/product/api/domain/push/SalBkApl.java

@@ -0,0 +1,70 @@
+package org.dromara.product.api.domain.push;
+
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+/**
+ * 退货申请主表 - ERP推送
+ *
+ * @author LionLi
+ * @date 2026-06-10
+ */
+@Data
+public class SalBkApl implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /** 单据日期 */
+    private Integer BlDa;
+
+    /** 单据编号 */
+    private String BlNo;
+
+    /** 公司 */
+    private String CoId;
+
+    /** 交易币别 */
+    private String CurId;
+
+    /** 客户 */
+    private String CustId;
+
+    /** 业务人员 */
+    private String PerId;
+
+    /** 发货日期 */
+    private Integer SalDa;
+
+    /** 地址 */
+    private String Addr;
+
+    /** 送货地址编号 */
+    private String AddrNo;
+
+    /** 联系人 */
+    private String ConnPer;
+
+    /** 联系电话 */
+    private String ConnTel;
+
+    /** 所属部门 */
+    private String DeptId;
+
+    /** 传真号码 */
+    private String Fax;
+
+    /** 单价含税 */
+    private Boolean IsPrWTax;
+
+    /** 单据类型 */
+    private String TypeId;
+
+    /** 商城订单退货号 */
+    private String X_WebOrdBackNo;
+
+    /** 商城订单号 */
+    private String X_WebOrdNo;
+}

+ 65 - 0
ruoyi-api/ruoyi-api-order/src/main/java/org/dromara/product/api/domain/push/SalBkDet.java

@@ -0,0 +1,65 @@
+package org.dromara.product.api.domain.push;
+
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * 退货申请明细 - ERP推送
+ *
+ * @author LionLi
+ * @date 2026-06-10
+ */
+@Data
+public class SalBkDet implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /** 单据编号 */
+    private String BlNo;
+
+    /** 税码编号 */
+    private String TaxId;
+
+    /** 来源单号 */
+    private String FrBlNo;
+
+    /** 来源标识号 */
+    private Integer FrRowCd;
+
+    /** 来源单种类 */
+    private Integer FrSrcTag;
+
+    /** 类型 */
+    private Integer IxTy;
+
+    /** 金额 */
+    private BigDecimal OAmt;
+
+    /** 含税金额 */
+    private BigDecimal OAmtWTax;
+
+    /** 产品编号 */
+    private String ProdId;
+
+    /** 标识号 */
+    private Integer RowCd;
+
+    /** 序号 */
+    private Integer RowNo;
+
+    /** 退货数量 */
+    private BigDecimal ShpmSQty;
+
+    /** 交易价 */
+    private BigDecimal SPr;
+
+    /** 交易数量 */
+    private BigDecimal SQty;
+
+    /** 仓库编号 */
+    private String WhsId;
+}

+ 2 - 0
ruoyi-api/ruoyi-api-system/src/main/java/org/dromara/system/api/RemoteComCompanyService.java

@@ -13,4 +13,6 @@ public interface RemoteComCompanyService {
     RemoteComCompanyVo selectByCompanyName(String companyName);
 
     List<RemoteComCompanyVo> selectCompanyList();
+
+    String selectCompanyCodeById(Long companyId);
 }

+ 2 - 0
ruoyi-api/ruoyi-api-system/src/main/java/org/dromara/system/api/RemoteComCurrencyService.java

@@ -17,4 +17,6 @@ public interface RemoteComCurrencyService {
      * @return 交易币别VO列表
      */
     List<RemoteComCurrencyVo> selectCurrencyByIds(Set<Long> ids);
+
+    String selectCurrencyCodeById(Long id);
 }

+ 2 - 0
ruoyi-api/ruoyi-api-system/src/main/java/org/dromara/system/api/RemoteComCustomerLevelService.java

@@ -22,4 +22,6 @@ public interface RemoteComCustomerLevelService {
     Map<Long, String> selectCustomerLevelNameByIds(Set<Long> ids);
 
     List<RemoteComCustomerLevelVo> selectCustomerLevelList();
+
+    String selectCustomerLevelNoById(Long id);
 }

+ 2 - 1
ruoyi-api/ruoyi-api-system/src/main/java/org/dromara/system/api/RemoteComCustomerTypeService.java

@@ -1,6 +1,5 @@
 package org.dromara.system.api;
 
-import org.dromara.system.api.domain.vo.RemoteComCustomerLevelVo;
 import org.dromara.system.api.domain.vo.RemoteComCustomerTypeVo;
 
 import java.util.List;
@@ -16,4 +15,6 @@ public interface RemoteComCustomerTypeService {
      * @return 客户类型VO列表
      */
     List<RemoteComCustomerTypeVo> selectCustomerTypeByIds(Set<Long> ids);
+
+    String selectCustomerTypeNoNameById(Long id);
 }

+ 2 - 0
ruoyi-api/ruoyi-api-system/src/main/java/org/dromara/system/api/RemoteComDeptService.java

@@ -6,4 +6,6 @@ import java.util.Set;
 public interface RemoteComDeptService {
 
     Map<Long, String> selectDeptNameByIds(Set<Long> ids);
+
+    String selectDeptNOById(Long id);
 }

+ 2 - 0
ruoyi-api/ruoyi-api-system/src/main/java/org/dromara/system/api/RemoteComStaffService.java

@@ -26,4 +26,6 @@ public interface RemoteComStaffService {
 
     RemoteComStaffVo selectStaffByUserId(Long userId);
 
+    String selectStaffCodeById(Long staffId);
+
 }

+ 5 - 0
ruoyi-api/ruoyi-api-system/src/main/java/org/dromara/system/api/RemoteComWarehouseService.java

@@ -0,0 +1,5 @@
+package org.dromara.system.api;
+
+public interface RemoteComWarehouseService {
+    String getWarehouseNoById(Long warehouseId);
+}

+ 2 - 0
ruoyi-api/ruoyi-api-system/src/main/java/org/dromara/system/api/RemoteCreditLevelService.java

@@ -19,4 +19,6 @@ public interface RemoteCreditLevelService {
     Map<Long, String> selectCreditLevelNameByIds(Set<Long> ids);
 
     RemoteCreditLevelVo selectByCreditLevelName(String creditLevelName);
+
+    String selectCreditLevelCodeById(Long id);
 }

+ 5 - 0
ruoyi-modules/ruoyi-customer/pom.xml

@@ -128,6 +128,11 @@
             <artifactId>ruoyi-api-order</artifactId>
         </dependency>
 
+        <dependency>
+            <groupId>org.dromara</groupId>
+            <artifactId>ruoyi-api-external</artifactId>
+        </dependency>
+
     </dependencies>
 
     <build>

+ 33 - 1
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/dubbo/RemoteCustomerServiceImpl.java

@@ -12,11 +12,14 @@ import org.dromara.customer.api.domain.dto.CustomerAddressDTO;
 import org.dromara.customer.api.domain.dto.CustomerInfoDTO;
 import org.dromara.customer.domain.CustomerContact;
 import org.dromara.customer.domain.CustomerInfo;
+import org.dromara.customer.domain.CustomerSalesInfo;
 import org.dromara.customer.domain.CustomerShippingAddress;
 import org.dromara.customer.mapper.CustomerInfoMapper;
+import org.dromara.customer.mapper.CustomerSalesInfoMapper;
 import org.dromara.customer.service.ICustomerContactService;
 import org.dromara.customer.service.ICustomerInfoService;
 import org.dromara.customer.service.ICustomerShippingAddressService;
+import org.dromara.system.api.RemoteComCurrencyService;
 import org.springframework.stereotype.Service;
 
 import java.util.Collections;
@@ -39,6 +42,10 @@ public class RemoteCustomerServiceImpl implements RemoteCustomerService {
 
     private final ICustomerShippingAddressService customerShippingAddressService;
 
+    private final CustomerSalesInfoMapper customerSalesInfoMapper;
+
+    private final RemoteComCurrencyService remoteComCurrencyService;
+
 
     @Override
     public Map<Long, String> selectCustomerNameByIds(Set<Long> ids) {
@@ -116,7 +123,14 @@ public class RemoteCustomerServiceImpl implements RemoteCustomerService {
     @Override
     public CustomerInfoDTO selectCustomerInfoById(Long customerId) {
         CustomerInfo customerInfo = customerInfoService.getById(customerId);
-        return BeanUtil.toBean(customerInfo, CustomerInfoDTO.class);
+        CustomerInfoDTO dto = BeanUtil.toBean(customerInfo, CustomerInfoDTO.class);
+        if (dto != null) {
+            CustomerSalesInfo salesInfo = customerSalesInfoMapper.selectByCustomerId(customerId);
+            if (salesInfo != null && salesInfo.getDealCurrencyId() != null) {
+                dto.setCurrencyCode(remoteComCurrencyService.selectCurrencyCodeById(salesInfo.getDealCurrencyId()));
+            }
+        }
+        return dto;
     }
 
     @Override
@@ -149,4 +163,22 @@ public class RemoteCustomerServiceImpl implements RemoteCustomerService {
     public Boolean isNeedAffirmOrder(Long customerId) {
         return customerInfoService.isNeedAffirmOrder(customerId);
     }
+
+    @Override
+    public String selectCustomerShippingAddressNoById(Long addressId) {
+        String addressNo = "";
+        CustomerShippingAddress one = customerShippingAddressService.getOne(Wrappers.lambdaQuery(CustomerShippingAddress.class)
+            .eq(CustomerShippingAddress::getId, addressId)
+            .last("limit 1")
+        );
+        if (one != null) {
+            addressNo = one.getShippingAddressNo();
+        }
+        return addressNo;
+    }
+
+    @Override
+    public String customerInfoJson(Long customerId) {
+        return customerInfoService.customerInfoJson(customerId);
+    }
 }

+ 2 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/ICustomerInfoService.java

@@ -204,4 +204,6 @@ public interface ICustomerInfoService extends IService<CustomerInfo> {
      * @return 导入模板VO列表
      */
     List<CustomerInfoImportVo> queryImportTemplateList(int limit);
+
+   String customerInfoJson(Long customerId);
 }

+ 137 - 2
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/CustomerInfoServiceImpl.java

@@ -3,6 +3,7 @@ package org.dromara.customer.service.impl;
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.collection.CollUtil;
 import cn.hutool.crypto.digest.BCrypt;
+import cn.hutool.json.JSONUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@@ -14,6 +15,7 @@ import org.apache.dubbo.config.annotation.DubboReference;
 import org.dromara.common.core.constant.GlobalConstants;
 import org.dromara.common.core.context.PlatformContext;
 import org.dromara.common.core.domain.R;
+import org.dromara.common.core.enums.FormatsType;
 import org.dromara.common.core.enums.IsDefault;
 import org.dromara.common.core.exception.ServiceException;
 import org.dromara.common.core.utils.DateUtils;
@@ -25,6 +27,10 @@ import org.dromara.common.mybatis.core.page.TableDataInfo;
 import org.dromara.common.redis.utils.RedisUtils;
 import org.dromara.common.redis.utils.SequenceUtils;
 import org.dromara.common.satoken.utils.LoginHelper;
+import org.dromara.customer.api.erp.domain.push.BusConn;
+import org.dromara.customer.api.erp.domain.push.CustInfo;
+import org.dromara.customer.api.erp.domain.push.DlvAddr;
+import org.dromara.customer.api.erp.domain.push.GathBn;
 import org.dromara.customer.domain.*;
 import org.dromara.customer.domain.bo.*;
 import org.dromara.customer.domain.vo.*;
@@ -1130,7 +1136,7 @@ public class CustomerInfoServiceImpl extends ServiceImpl<CustomerInfoMapper, Cus
 
         // 3. 插入新的关联数据
         saveAssociatedData(customerId, bo);
-
+        customerInfoJson(customerId);
         return true;
     }
 
@@ -1232,10 +1238,15 @@ public class CustomerInfoServiceImpl extends ServiceImpl<CustomerInfoMapper, Cus
                 }
             }
         }
-        return baseMapper.update(null,
+
+        Integer num = baseMapper.update(null,
             new LambdaUpdateWrapper<CustomerInfo>()
                 .set(CustomerInfo::getStatus, status)
                 .eq(CustomerInfo::getId, customerId));
+        if (num > 0) {
+            customerInfoJson(customerId);
+        }
+        return num;
     }
 
     @Override
@@ -2386,4 +2397,128 @@ public class CustomerInfoServiceImpl extends ServiceImpl<CustomerInfoMapper, Cus
 
         return exportList;
     }
+
+    @Override
+    public String customerInfoJson(Long customerId) {
+        // 1. 查询客户主信息
+        CustomerInfoVo customerInfoVo = baseMapper.selectVoById(customerId);
+        if (customerInfoVo == null) {
+            return "{}";
+        }
+
+        // 2. 查询关联数据
+        CustomerSalesInfo salesInfo = customerSalesInfoMapper.selectByCustomerId(customerInfoVo.getId());
+        CustomerBusinessInfo businessInfo = customerBusinessInfoMapper.selectByCustomerId(customerInfoVo.getId());
+        List<CustomerContact> customerContacts = customerContactMapper.selectListByCustomerId(customerInfoVo.getId());
+        List<CustomerShippingAddressVo> shippingAddressVos = shippingAddressMapper.selectVoList(
+            new LambdaQueryWrapper<CustomerShippingAddress>()
+                .eq(CustomerShippingAddress::getCustomerId, customerInfoVo.getId()));
+        List<CustomerInvoiceInfo> invoiceInfos = customerInvoiceInfoMapper.selectListByCustomerId(customerInfoVo.getId());
+
+        // 3. 映射 CustInfo
+        CustInfo custInfo = new CustInfo();
+        custInfo.setCustId(customerInfoVo.getCustomerNo());
+        custInfo.setCustNm(customerInfoVo.getCustomerName());
+        custInfo.setPerId(remoteComStaffService.selectStaffCodeById((customerInfoVo.getSalesPersonId())));
+        custInfo.setSalAsstId(remoteComStaffService.selectStaffCodeById((customerInfoVo.getServiceStaffId())));
+        custInfo.setAddr(customerInfoVo.getAddress());
+        if (businessInfo != null) {
+            try {
+                custInfo.setCapAmt(new BigDecimal(businessInfo.getRegisteredCapital()));
+            } catch (Exception e) {
+                log.warn("解析注册资本失败: {}", businessInfo.getRegisteredCapital());
+            }
+            custInfo.setPrincipal(businessInfo.getLegalPersonName());
+        }
+        if (salesInfo != null) {
+            custInfo.setChkHalfDa(salesInfo.getBillingDay());
+            custInfo.setChkoutDa(salesInfo.getBillDate());
+            custInfo.setChkWeekDa(salesInfo.getAccountPeriod());
+            custInfo.setCreCls(remoteCreditLevelService.selectCreditLevelCodeById(salesInfo.getCreditLevelId()));
+            custInfo.setCurId(remoteComCurrencyService.selectCurrencyCodeById(salesInfo.getDealCurrencyId()));
+            custInfo.setCustSrcId(salesInfo.getCustomerSource());
+            custInfo.setGathCnd(salesInfo.getSettlementMethod() != null ? salesInfo.getSettlementMethod().intValue() : null);
+            custInfo.setGathDays(salesInfo.getPayDays());
+        }
+        custInfo.setCityId(customerInfoVo.getRegCityNo());
+        custInfo.setCropSclId(customerInfoVo.getEnterpriseScaleId() != null ? enterpriseScaleMapper.selectVoById(customerInfoVo.getEnterpriseScaleId()).getEnterpriseScaleCode() : null);
+        custInfo.setCU_comCo(customerInfoVo.getCompanyName());
+        custInfo.setCU_SalesInvoice(customerInfoVo.getSellInvoiceTypeNo());
+        custInfo.setCustTyId(remoteComCustomerTypeService.selectCustomerTypeNoNameById(customerInfoVo.getCustomerTypeId()));
+        custInfo.setEmail(customerInfoVo.getEmail());
+        custInfo.setFaxNo(customerInfoVo.getFax());
+        custInfo.setInvoAddr(customerInfoVo.getAddress());
+        custInfo.setInvoTt(customerInfoVo.getCustomerName());
+        custInfo.setLkUrl(customerInfoVo.getUrl());
+        custInfo.setOfiTel(customerInfoVo.getLandline());
+        custInfo.setPrvnId(customerInfoVo.getRegProvincialNo());
+        custInfo.setRemark(customerInfoVo.getRemark());
+        custInfo.setSrtNm(customerInfoVo.getShortName());
+        custInfo.setTaxChkNo(customerInfoVo.getSocialCreditCode());
+        custInfo.setGadId(remoteComCustomerLevelService.selectCustomerLevelNoById(customerInfoVo.getCustomerLevelId()));
+        custInfo.setTradTy(customerInfoVo.getIndustryCategoryId() != null ? industryCategoryMapper.selectVoById(customerInfoVo.getIndustryCategoryId()).getIndustryCode() : null);
+        if (customerInfoVo.getValidityFromDate() != null) {
+            custInfo.setValidityFromDate(Integer.parseInt(DateUtils.parseDateToStr(FormatsType.YYYYMMDD, customerInfoVo.getValidityFromDate())));
+        }
+        if (customerInfoVo.getValidityToDate() != null) {
+            custInfo.setValidityToDate(Integer.parseInt(DateUtils.parseDateToStr(FormatsType.YYYYMMDD, customerInfoVo.getValidityToDate())));
+        }
+        custInfo.setCountryId(customerInfoVo.getRegCountyNo());
+        custInfo.setQQMSN(customerInfoVo.getEmail());
+
+        // 4. 映射 DlvAddr 列表
+        List<DlvAddr> dlvAddrList = new ArrayList<>();
+        if (CollUtil.isNotEmpty(shippingAddressVos)) {
+            for (CustomerShippingAddressVo vo : shippingAddressVos) {
+                DlvAddr dlvAddr = new DlvAddr();
+                dlvAddr.setAddr(vo.getAddress());
+                dlvAddr.setAddrNo(vo.getShippingAddressNo());
+                dlvAddr.setCustId(customerInfoVo.getCustomerNo());
+                dlvAddr.setConnPer(vo.getConsignee());
+                dlvAddr.setConnPos(vo.getDeptName());
+                dlvAddr.setConnTel(vo.getPhone());
+                dlvAddr.setIsMainAddr("0".equals(vo.getDefaultAddress()));
+                dlvAddr.setPtC(vo.getPostal());
+                dlvAddrList.add(dlvAddr);
+            }
+        }
+
+        // 5. 映射 GathBn 列表
+        List<GathBn> gathBnList = new ArrayList<>();
+        if (CollUtil.isNotEmpty(invoiceInfos)) {
+            int rowNo = 1;
+            for (CustomerInvoiceInfo info : invoiceInfos) {
+                GathBn gathBn = new GathBn();
+                gathBn.setBnAccNo(info.getBankAccount());
+                gathBn.setCustId(customerInfoVo.getCustomerNo());
+                gathBn.setAccBn(info.getBankName());
+                gathBn.setAccNm(customerInfoVo.getCustomerName());
+                gathBn.setMainAcc("0".equals(info.getIsPrimaryAccount()));
+                gathBn.setRowNo(rowNo++);
+                gathBn.setTelNo(info.getPhone());
+                gathBnList.add(gathBn);
+            }
+        }
+
+        // 6. 映射 BusConn 列表
+        List<BusConn> busConnList = new ArrayList<>();
+        if (CollUtil.isNotEmpty(customerContacts)) {
+            for (CustomerContact contact : customerContacts) {
+                BusConn busConn = new BusConn();
+                busConn.setCustId(customerInfoVo.getCustomerNo());
+                busConn.setFrLkmId(contact.getId() != null ? String.valueOf(contact.getId()) : null);
+                busConn.setIsMainPer("0".equals(contact.getIsPrimary()));
+                busConn.setRowCd(contact.getId() != null ? contact.getId().intValue() : null);
+                busConnList.add(busConn);
+            }
+        }
+
+        // 7. 组装返回JSON
+        Map<String, Object> result = new LinkedHashMap<>();
+        result.put("CustInfo", custInfo);
+        result.put("DlvAddr", dlvAddrList);
+        result.put("GathBn", gathBnList);
+        result.put("BusConn", busConnList);
+        return JSONUtil.toJsonStr(result);
+    }
 }

+ 15 - 0
ruoyi-modules/ruoyi-external/src/main/java/org/dromara/external/dubbo/RemoteCustInfoServiceImpl.java

@@ -0,0 +1,15 @@
+package org.dromara.external.dubbo;
+
+import org.apache.dubbo.config.annotation.DubboReference;
+import org.dromara.customer.api.RemoteCustomerService;
+import org.dromara.external.api.service.RemoteCustInfoService;
+
+public class RemoteCustInfoServiceImpl implements RemoteCustInfoService {
+
+    @DubboReference
+    private RemoteCustomerService remoteCustomerService;
+    @Override
+    public String customerInfoJson() {
+        return remoteCustomerService.customerInfoJson(null);
+    }
+}

+ 5 - 0
ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/controller/OrderReturnController.java

@@ -104,6 +104,11 @@ public class OrderReturnController extends BaseController {
         return toAjax(orderReturnService.deleteWithValidByIds(List.of(ids), true));
     }
 
+    @GetMapping("/orderReturnToJson")
+    public String orderReturnToJson() {
+        return orderReturnService.orderReturnToJson(2059218403827687426L);
+    }
+
     /**
      * 状态修改
      */

+ 2 - 0
ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/service/IOrderReturnService.java

@@ -113,4 +113,6 @@ public interface IOrderReturnService extends IService<OrderReturn> {
      * @return 影响行数
      */
     int apiWithdrawReturn(Long returnId, String returnNo, String withdrawReason);
+
+    String orderReturnToJson(Long returnId);
 }

+ 96 - 1
ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/service/impl/OrderReturnServiceImpl.java

@@ -1,6 +1,7 @@
 package org.dromara.order.service.impl;
 
 import cn.hutool.core.collection.CollUtil;
+import cn.hutool.json.JSONUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -8,16 +9,21 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.dubbo.config.annotation.DubboReference;
+import org.dromara.common.core.enums.FormatsType;
+import org.dromara.common.core.utils.DateUtils;
 import org.dromara.common.core.utils.MapstructUtils;
+import org.dromara.common.core.utils.ObjectUtils;
 import org.dromara.common.core.utils.StringUtils;
 import org.dromara.common.mybatis.core.page.PageQuery;
 import org.dromara.common.mybatis.core.page.TableDataInfo;
 import org.dromara.common.redis.utils.SequenceUtils;
 import org.dromara.customer.api.RemoteCustomerService;
+import org.dromara.customer.api.domain.dto.CustomerInfoDTO;
 import org.dromara.order.domain.*;
 import org.dromara.order.domain.bo.ApiOrderReturnBo;
 import org.dromara.order.domain.bo.OrderReturnBo;
 import org.dromara.order.domain.bo.OrderReturnItemBo;
+import org.dromara.order.domain.vo.OrderMainVo;
 import org.dromara.order.domain.vo.OrderReturnItemVo;
 import org.dromara.order.domain.vo.OrderReturnVo;
 import org.dromara.order.mapper.OrderMainMapper;
@@ -26,6 +32,12 @@ import org.dromara.order.mapper.OrderReturnMapper;
 import org.dromara.order.service.IOrderMainCrrcExtService;
 import org.dromara.order.service.IOrderReturnPickCrrcService;
 import org.dromara.order.service.IOrderReturnService;
+import org.dromara.product.api.domain.push.SalBkApl;
+import org.dromara.product.api.domain.push.SalBkDet;
+import org.dromara.system.api.RemoteComCompanyService;
+import org.dromara.system.api.RemoteComDeptService;
+import org.dromara.system.api.RemoteComStaffService;
+import org.dromara.system.api.RemoteComWarehouseService;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -47,6 +59,18 @@ public class OrderReturnServiceImpl extends ServiceImpl<OrderReturnMapper, Order
     @DubboReference
     private RemoteCustomerService remoteCustomerService;
 
+    @DubboReference
+    private RemoteComStaffService remoteComStaffService;
+
+    @DubboReference
+    private RemoteComWarehouseService remoteComWarehouseService;
+
+    @DubboReference
+    private RemoteComCompanyService remoteComCompanyService;
+
+    @DubboReference
+    private RemoteComDeptService remoteComDeptService;
+
     private final OrderReturnMapper baseMapper;
 
     private final OrderMainMapper orderMainMapper;
@@ -241,7 +265,7 @@ public class OrderReturnServiceImpl extends ServiceImpl<OrderReturnMapper, Order
 
         // 保存明细
         saveOrderReturnItems(entity.getId(), bo.getOrderReturnItemList(), false);
-
+        orderReturnToJson(entity.getId());
         log.info("新增退货单成功,单号: {}", entity.getReturnNo());
         return true;
     }
@@ -602,4 +626,75 @@ public class OrderReturnServiceImpl extends ServiceImpl<OrderReturnMapper, Order
         return result;
     }
 
+    @Override
+    public String orderReturnToJson(Long returnId) {
+        OrderReturnVo orderReturn = queryById(returnId);
+
+        OrderMainVo orderMainVo = orderMainMapper.selectVoById(orderReturn.getOrderId());
+
+        // 查询客户信息,获取业务人员等
+        CustomerInfoDTO customerInfo = null;
+        if (orderReturn.getCustomerId() != null) {
+            customerInfo = remoteCustomerService.selectCustomerInfoById(orderReturn.getCustomerId());
+        }
+
+        // 1. 映射 SalBkApl
+        SalBkApl salBkApl = new SalBkApl();
+        if (orderReturn.getReturnTime() != null) {
+            salBkApl.setBlDa(Integer.parseInt(DateUtils.parseDateToStr(FormatsType.YYYYMMDD, orderReturn.getReturnTime())));
+        }
+        salBkApl.setBlNo(orderReturn.getReturnNo());
+        salBkApl.setCoId(remoteComCompanyService.selectCompanyCodeById(customerInfo.getBelongCompanyId()));
+        salBkApl.setCurId(customerInfo != null && StringUtils.isNotBlank(customerInfo.getCurrencyCode()) ? customerInfo.getCurrencyCode() : "");
+        salBkApl.setCustId(orderReturn.getCustomerNo());
+        if (customerInfo != null && customerInfo.getSalesPersonId() != null) {
+            salBkApl.setPerId(remoteComStaffService.selectStaffCodeById(customerInfo.getSalesPersonId()));
+        }
+        salBkApl.setAddr(orderReturn.getChargebackAddress());
+        salBkApl.setAddrNo(remoteCustomerService.selectCustomerShippingAddressNoById(orderMainVo.getShippingAddressId()));
+        salBkApl.setConnPer(orderReturn.getChargebackName());
+        salBkApl.setConnTel(orderReturn.getChargebackPhone());
+        if (customerInfo != null && customerInfo.getBelongingDepartmentId() != null) {
+            salBkApl.setDeptId(remoteComDeptService.selectDeptNOById(customerInfo.getBelongingDepartmentId()));
+        }
+        salBkApl.setFax(customerInfo != null && StringUtils.isNotBlank(customerInfo.getFax()) ? customerInfo.getFax() : "");
+        salBkApl.setIsPrWTax(true);
+        salBkApl.setTypeId(orderReturn.getServiceType());
+        salBkApl.setX_WebOrdBackNo(orderReturn.getReturnNo());
+        salBkApl.setX_WebOrdNo(orderReturn.getOrderNo());
+
+        // 2. 映射 SalBkDet 列表
+        List<SalBkDet> salBkDetList = new ArrayList<>();
+        List<OrderReturnItemVo> items = orderReturn.getOrderReturnItemList();
+        if (CollUtil.isNotEmpty(items)) {
+            int rowNo = 1;
+            for (OrderReturnItemVo item : items) {
+                SalBkDet det = new SalBkDet();
+                det.setBlNo(orderReturn.getReturnNo());
+                det.setTaxId("");
+                det.setFrBlNo(orderReturn.getOrderNo());
+                det.setFrRowCd(item.getOrderProductId() != null ? item.getOrderProductId().intValue() : null);
+                det.setFrSrcTag(1);
+                det.setIxTy(1);
+                det.setOAmt(item.getTotalAmount());
+                det.setOAmtWTax(item.getTotalAmount());
+                det.setProdId(item.getProductNo());
+                det.setRowCd(item.getId() != null ? item.getId().intValue() : null);
+                det.setRowNo(rowNo++);
+                det.setShpmSQty(item.getReturnQuantity() != null ? BigDecimal.valueOf(item.getReturnQuantity()) : BigDecimal.ZERO);
+                det.setSPr(item.getUnitPrice());
+                det.setSQty(item.getReturnQuantity() != null ? BigDecimal.valueOf(item.getReturnQuantity()) : BigDecimal.ZERO);
+                if (ObjectUtils.isNotEmpty(orderMainVo) && null != orderMainVo.getWarehouseId()) {
+                    det.setWhsId(remoteComWarehouseService.getWarehouseNoById(orderMainVo.getWarehouseId()));
+                }
+                salBkDetList.add(det);
+            }
+        }
+
+        // 3. 组装返回JSON
+        Map<String, Object> result = new LinkedHashMap<>();
+        result.put("salBkApl", salBkApl);
+        result.put("salBkDet", salBkDetList);
+        return JSONUtil.toJsonStr(result);
+    }
 }

+ 10 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/dubbo/RemoteComCompanyServiceImpl.java

@@ -39,4 +39,14 @@ public class RemoteComCompanyServiceImpl implements RemoteComCompanyService {
     public List<RemoteComCompanyVo> selectCompanyList() {
         return MapstructUtils.convert(comCompanyService.queryList(new ComCompanyBo()), RemoteComCompanyVo.class);
     }
+
+    @Override
+    public String selectCompanyCodeById(Long companyId) {
+        String companyCode = "";
+        ComCompanyVo comCompanyVo = comCompanyService.queryById(companyId);
+        if (comCompanyVo != null) {
+            companyCode = comCompanyVo.getCompanyCode();
+        }
+        return companyCode;
+    }
 }

+ 10 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/dubbo/RemoteComCurrencyServiceImpl.java

@@ -40,4 +40,14 @@ public class RemoteComCurrencyServiceImpl implements RemoteComCurrencyService {
             .map(e -> BeanUtil.toBean(e, RemoteComCurrencyVo.class))
             .collect(Collectors.toList());
     }
+
+    @Override
+    public String selectCurrencyCodeById(Long id) {
+        String currencyCode = "";
+        ComCurrencyVo comCurrencyVo = comCurrencyService.queryById( id);
+        if (comCurrencyVo != null) {
+            currencyCode = comCurrencyVo.getCurrencyCode();
+        }
+        return currencyCode;
+    }
 }

+ 10 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/dubbo/RemoteComCustomerLevelServiceImpl.java

@@ -46,4 +46,14 @@ public class RemoteComCustomerLevelServiceImpl implements RemoteComCustomerLevel
         List<ComCustomerLevelVo> list = comCustomerLevelService.queryList(new ComCustomerLevelBo());
         return BeanUtil.copyToList(list, RemoteComCustomerLevelVo.class);
     }
+
+    @Override
+    public String selectCustomerLevelNoById(Long id) {
+        String levelNo = "";
+        ComCustomerLevelVo comCustomerLevelVo = comCustomerLevelService.queryById(id);
+        if (comCustomerLevelVo != null) {
+            levelNo = comCustomerLevelVo.getLevelCode();
+        }
+        return levelNo;
+    }
 }

+ 10 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/dubbo/RemoteComCustomerTypeServiceImpl.java

@@ -40,4 +40,14 @@ public class RemoteComCustomerTypeServiceImpl implements RemoteComCustomerTypeSe
             .map(e -> BeanUtil.toBean(e, RemoteComCustomerTypeVo.class))
             .collect(Collectors.toList());
     }
+
+    @Override
+    public String selectCustomerTypeNoNameById(Long id) {
+        String customerTypeNo="";
+        ComCustomerTypeVo comCustomerTypeVo = comCustomerTypeService.queryById( id);
+        if (comCustomerTypeVo != null) {
+            customerTypeNo = comCustomerTypeVo.getTypeName();
+        }
+        return customerTypeNo;
+    }
 }

+ 11 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/dubbo/RemoteComDeptServiceImpl.java

@@ -3,6 +3,7 @@ package org.dromara.system.dubbo;
 import lombok.RequiredArgsConstructor;
 import org.apache.dubbo.config.annotation.DubboService;
 import org.dromara.system.api.RemoteComDeptService;
+import org.dromara.system.domain.vo.ComDeptVo;
 import org.dromara.system.service.IComDeptService;
 import org.springframework.stereotype.Service;
 
@@ -20,4 +21,14 @@ public class RemoteComDeptServiceImpl implements RemoteComDeptService {
     public Map<Long, String> selectDeptNameByIds(Set<Long> ids) {
         return comDeptService.selectDeptNameByIds(ids);
     }
+
+    @Override
+    public String selectDeptNOById(Long id) {
+        String deptNO = "";
+        ComDeptVo comDeptVo = comDeptService.queryById(id);
+        if (comDeptVo != null) {
+            deptNO = comDeptVo.getDeptCode();
+        }
+        return deptNO;
+    }
 }

+ 11 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/dubbo/RemoteComStaffServiceImpl.java

@@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
 import lombok.RequiredArgsConstructor;
 import org.apache.dubbo.config.annotation.DubboService;
 import org.dromara.common.core.utils.MapstructUtils;
+import org.dromara.common.core.utils.ObjectUtils;
 import org.dromara.system.api.RemoteComStaffService;
 import org.dromara.system.api.domain.vo.RemoteComStaffVo;
 import org.dromara.system.domain.vo.ComStaffVo;
@@ -51,4 +52,14 @@ public class RemoteComStaffServiceImpl implements RemoteComStaffService {
     public RemoteComStaffVo selectStaffByUserId(Long userId) {
         return BeanUtil.toBean(comStaffService.selectStaffByUserId(userId), RemoteComStaffVo.class);
     }
+
+    @Override
+    public String selectStaffCodeById(Long staffId) {
+        String staffCode = "";
+        ComStaffVo comStaffVo = comStaffService.queryById(staffId);
+        if (ObjectUtils.isNotNull(comStaffVo)){
+            staffCode = comStaffVo.getStaffCode();
+        }
+        return staffCode;
+    }
 }

+ 26 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/dubbo/RemoteComWarehouseServiceImpl.java

@@ -0,0 +1,26 @@
+package org.dromara.system.dubbo;
+
+import lombok.RequiredArgsConstructor;
+import org.apache.dubbo.config.annotation.DubboService;
+import org.dromara.common.core.utils.ObjectUtils;
+import org.dromara.system.api.RemoteComWarehouseService;
+import org.dromara.system.domain.vo.ComWarehouseVo;
+import org.dromara.system.service.IComWarehouseService;
+import org.springframework.stereotype.Service;
+
+@RequiredArgsConstructor
+@Service
+@DubboService
+public class RemoteComWarehouseServiceImpl implements RemoteComWarehouseService {
+    private final IComWarehouseService warehouseService;
+
+    @Override
+    public String getWarehouseNoById(Long warehouseId) {
+        String warehouseNo = "";
+        ComWarehouseVo warehouse = warehouseService.queryById(warehouseId);
+        if (ObjectUtils.isNotNull(warehouse)){
+            warehouseNo = warehouse.getWarehouseCode();
+        }
+        return warehouseNo;
+    }
+}

+ 11 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/dubbo/RemoteCreditLevelServiceImpl.java

@@ -6,6 +6,7 @@ import org.apache.dubbo.config.annotation.DubboService;
 import org.dromara.common.core.utils.MapstructUtils;
 import org.dromara.system.api.RemoteCreditLevelService;
 import org.dromara.system.api.domain.vo.RemoteCreditLevelVo;
+import org.dromara.system.domain.vo.CreditLevelVo;
 import org.dromara.system.service.ICreditLevelService;
 import org.springframework.stereotype.Service;
 
@@ -31,4 +32,14 @@ public class RemoteCreditLevelServiceImpl implements RemoteCreditLevelService {
     public RemoteCreditLevelVo selectByCreditLevelName(String creditLevelName) {
         return BeanUtil.toBean(creditLevelService.selectByCreditLevelName(creditLevelName), RemoteCreditLevelVo.class);
     }
+
+    @Override
+    public String selectCreditLevelCodeById(Long id) {
+        String creditLevelCode = "";
+      CreditLevelVo creditLevel = creditLevelService.queryById( id);
+        if (creditLevel != null) {
+            creditLevelCode = creditLevel.getCreditLevelNo();
+        }
+        return creditLevelCode;
+    }
 }