Explorar el Código

供应商相关

Lijingyang hace 1 mes
padre
commit
4d20650cd6
Se han modificado 23 ficheros con 180 adiciones y 57 borrados
  1. 2 0
      ruoyi-api/ruoyi-api-product/src/main/java/org/dromara/product/api/domain/zhongche/dto/ProductAggregateDto.java
  2. 6 1
      ruoyi-common/ruoyi-common-mybatis/src/main/java/org/dromara/common/mybatis/interceptor/PlatformDataScopeInterceptor.java
  3. 10 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/SupplierAuthorizeController.java
  4. 6 6
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/SupplierContactController.java
  5. 11 7
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/SupplierInfoController.java
  6. 0 1
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/SupplyAreaController.java
  7. 2 4
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/SupplyArea.java
  8. 1 4
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/bo/SupplyAreaBo.java
  9. 2 2
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/vo/SupplyAreaJsonVo.java
  10. 1 1
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/vo/SupplyAreaVo.java
  11. 3 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/ISupplierAuthorizeService.java
  12. 2 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/ISupplierInfoService.java
  13. 78 1
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/SupplierAuthorizeServiceImpl.java
  14. 7 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/SupplierInfoServiceImpl.java
  15. 9 7
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/SupplyAreaServiceImpl.java
  16. 4 0
      ruoyi-modules/ruoyi-external/src/main/java/org/dromara/external/controller/zhongche/ZhongChePushController.java
  17. 4 1
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/domain/ProductBrand.java
  18. 2 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/domain/bo/ProductBrandBo.java
  19. 4 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/domain/vo/ProductBrandVo.java
  20. 8 5
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/dubbo/RemoteProductServiceImpl.java
  21. 16 3
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/service/impl/ProductBrandServiceImpl.java
  22. 1 13
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/AddressAreaServiceImpl.java
  23. 1 1
      ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties

+ 2 - 0
ruoyi-api/ruoyi-api-product/src/main/java/org/dromara/product/api/domain/zhongche/dto/ProductAggregateDto.java

@@ -47,4 +47,6 @@ public class ProductAggregateDto implements Serializable {
     private String categoryId;
 
     private String categoryName;
+
+    private String invoiceName;
 }

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

@@ -14,7 +14,9 @@ import org.apache.ibatis.mapping.SqlCommandType;
 import org.apache.ibatis.plugin.*;
 import org.dromara.common.core.context.PlatformContext;
 import org.dromara.common.core.enums.SysPlatformCode;
+import org.dromara.common.core.utils.SpringUtils;
 import org.dromara.common.core.utils.StringUtils;
+import org.springframework.core.env.Environment;
 
 import java.lang.reflect.Field;
 import java.sql.Connection;
@@ -36,6 +38,8 @@ import java.util.Set;
 })
 public class PlatformDataScopeInterceptor implements Interceptor {
 
+    private static final Environment environment = SpringUtils.getBean(Environment.class);
+
     // ✅ 直接写死忽略表(不参与 platform_code 隔离)
     private static final Set<String> IGNORE_TABLES = new HashSet<>(Arrays.asList(
         "sys_sms_log",
@@ -97,7 +101,8 @@ public class PlatformDataScopeInterceptor implements Interceptor {
         "supply_area",
         "authorize_type_level",
         "order_return",
-        "order_return_item"
+        "order_return_item",
+        "qualification_file"
 
 
         // 注意:前缀匹配需特殊处理(如 qrtz_),见 isIgnoreTable 方法

+ 10 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/SupplierAuthorizeController.java

@@ -85,6 +85,11 @@ public class SupplierAuthorizeController extends BaseController {
         return supplierAuthorizeService.srmgetAuthorizeDetailList(bo,pageQuery);
     }
 
+    @GetMapping("/getscmDetailList")
+    public TableDataInfo<SupplierAuthorizeVo> scmgetAuthorizeDetailList(SupplierAuthorizeBo bo, PageQuery pageQuery){
+        return supplierAuthorizeService.scmgetAuthorizeDetailList(bo,pageQuery);
+    }
+
 
 
     @GetMapping("/getBrandAuthorizeDetail")
@@ -92,6 +97,11 @@ public class SupplierAuthorizeController extends BaseController {
         return R.ok(supplierAuthorizeService.getBrandAuthorizeDetail(id));
     }
 
+    @PutMapping("/exam")
+    public R<Void> exam(@RequestBody SupplierAuthorizeBo bo) {
+        return toAjax(supplierAuthorizeService.exam(bo));
+    }
+
 
 
     /**

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

@@ -40,7 +40,7 @@ public class SupplierContactController extends BaseController {
     /**
      * 获取业务联系人信息
      */
-    @SaCheckPermission("supplier:contact:list")
+    //@SaCheckPermission("supplier:contact:list")
     @GetMapping("/list")
     public TableDataInfo<SupplierContactVo> list(SupplierContactBo bo, PageQuery pageQuery) {
         return supplierContactService.queryPageList(bo, pageQuery);
@@ -61,7 +61,7 @@ public class SupplierContactController extends BaseController {
     /**
      * 导出联系人列表
      */
-    @SaCheckPermission("supplier:contact:export")
+    //@SaCheckPermission("supplier:contact:export")
     @Log(title = "联系人", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
     public void export(SupplierContactBo bo, HttpServletResponse response) {
@@ -74,7 +74,7 @@ public class SupplierContactController extends BaseController {
      *
      * @param id 主键
      */
-    @SaCheckPermission("supplier:contact:query")
+    //@SaCheckPermission("supplier:contact:query")
     @GetMapping("/{id}")
     public R<SupplierContactVo> getInfo(@NotNull(message = "主键不能为空")
                                      @PathVariable("id") Long id) {
@@ -84,7 +84,7 @@ public class SupplierContactController extends BaseController {
     /**
      * 新增联系人
      */
-    @SaCheckPermission("supplier:contact:add")
+    //@SaCheckPermission("supplier:contact:add")
     @Log(title = "联系人", businessType = BusinessType.INSERT)
     @RepeatSubmit()
     @PostMapping()
@@ -95,7 +95,7 @@ public class SupplierContactController extends BaseController {
     /**
      * 修改联系人
      */
-    @SaCheckPermission("supplier:contact:edit")
+    //@SaCheckPermission("supplier:contact:edit")
     @Log(title = "联系人", businessType = BusinessType.UPDATE)
     @RepeatSubmit()
     @PutMapping()
@@ -108,7 +108,7 @@ public class SupplierContactController extends BaseController {
      *
      * @param ids 主键串
      */
-    @SaCheckPermission("supplier:contact:remove")
+    //@SaCheckPermission("supplier:contact:remove")
     @Log(title = "联系人", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     public R<Void> remove(@NotEmpty(message = "主键不能为空")

+ 11 - 7
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/SupplierInfoController.java

@@ -120,13 +120,6 @@ public class SupplierInfoController extends BaseController {
         return R.ok(collect);
     }
 
-
-
-
-
-
-
-
     /**
      * 导出供应商信息列表
      */
@@ -189,6 +182,17 @@ public class SupplierInfoController extends BaseController {
         return toAjax(supplierInfoService.updateByBo(bo));
     }
 
+    //SCM修改信息不用审核
+    @Log(title = "供应商信息", businessType = BusinessType.UPDATE)
+    @RepeatSubmit()
+    @PutMapping("/scm")
+    @Transactional(rollbackFor = Exception.class)
+    public R<Void> scmEdit(@Validated(EditGroup.class) @RequestBody SupplierInfoBo bo) throws JsonProcessingException {
+        return toAjax(supplierInfoService.scmUpdateByBo(bo));
+    }
+
+
+
     /**
      * 删除供应商信息
      *

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

@@ -88,7 +88,6 @@ public class SupplyAreaController extends BaseController {
     @Log(title = "供应区域", businessType = BusinessType.INSERT)
     @RepeatSubmit()
     @PostMapping()
-    @Transactional
     public R<Void> add(@Validated(AddGroup.class) @RequestBody SupplyAreaBo bo) {
         return toAjax(supplyAreaService.insertByBo(bo));
     }

+ 2 - 4
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/SupplyArea.java

@@ -49,10 +49,8 @@ public class SupplyArea extends TenantEntity {
      */
     private String areaName;
 
-    /**
-     * 上级区域编码(如省级编码对应市级的上级编码,顶级区域为0)
-     */
-    private String parentCode;
+
+    private Long parentId;
 
     /**
      * 区域层级(1省/直辖市 2市 3区县 4街道/镇)

+ 1 - 4
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/bo/SupplyAreaBo.java

@@ -47,10 +47,7 @@ public class SupplyAreaBo extends BaseEntity {
      */
     private String areaName;
 
-    /**
-     * 上级区域编码(如省级编码对应市级的上级编码,顶级区域为0)
-     */
-    private String parentCode;
+    private Long parentId;
 
     /**
      * 区域层级(1省/直辖市 2市 3区县 4街道/镇)

+ 2 - 2
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/vo/SupplyAreaJsonVo.java

@@ -14,11 +14,11 @@ public class SupplyAreaJsonVo {
     // 供应商ID
     private Long supplierId;
     // 区域编码
-    private String areaCode;
+    private String areaId;
     // 区域名称
     private String areaName;
     // 父级编码
-    private String parentCode;
+    private Long parentId;
     // 区域级别
     private String level;
     // 必须保留的null字段

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

@@ -65,7 +65,7 @@ public class SupplyAreaVo implements Serializable {
      */
     @ExcelProperty(value = "上级区域编码", converter = ExcelDictConvert.class)
     @ExcelDictFormat(readConverterExp = "如=省级编码对应市级的上级编码,顶级区域为0")
-    private String parentCode;
+    private Long parentId;
 
     /**
      * 区域层级(1省/直辖市 2市 3区县 4街道/镇)

+ 3 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/ISupplierAuthorizeService.java

@@ -75,6 +75,9 @@ public interface ISupplierAuthorizeService extends IService<SupplierAuthorize>{
 
     TableDataInfo<SupplierAuthorizeVo> getSupplyCapacityList(SupplierAuthorizeBo bo, PageQuery pageQuery);
 
+    TableDataInfo<SupplierAuthorizeVo> scmgetAuthorizeDetailList(SupplierAuthorizeBo bo, PageQuery pageQuery);
 
     SupplierAuthorizeVo getBrandAuthorizeDetail(Long id);
+
+    boolean exam(SupplierAuthorizeBo bo);
 }

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

@@ -114,4 +114,6 @@ public interface ISupplierInfoService extends IService<SupplierInfo>{
     Boolean register(CustomerRegisterBo bo);
 
     List<SupplierInfoVo> getNameList();
+
+    int scmUpdateByBo(SupplierInfoBo bo);
 }

+ 78 - 1
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/SupplierAuthorizeServiceImpl.java

@@ -113,6 +113,7 @@ public class SupplierAuthorizeServiceImpl  extends ServiceImpl<SupplierAuthorize
             BeanUtils.copyProperties(bo, save);
             save.setAuthorizeNo(authorizeNo);
             save.setBrandRegistrant(bo.getBrandRegistrant());
+            save.setBrandNo(bo.getBrandNo());
             save.setCategoryId(categoryId);
             save.setAuthorizationEndTime(endDate);
             save.setAuthorizedStatus("0");
@@ -146,6 +147,7 @@ public class SupplierAuthorizeServiceImpl  extends ServiceImpl<SupplierAuthorize
      * @return 是否修改成功
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public Boolean updateByBo(SupplierAuthorizeBo bo) {
         Date endDate = bo.getQualificationFiles().stream()
             .filter(file -> file.getEndTime() != null)
@@ -360,7 +362,7 @@ public class SupplierAuthorizeServiceImpl  extends ServiceImpl<SupplierAuthorize
     public SupplierAuthorizeVo getBrandAuthorizeDetail(Long id) {
         SupplierAuthorizeVo supplierAuthorizeVo = baseMapper.selectVoById(id);
         if (supplierAuthorizeVo == null){
-            throw new RuntimeException("未找到授权信息");
+            throw new ServiceException("未找到授权信息");
         }
 
         setSupplyAreaInfoForSingle(supplierAuthorizeVo);
@@ -387,6 +389,31 @@ public class SupplierAuthorizeServiceImpl  extends ServiceImpl<SupplierAuthorize
         return supplierAuthorizeVo;
     }
 
+    @Override
+    public boolean exam(SupplierAuthorizeBo bo) {
+        // 1. 参数校验
+        if (bo.getId() == null) {
+            throw new ServiceException("授权单 ID 不能为空");
+        }
+        if (StringUtils.isBlank(bo.getAuthorizedStatus())) {
+            throw new ServiceException("审核状态不能为空");
+        }
+
+        // 2. 检查授权单是否存在
+        SupplierAuthorize exist = baseMapper.selectById(bo.getId());
+        if (exist == null) {
+            throw new ServiceException("授权单不存在");
+        }
+
+        // 3. 执行更新
+        boolean update = lambdaUpdate()
+            .eq(SupplierAuthorize::getId, bo.getId())
+            .set(SupplierAuthorize::getAuthorizedStatus, bo.getAuthorizedStatus())
+            .set(SupplierAuthorize::getReviewFeedback, bo.getReviewFeedback())
+            .update();
+        return update;
+    }
+
 
     private Map<Long, String> supplierBrandMap(List<Long> ids){
         List<SupplierAuthorize> authorizeList = baseMapper.selectList(
@@ -617,6 +644,56 @@ public class SupplierAuthorizeServiceImpl  extends ServiceImpl<SupplierAuthorize
         return TableDataInfo.build(result);
     }
 
+    @Override
+    public  TableDataInfo<SupplierAuthorizeVo> scmgetAuthorizeDetailList(SupplierAuthorizeBo bo, PageQuery pageQuery) {
+        LambdaQueryWrapper<SupplierAuthorize> lqw = new LambdaQueryWrapper<>();
+        // 核心:省/市查询条件(合并字段用AND匹配)
+        if (ObjectUtil.isNotEmpty(bo.getProvince()) || ObjectUtil.isNotEmpty(bo.getCity())) {
+            lqw.and(wrapper -> {
+                // 1. 省份查询
+                if (ObjectUtil.isNotEmpty(bo.getProvince())) {
+                    wrapper.apply("FIND_IN_SET({0}, authorized_area)", bo.getProvince());
+                }
+                // 2. 城市查询(和省份用AND关联,必须同时满足)
+                if (ObjectUtil.isNotEmpty(bo.getCity())) {
+                    wrapper.apply("FIND_IN_SET({0}, authorized_area)", bo.getCity());
+                }
+
+            });
+        }
+        //3.品牌名称
+        if (ObjectUtil.isNotEmpty(bo.getBrandName())) {
+            lqw.eq(SupplierAuthorize::getBrandName,bo.getBrandName());
+        }
+        if (ObjectUtil.isNotEmpty(bo.getBrandNo())){
+            lqw.eq(SupplierAuthorize::getBrandNo,bo.getBrandNo());
+        }
+        lqw.orderByDesc(SupplierAuthorize::getCreateTime);
+        Page<SupplierAuthorizeVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
+        List<SupplierAuthorizeVo> records = result.getRecords();
+        setSupplierNames(records);
+
+        // 使用AddressAreaService查询地区信息
+        setSupplyAreaInfo(records);
+
+        //一级 二级 三级 品目
+        Map<Long,Long> categoryMap = records.stream()
+            .filter(item -> item.getId() != null && item.getCategoryId() != null)
+            .collect(Collectors.toMap(
+                SupplierAuthorizeVo::getId,
+                item ->item.getCategoryId()
+            ));
+
+        Map<Long, Map<String, String>> categorysMap = remoteCategoryService.getallCategoryNameById(categoryMap);
+
+        records.forEach(item -> {
+            Map<String, String> stringStringMap = categorysMap.get(item.getId());
+            item.setCategorysMap(stringStringMap);
+        });
+
+        return TableDataInfo.build(result);
+    }
+
     /**
      * 使用AddressAreaService设置单个供应区域信息(省和市)- 优化版本
      *

+ 7 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/SupplierInfoServiceImpl.java

@@ -3,6 +3,7 @@ package org.dromara.customer.service.impl;
 import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.crypto.digest.BCrypt;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@@ -2044,4 +2045,10 @@ public class SupplierInfoServiceImpl  extends ServiceImpl<SupplierInfoMapper, Su
         List<SupplierInfoVo> supplierInfoVos = baseMapper.selectVoList(new LambdaQueryWrapper<SupplierInfo>().select(SupplierInfo::getId, SupplierInfo::getEnterpriseName,SupplierInfo::getSupplierNo));
         return supplierInfoVos;
     }
+
+    @Override
+    public int scmUpdateByBo(SupplierInfoBo bo) {
+        SupplierInfo update = MapstructUtils.convert(bo, SupplierInfo.class);
+        return baseMapper.updateById(update);
+    }
 }

+ 9 - 7
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/SupplyAreaServiceImpl.java

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;
+import org.dromara.common.core.exception.ServiceException;
 import org.dromara.common.core.utils.MapstructUtils;
 import org.dromara.common.core.utils.StringUtils;
 import org.dromara.common.mybatis.core.page.TableDataInfo;
@@ -29,6 +30,7 @@ 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.transaction.annotation.Transactional;
 import org.springframework.util.CollectionUtils;
 
 import java.util.*;
@@ -91,7 +93,8 @@ public class SupplyAreaServiceImpl  extends ServiceImpl<SupplyAreaMapper, Supply
         // 3.3 遍历市级数据,挂载到对应的省级父节点中
         for (SupplyAreaVo cityVo : cityList) {
             // 市级的parentCode(上级编码)对应省级的areaCode
-            String parentAreaCode = cityVo.getParentCode(); // 注意类型转换(根据你的实际字段调整)
+            //TODO
+            Long parentAreaCode = cityVo.getParentId(); // 注意类型转换(根据你的实际字段调整)
 
             // 找到对应的省级父节点
             SupplyAreaVo parentProvince = provinceMap.get(parentAreaCode);
@@ -263,7 +266,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(bo.getParentCode()!=null, SupplyArea::getParentCode, bo.getParentCode());
+        lqw.eq(bo.getParentId()!=null, SupplyArea::getParentId, bo.getParentId());
         lqw.eq(StringUtils.isNotBlank(bo.getLevel()), SupplyArea::getLevel, bo.getLevel());
         return lqw;
     }
@@ -275,6 +278,7 @@ public class SupplyAreaServiceImpl  extends ServiceImpl<SupplyAreaMapper, Supply
      * @return 是否新增成功
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public Boolean insertByBo(SupplyAreaBo bo) {
         // 1. 校验核心参数(避免空指针)
         if (bo == null || bo.getSupplierId() == null) {
@@ -330,7 +334,7 @@ public class SupplyAreaServiceImpl  extends ServiceImpl<SupplyAreaMapper, Supply
             try {
                 areaListJson = objectMapper.writeValueAsString(tableDataInfo);
             } catch (JsonProcessingException e) {
-                throw new RuntimeException("供应商区域数据 JSON 序列化失败,请检查数据格式", e);
+                throw new ServiceException("供应商区域数据 JSON 序列化失败,请检查数据格式"+e);
             }
             // 步骤6:处理临时表(SupplierInfoTemporary)- 查询→新建/更新
             // 6.1 查询该供应商对应的临时表记录(一对一关联,以 supplierId 作为临时表 ID)
@@ -356,8 +360,6 @@ public class SupplyAreaServiceImpl  extends ServiceImpl<SupplyAreaMapper, Supply
             }
 
             // 6.3 无论新建/更新,均设置 areaListJson 字段(核心操作)
-
-
             int update = supplierInfoMapper.update(new LambdaUpdateWrapper<SupplierInfo>()
                 .set(SupplierInfo::getSupplyStatus, SupplierStatusEnum.REVIEW_UPDATED.getCode())
                 .eq(SupplierInfo::getId, supplierId));
@@ -370,7 +372,7 @@ public class SupplyAreaServiceImpl  extends ServiceImpl<SupplyAreaMapper, Supply
                 operateResult = supplierInfoTemporaryService.saveOrUpdate(tempSupplier);
                 return operateResult;
             } catch (Exception e) {
-                throw new RuntimeException("供应商临时表数据操作失败,请联系管理员", e);
+                throw new ServiceException("供应商临时表数据操作失败,请联系管理员"+e);
             }
         }else {
             // 2.1 转换BO为正式库实体SupplyArea
@@ -397,7 +399,7 @@ public class SupplyAreaServiceImpl  extends ServiceImpl<SupplyAreaMapper, Supply
                 boolean b = baseMapper.insertBatch(supplyAreaOfficialList);
                 return b;
             } catch (Exception e) {
-                throw new RuntimeException("供应商区域正式表数据插入失败,请联系管理员", e);
+                throw new ServiceException("供应商区域正式表数据插入失败,请联系管理员"+e);
             }
         }
     }

+ 4 - 0
ruoyi-modules/ruoyi-external/src/main/java/org/dromara/external/controller/zhongche/ZhongChePushController.java

@@ -123,6 +123,10 @@ public class ZhongChePushController {
             .stream()
             .map(this::convertToCatalogVo)
             .collect(Collectors.toList());
+        StandardCatalog standardCatalog = new StandardCatalog();
+        standardCatalog.setStandardCatalogId("1374013891398471680");
+        standardCatalog.setStandardCatalogName("福利套餐");
+        catalogVoList.forEach(catalog -> catalog.setStandardCatalog(standardCatalog));
         // 5. 构造响应业务参数并Base64编码(放入ZCR的data字段)
         CatalogsVo catalogVo = new CatalogsVo();
         catalogVo.setCatalogs(catalogVoList);

+ 4 - 1
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/domain/ProductBrand.java

@@ -28,7 +28,7 @@ public class ProductBrand extends TenantEntity {
     /**
      * 主键
      */
-    @TableId(value = "id")
+    @TableId(value = "id",type = IdType.ASSIGN_ID)
     private Long id;
 
     /**
@@ -132,5 +132,8 @@ public class ProductBrand extends TenantEntity {
      */
     private String remark;
 
+    private String brandStatus;
+
+
 
 }

+ 2 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/domain/bo/ProductBrandBo.java

@@ -155,4 +155,6 @@ public class ProductBrandBo extends BaseEntity {
     * */
     private String categoryName;
 
+    private String brandStatus;
+
 }

+ 4 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/domain/vo/ProductBrandVo.java

@@ -169,5 +169,9 @@ public class ProductBrandVo implements Serializable {
     @ExcelProperty(value = "备注")
     private String remark;
 
+    private String brandStatus;
+
+    private Date createTime;
+
 
 }

+ 8 - 5
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/dubbo/RemoteProductServiceImpl.java

@@ -426,6 +426,12 @@ public class RemoteProductServiceImpl implements RemoteProductService {
                 ProductExtend::getProductDescription,
                 (a, b) -> a
             ));
+        Map<Long, String> invoiceNameMap = extendList.stream()
+            .collect(Collectors.toMap(
+                ProductExtend::getProductId,
+                ProductExtend::getInvoiceName,
+                (a, b) -> a
+            ));
 
         //7.查询商品规格
         List<ProductClassification> productClassificationList = productClassificationService.list(
@@ -481,16 +487,13 @@ public class RemoteProductServiceImpl implements RemoteProductService {
                 vo.setBarImgUrls(JSONUtil.toJsonStr(imgList));
             }
             //作json处理
-            vo.setProperties(
-                Optional.ofNullable(productClassificationMap.get(p.getId()))
-                    .orElse("{\"1\":\"1kg\",\"2\":\"1cm\",\"3\":\"100\"}")
-            );
+            vo.setProperties(productClassificationMap.get(p.getId()));
 
             vo.setIsSelfOperated(p.getIsSelf());
 
             // 商品描述
             vo.setDescription(productDescMap.get(p.getId()));
-            vo.setTaxCode("1");
+            vo.setTaxCode(invoiceNameMap.get(p.getId()));
 
             // ===== 品牌名称规则处理 =====
             ProductBrand brand = finalBrandMap.get(p.getBrandId());

+ 16 - 3
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/service/impl/ProductBrandServiceImpl.java

@@ -26,6 +26,7 @@ import org.dromara.product.esmapper.ProductEsMapper;
 import org.dromara.product.mapper.*;
 import org.dromara.product.service.IProductRecommendLinkService;
 import org.springframework.boot.ApplicationArguments;
+import org.springframework.data.redis.core.StringRedisTemplate;
 import org.springframework.stereotype.Service;
 import org.dromara.product.domain.bo.ProductBrandBo;
 import org.dromara.product.service.IProductBrandService;
@@ -58,8 +59,15 @@ public class ProductBrandServiceImpl  extends ServiceImpl<ProductBrandMapper, Pr
 
     private final ProductEsMapper productEsMapper;
 
+    private final StringRedisTemplate redisTemplate;
 
     private final ProductIndustrialFloorLinkMapper productIndustrialFloorLinkMapper;
+
+    // Redis key前缀,用于存储品牌编号自增的计数器
+    private static final String BRAND_NO_COUNTER_KEY = "product:brand:no:counter";
+    // 品牌编号的位数(6位)
+    private static final int BRAND_NO_LENGTH = 5;
+
     @Override
     public void run(ApplicationArguments args) throws Exception {
         // 检查索引是否存在,不存在则创建
@@ -174,13 +182,18 @@ public class ProductBrandServiceImpl  extends ServiceImpl<ProductBrandMapper, Pr
     public Boolean insertByBo(ProductBrandBo bo) {
         ProductBrand add = MapstructUtils.convert(bo, ProductBrand.class);
         validEntityBeforeSave(add);
-        ProductBrandVo bean = BeanUtil.toBean(add, ProductBrandVo.class);
-        esMapper.insert(bean);
+        Long increment = redisTemplate.opsForValue().increment(BRAND_NO_COUNTER_KEY, 1);
+        // 4. 格式化自增值为6位数字(补前导0)
+        String brandNo = String.format("%0" + BRAND_NO_LENGTH + "d", increment);
+        // 5. 设置到实体中
+        add.setBrandNo(brandNo);
+        add.setBrandStatus("0");
         boolean flag = baseMapper.insert(add) > 0;
-
         if (flag) {
             bo.setId(add.getId());
         }
+        ProductBrandVo bean = BeanUtil.toBean(add, ProductBrandVo.class);
+        esMapper.insert(bean);
         return flag;
     }
 

+ 1 - 13
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/AddressAreaServiceImpl.java

@@ -182,18 +182,6 @@ public class AddressAreaServiceImpl  extends ServiceImpl<AddressAreaMapper, Addr
 
     @Override
     public List<AddressAreaVo> getChinaArea() {
-        // 1️⃣ 查询中国
-        AddressArea china = baseMapper.selectOne(
-            Wrappers.<AddressArea>lambdaQuery()
-                .eq(AddressArea::getLevel, 0)
-                .eq(AddressArea::getAreaName, "中国")
-                .eq(AddressArea::getStatus, "0")
-        );
-
-        if (china == null) {
-            return Collections.emptyList();
-        }
-
         // 2️⃣ 查询中国下面所有省市区
         List<AddressArea> allList = baseMapper.selectList(
             Wrappers.<AddressArea>lambdaQuery()
@@ -214,7 +202,7 @@ public class AddressAreaServiceImpl  extends ServiceImpl<AddressAreaMapper, Addr
         for (AddressAreaVo vo : voList) {
 
             // 省级:parentCode = 中国id
-            if (vo.getParentId().equals(china.getId())) {
+            if (vo.getLevel() == 1) {
                 provinceList.add(vo);
                 continue;
             }

+ 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