|
|
@@ -18,10 +18,9 @@ import java.math.BigDecimal;
|
|
|
import java.text.DateFormat;
|
|
|
import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
-import java.time.LocalDate;
|
|
|
-import java.time.LocalDateTime;
|
|
|
-import java.time.LocalTime;
|
|
|
+import java.time.*;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
+import java.util.Date;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.Map;
|
|
|
|
|
|
@@ -184,16 +183,16 @@ public class CheckInsPlyComeUtils {
|
|
|
|
|
|
Map<String,Object> map =new HashMap<String,Object>();
|
|
|
String errorMsg ="";
|
|
|
- if(checkSignDate(dto.getSignDate(), "签单时间")!=null){
|
|
|
- errorMsg+=checkSignDate(dto.getSignDate(), "签单时间")+"; ";
|
|
|
+// if(checkSignDate(dto.getSignDate(), "签单时间")!=null){
|
|
|
+// errorMsg+=checkSignDate(dto.getSignDate(), "签单时间")+"; ";
|
|
|
+// }
|
|
|
+ if(dto.getSignDateNew()==null){
|
|
|
+ errorMsg+="签单日期 不能为空或格式错误,格式为yyyy-MM-dd";
|
|
|
}
|
|
|
//签单日期转换为 yyyy-MM-dd HH:mm:ss
|
|
|
- if(StringUtils.isNotEmpty(dto.getSignDate())){
|
|
|
- String singTime = pareTimeLocalDate(dto.getSignDate());
|
|
|
- dto.setSignDate(singTime);
|
|
|
+ if(dto.getSignDateNew()!=null){
|
|
|
+ dto.setSignDate( pareDateToLocalTime(dto.getSignDateNew()));
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
if(checkIsNull(dto.getLicenseno(), "车牌号")!=null){
|
|
|
errorMsg+=checkIsNull(dto.getSignDate(), "车牌号")+"; ";
|
|
|
}
|
|
|
@@ -245,18 +244,18 @@ public class CheckInsPlyComeUtils {
|
|
|
if(isNumeric(dto.getJqPremium(), "交强险保费")!=null){
|
|
|
errorMsg+=isNumeric(dto.getJqPremium(), "交强险保费")+"; ";
|
|
|
}
|
|
|
- if(isNumeric(dto.getSyPremium(), "商业险保费")!=null){
|
|
|
- errorMsg+=isNumeric(dto.getSyPremium(), "商业险保费")+"; ";
|
|
|
- }
|
|
|
+// if(isNumeric(dto.getSyPremium(), "商业险保费")!=null){
|
|
|
+// errorMsg+=isNumeric(dto.getSyPremium(), "商业险保费")+"; ";
|
|
|
+// }
|
|
|
if(isNumeric(dto.getTaxamount(), "车船税")!=null){
|
|
|
errorMsg+=isNumeric(dto.getTaxamount(), "车船税")+"; ";
|
|
|
}
|
|
|
if(isNumeric(dto.getJqSuperviseCostsProportion(), "交强手续费比例")!=null){
|
|
|
errorMsg+=isNumeric(dto.getJqSuperviseCostsProportion(), "交强手续费比例")+"; ";
|
|
|
}
|
|
|
- if(isNumeric(dto.getSySuperviseCostsProportion(), "商业手续费比例")!=null){
|
|
|
- errorMsg+=isNumeric(dto.getSySuperviseCostsProportion(), "商业手续费比例")+"; ";
|
|
|
- }
|
|
|
+// if(isNumeric(dto.getSySuperviseCostsProportion(), "商业手续费比例")!=null){
|
|
|
+// errorMsg+=isNumeric(dto.getSySuperviseCostsProportion(), "商业手续费比例")+"; ";
|
|
|
+// }
|
|
|
if(isNumeric(dto.getCommissionFeevalue(), "手续费金额")!=null){
|
|
|
errorMsg+=isNumeric(dto.getCommissionFeevalue(), "手续费金额")+"; ";
|
|
|
}
|
|
|
@@ -284,6 +283,17 @@ public class CheckInsPlyComeUtils {
|
|
|
return map;
|
|
|
}
|
|
|
|
|
|
+ private static String pareDateToLocalTime(Date getSignDateNew) {
|
|
|
+
|
|
|
+ Instant instant = getSignDateNew.toInstant();
|
|
|
+ ZoneId zoneId = ZoneId.systemDefault();
|
|
|
+ LocalDate localDate = instant.atZone(zoneId).toLocalDate();
|
|
|
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
|
+ String formattedDate = localDate.format(formatter);
|
|
|
+ String singTime = pareTimeLocalDate(formattedDate);
|
|
|
+ return singTime;
|
|
|
+ }
|
|
|
+
|
|
|
private static String pareTimeLocalDate(String signDate) {
|
|
|
// 定义输入格式(仅日期)
|
|
|
DateTimeFormatter inputFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
|
@@ -315,13 +325,21 @@ public class CheckInsPlyComeUtils {
|
|
|
|
|
|
Map<String,Object> map =new HashMap<String,Object>();
|
|
|
String errorMsg ="";
|
|
|
- if(checkSignDate(dto.getSignDate(), "签单时间")!=null){
|
|
|
- errorMsg+=checkSignDate(dto.getSignDate(), "签单时间")+"; ";
|
|
|
+// if(checkSignDate(dto.getSignDate(), "签单时间")!=null){
|
|
|
+// errorMsg+=checkSignDate(dto.getSignDate(), "签单时间")+"; ";
|
|
|
+// }
|
|
|
+// //签单日期转换为 yyyy-MM-dd HH:mm:ss
|
|
|
+// if(StringUtils.isNotEmpty(dto.getSignDate())){
|
|
|
+// String singTime = pareTimeLocalDate(dto.getSignDate());
|
|
|
+// dto.setSignDate(singTime);
|
|
|
+// }
|
|
|
+
|
|
|
+ if(dto.getSignDateNew()==null){
|
|
|
+ errorMsg+="签单日期 不能为空或格式错误,格式为yyyy-MM-dd";
|
|
|
}
|
|
|
//签单日期转换为 yyyy-MM-dd HH:mm:ss
|
|
|
- if(StringUtils.isNotEmpty(dto.getSignDate())){
|
|
|
- String singTime = pareTimeLocalDate(dto.getSignDate());
|
|
|
- dto.setSignDate(singTime);
|
|
|
+ if(dto.getSignDateNew()!=null){
|
|
|
+ dto.setSignDate( pareDateToLocalTime(dto.getSignDateNew()));
|
|
|
}
|
|
|
|
|
|
if(checkIsNull(dto.getLicenseno(), "车牌号")!=null){
|
|
|
@@ -376,18 +394,18 @@ public class CheckInsPlyComeUtils {
|
|
|
if(isNumeric(dto.getJqPremium(), "交强险保费")!=null){
|
|
|
errorMsg+=isNumeric(dto.getJqPremium(), "交强险保费")+"; ";
|
|
|
}
|
|
|
- if(isNumeric(dto.getSyPremium(), "商业险保费")!=null){
|
|
|
- errorMsg+=isNumeric(dto.getSyPremium(), "商业险保费")+"; ";
|
|
|
- }
|
|
|
+// if(isNumeric(dto.getSyPremium(), "商业险保费")!=null){
|
|
|
+// errorMsg+=isNumeric(dto.getSyPremium(), "商业险保费")+"; ";
|
|
|
+// }
|
|
|
if(isNumeric(dto.getTaxamount(), "车船税")!=null){
|
|
|
errorMsg+=isNumeric(dto.getTaxamount(), "车船税")+"; ";
|
|
|
}
|
|
|
if(isNumeric(dto.getJqOtherCostsProportion(), "交强跟单比例")!=null){
|
|
|
errorMsg+=isNumeric(dto.getJqOtherCostsProportion(), "交强跟单比例")+"; ";
|
|
|
}
|
|
|
- if(isNumeric(dto.getSyOtherCostsProportion(), "商业跟单比例")!=null){
|
|
|
- errorMsg+=isNumeric(dto.getSyOtherCostsProportion(), "商业跟单比例")+"; ";
|
|
|
- }
|
|
|
+// if(isNumeric(dto.getSyOtherCostsProportion(), "商业跟单比例")!=null){
|
|
|
+// errorMsg+=isNumeric(dto.getSyOtherCostsProportion(), "商业跟单比例")+"; ";
|
|
|
+// }
|
|
|
if(isNumeric(dto.getOtherFeevalue(), "跟单费金额")!=null){
|
|
|
errorMsg+=isNumeric(dto.getOtherFeevalue(), "跟单费金额")+"; ";
|
|
|
}
|
|
|
@@ -422,15 +440,24 @@ public class CheckInsPlyComeUtils {
|
|
|
*/
|
|
|
public static Map<String, Object> checkDataDto3(AddTypeFCSXFExcel dto) {
|
|
|
|
|
|
+
|
|
|
Map<String,Object> map =new HashMap<String,Object>();
|
|
|
String errorMsg ="";
|
|
|
- if(checkSignDate(dto.getSignDate(), "签单时间")!=null){
|
|
|
- errorMsg+=checkSignDate(dto.getSignDate(), "签单时间")+"; ";
|
|
|
+// if(checkSignDate(dto.getSignDate(), "签单时间")!=null){
|
|
|
+// errorMsg+=checkSignDate(dto.getSignDate(), "签单时间")+"; ";
|
|
|
+// }
|
|
|
+// //签单日期转换为 yyyy-MM-dd HH:mm:ss
|
|
|
+// if(StringUtils.isNotEmpty(dto.getSignDate())){
|
|
|
+// String singTime = pareTimeLocalDate(dto.getSignDate());
|
|
|
+// dto.setSignDate(singTime);
|
|
|
+// }
|
|
|
+
|
|
|
+ if(dto.getSignDateNew()==null){
|
|
|
+ errorMsg+="签单日期 不能为空或格式错误,格式为yyyy-MM-dd";
|
|
|
}
|
|
|
//签单日期转换为 yyyy-MM-dd HH:mm:ss
|
|
|
- if(StringUtils.isNotEmpty(dto.getSignDate())){
|
|
|
- String singTime = pareTimeLocalDate(dto.getSignDate());
|
|
|
- dto.setSignDate(singTime);
|
|
|
+ if(dto.getSignDateNew()!=null){
|
|
|
+ dto.setSignDate( pareDateToLocalTime(dto.getSignDateNew()));
|
|
|
}
|
|
|
|
|
|
if(checkIsNull(dto.getLicenseno(), "车牌号")!=null){
|
|
|
@@ -517,14 +544,23 @@ public class CheckInsPlyComeUtils {
|
|
|
public static Map<String, Object> checkDataDto4(AddTypeFCGDExcel dto) {
|
|
|
Map<String,Object> map =new HashMap<String,Object>();
|
|
|
String errorMsg ="";
|
|
|
- if(checkSignDate(dto.getSignDate(), "签单时间")!=null){
|
|
|
- errorMsg+=checkSignDate(dto.getSignDate(), "签单时间")+"; ";
|
|
|
+// if(checkSignDate(dto.getSignDate(), "签单时间")!=null){
|
|
|
+// errorMsg+=checkSignDate(dto.getSignDate(), "签单时间")+"; ";
|
|
|
+// }
|
|
|
+//
|
|
|
+// //签单日期转换为 yyyy-MM-dd HH:mm:ss
|
|
|
+// if(StringUtils.isNotEmpty(dto.getSignDate())){
|
|
|
+// String singTime = pareTimeLocalDate(dto.getSignDate());
|
|
|
+// dto.setSignDate(singTime);
|
|
|
+// }
|
|
|
+ if(dto.getSignDateNew()==null){
|
|
|
+ errorMsg+="签单日期 不能为空或格式错误,格式为yyyy-MM-dd";
|
|
|
}
|
|
|
//签单日期转换为 yyyy-MM-dd HH:mm:ss
|
|
|
- if(StringUtils.isNotEmpty(dto.getSignDate())){
|
|
|
- String singTime = pareTimeLocalDate(dto.getSignDate());
|
|
|
- dto.setSignDate(singTime);
|
|
|
+ if(dto.getSignDateNew()!=null){
|
|
|
+ dto.setSignDate( pareDateToLocalTime(dto.getSignDateNew()));
|
|
|
}
|
|
|
+
|
|
|
if(checkIsNull(dto.getLicenseno(), "车牌号")!=null){
|
|
|
errorMsg+=checkIsNull(dto.getSignDate(), "车牌号")+"; ";
|
|
|
}
|