Browse Source

采购单价保留4位

liuj 2 weeks ago
parent
commit
a9a9d83e51

+ 58 - 60
src/main/java/com/inkasso/factoring/acceptanceManagement/entity/vo/CAcceptanceGoodsExcelInfo.java

@@ -1,6 +1,5 @@
 package com.inkasso.factoring.acceptanceManagement.entity.vo;
 
-import com.baomidou.mybatisplus.annotation.TableField;
 import com.inkasso.factoring.common.util.excel.ExcelCell;
 import lombok.Data;
 
@@ -10,63 +9,62 @@ import java.util.Date;
 @Data
 public class CAcceptanceGoodsExcelInfo {
 
-  /**
-   * 货物名称
-   */
-  @ExcelCell(index = 0)
-  private String goodsName;
-
-  /**
-   * 货物材质
-   */
-  @ExcelCell(index = 1)
-  private String goodsMaterial;
-
-  /**
-   * 型号
-   */
-  @ExcelCell(index = 2)
-  private String goodsType;
-
-  /**
-   * 厂家
-   */
-  @ExcelCell(index = 3)
-  private String goodsFactory;
-
-  /**
-   * 单位
-   */
-  @ExcelCell(index = 4)
-  private String goodsUnit;
-
-  /**
-   * 数量
-   */
-  @ExcelCell(index = 5)
-  private BigDecimal goodsQuantity;
-
-  /**
-   * 验收日期
-   */
-  @ExcelCell(index = 6)
-  private Date acceptanceDate;
-
-
-  /**
-   * 参考价格
-   */
-  @ExcelCell(index = 7)
-  private BigDecimal referencePrice;
-
-  /**
-   * 浮动单价
-   */
-  @ExcelCell(index = 8)
-  private BigDecimal floatingPrice;
-
-
-
-  @ExcelCell(index = 9)
-  private String  goodsId;
+    /**
+     * 货物名称
+     */
+    @ExcelCell(index = 0)
+    private String goodsName;
+
+    /**
+     * 货物材质
+     */
+    @ExcelCell(index = 1)
+    private String goodsMaterial;
+
+    /**
+     * 型号
+     */
+    @ExcelCell(index = 2)
+    private String goodsType;
+
+    /**
+     * 厂家
+     */
+    @ExcelCell(index = 3)
+    private String goodsFactory;
+
+    /**
+     * 单位
+     */
+    @ExcelCell(index = 4)
+    private String goodsUnit;
+
+    /**
+     * 数量
+     */
+    @ExcelCell(index = 5)
+    private BigDecimal goodsQuantity;
+
+    /**
+     * 验收日期
+     */
+    @ExcelCell(index = 6)
+    private Date acceptanceDate;
+
+
+    /**
+     * 参考价格
+     */
+    @ExcelCell(index = 7)
+    private BigDecimal referencePrice;
+
+    /**
+     * 浮动单价
+     */
+    @ExcelCell(index = 8)
+    private BigDecimal floatingPrice;
+
+
+    @ExcelCell(index = 9)
+    private String goodsId;
 }

+ 1 - 1
src/main/java/com/inkasso/factoring/settlement/service/Impl/SettlementManagementServiceImpl.java

@@ -411,7 +411,7 @@ public class SettlementManagementServiceImpl extends ServiceImpl<SettlementBasic
             goodsInfo.setSalesGuaranteeMoney(salesGuaranteeMoney.setScale(2, RoundingMode.HALF_UP));
 
             goodsInfo.setSalesTotalPrice(goodsInfo.getSalesTotalPrice().setScale(2, RoundingMode.HALF_UP));
-            goodsInfo.setPurchasePrice(goodsInfo.getPurchasePrice().setScale(2, RoundingMode.HALF_UP));
+            goodsInfo.setPurchasePrice(goodsInfo.getPurchasePrice().setScale(4, RoundingMode.HALF_UP));
             goodsInfo.setPurchaseTotalPrice(goodsInfo.getPurchaseTotalPrice().setScale(2, RoundingMode.HALF_UP));
 
             BigDecimal purchaseGuaranteeMoney = goodsInfo.getPurchaseGuaranteeMoney() == null ? BigDecimal.ZERO : goodsInfo.getPurchaseGuaranteeMoney();