first commit
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user