ソースを参照

添加车船税整备质量

bifrons 2 年 前
コミット
d3890136b4
1 ファイル変更11 行追加1 行削除
  1. 11 1
      src/main/java/com/ydtech/modules/ins/model/yc/ruote/Tax.java

+ 11 - 1
src/main/java/com/ydtech/modules/ins/model/yc/ruote/Tax.java

@@ -3,8 +3,12 @@ package com.ydtech.modules.ins.model.yc.ruote;
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
 import com.ydtech.modules.ins.model.vo.CarInfoVo;
 import com.ydtech.modules.ins.model.vo.CustomerInfoVo;
+import com.ydtech.modules.protocol.utils.AssertionUtils;
+import com.ydtech.utils.StringUtils;
 import lombok.Data;
 
+import java.math.BigDecimal;
+
 
 /**
  * @description: 交强险车船税     车船税tax
@@ -139,7 +143,7 @@ public class Tax {
         tax.setCalculatedType("349003001");
         tax.setVehecleTypeDetail("3490010013");
         tax.setTaxpayerAddress(policyHolderInfo.getAddr());
-        tax.setVehicleQuality(carInfo.getCompleteKerbMass());
+        tax.setVehicleQuality(extracted(carInfo.getCompleteKerbMass()));
         //纳税人识别号 =  投保人身份证号
         tax.setTaxpayerNO(policyHolderInfo.getIdentifyNumber());
 
@@ -153,5 +157,11 @@ public class Tax {
         return tax;
     }
 
+    private static String extracted(String completeKerbMass) {
+        AssertionUtils.isFail(StringUtils.isEmpty(completeKerbMass), "整备质量为空");
+        BigDecimal bigDecimal = new BigDecimal(completeKerbMass);
+        BigDecimal divide = bigDecimal.divide(new BigDecimal(1000));
+        return divide.toString();
+    }
 
 }