feat:临时访客车辆,二维码扫码查询审批进度
parent
38a4991c61
commit
bb7aa15f73
|
|
@ -66,7 +66,7 @@ public class VehicleApplyController {
|
||||||
return vehicleApplyService.listPage(qry);
|
return vehicleApplyService.listPage(qry);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("股份、相关方车辆审批-详情")
|
@ApiOperation("股份、相关方、临时车辆审批-详情")
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
public SingleResponse<VehicleApplyCO> getInfoById(@PathVariable("id") Long id) {
|
public SingleResponse<VehicleApplyCO> getInfoById(@PathVariable("id") Long id) {
|
||||||
return SingleResponse.of(vehicleApplyService.getInfoById(id));
|
return SingleResponse.of(vehicleApplyService.getInfoById(id));
|
||||||
|
|
|
||||||
|
|
@ -39,16 +39,17 @@ public class VehicleApplyAddExe {
|
||||||
private final TodoListEventPusherUtil todoListEventPusherUtil;
|
private final TodoListEventPusherUtil todoListEventPusherUtil;
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean execute(VehicleApplyAddCmd cmd) {
|
public VehicleApplyE execute(VehicleApplyAddCmd cmd) {
|
||||||
VehicleApplyE examTypeE = new VehicleApplyE();
|
VehicleApplyE examTypeE = new VehicleApplyE();
|
||||||
BeanUtils.copyProperties(cmd, examTypeE);
|
BeanUtils.copyProperties(cmd, examTypeE);
|
||||||
examTypeE.setStatusFlag(2);
|
examTypeE.setStatusFlag(2);
|
||||||
examTypeE.setBlockedFlag(2);
|
examTypeE.setBlockedFlag(2);
|
||||||
|
examTypeE.setMkmjPermission(2);
|
||||||
examTypeE.setAuditFlag(AuditEnum.WAITING.getCode());
|
examTypeE.setAuditFlag(AuditEnum.WAITING.getCode());
|
||||||
// examTypeE.setApplyTime(DateUtil.date2Str(new Date()));
|
// examTypeE.setApplyTime(DateUtil.date2Str(new Date()));
|
||||||
// 股份、分公司个人车辆
|
// 股份、分公司个人车辆
|
||||||
if (cmd.getVehicleBelongType().equals(VehicleBelongTypeEnum.JGD_PRI_VEHICLES.getCode())
|
if (cmd.getVehicleBelongType().equals(VehicleBelongTypeEnum.JGD_PRI_VEHICLES.getCode()) || cmd.getVehicleBelongType().equals(VehicleBelongTypeEnum.FGS_PRI_VEHICLES.getCode())) {
|
||||||
|| cmd.getVehicleBelongType().equals(VehicleBelongTypeEnum.FGS_PRI_VEHICLES.getCode())) {
|
examTypeE.setMkmjPermission(1);
|
||||||
if (cmd.getEmployeeVehicleUserId() == null) {
|
if (cmd.getEmployeeVehicleUserId() == null) {
|
||||||
SSOUser user = AuthContext.getCurrentUser();
|
SSOUser user = AuthContext.getCurrentUser();
|
||||||
if (user != null) {
|
if (user != null) {
|
||||||
|
|
@ -61,20 +62,14 @@ public class VehicleApplyAddExe {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
vehicleApplyGateway.add(examTypeE);
|
VehicleApplyE add = vehicleApplyGateway.add(examTypeE);
|
||||||
VehicleAuditE build = VehicleAuditE.builder()
|
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();
|
||||||
.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);
|
vehicleAuditGateway.add(build);
|
||||||
// 发送待审核消息
|
// 发送待审核消息
|
||||||
todoListEventPusherUtil.sendMessageAddEvent(build.getSendEventObj());
|
todoListEventPusherUtil.sendMessageAddEvent(build.getSendEventObj());
|
||||||
|
|
||||||
return true;
|
return add;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,7 @@ public class VehicleApplyQueryExe {
|
||||||
vehicleAuditLogs.add(vehicleAuditLog);
|
vehicleAuditLogs.add(vehicleAuditLog);
|
||||||
});
|
});
|
||||||
VehicleApplyCO vehicleApplyCO = vehicleApplyCoConvertor.converDOToCO(vehicleApplyDO);
|
VehicleApplyCO vehicleApplyCO = vehicleApplyCoConvertor.converDOToCO(vehicleApplyDO);
|
||||||
|
vehicleApplyCO.setReasonVisit(vehicleApplyCO.getRemarks());
|
||||||
vehicleApplyCO.setVehicleAuditLogList(vehicleAuditLogs);
|
vehicleApplyCO.setVehicleAuditLogList(vehicleAuditLogs);
|
||||||
if (!list.isEmpty()) {
|
if (!list.isEmpty()) {
|
||||||
VehicleAuditDO vehicleAuditDO = list.get(0);
|
VehicleAuditDO vehicleAuditDO = list.get(0);
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import com.zcloud.primeport.command.VehicleApplyRemoveExe;
|
||||||
import com.zcloud.primeport.command.VehicleApplyUpdateExe;
|
import com.zcloud.primeport.command.VehicleApplyUpdateExe;
|
||||||
import com.zcloud.primeport.command.query.VehicleApplyQueryExe;
|
import com.zcloud.primeport.command.query.VehicleApplyQueryExe;
|
||||||
import com.zcloud.primeport.domain.enums.AuditEnum;
|
import com.zcloud.primeport.domain.enums.AuditEnum;
|
||||||
|
import com.zcloud.primeport.domain.model.VehicleApplyE;
|
||||||
import com.zcloud.primeport.dto.*;
|
import com.zcloud.primeport.dto.*;
|
||||||
import com.zcloud.primeport.dto.clientobject.FgsVehicleCountCo;
|
import com.zcloud.primeport.dto.clientobject.FgsVehicleCountCo;
|
||||||
import com.zcloud.primeport.dto.clientobject.VehicleApplyCO;
|
import com.zcloud.primeport.dto.clientobject.VehicleApplyCO;
|
||||||
|
|
@ -47,9 +48,8 @@ public class VehicleApplyServiceImpl implements VehicleApplyServiceI {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SingleResponse add(VehicleApplyAddCmd cmd) {
|
public SingleResponse add(VehicleApplyAddCmd cmd) {
|
||||||
|
VehicleApplyE execute = vehicleApplyAddExe.execute(cmd);
|
||||||
vehicleApplyAddExe.execute(cmd);
|
return SingleResponse.of(execute);
|
||||||
return SingleResponse.buildSuccess();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -50,5 +50,9 @@ public class VehicleAuditPageQry extends PageQuery {
|
||||||
|
|
||||||
@ApiModelProperty(name = "vehicleApplyId", value = "车辆申请ID(车辆审批记录用)")
|
@ApiModelProperty(name = "vehicleApplyId", value = "车辆申请ID(车辆审批记录用)")
|
||||||
private Long vehicleApplyId;
|
private Long vehicleApplyId;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "h5UserIdCard", value = "H5查询用,申请的临时车辆驾驶人的身份证,车辆申请记录")
|
||||||
|
private String h5UserIdCard;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,8 @@ public class VehicleApplyCO extends ClientObject {
|
||||||
private String projectName;
|
private String projectName;
|
||||||
@ApiModelProperty(value = "名称,来访事由")
|
@ApiModelProperty(value = "名称,来访事由")
|
||||||
private String remarks;
|
private String remarks;
|
||||||
|
@ApiModelProperty(value = "来访事由")
|
||||||
|
private String reasonVisit;
|
||||||
@ApiModelProperty(value = "口门id", name = "mkmjId")
|
@ApiModelProperty(value = "口门id", name = "mkmjId")
|
||||||
private Long mkmjId;
|
private Long mkmjId;
|
||||||
@ApiModelProperty(value = "口门名称", name = "mkmjName")
|
@ApiModelProperty(value = "口门名称", name = "mkmjName")
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,16 @@ public class VehicleAuditCO extends ClientObject {
|
||||||
private String projectName;
|
private String projectName;
|
||||||
@ApiModelProperty(value = "项目id", name = "projectId")
|
@ApiModelProperty(value = "项目id", name = "projectId")
|
||||||
private Long 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")
|
@ApiModelProperty(value = "当前用户是否能审核。1,能审核2不能审核", name = "currentUserCanAudit")
|
||||||
private Integer currentUserCanAudit;
|
private Integer currentUserCanAudit;
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ public interface VehicleApplyGateway {
|
||||||
/**
|
/**
|
||||||
* 新增
|
* 新增
|
||||||
*/
|
*/
|
||||||
Boolean add(VehicleApplyE vehicleApplyE);
|
VehicleApplyE add(VehicleApplyE vehicleApplyE);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改
|
* 修改
|
||||||
|
|
|
||||||
|
|
@ -29,12 +29,12 @@ public class VehicleApplyGatewayImpl implements VehicleApplyGateway {
|
||||||
private final VehicleAuditRepository VehicleAuditRepository;
|
private final VehicleAuditRepository VehicleAuditRepository;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean add(VehicleApplyE vehicleApplyE) {
|
public VehicleApplyE add(VehicleApplyE vehicleApplyE) {
|
||||||
VehicleApplyDO d = new VehicleApplyDO();
|
VehicleApplyDO d = new VehicleApplyDO();
|
||||||
BeanUtils.copyProperties(vehicleApplyE, d);
|
BeanUtils.copyProperties(vehicleApplyE, d);
|
||||||
vehicleApplyRepository.save(d);
|
vehicleApplyRepository.save(d);
|
||||||
vehicleApplyE.setId(d.getId());
|
vehicleApplyE.setId(d.getId());
|
||||||
return true;
|
return vehicleApplyE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -103,6 +103,12 @@ public class VehicleApplyDO extends BaseDO {
|
||||||
@ApiModelProperty(value = "项目人员数")
|
@ApiModelProperty(value = "项目人员数")
|
||||||
private Integer personApplyCount;
|
private Integer personApplyCount;
|
||||||
|
|
||||||
|
private Long mkmjId;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Long mkmjName;
|
||||||
|
|
||||||
|
private String lsUserPhone;
|
||||||
|
private String lsUserIdcard;
|
||||||
|
|
||||||
@ApiModelProperty(value = "审核企业")
|
@ApiModelProperty(value = "审核企业")
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
|
|
|
||||||
|
|
@ -124,5 +124,12 @@ public class VehicleAuditDO extends BaseDO {
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String gateLevelAuthArea;
|
private String gateLevelAuthArea;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String lsUserPhone;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String lsUserIdcard;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String reasonVisit;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,8 @@
|
||||||
va.ls_user_phone,
|
va.ls_user_phone,
|
||||||
va.ls_user_idcard,
|
va.ls_user_idcard,
|
||||||
va.mkmj_id,
|
va.mkmj_id,
|
||||||
va.blocked_flag
|
va.blocked_flag,
|
||||||
|
va.remarks reason_visit
|
||||||
FROM
|
FROM
|
||||||
vehicle_audit AS a
|
vehicle_audit AS a
|
||||||
LEFT JOIN vehicle_apply AS va ON a.vehicle_apply_id = va.id
|
LEFT JOIN vehicle_apply AS va ON a.vehicle_apply_id = va.id
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue