|
|
@@ -372,9 +372,11 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
|
|
|
log.info("永诚API方式 - xml请求 ------------报价 -> 交强重复投保----------------");
|
|
|
|
|
|
//截取0 到 机动车交通事故强制险
|
|
|
- String ciMsg = errorMsg;
|
|
|
- //终保日期
|
|
|
- String coverageEndDate = ciMsg.substring(ciMsg.indexOf("终保日期") + 5, ciMsg.indexOf("终保日期") + 5 + 16);
|
|
|
+ if(!errorMsg.contains("终保日期")){
|
|
|
+ throw new SystemException(errorMsg);
|
|
|
+ }
|
|
|
+ String coverageEndDate = errorMsg.substring(errorMsg.indexOf("终保日期") + 5, errorMsg.indexOf("终保日期") + 5 + 16);
|
|
|
+
|
|
|
LocalDateTime start = DateTimeUtil.parseLocalDateTime(coverageEndDate, DateTimeUtil.DATETIME_PATTERN_EXT1);
|
|
|
LocalDateTime end = start.plusYears(1L).minusDays(1L);
|
|
|
String newStartDate = DateTimeUtil.getStartTimeOfDayStr(start, DateTimeUtil.DATETIME_PATTERN);
|
|
|
@@ -409,10 +411,11 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
|
|
|
requestInfoList.add(errorMsg);
|
|
|
log.info("永诚API方式 - xml请求 ------------报价 -> 商业险重复投保----------------");
|
|
|
|
|
|
- //截取0 到 机动车交通事故强制险
|
|
|
- String ciMsg = errorMsg;
|
|
|
- //终保日期
|
|
|
- String coverageEndDate = ciMsg.substring(ciMsg.indexOf("保险止期") + 6, ciMsg.indexOf("保险止期") + 6 + 19);
|
|
|
+ //保险止期
|
|
|
+ if(!errorMsg.contains("保险止期")){
|
|
|
+ throw new SystemException(errorMsg);
|
|
|
+ }
|
|
|
+ String coverageEndDate = errorMsg.substring(errorMsg.indexOf("保险止期") + 6, errorMsg.indexOf("保险止期") + 6 + 19);
|
|
|
LocalDateTime start;
|
|
|
|
|
|
if(coverageEndDate.contains("23:59:59")){
|
|
|
@@ -422,7 +425,6 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
|
|
|
}
|
|
|
|
|
|
LocalDateTime end = start.plusYears(1L).minusDays(1L);
|
|
|
-
|
|
|
String newStartDate = DateTimeUtil.getStartTimeOfDayStr(start, DateTimeUtil.DATETIME_PATTERN);
|
|
|
String newEndDate = DateTimeUtil.getEndTimeOfDayStr(end, DateTimeUtil.DATETIME_PATTERN);
|
|
|
System.err.println("商业新起:" + newStartDate);
|
|
|
@@ -430,7 +432,6 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
|
|
|
|
|
|
m.getRequestLabel().getCondition().getBase().setTInsrncBgnTmSY(newStartDate);
|
|
|
m.getRequestLabel().getCondition().getBase().setTInsrncEndTmSY(newEndDate);
|
|
|
-
|
|
|
//转保信息清空 重新报价
|
|
|
m.getRequestLabel().getCondition().getVhl().setCBusType("0");
|
|
|
|