Kaynağa Gözat

阳光财险API出参入参

Qchen 1 yıl önce
ebeveyn
işleme
b055b37a20
35 değiştirilmiş dosya ile 3199 ekleme ve 1 silme
  1. 16 0
      src/main/java/com/ydtech/config/properties/YangGuangApiConfigurationProperties.java
  2. 1 1
      src/main/java/com/ydtech/constants/InsuranceEnum.java
  3. 362 0
      src/main/java/com/ydtech/modules/order/components/yangguang/YangGuangEncryption.java
  4. 109 0
      src/main/java/com/ydtech/modules/order/components/yangguang/YangGuangRequestApiComponents.java
  5. 13 0
      src/main/java/com/ydtech/modules/order/constants/InsuranceTypeCorrespondence.java
  6. 35 0
      src/main/java/com/ydtech/modules/order/controller/YangGuangOrderApiController.java
  7. 34 0
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/constants/KindListEnum.java
  8. 16 0
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/constants/PolicyTypeEnum.java
  9. 32 0
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/constants/RequestNo.java
  10. 35 0
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/constants/UseNatureCode.java
  11. 1067 0
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangAccuracyCalculateRequest.java
  12. 30 0
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangAutoWriteOffRequest.java
  13. 10 0
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangBaseRequest.java
  14. 49 0
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangElecApplicationSignRequest.java
  15. 19 0
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangGetEpolicyPdfUrlRequest.java
  16. 77 0
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangGetNonVehicleProductsRequest.java
  17. 79 0
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangPaymentCallbackRequest.java
  18. 62 0
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangPaymentRequest.java
  19. 65 0
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangProposalStatusQueryRequest.java
  20. 78 0
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangQueryVehicleModelRequest.java
  21. 198 0
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangSubmitRequest.java
  22. 36 0
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangAutoWriteOffResponse.java
  23. 20 0
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangBaseResponse.java
  24. 36 0
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangCallbackResponse.java
  25. 17 0
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangElecApplicationSignResponse.java
  26. 17 0
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangGetEpolicyPdfUrlResponse.java
  27. 85 0
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangGetNonVehicleProductsResponse.java
  28. 29 0
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangPaymentResponse.java
  29. 103 0
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangProposalStatusQueryResponse.java
  30. 253 0
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangQueryVehicleModelResponse.java
  31. 120 0
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangSubmitResponse.java
  32. 26 0
      src/main/java/com/ydtech/modules/order/entity/config/YangGuangConfigureParameters.java
  33. 14 0
      src/main/java/com/ydtech/modules/order/service/YangGuangOrderApiService.java
  34. 49 0
      src/main/java/com/ydtech/modules/order/service/impl/YangGuangOrderApiServiceImpl.java
  35. 7 0
      src/main/resources/application-test.yml

+ 16 - 0
src/main/java/com/ydtech/config/properties/YangGuangApiConfigurationProperties.java

@@ -0,0 +1,16 @@
+package com.ydtech.config.properties;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+@Data
+@Component
+@ConfigurationProperties(prefix = "yangguang.api")
+public class YangGuangApiConfigurationProperties {
+    private String url;
+
+    private String testKey;
+
+    private String productKey;
+}

+ 1 - 1
src/main/java/com/ydtech/constants/InsuranceEnum.java

@@ -74,7 +74,7 @@ public enum InsuranceEnum {
     XDCX("XDCX", "国任财产保险股份有限公司", "guoren"),
     YAIC("YAIC", "永安财产保险股份有限公司", "yongan"),
     YDCX("YDCX", "英大泰和财产保险股份有限公司", ""),
-    YGBX("YGBX", "阳光财产保险股份有限公司", ""),
+    YGBX("YGBX", "阳光财产保险股份有限公司", "yangguang"),
     YPIC("YPIC", "黄河财产保险股份有限公司", ""),
     YZIC("YZIC", "燕赵财产保险股份有限公司", ""),
     ZAPA("ZAPA", "众安在线财产保险股份有限公司", "zongan"),

+ 362 - 0
src/main/java/com/ydtech/modules/order/components/yangguang/YangGuangEncryption.java

@@ -0,0 +1,362 @@
+package com.ydtech.modules.order.components.yangguang;
+
+import com.alibaba.fastjson.JSON;
+import com.sun.org.apache.xml.internal.security.utils.Base64;
+import com.ydtech.constants.InsuranceEnum;
+import com.ydtech.modules.ins.model.vo.CarInfoVo;
+import com.ydtech.modules.order.entity.api.yangguang.request.YangGuangBaseRequest;
+import com.ydtech.modules.order.entity.api.yangguang.request.YangGuangQueryVehicleModelRequest;
+import com.ydtech.modules.order.utils.InsuranceLog;
+import org.springframework.stereotype.Component;
+
+import java.io.File;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.Calendar;
+import java.util.Objects;
+import java.util.Random;
+
+@Component
+public class YangGuangEncryption {
+        /***
+         * 加密算法
+         * 加密
+         * 解密
+         */
+        public static String Encode = "Encode";
+        public static String Decode = "Decode";
+
+
+        /**
+         * @功能:从字符串的指定位置截取指定长度的子字符串
+         * @param str:原字符串
+         * @param startIndex:子字符串的起始位置
+         * @param length
+         * @return:子字符串
+         */
+        public static String CutString(String str, int startIndex, int length) {
+            if (startIndex >= 0) {
+                if (length < 0) {
+                    length = length * -1;
+                    if (startIndex - length < 0) {
+                        length = startIndex;
+                        startIndex = 0;
+                    } else {
+                        startIndex = startIndex - length;
+                    }
+                }
+
+                if (startIndex > str.length()) {
+                    return "";
+                }
+
+            } else {
+                if (length < 0) {
+                    return "";
+                } else {
+                    if (length + startIndex > 0) {
+                        length = length + startIndex;
+                        startIndex = 0;
+                    } else {
+                        return "";
+                    }
+                }
+            }
+
+            if (str.length() - startIndex < length) {
+
+                length = str.length() - startIndex;
+            }
+
+            return str.substring(startIndex, startIndex + length);
+        }
+
+        /**
+         * @功能:从字符串的指定位置开始截取到字符串结尾的了符串
+         * @param str:原字符串
+         * @param startIndex:子字符串的起始位置
+         * @return:子字符串
+         */
+        public static String CutString(String str, int startIndex) {
+            return CutString(str, startIndex, str.length());
+        }
+
+        /**
+         * @功能:返回文件是否存在
+         * @param filename:文件名
+         * @return:是否存在
+         */
+        public static boolean FileExists(String filename) {
+            File f = new File(filename);
+            return f.exists();
+        }
+
+        /**
+         * @:功能MD5函数
+         * @param str:原始字符串
+         * @return:原始字符串
+         */
+        public static String MD5(String str) {
+            // return md5.convert(str);
+            StringBuffer sb = new StringBuffer();
+            String part = null;
+            try {
+                MessageDigest md = MessageDigest.getInstance("MD5");
+                byte[] md5 = md.digest(str.getBytes());
+
+                for (int i = 0; i < md5.length; i++) {
+                    part = Integer.toHexString(md5[i] & 0xFF);
+                    if (part.length() == 1) {
+                        part = "0" + part;
+                    }
+                    sb.append(part);
+                }
+
+            } catch (NoSuchAlgorithmException ex) {
+            }
+            return sb.toString();
+        }
+
+        /**
+         * 功能:字段串是否为Null或为
+         * @param str
+         * @return
+         */
+        public static boolean StrIsNullOrEmpty(String str) {
+            // #if NET1
+            if (str == null || str.trim().equals("")) {
+                return true;
+            }
+
+            return false;
+        }
+
+        /**
+         * 功能:用于 RC4 处理密码
+         * @param pass:密码字串
+         * @param kLen:>密钥长度,一般为 256
+         * @return
+         */
+        static private byte[] GetKey(byte[] pass, int kLen) {
+            byte[] mBox = new byte[kLen];
+
+            for (int i = 0; i < kLen; i++) {
+                mBox[i] = (byte) i;
+            }
+
+            int j = 0;
+            for (int i = 0; i < kLen; i++) {
+
+                j = (j + (int) ((mBox[i] + 256) % 256) + pass[i % pass.length])
+                        % kLen;
+
+                byte temp = mBox[i];
+                mBox[i] = mBox[j];
+                mBox[j] = temp;
+            }
+
+            return mBox;
+        }
+
+        /**
+         * 功能:生成随机字符
+         * @param lens:随机字符长度
+         * @return:随机字符
+         */
+        public static String RandomString(int lens) {
+            char[] CharArray = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'j', 'k',
+                    'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
+                    'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' };
+            int clens = CharArray.length;
+            String sCode = "";
+            Random random = new Random();
+            for (int i = 0; i < lens; i++) {
+                sCode += CharArray[Math.abs(random.nextInt(clens))];
+            }
+            return sCode;
+        }
+
+        /**
+         * @功能:加密算法
+         * @param source:需要解密的字符串
+         * @param key:加密的秘钥
+         * @return
+         */
+        public static String authcodeEncode(String source, String key) {
+            return decipher(source, key, Encode, 0);
+
+        }
+
+        /**
+         * 功能:RC4 原始算法
+         * @param input:原始字串数组
+         * @param pass:密钥
+         * @return:处理后的字串数组
+         */
+        private static byte[] RC4(byte[] input, String pass) {
+            if (input == null || pass == null)
+                return null;
+
+            byte[] output = new byte[input.length];
+            byte[] mBox = GetKey(pass.getBytes(), 256);
+
+            // 加密
+            int i = 0;
+            int j = 0;
+
+            for (int offset = 0; offset < input.length; offset++) {
+                i = (i + 1) % mBox.length;
+                j = (j + (int) ((mBox[i] + 256) % 256)) % mBox.length;
+
+                byte temp = mBox[i];
+                mBox[i] = mBox[j];
+                mBox[j] = temp;
+                byte a = input[offset];
+
+                // byte b = mBox[(mBox[i] + mBox[j] % mBox.Length) % mBox.Length];
+                // mBox[j] 一定比 mBox.Length 小,不需要在取模
+                byte b = mBox[(toInt(mBox[i]) + toInt(mBox[j])) % mBox.length];
+
+                output[offset] = (byte) ((int) a ^ (int) toInt(b));
+            }
+
+            return output;
+        }
+
+        public static int toInt(byte b) {
+            return (int) ((b + 256) % 256);
+        }
+
+        public long getUnixTimestamp() {
+            Calendar cal = Calendar.getInstance();
+            return cal.getTimeInMillis() / 1000;
+        }
+        /**
+         * @param source:原始字符串
+         * @param key:秘钥
+         * @param operation:加解密操作
+         * @param expiry:加密字串过期时间
+         * @return:加密后的字符串
+         */
+        private static String decipher(String source, String key,
+                                       String operation, int expiry){
+            try{
+                if (source == null || key == null) {
+                    return "";
+                }
+
+                int ckey_length = 4;
+                String keya, keyb, keyc, cryptkey, result;
+
+                key = MD5(key);
+
+                keya = MD5(CutString(key, 0, 16));
+
+                keyb = MD5(CutString(key, 16, 16));
+
+                keyc = ckey_length > 0 ? (operation.equals(Decode) ? CutString(
+                        source, 0, ckey_length) : RandomString(ckey_length))
+                        : "";
+
+                cryptkey = keya + MD5(keya + keyc);
+
+                source = "0000000000" + CutString(MD5(source + keyb), 0, 16)
+                        + source;
+
+                byte[] temp = RC4(source.getBytes("UTF-8"), cryptkey);
+
+                return keyc + Base64.encode(temp);
+            }catch(Exception e){
+                e.printStackTrace();
+                return"";
+            }
+        }
+        /**
+         * @param source:原始字符串
+         * @param key:秘钥
+         * @param operation:加解密操作
+         * @param expiry:加密字串过期时间
+         * @return:加密后的字符串
+         */
+        private static String authcode(String source, String key,
+                                       String operation, int expiry) {
+            try {
+                if (source == null || key == null) {
+                    return "";
+                }
+
+                int ckey_length = 4;
+                String keya, keyb, keyc, cryptkey, result;
+
+                key = MD5(key);
+
+                keya = MD5(CutString(key, 0, 16));
+
+                keyb = MD5(CutString(key, 16, 16));
+
+                keyc = ckey_length > 0 ? (operation.equals(Decode) ? CutString(
+                        source, 0, ckey_length) : RandomString(ckey_length))
+                        : "";
+
+                cryptkey = keya + MD5(keya + keyc);
+
+                if (operation.equals(Decode)) {
+                    byte[] temp;
+
+                    temp = Base64.decode(CutString(source, ckey_length));
+                    result = new String(RC4(temp, cryptkey));
+                    if (CutString(result, 10, 16).equals(
+                            CutString(MD5(CutString(result, 26) + keyb), 0, 16))) {
+                        return CutString(result, 26);
+                    } else {
+                        temp = Base64.decode(CutString(source + "=", ckey_length));
+                        result = new String(RC4(temp, cryptkey));
+                        if (CutString(result, 10, 16)
+                                .equals(CutString(
+                                        MD5(CutString(result, 26) + keyb), 0, 16))) {
+                            return CutString(result, 26);
+                        } else {
+                            temp = Base64.decode(CutString(source + "==",
+                                    ckey_length));
+                            result = new String(RC4(temp, cryptkey));
+                            if (CutString(result, 10, 16).equals(
+                                    CutString(MD5(CutString(result, 26) + keyb), 0,
+                                            16))) {
+                                return CutString(result, 26);
+                            } else {
+                                return "2";
+                            }
+                        }
+                    }
+                } else {
+                    return "加密操作不正确";
+                }
+            } catch (Exception e) {
+                return "";
+            }
+        }
+        /**
+         * @功能:解密算法
+         * @param source
+         * @param key
+         * @return
+         */
+        public static String authcodeDecode(String source, String key) {
+            return authcode(source, key, Decode, 0);
+        }
+
+    public String encryptRequestBody(Object request, String key) {
+        try {
+            String s = JSON.toJSONString(request);
+            InsuranceLog.infoLog(InsuranceEnum.YGBX.getPinyin(), "\n\t---------> URl: {} \n---------> 请求参数:{}", "", s);
+
+            return authcodeEncode(s, key);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return null;
+        }
+    }
+
+}
+
+

