Commit f7e890d2 authored by libin's avatar libin

Merge remote-tracking branch 'origin/dev' into dev

parents 149880be 802bfb1c
...@@ -18,8 +18,11 @@ public class ResultCode { ...@@ -18,8 +18,11 @@ public class ResultCode {
// 车辆预定失败,请重试 // 车辆预定失败,请重试
public static int BOOKED_FAILED_CODE = Integer.valueOf(SystemProperty.getResultConfig("BOOKED_FAILED_CODE")); public static int BOOKED_FAILED_CODE = Integer.valueOf(SystemProperty.getResultConfig("BOOKED_FAILED_CODE"));
// 车辆预定失败,请重试 //预定时间不能为空 DATE_TIME_IS_NULL
public static int ONLY_BOOK_FROM_TODAY = Integer.valueOf(SystemProperty.getResultConfig("BOOKED_FAILED_CODE")); public static int DATE_TIME_IS_NULL = Integer.valueOf(SystemProperty.getResultConfig("DATE_TIME_IS_NULL"));
// 预定时间不能小于当前时间
public static int ONLY_BOOK_FROM_TODAY = Integer.valueOf(SystemProperty.getResultConfig("ONLY_BOOK_FROM_TODAY"));
// 添加车辆失败,请重试 // 添加车辆失败,请重试
public static int ADD_VEHICLE_FAIL = Integer.valueOf(SystemProperty.getResultConfig("ADD_VEHICLE_FAIL")); public static int ADD_VEHICLE_FAIL = Integer.valueOf(SystemProperty.getResultConfig("ADD_VEHICLE_FAIL"));
......
...@@ -222,4 +222,6 @@ ADD_VEHICLE_FAIL = 4009 ...@@ -222,4 +222,6 @@ ADD_VEHICLE_FAIL = 4009
UPDATE_VEHICLE_FAIL = 4010 UPDATE_VEHICLE_FAIL = 4010
4010 = 修改车辆失败,请重试 4010 = 修改车辆失败,请重试
DATE_TIME_IS_NULL = 4011
4011 = 预定时间不能为空
...@@ -187,7 +187,7 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp ...@@ -187,7 +187,7 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
} }
if( vehicle.getMileageLastUpdate() != null) { if( vehicle.getMileageLastUpdate() != null) {
//判断车辆公里数 //判断车辆公里数
if (orderVehicleCrosstownDto.getMileage() == null || orderVehicleCrosstownDto.getMileage() < vehicle.getMileageLastUpdate()) { if (orderVehicleCrosstownDto.getMileage() == null || orderVehicleCrosstownDto.getMileage() <= vehicle.getMileageLastUpdate()) {
return ObjectRestResponse.createFailedResult(500, "请输入车辆仪表盘实际公里数!"); return ObjectRestResponse.createFailedResult(500, "请输入车辆仪表盘实际公里数!");
} }
} }
......
...@@ -17,7 +17,12 @@ public class CompanyDetail extends BranchCompany { ...@@ -17,7 +17,12 @@ public class CompanyDetail extends BranchCompany {
// if(0 != detailAddrStr.length()) { // if(0 != detailAddrStr.length()) {
// //
// } // }
if( !detailAddrStr.toString().contains(sysRegion.getName())) { String name = sysRegion.getName()
.replace("省", "")
.replace("市", "")
.replace("县", "")
.replace("区", "");
if( !detailAddrStr.toString().contains(name)) {
detailAddrStr.append(sysRegion.getName()); detailAddrStr.append(sysRegion.getName());
} }
} }
......
...@@ -327,6 +327,10 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR ...@@ -327,6 +327,10 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
checkIfVehicleExists(bookVehicleVo.getVehicleId()); checkIfVehicleExists(bookVehicleVo.getVehicleId());
//提取日期和相应的预定目标日期 //提取日期和相应的预定目标日期
Map<String,List<String>> yearMonthAndDate = Maps.newHashMap(); Map<String,List<String>> yearMonthAndDate = Maps.newHashMap();
//预定时间不能为空
if(StringUtils.isBlank(bookVehicleVo.getBookStartDate()) || StringUtils.isBlank(bookVehicleVo.getBookEndDate())){
throw new BaseException(ResultCode.DATE_TIME_IS_NULL);
}
String[] bookStartDateArray = bookVehicleVo.getBookStartDate().split(" "); String[] bookStartDateArray = bookVehicleVo.getBookStartDate().split(" ");
String[] bookEndDateArray = bookVehicleVo.getBookEndDate().split(" "); String[] bookEndDateArray = bookVehicleVo.getBookEndDate().split(" ");
...@@ -412,6 +416,10 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR ...@@ -412,6 +416,10 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
checkIfVehicleExists(bookVehicleVo.getVehicleId()); checkIfVehicleExists(bookVehicleVo.getVehicleId());
//提取日期和相应的预定目标日期 //提取日期和相应的预定目标日期
Map<String,List<String>> yearMonthAndDate = Maps.newHashMap(); Map<String,List<String>> yearMonthAndDate = Maps.newHashMap();
//预定时间不能为空
if(StringUtils.isBlank(bookVehicleVo.getBookStartDate()) || StringUtils.isBlank(bookVehicleVo.getBookEndDate())){
throw new BaseException(ResultCode.DATE_TIME_IS_NULL);
}
DateTime startDay =DateTime.parse(bookVehicleVo.getBookStartDate(),DATE_TIME_FORMATTER); DateTime startDay =DateTime.parse(bookVehicleVo.getBookStartDate(),DATE_TIME_FORMATTER);
DateTime endDay =DateTime.parse(bookVehicleVo.getBookEndDate(), DATE_TIME_FORMATTER); DateTime endDay =DateTime.parse(bookVehicleVo.getBookEndDate(), DATE_TIME_FORMATTER);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment