ソースを参照

应收应付导入 修改调整

785834757 2 年 前
コミット
f2fb2e8cc7

+ 52 - 0
src/main/java/com/ydtech/modules/inv/model/po/InvSource.java

@@ -354,4 +354,56 @@ public class InvSource implements Serializable {
 
     @TableField(exist = false)
     private static final long serialVersionUID = 1L;
+
+
+    public void builder(){
+        if(null == this.getJqPremium()){
+            this.setJqPremium(new BigDecimal(0));
+        }
+        if(null == this.getSyPremium()){
+            this.setSyPremium(new BigDecimal(0));
+        }
+        if(null == this.getNonCarPremium()){
+            this.setNonCarPremium(new BigDecimal(0));
+        }
+        if(null == this.getJqPremiumRatio()){
+            this.setJqPremiumRatio(new BigDecimal(0));
+        }
+        if(null == this.getSyPremiumRatio()){
+            this.setSyPremiumRatio(new BigDecimal(0));
+        }
+        if(null == this.getNonCarPremiumRatio()){
+            this.setNonCarPremiumRatio(new BigDecimal(0));
+        }
+        if(null == this.getMaxJqReceivableRatio()){
+            this.setMaxJqReceivableRatio(new BigDecimal(0));
+        }
+        if(null == this.getMaxSyReceivableRatio()){
+            this.setMaxSyReceivableRatio(new BigDecimal(0));
+        }
+        if(null == this.getMaxNonCarReceivableRatio()){
+            this.setMaxNonCarReceivableRatio(new BigDecimal(0));
+        }
+        if(null == this.getJqPremiumTax()){
+            this.setJqPremiumTax(new BigDecimal(0));
+        }
+        if(null == this.getSyPremiumTax()){
+            this.setSyPremiumTax(new BigDecimal(0));
+        }
+        if(null == this.getNonCarPremiumTax()){
+            this.setNonCarPremiumTax(new BigDecimal(0));
+        }
+        if(null == this.getJqReceivableRatio()){
+            this.setJqReceivableRatio(new BigDecimal(0));
+        }
+        if(null == this.getSyReceivableRatio()){
+            this.setSyReceivableRatio(new BigDecimal(0));
+        }
+        if(null == this.getNonCarReceivableRatio()){
+            this.setNonCarReceivableRatio(new BigDecimal(0));
+        }
+        if(null == this.getSubsidyRatio()){
+            this.setSubsidyRatio(new BigDecimal(0));
+        }
+    }
 }

+ 1 - 0
src/main/java/com/ydtech/modules/inv/service/impl/InvReceivableServiceImpl.java

@@ -678,6 +678,7 @@ public class InvReceivableServiceImpl implements InvReceivableService {
     @Override
     public Boolean addReceivable(InvSource invSource) {
         invSource.setId(IdGenerate.nextId());
+        invSource.builder();
         BigDecimal tax = new BigDecimal(1.06);
         //处理交强不含税
         invSource.setJqPremium(invSource.getJqPremiumTax().divide(tax,2, RoundingMode.HALF_UP));