Dosya farkı çok büyük olduğundan ihmal edildi
+ 109 - 0
src/main/java/com/ydtech/modules/order/components/yangguang/YangGuangRequestApiComponents.java


+ 13 - 0
src/main/java/com/ydtech/modules/order/constants/InsuranceTypeCorrespondence.java

@@ -45,7 +45,12 @@ public class InsuranceTypeCorrespondence {
     protected static final String[] YONGCHENG_CONNECT_INSURANCE_TYPE_NEW_EMERGY = {"030226", "030227", "030228", "030229", "030213", "030214", "030215", "030216", "030019", "030108", "030208",
             "030220", "030219", "030235", "030236", "030237", "030238"};
 
+    //阳光财险
+    protected static final String[] YG_CONNECT_INSURANCE_TYPE = {"A", "B", "D3", "D4", "G1", "L", "F", "R", "X", "X1", "Z", "Z2", "Z3", "Q3", "D2", "M", "J1"};
 
+    //阳光财险新能源
+    protected static final String[] YG_CONNECT_INSURANCE_TYPE_NEW_EMERGY = {"21A", "21B", "20G1", "21C1", "21C2", "21FK", "21FL", "21FM", "21FN",
+            "21FV", "21FW", "21FX", "21FY", "21FZ", "20F1", "20F2", "20FD", "20FE", "20FF", "20FG", "20F5", "20F6", "20FS", "20FT", "20F7", "20F8", "20FA", "20FB", "20FC", "20FH", "20FQ", "20FR"};
     // 乘客
     protected static final String[] PASSENGER = {"D4", "SY_FJ_YBW2"};
 
@@ -127,6 +132,14 @@ public class InsuranceTypeCorrespondence {
         return ZJ_CONNECT_INSURANCE_TYPE;
     }
 
+    public static String[] getYangGuangConnectInsuranceType() {
+        return YG_CONNECT_INSURANCE_TYPE;
+    }
+
+    public static String[] getYangGuangConnectInsuranceTypeNewEnergy() {
+        return YG_CONNECT_INSURANCE_TYPE_NEW_EMERGY;
+    }
+
     public static String[] getSpecialContractClause(){
         return SPECIAL_CONTRACT_CLAUSE;
     }

+ 35 - 0
src/main/java/com/ydtech/modules/order/controller/YangGuangOrderApiController.java

@@ -0,0 +1,35 @@
+package com.ydtech.modules.order.controller;
+
+import com.ydtech.core.page.HttpResult;
+import com.ydtech.modules.ins.model.vo.QuoteRespVo;
+import com.ydtech.modules.order.aop.QuoteVerification;
+import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
+import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
+import com.ydtech.modules.order.entity.vo.pingan.PingAnQuoteVo;
+import com.ydtech.modules.order.service.YangGuangOrderApiService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Map;
+
+@Api(tags = "阳光财险 API ")
+@Slf4j
+@RestController
+@RequestMapping("/order/yangGuangApi")
+@RequiredArgsConstructor
+public class YangGuangOrderApiController {
+
+    private final YangGuangOrderApiService yangGuangOrderApiService;
+    @QuoteVerification("报价授权")
+    @PostMapping("/quote")
+    @ApiOperation("报价")
+    public HttpResult<QuoteRespVo> quote(@RequestBody BaseQuoteInfoVo quoteInfoVo) throws Exception {
+        return this.yangGuangOrderApiService.quote(quoteInfoVo);
+    }
+}

+ 34 - 0
src/main/java/com/ydtech/modules/order/entity/api/yangguang/constants/KindListEnum.java

@@ -0,0 +1,34 @@
+package com.ydtech.modules.order.entity.api.yangguang.constants;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+//阳光财险险别代码
+@Getter
+@AllArgsConstructor
+public enum KindListEnum {
+    KIND_LIST_1("A", "车辆损失险","主险。默认车辆实际价值,浮动不超过实际价值的30%"),
+    KIND_LIST_2("B", "商业第三者责任险","主险。固定值:5万/10万/15万/20万/30万/50万/100万/150万/200万/300万/500万"),
+    KIND_LIST_3("D3", "司机座位责任险","主险。总保额=单位保额数"),
+    KIND_LIST_4("D4", "乘客座位责任险","主险。总保额=单位保额数*座位数"),
+    KIND_LIST_5("G1", "机动车抢盗险","主险。默认车辆实际价值"),
+    KIND_LIST_6("L", "车身划痕损失险","附加险。固定值:2000 5000 10000 20000"),
+    KIND_LIST_7("F", "玻璃单独破碎险","附加险。不必录入保额,需录入玻璃种类。"),
+    KIND_LIST_8("R", "精神损害抚慰金责任险","附加险。不超过100万。部分机构不承保,联调时确认。"),
+    KIND_LIST_9("X", "新增加设备损失险","附加险。等于新增设备实际价值。部分机构不承保,联调时确认。"),
+    KIND_LIST_10("X1", "发动机涉水损失险","附加险。不必录入保额"),
+    KIND_LIST_11("Z", "自燃损失险","附加险。不必录入保额"),
+    KIND_LIST_12("Z2", "修理期间费用补偿险","附加险。不必录入保额"),
+    KIND_LIST_13("Z3", "机动车损失保险无法找到第三方特约险","附加险。不必录入保额"),
+    KIND_LIST_14("Q3", "指定修理厂险","附加险。不必录入保额,需录入专修费率"),
+    KIND_LIST_15("D2", "车上车上货物责任险货物责任","附加险。家庭自用车不能承保此险种"),
+    KIND_LIST_16("M", "不计免赔","附加险。投保不计免赔时,返回该险种"),
+    KIND_LIST_17("J1", "机动车第三者责任保险法定节假日限额翻倍险","附加险,保额同三者,车主性质为个人的家庭自用客车且投保了三者险可投保");
+
+
+    private final String code;
+
+    private final String name;
+
+    private final String desc;
+}

+ 16 - 0
src/main/java/com/ydtech/modules/order/entity/api/yangguang/constants/PolicyTypeEnum.java

@@ -0,0 +1,16 @@
+package com.ydtech.modules.order.entity.api.yangguang.constants;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@Getter
+@AllArgsConstructor
+public enum PolicyTypeEnum {
+    P_1("1", "单商业"),
+    P_2("2", "单交强险"),
+    P_3("3", "交商同保");
+
+    private final String code;
+    private final String desc;
+
+}

+ 32 - 0
src/main/java/com/ydtech/modules/order/entity/api/yangguang/constants/RequestNo.java

@@ -0,0 +1,32 @@
+package com.ydtech.modules.order.entity.api.yangguang.constants;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@Getter
+@AllArgsConstructor
+public enum RequestNo {
+    ccsiQueryVehicleModel("ccsiQueryVehicleModel", "车型查询"),
+
+    accuracyCalculate("accuracyCalculate", "精准报价"),
+
+    submit("submit","投保单提交"),
+
+    payment("payment", "在线支付"),
+
+    paymentCallback("paymentCallback","保单生效通知"),
+
+    proposalStatusQuery("proposalStatusQuery", "投保单状态查询"),
+
+    getEpolicyPDFURL("proposalStatusQuery", "获取电子保单下载地址"),
+
+    autoWriteOff("autoWriteOff","投保单注销"),
+
+    elecApplicationSign("elecApplicationSign", "电子投保单签名"),
+
+    getNonVehicleProducts("getNonVehicleProducts","获取驾意险套餐列表");
+
+    private final String code;
+
+    private final String desc;
+}

+ 35 - 0
src/main/java/com/ydtech/modules/order/entity/api/yangguang/constants/UseNatureCode.java

@@ -0,0 +1,35 @@
+package com.ydtech.modules.order.entity.api.yangguang.constants;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@Getter
+@AllArgsConstructor
+public enum UseNatureCode {
+    UNC_01("8D", "非营业个人"),
+    UNC_02("8A", "家庭自用"),
+    UNC_03("8B", "非营业企业"),
+    UNC_04("8F", "非营业事业团体"),
+    UNC_05("8E", "非营业党政机关"),
+    UNC_06("8G", "教练"),
+    UNC_07("9B", "营业城市公交"),
+    UNC_08("9C", "营业公路客运"),
+    UNC_09("9C", "营业公路客运"),
+
+    UNC_10("9D", "营业货运"),
+    UNC_11("9E", "营业旅游客运"),
+    UNC_12("9F", "营业出租"),
+
+    UNC_13("9J", "营业"),
+
+    UNC_14("9G", "营业租赁"),
+
+    UNC_15("9H", "预约出租客运");
+
+
+    private final String code;
+
+    private final String desc;
+
+    public static final String TITLE = "UNC_";
+}

+ 1067 - 0
src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangAccuracyCalculateRequest.java

@@ -0,0 +1,1067 @@
+package com.ydtech.modules.order.entity.api.yangguang.request;
+
+import cn.hutool.core.util.ArrayUtil;
+import cn.hutool.core.util.IdcardUtil;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.ydtech.constants.enums.InsurKind;
+import com.ydtech.constants.enums.InsuranceRisk;
+import com.ydtech.modules.ins.model.vo.CarInfoVo;
+import com.ydtech.modules.ins.model.vo.CustomerInfoVo;
+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.PolicyTypeEnum;
+import com.ydtech.modules.order.entity.api.yangguang.response.YangGuangQueryVehicleModelResponse;
+import com.ydtech.modules.order.entity.api.yangguang.constants.UseNatureCode;
+import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
+import com.ydtech.modules.order.entity.vo.VehicleAndVesselTax;
+import lombok.*;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+
+@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+@Data
+public class YangGuangAccuracyCalculateRequest extends YangGuangBaseRequest{
+    /**
+     * 基本信息
+     */
+    private BaseInfoDTO baseInfo;
+
+    /**
+     * 投被保人信息
+     */
+    private List<InsuredListDTO> insuredList;
+
+    /**
+     * 车主信息
+     */
+    private CarOwnerInfoDTO carOwnerInfo;
+
+    /**
+     * 车辆信息
+     */
+    private ItemCarInfoDTO itemCarInfo;
+
+    /**
+     * 险别信息
+     */
+    private List<ItemKindListDTO> itemKindList;
+
+    /**
+     * 设备险信息
+     */
+    private List<DeviceListDTO> deviceList;
+
+    /**
+     * 车船税信息
+     */
+    private CarshipyTaxInfoDTO carshipyTaxInfo;
+
+    public YangGuangAccuracyCalculateRequest(BaseQuoteInfoVo quoteInfoVo,String actualValue,YangGuangQueryVehicleModelResponse vehicleModelResponse,RiskInfoVo riskInfoVo) {
+    this.baseInfo = new BaseInfoDTO(quoteInfoVo.getRiskList());
+    this.insuredList = YangGuangAccuracyCalculateRequest.InsuredListDTO.toInsuredListDTOList(quoteInfoVo.getPolicyHolderInfo(), quoteInfoVo.getInsuredPersonInfo());
+    this.carOwnerInfo = new CarOwnerInfoDTO(quoteInfoVo.getOwnerInfo());
+    this.itemCarInfo = new ItemCarInfoDTO(quoteInfoVo.getCarInfo());
+    this.itemKindList = ItemKindListDTO.toItemKindListDTOList(actualValue, quoteInfoVo.getKindList(),
+            Integer.parseInt(quoteInfoVo.getCarInfo().getSeatCount()) - 1, quoteInfoVo.getCarInfo().isNewEnergy());
+    this.carshipyTaxInfo = new CarshipyTaxInfoDTO(quoteInfoVo.getVehicleAndVesselTax(),riskInfoVo);
+    }
+
+
+
+    @NoArgsConstructor
+    @Data
+    public static class BaseInfoDTO implements Serializable {
+
+        /**
+         * 交易流水号
+         */
+        @JsonProperty("InfotransNo")
+        private String InfotransNo;
+
+        /**
+         * 车辆信息ID号
+         */
+        @JsonProperty("Modelinfoid")
+        private String Modelinfoid;
+
+        /**
+         * 保单类型
+         * 1-单保商业险 2-单保交强险3交商同保
+         */
+        @JsonProperty("PolicyType")
+        private String PolicyType;
+
+        /**
+         * 商业险起保时间
+         * yyyy-MM-dd HH:mm(24小时制,0-24)
+         */
+        @JsonProperty("BiStartDate")
+        private String BiStartDate;
+
+        /**
+         * 商业险终保时间
+         * yyyy-MM-dd HH:mm(24小时制,0-24)
+         */
+        @JsonProperty("BiEndDate")
+        private String BiEndDate;
+
+        /**
+         * 交强险起保时间
+         * yyyy-MM-dd HH:mm(24小时制,0-24)
+         */
+        @JsonProperty("CiStartDate")
+        private String CiStartDate;
+
+        /**
+         * 交强险终保时间
+         * yyyy-MM-dd HH:mm(24小时制,0-24)
+         */
+        @JsonProperty("CiEndDate")
+        private String CiEndDate;
+
+        /**
+         *  交强险即时生效标志 0否/1是
+         */
+        @JsonProperty("CiImmediateFlag")
+        private String CiImmediateFlag;
+
+        /**
+         *  商业险即时生效标志 0否/1是
+         */
+        @JsonProperty("BiImmediateFlag")
+        private String BiImmediateFlag;
+
+        /**
+         *  代理机构,出单机构存在多代理时需传入
+         */
+        @JsonProperty("AgentCode")
+        private String AgentCode;
+
+        /**
+         *  争议解决方式;1 诉讼 2 仲裁
+         */
+        @JsonProperty("ArgueSolution")
+        private String ArgueSolution;
+
+        /**
+         *  仲裁机构
+         */
+        @JsonProperty("ArbitrationAgency")
+        private String ArbitrationAgency;
+
+        /**
+         *  归属业务员
+         */
+        @JsonProperty("HandlerCode")
+        private String HandlerCode;
+
+        /**
+         *  搭售非车标识 1搭售 0不搭(1的时候非车产品代码和投保分数必传)
+         */
+        @JsonProperty("CasualtyFlag")
+        private String CasualtyFlag;
+
+        /**
+         *  是否生成电子保单;
+         *  0否/1是
+         *  (交强险和商业险不一致时,交强险传值)
+         */
+        @JsonProperty("IsCreateEpolicyJQ")
+        private String IsCreateEpolicyJQ;
+
+        /**
+         *  同心会员号
+         */
+        @JsonProperty("TongxinNo")
+        private String TongxinNo;
+
+        /**
+         *  线上线下标识:C-线上、B-线下,空值默认线下
+         */
+        @JsonProperty("OnLineFlag")
+        private String OnLineFlag;
+
+        /**
+         *  当是线上业务的时候,项目品牌必传
+         */
+        @JsonProperty("ProjectBrand")
+        private String ProjectBrand;
+
+
+        public BaseInfoDTO(List<RiskInfoVo> riskInfoVoList) {
+            if (riskInfoVoList.size() == 1) {
+                if (InsuranceRisk.BUSINESS.getCode().equals(riskInfoVoList.get(0).getRiskCode())) {
+                    this.PolicyType = PolicyTypeEnum.P_1.getCode();
+                } else {
+                    this.PolicyType = PolicyTypeEnum.P_2.getCode();
+                }
+            } else {
+                this.PolicyType = PolicyTypeEnum.P_3.getCode();
+            }
+        }
+    }
+
+
+
+    /**
+     *     关系人信息
+     *     说明:
+     *     1.关系人为个人且证件类型为非身份证时生日与性别必传。
+     *     2.个人客户时固定电话与手机号至少传其中之一。
+     *     3.当电子发票时,电子邮箱必填。
+     *     4.关系类型是团体时,被保人名称长度有限制,北京至少6位,河北4位。
+     *     5.上海地区且手机号不是投被保人本人时,手机实际持有人信息必录,且手机实际持有人证件类型必须为身份证
+     */
+    @NoArgsConstructor
+    @Data
+    public static class InsuredListDTO implements Serializable {
+        /**
+         *  关系性质代码
+         * 1个人/2单位(团体)
+         */
+        @JsonProperty("InsuredType")
+        private String InsuredType;
+
+        /**
+         *  关系人标志
+         * 1.被保险人/2.投保人
+         */
+        @JsonProperty("InsuredFlag")
+        private String InsuredFlag;
+
+        /**
+         *  关系人证件类型
+         */
+        @JsonProperty("IdentifyType")
+        private String IdentifyType;
+
+        /**
+         *  关系人证件号码
+         */
+        @JsonProperty("IdentifyNumber")
+        private String IdentifyNumber;
+
+        /**
+         *  关系人地址
+         */
+        @JsonProperty("PostAddress")
+        private String PostAddress;
+
+
+        /**
+         *  固定电话
+         */
+        @JsonProperty("PhoneNumber")
+        private String PhoneNumber;
+
+        /**
+         *  手机号
+         */
+        @JsonProperty("Mobile")
+        private String Mobile;
+
+        /**
+         *  邮箱
+         */
+        @JsonProperty("Email")
+        private String Email;
+
+        /**
+         *  邮编
+         */
+        @JsonProperty("PostCode")
+        private String PostCode;
+
+        /**
+         *  生日,格式yyyy-MM-dd
+         */
+        @JsonProperty("Birthday")
+        private String Birthday;
+
+        /**
+         *  性别1男/2女
+         */
+        @JsonProperty("Gender")
+        private String Gender;
+
+        /**
+         *  关系人名称
+         */
+        @JsonProperty("Name")
+        private String Name;
+
+        /**
+         *  有效证件起期(InsuredType为个人时必传)
+         */
+        @JsonProperty("IdentifyUseFullifeStart")
+        private String IdentifyUseFullifeStart;
+
+        /**
+         *  有效证件止期(InsuredType为个人时必传)
+         */
+        @JsonProperty("IdentifyUseFullife")
+        private String IdentifyUseFullife;
+
+        public InsuredListDTO(CustomerInfoVo policyHolderInfo, String insuredFlag) {
+            this.InsuredType = "1";
+            this.InsuredFlag = insuredFlag;
+            this.IdentifyType = "01";
+            this.IdentifyNumber = policyHolderInfo.getIdentifyNumber();
+            this.Name = policyHolderInfo.getName();
+            this.Mobile = policyHolderInfo.getMobile();
+            this.PostAddress = policyHolderInfo.getAddr();
+            int sex = IdcardUtil.getGenderByIdCard(policyHolderInfo.getIdentifyNumber());
+            this.Gender = sex == 1 ? "1" : "2";
+            this.IdentifyUseFullifeStart = policyHolderInfo.getIdentifyValidDate();
+            this.IdentifyUseFullife = policyHolderInfo.getIdentifyValidEndDate();
+        }
+
+        public static List<YangGuangAccuracyCalculateRequest.InsuredListDTO> toInsuredListDTOList(CustomerInfoVo policyHolderInfo, CustomerInfoVo insuredPersonInfo) {
+            List<YangGuangAccuracyCalculateRequest.InsuredListDTO> insuredListDTOS = new ArrayList<>();
+            YangGuangAccuracyCalculateRequest.InsuredListDTO policyHolder = new YangGuangAccuracyCalculateRequest.InsuredListDTO(policyHolderInfo, "2");
+            YangGuangAccuracyCalculateRequest.InsuredListDTO insuredPerson = new YangGuangAccuracyCalculateRequest.InsuredListDTO(insuredPersonInfo, "1");
+            insuredListDTOS.add(policyHolder);
+            insuredListDTOS.add(insuredPerson);
+            return insuredListDTOS;
+        }
+    }
+
+    /**
+     *  车主信息
+     */
+    @NoArgsConstructor
+    @Data
+    public static class CarOwnerInfoDTO implements Serializable {
+        /**
+         *  车主名称
+         */
+        @JsonProperty("Name")
+        private String Name;
+
+        /**
+         *  车主性质代码;
+         *  0个人/1机关/2企业
+         */
+        @JsonProperty("InsuredType")
+        private String InsuredType;
+
+        /**
+         *  车主证件类型
+         */
+        @JsonProperty("IdentifyType")
+        private String IdentifyType;
+
+        /**
+         *  车主证件号码
+         */
+        @JsonProperty("IdentifyNumber")
+        private String IdentifyNumber;
+
+        /**
+         *  车主地址
+         */
+        @JsonProperty("OwnerAdress")
+        private String OwnerAdress;
+
+        /**
+         *  固定电话
+         */
+        @JsonProperty("PhoneNumber")
+        private String PhoneNumber;
+
+        /**
+         *  手机号
+         */
+        @JsonProperty("Mobile")
+        private String Mobile;
+
+        /**
+         *  邮箱
+         */
+        @JsonProperty("Email")
+        private String Email;
+
+        /**
+         *  邮编
+         */
+        @JsonProperty("PostCode")
+        private String PostCode;
+
+        /**
+         *  与车辆关系 1所有 2使用 3管理
+         */
+        @JsonProperty("CarInsuredRelation")
+        private String CarInsuredRelation;
+
+
+        public CarOwnerInfoDTO(CustomerInfoVo customerInfoVo) {
+            this.Name = customerInfoVo.getName();
+            this.Mobile = customerInfoVo.getMobile();
+            this.OwnerAdress = customerInfoVo.getAddr();
+            this.IdentifyNumber = customerInfoVo.getIdentifyNumber();
+            this.InsuredType = "1";
+        }
+    }
+
+    /**
+     *  车辆信息
+     */
+    @NoArgsConstructor
+    @Data
+    public static class ItemCarInfoDTO implements Serializable {
+        /**
+         *  号牌底色 当已经上了车牌号,号牌底色必传。
+         * 01	蓝
+         * 02	黑
+         * 03	白
+         * 04	黄
+         * 05	白蓝
+         * 06	渐变绿
+         * 07	黄绿双拼
+         * 99	其他
+         */
+        @JsonProperty("LicenseColor")
+        private String LicenseColor;
+
+        /**
+         *  号牌种类代码 北京机构当出新车时,LicenseType不传值。
+         */
+        @JsonProperty("LicenseType")
+        private String LicenseType;
+
+        /**
+         *  车辆种类代码
+         */
+        @JsonProperty("VehicleType")
+        private String VehicleType;
+
+        /**
+         *  车辆使用性质代码
+         */
+        @JsonProperty("UseNatureCode")
+        private String UseNatureCode;
+
+        /**
+         *  初登日期
+         * 格式:yyyy-MM-dd
+         */
+        @JsonProperty("EnrollDate")
+        private String EnrollDate;
+
+        /**
+         *  发动机号
+         */
+        @JsonProperty("EngineNo")
+        private String EngineNo;
+
+        /**
+         *  车辆品牌
+         */
+        @JsonProperty("BrandName")
+        private String BrandName;
+
+        /**
+         *  是否车贷投保多年标志
+         * 0否/1是
+         */
+        @JsonProperty("LoanVehicleFlag")
+        private String LoanVehicleFlag;
+
+
+        /**
+         *  贷款机构(第一受益人)
+         */
+        @JsonProperty("LoanVehicleBank")
+        private String LoanVehicleBank;
+
+        /**
+         *  是否过户车标志
+         *  0否/1是
+         */
+        @JsonProperty("ChgOwnerFlag")
+        private String ChgOwnerFlag;
+
+
+        /**
+         *  转移登记日期。
+         * 格式:yyyy-MM-dd
+         */
+        @JsonProperty("ChgOwnerDate")
+        private String ChgOwnerDate;
+
+        /**
+         *  车辆类型描述
+         */
+        @JsonProperty("LicenseCategory")
+        private String LicenseCategory;
+
+        /**
+         *  验车状态
+         */
+        @JsonProperty("CarCheckStatus")
+        private String CarCheckStatus;
+
+        /**
+         *  整备质量(kg)
+         */
+        @JsonProperty("CompleteKerbmass")
+        private String CompleteKerbmass;
+
+        /**
+         *  核载质量(T)
+         */
+        @JsonProperty("TonCount")
+        private String TonCount;
+
+        /**
+         *  排量(L/KW)
+         */
+        @JsonProperty("ExhaustScale")
+        private String ExhaustScale;
+
+        /**
+         *  新车销售公司名称
+         */
+        @JsonProperty("SaleCompany")
+        private String SaleCompany;
+
+        /**
+         *  新车销售公司所在地市代码
+         */
+        @JsonProperty("SaleAreaCode")
+        private String SaleAreaCode;
+
+
+        /**
+         * 平台车辆查询码
+         */
+        @JsonProperty("SearchSequenceNo")
+        private String SearchSequenceNo;
+
+        /**
+         * 功率KW
+         */
+        @JsonProperty("Powerscale")
+        private String Powerscale;
+
+        /**
+         * 座位数
+         */
+        @JsonProperty("SeatCount")
+        private String SeatCount;
+
+        /**
+         * 新车购置价
+         */
+        @JsonProperty("Purchaseprice")
+        private String Purchaseprice;
+
+        /**
+         * 车身颜色
+         */
+        @JsonProperty("ColorCode")
+        private String ColorCode;
+
+        /**
+         * 发证日期
+         */
+        @JsonProperty("LicenceDate")
+        private String LicenceDate;
+
+        /**
+         * 打印厂牌型号
+         */
+        @JsonProperty("CarUsage")
+        private String CarUsage;
+
+        /**
+         * 业务员认定是否新能源(1是0否)
+         */
+        @JsonProperty("Inputnewenergyflag")
+        private String Inputnewenergyflag;
+
+        /**
+         * 能源类型
+         */
+        @JsonProperty("FuelType")
+        private String FuelType;
+
+        /**
+         * 纯电动续航里程 (新能源种类,为异型车是必传)
+         */
+        @JsonProperty("Purerange")
+        private String Purerange;
+
+        /**
+         * 最高设计车速(电动摩托车必传)
+         */
+        @JsonProperty("Maxspeed")
+        private String Maxspeed;
+
+        /**
+         * 发票金额
+         */
+        @JsonProperty("InvoicePrice")
+        private String InvoicePrice;
+
+        public ItemCarInfoDTO(CarInfoVo carInfoVo) {
+            if (carInfoVo.getLicenseNo() != null) {
+                this.LicenseColor = "01";
+            }
+
+            this.LicenseType = "02";
+            this.VehicleType = carInfoVo.getCimodelclass();
+            // 车辆使用性质代码
+            UseNatureCode useNatureCode1 = Enum.valueOf(UseNatureCode.class, com.ydtech.modules.order.entity.api.yangguang.constants.UseNatureCode.TITLE + carInfoVo.getCarnature());
+            this.UseNatureCode = useNatureCode1.getCode();
+            this.EnrollDate = carInfoVo.getRegisterDate();
+            this.EngineNo = carInfoVo.getEngineNo();
+            this.BrandName = carInfoVo.getBrandName();
+            this.LoanVehicleFlag = carInfoVo.isLoanStatus() ? "1" : "0";
+            this.ChgOwnerFlag = carInfoVo.isTransferFlag() ? "1" : "0";
+            this.ChgOwnerDate = carInfoVo.getTransferDate();
+            this.LicenseCategory = carInfoVo.getVehicleclass();
+            this.Inputnewenergyflag = carInfoVo.isNewEnergy() ? "1" : "0";
+            this.FuelType = carInfoVo.getEnergyType();
+        }
+    }
+
+    /**
+     * 险别信息
+     */
+    @NoArgsConstructor
+    @Data
+    public static class ItemKindListDTO implements Serializable {
+        /**
+         * 可选免赔额
+         * 0/300/500/1000/2000
+         */
+        @JsonProperty("Deductible")
+        private String Deductible;
+
+        /**
+         * 玻璃种类
+         */
+        @JsonProperty("ModeCode")
+        private String ModeCode;
+
+        /**
+         * 险别代码
+         */
+        @JsonProperty("KindCode")
+        private String KindCode;
+
+        /**
+         * 单位保额(单位:元)
+         */
+        @JsonProperty("UnitAmount")
+        private String UnitAmount;
+
+        /**
+         * 总保额 (单位:元)
+         */
+        @JsonProperty("Amount")
+        private String Amount;
+
+        /**
+         * 数量/服务次数
+         */
+        @JsonProperty("Quantity")
+        private String Quantity;
+
+        /**
+         * 是否不计免
+         * 0否/1是(2014版险别)
+         */
+        @JsonProperty("Isdeductibles")
+        private String Isdeductibles;
+
+        /**
+         * 险别名称
+         */
+        @JsonProperty("KindName")
+        private String KindName;
+
+        /**
+         * 每日赔偿限额(修理期间费用补偿险必传)
+         */
+        @JsonProperty("ClaimLimitPerPay")
+        private String ClaimLimitPerPay;
+
+        /**
+         * 最高赔偿天数(修理期间费用补偿险必传)
+         */
+        @JsonProperty("MaxClaimDays")
+        private String MaxClaimDays;
+
+        /**
+         * 指定修理厂险专修费率(%)
+         */
+        @JsonProperty("Rate")
+        private String Rate;
+
+        /**
+         * 免赔率/附加比例
+         */
+        @JsonProperty("Deductiblerate")
+        private String Deductiblerate;
+
+        /**
+         * 是否共享保额 1:是  0:否 只适用于附加医保外用药责任险(机动车第三者责任保险)
+         */
+        @JsonProperty("ShareLimit")
+        private String ShareLimit;
+
+        public static ItemKindListDTO getCompulsoryInsurance() {
+            ItemKindListDTO itemKindListDTO = new ItemKindListDTO();
+            itemKindListDTO.setKindCode(KindListEnum.KIND_LIST_1.getCode());
+            itemKindListDTO.setKindName(KindListEnum.KIND_LIST_1.getName());
+            itemKindListDTO.setUnitAmount("200000");
+            return itemKindListDTO;
+        }
+        public static List<ItemKindListDTO> toItemKindListDTOList(String actualValue, List<KindInfoVo> kindList, int quantity, boolean isEnergy ) {
+            List<ItemKindListDTO> list = new ArrayList<>();
+            String[] insuranceType = InsuranceTypeCorrespondence.getYangGuangConnectInsuranceType();
+
+            if (isEnergy) {
+                insuranceType = InsuranceTypeCorrespondence.getYangGuangConnectInsuranceTypeNewEnergy();
+            }
+
+            for (KindInfoVo kindInfoVo : kindList) {
+                String code = kindInfoVo.getKindCode();
+                ItemKindListDTO itemKindListDTO = new ItemKindListDTO();
+                int i = ArrayUtil.indexOf(InsuranceTypeCorrespondence.getJinZhangGuiType(), code);
+                String s = insuranceType[i];
+                KindListEnum contractEnum = Enum.valueOf(KindListEnum.class, "KIND_LIST_" + s);
+                itemKindListDTO.KindCode = contractEnum.getCode();
+                itemKindListDTO.KindName = contractEnum.getName();
+
+                // 司机
+                if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getDriver(), code) >= 0) {
+                    itemKindListDTO.Quantity = String.valueOf(1);
+                    itemKindListDTO.UnitAmount = String.valueOf(kindInfoVo.getAmount());
+                    itemKindListDTO.Amount = String.valueOf(kindInfoVo.getAmount());
+                }
+                // 乘客
+                else if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getPassenger(), code) >= 0) {
+                    itemKindListDTO.Quantity = String.valueOf(quantity);
+                    itemKindListDTO.UnitAmount = String.valueOf(kindInfoVo.getUnitAmount());
+                    itemKindListDTO.Amount =
+                            BigDecimal.valueOf(kindInfoVo.getUnitAmount()).multiply(BigDecimal.valueOf(quantity)).toString();
+                }
+                // 绝对免赔
+                else if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getAbsoluteDeductible(), code) >= 0) {
+                    itemKindListDTO.Deductiblerate = kindInfoVo.getDeductibleRate();
+                } else if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getSpecialContractClause(), code) >= 0){
+                    itemKindListDTO.Quantity = String.valueOf(kindInfoVo.getServiceTimes());
+                } else if (InsurKind.A.getCode().equals(code)) {
+                    itemKindListDTO.Amount = actualValue;
+                } else {
+                    itemKindListDTO.Amount = String.valueOf(kindInfoVo.getAmount());
+                }
+
+                list.add(itemKindListDTO);
+            }
+            return list;
+        }
+
+    }
+
+    /**
+     * 新增设备险信息
+     * 1.投保新增设备险时,新增设备险信息必传。
+     * 2.返回报文中有实际价值
+     */
+    @NoArgsConstructor
+    @Data
+    public static class DeviceListDTO implements Serializable {
+        /**
+         * 设备名称
+         */
+        @JsonProperty("DeviceName")
+        private String DeviceName;
+
+        /**
+         * 设备数量
+         */
+        @JsonProperty("Quantity")
+        private String Quantity;
+
+        /**
+         * 新件购置价小计
+         */
+        @JsonProperty("PurchasePrice")
+        private String PurchasePrice;
+
+        /**
+         * 购置日期,yyyy-MM-dd
+         */
+        @JsonProperty("BuyDate")
+        private String BuyDate;
+
+    }
+
+    /**
+     * 商业险转保信息
+     * 1.触发平台商业险转保时,商业险转保校验码必传。
+     * 2.校验码(具体根据平台配置返回,需要解析Base64数据流)
+     */
+    @NoArgsConstructor
+    @Data
+    public static class BiplatQuestionInfoDTO implements Serializable {
+        /**
+         * 平台投保查询码
+         */
+        @JsonProperty("DemandNo")
+        private String DemandNo;
+
+        /**
+         * 校验码
+         */
+        @JsonProperty("Checkcode")
+        private String Checkcode;
+    }
+
+    /**
+     * 交强险转保信息
+     * 1.触发平台商业险转保时,商业险转保校验码必传。
+     * 2.校验码(具体根据平台配置返回,需要解析Base64数据流)
+     */
+    @NoArgsConstructor
+    @Data
+    public static class CiplatQuestionInfoDTO implements Serializable {
+        /**
+         * 平台投保查询码
+         */
+        @JsonProperty("DemandNo")
+        private String DemandNo;
+
+        /**
+         * 校验码
+         */
+        @JsonProperty("Checkcode")
+        private String Checkcode;
+    }
+
+    /**
+     * 车船税信息
+     */
+    @NoArgsConstructor
+    @Data
+    public static class CarshipyTaxInfoDTO implements Serializable {
+        /**
+         * 纳税类型
+         */
+        @JsonProperty("TaxRelifFlag")
+        private String TaxRelifFlag;
+
+        /**
+         * 纳税人名称
+         */
+        @JsonProperty("TaxpayerName")
+        private String TaxpayerName;
+
+        /**
+         * 纳税人证件类型
+         */
+        @JsonProperty("IdentifyType")
+        private String IdentifyType;
+
+        /**
+         * 纳税人识别号
+         */
+        @JsonProperty("Taxpayeridentifier")
+        private String Taxpayeridentifier;
+
+        /**
+         * 税款所属始期
+         * 起始日期 YYYY-MM-DD
+         */
+        @JsonProperty("PaystartDate")
+        private String PaystartDate;
+
+        /**
+         * 税款所属止期
+         * 终止日期 YYYY-MM-DD
+         */
+        @JsonProperty("PayendDate")
+        private String PayendDate;
+
+        /**
+         * 减免税计算方式
+         */
+        @JsonProperty("BaseTaxation")
+        private String BaseTaxation;
+
+        /**
+         * 减免税原因
+         */
+        @JsonProperty("Relifreason")
+        private String Relifreason;
+
+        /**
+         * 减免税额(元)
+         */
+        @JsonProperty("Taxrelief")
+        private String Taxrelief;
+
+        /**
+         * 减免税比例(%)
+         */
+        @JsonProperty("FreeRate")
+        private String FreeRate;
+
+        /**
+         * 完(减)税凭证号
+         */
+        @JsonProperty("Paidfreecertificate")
+        private String Paidfreecertificate;
+
+        /**
+         * 开具税务机关代码
+         */
+        @JsonProperty("TaxComCode")
+        private String TaxComCode;
+
+        /**
+         * 开具税务机关名称
+         */
+        @JsonProperty("TaxcomName")
+        private String TaxcomName;
+
+        /**
+         * 是否滞纳金
+         * 0否/1是
+         */
+        @JsonProperty("LateFeeFlag")
+        private String LateFeeFlag;
+
+        /**
+         * 是否计算往年补交
+         * 0否/1是
+         */
+        @JsonProperty("HisFeeFlag")
+        private String HisFeeFlag;
+
+        /**
+         * 滞纳金起始日期 YYYY
+         */
+        @JsonProperty("LateFeeStartDate")
+        private String LateFeeStartDate;
+
+        /**
+         * 前次缴费年度YYYY
+         */
+        @JsonProperty("PaylastYear")
+        private String PaylastYear;
+
+        /**
+         * 开具完税凭证地区代码参见代码
+         */
+        @JsonProperty("TaxPaidAreaCode")
+        private String TaxPaidAreaCode;
+
+        /**
+         * 完税凭证填发日期 YYYY-MM-DD
+         */
+        @JsonProperty("TaxDocumentDate")
+        private String TaxDocumentDate;
+
+        /**
+         * 税务车辆类型(上海地区必传)
+         */
+        @JsonProperty("TaxVehicleType")
+        private String TaxVehicleType;
+
+        /**
+         * 未征收提示信息
+         */
+        @JsonProperty("notCollectedPromptMessage")
+        private String notCollectedPromptMessage;
+
+        //正常交税
+        private static final String TAX_NORMAL = "1";
+        // 免税
+        private static final String TAX_EXEMPTION = "2";
+        // 减税
+        private static final String TAX_REDUCTION = "3";
+        // 已完税
+        private static final String TAX_FINISH = "4";
+        // 有争议
+        private static final String TAX_DISPUTE = "5";
+        //拒缴税
+        private static final String TAX_REJECT = "6";
+        // 未代收
+        private static final String TAX_NOT_COLLECT = "S";
+        //不征
+        private static final String TAX_NOT_CHARGE = "9";
+
+        public CarshipyTaxInfoDTO(VehicleAndVesselTax vehicleAndVesselTax,RiskInfoVo riskInfoVo) {
+            String flag = vehicleAndVesselTax.getTaxRelifFlag();
+            switch (flag) {
+                case TAX_EXEMPTION:
+                    this.Paidfreecertificate = vehicleAndVesselTax.getPaidFreeCertificate();
+                    this.TaxComCode = vehicleAndVesselTax.getTaxComCode();
+                    this.TaxcomName = vehicleAndVesselTax.getTaxComName();
+                    break;
+                case TAX_REDUCTION:
+                    this.Paidfreecertificate = vehicleAndVesselTax.getPaidFreeCertificate();
+                    this.TaxComCode = vehicleAndVesselTax.getTaxComCode();
+                    this.TaxcomName = vehicleAndVesselTax.getTaxComName();
+                case TAX_FINISH:
+                    this.TaxDocumentDate = vehicleAndVesselTax.getTaxDocumentDate();
+                    this.TaxPaidAreaCode = vehicleAndVesselTax.getTaxPaidAreaCode();
+            }
+            this.TaxRelifFlag = vehicleAndVesselTax.getTaxRelifFlag();
+            this.TaxpayerName = vehicleAndVesselTax.getTaxpayerName();
+            this.IdentifyType = vehicleAndVesselTax.getTaxpayerIdentifier();
+            this.Taxpayeridentifier = vehicleAndVesselTax.getIdentifyNumber();
+            this.PaystartDate = riskInfoVo.getStartDate();
+            this.PayendDate = riskInfoVo.getEndDate();
+        }
+
+        @Getter
+        @AllArgsConstructor
+        public enum FreeRateText {
+
+            FRT_A("1", "减免金额"),
+            FRT_P("2", "减免比例"),
+            FRT_E("E", "免税");
+
+            // 编号
+            private final String code;
+            // 说明
+            private final String desc;
+
+        }
+
+    }
+
+    /**
+     * 非车产品信息
+     */
+    @NoArgsConstructor
+    @Data
+    public static class NonVehicleProductInformationListDTO implements Serializable {
+        /**
+         * 非车产品代码
+         */
+        @JsonProperty("ProductCode")
+        private String ProductCode;
+
+        /**
+         * 非车产品份数
+         */
+        @JsonProperty("QuantityCasualty")
+        private String QuantityCasualty;
+    }
+
+}
+
+

