first commit
This commit is contained in:
@@ -0,0 +1 @@
|
||||
## 用户接口层
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
package com.mhd.user.interfaces.assember;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.mhd.user.domain.appLocation.repository.todo.AppLocationDO;
|
||||
import com.mhd.user.interfaces.dto.AppLocationDTO;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.UserError;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import com.mhd.user.interfaces.dto.TmsVehicleLocationQueryDTO;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* APP位置信息Assembler
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-01-04
|
||||
*/
|
||||
@Component
|
||||
public class AppLocationAssembler {
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public AppLocationDO toDO(AppLocationDTO appLocationDTO) {
|
||||
AppLocationDO appLocationDO = new AppLocationDO();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(appLocationDTO, appLocationDO, IgnoreNullUtil.getNullPropertyNames(appLocationDTO));
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
String userName = loginUser.getUsername();
|
||||
// 获取登录人id
|
||||
Long userId = loginUser.getUserid();
|
||||
if(appLocationDTO.getAppLocationId() != null){
|
||||
if(userId != null){
|
||||
appLocationDO.setUpdateBy(userId);
|
||||
}else {
|
||||
appLocationDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
appLocationDO.setUpdateByName(userName);
|
||||
appLocationDO.setUpdateTime(new Date());
|
||||
|
||||
}else {
|
||||
if(userId != null){
|
||||
appLocationDO.setCreateBy(userId);
|
||||
appLocationDO.setUpdateBy(userId);
|
||||
}else {
|
||||
appLocationDO.setCreateBy(new Long("0"));
|
||||
appLocationDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
appLocationDO.setCreateByName(userName);
|
||||
appLocationDO.setUpdateByName(userName);
|
||||
appLocationDO.setCreateTime(new Date());
|
||||
appLocationDO.setUpdateTime(new Date());
|
||||
appLocationDO.setDelFlag(1);
|
||||
}
|
||||
return appLocationDO;
|
||||
}
|
||||
|
||||
public AppLocationDO toAppLocationDO(TmsVehicleLocationQueryDTO tmsVehicleLocationQueryDTO) {
|
||||
AppLocationDO appLocationDO = new AppLocationDO();
|
||||
appLocationDO.setStartTime(tmsVehicleLocationQueryDTO.getStartTime());
|
||||
appLocationDO.setEndTime(tmsVehicleLocationQueryDTO.getEndTime());
|
||||
appLocationDO.setLicensePlate(tmsVehicleLocationQueryDTO.getVehicleLicenseNumber());
|
||||
appLocationDO.setType(tmsVehicleLocationQueryDTO.getType());
|
||||
appLocationDO.setWaybillNum(tmsVehicleLocationQueryDTO.getTransportationNumber());
|
||||
return appLocationDO;
|
||||
}
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
package com.mhd.user.interfaces.assember;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.mhd.user.domain.driverCurrentPosition.repository.todo.DriverCurrentPositionDO;
|
||||
import com.mhd.user.interfaces.dto.DriverCurrentPositionDTO;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.UserError;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 司机当前位置信息Assembler
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-01-04
|
||||
*/
|
||||
@Component
|
||||
public class DriverCurrentPositionAssembler {
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public DriverCurrentPositionDO toDO(DriverCurrentPositionDTO driverCurrentPositionDTO) {
|
||||
DriverCurrentPositionDO driverCurrentPositionDO = new DriverCurrentPositionDO();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(driverCurrentPositionDTO, driverCurrentPositionDO, IgnoreNullUtil.getNullPropertyNames(driverCurrentPositionDTO));
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
String userName = loginUser.getUsername();
|
||||
// 获取登录人id
|
||||
Long userId = loginUser.getUserid();
|
||||
if(driverCurrentPositionDTO.getDriverCurrentPositionId() != null){
|
||||
if(userId != null){
|
||||
driverCurrentPositionDO.setUpdateBy(userId);
|
||||
}else {
|
||||
driverCurrentPositionDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
driverCurrentPositionDO.setUpdateByName(userName);
|
||||
driverCurrentPositionDO.setUpdateTime(new Date());
|
||||
|
||||
}else {
|
||||
if(userId != null){
|
||||
driverCurrentPositionDO.setCreateBy(userId);
|
||||
driverCurrentPositionDO.setUpdateBy(userId);
|
||||
}else {
|
||||
driverCurrentPositionDO.setCreateBy(new Long("0"));
|
||||
driverCurrentPositionDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
driverCurrentPositionDO.setCreateByName(userName);
|
||||
driverCurrentPositionDO.setUpdateByName(userName);
|
||||
driverCurrentPositionDO.setCreateTime(new Date());
|
||||
driverCurrentPositionDO.setUpdateTime(new Date());
|
||||
driverCurrentPositionDO.setDelFlag(1);
|
||||
}
|
||||
return driverCurrentPositionDO;
|
||||
}
|
||||
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
package com.mhd.user.interfaces.assember;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.mhd.user.domain.driverFollowShipper.repository.todo.DriverFollowShipperDO;
|
||||
import com.mhd.user.interfaces.dto.DriverFollowShipperDTO;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.UserError;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 车主关注货主Assembler
|
||||
*
|
||||
* @author gen
|
||||
* @date 2023-12-26
|
||||
*/
|
||||
@Component
|
||||
public class DriverFollowShipperAssembler {
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public DriverFollowShipperDO toDO(DriverFollowShipperDTO driverFollowShipperDTO) {
|
||||
DriverFollowShipperDO driverFollowShipperDO = new DriverFollowShipperDO();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(driverFollowShipperDTO, driverFollowShipperDO, IgnoreNullUtil.getNullPropertyNames(driverFollowShipperDTO));
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
String userName = loginUser.getUsername();
|
||||
// 获取登录人id
|
||||
Long userId = loginUser.getUserid();
|
||||
if(driverFollowShipperDTO.getDriverFollowShipperId() != null){
|
||||
if(userId != null){
|
||||
driverFollowShipperDO.setUpdateBy(userId);
|
||||
}else {
|
||||
driverFollowShipperDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
driverFollowShipperDO.setUpdateByName(userName);
|
||||
driverFollowShipperDO.setUpdateTime(new Date());
|
||||
|
||||
}else {
|
||||
if(userId != null){
|
||||
driverFollowShipperDO.setCreateBy(userId);
|
||||
driverFollowShipperDO.setUpdateBy(userId);
|
||||
}else {
|
||||
driverFollowShipperDO.setCreateBy(new Long("0"));
|
||||
driverFollowShipperDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
driverFollowShipperDO.setCreateByName(userName);
|
||||
driverFollowShipperDO.setUpdateByName(userName);
|
||||
driverFollowShipperDO.setCreateTime(new Date());
|
||||
driverFollowShipperDO.setUpdateTime(new Date());
|
||||
driverFollowShipperDO.setDelFlag(1);
|
||||
}
|
||||
return driverFollowShipperDO;
|
||||
}
|
||||
|
||||
}
|
||||
+105
@@ -0,0 +1,105 @@
|
||||
package com.mhd.user.interfaces.assember;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.mhd.user.domain.userAggregate.entity.DriverVehicleBind;
|
||||
import com.mhd.user.domain.userAggregate.repository.todo.DriverVehicleBindDo;
|
||||
import com.mhd.user.interfaces.dto.DriverVehicleBindDto;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.UserError;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 司机车辆绑定关系Assembler
|
||||
*
|
||||
* @author ???
|
||||
* @date 2023-05-18
|
||||
*/
|
||||
@Slf4j
|
||||
public class DriverVehicleBindAssembler {
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public DriverVehicleBindDo toDo(DriverVehicleBindDto driverVehicleBindDto) {
|
||||
DriverVehicleBindDo driverVehicleBindDo = new DriverVehicleBindDo();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(driverVehicleBindDto, driverVehicleBindDo, IgnoreNullUtil.getNullPropertyNames(driverVehicleBindDto));
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
log.info("=============进入装配=============");
|
||||
log.info(loginUser.getToken());
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
String userName = loginUser.getUsername();
|
||||
// 获取登录人id
|
||||
Long userId = loginUser.getUserid();
|
||||
if(driverVehicleBindDto.getDriverVehicleBindId() != null){
|
||||
if(userId != null){
|
||||
driverVehicleBindDo.setUpdateBy(userId);
|
||||
}else {
|
||||
driverVehicleBindDo.setUpdateBy(new Long("0"));
|
||||
}
|
||||
driverVehicleBindDo.setUpdateByName(userName);
|
||||
driverVehicleBindDo.setUpdateTime(new Date());
|
||||
|
||||
}else {
|
||||
if(userId != null){
|
||||
driverVehicleBindDo.setCreateBy(userId);
|
||||
driverVehicleBindDo.setUpdateBy(userId);
|
||||
}else {
|
||||
driverVehicleBindDo.setCreateBy(new Long("0"));
|
||||
driverVehicleBindDo.setUpdateBy(new Long("0"));
|
||||
}
|
||||
driverVehicleBindDo.setCreateByName(userName);
|
||||
driverVehicleBindDo.setUpdateByName(userName);
|
||||
driverVehicleBindDo.setCreateTime(new Date());
|
||||
driverVehicleBindDo.setUpdateTime(new Date());
|
||||
driverVehicleBindDo.setDelFlag(1);
|
||||
}
|
||||
return driverVehicleBindDo;
|
||||
}
|
||||
|
||||
|
||||
public DriverVehicleBind toDo(DriverVehicleBindDo driverVehicleBindDo) {
|
||||
DriverVehicleBind driverVehicleBind = new DriverVehicleBind();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(driverVehicleBindDo, driverVehicleBind, IgnoreNullUtil.getNullPropertyNames(driverVehicleBindDo));
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
String userName = loginUser.getUsername();
|
||||
// 获取登录人id
|
||||
Long userId = loginUser.getUserid();
|
||||
if(driverVehicleBindDo.getDriverVehicleBindId() != null){
|
||||
if(userId != null){
|
||||
driverVehicleBind.setUpdateBy(userId);
|
||||
}else {
|
||||
driverVehicleBind.setUpdateBy(new Long("0"));
|
||||
}
|
||||
driverVehicleBind.setUpdateByName(userName);
|
||||
driverVehicleBind.setUpdateTime(new Date());
|
||||
|
||||
}else {
|
||||
if(userId != null){
|
||||
driverVehicleBind.setCreateBy(userId);
|
||||
driverVehicleBind.setUpdateBy(userId);
|
||||
}else {
|
||||
driverVehicleBind.setCreateBy(new Long("0"));
|
||||
driverVehicleBind.setUpdateBy(new Long("0"));
|
||||
}
|
||||
driverVehicleBind.setCreateByName(userName);
|
||||
driverVehicleBind.setUpdateByName(userName);
|
||||
driverVehicleBind.setCreateTime(new Date());
|
||||
driverVehicleBind.setUpdateTime(new Date());
|
||||
driverVehicleBind.setDelFlag(1);
|
||||
}
|
||||
return driverVehicleBind;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.mhd.user.interfaces.assember;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.mhd.common.core.domain.po.UserPo;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.UserError;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import com.mhd.user.domain.userAggregate.repository.todo.FeedbackDO;
|
||||
import com.mhd.user.interfaces.dto.addDTO.FeedbackDTO;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
@Service
|
||||
public class FeedbackAssember {
|
||||
|
||||
public FeedbackDO tofeedbackDO(FeedbackDTO feedbackDTO) {
|
||||
FeedbackDO feedbackDO = new FeedbackDO();
|
||||
BeanUtils.copyProperties(feedbackDTO, feedbackDO, IgnoreNullUtil.getNullPropertyNames(feedbackDTO));
|
||||
return feedbackDO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public FeedbackDO toDo(FeedbackDTO feedbackDTO) {
|
||||
FeedbackDO feedbackDO = new FeedbackDO();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(feedbackDTO, feedbackDO, IgnoreNullUtil.getNullPropertyNames(feedbackDTO));
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
UserPo userPo = loginUser.getUserPo();
|
||||
if (ObjectUtil.isNull(loginUser) || ObjectUtil.isNull(userPo)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
// 获取登录人id
|
||||
Long userId = userPo.getUserId();
|
||||
String userName = userPo.getUserName();
|
||||
Long topOrganizationId = userPo.getTopOrganizationId();
|
||||
Long organizationId = userPo.getOrganizationId();
|
||||
if (feedbackDTO.getFeedbackId() == null){
|
||||
feedbackDO.setOrganizationId(organizationId);
|
||||
feedbackDO.setTopOrganizationId(topOrganizationId);
|
||||
feedbackDO.setCreateBy(userId);
|
||||
feedbackDO.setCreateByName(userName);
|
||||
feedbackDO.setCreateTime(new Date());
|
||||
}else {
|
||||
feedbackDO.setUpdateBy(userId);
|
||||
feedbackDO.setUpdateByName(userName);
|
||||
feedbackDO.setUpdateTime(new Date());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return feedbackDO;
|
||||
}
|
||||
|
||||
}
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
package com.mhd.user.interfaces.assember;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.UserError;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import com.mhd.user.domain.motorcade.repository.todo.MotorcadeDO;
|
||||
import com.mhd.user.interfaces.dto.MotorcadeDto;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 车队Assembler
|
||||
*
|
||||
* @author zihao
|
||||
* @date 2023-05-24
|
||||
*/
|
||||
public class MotorcadeAssembler {
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public MotorcadeDO toDo(MotorcadeDto motorcadeDto) {
|
||||
MotorcadeDO motorcadeDo = new MotorcadeDO();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(motorcadeDto, motorcadeDo, IgnoreNullUtil.getNullPropertyNames(motorcadeDto));
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
if (loginUser.getUserPo() != null){
|
||||
Long topOrganizationId = loginUser.getUserPo().getTopOrganizationId();
|
||||
Long organizationId = loginUser.getUserPo().getOrganizationId();
|
||||
if (topOrganizationId != null && topOrganizationId != 1){
|
||||
motorcadeDo.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||
}
|
||||
if (organizationId != null && organizationId != 1){
|
||||
motorcadeDo.setOrganizationId(loginUser.getUserPo().getOrganizationId());
|
||||
}
|
||||
}
|
||||
String userName = loginUser.getUsername();
|
||||
// 获取登录人id
|
||||
Long userId = loginUser.getUserid();
|
||||
if(motorcadeDto.getMotorcadeId() != null){
|
||||
if(userId != null){
|
||||
motorcadeDo.setUpdateBy(userId);
|
||||
}else {
|
||||
motorcadeDo.setUpdateBy(new Long("0"));
|
||||
}
|
||||
motorcadeDo.setUpdateByName(userName);
|
||||
motorcadeDo.setUpdateTime(new Date());
|
||||
|
||||
}else {
|
||||
if(userId != null){
|
||||
motorcadeDo.setCreateBy(userId);
|
||||
motorcadeDo.setUpdateBy(userId);
|
||||
}else {
|
||||
motorcadeDo.setCreateBy(new Long("0"));
|
||||
motorcadeDo.setUpdateBy(new Long("0"));
|
||||
}
|
||||
motorcadeDo.setCreateByName(userName);
|
||||
motorcadeDo.setUpdateByName(userName);
|
||||
motorcadeDo.setCreateTime(new Date());
|
||||
motorcadeDo.setUpdateTime(new Date());
|
||||
motorcadeDo.setDelFlag(1);
|
||||
}
|
||||
return motorcadeDo;
|
||||
}
|
||||
|
||||
}
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
package com.mhd.user.interfaces.assember;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.mhd.user.domain.motorcadeCollection.repository.todo.MotorcadeCollectionDO;
|
||||
import com.mhd.user.interfaces.dto.MotorcadeCollectionDTO;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.UserError;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 车队代收协议Assembler
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-03-20
|
||||
*/
|
||||
@Component
|
||||
public class MotorcadeCollectionAssembler {
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public MotorcadeCollectionDO toDO(MotorcadeCollectionDTO motorcadeCollectionDTO) {
|
||||
MotorcadeCollectionDO motorcadeCollectionDO = new MotorcadeCollectionDO();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(motorcadeCollectionDTO, motorcadeCollectionDO, IgnoreNullUtil.getNullPropertyNames(motorcadeCollectionDTO));
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
String userName = loginUser.getUsername();
|
||||
// 获取登录人id
|
||||
Long userId = loginUser.getUserid();
|
||||
if(motorcadeCollectionDTO.getMotorcadeCollectionId() != null){
|
||||
if(userId != null){
|
||||
motorcadeCollectionDO.setUpdateBy(userId);
|
||||
}else {
|
||||
motorcadeCollectionDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
motorcadeCollectionDO.setUpdateByName(userName);
|
||||
motorcadeCollectionDO.setUpdateTime(new Date());
|
||||
|
||||
}else {
|
||||
if(userId != null){
|
||||
motorcadeCollectionDO.setCreateBy(userId);
|
||||
motorcadeCollectionDO.setUpdateBy(userId);
|
||||
}else {
|
||||
motorcadeCollectionDO.setCreateBy(new Long("0"));
|
||||
motorcadeCollectionDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
motorcadeCollectionDO.setCreateByName(userName);
|
||||
motorcadeCollectionDO.setUpdateByName(userName);
|
||||
motorcadeCollectionDO.setCreateTime(new Date());
|
||||
motorcadeCollectionDO.setUpdateTime(new Date());
|
||||
motorcadeCollectionDO.setDelFlag(1);
|
||||
}
|
||||
return motorcadeCollectionDO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取do实体
|
||||
* @return
|
||||
*/
|
||||
public MotorcadeCollectionDO getDoEntity() {
|
||||
MotorcadeCollectionDO motorcadeCollectionDO = new MotorcadeCollectionDO();
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
String userName = loginUser.getUsername();
|
||||
// 获取登录人id
|
||||
Long userId = loginUser.getUserid();
|
||||
if(userId != null){
|
||||
motorcadeCollectionDO.setCreateBy(userId);
|
||||
motorcadeCollectionDO.setUpdateBy(userId);
|
||||
}else {
|
||||
motorcadeCollectionDO.setCreateBy(new Long("0"));
|
||||
motorcadeCollectionDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
motorcadeCollectionDO.setCreateByName(userName);
|
||||
motorcadeCollectionDO.setUpdateByName(userName);
|
||||
motorcadeCollectionDO.setCreateTime(new Date());
|
||||
motorcadeCollectionDO.setUpdateTime(new Date());
|
||||
motorcadeCollectionDO.setDelFlag(1);
|
||||
return motorcadeCollectionDO;
|
||||
}
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
package com.mhd.user.interfaces.assember;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.mhd.user.domain.motorcade.entity.MotorcadeDriver;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.UserError;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 车队司机Assembler
|
||||
*
|
||||
*/
|
||||
public class MotorcadeDriverAssembler {
|
||||
|
||||
|
||||
/**
|
||||
* 获取装配实体
|
||||
* @return
|
||||
*/
|
||||
public MotorcadeDriver getEntity() {
|
||||
|
||||
MotorcadeDriver motorcadeDriver = new MotorcadeDriver();
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
String userName = loginUser.getUsername();
|
||||
// 获取登录人id
|
||||
Long userId = loginUser.getUserid();
|
||||
if(userId != null){
|
||||
motorcadeDriver.setCreateBy(userId);
|
||||
motorcadeDriver.setUpdateBy(userId);
|
||||
}else {
|
||||
motorcadeDriver.setCreateBy(new Long("0"));
|
||||
motorcadeDriver.setUpdateBy(new Long("0"));
|
||||
}
|
||||
motorcadeDriver.setCreateByName(userName);
|
||||
motorcadeDriver.setUpdateByName(userName);
|
||||
motorcadeDriver.setCreateTime(new Date());
|
||||
motorcadeDriver.setUpdateTime(new Date());
|
||||
motorcadeDriver.setDelFlag(1);
|
||||
return motorcadeDriver;
|
||||
}
|
||||
}
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
package com.mhd.user.interfaces.assember;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.mhd.user.domain.motorcade.repository.todo.MotorcadeRecordDO;
|
||||
import com.mhd.user.interfaces.dto.MotorcadeRecordDto;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.UserError;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 车队邀请记录Assembler
|
||||
*
|
||||
* @author zihao
|
||||
* @date 2023-05-24
|
||||
*/
|
||||
public class MotorcadeRecordAssembler {
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public MotorcadeRecordDO toDo(MotorcadeRecordDto motorcadeRecordDto) {
|
||||
MotorcadeRecordDO motorcadeRecordDo = new MotorcadeRecordDO();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(motorcadeRecordDto, motorcadeRecordDo, IgnoreNullUtil.getNullPropertyNames(motorcadeRecordDto));
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
String userName = loginUser.getUsername();
|
||||
// 获取登录人id
|
||||
Long userId = loginUser.getUserid();
|
||||
if(motorcadeRecordDto.getMotorcadeRecordId() != null){
|
||||
if(userId != null){
|
||||
motorcadeRecordDo.setUpdateBy(userId);
|
||||
}else {
|
||||
motorcadeRecordDo.setUpdateBy(new Long("0"));
|
||||
}
|
||||
motorcadeRecordDo.setUpdateByName(userName);
|
||||
motorcadeRecordDo.setUpdateTime(new Date());
|
||||
|
||||
}else {
|
||||
if(userId != null){
|
||||
motorcadeRecordDo.setCreateBy(userId);
|
||||
motorcadeRecordDo.setUpdateBy(userId);
|
||||
}else {
|
||||
motorcadeRecordDo.setCreateBy(new Long("0"));
|
||||
motorcadeRecordDo.setUpdateBy(new Long("0"));
|
||||
}
|
||||
motorcadeRecordDo.setCreateByName(userName);
|
||||
motorcadeRecordDo.setUpdateByName(userName);
|
||||
motorcadeRecordDo.setCreateTime(new Date());
|
||||
motorcadeRecordDo.setUpdateTime(new Date());
|
||||
motorcadeRecordDo.setDelFlag(1);
|
||||
}
|
||||
return motorcadeRecordDo;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.mhd.user.interfaces.assember;
|
||||
|
||||
import com.mhd.user.domain.roleAggregate.repository.todo.CustomAuthDO;
|
||||
import com.mhd.user.domain.roleAggregate.repository.todo.RoleDo;
|
||||
import com.mhd.user.interfaces.dto.addDTO.CustomAuthDTO;
|
||||
import com.mhd.user.interfaces.dto.addDTO.RoleDTO;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class RoleAssember {
|
||||
|
||||
public RoleDo toRoleDo(RoleDTO roleDTO) {
|
||||
RoleDo roleDo = new RoleDo();
|
||||
BeanUtils.copyProperties(roleDTO, roleDo, IgnoreNullUtil.getNullPropertyNames(roleDTO));
|
||||
return roleDo;
|
||||
}
|
||||
public CustomAuthDO toCustomAuthDO(CustomAuthDTO authDTO) {
|
||||
CustomAuthDO authDO = new CustomAuthDO();
|
||||
BeanUtils.copyProperties(authDTO, authDO, IgnoreNullUtil.getNullPropertyNames(authDTO));
|
||||
return authDO;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.mhd.user.interfaces.assember;
|
||||
|
||||
import com.mhd.user.domain.roleAggregate.repository.todo.RoleMenuDo;
|
||||
import com.mhd.user.interfaces.dto.addDTO.RoleMenuDTO;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class RoleMenuAssember {
|
||||
|
||||
public RoleMenuDo toRoleMenuDO(RoleMenuDTO roleMenuDTO) {
|
||||
RoleMenuDo roleMenuDo = new RoleMenuDo();
|
||||
BeanUtils.copyProperties(roleMenuDTO, roleMenuDo, IgnoreNullUtil.getNullPropertyNames(roleMenuDTO));
|
||||
return roleMenuDo;
|
||||
}
|
||||
}
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
package com.mhd.user.interfaces.assember;
|
||||
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.user.domain.userAggregate.repository.po.UserAddressPO;
|
||||
import com.mhd.user.domain.userAggregate.repository.todo.UserAddressDO;
|
||||
import com.mhd.user.interfaces.dto.UserAddressDTO;
|
||||
import com.mhd.user.interfaces.dto.addDTO.UserAddressAddDTO;
|
||||
import com.mhd.user.interfaces.dto.updateDTO.UserAddressUpdateDTO;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户地址组装器
|
||||
*
|
||||
* @author gen
|
||||
*/
|
||||
public class UserAddressAssembler {
|
||||
|
||||
/**
|
||||
* 新增DTO转DO
|
||||
*/
|
||||
public static UserAddressDO toAddDO(UserAddressAddDTO addDTO) {
|
||||
if (addDTO == null) {
|
||||
return null;
|
||||
}
|
||||
UserAddressDO userAddressDO = new UserAddressDO();
|
||||
BeanUtils.copyProperties(addDTO, userAddressDO);
|
||||
return userAddressDO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改DTO转DO
|
||||
*/
|
||||
public static UserAddressDO toUpdateDO(UserAddressUpdateDTO updateDTO) {
|
||||
if (updateDTO == null) {
|
||||
return null;
|
||||
}
|
||||
UserAddressDO userAddressDO = new UserAddressDO();
|
||||
BeanUtils.copyProperties(updateDTO, userAddressDO, IgnoreNullUtil.getNullPropertyNames(updateDTO));
|
||||
return userAddressDO;
|
||||
}
|
||||
|
||||
/**
|
||||
* PO转DTO
|
||||
*/
|
||||
public static UserAddressDTO toDTO(UserAddressPO userAddressPO) {
|
||||
if (userAddressPO == null) {
|
||||
return null;
|
||||
}
|
||||
UserAddressDTO userAddressDTO = new UserAddressDTO();
|
||||
BeanUtils.copyProperties(userAddressPO, userAddressDTO);
|
||||
return userAddressDTO;
|
||||
}
|
||||
|
||||
/**
|
||||
* PO列表转DTO列表
|
||||
*/
|
||||
public static List<UserAddressDTO> toDTOList(List<UserAddressPO> userAddressPOList) {
|
||||
if (userAddressPOList == null || userAddressPOList.isEmpty()) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List<UserAddressDTO> userAddressDTOList = new ArrayList<>();
|
||||
for (UserAddressPO userAddressPO : userAddressPOList) {
|
||||
userAddressDTOList.add(toDTO(userAddressPO));
|
||||
}
|
||||
return userAddressDTOList;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.mhd.user.interfaces.assember;
|
||||
|
||||
import com.mhd.user.domain.userAggregate.repository.todo.UserDO;
|
||||
import com.mhd.user.interfaces.dto.addDTO.UserDTO;
|
||||
import com.mhd.user.interfaces.dto.addDTO.UserUpdateDTO;
|
||||
import com.mhd.common.core.utils.AESUtil;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.core.utils.StringUtils;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Service
|
||||
public class UserAssember {
|
||||
|
||||
public UserDO toUserDO(UserDTO userDTO) {
|
||||
UserDO userDO = new UserDO();
|
||||
BeanUtils.copyProperties(userDTO, userDO, IgnoreNullUtil.getNullPropertyNames(userDTO));
|
||||
if (StringUtils.isNotBlank(userDO.getUserIdcardNumberDes())){
|
||||
//解密身份证号
|
||||
String idcardNumber = AESUtil.decrypt(userDO.getUserIdcardNumberDes());
|
||||
userDO.setUserIdcardNumber(idcardNumber);
|
||||
}
|
||||
// 获取登录人id
|
||||
Long userId = SecurityUtils.getUserId();
|
||||
if(userDO.getUserId() != null) {
|
||||
if(userId != null){
|
||||
userDO.setUpdateBy(userId);
|
||||
userDO.setUpdateByName(SecurityUtils.getUsername());
|
||||
}else {
|
||||
userDO.setUpdateBy(0L);
|
||||
}
|
||||
userDO.setUpdateTime(new Date());
|
||||
}else {
|
||||
if(userId != null){
|
||||
userDO.setCreateBy(userId);
|
||||
userDO.setCreateByName(SecurityUtils.getUsername());
|
||||
}else {
|
||||
userDO.setCreateBy(0L);
|
||||
}
|
||||
userDO.setDelFlag(1);
|
||||
userDO.setCreateTime(new Date());
|
||||
}
|
||||
return userDO;
|
||||
}
|
||||
|
||||
public UserDO toUserUpdateDO(UserUpdateDTO userDTO) {
|
||||
UserDO userDO = new UserDO();
|
||||
BeanUtils.copyProperties(userDTO, userDO, IgnoreNullUtil.getNullPropertyNames(userDTO));
|
||||
if (StringUtils.isNotBlank(userDO.getUserIdcardNumberDes())){
|
||||
//解密身份证号
|
||||
String idcardNumber = AESUtil.decrypt(userDO.getUserIdcardNumberDes());
|
||||
userDO.setUserIdcardNumber(idcardNumber);
|
||||
}
|
||||
return userDO;
|
||||
}
|
||||
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
package com.mhd.user.interfaces.assember;
|
||||
|
||||
import com.mhd.user.domain.userAggregate.repository.todo.*;
|
||||
import com.mhd.user.interfaces.dto.addDTO.UserDataPermissionDTO;
|
||||
import com.mhd.user.interfaces.dto.queryDTO.UserDataPermissionQueryDTO;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class UserDataPermissionAssember {
|
||||
public List<UserDataPermissionDO> toUserDataPermissionDOList(UserDataPermissionDTO userRoleDTOList) {
|
||||
List<UserDataPermissionDO> userDataPermissionDOList= new ArrayList<>();
|
||||
for(MenuProductDO menuProductDO : userRoleDTOList.getMenuProductDOList()) {
|
||||
for (DataPermissionDO dataPermissionDO : userRoleDTOList.getDataPermissionDOList()) {
|
||||
UserDataPermissionDO userDataPermissionDO = new UserDataPermissionDO();
|
||||
BeanUtils.copyProperties(dataPermissionDO, userDataPermissionDO, IgnoreNullUtil.getNullPropertyNames(dataPermissionDO));
|
||||
userDataPermissionDO.setUserId(userRoleDTOList.getUserId());
|
||||
userDataPermissionDO.setMenuId(menuProductDO.getMenuId());
|
||||
userDataPermissionDO.setProductId(menuProductDO.getProductId());
|
||||
userDataPermissionDOList.add(userDataPermissionDO);
|
||||
}
|
||||
}
|
||||
return userDataPermissionDOList;
|
||||
}
|
||||
|
||||
public UserDataPermissionDO toUserDataPermissionDO(UserDataPermissionQueryDTO userDataPermissionQueryDTO) {
|
||||
UserDataPermissionDO userDataPermissionDO = new UserDataPermissionDO();
|
||||
BeanUtils.copyProperties(userDataPermissionQueryDTO, userDataPermissionDO, IgnoreNullUtil.getNullPropertyNames(userDataPermissionQueryDTO));
|
||||
return userDataPermissionDO;
|
||||
}
|
||||
}
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
package com.mhd.user.interfaces.assember;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.mhd.user.domain.userAggregate.repository.todo.UserDriverDO;
|
||||
import com.mhd.user.interfaces.dto.addDTO.UserDriverDTO;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.UserError;
|
||||
import com.mhd.common.core.utils.AESUtil;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.core.utils.StringUtils;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Service
|
||||
public class UserDriverAssember {
|
||||
|
||||
public UserDriverDO toUserDriverDO(UserDriverDTO userDriverDTO) {
|
||||
UserDriverDO userDriverDO = new UserDriverDO();
|
||||
BeanUtils.copyProperties(userDriverDTO, userDriverDO, IgnoreNullUtil.getNullPropertyNames(userDriverDTO));
|
||||
if (StringUtils.isNotBlank(userDriverDO.getUserIdcardNumberDes())){
|
||||
//解密身份证号
|
||||
String idcardNumber = AESUtil.decrypt(userDriverDO.getUserIdcardNumberDes());
|
||||
userDriverDO.setUserIdcardNumber(idcardNumber);
|
||||
}
|
||||
return userDriverDO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public UserDriverDO toDo(UserDriverDTO userDriverDTO) {
|
||||
UserDriverDO userDriverDO = new UserDriverDO();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(userDriverDTO, userDriverDO, IgnoreNullUtil.getNullPropertyNames(userDriverDTO));
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
if (loginUser.getUserPo() != null){
|
||||
Long topOrganizationId = loginUser.getUserPo().getTopOrganizationId();
|
||||
Long organizationId = loginUser.getUserPo().getOrganizationId();
|
||||
String organizationName = loginUser.getUserPo().getOrganizationName();
|
||||
if (topOrganizationId != null && topOrganizationId != 1){
|
||||
userDriverDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||
}
|
||||
if (organizationId != null && organizationId != 1){
|
||||
userDriverDO.setOrganizationId(loginUser.getUserPo().getOrganizationId());
|
||||
}
|
||||
if (StrUtil.isNotEmpty(organizationName) && !"平台".equals(organizationName)) {
|
||||
userDriverDO.setOrganizationName(organizationName);
|
||||
}
|
||||
}
|
||||
String userName = loginUser.getUsername();
|
||||
// 获取登录人id
|
||||
Long userId = loginUser.getUserid();
|
||||
if(userDriverDTO.getDriverId() != null){
|
||||
if(userId != null){
|
||||
userDriverDO.setUpdateBy(userId);
|
||||
}else {
|
||||
userDriverDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
userDriverDO.setUpdateByName(userName);
|
||||
userDriverDO.setUpdateTime(new Date());
|
||||
|
||||
}else {
|
||||
if(userId != null){
|
||||
userDriverDO.setCreateBy(userId);
|
||||
userDriverDO.setUpdateBy(userId);
|
||||
}else {
|
||||
userDriverDO.setCreateBy(new Long("0"));
|
||||
userDriverDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
userDriverDO.setCreateByName(userName);
|
||||
userDriverDO.setUpdateByName(userName);
|
||||
userDriverDO.setCreateTime(new Date());
|
||||
userDriverDO.setUpdateTime(new Date());
|
||||
userDriverDO.setDelFlag(1);
|
||||
}
|
||||
return userDriverDO;
|
||||
}
|
||||
|
||||
}
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
package com.mhd.user.interfaces.assember;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.mhd.user.domain.userAggregate.entity.UserDriverEnterprise;
|
||||
import com.mhd.user.domain.userAggregate.repository.todo.UserDriverEnterpriseDo;
|
||||
import com.mhd.user.interfaces.dto.addDTO.UserDriverEnterpriseDto;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.UserError;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 运输企业Assembler
|
||||
*
|
||||
* @author ???
|
||||
* @date 2023-05-17
|
||||
*/
|
||||
public class UserDriverEnterpriseAssembler {
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public UserDriverEnterpriseDo toDo(UserDriverEnterpriseDto userDriverEnterpriseDto) {
|
||||
UserDriverEnterpriseDo userDriverEnterpriseDo = new UserDriverEnterpriseDo();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(userDriverEnterpriseDto, userDriverEnterpriseDo, IgnoreNullUtil.getNullPropertyNames(userDriverEnterpriseDto));
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
if (loginUser.getUserPo() != null){
|
||||
Long topOrganizationId = loginUser.getUserPo().getTopOrganizationId();
|
||||
Long organizationId = loginUser.getUserPo().getOrganizationId();
|
||||
String organizationName = loginUser.getUserPo().getOrganizationName();
|
||||
if (topOrganizationId != null && topOrganizationId != 1){
|
||||
userDriverEnterpriseDto.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||
}
|
||||
if (organizationId != null && organizationId != 1){
|
||||
userDriverEnterpriseDto.setOrganizationId(loginUser.getUserPo().getOrganizationId());
|
||||
}
|
||||
if (StrUtil.isNotEmpty(organizationName) && !"平台".equals(organizationName)) {
|
||||
userDriverEnterpriseDto.setOrganizationName(organizationName);
|
||||
}
|
||||
}
|
||||
String userName = loginUser.getUsername();
|
||||
// 获取登录人id
|
||||
Long userId = loginUser.getUserid();
|
||||
if(userDriverEnterpriseDto.getUserDriverEnterpriseId() != null){
|
||||
if(userId != null){
|
||||
userDriverEnterpriseDo.setUpdateBy(userId);
|
||||
}else {
|
||||
userDriverEnterpriseDo.setUpdateBy(new Long("0"));
|
||||
}
|
||||
userDriverEnterpriseDo.setUpdateByName(userName);
|
||||
userDriverEnterpriseDo.setUpdateTime(new Date());
|
||||
|
||||
}else {
|
||||
if(userId != null){
|
||||
userDriverEnterpriseDo.setCreateBy(userId);
|
||||
userDriverEnterpriseDo.setUpdateBy(userId);
|
||||
}else {
|
||||
userDriverEnterpriseDo.setCreateBy(new Long("0"));
|
||||
userDriverEnterpriseDo.setUpdateBy(new Long("0"));
|
||||
}
|
||||
userDriverEnterpriseDo.setCreateByName(userName);
|
||||
userDriverEnterpriseDo.setUpdateByName(userName);
|
||||
userDriverEnterpriseDo.setCreateTime(new Date());
|
||||
userDriverEnterpriseDo.setUpdateTime(new Date());
|
||||
userDriverEnterpriseDo.setDelFlag(1);
|
||||
}
|
||||
return userDriverEnterpriseDo;
|
||||
}
|
||||
|
||||
|
||||
public UserDriverEnterprise toDo(UserDriverEnterpriseDo userDriverEnterpriseDo) {
|
||||
UserDriverEnterprise userDriverEnterprise = new UserDriverEnterprise();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(userDriverEnterpriseDo, userDriverEnterprise, IgnoreNullUtil.getNullPropertyNames(userDriverEnterpriseDo));
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
String userName = loginUser.getUsername();
|
||||
// 获取登录人id
|
||||
Long userId = loginUser.getUserid();
|
||||
if(userDriverEnterpriseDo.getUserDriverEnterpriseId() != null){
|
||||
if(userId != null){
|
||||
userDriverEnterprise.setUpdateBy(userId);
|
||||
}else {
|
||||
userDriverEnterprise.setUpdateBy(new Long("0"));
|
||||
}
|
||||
userDriverEnterprise.setUpdateByName(userName);
|
||||
userDriverEnterprise.setUpdateTime(new Date());
|
||||
|
||||
}else {
|
||||
if(userId != null){
|
||||
userDriverEnterprise.setCreateBy(userId);
|
||||
userDriverEnterprise.setUpdateBy(userId);
|
||||
}else {
|
||||
userDriverEnterprise.setCreateBy(new Long("0"));
|
||||
userDriverEnterprise.setUpdateBy(new Long("0"));
|
||||
}
|
||||
userDriverEnterprise.setCreateByName(userName);
|
||||
userDriverEnterprise.setUpdateByName(userName);
|
||||
userDriverEnterprise.setCreateTime(new Date());
|
||||
userDriverEnterprise.setUpdateTime(new Date());
|
||||
userDriverEnterprise.setDelFlag(1);
|
||||
}
|
||||
return userDriverEnterprise;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.mhd.user.interfaces.assember;
|
||||
|
||||
import com.mhd.user.domain.userAggregate.repository.todo.UserMenuDo;
|
||||
import com.mhd.user.interfaces.dto.addDTO.UserMenuDTO;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class UserMenuAssember {
|
||||
|
||||
public UserMenuDo toUserMenuDO(UserMenuDTO userMenuDTO) {
|
||||
UserMenuDo userMenuDo = new UserMenuDo();
|
||||
BeanUtils.copyProperties(userMenuDTO, userMenuDo, IgnoreNullUtil.getNullPropertyNames(userMenuDTO));
|
||||
return userMenuDo;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.mhd.user.interfaces.assember;
|
||||
|
||||
import com.mhd.user.domain.userAggregate.repository.todo.UserRoleDo;
|
||||
import com.mhd.user.interfaces.dto.addDTO.UserRoleDTO;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class UserRoleAssember {
|
||||
|
||||
public UserRoleDo toUserRoleDO(UserRoleDTO userRoleDTO) {
|
||||
UserRoleDo userRoleDo = new UserRoleDo();
|
||||
BeanUtils.copyProperties(userRoleDTO, userRoleDo, IgnoreNullUtil.getNullPropertyNames(userRoleDTO));
|
||||
return userRoleDo;
|
||||
}
|
||||
public List<UserRoleDo> toUserRoleDOList(List<UserRoleDTO> userRoleDTOList) {
|
||||
List<UserRoleDo> userRoleDoList= new ArrayList<>();
|
||||
for(UserRoleDTO userRoleDTO : userRoleDTOList){
|
||||
UserRoleDo userRoleDo = new UserRoleDo();
|
||||
BeanUtils.copyProperties(userRoleDTO, userRoleDo, IgnoreNullUtil.getNullPropertyNames(userRoleDTO));
|
||||
userRoleDoList.add(userRoleDo);
|
||||
}
|
||||
return userRoleDoList;
|
||||
}
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package com.mhd.user.interfaces.assember;
|
||||
|
||||
import com.mhd.user.domain.userAggregate.repository.todo.UserShipperDO;
|
||||
import com.mhd.user.interfaces.dto.addDTO.UserShipperDTO;
|
||||
import com.mhd.common.core.utils.AESUtil;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.core.utils.StringUtils;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class UserShipperAssember {
|
||||
|
||||
public UserShipperDO toUserShipperDO(UserShipperDTO userShipperDTO) {
|
||||
UserShipperDO shipperDO = new UserShipperDO();
|
||||
BeanUtils.copyProperties(userShipperDTO, shipperDO, IgnoreNullUtil.getNullPropertyNames(userShipperDTO));
|
||||
if (StringUtils.isNotBlank(shipperDO.getUserIdcardNumberDes())){
|
||||
//解密身份证号
|
||||
String idcardNumber = AESUtil.decrypt(shipperDO.getUserIdcardNumberDes());
|
||||
shipperDO.setUserIdcardNumber(idcardNumber);
|
||||
}
|
||||
return shipperDO;
|
||||
}
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package com.mhd.user.interfaces.assembler.projectUser;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.mhd.user.domain.projectUser.repository.todo.ProjectUserDO;
|
||||
import com.mhd.common.core.domain.dto.ProjectUserDTO;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.UserError;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 项目-用户关联Assembler
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-02-02
|
||||
*/
|
||||
@Component
|
||||
public class ProjectUserAssembler {
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public ProjectUserDO toDO(ProjectUserDTO projectUserDTO) {
|
||||
ProjectUserDO projectUserDO = new ProjectUserDO();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(projectUserDTO, projectUserDO, IgnoreNullUtil.getNullPropertyNames(projectUserDTO));
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
return projectUserDO;
|
||||
}
|
||||
|
||||
}
|
||||
+134
@@ -0,0 +1,134 @@
|
||||
package com.mhd.user.interfaces.constants;
|
||||
|
||||
/**
|
||||
* 用户与司机业务实体常量定义
|
||||
* 包含业务类型、认证状态、司机类型等核心常量
|
||||
* 所有常量均采用大写命名规范
|
||||
*/
|
||||
public class UserDriverConstants {
|
||||
/**
|
||||
* 业务类型:普通客户(值为1)
|
||||
* 用于标识用户仅作为普通客户的身份类型
|
||||
*/
|
||||
public static final int BUSINESS_TYPE_CUSTOMER = 1;
|
||||
|
||||
/**
|
||||
* 业务类型:司机(值为2)
|
||||
* 用于标识用户仅作为司机的身份类型
|
||||
*/
|
||||
public static final int BUSINESS_TYPE_DRIVER = 2;
|
||||
|
||||
/**
|
||||
* 业务类型:客户兼司机(值为3)
|
||||
* 用于标识用户同时具有客户和司机的双重身份
|
||||
*/
|
||||
public static final int BUSINESS_TYPE_CUSTOMER_AND_DRIVER = 3;
|
||||
|
||||
/**
|
||||
* 司机状态:表单填写完毕(值为2)
|
||||
* 表示司机信息表单已完成填写的状态标识
|
||||
*/
|
||||
public static final int DRIVER_FILL_COMPLETED = 2;
|
||||
|
||||
/**
|
||||
* 用户认证状态:审核中(值为2)
|
||||
* 标识用户提交的认证信息正在审核流程中
|
||||
*/
|
||||
public static final int USER_AUTH_STATUS_PENDING_APPROVAL = 2;
|
||||
|
||||
/**
|
||||
* 司机认证状态:审核通过(值为3)
|
||||
* 标识司机提交的认证信息已通过审核流程
|
||||
*/
|
||||
public static final int AUTH_STATUS_APPROVED = 3;
|
||||
|
||||
/**
|
||||
* 司机类型:网络货运司机(值为1)
|
||||
* 专门从事网络货运业务的司机类型标识
|
||||
*/
|
||||
public static final int DRIVER_TYPE_NETWORK_FREIGHT = 1;
|
||||
|
||||
|
||||
/**
|
||||
* 司机类型:承运车队长(值为2)
|
||||
* 标识承担运输任务的车队长角色类型
|
||||
*/
|
||||
public static final int DRIVER_TYPE_CAPTAIN = 2;
|
||||
|
||||
/**
|
||||
* 司机类型:承运企业(值为1)
|
||||
* 标识承担运输任务的承运企业类型
|
||||
*/
|
||||
public static final int DRIVER_TYPE_ENTERPRISE = 1;
|
||||
|
||||
/**
|
||||
* 自动审核功能:启用状态(值为1)
|
||||
* 标识系统自动审核功能处于开启状态
|
||||
*/
|
||||
public static final int AUTOMATIC_CHECK_ENABLED = 1;
|
||||
|
||||
/**
|
||||
* 车队长状态:表单填写完毕(值为2)
|
||||
* 标识车队长信息表单已完成填写的状态
|
||||
*/
|
||||
public static final int CAPTAIN_FILL_COMPLETED = 2;
|
||||
|
||||
/**
|
||||
* 认证类型:车队长认证(值为2)
|
||||
* 用于标识车队长身份的认证类型标识
|
||||
*/
|
||||
public static final int AUTH_TYPE_CAPTAIN = 2;
|
||||
|
||||
|
||||
/**
|
||||
* 认证类型: 企业认证 (值为3)
|
||||
* 用于标识企业认证身份的认证类型标识
|
||||
*/
|
||||
public static final int AUTH_TYPE_COMPANY = 3;
|
||||
|
||||
/**
|
||||
* 运输企业
|
||||
*/
|
||||
public static final int CARRIER_TYPE_ENTERPRISE = 2;
|
||||
|
||||
/**
|
||||
* 自有车辆
|
||||
*/
|
||||
public static final Integer OWN_VEHICLE = 0;
|
||||
|
||||
/**
|
||||
* 社会车辆
|
||||
*/
|
||||
public static final Integer SOCIAL_VEHICLE = 1;
|
||||
|
||||
/**
|
||||
* 自有司机
|
||||
*/
|
||||
public static final Integer OWN_DIVER = 1;
|
||||
|
||||
/**
|
||||
* 社会司机
|
||||
*/
|
||||
public static final Integer SOCIAL_DIVER = 2;
|
||||
/**
|
||||
* 默认法人认知类型代码
|
||||
*/
|
||||
public static final String DEFAULT_LEGAL_PERSON_ID_TYPE = "10";
|
||||
/**
|
||||
* 默认法人认知类型名称
|
||||
*/
|
||||
public static final String DEFAULT_LEGAL_PERSON_ID_NAME = "201_居民身份证";
|
||||
/**
|
||||
* 返回code
|
||||
*/
|
||||
public static final String DICT_CODE_SUCCESS = "200";
|
||||
/**
|
||||
* 返回字段
|
||||
*/
|
||||
public static final String DICT_KEY_CODE = "code";
|
||||
/**
|
||||
* 返回字段
|
||||
*/
|
||||
public static final String DICT_KEY_DATA = "data";
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.mhd.user.interfaces.dto;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.math.BigDecimal;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* APP位置信息对象 app_location
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-01-04
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class AppLocationDTO extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("APP位置id")
|
||||
private Long appLocationId;
|
||||
|
||||
@ApiModelProperty("用户表ID")
|
||||
@Excel(name = "用户表ID")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("经度")
|
||||
@Excel(name = "经度")
|
||||
private String longitude;
|
||||
|
||||
@ApiModelProperty("纬度")
|
||||
@Excel(name = "纬度")
|
||||
private String latitude;
|
||||
|
||||
@ApiModelProperty("速度")
|
||||
@Excel(name = "速度")
|
||||
private Long speed;
|
||||
|
||||
@ApiModelProperty("位置信息")
|
||||
@Excel(name = "位置信息")
|
||||
private String address;
|
||||
|
||||
@ApiModelProperty("运单号")
|
||||
@Excel(name = "运单号")
|
||||
private String waybillNum;
|
||||
|
||||
@ApiModelProperty("车牌号")
|
||||
@Excel(name = "车牌号")
|
||||
private String licensePlate;
|
||||
|
||||
@ApiModelProperty(value = "开始日期")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date startTime;
|
||||
|
||||
@ApiModelProperty(value = "结束日期")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date endTime;
|
||||
|
||||
}
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
package com.mhd.user.interfaces.dto;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.math.BigDecimal;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 司机当前位置信息对象 driver_current_position
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-01-04
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class DriverCurrentPositionDTO extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("司机位置id")
|
||||
private Long driverCurrentPositionId;
|
||||
|
||||
@ApiModelProperty("用户表ID")
|
||||
@Excel(name = "用户表ID")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("经度")
|
||||
@Excel(name = "经度")
|
||||
private String longitude;
|
||||
|
||||
@ApiModelProperty("纬度")
|
||||
@Excel(name = "纬度")
|
||||
private String latitude;
|
||||
|
||||
@ApiModelProperty("位置信息")
|
||||
@Excel(name = "位置信息")
|
||||
private String address;
|
||||
|
||||
@ApiModelProperty("车牌号")
|
||||
@Excel(name = "车牌号")
|
||||
private String licensePlate;
|
||||
|
||||
@ApiModelProperty("行进方向")
|
||||
@Excel(name = "行进方向")
|
||||
private String drivingDirection;
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
}
|
||||
@@ -0,0 +1,299 @@
|
||||
package com.mhd.user.interfaces.dto;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 承运人数据导入dto
|
||||
*/
|
||||
@Data
|
||||
public class DriverExcelDto {
|
||||
|
||||
//===========================承运司机、车队长信息==========================
|
||||
|
||||
@ExcelProperty(index = 0)
|
||||
@ApiModelProperty("认证类型 1-承运人 2-车队长 3-承运企业")
|
||||
private String authType;
|
||||
|
||||
@ExcelProperty(index = 1)
|
||||
@ApiModelProperty("用户头像")
|
||||
private String avatar;
|
||||
|
||||
@ExcelProperty(index = 2)
|
||||
@ApiModelProperty("用户账号")
|
||||
private String userAccount;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("用户手机号")
|
||||
private String userPhone;
|
||||
|
||||
@ExcelProperty(index = 3)
|
||||
@ApiModelProperty("用户姓名")
|
||||
private String userName;
|
||||
|
||||
@ExcelProperty(index = 4)
|
||||
@ApiModelProperty("身份证人像面")
|
||||
private String userIdcardFrontUrl;
|
||||
|
||||
@ExcelProperty(index = 5)
|
||||
@ApiModelProperty("身份证国徽面")
|
||||
private String userIdcardBackUrl;
|
||||
|
||||
@ExcelProperty(index = 6)
|
||||
@ApiModelProperty("手持身份证正面")
|
||||
private String userIdcardInhandUrl;
|
||||
|
||||
@ExcelProperty(index = 7)
|
||||
@ApiModelProperty("身份证号")
|
||||
private String userIdcardNumber;
|
||||
|
||||
@ExcelProperty(index = 8)
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty("身份证有效期(开始时间)")
|
||||
private Date userIdcardDateFrom;
|
||||
|
||||
@ExcelProperty(index = 9)
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty("身份证有效期(结束时间)")
|
||||
private Date userIdcardDateTo;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty(name = "身份证是否长期:0-无状态,1-是,2-否")
|
||||
private Integer userIdcardLong;
|
||||
|
||||
@ExcelProperty(index = 10)
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty("出生日期")
|
||||
private Date userBirthday;
|
||||
|
||||
@ExcelProperty(index = 11)
|
||||
@ApiModelProperty("地区编码")
|
||||
private Long userAreaCountyId;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty(name = "县区名称")
|
||||
private String userAreaName;
|
||||
|
||||
@ExcelProperty(index = 12)
|
||||
@ApiModelProperty("详细地址")
|
||||
private String userAreaAddress;
|
||||
|
||||
@ExcelProperty(index = 13)
|
||||
@ApiModelProperty("身份证发证机关")
|
||||
private String certificationAuthority;
|
||||
|
||||
@ExcelProperty(index = 14)
|
||||
@ApiModelProperty("性别(0-默认未知,1-男,2-女)")
|
||||
private String sex;
|
||||
|
||||
@ExcelProperty(index = 15)
|
||||
@ApiModelProperty("驾驶证主页")
|
||||
private String driverLicenseFrontUrl;
|
||||
|
||||
@ExcelProperty(index = 16)
|
||||
@ApiModelProperty("驾驶证副页")
|
||||
private String driverLicenseBackUrl;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("准驾车型id")
|
||||
private String driverAllowDrivingTypeId;
|
||||
|
||||
@ExcelProperty(index = 17)
|
||||
@ApiModelProperty("准驾车型名称")
|
||||
private String driverAllowDrivingTypeName;
|
||||
|
||||
@ExcelProperty(index = 18)
|
||||
@ApiModelProperty("驾驶证发证机关")
|
||||
private String driverCertificationAuthority;
|
||||
|
||||
@ExcelProperty(index = 19)
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty("驾驶证初次领证日期")
|
||||
private Date driverLicenseFirstDate;
|
||||
|
||||
@ExcelProperty(index = 20)
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty("驾驶证有效期(开始时间)")
|
||||
private Date driverLicenseDateFrom;
|
||||
|
||||
@ExcelProperty(index = 21)
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty("驾驶证有效期(结束时间)")
|
||||
private Date driverLicenseDateTo;
|
||||
|
||||
@ExcelProperty(index = 22)
|
||||
@ApiModelProperty("驾驶证档案编号")
|
||||
private String driverLicenseNumber;
|
||||
|
||||
@ExcelProperty(index = 23)
|
||||
@ApiModelProperty("从业资格证照片")
|
||||
private String driverWorkLicenseFrontUrl;
|
||||
|
||||
@ExcelProperty(index = 24)
|
||||
@ApiModelProperty("从业资格证反面照片")
|
||||
private String workCertificateBackImgUrl;
|
||||
|
||||
@ExcelProperty(index = 25)
|
||||
@ApiModelProperty("诚信考核页照片")
|
||||
private String driverIntegrityAssessmentUrl;
|
||||
|
||||
@ExcelProperty(index = 26)
|
||||
@ApiModelProperty("从业资格证发证省份编码")
|
||||
private Long driverWorkLicenseAuthorityCode;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("从业资格证发证省份名称")
|
||||
private String driverWorkLicenseAuthorityName;
|
||||
|
||||
@ExcelProperty(index = 27)
|
||||
@ApiModelProperty("从业资格证号")
|
||||
private String driverWorkLicenseNumber;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty(name = "从业资格证类别ID")
|
||||
private String driverWorkLicenseTypeId;
|
||||
|
||||
@ExcelProperty(index = 28)
|
||||
@ApiModelProperty(name = "从业资格证类别名称")
|
||||
private String driverWorkLicenseTypeName;
|
||||
|
||||
@ExcelProperty(index = 29)
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty("从业资格证初次领证日期")
|
||||
private Date driverWorkLicenseFirstDate;
|
||||
|
||||
@ExcelProperty(index = 30)
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty("从业资格证有效期(开始时间)")
|
||||
private Date driverWorkLicenseDateFrom;
|
||||
|
||||
@ExcelProperty(index = 31)
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty("从业资格证有效期(结束时间)")
|
||||
private Date driverWorkLicenseDateTo;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty(name = "从业资格证是否长期:0-无状态,1-是,2-否")
|
||||
private Integer driverWorkLicenseLong;
|
||||
|
||||
//===========================承运企业信息==========================
|
||||
|
||||
@ExcelProperty(index = 32)
|
||||
@ApiModelProperty("营业执照照片")
|
||||
private String driverEnterpriseLicenseFrontUrl;
|
||||
|
||||
@ExcelProperty(index = 33)
|
||||
@ApiModelProperty("企业名称")
|
||||
private String driverEnterpriseName;
|
||||
|
||||
@ExcelProperty(index = 34)
|
||||
@ApiModelProperty("信用代码")
|
||||
private String driverEnterpriseSocialCreditCode;
|
||||
|
||||
@ExcelProperty(index = 35)
|
||||
@ApiModelProperty("法人姓名")
|
||||
private String driverCorpName;
|
||||
|
||||
@ExcelProperty(index = 36)
|
||||
@ApiModelProperty("注册地址")
|
||||
private String driverEnterpriseAddress;
|
||||
|
||||
@ExcelProperty(index = 37)
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty("营业期限(开始时间)")
|
||||
private Date driverEnterpriseLicenseDateFrom;
|
||||
|
||||
@ExcelProperty(index = 38)
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty("营业期限(结束时间)")
|
||||
private Date driverEnterpriseLicenseDateTo;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("企业营业执照是否长期:0-无状态,1-是,2-否")
|
||||
private Integer driverEnterpriseLicenseLong;
|
||||
|
||||
@ExcelProperty(index = 39)
|
||||
@ApiModelProperty("法人身份证人像面")
|
||||
private String driverCorpIdcardFrontUrl;
|
||||
|
||||
@ExcelProperty(index = 40)
|
||||
@ApiModelProperty("法人身份证国徽面")
|
||||
private String driverCorpIdcardBackUrl;
|
||||
|
||||
@ExcelProperty(index = 41)
|
||||
@ApiModelProperty("法人手持身份证正面")
|
||||
private String driverCorpIdcardInhandUrl;
|
||||
|
||||
@ExcelProperty(index = 42)
|
||||
@ApiModelProperty("法人身份证号")
|
||||
private String driverCorpIdcardNumber;
|
||||
|
||||
@ExcelProperty(index = 43)
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty("法人身份证有效期(开始时间)")
|
||||
private Date driverCorpIdcardDateFrom;
|
||||
|
||||
@ExcelProperty(index = 44)
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty("法人身份证有效期(结束时间)")
|
||||
private Date driverCorpIdcardDateTo;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty(name = "法人身份证是否长期:0-无状态,1-是,2-否")
|
||||
private Integer driverCorpIdcardLong;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("法人证件类型id")
|
||||
private String legalPersonIdType;
|
||||
|
||||
@ExcelProperty(index = 45)
|
||||
@ApiModelProperty("法人证件类型name")
|
||||
private String legalPersonIdName;
|
||||
|
||||
@ExcelProperty(index = 46)
|
||||
@ApiModelProperty("道路运输经营许可证照片")
|
||||
private String driverBusinessLicenseFrontUrl;
|
||||
|
||||
@ExcelProperty(index = 47)
|
||||
@ApiModelProperty("经营许可证证号")
|
||||
private String driverBusinessLicenseNumber;
|
||||
|
||||
@ExcelProperty(index = 48)
|
||||
@ApiModelProperty("业务名称")
|
||||
private String driverBusinessLicenseOwner;
|
||||
|
||||
@ExcelProperty(index = 49)
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty("经营许可证证件有效期(开始时间)")
|
||||
private Date driverBusinessLicenseDateFrom;
|
||||
|
||||
@ExcelProperty(index = 50)
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty("经营许可证证件有效期(结束时间)")
|
||||
private Date driverBusinessLicenseDateTo;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("经营许可证是否长期:0-无状态,1-是,2-否")
|
||||
private Integer driverBusinessLicenseLong;
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.mhd.user.interfaces.dto;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.math.BigDecimal;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车主关注货主对象 driver_follow_shipper
|
||||
*
|
||||
* @author gen
|
||||
* @date 2023-12-26
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class DriverFollowShipperDTO extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
private Long driverFollowShipperId;
|
||||
|
||||
@ApiModelProperty("司机用户主表ID(车主)")
|
||||
@Excel(name = "司机用户主表ID(车主)")
|
||||
private Long driverUserId;
|
||||
|
||||
@ApiModelProperty("货主用户主表ID")
|
||||
@Excel(name = "货主用户主表ID")
|
||||
private Long shipperUserId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织表name")
|
||||
@Excel(name = "组织表name")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
|
||||
@ApiModelProperty("用户操作类型(1-关注,2-取消关注)")
|
||||
private Integer followType;
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.mhd.user.interfaces.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 司机车辆绑定关系对象 driver_vehicle_bind
|
||||
*
|
||||
* @author ???
|
||||
* @date 2023-05-18
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class DriverVehicleBindDto extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 司机车辆绑定表id */
|
||||
@ApiModelProperty("司机车辆绑定表id")
|
||||
private Long driverVehicleBindId;
|
||||
/** 用户主表ID */
|
||||
@ApiModelProperty("用户主表ID")
|
||||
@Excel(name = "用户主表ID")
|
||||
private Long userId;
|
||||
/** 车辆id */
|
||||
@ApiModelProperty("车辆id")
|
||||
@Excel(name = "车辆id")
|
||||
private Long vehicleId;
|
||||
/** 车辆关联司机userid */
|
||||
@ApiModelProperty("车辆关联司机userid")
|
||||
@Excel(name = "车辆关联司机userid")
|
||||
private Long driverBindId;
|
||||
/** 绑定司机姓名 */
|
||||
@ApiModelProperty("绑定司机姓名")
|
||||
@Excel(name = "绑定司机姓名")
|
||||
private String bindDriverName;
|
||||
/** 绑定司机手机号 */
|
||||
@ApiModelProperty("绑定司机手机号")
|
||||
@Excel(name = "绑定司机手机号")
|
||||
private String bindDriverPhone;
|
||||
/** 一级组织表ID */
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
/** 归属组织id */
|
||||
@ApiModelProperty("归属组织id")
|
||||
@Excel(name = "归属组织id")
|
||||
private Long organizationId;
|
||||
/** 默认状态(1-是,2-否) */
|
||||
@ApiModelProperty("默认状态(1-是,2-否)")
|
||||
@Excel(name = "默认状态", readConverterExp = "1=-是,2-否")
|
||||
private Integer defaultFlag;
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
@ApiModelProperty("车牌号")
|
||||
@Excel(name = "车牌号")
|
||||
private String vehicleLicensePlateNumber;
|
||||
|
||||
@ApiModelProperty("查询信息")
|
||||
private String queryInfo;
|
||||
@ApiModelProperty(name = "是否车主:0-无状态,1-我是车主,2-我是驾驶员")
|
||||
private Integer identityStatus;
|
||||
|
||||
@ApiModelProperty(name = "车辆类型(数据字典id)")
|
||||
private String vehicleTypeId;
|
||||
|
||||
@ApiModelProperty(name = "车辆类型(数据字典name)")
|
||||
private String vehicleTypeName;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "行驶证检验有效期")
|
||||
private Date vehicleCheckoutPeriodValidity;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "经营许可证件有效期(结束)")
|
||||
private Date businessLicenseExpireEndDate;
|
||||
|
||||
@ApiModelProperty(name = "经营许可证件是否长期(0-无状态,1-长期,2-不长期)")
|
||||
private Integer businessLicenseLongStatus;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "道路运输证有效期")
|
||||
private Date roadTransportCertificateExpireDate;
|
||||
|
||||
@ApiModelProperty(name = "道路运输证是否长期(0-无状态,1-长期,2-不长期)")
|
||||
private Integer roadTransportCertificateLongStatus;
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.mhd.user.interfaces.dto;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.math.BigDecimal;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车队代收协议对象 motorcade_collection
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-03-20
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class MotorcadeCollectionDTO extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("车队代收款协议表id")
|
||||
private Long motorcadeCollectionId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织表name")
|
||||
@Excel(name = "组织表name")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("车队id")
|
||||
@Excel(name = "车队id")
|
||||
private Long motorcadeId;
|
||||
|
||||
@ApiModelProperty("车队名称")
|
||||
@Excel(name = "车队名称")
|
||||
private String motorcadeName;
|
||||
|
||||
@ApiModelProperty("车队队长userId")
|
||||
@Excel(name = "车队队长userId")
|
||||
private Long motorcadeHeaderId;
|
||||
|
||||
@ApiModelProperty("签订协议司机用户id")
|
||||
@Excel(name = "签订协议司机用户id")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("代收款协议地址")
|
||||
@Excel(name = "代收款协议地址")
|
||||
private String agreementUrl;
|
||||
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
@ApiModelProperty("合同编号")
|
||||
private String contractNo;
|
||||
|
||||
@ApiModelProperty("流程id")
|
||||
private String flowId;
|
||||
|
||||
@ApiModelProperty("合同状态:1.无状态,2-已填充模板,3-已发起签署,4-签署完毕")
|
||||
private Integer contractStatus;
|
||||
|
||||
@ApiModelProperty("1-车队长签司机,2-司机签车队长")
|
||||
private Integer contractType;
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.mhd.user.interfaces.dto;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class MotorcadeDriverDTO extends BaseVOEntity {
|
||||
@ApiModelProperty("车队id")
|
||||
private Long motorcadeId;
|
||||
|
||||
@ApiModelProperty(name = "用户主表ID")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty(name = "手机号码")
|
||||
private String userPhone;
|
||||
|
||||
@ApiModelProperty(name = "用户姓名(真实姓名)")
|
||||
private String userName;
|
||||
|
||||
@ApiModelProperty(name = "用户头像")
|
||||
private String avatar;
|
||||
|
||||
@ApiModelProperty(name = "车牌号")
|
||||
private String vehicleLicensePlateNumber;
|
||||
|
||||
@ApiModelProperty(name = "车辆类别:1-个人车辆 2-企业车辆")
|
||||
private Integer vehicleCategory;
|
||||
|
||||
@ApiModelProperty(name = "车辆类型(数据字典id)")
|
||||
private String vehicleTypeId;
|
||||
|
||||
@ApiModelProperty(name = "车辆类型(数据字典name)")
|
||||
private String vehicleTypeName;
|
||||
|
||||
@ApiModelProperty(name = "承运人个体司机认证状态:0-无状态,1-未认证,2-正在审核,3-认证通过,4-认证失败,5-认证失效")
|
||||
private Integer driverFill;
|
||||
|
||||
@ApiModelProperty(name = "用户实名认证状态:0-无状态,1-已注册未认证,2-已认证待审核,3-审核通过,4-已驳回")
|
||||
private Integer userAuthStatus;
|
||||
|
||||
@ApiModelProperty("车队认证状态(0.无状态1.已加入2.已拒绝3.已退出)")
|
||||
private Long motorcadeRecordStatus;
|
||||
|
||||
@ApiModelProperty("车队队长userId")
|
||||
@Excel(name = "车队队长userId")
|
||||
private Long motorcadeHeaderId;
|
||||
|
||||
@ApiModelProperty(name = "运单量")
|
||||
private Integer waybillNum;
|
||||
|
||||
@ApiModelProperty(name = "评分")
|
||||
private BigDecimal score;
|
||||
|
||||
@ApiModelProperty(name = "车牌号")
|
||||
private String vehiclePlateNumbers;
|
||||
|
||||
@ApiModelProperty(name = "车辆总数")
|
||||
private Integer vehicleNum;
|
||||
|
||||
@ApiModelProperty(name = "用户账号")
|
||||
private String userAccount;
|
||||
|
||||
@ApiModelProperty(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty(name = "tms推送状态: 1-未推送 2- 已推送")
|
||||
private Integer tmsPushStatus;
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
package com.mhd.user.interfaces.dto;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.user.interfaces.dto.addDTO.UserDTO;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.annotation.fieldsetvalue.NeedSetValue;
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 车队对象 motorcade
|
||||
*
|
||||
* @author zihao
|
||||
* @date 2023-05-24
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class MotorcadeDto extends UserDTO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 车队id */
|
||||
@ApiModelProperty("车队id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long motorcadeId;
|
||||
/** 车队名称 */
|
||||
@ApiModelProperty("车队名称")
|
||||
@Excel(name = "车队名称")
|
||||
private String motorcadeName;
|
||||
/** 车队头像 */
|
||||
@ApiModelProperty("车队头像")
|
||||
@Excel(name = "车队头像")
|
||||
@NeedSetValue
|
||||
private String motorcadeImage;
|
||||
/** 车队介绍 */
|
||||
@ApiModelProperty("车队介绍")
|
||||
@Excel(name = "车队介绍")
|
||||
private String motorcadeDescribtion;
|
||||
/** 车队认证状态(1.正在审核2.认证成功3.认证失败) */
|
||||
@ApiModelProperty("车队认证状态(0-无状态,1-未认证,2-正在审核,3-认证通过,4-认证失败,5-认证失效)")
|
||||
@Excel(name = "车队认证状态", readConverterExp = "0-无状态,1-未认证,2-正在审核,3-认证通过,4-认证失败,5-认证失效")
|
||||
private Long motorcadeStatus;
|
||||
@ApiModelProperty("车队审核备注")
|
||||
@Excel(name = "车队审核备注")
|
||||
private String motorcadeRejectReason;
|
||||
/** 车队队长userId */
|
||||
@ApiModelProperty("车队队长userId")
|
||||
@Excel(name = "车队队长userId")
|
||||
private Long motorcadeHeaderId;
|
||||
/** 车队队长名称 */
|
||||
@ApiModelProperty("车队队长名称")
|
||||
@Excel(name = "车队队长名称")
|
||||
private String motorcadeHeaderName;
|
||||
/** 车队队长名称 */
|
||||
@ApiModelProperty("车队队长账号")
|
||||
@Excel(name = "车队队长账号")
|
||||
private String motorcadeHeaderAccount;
|
||||
/** 车队评分 */
|
||||
@ApiModelProperty("车队评分")
|
||||
@Excel(name = "车队评分")
|
||||
private BigDecimal motorcadeScore;
|
||||
/** 审核人员id */
|
||||
@ApiModelProperty("审核人员id")
|
||||
@Excel(name = "审核人员id")
|
||||
private Long checkPersonId;
|
||||
/** 审核人员名称 */
|
||||
@ApiModelProperty("审核人员名称")
|
||||
@Excel(name = "审核人员名称")
|
||||
private String checkPersonName;
|
||||
/** 审核时间 */
|
||||
@ApiModelProperty("审核时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date checkPersonTime;
|
||||
/** 车队状态(0-无状态,1-正常,2-解散,3-黑名单) */
|
||||
@ApiModelProperty("车队状态(0-无状态,1-正常,2-解散,3-黑名单)")
|
||||
@Excel(name = "车队状态(0-无状态,1-正常,2-解散,3-黑名单)")
|
||||
private Long motorcadeDissolutionStatus;
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
|
||||
@ApiModelProperty(name = "PC承运人车队长认证步骤(0-用户注册,1-提交认证资料)")
|
||||
private Integer stepFlagC;
|
||||
|
||||
@ApiModelProperty(name = "车队ids")
|
||||
private List<Long> motorcadeIds;
|
||||
|
||||
@ApiModelProperty(name = "车队黑名单ids")
|
||||
private String motorcadeIdBlacks;
|
||||
|
||||
@ApiModelProperty(name = "车队删除ids")
|
||||
private String motorcadeIdDels;
|
||||
|
||||
/** 黑名单备注 */
|
||||
@ApiModelProperty("黑名单备注")
|
||||
@Excel(name = "黑名单备注")
|
||||
private String blackListReason;
|
||||
|
||||
@ApiModelProperty(value = "是否默认车队(1-是 2-否)")
|
||||
private Integer defaultFlag;
|
||||
|
||||
@ApiModelProperty(value = "创建时间起")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date createTimeFrom;
|
||||
@ApiModelProperty(value = "创建时间止")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date createTimeTo;
|
||||
@ApiModelProperty(value = "审核时间起")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date userAuthTimeFrom;
|
||||
@ApiModelProperty(value = "审核时间止")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date userAuthTimeTo;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.mhd.user.interfaces.dto;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 车队邀请记录对象 motorcade_record
|
||||
*
|
||||
* @author zihao
|
||||
* @date 2023-05-24
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class MotorcadeRecordDto extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 车队邀请记录表 */
|
||||
@ApiModelProperty("车队邀请记录表")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long motorcadeRecordId;
|
||||
/** 用户id */
|
||||
@ApiModelProperty("用户id")
|
||||
@Excel(name = "用户id")
|
||||
private Long userId;
|
||||
/** 车队id */
|
||||
@ApiModelProperty("车队id")
|
||||
@Excel(name = "车队id")
|
||||
private Long motorcadeId;
|
||||
/** 车队名称 */
|
||||
@ApiModelProperty("车队名称")
|
||||
@Excel(name = "车队名称")
|
||||
private String motorcadeName;
|
||||
/** 车队头像 */
|
||||
@ApiModelProperty("车队头像")
|
||||
@Excel(name = "车队头像")
|
||||
private String motorcadeImage;
|
||||
/** 车队介绍 */
|
||||
@ApiModelProperty("车队介绍")
|
||||
@Excel(name = "车队介绍")
|
||||
private String motorcadeDescribtion;
|
||||
/** 车队队长名称 */
|
||||
@ApiModelProperty("车队队长名称")
|
||||
@Excel(name = "车队队长名称")
|
||||
private String motorcadeHeaderName;
|
||||
/** 车队评分 */
|
||||
@ApiModelProperty("车队评分")
|
||||
@Excel(name = "车队评分")
|
||||
private BigDecimal motorcadeScore;
|
||||
/** 车队认证状态(0.无状态1.已加入2.已拒绝3.已退出) */
|
||||
@ApiModelProperty("车队认证状态(0.无状态1.已加入2.已拒绝3.已退出)")
|
||||
@Excel(name = "车队认证状态", readConverterExp = "0=.无状态1.已加入2.已拒绝3.已退出")
|
||||
private Long motorcadeRecordStatus;
|
||||
/** 接受邀请时间/退出时间 */
|
||||
@ApiModelProperty("接受邀请时间/退出时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "接受邀请时间/退出时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date recordTime;
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
|
||||
@ApiModelProperty("用户id")
|
||||
@Excel(name = "用户id")
|
||||
private String userIds;
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
package com.mhd.user.interfaces.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 车辆定位 -通过车牌号和时间查询经纬度
|
||||
* @Author: lfs
|
||||
* @Date: 2020-03-09 10:55:11
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class TmsVehicleLocationQueryDTO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
/**创建日期*/
|
||||
@ApiModelProperty(value = "开始日期")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date startTime;
|
||||
/**更新日期*/
|
||||
@ApiModelProperty(value = "开始日期")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date endTime;
|
||||
/**车牌号*/
|
||||
@ApiModelProperty(value = "车牌号")
|
||||
private String vehicleLicenseNumber;
|
||||
@ApiModelProperty(value = "定位方式(0-APP定位,1-中交行路,2-好运宝轨迹)")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "运单号")
|
||||
private String transportationNumber;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.mhd.user.interfaces.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 用户地址DTO
|
||||
*
|
||||
* @author gen
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "用户地址DTO")
|
||||
public class UserAddressDTO {
|
||||
|
||||
@ApiModelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty(value = "地区名称")
|
||||
private String areaName;
|
||||
|
||||
@ApiModelProperty(value = "地区编码")
|
||||
private String areaCode;
|
||||
|
||||
@ApiModelProperty(value = "详细地址")
|
||||
private String detailedAddress;
|
||||
|
||||
@ApiModelProperty(value = "联系人")
|
||||
private String contactPerson;
|
||||
|
||||
@ApiModelProperty(value = "联系人方式")
|
||||
private String contactPhone;
|
||||
|
||||
@ApiModelProperty(value = "是否默认地址")
|
||||
private Boolean isDefault;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.mhd.user.interfaces.dto.addDTO;
|
||||
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class CustomAuthDTO extends BaseVOEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(name = "菜单表ID")
|
||||
private Long menuId;
|
||||
@ApiModelProperty(name = "角色表ID")
|
||||
private Long roleId;
|
||||
@ApiModelProperty(name = "用户表ID")
|
||||
private Long userId;
|
||||
@ApiModelProperty(name = "表格json")
|
||||
private String tableJson;
|
||||
@ApiModelProperty(name = "表单json")
|
||||
private String formJson;
|
||||
@ApiModelProperty(name = "按钮json")
|
||||
private String buttonJson;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.mhd.user.interfaces.dto.addDTO;
|
||||
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* @author ZhouGY
|
||||
* @title CustomerDTO
|
||||
* @description: 客户管理
|
||||
* @date 2024/4/2 10:12
|
||||
**/
|
||||
@Data
|
||||
public class CustomerDTO extends BaseVOEntity {
|
||||
|
||||
@ApiModelProperty("用户ID")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("职务/角色权限字符,控制器中定义的权限字符,如:@PreAuthorize(`@ss.hasRole('admin')`)")
|
||||
@NotBlank(message = "角色编码不能为空")
|
||||
private String roleCode;
|
||||
|
||||
@ApiModelProperty("货主/供应商/客户编码")
|
||||
@NotBlank(message = "货主/供应商/客户编码不能为空")
|
||||
private String userMemberCode;
|
||||
|
||||
@ApiModelProperty("货主/供应商/客户名称")
|
||||
@NotBlank(message = "货主/供应商/客户名称不能为空")
|
||||
private String userName;
|
||||
|
||||
@ApiModelProperty("联系人")
|
||||
@NotBlank(message = "联系人不能为空")
|
||||
private String emergencyContactName;
|
||||
|
||||
@ApiModelProperty("联系电话")
|
||||
@NotBlank(message = "联系电话不能为空")
|
||||
private String emergencyContactPhone;
|
||||
|
||||
@ApiModelProperty("省市区编码,6位")
|
||||
private Long userAreaCountyId;
|
||||
|
||||
@ApiModelProperty("省事区名称")
|
||||
private String userAreaName;
|
||||
|
||||
@ApiModelProperty("详细地址")
|
||||
private String userAreaAddress;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.mhd.user.interfaces.dto.addDTO;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @description 意见反馈表
|
||||
* @author BEJSON
|
||||
* @date 2023-11-20
|
||||
*/
|
||||
@Data
|
||||
@TableName("feedback")
|
||||
public class FeedbackDTO extends BaseVOEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
@ApiModelProperty("意见反馈表ID")
|
||||
private Long feedbackId;
|
||||
|
||||
@ApiModelProperty("意见反馈关于CODE")
|
||||
private String commentAboutCode;
|
||||
|
||||
@ApiModelProperty("意见反馈关于NAME")
|
||||
private String commentAboutName;
|
||||
|
||||
@ApiModelProperty("意见")
|
||||
private String comment;
|
||||
|
||||
@ApiModelProperty("意见反馈相关图片")
|
||||
private String commentUrl;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.mhd.user.interfaces.dto.addDTO;
|
||||
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class RoleDTO extends BaseVOEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ApiModelProperty(name = "角色表ID")
|
||||
private Long roleId;
|
||||
@ApiModelProperty(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
@ApiModelProperty(name = "角色业务场景数据字典ID")
|
||||
private Long roleBusinessExampleId;
|
||||
@ApiModelProperty(name = "角色业务场景名称")
|
||||
private String roleBusinessExampleName;
|
||||
@ApiModelProperty(name = "角色分类:0-无状态,1-托运人,2-承运人")
|
||||
private Integer roleType;
|
||||
@ApiModelProperty(name = "角色分类名称")
|
||||
private String roleTypeName;
|
||||
@ApiModelProperty(name = "职务/角色权限字符,控制器中定义的权限字符,如:@PreAuthorize(`@ss.hasRole('admin')`)")
|
||||
private String roleCode;
|
||||
@ApiModelProperty(name = "职务/角色名称")
|
||||
private String roleName;
|
||||
@ApiModelProperty(name = "职务/角色描述")
|
||||
private String roleRemark;
|
||||
@ApiModelProperty(name = "数据权限范围:0-无状态,1-全公司,2-本部门,3-本部门及以下,4-自定义权限")
|
||||
private Integer roleDataScope;
|
||||
@ApiModelProperty(name = "职务/角色状态:0-无状态,1-开启,2-关闭")
|
||||
private Integer roleStatus;
|
||||
@ApiModelProperty(name = "职务/角色表ID集合")
|
||||
private List<Long> roleIds;
|
||||
@ApiModelProperty(name = "职务/角色表code集合")
|
||||
private List<String> roleCodes;
|
||||
private List<String> roleCodeList;
|
||||
@ApiModelProperty(name = "组织表ID集合")
|
||||
private List<Long> organizationIds;
|
||||
@ApiModelProperty(name = "角色等级:0-无状态,1-内置角色,2-组织角色,3-货主自建角色")
|
||||
private Integer roleGrade;
|
||||
|
||||
@ApiModelProperty(name = "菜单表ID")
|
||||
public Long permissionMenuId;
|
||||
@ApiModelProperty(name = "组织表ID集合")
|
||||
public List<Long> permissionOrganizationIds = null;
|
||||
@ApiModelProperty("原角色id(用来复制之前的菜单使用)")
|
||||
private Long copyRoleId;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.mhd.user.interfaces.dto.addDTO;
|
||||
|
||||
import com.mhd.common.core.domain.po.MenuVo;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Data
|
||||
public class RoleMenuDTO extends BaseVOEntity {
|
||||
|
||||
@ApiModelProperty(name = "职务/角色权限表ID")
|
||||
private Long roleMenuId;
|
||||
@ApiModelProperty(name = "职务/角色表ID")
|
||||
private Long roleId;
|
||||
@ApiModelProperty(name = "权限表ID")
|
||||
private Long menuId;
|
||||
@ApiModelProperty(name = "权限表ID集合")
|
||||
private List<Long> menuIds;
|
||||
@ApiModelProperty(name = "角色表ID集合")
|
||||
private List<Long> roleIds;
|
||||
@ApiModelProperty(name = "角色权限客户端:0-无状态,1-PC端,2-手机端")
|
||||
private Integer roleMenuClient;
|
||||
|
||||
@ApiModelProperty(name = "唯一key集合")
|
||||
private List<String> idKeyList;
|
||||
|
||||
@ApiModelProperty(name = "菜单权限集合")
|
||||
private List<MenuVo> menuVoList;
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
package com.mhd.user.interfaces.dto.addDTO;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 新增用户地址DTO
|
||||
*
|
||||
* @author gen
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "新增用户地址DTO")
|
||||
public class UserAddressAddDTO {
|
||||
|
||||
@ApiModelProperty(value = "用户ID", required = true)
|
||||
@NotNull(message = "用户ID不能为空")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty(value = "地区名称", required = true)
|
||||
@NotBlank(message = "地区名称不能为空")
|
||||
private String areaName;
|
||||
|
||||
@ApiModelProperty(value = "地区编码", required = true)
|
||||
@NotBlank(message = "地区编码不能为空")
|
||||
private String areaCode;
|
||||
|
||||
@ApiModelProperty(value = "详细地址", required = true)
|
||||
@NotBlank(message = "详细地址不能为空")
|
||||
private String detailedAddress;
|
||||
|
||||
@ApiModelProperty(value = "联系人", required = true)
|
||||
@NotBlank(message = "联系人不能为空")
|
||||
private String contactPerson;
|
||||
|
||||
@ApiModelProperty(value = "联系人方式", required = true)
|
||||
@NotBlank(message = "联系人方式不能为空")
|
||||
private String contactPhone;
|
||||
|
||||
@ApiModelProperty(value = "是否默认地址")
|
||||
private Boolean isDefault;
|
||||
}
|
||||
@@ -0,0 +1,238 @@
|
||||
package com.mhd.user.interfaces.dto.addDTO;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import com.mhd.common.core.annotation.fieldsetvalue.NeedSetValue;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class UserDTO extends BaseVOEntity {
|
||||
|
||||
@ApiModelProperty(name = "用户ID")
|
||||
private Long userId;
|
||||
private Long principalId;
|
||||
@ApiModelProperty(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
@ApiModelProperty(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
private List<Long> organizationIdList;
|
||||
@ApiModelProperty(name = "组织表父级ID")
|
||||
private Long parentOrganizationId;
|
||||
@ApiModelProperty(name = "租户表ID")
|
||||
private Long tenantsId;
|
||||
@ApiModelProperty(name = "组织名称")
|
||||
private String organizationName;
|
||||
@ApiModelProperty(name = "职务/角色表ID")
|
||||
private Long roleId;
|
||||
@ApiModelProperty(name = "职务/角色权限字符")
|
||||
private String roleCode;
|
||||
@ApiModelProperty(name = "用户角色名称")
|
||||
private String roleName;
|
||||
@ApiModelProperty(name = "手机号码")
|
||||
private String userPhone;
|
||||
@ApiModelProperty(name = "用户姓名(真实姓名)")
|
||||
private String userName;
|
||||
@ApiModelProperty(name = "登录账号(2-20位)")
|
||||
private String userAccount;
|
||||
@ApiModelProperty(name = "会员编号")
|
||||
private String userMemberCode;
|
||||
@ApiModelProperty(name = "登录密码")
|
||||
private String userPassword;
|
||||
@ApiModelProperty(name = "确认登录密码")
|
||||
private String copyUserPassword;
|
||||
@ApiModelProperty(name = "盐")
|
||||
private String userSalt;
|
||||
@ApiModelProperty(name = "支付密码")
|
||||
private String userPayPassword;
|
||||
@ApiModelProperty(name = "身份证号")
|
||||
private String userIdcardNumber;
|
||||
@ApiModelProperty(name = "身份证号加密")
|
||||
private String userIdcardNumberDes;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "身份证有效期自")
|
||||
private Date userIdcardDateFrom;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "身份证有效期至")
|
||||
private Date userIdcardDateTo;
|
||||
@ApiModelProperty(name = "身份证是否长期:0-无状态,1-是,2-否")
|
||||
private Integer userIdcardLong;
|
||||
@NeedSetValue
|
||||
@ApiModelProperty(name = "身份证正面照片")
|
||||
private String userIdcardFrontUrl;
|
||||
@NeedSetValue
|
||||
@ApiModelProperty(name = "身份证反面照片")
|
||||
private String userIdcardBackUrl;
|
||||
@NeedSetValue
|
||||
@ApiModelProperty(name = "手持身份证")
|
||||
private String userIdcardInhandUrl;
|
||||
@NeedSetValue
|
||||
@ApiModelProperty(name = "用户头像")
|
||||
private String avatar;
|
||||
@ApiModelProperty(name = "用户状态:0-无状态,1-正常,2-锁定,3-作废")
|
||||
private Integer userStatus;
|
||||
@ApiModelProperty(name = "邮箱")
|
||||
private String userEmail;
|
||||
@ApiModelProperty(name = "县区编码,6位")
|
||||
private Long userAreaCountyId;
|
||||
@ApiModelProperty(name = "县区名称")
|
||||
private String userAreaName;
|
||||
@ApiModelProperty(name = "详细地址")
|
||||
private String userAreaAddress;
|
||||
@ApiModelProperty(name = "微信账号")
|
||||
private String userWechatAccount;
|
||||
@ApiModelProperty(name = "微信登录openid")
|
||||
private String userWechatOpenid;
|
||||
@ApiModelProperty(name = "微信登录会话KEY")
|
||||
private String userWechatSessionKey;
|
||||
@ApiModelProperty(name = "密码登录错误次数")
|
||||
private Integer passwordWrongTimes;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "最近一次登录时间")
|
||||
private Date lastLoginTime;
|
||||
@ApiModelProperty(name = "最近一次登录时间起")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date lastLoginTimeFrom;
|
||||
@ApiModelProperty(name = "最近一次登录时间止")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date lastLoginTimeTo;
|
||||
|
||||
@ApiModelProperty(name = "姓名/手机/邮箱")
|
||||
private String userInfo;
|
||||
|
||||
@ApiModelProperty(name = "最近一次登录IP")
|
||||
private String lastLoginIp;
|
||||
@ApiModelProperty(name = "app_openid")
|
||||
private String appOpenid;
|
||||
@ApiModelProperty(name = "备注")
|
||||
private String userRemark;
|
||||
@ApiModelProperty(name = "用户实名认证状态:0-无状态,1-已注册未认证,2-已认证待审核,3-审核通过,4-已驳回")
|
||||
private Integer userAuthStatus;
|
||||
@ApiModelProperty(name = "用户审核人用户姓名")
|
||||
private String userAuthByUsername;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "用户审核时间")
|
||||
private Date userAuthTime;
|
||||
@ApiModelProperty(name = "加入黑名单备注(解除时需要清空)")
|
||||
private String userStatusRemark;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "用户状态更新时间")
|
||||
private Date userStatusTime;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "用户生日")
|
||||
private Date userBirthday;
|
||||
@ApiModelProperty(name = "用户住址信息")
|
||||
private String userAreaAddressInfo;
|
||||
@ApiModelProperty(name = "用户身份证到期状态:0-无状态,1-正常,2-临期一个月,3-临期三个月,4-过期,5-长期")
|
||||
private Integer userIdcardStatus;
|
||||
@ApiModelProperty(name = "用户电子签章状态:0-无状态,1-已创建,2-未创建")
|
||||
private Integer userTemplateSealStatus;
|
||||
@ApiModelProperty(name = "用户电子签章")
|
||||
private String userTemplateSeal;
|
||||
@ApiModelProperty(name = "账号标识,创建后账号在e签宝平台中的唯一标识")
|
||||
private String accountId ;
|
||||
@ApiModelProperty(name = "用户三方支付账号状态:0-无状态,1-已创建,2-未创建")
|
||||
private Integer userPayAccountStatus;
|
||||
@ApiModelProperty(name = "用户三方支付账号")
|
||||
private String userPayAccount;
|
||||
@ApiModelProperty(name = "用户绑卡状态:0-无状态,1-已绑卡,2-未绑卡")
|
||||
private Integer userBankCardStatus;
|
||||
@ApiModelProperty(name = "用户评价小")
|
||||
private Integer userEvaluateFrom;
|
||||
@ApiModelProperty(name = "用户评价大")
|
||||
private Integer userEvaluateTo;
|
||||
|
||||
@ApiModelProperty(name = "请求域名")
|
||||
private String tenantsDomainName;
|
||||
|
||||
@ApiModelProperty(value = "创建时间起")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTimeFrom;
|
||||
@ApiModelProperty(value = "创建时间止")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTimeTo;
|
||||
@ApiModelProperty(value = "审核时间起")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date userAuthTimeFrom;
|
||||
@ApiModelProperty(value = "审核时间止")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date userAuthTimeTo;
|
||||
|
||||
@ApiModelProperty(name = "用户唯一标识")
|
||||
private String token;
|
||||
|
||||
@ApiModelProperty(name = "用户ID集合")
|
||||
private List<Long> userIds;
|
||||
@ApiModelProperty(name = "菜单表ID")
|
||||
public Long permissionMenuId;
|
||||
|
||||
@ApiModelProperty(name = "手机验证码")
|
||||
private String smsCode;
|
||||
@ApiModelProperty(name = "车队id")
|
||||
private List<Long> motorcadeIds;
|
||||
|
||||
@ApiModelProperty(name = "支付密码类型(0-新增,1-修改)")
|
||||
private Integer payPasswordType;
|
||||
@ApiModelProperty(name = "用户账号类型:0.无状态1.普通账号2.组织账号3.一级账号4.平台员工5.企业员工,6.合作商")
|
||||
private Integer userAccountType;
|
||||
@ApiModelProperty("角色编码")
|
||||
private List<String> roleCodeList;
|
||||
|
||||
|
||||
@ApiModelProperty(name = "旧的登录密码(用于修改密码使用)")
|
||||
private String oldUserPassword;
|
||||
|
||||
@ApiModelProperty(name = "域名地址")
|
||||
private String path;
|
||||
|
||||
@ApiModelProperty(name = "停用人时间")
|
||||
private Date stopTime;
|
||||
@ApiModelProperty(name = "停用人姓名")
|
||||
private String stopperName;
|
||||
|
||||
@ApiModelProperty("性别(0-默认未知,1-男,2-女)")
|
||||
private String sex;
|
||||
|
||||
@ApiModelProperty(value = "是否允许竞价(0-不允许竞价,1-允许参与竞价,2-允许查看竞价)")
|
||||
private Integer isDriverBidding;
|
||||
|
||||
@ApiModelProperty("身份证发证机关")
|
||||
private String certificationAuthority;
|
||||
|
||||
@ApiModelProperty(value = "推广码")
|
||||
private String promoCode;
|
||||
@ApiModelProperty(name = "业务类型:0.无状态,1.托运业务,2.承运业务,3.托运、承运业务,4.无业务,5.不确定业务默认为托运业务")
|
||||
private Integer businessType;
|
||||
@ApiModelProperty("承运人审核页面:1-司机,2-车队长,3-承运企业")
|
||||
private Integer auditPage;
|
||||
@ApiModelProperty(name = "验证码")
|
||||
private String verificationCode;
|
||||
@ApiModelProperty(name = "App包名")
|
||||
private String appMark;
|
||||
|
||||
@ApiModelProperty(name = "部门ID")
|
||||
private String departmentId;
|
||||
|
||||
@ApiModelProperty(name = "钉钉Id")
|
||||
private String dingTalkId;
|
||||
|
||||
@ApiModelProperty(name = "钉钉user_id")
|
||||
private String dingUserId;
|
||||
|
||||
|
||||
@ApiModelProperty(name = "钉钉部门id")
|
||||
private String dingDeptId;
|
||||
|
||||
@ApiModelProperty(name = "有效期管理 0-否 1-是")
|
||||
private Integer validityPeriodManagement;
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package com.mhd.user.interfaces.dto.addDTO;
|
||||
|
||||
import com.mhd.user.domain.userAggregate.repository.todo.DataPermissionDO;
|
||||
import com.mhd.user.domain.userAggregate.repository.todo.MenuProductDO;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class UserDataPermissionDTO extends BaseVOEntity {
|
||||
|
||||
@ApiModelProperty(name = "用户数据权限表ID")
|
||||
private Long userDataPermissionId;
|
||||
@ApiModelProperty(name = "用户表ID")
|
||||
private Long userId;
|
||||
@ApiModelProperty("用户表ID集合")
|
||||
private List<Long> userIdList;
|
||||
@ApiModelProperty("组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
@ApiModelProperty("操作权限 1-个人创建,2-关联公司创建")
|
||||
private Integer permissionType;
|
||||
@ApiModelProperty(name = "菜单产品ID集合")
|
||||
private List<MenuProductDO> menuProductDOList;
|
||||
@ApiModelProperty(name = "组织权限ID集合")
|
||||
private List<DataPermissionDO> dataPermissionDOList;
|
||||
}
|
||||
@@ -0,0 +1,311 @@
|
||||
package com.mhd.user.interfaces.dto.addDTO;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.fieldsetvalue.NeedSetValue;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Data
|
||||
public class UserDriverDTO extends UserDTO {
|
||||
|
||||
@ApiModelProperty(name = "角色表ID集合")
|
||||
private List<Long> roleIds;
|
||||
@ApiModelProperty(name = "司机表ID")
|
||||
private Long driverId;
|
||||
@ApiModelProperty(name = "运输企业id")
|
||||
private Long userDriverEnterpriseId;
|
||||
|
||||
@ApiModelProperty(name = "用户主表ID")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty(name = "车辆ID")
|
||||
private Long vehicleId;
|
||||
|
||||
@ApiModelProperty(name = "用户车辆类型Id")
|
||||
private Integer userCarType;
|
||||
|
||||
@ApiModelProperty(name = "司机用户类型 自有车辆(值为1) 社会车辆(值为2)")
|
||||
private Integer userDriverType;
|
||||
|
||||
@ApiModelProperty(name = "车牌号")
|
||||
private String vehicleLicensePlateNumber;
|
||||
|
||||
@ApiModelProperty(name = "车牌号")
|
||||
private String vehicleLicensePlateNumberTwo;
|
||||
|
||||
@ApiModelProperty(name = "准驾车型id")
|
||||
private String driverAllowDrivingTypeId;
|
||||
|
||||
@ApiModelProperty(name = "准驾车型名称")
|
||||
private String driverAllowDrivingTypeName;
|
||||
|
||||
@ApiModelProperty(name = "驾驶证发证机关")
|
||||
private String driverCertificationAuthority;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "初次领证日期")
|
||||
private Date driverLicenseFirstDate;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "驾驶证有效期开始日期")
|
||||
private Date driverLicenseDateFrom;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "驾驶证有效期到期日期")
|
||||
private Date driverLicenseDateTo;
|
||||
|
||||
@NeedSetValue
|
||||
@ApiModelProperty(name = "驾驶证主页图片地址")
|
||||
private String driverLicenseFrontUrl;
|
||||
|
||||
@NeedSetValue
|
||||
@ApiModelProperty(name = "驾驶证副页图片地址")
|
||||
private String driverLicenseBackUrl;
|
||||
|
||||
@ApiModelProperty(name = "驾驶证档案编号")
|
||||
private String driverLicenseNumber;
|
||||
|
||||
@ApiModelProperty(name = "驾驶证是否长期:0-无状态,1-是,2-否")
|
||||
private Integer driverLicenseLong;
|
||||
|
||||
@ApiModelProperty(name = "从业资格证发证省份编码")
|
||||
private Long driverWorkLicenseAuthorityCode;
|
||||
|
||||
@ApiModelProperty(name = "从业资格证发证省份名称")
|
||||
private String driverWorkLicenseAuthorityName;
|
||||
|
||||
@ApiModelProperty(name = "从业资格证号")
|
||||
private String driverWorkLicenseNumber;
|
||||
|
||||
@ApiModelProperty(name = "从业资格证类别数据字典ID")
|
||||
private String driverWorkLicenseTypeId;
|
||||
|
||||
@ApiModelProperty(name = "从业资格证类别名称")
|
||||
private String driverWorkLicenseTypeName;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "从业资格证初次领证日期")
|
||||
private Date driverWorkLicenseFirstDate;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "从业资格证有效期开始日期")
|
||||
private Date driverWorkLicenseDateFrom;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "从业资格证有效期到期日期")
|
||||
private Date driverWorkLicenseDateTo;
|
||||
|
||||
@ApiModelProperty(name = "从业资格证是否长期:0-无状态,1-是,2-否")
|
||||
private Integer driverWorkLicenseLong;
|
||||
|
||||
@ApiModelProperty(name = "从业资格证校验状态:0-无状态,1-未校验,2-校验通过,3-校验失败")
|
||||
private int driverWorkLicenseAuthStatus;
|
||||
|
||||
@NeedSetValue
|
||||
@ApiModelProperty(name = "从业资格证主页图片地址")
|
||||
private String driverWorkLicenseFrontUrl;
|
||||
|
||||
@NeedSetValue
|
||||
@ApiModelProperty(name = "诚信考核页图片地址")
|
||||
private String driverIntegrityAssessmentUrl;
|
||||
|
||||
@ApiModelProperty(name = "经营许可证号")
|
||||
private String driverBusinessLicenseNumber;
|
||||
|
||||
@ApiModelProperty(name = "经营许可证业户名称")
|
||||
private String driverBusinessLicenseOwner;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "经营许可证有效期开始日期")
|
||||
private Date driverBusinessLicenseDateFrom;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "经营许可证有效期到期日期")
|
||||
private Date driverBusinessLicenseDateTo;
|
||||
|
||||
@ApiModelProperty(name = "经营许可证是否长期:0-无状态,1-是,2-否")
|
||||
private Integer driverBusinessLicenseLong;
|
||||
|
||||
@ApiModelProperty(name = "经营许可证校验状态:0-无状态,1-未校验,2-校验通过,3-校验失败")
|
||||
private int driverBusinessLicenseAuthStatus;
|
||||
|
||||
@NeedSetValue
|
||||
@ApiModelProperty(name = "经营许可证主页图片地址")
|
||||
private String driverBusinessLicenseFrontUrl;
|
||||
|
||||
@ApiModelProperty(name = "企业名称")
|
||||
private String driverEnterpriseName;
|
||||
|
||||
@ApiModelProperty(name = "企业统一社会信用代码")
|
||||
private String driverEnterpriseSocialCreditCode;
|
||||
|
||||
@ApiModelProperty(name = "企业注册电话")
|
||||
private String driverEnterprisePhone;
|
||||
|
||||
@ApiModelProperty(name = "企业注册地址")
|
||||
private String driverEnterpriseAddress;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "企业营业执照有效期开始日期")
|
||||
private Date driverEnterpriseLicenseDateFrom;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "企业营业执照有效期到期日期")
|
||||
private Date driverEnterpriseLicenseDateTo;
|
||||
|
||||
@ApiModelProperty(name = "企业营业执照是否长期:0-无状态,1-是,2-否")
|
||||
private Integer driverEnterpriseLicenseLong;
|
||||
|
||||
@ApiModelProperty(name = "企业纳税人资质")
|
||||
private String driverEnterpriseTaxpayer;
|
||||
|
||||
@ApiModelProperty(name = "是否企业法人:0-无状态,1-是,2-否")
|
||||
private Integer driverCorp;
|
||||
|
||||
@NeedSetValue
|
||||
@ApiModelProperty(name = "企业营业执照主页图片地址")
|
||||
private String driverEnterpriseLicenseFrontUrl;
|
||||
|
||||
@ApiModelProperty(name = "法人姓名")
|
||||
private String driverCorpName;
|
||||
|
||||
@ApiModelProperty(name = "法人身份证号")
|
||||
private String driverCorpIdcardNumber;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "法人身份证有效期开始日期")
|
||||
private Date driverCorpIdcardDateFrom;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "法人身份证有效期结束日期")
|
||||
private Date driverCorpIdcardDateTo;
|
||||
|
||||
@ApiModelProperty(name = "法人身份证是否长期:0-无状态,1-是,2-否")
|
||||
private Integer driverCorpIdcardLong;
|
||||
|
||||
@NeedSetValue
|
||||
@ApiModelProperty(name = "法人身份证正面照片")
|
||||
private String driverCorpIdcardFrontUrl;
|
||||
|
||||
@NeedSetValue
|
||||
@ApiModelProperty(name = "法人身份证反面照片")
|
||||
private String driverCorpIdcardBackUrl;
|
||||
|
||||
@NeedSetValue
|
||||
@ApiModelProperty(name = "法人身份证手持照片")
|
||||
private String driverCorpIdcardInhandUrl;
|
||||
|
||||
@ApiModelProperty(name = "车队名称")
|
||||
private String driverTeamName;
|
||||
@ApiModelProperty(name = "车队介绍")
|
||||
private String driverTeamRemark;
|
||||
|
||||
@ApiModelProperty(name = "司机审核人用户姓名")
|
||||
private String driverAuthByUsername;
|
||||
@ApiModelProperty(name = "司机用户姓名")
|
||||
private String userName;
|
||||
|
||||
@ApiModelProperty(name = "司机审核时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date driverAuthTime;
|
||||
@ApiModelProperty(name = "司机审核原因")
|
||||
private String driverStatusRemark;
|
||||
@ApiModelProperty(name = "准驾车型数据字典ID集合")
|
||||
private List<Long> driverAllowDrivingTypeIds;
|
||||
|
||||
@ApiModelProperty(name = "承运人个人认证审核人")
|
||||
private String driverFillAuthName;
|
||||
@ApiModelProperty(name = "承运人个人认证时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date driverFillTime;
|
||||
@ApiModelProperty(name = "承运人个人审核原因")
|
||||
private String driverFillAuthRemark;
|
||||
@ApiModelProperty(name = "承运人个人认证审核人id")
|
||||
private Long driverFillAuthId;
|
||||
|
||||
@ApiModelProperty(name = "菜单表ID")
|
||||
public Long permissionMenuId;
|
||||
|
||||
@ApiModelProperty(name = "APP承运人认证步骤(1-驾驶证,2-从业资格证)")
|
||||
private Integer stepFlag;
|
||||
@ApiModelProperty(name = "无从业资格证提交认证(1-是)")
|
||||
private Integer noWorkSubmit;
|
||||
|
||||
@ApiModelProperty(name = "是否车主:0-无状态,1-我是车主,2-我是驾驶员")
|
||||
private Integer identityStatus;
|
||||
|
||||
@ApiModelProperty(name = "司机管理条件:0.全部司机1.我的司机2.外部司机")
|
||||
private Integer conditionStatus;
|
||||
|
||||
@ApiModelProperty(name = "类型:1-司机,2-车队长,3-运输企业")
|
||||
private Integer driverType;
|
||||
|
||||
@ApiModelProperty(name = "审核角色:1-司机,2-车队长,3-运输企业")
|
||||
private Integer authType;
|
||||
|
||||
@ApiModelProperty(name = "PC承运人司机认证步骤(0-用户注册,1-身份证,2-驾驶证,3-从业资格证)")
|
||||
private Integer stepFlagD;
|
||||
|
||||
@ApiModelProperty(name = "承运人车队长认证步骤(1-用户注册,2-提交认证资料)")
|
||||
private Integer stepFlagC;
|
||||
|
||||
@ApiModelProperty(name = "承运人运输企业认证步骤(1-用户注册,2-营业执照,3-道路运输经营许可证)")
|
||||
private Integer stepFlagE;
|
||||
|
||||
/** 车队id */
|
||||
@ApiModelProperty("车队id")
|
||||
private Long motorcadeId;
|
||||
|
||||
@ApiModelProperty(name = "APP查询司机信息")
|
||||
private String driverInfo;
|
||||
|
||||
@ApiModelProperty(name = "司机管理列表类型:1-全部司机,2-我的司机,3-外部司机")
|
||||
private Integer driverListType;
|
||||
|
||||
@ApiModelProperty(name = "承运人审核状态:0-无状态,1-未认证,2-待审核,3-已通过,4-已驳回")
|
||||
private Integer driverAuthStatus;
|
||||
|
||||
//=============================此处字段用于查询责任司机信息
|
||||
@ApiModelProperty(name = "用户Ids")
|
||||
private String queryIds;
|
||||
|
||||
@ApiModelProperty(name = "是否分页(默认分页,1-不分页)")
|
||||
private String pageFlag = "";
|
||||
|
||||
@ApiModelProperty(name = "从业资格证反面照片")
|
||||
private String workCertificateBackImgUrl;
|
||||
@ApiModelProperty(value = "推广码")
|
||||
private String promoCode;
|
||||
|
||||
@ApiModelProperty(value = "紧急联系人姓名")
|
||||
private String emergencyContactName;
|
||||
|
||||
@ApiModelProperty(value = "紧急联系电话")
|
||||
private String emergencyContactPhone;
|
||||
|
||||
@ApiModelProperty(value = "绑定来源 1-新增,2-绑定接口")
|
||||
private Integer bindSource;
|
||||
|
||||
/** 承运人车队长认证状态:0-无状态,1-未认证,2-正在审核,3-认证通过,4-认证失败,5-认证失效 */
|
||||
@ApiModelProperty("承运人车队长认证状态")
|
||||
private Integer driverCaptainFill;
|
||||
|
||||
/** 承运人企业认证状态:0-无状态,1-未认证,2-正在审核,3-认证通过,4-认证失败,5-认证失效 */
|
||||
@ApiModelProperty("承运人企业认证状态:0-无状态,1-未认证,2-正在审核,3-认证通过,4-认证失败,5-认证失效")
|
||||
private Integer driverEnterpriseFill;
|
||||
|
||||
@ApiModelProperty(name = "车辆类型(数据字典id)")
|
||||
private String vehicleTypeId;
|
||||
|
||||
@ApiModelProperty(name = "车辆类型(数据字典name)")
|
||||
private String vehicleTypeName;
|
||||
|
||||
@ApiModelProperty(name = "部门id")
|
||||
private String departmentId;
|
||||
}
|
||||
+206
@@ -0,0 +1,206 @@
|
||||
package com.mhd.user.interfaces.dto.addDTO;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.annotation.fieldsetvalue.NeedSetValue;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 运输企业对象 user_driver_enterprise
|
||||
*
|
||||
* @author ???
|
||||
* @date 2023-05-17
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class UserDriverEnterpriseDto extends UserDTO{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 运输企业id */
|
||||
@ApiModelProperty("运输企业id")
|
||||
private Long userDriverEnterpriseId;
|
||||
/** 用户主表ID */
|
||||
@ApiModelProperty("用户主表ID")
|
||||
@Excel(name = "用户主表ID")
|
||||
private Long userId;
|
||||
/** 司机表ID */
|
||||
@ApiModelProperty("司机表ID")
|
||||
@Excel(name = "司机表ID")
|
||||
private Long driverId;
|
||||
/** 经营许可证号 */
|
||||
@ApiModelProperty("经营许可证号")
|
||||
@Excel(name = "经营许可证号")
|
||||
private String driverBusinessLicenseNumber;
|
||||
/** 经营许可证业户名称 */
|
||||
@ApiModelProperty("经营许可证业户名称")
|
||||
@Excel(name = "经营许可证业户名称")
|
||||
private String driverBusinessLicenseOwner;
|
||||
/** 经营许可证有效期开始日期 */
|
||||
@ApiModelProperty("经营许可证有效期开始日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "经营许可证有效期开始日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date driverBusinessLicenseDateFrom;
|
||||
/** 经营许可证有效期到期日期 */
|
||||
@ApiModelProperty("经营许可证有效期到期日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "经营许可证有效期到期日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date driverBusinessLicenseDateTo;
|
||||
/** 经营许可证是否长期:0-无状态,1-是,2-否 */
|
||||
@ApiModelProperty("经营许可证是否长期:0-无状态,1-是,2-否")
|
||||
@Excel(name = "经营许可证是否长期:0-无状态,1-是,2-否")
|
||||
private Long driverBusinessLicenseLong;
|
||||
/** 经营许可证主页图片地址 */
|
||||
@NeedSetValue
|
||||
@ApiModelProperty("经营许可证主页图片地址")
|
||||
@Excel(name = "经营许可证主页图片地址")
|
||||
private String driverBusinessLicenseFrontUrl;
|
||||
/** 企业名称 */
|
||||
@ApiModelProperty("企业名称")
|
||||
@Excel(name = "企业名称")
|
||||
private String driverEnterpriseName;
|
||||
/** 企业统一社会信用代码 */
|
||||
@ApiModelProperty("企业统一社会信用代码")
|
||||
@Excel(name = "企业统一社会信用代码")
|
||||
private String driverEnterpriseSocialCreditCode;
|
||||
/** 企业注册电话 */
|
||||
@ApiModelProperty("企业注册电话")
|
||||
@Excel(name = "企业注册电话")
|
||||
private String driverEnterprisePhone;
|
||||
/** 企业注册地址 */
|
||||
@ApiModelProperty("企业注册地址")
|
||||
@Excel(name = "企业注册地址")
|
||||
private String driverEnterpriseAddress;
|
||||
/** 企业营业执照有效期开始日期 */
|
||||
@ApiModelProperty("企业营业执照有效期开始日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "企业营业执照有效期开始日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date driverEnterpriseLicenseDateFrom;
|
||||
/** 企业营业执照有效期到期日期 */
|
||||
@ApiModelProperty("企业营业执照有效期到期日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "企业营业执照有效期到期日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date driverEnterpriseLicenseDateTo;
|
||||
/** 企业营业执照是否长期:0-无状态,1-是,2-否 */
|
||||
@ApiModelProperty("企业营业执照是否长期:0-无状态,1-是,2-否")
|
||||
@Excel(name = "企业营业执照是否长期:0-无状态,1-是,2-否")
|
||||
private Long driverEnterpriseLicenseLong;
|
||||
/** 企业纳税人资质 */
|
||||
@ApiModelProperty("企业纳税人资质")
|
||||
@Excel(name = "企业纳税人资质")
|
||||
private String driverEnterpriseTaxpayer;
|
||||
/** 是否企业法人:0-无状态,1-是,2-否 */
|
||||
@ApiModelProperty("是否企业法人:0-无状态,1-是,2-否")
|
||||
@Excel(name = "是否企业法人:0-无状态,1-是,2-否")
|
||||
private Long driverCorp;
|
||||
/** 企业营业执照主页图片地址 */
|
||||
@NeedSetValue
|
||||
@ApiModelProperty("企业营业执照主页图片地址")
|
||||
@Excel(name = "企业营业执照主页图片地址")
|
||||
private String driverEnterpriseLicenseFrontUrl;
|
||||
/** 法人姓名 */
|
||||
@ApiModelProperty("法人姓名")
|
||||
@Excel(name = "法人姓名")
|
||||
private String driverCorpName;
|
||||
/** 企业法人姓名 */
|
||||
@ApiModelProperty("企业法人姓名")
|
||||
@Excel(name = "企业法人姓名")
|
||||
private String driverCorpLegalName;
|
||||
/** 法人身份证号 */
|
||||
@ApiModelProperty("法人身份证号")
|
||||
@Excel(name = "法人身份证号")
|
||||
private String driverCorpIdcardNumber;
|
||||
/** 法人身份证有效期开始日期 */
|
||||
@ApiModelProperty("法人身份证有效期开始日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "法人身份证有效期开始日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date driverCorpIdcardDateFrom;
|
||||
/** 法人身份证有效期结束日期 */
|
||||
@ApiModelProperty("法人身份证有效期结束日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "法人身份证有效期结束日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date driverCorpIdcardDateTo;
|
||||
/** 法人身份证是否长期:0-无状态,1-是,2-否 */
|
||||
@ApiModelProperty("法人身份证是否长期:0-无状态,1-是,2-否")
|
||||
@Excel(name = "法人身份证是否长期:0-无状态,1-是,2-否")
|
||||
private Integer driverCorpIdcardLong;
|
||||
/** 法人身份证正面照片 */
|
||||
@NeedSetValue
|
||||
@ApiModelProperty("法人身份证正面照片")
|
||||
@Excel(name = "法人身份证正面照片")
|
||||
private String driverCorpIdcardFrontUrl;
|
||||
/** 法人身份证反面照片 */
|
||||
@NeedSetValue
|
||||
@ApiModelProperty("法人身份证反面照片")
|
||||
@Excel(name = "法人身份证反面照片")
|
||||
private String driverCorpIdcardBackUrl;
|
||||
/** 法人身份证手持照片 */
|
||||
@ApiModelProperty("法人身份证手持照片")
|
||||
@Excel(name = "法人身份证手持照片")
|
||||
@NeedSetValue
|
||||
private String driverCorpIdcardInhandUrl;
|
||||
/** 承运人企业认证状态:0-无状态,1-未认证,2-正在审核,3-认证通过,4-认证失败,5-认证失效 */
|
||||
@ApiModelProperty("承运人企业认证状态:0-无状态,1-未认证,2-正在审核,3-认证通过,4-认证失败,5-认证失效")
|
||||
@Excel(name = "承运人企业认证状态:0-无状态,1-未认证,2-正在审核,3-认证通过,4-认证失败,5-认证失效")
|
||||
private Integer driverEnterpriseFill;
|
||||
/** 承运人企业认证时间 */
|
||||
@ApiModelProperty("承运人企业认证时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "承运人企业认证时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date driverEnterpriseFillTime;
|
||||
/** 承运人企业认证状态:0-无状态,1-未认证,2-正在审核,3-认证通过,4-认证失败,5-认证失效' */
|
||||
@ApiModelProperty("承运人企业认证状态:0-无状态,1-未认证,2-正在审核,3-认证通过,4-认证失败,5-认证失效'")
|
||||
@Excel(name = "承运人企业认证状态:0-无状态,1-未认证,2-正在审核,3-认证通过,4-认证失败,5-认证失效'")
|
||||
private Integer driverEnterpriseInfoFill;
|
||||
/** 承运人企业认证时间 */
|
||||
@ApiModelProperty("承运人企业认证时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "承运人企业认证时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date driverEnterpriseInfoFillTime;
|
||||
/** 承运人经营许可证认证状态:0-无状态,1-未认证,2-正在审核,3-认证通过,4-认证失败,5-认证失效' */
|
||||
@ApiModelProperty("承运人经营许可证认证状态:0-无状态,1-未认证,2-正在审核,3-认证通过,4-认证失败,5-认证失效'")
|
||||
@Excel(name = "承运人经营许可证认证状态:0-无状态,1-未认证,2-正在审核,3-认证通过,4-认证失败,5-认证失效'")
|
||||
private Integer driverBusinessLicenseFill;
|
||||
/** 承运人经营许可证认证时间 */
|
||||
@ApiModelProperty("承运人经营许可证认证时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "承运人经营许可证认证时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date driverBusinessLicenseFillTime;
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
|
||||
@ApiModelProperty(name = "PC承运人运输企业认证步骤(0-用户注册,1-营业执照,2-道路运输经营许可证)")
|
||||
private Integer stepFlagE;
|
||||
|
||||
@ApiModelProperty(name = "APP运输企业认证步骤(1-营业执照,2-道路运输许可证)")
|
||||
private Integer stepFlag;
|
||||
|
||||
@ApiModelProperty(name = "PC承运人车队长认证步骤(0-用户注册,1-提交认证资料)")
|
||||
private Integer stepFlagC;
|
||||
|
||||
/** 承运人类型:0-无状态 , 1-承运企业 , 2-承运车队长 */
|
||||
@ApiModelProperty("承运人类型")
|
||||
@Excel(name = "承运人类型")
|
||||
private Integer driverType;
|
||||
|
||||
/** 承运人车队长认证状态:0-无状态,1-未认证,2-正在审核,3-认证通过,4-认证失败,5-认证失效 */
|
||||
@ApiModelProperty("承运人车队长认证状态")
|
||||
@Excel(name = "承运人车队长认证状态")
|
||||
private Integer driverCaptainFill;
|
||||
|
||||
@ApiModelProperty("法人证件类型代码")
|
||||
@Excel(name = "法人证件类型代码")
|
||||
private String legalPersonIdType;
|
||||
|
||||
@ApiModelProperty(value = "法人证件类型名称")
|
||||
private String legalPersonIdName;
|
||||
|
||||
@ApiModelProperty(name = "tms推送状态: 1-未推送 2- 已推送")
|
||||
private Integer tmsPushStatus;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.mhd.user.interfaces.dto.addDTO;
|
||||
|
||||
import com.mhd.common.core.domain.po.MenuVo;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Data
|
||||
public class UserMenuDTO extends BaseVOEntity {
|
||||
|
||||
@ApiModelProperty(name = "用户菜单表ID")
|
||||
private Long userMenuId;
|
||||
@ApiModelProperty(name = "用户表ID")
|
||||
private Long userId;
|
||||
@ApiModelProperty(name = "菜单表ID")
|
||||
private Long menuId;
|
||||
@ApiModelProperty(name = "当前用户ID/用来跨微服务传送")
|
||||
private Long currentUserId;
|
||||
@ApiModelProperty(name = "菜单表ID集合")
|
||||
private List<Long> menuIds;
|
||||
|
||||
@ApiModelProperty(name = "调取类型 1-PC,2-feign")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(name = "唯一key集合")
|
||||
private List<String> idKeyList;
|
||||
@ApiModelProperty(name = "菜单权限集合")
|
||||
private List<MenuVo> menuVoList;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.mhd.user.interfaces.dto.addDTO;
|
||||
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Data
|
||||
public class UserRoleDTO extends BaseVOEntity {
|
||||
|
||||
@ApiModelProperty(name = "用户职务/角色表ID")
|
||||
private Long userRoleId;
|
||||
@ApiModelProperty(name = "职务/角色表ID")
|
||||
private Long roleId;
|
||||
@ApiModelProperty(name = "用户表ID")
|
||||
private Long userId;
|
||||
@ApiModelProperty(name = "当前用户ID/用来跨微服务传送")
|
||||
private Long currentUserId;
|
||||
@ApiModelProperty(name = "职务/角色表ID集合")
|
||||
private List<Long> roleIds;
|
||||
}
|
||||
@@ -0,0 +1,194 @@
|
||||
package com.mhd.user.interfaces.dto.addDTO;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.annotation.fieldsetvalue.NeedSetValue;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class UserShipperDTO extends UserDTO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(name = "角色表ID集合")
|
||||
private List<Long> roleIds;
|
||||
|
||||
@ApiModelProperty(name = "货主表ID")
|
||||
private Long shipperId;
|
||||
|
||||
@ApiModelProperty(name = "用户主表ID")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty(name = "上级货主表ID")
|
||||
private Long parentShipperId;
|
||||
|
||||
@ApiModelProperty(name = "货主类型:0-无状态,1-个人,2-企业")
|
||||
private Integer shipperType;
|
||||
|
||||
@ApiModelProperty(name = "货主类别:1-普通客户 2-月结客户")
|
||||
private Integer shipperCategory;
|
||||
|
||||
@ApiModelProperty(name = "企业名称")
|
||||
private String shipperEnterpriseName;
|
||||
|
||||
@ApiModelProperty(name = "企业统一社会信用代码")
|
||||
private String shipperEnterpriseSocialCreditCode;
|
||||
|
||||
@ApiModelProperty(name = "企业注册电话")
|
||||
private String shipperEnterprisePhone;
|
||||
|
||||
@ApiModelProperty(name = "企业注册地址")
|
||||
private String shipperEnterpriseAddress;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "企业营业期限起")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date shipperEnterpriseLicenseDateFrom;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "企业营业期限止")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date shipperEnterpriseLicenseDateTo;
|
||||
|
||||
@ApiModelProperty(name = "企业营业执照是否长期:0-无状态,1-是,2-否")
|
||||
private Integer shipperEnterpriseLicenseLong;
|
||||
|
||||
@ApiModelProperty(name = "纳税人资质")
|
||||
private String shipperEnterpriseTaxpayer;
|
||||
|
||||
@ApiModelProperty(name = "营业执照照片")
|
||||
@NeedSetValue
|
||||
private String shipperEnterpriseLicenseFrontUrl;
|
||||
|
||||
@ApiModelProperty(name = "是否法人:0-无状态,1-是,2-否")
|
||||
private Integer shipperCorp;
|
||||
|
||||
/**
|
||||
* 法人姓名
|
||||
*/
|
||||
@ApiModelProperty(name = "法人姓名")
|
||||
private String shipperCorpName;
|
||||
/** 企业法人姓名 */
|
||||
@ApiModelProperty("企业法人姓名")
|
||||
@Excel(name = "企业法人姓名")
|
||||
private String shipperCorpLegalName;
|
||||
|
||||
@ApiModelProperty(name = "法人身份证号")
|
||||
private String shipperCorpIdcardNumber;
|
||||
|
||||
@ApiModelProperty(name = "法人身份证号加密")
|
||||
private String shipperCorpIdcardNumberDes;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "法人身份证有效期自")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date shipperCorpIdcardDateFrom;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "法人身份证有效期止")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date shipperCorpIdcardDateTo;
|
||||
|
||||
@ApiModelProperty(name = "法人身份证是否长期:0-无状态,1-是,2-否")
|
||||
private Integer shipperCorpIdcardLong;
|
||||
|
||||
@ApiModelProperty(name = "法人身份证正面照片")
|
||||
@NeedSetValue
|
||||
private String shipperCorpIdcardFrontUrl;
|
||||
|
||||
@ApiModelProperty(name = "法人身份证反面照片")
|
||||
@NeedSetValue
|
||||
private String shipperCorpIdcardBackUrl;
|
||||
|
||||
@ApiModelProperty(name = "法人身份证手持照片")
|
||||
@NeedSetValue
|
||||
private String shipperCorpIdcardInhandUrl;
|
||||
|
||||
@ApiModelProperty(name = "货主审核状态:0-无状态,1-未认证,2-待审核,3-已通过,4-已驳回")
|
||||
private Integer shipperAuthStatus;
|
||||
@ApiModelProperty(name = "货主审核人用户姓名")
|
||||
private String shipperAuthByUsername;
|
||||
@ApiModelProperty(name = "货主审核时间")
|
||||
private Date shipperAuthTime;
|
||||
@ApiModelProperty(name = "货主审核原因")
|
||||
private String shipperStatusRemark;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTimeFrom;
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTimeTo;
|
||||
|
||||
@ApiModelProperty(name = "审核角色:1-个人托运人,2-企业托运人")
|
||||
private Integer authType;
|
||||
|
||||
@ApiModelProperty(name = "新增托运人步骤(1-用户注册,2-提交认证资料,3-认证结果)")
|
||||
private Integer stepFlag;
|
||||
|
||||
@ApiModelProperty(name = "纳税人识别号")
|
||||
private String taxpayerNumber;
|
||||
@ApiModelProperty(name = "托运人发货企业审核原因")
|
||||
private String taxpayerQualification;
|
||||
@ApiModelProperty(name = "营业执照过期日期")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date businessLicenseDate;
|
||||
@ApiModelProperty(value = "所在地区省市县名称")
|
||||
private String area;
|
||||
@ApiModelProperty(name = "所在地区县区编码")
|
||||
private String areaId;
|
||||
@ApiModelProperty(name = "详细地址")
|
||||
private String detailAddress;
|
||||
@ApiModelProperty(name = "行业")
|
||||
private String trade;
|
||||
@ApiModelProperty(name = "经营范围")
|
||||
private String businessScope;
|
||||
@ApiModelProperty(name = "营业期限")
|
||||
private String businessTerm;
|
||||
@ApiModelProperty(name = "注册地址")
|
||||
private String regAddress;
|
||||
@ApiModelProperty(name = "注册资本")
|
||||
private String capital;
|
||||
@ApiModelProperty(name = "成立日期")
|
||||
private String establishDate;
|
||||
@ApiModelProperty(name = "账号标识,创建后账号在e签宝平台中的唯一标识")
|
||||
private String companyAccountId ;
|
||||
@ApiModelProperty(name = "用户电子签章")
|
||||
private String companyTemplateSeal;
|
||||
|
||||
@ApiModelProperty(name = "月结标识 1-是 2-否")
|
||||
private Integer monthlySettlementFlag;
|
||||
@ApiModelProperty(name = "总授信额度")
|
||||
private BigDecimal totalLimit;
|
||||
@ApiModelProperty(name = "货源单自动审核(1-是 2-否)")
|
||||
private Integer isAutoAuditOrder;
|
||||
|
||||
@ApiModelProperty(name = "托运人个体货主认证状态:0-无状态,1-未认证,2-正在审核,3-认证通过,4-认证失败,5-认证失效")
|
||||
private Integer shipperFill;
|
||||
|
||||
@ApiModelProperty(name = "托运人发货企业认证状态:0-无状态,1-未认证,2-正在审核,3-认证通过,4-认证失败,5-认证失效")
|
||||
private Integer shipperEnterpriseFill;
|
||||
|
||||
@ApiModelProperty(name = "回单原件标记(1-需要,2-不需要)")
|
||||
private Integer originalReceiptFlag;
|
||||
|
||||
@ApiModelProperty(name = "运费节点(0-无要求,1-确认回单,2-纸质回单)")
|
||||
private Integer freightNode;
|
||||
|
||||
@ApiModelProperty(name = "用户主表ID集合")
|
||||
private List<Long> userIdList;
|
||||
|
||||
@ApiModelProperty(name = "备注信息")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
package com.mhd.user.interfaces.dto.addDTO;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class UserUpdateDTO extends BaseVOEntity {
|
||||
|
||||
@ApiModelProperty(name = "用户ID")
|
||||
private Long userId;
|
||||
@ApiModelProperty(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
@ApiModelProperty(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
@ApiModelProperty(name = "组织名称")
|
||||
private String organizationName;
|
||||
@ApiModelProperty(name = "职务/角色表ID")
|
||||
private Long roleId;
|
||||
@ApiModelProperty(name = "职务/角色权限字符")
|
||||
private String roleCode;
|
||||
@ApiModelProperty(name = "用户角色名称")
|
||||
private String roleName;
|
||||
@ApiModelProperty(name = "手机号码")
|
||||
private String userPhone;
|
||||
@ApiModelProperty(name = "用户姓名(真实姓名)")
|
||||
private String userName;
|
||||
@ApiModelProperty(name = "登录账号(2-20位)")
|
||||
private String userAccount;
|
||||
@ApiModelProperty(name = "会员编号")
|
||||
private String userMemberCode;
|
||||
@ApiModelProperty(name = "登录密码")
|
||||
private String userPassword;
|
||||
@ApiModelProperty(name = "盐")
|
||||
private String userSalt;
|
||||
@ApiModelProperty(name = "支付密码")
|
||||
private String userPayPassword;
|
||||
@ApiModelProperty(name = "身份证号")
|
||||
private String userIdcardNumber;
|
||||
@ApiModelProperty(name = "身份证号加密")
|
||||
private String userIdcardNumberDes;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "身份证有效期自")
|
||||
private Date userIdcardDateFrom;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "身份证有效期至")
|
||||
private Date userIdcardDateTo;
|
||||
@ApiModelProperty(name = "身份证是否长期:0-无状态,1-是,2-否")
|
||||
private Integer userIdcardLong;
|
||||
@ApiModelProperty(name = "身份证正面照片")
|
||||
private String userIdcardFrontUrl;
|
||||
@ApiModelProperty(name = "身份证反面照片")
|
||||
private String userIdcardBackUrl;
|
||||
@ApiModelProperty(name = "手持身份证")
|
||||
private String userIdcardInhandUrl;
|
||||
@ApiModelProperty(name = "用户头像")
|
||||
private String avatar;
|
||||
@ApiModelProperty(name = "用户状态:0-无状态,1-正常,2-锁定")
|
||||
private Integer userStatus;
|
||||
@ApiModelProperty(name = "邮箱")
|
||||
private String userEmail;
|
||||
@ApiModelProperty(name = "县区编码,6位")
|
||||
private Long userAreaCountyId;
|
||||
@ApiModelProperty(name = "县区名称")
|
||||
private String userAreaName;
|
||||
@ApiModelProperty(name = "详细地址")
|
||||
private String userAreaAddress;
|
||||
@ApiModelProperty(name = "微信账号")
|
||||
private String userWechatAccount;
|
||||
@ApiModelProperty(name = "微信登录openid")
|
||||
private String userWechatOpenid;
|
||||
@ApiModelProperty(name = "微信登录会话KEY")
|
||||
private String userWechatSessionKey;
|
||||
@ApiModelProperty(name = "密码登录错误次数")
|
||||
private Integer passwordWrongTimes;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(name = "最近一次登录时间")
|
||||
private Date lastLoginTime;
|
||||
@ApiModelProperty(name = "最近一次登录IP")
|
||||
private String lastLoginIp;
|
||||
@ApiModelProperty(name = "app_openid")
|
||||
private String appOpenid;
|
||||
@ApiModelProperty(name = "备注")
|
||||
private String userRemark;
|
||||
@ApiModelProperty(name = "用户实名认证状态:0-无状态,1-已注册未认证,2-已认证待审核,3-审核通过,4-已驳回")
|
||||
private int userAuthStatus;
|
||||
@ApiModelProperty(name = "用户审核人用户姓名")
|
||||
private String userAuthByUsername;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "用户审核时间")
|
||||
private Date userAuthTime;
|
||||
@ApiModelProperty(name = "加入黑名单备注(解除时需要清空)")
|
||||
private String userStatusRemark;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "用户状态更新时间")
|
||||
private Date userStatusTime;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "用户生日")
|
||||
private Date userBirthday;
|
||||
@ApiModelProperty(name = "用户住址信息")
|
||||
private String userAreaAddressInfo;
|
||||
@ApiModelProperty(name = "用户身份证到期状态:0-无状态,1-正常,2-临期一个月,3-临期三个月,4-过期")
|
||||
private int userIdcardStatus;
|
||||
@ApiModelProperty(name = "用户电子签章状态:0-无状态,1-已创建,2-未创建")
|
||||
private int userTemplateSealStatus;
|
||||
@ApiModelProperty(name = "用户电子签章")
|
||||
private String userTemplateSeal;
|
||||
@ApiModelProperty(name = "用户三方支付账号状态:0-无状态,1-已创建,2-未创建")
|
||||
private int userPayAccountStatus;
|
||||
@ApiModelProperty(name = "用户三方支付账号")
|
||||
private String userPayAccount;
|
||||
@ApiModelProperty(name = "用户绑卡状态:0-无状态,1-已绑卡,2-未绑卡")
|
||||
private int userBankCardStatus;
|
||||
@ApiModelProperty(name = "用户评价小")
|
||||
private int userEvaluateFrom;
|
||||
@ApiModelProperty(name = "用户评价大")
|
||||
private int userEvaluateTo;
|
||||
|
||||
@ApiModelProperty(name = "请求域名")
|
||||
private String tenantsDomainName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.mhd.user.interfaces.dto.queryDTO;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@Data
|
||||
public class ThirdPartyDto {
|
||||
|
||||
@ApiModelProperty("图片正面")
|
||||
private String driverCorpIdcardBackUrl;
|
||||
|
||||
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.mhd.user.interfaces.dto.queryDTO;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 查询用户地址DTO
|
||||
*
|
||||
* @author gen
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "查询用户地址DTO")
|
||||
public class UserAddressQueryDTO {
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty(value = "地区名称")
|
||||
private String areaName;
|
||||
|
||||
@ApiModelProperty(value = "地区编码")
|
||||
private String areaCode;
|
||||
|
||||
@ApiModelProperty(value = "联系人")
|
||||
private String contactPerson;
|
||||
|
||||
@ApiModelProperty(value = "联系人方式")
|
||||
private String contactPhone;
|
||||
|
||||
@ApiModelProperty(value = "是否默认地址")
|
||||
private Boolean isDefault;
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package com.mhd.user.interfaces.dto.queryDTO;
|
||||
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class UserDataPermissionQueryDTO extends BaseVOEntity {
|
||||
|
||||
@ApiModelProperty(name = "用户数据权限表ID")
|
||||
private Long userDataPermissionId;
|
||||
@ApiModelProperty(name = "用户表ID")
|
||||
private Long userId;
|
||||
@ApiModelProperty(name = "菜单表ID")
|
||||
private Long menuId;
|
||||
@ApiModelProperty(name = "产品表ID")
|
||||
private Long productId;
|
||||
@ApiModelProperty(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
@ApiModelProperty(name = "操作个人创建数据:0-无状态,1-允许,2-不允许")
|
||||
private Integer userDataPersonalStatus;
|
||||
@ApiModelProperty(name = "操作组织所有数据:0-无状态,1-允许,2-不允许")
|
||||
private Integer userDataOrganizationStatus;
|
||||
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.mhd.user.interfaces.dto.queryDTO;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 证件到期预警DTO
|
||||
*
|
||||
* @author Administrator
|
||||
*/
|
||||
@Data
|
||||
public class UserDocumentWarningQueryDTO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "用户类型(0-托运人,1-承运人)")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "用户名称")
|
||||
private String userName;
|
||||
|
||||
@ApiModelProperty(value = "用户账号")
|
||||
private String userAccount;
|
||||
|
||||
@ApiModelProperty(value = "身份证状态(0-全部,1-正常,2-过期,3-临期,4-长期)")
|
||||
private Integer idCardExpStatus;
|
||||
|
||||
@ApiModelProperty(value = "营业执照过期状态(0-全部,1-正常,2-过期,3-临期,4-长期)")
|
||||
private Integer businessLicenseStatus;
|
||||
|
||||
@ApiModelProperty(value = "驾驶证状态(0-全部,1-正常,2-过期,3-临期,4-长期)")
|
||||
private Integer driverLicenseExpStatus;
|
||||
|
||||
@ApiModelProperty(value = "从业资格证状态(0-全部,1-正常,2-过期,3-临期,4-长期)")
|
||||
private Integer workCertificateExpStatus;
|
||||
|
||||
@ApiModelProperty(value = "行驶证状态(0-全部,1-正常,2-过期,3-临期,4-长期)")
|
||||
private Integer drivingPermitExpStatus;
|
||||
|
||||
@ApiModelProperty(value = "道路运输许可证过期状态(0-全部,1-正常,2-过期,3-临期,4-长期)")
|
||||
private Integer transportPermitExpStatus;
|
||||
|
||||
@ApiModelProperty(value = "道路运输经营许可证状态(0-全部,1-正常,2-过期,3-临期,4-长期)")
|
||||
private Integer businessLicenseExpStatus;
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "组织id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty(value = "预警类型查询")
|
||||
private String seach;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.mhd.user.interfaces.dto.queryDTO;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class UserQueryDTO {
|
||||
|
||||
@ApiModelProperty(name = "用户姓名(真实姓名)")
|
||||
private String userName;
|
||||
@ApiModelProperty(name = "登录账号(2-20位)")
|
||||
private String userAccount;
|
||||
@ApiModelProperty(name = "手机号码")
|
||||
private String userPhone;
|
||||
@ApiModelProperty(name = "用户实名认证状态:0-无状态,1-已注册未认证,2-已认证待审核,3-审核通过,4-已驳回")
|
||||
private int userAuthStatus;
|
||||
@ApiModelProperty(name = "会员编号")
|
||||
private String userMemberCode;
|
||||
@ApiModelProperty(name = "身份证号")
|
||||
private String userIdcardNumber;
|
||||
@ApiModelProperty(name = "身份证有效期自")
|
||||
private Date userIdcardDateFrom;
|
||||
@ApiModelProperty(name = "身份证有效期至")
|
||||
private Date userIdcardDateTo;
|
||||
@ApiModelProperty(name = "用户身份证状态:0-无状态,1-正常,2-临期一个月,3-临期三个月,4-过期")
|
||||
private int userIdcardStatus;
|
||||
@ApiModelProperty(name = "用户住址信息")
|
||||
private String userAreaAddressInfo;
|
||||
@ApiModelProperty(name = "用户电子签章状态:0-无状态,1-已创建,2-未创建")
|
||||
private int userTemplateSealStatus;
|
||||
@ApiModelProperty(name = "用户三方支付账号状态:0-无状态,1-已创建,2-未创建")
|
||||
private int userPayAccountStatus;
|
||||
@ApiModelProperty(name = "用户三方支付账号")
|
||||
private String userPayAccount;
|
||||
@ApiModelProperty(name = "用户角色名称")
|
||||
private String roleName;
|
||||
@ApiModelProperty(name = "组织名称")
|
||||
private String organizationName;
|
||||
@ApiModelProperty(name = "用户绑卡状态:0-无状态,1-已绑卡,2-未绑卡")
|
||||
private int userBankCardStatus;
|
||||
@ApiModelProperty(name = "用户评价小")
|
||||
private int userEvaluateFrom;
|
||||
@ApiModelProperty(name = "用户评价大")
|
||||
private int userEvaluateTo;
|
||||
@ApiModelProperty(name = "用户状态:0-无状态,1-正常,2-锁定/黑名单")
|
||||
private Integer userStatus;
|
||||
@ApiModelProperty(name = "最近一次登录时间")
|
||||
private Date lastLoginTime;
|
||||
@ApiModelProperty(name = "添加人员姓名")
|
||||
private String createByUserName;
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
@ApiModelProperty(name = "用户审核人用户姓名")
|
||||
private String userAuthByUsername;
|
||||
@ApiModelProperty(name = "用户审核时间")
|
||||
private Date userAuthTime;
|
||||
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package com.mhd.user.interfaces.dto.updateDTO;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import javax.validation.constraints.Digits;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel("结算信息更新DTO")
|
||||
public class SettlementInfoUpdateDTO {
|
||||
|
||||
@ApiModelProperty(value = "货主id", required = true)
|
||||
private Long shipperId;
|
||||
|
||||
private Long userId;
|
||||
|
||||
@Digits(integer =20 , fraction = 2,message = "数字符合标准,请重新输入!")
|
||||
@ApiModelProperty(value = "授权额度")
|
||||
private BigDecimal authorizedQuota;
|
||||
|
||||
@ApiModelProperty(value = "结算周期")
|
||||
private Integer settlementDay;
|
||||
|
||||
@ApiModelProperty("使用的授权额度")
|
||||
private BigDecimal authorizedUsedAmount;
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package com.mhd.user.interfaces.dto.updateDTO;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Data
|
||||
public class UpdateHasDefaultAddressDTO {
|
||||
|
||||
@NotNull(message = "用户ID不能为空")
|
||||
@ApiModelProperty("用户ID")
|
||||
private Long userId;
|
||||
|
||||
@NotNull(message = "是否有默认地址不能为空")
|
||||
@ApiModelProperty("是否有默认地址")
|
||||
private Boolean hasDefaultAddress;
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
package com.mhd.user.interfaces.dto.updateDTO;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* 修改用户地址DTO
|
||||
*
|
||||
* @author gen
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "修改用户地址DTO")
|
||||
public class UserAddressUpdateDTO {
|
||||
|
||||
@ApiModelProperty("主键ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "地区名称")
|
||||
@NotBlank(message = "地区名称不能为空")
|
||||
private String areaName;
|
||||
|
||||
@ApiModelProperty(value = "地区编码")
|
||||
@NotBlank(message = "地区编码不能为空")
|
||||
private String areaCode;
|
||||
|
||||
@ApiModelProperty(value = "详细地址")
|
||||
@NotBlank(message = "详细地址不能为空")
|
||||
private String detailedAddress;
|
||||
|
||||
@ApiModelProperty(value = "联系人")
|
||||
@NotBlank(message = "联系人不能为空")
|
||||
private String contactPerson;
|
||||
|
||||
@ApiModelProperty(value = "联系人方式")
|
||||
@NotBlank(message = "联系人方式不能为空")
|
||||
private String contactPhone;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
package com.mhd.user.interfaces.facade;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.aliyun.oss.ServiceException;
|
||||
import com.mhd.common.core.domain.DriverCurrentPositionPO;
|
||||
import com.mhd.common.log.annotation.Log;
|
||||
import com.mhd.common.log.enums.BusinessType;
|
||||
import com.mhd.user.interfaces.dto.TmsVehicleLocationQueryDTO;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.mhd.user.interfaces.dto.AppLocationDTO;
|
||||
import com.mhd.user.domain.appLocation.repository.todo.AppLocationDO;
|
||||
import com.mhd.user.domain.appLocation.repository.po.AppLocationPO;
|
||||
import com.mhd.user.application.service.AppLocationApplicationService;
|
||||
import com.mhd.user.interfaces.assember.AppLocationAssembler;
|
||||
import javax.annotation.Resource;
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* APP位置信息Api
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-01-04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/appLocationApi")
|
||||
public class AppLocationApi extends BaseController{
|
||||
@Autowired
|
||||
private AppLocationApplicationService appLocationApplicationService;
|
||||
|
||||
@Resource
|
||||
private AppLocationAssembler appLocationAssembler;
|
||||
|
||||
/**
|
||||
* 分页查询APP位置信息列表
|
||||
*/
|
||||
@Log(title = "APP位置信息-查询", description ="查询APP位置信息列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询APP位置信息列表")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(AppLocationDTO appLocationDTO)
|
||||
{
|
||||
//转换实体
|
||||
AppLocationDO appLocationDO = appLocationAssembler.toDO(appLocationDTO);
|
||||
startPage();
|
||||
List<AppLocationPO> list = appLocationApplicationService.queryList(appLocationDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑APP位置信息
|
||||
*/
|
||||
@Log(title = "APP位置信息-编辑", description ="编辑APP位置信息",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("编辑APP位置信息")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody AppLocationDTO appLocationDTO)
|
||||
{
|
||||
//转换实体
|
||||
AppLocationDO appLocationDO = appLocationAssembler.toDO(appLocationDTO);
|
||||
if(appLocationDTO.getAppLocationId() != null){
|
||||
return toAjax(appLocationApplicationService.update(appLocationDO));
|
||||
}else {
|
||||
return toAjax(appLocationApplicationService.insert(appLocationDO));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除APP位置信息
|
||||
*/
|
||||
@Log(title = "APP位置信息-删除", description ="批量删除APP位置信息",businessType = BusinessType.DELETE)
|
||||
@ApiOperation("批量删除APP位置信息")
|
||||
@DeleteMapping("/deleteByIds/{appLocationIds}")
|
||||
public AjaxResult delete(@PathVariable Long[] appLocationIds)
|
||||
{
|
||||
return toAjax(appLocationApplicationService.delete(appLocationIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取APP位置信息详细信息
|
||||
*/
|
||||
@Log(title = "APP位置信息-查询", description ="获取APP位置信息详细信息",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("获取APP位置信息")
|
||||
@GetMapping(value = "/getInfo/{appLocationId}")
|
||||
public AjaxResult getInfo(@PathVariable("appLocationId") Long appLocationId)
|
||||
{
|
||||
return AjaxResult.success(appLocationApplicationService.getInfo(appLocationId));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* app位置打点
|
||||
* @param appLocationDTO
|
||||
* @return
|
||||
*/
|
||||
@Log(title = "APP位置信息-新增", description ="app位置打点",businessType = BusinessType.INSERT)
|
||||
@PostMapping(value = "/appRunBatted")
|
||||
public AjaxResult<?> appRunBatted(@RequestBody AppLocationDTO appLocationDTO) {
|
||||
//转换实体
|
||||
AppLocationDO appLocationDO = appLocationAssembler.toDO(appLocationDTO);
|
||||
return AjaxResult.success(appLocationApplicationService.appRunBatted(appLocationDO));
|
||||
}
|
||||
|
||||
@Log(title = "APP位置信息-查询", description ="车辆定位-运单号和时间维度查询",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation(value = "车辆定位-运单号和时间维度查询", notes = "车辆定位-运单号和时间维度查询")
|
||||
@PostMapping(value = "/qurtyByTime")
|
||||
public AjaxResult<?> qurtyByTime(@RequestBody TmsVehicleLocationQueryDTO tmsVehicleLocationQueryDTO) {
|
||||
try{
|
||||
//转换实体
|
||||
AppLocationDO appLocationDO = appLocationAssembler.toAppLocationDO(tmsVehicleLocationQueryDTO);
|
||||
return AjaxResult.success(appLocationApplicationService.qurtyByTime(appLocationDO));
|
||||
}catch (ServiceException e){
|
||||
return AjaxResult.error(e.getErrorMessage());
|
||||
}catch (Exception e){
|
||||
return AjaxResult.error("查询失败");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+154
@@ -0,0 +1,154 @@
|
||||
package com.mhd.user.interfaces.facade;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.mhd.common.core.domain.entity.R;
|
||||
import com.mhd.common.log.annotation.Log;
|
||||
import com.mhd.common.log.enums.BusinessType;
|
||||
import com.mhd.user.domain.appLocation.repository.po.AppLocationPO;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.mhd.user.interfaces.dto.DriverCurrentPositionDTO;
|
||||
import com.mhd.user.domain.driverCurrentPosition.repository.todo.DriverCurrentPositionDO;
|
||||
import com.mhd.common.core.domain.DriverCurrentPositionPO;
|
||||
import com.mhd.user.application.service.DriverCurrentPositionApplicationService;
|
||||
import com.mhd.user.interfaces.assember.DriverCurrentPositionAssembler;
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 司机当前位置信息Api
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-01-04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/driverCurrentPositionApi")
|
||||
public class DriverCurrentPositionApi extends BaseController{
|
||||
@Autowired
|
||||
private DriverCurrentPositionApplicationService driverCurrentPositionApplicationService;
|
||||
|
||||
@Resource
|
||||
private DriverCurrentPositionAssembler driverCurrentPositionAssembler;
|
||||
|
||||
/**
|
||||
* 分页查询司机当前位置信息列表
|
||||
*/
|
||||
@Log(title = "司机当前位置信息-查询", description ="查询司机当前位置信息列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询司机当前位置信息列表")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DriverCurrentPositionDTO driverCurrentPositionDTO)
|
||||
{
|
||||
//转换实体
|
||||
DriverCurrentPositionDO driverCurrentPositionDO = driverCurrentPositionAssembler.toDO(driverCurrentPositionDTO);
|
||||
startPage();
|
||||
List<DriverCurrentPositionPO> list = driverCurrentPositionApplicationService.queryList(driverCurrentPositionDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑司机当前位置信息
|
||||
*/
|
||||
@Log(title = "司机当前位置信息-编辑", description ="编辑司机当前位置信息",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("编辑司机当前位置信息")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody DriverCurrentPositionDTO driverCurrentPositionDTO)
|
||||
{
|
||||
//转换实体
|
||||
DriverCurrentPositionDO driverCurrentPositionDO = driverCurrentPositionAssembler.toDO(driverCurrentPositionDTO);
|
||||
if(driverCurrentPositionDTO.getDriverCurrentPositionId() != null){
|
||||
return toAjax(driverCurrentPositionApplicationService.update(driverCurrentPositionDO));
|
||||
}else {
|
||||
return toAjax(driverCurrentPositionApplicationService.insert(driverCurrentPositionDO));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除司机当前位置信息
|
||||
*/
|
||||
@Log(title = "司机当前位置信息-批量删除", description ="批量删除司机当前位置信息",businessType = BusinessType.DELETE)
|
||||
@ApiOperation("批量删除司机当前位置信息")
|
||||
@DeleteMapping("/deleteByIds/{driverCurrentPositionIds}")
|
||||
public AjaxResult delete(@PathVariable Long[] driverCurrentPositionIds)
|
||||
{
|
||||
return toAjax(driverCurrentPositionApplicationService.delete(driverCurrentPositionIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取司机当前位置信息详细信息
|
||||
*/
|
||||
@Log(title = "司机当前位置信息-查询", description ="获取司机当前位置信息",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("获取司机当前位置信息")
|
||||
@GetMapping(value = "/getInfo/{driverCurrentPositionId}")
|
||||
public AjaxResult getInfo(@PathVariable("driverCurrentPositionId") Long driverCurrentPositionId)
|
||||
{
|
||||
return AjaxResult.success(driverCurrentPositionApplicationService.getInfo(driverCurrentPositionId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取司机的最新位置信息
|
||||
*
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
@Log(title = "司机当前位置信息-查询", description ="获取司机的最新位置信息",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation(value = "获取司机的最新位置信息", notes = "获取司机的最新位置信息")
|
||||
@GetMapping(value = "/getDriverLatestLocation/{userId}")
|
||||
public AjaxResult<DriverCurrentPositionPO> getDriverLatestLocation(@PathVariable("userId") Long userId){
|
||||
return AjaxResult.success(driverCurrentPositionApplicationService.getDriverLatestLocation(userId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取车辆的最新位置信息
|
||||
*
|
||||
* @param driverCurrentPositionDTO
|
||||
* @return
|
||||
*/
|
||||
@Log(title = "司机当前位置信息-查询", description ="获取车辆的最新位置信息",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation(value = "获取车辆的最新位置信息", notes = "获取车辆的最新位置信息")
|
||||
@PostMapping(value = "/getVehicleLicensePlate")
|
||||
public AjaxResult<DriverCurrentPositionPO> getVehicleLicensePlate(@RequestBody DriverCurrentPositionDTO driverCurrentPositionDTO){
|
||||
return AjaxResult.success(driverCurrentPositionApplicationService.getVehicleLicensePlate(driverCurrentPositionDTO.getLicensePlate()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有在线司机
|
||||
*/
|
||||
@Log(title = "司机当前位置信息-查询", description ="获取所有在线司机",businessType = BusinessType.INQUIRE)
|
||||
@GetMapping(value = "/getOnlineDriver")
|
||||
public R<List<Long>> getOnlineDriver(){
|
||||
|
||||
return R.ok(driverCurrentPositionApplicationService.getOnlineDriver());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有在线车辆
|
||||
*/
|
||||
@Log(title = "司机当前位置信息-查询", description ="获取所有在线车辆",businessType = BusinessType.INQUIRE)
|
||||
@GetMapping(value = "/getOnlineVehicle")
|
||||
public R<List<DriverCurrentPositionPO>> getOnlineVehicle(){
|
||||
|
||||
return R.ok(driverCurrentPositionApplicationService.getOnlineVehicle());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有离线车辆
|
||||
*/
|
||||
@Log(title = "司机当前位置信息-查询", description ="获取所有离线车辆",businessType = BusinessType.INQUIRE)
|
||||
@GetMapping(value = "/getOfflineVehicle")
|
||||
public R<List<DriverCurrentPositionPO>> getOfflineVehicle(){
|
||||
|
||||
return R.ok(driverCurrentPositionApplicationService.getOfflineVehicle());
|
||||
}
|
||||
|
||||
}
|
||||
+115
@@ -0,0 +1,115 @@
|
||||
package com.mhd.user.interfaces.facade;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.mhd.common.core.utils.validate.AddGroup;
|
||||
import com.mhd.common.log.annotation.Log;
|
||||
import com.mhd.common.log.enums.BusinessType;
|
||||
import com.mhd.user.application.service.DriverFollowShipperApplicationService;
|
||||
import com.mhd.user.interfaces.assember.DriverFollowShipperAssembler;
|
||||
import com.mhd.user.interfaces.dto.DriverFollowShipperDTO;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.mhd.user.domain.driverFollowShipper.repository.todo.DriverFollowShipperDO;
|
||||
import com.mhd.user.domain.driverFollowShipper.repository.po.DriverFollowShipperPO;
|
||||
import javax.annotation.Resource;
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 车主关注货主Api
|
||||
*
|
||||
* @author gen
|
||||
* @date 2023-12-26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/driverFollowShipperApi")
|
||||
public class DriverFollowShipperApi extends BaseController{
|
||||
@Autowired
|
||||
private DriverFollowShipperApplicationService driverFollowShipperApplicationService;
|
||||
|
||||
/**
|
||||
* 分页查询车主关注货主列表
|
||||
*/
|
||||
@Log(title = "车主关注货主数据-查询", description ="查询车主关注货主列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询车主关注货主列表")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DriverFollowShipperDTO driverFollowShipperDTO)
|
||||
{
|
||||
//转换实体
|
||||
DriverFollowShipperDO driverFollowShipperDO = new DriverFollowShipperAssembler().toDO(driverFollowShipperDTO);
|
||||
startPage();
|
||||
List<DriverFollowShipperPO> list = driverFollowShipperApplicationService.queryList(driverFollowShipperDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑车主关注货主
|
||||
*/
|
||||
@Log(title = "车主关注货主数据-编辑", description ="编辑车主关注货主",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("编辑车主关注货主")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody DriverFollowShipperDTO driverFollowShipperDTO)
|
||||
{
|
||||
//转换实体
|
||||
DriverFollowShipperDO driverFollowShipperDO = new DriverFollowShipperAssembler().toDO(driverFollowShipperDTO);
|
||||
if(driverFollowShipperDTO.getDriverFollowShipperId() != null){
|
||||
return toAjax(driverFollowShipperApplicationService.update(driverFollowShipperDO));
|
||||
}else {
|
||||
return toAjax(driverFollowShipperApplicationService.insert(driverFollowShipperDO));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除车主关注货主
|
||||
*/
|
||||
@Log(title = "车主关注货主数据-删除", description ="批量删除车主关注货主",businessType = BusinessType.DELETE)
|
||||
@ApiOperation("批量删除车主关注货主")
|
||||
@DeleteMapping("/deleteByIds/{driverFollowShipperIds}")
|
||||
public AjaxResult delete(@PathVariable Long[] driverFollowShipperIds)
|
||||
{
|
||||
return toAjax(driverFollowShipperApplicationService.delete(driverFollowShipperIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取车主关注货主详细信息
|
||||
*/
|
||||
@Log(title = "车主关注货主数据-查询", description ="获取车主关注货主",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("获取车主关注货主")
|
||||
@GetMapping(value = "/getInfo/{driverFollowShipperId}")
|
||||
public AjaxResult getInfo(@PathVariable("driverFollowShipperId") Long driverFollowShipperId)
|
||||
{
|
||||
return AjaxResult.success(driverFollowShipperApplicationService.getInfo(driverFollowShipperId));
|
||||
}
|
||||
|
||||
|
||||
@Log(title = "车主关注货主数据-编辑", description ="车主关注货主/取消关注",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("车主关注货主/取消关注")
|
||||
@PostMapping("/operateFollow")
|
||||
public AjaxResult operateFollow(@RequestBody DriverFollowShipperDTO driverFollowShipperDTO)
|
||||
{
|
||||
//转换实体
|
||||
DriverFollowShipperDO driverFollowShipperDO = new DriverFollowShipperAssembler().toDO(driverFollowShipperDTO);
|
||||
return toAjax(driverFollowShipperApplicationService.operateFollow(driverFollowShipperDO));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+147
@@ -0,0 +1,147 @@
|
||||
package com.mhd.user.interfaces.facade;
|
||||
|
||||
import com.mhd.common.core.domain.entity.R;
|
||||
import com.mhd.common.core.domain.po.app.UserAppPo;
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import com.mhd.common.log.annotation.Log;
|
||||
import com.mhd.common.log.enums.BusinessType;
|
||||
import com.mhd.user.application.service.DriverVehicleBindApplicationService;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.user.domain.userAggregate.entity.DriverVehicleBind;
|
||||
import com.mhd.user.domain.userAggregate.repository.todo.DriverVehicleBindDo;
|
||||
import com.mhd.user.domain.userAggregate.repository.todo.UserDO;
|
||||
import com.mhd.user.interfaces.assember.DriverVehicleBindAssembler;
|
||||
import com.mhd.user.interfaces.assember.UserAssember;
|
||||
import com.mhd.user.interfaces.dto.DriverVehicleBindDto;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description 司机车辆绑定Api
|
||||
* @Author zg
|
||||
* @Version 1.0
|
||||
* @Date 2023/10/11 10:09
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/driverVehicleBindApi")
|
||||
public class DriverVehicleBindApi extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private DriverVehicleBindApplicationService driverVehicleBindApplicationService;
|
||||
|
||||
/**
|
||||
* 根据车辆ids查询司机
|
||||
*/
|
||||
@Log(title = "司机车辆绑定数据-查询", description ="根据车辆ids查询司机",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("根据车辆id查询司机")
|
||||
@PostMapping("/getInfoByVid")
|
||||
public AjaxResult getInfoByVid(@RequestBody List<Long> ids) {
|
||||
return AjaxResult.success(driverVehicleBindApplicationService.getInfoByVid(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据车辆ids查询司机
|
||||
*/
|
||||
@Log(title = "司机车辆绑定数据-查询", description ="根据车辆ids查询司机",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("根据车辆id查询司机")
|
||||
@PostMapping("/getListByVid")
|
||||
public R<List<DriverVehicleBind>> getListByVid(@RequestBody List<Long> ids) {
|
||||
return R.ok(driverVehicleBindApplicationService.getListByVid(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据车辆id查询司机
|
||||
*/
|
||||
@Log(title = "司机车辆绑定数据-查询", description ="根据车辆id查询司机",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("根据车辆id查询司机")
|
||||
@GetMapping("/getBindListByVid")
|
||||
public AjaxResult<?> getBindListByVid(@RequestParam("id") Long id) {
|
||||
return AjaxResult.success(driverVehicleBindApplicationService.getBindListByVid(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据用户ID查询车辆绑定关系
|
||||
*/
|
||||
@Log(title = "司机车辆绑定数据-查询", description ="根据用户ID查询车辆绑定关系",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("根据用户ID查询车辆绑定关系")
|
||||
@GetMapping("/getInfoListByUid")
|
||||
public AjaxResult getInfoListByUid(Long userId) {
|
||||
return AjaxResult.success(driverVehicleBindApplicationService.getInfoListByUid(userId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据用户ID查询车辆绑定关系
|
||||
*/
|
||||
@Log(title = "司机车辆绑定数据-查询", description ="根据用户ID查询车辆绑定关系",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("根据用户ID查询车辆绑定关系")
|
||||
@GetMapping("/getDefaultVehicleInfoListByUid")
|
||||
public AjaxResult getDefaultVehicleInfoListByUid(Long userId) {
|
||||
return AjaxResult.success(driverVehicleBindApplicationService.getDefaultVehicleInfoListByUid(userId));
|
||||
}
|
||||
|
||||
@Log(title = "司机车辆绑定数据-查询", description ="根据车辆id查询司机",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("根据车辆id查询司机")
|
||||
@PostMapping("/changeVehicleUserId")
|
||||
public AjaxResult changeVehicleUserId(@RequestBody DriverVehicleBindDto driverVehicleBindDto) {
|
||||
DriverVehicleBindDo driverVehicleBindDo = new DriverVehicleBindAssembler().toDo(driverVehicleBindDto);
|
||||
return toAjax(driverVehicleBindApplicationService.changeVehicleUserId(driverVehicleBindDo));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据车辆id查询当前绑定司机
|
||||
*/
|
||||
@Log(title = "司机车辆绑定数据-查询", description ="根据车辆id查询当前绑定司机",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("根据车辆id查询当前绑定司机")
|
||||
@GetMapping("/getDefaultUserByVid")
|
||||
public AjaxResult getDefaultUserByVid(Long vehicleId) {
|
||||
return AjaxResult.success(driverVehicleBindApplicationService.getDefaultUserByVid(vehicleId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改车辆信息时同步修改绑定表信息
|
||||
*/
|
||||
@ApiOperation("修改车辆信息时同步修改绑定表信息")
|
||||
@PostMapping("/informationSynchronization")
|
||||
public AjaxResult informationSynchronization(@RequestBody DriverVehicleBindDto driverVehicleBindDto) {
|
||||
return AjaxResult.success(driverVehicleBindApplicationService.informationSynchronization(driverVehicleBindDto));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询我所有被绑定的车辆
|
||||
*/
|
||||
@ApiOperation("查询我所有被绑定的车辆")
|
||||
@GetMapping("/getBindListByUserId")
|
||||
public R<List<Long>> getBindListByUserId(@RequestParam("id") Long id){
|
||||
return R.ok(driverVehicleBindApplicationService.getBindListByUserId(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取全部已经被绑定的车辆
|
||||
*/
|
||||
@ApiOperation("查询我所有被绑定的车辆")
|
||||
@GetMapping("/getAllBindList")
|
||||
public R<List<Long>> getAllBindList(){
|
||||
List<Long> allBindList = driverVehicleBindApplicationService.getAllBindList();
|
||||
return R.ok(allBindList);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据车牌号查询当前车辆是否绑定
|
||||
*
|
||||
* @param vehicleLicensePlateNumber 车牌号
|
||||
* @return 是否绑定
|
||||
*/
|
||||
@ApiOperation("根据车牌号查询当前车辆是否绑定")
|
||||
@GetMapping("/isVehicleBinding/{vehicleLicensePlateNumber}")
|
||||
public R<Boolean> isVehicleBinding(@PathVariable("vehicleLicensePlateNumber") String vehicleLicensePlateNumber) {
|
||||
return R.ok(driverVehicleBindApplicationService.isVehicleBinding(vehicleLicensePlateNumber));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.mhd.user.interfaces.facade;
|
||||
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.core.web.page.TableDataInfo;
|
||||
import com.mhd.common.log.annotation.Log;
|
||||
import com.mhd.common.log.enums.BusinessType;
|
||||
import com.mhd.user.application.service.FeedbackApplicationService;
|
||||
import com.mhd.user.domain.userAggregate.repository.po.FeedbackPo;
|
||||
import com.mhd.user.domain.userAggregate.repository.todo.FeedbackDO;
|
||||
import com.mhd.user.interfaces.assember.FeedbackAssember;
|
||||
import com.mhd.user.interfaces.dto.addDTO.FeedbackDTO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Api(tags = "用户中台管理-意见反馈管理")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/feedbackApi")
|
||||
@CrossOrigin
|
||||
public class FeedbackAPI extends BaseController {
|
||||
|
||||
@Resource
|
||||
private FeedbackApplicationService feedbackApplicationService;
|
||||
|
||||
@Resource
|
||||
private FeedbackAssember feedbackAssember;
|
||||
|
||||
@Log(title = "意见反馈管理-编辑", description ="编辑意见反馈",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("编辑意见反馈")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult addFeedback(@RequestBody FeedbackDTO feedbackDTO) {
|
||||
FeedbackDO feedbackDO = feedbackAssember.toDo(feedbackDTO);
|
||||
if (feedbackDO.getFeedbackId() != null){
|
||||
return toAjax(feedbackApplicationService.updateFeedback(feedbackDO));
|
||||
}else {
|
||||
return AjaxResult.success(feedbackApplicationService.addFeedback(feedbackDO));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Log(title = "意见反馈管理-查询", description ="查询意见反馈详情",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询意见反馈详情")
|
||||
@GetMapping("/getFeedbackInfo/{feedbackId}")
|
||||
public AjaxResult getFeedbackInfo(@PathVariable Long feedbackId) {
|
||||
return AjaxResult.success(feedbackApplicationService.getFeedbackInfo(feedbackId));
|
||||
}
|
||||
|
||||
@Log(title = "意见反馈管理-查询", description ="查询意见反馈列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询意见反馈列表")
|
||||
@GetMapping("/feedbackList")
|
||||
public TableDataInfo FeedbackList(FeedbackDTO feedbackDTO) {
|
||||
//转换实体
|
||||
FeedbackDO feedbackDO = feedbackAssember.tofeedbackDO(feedbackDTO);
|
||||
List<FeedbackPo> list = feedbackApplicationService.feedbackList(feedbackDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,278 @@
|
||||
package com.mhd.user.interfaces.facade;
|
||||
|
||||
import com.mhd.common.core.domain.entity.R;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.log.annotation.Log;
|
||||
import com.mhd.common.log.enums.BusinessType;
|
||||
import com.mhd.user.application.service.MotorcadeApplicationService;
|
||||
import com.mhd.user.application.service.MotorcadeRecordApplicationService;
|
||||
import com.mhd.user.domain.motorcade.entity.MotorcadeDriver;
|
||||
import com.mhd.user.domain.motorcade.repository.po.*;
|
||||
import com.mhd.user.domain.motorcade.repository.todo.MotorcadeDO;
|
||||
import com.mhd.user.domain.motorcade.repository.todo.MotorcadeDriverDO;
|
||||
import com.mhd.user.domain.motorcade.repository.todo.MotorcadeRecordDO;
|
||||
import com.mhd.user.domain.userAggregate.repository.po.UserDriverPo;
|
||||
import com.mhd.user.interfaces.assember.MotorcadeAssembler;
|
||||
import com.mhd.user.interfaces.assember.MotorcadeRecordAssembler;
|
||||
import com.mhd.user.interfaces.dto.MotorcadeDriverDTO;
|
||||
import com.mhd.user.interfaces.dto.MotorcadeDto;
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.core.web.page.TableDataInfo;
|
||||
import com.mhd.user.interfaces.dto.MotorcadeRecordDto;
|
||||
import com.mhd.user.interfaces.vo.NonePagingListVO;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import java.util.stream.Collectors;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车队Api
|
||||
*
|
||||
* @author zihao
|
||||
* @date 2023-05-24
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/motorcadeWebApi")
|
||||
public class MotorcadeApi extends BaseController{
|
||||
@Autowired
|
||||
private MotorcadeApplicationService motorcadeApplicationService;
|
||||
@Autowired
|
||||
private MotorcadeRecordApplicationService motorcadeRecordApplicationService;
|
||||
|
||||
/**
|
||||
* 分页查询车队列表
|
||||
*/
|
||||
@Log(title = "车队管理-查询", description ="查询车队列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询车队列表")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(MotorcadeDto motorcadeDto)
|
||||
{
|
||||
//转换实体
|
||||
MotorcadeDO motorcadeDo = new MotorcadeDO();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(motorcadeDto, motorcadeDo, IgnoreNullUtil.getNullPropertyNames(motorcadeDto));
|
||||
startPage();
|
||||
List<MotorcadePo> list = motorcadeApplicationService.queryList(motorcadeDo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "车队管理-查询查询车队Id和名称不分页", description ="查询查询车队Id和名称不分页",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询查询车队Id和名称不分页")
|
||||
@GetMapping("/nonePagingList")
|
||||
public R<List<NonePagingListVO>> nonePagingList() {
|
||||
//转换实体
|
||||
List<NonePagingListVO> list = motorcadeApplicationService
|
||||
.queryNonePagingList()
|
||||
.stream()
|
||||
.map(item -> {
|
||||
NonePagingListVO listVO = new NonePagingListVO();
|
||||
BeanUtils.copyProperties(item, listVO);
|
||||
return listVO;
|
||||
})
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑车队
|
||||
*/
|
||||
@Log(title = "车队管理-编辑", description ="编辑车队",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("编辑车队")
|
||||
@PostMapping("/editWeb")
|
||||
public AjaxResult editWeb(@RequestBody MotorcadeDto motorcadeDto)
|
||||
{
|
||||
//转换实体
|
||||
MotorcadeDO motorcadeDo = new MotorcadeAssembler().toDo(motorcadeDto);
|
||||
if(motorcadeDto.getMotorcadeId() != null){
|
||||
return toAjax(motorcadeApplicationService.editWeb(motorcadeDo));
|
||||
}else {
|
||||
return toAjax(motorcadeApplicationService.motorcadeAuth(motorcadeDo));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除车队
|
||||
*/
|
||||
@Log(title = "车队管理-删除", description ="批量删除车队",businessType = BusinessType.DELETE)
|
||||
@ApiOperation("批量删除车队")
|
||||
@PostMapping("/deleteByIds")
|
||||
public AjaxResult delete(@RequestBody MotorcadeDto motorcadeDto)
|
||||
{
|
||||
return toAjax(motorcadeApplicationService.deletePC(motorcadeDto));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取车队详细信息
|
||||
*/
|
||||
@Log(title = "车队管理-查询", description ="获取车队",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("获取车队")
|
||||
@GetMapping(value = "/getInfo/{motorcadeId}")
|
||||
public AjaxResult getInfo(@PathVariable("motorcadeId") Long motorcadeId)
|
||||
{
|
||||
return AjaxResult.success(motorcadeApplicationService.getInfo(motorcadeId));
|
||||
}
|
||||
|
||||
/**
|
||||
* PC车队审核
|
||||
*/
|
||||
@Log(title = "车队管理-编辑", description ="PC车队审核",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("PC车队审核")
|
||||
@PostMapping(value = "/authMotorcade")
|
||||
public AjaxResult authMotorcade(@RequestBody MotorcadeDto motorcadeDto)
|
||||
{
|
||||
//转换实体
|
||||
MotorcadeDO motorcadeDo = new MotorcadeAssembler().toDo(motorcadeDto);
|
||||
return toAjax(motorcadeApplicationService.authMotorcade(motorcadeDo));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* PC车队加入黑名单
|
||||
*/
|
||||
@Log(title = "车队管理-编辑", description ="PC车队加入黑名单",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("PC车队加入黑名单")
|
||||
@PostMapping("/blacklistByIds")
|
||||
public AjaxResult blacklistByIds(@RequestBody MotorcadeDto motorcadeDto)
|
||||
{
|
||||
return toAjax(motorcadeApplicationService.blacklistByIds(motorcadeDto));
|
||||
}
|
||||
|
||||
/**
|
||||
* PC车队解除黑名单
|
||||
*/
|
||||
@Log(title = "车队管理-编辑", description ="PC车队解除黑名单",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("PC车队解除黑名单")
|
||||
@PostMapping("/unBlacklistByIds")
|
||||
public AjaxResult unBlacklistByIds(@RequestBody MotorcadeDto motorcadeDto)
|
||||
{
|
||||
return toAjax(motorcadeApplicationService.unBlacklistByIds(motorcadeDto));
|
||||
}
|
||||
|
||||
/**
|
||||
* 解散车队
|
||||
*/
|
||||
@Log(title = "车队管理-编辑", description ="解散车队",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("解散车队")
|
||||
@PostMapping("/dissolutionMotorcade")
|
||||
public AjaxResult dissolutionMotorcade(@RequestBody MotorcadeDto motorcadeDto)
|
||||
{
|
||||
//转换实体
|
||||
MotorcadeDO motorcadeDo = new MotorcadeAssembler().toDo(motorcadeDto);
|
||||
return toAjax(motorcadeApplicationService.dissolutionMotorcade(motorcadeDo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 变更车队长
|
||||
*/
|
||||
@Log(title = "车队管理-编辑", description ="变更车队长",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("变更车队长")
|
||||
@PostMapping("/changeCaptain")
|
||||
public AjaxResult changeCaptain(@RequestBody MotorcadeDto motorcadeDto)
|
||||
{
|
||||
return toAjax(motorcadeApplicationService.changeCaptain(motorcadeDto));
|
||||
}
|
||||
|
||||
/**
|
||||
* 移除车队司机
|
||||
*/
|
||||
@Log(title = "车队管理-编辑", description ="移除车队司机",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("移除车队司机")
|
||||
@PostMapping("/removeMotorcadeDriver")
|
||||
public AjaxResult removeMotorcadeDriver(@RequestBody MotorcadeDriver motorcadeDriver)
|
||||
{
|
||||
//转换实体
|
||||
return toAjax(motorcadeApplicationService.removeMotorcadeDriver(motorcadeDriver));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据车队ID查询车队司机列表
|
||||
*/
|
||||
@Log(title = "车队管理-查询", description ="根据车队ID查询车队司机列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("根据车队ID查询车队司机列表")
|
||||
@GetMapping("/getDriverListById")
|
||||
public TableDataInfo getDriverListById(MotorcadeDto motorcadeDto) {
|
||||
|
||||
//转换实体
|
||||
MotorcadeDO motorcadeDo = new MotorcadeAssembler().toDo(motorcadeDto);
|
||||
|
||||
List<MotorcadeDriverPo> list = motorcadeApplicationService.getDriverListById(motorcadeDo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据车队ID查询车队司机列表统计数据
|
||||
*/
|
||||
@Log(title = "车队管理-查询", description ="根据车队ID查询车队司机列表统计数据",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("根据车队ID查询车队司机列表统计数据")
|
||||
@GetMapping("/getDriverListByIdCount")
|
||||
public AjaxResult getDriverListByIdCount(MotorcadeDto motorcadeDto) {
|
||||
|
||||
//转换实体
|
||||
MotorcadeDO motorcadeDo = new MotorcadeAssembler().toDo(motorcadeDto);
|
||||
|
||||
return AjaxResult.success(motorcadeApplicationService.getDriverListByIdCount(motorcadeDo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 车队邀请司机 - 司机列表
|
||||
*/
|
||||
@Log(title = "车队管理-查询", description ="查询车队邀请司机 - 司机列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("车队邀请司机 - 司机列表")
|
||||
@GetMapping("/fleetInviteDriverList")
|
||||
public TableDataInfo fleetInviteDriverList(MotorcadeDriverDTO motorcadeDriverDTO) {
|
||||
MotorcadeDriverDO motorcadeDriverDO = new MotorcadeDriverDO();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(motorcadeDriverDTO, motorcadeDriverDO, IgnoreNullUtil.getNullPropertyNames(motorcadeDriverDTO));
|
||||
// startPage();
|
||||
List<UserDriverPo> list = motorcadeApplicationService.fleetInviteDriverList(motorcadeDriverDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 邀请车队司机
|
||||
*/
|
||||
@Log(title = "车队管理-编辑", description ="邀请车队司机",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("邀请车队司机")
|
||||
@PostMapping("/insertMotorcadeDriver")
|
||||
public AjaxResult insertMotorcadeDriver(@RequestBody MotorcadeRecordDto motorcadeRecordDto)
|
||||
{
|
||||
//转换实体
|
||||
MotorcadeRecordDO motorcadeRecordDO = new MotorcadeRecordAssembler().toDo(motorcadeRecordDto);
|
||||
return toAjax(motorcadeRecordApplicationService.insertMotorcadeDriverPC(motorcadeRecordDO));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询我的车队列表(不分页)
|
||||
*/
|
||||
@Log(title = "车队管理-查询", description ="查询我的车队列表(不分页)",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询我的车队列表(不分页)")
|
||||
@GetMapping("/myMotorcadeListPC")
|
||||
public AjaxResult myMotorcadeListPC()
|
||||
{
|
||||
List<MotorcadePo> motorcadeAppPo = motorcadeApplicationService.myMotorcadeListPC();
|
||||
return AjaxResult.success("操作成功",motorcadeAppPo);
|
||||
}
|
||||
|
||||
@Log(title = "车队管理-查询", description ="查询车队邀请记录列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询车队邀请记录列表")
|
||||
@GetMapping("/invitationRecordList")
|
||||
public AjaxResult invitationRecordList(MotorcadeRecordDto motorcadeRecordDto)
|
||||
{
|
||||
List<MotorcadeRecordPo> list = motorcadeRecordApplicationService.invitationRecordListPC(motorcadeRecordDto);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@Log(title = "车队管理-查询", description ="查询车队列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询不属于自己的车队列表")
|
||||
@GetMapping("/getAllOtherMotorcade")
|
||||
public AjaxResult getAllOtherMotorcade()
|
||||
{
|
||||
List<MotorcadePo> list = motorcadeRecordApplicationService.getAllOtherMotorcade();
|
||||
return AjaxResult.success("查询成功!", list);
|
||||
}
|
||||
}
|
||||
+95
@@ -0,0 +1,95 @@
|
||||
package com.mhd.user.interfaces.facade;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.mhd.user.application.service.MotorcadeCollectionApplicationService;
|
||||
import com.mhd.user.interfaces.assember.MotorcadeCollectionAssembler;
|
||||
import com.mhd.user.interfaces.dto.MotorcadeCollectionDTO;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.mhd.user.domain.motorcadeCollection.repository.todo.MotorcadeCollectionDO;
|
||||
import com.mhd.user.domain.motorcadeCollection.repository.po.MotorcadeCollectionPO;
|
||||
import javax.annotation.Resource;
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 车队代收协议Api
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-03-20
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/motorcadeCollectionApi")
|
||||
public class MotorcadeCollectionApi extends BaseController{
|
||||
@Autowired
|
||||
private MotorcadeCollectionApplicationService motorcadeCollectionApplicationService;
|
||||
|
||||
/**
|
||||
* 分页查询车队代收协议列表
|
||||
*/
|
||||
@ApiOperation("查询车队代收协议列表")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(MotorcadeCollectionDTO motorcadeCollectionDTO)
|
||||
{
|
||||
//转换实体
|
||||
MotorcadeCollectionDO motorcadeCollectionDO = new MotorcadeCollectionAssembler().toDO(motorcadeCollectionDTO);
|
||||
startPage();
|
||||
List<MotorcadeCollectionPO> list = motorcadeCollectionApplicationService.queryList(motorcadeCollectionDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑车队代收协议
|
||||
*/
|
||||
@ApiOperation("编辑车队代收协议")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody MotorcadeCollectionDTO motorcadeCollectionDTO)
|
||||
{
|
||||
//转换实体
|
||||
MotorcadeCollectionDO motorcadeCollectionDO = new MotorcadeCollectionAssembler().toDO(motorcadeCollectionDTO);
|
||||
if(motorcadeCollectionDTO.getMotorcadeCollectionId() != null){
|
||||
return toAjax(motorcadeCollectionApplicationService.update(motorcadeCollectionDO));
|
||||
}else {
|
||||
return toAjax(motorcadeCollectionApplicationService.insert(motorcadeCollectionDO));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除车队代收协议
|
||||
*/
|
||||
@ApiOperation("批量删除车队代收协议")
|
||||
@DeleteMapping("/deleteByIds/{motorcadeCollectionIds}")
|
||||
public AjaxResult delete(@PathVariable Long[] motorcadeCollectionIds)
|
||||
{
|
||||
return toAjax(motorcadeCollectionApplicationService.delete(motorcadeCollectionIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取车队代收协议详细信息
|
||||
*/
|
||||
@ApiOperation("获取车队代收协议")
|
||||
@GetMapping(value = "/getInfo/{motorcadeCollectionId}")
|
||||
public AjaxResult getInfo(@PathVariable("motorcadeCollectionId") Long motorcadeCollectionId)
|
||||
{
|
||||
return AjaxResult.success(motorcadeCollectionApplicationService.getInfo(motorcadeCollectionId));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("根据车队id用户ID获取签署合同信息")
|
||||
@GetMapping(value = "/getInfoByMoIdAndUserId")
|
||||
public AjaxResult getInfoByMoIdAndUserId(@RequestParam("motorcadeId") Long motorcadeId,@RequestParam("userId") Long userId)
|
||||
{
|
||||
return AjaxResult.success(motorcadeCollectionApplicationService.getInfoByMoIdAndUserId(motorcadeId,userId));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.mhd.user.interfaces.facade;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.user.application.service.UserShipperApplicationService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@Api(tags = "用户中台管理-三方接口回调API")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/notifyApi")
|
||||
@CrossOrigin
|
||||
public class NotifyAPI extends BaseController {
|
||||
|
||||
|
||||
@Resource
|
||||
private UserShipperApplicationService userShipperApplicationService;
|
||||
|
||||
|
||||
@ApiOperation("E签宝回调接口-认证授权完成")
|
||||
@PostMapping("/obtainAuthorization")
|
||||
public AjaxResult obtainAuthorization(@RequestBody JSONObject jsonObject)
|
||||
{
|
||||
boolean result = userShipperApplicationService.obtainAuthorization(jsonObject);
|
||||
if (result){
|
||||
return AjaxResult.success("success");
|
||||
}
|
||||
return AjaxResult.success(result);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("E签宝回调接口-跨企业授权认证")
|
||||
@PostMapping("/sealAuthorization")
|
||||
public AjaxResult sealAuthorization(@RequestBody JSONObject jsonObject)
|
||||
{
|
||||
boolean result = userShipperApplicationService.sealAuthorization(jsonObject);
|
||||
if (result){
|
||||
return AjaxResult.success("success");
|
||||
}
|
||||
return AjaxResult.success(result);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
package com.mhd.user.interfaces.facade;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.mhd.common.core.domain.entity.R;
|
||||
import com.mhd.common.core.domain.po.UserPo;
|
||||
import com.mhd.common.log.annotation.Log;
|
||||
import com.mhd.common.log.enums.BusinessType;
|
||||
import com.mhd.user.application.service.ProjectUserApplicationService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.mhd.common.core.domain.dto.ProjectUserDTO;
|
||||
import com.mhd.user.domain.projectUser.repository.todo.ProjectUserDO;
|
||||
import com.mhd.common.core.domain.po.projectManagement.ProjectUserPO;
|
||||
import com.mhd.user.interfaces.assembler.projectUser.ProjectUserAssembler;
|
||||
import javax.annotation.Resource;
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 项目-用户关联Api
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-02-02
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/projectUserApi")
|
||||
public class ProjectUserApi extends BaseController{
|
||||
@Autowired
|
||||
private ProjectUserApplicationService projectUserApplicationService;
|
||||
|
||||
@Resource
|
||||
private ProjectUserAssembler projectUserAssembler;
|
||||
|
||||
/**
|
||||
* 分页查询项目-用户关联列表
|
||||
*/
|
||||
@Log(title = "项目用户关联-查询", description ="查询项目-用户关联列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询项目-用户关联列表")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ProjectUserDTO projectUserDTO)
|
||||
{
|
||||
//转换实体
|
||||
ProjectUserDO projectUserDO = projectUserAssembler.toDO(projectUserDTO);
|
||||
startPage();
|
||||
List<ProjectUserPO> list = projectUserApplicationService.queryList(projectUserDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑项目-用户关联
|
||||
*/
|
||||
@Log(title = "项目用户关联-编辑", description ="编辑项目-用户关联",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("编辑项目-用户关联")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody ProjectUserDTO projectUserDTO)
|
||||
{
|
||||
//转换实体
|
||||
ProjectUserDO projectUserDO = projectUserAssembler.toDO(projectUserDTO);
|
||||
if(projectUserDTO.getProjectUserId() != null){
|
||||
return toAjax(projectUserApplicationService.update(projectUserDO));
|
||||
}else {
|
||||
return toAjax(projectUserApplicationService.insert(projectUserDO));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除项目-用户关联
|
||||
*/
|
||||
@Log(title = "项目用户关联-删除", description ="批量删除项目-用户关联",businessType = BusinessType.DELETE)
|
||||
@ApiOperation("批量删除项目-用户关联")
|
||||
@DeleteMapping("/deleteByIds/{projectUserIds}")
|
||||
public AjaxResult delete(@PathVariable Long[] projectUserIds)
|
||||
{
|
||||
return toAjax(projectUserApplicationService.delete(projectUserIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取项目-用户关联详细信息
|
||||
*/
|
||||
@Log(title = "项目用户关联-查询", description ="获取项目-用户关联",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("获取项目-用户关联")
|
||||
@GetMapping(value = "/getInfo/{projectUserId}")
|
||||
public AjaxResult getInfo(@PathVariable("projectUserId") Long projectUserId)
|
||||
{
|
||||
return AjaxResult.success(projectUserApplicationService.getInfo(projectUserId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取全部子账户
|
||||
*/
|
||||
@Log(title = "项目用户关联-查询", description ="获取全部子账户",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("获取全部子账户")
|
||||
@GetMapping("/affiliateAccount")
|
||||
public TableDataInfo affiliateAccount(ProjectUserDTO projectUserDTO)
|
||||
{
|
||||
//转换实体
|
||||
ProjectUserDO projectUserDO = projectUserAssembler.toDO(projectUserDTO);
|
||||
startPage();
|
||||
List<UserPo> list = projectUserApplicationService.affiliateAccount(projectUserDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 绑定子账户/解绑子账户
|
||||
*/
|
||||
@Log(title = "项目用户关联-编辑", description ="绑定子账户/解绑子账户",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("绑定子账户/解绑子账户")
|
||||
@PostMapping("/bindAccount")
|
||||
public AjaxResult bindAccount(@RequestBody ProjectUserDTO projectUserDTO)
|
||||
{
|
||||
//转换实体
|
||||
ProjectUserDO projectUserDO = projectUserAssembler.toDO(projectUserDTO);
|
||||
projectUserApplicationService.bindAccount(projectUserDTO, projectUserDO);
|
||||
return AjaxResult.success("操作成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 关联项目
|
||||
*/
|
||||
@Log(title = "项目用户关联-编辑", description ="关联项目",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("关联项目")
|
||||
@PostMapping("/associatedProjects")
|
||||
public AjaxResult associatedProjects(@RequestBody ProjectUserDTO projectUserDTO)
|
||||
{
|
||||
//转换实体
|
||||
ProjectUserDO projectUserDO = projectUserAssembler.toDO(projectUserDTO);
|
||||
projectUserApplicationService.associatedProjects(projectUserDO);
|
||||
return AjaxResult.success("操作成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前登陆人项目ID集合
|
||||
*/
|
||||
@Log(title = "项目用户关联-查询", description ="获取当前登陆人项目ID集合",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("获取当前登陆人项目ID集合")
|
||||
@GetMapping("/getAllByLogin")
|
||||
public R<List<Long>> getAllByLogin()
|
||||
{
|
||||
return R.ok(projectUserApplicationService.getAllByLogin());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,375 @@
|
||||
package com.mhd.user.interfaces.facade;
|
||||
|
||||
import com.mhd.common.core.domain.entity.R;
|
||||
import com.mhd.common.log.annotation.Log;
|
||||
import com.mhd.common.log.enums.BusinessType;
|
||||
import com.mhd.user.application.service.RoleApplicationService;
|
||||
import com.mhd.user.domain.roleAggregate.repository.po.CustomAuthRoleOrUserPO;
|
||||
import com.mhd.common.core.domain.po.RolePO;
|
||||
import com.mhd.user.domain.roleAggregate.repository.todo.CustomAuthDO;
|
||||
import com.mhd.user.domain.roleAggregate.repository.todo.RoleDo;
|
||||
import com.mhd.user.domain.roleAggregate.repository.todo.RoleMenuDo;
|
||||
import com.mhd.user.interfaces.assember.RoleAssember;
|
||||
import com.mhd.user.interfaces.assember.RoleMenuAssember;
|
||||
import com.mhd.user.interfaces.dto.addDTO.CustomAuthDTO;
|
||||
import com.mhd.user.interfaces.dto.addDTO.RoleDTO;
|
||||
import com.mhd.user.interfaces.dto.addDTO.RoleMenuDTO;
|
||||
import com.mhd.common.core.domain.po.UserRoleMenuPO;
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.core.web.page.TableDataInfo;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Api(tags = "职务/角色管理")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/roleApi")
|
||||
@CrossOrigin
|
||||
public class RoleAPI extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private RoleApplicationService roleApplicationService;
|
||||
@Resource
|
||||
private RoleAssember roleAssember;
|
||||
@Resource
|
||||
private RoleMenuAssember roleMenuAssember;
|
||||
|
||||
@Log(title = "职务/角色管理-查询", description ="查询角色列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询角色列表-分页")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(RoleDTO roleDTO) {
|
||||
//转换实体
|
||||
RoleDo roleDo = roleAssember.toRoleDo(roleDTO);
|
||||
startPage();
|
||||
List<RolePO> list = roleApplicationService.selecRolePoList(roleDo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "职务/角色管理-查询", description ="查询角色列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询角色列表-分页")
|
||||
@GetMapping("/getUserRolelist")
|
||||
public TableDataInfo getUserRolelist(RoleDTO roleDTO) {
|
||||
//转换实体
|
||||
RoleDo roleDo = roleAssember.toRoleDo(roleDTO);
|
||||
startPage();
|
||||
List<RolePO> list = roleApplicationService.getUserRolelist(roleDo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@ApiOperation("查询角色列表-不分页(feign调用使用)")
|
||||
@PostMapping("/getListByFeign")
|
||||
public R<List<RolePO>> getListByFeign(@RequestBody RoleDTO roleDTO) {
|
||||
//转换实体
|
||||
RoleDo roleDo = roleAssember.toRoleDo(roleDTO);
|
||||
List<RolePO> list = roleApplicationService.selectList(roleDo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
@Log(title = "职务/角色管理-查询", description ="查询角色列表-公司岗位查询",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询角色列表-公司岗位查询")
|
||||
@GetMapping("/queryList")
|
||||
public TableDataInfo queryList(RoleDTO roleDTO) {
|
||||
//转换实体
|
||||
RoleDo roleDo = roleAssember.toRoleDo(roleDTO);
|
||||
startPage();
|
||||
List<RolePO> list = roleApplicationService.queryList(roleDo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "职务/角色管理-查询", description ="查询角色列表-公司岗位查询",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询角色列表-公司岗位查询")
|
||||
@GetMapping("/getAll")
|
||||
public AjaxResult getAll(RoleDTO roleDTO) {
|
||||
//转换实体
|
||||
RoleDo roleDo = roleAssember.toRoleDo(roleDTO);
|
||||
List<RolePO> list = roleApplicationService.queryList(roleDo);
|
||||
return AjaxResult.success("查询成功!", list);
|
||||
}
|
||||
|
||||
@Log(title = "职务/角色管理-查询", description ="查询角色列表-不分页",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询角色列表-不分页")
|
||||
@GetMapping("/roleList")
|
||||
public AjaxResult roleList(RoleDTO roleDTO) {
|
||||
//转换实体
|
||||
RoleDo roleDo = roleAssember.toRoleDo(roleDTO);
|
||||
List<RolePO> list = roleApplicationService.selectList(roleDo);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@Log(title = "职务/角色管理-查询", description ="查询角色列表-不分页",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询角色列表-不分页")
|
||||
@PostMapping("/roleListByOrganizationIds")
|
||||
public AjaxResult roleListByOrganizationIds(@RequestBody RoleDTO roleDTO) {
|
||||
//转换实体
|
||||
RoleDo roleDo = roleAssember.toRoleDo(roleDTO);
|
||||
List<RolePO> list = roleApplicationService.roleListByOrganizationIds(roleDo);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@Log(title = "职务/角色管理-查询", description ="根据组织id查询所有的内置角色",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("根据组织id查询所有的内置角色")
|
||||
@PostMapping("/getBuiltinRoleList")
|
||||
public AjaxResult getBuiltinRoleList(@RequestBody RoleDTO roleDTO) {
|
||||
//转换实体
|
||||
RoleDo roleDo = roleAssember.toRoleDo(roleDTO);
|
||||
List<RolePO> list = roleApplicationService.getBuiltinRoleList(roleDo);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@Log(title = "职务/角色管理-查询", description ="根据角色ID查询角色信息",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("根据角色ID查询角色信息")
|
||||
@GetMapping(value = "/getInfo/{roleId}")
|
||||
public AjaxResult getInfo(@PathVariable("roleId") Long roleId) {
|
||||
RolePO rolePo = roleApplicationService.selectByRoleId(roleId);
|
||||
return AjaxResult.success(rolePo);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 根据角色code加组织id查询角色
|
||||
* @author ZhouGY
|
||||
* @date 2023/10/10 11:17
|
||||
* @param roleCode
|
||||
* @param organizationId
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Log(title = "职务/角色管理-查询", description ="根据角色code加组织id查询角色",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("根据角色code加组织id查询角色")
|
||||
@GetMapping(value = "/getInfoByRoleCodeAndOrganizationId")
|
||||
public AjaxResult getInfoByRoleCodeAndOrganizationId(@RequestParam("roleCode") String roleCode, @RequestParam("organizationId") Long organizationId) {
|
||||
RolePO rolePo = roleApplicationService.selectByRoleCodeAndOrganizationId(roleCode, organizationId);
|
||||
return AjaxResult.success(rolePo);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 新增角色
|
||||
* @Author Alex
|
||||
* @Date 2022/11/24 11:03
|
||||
*/
|
||||
@Log(title = "职务/角色管理-新增", description ="新增角色",businessType = BusinessType.INSERT)
|
||||
@ApiOperation("新增角色")
|
||||
@PostMapping("/add")
|
||||
public AjaxResult add(@RequestBody RoleDTO roleDTO) {
|
||||
RoleDo roleDo = roleAssember.toRoleDo(roleDTO);
|
||||
return toAjax(roleApplicationService.addRole(roleDo));
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 批量新增角色
|
||||
* @Author Alex
|
||||
* @Date 2022/11/24 11:03
|
||||
*/
|
||||
@Log(title = "职务/角色管理-新增", description ="批量新增角色",businessType = BusinessType.INSERT)
|
||||
@ApiOperation("批量新增角色")
|
||||
@PostMapping("/addList")
|
||||
public AjaxResult addList(@RequestBody RoleDTO roleDTO) {
|
||||
RoleDo roleDo = roleAssember.toRoleDo(roleDTO);
|
||||
return toAjax(roleApplicationService.addList(roleDo));
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 编辑角色
|
||||
* @Author Alex
|
||||
* @Date 2022/11/24 11:05
|
||||
*/
|
||||
@Log(title = "职务/角色管理-编辑", description ="编辑角色",businessType = BusinessType.UPDATE)
|
||||
@RequestMapping(value = "/update", method = {RequestMethod.POST, RequestMethod.PUT})
|
||||
public AjaxResult update(@RequestBody RoleDTO roleDTO) {
|
||||
RoleDo roleDo = roleAssember.toRoleDo(roleDTO);
|
||||
roleDo.setUpdateBy(SecurityUtils.getUserId());
|
||||
roleDo.setUpdateTime(new Date());
|
||||
roleDo.setUpdateByName(SecurityUtils.getUsername());
|
||||
return toAjax(roleApplicationService.updateRole(roleDo));
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 删除角色
|
||||
* @Author Alex
|
||||
* @Date 2022/11/24 11:05
|
||||
*/
|
||||
@Log(title = "职务/角色管理-删除", description ="删除角色",businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/removeById/{id}")
|
||||
public AjaxResult removeById(@PathVariable Long id) {
|
||||
return toAjax(roleApplicationService.deleteByRoleId(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 批量删除角色
|
||||
* @Author Alex
|
||||
* @Date 2022/11/24 11:05
|
||||
*/
|
||||
@Log(title = "职务/角色管理-删除", description ="批量删除角色",businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/removeByIds/{ids}")
|
||||
public AjaxResult removeByIds(@PathVariable List<Long> ids) {
|
||||
return toAjax(roleApplicationService.deleteByRoleIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 重置角色菜单
|
||||
* @Author Alex
|
||||
* @Date 2023/1/9 23:17
|
||||
*/
|
||||
@Log(title = "职务/角色管理-编辑", description ="重置角色菜单",businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/updateRoleMenu")
|
||||
public AjaxResult updateRoleMenu(@RequestBody RoleMenuDTO roleMenuDTO) {
|
||||
RoleMenuDo roleMenuDo = roleMenuAssember.toRoleMenuDO(roleMenuDTO);
|
||||
return toAjax(roleApplicationService.updateRoleMenu(roleMenuDo));
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 重置角色菜单
|
||||
* @Author Alex
|
||||
* @Date 2023/1/9 23:17
|
||||
*/
|
||||
@Log(title = "职务/角色管理-编辑", description ="重置角色菜单",businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/updateShipperRoleMenu")
|
||||
public AjaxResult updateShipperRoleMenu(@RequestBody RoleMenuDTO roleMenuDTO) {
|
||||
RoleMenuDo roleMenuDo = roleMenuAssember.toRoleMenuDO(roleMenuDTO);
|
||||
return toAjax(roleApplicationService.updateShipperRoleMenu(roleMenuDo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存角色对应APP菜单权限
|
||||
* @param roleMenuDTO
|
||||
* @return
|
||||
*/
|
||||
@Log(title = "职务/角色管理-新增", description ="保存角色对应APP菜单权限",businessType = BusinessType.INSERT)
|
||||
@PostMapping("/saveAppRoleMenu")
|
||||
public AjaxResult saveAppRoleMenu(@RequestBody RoleMenuDTO roleMenuDTO) {
|
||||
RoleMenuDo roleMenuDo = roleMenuAssember.toRoleMenuDO(roleMenuDTO);
|
||||
return toAjax(roleApplicationService.saveAppRoleMenu(roleMenuDo));
|
||||
}
|
||||
|
||||
|
||||
@Log(title = "职务/角色管理-查询", description ="查询角色APP菜单列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询角色APP菜单列表")
|
||||
@GetMapping("/roleAppMenuList")
|
||||
public AjaxResult roleAppMenuList(RoleMenuDTO RoleMenuDTO) {
|
||||
//转换实体
|
||||
RoleMenuDo roleMenuDo = roleMenuAssember.toRoleMenuDO(RoleMenuDTO);
|
||||
List<UserRoleMenuPO> list = roleApplicationService.selectRoleAppMenuList(roleMenuDo);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@Log(title = "职务/角色管理-查询", description ="根据角色id集合 查询角色APP菜单列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("根据角色id集合 查询角色APP菜单列表")
|
||||
@PostMapping("/roleAppMenuListByRoleIds")
|
||||
public AjaxResult roleAppMenuListByRoleIds(@RequestBody List<Long> roleIds) {
|
||||
//转换实体
|
||||
RoleMenuDo roleMenuDo = new RoleMenuDo();
|
||||
roleMenuDo.setRoleIds(roleIds);
|
||||
List<UserRoleMenuPO> list = roleApplicationService.selectRoleAppMenuList(roleMenuDo);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @Description 批量重置角色菜单
|
||||
* @Author Alex
|
||||
* @Date 2023/1/9 23:17
|
||||
*/
|
||||
@Log(title = "职务/角色管理-编辑", description ="批量重置角色菜单",businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/updateRoleMenus")
|
||||
public AjaxResult updateRoleMenus(@RequestBody RoleMenuDTO roleMenuDTO) {
|
||||
RoleMenuDo roleMenuDo = roleMenuAssember.toRoleMenuDO(roleMenuDTO);
|
||||
return toAjax(roleApplicationService.updateRoleMenus(roleMenuDo));
|
||||
}
|
||||
|
||||
@Log(title = "职务/角色管理-查询", description ="查询角色菜单列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询角色菜单列表")
|
||||
@PostMapping("/roleMenuList")
|
||||
public AjaxResult roleMenuList(@RequestBody RoleMenuDTO RoleMenuDTO) {
|
||||
//转换实体
|
||||
RoleMenuDo roleMenuDo = roleMenuAssember.toRoleMenuDO(RoleMenuDTO);
|
||||
List<UserRoleMenuPO> list = roleApplicationService.selectRoleMenuList(roleMenuDo);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@Log(title = "职务/角色管理-查询", description ="查询职务菜单列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询职务菜单列表")
|
||||
@GetMapping("/positionMenuList")
|
||||
public AjaxResult positionMenuList(RoleMenuDTO RoleMenuDTO) {
|
||||
//转换实体
|
||||
RoleMenuDo roleMenuDo = roleMenuAssember.toRoleMenuDO(RoleMenuDTO);
|
||||
List<UserRoleMenuPO> list = roleApplicationService.selectRolePositionMenuList(roleMenuDo);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@Log(title = "职务/角色管理-查询", description ="查询用户角色集合",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询用户角色集合")
|
||||
@PostMapping("/roleIds")
|
||||
public AjaxResult roleIds(@RequestBody RoleDTO roleDTO) {
|
||||
//转换实体
|
||||
RoleDo roleDo = roleAssember.toRoleDo(roleDTO);
|
||||
List<Long> roleIds = roleApplicationService.roleIds(roleDo);
|
||||
return AjaxResult.success(roleIds);
|
||||
}
|
||||
|
||||
@Log(title = "职务/角色管理-编辑", description ="租户配置角色",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("租户配置角色")
|
||||
@PostMapping("/assignOrganizationRoles")
|
||||
public AjaxResult assignOrganizationRoles(@RequestBody RoleDTO roleDTO) {
|
||||
RoleDo roleDo = roleAssember.toRoleDo(roleDTO);
|
||||
return toAjax(roleApplicationService.assignOrganizationRoles(roleDo));
|
||||
}
|
||||
|
||||
@Log(title = "职务/角色管理-编辑", description ="配置角色/用户权限",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("配置角色/用户权限")
|
||||
@PostMapping("/assignCustomAuthByRoleOrUserId")
|
||||
public AjaxResult assignCustomAuthByRoleOrUserId(@RequestBody CustomAuthDTO customAuthDTO) {
|
||||
CustomAuthDO customAuthDO = roleAssember.toCustomAuthDO(customAuthDTO);
|
||||
return toAjax(roleApplicationService.assignCustomAuthByRoleOrUserId(customAuthDO));
|
||||
}
|
||||
|
||||
@Log(title = "职务/角色管理-查询", description ="查询角色/用户权限列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询角色/用户权限列表")
|
||||
@GetMapping("/getCustomAuthByRoleOrUserId")
|
||||
public AjaxResult getCustomAuthByRoleOrUserId(CustomAuthDTO customAuthDTO) {
|
||||
//转换实体
|
||||
CustomAuthDO customAuthDO = roleAssember.toCustomAuthDO(customAuthDTO);
|
||||
CustomAuthRoleOrUserPO customAuthRoleOrUserPO = roleApplicationService.getCustomAuthMenuByRoleOrUserId(customAuthDO);
|
||||
return AjaxResult.success(customAuthRoleOrUserPO);
|
||||
}
|
||||
|
||||
@Log(title = "职务/角色管理-查询", description ="查询角色/用户自定义权限列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询角色/用户自定义权限列表")
|
||||
@PostMapping("/getCustomAuthByUserId")
|
||||
public AjaxResult getCustomAuthByUserId(@RequestBody CustomAuthDTO customAuthDTO) {
|
||||
//转换实体
|
||||
CustomAuthDO customAuthDO = roleAssember.toCustomAuthDO(customAuthDTO);
|
||||
List<CustomAuthRoleOrUserPO> customAuthRoleOrUserPO = roleApplicationService.getCustomAuthByRoleOrUserId(customAuthDO);
|
||||
return AjaxResult.success(customAuthRoleOrUserPO);
|
||||
}
|
||||
|
||||
@Log(title = "职务/角色管理-查询", description ="查询角色自定义权限列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询角色自定义权限列表")
|
||||
@PostMapping("/getCustomAuthByRoleId")
|
||||
public AjaxResult getCustomAuthByRoleId(@RequestBody CustomAuthDTO customAuthDTO) {
|
||||
//转换实体
|
||||
CustomAuthDO customAuthDO = roleAssember.toCustomAuthDO(customAuthDTO);
|
||||
CustomAuthRoleOrUserPO customAuthPO = roleApplicationService.getCustomAuthByRoleId(customAuthDO);
|
||||
return AjaxResult.success(customAuthPO);
|
||||
}
|
||||
|
||||
@Log(title = "职务/角色管理-查询", description ="根据组织id查询所有的内置角色",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("根据组织id查询所有的内置角色")
|
||||
@GetMapping("/addRolesByOrganizationId/{organizationId}")
|
||||
public AjaxResult getRolesByByOrganizationId(@PathVariable Long organizationId) {
|
||||
return AjaxResult.success(roleApplicationService.getRolesByByOrganizationId(organizationId));
|
||||
}
|
||||
|
||||
@Log(title = "职务/角色管理-查询", description ="根据用户ID查询角色列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("根据用户ID查询角色列表")
|
||||
@GetMapping("/getRoleListByUserId/{userId}")
|
||||
public AjaxResult getRoleListByUserId(@PathVariable("userId") Long userId) {
|
||||
return AjaxResult.success(roleApplicationService.getRoleListByUserId(userId));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,949 @@
|
||||
package com.mhd.user.interfaces.facade;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.aliyun.oss.ServiceException;
|
||||
import com.mhd.common.core.domain.dto.StaffDataPermissionDTO;
|
||||
import com.mhd.common.core.domain.po.UserDataPermissionPO;
|
||||
import com.mhd.common.core.domain.po.projectManagement.ProjectManagementPO;
|
||||
import com.mhd.common.core.domain.po.projectManagement.ProjectUserPO;
|
||||
import com.mhd.common.core.domain.todo.StatisticalMattersDo;
|
||||
import com.mhd.common.log.annotation.Log;
|
||||
import com.mhd.common.log.enums.BusinessType;
|
||||
import com.mhd.user.application.service.UserApplicationService;
|
||||
import com.mhd.user.application.service.UserDriverApplicationService;
|
||||
import com.mhd.user.application.service.UserShipperApplicationService;
|
||||
import com.mhd.user.domain.userAggregate.repository.po.UserDocumentWarningQueryPo;
|
||||
import com.mhd.user.domain.userAggregate.repository.todo.*;
|
||||
import com.mhd.user.domain.userAggregate.service.UserRoleDomainService;
|
||||
import com.mhd.user.interfaces.assember.*;
|
||||
import com.mhd.user.interfaces.dto.addDTO.*;
|
||||
import com.mhd.user.interfaces.dto.queryDTO.UserDataPermissionQueryDTO;
|
||||
import com.mhd.common.core.domain.entity.R;
|
||||
import com.mhd.common.core.domain.po.UserDriverListPo;
|
||||
import com.mhd.common.core.domain.po.UserPo;
|
||||
import com.mhd.common.core.domain.po.UserRoleMenuPO;
|
||||
import com.mhd.user.domain.userAggregate.repository.po.UserShipperPo;
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.core.web.page.TableDataInfo;
|
||||
import com.mhd.common.security.annotation.InnerAuth;
|
||||
import com.mhd.common.security.service.TokenService;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import com.mhd.user.interfaces.dto.queryDTO.UserDocumentWarningQueryDTO;
|
||||
import com.mhd.user.interfaces.dto.updateDTO.UpdateHasDefaultAddressDTO;
|
||||
import com.mhd.user.interfaces.vo.QueryAllShipperInfoVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Api(tags = "用户中台管理")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/userApi")
|
||||
@CrossOrigin
|
||||
@Validated
|
||||
public class UserAPI extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private UserApplicationService userApplicationService;
|
||||
@Resource
|
||||
private UserDriverApplicationService userDriverApplicationService;
|
||||
@Resource
|
||||
private UserShipperApplicationService userShipperApplicationService;
|
||||
@Resource
|
||||
private UserAssember userAssember;
|
||||
@Resource
|
||||
private UserMenuAssember userMenuAssember;
|
||||
@Resource
|
||||
private UserRoleAssember userRoleAssember;
|
||||
@Resource
|
||||
private UserDriverAssember userDriverAssember;
|
||||
@Resource
|
||||
private UserShipperAssember userShipperAssember;
|
||||
@Resource
|
||||
private UserDataPermissionAssember userDataPermissionAssember;
|
||||
|
||||
@Autowired
|
||||
private UserRoleDomainService userRoleDomainService;
|
||||
|
||||
@Resource
|
||||
private TokenService tokenService;
|
||||
|
||||
@Log(title = "用户中台管理-查询", description ="查询用户列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询用户列表")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(UserDTO userDTO) {
|
||||
//转换实体
|
||||
UserDO userDO = new UserDO();
|
||||
BeanUtils.copyProperties(userDTO,userDO);
|
||||
List<UserPo> list = userApplicationService.selectList(userDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "用户中台管理-查询", description ="查询用户列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询用户列表")
|
||||
@GetMapping("/getAllByOrganization")
|
||||
public TableDataInfo getAllByOrganization(UserDTO userDTO) {
|
||||
//转换实体
|
||||
UserDO userDO = new UserDO();
|
||||
BeanUtils.copyProperties(userDTO,userDO);
|
||||
List<UserPo> list = userApplicationService.selectList(userDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "用户中台管理-查询", description ="查询用户列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询用户列表")
|
||||
@GetMapping("/getAllUser")
|
||||
public TableDataInfo getAllUser(UserDTO userDTO) {
|
||||
//转换实体
|
||||
UserDO userDO = new UserDO();
|
||||
BeanUtils.copyProperties(userDTO,userDO);
|
||||
List<UserPo> list = userApplicationService.getAllUser(userDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "业务人员查询", description ="业务人员查询",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("业务人员查询")
|
||||
@GetMapping("/getBusinessList")
|
||||
public TableDataInfo getBusinessList(UserDTO userDTO) {
|
||||
//转换实体
|
||||
UserDO userDO = new UserDO();
|
||||
BeanUtils.copyProperties(userDTO,userDO);
|
||||
List<UserPo> list = userApplicationService.getBusinessList(userDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "用户中台管理-查询", description ="根据组织id集合查询用户列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("根据组织id集合获取所有的")
|
||||
@PostMapping("/getListByOrganizationIdList")
|
||||
public TableDataInfo getListByOrganizationIdList(@RequestBody UserDTO userDTO) {
|
||||
//转换实体
|
||||
UserDO userDO = new UserDO();
|
||||
BeanUtils.copyProperties(userDTO,userDO);
|
||||
List<UserPo> list = userApplicationService.getListByOrganizationIdList(userDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "用户中台管理-查询", description ="查询用户列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询用户列表")
|
||||
@GetMapping("/getListForBranch")
|
||||
public AjaxResult getListForBranch() {
|
||||
List<UserPo> list = userApplicationService.selectListForBranch();
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@Log(title = "用户中台管理-查询", description ="查询员工列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询员工列表")
|
||||
@GetMapping("/staffList")
|
||||
public TableDataInfo staffList(UserDTO userDTO) {
|
||||
UserDO userDO = new UserDO();
|
||||
BeanUtils.copyProperties(userDTO,userDO);
|
||||
userDO.setUserAccountType(4);
|
||||
startPage();
|
||||
List<UserPo> list = userApplicationService.staffList(userDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "用户中台管理-查询", description ="查询合作商列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询合作商列表")
|
||||
@GetMapping("/partnerList")
|
||||
public TableDataInfo partnerList(UserDTO userDTO) {
|
||||
UserDO userDO = new UserDO();
|
||||
BeanUtils.copyProperties(userDTO,userDO);
|
||||
userDO.setUserAccountType(6);
|
||||
startPage();
|
||||
List<UserPo> list = userApplicationService.staffList(userDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "用户中台管理-查询", description ="查询企业员工列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询企业员工列表")
|
||||
@GetMapping("/companyStaffList")
|
||||
public TableDataInfo companyStaffList(UserDTO userDTO) {
|
||||
UserDO userDO = new UserDO();
|
||||
BeanUtils.copyProperties(userDTO,userDO);
|
||||
userDO.setUserAccountType(5);
|
||||
startPage();
|
||||
List<UserPo> list = userApplicationService.companyStaffList(userDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "用户中台管理-查询", description ="根据会员编号查询一级组织下的货主用户",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("根据会员编号查询一级组织下的货主用户")
|
||||
@GetMapping("/getUserShipperList/{userMemberCode}")
|
||||
public AjaxResult getUserShipperList(@PathVariable("userMemberCode") String userMemberCode) {
|
||||
UserPo userPo = userApplicationService.selectUserShipperList(userMemberCode);
|
||||
return AjaxResult.success(userPo);
|
||||
}
|
||||
|
||||
@Log(title = "用户中台管理-查询", description ="根据一级组织ID查询货主用户(退货)",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("根据一级组织ID查询货主用户(退货)")
|
||||
@GetMapping("/getUserShipperListWaybill")
|
||||
public AjaxResult getUserShipperListWaybill() {
|
||||
List<UserPo> userPo = userApplicationService.selectUserShipperListWaybill();
|
||||
return AjaxResult.success(userPo);
|
||||
}
|
||||
|
||||
@Log(title = "用户中台管理-查询", description ="根据用户ID查询用户详细信息",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("根据用户ID查询用户详细信息")
|
||||
@GetMapping("/getInfo/{userId}")
|
||||
public AjaxResult getInfo(@PathVariable("userId") Long userId) {
|
||||
UserPo userPo = userApplicationService.selectByUserId(userId);
|
||||
return AjaxResult.success(userPo);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 新增租户,新增货主,新增司机,新增员工,用户注册等
|
||||
* @Author Alex
|
||||
* @Date 2022/11/24 11:03
|
||||
*/
|
||||
@Log(title = "用户中台管理-新增", description ="新增/修改-租户一级账号",businessType = BusinessType.INSERT)
|
||||
@ApiOperation("新增/修改-租户一级账号")
|
||||
@PostMapping("/addTopUser")
|
||||
public AjaxResult addTopUser(@RequestBody UserDTO userDTO) {
|
||||
UserDO userDO = userAssember.toUserDO(userDTO);
|
||||
return toAjax(userApplicationService.addTopUser(userDO));
|
||||
}
|
||||
|
||||
@Log(title = "用户中台管理-新增", description ="新增/修改-组织账号",businessType = BusinessType.INSERT)
|
||||
@ApiOperation("新增/修改-组织账号")
|
||||
@PostMapping("/addOrganizationUser")
|
||||
public AjaxResult addOrganizationUser(@RequestBody UserDTO userDTO) {
|
||||
UserDO userDO = userAssember.toUserDO(userDTO);
|
||||
return toAjax(userApplicationService.addOrganizationUser(userDO));
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 新增租户,新增货主,新增司机,新增员工,用户注册等
|
||||
* @Author Alex
|
||||
* @Date 2022/11/24 11:03
|
||||
*/
|
||||
@Log(title = "用户中台管理-新增", description ="新增用户",businessType = BusinessType.INSERT)
|
||||
@ApiOperation("新增用户")
|
||||
@PostMapping("/add")
|
||||
public R<LoginUser> add(@RequestBody UserDTO userDTO) {
|
||||
LoginUser sysUserVo = new LoginUser();
|
||||
UserDO userDO = userAssember.toUserDO(userDTO);
|
||||
UserPo userPo = userApplicationService.addUser(userDO);
|
||||
if (ObjectUtil.isNotNull(userPo)) {
|
||||
sysUserVo.setUserid(userPo.getUserId());
|
||||
}
|
||||
sysUserVo.setUserPo(userPo);
|
||||
return R.ok(sysUserVo, "操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 新增员工
|
||||
* @Author Alex
|
||||
* @Date 2022/11/24 11:03
|
||||
*/
|
||||
@Log(title = "用户中台管理-新增", description ="新增员工",businessType = BusinessType.INSERT)
|
||||
@ApiOperation("新增员工")
|
||||
@PostMapping("/addStaff")
|
||||
public R<LoginUser> addStaff(@RequestBody UserDTO userDTO) {
|
||||
LoginUser sysUserVo = new LoginUser();
|
||||
UserDO userDO = userAssember.toUserDO(userDTO);
|
||||
userDO.setUserAccountType(4);
|
||||
UserPo userPo = userApplicationService.addUser(userDO);
|
||||
if (ObjectUtil.isNotNull(userPo)) {
|
||||
sysUserVo.setUserid(userPo.getUserId());
|
||||
}
|
||||
sysUserVo.setUserPo(userPo);
|
||||
return R.ok(sysUserVo, "操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 新增合作商
|
||||
* @Author Alex
|
||||
* @Date 2022/11/24 11:03
|
||||
*/
|
||||
@ApiOperation("新增合作商")
|
||||
@PostMapping("/addPartner")
|
||||
public R<LoginUser> addPartner(@RequestBody UserDTO userDTO) {
|
||||
LoginUser sysUserVo = new LoginUser();
|
||||
UserDO userDO = userAssember.toUserDO(userDTO);
|
||||
userDO.setUserAccountType(6);
|
||||
UserPo userPo = userApplicationService.addUser(userDO);
|
||||
if (ObjectUtil.isNotNull(userPo)) {
|
||||
sysUserVo.setUserid(userPo.getUserId());
|
||||
}
|
||||
sysUserVo.setUserPo(userPo);
|
||||
return R.ok(sysUserVo, "操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 新增企业员工
|
||||
* @Author Alex
|
||||
* @Date 2022/11/24 11:03
|
||||
*/
|
||||
@Log(title = "用户中台管理-新增", description ="新增企业员工",businessType = BusinessType.INSERT)
|
||||
@ApiOperation("新增企业员工")
|
||||
@PostMapping("/addEnterpriseEmployees")
|
||||
public R<LoginUser> addEnterpriseEmployees(@RequestBody UserDTO userDTO) {
|
||||
LoginUser sysUserVo = new LoginUser();
|
||||
UserDO userDO = userAssember.toUserDO(userDTO);
|
||||
userDO.setUserAccountType(5);
|
||||
UserPo userPo = userApplicationService.addUser(userDO);
|
||||
if (ObjectUtil.isNotNull(userPo)) {
|
||||
sysUserVo.setUserid(userPo.getUserId());
|
||||
}
|
||||
sysUserVo.setUserPo(userPo);
|
||||
return R.ok(sysUserVo, "操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description App验证码登录时无用户时新增用户信息
|
||||
* @Author Alex
|
||||
* @Date 2022/11/24 11:03
|
||||
*/
|
||||
@Log(title = "用户中台管理-新增", description ="app验证码新增用户",businessType = BusinessType.INSERT)
|
||||
@ApiOperation("app验证码新增用户")
|
||||
@PostMapping("/registerAddUser")
|
||||
public R<LoginUser> registerAddUser(@RequestBody UserDTO userDTO) {
|
||||
LoginUser sysUserVo = new LoginUser();
|
||||
UserDO userDO = userAssember.toUserDO(userDTO);
|
||||
UserPo userPo = userApplicationService.registerAddUser(userDO);
|
||||
if (ObjectUtil.isNotNull(userPo)) {
|
||||
sysUserVo.setUserid(userPo.getUserId());
|
||||
}
|
||||
sysUserVo.setUserPo(userPo);
|
||||
return R.ok(sysUserVo, "操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description
|
||||
* @Author Alex
|
||||
* @Date 2022/11/24 11:05
|
||||
*/
|
||||
@Log(title = "用户中台管理-编辑", description ="编辑用户",businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/update")
|
||||
public R<LoginUser> update(@RequestBody UserUpdateDTO userUpdateDTO) {
|
||||
LoginUser sysUserVo = new LoginUser();
|
||||
UserDO userDO = userAssember.toUserUpdateDO(userUpdateDTO);
|
||||
UserPo userPo = userApplicationService.updateUser(userDO);
|
||||
if (ObjectUtil.isNotNull(userPo)) {
|
||||
sysUserVo.setUserid(userPo.getUserId());
|
||||
}
|
||||
sysUserVo.setUserPo(userPo);
|
||||
return R.ok(sysUserVo, "操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 登录时更新登录用户数据(最后登录时间,IP)
|
||||
* 2023年3月28日
|
||||
* 原本调用接口/update,但是该接口中无法获取当前登录人
|
||||
* 所以新建接口只更新最后登录时间及IP
|
||||
* @param userUpdateDTO
|
||||
*/
|
||||
@PutMapping("/updateWhenLogin")
|
||||
public void updateWhenLogin(@RequestBody UserUpdateDTO userUpdateDTO) {
|
||||
UserDO userDO = userAssember.toUserUpdateDO(userUpdateDTO);
|
||||
userApplicationService.updateWhenLogin(userDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description
|
||||
* @Author Alex
|
||||
* @Date 2022/11/24 11:05
|
||||
*/
|
||||
@Log(title = "用户中台管理-删除", description ="批量删除用户",businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/removeByIds/{ids}")
|
||||
public AjaxResult removeByIds(@PathVariable List<Long> ids) {
|
||||
return toAjax(userApplicationService.deleteByIds(ids));
|
||||
}
|
||||
|
||||
@Log(title = "用户中台管理-编辑", description ="修改用户菜单",businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/updateUserMenu")
|
||||
public AjaxResult updateUserMenu(@RequestBody UserMenuDTO userMenuDTO) {
|
||||
UserMenuDo UserMenuDo = userMenuAssember.toUserMenuDO(userMenuDTO);
|
||||
return toAjax(userApplicationService.updateUserMenu(UserMenuDo));
|
||||
}
|
||||
|
||||
@Log(title = "用户中台管理-编辑", description ="修改货主菜单",businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/updateShipperMenu")
|
||||
public AjaxResult updateShipperMenu(@RequestBody UserMenuDTO userMenuDTO) {
|
||||
UserMenuDo UserMenuDo = userMenuAssember.toUserMenuDO(userMenuDTO);
|
||||
return toAjax(userApplicationService.updateShipperMenu(UserMenuDo));
|
||||
}
|
||||
|
||||
@Log(title = "用户中台管理-查询", description ="查询用户菜单列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询用户菜单列表")
|
||||
@PostMapping("/userMenuList")
|
||||
public AjaxResult userMenuList(@RequestBody UserMenuDTO userMenuDTO) {
|
||||
//转换实体
|
||||
UserMenuDo userMenuDo = userMenuAssember.toUserMenuDO(userMenuDTO);
|
||||
List<UserRoleMenuPO> list = userApplicationService.selectUserMenuList(userMenuDo);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@Log(title = "用户中台管理-查询", description ="查询用户菜单列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询用户菜单列表")
|
||||
@PostMapping("/userMenuListById")
|
||||
public AjaxResult userMenuListById(@RequestBody UserMenuDTO userMenuDTO) {
|
||||
//转换实体
|
||||
UserMenuDo userMenuDo = userMenuAssember.toUserMenuDO(userMenuDTO);
|
||||
List<UserRoleMenuPO> list = userApplicationService.selectUserMenuListById(userMenuDo);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@Log(title = "用户中台管理-查询", description ="查询员工菜单列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询员工菜单列表")
|
||||
@GetMapping("/employeeMenuList")
|
||||
public AjaxResult employeeMenuList(UserMenuDTO userMenuDTO) {
|
||||
//转换实体
|
||||
UserMenuDo userMenuDo = userMenuAssember.toUserMenuDO(userMenuDTO);
|
||||
List<UserRoleMenuPO> list = userApplicationService.selectEmployeeMenuList(userMenuDo);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@Log(title = "用户中台管理-查询", description ="查询用户角色列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询用户角色列表")
|
||||
@GetMapping("/userRoleList")
|
||||
public AjaxResult userRoleList(UserRoleDTO userRoleDTO) {
|
||||
//转换实体
|
||||
UserRoleDo userRoleDo = userRoleAssember.toUserRoleDO(userRoleDTO);
|
||||
List<UserRoleMenuPO> list = userApplicationService.selectUserRoleList(userRoleDo);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@Log(title = "用户中台管理-查询", description ="查询用户角色列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询用户角色列表(post)")
|
||||
@PostMapping("/userRoleListPost")
|
||||
public AjaxResult userRoleListPost(UserRoleDTO userRoleDTO) {
|
||||
//转换实体
|
||||
UserRoleDo userRoleDo = userRoleAssember.toUserRoleDO(userRoleDTO);
|
||||
List<UserRoleMenuPO> list = userApplicationService.selectUserRoleList(userRoleDo);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@Log(title = "用户中台管理-查询", description ="查询用户角色列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询用户角色菜单列表")
|
||||
@PostMapping("/userRoleMenuList")
|
||||
public AjaxResult userRoleMenuList(@RequestBody UserRoleDTO userRoleDTO) {
|
||||
//转换实体
|
||||
UserRoleDo userRoleDo = userRoleAssember.toUserRoleDO(userRoleDTO);
|
||||
List<UserRoleMenuPO> list = userApplicationService.userRoleMenuList(userRoleDo);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@ApiOperation("根据域名获取一级组织ID")
|
||||
@GetMapping("/getOrganizationByPath/{path}")
|
||||
public AjaxResult getOrganizationByPath(@PathVariable("path") String path) {
|
||||
Long topOrganizationId = userApplicationService.selectTopIdByTenantsDomainName(path);
|
||||
return AjaxResult.success(topOrganizationId);
|
||||
}
|
||||
|
||||
@ApiOperation("根据token获取当前登录人信息")
|
||||
@GetMapping("/getUserByToken")
|
||||
public R<LoginUser> getUserByToken() {
|
||||
LoginUser sysUserVo = new LoginUser();
|
||||
sysUserVo = userApplicationService.getUserByToken();
|
||||
return R.ok(sysUserVo, "操作成功");
|
||||
}
|
||||
|
||||
@ApiOperation("根据token获取当前登录人信息")
|
||||
@GetMapping("/getAuthInfoByToken")
|
||||
public R<LoginUser> getAuthInfoByToken() {
|
||||
LoginUser sysUserVo = new LoginUser();
|
||||
sysUserVo = userApplicationService.getAuthInfoByToken();
|
||||
return R.ok(sysUserVo, "操作成功");
|
||||
}
|
||||
|
||||
@ApiOperation("根据用户id获取用户信息")
|
||||
@InnerAuth
|
||||
@PostMapping("/getUserByUserId/{userId}")
|
||||
public R<LoginUser> getUserByUserId(@PathVariable("userId") Long userId) {
|
||||
LoginUser sysUserVo = userApplicationService.getLoginUserByUserId(userId);
|
||||
return R.ok(sysUserVo, "操作成功");
|
||||
}
|
||||
|
||||
@ApiOperation("根据用户登录账号和组织ID获取用户信息")
|
||||
@PostMapping("/getUserByTopOrganizationUserAccount")
|
||||
public R<LoginUser> getUserByTopOrganizationUserAccount(@RequestBody UserDTO userDTO) {
|
||||
UserDO userDO = userAssember.toUserDO(userDTO);
|
||||
LoginUser sysUserVo = userApplicationService.getUserByTopOrganizationUserAccount(userDO);
|
||||
return R.ok(sysUserVo, "操作成功");
|
||||
}
|
||||
|
||||
@ApiOperation("根据用户钉钉用户id获取用户信息")
|
||||
@GetMapping("/getUserByDingUserId")
|
||||
public R<LoginUser> getUserByDingUserId(@RequestParam(value = "dingUserId") String dingUserId) {
|
||||
|
||||
LoginUser sysUserVo = userApplicationService.getUserByDingUserId(dingUserId);
|
||||
return R.ok(sysUserVo, "操作成功");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ApiOperation("根据用户账号和组织账号获取组织用户信息")
|
||||
@PostMapping("/getUserPoByOrganizationAndUserAccount")
|
||||
public R<UserPo> getUserPoByOrganizationAndUserAccount(@RequestBody UserDTO userDTO) {
|
||||
UserDO userDO = userAssember.toUserDO(userDTO);
|
||||
UserPo userPo = userApplicationService.getUserPoByOrganizationAndUserAccount(userDO);
|
||||
return R.ok(userPo, "操作成功");
|
||||
}
|
||||
|
||||
@ApiOperation("根据用户手机号号和组织ID获取用户信息")
|
||||
@PostMapping("/getUserByTopOrganizationUserPhone")
|
||||
public R<LoginUser> getUserByTopOrganizationUserPhone(@RequestBody UserDTO userDTO) {
|
||||
LoginUser sysUserVo = new LoginUser();
|
||||
UserDO userDO = userAssember.toUserDO(userDTO);
|
||||
sysUserVo = userApplicationService.getUserByTopOrganizationUserPhone(userDO);
|
||||
return R.ok(sysUserVo, "操作成功");
|
||||
}
|
||||
|
||||
@Log(title = "用户中台管理-编辑", description ="用户设置权限",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("用户设置权限")
|
||||
@PostMapping("/assignUserMenus")
|
||||
public AjaxResult assignUserMenus(@RequestBody UserMenuDTO userMenuDTO) {
|
||||
UserMenuDo userMenuDo = userMenuAssember.toUserMenuDO(userMenuDTO);
|
||||
return toAjax(userApplicationService.assignUserMenus(userMenuDo));
|
||||
}
|
||||
|
||||
@Log(title = "用户中台管理-编辑", description ="分配用户角色",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("分配用户角色")
|
||||
@PostMapping("/assignUserRoles")
|
||||
public AjaxResult assignUserRoles(@RequestBody UserRoleDTO userRoleDTO) {
|
||||
UserRoleDo userRoleDo = userRoleAssember.toUserRoleDO(userRoleDTO);
|
||||
return toAjax(userApplicationService.assignUserRoles(userRoleDo));
|
||||
}
|
||||
|
||||
@Log(title = "用户中台管理-编辑", description ="批量分配用户角色",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("批量分配用户角色")
|
||||
@PostMapping("/batchAssignUserRoles")
|
||||
public AjaxResult batchAssignUserRoles(@RequestBody List<UserRoleDTO> userRoleDTOList) {
|
||||
List<UserRoleDo> userRoleDoList = userRoleAssember.toUserRoleDOList(userRoleDTOList);
|
||||
return toAjax(userApplicationService.batchAssignUserRoles(userRoleDoList));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @Description 个人证件信息认证
|
||||
* @Author Alex
|
||||
* @Date 2022/12/12 13:46
|
||||
*/
|
||||
@ApiOperation("个人信息认证-实名认证")
|
||||
@PostMapping("/updateUserIdcard")
|
||||
public AjaxResult updateUserIdcard(@RequestBody UserDTO userDTO) {
|
||||
UserDO userDo = new UserDO();
|
||||
BeanUtils.copyProperties(userDTO,userDo);
|
||||
return toAjax(userApplicationService.updateUserIdcard(userDo));
|
||||
}
|
||||
|
||||
@ApiOperation("编辑承运人")
|
||||
@PostMapping("/updateDriver")
|
||||
public AjaxResult updateDriver(@RequestBody UserDriverDTO userDriverDTO) {
|
||||
UserDriverDO userDriverDO = userDriverAssember.toUserDriverDO(userDriverDTO);
|
||||
return toAjax(userDriverApplicationService.updateDriver(userDriverDO));
|
||||
}
|
||||
|
||||
@Log(title = "用户中台管理-查询", description ="查询承运人列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询承运人列表")
|
||||
@GetMapping("/userDriverList")
|
||||
public TableDataInfo userDriverList(UserDriverDTO userDriverDTO) {
|
||||
//转换实体
|
||||
UserDriverDO userDriverDO = userDriverAssember.toUserDriverDO(userDriverDTO);
|
||||
startPage();
|
||||
List<UserDriverListPo> list = userDriverApplicationService.userDriverList(userDriverDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@ApiOperation("新增托运人")
|
||||
@PostMapping("/addShipper")
|
||||
public AjaxResult addShipper(@RequestBody UserShipperDTO userShipperDTO) {
|
||||
UserShipperDO userShipperDO = userShipperAssember.toUserShipperDO(userShipperDTO);
|
||||
return AjaxResult.success(userShipperApplicationService.addShipper(userShipperDO));
|
||||
}
|
||||
|
||||
@ApiOperation("编辑托运人")
|
||||
@PostMapping("/updateShipper")
|
||||
public AjaxResult updateShipper(@RequestBody UserShipperDTO userShipperDTO) {
|
||||
UserShipperDO userShipperDO = userShipperAssember.toUserShipperDO(userShipperDTO);
|
||||
return toAjax(userShipperApplicationService.updateShipper(userShipperDO));
|
||||
}
|
||||
|
||||
@Log(title = "用户中台管理-查询", description ="查询托运人列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询托运人列表")
|
||||
@GetMapping("/userShipperList")
|
||||
public TableDataInfo userShipperList(UserShipperDTO userShipperDTO) {
|
||||
//转换实体
|
||||
UserShipperDO userShipperDO = userShipperAssember.toUserShipperDO(userShipperDTO);
|
||||
startPage();
|
||||
List<UserShipperPo> list = userShipperApplicationService.userShipperList(userShipperDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "用户中台管理", description ="重置密码",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("重置密码")
|
||||
@PostMapping("/resetPassword")
|
||||
public AjaxResult resetPassword(@RequestBody UserDTO userDTO) {
|
||||
//转换实体
|
||||
UserDO userDO = new UserDO();
|
||||
BeanUtils.copyProperties(userDTO,userDO);
|
||||
return toAjax(userApplicationService.resetPassword(userDO));
|
||||
}
|
||||
|
||||
@Log(title = "用户中台管理-编辑", description ="批量设置员工数据权限",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("批量设置员工数据权限")
|
||||
@PostMapping("/batchStaffPermission")
|
||||
public AjaxResult batchStaffPermission(@RequestBody StaffDataPermissionDTO userDataPermissionDTO) {
|
||||
userApplicationService.batchStaffPermission(userDataPermissionDTO);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@ApiOperation("根据用户ID查询数据权限")
|
||||
@GetMapping("/getDataPermissionByUserId/{userId}")
|
||||
public AjaxResult getDataPermissionByUserId(@PathVariable Long userId) {
|
||||
UserDataPermissionPO userDataPermissionPO = userApplicationService.getDataPermissionByUserId(userId);
|
||||
return AjaxResult.success("查询成功!", userDataPermissionPO);
|
||||
}
|
||||
|
||||
@ApiOperation("根据用户ID查询数据权限和关联项目")
|
||||
@GetMapping("/getPermissionByUserId/{userId}")
|
||||
public AjaxResult getPermissionByUserId(@PathVariable Long userId) {
|
||||
ProjectUserPO projectUserPO = userApplicationService.getPermissionByUserId(userId);
|
||||
return AjaxResult.success("查询成功!", projectUserPO);
|
||||
}
|
||||
|
||||
@ApiOperation("根据用户ID查询关联项目")
|
||||
@GetMapping("/getProjectByUserId/{userId}")
|
||||
public R<List<ProjectUserPO>> getProjectByUserId(@PathVariable("userId") Long userId) {
|
||||
List<ProjectUserPO> projectUserList = userApplicationService.getProjectByUserId(userId);
|
||||
return R.ok(projectUserList);
|
||||
}
|
||||
|
||||
@Log(title = "用户中台管理-编辑", description ="批量分配用户数据权限",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("批量分配用户数据权限")
|
||||
@PostMapping("/batchAssignUserDataPermission")
|
||||
public AjaxResult batchAssignUserDataPermission(@RequestBody UserDataPermissionDTO userDataPermissionDTO) {
|
||||
List<UserDataPermissionDO> userDataPermissionDOList = userDataPermissionAssember.toUserDataPermissionDOList(userDataPermissionDTO);
|
||||
return toAjax(userApplicationService.batchAssignUserDataPermission(userDataPermissionDOList));
|
||||
}
|
||||
|
||||
@ApiOperation("查询用户数据权限-集合")
|
||||
@GetMapping("/findUserDataPermissionList")
|
||||
public AjaxResult findUserDataPermissionList(UserDataPermissionQueryDTO userDataPermissionQueryDTO) {
|
||||
UserDataPermissionDO userDataPermissionDO = userDataPermissionAssember.toUserDataPermissionDO(userDataPermissionQueryDTO);
|
||||
return AjaxResult.success(userApplicationService.findUserDataPermissionList(userDataPermissionDO));
|
||||
}
|
||||
|
||||
@ApiOperation("查询用户数据权限-单条")
|
||||
@PostMapping("/findUserDataPermission")
|
||||
public AjaxResult findUserDataPermission(@RequestBody UserDataPermissionQueryDTO userDataPermissionQueryDTO) {
|
||||
UserDataPermissionDO userDataPermissionDO = userDataPermissionAssember.toUserDataPermissionDO(userDataPermissionQueryDTO);
|
||||
return AjaxResult.success(userApplicationService.findUserDataPermission(userDataPermissionDO));
|
||||
}
|
||||
@ApiOperation("查询用户数据权限-包含组织和创建人")
|
||||
@PostMapping("/findDataPermission")
|
||||
public AjaxResult findDataPermission(@RequestBody UserDataPermissionQueryDTO userDataPermissionQueryDTO) {
|
||||
UserDataPermissionDO userDataPermissionDO = userDataPermissionAssember.toUserDataPermissionDO(userDataPermissionQueryDTO);
|
||||
return AjaxResult.success(userApplicationService.findDataPermission(userDataPermissionDO));
|
||||
}
|
||||
|
||||
@Log(title = "用户中台管理-编辑", description ="加入黑名单",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("加入黑名单")
|
||||
@PostMapping("/boundBlacklist")
|
||||
public AjaxResult boundBlacklist(@RequestBody UserDTO userDTO) {
|
||||
UserDO userDO = new UserDO();
|
||||
BeanUtils.copyProperties(userDTO,userDO);
|
||||
return toAjax(userApplicationService.boundBlacklist(userDO));
|
||||
}
|
||||
|
||||
@Log(title = "用户中台管理-编辑", description ="解除黑名单",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("解除黑名单")
|
||||
@PostMapping("/unboundBlacklist")
|
||||
public AjaxResult unboundBlacklist(@RequestBody UserDTO userDTO) {
|
||||
UserDO userDO = new UserDO();
|
||||
BeanUtils.copyProperties(userDTO,userDO);
|
||||
return toAjax(userApplicationService.unboundBlacklist(userDO));
|
||||
}
|
||||
|
||||
@Log(title = "用户中台管理-编辑", description ="分配组织",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("分配组织")
|
||||
@PostMapping("/reboundOrganization")
|
||||
public AjaxResult unboundOrganization(@RequestBody UserDTO userDTO) {
|
||||
UserDO userDO = userAssember.toUserDO(userDTO);
|
||||
return toAjax(userApplicationService.unboundOrganization(userDO));
|
||||
}
|
||||
|
||||
@ApiOperation("获取当前登录人")
|
||||
@PostMapping("/getQueryUserDTO")
|
||||
public AjaxResult getQueryUserDTO(@RequestBody UserDTO userDTO) {
|
||||
UserDO userDO = userAssember.toUserDO(userDTO);
|
||||
return toAjax(userApplicationService.boundBlacklist(userDO));
|
||||
}
|
||||
|
||||
@ApiOperation("人脸认证回调")
|
||||
@GetMapping("/notifyUrl/{userId}")
|
||||
public AjaxResult notifyUrl(@PathVariable("userId") Long userId) {
|
||||
userApplicationService.notifyUrl(userId);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Log(title = "用户中台管理", description ="创建e签宝账号和电子签章",businessType = BusinessType.INSERT)
|
||||
@ApiOperation("创建e签宝账号和电子签章")
|
||||
@GetMapping("/addAccountId/{userId}")
|
||||
public AjaxResult addAccountId(@PathVariable("userId") Long userId) {
|
||||
try {
|
||||
userApplicationService.addAccountId(userId);
|
||||
return AjaxResult.success();
|
||||
} catch (ServiceException e) {
|
||||
e.printStackTrace();
|
||||
System.out.println("e:" + e.getMessage());
|
||||
return AjaxResult.error(500, e.getErrorMessage());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
System.out.println("e:" + e.getMessage());
|
||||
return AjaxResult.error(500, "操作失败" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Log(title = "用户中台管理", description ="注销e签宝签署账户",businessType = BusinessType.DELETE)
|
||||
@ApiOperation("注销e签宝签署账户")
|
||||
@GetMapping("/deleteAccount/{userId}")
|
||||
public AjaxResult deleteAccount(@PathVariable("userId") Long userId) {
|
||||
try {
|
||||
userApplicationService.deleteAccount(userId);
|
||||
return AjaxResult.success();
|
||||
} catch (ServiceException e) {
|
||||
e.printStackTrace();
|
||||
System.out.println("e:" + e.getMessage());
|
||||
return AjaxResult.error(500, e.getErrorMessage());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
System.out.println("e:" + e.getMessage());
|
||||
return AjaxResult.error(500, "操作失败" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Log(title = "用户中台管理-编辑", description ="修改重置支付密码",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("修改重置支付密码")
|
||||
@PostMapping("/editPayPassword")
|
||||
public AjaxResult editPayPassword(@RequestBody UserDTO userDTO) {
|
||||
try {
|
||||
userApplicationService.editPayPassword( userDTO);
|
||||
return AjaxResult.success();
|
||||
} catch (ServiceException e) {
|
||||
e.printStackTrace();
|
||||
System.out.println("e:" + e.getMessage());
|
||||
return AjaxResult.error(500, e.getErrorMessage());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
System.out.println("e:" + e.getMessage());
|
||||
return AjaxResult.error(500, "操作失败" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("根据账号查询用户/托运人/承运人信息")
|
||||
@GetMapping("/getUserInfoByAccounnt")
|
||||
public AjaxResult getUserInfoByAccounnt(UserDTO userDTO) {
|
||||
//转换实体
|
||||
return AjaxResult.success("操作成功",userApplicationService.getUserInfoByAccounnt(userDTO.getUserAccount()));
|
||||
}
|
||||
|
||||
@ApiOperation("根据用户id查询用户角色列表")
|
||||
@GetMapping("/selectRolesByUserId")
|
||||
public AjaxResult selectRolesByUserId(@RequestParam("userId") Long userId) {
|
||||
return AjaxResult.success(userApplicationService.selectRolesByUserId(userId));
|
||||
}
|
||||
|
||||
@Log(title = "用户中台管理-编辑", description ="设置用户头像",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("设置用户头像")
|
||||
@PostMapping("/updateUserAvatar")
|
||||
public AjaxResult updateUserAvatar(@RequestBody UserDTO userDTO) {
|
||||
return AjaxResult.success(userApplicationService.updateUserAvatar(userDTO));
|
||||
}
|
||||
|
||||
/**
|
||||
* 证件到期预警
|
||||
*/
|
||||
@Log(title = "用户中台管理-查询", description ="查询证件到期预警列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("证件到期预警")
|
||||
@GetMapping("/getDocumentWarningList")
|
||||
public TableDataInfo getDocumentWarningList(UserDocumentWarningQueryDTO userDocumentWarningQueryDTO) {
|
||||
startPage();
|
||||
List<UserDocumentWarningQueryPo> list = userApplicationService.getDocumentWarningList(userDocumentWarningQueryDTO);
|
||||
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 证件到期预警数量统计
|
||||
*/
|
||||
@ApiOperation("证件到期预警数量统计")
|
||||
@GetMapping("/getDocumentWarningSum")
|
||||
public AjaxResult getDocumentWarningSum() {
|
||||
return AjaxResult.success(userApplicationService.getDocumentWarningSum());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取承运人、托运人待审核数量
|
||||
*/
|
||||
@ApiOperation("获取承运人、托运人待审核数量")
|
||||
@GetMapping("/getDriverAndShipperWaitingReviewSum")
|
||||
public AjaxResult getDriverAndShipperWaitingReviewSum() {
|
||||
return AjaxResult.success(userApplicationService.getDriverAndShipperWaitingReviewSum(null));
|
||||
}
|
||||
|
||||
@ApiOperation("获取承运人、托运人待审核数量")
|
||||
@PostMapping("/getDriverAndShipperWaitingReviewSum")
|
||||
public AjaxResult getDriverAndShipperWaitingReviewSumByFeign(@RequestBody StatisticalMattersDo statisticalMattersDo) {
|
||||
return AjaxResult.success(userApplicationService.getDriverAndShipperWaitingReviewSum(statisticalMattersDo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 锁定用户
|
||||
* @param userDTO
|
||||
* @return
|
||||
*/
|
||||
@Log(title = "用户中台管理-编辑", description ="锁定用户",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("锁定用户")
|
||||
@PostMapping("/lockUser")
|
||||
public AjaxResult lockUser(@RequestBody UserDTO userDTO) {
|
||||
userApplicationService.lockUser(userDTO);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据用户id注销用户
|
||||
* @return
|
||||
*/
|
||||
@Log(title = "用户中台管理", description ="注销用户",businessType = BusinessType.DELETE)
|
||||
@ApiOperation("根据用户id注销用户")
|
||||
@PostMapping("/logoutUser")
|
||||
public AjaxResult logoutUser() {
|
||||
userApplicationService.logoutUser();
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据角色code获取用户ID
|
||||
*/
|
||||
@ApiOperation("根据角色code获取用户ID")
|
||||
@PostMapping("/getUserIDByRoleCode")
|
||||
public AjaxResult getUserIdByRoleCode(@RequestBody List<String> code) {
|
||||
return AjaxResult.success(userRoleDomainService.getUserIdByRoleCode(code));
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 商城新增用户
|
||||
* @Author Alex
|
||||
* @Date 2022/11/24 11:03
|
||||
*/
|
||||
@ApiOperation("商城新增用户")
|
||||
@PostMapping("/addOrUpdateUserByMall")
|
||||
public R<LoginUser> addOrUpdateUserByMall(@RequestBody UserDTO userDTO) {
|
||||
LoginUser sysUserVo = new LoginUser();
|
||||
UserDO userDO = userAssember.toUserDO(userDTO);
|
||||
UserPo userPo = userApplicationService. addOrUpdateUserByMall(userDO);
|
||||
if (ObjectUtil.isNotNull(userPo)) {
|
||||
sysUserVo.setUserid(userPo.getUserId());
|
||||
}
|
||||
sysUserVo.setUserPo(userPo);
|
||||
return R.ok(sysUserVo, "操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据用户id获取公司名称
|
||||
* @return
|
||||
*/
|
||||
@Log(title = "根据用户id获取公司名称", description ="根据用户id获取公司名称",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("根据用户id注销用户")
|
||||
@GetMapping("/getCompanyNameByUserId/{userId}")
|
||||
public AjaxResult getCompanyNameByUserId(@PathVariable("userId") Long userId) {
|
||||
return AjaxResult.success("获取成功!",userApplicationService.getCompanyNameByUserId(userId));
|
||||
}
|
||||
|
||||
|
||||
@Log(title = "托运人管理-查询全部", description ="查询托运人列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询托运人列表")
|
||||
@GetMapping("/getAllShipper")
|
||||
public TableDataInfo getAllShipper() {
|
||||
List<Map<String,Object>> list = userApplicationService.getAllShipper();
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "承运人管理-查询全部", description ="查询承运人列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询托运人列表")
|
||||
@GetMapping("/getAllDriver")
|
||||
public TableDataInfo getAllDriver() {
|
||||
List<Map<String,Object>> list = userApplicationService.getAllDriver();
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "新增修改货主、供应商、客户", description ="新增货主、供应商、客户",businessType = BusinessType.INSERT)
|
||||
@ApiOperation("新增修改货主、供应商、客户")
|
||||
@PostMapping("/addCustomer")
|
||||
public AjaxResult addCustomer(@Valid @RequestBody CustomerDTO customerDTO) {
|
||||
try {
|
||||
CustomerDO customerDO = new CustomerDO();
|
||||
BeanUtils.copyProperties(customerDTO,customerDO);
|
||||
userApplicationService.addCustomer(customerDO);
|
||||
return AjaxResult.success();
|
||||
} catch (com.mhd.common.core.exception.ServiceException e) {
|
||||
e.printStackTrace();
|
||||
return AjaxResult.error(500, e.getMessage());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return AjaxResult.error(500, "操作失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Log(title = "修改货主、供应商、客户", description ="修改货主、供应商、客户",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("修改货主、供应商、客户")
|
||||
@PostMapping("/updateCustomer")
|
||||
public AjaxResult updateCustomer(@Valid @RequestBody CustomerDTO customerDTO) {
|
||||
try {
|
||||
CustomerDO customerDO = new CustomerDO();
|
||||
BeanUtils.copyProperties(customerDTO,customerDO);
|
||||
userApplicationService.updateCustomer(customerDO);
|
||||
return AjaxResult.success();
|
||||
} catch (com.mhd.common.core.exception.ServiceException e) {
|
||||
e.printStackTrace();
|
||||
return AjaxResult.error(500, e.getMessage());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return AjaxResult.error(500, "操作失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Log(title = "作废货主、供应商、客户", description ="作废货主、供应商、客户",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("作废货主、供应商、客户")
|
||||
@PostMapping("/nullifyCustomer")
|
||||
public AjaxResult nullifyCustomer(@RequestBody List<Long> userIds) {
|
||||
return toAjax(userApplicationService.nullifyCustomerList(userIds));
|
||||
}
|
||||
@Log(title="用户中台",description = "查询所有货主的地址信息 姓名 手机")
|
||||
@ApiOperation(value = "查询所有货主的地址信息 姓名 手机", notes = "查询所有货主的地址信息 姓名 手机")
|
||||
@GetMapping(value = "/findAllShipperInfo")
|
||||
public R<List<QueryAllShipperInfoVo>> findAllShipperInfo() {
|
||||
List<QueryAllShipperInfoVo> pageList = userApplicationService.findAllShipperInfo();
|
||||
return R.ok(pageList);
|
||||
}
|
||||
|
||||
@Log(title = "用户中台管理-编辑", description ="修改指定用户的hasDefaultAddress字段",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("修改指定用户的hasDefaultAddress字段")
|
||||
@PutMapping("/updateHasDefaultAddress")
|
||||
public R<Void> updateHasDefaultAddress(@RequestBody UpdateHasDefaultAddressDTO dto) {
|
||||
userApplicationService.updateHasDefaultAddress(dto);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
@Log(title = "根据获取userId货主公司名称", description ="根据获取userId货主公司名称",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("根据获取userId货主公司名称")
|
||||
@GetMapping("/userName/{userId}")
|
||||
public R<String> finShipperEnterpriseNamedByUserId(@PathVariable("userId") Long userId) {
|
||||
return R.ok(userApplicationService.finShipperEnterpriseNamedByUserId(userId));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
package com.mhd.user.interfaces.facade;
|
||||
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import com.mhd.common.core.domain.entity.R;
|
||||
import com.mhd.user.application.service.UserAddressApplicationService;
|
||||
import com.mhd.user.domain.userAggregate.repository.po.UserAddressPO;
|
||||
import com.mhd.user.domain.userAggregate.repository.todo.UserAddressDO;
|
||||
import com.mhd.user.interfaces.assember.UserAddressAssembler;
|
||||
import com.mhd.user.interfaces.dto.UserAddressDTO;
|
||||
import com.mhd.user.interfaces.dto.addDTO.UserAddressAddDTO;
|
||||
import com.mhd.user.interfaces.dto.updateDTO.UserAddressUpdateDTO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/user/address")
|
||||
@Api(tags = "用户地址管理")
|
||||
@RequiredArgsConstructor
|
||||
public class UserAddressApi extends BaseController {
|
||||
|
||||
private final UserAddressApplicationService userAddressApplicationService;
|
||||
|
||||
/**
|
||||
* 根据用户ID获取地址列表
|
||||
*/
|
||||
@GetMapping("/list/{userId}")
|
||||
@ApiOperation("根据用户ID获取地址列表")
|
||||
public R<List<UserAddressDTO>> getUserAddressList(
|
||||
@ApiParam("用户ID") @PathVariable("userId") Long userId) {
|
||||
List<UserAddressPO> addressPOList = userAddressApplicationService.getUserAddressList(userId);
|
||||
List<UserAddressDTO> addressDTOList = UserAddressAssembler.toDTOList(addressPOList);
|
||||
return R.ok(addressDTOList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据用户ID获取地址信息(用于订单创建)
|
||||
* 返回默认地址或第一个地址
|
||||
*/
|
||||
@GetMapping("/order/{userId}")
|
||||
@ApiOperation("根据用户ID获取默认地址信息如果没有默认地址将获取第一个地址")
|
||||
public R<UserAddressDTO> getAddressForOrder(
|
||||
@ApiParam("用户ID") @PathVariable("userId") Long userId) {
|
||||
UserAddressPO addressPO = userAddressApplicationService.getAddressForOrder(userId);
|
||||
UserAddressDTO addressDTO = UserAddressAssembler.toDTO(addressPO);
|
||||
return R.ok(addressDTO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户地址
|
||||
*/
|
||||
@PostMapping
|
||||
@ApiOperation("新增用户地址")
|
||||
public R<String> addUserAddress(@Validated @RequestBody UserAddressAddDTO addDTO) {
|
||||
UserAddressDO userAddressDO = UserAddressAssembler.toAddDO(addDTO);
|
||||
Boolean result = userAddressApplicationService.addUserAddress(userAddressDO);
|
||||
return result ? R.ok() : R.fail("新增失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户地址
|
||||
*/
|
||||
@PutMapping
|
||||
@ApiOperation("修改用户地址")
|
||||
public R<String> updateUserAddress(@Validated @RequestBody UserAddressUpdateDTO updateDTO) {
|
||||
UserAddressDO userAddressDO = UserAddressAssembler.toUpdateDO(updateDTO);
|
||||
Boolean result = userAddressApplicationService.updateUserAddress(userAddressDO);
|
||||
return result ? R.ok("修改成功") : R.fail("修改失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户地址
|
||||
*/
|
||||
@DeleteMapping("/{ids}")
|
||||
@ApiOperation("删除用户地址")
|
||||
public R<String> deleteUserAddress(
|
||||
@ApiParam("地址ID数组") @PathVariable Long[] ids) {
|
||||
Boolean result = userAddressApplicationService.deleteUserAddress(ids);
|
||||
return result ? R.ok("删除成功") : R.fail("删除失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置默认地址
|
||||
*/
|
||||
@PutMapping("/default/{userId}/{addressId}")
|
||||
@ApiOperation("设置默认地址")
|
||||
public R<String> setDefaultAddress(
|
||||
@ApiParam("用户ID") @PathVariable("userId") Long userId,
|
||||
@ApiParam("地址ID") @PathVariable("addressId") Long addressId) {
|
||||
try {
|
||||
Boolean result = userAddressApplicationService.setDefaultAddress(userId, addressId);
|
||||
return result ? R.ok("设置成功") : R.fail("设置失败");
|
||||
} catch (RuntimeException e) {
|
||||
return R.fail(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取地址详情
|
||||
*/
|
||||
@GetMapping("/{addressId}")
|
||||
@ApiOperation("获取地址详情")
|
||||
public R<UserAddressDTO> getAddressInfo(
|
||||
@ApiParam("地址ID") @PathVariable("addressId") Long addressId) {
|
||||
UserAddressPO addressPO = userAddressApplicationService.getAddressInfo(addressId);
|
||||
UserAddressDTO addressDTO = UserAddressAssembler.toDTO(addressPO);
|
||||
return R.ok(addressDTO);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,389 @@
|
||||
package com.mhd.user.interfaces.facade;
|
||||
|
||||
import com.mhd.common.core.domain.entity.R;
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
|
||||
import com.mhd.common.log.annotation.Log;
|
||||
import com.mhd.common.log.enums.BusinessType;
|
||||
import com.mhd.user.application.service.*;
|
||||
import com.mhd.user.domain.userAggregate.entity.DriverExcel;
|
||||
import com.mhd.user.domain.userAggregate.repository.po.DriverVehicleBindPo;
|
||||
import com.mhd.user.domain.userAggregate.repository.todo.*;
|
||||
import com.mhd.user.interfaces.assember.*;
|
||||
import com.mhd.user.interfaces.dto.DriverExcelDto;
|
||||
import com.mhd.user.interfaces.dto.DriverVehicleBindDto;
|
||||
import com.mhd.user.interfaces.dto.addDTO.*;
|
||||
import com.mhd.common.core.domain.po.UserDriverListPo;
|
||||
import com.mhd.user.domain.userAggregate.repository.po.UserDriverPo;
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.core.web.page.TableDataInfo;
|
||||
import com.mhd.common.security.service.TokenService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Api(tags = "用户中台管理-承运人管理")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/userDriverApi")
|
||||
@CrossOrigin
|
||||
public class UserDriverAPI extends BaseController {
|
||||
|
||||
@Resource
|
||||
private UserDriverApplicationService userDriverApplicationService;
|
||||
@Resource
|
||||
private UserDriverEnterpriseApplicationService userDriverEnterpriseApplicationService;
|
||||
@Resource
|
||||
private MotorcadeApplicationService motorcadeApplicationService;
|
||||
@Resource
|
||||
private DriverVehicleBindApplicationService driverVehicleBindApplicationService;
|
||||
@Resource
|
||||
private UserDriverAssember userDriverAssember;
|
||||
@Resource
|
||||
private TokenService tokenService;
|
||||
@Autowired
|
||||
private UserApplicationService userApplicationService;
|
||||
|
||||
|
||||
@Log(title = "承运人管理-编辑", description ="编辑承运人",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("编辑承运人")
|
||||
@PostMapping("/updateDriver")
|
||||
public AjaxResult updateDriver(@RequestBody UserDriverDTO userDriverDTO) {
|
||||
UserDriverDO userDriverDO = userDriverAssember.toUserDriverDO(userDriverDTO);
|
||||
return toAjax(userDriverApplicationService.updateDriver(userDriverDO));
|
||||
}
|
||||
|
||||
@ApiOperation("查询承运人详情")
|
||||
@GetMapping("/getDriverInfo/{driverId}")
|
||||
public AjaxResult getDriverInfo(@PathVariable Long driverId) {
|
||||
return AjaxResult.success(userDriverApplicationService.getDriverInfo(driverId));
|
||||
}
|
||||
|
||||
@ApiOperation("查询承运人管理列表数据")
|
||||
@GetMapping("/getDriverDataByUserId/{userId}")
|
||||
public AjaxResult getDriverDataByUserId(@PathVariable Long userId) {
|
||||
return AjaxResult.success(userDriverApplicationService.getDriverDataByUserId(userId));
|
||||
}
|
||||
|
||||
@ApiOperation("查询承运人汇总数据")
|
||||
@GetMapping("/getDriverSummaryData/{userId}")
|
||||
public AjaxResult<?> getDriverSummaryData(@PathVariable Long userId) {
|
||||
return AjaxResult.success(userDriverApplicationService.getDriverSummaryData(userId));
|
||||
}
|
||||
|
||||
@ApiOperation("查询承运人详情 - 手机")
|
||||
@GetMapping("/getDriverInfoByOpen")
|
||||
public AjaxResult<?> getDriverInfoByOpen(@RequestParam("phone") String phone, @RequestParam(value = "driverEnterpriseCode", required = false) String driverEnterpriseCode) {
|
||||
return AjaxResult.success(userDriverApplicationService.getDriverInfoByOpen(phone, driverEnterpriseCode));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("查询承运企业详情 - 企业编码")
|
||||
@GetMapping("/getDriverEnterpriseInfoByOpen")
|
||||
public AjaxResult<?> getDriverEnterpriseInfoByOpen(@RequestParam(value = "driverEnterpriseCode") String driverEnterpriseCode) {
|
||||
return AjaxResult.success(userDriverEnterpriseApplicationService.getDriverEnterpriseInfoByOpen(driverEnterpriseCode));
|
||||
}
|
||||
|
||||
@Log(title = "承运人管理-查询", description ="查询承运人管理列表数据",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询承运人列表")
|
||||
@GetMapping("/userDriverList")
|
||||
public TableDataInfo userDriverList(UserDriverDTO userDriverDTO) {
|
||||
//转换实体
|
||||
UserDriverDO userDriverDO = userDriverAssember.toUserDriverDO(userDriverDTO);
|
||||
List<UserDriverListPo> list = userDriverApplicationService.userDriverList(userDriverDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@ApiOperation("查询承运人列表统计表单")
|
||||
@GetMapping("/userDriverCount")
|
||||
public AjaxResult userDriverCount(UserDriverDTO userDriverDTO) {
|
||||
UserDriverDO userDriverDO = userDriverAssember.toUserDriverDO(userDriverDTO);
|
||||
return AjaxResult.success(userDriverApplicationService.userDriverCount(userDriverDO));
|
||||
}
|
||||
|
||||
@Log(title = "承运人管理-查询", description ="配载页面查询承运人司机列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("配载页面查询承运人司机列表")
|
||||
@GetMapping("/getStowageUserDriverList")
|
||||
public AjaxResult getStowageUserDriverList(UserDriverDTO userDriverDTO) {
|
||||
//转换实体
|
||||
UserDriverDO userDriverDO = userDriverAssember.toUserDriverDO(userDriverDTO);
|
||||
List<UserDriverPo> list = userDriverApplicationService.selectStowageUserDriverList(userDriverDO);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@Log(title = "承运人管理-承运人绑定车辆", description ="承运人绑定车辆",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("承运人绑定车辆")
|
||||
@PostMapping("/bindVehicle")
|
||||
public AjaxResult bindVehicle(@RequestBody UserDriverDTO userDriverDTO) {
|
||||
UserDriverDO userDriverDO = userDriverAssember.toUserDriverDO(userDriverDTO);
|
||||
return toAjax(userDriverApplicationService.bindVehicle(userDriverDO));
|
||||
}
|
||||
|
||||
@Log(title = "承运人管理-个体承运人新增绑定车辆", description ="个体承运人新增绑定车辆",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("个体承运人新增绑定车辆")
|
||||
@PostMapping("/bindVehicle1")
|
||||
public AjaxResult bindVehicle1(@RequestBody UserDriverDTO userDriverDTO) {
|
||||
UserDriverDO userDriverDO = userDriverAssember.toUserDriverDO(userDriverDTO);
|
||||
return toAjax(userDriverApplicationService.bindVehicle1(userDriverDO));
|
||||
}
|
||||
|
||||
@Log(title = "承运人管理-承运人新增绑定车辆-车辆模块使用", description ="个体承运人新增绑定车辆",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("个体承运人新增绑定车辆-车辆模块使用")
|
||||
@PostMapping("/bindVehicleForTransportApp")
|
||||
public AjaxResult<?> bindVehicleForTransportApp(@RequestBody UserDriverDTO userDriverDTO) {
|
||||
UserDriverDO userDriverDO = userDriverAssember.toUserDriverDO(userDriverDTO);
|
||||
return toAjax(userDriverApplicationService.bindVehicleForTransportApp(userDriverDO));
|
||||
}
|
||||
|
||||
@Log(title = "承运人管理-认证成功查询绑定关系并同步网货", description ="认证成功查询绑定关系并同步网货",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("认证成功查询绑定关系并同步网货")
|
||||
@GetMapping("/bindVehicleForWlhy")
|
||||
public AjaxResult bindVehicle1(@RequestParam("vehicleId") Long vehicleId) {
|
||||
return toAjax(userDriverApplicationService.bindVehicleForWlhy(vehicleId));
|
||||
}
|
||||
|
||||
@Log(title = "承运人管理-编辑", description ="承运人解绑车辆",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("承运人解绑车辆")
|
||||
@PostMapping("/unbindVehicle")
|
||||
public AjaxResult unbindVehicle(@RequestBody UserDriverDTO userDriverDTO) {
|
||||
UserDriverDO userDriverDO = userDriverAssember.toUserDriverDO(userDriverDTO);
|
||||
return toAjax(userDriverApplicationService.unbindVehicle(userDriverDO));
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 删除承运人,根据用户ID
|
||||
* @Author Alex
|
||||
* @Date 2022/12/10 15:21
|
||||
*/
|
||||
@DeleteMapping("/removeByIds/{ids}")
|
||||
public AjaxResult removeByIds(@PathVariable List<Long> ids) {
|
||||
return toAjax(userApplicationService.deleteDriverByUserIds(ids));
|
||||
}
|
||||
|
||||
@Log(title = "承运人管理-编辑", description ="审核承运人",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("审核承运人")
|
||||
@PostMapping("/authDriver")
|
||||
public AjaxResult authDriver(@RequestBody UserDriverDTO userDriverDTO) {
|
||||
UserDriverDO userDriverDO = userDriverAssember.toUserDriverDO(userDriverDTO);
|
||||
return toAjax(userDriverApplicationService.authDriver(userDriverDO));
|
||||
}
|
||||
|
||||
@Log(title = "承运人管理-编辑", description ="新增车辆绑定关系",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("新增车辆绑定关系")
|
||||
@PostMapping("/saveBindVehicle")
|
||||
public AjaxResult saveBindVehicle(@RequestBody DriverVehicleBindDto driverVehicleBindDto) {
|
||||
DriverVehicleBindDo driverVehicleBindDo = new DriverVehicleBindAssembler().toDo(driverVehicleBindDto);
|
||||
return toAjax(driverVehicleBindApplicationService.saveOrUpdate(driverVehicleBindDo));
|
||||
}
|
||||
|
||||
@ApiOperation("查询承运人详情")
|
||||
@GetMapping("/getDriverInfoByUserId/{userId}")
|
||||
public AjaxResult getDriverInfoByUserId(@PathVariable Long userId) {
|
||||
return AjaxResult.success(userDriverApplicationService.getDriverInfoByUserId(userId));
|
||||
}
|
||||
|
||||
@Log(title = "承运人管理-编辑", description ="查询绑定车辆列表",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("查询绑定车辆列表")
|
||||
@GetMapping("/queryBindCarList")
|
||||
public TableDataInfo queryBindCarList(DriverVehicleBindDto driverVehicleBindDto) {
|
||||
//转换实体
|
||||
DriverVehicleBindDo driverVehicleBindDo = new DriverVehicleBindAssembler().toDo(driverVehicleBindDto);
|
||||
startPage();
|
||||
List<DriverVehicleBindPo> list = driverVehicleBindApplicationService.queryBindCarList(driverVehicleBindDo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@ApiOperation("根据司机id查询绑定车辆的用户信息")
|
||||
@GetMapping("/selectUserBindByVehicleId/{vehicleId}")
|
||||
public Map<String,String> selectUserBindByVehicleId(Long vehicleId) {
|
||||
return driverVehicleBindApplicationService.selectUserBindByVehicleId(vehicleId);
|
||||
}
|
||||
|
||||
@ApiOperation("承运人认证-承运人认证")
|
||||
@PostMapping("/userDriverAuth")
|
||||
public AjaxResult userDriverAuth(@RequestBody UserDriverDTO userDriverDTO) {
|
||||
UserDriverDO userDriverDO = new UserDriverDO();
|
||||
BeanUtils.copyProperties(userDriverDTO,userDriverDO);
|
||||
return AjaxResult.success(userDriverApplicationService.driverAuth(userDriverDO));
|
||||
}
|
||||
|
||||
@ApiOperation("承运人认证-车队长认证")
|
||||
@PostMapping("/userCaptainAuth")
|
||||
public AjaxResult userCaptainAuth(@RequestBody UserDriverEnterpriseDto userDriverEnterpriseDto) {
|
||||
// UserDriverEnterpriseDo userDriverEnterpriseDo = new UserDriverEnterpriseAssembler().toDo(userDriverEnterpriseDto);
|
||||
UserDriverEnterpriseDo userDriverEnterpriseDo = new UserDriverEnterpriseDo();
|
||||
BeanUtils.copyProperties(userDriverEnterpriseDto,userDriverEnterpriseDo);
|
||||
return AjaxResult.success(userDriverEnterpriseApplicationService.captainAuth(userDriverEnterpriseDo));
|
||||
}
|
||||
|
||||
@ApiOperation("承运人认证-运输企业认证")
|
||||
@PostMapping("/userEnterpriseAuth")
|
||||
public AjaxResult userEnterpriseAuth(@RequestBody UserDriverEnterpriseDto userDriverEnterpriseDto) {
|
||||
// UserDriverEnterpriseDo userDriverEnterpriseDo = new UserDriverEnterpriseAssembler().toDo(userDriverEnterpriseDto);
|
||||
UserDriverEnterpriseDo userDriverEnterpriseDo = new UserDriverEnterpriseDo();
|
||||
BeanUtils.copyProperties(userDriverEnterpriseDto,userDriverEnterpriseDo);
|
||||
return AjaxResult.success(userDriverEnterpriseApplicationService.companyAuth(userDriverEnterpriseDo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 车辆认证-承运人查询
|
||||
* @return
|
||||
*/
|
||||
@Log(title = "承运人管理-查询", description ="车辆认证-承运人查询",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("车辆认证-承运人查询")
|
||||
@GetMapping("/userDriverAuthList")
|
||||
public AjaxResult userDriverAuthList() {
|
||||
return AjaxResult.success(userDriverApplicationService.userDriverAuthList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 车辆导入-承运人查询
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("车辆导入-承运人查询")
|
||||
@GetMapping("/userDriverImportList")
|
||||
public AjaxResult userDriverImportList() {
|
||||
return AjaxResult.success(userDriverApplicationService.userDriverImportList());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 车队认证-车队长查询
|
||||
*/
|
||||
@Log(title = "承运人管理-查询", description ="车队认证-车队长查询",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("车队认证-车队长查询")
|
||||
@GetMapping("/motorcadeAuthCaptainList")
|
||||
public AjaxResult motorcadeAuthCaptainList() {
|
||||
return AjaxResult.success(userDriverApplicationService.motorcadeAuthCaptainList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 责任司机绑定-司机查询
|
||||
*/
|
||||
@Log(title = "承运人管理-查询", description ="责任司机绑定-司机查询",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("责任司机绑定-司机查询")
|
||||
@GetMapping("/getRegionDriverList")
|
||||
public TableDataInfo getRegionDriverList(UserDriverDTO userDriverDTO) {
|
||||
//转换实体
|
||||
UserDriverDO userDriverDO = userDriverAssember.toUserDriverDO(userDriverDTO);
|
||||
//是否分页
|
||||
startPage();
|
||||
List<UserDriverPo> list = userDriverApplicationService.getRegionDriverList(userDriverDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 责任司机绑定-根据用户ID查询司机详情
|
||||
*/
|
||||
@ApiOperation("责任司机绑定-根据用户ID查询司机详情")
|
||||
@PostMapping("/getRegionDriverListByUserIds")
|
||||
public AjaxResult getRegionDriverListByUserIds(@RequestBody UserDriverDTO userDriverDTO) {
|
||||
return AjaxResult.success(userDriverApplicationService.getRegionDriverListByUserIds(userDriverDTO));
|
||||
}
|
||||
|
||||
@ApiOperation("根据用户id查询车队信息")
|
||||
@GetMapping("/getCaptainInfoByUserId")
|
||||
public AjaxResult getCaptainInfoByUserId(@RequestParam("userId") Long userId) {
|
||||
return AjaxResult.success(userDriverEnterpriseApplicationService.getCaptainInfoByUserId(userId));
|
||||
}
|
||||
|
||||
@ApiOperation("根据用户id查询企业信息")
|
||||
@GetMapping("/getEnterpriseByUserId")
|
||||
public AjaxResult getEnterpriseByUserId(@RequestParam("userId") Long userId) {
|
||||
return AjaxResult.success(userDriverEnterpriseApplicationService.getEnterpriseByUserId(userId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取司机校验相应值
|
||||
*/
|
||||
@ApiOperation("获取司机校验相应值")
|
||||
@GetMapping("/getDriverCheckValue")
|
||||
public AjaxResult getDriverCheckValue(@RequestParam("userId") Long userId) {
|
||||
return AjaxResult.success(userDriverApplicationService.getDriverCheckValue(userId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 承运人导入解析数据
|
||||
* @param multipartFile
|
||||
* @return
|
||||
*/
|
||||
@Log(title = "承运人管理", description ="解析excel数据",businessType = BusinessType.INQUIRE)
|
||||
@ApiModelProperty("解析excel数据")
|
||||
@PostMapping("/parseExcelData")
|
||||
public R<List<DriverExcel>> parseExcelData(MultipartFile multipartFile){
|
||||
return R.ok(userDriverApplicationService.parseExcelData(multipartFile));
|
||||
}
|
||||
|
||||
/**
|
||||
* 承运人导入
|
||||
* @param driverExcelDtoList
|
||||
* @return
|
||||
*/
|
||||
@Log(title = "承运人管理-导入", description ="承运人导入",businessType = BusinessType.IMPORT)
|
||||
@ApiOperation("承运人导入")
|
||||
@PostMapping("/importDriver")
|
||||
public R<?> importVehicle(@RequestBody List<DriverExcelDto> driverExcelDtoList)
|
||||
{
|
||||
try {
|
||||
userDriverApplicationService.importDriver(driverExcelDtoList);
|
||||
return R.ok("导入成功");
|
||||
} catch (ServiceException | DigitalLogisticsException ser) {
|
||||
log.error("导入失败 TicketEnterpriseApi importEnterprise ServiceException ",ser);
|
||||
return R.fail(ser.getMessage());
|
||||
} catch (Exception e) {
|
||||
log.error("导入失败 TicketEnterpriseApi importEnterprise Exception ",e);
|
||||
return R.fail("导入失败,未知异常" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 承运人网货业务设置
|
||||
* @param userDTO
|
||||
* @return
|
||||
*/
|
||||
@Log(title = "承运人管理-编辑", description ="承运人网货业务设置",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("承运人网货业务设置")
|
||||
@PostMapping("/updateDriverBusiness")
|
||||
public AjaxResult updateDriverBusiness(@RequestBody UserDTO userDTO) {
|
||||
userDriverApplicationService.updateDriverBusiness(userDTO);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据userId查询托运人信息
|
||||
*/
|
||||
@Log(title = "根据userId查询托运人信息", description ="根据userId查询托运人信息",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("根据userId查询托运人信息")
|
||||
@PostMapping("/getInfoByUserId")
|
||||
public AjaxResult getInfoByUserId(@RequestBody UserDTO userDTO) {
|
||||
return AjaxResult.success(userDriverApplicationService.getInfoByUserId(userDTO));
|
||||
}
|
||||
|
||||
@Log(title = "承运人管理-查询承运人管理列表全部", description ="查询承运人管理列表全部",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询承运人管理列表全部")
|
||||
@GetMapping("/userDriverListAll")
|
||||
public AjaxResult userDriverListAll(UserDriverDTO userDriverDTO) {
|
||||
//转换实体
|
||||
UserDriverDO userDriverDO = userDriverAssember.toUserDriverDO(userDriverDTO);
|
||||
List<UserDriverListPo> list = userDriverApplicationService.userDriverListAll(userDriverDO);
|
||||
return AjaxResult.success("操作成功",list);
|
||||
}
|
||||
|
||||
@ApiOperation("独立司机绑定默认车队同步")
|
||||
@GetMapping("/aloneUserDriverAuth/{userId}")
|
||||
public AjaxResult aloneUserDriverAuth(@PathVariable("userId") Long userId) {
|
||||
String driverEnterpriseCode = userDriverApplicationService.aloneUserDriverAuth(userId);
|
||||
return AjaxResult.success("操作成功", driverEnterpriseCode);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,202 @@
|
||||
package com.mhd.user.interfaces.facade;
|
||||
|
||||
import com.mhd.common.core.domain.entity.R;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.log.annotation.Log;
|
||||
import com.mhd.common.log.enums.BusinessType;
|
||||
import com.mhd.user.application.service.UserApplicationService;
|
||||
import com.mhd.user.application.service.UserShipperApplicationService;
|
||||
import com.mhd.user.domain.userAggregate.repository.todo.*;
|
||||
import com.mhd.user.interfaces.assember.*;
|
||||
import com.mhd.user.interfaces.dto.addDTO.*;
|
||||
import com.mhd.user.domain.userAggregate.repository.po.UserShipperPo;
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.core.web.page.TableDataInfo;
|
||||
import com.mhd.common.security.annotation.RepeatSubmit;
|
||||
import com.mhd.common.security.service.TokenService;
|
||||
import com.mhd.user.interfaces.dto.updateDTO.SettlementInfoUpdateDTO;
|
||||
import com.mhd.user.interfaces.vo.SettlementInfoQueryVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Api(tags = "用户中台管理-托运人管理")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/userShipperApi")
|
||||
@CrossOrigin
|
||||
public class UserShipperAPI extends BaseController {
|
||||
|
||||
@Resource
|
||||
private UserShipperApplicationService userShipperApplicationService;
|
||||
@Resource
|
||||
private UserApplicationService userApplicationService;
|
||||
@Resource
|
||||
private UserShipperAssember userShipperAssember;
|
||||
|
||||
@Resource
|
||||
private TokenService tokenService;
|
||||
|
||||
/**
|
||||
* @Description 批量删除托运人,根据userId删除
|
||||
* @Author Alex
|
||||
* @Date 2022/11/24 11:05
|
||||
*/
|
||||
@Log(title = "托运人管理-删除", description ="批量删除托运人",businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/removeByIds/{ids}")
|
||||
public AjaxResult removeByIds(@PathVariable List<Long> ids) {
|
||||
return toAjax(userApplicationService.deleteShipperByUserIds(ids));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @Description 托运人认证
|
||||
* @param userShipperDTO
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("新增托运人")
|
||||
@PostMapping("/addShipper")
|
||||
@RepeatSubmit
|
||||
public AjaxResult addShipper(@RequestBody UserShipperDTO userShipperDTO) {
|
||||
UserShipperDO userShipperDO = userShipperAssember.toUserShipperDO(userShipperDTO);
|
||||
return AjaxResult.success(userShipperApplicationService.addShipper(userShipperDO));
|
||||
}
|
||||
|
||||
@ApiOperation("编辑托运人")
|
||||
@PostMapping("/updateShipper")
|
||||
public AjaxResult updateShipper(@RequestBody UserShipperDTO userShipperDTO) {
|
||||
UserShipperDO userShipperDO = userShipperAssember.toUserShipperDO(userShipperDTO);
|
||||
return toAjax(userShipperApplicationService.updateShipper(userShipperDO));
|
||||
}
|
||||
|
||||
@Log(title = "托运人管理-审核", description ="审核托运人",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("审核托运人")
|
||||
@PostMapping("/authShipper")
|
||||
public AjaxResult authShipper(@RequestBody UserShipperDTO userShipperDTO) {
|
||||
UserShipperDO userShipperDO = userShipperAssember.toUserShipperDO(userShipperDTO);
|
||||
return toAjax(userShipperApplicationService.authShipper(userShipperDO));
|
||||
}
|
||||
|
||||
@Log(title = "托运人管理-查询", description ="查询托运人列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询托运人列表")
|
||||
@GetMapping("/userShipperList")
|
||||
public TableDataInfo userShipperList(UserShipperDTO userShipperDTO) {
|
||||
//转换实体
|
||||
UserShipperDO userShipperDO = userShipperAssember.toUserShipperDO(userShipperDTO);
|
||||
startPage();
|
||||
List<UserShipperPo> list = userShipperApplicationService.userShipperList(userShipperDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("查询托运人列表统计表单")
|
||||
@GetMapping("/userShipperCount")
|
||||
public AjaxResult userShipperCount(UserShipperDTO userShipperDTO) {
|
||||
//转换实体
|
||||
UserShipperDO userShipperDO = userShipperAssember.toUserShipperDO(userShipperDTO);
|
||||
return AjaxResult.success(userShipperApplicationService.userShipperCount(userShipperDO));
|
||||
}
|
||||
|
||||
@ApiOperation("托运人认证-个人信息认证")
|
||||
@PostMapping("/updateShipperUser")
|
||||
public AjaxResult updateShipperUser(@RequestBody UserShipperDTO userShipperDTO) {
|
||||
UserShipperDO userShipperDO = userShipperAssember.toUserShipperDO(userShipperDTO);
|
||||
return toAjax(userShipperApplicationService.updateShipperUser(userShipperDO));
|
||||
}
|
||||
|
||||
@ApiOperation("托运人认证-企业信息认证")
|
||||
@PostMapping("/updateShipperEnterprise")
|
||||
@Log(title = "托运人管理-企业信息认证", description ="企业信息认证",businessType = BusinessType.UPDATE)
|
||||
public AjaxResult updateShipperEnterprise(@RequestBody UserShipperDTO userShipperDTO) {
|
||||
try {
|
||||
UserShipperDO userShipperDO = userShipperAssember.toUserShipperDO(userShipperDTO);
|
||||
String url = userShipperApplicationService.updateShipperEnterprise(userShipperDO);
|
||||
return AjaxResult.success("操作成功", url);
|
||||
}catch (Exception e){
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("托运人认证-获取e签宝跨企业授权链接")
|
||||
@PostMapping("/getSealAuthUrl")
|
||||
public AjaxResult getSealAuthUrl(@RequestBody UserShipperDTO userShipperDTO) {
|
||||
try {
|
||||
userShipperApplicationService.getSealAuthUrl(userShipperDTO);
|
||||
return AjaxResult.success("操作成功");
|
||||
}catch (Exception e){
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Log(title = "托运人管理-编辑", description ="托运人认证-设置托运人类别",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("托运人认证-设置托运人类别 1-普通客户 2-月结客户")
|
||||
@PostMapping("/setShipperCategory")
|
||||
public AjaxResult setShipperCategory(@RequestBody UserShipperDTO userShipperDTO) {
|
||||
UserShipperDO userShipperDO = userShipperAssember.toUserShipperDO(userShipperDTO);
|
||||
return toAjax(userShipperApplicationService.setShipperCategory(userShipperDO));
|
||||
}
|
||||
|
||||
@Log(title = "托运人管理-编辑", description ="托运人修改-设置托运人月结状态",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("托运人修改-设置托运人月结状态 1-是 2-否")
|
||||
@PostMapping("/updateMonthlySettlementFlag")
|
||||
public AjaxResult updateMonthlySettlementFlag(@RequestBody UserShipperDTO userShipperDTO) {
|
||||
|
||||
UserShipperDO userShipperDO = new UserShipperDO();
|
||||
BeanUtils.copyProperties(userShipperDTO, userShipperDO);
|
||||
return toAjax(userShipperApplicationService.updateMonthlySettlementFlag(userShipperDO));
|
||||
}
|
||||
|
||||
/**
|
||||
* 托运人货源审核配置
|
||||
* @param userShipperDTO
|
||||
* @return
|
||||
*/
|
||||
@Log(title = "托运人管理-编辑", description ="托运人货源审核配置",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("托运人货源审核配置")
|
||||
@PostMapping("/updateShipperAuditOrder")
|
||||
public AjaxResult updateShipperAuditOrder(@RequestBody UserShipperDTO userShipperDTO) {
|
||||
UserShipperDO userShipperDO = new UserShipperDO();
|
||||
BeanUtils.copyProperties(userShipperDTO, userShipperDO);
|
||||
userShipperApplicationService.updateShipperAuditOrder(userShipperDO);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
||||
@Log(title = "托运人管理-查询租户下所有托运人", description ="查询租户下所有托运人",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询租户下所有托运人")
|
||||
@GetMapping("/userShipperListAll")
|
||||
public AjaxResult userShipperListAll() {
|
||||
//转换实体
|
||||
List<UserShipperPo> list = userShipperApplicationService.userShipperListAll();
|
||||
return AjaxResult.success("操作成功",list);
|
||||
}
|
||||
|
||||
@Log(title = "托运人管理-修改授权额度 结算天数 使用额度", description ="修改授权额度 结算天数 使用额度",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("修改授权额度和结算天数")
|
||||
@PutMapping("/settlementInfo")
|
||||
public R<Void> updateSettlementInfo(@RequestBody SettlementInfoUpdateDTO dto) {
|
||||
return userShipperApplicationService.updateSettlementInfo(dto) ? R.ok() : R.fail();
|
||||
}
|
||||
|
||||
@Log(title = "托运人管理-查询", description ="根据shipperId查询 授权额度 结算天数 使用额度",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("根据shipperId查询 授权额度 结算天数 使用额度")
|
||||
@GetMapping("/settlementInfo/{shipperId}")
|
||||
public R<SettlementInfoQueryVo> getSettlementInfoByShipperId(@PathVariable Long shipperId) {
|
||||
SettlementInfoQueryVo infoQueryVo = userShipperApplicationService.getSettlementInfoByShipperId(shipperId);
|
||||
return R.ok(infoQueryVo);
|
||||
}
|
||||
|
||||
@Log(title = "托运人管理-查询", description ="根据Userid查询 授权额度 结算天数 使用额度",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("根据userId查询 授权额度 结算天数 使用额度")
|
||||
@GetMapping("/settlementInfoByUserId/{userId}")
|
||||
public R<SettlementInfoQueryVo> getSettlementInfoByUserId(@PathVariable Long userId) {
|
||||
SettlementInfoQueryVo infoQueryVo = userShipperApplicationService.getSettlementInfoByUserId(userId);
|
||||
return R.ok(infoQueryVo);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package com.mhd.user.interfaces.facade.openApi;
|
||||
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.mhd.common.core.domain.dto.open.OpenDriverDto;
|
||||
import com.mhd.common.core.domain.dto.open.OpenDriverEnterpriseDto;
|
||||
import com.mhd.common.core.utils.validate.AddGroup;
|
||||
import com.mhd.common.core.utils.validate.EditGroup;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.user.application.service.OpenUserApplicationService;
|
||||
import com.mhd.user.domain.security.annotation.OpenApiLog;
|
||||
import com.mhd.user.domain.userAggregate.service.UserDriverEnterpriseDomainService;
|
||||
import com.mhd.user.interfaces.dto.addDTO.UserDriverEnterpriseDto;
|
||||
import com.mhd.user.domain.security.annotation.Encrypt;
|
||||
import com.mhd.user.domain.userAggregate.entity.UserDriverEnterprise;
|
||||
import com.mhd.user.domain.userAggregate.service.UserDriverEnterpriseDomainService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 对外开放Api - 用户
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/openApi")
|
||||
public class OpenApi {
|
||||
|
||||
@Autowired
|
||||
private OpenUserApplicationService openUserApplicationService;
|
||||
|
||||
@Autowired
|
||||
private UserDriverEnterpriseDomainService userDriverEnterpriseDomainService;
|
||||
|
||||
/**
|
||||
* 新增/修改司机
|
||||
*/
|
||||
@Encrypt
|
||||
@OpenApiLog
|
||||
@PostMapping("/userDriverAuth")
|
||||
public AjaxResult<?> userDriverAuth(@Validated({AddGroup.class, EditGroup.class}) @RequestBody OpenDriverDto openDriverDto) {
|
||||
openUserApplicationService.userDriverAuth(openDriverDto);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增/修改承运商
|
||||
*/
|
||||
@Encrypt
|
||||
@OpenApiLog
|
||||
@PostMapping("/userEnterpriseAuth")
|
||||
public AjaxResult<?> userEnterpriseAuth(@Validated({AddGroup.class, EditGroup.class}) @RequestBody OpenDriverEnterpriseDto openDriverEnterpriseDto) {
|
||||
openUserApplicationService.userEnterpriseAuth(openDriverEnterpriseDto);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据承运商编码获取企业信息
|
||||
*/
|
||||
@GetMapping("/getInfoByEnterpriseCode")
|
||||
public AjaxResult<?> getInfoByEnterpriseCode(@RequestParam("enterpriseCode") String enterpriseCode) {
|
||||
UserDriverEnterprise info = userDriverEnterpriseDomainService.getInfoByEnterpriseCodeOpen(enterpriseCode, 1);
|
||||
if (ObjectUtil.isNull(info)) {
|
||||
return AjaxResult.error("企业信息不存在");
|
||||
}
|
||||
|
||||
return AjaxResult.success(info);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除承运商/司机
|
||||
*/
|
||||
@Encrypt
|
||||
@OpenApiLog
|
||||
@PostMapping("/deleteUser")
|
||||
public AjaxResult<?> deleteUser(@RequestBody OpenDriverDto OpenDriverDto) {
|
||||
openUserApplicationService.deleteUser(OpenDriverDto);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,208 @@
|
||||
package com.mhd.user.interfaces.facadeApi;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.mhd.common.log.annotation.Log;
|
||||
import com.mhd.common.log.enums.BusinessType;
|
||||
import com.mhd.user.application.service.MotorcadeApplicationService;
|
||||
import com.mhd.user.application.service.MotorcadeCollectionApplicationService;
|
||||
import com.mhd.user.application.service.MotorcadeRecordApplicationService;
|
||||
import com.mhd.user.domain.motorcade.entity.MotorcadeDriver;
|
||||
import com.mhd.user.domain.motorcade.repository.po.MotorcadeAppPo;
|
||||
import com.mhd.user.domain.motorcade.repository.po.MotorcadePo;
|
||||
import com.mhd.user.domain.motorcade.repository.todo.MotorcadeDO;
|
||||
import com.mhd.user.domain.motorcade.repository.todo.MotorcadeRecordDO;
|
||||
import com.mhd.user.domain.motorcadeCollection.entity.MotorcadeCollection;
|
||||
import com.mhd.user.interfaces.assember.MotorcadeAssembler;
|
||||
import com.mhd.user.interfaces.assember.MotorcadeRecordAssembler;
|
||||
import com.mhd.user.interfaces.dto.MotorcadeCollectionDTO;
|
||||
import com.mhd.user.interfaces.dto.MotorcadeDto;
|
||||
import com.mhd.user.interfaces.dto.MotorcadeRecordDto;
|
||||
import com.mhd.common.core.web.page.TableDataInfoApi;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
|
||||
/**
|
||||
* 车队Api(app)
|
||||
*
|
||||
* @author zihao
|
||||
* @date 2023-05-24
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/motorcadeApi")
|
||||
public class MotorcadeAppApi extends BaseController{
|
||||
@Autowired
|
||||
private MotorcadeApplicationService motorcadeApplicationService;
|
||||
@Autowired
|
||||
private MotorcadeRecordApplicationService motorcadeRecordApplicationService;
|
||||
@Autowired
|
||||
private MotorcadeCollectionApplicationService motorcadeCollectionApplicationService;
|
||||
|
||||
/**
|
||||
* 分页查询车队列表
|
||||
*/
|
||||
@Log(title = "车队管理(app)-查询", description ="查询车队列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询车队列表")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfoApi list(MotorcadeDto motorcadeDto)
|
||||
{
|
||||
//转换实体
|
||||
MotorcadeDO motorcadeDo = new MotorcadeAssembler().toDo(motorcadeDto);
|
||||
startPage();
|
||||
List<MotorcadePo> list = motorcadeApplicationService.queryList(motorcadeDo);
|
||||
return getDataTableApi(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询我的车队列表(不分页)
|
||||
*/
|
||||
@Log(title = "车队管理(app)-查询", description ="查询我的车队列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("APP查询我的车队列表(不分页)")
|
||||
@GetMapping("/myMotorcadeList")
|
||||
public AjaxResult myMotorcadeList(MotorcadeDto motorcadeDto)
|
||||
{
|
||||
//转换实体
|
||||
MotorcadeDO motorcadeDo = new MotorcadeAssembler().toDo(motorcadeDto);
|
||||
MotorcadeAppPo motorcadeAppPo = motorcadeApplicationService.myMotorcadeList(motorcadeDo);
|
||||
return AjaxResult.success("操作成功",motorcadeAppPo);
|
||||
}
|
||||
|
||||
/**
|
||||
* APP查询我所有加入的车队列表(不分页)
|
||||
*/
|
||||
@Log(title = "APP查询我所有加入的车队列表", description ="APP查询我所有加入的车队列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("APP查询我所有加入的车队列表(不分页)")
|
||||
@GetMapping("/getAllMotorcadeList")
|
||||
public AjaxResult getAllMotorcadeList(MotorcadeDto motorcadeDto)
|
||||
{
|
||||
//转换实体
|
||||
MotorcadeDO motorcadeDo = new MotorcadeAssembler().toDo(motorcadeDto);
|
||||
List<MotorcadeAppPo> motorcadeList = motorcadeApplicationService.getAllMotorcadeList(motorcadeDo);
|
||||
if (motorcadeList == null || motorcadeList.isEmpty()){
|
||||
motorcadeList = new ArrayList<>();
|
||||
}
|
||||
return AjaxResult.success("操作成功",motorcadeList);
|
||||
}
|
||||
|
||||
@Log(title = "车队管理(app)-查询", description ="查询我的车队列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("APP查询我的车队列表(分页)")
|
||||
@GetMapping("/myMotorcadeListPage")
|
||||
public TableDataInfoApi myMotorcadeListPage(MotorcadeDto motorcadeDto)
|
||||
{
|
||||
//转换实体
|
||||
MotorcadeDO motorcadeDo = new MotorcadeAssembler().toDo(motorcadeDto);
|
||||
startPage();
|
||||
List<MotorcadeAppPo> myMotorcadeList = motorcadeApplicationService.myMotorcadeListPage(motorcadeDo);
|
||||
return getDataTableApi(myMotorcadeList);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 保存车队信息
|
||||
*/
|
||||
@Log(title = "车队管理(app)-新增", description ="保存车队信息",businessType = BusinessType.INSERT)
|
||||
@ApiOperation("保存车队信息")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody MotorcadeDto motorcadeDto)
|
||||
{
|
||||
//转换实体
|
||||
MotorcadeDO motorcadeDo = new MotorcadeAssembler().toDo(motorcadeDto);
|
||||
if (motorcadeDto.getMotorcadeId() == null){
|
||||
return AjaxResult.success("操作成功",motorcadeApplicationService.insert(motorcadeDo));
|
||||
}else {
|
||||
return AjaxResult.success("操作成功",motorcadeApplicationService.update(motorcadeDo));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除车队
|
||||
*/
|
||||
@Log(title = "车队管理(app)-删除", description ="批量删除车队",businessType = BusinessType.DELETE)
|
||||
@ApiOperation("批量删除车队")
|
||||
@DeleteMapping("/deleteByIds/{motorcadeIds}")
|
||||
public AjaxResult delete(@PathVariable Long[] motorcadeIds)
|
||||
{
|
||||
return toAjax(motorcadeApplicationService.delete(motorcadeIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取车队详细信息
|
||||
*/
|
||||
@Log(title = "车队管理(app)-查询", description ="获取车队详细信息",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("获取车队详细信息")
|
||||
@GetMapping(value = "/getMotorcadeInfo")
|
||||
public AjaxResult getMotorcadeInfo(@RequestParam("motorcadeId") Long motorcadeId)
|
||||
{
|
||||
return AjaxResult.success(motorcadeApplicationService.getMotorcadeInfo(motorcadeId));
|
||||
}
|
||||
|
||||
@Log(title = "车队管理(app)-编辑", description ="解散车队",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("解散车队")
|
||||
@PostMapping("/dissolutionMotorcade")
|
||||
public AjaxResult dissolutionMotorcade(@RequestBody MotorcadeDto motorcadeDto)
|
||||
{
|
||||
//转换实体
|
||||
MotorcadeDO motorcadeDo = new MotorcadeAssembler().toDo(motorcadeDto);
|
||||
return toAjax(motorcadeApplicationService.dissolutionMotorcade(motorcadeDo));
|
||||
}
|
||||
|
||||
@Log(title = "车队管理(app)-编辑", description ="退出车队",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("退出车队")
|
||||
@PostMapping("/exitMotorcade")
|
||||
public AjaxResult exitMotorcade(@RequestBody MotorcadeDto motorcadeDto)
|
||||
{
|
||||
//转换实体
|
||||
MotorcadeDO motorcadeDo = new MotorcadeAssembler().toDo(motorcadeDto);
|
||||
return toAjax(motorcadeApplicationService.exitMotorcade(motorcadeDo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 邀请车队司机
|
||||
*/
|
||||
@Log(title = "车队管理(app)", description ="邀请车队司机",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("邀请车队司机")
|
||||
@PostMapping("/insertMotorcadeDriver")
|
||||
public AjaxResult insertMotorcadeDriver(@RequestBody MotorcadeRecordDto motorcadeRecordDto)
|
||||
{
|
||||
//转换实体
|
||||
MotorcadeRecordDO motorcadeRecordDO = new MotorcadeRecordAssembler().toDo(motorcadeRecordDto);
|
||||
try {
|
||||
String url = motorcadeRecordApplicationService.insertMotorcadeDriver(motorcadeRecordDO);
|
||||
return AjaxResult.success("操作成功",url);
|
||||
}catch (Exception e){
|
||||
return AjaxResult.error("操作失败" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Log(title = "车队管理(app)", description ="移除车队司机",businessType = BusinessType.DELETE)
|
||||
@ApiOperation("移除车队司机")
|
||||
@PostMapping("/removeMotorcadeDriver")
|
||||
public AjaxResult removeMotorcadeDriver(@RequestBody MotorcadeDriver motorcadeDriver)
|
||||
{
|
||||
//转换实体
|
||||
return toAjax(motorcadeApplicationService.removeMotorcadeDriver(motorcadeDriver));
|
||||
}
|
||||
|
||||
|
||||
@Log(title = "车队管理(app)", description ="补签协议",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("补签协议")
|
||||
@PostMapping("/supplementarySignature")
|
||||
public AjaxResult supplementarySignature(@RequestBody MotorcadeCollectionDTO motorcadeCollectionDTO)
|
||||
{
|
||||
try {
|
||||
String url = motorcadeCollectionApplicationService.supplementarySignature(motorcadeCollectionDTO);
|
||||
return AjaxResult.success("操作成功",url);
|
||||
}catch (Exception e){
|
||||
return AjaxResult.error("操作失败" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+173
@@ -0,0 +1,173 @@
|
||||
package com.mhd.user.interfaces.facadeApi;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.mhd.common.log.annotation.Log;
|
||||
import com.mhd.common.log.enums.BusinessType;
|
||||
import com.mhd.user.application.service.AgentSignApplicationService;
|
||||
import com.mhd.user.application.service.MotorcadeRecordApplicationService;
|
||||
import com.mhd.user.domain.motorcade.repository.po.MotorcadeDriverAppPo;
|
||||
import com.mhd.user.domain.motorcade.repository.po.MotorcadeRecordPo;
|
||||
import com.mhd.user.domain.motorcade.repository.todo.MotorcadeRecordDO;
|
||||
import com.mhd.user.interfaces.assember.MotorcadeRecordAssembler;
|
||||
import com.mhd.user.interfaces.dto.MotorcadeRecordDto;
|
||||
import com.mhd.common.core.web.page.TableDataInfoApi;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
|
||||
/**
|
||||
* 车队邀请记录Api
|
||||
*
|
||||
* @author zihao
|
||||
* @date 2023-05-24
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/motorcadeRecordApi")
|
||||
public class MotorcadeRecordApi extends BaseController{
|
||||
@Autowired
|
||||
private MotorcadeRecordApplicationService motorcadeRecordApplicationService;
|
||||
@Autowired
|
||||
private AgentSignApplicationService agentSignApplicationService;
|
||||
|
||||
/**
|
||||
* 车队邀请司机列表查询近三天
|
||||
*/
|
||||
@Log(title = "车队邀请记录(app)", description ="车队邀请司机列表查询近三天",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("车队邀请司机列表查询近三天")
|
||||
@GetMapping("/threeDayList")
|
||||
public AjaxResult threeDayList()
|
||||
{
|
||||
List<MotorcadeRecordPo> list = motorcadeRecordApplicationService.threeDayList();
|
||||
return AjaxResult.success("操作成功",list);
|
||||
}
|
||||
|
||||
@Log(title = "车队邀请记录(app)", description ="车队邀请司机列表查询三天前",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("车队邀请司机列表查询三天前")
|
||||
@GetMapping("/beforeThreeDayList")
|
||||
public TableDataInfoApi beforeThreeDayList()
|
||||
{
|
||||
startPage();
|
||||
List<MotorcadeRecordPo> list = motorcadeRecordApplicationService.beforeThreeDayList();
|
||||
return getDataTableApi(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询车队邀请记录列表(是否新邀请)
|
||||
*/
|
||||
@ApiOperation("查询车队邀请记录列表(是否新邀请)")
|
||||
@GetMapping("/selectRecordList")
|
||||
public TableDataInfoApi selectRecordList(Integer isNew)
|
||||
{
|
||||
startPage();
|
||||
List<MotorcadeRecordPo> list = motorcadeRecordApplicationService.selectRecordList(isNew);
|
||||
return getDataTableApi(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑车队邀请记录
|
||||
*/
|
||||
@Log(title = "车队邀请记录(app)-编辑", description ="编辑车队邀请记录",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("编辑车队邀请记录")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody MotorcadeRecordDto motorcadeRecordDto)
|
||||
{
|
||||
//转换实体
|
||||
MotorcadeRecordDO motorcadeRecordDo = new MotorcadeRecordAssembler().toDo(motorcadeRecordDto);
|
||||
if(motorcadeRecordDto.getMotorcadeRecordId() != null){
|
||||
return toAjax(motorcadeRecordApplicationService.update(motorcadeRecordDo));
|
||||
}else {
|
||||
return toAjax(motorcadeRecordApplicationService.insert(motorcadeRecordDo));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 接收/拒绝(加入车队)
|
||||
*/
|
||||
@Log(title = "车队邀请记录(app)-编辑", description ="接收/拒绝邀请",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("接收/拒绝")
|
||||
@PostMapping("/updateStatus")
|
||||
public AjaxResult updateStatus(@RequestBody MotorcadeRecordDto motorcadeRecordDto)
|
||||
{
|
||||
try {
|
||||
//转换实体
|
||||
MotorcadeRecordDO motorcadeRecordDo = new MotorcadeRecordAssembler().toDo(motorcadeRecordDto);
|
||||
String signUrl = motorcadeRecordApplicationService.updateStatus(motorcadeRecordDo);
|
||||
return AjaxResult.success("操作成功",signUrl);
|
||||
}catch (Exception e){
|
||||
return AjaxResult.error("操作失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 加入默认车队
|
||||
*/
|
||||
@Log(title = "加入默认车队", description ="加入默认车队",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("接收/拒绝")
|
||||
@GetMapping("/addDefaultMotorcade")
|
||||
public AjaxResult addDefaultMotorcade(MotorcadeRecordDto motorcadeRecordDto)
|
||||
{
|
||||
//转换实体
|
||||
MotorcadeRecordDO motorcadeRecordDo = new MotorcadeRecordAssembler().toDo(motorcadeRecordDto);
|
||||
String motorcadeId = motorcadeRecordApplicationService.addDefaultMotorcade(motorcadeRecordDo);
|
||||
return AjaxResult.success("加入成功", motorcadeId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除车队邀请记录
|
||||
*/
|
||||
@Log(title = "车队邀请记录(app)-删除", description ="批量删除车队邀请记录",businessType = BusinessType.DELETE)
|
||||
@ApiOperation("批量删除车队邀请记录")
|
||||
@DeleteMapping("/deleteByIds/{motorcadeRecordIds}")
|
||||
public AjaxResult delete(@PathVariable Long[] motorcadeRecordIds)
|
||||
{
|
||||
return toAjax(motorcadeRecordApplicationService.delete(motorcadeRecordIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取车队邀请记录详细信息
|
||||
*/
|
||||
@Log(title = "车队邀请记录(app)-查询", description ="获取车队邀请记录详细信息",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("获取车队邀请记录")
|
||||
@GetMapping(value = "/getInfo")
|
||||
public AjaxResult getInfo(Long motorcadeRecordId)
|
||||
{
|
||||
return AjaxResult.success(motorcadeRecordApplicationService.getInfo(motorcadeRecordId));
|
||||
}
|
||||
|
||||
@Log(title = "车队邀请记录(app)-查询", description ="查询车队邀请记录列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询车队邀请记录列表")
|
||||
@GetMapping("/invitationRecordList")
|
||||
public TableDataInfoApi invitationRecordList(@RequestParam(name = "motorcadeId",required = true) Long motorcadeId)
|
||||
{
|
||||
startPage();
|
||||
List<MotorcadeDriverAppPo> list = motorcadeRecordApplicationService.invitationRecordList(motorcadeId);
|
||||
return getDataTableApi(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* E签宝回调接口-签署完成
|
||||
*/
|
||||
@ApiOperation("E签宝回调接口-签署完成")
|
||||
@PostMapping("/feelContractCallBank")
|
||||
public AjaxResult feelContractCallBank(@RequestBody JSONObject jsonObject)
|
||||
{
|
||||
boolean result = agentSignApplicationService.feelContractCallBank(jsonObject);
|
||||
if (result){
|
||||
return AjaxResult.success("success");
|
||||
}
|
||||
return AjaxResult.success(result);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.mhd.user.interfaces.facadeApi.Po;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class UserDriverBindListPo{
|
||||
|
||||
@ApiModelProperty(name = "司机表ID")
|
||||
private Long driverId;
|
||||
|
||||
@ApiModelProperty(name = "用户主表ID")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty(name = "承运人个体司机认证状态:0-无状态,1-未认证,2-正在审核,3-认证通过,4-认证失败,5-认证失效")
|
||||
private Integer driverFill;
|
||||
|
||||
@ApiModelProperty(name = "手机号码")
|
||||
private String userPhone="";
|
||||
|
||||
@ApiModelProperty(name = "用户姓名(真实姓名)")
|
||||
private String userName="";
|
||||
|
||||
@ApiModelProperty(name = "用户头像")
|
||||
private String avatar="";
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package com.mhd.user.interfaces.facadeApi.Po;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 司机管理--司机统计数量
|
||||
*/
|
||||
@Data
|
||||
public class UserDriverCountPo {
|
||||
|
||||
@ApiModelProperty("我的司机")
|
||||
private Integer myDriver = 0;
|
||||
@ApiModelProperty("外部司机")
|
||||
private Integer outDriver = 0;
|
||||
@ApiModelProperty("全部司机")
|
||||
private Integer allDriver = 0;
|
||||
}
|
||||
+166
@@ -0,0 +1,166 @@
|
||||
package com.mhd.user.interfaces.facadeApi.Po;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class UserShipperAuthAppPo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(name = "货主表ID")
|
||||
private Long shipperId = 0L;
|
||||
@ApiModelProperty(name = "用户主表ID")
|
||||
private Long userId = 0L;
|
||||
@ApiModelProperty(name = "货主类型:0-无状态,1-个人,2-企业,3-个体工商户,4-企业员工")
|
||||
private Integer shipperType = 1;
|
||||
|
||||
@ApiModelProperty(name = "身份证正面照片")
|
||||
private String userIdcardFrontUrl = "";
|
||||
@ApiModelProperty(name = "身份证反面照片")
|
||||
private String userIdcardBackUrl = "";
|
||||
@ApiModelProperty(name = "手持身份证")
|
||||
private String userIdcardInhandUrl = "";
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "用户生日")
|
||||
private String userBirthday = "";
|
||||
@ApiModelProperty(name = "手机号码")
|
||||
private String userPhone = "";
|
||||
@ApiModelProperty(name = "用户姓名(真实姓名)")
|
||||
private String userName = "";
|
||||
@ApiModelProperty(name = "登录账号(2-20位)")
|
||||
private String userAccount = "";
|
||||
|
||||
@ApiModelProperty(name = "用户角色名称")
|
||||
private String roleName = "";
|
||||
@ApiModelProperty(name = "身份证号")
|
||||
private String userIdcardNumber = "";
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "身份证有效期自")
|
||||
private String userIdcardDateFrom = "";
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "身份证有效期至")
|
||||
private String userIdcardDateTo = "";
|
||||
@ApiModelProperty(name = "身份证是否长期:0-无状态,1-是,2-否")
|
||||
private Integer userIdcardLong;
|
||||
|
||||
@ApiModelProperty(name = "详细地址")
|
||||
private String userAreaAddress = "";
|
||||
|
||||
@ApiModelProperty(name = "县区编码,6位")
|
||||
private Long userAreaCountyId = 0L;
|
||||
@ApiModelProperty(name = "县区名称")
|
||||
private String userAreaName = "";
|
||||
|
||||
@ApiModelProperty(name = "备注/用户基本信息")
|
||||
private String userRemark = "";
|
||||
|
||||
@ApiModelProperty(name = "货主审核状态名称")
|
||||
private String shipperAuthStatusName = "";
|
||||
|
||||
@ApiModelProperty(name = "企业名称")
|
||||
private String shipperEnterpriseName = "";
|
||||
|
||||
@ApiModelProperty(name = "企业统一社会信用代码")
|
||||
private String shipperEnterpriseSocialCreditCode = "";
|
||||
|
||||
@ApiModelProperty(name = "企业注册电话")
|
||||
private String shipperEnterprisePhone = "";
|
||||
|
||||
@ApiModelProperty(name = "企业注册地址")
|
||||
private String shipperEnterpriseAddress = "";
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "企业营业期限起")
|
||||
private String shipperEnterpriseLicenseDateFrom = "";
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "企业营业期限止")
|
||||
private String shipperEnterpriseLicenseDateTo = "";
|
||||
|
||||
@ApiModelProperty(name = "纳税人资质")
|
||||
private String shipperEnterpriseTaxpayer = "";
|
||||
|
||||
@ApiModelProperty(name = "企业营业执照是否长期:0-无状态,1-是,2-否")
|
||||
private Integer shipperEnterpriseLicenseLong = 1;
|
||||
|
||||
@ApiModelProperty(name = "营业执照照片")
|
||||
private String shipperEnterpriseLicenseFrontUrl = "";
|
||||
|
||||
@ApiModelProperty(name = "组织名称")
|
||||
private String organizationName = "";
|
||||
@ApiModelProperty(name = "创建者姓名")
|
||||
private String createByName = "";
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private String createTime = "";
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private String updateTime = "";
|
||||
@ApiModelProperty(name = "货主审核人用户姓名")
|
||||
private String shipperAuthByUsername = "";
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(name = "货主审核时间")
|
||||
private String shipperAuthTime = "";
|
||||
@ApiModelProperty(name = "货主审核原因")
|
||||
private String shipperStatusRemark = "";
|
||||
|
||||
@ApiModelProperty(name = "是否法人:0-无状态,1-是,2-否")
|
||||
private Integer shipperCorp = 1;
|
||||
@ApiModelProperty(name = "法人姓名")
|
||||
private String shipperCorpName = "";
|
||||
/** 企业法人姓名 */
|
||||
@ApiModelProperty("企业法人姓名")
|
||||
@Excel(name = "企业法人姓名")
|
||||
private String shipperCorpLegalName;
|
||||
@ApiModelProperty(name = "法人身份证号")
|
||||
private String shipperCorpIdcardNumber = "";
|
||||
@ApiModelProperty(name = "法人身份证号加密")
|
||||
private String shipperCorpIdcardNumberDes = "";
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "法人身份证有效期自")
|
||||
private String shipperCorpIdcardDateFrom = "";
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "法人身份证有效期止")
|
||||
private String shipperCorpIdcardDateTo = "";
|
||||
@ApiModelProperty(name = "法人身份证是否长期:0-无状态,1-是,2-否")
|
||||
private Integer shipperCorpIdcardLong = 1;
|
||||
@ApiModelProperty(name = "法人身份证正面照片")
|
||||
private String shipperCorpIdcardFrontUrl = "";
|
||||
@ApiModelProperty(name = "法人身份证反面照片")
|
||||
private String shipperCorpIdcardBackUrl = "";
|
||||
@ApiModelProperty(name = "法人身份证手持照片")
|
||||
private String shipperCorpIdcardInhandUrl = "";
|
||||
|
||||
@ApiModelProperty(name = "托运人个体货主认证状态:0-无状态,1-未认证,2-正在审核,3-认证通过,4-认证失败,5-认证失效")
|
||||
private Integer shipperFill = 1;
|
||||
@ApiModelProperty(name = "托运人个体货主认证状态名称")
|
||||
private String shipperFillName = "";
|
||||
@ApiModelProperty(name = "托运人个人认证时间")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date shipperFillTime;
|
||||
|
||||
@ApiModelProperty(name = "托运人发货企业认证状态:0-无状态,1-未认证,2-正在审核,3-认证通过,4-认证失败,5-认证失效")
|
||||
private Integer shipperEnterpriseFill = 1;
|
||||
@ApiModelProperty(name = "托运人发货企业认证状态名称")
|
||||
private String shipperEnterpriseFillName = "";
|
||||
@ApiModelProperty(name = "托运人发货企业认证时间")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date shipperEnterpriseFillTime;
|
||||
|
||||
@ApiModelProperty(name = "托运人个体货主审核原因")
|
||||
private String shipperFillRemark="";
|
||||
@ApiModelProperty(name = "托运人发货企业审核原因")
|
||||
private String shipperEnterpriseFillRemark="";
|
||||
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.mhd.user.interfaces.facadeApi.Po;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* APP车队详情 车辆绑定司机信息,车辆信息
|
||||
*
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class VehicleDriverBindAppPo{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(name = "用户主表ID")
|
||||
private Long userId = 0L;
|
||||
@ApiModelProperty(name = "用户姓名(真实姓名)")
|
||||
private String userName = "";
|
||||
@ApiModelProperty(name = "用户头像")
|
||||
private String avatar= "";
|
||||
@ApiModelProperty("车辆关联司机userid")
|
||||
private Long driverBindId = 0L;
|
||||
@ApiModelProperty("默认状态(1-是,2-否)")
|
||||
private Integer defaultFlag;
|
||||
|
||||
@ApiModelProperty(name = "车辆id")
|
||||
private Long vehicleId = 0L;
|
||||
@ApiModelProperty(name = "其他车辆车头照片")
|
||||
private String otherHeadstockImage = "";
|
||||
@ApiModelProperty(name = "车牌号")
|
||||
private String vehicleLicensePlateNumber = "";
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.mhd.user.interfaces.facadeApi;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.mhd.common.core.domain.entity.R;
|
||||
import com.mhd.common.core.feign.ThirdPartyServiceFeign;
|
||||
import com.mhd.user.domain.motorcadeCollection.entity.MotorcadeCollection;
|
||||
import com.mhd.user.domain.motorcadeCollection.repository.po.MotorcadeCollectionPO;
|
||||
import com.mhd.user.domain.motorcadeCollection.service.MotorcadeCollectionDomainService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
@Slf4j
|
||||
@Configuration
|
||||
public class RabbitCustomApi {
|
||||
|
||||
@Autowired
|
||||
private MotorcadeCollectionDomainService motorcadeCollectionDomainService;
|
||||
@Autowired
|
||||
private ThirdPartyServiceFeign thirdPartyServiceFeign;
|
||||
|
||||
|
||||
/**
|
||||
* 下载代收款协议签署合同文件,并保存地址
|
||||
* @Param msgData : flowId - 流程id
|
||||
*/
|
||||
@Bean
|
||||
public Consumer<String> rb001usercenter() {
|
||||
return new Consumer<String>() {
|
||||
@Override
|
||||
public void accept(String msgData) {
|
||||
//解析消息
|
||||
JSONObject jsonObject = JSONObject.parseObject(msgData);
|
||||
String flowId = jsonObject.get("flowId").toString();
|
||||
if (!StringUtils.isBlank(flowId)){
|
||||
MotorcadeCollection motorcadeCollection = motorcadeCollectionDomainService.selectByFlowId(flowId);
|
||||
Map<String, String> param = new HashMap<>();
|
||||
param.put("signFlowId", flowId);
|
||||
param.put("type", "2");
|
||||
R<String> resultR = thirdPartyServiceFeign.downloadSignContract(param);
|
||||
if (ObjectUtil.isNotNull(resultR) && R.SUCCESS == resultR.getCode()){
|
||||
motorcadeCollection.setAgreementUrlPdf(resultR.getData());
|
||||
motorcadeCollectionDomainService.saveOrUpdate(motorcadeCollection);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.mhd.user.interfaces.facadeApi;
|
||||
|
||||
|
||||
import com.mhd.common.core.domain.entity.R;
|
||||
import com.mhd.common.core.domain.po.thirdparty.BankCardPo;
|
||||
import com.mhd.common.core.domain.po.thirdparty.SysFacePo;
|
||||
import com.mhd.common.core.domain.thirdparty.*;
|
||||
import com.mhd.common.log.annotation.Log;
|
||||
import com.mhd.common.log.enums.BusinessType;
|
||||
import com.mhd.user.application.service.ThirdPartyApplicationService;
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@Api(tags = "APP调用三方中台接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/thirdPartyApi")
|
||||
@CrossOrigin
|
||||
public class ThirdPartyApi extends BaseController {
|
||||
|
||||
@Resource
|
||||
private ThirdPartyApplicationService thirdPartyApplicationService;
|
||||
|
||||
@Log(title = "三方中台接口(app)", description ="身份证OCR识别",businessType = BusinessType.OTHER)
|
||||
@ApiOperation("身份证OCR识别")
|
||||
@PostMapping("/identityOcr")
|
||||
public AjaxResult identityOcr(@RequestBody IDOCRDTO idocrdto) {
|
||||
return AjaxResult.success(thirdPartyApplicationService.identityOcr(idocrdto));
|
||||
}
|
||||
|
||||
@Log(title = "三方中台接口(app)", description ="营业执照OCR",businessType = BusinessType.OTHER)
|
||||
@ApiOperation("营业执照OCR")
|
||||
@PostMapping("/licenseOcr")
|
||||
public AjaxResult licenseOcr(@RequestBody LicenseOCRDTO licenseOCRDTO) {
|
||||
return AjaxResult.success(thirdPartyApplicationService.licenseOcr(licenseOCRDTO));
|
||||
}
|
||||
|
||||
@Log(title = "三方中台接口(app)", description ="驾驶证OCR",businessType = BusinessType.OTHER)
|
||||
@ApiOperation("驾驶证OCR")
|
||||
@PostMapping("/drivingOcr")
|
||||
public AjaxResult drivingOcr(@RequestBody DrivinglicenceOCRDTO drivinglicenceOCRDTO) {
|
||||
return AjaxResult.success(thirdPartyApplicationService.drivingOcr(drivinglicenceOCRDTO));
|
||||
}
|
||||
|
||||
@Log(title = "三方中台接口(app)", description ="行驶证OCR",businessType = BusinessType.OTHER)
|
||||
@ApiOperation("行驶证OCR")
|
||||
@PostMapping("/drivingPermitOcr")
|
||||
public AjaxResult drivingPermitOcr(@RequestBody DrivingPermitOCRDTO drivingPermitOCRDTO) {
|
||||
return AjaxResult.success(thirdPartyApplicationService.drivingPermitOcr(drivingPermitOCRDTO));
|
||||
}
|
||||
|
||||
@Log(title = "三方中台接口(app)", description ="银行卡OCR",businessType = BusinessType.OTHER)
|
||||
@ApiOperation("银行卡OCR")
|
||||
@PostMapping("/BankCard")
|
||||
public R<BankCardPo> BankCard(@RequestBody BankCardOCRDTO bankCardOCRDTO) {
|
||||
return R.ok(thirdPartyApplicationService.BankCard(bankCardOCRDTO));
|
||||
}
|
||||
|
||||
@Log(title = "三方中台接口(app)", description ="人脸识别核身",businessType = BusinessType.OTHER)
|
||||
@ApiOperation(value = "人脸识别核身", notes = "人脸识别核身")
|
||||
@GetMapping(value = "/faceSwiping")
|
||||
public R<SysFacePo> faceSwiping(SysIDOCRDTO sysIDOCRDTO) {
|
||||
return R.ok(thirdPartyApplicationService.faceSwiping(sysIDOCRDTO));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,429 @@
|
||||
package com.mhd.user.interfaces.facadeApi;
|
||||
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.mhd.common.core.domain.entity.R;
|
||||
import com.mhd.common.core.domain.po.thirdparty.SysQueryFaceSwipingPo;
|
||||
import com.mhd.common.core.domain.thirdparty.QueryFaceSwipingDTO;
|
||||
import com.mhd.common.log.annotation.Log;
|
||||
import com.mhd.common.log.enums.BusinessType;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import com.mhd.user.application.service.*;
|
||||
import com.mhd.user.domain.motorcade.repository.po.MotorcadeDriverAppPo;
|
||||
import com.mhd.user.domain.userAggregate.repository.po.DriverVehicleBindPo;
|
||||
import com.mhd.user.domain.userAggregate.repository.todo.DriverVehicleBindDo;
|
||||
import com.mhd.user.domain.userAggregate.repository.todo.UserDO;
|
||||
import com.mhd.user.domain.userAggregate.repository.todo.UserDriverDO;
|
||||
import com.mhd.user.domain.userAggregate.repository.todo.UserDriverEnterpriseDo;
|
||||
import com.mhd.user.domain.userAggregate.service.DriverVehicleBindDomainService;
|
||||
import com.mhd.user.interfaces.assember.DriverVehicleBindAssembler;
|
||||
import com.mhd.user.interfaces.assember.UserAssember;
|
||||
import com.mhd.user.interfaces.assember.UserDriverAssember;
|
||||
import com.mhd.user.interfaces.dto.DriverVehicleBindDto;
|
||||
import com.mhd.user.interfaces.dto.addDTO.UserDTO;
|
||||
import com.mhd.user.interfaces.dto.addDTO.UserDriverDTO;
|
||||
import com.mhd.user.interfaces.dto.addDTO.UserDriverEnterpriseDto;
|
||||
import com.mhd.user.interfaces.facadeApi.Po.UserDriverBindListPo;
|
||||
import com.mhd.user.interfaces.facadeApi.Po.UserDriverCountPo;
|
||||
import com.mhd.user.interfaces.facadeApi.Po.VehicleDriverBindAppPo;
|
||||
import com.mhd.common.core.domain.po.app.UserAppPo;
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.core.web.page.TableDataInfoApi;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
|
||||
import static com.mhd.common.core.utils.PageUtils.startPage;
|
||||
|
||||
@Api(tags = "APP用户中台接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/userAppApi")
|
||||
@CrossOrigin
|
||||
public class UserAppAPI extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private UserApplicationService userApplicationService;
|
||||
@Resource
|
||||
private UserDriverApplicationService userDriverApplicationService;
|
||||
@Resource
|
||||
private UserDriverEnterpriseApplicationService userDriverEnterpriseApplicationService;
|
||||
@Resource
|
||||
private DriverVehicleBindApplicationService driverVehicleBindApplicationService;
|
||||
@Resource
|
||||
private UserShipperApplicationService userShipperApplicationService;
|
||||
@Resource
|
||||
private UserDriverAssember userDriverAssember;
|
||||
@Resource
|
||||
private DriverVehicleBindDomainService driverVehicleBindDomainService;
|
||||
@Resource
|
||||
private UserAssember userAssember;
|
||||
|
||||
|
||||
@Log(title = "用户中台接口(app)-查询", description ="查询用户列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询用户列表")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfoApi list(UserDTO userDTO) {
|
||||
//转换实体
|
||||
UserDO userDO = new UserAssember().toUserDO(userDTO);
|
||||
startPage();
|
||||
List<UserAppPo> list = userApplicationService.selectAppUserList(userDO);
|
||||
return getDataTableApi(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 个人证件信息认证
|
||||
*/
|
||||
@ApiOperation("个人信息认证-实名认证")
|
||||
@PostMapping("/userAuth")
|
||||
public AjaxResult userAuth(@RequestBody UserDTO userDTO) {
|
||||
UserDO userDO = new UserDO();
|
||||
BeanUtils.copyProperties(userDTO,userDO);
|
||||
return toAjax(userApplicationService.userAuth(userDO));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("承运人认证-承运人认证")
|
||||
@PostMapping("/userDriverAuth")
|
||||
public AjaxResult userDriverAuth(@RequestBody UserDriverDTO userDriverDTO) {
|
||||
UserDriverDO userDriverDO = new UserDriverAssember().toUserDriverDO(userDriverDTO);
|
||||
return toAjax(userDriverApplicationService.userDriverAuth(userDriverDO,0));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("运输企业提交司机资料-承运人认证")
|
||||
@PostMapping("/userDriverAuthByEnterprise")
|
||||
public AjaxResult userDriverAuthByEnterprise(@RequestBody UserDriverDTO userDriverDTO) {
|
||||
UserDriverDO userDriverDO = new UserDriverAssember().toUserDriverDO(userDriverDTO);
|
||||
return toAjax(userDriverApplicationService.userDriverAuth(userDriverDO,1));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("承运人认证-运输企业认证")
|
||||
@PostMapping("/userEnterpriseAuth")
|
||||
public AjaxResult userEnterpriseAuth(@RequestBody UserDriverEnterpriseDto userDriverEnterpriseDto) {
|
||||
UserDriverEnterpriseDo userDriverEnterpriseDo = new UserDriverEnterpriseDo();
|
||||
BeanUtils.copyProperties(userDriverEnterpriseDto,userDriverEnterpriseDo);
|
||||
return toAjax(userDriverEnterpriseApplicationService.userEnterpriseAuth(userDriverEnterpriseDo));
|
||||
}
|
||||
|
||||
@Log(title = "用户中台接口(app)-编辑", description ="APP修改重置支付密码",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("APP修改重置支付密码")
|
||||
@PostMapping("/appEditPayPassword")
|
||||
public AjaxResult appEditPayPassword(@RequestBody UserDTO userDTO) {
|
||||
try {
|
||||
userApplicationService.appEditPayPassword(userDTO);
|
||||
return AjaxResult.success();
|
||||
} catch (ServiceException e) {
|
||||
e.printStackTrace();
|
||||
return AjaxResult.error(500, e.getMessage());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return AjaxResult.error(500, "操作失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Log(title = "用户中台接口(app)-编辑", description ="APP忘记/找回登录密码",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("APP忘记/找回登录密码")
|
||||
@PostMapping("/appForgetPassword")
|
||||
public AjaxResult appForgetPassword(@RequestBody UserDTO userDTO) {
|
||||
try {
|
||||
userApplicationService.appForgetPassword(userDTO);
|
||||
return AjaxResult.success();
|
||||
} catch (ServiceException e) {
|
||||
e.printStackTrace();
|
||||
return AjaxResult.error(500, e.getMessage());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return AjaxResult.error(500, "操作失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Log(title = "用户中台接口(app)-编辑", description ="APP重置密码",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("APP重置密码")
|
||||
@PostMapping("/appResetPassword")
|
||||
public AjaxResult appResetPassword(@RequestBody UserDTO userDTO) {
|
||||
try {
|
||||
userApplicationService.appResetPassword(userDTO);
|
||||
return AjaxResult.success();
|
||||
} catch (ServiceException e) {
|
||||
e.printStackTrace();
|
||||
return AjaxResult.error(500, e.getMessage());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return AjaxResult.error(500, "操作失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Log(title = "用户中台接口(app)-查询", description ="APP我绑定的车辆列表查询",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("APP我绑定的车辆列表查询")
|
||||
@GetMapping("/driverBindCarList")
|
||||
public TableDataInfoApi driverBindCarList(DriverVehicleBindDto driverVehicleBindDto) {
|
||||
//转换实体
|
||||
DriverVehicleBindDo driverVehicleBindDo = new DriverVehicleBindAssembler().toDo(driverVehicleBindDto);
|
||||
List<DriverVehicleBindPo> list = driverVehicleBindApplicationService.driverBindCarList(driverVehicleBindDo);
|
||||
return getDataTableApi(list);
|
||||
}
|
||||
|
||||
@Log(title = "用户中台接口(app)-查询", description ="APP绑定司机列表查询",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("APP绑定司机列表查询")
|
||||
@GetMapping("/driverBindList")
|
||||
public TableDataInfoApi driverBindList(UserDriverDTO userDriverDTO) {
|
||||
//转换实体
|
||||
UserDriverDO userDriverDO = new UserDriverAssember().toUserDriverDO(userDriverDTO);
|
||||
startPage();
|
||||
List<UserDriverBindListPo> list = userDriverApplicationService.driverBindList(userDriverDO);
|
||||
return getDataTableApi(list);
|
||||
}
|
||||
|
||||
@Log(title = "用户中台接口(app)-编辑", description ="APP承运人绑定车辆",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("App承运人绑定车辆")
|
||||
@PostMapping("/appBindVehicle")
|
||||
public AjaxResult appBindVehicle(@RequestBody DriverVehicleBindDto driverVehicleBindDto) {
|
||||
//转换实体
|
||||
DriverVehicleBindDo driverVehicleBindDo = new DriverVehicleBindAssembler().toDo(driverVehicleBindDto);
|
||||
return toAjax(userDriverApplicationService.appBindVehicle(driverVehicleBindDo));
|
||||
}
|
||||
|
||||
@Log(title = "用户中台接口(app)-编辑", description ="APP承运人解绑车辆",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("App承运人解绑车辆")
|
||||
@PostMapping("/appUnBindVehicle")
|
||||
public AjaxResult appUnBindVehicle(@RequestBody DriverVehicleBindDto driverVehicleBindDto) {
|
||||
//转换实体
|
||||
DriverVehicleBindDo driverVehicleBindDo = new DriverVehicleBindAssembler().toDo(driverVehicleBindDto);
|
||||
return toAjax(userDriverApplicationService.appUnBindVehicle(driverVehicleBindDo));
|
||||
}
|
||||
|
||||
@Log(title = "用户中台接口(app)-编辑", description ="APP承运人设置/取消默认车辆",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("App承运人设置/取消默认车辆")
|
||||
@PostMapping("/setDefaultVehicle")
|
||||
public AjaxResult setDefaultVehicle(@RequestBody DriverVehicleBindDto driverVehicleBindDto) {
|
||||
//转换实体
|
||||
DriverVehicleBindDo driverVehicleBindDo = new DriverVehicleBindAssembler().toDo(driverVehicleBindDto);
|
||||
return toAjax(userDriverApplicationService.setDefaultVehicle(driverVehicleBindDo));
|
||||
}
|
||||
|
||||
@Log(title = "用户中台接口(app)-查询", description ="车辆详情-查询车辆绑定的承运人列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("车辆详情-查询车辆绑定的承运人列表")
|
||||
@GetMapping("/bindDriverList")
|
||||
public AjaxResult bindDriverList(@RequestParam(value = "vehicleId",required = true) Long vehicleId) {
|
||||
Map<String,Object> result = new HashMap<>();
|
||||
List<VehicleDriverBindAppPo> driverList = userDriverApplicationService.bindDriverList(vehicleId);
|
||||
//查询当前登录用户和当前车辆的信息
|
||||
DriverVehicleBindPo driverVehicleBindPo = driverVehicleBindApplicationService.getInfoByVehicle(vehicleId, SecurityUtils.getLoginUser().getUserid());
|
||||
int defaultFlag = 0;
|
||||
if(null != driverVehicleBindPo){
|
||||
defaultFlag = driverVehicleBindPo.getDefaultFlag()==null ? 0:driverVehicleBindPo.getDefaultFlag();
|
||||
}
|
||||
result.put("driverList",driverList);
|
||||
result.put("defaultFlag",defaultFlag);
|
||||
return AjaxResult.success("操作成功",result);
|
||||
}
|
||||
|
||||
@Log(title = "用户中台接口(app)-查询", description ="查询车辆绑定关系列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询车辆绑定关系列表")
|
||||
@GetMapping("/bindDriverShipList")
|
||||
public AjaxResult bindDriverShipList(@RequestParam(value = "vehicleId",required = true) Long vehicleId) {
|
||||
DriverVehicleBindDo driverVehicleBindDo = new DriverVehicleBindDo();
|
||||
driverVehicleBindDo.setVehicleId(vehicleId);
|
||||
List<VehicleDriverBindAppPo> driverList = driverVehicleBindApplicationService.queryVehicleBindInfo(driverVehicleBindDo);
|
||||
return AjaxResult.success("操作成功",driverList);
|
||||
}
|
||||
|
||||
@Log(title = "用户中台接口(app)-查询", description ="查询车队司机列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询车队司机列表")
|
||||
@GetMapping("/motorcadeDriverList")
|
||||
public TableDataInfoApi motorcadeDriverList(UserDriverDTO userDriverDTO) {
|
||||
//转换实体
|
||||
UserDriverDO userDriverDO = userDriverAssember.toUserDriverDO(userDriverDTO);
|
||||
startPage();
|
||||
List<MotorcadeDriverAppPo> list = userDriverApplicationService.motorcadeDriverList(userDriverDO);
|
||||
return getDataTableApi(list);
|
||||
}
|
||||
@ApiOperation("司机管理--统计数量")
|
||||
@GetMapping("/driverMangerCount")
|
||||
public AjaxResult driverMangerCount() {
|
||||
UserDriverCountPo userDriverCountPo = userDriverApplicationService.driverMangerCount();
|
||||
return AjaxResult.success(userDriverCountPo);
|
||||
}
|
||||
|
||||
@Log(title = "用户中台接口(app)-查询", description ="查询司机管理列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询司机管理列表")
|
||||
@GetMapping("/selectDriverMangerList")
|
||||
public TableDataInfoApi selectDriverMangerList(UserDriverDTO userDriverDTO) {
|
||||
//转换实体
|
||||
UserDriverDO userDriverDO = userDriverAssember.toUserDriverDO(userDriverDTO);
|
||||
startPage();
|
||||
List<MotorcadeDriverAppPo> list = userDriverApplicationService.selectDriverMangerList(userDriverDO);
|
||||
return getDataTableApi(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @Description 根据租户id列表查询一级账号
|
||||
* @Author zihao
|
||||
* @Date 2023/05/30 11:03
|
||||
*/
|
||||
@ApiOperation("根据租户id列表查询一级账号")
|
||||
@PostMapping("/getByTenantsIds")
|
||||
public AjaxResult getByTenantsIds(@RequestBody List<Long> tenantsIds) {
|
||||
return AjaxResult.success(userApplicationService.getByTenantsIds(tenantsIds));
|
||||
}
|
||||
|
||||
@ApiOperation("根据用户id查询用户角色列表")
|
||||
@GetMapping("/selectRolesByUserId")
|
||||
public AjaxResult selectRolesByUserId(@RequestParam("userId") Long userId) {
|
||||
return AjaxResult.success(userApplicationService.selectRolesByUserId(userId));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 车队- 邀请司机搜索司机
|
||||
* 此接口会过滤已加入车队的司机
|
||||
* @param userDriverDTO
|
||||
* @return
|
||||
*/
|
||||
@Log(title = "用户中台接口(app)-查询", description ="车队- 邀请司机搜索司机",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("车队- 邀请司机搜索司机")
|
||||
@GetMapping("/selectDriverInvitationList")
|
||||
public AjaxResult selectDriverInvitationList(UserDriverDTO userDriverDTO) {
|
||||
//转换实体
|
||||
UserDriverDO userDriverDO = userDriverAssember.toUserDriverDO(userDriverDTO);
|
||||
List<MotorcadeDriverAppPo> list = userDriverApplicationService.selectDriverInvitationList(userDriverDO);
|
||||
return AjaxResult.success("操作成功",list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 变更车主 - 搜索司机
|
||||
* 搜索当前租户下任意司机,精确查询
|
||||
* @param userDriverDTO
|
||||
* @return
|
||||
*/
|
||||
@Log(title = "用户中台接口(app)-查询", description ="变更车主 - 搜索司机",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("变更车主 - 搜索司机")
|
||||
@GetMapping("/searchDriver")
|
||||
public AjaxResult searchDriver(UserDriverDTO userDriverDTO) {
|
||||
//转换实体
|
||||
UserDriverDO userDriverDO = userDriverAssember.toUserDriverDO(userDriverDTO);
|
||||
List<MotorcadeDriverAppPo> list = userDriverApplicationService.searchDriver(userDriverDO);
|
||||
return AjaxResult.success("操作成功",list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 司机管理添加司机
|
||||
*/
|
||||
@Log(title = "用户中台接口(app)-新增", description ="司机管理添加司机",businessType = BusinessType.INSERT)
|
||||
@ApiOperation("司机管理添加司机")
|
||||
@PostMapping("/enterpriseAddDriver")
|
||||
public AjaxResult enterpriseAddDriver(@RequestBody UserDTO userDTO) {
|
||||
UserDO userDO = userAssember.toUserDO(userDTO);
|
||||
return AjaxResult.success("操作成功",userApplicationService.enterpriseAddDriver(userDO));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("获取司机详情")
|
||||
@GetMapping("/getDriverInfoByUserId")
|
||||
public AjaxResult getDriverInfoByUserId(@RequestParam(value = "userId",required = true) Long userId) {
|
||||
return AjaxResult.success(userDriverApplicationService.getDriverInfoByUserId(userId));
|
||||
}
|
||||
|
||||
@Log(title = "用户中台接口(app)-查询", description ="查询司机绑定的车辆列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询司机绑定的车辆列表")
|
||||
@GetMapping("/bindVehicleList")
|
||||
public AjaxResult bindVehicleList(@RequestParam(value = "userId",required = true) Long userId) {
|
||||
List<VehicleDriverBindAppPo> vehicleList = userDriverApplicationService.bindVehicleList(userId);
|
||||
return AjaxResult.success("操作成功",vehicleList);
|
||||
}
|
||||
|
||||
@Log(title = "用户中台接口(app)-删除", description ="删除司机",businessType = BusinessType.DELETE)
|
||||
@ApiOperation("删除司机")
|
||||
@PostMapping("/deleteDriver")
|
||||
public AjaxResult deleteDriver(@RequestBody UserDriverDTO userDriverDTO) {
|
||||
return toAjax(userApplicationService.deleteDriver(userDriverDTO));
|
||||
}
|
||||
|
||||
@Log(title = "用户中台接口(app)-编辑", description ="设置用户头像",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("设置用户头像")
|
||||
@PostMapping("/updateUserAvatar")
|
||||
public AjaxResult updateUserAvatar(@RequestBody UserDTO userDTO) {
|
||||
return AjaxResult.success(userApplicationService.updateUserAvatar(userDTO));
|
||||
}
|
||||
|
||||
@Log(title = "用户中台接口(app)", description ="注销账号",businessType = BusinessType.DELETE)
|
||||
@ApiOperation("注销账号")
|
||||
@GetMapping("/cancelAccount")
|
||||
public AjaxResult cancelAccount() {
|
||||
userApplicationService.cancelAccount();
|
||||
return AjaxResult.success("注销成功!");
|
||||
}
|
||||
|
||||
@Log(title = "用户中台接口(app)", description ="获取推广码",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("获取推广码")
|
||||
@GetMapping("/getPromoCodeByToken")
|
||||
public AjaxResult getPromoCodeByToken() {
|
||||
return AjaxResult.success("查询成功!", userDriverApplicationService.getPromoCodeByToken());
|
||||
}
|
||||
|
||||
@Log(title = "用户中台接口(app)", description ="设置推广码",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("设置推广码")
|
||||
@PostMapping("/editPromoCodeByToken")
|
||||
public AjaxResult editPromoCodeByToken(@RequestBody UserDriverDTO userDriverDTO) {
|
||||
return AjaxResult.success("查询成功!", userDriverApplicationService.editPromoCodeByToken(userDriverDTO));
|
||||
}
|
||||
|
||||
@Log(title = "用户中台接口(app)", description = "设置紧急联系人", businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("设置紧急联系人")
|
||||
@PostMapping("/setUpEmergencyContacts")
|
||||
public AjaxResult setUpEmergencyContacts(@RequestBody UserDriverDTO userDriverDTO) {
|
||||
userDriverApplicationService.setUpEmergencyContacts(userDriverDTO);
|
||||
return AjaxResult.success("设置成功!");
|
||||
}
|
||||
|
||||
|
||||
@Log(title = "用户中台接口(app)-人脸核身状态查询并更新认证状态", description ="人脸核身状态查询并更新认证状态",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("人脸核身状态查询并更新认证状态")
|
||||
@PostMapping("/getFaceSwipingStatus")
|
||||
public AjaxResult getFaceSwipingStatus(@RequestBody QueryFaceSwipingDTO queryFaceSwipingDTO) {
|
||||
try {
|
||||
SysQueryFaceSwipingPo sysQueryFaceSwipingPo = userApplicationService.getFaceSwipingStatus(queryFaceSwipingDTO);
|
||||
return AjaxResult.success("操作成功" , sysQueryFaceSwipingPo);
|
||||
} catch (ServiceException e) {
|
||||
e.printStackTrace();
|
||||
return AjaxResult.error(500, e.getMessage());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return AjaxResult.error(500, "操作失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Log(title = "变更手机号(app)", description = "变更手机号", businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("变更手机号")
|
||||
@PostMapping("/changePhone")
|
||||
public AjaxResult changePhone(@RequestBody UserDTO userDTO) {
|
||||
UserDO userDO = new UserDO();
|
||||
BeanUtils.copyProperties(userDTO, userDO);
|
||||
userApplicationService.changePhone(userDO);
|
||||
return AjaxResult.success("设置成功!");
|
||||
}
|
||||
|
||||
@ApiOperation("根据角色code 查询用户列表")
|
||||
@GetMapping("/listNoPage")
|
||||
public R<List<UserAppPo>> listNoPage(UserDTO userDTO) {
|
||||
//转换实体
|
||||
UserDO userDO = new UserAssember().toUserDO(userDTO);
|
||||
List<UserAppPo> list = userApplicationService.selectAppUserListByRoleCode(userDO);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.mhd.user.interfaces.vo;
|
||||
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class NonePagingListVO {
|
||||
|
||||
@ApiModelProperty(value = "车队id")
|
||||
private Long motorcadeId;
|
||||
|
||||
@ApiModelProperty(value = "车队名称")
|
||||
private String motorcadeName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.mhd.user.interfaces.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 查询所有发货人信息的视图对象
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@ApiModel(value = "QueryAllShipperInfoVo", description = "查询所有发货人信息的视图对象")
|
||||
public class QueryAllShipperInfoVo {
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@ApiModelProperty(value = "用户id", example ="1312")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
@ApiModelProperty(value = "用户名", example = "张三")
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 详细地址
|
||||
*/
|
||||
@ApiModelProperty(value = "详细地址", example = "北京市朝阳区")
|
||||
private String userAreaAddress;
|
||||
|
||||
|
||||
/**
|
||||
* 县区编码
|
||||
*/
|
||||
@ApiModelProperty(name = "县区编码,6位")
|
||||
private Long userAreaCountyId;
|
||||
|
||||
@ApiModelProperty(name = "县区名称")
|
||||
private String userAreaName;
|
||||
|
||||
/**
|
||||
* 用户电话
|
||||
*/
|
||||
@ApiModelProperty(value = "用户电话", example = "13800138000")
|
||||
private String userPhone;
|
||||
|
||||
@ApiModelProperty("货主Id")
|
||||
private Long shipperId;
|
||||
|
||||
|
||||
@ApiModelProperty("企业名称")
|
||||
private String shipperEnterpriseName;
|
||||
|
||||
@ApiModelProperty("是否有默认地址")
|
||||
private Boolean hasDefaultAddress;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.mhd.user.interfaces.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class SettlementInfoQueryVo {
|
||||
@ApiModelProperty(value = "授权额度")
|
||||
private BigDecimal authorizedQuota;
|
||||
|
||||
@ApiModelProperty(value = "结算周期")
|
||||
private Integer settlementDay;
|
||||
|
||||
@ApiModelProperty("使用的授权额度")
|
||||
private BigDecimal authorizedUsedAmount ;
|
||||
}
|
||||
Reference in New Issue
Block a user