tjxt 2 mesi fa
parent
commit
fe4d29db09
57 ha cambiato i file con 2972 aggiunte e 181 eliminazioni
  1. 14 0
      ruoyi-api/ruoyi-api-customer/src/main/java/org/dromara/customer/api/RemoteSupplierContractService.java
  2. 12 0
      ruoyi-api/ruoyi-api-customer/src/main/java/org/dromara/customer/api/RemoteSupplierInfoService.java
  3. 8 0
      ruoyi-api/ruoyi-api-product/src/main/java/org/dromara/product/api/RemoteProductService.java
  4. 3 1
      ruoyi-api/ruoyi-api-system/src/main/java/org/dromara/system/api/domain/vo/RemoteSupplierTypeVo.java
  5. 2 1
      ruoyi-common/ruoyi-common-mybatis/src/main/java/org/dromara/common/mybatis/interceptor/PlatformDataScopeInterceptor.java
  6. 13 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/ContractSupplyController.java
  7. 1 1
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/SupplierAddressController.java
  8. 6 3
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/SupplierBankController.java
  9. 112 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/SupplierBusinessInfoController.java
  10. 0 2
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/SupplierContractController.java
  11. 7 2
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/SupplierProcurementController.java
  12. 9 7
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/SupplyAreaController.java
  13. 109 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/SupplierBusinessInfo.java
  14. 4 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/bo/ContractSupplyBo.java
  15. 91 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/bo/SupplierBusinessInfoBo.java
  16. 83 3
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/bo/SupplierContactBo.java
  17. 2 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/bo/SupplierContractBo.java
  18. 8 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/bo/SupplyAreaBo.java
  19. 112 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/vo/SupplierBusinessInfoVo.java
  20. 32 1
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/vo/SupplierInfoVo.java
  21. 5 1
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/vo/SupplyAreaVo.java
  22. 25 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/dubbo/RemoteSupplierContractServiceImpl.java
  23. 25 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/dubbo/RemoteSupplierInfoServiceImpl.java
  24. 10 9
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/enums/SupplierStatusEnum.java
  25. 15 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/mapper/SupplierBusinessInfoMapper.java
  26. 2 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/IContractSupplyService.java
  27. 72 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/ISupplierBusinessInfoService.java
  28. 7 1
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/ISupplierContractService.java
  29. 2 1
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/ISupplierInfoService.java
  30. 1 1
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/ISupplyAreaService.java
  31. 18 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/ContractSupplyServiceImpl.java
  32. 9 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/SupplierAddressServiceImpl.java
  33. 71 4
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/SupplierAuthorizeServiceImpl.java
  34. 209 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/SupplierBusinessInfoServiceImpl.java
  35. 10 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/SupplierContactServiceImpl.java
  36. 89 62
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/SupplierContractServiceImpl.java
  37. 911 64
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/SupplierInfoServiceImpl.java
  38. 5 1
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/SupplierProcurementServiceImpl.java
  39. 81 11
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/SupplyAreaServiceImpl.java
  40. 7 0
      ruoyi-modules/ruoyi-customer/src/main/resources/mapper/customer/SupplierBusinessInfoMapper.xml
  41. 10 0
      ruoyi-modules/ruoyi-job/pom.xml
  42. 35 0
      ruoyi-modules/ruoyi-job/src/main/java/org/dromara/job/snailjob/SupplierContractJobTask.java
  43. 32 0
      ruoyi-modules/ruoyi-job/src/main/java/org/dromara/job/snailjob/SupplierInfoJobTask.java
  44. 23 0
      ruoyi-modules/ruoyi-job/src/main/java/org/dromara/job/snailjob/TestTask.java
  45. 3 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/controller/ProductBrandController.java
  46. 3 4
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/controller/ProductCategoryController.java
  47. 16 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/dubbo/RemoteProductServiceImpl.java
  48. 112 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/AddressAreaController.java
  49. 82 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/AddressArea.java
  50. 64 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/AddressAreaBo.java
  51. 85 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/AddressAreaVo.java
  52. 1 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/dubbo/RemoteSupplierTypeServiceImpl.java
  53. 15 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/mapper/AddressAreaMapper.java
  54. 72 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/IAddressAreaService.java
  55. 209 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/AddressAreaServiceImpl.java
  56. 7 0
      ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/AddressAreaMapper.xml
  57. 1 1
      ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties

+ 14 - 0
ruoyi-api/ruoyi-api-customer/src/main/java/org/dromara/customer/api/RemoteSupplierContractService.java

@@ -0,0 +1,14 @@
+package org.dromara.customer.api;
+
+/**
+ * author
+ * 时间:2026/1/23,9:21
+ */
+public interface RemoteSupplierContractService {
+
+    /**
+     * 获取待审核 以及 生效的合同,并通过定时任务批量更新合同状态
+     */
+    int updateExpiredContractStatus();
+
+}

+ 12 - 0
ruoyi-api/ruoyi-api-customer/src/main/java/org/dromara/customer/api/RemoteSupplierInfoService.java

@@ -0,0 +1,12 @@
+package org.dromara.customer.api;
+
+/**
+ * author
+ * 时间:2026/1/23,9:43
+ */
+public interface RemoteSupplierInfoService {
+    /**
+     * 通过生效状态下判断有效期来更新是否停用
+     */
+    int updateIsDisable();
+}

+ 8 - 0
ruoyi-api/ruoyi-api-product/src/main/java/org/dromara/product/api/RemoteProductService.java