+ 30 - 0
src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangAutoWriteOffRequest.java

@@ -0,0 +1,30 @@
+package com.ydtech.modules.order.entity.api.yangguang.request;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+@Data
+public class YangGuangAutoWriteOffRequest extends YangGuangBaseRequest{
+
+    /**
+     * 投保单号
+     */
+    @JsonProperty("ProposalNo")
+    private String ProposalNo;
+
+    /**
+     * 线上线下标识:C-线上、B-线下,空值默认线下
+     */
+    @JsonProperty("OnLineFlag")
+    private String OnLineFlag;
+
+    /**
+     * 当是线上业务的时候,项目品牌必传
+     */
+    @JsonProperty("ProjectBrand")
+    private String ProjectBrand;
+}

+ 10 - 0
src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangBaseRequest.java

@@ -0,0 +1,10 @@
+package com.ydtech.modules.order.entity.api.yangguang.request;
+
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+@Data
+public class YangGuangBaseRequest {
+}

+ 49 - 0
src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangElecApplicationSignRequest.java

@@ -0,0 +1,49 @@
+package com.ydtech.modules.order.entity.api.yangguang.request;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+public class YangGuangElecApplicationSignRequest extends YangGuangBaseRequest {
+
+    /**
+     * 商业险投保单号
+     */
+    @JsonProperty("BiProposalNo")
+    private String BiProposalNo;
+
+    /**
+     * 交强险投保单号
+     */
+    @JsonProperty("CiProposalNo")
+    private String CiProposalNo;
+
+    /**
+     * 是否发送电子投保单签名短
+     * 信(1:是;0:否)
+     */
+    @JsonProperty("SendMsgFlag")
+    private String SendMsgFlag;
+
+    /**
+     * 手机号
+     */
+    @JsonProperty("Mobile")
+    private String Mobile;
+
+    /**
+     * 线上线下标识:C-线上、B-线下,空值默认线下
+     */
+    @JsonProperty("OnLineFlag")
+    private String OnLineFlag;
+
+    /**
+     * 当是线上业务的时候,项目品牌必传
+     */
+    @JsonProperty("ProjectBrand")
+    private String ProjectBrand;
+}

