|
@@ -989,36 +989,41 @@ public class OrderBaseExcelLogic {
|
|
|
pgOrderBase.setMainName(categoryType);
|
|
|
|
|
|
DateTime appointmentTimeN = null;
|
|
|
- try {
|
|
|
- appointmentTimeN = DateUtil.parseDateTime(appointmentTime);
|
|
|
- if (dateTime == null) {
|
|
|
+ DateTime appointmentEndTimeN = null;
|
|
|
+ if (!StringUtil.isEmpty(appointmentTime)) {
|
|
|
+ try {
|
|
|
+ appointmentTimeN = DateUtil.parseDateTime(appointmentTime);
|
|
|
+ if (dateTime == null) {
|
|
|
+ throw new RemoteServiceException(errPrefix + "预约开始时间请输入【2023-12-28 00:00:00】的格式");
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
throw new RemoteServiceException(errPrefix + "预约开始时间请输入【2023-12-28 00:00:00】的格式");
|
|
|
}
|
|
|
- } catch (Exception e) {
|
|
|
- throw new RemoteServiceException(errPrefix + "预约开始时间请输入【2023-12-28 00:00:00】的格式");
|
|
|
- }
|
|
|
|
|
|
- DateTime appointmentEndTimeN = null;
|
|
|
- try {
|
|
|
- appointmentEndTimeN = DateUtil.parseDateTime(appointmentEndTime);
|
|
|
- if (dateTime == null) {
|
|
|
+
|
|
|
+ try {
|
|
|
+ appointmentEndTimeN = DateUtil.parseDateTime(appointmentEndTime);
|
|
|
+ if (dateTime == null) {
|
|
|
+ throw new RemoteServiceException(errPrefix + "预约结束时间请输入【2023-12-28 00:00:00】的格式");
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
throw new RemoteServiceException(errPrefix + "预约结束时间请输入【2023-12-28 00:00:00】的格式");
|
|
|
}
|
|
|
- } catch (Exception e) {
|
|
|
- throw new RemoteServiceException(errPrefix + "预约结束时间请输入【2023-12-28 00:00:00】的格式");
|
|
|
}
|
|
|
pgOrderBase.setAppointmentTime(appointmentTimeN);
|
|
|
pgOrderBase.setAppointmentEndTime(appointmentEndTimeN);
|
|
|
pgOrderBase.setSalesOrderId(salesOrderId);
|
|
|
|
|
|
DateTime overDateN = null;
|
|
|
- try {
|
|
|
- overDateN = DateUtil.parseDateTime(overDate);
|
|
|
- if (dateTime == null) {
|
|
|
+ if (!StringUtil.isEmpty(overDate)) {
|
|
|
+ try {
|
|
|
+ overDateN = DateUtil.parseDateTime(overDate);
|
|
|
+ if (dateTime == null) {
|
|
|
+ throw new RemoteServiceException(errPrefix + "完工时间请输入【2023-12-28 00:00:00】的格式");
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
throw new RemoteServiceException(errPrefix + "完工时间请输入【2023-12-28 00:00:00】的格式");
|
|
|
}
|
|
|
- } catch (Exception e) {
|
|
|
- throw new RemoteServiceException(errPrefix + "完工时间请输入【2023-12-28 00:00:00】的格式");
|
|
|
}
|
|
|
|
|
|
pgOrderBase.setOverDate(overDateN);
|