|
|
@@ -4,15 +4,18 @@ import cn.hutool.core.date.DateUtil;
|
|
|
import com.alibaba.fastjson.annotation.JSONField;
|
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
import com.ydtech.constants.enums.dict.insurance.VehicleType;
|
|
|
+import com.ydtech.modules.ins.model.CarInfo;
|
|
|
import com.ydtech.modules.ins.model.vo.CarInfoVo;
|
|
|
import com.ydtech.modules.ins.model.vo.CustomerInfoVo;
|
|
|
import com.ydtech.modules.ins.model.vo.RiskInfoVo;
|
|
|
+import com.ydtech.modules.order.entity.api.dajia.constants.TypeVehicleMapping;
|
|
|
import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
|
|
|
import com.ydtech.modules.order.entity.vo.guoren.GuorenAccidentalDrivingVo;
|
|
|
import com.ydtech.utils.StringUtils;
|
|
|
import lombok.Data;
|
|
|
import lombok.NoArgsConstructor;
|
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.time.LocalDate;
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
@@ -243,7 +246,7 @@ public class NonAutoInsOrderReq {
|
|
|
|
|
|
public OrderMainDTO(List<RiskInfoVo> riskList, GuorenAccidentalDrivingVo accidentalDrivingVo, String operatorCode, String carPriceUuid) {
|
|
|
this.amount = accidentalDrivingVo.getAmount();
|
|
|
- this.premium = accidentalDrivingVo.getPremium();
|
|
|
+ this.premium = new BigDecimal(accidentalDrivingVo.getPremium()).multiply(new BigDecimal(accidentalDrivingVo.getQuantity())).toString();
|
|
|
this.goodsCode = accidentalDrivingVo.getGoodsCode();
|
|
|
this.prodCode = accidentalDrivingVo.getProdCode();
|
|
|
this.uwCount = accidentalDrivingVo.getQuantity();
|
|
|
@@ -393,7 +396,10 @@ public class NonAutoInsOrderReq {
|
|
|
public ObjCarListDTO(CarInfoVo carInfo, VinQueryResp.DataDTO vinQ) {
|
|
|
this.carModels = vinQ.getBrandNameBC();
|
|
|
this.carType = carInfo.getCartype();
|
|
|
- this.carTypeCode = "8A";
|
|
|
+ if(carInfo.getVehicleUse().equals(TypeVehicleMapping.TM_08.getCode())){
|
|
|
+ this.carType = "8D";
|
|
|
+ }
|
|
|
+ this.carTypeCode = getCarTypeCodeByCarInfo(carInfo);
|
|
|
//设置车辆大类
|
|
|
if(VehicleType.VT_A0.getCode().equals(carInfo.getCimodelclass())){
|
|
|
this.carCategory = "A";
|
|
|
@@ -507,5 +513,24 @@ public class NonAutoInsOrderReq {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public static String getCarTypeCodeByCarInfo(CarInfoVo carInfo){
|
|
|
+ String carType = "8A";
|
|
|
+ if(carInfo.getVehicleUse().equals(TypeVehicleMapping.TM_08.getCode())){
|
|
|
+ carType = "8D";
|
|
|
+ }else if(carInfo.getVehicleUse().equals(TypeVehicleMapping.TM_01.getCode())){
|
|
|
+ carType = "9G";
|
|
|
+ }else if(carInfo.getVehicleUse().equals(TypeVehicleMapping.TM_02.getCode())){
|
|
|
+ carType = "9B";
|
|
|
+ }else if(carInfo.getVehicleUse().equals(TypeVehicleMapping.TM_03.getCode())){
|
|
|
+ carType = "9C";
|
|
|
+ }else if(carInfo.getVehicleUse().equals(TypeVehicleMapping.TM_04.getCode())){
|
|
|
+ carType = "9D";
|
|
|
+ }else if(carInfo.getVehicleUse().equals(TypeVehicleMapping.TM_06.getCode())){
|
|
|
+ carType = "8E";
|
|
|
+ }else if(carInfo.getVehicleUse().equals(TypeVehicleMapping.TM_07.getCode())){
|
|
|
+ carType = "8B";
|
|
|
+ }
|
|
|
+ return carType;
|
|
|
+ }
|
|
|
|
|
|
}
|