|
|
|
@@ -261,14 +261,16 @@ public class WxCarController extends BaseController |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "carNumber为空"); |
|
|
|
} |
|
|
|
String carNumColor = paramMap.get("carNumColor"); |
|
|
|
if (StringUtils.isBlank(carNumColor)) { |
|
|
|
logger.error("carNumColor为空"); |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "carNumColor为空"); |
|
|
|
} |
|
|
|
//if (StringUtils.isBlank(carNumColor)) { |
|
|
|
// logger.error("carNumColor为空"); |
|
|
|
// return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "carNumColor为空"); |
|
|
|
//} |
|
|
|
Long newCarId = 0L; |
|
|
|
String outCarId = paramMap.get("outCarId"); |
|
|
|
if (StringUtils.isBlank(outCarId)) { |
|
|
|
logger.error("outCarId为空"); |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "outCarId为空"); |
|
|
|
logger.warn("outCarId为空"); |
|
|
|
newCarId = wxCUserCarService.getNewCarID(); |
|
|
|
outCarId = String.valueOf(newCarId); |
|
|
|
} |
|
|
|
String params = park.getVendorParams(); |
|
|
|
JSONObject objParams = JSON.parseObject(params); |
|
|
|
@@ -284,18 +286,19 @@ public class WxCarController extends BaseController |
|
|
|
String carId = retObj.getString("carId"); |
|
|
|
// 插入车牌 |
|
|
|
Date curr = new Date(); |
|
|
|
WxCUserCar userCar = new WxCUserCar(); |
|
|
|
userCar.setId(newCarId); |
|
|
|
userCar.setCUserId(user.getId()); |
|
|
|
userCar.setTenantId(user.getTenantId()); |
|
|
|
userCar.setCarNumber(carNumber); |
|
|
|
userCar.setVendorType(EnumCarVendor.CAR_TJD.getCode()); |
|
|
|
JSONObject jo = new JSONObject(); |
|
|
|
jo.put("carId", carId); |
|
|
|
userCar.setVendorParams(JSON.toJSONString(jo)); |
|
|
|
userCar.setCreateDate(curr); |
|
|
|
userCar.setUpdateDate(curr); |
|
|
|
try { |
|
|
|
WxCUserCar userCar = new WxCUserCar(); |
|
|
|
userCar.setCUserId(user.getId()); |
|
|
|
userCar.setTenantId(user.getTenantId()); |
|
|
|
userCar.setCarNumber(carNumber); |
|
|
|
userCar.setVendorType(EnumCarVendor.CAR_TJD.getCode()); |
|
|
|
JSONObject jo = new JSONObject(); |
|
|
|
jo.put("carId", carId); |
|
|
|
userCar.setVendorParams(JSON.toJSONString(jo)); |
|
|
|
userCar.setCreateDate(curr); |
|
|
|
userCar.setUpdateDate(curr); |
|
|
|
wxCUserCarService.saveOrUpdate(userCar); |
|
|
|
wxCUserCarService.save(userCar); |
|
|
|
} catch (Exception e) { |
|
|
|
logger.error(e.getMessage()); |
|
|
|
return new ResultData(ErrorCode.DB_FAIL.getCode(), "TJD保存车牌失败, e:" + e.getMessage()); |
|
|
|
|