+ 19 - 0
src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangGetEpolicyPdfUrlRequest.java

@@ -0,0 +1,19 @@
+package com.ydtech.modules.order.entity.api.yangguang.request;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+public class YangGuangGetEpolicyPdfUrlRequest extends YangGuangBaseRequest {
+
+    /**
+     * 保单号
+     */
+    @JsonProperty("PolicyNo")
+    private String PolicyNo;
+
+}

+ 77 - 0
src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangGetNonVehicleProductsRequest.java

@@ -0,0 +1,77 @@
+package com.ydtech.modules.order.entity.api.yangguang.request;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+public class YangGuangGetNonVehicleProductsRequest extends YangGuangBaseRequest {
+
+    /**
+     *  归属业务员代码
+     */
+    @JsonProperty("HandlerCode")
+    private String HandlerCode;
+
+
+    /**
+     *  服务区代码
+     */
+    @JsonProperty("ServiceArea")
+    private String ServiceArea;
+
+
+    /**
+     *  代理机构代码
+     */
+    @JsonProperty("AgentCode")
+    private String AgentCode;
+
+
+    /**
+     *  车辆使用性质代码 非营业货车8D 营业货车9D
+     */
+    @JsonProperty("UseNatureCode")
+    private String UseNatureCode;
+
+    /**
+     *  座位数
+     */
+    @JsonProperty("Seatcount")
+    private String Seatcount;
+
+    /**
+     *  车辆种类代码
+     */
+    @JsonProperty("VehicleType")
+    private String VehicleType;
+
+    /**
+     *  车辆类型 货车为H开头座位数(货车必传)
+     */
+    @JsonProperty("LicenseCategory")
+    private String LicenseCategory;
+
+    /**
+     *  吨位数座位数(货车必传)
+     */
+    @JsonProperty("Toncount")
+    private String Toncount;
+
+    /**
+     *  线上线下标识:C-线上、B-线下,空值默认线下
+     */
+    @JsonProperty("OnLineFlag")
+    private String OnLineFlag;
+
+    /**
+     *  当是线上业务的时候,项目品牌必传
+     */
+    @JsonProperty("ProjectBrand")
+    private String ProjectBrand;
+
+
+}

+ 79 - 0
src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangPaymentCallbackRequest.java

@@ -0,0 +1,79 @@
+package com.ydtech.modules.order.entity.api.yangguang.request;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+@Data
+public class YangGuangPaymentCallbackRequest extends YangGuangBaseRequest{
+    /**
+     * 交易流水号
+     */
+    @JsonProperty("InfotransNo")
+    private String InfotransNo;
+
+    /**
+     *  商业险投保单号
+     * 时间格式 yyyy-MM-dd HH:mm:ss
+     */
+    @JsonProperty("BiProposalNo")
+    private String BiProposalNo;
+
+    /**
+     *  交强险投保单号
+     */
+    @JsonProperty("CiProposalNo")
+    private String CiProposalNo;
+
+    /**
+     *  支付金额(单位:元)
+     */
+    @JsonProperty("PayAmount")
+    private String PayAmount;
+
+    /**
+     *  支付状态 0成功 1失败
+     */
+    @JsonProperty("PayStatus")
+    private String PayStatus;
+
+    /**
+     *  支付状态描述
+     */
+    @JsonProperty("PayResult")
+    private String PayResult;
+
+    /**
+     *  承保状态 0成功 1失败
+     */
+    @JsonProperty("PrpallStatus")
+    private String PrpallStatus;
+
+    /**
+     *  承保状态描述
+     */
+    @JsonProperty("PrpallResult")
+    private String PrpallResult;
+
+    /**
+     *  商业险保单号
+     */
+    @JsonProperty("BiPolicyNo")
+    private String BiPolicyNo;
+
+    /**
+     *  交强险保单号
+     */
+    @JsonProperty("CiPolicyNo")
+    private String CiPolicyNo;
+
+    /**
+     * 非车险保单号
+     */
+    @JsonProperty("FCPolicyNo")
+    private String FCPolicyNo;
+
+}

