Quellcode durchsuchen

Merge branch 'smb'

liutao vor 2 Wochen
Ursprung
Commit
30c8bbc2a0

+ 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 - 2
src/main/java/com/inkasso/factoring/acceptanceManagement/service/ICAcceptanceBasicInfoService.java

@@ -96,8 +96,7 @@ public interface ICAcceptanceBasicInfoService extends IService<CAcceptanceBasicI
      * @param file
      * @return
      */
-    List<CAcceptanceGoodsExcelInfo> importGoodsInfo(MultipartFile file,
-        AcceptanceImportGoodsRequest acceptanceImportGoodsRequest);
+    List<CAcceptanceGoodsExcelInfo> importGoodsInfo(MultipartFile file, AcceptanceImportGoodsRequest acceptanceImportGoodsRequest);
 
 
     /**

+ 2 - 2
src/main/java/com/inkasso/factoring/acceptanceManagement/service/impl/CAcceptanceBasicInfoServiceImpl.java

@@ -602,10 +602,10 @@ public class CAcceptanceBasicInfoServiceImpl extends ServiceImpl<CAcceptanceBasi
                     throw new ValidatorException(CodeUtil.FAIL, "导入失败,销售单价或数量小数位数过长!");
                 }
                 if (goodsInfo.getReferencePrice() != null) {
-                    goodsInfo.setReferencePrice(goodsInfo.getReferencePrice().setScale(2, BigDecimal.ROUND_HALF_UP));
+                    goodsInfo.setReferencePrice(goodsInfo.getReferencePrice().setScale(4, BigDecimal.ROUND_HALF_UP));
                 }
                 if (goodsInfo.getFloatingPrice() != null) {
-                    goodsInfo.setFloatingPrice(goodsInfo.getFloatingPrice().setScale(2, BigDecimal.ROUND_HALF_UP));
+                    goodsInfo.setFloatingPrice(goodsInfo.getFloatingPrice().setScale(4, BigDecimal.ROUND_HALF_UP));
                 }
             }
             if(acceptanceImportGoodsRequest.getFlag()!=null && acceptanceImportGoodsRequest.getFlag() ==1){

+ 1 - 2
src/main/java/com/inkasso/factoring/acceptanceManagement/web/CAcceptanceController.java

@@ -89,8 +89,7 @@ public class CAcceptanceController {
      */
     @PostMapping("/doImportGoodsInfo")
     @ResponseBody
-    public ResponseJson doImportGoodsInfo(@RequestParam("file") MultipartFile file,
-        AcceptanceImportGoodsRequest acceptanceImportGoodsRequest) {
+    public ResponseJson doImportGoodsInfo(@RequestParam("file") MultipartFile file, AcceptanceImportGoodsRequest acceptanceImportGoodsRequest) {
         return new ResponseJson(acceptanceBasicInfoService.importGoodsInfo(file,acceptanceImportGoodsRequest));
     }
 

+ 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();