Sfoglia il codice sorgente

销售合同增加成交汇率

wanglang 2 giorni fa
parent
commit
2be2f8f715

+ 5 - 0
trade-service/src/main/java/com/trade/service/sales/domain/SalesContract.java

@@ -11,6 +11,7 @@ import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
 import org.springframework.format.annotation.DateTimeFormat;
 
+import java.math.BigDecimal;
 import java.time.LocalDate;
 
 /**
@@ -86,4 +87,8 @@ public class SalesContract extends BaseEntity<SalesContract> {
      * 审核状态1待审核2风控审核通过3法务审核通过4风控审核不通过5法务审核不通过
      */
     private String auditStatus;
+    /**
+     * 汇率
+     */
+    private BigDecimal exchangeRate;
 }

+ 5 - 0
trade-service/src/main/java/com/trade/service/sales/dto/SalesContractDto.java

@@ -97,4 +97,9 @@ public class SalesContractDto extends CommonEntity<SalesContractDto> {
     private String updateBy;
     @ApiModelProperty(name = "exportType", value = "出口类型")
     private String exportType;
+    @ApiModelProperty(name = "exchangeRate", value = "成交汇率")
+    @NotBlank(message = "成交汇率不能为空", groups = {
+            ValidatorGroup.Submit.class
+    })
+    private BigDecimal exchangeRate;
 }

+ 3 - 0
trade-service/src/main/java/com/trade/service/sales/vo/SalesContractVo.java

@@ -1,5 +1,6 @@
 package com.trade.service.sales.vo;
 
+import com.trade.common.validate.ValidatorGroup;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import org.springframework.format.annotation.DateTimeFormat;
@@ -50,4 +51,6 @@ public class SalesContractVo {
     private Date gmtModified;
     @ApiModelProperty(name = "exportType", value = "出口类型")
     private String exportType;
+    @ApiModelProperty(name = "exchangeRate", value = "成交汇率")
+    private BigDecimal exchangeRate;
 }

+ 4 - 3
trade-service/src/main/resources/mapper/sales/SalesContractMapper.xml

@@ -41,11 +41,12 @@
         <id column="settlement_cycle" property="settlementCycle"/>
         <id column="gmt_create" property="gmtCreate"/>
         <id column="gmt_modified" property="gmtModified"/>
+        <id column="exchange_rate" property="exchangeRate"/>
     </resultMap>
 
     <sql id="Base_Column_List">
         id, customer_user_id, contract_no, contract_name, importer_cert_no, importer_enterprise_name, agency_cert_no, agency_enterprise_name, trade_terms, port_departure, port_destination, template_type, sign_date, submit_status, contract_status, audit_status, gmt_create, gmt_modified,
-        deleted, create_by, update_by
+        deleted, exchange_rate, create_by, update_by
     </sql>
 
 
@@ -53,9 +54,9 @@
             parameterType="com.trade.service.sales.dto.ContractSearchDto"
             resultMap="VoResultMap">
         select
-        t.id, t.customer_user_id, t.contract_no, t.contract_name, t.importer_enterprise_name
+        t.id, t.customer_user_id, t.contract_no, t.contract_name, t.importer_enterprise_name,
         t.agency_enterprise_name, t.port_destination, t.template_type, t.contract_status,
-        t.gmt_create, t.gmt_modified, c.payment_way, c.payment_currency, c.settlement_cycle
+        t.gmt_create, t.gmt_modified, t.exchange_rate, c.payment_way, c.payment_currency, c.settlement_cycle
         from sales_contract t join contract_terms c on t.contract_no = c.contract_no
         <where>
             t.deleted = 0