feat:临时访客车辆,二维码扫码查询审批进度

koumen
dearLin 2026-03-18 09:24:16 +08:00
parent 38a4991c61
commit bb7aa15f73
12 changed files with 46 additions and 20 deletions

View File

@ -66,7 +66,7 @@ public class VehicleApplyController {
return vehicleApplyService.listPage(qry);
}
@ApiOperation("股份、相关方车辆审批-详情")
@ApiOperation("股份、相关方、临时车辆审批-详情")
@GetMapping("/{id}")
public SingleResponse<VehicleApplyCO> getInfoById(@PathVariable("id") Long id) {
return SingleResponse.of(vehicleApplyService.getInfoById(id));

View File

@ -39,16 +39,17 @@ public class VehicleApplyAddExe {
private final TodoListEventPusherUtil todoListEventPusherUtil;
@Transactional(rollbackFor = Exception.class)
public boolean execute(VehicleApplyAddCmd cmd) {
public VehicleApplyE execute(VehicleApplyAddCmd cmd) {
VehicleApplyE examTypeE = new VehicleApplyE();
BeanUtils.copyProperties(cmd, examTypeE);
examTypeE.setStatusFlag(2);
examTypeE.setBlockedFlag(2);
examTypeE.setMkmjPermission(2);
examTypeE.setAuditFlag(AuditEnum.WAITING.getCode());
// examTypeE.setApplyTime(DateUtil.date2Str(new Date()));
// 股份、分公司个人车辆
if (cmd.getVehicleBelongType().equals(VehicleBelongTypeEnum.JGD_PRI_VEHICLES.getCode())
|| cmd.getVehicleBelongType().equals(VehicleBelongTypeEnum.FGS_PRI_VEHICLES.getCode())) {
if (cmd.getVehicleBelongType().equals(VehicleBelongTypeEnum.JGD_PRI_VEHICLES.getCode()) || cmd.getVehicleBelongType().equals(VehicleBelongTypeEnum.FGS_PRI_VEHICLES.getCode())) {
examTypeE.setMkmjPermission(1);
if (cmd.getEmployeeVehicleUserId() == null) {
SSOUser user = AuthContext.getCurrentUser();
if (user != null) {
@ -61,20 +62,14 @@ public class VehicleApplyAddExe {
}
}
}
vehicleApplyGateway.add(examTypeE);
VehicleAuditE build = VehicleAuditE.builder()
.vehicleApplyId(examTypeE.getId()).batchState(1).batchType(1)
.auditUserId(examTypeE.getAuditUserId())
.auditUserName(examTypeE.getAuditUserName())
.auditDeptId(examTypeE.getAuditDeptId()).auditDeptName(examTypeE.getAuditDeptName()).
auditCorpId(examTypeE.getAuditCorpId()).auditCorpName(examTypeE.getAuditCorpName())
.auditStatus(AuditEnum.WAITING.getCode()).changeAfter(JSON.toJSONString(examTypeE)).build();
VehicleApplyE add = vehicleApplyGateway.add(examTypeE);
VehicleAuditE build = VehicleAuditE.builder().vehicleApplyId(examTypeE.getId()).batchState(1).batchType(1).auditUserId(examTypeE.getAuditUserId()).auditUserName(examTypeE.getAuditUserName()).auditDeptId(examTypeE.getAuditDeptId()).auditDeptName(examTypeE.getAuditDeptName()).auditCorpId(examTypeE.getAuditCorpId()).auditCorpName(examTypeE.getAuditCorpName()).auditStatus(AuditEnum.WAITING.getCode()).changeAfter(JSON.toJSONString(examTypeE)).build();
// 添加审批信息
vehicleAuditGateway.add(build);
// 发送待审核消息
todoListEventPusherUtil.sendMessageAddEvent(build.getSendEventObj());
return true;
return add;
}
}

View File

@ -61,6 +61,7 @@ public class VehicleApplyQueryExe {
vehicleAuditLogs.add(vehicleAuditLog);
});
VehicleApplyCO vehicleApplyCO = vehicleApplyCoConvertor.converDOToCO(vehicleApplyDO);
vehicleApplyCO.setReasonVisit(vehicleApplyCO.getRemarks());
vehicleApplyCO.setVehicleAuditLogList(vehicleAuditLogs);
if (!list.isEmpty()) {
VehicleAuditDO vehicleAuditDO = list.get(0);

View File

@ -10,6 +10,7 @@ import com.zcloud.primeport.command.VehicleApplyRemoveExe;
import com.zcloud.primeport.command.VehicleApplyUpdateExe;
import com.zcloud.primeport.command.query.VehicleApplyQueryExe;
import com.zcloud.primeport.domain.enums.AuditEnum;
import com.zcloud.primeport.domain.model.VehicleApplyE;
import com.zcloud.primeport.dto.*;
import com.zcloud.primeport.dto.clientobject.FgsVehicleCountCo;
import com.zcloud.primeport.dto.clientobject.VehicleApplyCO;
@ -47,9 +48,8 @@ public class VehicleApplyServiceImpl implements VehicleApplyServiceI {
@Override
public SingleResponse add(VehicleApplyAddCmd cmd) {
vehicleApplyAddExe.execute(cmd);
return SingleResponse.buildSuccess();
VehicleApplyE execute = vehicleApplyAddExe.execute(cmd);
return SingleResponse.of(execute);
}
@Override

View File

@ -50,5 +50,9 @@ public class VehicleAuditPageQry extends PageQuery {
@ApiModelProperty(name = "vehicleApplyId", value = "车辆申请ID车辆审批记录用")
private Long vehicleApplyId;
@ApiModelProperty(name = "h5UserIdCard", value = "H5查询用申请的临时车辆驾驶人的身份证车辆申请记录")
private String h5UserIdCard;
}

View File

@ -98,6 +98,8 @@ public class VehicleApplyCO extends ClientObject {
private String projectName;
@ApiModelProperty(value = "名称,来访事由")
private String remarks;
@ApiModelProperty(value = "来访事由")
private String reasonVisit;
@ApiModelProperty(value = "口门id", name = "mkmjId")
private Long mkmjId;
@ApiModelProperty(value = "口门名称", name = "mkmjName")

View File

@ -104,6 +104,16 @@ public class VehicleAuditCO extends ClientObject {
private String projectName;
@ApiModelProperty(value = "项目id", name = "projectId")
private Long projectId;
@ApiModelProperty(value = "口门id", name = "mkmjId")
private Long mkmjId;
@ApiModelProperty(value = "口门名称", name = "mkmjName")
private String mkmjName;
@ApiModelProperty(value = "临时申请驾驶人手机号", name = "lsUserPhone")
private String lsUserPhone;
@ApiModelProperty(value = "临时申请驾驶人身份证", name = "lsUserIdcard")
private String lsUserIdcard;
@ApiModelProperty(value = "来访事由", name = "reasonVisit")
private String reasonVisit;
@ApiModelProperty(value = "当前用户是否能审核。1能审核2不能审核", name = "currentUserCanAudit")
private Integer currentUserCanAudit;

View File

@ -15,7 +15,7 @@ public interface VehicleApplyGateway {
/**
*
*/
Boolean add(VehicleApplyE vehicleApplyE);
VehicleApplyE add(VehicleApplyE vehicleApplyE);
/**
*

View File

@ -29,12 +29,12 @@ public class VehicleApplyGatewayImpl implements VehicleApplyGateway {
private final VehicleAuditRepository VehicleAuditRepository;
@Override
public Boolean add(VehicleApplyE vehicleApplyE) {
public VehicleApplyE add(VehicleApplyE vehicleApplyE) {
VehicleApplyDO d = new VehicleApplyDO();
BeanUtils.copyProperties(vehicleApplyE, d);
vehicleApplyRepository.save(d);
vehicleApplyE.setId(d.getId());
return true;
return vehicleApplyE;
}
@Override

View File

@ -103,6 +103,12 @@ public class VehicleApplyDO extends BaseDO {
@ApiModelProperty(value = "项目人员数")
private Integer personApplyCount;
private Long mkmjId;
@TableField(exist = false)
private Long mkmjName;
private String lsUserPhone;
private String lsUserIdcard;
@ApiModelProperty(value = "审核企业")
@TableField(exist = false)

View File

@ -124,5 +124,12 @@ public class VehicleAuditDO extends BaseDO {
@TableField(exist = false)
private String gateLevelAuthArea;
@TableField(exist = false)
private String lsUserPhone;
@TableField(exist = false)
private String lsUserIdcard;
@TableField(exist = false)
private String reasonVisit;
}

View File

@ -45,7 +45,8 @@
va.ls_user_phone,
va.ls_user_idcard,
va.mkmj_id,
va.blocked_flag
va.blocked_flag,
va.remarks reason_visit
FROM
vehicle_audit AS a
LEFT JOIN vehicle_apply AS va ON a.vehicle_apply_id = va.id