|
|
@@ -10,6 +10,7 @@ import com.ydtech.modules.ins.model.vo.KindInfoVo;
|
|
|
import com.ydtech.modules.ins.model.vo.RiskInfoVo;
|
|
|
import com.ydtech.modules.order.constants.InsuranceTypeCorrespondence;
|
|
|
import com.ydtech.modules.order.entity.api.yangguang.constants.KindListEnum;
|
|
|
+import com.ydtech.modules.order.entity.api.yangguang.constants.YangGuangCarType;
|
|
|
import com.ydtech.modules.order.entity.api.yangguang.response.YangGuangQueryVehicleModelResponse;
|
|
|
import com.ydtech.modules.order.entity.api.yangguang.constants.YgUseNatureCode;
|
|
|
import com.ydtech.modules.order.entity.config.YangGuangConfigureParameters;
|
|
|
@@ -224,69 +225,69 @@ public class YangGuangAccuracyCalculateRequest extends YangGuangBaseRequest{
|
|
|
RiskInfoVo riskInfoVo, String startDate,
|
|
|
YangGuangConfigureParameters ygConfigureParameters,
|
|
|
BaseQuoteVo<List<YgQuoteAccidentVo>> quoteVo) {
|
|
|
- DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
- this.RequestNo = "accuracyCalculate";
|
|
|
- this.UnderWritingRate = quoteVo.getCoefficient();
|
|
|
- this.ComCode = ygConfigureParameters.getComCode();
|
|
|
- this.HandlerCode = ygConfigureParameters.getHandlerCode();
|
|
|
- this.TongxinNo = ygConfigureParameters.getTongxinNo() == null ? "" : ygConfigureParameters.getTongxinNo();
|
|
|
- this.InfotransNo = getInfotransNo();
|
|
|
- this.Modelinfoid = carmodellist.getModelinfoid();
|
|
|
- LocalDateTime startTime = LocalDateTime.parse(startDate, formatter);
|
|
|
- LocalDateTime endTime = startTime.plusYears(1).with(LocalTime.MIDNIGHT).minusSeconds(1);
|
|
|
-
|
|
|
- if (quoteInfoVo.getProductId().equals("034001")) {
|
|
|
- this.BiStartDate = startTime.format(formatter);
|
|
|
- this.BiEndDate = endTime.format(formatter);
|
|
|
- this.CiStartDate = "";
|
|
|
- this.CiEndDate = "";
|
|
|
- this.PolicyType = "1";
|
|
|
- this.CiImmediateFlag = "0";
|
|
|
- if (riskInfoVo.getInstantFlag().equals("1")) {
|
|
|
- this.BiImmediateFlag = "1";
|
|
|
- } else {
|
|
|
- this.BiImmediateFlag = "0";
|
|
|
- }
|
|
|
- } else if (quoteInfoVo.getProductId().equals("0330")) {
|
|
|
- this.CiStartDate = startTime.format(formatter);
|
|
|
- this.CiEndDate = endTime.format(formatter);
|
|
|
- this.BiStartDate = "";
|
|
|
- this.BiEndDate = "";
|
|
|
- this.PolicyType = "2";
|
|
|
- this.BiImmediateFlag = "0";
|
|
|
- if (riskInfoVo.getInstantFlag().equals("1")) {
|
|
|
- this.CiImmediateFlag = "1";
|
|
|
- } else {
|
|
|
- this.CiImmediateFlag = "0";
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.CiStartDate = startTime.format(formatter);
|
|
|
- this.CiEndDate = endTime.format(formatter);
|
|
|
- this.BiStartDate = startTime.toString();
|
|
|
- this.BiEndDate = endTime.toString();
|
|
|
- this.PolicyType = "3";
|
|
|
- if (riskInfoVo.getInstantFlag().equals("1")) {
|
|
|
- this.CiImmediateFlag = "1";
|
|
|
- this.BiImmediateFlag = "1";
|
|
|
- } else {
|
|
|
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
+ this.RequestNo = "accuracyCalculate";
|
|
|
+ this.UnderWritingRate = quoteVo.getCoefficient();
|
|
|
+ this.ComCode = ygConfigureParameters.getComCode();
|
|
|
+ this.HandlerCode = ygConfigureParameters.getHandlerCode();
|
|
|
+ this.TongxinNo = ygConfigureParameters.getTongxinNo() == null ? "" : ygConfigureParameters.getTongxinNo();
|
|
|
+ this.InfotransNo = getInfotransNo();
|
|
|
+ this.Modelinfoid = carmodellist.getModelinfoid();
|
|
|
+ LocalDateTime startTime = LocalDateTime.parse(startDate, formatter);
|
|
|
+ LocalDateTime endTime = startTime.plusYears(1).with(LocalTime.MIDNIGHT).minusSeconds(1);
|
|
|
+
|
|
|
+ if (quoteInfoVo.getProductId().equals("034001")) {
|
|
|
+ this.BiStartDate = startTime.format(formatter);
|
|
|
+ this.BiEndDate = endTime.format(formatter);
|
|
|
+ this.CiStartDate = "";
|
|
|
+ this.CiEndDate = "";
|
|
|
+ this.PolicyType = "1";
|
|
|
this.CiImmediateFlag = "0";
|
|
|
+ if (riskInfoVo.getInstantFlag().equals("1")) {
|
|
|
+ this.BiImmediateFlag = "1";
|
|
|
+ } else {
|
|
|
+ this.BiImmediateFlag = "0";
|
|
|
+ }
|
|
|
+ } else if (quoteInfoVo.getProductId().equals("0330")) {
|
|
|
+ this.CiStartDate = startTime.format(formatter);
|
|
|
+ this.CiEndDate = endTime.format(formatter);
|
|
|
+ this.BiStartDate = "";
|
|
|
+ this.BiEndDate = "";
|
|
|
+ this.PolicyType = "2";
|
|
|
this.BiImmediateFlag = "0";
|
|
|
+ if (riskInfoVo.getInstantFlag().equals("1")) {
|
|
|
+ this.CiImmediateFlag = "1";
|
|
|
+ } else {
|
|
|
+ this.CiImmediateFlag = "0";
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.CiStartDate = startTime.format(formatter);
|
|
|
+ this.CiEndDate = endTime.format(formatter);
|
|
|
+ this.BiStartDate = startTime.toString();
|
|
|
+ this.BiEndDate = endTime.toString();
|
|
|
+ this.PolicyType = "3";
|
|
|
+ if (riskInfoVo.getInstantFlag().equals("1")) {
|
|
|
+ this.CiImmediateFlag = "1";
|
|
|
+ this.BiImmediateFlag = "1";
|
|
|
+ } else {
|
|
|
+ this.CiImmediateFlag = "0";
|
|
|
+ this.BiImmediateFlag = "0";
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- this.IsCreateEpolicyJQ = "1";
|
|
|
- this.ArgueSolution = "1";
|
|
|
- this.NoDamageYears = "";
|
|
|
- this.RequestDate = LocalDateTime.now().format(formatter);
|
|
|
- this.insuredList = YangGuangAccuracyCalculateRequest.InsuredListDTO.toInsuredListDTOList(quoteInfoVo.getPolicyHolderInfo(), quoteInfoVo.getInsuredPersonInfo());
|
|
|
- this.carowner = new CarOwnerInfoDTO(quoteInfoVo.getOwnerInfo(),quoteInfoVo.getCarInfo());
|
|
|
- this.itemcar = new ItemCarInfoDTO(quoteInfoVo.getCarInfo(),carmodellist);
|
|
|
- this.kindList = ItemKindListDTO.toItemKindListDTOList(actualValue, quoteInfoVo.getKindList(),
|
|
|
+ this.IsCreateEpolicyJQ = "1";
|
|
|
+ this.ArgueSolution = "1";
|
|
|
+ this.NoDamageYears = "";
|
|
|
+ this.RequestDate = LocalDateTime.now().format(formatter);
|
|
|
+ this.insuredList = YangGuangAccuracyCalculateRequest.InsuredListDTO.toInsuredListDTOList(quoteInfoVo.getPolicyHolderInfo(), quoteInfoVo.getInsuredPersonInfo());
|
|
|
+ this.carowner = new CarOwnerInfoDTO(quoteInfoVo.getOwnerInfo(),quoteInfoVo.getCarInfo());
|
|
|
+ this.itemcar = new ItemCarInfoDTO(quoteInfoVo.getCarInfo(),carmodellist);
|
|
|
+ this.kindList = ItemKindListDTO.toItemKindListDTOList(actualValue, quoteInfoVo.getKindList(),
|
|
|
Integer.parseInt(quoteInfoVo.getCarInfo().getSeatCount()) - 1, quoteInfoVo.getCarInfo().isNewEnergy());
|
|
|
- if (ArrayUtil.isNotEmpty(quoteVo.getAccidentalDrivingVo()) && quoteVo.getAccidentalDrivingVo().size() > 0) {
|
|
|
- this.NonVehicleProductInformationList = quoteVo.getAccidentalDrivingVo().stream().map(NonVehicleProductInformationListDTO::new).collect(Collectors.toList());
|
|
|
- this.CasualtyFlag = "1";
|
|
|
- }
|
|
|
- this.carshipyTaxInfo = new CarshipyTaxInfoDTO(quoteInfoVo.getVehicleAndVesselTax(),riskInfoVo);
|
|
|
+ if (ArrayUtil.isNotEmpty(quoteVo.getAccidentalDrivingVo()) && quoteVo.getAccidentalDrivingVo().size() > 0) {
|
|
|
+ this.NonVehicleProductInformationList = quoteVo.getAccidentalDrivingVo().stream().map(NonVehicleProductInformationListDTO::new).collect(Collectors.toList());
|
|
|
+ this.CasualtyFlag = "1";
|
|
|
+ }
|
|
|
+ this.carshipyTaxInfo = new CarshipyTaxInfoDTO(quoteInfoVo.getVehicleAndVesselTax(),riskInfoVo,quoteInfoVo.getOwnerInfo());
|
|
|
}
|
|
|
|
|
|
public static List<NonVehicleProductInformationListDTO> toCarPolicySubInfoListDTO(List<YgQuoteAccidentVo> ygQuoteAccidentVos) {
|
|
|
@@ -397,7 +398,6 @@ public class YangGuangAccuracyCalculateRequest extends YangGuangBaseRequest{
|
|
|
this.Name = policyHolderInfo.getName();
|
|
|
this.Mobile = policyHolderInfo.getMobile();
|
|
|
this.PostAddress = policyHolderInfo.getAddr();
|
|
|
- this.IdentifyUseFullifeStart = policyHolderInfo.getIdentifyValidDate();
|
|
|
this.IdentifyUseFullife = policyHolderInfo.getIdentifyValidEndDate();
|
|
|
if (policyHolderInfo.getProperty() != null && policyHolderInfo.getProperty().equals("1")) {
|
|
|
this.InsuredType = "1";
|
|
|
@@ -405,13 +405,10 @@ public class YangGuangAccuracyCalculateRequest extends YangGuangBaseRequest{
|
|
|
this.IdentifyNumber = policyHolderInfo.getIdentifyNumber();
|
|
|
int sex = IdcardUtil.getGenderByIdCard(policyHolderInfo.getIdentifyNumber());
|
|
|
this.Gender = sex == 1 ? "1" : "2";
|
|
|
+ this.IdentifyUseFullifeStart = policyHolderInfo.getIdentifyValidDate();
|
|
|
} else if (policyHolderInfo.getProperty() != null && policyHolderInfo.getProperty().equals("0")) {
|
|
|
- this.IdentifyType = "09";
|
|
|
- this.InsuredType = "2";
|
|
|
- this.IdentifyNumber = policyHolderInfo.getOrganizationCode();
|
|
|
- } else if (policyHolderInfo.getProperty() != null && policyHolderInfo.getProperty().equals("2")) {
|
|
|
this.InsuredType = "2";
|
|
|
- this.IdentifyType = "99";
|
|
|
+ this.IdentifyType = "09";
|
|
|
this.IdentifyNumber = policyHolderInfo.getOrganizationCode();
|
|
|
}
|
|
|
}
|
|
|
@@ -508,11 +505,6 @@ public class YangGuangAccuracyCalculateRequest extends YangGuangBaseRequest{
|
|
|
this.InsuredType = "2";
|
|
|
this.CarInsuredRelation = "1";
|
|
|
this.IdentifyNumber = customerInfoVo.getOrganizationCode();
|
|
|
- } else if (customerInfoVo.getProperty() != null && customerInfoVo.getProperty().equals("2")) {
|
|
|
- this.InsuredType = "1";
|
|
|
- this.IdentifyType = "99";
|
|
|
- this.CarInsuredRelation = "3";
|
|
|
- this.IdentifyNumber = customerInfoVo.getOrganizationCode();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -732,11 +724,14 @@ public class YangGuangAccuracyCalculateRequest extends YangGuangBaseRequest{
|
|
|
// this.CompleteKerbmass = carInfoVo.getVehicleweight();
|
|
|
// this.TonCount = String.valueOf(carInfoVo.limitLoadTon());
|
|
|
this.LicenseType = carInfoVo.getLicenseTypeCode();
|
|
|
- if (carInfoVo.getCimodelclass().equals("A1")) {
|
|
|
- this.VehicleType = "H0";
|
|
|
- } else {
|
|
|
- this.VehicleType = carInfoVo.getCimodelclass();
|
|
|
- }
|
|
|
+// if (carInfoVo.getCimodelclass().equals("A1")) {
|
|
|
+// this.VehicleType = "H0";
|
|
|
+// } else {
|
|
|
+// this.VehicleType = carInfoVo.getCimodelclass();
|
|
|
+// }
|
|
|
+ //车辆种类
|
|
|
+ YangGuangCarType yangGuangCarType = Enum.valueOf(YangGuangCarType.class,carInfoVo.getCartype());
|
|
|
+ this.VehicleType = yangGuangCarType.getCode();
|
|
|
// 车辆使用性质代码
|
|
|
YgUseNatureCode ygUseNatureCode1 = Enum.valueOf(YgUseNatureCode.class, YgUseNatureCode.TITLE + carInfoVo.getVehicleUse());
|
|
|
this.UseNatureCode = ygUseNatureCode1.getCode();
|
|
|
@@ -1129,7 +1124,7 @@ public class YangGuangAccuracyCalculateRequest extends YangGuangBaseRequest{
|
|
|
//不征
|
|
|
private static final String TAX_NOT_CHARGE = "9";
|
|
|
|
|
|
- public CarshipyTaxInfoDTO(VehicleAndVesselTax vehicleAndVesselTax,RiskInfoVo riskInfoVo) {
|
|
|
+ public CarshipyTaxInfoDTO(VehicleAndVesselTax vehicleAndVesselTax,RiskInfoVo riskInfoVo,CustomerInfoVo customerInfoVo) {
|
|
|
String flag = vehicleAndVesselTax.getTaxRelifFlag();
|
|
|
switch (flag) {
|
|
|
case TAX_EXEMPTION:
|
|
|
@@ -1147,8 +1142,15 @@ public class YangGuangAccuracyCalculateRequest extends YangGuangBaseRequest{
|
|
|
}
|
|
|
this.TaxRelifFlag = vehicleAndVesselTax.getTaxRelifFlag();
|
|
|
this.TaxpayerName = vehicleAndVesselTax.getTaxpayerName();
|
|
|
- this.IdentifyType = vehicleAndVesselTax.getTaxpayerIdentifier();
|
|
|
- this.Taxpayeridentifier = vehicleAndVesselTax.getIdentifyNumber();
|
|
|
+ if (customerInfoVo.getProperty() != null && customerInfoVo.getProperty().equals("1")) {
|
|
|
+ this.IdentifyType = "01";
|
|
|
+ this.Taxpayeridentifier = vehicleAndVesselTax.getIdentifyNumber();
|
|
|
+ }
|
|
|
+ if (customerInfoVo.getProperty() != null && customerInfoVo.getProperty().equals("0")) {
|
|
|
+ this.IdentifyType = "09";
|
|
|
+ this.Taxpayeridentifier = customerInfoVo.getOrganizationCode();
|
|
|
+ }
|
|
|
+
|
|
|
this.PaystartDate = riskInfoVo.getStartDate();
|
|
|
this.PayendDate = riskInfoVo.getEndDate();
|
|
|
}
|