Эх сурвалжийг харах

1. 永诚修改地区问题2

ligang134 2 жил өмнө
parent
commit
2b23c73d09

+ 17 - 0
README.md

@@ -245,6 +245,23 @@
 
 
 
+**《掌柜鼎PC平台》临时更新公告**
+
+* 版本号:v0.0.5
+* 访问地址:http://sxzgkj.baoxianzhanggui.com/
+* 需求bug收集表:https://kdocs.cn/l/cloAn4eaINVw
+* APP安卓APK包:http://sxzgkj.baoxianzhanggui.com/web-api/upload/app/2023/10/11/83c6c7bce9fefde9f0e5fb6fcecf0f44.apk
+* 更新日期:2023-10-11
+* 更新时间:16:30  ~  15:00 
+* 更新内容:
+  1. APP上线可测试。
+  2. 增加众安通融单提示信息。
+  3. 增加脱保标识。
+  4. 报价单增加座位数、驾意险。
+
+
+
+
 
 --------未发布
 **《掌柜鼎PC平台》临时更新公告**

+ 63 - 46
src/main/java/com/ydtech/modules/ins/service/impl/InsAlltrustApiServiceImpl.java

@@ -579,6 +579,9 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
             m.getRequestLabel().getCondition().getCustomer().setCCity(insureMap.get("cityCode"));
             m.getRequestLabel().getCondition().getCustomer().setCCounty(insureMap.get("areaCode"));
 
+
+//            findRegion()
+
             //接口请求
             String responseData = httpPostResultLog(xmlMapper, m, YcBuildData.API_AUDIT, "永诚API方式 - 核保 - ");
 
@@ -835,23 +838,29 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
             AssertionUtils.isEmpty(iac, "报价订单不存在");
             InsOrders order = insOrdersService.getById(iac.getOrderno());
 
+            try {
+                String ip = InetAddress.getLocalHost().getHostAddress();
+                log.debug("------------------------------");
+                log.debug("----测试服务器IP----" + ip);
+                log.debug("------------------------------");
+            } catch (UnknownHostException e) {
+                throw new RuntimeException(e);
+            }
+
 
             String licensePlate = order.getLicenseno();
 
-            //如果保单已经生成了就直接返回
-            if (policyPrintVo.getType().equals("2")) {
-                Map m = new HashMap();
-
-                String jqFlagUrl = gainExistCarInsPolicy(licensePlate + "-交强险标志.pdf", licensePlate);
-                String jqUrl = gainExistCarInsPolicy(licensePlate + "-交强险保单.pdf", licensePlate);
-                String syUrl = gainExistCarInsPolicy(licensePlate + "-商业险保单.pdf", licensePlate);
-                if (null != jqFlagUrl || null != jqUrl || null != syUrl) {
-                    m.put("jqFlagUrl", jqFlagUrl);
-                    m.put("jqUrl", jqUrl);
-                    m.put("syUrl", syUrl);
-                    return HttpResult.ok(m);
-                }
 
+            Map m = new HashMap();
+
+            String jqFlagUrl = gainExistCarInsPolicy(licensePlate + "-交强险标志.pdf", licensePlate);
+            String jqUrl = gainExistCarInsPolicy(licensePlate + "-交强险保单.pdf", licensePlate);
+            String syUrl = gainExistCarInsPolicy(licensePlate + "-商业险保单.pdf", licensePlate);
+            if (null != jqFlagUrl || null != jqUrl || null != syUrl) {
+                m.put("jqFlagUrl", jqFlagUrl);
+                m.put("jqUrl", jqUrl);
+                m.put("syUrl", syUrl);
+                return HttpResult.ok(m);
             }
 
 
@@ -859,47 +868,44 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
             YcConfigureParameters ycConfigureParameters = gainYcConfigParams(iac.getAgreementId());
             String policyNo = policyPrintVo.getRiskCode().equals("0507") ? iac.getJqpolicyno() : iac.getSypolicyno();
 
-
             //组装参数
             Policy p = Policy.buildPolicyParam(policyNo, ycConfigureParameters.gainAuthorityDataXml());
 
             ObjectMapper xmlMapper = gainXmlMapper();
-            //接口请求
-            log.debug("=========永诚API方式 - xml请求 - 获取保单开始======");
-            String responseData = httpPostResultLog(xmlMapper, p, YcBuildData.API_GUARANTEE_SLIP, "永诚API方式 - 获取保单 - ");
 
-//            InsApiLog apiLog = httpPost(xmlMapper, p, YcBuildData.API_GUARANTEE_SLIP);
-            log.debug("=========永诚API方式 - xml请求 - 获取保单结束!======");
-//            verifyRequest(apiLog, iac, InsQuoteFlow.Q_S_4);
-//            String responseData = apiLog.getResponseData();
+
+            //接口请求
+            String responseData = httpPostResultLog(xmlMapper, p, YcBuildData.API_GUARANTEE_SLIP, "车牌号:"+order.getLicenseno()+",永诚API方式 - 获取保单 - ");
 
             String cleanStr = YcBuildData.cleanResponseStr(responseData);
             PolicyResponse pResp = xmlMapper.readValue(cleanStr, PolicyResponse.class);
 
             if (pResp.getHead().getResponseCompleteMessageStatus().getMessageStatusCode().equals("E0000")) {
-                Map m = new HashMap();
-
-                String bzInsUrl = StringUtils.isNotEmpty(pResp.getPolicyBZUrl()) ? pResp.getPolicyBZUrl().replaceAll(";pkid", "&pkid") : "";
-                String jqFlagUrl = gainCarInsPolicy(bzInsUrl, licensePlate + "-交强险标志.pdf", licensePlate);
-                if (policyPrintVo.getType().equals("1")) {
-                    m.put("jqFlagUrl", jqFlagUrl);
-                    m.put("jqUrl", "");
-                    m.put("syUrl", "");
+
+                //标志
+                if(StringUtils.isNotEmpty(pResp.getPolicyBZUrl())){
+                    String bzInsUrl = pResp.getPolicyBZUrl().replaceAll(";pkid", "&pkid");
+                    jqFlagUrl = gainCarInsPolicy(bzInsUrl, licensePlate + "-交强险标志.pdf", licensePlate);
                 }
-                if (policyPrintVo.getType().equals("2")) {
-                    String jqInsUrl = StringUtils.isNotEmpty(pResp.getJqpolicyUrl()) ? pResp.getJqpolicyUrl().replaceAll(";pkid", "&pkid") : "";
-                    String syInsUrl = StringUtils.isNotEmpty(pResp.getSypolicyUrl()) ? pResp.getSypolicyUrl().replaceAll(";pkid", "&pkid") : "";
+                //交强
+                if(StringUtils.isNotEmpty(pResp.getJqpolicyUrl())){
+                    String jqInsUrl = pResp.getJqpolicyUrl().replaceAll(";pkid", "&pkid");
+                    jqUrl = gainCarInsPolicy(jqInsUrl, licensePlate + "-交强险保单.pdf", licensePlate);
 
-                    String jqUrl = gainCarInsPolicy(jqInsUrl, licensePlate + "-交强险保单.pdf", licensePlate);
-                    String syUrl = gainCarInsPolicy(syInsUrl, licensePlate + "-商业险保单.pdf", licensePlate);
+                }
 
-                    m.put("jqFlagUrl", jqFlagUrl);
-                    m.put("jqUrl", jqUrl);
-                    m.put("syUrl", syUrl);
+                //商业
+                if(StringUtils.isNotEmpty(pResp.getSypolicyUrl())){
+                    String syInsUrl = pResp.getSypolicyUrl().replaceAll(";pkid", "&pkid");
+                    syUrl = gainCarInsPolicy(syInsUrl, licensePlate + "-交强险保单.pdf", licensePlate);
 
                 }
-//                httpResult.setData(m);
-//                httpResult.setMsg(pResp.getHead().getResponseCompleteMessageStatus().getMessageStatusDescription());
+
+                m.put("jqFlagUrl", jqFlagUrl);
+                m.put("jqUrl", jqUrl);
+                m.put("syUrl", syUrl);
+
+
                 return HttpResult.ok(pResp.getHead().getResponseCompleteMessageStatus().getMessageStatusDescription(), m);
 
             } else {
@@ -1671,16 +1677,21 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
         Map rMap = new HashMap();
 
 
-        if (address.indexOf("湖北省仙桃市") == 0) {
-            rMap.put("provinceCode", "420000");
-            rMap.put("cityCode", "429004");
-            rMap.put("areaCode", "");
-            return rMap;
-        }
+//        if (address.indexOf("湖北省仙桃市") == 0) {
+//            rMap.put("provinceCode", "420000");
+//            rMap.put("cityCode", "429004");
+//            rMap.put("areaCode", "");
+//            return rMap;
+//        }
 
         if(address.contains("邢台县")){
             address.replaceAll("邢台县","信都区");
-
+        }
+        if(address.contains("旬阳县")){
+            address.replaceAll("旬阳县","旬阳市");
+        }
+        if(address.contains("开县")){
+            address.replaceAll("开县","开州区");
         }
 
 
@@ -1714,6 +1725,12 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
             cityLqw.eq(InsAlltrustRegion::getArea, city);
             areaList = insAlltrustRegionMapper.selectList(cityLqw);
         }
+        //如果地区查不到 查市
+        if (null == areaList || areaList.size() < 1) {
+            LambdaQueryWrapper<InsAlltrustRegion> cityLqw = new LambdaQueryWrapper<>();
+            cityLqw.eq(InsAlltrustRegion::getCity, city);
+            areaList = insAlltrustRegionMapper.selectList(cityLqw);
+        }
 
 
         if (null != areaList && areaList.size() > 0) {

+ 2 - 1
src/main/java/com/ydtech/utils/IDCardUtils.java

@@ -374,7 +374,8 @@ public class IDCardUtils {
     public static void main(String[] args) throws ParseException {
 
 
-        Map m = addressResolution("河北省邢台市邢台县西黄村镇徘徊村310号");
+        Map m = addressResolution("陕西省旬阳县赤岩镇闵家河村三组109号");
+//        Map m = addressResolution("河北省邢台市邢台县西黄村镇徘徊村310号");
 //        Map m = addressResolution("山西省忻州市忻府区合索乡沙洼村22-040");
 //        Map m = addressResolution("安徽省池州市贵池区长江中路39号采石队宿舍9号");
 //        Map m = addressResolution("山西省汾西县坪乡细坪村055号");

+ 1 - 1
src/main/java/com/ydtech/utils/baidu/FileUtil.java

@@ -147,7 +147,7 @@ public class FileUtil {
             System.err.println("存在的文件的展示地址:" + showPath);
             return showPath;
         }
-        return null;
+        return "";
 
 
     }