+ 62 - 0
src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangPaymentRequest.java

@@ -0,0 +1,62 @@
+package com.ydtech.modules.order.entity.api.yangguang.request;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.ydtech.modules.ins.model.vo.CarInfoVo;
+import com.ydtech.modules.order.entity.InsAreaCompany;
+import com.ydtech.modules.order.entity.InsOrders;
+import com.ydtech.modules.order.entity.config.YangGuangConfigureParameters;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.util.Date;
+
+@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+@Data
+public class YangGuangPaymentRequest extends YangGuangBaseRequest{
+    /**
+     * 交易流水号
+     */
+    @JsonProperty("InfotransNo")
+    private String InfotransNo;
+
+    /**
+     *  投保人名称
+     */
+    @JsonProperty("AppliName")
+    private String AppliName;
+
+    /**
+     *  支付金额(单位:元)
+     */
+    @JsonProperty("OrderAmount")
+    private String OrderAmount;
+
+    /**
+     *  服务器接收保单生效通知结果地址
+     */
+    @JsonProperty("BackUrl")
+    private String BackUrl;
+
+    /**
+     *  是否发送电子投保单签名短信(1:是;0:否)
+     */
+    @JsonProperty("SendMsgFlag")
+    private String SendMsgFlag;
+
+    /**
+     *  手机号
+     */
+    @JsonProperty("Mobile")
+    private String Mobile;
+
+    public YangGuangPaymentRequest(InsAreaCompany insAreaCompany, InsOrders insOrders) {
+        this.InfotransNo = getInfotransNo();;
+        this.AppliName = insOrders.getInsuredname();
+        this.OrderAmount = insAreaCompany.getSumpremium().toString();
+        this.BackUrl = getBackUrl();
+        this.SendMsgFlag = "0";
+        this.Mobile = getMobile();
+    }
+}

+ 65 - 0
src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangProposalStatusQueryRequest.java

@@ -0,0 +1,65 @@
+package com.ydtech.modules.order.entity.api.yangguang.request;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+/**
+ *  投保单状态查询
+ */
+@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+@Data
+public class YangGuangProposalStatusQueryRequest extends YangGuangBaseRequest {
+
+    /**
+     *  商业险投保单号
+     */
+    @JsonProperty("BiProposalNo")
+    private String BiProposalNo;
+
+    /**
+     *  交强险投保单号
+     */
+    @JsonProperty("CiProposalNo")
+    private String CiProposalNo;
+
+    /**
+     *  归属业务员 非必填,目前只有烽火台会传
+     */
+    @JsonProperty("HandlerCode")
+    private String HandlerCode;
+
+    /**
+     *  服务区域代码(车商代码)
+     */
+    @JsonProperty("ServiceArea")
+    private String ServiceArea;
+
+    /**
+     *  代理机构,出单机构存在多代理时需传入
+     */
+    @JsonProperty("AgentCode")
+    private String AgentCode;
+
+    /**
+     *  提核标志(1:提核;0不提核)
+     */
+    @JsonProperty("submitUnderFlag")
+    private String submitUnderFlag;
+
+    /**
+     *  线上线下标识:C-线上、B-线下,空值默认线下
+     */
+    @JsonProperty("OnLineFlag")
+    private String OnLineFlag;
+
+    /**
+     *  当是线上业务的时候,项目品牌必传
+     */
+    @JsonProperty("ProjectBrand")
+    private String ProjectBrand;
+
+}

+ 78 - 0
src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangQueryVehicleModelRequest.java

@@ -0,0 +1,78 @@
+package com.ydtech.modules.order.entity.api.yangguang.request;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.ydtech.modules.ins.model.vo.CarInfoVo;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import okhttp3.*;
+
+import java.io.IOException;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+
+
+@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+@Data
+public class YangGuangQueryVehicleModelRequest extends YangGuangBaseRequest{
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private String RequestDate;
+
+    private String ComCode;
+
+    private String RequestNo;
+    /**
+     * 页码
+     */
+    @JsonProperty("PageNo")
+    private String PageNo = "1";
+
+    /**
+        */
+    @JsonProperty("ModelName")
+    private String ModelName;
+
+    /**
+     * 是否新车 0新车/1非新车
+     */
+    @JsonProperty("IsNewCar")
+
+    private String IsNewCar;
+
+    /**
+     * 车辆识别代码
+     */
+    @JsonProperty("VinNo")
+    private String VinNo;
+
+    /**
+     * 发动机号
+     */
+    @JsonProperty("EngineNo")
+    private String EngineNo;
+
+    /**
+     * 业务员
+     */
+    @JsonProperty("HandlerCode")
+    private String HandlerCode;
+
+    public YangGuangQueryVehicleModelRequest(CarInfoVo carInfo){
+        this.RequestNo = "ccsiQueryVehicleModel";
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+        this.RequestDate = LocalDateTime.now().format(formatter);
+        this.ModelName = carInfo.getModelcname();
+        this.ComCode = "30515708";
+        this.IsNewCar = getIsNewCar();
+        this.PageNo = "1";
+        this.VinNo = carInfo.getFrameNo();
+        this.EngineNo = carInfo.getEngineNo();
+        this.HandlerCode = "30510961";
+
+    }
+
+
+}

+ 198 - 0
src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangSubmitRequest.java

@@ -0,0 +1,198 @@
+package com.ydtech.modules.order.entity.api.yangguang.request;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.swagger.models.auth.In;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 投保单提交
+ */
+
+@NoArgsConstructor
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class YangGuangSubmitRequest extends YangGuangBaseRequest{
+    /**
+     * 交易流水号
+     */
+    @JsonProperty("InfotransNo")
+    private String InfotransNo;
+
+    /**
+     * 投保类型
+     * 1单商业/2单交强/3交商同保
+     */
+    @JsonProperty("PolicyType")
+    private String PolicyType;
+    /**
+     * 电子发票标识(1.电子发票 2.纸质发票)
+     */
+    @JsonProperty("ElecinvoiceFlag")
+    private String ElecinvoiceFlag;
+    /**
+     * 录单设备Ip
+     */
+    @JsonProperty("RzIp")
+    private String RzIp;
+    /**
+     * 录单设备网卡
+     */
+    @JsonProperty("Mac")
+    private String Mac;
+    /**
+     * 录单设备类型(0代表不可移动设备,1代表可移动设备)
+     */
+    @JsonProperty("ClientDevice")
+    private String ClientDevice;
+    /**
+     * 商业险特别约定
+     */
+    @JsonProperty("biClauseList")
+    private List<BiClauseList> biClauseList;
+    /**
+     * 交强险险特别约定
+     */
+    @JsonProperty("ciClauseList")
+    private List<CiClauseList> ciClauseList;
+    /**
+     *  团车专票信息
+     */
+    @JsonProperty("customerList")
+    private CustomerList customerList;
+    /**
+     *  关系人信息
+     */
+    @JsonProperty("insuredList")
+    private List<InsuredList> insuredList;
+
+    /**
+     * 商业险特别约定
+     */
+    public static class BiClauseList implements Serializable {
+        /**
+         * 特约编码
+         */
+        @JsonProperty("ClauseCode")
+        private String ClauseCode;
+        /**
+         * 特约内容
+         */
+        @JsonProperty("Clause")
+        private String Clause;
+        /**
+         * 特约编码名称
+         */
+        @JsonProperty("ClauseName")
+        private String ClauseName;
+    }
+    /**
+     * 交强险特别约定
+     */
+    public static class CiClauseList implements Serializable {
+        /**
+         * 特约编码
+         */
+        @JsonProperty("ClauseCode")
+        private String ClauseCode;
+        /**
+         * 特约内容
+         */
+        @JsonProperty("Clause")
+        private String Clause;
+        /**
+         * 特约编码名称
+         */
+        @JsonProperty("ClauseName")
+        private String ClauseName;
+    }
+
+    public static class CustomerList implements Serializable {
+        /**
+         * 投被保人是否一致 0.不一致/1.一致
+         */
+        @JsonProperty("customerFlag")
+        private String customerFlag;
+
+        /**
+         * 关系人标志
+         * 1.被保险人/2.投保人
+         */
+        @JsonProperty("InsuredFlag")
+        private String InsuredFlag;
+
+        /**
+         * 纳税人类型
+         */
+        @JsonProperty("Taxpayertype")
+        private String Taxpayertype;
+
+        /**
+         * 是否开增值税发票
+         *  0否1是
+         */
+        @JsonProperty("Vatinvoiceflag")
+        private String Vatinvoiceflag;
+
+        /**
+         * 纳税人识别号
+         */
+        @JsonProperty("Taxpayernumber")
+        private String Taxpayernumber;
+        /**
+         * 税务公司登记地址
+         */
+        @JsonProperty("Revenueaddress")
+        private String Revenueaddress;
+    }
+
+    public static class InsuredList implements Serializable {
+        /**
+         * 关系性质代码
+         * 1个人/2单位(团体)
+         */
+        @JsonProperty("InsuredType")
+        private String InsuredType;
+
+        /**
+         *  关系人标志
+         *  1.被保险人/2.投保人
+         */
+        @JsonProperty("InsuredFlag")
+        private String InsuredFlag;
+
+        /**
+         * 关系人证件类型
+         */
+        @JsonProperty("IdentifyType")
+        private String IdentifyType;
+
+        /**
+         * 关系人证件号码
+         */
+        @JsonProperty("IdentifyNumber")
+        private String IdentifyNumber;
+
+        /**
+         * 关系人地址
+         */
+        @JsonProperty("PostAddress")
+        private String PostAddress;
+
+        /**
+         * 手机号
+         */
+        @JsonProperty("Mobile")
+        private String Mobile;
+
+        /**
+         * 关系人名称
+         */
+        @JsonProperty("Name")
+        private String Name;
+    }
+}

+ 36 - 0
src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangAutoWriteOffResponse.java

@@ -0,0 +1,36 @@
+package com.ydtech.modules.order.entity.api.yangguang.response;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+public class YangGuangAutoWriteOffResponse extends YangGuangBaseResponse {
+    /**
+     *  成功返回信息
+     */
+    @JsonProperty("ResponseMessage")
+    private String ResponseMessage;
+
+    /**
+     *  失败错误返回信息(成功时为空)
+     */
+    @JsonProperty("ErrorMessage")
+    private String ErrorMessage;
+
+    /**
+     *  返回码(0-成功,非0-失败)
+     */
+    @JsonProperty("ErrorCode")
+    private String ErrorCode;
+
+    /**
+     *  返回报文时间
+     *  时间格式 yyyy-MM-dd HH:mm:ss
+     */
+    @JsonProperty("ResponseDate")
+    private String ResponseDate;
+}

+ 20 - 0
src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangBaseResponse.java

@@ -0,0 +1,20 @@
+package com.ydtech.modules.order.entity.api.yangguang.response;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+
+@Data
+public class YangGuangBaseResponse {
+
+    @JsonProperty("ResponseMessage")
+    private String ResponseMessage;
+
+    @JsonProperty("ErrorMessage")
+    private String ErrorMessage;
+
+    @JsonProperty("ErrorCode")
+    private String ErrorCode;
+
+    @JsonProperty("ResponseDate")
+    private String ResponseDate;
+}

+ 36 - 0
src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangCallbackResponse.java

@@ -0,0 +1,36 @@
+package com.ydtech.modules.order.entity.api.yangguang.response;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+public class YangGuangCallbackResponse extends YangGuangBaseResponse {
+    /**
+     *  成功返回信息
+     */
+    @JsonProperty("ResponseMessage")
+    private String ResponseMessage;
+
+    /**
+     *  失败错误返回信息(成功时为空)
+     */
+    @JsonProperty("ErrorMessage")
+    private String ErrorMessage;
+
+    /**
+     *  返回码(0-成功,非0-失败)
+     */
+    @JsonProperty("ErrorCode")
+    private String ErrorCode;
+
+    /**
+     *  返回报文时间
+     *  时间格式 yyyy-MM-dd HH:mm:ss
+     */
+    @JsonProperty("ResponseDate")
+    private String ResponseDate;
+}

+ 17 - 0
src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangElecApplicationSignResponse.java

@@ -0,0 +1,17 @@
+package com.ydtech.modules.order.entity.api.yangguang.response;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+public class YangGuangElecApplicationSignResponse extends YangGuangBaseResponse {
+    /**
+     *  电子投保单签署 URL
+     */
+    @JsonProperty("SignURL")
+    private String SignURL;
+}

+ 17 - 0
src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangGetEpolicyPdfUrlResponse.java

@@ -0,0 +1,17 @@
+package com.ydtech.modules.order.entity.api.yangguang.response;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+public class YangGuangGetEpolicyPdfUrlResponse extends YangGuangBaseResponse {
+    /**
+     *  电子保单PDF地址
+     */
+    @JsonProperty("EPolicyPDFURL")
+    private String EPolicyPDFURL;
+}

+ 85 - 0
src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangGetNonVehicleProductsResponse.java

@@ -0,0 +1,85 @@
+package com.ydtech.modules.order.entity.api.yangguang.response;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.util.List;
+
+@NoArgsConstructor
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class YangGuangGetNonVehicleProductsResponse extends YangGuangBaseResponse{
+    /**
+     *  产品信息部分
+     */
+    @JsonProperty("nonVehicleProducts")
+    private List<NonVehicleProducts> nonVehicleProducts;
+
+    public static class NonVehicleProducts implements Serializable {
+        /**
+         *  产品代码
+         */
+        @JsonProperty("productCode")
+        private String productCode;
+
+        /**
+         * 产品名称
+         */
+        @JsonProperty("productName")
+        private String productName;
+
+        /**
+         *  每份保费
+         */
+        @JsonProperty("premium")
+        private String premium;
+
+        /**
+         *  最小投保年龄
+         */
+        @JsonProperty("minInsuredAge")
+        private String minInsuredAge;
+
+        /**
+         *  最大投保年龄
+         */
+        @JsonProperty("maxInsuredAge")
+        private String maxInsuredAge;
+
+        /**
+         *  最大可购买份数
+         */
+        @JsonProperty("maxPurchaseNumber")
+        private String maxPurchaseNumber;
+
+
+        /**
+         *  是否是合并报价产品,1-是;0-不是
+         */
+        @JsonProperty("unionFlag")
+        private String unionFlag;
+
+        /**
+         * 保障范围(集合)
+         */
+        @JsonProperty("productDetails")
+        private List<ProductDetails> productDetails;
+
+        public static class ProductDetails implements Serializable {
+            /**
+             *  保障项目
+             */
+            @JsonProperty("coverage")
+            private String coverage;
+
+            /**
+             *  单份保额
+             */
+            @JsonProperty("sumInsured")
+            private String sumInsured;
+        }
+    }
+}

+ 29 - 0
src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangPaymentResponse.java

@@ -0,0 +1,29 @@
+package com.ydtech.modules.order.entity.api.yangguang.response;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+public class YangGuangPaymentResponse extends YangGuangBaseResponse{
+    /**
+     *  0-线上支付收银台连接   1-电子签名短信连接
+     */
+    @JsonProperty("Flag")
+    private String Flag;
+
+    /**
+     *  支付地址,可以跳转到阳光保险收银台 或 车商渠道必须返回电子签名
+     */
+    @JsonProperty("PayUrl")
+    private String PayUrl;
+
+    /**
+     *  支付地址,可以跳转到阳光保险收银台 或 车商渠道必须返回电子签名
+     */
+    @JsonProperty("SignURL")
+    private String SignURL;
+}

+ 103 - 0
src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangProposalStatusQueryResponse.java

@@ -0,0 +1,103 @@
+package com.ydtech.modules.order.entity.api.yangguang.response;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+public class YangGuangProposalStatusQueryResponse extends YangGuangBaseResponse {
+    /**
+     *  商业险投保单号
+     */
+    @JsonProperty("BiProposalNo")
+    private String BiProposalNo;
+
+    /**
+     *  交强险投保单号
+     */
+    @JsonProperty("CiProposalNo")
+    private String CiProposalNo;
+
+    /**
+     *  商业险核保结果
+     */
+    @JsonProperty("BiUnderWriteFlag")
+    private String BiUnderWriteFlag;
+
+    /**
+     *  交强险核保结果
+     */
+    @JsonProperty("CiUnderWriteFlag")
+    private String CiUnderWriteFlag;
+
+    /**
+     *  商业险核保信息
+     */
+    @JsonProperty("BiUnderWriteMsg")
+    private String BiUnderWriteMsg;
+
+    /**
+     *  交强险核保信息
+     */
+    @JsonProperty("CiUnderWriteMsg")
+    private String CiUnderWriteMsg;
+
+    /**
+     *  商业险保单号
+     */
+    @JsonProperty("BiPolicyNo")
+    private String BiPolicyNo;
+
+    /**
+     *  交强险保单号
+     */
+    @JsonProperty("CiPolicyNo")
+    private String CiPolicyNo;
+
+    /**
+     *  商业险核保时间
+     */
+    @JsonProperty("BiUnderWriteDate")
+    private String BiUnderWriteDate;
+
+    /**
+     *  交强险核保时间
+     */
+    @JsonProperty("CiUnderWriteDate")
+    private String CiUnderWriteDate;
+
+    /**
+     *  商业险承保时间
+     */
+    @JsonProperty("BiPolicyIssueDate")
+    private String BiPolicyIssueDate;
+
+    /**
+     *  交强险承保时间
+     */
+    @JsonProperty("CiPolicyIssueDate")
+    private String CiPolicyIssueDate;
+
+    /**
+     *  商业险电子签名状态(0-未签署;1-已签署;2-无需签署)
+     */
+    @JsonProperty("BiSignStatus")
+    private String BiSignStatus;
+
+    /**
+     *  交强险电子签名状态(0-未签署;1-已签署;2-无需签署)
+     */
+    @JsonProperty("CiSignStatus")
+    private String CiSignStatus;
+
+    /**
+     *  非车险保单号
+     */
+    @JsonProperty("FCPolicyNo")
+    private String FCPolicyNo;
+
+
+}

+ 253 - 0
src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangQueryVehicleModelResponse.java

@@ -0,0 +1,253 @@
+package com.ydtech.modules.order.entity.api.yangguang.response;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+public class YangGuangQueryVehicleModelResponse extends YangGuangBaseResponse {
+
+    /**
+     *  交易流水号
+     */
+    @JsonProperty("InfotransNo")
+    private String InfotransNo;
+
+    /**
+     *  查询到总数
+     */
+    @JsonProperty("DataCounut")
+    private String DataCounut;
+
+    /**
+     *  车辆信息部分
+     */
+    @JsonProperty("carModelList")
+    private CarModelList carModelList;
+
+    /**
+     *  商业险续保信息部分
+     */
+    @JsonProperty("RenewalPolicyBi")
+    private RenewalPolicyBi renewalpolicybi;
+
+    /**
+     *  交强险续保信息部分
+     */
+    @JsonProperty("RenewalPolicyCi")
+    private RenewalPolicyCi renewalpolicyci;
+
+    /**
+     *  车辆信息部分
+     */
+    public static class CarModelList implements Serializable {
+        /**
+         *  精友车型名称
+         */
+        @JsonProperty("ModelName")
+        private String ModelName;
+
+        /**
+         *  车辆种类
+         * 轿车类/越野类等
+         */
+        @JsonProperty("CarKind")
+        private String CarKind;
+
+        /**
+         *  产地 A进口/B国产
+         */
+        @JsonProperty("CarStyle")
+        private String CarStyle;
+
+        /**
+         *  上市时间
+         */
+        @JsonProperty("CarYear")
+        private String CarYear;
+
+        /**
+         *  整备质量
+         */
+        @JsonProperty("Completekerbmass")
+        private String Completekerbmass;
+
+        /**
+         *  排量 单位L
+         */
+        @JsonProperty("Exhaustscale")
+        private String Exhaustscale;
+
+        /**
+         *  出厂公司
+         */
+        @JsonProperty("Factory")
+        private String Factory;
+
+        /**
+         *  精友车型编码
+         */
+        @JsonProperty("ModelCode")
+        private String ModelCode;
+
+        /**
+         *  返回车型ID号
+         */
+        @JsonProperty("Modelinfoid")
+        private String Modelinfoid;
+
+        /**
+         *  新车购置价
+         */
+        @JsonProperty("Purchaseprice")
+        private String Purchaseprice;
+
+        /**
+         *  交强险续保信息部分
+         */
+        @JsonProperty("RenewalPolicyCi")
+        private String renewalpolicyci;
+
+        /**
+         *  备注
+         */
+        @JsonProperty("Remark")
+        private String Remark;
+
+        /**
+         *  座位数
+         */
+        @JsonProperty("Seatcount")
+        private String Seatcount;
+
+        /**
+         *  吨位数(T)
+         */
+        @JsonProperty("Toncount")
+        private String Toncount;
+
+        /**
+         *  档位描述
+         */
+        @JsonProperty("Transmissionype")
+        private String Transmissionype;
+
+        /**
+         *  行业车型编码
+         */
+        @JsonProperty("VehicleCode")
+        private String VehicleCode;
+
+        /**
+         *  行业车型名称
+         */
+        @JsonProperty("VehicleName")
+        private String VehicleName;
+
+        /**
+         *  功率(KW)(选择性接收)
+         */
+        @JsonProperty("powerscale")
+        private String powerscale;
+
+        /**
+         *  能源种类
+         */
+        @JsonProperty("fuelType")
+        private String fuelType;
+
+        /**
+         *  北京交强交管能源种类
+         */
+        @JsonProperty("fueltypeBJCI")
+        private String fueltypeBJCI;
+
+        /**
+         *  精友返回能源类型字段
+         */
+        @JsonProperty("powertypeCode")
+        private String powertypeCode;
+
+        /**
+         *  精友是否认定新能源车字段
+         */
+        @JsonProperty("thirdpartyNewenergyflag")
+        private String thirdpartyNewenergyflag;
+    }
+
+    /**
+     *  商业险续保信息部分
+     */
+    public static class RenewalPolicyBi implements Serializable {
+        /**
+         *  保单即时生效标志(0-否;1-是)
+         */
+        @JsonProperty("ImmevalidFlag")
+        private String ImmevalidFlag;
+
+        /**
+         *  即时生效起保时间(yyyy-MM-dd HH:mm:ss)
+         */
+        @JsonProperty("ImmevalidStartDate")
+        private String ImmevalidStartDate;
+
+        /**
+         *  即时生效终保时间(yyyy-MM-dd HH:mm:ss)
+         */
+        @JsonProperty("InnevalidEndDate")
+        private String InnevalidEndDate;
+
+        /**
+         *  起保日期(yyyy-MM-dd HH:mm:ss)
+         */
+        @JsonProperty("StartDate")
+        private String StartDate;
+
+        /**
+         *  终保日期(yyyy-MM-dd HH:mm:ss)
+         */
+        @JsonProperty("EndDate")
+        private String EndDate;
+    }
+
+    /**
+     *  交强险续保信息部分
+     */
+    public static class RenewalPolicyCi implements Serializable {
+        /**
+         *  保单即时生效标志(0-否;1-是)
+         */
+        @JsonProperty("ImmevalidFlag")
+        private String ImmevalidFlag;
+
+        /**
+         *  即时生效起保时间(yyyy-MM-dd HH:mm:ss)
+         */
+        @JsonProperty("ImmevalidStartDate")
+        private String ImmevalidStartDate;
+
+        /**
+         *  即时生效终保时间(yyyy-MM-dd HH:mm:ss)
+         */
+        @JsonProperty("InnevalidEndDate")
+        private String InnevalidEndDate;
+
+        /**
+         *  起保日期(yyyy-MM-dd HH:mm:ss)
+         */
+        @JsonProperty("StartDate")
+        private String StartDate;
+
+        /**
+         *  终保日期(yyyy-MM-dd HH:mm:ss)
+         */
+        @JsonProperty("EndDate")
+        private String EndDate;
+
+    }
+}

+ 120 - 0
src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangSubmitResponse.java

@@ -0,0 +1,120 @@
+package com.ydtech.modules.order.entity.api.yangguang.response;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.util.List;
+
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+public class YangGuangSubmitResponse extends YangGuangBaseResponse {
+    /**
+     * 商业险核保结果
+     * 1	通过
+     * 2	失败
+     * 3	转人工核保	转人工判断由阳光规则系统处理
+     * 4	预提核	新增预提核
+     */
+    @JsonProperty("BiUnderWriteFlag")
+    private String BiUnderWriteFlag;
+
+    /**
+     * 交强险核保结果
+     * 1	通过
+     * 2	失败
+     * 3	转人工核保	转人工判断由阳光规则系统处理
+     * 4	预提核	新增预提核
+     */
+    @JsonProperty("CiUnderWriteFlag")
+    private String CiUnderWriteFlag;
+
+    /**
+     * 商业险核保信息
+     */
+    @JsonProperty("BiUnderWriteMsg")
+    private String BiUnderWriteMsg;
+
+    /**
+     * 交强险核保信息
+     */
+    @JsonProperty("CiUnderWriteMsg")
+    private String CiUnderWriteMsg;
+
+    /**
+     * 商业险总实收保费
+     */
+    @JsonProperty("BiSumPremium")
+    private String BiSumPremium;
+
+    /**
+     * 交强险总实收保费
+     */
+    @JsonProperty("CiSumPremium")
+    private String CiSumPremium;
+
+    /**
+     * 车船税总金额
+     */
+    @JsonProperty("CarShipTax")
+    private String CarShipTax;
+
+    /**
+     * 交易流水号
+     */
+    @JsonProperty("InfotransNo")
+    private String InfotransNo;
+
+    /**
+     * 商业险投保单号
+     */
+    @JsonProperty("BiProposalNo")
+    private String BiProposalNo;
+
+    /**
+     * 交强险投保单号
+     */
+    @JsonProperty("CiProposalNo")
+    private String CiProposalNo;
+
+    /**
+     *(0:无需认证;1:短信认证;2:实名认证)
+     */
+    @JsonProperty("Authenticationstatecode")
+    private String Authenticationstatecode;
+
+    /**
+     * 特别约定
+     */
+    @JsonProperty("Clause")
+    private List<Clause> Clause;
+
+    public static class Clause implements Serializable {
+        /**
+         * 特约编码
+         */
+        @JsonProperty("ClauseCode")
+        private String ClauseCode;
+
+        /**
+         * 特约内容
+         */
+        @JsonProperty("Clause")
+        private String Clause;
+
+        /**
+         * 特约编码名称
+         */
+        @JsonProperty("ClauseName")
+        private String ClauseName;
+
+        /**
+         * 险种类型(0507交强;0528商业)
+         */
+        @JsonProperty("riskCode")
+        private String riskCode;
+    }
+}

+ 26 - 0
src/main/java/com/ydtech/modules/order/entity/config/YangGuangConfigureParameters.java

@@ -0,0 +1,26 @@
+package com.ydtech.modules.order.entity.config;
+
+import lombok.Data;
+
+/**
+ * @version
+ * @description: 阳光财险配置
+ * @author: quchen
+ * @date: 2024/10/29 14:22
+ **/
+@Data
+public class YangGuangConfigureParameters implements ConfigureParameters{
+
+
+    /**
+     * 投保机构代码
+     */
+    private String ComCode;
+
+    /**
+     * 密钥
+     */
+    private String token;
+
+
+}

+ 14 - 0
src/main/java/com/ydtech/modules/order/service/YangGuangOrderApiService.java

@@ -0,0 +1,14 @@
+package com.ydtech.modules.order.service;
+
+import com.ydtech.core.page.HttpResult;
+import com.ydtech.modules.ins.model.vo.QuoteRespVo;
+import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
+import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
+
+public interface YangGuangOrderApiService {
+
+    /**
+     *  报价接口
+     */
+    HttpResult<QuoteRespVo> quote(BaseQuoteInfoVo quoteInfoVo);
+}

+ 49 - 0
src/main/java/com/ydtech/modules/order/service/impl/YangGuangOrderApiServiceImpl.java

@@ -0,0 +1,49 @@
+package com.ydtech.modules.order.service.impl;
+
+import com.ydtech.core.page.HttpResult;
+import com.ydtech.modules.ins.model.vo.QuoteRespVo;
+import com.ydtech.modules.order.components.ConfigureParametersComponents;
+import com.ydtech.modules.order.components.yangguang.YangGuangRequestApiComponents;
+import com.ydtech.modules.order.entity.api.yangguang.request.YangGuangQueryVehicleModelRequest;
+import com.ydtech.modules.order.entity.api.yangguang.response.YangGuangQueryVehicleModelResponse;
+import com.ydtech.modules.order.entity.config.YangGuangConfigureParameters;
+import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
+import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
+import com.ydtech.modules.order.service.YangGuangOrderApiService;
+import com.ydtech.modules.protocol.entity.po.PtlAgreementAttribution;
+import com.ydtech.modules.protocol.service.PtlAgreementAttributionService;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.Date;
+
+@Service
+@Slf4j
+@RequiredArgsConstructor
+public class YangGuangOrderApiServiceImpl implements YangGuangOrderApiService {
+    private final PtlAgreementAttributionService ptlAgreementAttributionService;
+
+    private final ConfigureParametersComponents configureParametersComponents;
+
+    private final YangGuangRequestApiComponents yangGuangRequestApiComponents;
+    @Override
+    public HttpResult<QuoteRespVo> quote(BaseQuoteInfoVo quoteInfoVo) {
+        // 通过协议获取配置实体
+//        String agreementId = quoteVo.getAgreementId();
+//        PtlAgreementAttribution ptlAgreementAttribution = ptlAgreementAttributionService.getById(agreementId);
+//        YangGuangConfigureParameters ygConfigureParameters = configureParametersComponents.toEntity(YangGuangConfigureParameters.class,
+//                ptlAgreementAttribution);
+//        HttpHeaders httpHeaders = yangGuangRequestApiComponents.
+//                );
+        // 查询车型
+        YangGuangQueryVehicleModelRequest yangGuangQueryVehicleModelRequest = new YangGuangQueryVehicleModelRequest(quoteInfoVo.getCarInfo());
+        yangGuangQueryVehicleModelRequest.setIsNewCar("1");
+        System.out.println(yangGuangQueryVehicleModelRequest);
+        YangGuangQueryVehicleModelResponse yangGuangQueryVehicleModelResponse = yangGuangRequestApiComponents.queryVehicleModel(yangGuangQueryVehicleModelRequest);
+        System.out.println(yangGuangQueryVehicleModelResponse);
+        return null;
+    }
+}

+ 7 - 0
src/main/resources/application-test.yml

@@ -436,6 +436,13 @@ pingan:
     sk: K9VIM2C6W2YWDWDVK6966F29229dYMDF
     signatureUrl: https://test.baoxianzhanggui.com/#/Signature
 
+# 阳光财险
+yangguang:
+  api:
+    testKey: uYPP7AIc3HYsUh8rFn
+    url: http://chexiantest.sinosig.com:7002/serviceCar/nonstandard.action?sysFlag=CCSI_SXJZG
+    productKey: hhSFrKjVGqFGz6GN
+
 xxl:
   job:
     admin:

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor