|
|
@@ -1,6 +1,8 @@
|
|
|
package org.dromara.customer.service.impl;
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
+import cn.hutool.json.JSONUtil;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import org.dromara.common.core.utils.MapstructUtils;
|
|
|
import org.dromara.common.core.utils.StringUtils;
|
|
|
@@ -11,8 +13,11 @@ 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.domain.SupplierBusinessInfo;
|
|
|
import org.dromara.customer.domain.SupplierInfo;
|
|
|
+import org.dromara.customer.domain.vo.SupplierBusinessInfoVo;
|
|
|
import org.dromara.customer.domain.vo.SupplierInfoVo;
|
|
|
+import org.dromara.customer.mapper.SupplierBusinessInfoMapper;
|
|
|
import org.dromara.customer.mapper.SupplierInfoMapper;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.dromara.customer.domain.bo.SupplierInfoTemporaryBo;
|
|
|
@@ -41,6 +46,8 @@ public class SupplierInfoTemporaryServiceImpl extends ServiceImpl<SupplierInfoT
|
|
|
|
|
|
private final SupplierInfoMapper supplierInfoMapper;
|
|
|
|
|
|
+ private final SupplierBusinessInfoMapper supplierBusinessInfoMapper;
|
|
|
+
|
|
|
/**
|
|
|
* 查询供应商临时信息
|
|
|
*
|
|
|
@@ -197,6 +204,17 @@ public class SupplierInfoTemporaryServiceImpl extends ServiceImpl<SupplierInfoT
|
|
|
supplierInfo.setSupplierNo(supplierNo);
|
|
|
supplierInfoMapper.insert(supplierInfo);
|
|
|
add.setSupplierId(supplierInfo.getId());
|
|
|
+
|
|
|
+ SupplierBusinessInfoVo supplierBusinessInfoVo = supplierBusinessInfoMapper.selectVoOne(new LambdaQueryWrapper<SupplierBusinessInfo>()
|
|
|
+ .eq(SupplierBusinessInfo::getSupplierId, bo.getId()))
|
|
|
+ ;
|
|
|
+ //保存工商信息
|
|
|
+ if (ObjectUtil.isEmpty(supplierBusinessInfoVo)) {
|
|
|
+ String otherCustomers = bo.getOtherCustomers();
|
|
|
+ SupplierBusinessInfo businessInfo = JSONUtil.toBean(otherCustomers, SupplierBusinessInfo.class);
|
|
|
+ businessInfo.setSupplierId(supplierInfo.getId());
|
|
|
+ supplierBusinessInfoMapper.insert(businessInfo);
|
|
|
+ }
|
|
|
}
|
|
|
add.setId(null);
|
|
|
add.setSupplierNo(supplierNo);
|