Browse Source

企业信息增加海关企业代码和纳税人识别号

liangbo.huang 6 days ago
parent
commit
217166dbdd

+ 9 - 1
trade-client/src/main/java/com/trade/client/enterprise/service/impl/EnterpriseServiceImpl.java

@@ -50,7 +50,6 @@ import java.util.stream.Collectors;
 public class EnterpriseServiceImpl implements EnterpriseService {
 
     private static final Logger log = LoggerUtil.logger(LoggerUtil.LogFileNameEnum.SERVICES_LOG);
-
     @Resource
     private CustomerMessageService customerMessageService;
     @Resource
@@ -224,6 +223,15 @@ public class EnterpriseServiceImpl implements EnterpriseService {
         if (!StrUtil.equals(record.getCertNo(), enterpriseDto.getCertNo())) {
             return true;
         }
+        if (!StrUtil.equals(record.getRegistrationNumber(), enterpriseDto.getRegistrationNumber())) {
+            return true;
+        }
+        if (!StrUtil.equals(record.getCustomsEnterpriseCode(), enterpriseDto.getCustomsEnterpriseCode())) {
+            return true;
+        }
+        if (!StrUtil.equals(record.getTaxNo(), enterpriseDto.getTaxNo())) {
+            return true;
+        }
         if (!Objects.equals(DateUtils.dateTime(record.getEstablishDate()),
                 DateUtils.dateTime(enterpriseDto.getEstablishDate()))) {
             return true;

+ 24 - 0
trade-service/src/main/java/com/trade/service/enterprise/domain/Enterprise.java

@@ -40,6 +40,14 @@ public class Enterprise extends BaseEntity<Enterprise> {
      * 注册号,HK企业必填
      */
     private String registrationNumber;
+    /**
+     * 海关企业代码
+     */
+    private String customsEnterpriseCode;
+    /**
+     * 纳税人识别号
+     */
+    private  String taxNo;
     /**
      * 成立时间
      */
@@ -148,6 +156,22 @@ public class Enterprise extends BaseEntity<Enterprise> {
         this.registrationNumber = registrationNumber;
     }
 
+    public String getCustomsEnterpriseCode() {
+        return customsEnterpriseCode;
+    }
+
+    public void setCustomsEnterpriseCode(String customsEnterpriseCode) {
+        this.customsEnterpriseCode = customsEnterpriseCode;
+    }
+
+    public String getTaxNo() {
+        return taxNo;
+    }
+
+    public void setTaxNo(String taxNo) {
+        this.taxNo = taxNo;
+    }
+
     public Date getEstablishDate() {
         return establishDate;
     }

+ 24 - 0
trade-service/src/main/java/com/trade/service/enterprise/domain/EnterpriseChangeRecord.java

@@ -40,6 +40,14 @@ public class EnterpriseChangeRecord extends BaseEntity<EnterpriseChangeRecord> {
      * 注册号,HK企业必填
      */
     private String registrationNumber;
+    /**
+     * 海关企业代码
+     */
+    private String customsEnterpriseCode;
+    /**
+     * 纳税人识别号
+     */
+    private  String taxNo;
     /**
      * 成立时间
      */
@@ -133,6 +141,22 @@ public class EnterpriseChangeRecord extends BaseEntity<EnterpriseChangeRecord> {
         this.certNo = certNo;
     }
 
+    public String getCustomsEnterpriseCode() {
+        return customsEnterpriseCode;
+    }
+
+    public void setCustomsEnterpriseCode(String customsEnterpriseCode) {
+        this.customsEnterpriseCode = customsEnterpriseCode;
+    }
+
+    public String getTaxNo() {
+        return taxNo;
+    }
+
+    public void setTaxNo(String taxNo) {
+        this.taxNo = taxNo;
+    }
+
     public String getRegistrationNumber() {
         return registrationNumber;
     }

+ 26 - 0
trade-service/src/main/java/com/trade/service/enterprise/dto/EnterpriseDto.java

@@ -51,6 +51,16 @@ public class EnterpriseDto extends BaseDTO {
      * 注册号,HK企业必填
      */
     private String registrationNumber;
+    /**
+     * 海关企业代码
+     */
+    @NotNull(message = "海关企业代码不能为空", groups = {ValidatorGroup.Submit.class})
+    private String customsEnterpriseCode;
+    /**
+     * 纳税人识别号
+     */
+    @NotNull(message = "纳税人识别号不能为空", groups = {ValidatorGroup.Submit.class})
+    private  String taxNo;
     /**
      * 成立时间 yyyy-MM-dd
      */
@@ -218,6 +228,22 @@ public class EnterpriseDto extends BaseDTO {
         this.registrationNumber = registrationNumber;
     }
 
+    public @NotNull(message = "海关企业代码不能为空", groups = {ValidatorGroup.Submit.class}) String getCustomsEnterpriseCode() {
+        return customsEnterpriseCode;
+    }
+
+    public void setCustomsEnterpriseCode(@NotNull(message = "海关企业代码不能为空", groups = {ValidatorGroup.Submit.class}) String customsEnterpriseCode) {
+        this.customsEnterpriseCode = customsEnterpriseCode;
+    }
+
+    public @NotNull(message = "纳税人识别号不能为空", groups = {ValidatorGroup.Submit.class}) String getTaxNo() {
+        return taxNo;
+    }
+
+    public void setTaxNo(@NotNull(message = "纳税人识别号不能为空", groups = {ValidatorGroup.Submit.class}) String taxNo) {
+        this.taxNo = taxNo;
+    }
+
     public Date getEstablishDate() {
         return establishDate;
     }

+ 12 - 0
trade-service/src/main/java/com/trade/service/tradingPlatform/domain/TradingPlatform.java

@@ -55,6 +55,10 @@ public class TradingPlatform extends BaseEntity<TradingPlatform> {
      * 联系电话
      */
     private String contactMobile;
+    /**
+     * 海关企业代码
+     */
+    private String customsEnterpriseCode;
     /**
      * 税号
      */
@@ -164,6 +168,14 @@ public class TradingPlatform extends BaseEntity<TradingPlatform> {
         this.contactMobile = contactMobile;
     }
 
+    public String getCustomsEnterpriseCode() {
+        return customsEnterpriseCode;
+    }
+
+    public void setCustomsEnterpriseCode(String customsEnterpriseCode) {
+        this.customsEnterpriseCode = customsEnterpriseCode;
+    }
+
     public String getTaxNum() {
         return taxNum;
     }

+ 13 - 0
trade-service/src/main/java/com/trade/service/tradingPlatform/dto/TradingPlatformDto.java

@@ -74,6 +74,11 @@ public class TradingPlatformDto extends BaseDTO {
      */
     @NotBlank(message = "联系电话不能为空", groups = {ValidatorGroup.Submit.class})
     private String contactMobile;
+    /**
+     * 海关企业代码
+     */
+    @NotBlank(message = "海关企业代码不能为空", groups = {ValidatorGroup.Submit.class})
+    private String customsEnterpriseCode;
     /**
      * 税号
      */
@@ -225,6 +230,14 @@ public class TradingPlatformDto extends BaseDTO {
         this.contactMobile = contactMobile;
     }
 
+    public String getCustomsEnterpriseCode() {
+        return customsEnterpriseCode;
+    }
+
+    public void setCustomsEnterpriseCode(String customsEnterpriseCode) {
+        this.customsEnterpriseCode = customsEnterpriseCode;
+    }
+
     public String getTaxNum() {
         return taxNum;
     }

+ 3 - 1
trade-service/src/main/resources/mapper/enterprise/EnterpriseChangeRecordMapper.xml

@@ -11,6 +11,8 @@
         <result property="name" column="name"/>
         <result property="certNo" column="cert_no"/>
         <result property="registrationNumber" column="registration_number"/>
+        <result property="customsEnterpriseCode" column="customs_enterprise_code"/>
+        <result property="taxNo" column="tax_no"/>
         <result property="establishDate" column="establish_date"/>
         <result property="registerCapital" column="register_capital"/>
         <result property="registerAddress" column="register_address"/>
@@ -32,7 +34,7 @@
 
     <sql id="Base_Column_List">
         `id`, `customer_id`,`enterprise_id`, `enterprise_type`, `country_code`, `name`, `cert_no`,
-        `registration_number`, `industry`, `establish_date`, `register_capital`,
+        `customs_enterprise_code`,`tax_no`, `registration_number`, `industry`, `establish_date`, `register_capital`,
         `register_address`, `business_address`, `proxy_district_code`,`certification_status`,
         `same_register_and_business_address`,`export_type`, `authorization_file`,  `business_product`, remark`,
         `deleted`, `create_by`,`update_by`, `gmt_create`, `gmt_modified`

+ 10 - 6
trade-service/src/main/resources/mapper/enterprise/EnterpriseMapper.xml

@@ -11,6 +11,8 @@
         <result property="name" column="name"/>
         <result property="certNo" column="cert_no"/>
         <result property="registrationNumber" column="registration_number"/>
+        <result property="customsEnterpriseCode" column="customs_enterprise_code"/>
+        <result property="taxNo" column="tax_no"/>
         <result property="establishDate" column="establish_date"/>
         <result property="registerCapital" column="register_capital"/>
         <result property="registerAddress" column="register_address"/>
@@ -31,7 +33,8 @@
     </resultMap>
 
     <sql id="Base_Column_List">
-        `id`, `customer_id`, `enterprise_type`, `country_code`, `name`, `cert_no`, `registration_number`,`customer_identifier_no`,
+        `id`, `customer_id`, `enterprise_type`, `country_code`, `name`, `cert_no`, `registration_number`,
+        `customs_enterprise_code`,`tax_no`, `customer_identifier_no`,
         `establish_date`, `register_capital`, `register_address`, `business_address`,`same_register_and_business_address`,
         `certification_status`, `export_type`, `business_product`, `proxy_district_code`, `authorization_file`,
         `change_record_id`, `remark`, `deleted`, `create_by`, `update_by`, `gmt_create`, `gmt_modified`
@@ -85,9 +88,10 @@
         </if>
         <if test="managerName != null and managerName != ''">
             AND (
-                assign.rc_user_name = CONCAT('%',#{managerName},'%') OR assign.bd_user_name = CONCAT('%',#{managerName},'%')
-                OR to_pinyin(assign.rc_user_name) LIKE CONCAT( '%',#{managerName},'%') OR to_pinyin(assign.bd_user_name) LIKE CONCAT( '%',#{managerName},'%')
-                )
+            assign.rc_user_name = CONCAT('%',#{managerName},'%') OR assign.bd_user_name = CONCAT('%',#{managerName},'%')
+            OR to_pinyin(assign.rc_user_name) LIKE CONCAT( '%',#{managerName},'%') OR to_pinyin(assign.bd_user_name)
+            LIKE CONCAT( '%',#{managerName},'%')
+            )
         </if>
         <if test="managerId != null">
             AND (assign.rc_user_id = #{managerId} OR assign.bd_user_id = #{managerId} )
@@ -103,8 +107,8 @@
 
     <select id="findByCustomerInfo" resultMap="enterpriseBaseInfoResultMap">
         SELECT e.id AS enterprise_id, e.customer_id, e.customer_identifier_no,
-               e.enterprise_type, e.name AS enterprise_name, e.cert_no,
-               e.establish_date, e.certification_status, e.business_product
+        e.enterprise_type, e.name AS enterprise_name, e.cert_no,
+        e.establish_date, e.certification_status, e.business_product
         FROM enterprise e
         <if test="customerInfo != null and customerInfo != ''">
             AND e.name LIKE CONCAT ('%',#{customerInfo},'%') OR e.customer_identifier_no = #{customerInfo}

+ 1 - 0
trade-service/src/main/resources/mapper/tradingPlatform/TradingPlatformMapper.xml

@@ -15,6 +15,7 @@
         <result property="contactName" column="contact_name"/>
         <result property="contactEmail" column="contact_email"/>
         <result property="contactMobile" column="contact_mobile"/>
+        <result property="customsEnterpriseCode" column="customs_enterprise_code"/>
         <result property="taxNum" column="tax_num"/>
         <result property="bankName" column="bank_name"/>
         <result property="bankNum" column="bank_num"/>