Commit 2588cc91 by 杨浩

车辆信息人员身份证

parent 60641cf1
package cn.iocoder.foodnexus.module.operations.controller.admin.vehicleinfo; package cn.iocoder.foodnexus.module.operations.controller.admin.vehicleinfo;
import cn.iocoder.foodnexus.module.operations.dal.dataobject.deliverystaff.DeliveryStaffDO;
import cn.iocoder.foodnexus.module.operations.service.deliverystaff.DeliveryStaffService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import jakarta.annotation.Resource; import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
...@@ -38,6 +41,9 @@ public class VehicleInfoController { ...@@ -38,6 +41,9 @@ public class VehicleInfoController {
@Resource @Resource
private VehicleInfoService vehicleInfoService; private VehicleInfoService vehicleInfoService;
@Autowired
private DeliveryStaffService deliveryStaffService;
@PostMapping("/create") @PostMapping("/create")
@Operation(summary = "创建车辆信息") @Operation(summary = "创建车辆信息")
@PreAuthorize("@ss.hasPermission('operations:vehicle-info:create')") @PreAuthorize("@ss.hasPermission('operations:vehicle-info:create')")
...@@ -94,7 +100,8 @@ public class VehicleInfoController { ...@@ -94,7 +100,8 @@ public class VehicleInfoController {
@PreAuthorize("@ss.hasPermission('operations:vehicle-info:query')") @PreAuthorize("@ss.hasPermission('operations:vehicle-info:query')")
public CommonResult<VehicleInfoRespVO> getVehicleInfo(@RequestParam("id") Long id) { public CommonResult<VehicleInfoRespVO> getVehicleInfo(@RequestParam("id") Long id) {
VehicleInfoDO vehicleInfo = vehicleInfoService.getVehicleInfo(id); VehicleInfoDO vehicleInfo = vehicleInfoService.getVehicleInfo(id);
return success(BeanUtils.toBean(vehicleInfo, VehicleInfoRespVO.class)); return success(BeanUtils.toBean(vehicleInfo, VehicleInfoRespVO.class, item ->
item.setIdNumber(Optional.ofNullable(deliveryStaffService.getDeliveryStaff(item.getVehicleStaff())).map(DeliveryStaffDO::getIdNumber).orElse(""))));
} }
@GetMapping("/page") @GetMapping("/page")
......
...@@ -43,6 +43,10 @@ public class VehicleInfoRespVO { ...@@ -43,6 +43,10 @@ public class VehicleInfoRespVO {
@ExcelProperty("车辆绑定人员名称") @ExcelProperty("车辆绑定人员名称")
private String vehicleStaffName; private String vehicleStaffName;
@Schema(description = "车辆绑定人员身份证")
@ExcelProperty("车辆绑定人员身份证")
private String idNumber;
@Schema(description = "人员出生年份") @Schema(description = "人员出生年份")
@ExcelProperty("人员出生年份") @ExcelProperty("人员出生年份")
private Integer staffYearBirth; private Integer staffYearBirth;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment