5 Commits fd8f3f03d5 ... dca0cc35b3

Auteur SHA1 Message Date
  liutao dca0cc35b3 feat(销售合同):合同经办人变更bug il y a 1 semaine
  liutao 30c8bbc2a0 Merge branch 'smb' il y a 2 semaines
  liuj a9a9d83e51 采购单价保留4位 il y a 2 semaines
  liuj e50c15997f 验收单导入单价保理4位 il y a 2 semaines
  liutao d01286d4c2 feat(苏商银行):合同签署修改 il y a 1 mois

+ 1 - 1
build.gradle

@@ -5,7 +5,7 @@ plugins {
 }
 
 group = 'com.inkasso'
-version = '1.0.37-prod'
+version = '1.0.38-prod'
 sourceCompatibility = '1.8'
 
 configurations {

+ 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);
 
 
     /**

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

@@ -14,6 +14,7 @@ import com.github.pagehelper.util.StringUtil;
 import com.google.common.collect.Lists;
 import com.inkasso.adapter.exception.BusinessException;
 import com.inkasso.adapter.exception.ServiceException;
+import com.inkasso.adapter.util.BeanUtilsProxy;
 import com.inkasso.adapter.util.CodeUtil;
 import com.inkasso.adapter.util.CollectionUtil;
 import com.inkasso.adapter.util.ValidatorUtil;
@@ -63,12 +64,8 @@ import com.inkasso.factoring.invoicemanage.service.InvoiceBasicInfoService;
 import com.inkasso.factoring.purchManagement.entity.*;
 import com.inkasso.factoring.purchManagement.entity.vo.PurchContractCompletedVo;
 import com.inkasso.factoring.purchManagement.service.*;
-import com.inkasso.factoring.salesManagement.entity.CSalesContractBasicInfo;
-import com.inkasso.factoring.salesManagement.entity.CSalesContractManagement;
-import com.inkasso.factoring.salesManagement.entity.CSalesContractPersonInfo;
-import com.inkasso.factoring.salesManagement.service.ICSalesContractBasicInfoService;
-import com.inkasso.factoring.salesManagement.service.ICSalesContractManagementService;
-import com.inkasso.factoring.salesManagement.service.ICSalesContractPersonInfoService;
+import com.inkasso.factoring.salesManagement.entity.*;
+import com.inkasso.factoring.salesManagement.service.*;
 import com.inkasso.factoring.settlement.entity.SettlementBasicInfo;
 import com.inkasso.factoring.settlement.entity.SettlementGoodsInfo;
 import com.inkasso.factoring.settlement.service.SettlementBasicInfoService;
@@ -170,6 +167,10 @@ public class CAcceptanceBasicInfoServiceImpl extends ServiceImpl<CAcceptanceBasi
     private ISysAttachmentRefService attachmentRefService;
     @Autowired
     private FileStorageService fileStorageService;
+    @Autowired
+    private ICSalesContractSupplementInfoService salesContractSupplementInfoService;
+    @Autowired
+    private ICSalesContractSupplementPersonInfoService salesContractSupplementPersonInfoService;
 
 
 
@@ -214,6 +215,18 @@ public class CAcceptanceBasicInfoServiceImpl extends ServiceImpl<CAcceptanceBasi
         List<CSalesContractPersonInfo> salesContractPersonInfos = salesContractPersonInfoService.lambdaQuery()
                 .eq(CSalesContractPersonInfo::getcSalesContractBasicInfoId, salesContractBasicInfo.getId())
                 .eq(CSalesContractPersonInfo::getType, SalesContractPersonTypeEnum.SALESCONTRACTPERSONTYPE_ACCEPTANCE.getCode()).list();
+        CSalesContractSupplementInfo salesContractSupplementInfo = salesContractSupplementInfoService.lambdaQuery()
+                .eq(CSalesContractSupplementInfo::getcSalesContractManagementId, salesContractManagement.getId())
+                .eq(CSalesContractSupplementInfo::getChangeType,1)
+                .orderByDesc(CSalesContractSupplementInfo::getGmtCreate).last("limit 1").one();
+        if(salesContractSupplementInfo!=null){
+            //查询具体变更的人员信息
+            List<CSalesContractSupplementPersonInfo> list = salesContractSupplementPersonInfoService.lambdaQuery().eq(CSalesContractSupplementPersonInfo::getcSalesContractSupplementInfoId, salesContractSupplementInfo.getId()).list();
+            if(CollectionUtil.isNotEmpty(list)){
+                salesContractPersonInfos = BeanUtilsProxy.copyPropertiesList(list, CSalesContractPersonInfo.class);
+            }
+        }
+
         List<CAcceptancePersonInfo> acceptancePersonInfos = new ArrayList<>();
         purchContractSellers.forEach(r -> {
             CAcceptancePersonInfo acceptancePersonInfo = new CAcceptancePersonInfo();
@@ -602,10 +615,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){

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

@@ -36,7 +36,7 @@ public class CAcceptanceController {
     @InitBinder
     protected void initBinder(WebDataBinder binder) {
         binder.setAutoGrowNestedPaths(true);
-        binder.setAutoGrowCollectionLimit(1024);
+        binder.setAutoGrowCollectionLimit(2048);
     }
 
     /**
@@ -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();

+ 12 - 0
src/main/java/com/inkasso/factoring/settlement/web/SettlementController.java

@@ -23,6 +23,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
+import org.springframework.web.bind.WebDataBinder;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
@@ -53,6 +54,17 @@ public class SettlementController {
     @Autowired
     private IEnterpriseService iEnterpriseService;
 
+    /**
+     * 初始化参数数组长度最大值
+     *
+     * @param binder
+     */
+    @InitBinder
+    protected void initBinder(WebDataBinder binder) {
+        binder.setAutoGrowNestedPaths(true);
+        binder.setAutoGrowCollectionLimit(2048);
+    }
+
     /**
      * 结算单管理列表查询
      */