|
|
|
@ -36,11 +36,15 @@ import org.springblade.core.excel.util.ExcelUtil;
|
|
|
|
|
import org.springblade.core.mp.support.Condition; |
|
|
|
|
import org.springblade.core.mp.support.Query; |
|
|
|
|
import org.springblade.core.secure.BladeUser; |
|
|
|
|
import org.springblade.core.secure.utils.AuthUtil; |
|
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
|
import org.springblade.core.tool.constant.BladeConstant; |
|
|
|
|
import org.springblade.core.tool.utils.DateUtil; |
|
|
|
|
import org.springblade.core.tool.utils.Func; |
|
|
|
|
import org.springblade.system.entity.User; |
|
|
|
|
import org.springblade.system.feign.IUserClient; |
|
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
import org.springframework.web.servlet.handler.UserRoleAuthorizationInterceptor; |
|
|
|
|
import springfox.documentation.annotations.ApiIgnore; |
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
@ -65,6 +69,8 @@ public class BasicdataDriverArteryController extends BladeController {
|
|
|
|
|
|
|
|
|
|
private final IBasicdataVehicleService basicdataVehicleService; |
|
|
|
|
|
|
|
|
|
private final IUserClient userClient; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 司机信息表 详情 |
|
|
|
|
*/ |
|
|
|
@ -122,6 +128,12 @@ public class BasicdataDriverArteryController extends BladeController {
|
|
|
|
|
if(list.size() > 0){ |
|
|
|
|
return R.fail("绑定的用户已存在!不要重复绑定!!!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
R<User> userR = userClient.userInfoByPhone(AuthUtil.getUser().getTenantId(), basicdataDriverArtery.getPhone()); |
|
|
|
|
if (Func.isNotEmpty(userR.getData())){ |
|
|
|
|
User user = userR.getData(); |
|
|
|
|
basicdataDriverArtery.setUserId(user.getId()); |
|
|
|
|
} |
|
|
|
|
boolean save = basicdataDriverArteryService.save(basicdataDriverArtery); |
|
|
|
|
//加入关联表
|
|
|
|
|
if (null !=basicdataDriverArtery.getBindVehicles()&& save){ |
|
|
|
|