|
|
@@ -0,0 +1,548 @@
|
|
|
+package com.jzg.quote.guoren.api.entity.Request;
|
|
|
+
|
|
|
+import cn.hutool.core.date.DateUtil;
|
|
|
+import com.alibaba.fastjson.annotation.JSONField;
|
|
|
+import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
+import com.jzg.commons.util.StringUtils;
|
|
|
+import com.jzg.quotation.commons.entity.vo.aggregated.QuoteVo;
|
|
|
+import com.jzg.quotation.commons.entity.vo.quote.CarInfoVo;
|
|
|
+import com.jzg.quotation.commons.entity.vo.quote.CustomerInfoVo;
|
|
|
+import com.jzg.quotation.commons.entity.vo.quote.RiskInfoVo;
|
|
|
+import com.jzg.quote.guoren.api.constant.enums.TypeVehicleMapping;
|
|
|
+import com.jzg.quote.guoren.api.entity.GuoRenConfigureParameters;
|
|
|
+import com.jzg.quote.guoren.api.entity.Response.VinQueryResponse;
|
|
|
+import com.jzg.quote.guoren.api.entity.vo.GuoRenAccidentalDrivingVo;
|
|
|
+import lombok.Data;
|
|
|
+import lombok.NoArgsConstructor;
|
|
|
+
|
|
|
+import java.math.BigDecimal;
|
|
|
+import java.time.LocalDate;
|
|
|
+import java.time.LocalDateTime;
|
|
|
+import java.time.format.DateTimeFormatter;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.Collections;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @description: 非车保险订单 入参
|
|
|
+ * @author: shenwd
|
|
|
+ * @date: 2025/3/16 18:06
|
|
|
+ **/
|
|
|
+@Data
|
|
|
+@NoArgsConstructor
|
|
|
+public class NonAutoInsOrderRequest {
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 渠道代码
|
|
|
+ */
|
|
|
+ @JsonProperty(value = "channelCode")
|
|
|
+ @JSONField(name = "channelCode")
|
|
|
+ private String channelCode;
|
|
|
+
|
|
|
+ @JsonProperty(value = "data")
|
|
|
+ @JSONField(name = "data")
|
|
|
+ private DataDTO data;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 外部订单号
|
|
|
+ */
|
|
|
+ @JsonProperty(value = "othBusinessNo")
|
|
|
+ @JSONField(name = "othBusinessNo")
|
|
|
+ private String othBusinessNo;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 请求时间
|
|
|
+ */
|
|
|
+ @JsonProperty(value = "requestTime")
|
|
|
+ @JSONField(name = "requestTime")
|
|
|
+ private String requestTime;
|
|
|
+
|
|
|
+ public NonAutoInsOrderRequest(QuoteVo quoteVo,
|
|
|
+ VinQueryResponse.DataDTO vinQ,
|
|
|
+ GuoRenAccidentalDrivingVo accidentalDrivingVo,
|
|
|
+ GuoRenConfigureParameters parameters,
|
|
|
+ String carPriceUuid,
|
|
|
+ String channelCode
|
|
|
+ ) {
|
|
|
+
|
|
|
+ this.channelCode = channelCode;
|
|
|
+ this.data = new DataDTO(quoteVo, vinQ, accidentalDrivingVo, parameters, carPriceUuid);
|
|
|
+ this.othBusinessNo = carPriceUuid;
|
|
|
+ this.requestTime = DateUtil.today();
|
|
|
+ }
|
|
|
+
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class DataDTO {
|
|
|
+
|
|
|
+ @JsonProperty(value = "orderList")
|
|
|
+ @JSONField(name = "orderList")
|
|
|
+ private List<OrderListDTO> orderList;
|
|
|
+
|
|
|
+ public DataDTO(QuoteVo quoteVo, VinQueryResponse.DataDTO vinQ, GuoRenAccidentalDrivingVo accidentalDrivingVo, GuoRenConfigureParameters parameters, String carPriceUuid) {
|
|
|
+ OrderListDTO orderListDTO = new OrderListDTO(quoteVo, vinQ, accidentalDrivingVo, parameters, carPriceUuid);
|
|
|
+ this.orderList = Collections.singletonList(orderListDTO);
|
|
|
+ }
|
|
|
+
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class OrderListDTO {
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 被保险人信息
|
|
|
+ */
|
|
|
+ @JsonProperty(value = "insuredList")
|
|
|
+ @JSONField(name = "insuredList")
|
|
|
+ private List<InsuredListDTO> insuredList;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车辆标的信息
|
|
|
+ */
|
|
|
+ @JsonProperty(value = "objCarList")
|
|
|
+ @JSONField(name = "objCarList")
|
|
|
+ private List<ObjCarListDTO> objCarList;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 投保人信息
|
|
|
+ */
|
|
|
+ @JsonProperty(value = "orderAppl")
|
|
|
+ @JSONField(name = "orderAppl")
|
|
|
+ private OrderApplDTO orderAppl;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 订单信息
|
|
|
+ */
|
|
|
+ @JsonProperty(value = "orderMain")
|
|
|
+ @JSONField(name = "orderMain")
|
|
|
+ private OrderMainDTO orderMain;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 方案信息
|
|
|
+ */
|
|
|
+ @JsonProperty(value = "planList")
|
|
|
+ @JSONField(name = "planList")
|
|
|
+ private List<PlanListDTO> planList;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 业务员信息
|
|
|
+ */
|
|
|
+ @JsonProperty(value = "salesmanList")
|
|
|
+ @JSONField(name = "salesmanList")
|
|
|
+ private List<SalesmanListDTO> salesmanList;
|
|
|
+
|
|
|
+ public OrderListDTO(QuoteVo quoteVo, VinQueryResponse.DataDTO vinQ, GuoRenAccidentalDrivingVo accidentalDrivingVo, GuoRenConfigureParameters parameters, String carPriceUuid) {
|
|
|
+ //被保人
|
|
|
+ CustomerInfoVo insuredPerson = quoteVo.getInsuredPersonInfo();
|
|
|
+ InsuredListDTO insuredListDTO = new InsuredListDTO(insuredPerson);
|
|
|
+ this.insuredList = Collections.singletonList(insuredListDTO);
|
|
|
+
|
|
|
+ //车辆信息
|
|
|
+ CarInfoVo carInfo = quoteVo.getCarInfoVo();
|
|
|
+ ObjCarListDTO objCarListDTO = new ObjCarListDTO(carInfo, vinQ);
|
|
|
+ this.objCarList = Collections.singletonList(objCarListDTO);
|
|
|
+
|
|
|
+ //投保人
|
|
|
+ CustomerInfoVo policyHolder = quoteVo.getPolicyHolderInfo();
|
|
|
+ this.orderAppl = new OrderApplDTO(policyHolder);
|
|
|
+
|
|
|
+ // 订单信息
|
|
|
+ List<RiskInfoVo> riskList = new ArrayList<>();
|
|
|
+ riskList.add(quoteVo.getCiRiskInfoVo());
|
|
|
+ riskList.add(quoteVo.getBiRiskInfoVo());
|
|
|
+
|
|
|
+ this.orderMain = new OrderMainDTO(riskList, accidentalDrivingVo, parameters.getHandlerCode(), carPriceUuid);
|
|
|
+
|
|
|
+ // 方案信息
|
|
|
+ PlanListDTO planListDTO = new PlanListDTO();
|
|
|
+ this.planList = Collections.singletonList(planListDTO);
|
|
|
+
|
|
|
+ // 业务员信息
|
|
|
+ SalesmanListDTO salesmanListDTO = new SalesmanListDTO(parameters);
|
|
|
+ this.salesmanList = Collections.singletonList(salesmanListDTO);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class OrderApplDTO {
|
|
|
+
|
|
|
+ @JsonProperty(value = "applName")
|
|
|
+ @JSONField(name = "applName")
|
|
|
+ private String applName;
|
|
|
+
|
|
|
+ @JsonProperty(value = "applType")
|
|
|
+ @JSONField(name = "applType")
|
|
|
+ private String applType;
|
|
|
+
|
|
|
+ @JsonProperty(value = "certfNo")
|
|
|
+ @JSONField(name = "certfNo")
|
|
|
+ private String certfNo;
|
|
|
+
|
|
|
+ @JsonProperty(value = "certfType")
|
|
|
+ @JSONField(name = "certfType")
|
|
|
+ private String certfType;
|
|
|
+
|
|
|
+ @JsonProperty(value = "contactName")
|
|
|
+ @JSONField(name = "contactName")
|
|
|
+ private String contactName;
|
|
|
+
|
|
|
+ @JsonProperty(value = "phoneNo")
|
|
|
+ @JSONField(name = "phoneNo")
|
|
|
+ private String phoneNo;
|
|
|
+
|
|
|
+ public OrderApplDTO(CustomerInfoVo customerInfoVo) {
|
|
|
+ this.applName = customerInfoVo.getName();
|
|
|
+ this.applType = "1";
|
|
|
+ this.certfNo = customerInfoVo.getIdentifyNumber();
|
|
|
+ this.certfType = "01";
|
|
|
+ this.contactName = customerInfoVo.getName();
|
|
|
+ this.phoneNo = customerInfoVo.getMobile();
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class OrderMainDTO {
|
|
|
+
|
|
|
+ @JsonProperty(value = "amount")
|
|
|
+ @JSONField(name = "amount")
|
|
|
+ private String amount;
|
|
|
+
|
|
|
+ @JsonProperty(value = "endDate")
|
|
|
+ @JSONField(name = "endDate")
|
|
|
+ private String endDate;
|
|
|
+
|
|
|
+ @JsonProperty(value = "goodsCode")
|
|
|
+ @JSONField(name = "goodsCode")
|
|
|
+ private String goodsCode;
|
|
|
+
|
|
|
+ @JsonProperty(value = "operatorCode")
|
|
|
+ @JSONField(name = "operatorCode")
|
|
|
+ private String operatorCode;
|
|
|
+
|
|
|
+ @JsonProperty(value = "othOrderNo")
|
|
|
+ @JSONField(name = "othOrderNo")
|
|
|
+ private String othOrderNo;
|
|
|
+
|
|
|
+ @JsonProperty(value = "premium")
|
|
|
+ @JSONField(name = "premium")
|
|
|
+ private String premium;
|
|
|
+
|
|
|
+ @JsonProperty(value = "prodCode")
|
|
|
+ @JSONField(name = "prodCode")
|
|
|
+ private String prodCode;
|
|
|
+
|
|
|
+ @JsonProperty(value = "renewalInd")
|
|
|
+ @JSONField(name = "renewalInd")
|
|
|
+ private Integer renewalInd;
|
|
|
+
|
|
|
+ @JsonProperty(value = "riskCode")
|
|
|
+ @JSONField(name = "riskCode")
|
|
|
+
|
|
|
+ private List<String> riskCode;
|
|
|
+ @JsonProperty(value = "startDate")
|
|
|
+ @JSONField(name = "startDate")
|
|
|
+ private String startDate;
|
|
|
+
|
|
|
+ @JsonProperty(value = "uwCount")
|
|
|
+ @JSONField(name = "uwCount")
|
|
|
+ private Integer uwCount;
|
|
|
+
|
|
|
+ @JsonProperty(value = "businessMode")
|
|
|
+ @JSONField(name = "businessMode")
|
|
|
+ private String businessMode;
|
|
|
+
|
|
|
+ @JsonProperty(value = "businessSource")
|
|
|
+ @JSONField(name = "businessSource")
|
|
|
+ private String businessSource;
|
|
|
+
|
|
|
+ public OrderMainDTO(List<RiskInfoVo> riskList, GuoRenAccidentalDrivingVo accidentalDrivingVo, String operatorCode, String carPriceUuid) {
|
|
|
+ this.amount = accidentalDrivingVo.getAmount();
|
|
|
+ this.premium = new BigDecimal(accidentalDrivingVo.getPremium()).multiply(new BigDecimal(accidentalDrivingVo.getQuantity())).toString();
|
|
|
+ this.goodsCode = accidentalDrivingVo.getGoodsCode();
|
|
|
+ this.prodCode = accidentalDrivingVo.getProdCode();
|
|
|
+ this.uwCount = accidentalDrivingVo.getQuantity();
|
|
|
+
|
|
|
+ this.operatorCode = operatorCode;
|
|
|
+ this.othOrderNo = carPriceUuid;
|
|
|
+ this.renewalInd = 0;
|
|
|
+ this.riskCode = Collections.singletonList(accidentalDrivingVo.getRiskCode());
|
|
|
+
|
|
|
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
+ String start;
|
|
|
+ RiskInfoVo riskInfoVo = getRiskInfoVo(riskList, formatter);
|
|
|
+
|
|
|
+ start = riskInfoVo.getStartDate();
|
|
|
+ LocalDateTime startLocalDateTime;
|
|
|
+ LocalDateTime localDateTime = LocalDateTime.parse(start, formatter);
|
|
|
+ if (start.contains("00:00:00")) {
|
|
|
+ startLocalDateTime = localDateTime;
|
|
|
+ } else {
|
|
|
+ LocalDate localDate = localDateTime.toLocalDate().plusDays(1);
|
|
|
+ startLocalDateTime = localDate.atStartOfDay();
|
|
|
+ start = startLocalDateTime.format(formatter);
|
|
|
+ }
|
|
|
+ String end = startLocalDateTime.plusYears(1).plusSeconds(-1).format(formatter);
|
|
|
+
|
|
|
+ this.startDate = start;
|
|
|
+ this.endDate = end;
|
|
|
+
|
|
|
+ this.businessMode = "1";
|
|
|
+ this.businessSource = "2";
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ private static RiskInfoVo getRiskInfoVo(List<RiskInfoVo> riskList, DateTimeFormatter formatter) {
|
|
|
+ if (riskList.size() == 1) {
|
|
|
+ return riskList.get(0);
|
|
|
+ } else {
|
|
|
+ RiskInfoVo riskInfoVo1 = riskList.get(0);
|
|
|
+ RiskInfoVo riskInfoVo2 = riskList.get(1);
|
|
|
+ String startDate1 = riskInfoVo1.getStartDate();
|
|
|
+ String startDate2 = riskInfoVo2.getStartDate();
|
|
|
+ LocalDateTime localDateTime1 = LocalDateTime.parse(startDate1, formatter);
|
|
|
+ LocalDateTime localDateTime2 = LocalDateTime.parse(startDate2, formatter);
|
|
|
+ boolean after = localDateTime1.isAfter(localDateTime2);
|
|
|
+ if (after) {
|
|
|
+ return riskInfoVo2;
|
|
|
+ }
|
|
|
+ return riskInfoVo1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class InsuredListDTO {
|
|
|
+ @JsonProperty(value = "certfNo")
|
|
|
+ @JSONField(name = "certfNo")
|
|
|
+ private String certfNo;
|
|
|
+
|
|
|
+ @JsonProperty(value = "certfType")
|
|
|
+ @JSONField(name = "certfType")
|
|
|
+ private String certfType;
|
|
|
+
|
|
|
+ @JsonProperty(value = "countryName")
|
|
|
+ @JSONField(name = "countryName")
|
|
|
+ private String countryName;
|
|
|
+
|
|
|
+ @JsonProperty(value = "insuredName")
|
|
|
+ @JSONField(name = "insuredName")
|
|
|
+ private String insuredName;
|
|
|
+
|
|
|
+ @JsonProperty(value = "insuredType")
|
|
|
+ @JSONField(name = "insuredType")
|
|
|
+ private String insuredType;
|
|
|
+
|
|
|
+ @JsonProperty(value = "phoneNo")
|
|
|
+ @JSONField(name = "phoneNo")
|
|
|
+ private String phoneNo;
|
|
|
+
|
|
|
+ @JsonProperty(value = "planNo")
|
|
|
+ @JSONField(name = "planNo")
|
|
|
+ private String planNo;
|
|
|
+
|
|
|
+ public InsuredListDTO(CustomerInfoVo customerInfoVo) {
|
|
|
+ this.certfNo = customerInfoVo.getIdentifyNumber();
|
|
|
+ this.certfType = "01";
|
|
|
+ this.countryName = "中国";
|
|
|
+ this.insuredName = customerInfoVo.getName();
|
|
|
+ //客户类型 insuredType String Y 1-个人,2-企业
|
|
|
+ this.insuredType = "1";
|
|
|
+ this.phoneNo = customerInfoVo.getMobile();
|
|
|
+ this.planNo = "1";
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class ObjCarListDTO {
|
|
|
+
|
|
|
+ @JsonProperty(value = "carModels")
|
|
|
+ @JSONField(name = "carModels")
|
|
|
+ private String carModels;
|
|
|
+
|
|
|
+ @JsonProperty(value = "carCategory")
|
|
|
+ @JSONField(name = "carCategory")
|
|
|
+ private String carCategory;
|
|
|
+
|
|
|
+ @JsonProperty(value = "carType")
|
|
|
+ @JSONField(name = "carType")
|
|
|
+ private String carType;
|
|
|
+
|
|
|
+ @JsonProperty(value = "carTypeCode")
|
|
|
+ @JSONField(name = "carTypeCode")
|
|
|
+ private String carTypeCode;
|
|
|
+
|
|
|
+ @JsonProperty(value = "clnt")
|
|
|
+ @JSONField(name = "clnt")
|
|
|
+ private String clnt;
|
|
|
+
|
|
|
+ @JsonProperty(value = "frameNo")
|
|
|
+ @JSONField(name = "frameNo")
|
|
|
+ private String frameNo;
|
|
|
+
|
|
|
+ @JsonProperty(value = "licenseNo")
|
|
|
+ @JSONField(name = "licenseNo")
|
|
|
+ private String licenseNo;
|
|
|
+
|
|
|
+ @JsonProperty(value = "planNo")
|
|
|
+ @JSONField(name = "planNo")
|
|
|
+ private String planNo;
|
|
|
+
|
|
|
+ @JsonProperty(value = "purchasePrice")
|
|
|
+ @JSONField(name = "purchasePrice")
|
|
|
+ private Double purchasePrice;
|
|
|
+
|
|
|
+ @JsonProperty(value = "seatNum")
|
|
|
+ @JSONField(name = "seatNum")
|
|
|
+ private Integer seatNum;
|
|
|
+
|
|
|
+ @JsonProperty(value = "toncount")
|
|
|
+ @JSONField(name = "toncount")
|
|
|
+ private Double toncount;
|
|
|
+
|
|
|
+ public ObjCarListDTO(CarInfoVo carInfo, VinQueryResponse.DataDTO vinQ) {
|
|
|
+ this.carModels = vinQ.getBrandNameBC();
|
|
|
+ this.carType = carInfo.getCarTypeCode();
|
|
|
+ if(carInfo.getVehicleUseCode().equals(TypeVehicleMapping.TM_08.getCode())){
|
|
|
+ this.carType = "8D";
|
|
|
+ }
|
|
|
+ this.carTypeCode = getCarTypeCodeByCarInfo(carInfo);
|
|
|
+ //设置车辆大类,请求时已转换,暂时先注释
|
|
|
+ /*if(VehicleType.VT_A0.getCode().equals(carInfo.getCarKindCode())){
|
|
|
+ this.carCategory = "A";
|
|
|
+ }else if(VehicleType.VT_A1.getCode().equals(carInfo.getCarKindCode())) {
|
|
|
+ this.carCategory = "H";
|
|
|
+ }*/
|
|
|
+
|
|
|
+ this.clnt = StringUtils.isNotEmpty(carInfo.getLicenseNo()) ? "2" : "1";
|
|
|
+ this.frameNo = carInfo.getVinNo();
|
|
|
+ this.licenseNo = carInfo.getLicenseNo();
|
|
|
+ this.planNo = "1";
|
|
|
+ this.purchasePrice = Double.valueOf(vinQ.getPriceShow());
|
|
|
+ this.seatNum = Float.valueOf(vinQ.getSeatCountBC()).intValue();
|
|
|
+ this.toncount = Double.valueOf(vinQ.getTonCount());
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ @Data
|
|
|
+ public static class PlanListDTO {
|
|
|
+
|
|
|
+ @JsonProperty(value = "occupationCode")
|
|
|
+ @JSONField(name = "occupationCode")
|
|
|
+ private String occupationCode;
|
|
|
+
|
|
|
+ @JsonProperty(value = "occupationGrade")
|
|
|
+ @JSONField(name = "occupationGrade")
|
|
|
+ private String occupationGrade;
|
|
|
+
|
|
|
+ @JsonProperty(value = "occupationName")
|
|
|
+ @JSONField(name = "occupationName")
|
|
|
+ private String occupationName;
|
|
|
+
|
|
|
+ @JsonProperty(value = "planNo")
|
|
|
+ @JSONField(name = "planNo")
|
|
|
+ private String planNo;
|
|
|
+
|
|
|
+ @JsonProperty(value = "quantity")
|
|
|
+ @JSONField(name = "quantity")
|
|
|
+ private String quantity;
|
|
|
+
|
|
|
+ @JsonProperty(value = "socialSecInd")
|
|
|
+ @JSONField(name = "socialSecInd")
|
|
|
+ private String socialSecInd;
|
|
|
+
|
|
|
+ public PlanListDTO() {
|
|
|
+ //按照示例传的
|
|
|
+ this.occupationCode = "0500020";
|
|
|
+ this.occupationGrade = "1";
|
|
|
+ this.occupationName = "其他";
|
|
|
+ this.planNo = "1";
|
|
|
+ this.quantity = "1";
|
|
|
+ this.socialSecInd = "01";
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class SalesmanListDTO {
|
|
|
+
|
|
|
+ @JsonProperty(value = "agentCode")
|
|
|
+ @JSONField(name = "agentCode")
|
|
|
+ private String agentCode;
|
|
|
+
|
|
|
+ @JsonProperty(value = "agentCnrtNo")
|
|
|
+ @JSONField(name = "agentCnrtNo")
|
|
|
+ private String agentCnrtNo;
|
|
|
+
|
|
|
+ @JsonProperty(value = "companyCode")
|
|
|
+ @JSONField(name = "companyCode")
|
|
|
+ private String companyCode;
|
|
|
+
|
|
|
+ @JsonProperty(value = "salesmanCode")
|
|
|
+ @JSONField(name = "salesmanCode")
|
|
|
+ private String salesmanCode;
|
|
|
+
|
|
|
+ @JsonProperty(value = "salesmanFlag")
|
|
|
+ @JSONField(name = "salesmanFlag")
|
|
|
+ private Integer salesmanFlag;
|
|
|
+
|
|
|
+ @JsonProperty(value = "salesmanName")
|
|
|
+ @JSONField(name = "salesmanName")
|
|
|
+ private String salesmanName;
|
|
|
+
|
|
|
+ @JsonProperty(value = "serialNo")
|
|
|
+ @JSONField(name = "serialNo")
|
|
|
+ private Integer serialNo;
|
|
|
+
|
|
|
+ @JsonProperty(value = "teamCode")
|
|
|
+ @JSONField(name = "teamCode")
|
|
|
+ private String teamCode;
|
|
|
+
|
|
|
+ @JsonProperty(value = "teamName")
|
|
|
+ @JSONField(name = "teamName")
|
|
|
+ private String teamName;
|
|
|
+
|
|
|
+
|
|
|
+ public SalesmanListDTO(GuoRenConfigureParameters parameters) {
|
|
|
+ this.agentCnrtNo = parameters.getAgreementNo();
|
|
|
+ this.agentCode = parameters.getAgentCode();
|
|
|
+ this.companyCode = parameters.getComCode();
|
|
|
+ this.salesmanCode = parameters.getHandlerCode();
|
|
|
+ this.salesmanFlag = 1;
|
|
|
+ this.salesmanName = parameters.getHandlerName();
|
|
|
+ this.serialNo = 1;
|
|
|
+ this.teamCode = "";
|
|
|
+ this.teamName = "";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public static String getCarTypeCodeByCarInfo(CarInfoVo carInfo){
|
|
|
+ String carType = "8A";
|
|
|
+ if(carInfo.getVehicleUseCode().equals(TypeVehicleMapping.TM_08.getCode())){
|
|
|
+ carType = "8D";
|
|
|
+ }else if(carInfo.getVehicleUseCode().equals(TypeVehicleMapping.TM_01.getCode())){
|
|
|
+ carType = "9G";
|
|
|
+ }else if(carInfo.getVehicleUseCode().equals(TypeVehicleMapping.TM_02.getCode())){
|
|
|
+ carType = "9B";
|
|
|
+ }else if(carInfo.getVehicleUseCode().equals(TypeVehicleMapping.TM_03.getCode())){
|
|
|
+ carType = "9C";
|
|
|
+ }else if(carInfo.getVehicleUseCode().equals(TypeVehicleMapping.TM_04.getCode())){
|
|
|
+ carType = "9D";
|
|
|
+ }else if(carInfo.getVehicleUseCode().equals(TypeVehicleMapping.TM_06.getCode())){
|
|
|
+ carType = "8E";
|
|
|
+ }else if(carInfo.getVehicleUseCode().equals(TypeVehicleMapping.TM_07.getCode())){
|
|
|
+ carType = "8B";
|
|
|
+ }
|
|
|
+ return carType;
|
|
|
+ }
|
|
|
+}
|