|
@@ -0,0 +1,452 @@
|
|
|
|
|
+package com.jzg.quotation.guoshou.crawler.util;
|
|
|
|
|
+
|
|
|
|
|
+import com.alibaba.fastjson2.JSONArray;
|
|
|
|
|
+import com.alibaba.fastjson2.JSONObject;
|
|
|
|
|
+import com.jzg.commons.entity.quote.vo.CarInfoVo;
|
|
|
|
|
+import com.jzg.commons.entity.quote.vo.CustomerInfoVo;
|
|
|
|
|
+import com.jzg.commons.entity.quote.vo.QuoteVo;
|
|
|
|
|
+import com.jzg.commons.entity.quote.vo.RiskInfoVo;
|
|
|
|
|
+import com.jzg.quotation.guoshou.crawler.entity.response.UserInfoResponse;
|
|
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
|
|
+
|
|
|
|
|
+import java.time.LocalDate;
|
|
|
|
|
+import java.util.List;
|
|
|
|
|
+import java.util.Objects;
|
|
|
|
|
+
|
|
|
|
|
+/**
|
|
|
|
|
+ * 模块化数据处理器 - 优化版
|
|
|
|
|
+ * 功能:根据产品白名单处理核保信息模块,填充、加密、显隐控制字段
|
|
|
|
|
+ * 保留所有JSON null字段
|
|
|
|
|
+ */
|
|
|
|
|
+
|
|
|
|
|
+@Component
|
|
|
|
|
+public class ModularDataProcessor {
|
|
|
|
|
+
|
|
|
|
|
+ // ====================== 常量定义 ======================
|
|
|
|
|
+ /** 白名单产品ID */
|
|
|
|
|
+ private static final List<String> VALID_PRODUCT_IDS = List.of(
|
|
|
|
|
+ "fd2dc8abe5f94eacbc8efd3bf62a8581",
|
|
|
|
|
+ "39f47efbd6004899b4fa7c80bfdba801",
|
|
|
|
|
+ "54b7cce17316444aade70427d8abea0a",
|
|
|
|
|
+ "7e1108d1db2c428d8cf35e3e6896bb15",
|
|
|
|
|
+ "fc9cd193ce444508b355b5d5522ffc00",
|
|
|
|
|
+ "71d3c2271fe5404d82c78fb07d116cf0",
|
|
|
|
|
+ "77bcfb9bff014a93bfca0ed792c30258",
|
|
|
|
|
+ "new-2d0bc85a46c799ff4ad0c8521348",
|
|
|
|
|
+ "f65730fe001a4c998aabc1d2e7258a96"
|
|
|
|
|
+ );
|
|
|
|
|
+
|
|
|
|
|
+ private static final String TYPE_1 = "1";
|
|
|
|
|
+ private static final String DISPLAY_BLOCK = "block";
|
|
|
|
|
+ private static final String DISPLAY_NONE = "none";
|
|
|
|
|
+ private static final String MUST_FILL_0 = "0";
|
|
|
|
|
+ private static final String MUST_FILL_2 = "2";
|
|
|
|
|
+ private static final String FIELD_TYPE_NEGATIVE_1 = "-1";
|
|
|
|
|
+ private static final String READONLY_1 = "1";
|
|
|
|
|
+
|
|
|
|
|
+ public void processModularData(JSONArray modularList, String productId, QuoteVo quoteVo,
|
|
|
|
|
+ String seat, JSONObject jsonObject, UserInfoResponse.UserData loginInfo,
|
|
|
|
|
+ String branchOfficeName, JSONObject data8vo) {
|
|
|
|
|
+ // 非白名单产品直接返回
|
|
|
|
|
+ if (!VALID_PRODUCT_IDS.contains(productId)) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 提取基础信息(空值安全)
|
|
|
|
|
+ CarInfoVo carInfoVo = quoteVo.getCarInfoVo();
|
|
|
|
|
+ CustomerInfoVo policyHolder = quoteVo.getPolicyHolderInfo();
|
|
|
|
|
+ CustomerInfoVo insuredPerson = quoteVo.getInsuredPersonInfo();
|
|
|
|
|
+
|
|
|
|
|
+ // 遍历模块列表
|
|
|
|
|
+ for (int i = 0; i < modularList.size(); i++) {
|
|
|
|
|
+ JSONObject modular = modularList.getJSONObject(i);
|
|
|
|
|
+ if (modular == null) {
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ Integer sortNo = modular.getInteger("sortNo");
|
|
|
|
|
+ JSONArray infoList = modular.getJSONArray("ncispUnderwritingInfoList");
|
|
|
|
|
+ if (sortNo == null || infoList == null) {
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 根据sortNo处理对应模块
|
|
|
|
|
+ JSONArray newInfoList = switch (sortNo) {
|
|
|
|
|
+ case 0 -> handleSortNoZero(infoList, policyHolder);
|
|
|
|
|
+ case 100 -> handleSortNoHundred(infoList, insuredPerson);
|
|
|
|
|
+ case 200 -> handleSortNoTwoHundred(infoList, carInfoVo);
|
|
|
|
|
+ case 300, 600 -> handleSortNoThreeHundredOrSixHundred(infoList, seat);
|
|
|
|
|
+ case 9999 -> handleSortNoMax(infoList);
|
|
|
|
|
+ default -> new JSONArray();
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ // 模块统一设置(保留原有逻辑)
|
|
|
|
|
+ if (List.of(0, 100, 200, 9999).contains(sortNo)) {
|
|
|
|
|
+ modular.put("selected", true);
|
|
|
|
|
+ }
|
|
|
|
|
+ // 保留所有null字段,强制覆盖
|
|
|
|
|
+ modular.put("ncispUnderwritingInfoList", newInfoList);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ overwriteData(data8vo, productId, jsonObject, loginInfo, branchOfficeName, quoteVo);
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // ====================== 模块处理方法(拆分后职责单一) ======================
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 处理 sortNo = 0 投保人信息模块
|
|
|
|
|
+ */
|
|
|
|
|
+ private JSONArray handleSortNoZero(JSONArray infoList, CustomerInfoVo policyHolder) {
|
|
|
|
|
+ JSONArray newList = new JSONArray();
|
|
|
|
|
+ String today = LocalDate.now().toString();
|
|
|
|
|
+
|
|
|
|
|
+ for (int i = 0; i < infoList.size(); i++) {
|
|
|
|
|
+ JSONObject item = infoList.getJSONObject(i);
|
|
|
|
|
+ if (item == null) {
|
|
|
|
|
+ newList.add(null); // 保留null
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ String fieldName = item.getString("backEndTranslationNameYl");
|
|
|
|
|
+ String type = item.getString("type");
|
|
|
|
|
+
|
|
|
|
|
+ if (TYPE_1.equals(type)) {
|
|
|
|
|
+ switch (fieldName) {
|
|
|
|
|
+ case "customerName" -> setEncryptedField(item, policyHolder.getName());
|
|
|
|
|
+ case "mobile" -> setEncryptedField(item, policyHolder.getMobile());
|
|
|
|
|
+ case "identifyType" -> {
|
|
|
|
|
+ item.put("readonly", READONLY_1);
|
|
|
|
|
+ item.put("fieldValue", "idCard");
|
|
|
|
|
+ item.put("fieldValueName", "居民身份证");
|
|
|
|
|
+ item.put("mustFill", MUST_FILL_2);
|
|
|
|
|
+ item.put("display", DISPLAY_BLOCK);
|
|
|
|
|
+ }
|
|
|
|
|
+ case "identifyNumber" -> setEncryptedField(item, policyHolder.getIdentifyNumber());
|
|
|
|
|
+ case "age" -> item.put("display", DISPLAY_NONE);
|
|
|
|
|
+ case "sex" -> {
|
|
|
|
|
+ String sexVal = item.getString("fieldValueName");
|
|
|
|
|
+ item.put("fieldValueName", "2".equals(sexVal) ? "女" : "男");
|
|
|
|
|
+ item.put("fieldValue", "1");
|
|
|
|
|
+ item.put("display", DISPLAY_NONE);
|
|
|
|
|
+ }
|
|
|
|
|
+ case "identifyEffectiveStartDate" -> {
|
|
|
|
|
+ item.put("fieldType", FIELD_TYPE_NEGATIVE_1);
|
|
|
|
|
+ item.put("mustFill", MUST_FILL_0);
|
|
|
|
|
+ item.put("display", DISPLAY_BLOCK);
|
|
|
|
|
+ item.put("minDate", "1900-01-01");
|
|
|
|
|
+ item.put("maxDate", today);
|
|
|
|
|
+ }
|
|
|
|
|
+ case "identifyEffectiveTerm" -> {
|
|
|
|
|
+ item.put("fieldType", FIELD_TYPE_NEGATIVE_1);
|
|
|
|
|
+ item.put("fieldValue", "100");
|
|
|
|
|
+ item.put("mustFill", MUST_FILL_0);
|
|
|
|
|
+ item.put("display", DISPLAY_BLOCK);
|
|
|
|
|
+ }
|
|
|
|
|
+ case "citizenship" -> item.put("display", DISPLAY_BLOCK);
|
|
|
|
|
+ case "provinceCode" -> {
|
|
|
|
|
+ item.put("readonly", READONLY_1);
|
|
|
|
|
+ item.put("fieldDescribe", "省市地区");
|
|
|
|
|
+ item.put("fieldValue", policyHolder.getProvinceCode());
|
|
|
|
|
+ item.put("fieldValueName", policyHolder.getProvince());
|
|
|
|
|
+ item.put("areaCodeList", List.of(
|
|
|
|
|
+ policyHolder.getProvinceCode(),
|
|
|
|
|
+ policyHolder.getCityCode(),
|
|
|
|
|
+ policyHolder.getCountyCode()
|
|
|
|
|
+ ));
|
|
|
|
|
+ item.put("remarks", policyHolder.getProvince());
|
|
|
|
|
+ item.put("display", DISPLAY_BLOCK);
|
|
|
|
|
+ }
|
|
|
|
|
+ case "cityCode" -> {
|
|
|
|
|
+ item.put("readonly", READONLY_1);
|
|
|
|
|
+ item.put("fieldValue", policyHolder.getCityCode());
|
|
|
|
|
+ item.put("fieldValueName", policyHolder.getCity());
|
|
|
|
|
+ item.put("remarks", policyHolder.getCity());
|
|
|
|
|
+ item.put("display", DISPLAY_NONE);
|
|
|
|
|
+ }
|
|
|
|
|
+ case "districtCode" -> {
|
|
|
|
|
+ item.put("readonly", READONLY_1);
|
|
|
|
|
+ item.put("fieldValue", policyHolder.getCountyCode());
|
|
|
|
|
+ item.put("fieldValueName", policyHolder.getCounty());
|
|
|
|
|
+ item.put("remarks", policyHolder.getCounty());
|
|
|
|
|
+ item.put("display", DISPLAY_NONE);
|
|
|
|
|
+ }
|
|
|
|
|
+ case "email" -> {
|
|
|
|
|
+ if (item.get("type") == null) {
|
|
|
|
|
+ item.put("display", DISPLAY_BLOCK);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ newList.add(item); // 保留所有字段,包括null
|
|
|
|
|
+ }
|
|
|
|
|
+ return newList;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 处理 sortNo = 100 被保人信息模块
|
|
|
|
|
+ */
|
|
|
|
|
+ private JSONArray handleSortNoHundred(JSONArray infoList, CustomerInfoVo insuredPerson) {
|
|
|
|
|
+ JSONArray newList = new JSONArray();
|
|
|
|
|
+ String today = LocalDate.now().toString();
|
|
|
|
|
+
|
|
|
|
|
+ for (int i = 0; i < infoList.size(); i++) {
|
|
|
|
|
+ JSONObject item = infoList.getJSONObject(i);
|
|
|
|
|
+ if (item == null) {
|
|
|
|
|
+ newList.add(null);
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ String fieldName = item.getString("backEndTranslationNameYl");
|
|
|
|
|
+ String type = item.getString("type");
|
|
|
|
|
+
|
|
|
|
|
+ if (TYPE_1.equals(type)) {
|
|
|
|
|
+ switch (fieldName) {
|
|
|
|
|
+ case "relationToApplicantCode" -> {
|
|
|
|
|
+ item.put("fieldValue", "1");
|
|
|
|
|
+ item.put("fieldValueName", "本人");
|
|
|
|
|
+ item.put("display", DISPLAY_BLOCK);
|
|
|
|
|
+ }
|
|
|
|
|
+ case "customerName" -> {
|
|
|
|
|
+ item.put("display", DISPLAY_NONE);
|
|
|
|
|
+ setEncryptedFieldValueOnly(item, insuredPerson.getName());
|
|
|
|
|
+ }
|
|
|
|
|
+ case "mobile" -> {
|
|
|
|
|
+ item.put("display", DISPLAY_NONE);
|
|
|
|
|
+ setEncryptedFieldValueOnly(item, insuredPerson.getMobile());
|
|
|
|
|
+ }
|
|
|
|
|
+ case "identifyType" -> {
|
|
|
|
|
+ item.put("display", DISPLAY_NONE);
|
|
|
|
|
+ item.put("fieldValueName", "居民身份证");
|
|
|
|
|
+ }
|
|
|
|
|
+ case "identifyNumber" -> {
|
|
|
|
|
+ item.put("display", DISPLAY_NONE);
|
|
|
|
|
+ setEncryptedFieldValueOnly(item, insuredPerson.getIdentifyNumber());
|
|
|
|
|
+ }
|
|
|
|
|
+ case "sex" -> {
|
|
|
|
|
+ String sexVal = item.getString("fieldValueName");
|
|
|
|
|
+ item.put("fieldValueName", "2".equals(sexVal) ? "女" : "男");
|
|
|
|
|
+ item.put("display", DISPLAY_NONE);
|
|
|
|
|
+ }
|
|
|
|
|
+ case "citizenship", "age" -> item.put("display", DISPLAY_NONE);
|
|
|
|
|
+ case "identifyEffectiveStartDate" -> {
|
|
|
|
|
+ item.put("minDate", "1900-01-01");
|
|
|
|
|
+ item.put("maxDate", today);
|
|
|
|
|
+ item.put("display", DISPLAY_NONE);
|
|
|
|
|
+ item.put("mustFill", MUST_FILL_0);
|
|
|
|
|
+ }
|
|
|
|
|
+ case "identifyEffectiveTerm" -> {
|
|
|
|
|
+ item.put("display", DISPLAY_NONE);
|
|
|
|
|
+ item.put("mustFill", MUST_FILL_0);
|
|
|
|
|
+ }
|
|
|
|
|
+ case "provinceCode" -> {
|
|
|
|
|
+ item.put("fieldValue", insuredPerson.getProvinceCode());
|
|
|
|
|
+ item.put("fieldValueName", insuredPerson.getProvince());
|
|
|
|
|
+ item.put("fieldDescribe", "省市地区");
|
|
|
|
|
+ item.put("remarks", insuredPerson.getProvince());
|
|
|
|
|
+ item.put("areaCodeList", List.of(
|
|
|
|
|
+ insuredPerson.getProvinceCode(),
|
|
|
|
|
+ insuredPerson.getCityCode(),
|
|
|
|
|
+ insuredPerson.getCountyCode()
|
|
|
|
|
+ ));
|
|
|
|
|
+ item.put("display", DISPLAY_NONE);
|
|
|
|
|
+ }
|
|
|
|
|
+ case "cityCode" -> {
|
|
|
|
|
+ item.put("fieldValue", insuredPerson.getCityCode());
|
|
|
|
|
+ item.put("fieldValueName", insuredPerson.getCity());
|
|
|
|
|
+ item.put("remarks", insuredPerson.getCity());
|
|
|
|
|
+ item.put("display", DISPLAY_NONE);
|
|
|
|
|
+ }
|
|
|
|
|
+ case "districtCode" -> {
|
|
|
|
|
+ item.put("fieldValue", insuredPerson.getCountyCode());
|
|
|
|
|
+ item.put("fieldValueName", insuredPerson.getCounty());
|
|
|
|
|
+ item.put("remarks", insuredPerson.getCounty());
|
|
|
|
|
+ item.put("display", DISPLAY_NONE);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ newList.add(item);
|
|
|
|
|
+ }
|
|
|
|
|
+ return newList;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 处理 sortNo = 200 车辆信息模块
|
|
|
|
|
+ */
|
|
|
|
|
+ private JSONArray handleSortNoTwoHundred(JSONArray infoList, CarInfoVo carInfoVo) {
|
|
|
|
|
+ JSONArray newList = new JSONArray();
|
|
|
|
|
+
|
|
|
|
|
+ for (int i = 0; i < infoList.size(); i++) {
|
|
|
|
|
+ JSONObject item = infoList.getJSONObject(i);
|
|
|
|
|
+ if (item == null) {
|
|
|
|
|
+ newList.add(null);
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ String fieldName = item.getString("backEndTranslationNameYl");
|
|
|
|
|
+ if (item.get("type") == null) {
|
|
|
|
|
+ switch (fieldName) {
|
|
|
|
|
+ case "licensePlateNo" -> setEncryptedField(item, carInfoVo.getLicenseNo());
|
|
|
|
|
+ case "engineNumber" -> setEncryptedField(item, carInfoVo.getEngineNo());
|
|
|
|
|
+ case "frameNo" -> setEncryptedField(item, carInfoVo.getVinNo());
|
|
|
|
|
+ case "passengersNumber" -> {
|
|
|
|
|
+ item.put("readonly", READONLY_1);
|
|
|
|
|
+ String seatNum = carInfoVo.getSeatCount();
|
|
|
|
|
+ item.put("fieldValue", seatNum);
|
|
|
|
|
+ item.put("fieldValueName", seatNum + "座");
|
|
|
|
|
+ item.put("mustFill", MUST_FILL_2);
|
|
|
|
|
+ item.put("display", DISPLAY_BLOCK);
|
|
|
|
|
+ }
|
|
|
|
|
+ case "carUserNatureCode" -> {
|
|
|
|
|
+ item.put("readonly", READONLY_1);
|
|
|
|
|
+ item.put("fieldValue", "8A");
|
|
|
|
|
+ item.put("fieldValueName", "家庭自用");
|
|
|
|
|
+ item.put("mustFill", MUST_FILL_2);
|
|
|
|
|
+ item.put("display", DISPLAY_BLOCK);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ newList.add(item);
|
|
|
|
|
+ }
|
|
|
|
|
+ return newList;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 处理 sortNo = 300 / 600 座位数模块
|
|
|
|
|
+ */
|
|
|
|
|
+ private JSONArray handleSortNoThreeHundredOrSixHundred(JSONArray infoList, String seat) {
|
|
|
|
|
+ JSONArray newList = new JSONArray();
|
|
|
|
|
+ for (int i = 0; i < infoList.size(); i++) {
|
|
|
|
|
+ JSONObject item = infoList.getJSONObject(i);
|
|
|
|
|
+ if (item == null) {
|
|
|
|
|
+ newList.add(null);
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ String fieldName = item.getString("backEndTranslationNameYl");
|
|
|
|
|
+ if (item.get("type") == null && "passengersNumber".equals(fieldName)) {
|
|
|
|
|
+ item.put("fieldValue", String.valueOf(seat));
|
|
|
|
|
+ item.put("fieldValueName", seat + "座");
|
|
|
|
|
+ newList.add(item);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return newList;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 处理 sortNo = 9999 备注模块
|
|
|
|
|
+ */
|
|
|
|
|
+ private JSONArray handleSortNoMax(JSONArray infoList) {
|
|
|
|
|
+ JSONArray newList = new JSONArray();
|
|
|
|
|
+ for (int i = 0; i < infoList.size(); i++) {
|
|
|
|
|
+ JSONObject item = infoList.getJSONObject(i);
|
|
|
|
|
+ if (item == null) {
|
|
|
|
|
+ newList.add(null);
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ String fieldName = item.getString("backEndTranslationNameYl");
|
|
|
|
|
+ if (item.get("type") == null && "mark1".equals(fieldName)) {
|
|
|
|
|
+ item.put("display", DISPLAY_BLOCK);
|
|
|
|
|
+ newList.add(item);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return newList;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // ====================== 通用工具方法(复用逻辑) ======================
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 设置加密字段(通用投保人/车辆)
|
|
|
|
|
+ */
|
|
|
|
|
+ private void setEncryptedField(JSONObject item, String rawValue) {
|
|
|
|
|
+ item.put("fieldType", FIELD_TYPE_NEGATIVE_1);
|
|
|
|
|
+ item.put("mustFill", MUST_FILL_2);
|
|
|
|
|
+ item.put("display", DISPLAY_BLOCK);
|
|
|
|
|
+ String encrypted = RsaUtils.encrypt(rawValue);
|
|
|
|
|
+ item.put("fieldValue", encrypted);
|
|
|
|
|
+ item.put("fieldValueName", encrypted);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 仅加密赋值,不修改显示/必填属性(被保人专用)
|
|
|
|
|
+ */
|
|
|
|
|
+ private void setEncryptedFieldValueOnly(JSONObject item, String rawValue) {
|
|
|
|
|
+ String encrypted = RsaUtils.encrypt(rawValue);
|
|
|
|
|
+ item.put("fieldValue", encrypted);
|
|
|
|
|
+ item.put("fieldValueName", encrypted);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ public void overwriteData(com.alibaba.fastjson2.JSONObject secondData, String productId, com.alibaba.fastjson2.JSONObject jsonObject, UserInfoResponse.UserData loginInfo, String branchOfficeName, QuoteVo quoteVo){
|
|
|
|
|
+ if ("fd2dc8abe5f94eacbc8efd3bf62a8581".equals(productId)
|
|
|
|
|
+ || "39f47efbd6004899b4fa7c80bfdba801".equals(productId)
|
|
|
|
|
+ || "54b7cce17316444aade70427d8abea0a".equals(productId)
|
|
|
|
|
+ || "7e1108d1db2c428d8cf35e3e6896bb15".equals(productId)
|
|
|
|
|
+ || "fc9cd193ce444508b355b5d5522ffc00".equals(productId)
|
|
|
|
|
+ || "71d3c2271fe5404d82c78fb07d116cf0".equals(productId)
|
|
|
|
|
+ || "77bcfb9bff014a93bfca0ed792c30258".equals(productId)
|
|
|
|
|
+ || "new-2d0bc85a46c799ff4ad0c8521348".equals(productId)
|
|
|
|
|
+ || "f65730fe001a4c998aabc1d2e7258a96".equals(productId)) {
|
|
|
|
|
+ secondData.put("salesmanCode",loginInfo.getUserCode());
|
|
|
|
|
+ secondData.put("channelType", loginInfo.getChannelType());
|
|
|
|
|
+ secondData.put("lockType", "0");
|
|
|
|
|
+ secondData.put("recommendGarageFlag", "0");
|
|
|
|
|
+ secondData.put("remarks", "");
|
|
|
|
|
+ secondData.put("selectGroupId", null);
|
|
|
|
|
+ secondData.put("fromCarSystemSource", "gstc");
|
|
|
|
|
+ secondData.put("orderSource", "0");
|
|
|
|
|
+ secondData.put("policyHolderTypeOption", null);
|
|
|
|
|
+ secondData.put("policyHolderType", "1");
|
|
|
|
|
+ secondData.put("insuredPersonType", "1");
|
|
|
|
|
+ secondData.put("insuredPersonTypeOption", null);
|
|
|
|
|
+ secondData.put("saleAgreementNo", jsonObject.getString("saleAgreementNo"));
|
|
|
|
|
+ secondData.put("businessNatureName", jsonObject.getString("businessNatureName"));
|
|
|
|
|
+ secondData.put("salesman", jsonObject.getString("salesman"));
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ secondData.put("comCode", loginInfo.getUserDepartment());
|
|
|
|
|
+
|
|
|
|
|
+ secondData.put("systemSource", "fromCar");
|
|
|
|
|
+
|
|
|
|
|
+ secondData.put("saleAgreementName", jsonObject.getString("userAgentName"));
|
|
|
|
|
+
|
|
|
|
|
+ secondData.put("businessOfficeName", branchOfficeName);
|
|
|
|
|
+ secondData.put("makeCom", loginInfo.getUserDepartment());
|
|
|
|
|
+ secondData.put("policeConfirmedFlag", "0");
|
|
|
|
|
+
|
|
|
|
|
+ // 三目运算 + 时间方法(完全对应Python)
|
|
|
|
|
+ RiskInfoVo biRiskInfoVo = quoteVo.getBiRiskInfoVo();
|
|
|
|
|
+ RiskInfoVo ciRiskInfoVo = quoteVo.getCiRiskInfoVo();
|
|
|
|
|
+ String startDate;
|
|
|
|
|
+ String endDate;
|
|
|
|
|
+ if (Objects.nonNull(biRiskInfoVo)) {
|
|
|
|
|
+ startDate = biRiskInfoVo.getStartDate();
|
|
|
|
|
+ endDate = biRiskInfoVo.getEndDate();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ startDate = ciRiskInfoVo.getStartDate();
|
|
|
|
|
+ endDate = ciRiskInfoVo.getEndDate();
|
|
|
|
|
+ }
|
|
|
|
|
+ secondData.put("startDate", startDate);
|
|
|
|
|
+ secondData.put("period", "");
|
|
|
|
|
+ secondData.put("recordClerkCode",loginInfo.getUserCode());
|
|
|
|
|
+ secondData.put("agreeCusFlag", "0");
|
|
|
|
|
+ secondData.put("endDate", endDate);
|
|
|
|
|
+
|
|
|
|
|
+ // 空值字段
|
|
|
|
|
+ secondData.put("docSalePracticeNo", (Object) null);
|
|
|
|
|
+ secondData.put("docSalesName", (Object) null);
|
|
|
|
|
+ secondData.put("docSalesPhone", (Object) null);
|
|
|
|
|
+ secondData.put("recommendGarageName", (Object) null);
|
|
|
|
|
+ secondData.put("recommendGarageCode", (Object) null);
|
|
|
|
|
+
|
|
|
|
|
+ secondData.put("businessNatureCode",jsonObject.getString("businessNatureCode"));
|
|
|
|
|
+ secondData.put("remarks",quoteVo.getCarInfoVo().getLicenseNo()); // 覆盖remarks
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+}
|