@@ -47,6 +47,14 @@ public interface RemoteProductService {
     * */
     RemoteProductBrand getProductByBrandId(Long brandId);
 
+
+    /**
+     * 根据品牌id集合获取品牌名称
+     * @param ids
+     * @return
+     */
+    List<RemoteProductBrand> getProductByBrandId(List<Long> ids);
+
     /**
      * 获取品目列表
      */

+ 3 - 1
ruoyi-api/ruoyi-api-system/src/main/java/org/dromara/system/api/domain/vo/RemoteSupplierTypeVo.java

@@ -2,12 +2,14 @@ package org.dromara.system.api.domain.vo;
 
 import lombok.Data;
 
+import java.io.Serializable;
+
 /**
  * author
  * 时间:2026/1/13,16:10
  */
 @Data
-public class RemoteSupplierTypeVo {
+public class RemoteSupplierTypeVo implements Serializable {
     private long id;
 
     private String typeId;

+ 2 - 1
ruoyi-common/ruoyi-common-mybatis/src/main/java/org/dromara/common/mybatis/interceptor/PlatformDataScopeInterceptor.java

@@ -81,7 +81,8 @@ public class PlatformDataScopeInterceptor implements Interceptor {
         "enterprise_scale",
         "industry_category",
         "contract_product",
-        "supplier_contact"
+        "supplier_contact",
+        "address_area"
 
 
         // 注意:前缀匹配需特殊处理(如 qrtz_),见 isIgnoreTable 方法

+ 13 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/ContractSupplyController.java

@@ -95,6 +95,19 @@ public class ContractSupplyController extends BaseController {
         return toAjax(contractSupplyService.updateByBo(bo));
     }
 
+    /**
+     * 审核
+     * @param bo
+     * @return
+     */
+    @PutMapping("/edit")
+    public R<Void> approve(@RequestBody ContractSupplyBo bo) {
+        return toAjax(contractSupplyService.aprprove(bo));
+    }
+
+
+
+
     /**
      * 删除协议供货
      *

+ 1 - 1
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/SupplierAddressController.java

@@ -104,7 +104,7 @@ public class SupplierAddressController extends BaseController {
      *
      * @param ids 主键串
      */
-    @SaCheckPermission("supplierAddress:supplieraddress:remove")
+    //@SaCheckPermission("supplierAddress:supplieraddress:remove")
     @Log(title = "供应商地址", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     public R<Void> remove(@NotEmpty(message = "主键不能为空")

+ 6 - 3
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/SupplierBankController.java

@@ -2,6 +2,7 @@ package org.dromara.customer.controller;
 
 import java.util.List;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import lombok.RequiredArgsConstructor;
 import jakarta.servlet.http.HttpServletResponse;
 import jakarta.validation.constraints.*;
@@ -71,9 +72,11 @@ public class SupplierBankController extends BaseController {
 
     @SaCheckPermission("customer:bank:query")
     @GetMapping("/getBankBySupplierId")
-    public R<SupplierBankVo> getBankBySupplierId(@RequestParam Long id) {
-        SupplierBankVo supplierBankVo =supplierBankService.selectBySupplierId(id);
-        return R.ok(supplierBankVo);
+    public R<List<SupplierBankVo>> getBankBySupplierId(@RequestParam Long id) {
+        SupplierBankBo supplierBankBo = new SupplierBankBo();
+        supplierBankBo.setSupplierId(id);
+        List<SupplierBankVo> supplierBankVos = supplierBankService.queryList(supplierBankBo);
+        return R.ok(supplierBankVos);
     }
 
 

+ 112 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/SupplierBusinessInfoController.java

@@ -0,0 +1,112 @@
+package org.dromara.customer.controller;
+
+import java.util.List;
+
+import lombok.RequiredArgsConstructor;
+import jakarta.servlet.http.HttpServletResponse;
+import jakarta.validation.constraints.*;
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.validation.annotation.Validated;
+import org.dromara.common.idempotent.annotation.RepeatSubmit;
+import org.dromara.common.log.annotation.Log;
+import org.dromara.common.web.core.BaseController;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import org.dromara.common.core.domain.R;
+import org.dromara.common.core.validate.AddGroup;
+import org.dromara.common.core.validate.EditGroup;
+import org.dromara.common.log.enums.BusinessType;
+import org.dromara.common.excel.utils.ExcelUtil;
+import org.dromara.customer.domain.vo.SupplierBusinessInfoVo;
+import org.dromara.customer.domain.bo.SupplierBusinessInfoBo;
+import org.dromara.customer.service.ISupplierBusinessInfoService;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+
+/**
+ * 供应商工商注册信息
+ * 前端访问路由地址为:/suuplier/businessInfo
+ *
+ * @author LionLi
+ * @date 2026-01-22
+ */
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/sbusinessInfo")
+public class SupplierBusinessInfoController extends BaseController {
+
+    private final ISupplierBusinessInfoService supplierBusinessInfoService;
+
+    /**
+     * 查询供应商工商注册信息列表
+     */
+    @SaCheckPermission("suuplier:businessInfo:list")
+    @GetMapping("/list")
+    public TableDataInfo<SupplierBusinessInfoVo> list(SupplierBusinessInfoBo bo, PageQuery pageQuery) {
+        return supplierBusinessInfoService.queryPageList(bo, pageQuery);
+    }
+
+    @GetMapping("/getinformation")
+    public R<SupplierBusinessInfoVo> getinformation(@RequestParam("enterpriseName") String enterpriseName)
+    {
+        return R.ok(supplierBusinessInfoService.getinformation(enterpriseName));
+    }
+
+    /**
+     * 导出供应商工商注册信息列表
+     */
+    @SaCheckPermission("suuplier:businessInfo:export")
+    @Log(title = "供应商工商注册信息", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(SupplierBusinessInfoBo bo, HttpServletResponse response) {
+        List<SupplierBusinessInfoVo> list = supplierBusinessInfoService.queryList(bo);
+        ExcelUtil.exportExcel(list, "供应商工商注册信息", SupplierBusinessInfoVo.class, response);
+    }
+
+    /**
+     * 获取供应商工商注册信息详细信息
+     *
+     * @param supplierId 主键
+     */
+    @SaCheckPermission("suuplier:businessInfo:query")
+    @GetMapping("/{supplierId}")
+    public R<SupplierBusinessInfoVo> getInfo(@NotNull(message = "主键不能为空")
+                                     @PathVariable("supplierId") Long supplierId) {
+        return R.ok(supplierBusinessInfoService.queryById(supplierId));
+    }
+
+    /**
+     * 新增供应商工商注册信息
+     */
+    @SaCheckPermission("suuplier:businessInfo:add")
+    @Log(title = "供应商工商注册信息", businessType = BusinessType.INSERT)
+    @RepeatSubmit()
+    @PostMapping()
+    public R<Void> add(@Validated(AddGroup.class) @RequestBody SupplierBusinessInfoBo bo) {
+        return toAjax(supplierBusinessInfoService.insertByBo(bo));
+    }
+
+    /**
+     * 修改供应商工商注册信息
+     */
+    @SaCheckPermission("suuplier:businessInfo:edit")
+    @Log(title = "供应商工商注册信息", businessType = BusinessType.UPDATE)
+    @RepeatSubmit()
+    @PutMapping()
+    public R<Void> edit(@Validated(EditGroup.class) @RequestBody SupplierBusinessInfoBo bo) {
+        return toAjax(supplierBusinessInfoService.updateByBo(bo));
+    }
+
+    /**
+     * 删除供应商工商注册信息
+     *
+     * @param supplierIds 主键串
+     */
+    @SaCheckPermission("suuplier:businessInfo:remove")
+    @Log(title = "供应商工商注册信息", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{supplierIds}")
+    public R<Void> remove(@NotEmpty(message = "主键不能为空")
+                          @PathVariable("supplierIds") Long[] supplierIds) {
+        return toAjax(supplierBusinessInfoService.deleteWithValidByIds(List.of(supplierIds), true));
+    }
+}

+ 0 - 2
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/SupplierContractController.java

@@ -57,8 +57,6 @@ public class SupplierContractController extends BaseController {
 
     }
 
-
-
     /**
      * 导出合同管理列表
      */

+ 7 - 2
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/SupplierProcurementController.java

@@ -2,10 +2,12 @@ package org.dromara.customer.controller;
 
 import java.util.List;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import lombok.RequiredArgsConstructor;
 import jakarta.servlet.http.HttpServletResponse;
 import jakarta.validation.constraints.*;
 import cn.dev33.satoken.annotation.SaCheckPermission;
+import org.dromara.customer.domain.SupplierProcurement;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.validation.annotation.Validated;
 import org.dromara.common.idempotent.annotation.RepeatSubmit;
@@ -72,18 +74,21 @@ public class SupplierProcurementController extends BaseController {
     /**
      * 新增供应商采购结算配置
      */
-    @SaCheckPermission("supplier:procurement:add")
     @Log(title = "供应商采购结算配置", businessType = BusinessType.INSERT)
     @RepeatSubmit()
     @PostMapping()
     public R<Void> add(@Validated(AddGroup.class) @RequestBody SupplierProcurementBo bo) {
+        SupplierProcurement one = supplierProcurementService.getOne(new LambdaQueryWrapper<SupplierProcurement>()
+            .eq(SupplierProcurement::getSupplierId, bo.getSupplierId()));
+        if (one != null){
+            return toAjax(supplierProcurementService.updateByBo(bo));
+        }
         return toAjax(supplierProcurementService.insertByBo(bo));
     }
 
     /**
      * 修改供应商采购结算配置
      */
-    @SaCheckPermission("supplier:procurement:edit")
     @Log(title = "供应商采购结算配置", businessType = BusinessType.UPDATE)
     @RepeatSubmit()
     @PutMapping()

+ 9 - 7
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/SupplyAreaController.java

@@ -6,6 +6,7 @@ import lombok.RequiredArgsConstructor;
 import jakarta.servlet.http.HttpServletResponse;
 import jakarta.validation.constraints.*;
 import cn.dev33.satoken.annotation.SaCheckPermission;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.validation.annotation.Validated;
 import org.dromara.common.idempotent.annotation.RepeatSubmit;
@@ -40,7 +41,7 @@ public class SupplyAreaController extends BaseController {
     /**
      * 查询供应区域列表
      */
-    @SaCheckPermission("supplier:area:list")
+    //@SaCheckPermission("supplier:area:list")
     @GetMapping("/list")
     public TableDataInfo<SupplyAreaVo> list(SupplyAreaBo bo, PageQuery pageQuery) {
         return supplyAreaService.queryPageList(bo, pageQuery);
@@ -52,7 +53,7 @@ public class SupplyAreaController extends BaseController {
     /**
      * 导出供应区域列表
      */
-    @SaCheckPermission("supplier:area:export")
+    //@SaCheckPermission("supplier:area:export")
     @Log(title = "供应区域", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
     public void export(SupplyAreaBo bo, HttpServletResponse response) {
@@ -65,9 +66,9 @@ public class SupplyAreaController extends BaseController {
      *
      * @param id 主键
      */
-    @SaCheckPermission("supplier:area:query")
+    //@SaCheckPermission("supplier:area:query")
     @GetMapping("/{id}")
-    public R<SupplyAreaVo> getInfo(@NotNull(message = "主键不能为空")
+    public R<List<SupplyAreaVo>> getInfo(@NotNull(message = "主键不能为空")
                                      @PathVariable("id") Long id) {
         return R.ok(supplyAreaService.queryById(id));
     }
@@ -75,10 +76,11 @@ public class SupplyAreaController extends BaseController {
     /**
      * 新增供应区域
      */
-    @SaCheckPermission("supplier:area:add")
+    //@SaCheckPermission("supplier:area:add")
     @Log(title = "供应区域", businessType = BusinessType.INSERT)
     @RepeatSubmit()
     @PostMapping()
+    @Transactional
     public R<Void> add(@Validated(AddGroup.class) @RequestBody SupplyAreaBo bo) {
         return toAjax(supplyAreaService.insertByBo(bo));
     }
@@ -86,7 +88,7 @@ public class SupplyAreaController extends BaseController {
     /**
      * 修改供应区域
      */
-    @SaCheckPermission("supplier:area:edit")
+    //@SaCheckPermission("supplier:area:edit")
     @Log(title = "供应区域", businessType = BusinessType.UPDATE)
     @RepeatSubmit()
     @PutMapping()
@@ -99,7 +101,7 @@ public class SupplyAreaController extends BaseController {
      *
      * @param ids 主键串
      */
-    @SaCheckPermission("supplier:area:remove")
+    //@SaCheckPermission("supplier:area:remove")
     @Log(title = "供应区域", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     public R<Void> remove(@NotEmpty(message = "主键不能为空")

+ 109 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/SupplierBusinessInfo.java

@@ -0,0 +1,109 @@
+package org.dromara.customer.domain;
+
+import org.dromara.common.tenant.core.TenantEntity;
+import com.baomidou.mybatisplus.annotation.*;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import java.io.Serial;
+
+/**
+ * 供应商工商注册信息对象 supplier_business_info
+ *
+ * @author LionLi
+ * @date 2026-01-22
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("supplier_business_info")
+public class SupplierBusinessInfo extends TenantEntity {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 关联供应商ID
+     */
+    @TableId(value = "supplier_id")
+    private Long supplierId;
+
+    /**
+     * 工商全称
+     */
+    private String businessName;
+
+    /**
+     * 统一社会信用代码
+     */
+    private String socialCreditCode;
+
+    /**
+     * 法人姓名
+     */
+    private String legalPersonName;
+
+    /**
+     * 注册资本
+     */
+    private String registeredCapital;
+
+    /**
+     * 实缴资本
+     */
+    private String paidInCapital;
+
+    /**
+     * 成立日期
+     */
+    private Date establishmentDate;
+
+    /**
+     * 吊销日期
+     */
+    private Date revocationDate;
+
+    /**
+     * 登记状态
+     */
+    private String registrationStatus;
+
+    /**
+     * 登记机关
+     */
+    private String registrationAuthority;
+
+    /**
+     * 经营范围
+     */
+    private String bussinessRange;
+
+    /**
+     * 营业执照路径
+     */
+    private String businessLicense;
+
+    /**
+     * 工商地址-详细地址
+     */
+    private String businessAddress;
+
+    /**
+     * 状态(0正常 1停用)
+     */
+    private String status;
+
+    /**
+     * 删除标志(0代表存在 2代表删除)
+     */
+    @TableLogic
+    private String delFlag;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+
+}

+ 4 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/bo/ContractSupplyBo.java

@@ -42,6 +42,10 @@ public class ContractSupplyBo extends BaseEntity {
      * 供应商编号
      */
     private String supplyNo;
+    /**
+     * 供应商名称
+     */
+    private String supplierName;
 
     /**
      * 供应商ID

+ 91 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/bo/SupplierBusinessInfoBo.java

@@ -0,0 +1,91 @@
+package org.dromara.customer.domain.bo;
+
+import org.dromara.customer.domain.SupplierBusinessInfo;
+import org.dromara.common.mybatis.core.domain.BaseEntity;
+import org.dromara.common.core.validate.AddGroup;
+import org.dromara.common.core.validate.EditGroup;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import jakarta.validation.constraints.*;
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+/**
+ * 供应商工商注册信息业务对象 supplier_business_info
+ *
+ * @author LionLi
+ * @date 2026-01-22
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@AutoMapper(target = SupplierBusinessInfo.class, reverseConvertGenerate = false)
+public class SupplierBusinessInfoBo extends BaseEntity {
+
+    /**
+     * 关联供应商ID
+     */
+    private Long supplierId;
+
+    /**
+     * 工商全称
+     */
+    private String businessName;
+
+    /**
+     * 统一社会信用代码
+     */
+    private String socialCreditCode;
+
+    /**
+     * 法人姓名
+     */
+    private String legalPersonName;
+
+    /**
+     * 注册资本
+     */
+    private String registeredCapital;
+
+    /**
+     * 实缴资本
+     */
+    private String paidInCapital;
+
+    /**
+     * 成立日期
+     */
+    private Date establishmentDate;
+
+    /**
+     * 吊销日期
+     */
+    private Date revocationDate;
+
+    /**
+     * 登记状态
+     */
+    private String registrationStatus;
+
+    /**
+     * 登记机关
+     */
+    private String registrationAuthority;
+
+    /**
+     * 经营范围
+     */
+    private String bussinessRange;
+
+    /**
+     * 营业执照路径
+     */
+    private String businessLicense;
+
+    /**
+     * 工商地址-详细地址
+     */
+    private String businessAddress;
+
+
+}

+ 83 - 3
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/bo/SupplierContactBo.java

@@ -1,5 +1,7 @@
 package org.dromara.customer.domain.bo;
 
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
 import org.dromara.customer.domain.SupplierContact;
 import org.dromara.common.mybatis.core.domain.BaseEntity;
 import org.dromara.common.core.validate.AddGroup;
@@ -21,19 +23,24 @@ import jakarta.validation.constraints.*;
 public class SupplierContactBo extends BaseEntity {
 
     private Long id;
+
     /**
      * 供应商编号
      */
     private String supplierNo;
 
+    /**
+     * 供应商名称
+     */
+    private String supplierName;
+
     /**
      * 供应商ID
      */
     private Long supplierId;
 
-    private String supplierName;
     /**
-     * 员工编号
+     * 用户ID
      */
     private String userNo;
 
@@ -47,12 +54,85 @@ public class SupplierContactBo extends BaseEntity {
      */
     private String phone;
 
+    /**
+     * 联系地址
+     */
+    private String connAddr;
+
+    /**
+     * 员工密码
+     */
+    private String password;
+
+    /**
+     * 角色
+     */
+    private String roleNo;
+
+    /**
+     * 部门
+     */
+    private String departmentNo;
+
+    /**
+     * 职位
+     */
+    private String position;
+
+    /**
+     * 联系人描述
+     */
+    private String userDescribe;
+
+    /**
+     * 主要联系人
+     */
+    private String isPrimaryContact;
+
+    /**
+     * 允许登录供应商端
+     */
+    private String isRegister;
+
+    /**
+     * 办公电话
+     */
+    private String officePhone;
+
+    /**
+     * 性别(0未知 1男 2女)
+     */
+    private String gender;
+
+    /**
+     * 对接人编号
+     */
+    private Long abutmentNo;
+
+    /**
+     * 数据推送状态(0未推送 1已推送 2推送失败)
+     */
+    private String pushStatus;
+
+    /**
+     * 行标识(预留字段)
+     */
+    private String rowCd;
+
     /**
      * 状态(0正常 1停用)
      */
     private String status;
 
-    private String password;
+    /**
+     * 删除标志(0代表存在 2代表删除)
+     */
+    private String delFlag;
+
+    /**
+     * 备注信息
+     */
+    private String remark;
 
 
 }

+ 2 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/bo/SupplierContractBo.java

@@ -24,6 +24,8 @@ import com.fasterxml.jackson.annotation.JsonFormat;
 @AutoMapper(target = SupplierContract.class, reverseConvertGenerate = false)
 public class SupplierContractBo extends BaseEntity {
 
+    private Long id;
+
     /**
      * 供应商编号
      */

+ 8 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/bo/SupplyAreaBo.java

@@ -1,5 +1,6 @@
 package org.dromara.customer.domain.bo;
 
+import org.dromara.common.core.validate.enumd.EnumPattern;
 import org.dromara.customer.domain.SupplyArea;
 import org.dromara.common.mybatis.core.domain.BaseEntity;
 import org.dromara.common.core.validate.AddGroup;
@@ -9,6 +10,8 @@ import lombok.Data;
 import lombok.EqualsAndHashCode;
 import jakarta.validation.constraints.*;
 
+import java.util.List;
+
 /**
  * 供应区域业务对象 supply_area
  *
@@ -20,6 +23,8 @@ import jakarta.validation.constraints.*;
 @AutoMapper(target = SupplyArea.class, reverseConvertGenerate = false)
 public class SupplyAreaBo extends BaseEntity {
 
+    private Long id;
+
     /**
      * 供应商编号(关联供应商主表)
      */
@@ -51,4 +56,7 @@ public class SupplyAreaBo extends BaseEntity {
     private String level;
 
 
+    private List<SupplyAreaBo> areaList;
+
+
 }

+ 112 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/vo/SupplierBusinessInfoVo.java

@@ -0,0 +1,112 @@
+package org.dromara.customer.domain.vo;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.dromara.customer.domain.SupplierBusinessInfo;
+import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
+import cn.idev.excel.annotation.ExcelProperty;
+import org.dromara.common.excel.annotation.ExcelDictFormat;
+import org.dromara.common.excel.convert.ExcelDictConvert;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.util.Date;
+
+
+
+/**
+ * 供应商工商注册信息视图对象 supplier_business_info
+ *
+ * @author LionLi
+ * @date 2026-01-22
+ */
+@Data
+@ExcelIgnoreUnannotated
+@AutoMapper(target = SupplierBusinessInfo.class)
+public class SupplierBusinessInfoVo implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 关联客户ID
+     */
+    @ExcelProperty(value = "关联供应商ID")
+    private Long supplierId;
+
+    /**
+     * 工商全称
+     */
+    @ExcelProperty(value = "工商全称")
+    private String businessName;
+
+    /**
+     * 统一社会信用代码
+     */
+    @ExcelProperty(value = "统一社会信用代码")
+    private String socialCreditCode;
+
+    /**
+     * 法人姓名
+     */
+    @ExcelProperty(value = "法人姓名")
+    private String legalPersonName;
+
+    /**
+     * 注册资本
+     */
+    @ExcelProperty(value = "注册资本")
+    private String registeredCapital;
+
+    /**
+     * 实缴资本
+     */
+    @ExcelProperty(value = "实缴资本")
+    private String paidInCapital;
+
+    /**
+     * 成立日期
+     */
+    @ExcelProperty(value = "成立日期")
+    private Date establishmentDate;
+
+    /**
+     * 吊销日期
+     */
+    @ExcelProperty(value = "吊销日期")
+    private Date revocationDate;
+
+    /**
+     * 登记状态
+     */
+    @ExcelProperty(value = "登记状态")
+    private String registrationStatus;
+
+    /**
+     * 登记机关
+     */
+    @ExcelProperty(value = "登记机关")
+    private String registrationAuthority;
+
+    /**
+     * 经营范围
+     */
+    @ExcelProperty(value = "经营范围")
+    private String bussinessRange;
+
+    /**
+     * 营业执照路径
+     */
+    @ExcelProperty(value = "营业执照路径")
+    private String businessLicense;
+
+    /**
+     * 工商地址-详细地址
+     */
+    @ExcelProperty(value = "工商地址-详细地址")
+    private String businessAddress;
+
+
+}

+ 32 - 1
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/vo/SupplierInfoVo.java

@@ -261,7 +261,7 @@ public class SupplierInfoVo implements Serializable {
      */
     @ExcelProperty(value = "供应状态", converter = ExcelDictConvert.class)
     @ExcelDictFormat(readConverterExp = "0=-暂停,,1=-正常...")
-    private String supplyStatus;
+    private Long supplyStatus;
 
     /**
      * 供应评分
@@ -413,5 +413,36 @@ public class SupplierInfoVo implements Serializable {
 
     private Date createTime;
 
+    private Long listedNum = 0L; // 上架产品数(默认值0)
+
+    private String brandName;
+
+    private String enterpriseScaleName;
+
+
+    private String SupplierTypeName;
+
+    /**
+     * 登记状态
+     */
+    private String registrationStatus;
+
+    /**
+     * 登记机关
+     */
+    private String registrationAuthority;
+
+    /**
+     * 成立日期
+     */
+    private Date establishmentDate;
+
+    /**
+     * 实缴资本
+     */
+    private String paidInCapital;
+
+
+
 
 }

+ 5 - 1
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/vo/SupplyAreaVo.java

@@ -11,7 +11,7 @@ import lombok.Data;
 import java.io.Serial;
 import java.io.Serializable;
 import java.util.Date;
-
+import java.util.List;
 
 
 /**
@@ -28,6 +28,8 @@ public class SupplyAreaVo implements Serializable {
     @Serial
     private static final long serialVersionUID = 1L;
 
+    private Long id;
+
     /**
      * 供应商编号(关联供应商主表)
      */
@@ -70,5 +72,7 @@ public class SupplyAreaVo implements Serializable {
     @ExcelDictFormat(readConverterExp = "1=省/直辖市,2=市,3=区县,4=街道/镇")
     private String level;
 
+    private List<SupplyAreaVo> areaList;
+
 
 }

+ 25 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/dubbo/RemoteSupplierContractServiceImpl.java

@@ -0,0 +1,25 @@
+package org.dromara.customer.dubbo;
+
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.dubbo.config.annotation.DubboService;
+import org.dromara.customer.api.RemoteSupplierContractService;
+import org.dromara.customer.service.ISupplierContractService;
+import org.springframework.stereotype.Service;
+
+/**
+ * author
+ * 时间:2026/1/23,9:24
+ */
+@Slf4j
+@Service
+@RequiredArgsConstructor
+@DubboService
+public class RemoteSupplierContractServiceImpl implements RemoteSupplierContractService {
+
+    private final ISupplierContractService supplierContractService;
+    @Override
+    public int updateExpiredContractStatus() {
+        return supplierContractService.updateExpiredContractStatus();
+    }
+}

+ 25 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/dubbo/RemoteSupplierInfoServiceImpl.java

@@ -0,0 +1,25 @@
+package org.dromara.customer.dubbo;
+
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.dubbo.config.annotation.DubboService;
+import org.dromara.customer.api.RemoteSupplierInfoService;
+import org.dromara.customer.service.ISupplierInfoService;
+import org.springframework.stereotype.Service;
+
+/**
+ * author
+ * 时间:2026/1/23,9:42
+ */
+@Slf4j
+@Service
+@RequiredArgsConstructor
+@DubboService
+public class RemoteSupplierInfoServiceImpl implements RemoteSupplierInfoService {
+
+    private final ISupplierInfoService supplierInfoService;
+    @Override
+    public int updateIsDisable() {
+        return supplierInfoService.updateIsDisable();
+    }
+}

+ 10 - 9
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/enums/SupplierStatusEnum.java

@@ -6,20 +6,21 @@ package org.dromara.customer.enums;
  */
 public enum SupplierStatusEnum {
     // 枚举项:数据库值, 原始状态名, 展示文案
-    PENDING_REVIEW(0, "待审核", "待审核"),
-    OFFICIAL_SUPPLIER(1, "正式供应商", "生效"),
-    DISABLED(2, "停用", "停止合作"),
-    REVIEW_FAILED(3, "审核未通过", "审核不通过");
+    PENDING_REVIEW(0L, "待审核", "待审核"),
+    OFFICIAL_SUPPLIER(1L, "正式供应商", "生效"),
+    DISABLED(2L, "停用", "停止合作"),
+    REVIEW_FAILED(3L, "审核未通过", "审核不通过"),
+    REVIEW_UPDATED(4L,"待修改审核","待修改审核");
 
     // 数据库存储的数字值
-    private final Integer code;
+    private final Long code;
     // 原始状态名称(保留,便于后续追溯)
     private final String originalName;
     // 前端展示的文案
     private final String displayName;
 
     // 构造方法
-    SupplierStatusEnum(Integer code, String originalName, String displayName) {
+    SupplierStatusEnum(Long code, String originalName, String displayName) {
         this.code = code;
         this.originalName = originalName;
         this.displayName = displayName;
@@ -30,7 +31,7 @@ public enum SupplierStatusEnum {
      * @param code 数据库中的数字值(0/1/2/3)
      * @return 展示文案,无匹配时返回"未知状态"
      */
-    public static String getDisplayNameByCode(Integer code) {
+    public static String getDisplayNameByCode(Long code) {
         // 遍历枚举项,匹配code后返回对应的展示文案
         for (SupplierStatusEnum status : values()) {
             if (status.code.equals(code)) {
@@ -41,7 +42,7 @@ public enum SupplierStatusEnum {
     }
 
     // 可选:获取原始状态名(如需追溯)
-    public static String getOriginalNameByCode(Integer code) {
+    public static String getOriginalNameByCode(Long code) {
         for (SupplierStatusEnum status : values()) {
             if (status.code.equals(code)) {
                 return status.originalName;
@@ -51,7 +52,7 @@ public enum SupplierStatusEnum {
     }
 
     // getter方法
-    public Integer getCode() {
+    public Long getCode() {
         return code;
     }
 

+ 15 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/mapper/SupplierBusinessInfoMapper.java

@@ -0,0 +1,15 @@
+package org.dromara.customer.mapper;
+
+import org.dromara.customer.domain.SupplierBusinessInfo;
+import org.dromara.customer.domain.vo.SupplierBusinessInfoVo;
+import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
+
+/**
+ * 供应商工商注册信息Mapper接口
+ *
+ * @author LionLi
+ * @date 2026-01-22
+ */
+public interface SupplierBusinessInfoMapper extends BaseMapperPlus<SupplierBusinessInfo, SupplierBusinessInfoVo> {
+
+}

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

@@ -67,4 +67,6 @@ public interface IContractSupplyService extends IService<ContractSupply>{
      * @return 是否删除成功
      */
     Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
+
+    int aprprove(ContractSupplyBo bo);
 }

+ 72 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/ISupplierBusinessInfoService.java

@@ -0,0 +1,72 @@
+package org.dromara.customer.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.dromara.customer.domain.SupplierBusinessInfo;
+import org.dromara.customer.domain.vo.SupplierBusinessInfoVo;
+import org.dromara.customer.domain.bo.SupplierBusinessInfoBo;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.common.mybatis.core.page.PageQuery;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * 供应商工商注册信息Service接口
+ *
+ * @author LionLi
+ * @date 2026-01-22
+ */
+public interface ISupplierBusinessInfoService extends IService<SupplierBusinessInfo>{
+
+    /**
+     * 查询供应商工商注册信息
+     *
+     * @param supplierId 主键
+     * @return 供应商工商注册信息
+     */
+    SupplierBusinessInfoVo queryById(Long supplierId);
+
+    /**
+     * 分页查询供应商工商注册信息列表
+     *
+     * @param bo        查询条件
+     * @param pageQuery 分页参数
+     * @return 供应商工商注册信息分页列表
+     */
+    TableDataInfo<SupplierBusinessInfoVo> queryPageList(SupplierBusinessInfoBo bo, PageQuery pageQuery);
+
+    /**
+     * 查询符合条件的供应商工商注册信息列表
+     *
+     * @param bo 查询条件
+     * @return 供应商工商注册信息列表
+     */
+    List<SupplierBusinessInfoVo> queryList(SupplierBusinessInfoBo bo);
+
+    /**
+     * 新增供应商工商注册信息
+     *
+     * @param bo 供应商工商注册信息
+     * @return 是否新增成功
+     */
+    Boolean insertByBo(SupplierBusinessInfoBo bo);
+
+    /**
+     * 修改供应商工商注册信息
+     *
+     * @param bo 供应商工商注册信息
+     * @return 是否修改成功
+     */
+    Boolean updateByBo(SupplierBusinessInfoBo bo);
+
+    /**
+     * 校验并批量删除供应商工商注册信息信息
+     *
+     * @param ids     待删除的主键集合
+     * @param isValid 是否进行有效性校验
+     * @return 是否删除成功
+     */
+    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
+
+    SupplierBusinessInfoVo getinformation(String enterpriseName);
+}

+ 7 - 1
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/ISupplierContractService.java

@@ -72,5 +72,11 @@ public interface ISupplierContractService extends IService<SupplierContract>{
      */
     Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
 
-
+    /**
+     * 更新过期合同状态
+     * 将合同到期时间早于当前时间的合同状态更新为已到期(2)
+     *
+     * @return 更新的记录数
+     */
+    int updateExpiredContractStatus();
 }

+ 2 - 1
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/ISupplierInfoService.java

@@ -9,7 +9,6 @@ import org.dromara.customer.domain.vo.SupplierInfoVo;
 import org.dromara.customer.domain.bo.SupplierInfoBo;
 import org.dromara.common.mybatis.core.page.TableDataInfo;
 import org.dromara.common.mybatis.core.page.PageQuery;
-import org.dromara.customer.domain.vo.SupplierInformationVo;
 
 import java.util.Collection;
 import java.util.List;
@@ -91,4 +90,6 @@ public interface ISupplierInfoService extends IService<SupplierInfo>{
 
 
     IPage<SupplierInfo> getSupplyCapacityList(SupplierAuthorizeBo bo, PageQuery pageQuery);
+
+    int updateIsDisable();
 }

+ 1 - 1
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/ISupplyAreaService.java

@@ -25,7 +25,7 @@ public interface ISupplyAreaService extends IService<SupplyArea>{
      * @param id 主键
      * @return 供应区域
      */
-    SupplyAreaVo queryById(Long id);
+    List<SupplyAreaVo> queryById(Long id);
 
     /**
      * 分页查询供应区域列表

+ 18 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/ContractSupplyServiceImpl.java

@@ -1,6 +1,7 @@
 package org.dromara.customer.service.impl;
 
 import cn.hutool.core.date.DateUtil;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import net.sf.jsqlparser.expression.LongValue;
 import org.apache.dubbo.config.annotation.DubboReference;
@@ -102,6 +103,12 @@ public class ContractSupplyServiceImpl  extends ServiceImpl<ContractSupplyMapper
      */
     @Override
     public TableDataInfo<ContractSupplyVo> queryPageList(ContractSupplyBo bo, PageQuery pageQuery) {
+        if (bo.getSupplierName()!=null){
+            LambdaQueryWrapper<SupplierInfo> lqw = Wrappers.lambdaQuery(SupplierInfo.class)
+                    .eq(SupplierInfo::getEnterpriseName, bo.getSupplierName());
+            SupplierInfo one = supplierInfoService.getOne(lqw);
+            bo.setSupplierId(one.getId());
+        }
         LambdaQueryWrapper<ContractSupply> lqw = buildQueryWrapper(bo);
         Page<ContractSupplyVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
         setSupplierNames(result.getRecords());
@@ -312,4 +319,15 @@ public class ContractSupplyServiceImpl  extends ServiceImpl<ContractSupplyMapper
         }
         return baseMapper.deleteByIds(ids) > 0;
     }
+
+    @Override
+    public int aprprove(ContractSupplyBo bo) {
+        String status = bo.getStatus();
+        Long id = bo.getId();
+        LambdaUpdateWrapper<ContractSupply> updateWrapper = new LambdaUpdateWrapper<>();
+        updateWrapper.eq(ContractSupply::getId, id)
+            .set(ContractSupply::getStatus, status);
+        return baseMapper.update(null, updateWrapper);
+
+    }
 }

+ 9 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/SupplierAddressServiceImpl.java

@@ -102,6 +102,15 @@ public class SupplierAddressServiceImpl  extends ServiceImpl<SupplierAddressMapp
     public Boolean insertByBo(SupplierAddressBo bo) {
         SupplierAddress add = MapstructUtils.convert(bo, SupplierAddress.class);
         validEntityBeforeSave(add);
+        LambdaQueryWrapper<SupplierAddress> lqw = Wrappers.lambdaQuery();
+        lqw.select(SupplierAddress::getAddressNo)
+            .orderByDesc(SupplierAddress::getAddressNo)
+            .last("LIMIT 1");
+        SupplierAddress supplierAddress = baseMapper.selectOne(lqw);
+        String addressNo = supplierAddress.getAddressNo();
+        Long maxNo = Long.parseLong(addressNo);
+        String newAddressNo = String.valueOf(maxNo+1);
+        add.setAddressNo(newAddressNo);
         boolean flag = baseMapper.insert(add) > 0;
         if (flag) {
             bo.setId(add.getId());

+ 71 - 4
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/SupplierAuthorizeServiceImpl.java

@@ -19,6 +19,8 @@ import org.dromara.customer.domain.vo.SupplyAreaVo;
 import org.dromara.customer.service.ISupplierInfoService;
 import org.dromara.customer.service.ISupplyAreaService;
 import org.dromara.product.api.RemoteCategoryService;
+import org.dromara.product.api.RemoteProductService;
+import org.dromara.product.api.domain.RemoteProductBrand;
 import org.springframework.beans.BeanUtils;
 import org.springframework.stereotype.Service;
 import org.dromara.customer.domain.bo.SupplierAuthorizeBo;
@@ -26,6 +28,7 @@ import org.dromara.customer.domain.vo.SupplierAuthorizeVo;
 import org.dromara.customer.domain.SupplierAuthorize;
 import org.dromara.customer.mapper.SupplierAuthorizeMapper;
 import org.dromara.customer.service.ISupplierAuthorizeService;
+import org.springframework.util.CollectionUtils;
 
 import java.util.*;
 import java.util.stream.Collectors;
@@ -50,6 +53,9 @@ public class SupplierAuthorizeServiceImpl  extends ServiceImpl<SupplierAuthorize
     @DubboReference
     private final RemoteCategoryService remoteCategoryService;
 
+    @DubboReference
+    private final RemoteProductService remoteProductService;
+
     /**
      * 查询供应能力查询
      *
@@ -92,7 +98,48 @@ public class SupplierAuthorizeServiceImpl  extends ServiceImpl<SupplierAuthorize
         //查询供应商信息
         IPage<SupplierInfo> result = supplierInfoService.getSupplyCapacityList(bo, pageQuery);
         List<SupplierInfo> records = result.getRecords();
-        Map<Long, String> supplierCategoryMap = records.stream().collect(Collectors.toMap(SupplierInfo::getId, SupplierInfo::getOperatingCategory));
+
+        Set<Long> allBrandIds = new HashSet<>();
+        for (SupplierInfo record : records) {
+            String operatingBrand = record.getOperatingBrand();
+            if (StringUtils.isNotBlank(operatingBrand)) {
+                String[] brandIdStrs = operatingBrand.split(",");
+                for (String idStr : brandIdStrs) {
+                    try {
+                        Long brandId = Long.valueOf(idStr.trim());
+                        allBrandIds.add(brandId);
+                    } catch (NumberFormatException e) {
+                        // 兼容非法ID,跳过
+                        continue;
+                    }
+                }
+            }
+        }
+
+        final Map<Long, String> brandIdToNameMap = new HashMap<>();
+        if (!CollectionUtils.isEmpty(allBrandIds)) {
+            List<Long> brandIdList = new ArrayList<>(allBrandIds);
+            // 调用你的品牌查询接口
+            List<RemoteProductBrand> brandList = remoteProductService.getProductByBrandId(brandIdList);
+
+            if (!CollectionUtils.isEmpty(brandList)) {
+                brandIdToNameMap.putAll(
+                    brandList.stream()
+                        .collect(Collectors.toMap(
+                            RemoteProductBrand::getId,
+                            RemoteProductBrand::getBrandName,
+                            (existing, replacement) -> existing
+                        ))
+                );
+            }
+        }
+
+        Map<Long, String> supplierCategoryMap = records.stream()
+            .collect(Collectors.toMap(SupplierInfo::getId,
+                record -> record.getOperatingCategory() != null ? record.getOperatingCategory() : "",
+                (existing, replacement) -> existing
+            ));
+
         //查询供应品类
         Map<Long, String> supplierCategoryNameMap = supplierCategoryNamesMap(supplierCategoryMap);
         //查询授权品牌String拼接
@@ -104,8 +151,29 @@ public class SupplierAuthorizeServiceImpl  extends ServiceImpl<SupplierAuthorize
             BeanUtils.copyProperties(item, supplierAuthorizeVo);
             supplierAuthorizeVo.setSupplierName(item.getEnterpriseName());
             supplierAuthorizeVo.setSupplyBrand(item.getOperatingBrand());
-            supplierAuthorizeVo.setSupplyProCate(supplierCategoryNameMap.get(item.getId()));
-            supplierAuthorizeVo.setAuthBrand(supplierBrandMap.get(item.getId()));
+            supplierAuthorizeVo.setSupplierId(item.getId());
+            supplierAuthorizeVo.setSupplyProCate(supplierCategoryNameMap.getOrDefault(item.getId(),""));
+            supplierAuthorizeVo.setAuthBrand(supplierBrandMap.getOrDefault(item.getId(),""));
+
+            // 新增:转换品牌ID为名称拼接
+            String operatingBrand = item.getOperatingBrand();
+            if (StringUtils.isNotBlank(operatingBrand)) {
+                String brandNames = Arrays.stream(operatingBrand.split(","))
+                    .map(String::trim)
+                    .map(idStr -> {
+                        try {
+                            Long brandId = Long.valueOf(idStr);
+                            return brandIdToNameMap.getOrDefault(brandId, idStr);
+                        } catch (NumberFormatException e) {
+                            return idStr;
+                        }
+                    })
+                    .collect(Collectors.joining(","));
+                // 赋值到VO(需确保SupplierAuthorizeVo有brandName字段,无则新增)
+                supplierAuthorizeVo.setBrandName(brandNames);
+            } else {
+                supplierAuthorizeVo.setBrandName("");
+            }
             return supplierAuthorizeVo;
         }).collect(Collectors.toList());
         IPage<SupplierAuthorizeVo> voPage = new Page<>();
@@ -113,7 +181,6 @@ public class SupplierAuthorizeServiceImpl  extends ServiceImpl<SupplierAuthorize
         // 设置转换后的Vo列表
         voPage.setRecords(collect);
         return TableDataInfo.build(voPage);
-
     }
 
     private Map<Long, String> supplierBrandMap(List<Long> ids){

+ 209 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/SupplierBusinessInfoServiceImpl.java

@@ -0,0 +1,209 @@
+package org.dromara.customer.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.dromara.common.core.utils.DateUtils;
+import org.dromara.common.core.utils.MapstructUtils;
+import org.dromara.common.core.utils.StringUtils;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.dromara.customer.utils.qcc.QccUtils;
+import org.dromara.customer.utils.qcc.domain.CompanyInfoResponse;
+import org.dromara.customer.utils.qcc.domain.Result;
+import org.springframework.stereotype.Service;
+import org.dromara.customer.domain.bo.SupplierBusinessInfoBo;
+import org.dromara.customer.domain.vo.SupplierBusinessInfoVo;
+import org.dromara.customer.domain.SupplierBusinessInfo;
+import org.dromara.customer.mapper.SupplierBusinessInfoMapper;
+import org.dromara.customer.service.ISupplierBusinessInfoService;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Collection;
+
+/**
+ * 供应商工商注册信息Service业务层处理
+ *
+ * @author LionLi
+ * @date 2026-01-22
+ */
+@Slf4j
+@RequiredArgsConstructor
+@Service
+public class SupplierBusinessInfoServiceImpl  extends ServiceImpl<SupplierBusinessInfoMapper, SupplierBusinessInfo> implements ISupplierBusinessInfoService {
+
+    private final SupplierBusinessInfoMapper baseMapper;
+
+    /**
+     * 查询供应商工商注册信息
+     *
+     * @param supplierId 主键
+     * @return 供应商工商注册信息
+     */
+    @Override
+    public SupplierBusinessInfoVo queryById(Long supplierId){
+        return baseMapper.selectVoById(supplierId);
+    }
+
+    /**
+     * 分页查询供应商工商注册信息列表
+     *
+     * @param bo        查询条件
+     * @param pageQuery 分页参数
+     * @return 供应商工商注册信息分页列表
+     */
+    @Override
+    public TableDataInfo<SupplierBusinessInfoVo> queryPageList(SupplierBusinessInfoBo bo, PageQuery pageQuery) {
+        LambdaQueryWrapper<SupplierBusinessInfo> lqw = buildQueryWrapper(bo);
+        Page<SupplierBusinessInfoVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
+        return TableDataInfo.build(result);
+    }
+
+    /**
+     * 查询符合条件的供应商工商注册信息列表
+     *
+     * @param bo 查询条件
+     * @return 供应商工商注册信息列表
+     */
+    @Override
+    public List<SupplierBusinessInfoVo> queryList(SupplierBusinessInfoBo bo) {
+        LambdaQueryWrapper<SupplierBusinessInfo> lqw = buildQueryWrapper(bo);
+        return baseMapper.selectVoList(lqw);
+    }
+
+    private LambdaQueryWrapper<SupplierBusinessInfo> buildQueryWrapper(SupplierBusinessInfoBo bo) {
+        Map<String, Object> params = bo.getParams();
+        LambdaQueryWrapper<SupplierBusinessInfo> lqw = Wrappers.lambdaQuery();
+        lqw.orderByAsc(SupplierBusinessInfo::getSupplierId);
+        lqw.like(StringUtils.isNotBlank(bo.getBusinessName()), SupplierBusinessInfo::getBusinessName, bo.getBusinessName());
+        lqw.eq(StringUtils.isNotBlank(bo.getSocialCreditCode()), SupplierBusinessInfo::getSocialCreditCode, bo.getSocialCreditCode());
+        lqw.like(StringUtils.isNotBlank(bo.getLegalPersonName()), SupplierBusinessInfo::getLegalPersonName, bo.getLegalPersonName());
+        lqw.eq(StringUtils.isNotBlank(bo.getRegisteredCapital()), SupplierBusinessInfo::getRegisteredCapital, bo.getRegisteredCapital());
+        lqw.eq(StringUtils.isNotBlank(bo.getPaidInCapital()), SupplierBusinessInfo::getPaidInCapital, bo.getPaidInCapital());
+        lqw.eq(bo.getEstablishmentDate() != null, SupplierBusinessInfo::getEstablishmentDate, bo.getEstablishmentDate());
+        lqw.eq(bo.getRevocationDate() != null, SupplierBusinessInfo::getRevocationDate, bo.getRevocationDate());
+        lqw.eq(StringUtils.isNotBlank(bo.getRegistrationStatus()), SupplierBusinessInfo::getRegistrationStatus, bo.getRegistrationStatus());
+        lqw.eq(StringUtils.isNotBlank(bo.getRegistrationAuthority()), SupplierBusinessInfo::getRegistrationAuthority, bo.getRegistrationAuthority());
+        lqw.eq(StringUtils.isNotBlank(bo.getBussinessRange()), SupplierBusinessInfo::getBussinessRange, bo.getBussinessRange());
+        lqw.eq(StringUtils.isNotBlank(bo.getBusinessLicense()), SupplierBusinessInfo::getBusinessLicense, bo.getBusinessLicense());
+        lqw.eq(StringUtils.isNotBlank(bo.getBusinessAddress()), SupplierBusinessInfo::getBusinessAddress, bo.getBusinessAddress());
+        return lqw;
+    }
+
+    /**
+     * 新增供应商工商注册信息
+     *
+     * @param bo 供应商工商注册信息
+     * @return 是否新增成功
+     */
+    @Override
+    public Boolean insertByBo(SupplierBusinessInfoBo bo) {
+        SupplierBusinessInfo add = MapstructUtils.convert(bo, SupplierBusinessInfo.class);
+        validEntityBeforeSave(add);
+        boolean flag = baseMapper.insert(add) > 0;
+        if (flag) {
+            bo.setSupplierId(add.getSupplierId());
+        }
+        return flag;
+    }
+
+    /**
+     * 修改供应商工商注册信息
+     *
+     * @param bo 供应商工商注册信息
+     * @return 是否修改成功
+     */
+    @Override
+    public Boolean updateByBo(SupplierBusinessInfoBo bo) {
+        SupplierBusinessInfo update = MapstructUtils.convert(bo, SupplierBusinessInfo.class);
+        validEntityBeforeSave(update);
+        return baseMapper.updateById(update) > 0;
+    }
+
+    /**
+     * 保存前的数据校验
+     */
+    private void validEntityBeforeSave(SupplierBusinessInfo entity){
+        //TODO 做一些数据校验,如唯一约束
+    }
+
+    /**
+     * 校验并批量删除供应商工商注册信息信息
+     *
+     * @param ids     待删除的主键集合
+     * @param isValid 是否进行有效性校验
+     * @return 是否删除成功
+     */
+    @Override
+    public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
+        if(isValid){
+            //TODO 做一些业务上的校验,判断是否需要校验
+        }
+        return baseMapper.deleteByIds(ids) > 0;
+    }
+
+    @Override
+    public SupplierBusinessInfoVo getinformation(String enterpriseName) {
+        // 1. 先查本地数据库
+        LambdaQueryWrapper<SupplierBusinessInfo> query = new LambdaQueryWrapper<SupplierBusinessInfo>()
+            .eq(SupplierBusinessInfo::getBusinessName, enterpriseName)
+            .last("LIMIT 1");
+
+        List<SupplierBusinessInfoVo> list = baseMapper.selectVoList(query);
+        if (!list.isEmpty()) {
+            return list.get(0);
+        }
+
+        // 2. 调用企查查接口
+        CompanyInfoResponse response = QccUtils.getCompanyInfo(enterpriseName);
+        if (response == null || response.getResult() == null) {
+            return null; // 或抛异常,根据业务需求
+        }
+
+        // 3. 映射 QCC 数据到实体(注意:不设置 businessLicense)
+        Result result = response.getResult();
+        SupplierBusinessInfo entity = new SupplierBusinessInfo();
+
+        entity.setBusinessName(result.getName());
+        entity.setSocialCreditCode(result.getCreditCode());
+        entity.setLegalPersonName(result.getOperName());
+
+        // 注册资本:拼接数值 + 单位(如 "101万元")
+        String regCap = result.getRegisteredCapital();
+        String regUnit = result.getRegisteredCapitalUnit();
+        entity.setRegisteredCapital(
+            StringUtils.isNotBlank(regCap) && StringUtils.isNotBlank(regUnit)
+                ? regCap + regUnit
+                : regCap
+        );
+
+        // 实缴资本(类似处理)
+        String paidCap = result.getPaidUpCapital();
+        String paidUnit = result.getPaidUpCapitalUnit();
+        entity.setPaidInCapital(
+            StringUtils.isNotBlank(paidCap) && StringUtils.isNotBlank(paidUnit)
+                ? paidCap + paidUnit
+                : paidCap
+        );
+
+        // 日期转换(注意时区和格式)
+        entity.setEstablishmentDate(DateUtils.parseDate(result.getStartDate()));
+        // revocationDate 暂不处理,留 null
+        entity.setRevocationDate(null);
+
+        entity.setRegistrationStatus(result.getStatus());
+        entity.setRegistrationAuthority(result.getBelongOrg());
+        entity.setBussinessRange(result.getScope());
+        entity.setBusinessAddress(result.getAddress());
+
+        // 关键:不设置 businessLicense!保留为 null(由用户后续上传)
+        entity.setBusinessLicense(null);
+
+        // 5. 转 VO 返回
+        return MapstructUtils.convert(entity, SupplierBusinessInfoVo.class);
+    }
+}

+ 10 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/SupplierContactServiceImpl.java

@@ -155,6 +155,16 @@ public class SupplierContactServiceImpl  extends ServiceImpl<SupplierContactMapp
     public Boolean insertByBo(SupplierContactBo bo) {
         SupplierContact add = MapstructUtils.convert(bo, SupplierContact.class);
         validEntityBeforeSave(add);
+
+        // 查询最大的用户编号
+        LambdaQueryWrapper<SupplierContact> lqw = Wrappers.lambdaQuery();
+        lqw.select(SupplierContact::getUserNo)
+            .orderByDesc(SupplierContact::getUserNo)
+            .last("LIMIT 1");
+        SupplierContact maxContact = baseMapper.selectOne(lqw);
+        String maxUserNo = maxContact.getUserNo();
+        long l = Long.parseLong(maxUserNo) + 1;
+        add.setUserNo(String.valueOf(l));
         boolean flag = baseMapper.insert(add) > 0;
         return flag;
     }

+ 89 - 62
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/SupplierContractServiceImpl.java

@@ -1,5 +1,6 @@
 package org.dromara.customer.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.dromara.common.core.utils.MapstructUtils;
@@ -72,76 +73,92 @@ public class SupplierContractServiceImpl  extends ServiceImpl<SupplierContractMa
      */
     @Override
     public TableDataInfo<SupplierContractVo> queryPageList(SupplierContractBo bo, PageQuery pageQuery) {
-        if (bo.getSupplierName() != null){
-            SupplierInfo one = supplierInfoService.getOne(new LambdaQueryWrapper<SupplierInfo>().eq(SupplierInfo::getEnterpriseName, bo.getSupplierName()));
-            bo.setSupplierId(one.getId());
+        // 首先从SupplierInfo表进行分页查询
+        LambdaQueryWrapper<SupplierInfo> supplierInfoWrapper = Wrappers.lambdaQuery();
+        if (bo.getSupplierName() != null) {
+            supplierInfoWrapper.eq(SupplierInfo::getEnterpriseName, bo.getSupplierName());
         }
-        LambdaQueryWrapper<SupplierContract> lqw = buildQueryWrapper(bo);
-        // 查询所有符合条件的记录
-        List<SupplierContract> allRecords = baseMapper.selectList(lqw);
-        // 获取当前时间(用于判断合同是否过期)
-        Date now = new Date();
-
-        // 按供应商ID分组,同时统计总数、有效数、失效数
-        Map<Long, ContractCountDTO> countMap = allRecords.stream()
-            .collect(Collectors.groupingBy(
-                SupplierContract::getSupplierId,
-                Collectors.collectingAndThen(
-                    Collectors.toList(),
-                    list -> {
-                        // 统计总数
-                        long total = list.size();
-                        // 统计有效期内合同数
-                        long validCount = list.stream()
-                            .filter(contract ->
-                                // 状态为已生效 且 到期时间晚于当前时间
-                                1L == (contract.getContractStatus())
-                                    && contract.getContractEndTime().after(now)
-                            ).count();
-                        // 统计失效合同数(总数 - 有效数)
-                        long invalidCount = total - validCount;
-                        return new ContractCountDTO(total, validCount, invalidCount);
-                    }
-                )
-            ));
-
-        // 转换为VO列表并排序
-        List<SupplierContractVo> contractStats = countMap.entrySet().stream()
-            .map(entry -> {
-                Long supplierId = entry.getKey();
-                ContractCountDTO countDTO = entry.getValue();
+        if (bo.getSupplierId()!=null){
+            supplierInfoWrapper.eq(SupplierInfo::getId, bo.getSupplierId());
+        }
+
+        // 添加其他SupplierInfo表的查询条件
+        supplierInfoWrapper.orderByDesc(SupplierInfo::getSupplierNo);
+
+        // 执行分页查询供应商信息
+        Page<SupplierInfo> supplierPage = new Page<>(pageQuery.getPageNum(), pageQuery.getPageSize());
+        IPage<SupplierInfo> supplierInfoPage = supplierInfoService.page(supplierPage, supplierInfoWrapper);
+        List<SupplierInfo> supplierInfoList = supplierInfoPage.getRecords();
+
+        // 获取所有供应商ID,用于后续查询合同统计信息
+        List<Long> supplierIds = supplierInfoList.stream()
+            .map(SupplierInfo::getId)
+            .collect(Collectors.toList());
+
+
 
+        // 查询所有供应商的合同统计信息
+        Map<Long, ContractCountDTO> contractStatsMap = new HashMap<>();
+        if (!supplierIds.isEmpty()) {
+            // 查询所有相关合同
+            LambdaQueryWrapper<SupplierContract> contractWrapper = Wrappers.lambdaQuery();
+            contractWrapper.in(SupplierContract::getSupplierId, supplierIds);
+            List<SupplierContract> allContracts = baseMapper.selectList(contractWrapper);
+
+            // 获取当前时间(用于判断合同是否过期)
+            Date now = new Date();
+
+            // 按供应商ID分组统计合同信息
+            contractStatsMap = allContracts.stream()
+                .collect(Collectors.groupingBy(
+                    SupplierContract::getSupplierId,
+                    Collectors.collectingAndThen(
+                        Collectors.toList(),
+                        list -> {
+                            // 统计总数
+                            long total = list.size();
+                            // 统计有效期内合同数(状态为已生效 且 到期时间晚于当前时间)
+                            long validCount = list.stream()
+                                .filter(contract ->
+                                    2L != (contract.getContractStatus())
+                                        && contract.getContractEndTime() != null && contract.getContractEndTime().after(now)
+                                ).count();
+                            // 统计失效合同数(总数 - 有效数)
+                            long invalidCount = total - validCount;
+                            return new ContractCountDTO(total, validCount, invalidCount);
+                        }
+                    )
+                ));
+        }
+
+        // 将供应商信息和合同统计信息组合成VO列表
+        final Map<Long, ContractCountDTO> finalContractStatsMap = contractStatsMap; // 创建final副本
+        List<SupplierContractVo> contractStats = supplierInfoList.stream()
+            .map(supplierInfo -> {
                 SupplierContractVo vo = new SupplierContractVo();
-                vo.setSupplierId(supplierId);
-                // 合同总数
+                vo.setSupplierId(supplierInfo.getId());
+                vo.setSupplierNo(supplierInfo.getSupplierNo());
+                vo.setSupplierName(supplierInfo.getEnterpriseName());
+
+                // 获取合同统计信息,如果没有则创建默认值为0的统计对象
+                ContractCountDTO defaultCountDTO = new ContractCountDTO(0, 0, 0);
+                ContractCountDTO countDTO = finalContractStatsMap.getOrDefault(supplierInfo.getId(),
+                    defaultCountDTO);
+
+                // 设置合同数统计
                 vo.setContractNum(String.valueOf(countDTO.getTotal()));
-                // 有效期内合同数
                 vo.setValidContract(String.valueOf(countDTO.getValidCount()));
-                // 失效合同数
                 vo.setInvalidContract(String.valueOf(countDTO.getInvalidCount()));
 
-                // 查询供应商基本信息
-                SupplierInfo supplier = supplierInfoService.getById(supplierId);
-                if (supplier != null) { // 增加空指针防护
-                    vo.setSupplierName(supplier.getEnterpriseName());
-                    vo.setSupplierNo(supplier.getSupplierNo());
-                }
                 return vo;
             })
-            .sorted((a, b) -> b.getSupplierNo().compareTo(a.getSupplierNo()))
             .collect(Collectors.toList());
-
-        // 分页处理
-        int total = contractStats.size();
-        int start = (int) ((pageQuery.getPageNum() - 1) * pageQuery.getPageSize());
-        int end = Math.min(start + pageQuery.getPageSize(), total);
-        List<SupplierContractVo> pagedResult = start > end ? List.of() : contractStats.subList(start, end);
-
+        // 构建分页结果
         Page<SupplierContractVo> result = new Page<>();
-        result.setRecords(pagedResult);
-        result.setTotal(total);
-        result.setSize(pageQuery.getPageSize());
-        result.setCurrent(pageQuery.getPageNum());
+        result.setRecords(contractStats);
+        result.setTotal(supplierInfoPage.getTotal());
+        result.setSize(supplierInfoPage.getSize());
+        result.setCurrent(supplierInfoPage.getCurrent());
         return TableDataInfo.build(result);
     }
 
@@ -207,10 +224,11 @@ public class SupplierContractServiceImpl  extends ServiceImpl<SupplierContractMa
         lqw.like(StringUtils.isNotBlank(bo.getContractName()), SupplierContract::getContractName, bo.getSupplierName());
         lqw.eq(StringUtils.isNotBlank(bo.getSupplierNo()), SupplierContract::getSupplierNo, bo.getSupplierNo());
         lqw.eq(bo.getContractStatus()!=null, SupplierContract::getContractStatus, bo.getContractStatus());
-        lqw.gt(bo.getContractStartTime() !=null, SupplierContract::getContractStartTime, bo.getContractStartTime());
-        lqw.lt(bo.getContractEndTime() !=null, SupplierContract::getContractEndTime, bo.getContractEndTime());
+        lqw.ge(bo.getContractStartTime() !=null, SupplierContract::getContractStartTime, bo.getContractStartTime());
+        lqw.le(bo.getContractEndTime() !=null, SupplierContract::getContractEndTime, bo.getContractEndTime());
         lqw.eq(bo.getContractStatus() != null, SupplierContract::getContractStatus, bo.getContractStatus());
         lqw.eq(bo.getSupplierId() != null && !bo.getSupplierId().equals(""),SupplierContract::getSupplierId, bo.getSupplierId());
+        lqw.eq(bo.getContractType() !=null, SupplierContract::getContractType, bo.getContractType());
         return lqw;
     }
 
@@ -287,5 +305,14 @@ public class SupplierContractServiceImpl  extends ServiceImpl<SupplierContractMa
         return baseMapper.deleteByIds(ids) > 0;
     }
 
-
+    @Override
+    public int updateExpiredContractStatus() {
+        // 创建更新条件:合同到期时间小于当前时间且合同状态不是已到期、已终止或已作废
+        LambdaUpdateWrapper<SupplierContract> updateWrapper = new LambdaUpdateWrapper<>();
+        updateWrapper.lt(SupplierContract::getContractEndTime, new Date()); // 合同到期时间小于当前时间
+        updateWrapper.notIn(SupplierContract::getContractStatus, 2L); // 不是已到期、已终止或已作废状态
+        updateWrapper.set(SupplierContract::getContractStatus, 2L); // 设置为已到期状态
+        // 执行更新操作
+        return baseMapper.update(null, updateWrapper);
+    }
 }

File diff suppressed because it is too large
+ 911 - 64
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/SupplierInfoServiceImpl.java


+ 5 - 1
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/SupplierProcurementServiceImpl.java

@@ -106,7 +106,11 @@ public class SupplierProcurementServiceImpl  extends ServiceImpl<SupplierProcure
     public Boolean updateByBo(SupplierProcurementBo bo) {
         SupplierProcurement update = MapstructUtils.convert(bo, SupplierProcurement.class);
         validEntityBeforeSave(update);
-        return baseMapper.updateById(update) > 0;
+        LambdaQueryWrapper<SupplierProcurement> lqw = Wrappers.lambdaQuery();
+        lqw.eq(SupplierProcurement::getSupplierId, bo.getSupplierId());
+
+        int result = baseMapper.update(update, lqw);
+        return result > 0;
     }
 
     /**

+ 81 - 11
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/SupplyAreaServiceImpl.java

@@ -10,17 +10,17 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
 import org.springframework.stereotype.Service;
 import org.dromara.customer.domain.bo.SupplyAreaBo;
 import org.dromara.customer.domain.vo.SupplyAreaVo;
 import org.dromara.customer.domain.SupplyArea;
 import org.dromara.customer.mapper.SupplyAreaMapper;
 import org.dromara.customer.service.ISupplyAreaService;
+import org.springframework.util.CollectionUtils;
 
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Collection;
+import java.util.*;
+import java.util.stream.Collectors;
 
 /**
  * 供应区域Service业务层处理
@@ -42,8 +42,53 @@ public class SupplyAreaServiceImpl  extends ServiceImpl<SupplyAreaMapper, Supply
      * @return 供应区域
      */
     @Override
-    public SupplyAreaVo queryById(Long id){
-        return baseMapper.selectVoById(id);
+    public List<SupplyAreaVo> queryById(Long id){
+        // 1. 基础查询:获取该供应商下所有的区域数据(扁平列表)
+        LambdaQueryWrapper<SupplyArea> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(SupplyArea::getSupplierId, id);
+        List<SupplyAreaVo> flatList = baseMapper.selectVoList(queryWrapper);
+        // 2. 判空:如果没有数据,直接返回空列表
+        if (CollectionUtils.isEmpty(flatList)) {
+            return new ArrayList<>();
+        }
+
+        // 3. 数据分组&构建树形结构
+        // 3.1 分离省级(level=1)和市级(level=2)数据
+        List<SupplyAreaVo> provinceList = flatList.stream()
+            .filter(vo -> "1".equals(vo.getLevel())) // 筛选省级
+            .collect(Collectors.toList());
+
+        List<SupplyAreaVo> cityList = flatList.stream()
+            .filter(vo -> "2".equals(vo.getLevel())) // 筛选市级
+            .collect(Collectors.toList());
+
+        // 3.2 构建父级编码到省级VO的映射(方便快速匹配)
+        Map<String, SupplyAreaVo> provinceMap = provinceList.stream()
+            .collect(Collectors.toMap(
+                SupplyAreaVo::getAreaCode, // key:省级区域编码(如CN34)
+                vo -> vo,                  // value:省级VO对象
+                (existing, replacement) -> existing // 避免重复编码覆盖
+            ));
+
+        // 3.3 遍历市级数据,挂载到对应的省级父节点中
+        for (SupplyAreaVo cityVo : cityList) {
+            // 市级的parentCode(上级编码)对应省级的areaCode
+            String parentAreaCode = cityVo.getParentCode(); // 注意类型转换(根据你的实际字段调整)
+
+            // 找到对应的省级父节点
+            SupplyAreaVo parentProvince = provinceMap.get(parentAreaCode);
+            if (parentProvince != null) {
+                // 初始化父节点的areaList(避免空指针)
+                if (parentProvince.getAreaList() == null) {
+                    parentProvince.setAreaList(new ArrayList<>());
+                }
+                // 将市级VO添加到父节点的areaList中
+                parentProvince.getAreaList().add(cityVo);
+            }
+        }
+
+        // 4. 返回最终的树形结构(仅返回省级列表,市级已挂载到对应父节点)
+        return provinceList;
     }
 
     /**
@@ -80,7 +125,7 @@ public class SupplyAreaServiceImpl  extends ServiceImpl<SupplyAreaMapper, Supply
         lqw.eq(bo.getSupplierId() != null, SupplyArea::getSupplierId, bo.getSupplierId());
         lqw.eq(StringUtils.isNotBlank(bo.getAreaCode()), SupplyArea::getAreaCode, bo.getAreaCode());
         lqw.like(StringUtils.isNotBlank(bo.getAreaName()), SupplyArea::getAreaName, bo.getAreaName());
-        lqw.eq(StringUtils.isNotBlank(bo.getParentCode()), SupplyArea::getParentCode, bo.getParentCode());
+        lqw.eq(bo.getParentCode()!=null, SupplyArea::getParentCode, bo.getParentCode());
         lqw.eq(StringUtils.isNotBlank(bo.getLevel()), SupplyArea::getLevel, bo.getLevel());
         return lqw;
     }
@@ -93,10 +138,35 @@ public class SupplyAreaServiceImpl  extends ServiceImpl<SupplyAreaMapper, Supply
      */
     @Override
     public Boolean insertByBo(SupplyAreaBo bo) {
-        SupplyArea add = MapstructUtils.convert(bo, SupplyArea.class);
-        validEntityBeforeSave(add);
-        boolean flag = baseMapper.insert(add) > 0;
-        return flag;
+        // 1. 校验核心参数(避免空指针)
+        if (bo == null || bo.getSupplierId() == null) {
+            throw new IllegalArgumentException("供应商ID不能为空");
+        }
+        List<SupplyAreaBo> areaList = bo.getAreaList();
+        if (areaList == null || areaList.isEmpty()) {
+            return true;
+        }
+
+        // 2. 遍历区域列表,为每个对象赋值supplierId和supplyNo
+        Long supplierId = bo.getSupplierId();
+        int delete = baseMapper.delete(new LambdaQueryWrapper<SupplyArea>().eq(SupplyArea::getSupplierId, supplierId));
+        String supplyNo = bo.getSupplyNo(); // 如果需要的话也赋值
+        List<SupplyArea> supplyAreas = new ArrayList<>();
+        for (SupplyAreaBo areaBo : areaList) {
+            SupplyArea supplyArea = new SupplyArea();
+            BeanUtils.copyProperties(areaBo, supplyArea);
+            // 核心:给每个区域对象设置供应商ID
+            supplyArea.setSupplierId(supplierId);
+            supplyArea.setSupplyNo(supplyNo);
+            supplyAreas.add(supplyArea);
+        }
+
+        // 3. 执行批量插入操作
+        boolean insertCount = baseMapper.insertBatch(supplyAreas);
+
+        // 4. 判断插入结果(插入数量和列表数量一致则返回成功)
+        return insertCount;
+
     }
 
     /**

+ 7 - 0
ruoyi-modules/ruoyi-customer/src/main/resources/mapper/customer/SupplierBusinessInfoMapper.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.dromara.customer.mapper.SupplierBusinessInfoMapper">
+
+</mapper>

+ 10 - 0
ruoyi-modules/ruoyi-job/pom.xml

@@ -22,6 +22,16 @@
             <artifactId>ruoyi-common-nacos</artifactId>
         </dependency>
 
+        <dependency>
+            <groupId>org.dromara</groupId>
+            <artifactId>ruoyi-common-nacos</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.dromara</groupId>
+            <artifactId>ruoyi-api-customer</artifactId>
+        </dependency>
+
         <!-- RuoYi Common Log -->
         <dependency>
             <groupId>org.dromara</groupId>

+ 35 - 0
ruoyi-modules/ruoyi-job/src/main/java/org/dromara/job/snailjob/SupplierContractJobTask.java

@@ -0,0 +1,35 @@
+package org.dromara.job.snailjob;
+
+import com.aizuda.snailjob.client.job.core.annotation.JobExecutor;
+import com.aizuda.snailjob.client.job.core.dto.JobArgs;
+import com.aizuda.snailjob.client.model.ExecuteResult;
+import com.aizuda.snailjob.common.log.SnailJobLog;
+
+import lombok.RequiredArgsConstructor;
+import org.apache.dubbo.config.annotation.DubboReference;
+import org.dromara.customer.api.RemoteSupplierContractService;
+import org.springframework.stereotype.Component;
+
+/**
+ * author
+ * 时间:2026/1/23,9:02
+ */
+@Component
+@JobExecutor(name = "SupplierContractJobTask")
+@RequiredArgsConstructor
+public class SupplierContractJobTask {
+
+    @DubboReference
+    private final RemoteSupplierContractService remoteSupplierContractService;
+    public ExecuteResult jobExecute(JobArgs jobArgs){
+        // 更新过期合同状态
+        int i = remoteSupplierContractService.updateExpiredContractStatus();
+        if (i > 0){
+            SnailJobLog.REMOTE.info("合同状态更新完成");
+        }else {
+            SnailJobLog.REMOTE.info("合同状态更新失败");
+        }
+        return ExecuteResult.success("合同状态更新完成");
+    }
+
+}

+ 32 - 0
ruoyi-modules/ruoyi-job/src/main/java/org/dromara/job/snailjob/SupplierInfoJobTask.java

@@ -0,0 +1,32 @@
+package org.dromara.job.snailjob;
+
+import com.aizuda.snailjob.client.job.core.annotation.JobExecutor;
+import com.aizuda.snailjob.client.job.core.dto.JobArgs;
+import com.aizuda.snailjob.client.model.ExecuteResult;
+import com.aizuda.snailjob.common.log.SnailJobLog;
+import lombok.RequiredArgsConstructor;
+import org.apache.dubbo.config.annotation.DubboReference;
+import org.dromara.customer.api.RemoteSupplierInfoService;
+import org.springframework.stereotype.Component;
+
+/**
+ * author
+ * 时间:2026/1/23,9:38
+ */
+@Component
+@JobExecutor(name = "SupplierInfoJobTask")
+@RequiredArgsConstructor
+public class SupplierInfoJobTask {
+
+    @DubboReference
+    private final RemoteSupplierInfoService remoteSupplierInfoService;
+    public ExecuteResult jobExecute(JobArgs jobArgs){
+        int i = remoteSupplierInfoService.updateIsDisable();
+        if (i > 0){
+            SnailJobLog.REMOTE.info("供应商信息更新完成");
+        }else {
+            SnailJobLog.REMOTE.info("供应商信息更新失败");
+        }
+        return ExecuteResult.success("供应商信息更新完成");
+    }
+}

+ 23 - 0
ruoyi-modules/ruoyi-job/src/main/java/org/dromara/job/snailjob/TestTask.java

@@ -0,0 +1,23 @@
+package org.dromara.job.snailjob;
+
+import com.aizuda.snailjob.client.job.core.annotation.JobExecutor;
+import com.aizuda.snailjob.client.job.core.dto.JobArgs;
+import com.aizuda.snailjob.client.model.ExecuteResult;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+
+/**
+ * author
+ * 时间:2026/1/23,10:09
+ */
+@Component
+@JobExecutor(name = "TestTask")
+@Slf4j
+public class TestTask {
+
+    public ExecuteResult jobExecute(JobArgs jobArgs) {
+        log.info("进行测试任务");
+        return ExecuteResult.success("测试任务成功");
+    }
+
+}

+ 3 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/controller/ProductBrandController.java

@@ -46,6 +46,9 @@ public class ProductBrandController extends BaseController {
         return productBrandService.queryPageList(bo, pageQuery);
     }
 
+
+
+
     /**
      * 导出产品品牌信息列表
      */

+ 3 - 4
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/controller/ProductCategoryController.java

@@ -56,10 +56,9 @@ public class ProductCategoryController extends BaseController {
      */
     @GetMapping("/getProductCategoryList")
     public R<List<ProductCategoryVo>>getProductCategoryList() {
-        LambdaQueryWrapper<ProductCategory> queryWrapper = new LambdaQueryWrapper<>();
-        queryWrapper.eq(ProductCategory::getClassLevel, "1");
-        List<ProductCategory> list = productCategoryService.list(queryWrapper);
-        List<ProductCategoryVo> productCategoryVos = BeanUtil.copyToList(list, ProductCategoryVo.class);
+        ProductCategoryBo bo = new ProductCategoryBo();
+        bo.setClassLevel(1L);
+        List<ProductCategoryVo> productCategoryVos = productCategoryService.queryList(bo);
         return R.ok(productCategoryVos);
     }
 

+ 16 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/dubbo/RemoteProductServiceImpl.java

@@ -125,6 +125,22 @@ public class RemoteProductServiceImpl implements RemoteProductService {
         return ObjectUtil.isNotEmpty(byId)?BeanUtil.toBean(byId, RemoteProductBrand.class):null;
     }
 
+    @Override
+    public List<RemoteProductBrand> getProductByBrandId(List<Long> ids) {
+        List<ProductBrand> productBrands = productBrandService.listByIds(ids);
+        if (ObjectUtil.isEmpty(productBrands)) {
+            return new ArrayList<>();
+        }
+        List<RemoteProductBrand> remoteProductBrands = productBrands.stream().map(productBrand ->
+            BeanUtil.toBean(productBrand, RemoteProductBrand.class)
+        ).collect(Collectors.toList());
+
+
+        return remoteProductBrands;
+    }
+
+
+
     @Override
     public List<ProductCategoryRemoteVo> queryList() {
         List<ProductCategoryVo> productCategoryVos = productCategoryService.queryList(new ProductCategoryBo());

+ 112 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/AddressAreaController.java

@@ -0,0 +1,112 @@
+package org.dromara.system.controller.system;
+
+import java.util.List;
+
+import lombok.RequiredArgsConstructor;
+import jakarta.servlet.http.HttpServletResponse;
+import jakarta.validation.constraints.*;
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.validation.annotation.Validated;
+import org.dromara.common.idempotent.annotation.RepeatSubmit;
+import org.dromara.common.log.annotation.Log;
+import org.dromara.common.web.core.BaseController;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import org.dromara.common.core.domain.R;
+import org.dromara.common.core.validate.AddGroup;
+import org.dromara.common.core.validate.EditGroup;
+import org.dromara.common.log.enums.BusinessType;
+import org.dromara.common.excel.utils.ExcelUtil;
+import org.dromara.system.domain.vo.AddressAreaVo;
+import org.dromara.system.domain.bo.AddressAreaBo;
+import org.dromara.system.service.IAddressAreaService;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+
+/**
+ * 地区列表
+ * 前端访问路由地址为:/system/addressarea
+ *
+ * @author LionLi
+ * @date 2026-01-21
+ */
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/addressarea")
+public class AddressAreaController extends BaseController {
+
+    private final IAddressAreaService addressAreaService;
+
+    /**
+     * 查询地区列表列表
+     */
+    @SaCheckPermission("system:addressarea:list")
+    @GetMapping("/list")
+    public TableDataInfo<AddressAreaVo> list(AddressAreaBo bo, PageQuery pageQuery) {
+        return addressAreaService.queryPageList(bo, pageQuery);
+    }
+
+
+    @GetMapping("/getChinaList")
+    public R<List<AddressAreaVo>> getChniaList(AddressAreaBo bo) {
+        return R.ok(addressAreaService.getChniaList(bo));
+    }
+
+    /**
+     * 导出地区列表列表
+     */
+    @SaCheckPermission("system:addressarea:export")
+    @Log(title = "地区列表", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(AddressAreaBo bo, HttpServletResponse response) {
+        List<AddressAreaVo> list = addressAreaService.queryList(bo);
+        ExcelUtil.exportExcel(list, "地区列表", AddressAreaVo.class, response);
+    }
+
+    /**
+     * 获取地区列表详细信息
+     *
+     * @param id 主键
+     */
+    @SaCheckPermission("system:addressarea:query")
+    @GetMapping("/{id}")
+    public R<AddressAreaVo> getInfo(@NotNull(message = "主键不能为空")
+                                     @PathVariable("id") Long id) {
+        return R.ok(addressAreaService.queryById(id));
+    }
+
+    /**
+     * 新增地区列表
+     */
+    @SaCheckPermission("system:addressarea:add")
+    @Log(title = "地区列表", businessType = BusinessType.INSERT)
+    @RepeatSubmit()
+    @PostMapping()
+    public R<Void> add(@Validated(AddGroup.class) @RequestBody AddressAreaBo bo) {
+        return toAjax(addressAreaService.insertByBo(bo));
+    }
+
+    /**
+     * 修改地区列表
+     */
+    @SaCheckPermission("system:addressarea:edit")
+    @Log(title = "地区列表", businessType = BusinessType.UPDATE)
+    @RepeatSubmit()
+    @PutMapping()
+    public R<Void> edit(@Validated(EditGroup.class) @RequestBody AddressAreaBo bo) {
+        return toAjax(addressAreaService.updateByBo(bo));
+    }
+
+    /**
+     * 删除地区列表
+     *
+     * @param ids 主键串
+     */
+    @SaCheckPermission("system:addressarea:remove")
+    @Log(title = "地区列表", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public R<Void> remove(@NotEmpty(message = "主键不能为空")
+                          @PathVariable("ids") Long[] ids) {
+        return toAjax(addressAreaService.deleteWithValidByIds(List.of(ids), true));
+    }
+}

+ 82 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/AddressArea.java

@@ -0,0 +1,82 @@
+package org.dromara.system.domain;
+
+import org.dromara.common.tenant.core.TenantEntity;
+import com.baomidou.mybatisplus.annotation.*;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serial;
+
+/**
+ * 地区列表对象 address_area
+ *
+ * @author LionLi
+ * @date 2026-01-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("address_area")
+public class AddressArea extends TenantEntity {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键ID
+     */
+    @TableId(value = "id")
+    private Long id;
+
+    /**
+     * 地区编码
+     */
+    private String areaCode;
+
+    /**
+     * 地区名称
+     */
+    private String areaName;
+
+    /**
+     * 父类ID
+     */
+    private Long parentCode;
+
+    /**
+     * 地区简称
+     */
+    private String simpleName;
+
+    /**
+     * 地区等级省 1 市 2
+     */
+    private Long level;
+
+    /**
+     * 拼英
+     */
+    private String pinYin;
+
+    /**
+     * 数据来源
+     */
+    private String dataSource;
+
+    /**
+     * 状态(0正常 1停用)
+     */
+    private String status;
+
+    /**
+     * 删除标志(0代表存在 2代表删除)
+     */
+    @TableLogic
+    private String delFlag;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+
+}

+ 64 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/AddressAreaBo.java

@@ -0,0 +1,64 @@
+package org.dromara.system.domain.bo;
+
+import org.dromara.system.domain.AddressArea;
+import org.dromara.common.mybatis.core.domain.BaseEntity;
+import org.dromara.common.core.validate.AddGroup;
+import org.dromara.common.core.validate.EditGroup;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import jakarta.validation.constraints.*;
+
+/**
+ * 地区列表业务对象 address_area
+ *
+ * @author LionLi
+ * @date 2026-01-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@AutoMapper(target = AddressArea.class, reverseConvertGenerate = false)
+public class AddressAreaBo extends BaseEntity {
+
+    /**
+     * 主键ID
+     */
+    private Long id;
+
+    /**
+     * 地区编码
+     */
+    private String areaCode;
+
+    /**
+     * 地区名称
+     */
+    private String areaName;
+
+    /**
+     * 父类ID
+     */
+    private Long parentCode;
+
+    /**
+     * 地区简称
+     */
+    private String simpleName;
+
+    /**
+     * 地区等级省 1 市 2
+     */
+    private Long level;
+
+    /**
+     * 拼英
+     */
+    private String pinYin;
+
+    /**
+     * 数据来源
+     */
+    private String dataSource;
+
+
+}

+ 85 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/AddressAreaVo.java

@@ -0,0 +1,85 @@
+package org.dromara.system.domain.vo;
+
+import org.dromara.system.domain.AddressArea;
+import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
+import cn.idev.excel.annotation.ExcelProperty;
+import org.dromara.common.excel.annotation.ExcelDictFormat;
+import org.dromara.common.excel.convert.ExcelDictConvert;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+
+/**
+ * 地区列表视图对象 address_area
+ *
+ * @author LionLi
+ * @date 2026-01-21
+ */
+@Data
+@ExcelIgnoreUnannotated
+@AutoMapper(target = AddressArea.class)
+public class AddressAreaVo implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键ID
+     */
+    @ExcelProperty(value = "主键ID")
+    private Long id;
+
+    /**
+     * 地区编码
+     */
+    @ExcelProperty(value = "地区编码")
+    private String areaCode;
+
+    /**
+     * 地区名称
+     */
+    @ExcelProperty(value = "地区名称")
+    private String areaName;
+
+    /**
+     * 父类ID
+     */
+    @ExcelProperty(value = "父类ID")
+    private Long parentCode;
+
+    /**
+     * 地区简称
+     */
+    @ExcelProperty(value = "地区简称")
+    private String simpleName;
+
+    /**
+     * 地区等级省 1 市 2
+     */
+    @ExcelProperty(value = "地区等级省 1 市 2")
+    private Long level;
+
+    /**
+     * 拼英
+     */
+    @ExcelProperty(value = "拼英")
+    private String pinYin;
+
+    /**
+     * 数据来源
+     */
+    @ExcelProperty(value = "数据来源")
+    private String dataSource;
+
+    /**
+     * 树形结构
+     */
+    private List<AddressAreaVo> children;
+
+
+}

+ 1 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/dubbo/RemoteSupplierTypeServiceImpl.java

@@ -30,6 +30,7 @@ public class RemoteSupplierTypeServiceImpl implements RemoteSupplierTypeService
         List<RemoteSupplierTypeVo> vos =new ArrayList<>();
         list.forEach(item -> {
             RemoteSupplierTypeVo vo = new RemoteSupplierTypeVo();
+            vo.setId(item.getId());
             vo.setTypeId(item.getSupplierTypeNo());
             vo.setTypeName(item.getSupplierTypeName());
             vos.add(vo);

+ 15 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/mapper/AddressAreaMapper.java

@@ -0,0 +1,15 @@
+package org.dromara.system.mapper;
+
+import org.dromara.system.domain.AddressArea;
+import org.dromara.system.domain.vo.AddressAreaVo;
+import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
+
+/**
+ * 地区列表Mapper接口
+ *
+ * @author LionLi
+ * @date 2026-01-21
+ */
+public interface AddressAreaMapper extends BaseMapperPlus<AddressArea, AddressAreaVo> {
+
+}

+ 72 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/IAddressAreaService.java

@@ -0,0 +1,72 @@
+package org.dromara.system.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.dromara.system.domain.AddressArea;
+import org.dromara.system.domain.vo.AddressAreaVo;
+import org.dromara.system.domain.bo.AddressAreaBo;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.common.mybatis.core.page.PageQuery;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * 地区列表Service接口
+ *
+ * @author LionLi
+ * @date 2026-01-21
+ */
+public interface IAddressAreaService extends IService<AddressArea>{
+
+    /**
+     * 查询地区列表
+     *
+     * @param id 主键
+     * @return 地区列表
+     */
+    AddressAreaVo queryById(Long id);
+
+    /**
+     * 分页查询地区列表列表
+     *
+     * @param bo        查询条件
+     * @param pageQuery 分页参数
+     * @return 地区列表分页列表
+     */
+    TableDataInfo<AddressAreaVo> queryPageList(AddressAreaBo bo, PageQuery pageQuery);
+
+    /**
+     * 查询符合条件的地区列表列表
+     *
+     * @param bo 查询条件
+     * @return 地区列表列表
+     */
+    List<AddressAreaVo> queryList(AddressAreaBo bo);
+
+    /**
+     * 新增地区列表
+     *
+     * @param bo 地区列表
+     * @return 是否新增成功
+     */
+    Boolean insertByBo(AddressAreaBo bo);
+
+    /**
+     * 修改地区列表
+     *
+     * @param bo 地区列表
+     * @return 是否修改成功
+     */
+    Boolean updateByBo(AddressAreaBo bo);
+
+    /**
+     * 校验并批量删除地区列表信息
+     *
+     * @param ids     待删除的主键集合
+     * @param isValid 是否进行有效性校验
+     * @return 是否删除成功
+     */
+    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
+
+    List<AddressAreaVo> getChniaList(AddressAreaBo bo);
+}

+ 209 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/AddressAreaServiceImpl.java

@@ -0,0 +1,209 @@
+package org.dromara.system.service.impl;
+
+import cn.hutool.core.collection.CollectionUtil;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.dromara.common.core.utils.MapstructUtils;
+import org.dromara.common.core.utils.StringUtils;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+import org.dromara.system.domain.bo.AddressAreaBo;
+import org.dromara.system.domain.vo.AddressAreaVo;
+import org.dromara.system.domain.AddressArea;
+import org.dromara.system.mapper.AddressAreaMapper;
+import org.dromara.system.service.IAddressAreaService;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Collection;
+import java.util.stream.Collectors;
+
+/**
+ * 地区列表Service业务层处理
+ *
+ * @author LionLi
+ * @date 2026-01-21
+ */
+@Slf4j
+@RequiredArgsConstructor
+@Service
+public class AddressAreaServiceImpl  extends ServiceImpl<AddressAreaMapper, AddressArea> implements IAddressAreaService {
+
+    private final AddressAreaMapper baseMapper;
+
+    /**
+     * 查询地区列表
+     *
+     * @param id 主键
+     * @return 地区列表
+     */
+    @Override
+    public AddressAreaVo queryById(Long id){
+        return baseMapper.selectVoById(id);
+    }
+
+    /**
+     * 分页查询地区列表列表
+     *
+     * @param bo        查询条件
+     * @param pageQuery 分页参数
+     * @return 地区列表分页列表
+     */
+    @Override
+    public TableDataInfo<AddressAreaVo> queryPageList(AddressAreaBo bo, PageQuery pageQuery) {
+        LambdaQueryWrapper<AddressArea> lqw = buildQueryWrapper(bo);
+        Page<AddressAreaVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
+        return TableDataInfo.build(result);
+    }
+
+    /**
+     * 查询符合条件的地区列表列表
+     *
+     * @param bo 查询条件
+     * @return 地区列表列表
+     */
+    @Override
+    public List<AddressAreaVo> queryList(AddressAreaBo bo) {
+        LambdaQueryWrapper<AddressArea> lqw = buildQueryWrapper(bo);
+        return baseMapper.selectVoList(lqw);
+    }
+
+    private LambdaQueryWrapper<AddressArea> buildQueryWrapper(AddressAreaBo bo) {
+        Map<String, Object> params = bo.getParams();
+        LambdaQueryWrapper<AddressArea> lqw = Wrappers.lambdaQuery();
+        lqw.orderByAsc(AddressArea::getId);
+        return lqw;
+    }
+
+    /**
+     * 新增地区列表
+     *
+     * @param bo 地区列表
+     * @return 是否新增成功
+     */
+    @Override
+    public Boolean insertByBo(AddressAreaBo bo) {
+        AddressArea add = MapstructUtils.convert(bo, AddressArea.class);
+        validEntityBeforeSave(add);
+        boolean flag = baseMapper.insert(add) > 0;
+        if (flag) {
+            bo.setId(add.getId());
+        }
+        return flag;
+    }
+
+    /**
+     * 修改地区列表
+     *
+     * @param bo 地区列表
+     * @return 是否修改成功
+     */
+    @Override
+    public Boolean updateByBo(AddressAreaBo bo) {
+        AddressArea update = MapstructUtils.convert(bo, AddressArea.class);
+        validEntityBeforeSave(update);
+        return baseMapper.updateById(update) > 0;
+    }
+
+    /**
+     * 保存前的数据校验
+     */
+    private void validEntityBeforeSave(AddressArea entity){
+        //TODO 做一些数据校验,如唯一约束
+    }
+
+    /**
+     * 校验并批量删除地区列表信息
+     *
+     * @param ids     待删除的主键集合
+     * @param isValid 是否进行有效性校验
+     * @return 是否删除成功
+     */
+    @Override
+    public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
+        if(isValid){
+            //TODO 做一些业务上的校验,判断是否需要校验
+        }
+        return baseMapper.deleteByIds(ids) > 0;
+    }
+
+    @Override
+    public List<AddressAreaVo> getChniaList(AddressAreaBo bo) {
+        // 1. 第一步:查询"中国"(level=0)的地区编码(核心父节点)
+        LambdaQueryWrapper<AddressArea> chinaWrapper = new LambdaQueryWrapper<AddressArea>()
+            .eq(AddressArea::getLevel, 0)  // level=0 代表国家级别
+            .eq(AddressArea::getAreaName, "中国");  // 匹配中国名称(根据数据库实际值调整)
+        AddressArea chinaArea = baseMapper.selectOne(chinaWrapper);
+        if (chinaArea == null) {
+            return List.of();
+        }
+        // 2. 第二步:查询中国下的所有省(level=1,parentCode=中国编码)
+        LambdaQueryWrapper<AddressArea> provinceWrapper = new LambdaQueryWrapper<AddressArea>()
+            .eq(AddressArea::getParentCode, chinaArea.getId())  // 父编码=中国编码
+            .eq(AddressArea::getLevel, 1)  // 只查省(level=1)
+            .orderByAsc(AddressArea::getAreaCode); // 按编码排序
+        List<AddressAreaVo> provinceList = baseMapper.selectVoList(provinceWrapper);
+        if (CollectionUtil.isEmpty(provinceList)) {
+            return List.of(); // 无省份数据,返回空
+        }
+        List<Long> provinceCodeList = provinceList.stream()
+            .map(AddressAreaVo::getId)
+            .collect(Collectors.toList());
+
+        // 4. 第四步:查询所有市(level=2,parentCode属于省的areaCode列表)
+        LambdaQueryWrapper<AddressArea> cityWrapper = new LambdaQueryWrapper<AddressArea>()
+            .in(AddressArea::getParentCode, provinceCodeList)  // 父编码=任意省的编码
+            .eq(AddressArea::getLevel, 2)  // 只查市(level=2)
+            .orderByAsc(AddressArea::getAreaCode);
+        List<AddressAreaVo> cityList = baseMapper.selectVoList(cityWrapper);
+
+        // 5. 第五步:将省和市转换为Vo,并构建树形结构
+        // 5.2 市Entity转Vo,并按父编码(省编码)分组
+        Map<Long, List<AddressAreaVo>> cityVoMap = cityList.stream()
+            .collect(Collectors.groupingBy(AddressAreaVo::getParentCode));
+
+        // 5.3 为每个省挂载对应的市
+        provinceList.forEach(provinceVo -> {
+            // 根据省的areaCode找对应的市列表
+            List<AddressAreaVo> childCities = cityVoMap.get(provinceVo.getId());
+            provinceVo.setChildren(childCities); // 市作为省的子节点
+        });
+
+
+
+        return provinceList;
+    }
+
+
+    /**
+     * 私有方法:构建省-市树形结构
+     */
+    private void buildAreaTree(List<AddressAreaVo> areaVoList) {
+        if (CollectionUtil.isEmpty(areaVoList)) {
+            return;
+        }
+
+        // 1. 拆分省(level=1)和市(level=2)
+        List<AddressAreaVo> provinceList = areaVoList.stream()
+            .filter(vo -> 1 == vo.getLevel())
+            .collect(Collectors.toList());
+        List<AddressAreaVo> cityList = areaVoList.stream()
+            .filter(vo -> 2 == vo.getLevel())
+            .collect(Collectors.toList());
+
+        // 2. 按市的父编码(省编码)分组
+        Map<String, List<AddressAreaVo>> cityGroupByProvinceCode = cityList.stream()
+            .collect(Collectors.groupingBy(vo -> vo.getParentCode().toString())); // 注意类型转换
+
+        // 3. 为每个省挂载对应的市
+        provinceList.forEach(province -> {
+            List<AddressAreaVo> childrenCities = cityGroupByProvinceCode.get(province.getId());
+            province.setChildren(childrenCities); // 市列表作为省的children
+        });
+    }
+}

+ 7 - 0
ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/AddressAreaMapper.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.dromara.system.mapper.AddressAreaMapper">
+
+</mapper>

+ 1 - 1
ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties

@@ -40,7 +40,7 @@ spring.sql.init.platform=mysql
 db.num=1
 
 ### Connect URL of DB:
-db.url.0=jdbc:mysql://192.168.1.123:3306/yoe_config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
+db.url.0=jdbc:mysql://yp1.yingpaipay.com:9031/yoe_config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
 db.user.0=youyida
 db.password.0=aapYBDthby
 

Some files were not shown because too many files changed in this diff