|
|
|
@ -44,6 +44,7 @@ import org.springblade.common.constant.driver.DriverApprovedDrivingModelConstant
|
|
|
|
|
import org.springblade.common.constant.driver.DriverBankTypeConverter; |
|
|
|
|
import org.springblade.common.constant.driver.DriverPositionTypeConstant; |
|
|
|
|
import org.springblade.common.constant.driver.DriverTypeStatusConstant; |
|
|
|
|
import org.springblade.common.exception.CustomerException; |
|
|
|
|
import org.springblade.core.log.exception.ServiceException; |
|
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl; |
|
|
|
|
import org.springblade.core.secure.BladeUser; |
|
|
|
@ -268,7 +269,7 @@ public class BasicdataDriverArteryServiceImpl extends BaseServiceImpl<BasicdataD
|
|
|
|
|
|
|
|
|
|
// log.error("必填数据不能为空");
|
|
|
|
|
// continue;
|
|
|
|
|
throw new ServiceException("必填数据不能为空!"); |
|
|
|
|
throw new CustomerException("必填数据不能为空!"); |
|
|
|
|
} |
|
|
|
|
if (!ObjectUtils.isEmpty(datum.getPhone())) { |
|
|
|
|
String phone = datum.getPhone(); |
|
|
|
@ -281,7 +282,7 @@ public class BasicdataDriverArteryServiceImpl extends BaseServiceImpl<BasicdataD
|
|
|
|
|
if (userR.getData() == null) { |
|
|
|
|
// log.error("未找到用户");
|
|
|
|
|
// continue;
|
|
|
|
|
throw new ServiceException("未找到用户!"); |
|
|
|
|
throw new CustomerException("未找到用户!"); |
|
|
|
|
} else { |
|
|
|
|
datum.setUserId(userR.getData().getId()); |
|
|
|
|
} |
|
|
|
@ -293,7 +294,7 @@ public class BasicdataDriverArteryServiceImpl extends BaseServiceImpl<BasicdataD
|
|
|
|
|
|
|
|
|
|
if (carListByName.isEmpty()) { |
|
|
|
|
// log.error("未找到可绑定的车辆");
|
|
|
|
|
throw new ServiceException("未找到可绑定的车辆!"); |
|
|
|
|
throw new CustomerException("未找到可绑定的车辆!"); |
|
|
|
|
} else { |
|
|
|
|
BasicdataDrivermiddleEntity basicdataDrivermiddleEntity = new BasicdataDrivermiddleEntity(); |
|
|
|
|
basicdataDrivermiddleEntity.setBrandId(carListByName.get(0).getId()); |
|
|
|
@ -308,7 +309,7 @@ public class BasicdataDriverArteryServiceImpl extends BaseServiceImpl<BasicdataD
|
|
|
|
|
if (ObjectUtils.isEmpty(basicdataCarrierEntities)) { |
|
|
|
|
// log.error("未找到承运商");
|
|
|
|
|
// continue;
|
|
|
|
|
throw new ServiceException("未找到承运商!"); |
|
|
|
|
throw new CustomerException("未找到承运商!"); |
|
|
|
|
} else { |
|
|
|
|
datum.setCarrierId(basicdataCarrierEntities.get(0).getId()); |
|
|
|
|
} |
|
|
|
@ -375,11 +376,11 @@ public class BasicdataDriverArteryServiceImpl extends BaseServiceImpl<BasicdataD
|
|
|
|
|
basicdataDrivermiddleServiceImpl.save(basicdataDrivermiddleEntity); |
|
|
|
|
} |
|
|
|
|
} catch (DataAccessException e) { |
|
|
|
|
throw new ServiceException("用户" + datum.getName() + "数据长度异常"); |
|
|
|
|
throw new CustomerException("用户" + datum.getName() + "数据长度异常"); |
|
|
|
|
} catch (ServiceException e) { |
|
|
|
|
throw new ServiceException("用户" + datum.getName() + e.getMessage()); |
|
|
|
|
throw new CustomerException("用户" + datum.getName() + e.getMessage()); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
throw new RuntimeException("用户" + datum.getName() + "数据错误" + e.getMessage()); |
|
|
|
|
throw new CustomerException("用户" + datum.getName() + "数据错误" + e.getMessage()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|