Commit 70490f7f by jianan

客户表,fna表单表字段修改3

parent 3a47b15b
......@@ -4,10 +4,17 @@ import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
@SpringBootApplication(scanBasePackages = "com.yd")
@MapperScan("com.yd.**.dao")
@EnableFeignClients(basePackages = "com.yd")
@ComponentScan(basePackages = {
"com.yd.auth.core" // 包含认证模块的包路径
})
public class CsfApiApplication {
public static void main(String[] args) {
......
......@@ -138,7 +138,7 @@ public class CustomerAddRequest implements Serializable {
* 税务国家列表
*/
@Schema(description = "税务国家列表")
private List<TaxCountry> taxList;
private List<TaxCountry> apiTaxationDtoList;
/**
* 移动电话区号
......
......@@ -84,7 +84,7 @@ public class CustomerUpdateRequest implements Serializable {
* 税务国家列表
*/
@Schema(description = "税务国家列表")
private List<TaxCountry> taxList;
private List<TaxCountry> apiTaxationDtoList;
/**
* 吸烟情况(字典)
......
......@@ -11,5 +11,5 @@ public class TaxCountry {
private String taxCountry;
@Schema(description = "税务编号")
private String taxNumber;
private String taxId;
}
......@@ -112,13 +112,13 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer>
// 客户主表信息
Customer customer = new Customer();
BeanUtils.copyProperties(customerAddRequest, customer, "addressList");
List<AddressVO> addressList = customerAddRequest.getAddressList();
if (CollUtil.isNotEmpty(addressList)) {
customer.setAddressList(GSON.toJson(addressList));
// 地址列表
if (CollUtil.isNotEmpty(customerAddRequest.getAddressList())) {
customer.setAddressList(GSON.toJson(customerAddRequest.getAddressList()));
}
// 税务国家列表
if (CollUtil.isNotEmpty(customerAddRequest.getTaxList())) {
customer.setTaxList(GSON.toJson(customerAddRequest.getTaxList()));
if (CollUtil.isNotEmpty(customerAddRequest.getApiTaxationDtoList())) {
customer.setTaxList(GSON.toJson(customerAddRequest.getApiTaxationDtoList()));
}
// 校验客户主表信息
validCustomer(customer);
......@@ -163,8 +163,8 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer>
BeanUtils.copyProperties(customerUpdateRequest, oldCustomer, "customerBizId");
// 税务国家列表
if (CollUtil.isNotEmpty(customerUpdateRequest.getTaxList())) {
oldCustomer.setTaxList(GSON.toJson(customerUpdateRequest.getTaxList()));
if (CollUtil.isNotEmpty(customerUpdateRequest.getApiTaxationDtoList())) {
oldCustomer.setTaxList(GSON.toJson(customerUpdateRequest.getApiTaxationDtoList()));
}
// 地址列表
if (CollUtil.isNotEmpty(customerUpdateRequest.getAddressList())) {
......
package com.yd.csf.service.vo;
import com.google.gson.reflect.TypeToken;
import com.yd.csf.service.dto.TaxCountry;
import com.yd.csf.service.model.Customer;
import com.yd.csf.service.utils.GSONUtil;
import io.swagger.v3.oas.annotations.media.Schema;
......@@ -92,6 +93,12 @@ public class CustomerVO implements Serializable {
private String isOtherCountry;
/**
* 税务国家列表
*/
@Schema(description = "税务国家列表")
private List<TaxCountry> apiTaxationDtoList;
/**
* 吸烟情况(字典)
*/
@Schema(description = "吸烟情况(字典)")
......@@ -382,6 +389,11 @@ public class CustomerVO implements Serializable {
}.getType());
customerVO.setAddressList(addressList);
}
if (ObjectUtils.isNotEmpty(customer.getTaxList())) {
List<TaxCountry> taxList = GSONUtil.fromJson((String) customer.getTaxList(), new TypeToken<List<TaxCountry>>() {
}.getType());
customerVO.setApiTaxationDtoList(taxList);
}
return customerVO;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment