Browse Source

完善代码

yuansh 1 month ago
parent
commit
58c60925e3

+ 1 - 0
srm-module-code/src/main/java/org/jeecg/modules/purCode/controller/PurInquiryFormController.java

@@ -384,6 +384,7 @@ public class PurInquiryFormController {
                         a.setTaxPriceUsd(o.getTaxPriceUsd());
                         a.setTaxAmountUsd(o.getTaxAmountUsd());
                         a.setExchangeRateUsd(o.getExchangeRateUsd());
+                        a.setDiscount(o.getDiscount());
                         a.setNotes(o.getNotes());
                     }
 

+ 4 - 0
srm-module-code/src/main/java/org/jeecg/modules/purCode/entity/PurInquiryFormProduct.java

@@ -176,6 +176,10 @@ public class PurInquiryFormProduct implements Serializable {
     @TableField(exist = false)
     private java.math.BigDecimal exchangeRateUsd;
 
+    @ApiModelProperty(value = "折扣")
+    @TableField(exist = false)
+    private java.math.BigDecimal discount;
+
     @TableField(exist = false)
     private Integer rowNumber;
 

+ 8 - 0
srm-module-code/src/main/java/org/jeecg/modules/purCode/entity/PurPurchaseQuotationProduct.java

@@ -158,4 +158,12 @@ public class PurPurchaseQuotationProduct implements Serializable {
     @Excel(name = "交期天数", width = 15)
     @ApiModelProperty(value = "交期天数")
     private String deliveryDayChild;
+
+
+    @ApiModelProperty(value = "含税单价(原价)")
+    private java.math.BigDecimal taxPriceOriginal;
+    @ApiModelProperty(value = "含税金额(原价)")
+    private java.math.BigDecimal taxAmountOriginal;
+    @ApiModelProperty(value = "折扣")
+    private java.math.BigDecimal discount;
 }

+ 4 - 1
srm-module-code/src/main/java/org/jeecg/modules/purCode/mapper/xml/PurPurchaseQuotationProductMapper.xml

@@ -42,6 +42,7 @@
 					  , b.need_ship
 					  , b.ship_inspection
 					  , b.notes
+					  , b.discount
 					  , b.tax_amount
 					  , b.last_price
 					  , b.tax_price
@@ -69,7 +70,9 @@
 						a.currency,
 						a.source_code,
 						a.status,
-						sum(b.tax_amount) taxAmount
+						sum(b.tax_amount) taxAmount,
+						sum(b.tax_amount_original) taxAmountOriginal,
+				        100-ROUND((sum(b.tax_amount) / sum(IFNULL(b.tax_amount_original,0))) * 100, 2) AS discount
 				 from pur_purchase_quotation a
 						  left join pur_purchase_quotation_product b on a.id = b.head_id
 

+ 2 - 0
srm-module-code/src/main/java/org/jeecg/modules/purCode/vo/SupplierQuotationDetails.java

@@ -257,6 +257,8 @@ public class SupplierQuotationDetails {
     private String deliveryDayChild;
 
 
+    @ApiModelProperty(value = "折扣")
+    private java.math.BigDecimal discount;
 
     @ApiModelProperty(value = "美元单价")
     private java.math.BigDecimal taxPriceUsd;