| | |
| | | import com.xiaopeng.api.vo.account.LoginUser; |
| | | import com.xiaopeng.common.core.domain.R; |
| | | import com.xiaopeng.common.core.web.page.PageInfo; |
| | | import com.xiaopeng.common.log.annotation.AdminOperationLog; |
| | | import com.xiaopeng.common.log.enums.AdminBusinessType; |
| | | import com.xiaopeng.common.log.enums.AdminOperationType; |
| | | import com.xiaopeng.common.security.service.TokenService; |
| | | import com.xiaopeng.vehicleConvoy.model.dto.FleetAddDTO; |
| | | import com.xiaopeng.vehicleConvoy.model.dto.FleetEditDTO; |
| | |
| | | */ |
| | | @ApiOperation(value = "添加车队", tags = {"管理后台-车队管理"}, notes = "打卡地列表接口在xp-robotaxi-maintenance-boot,人员列表在xp-robotaxi-account-boot") |
| | | @PostMapping("/api/v1/fleet/add") |
| | | @AdminOperationLog( |
| | | businessType = AdminBusinessType.FLEET_MANAGEMENT, |
| | | operationType = AdminOperationType.ADD, |
| | | content = "添加车队", |
| | | appendRequestData = true |
| | | ) |
| | | public R<Void> add(@Valid @RequestBody FleetAddDTO dto) { |
| | | return xpFleetService.add(dto); |
| | | } |
| | |
| | | */ |
| | | @ApiOperation(value = "编辑车队", tags = {"管理后台-车队管理"}, notes = "打卡地列表接口在xp-robotaxi-maintenance-boot,人员列表在xp-robotaxi-account-boot") |
| | | @PostMapping("/api/v1/fleet/edit") |
| | | @AdminOperationLog( |
| | | businessType = AdminBusinessType.FLEET_MANAGEMENT, |
| | | operationType = AdminOperationType.EDIT, |
| | | content = "编辑车队", |
| | | appendRequestData = true |
| | | ) |
| | | public R<Void> edit(@Valid @RequestBody FleetEditDTO dto) { |
| | | return xpFleetService.edit(dto); |
| | | } |
| | |
| | | |
| | | @ApiOperation(value = "删除车队", tags = {"管理后台-车队管理"}) |
| | | @DeleteMapping("/api/v1/fleet/delete/{id}") |
| | | @AdminOperationLog( |
| | | businessType = AdminBusinessType.FLEET_MANAGEMENT, |
| | | operationType = AdminOperationType.DELETE, |
| | | contentExpression = "'删除车队,id=' + #p0", |
| | | appendRequestData = false |
| | | ) |
| | | public R<?> deleteById(@ApiParam(name = "id", value = "车队ID") @PathVariable Long id) { |
| | | xpFleetService.deleteById(id); |
| | | return R.ok(); |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "fleetId", value = "车队ID", dataTypeClass = Long.class), |
| | | @ApiImplicitParam(name = "vehicleId", value = "车辆ID", dataTypeClass = Long.class)}) |
| | | @AdminOperationLog( |
| | | businessType = AdminBusinessType.FLEET_MANAGEMENT, |
| | | operationType = AdminOperationType.ADD, |
| | | contentExpression = "'车队添加车辆成员,fleetId=' + #p0 + ',vehicleId=' + #p1", |
| | | appendRequestData = false |
| | | ) |
| | | public R<?> addVehicle(Long fleetId, Long vehicleId) { |
| | | xpFleetService.addVehicle(fleetId, vehicleId); |
| | | return R.ok(); |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "fleetId", value = "车队ID", dataTypeClass = Long.class), |
| | | @ApiImplicitParam(name = "operationUserId", value = "车辆ID", dataTypeClass = Long.class)}) |
| | | @AdminOperationLog( |
| | | businessType = AdminBusinessType.FLEET_MANAGEMENT, |
| | | operationType = AdminOperationType.ADD, |
| | | contentExpression = "'车队添加人员成员,fleetId=' + #p0 + ',operationUserId=' + #p1", |
| | | appendRequestData = false |
| | | ) |
| | | public R<?> addOperationUserId(Long fleetId, Long operationUserId) { |
| | | xpFleetService.addOperationUserId(fleetId, operationUserId); |
| | | return R.ok(); |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "fleetId", value = "车队ID", dataTypeClass = Long.class, required = true), |
| | | @ApiImplicitParam(name = "vehicleId", value = "车辆ID", dataTypeClass = Long.class, required = true)}) |
| | | @AdminOperationLog( |
| | | businessType = AdminBusinessType.FLEET_MANAGEMENT, |
| | | operationType = AdminOperationType.DELETE, |
| | | contentExpression = "'车队删除车辆成员,fleetId=' + #p0 + ',vehicleId=' + #p1", |
| | | appendRequestData = false |
| | | ) |
| | | public R<?> removeVehicle(Long fleetId, Long vehicleId) { |
| | | xpFleetService.removeVehicle(fleetId, vehicleId); |
| | | return R.ok(); |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "fleetId", value = "车队ID", dataTypeClass = Long.class, required = true), |
| | | @ApiImplicitParam(name = "operationUserId", value = "人员ID", dataTypeClass = Long.class, required = true)}) |
| | | @AdminOperationLog( |
| | | businessType = AdminBusinessType.FLEET_MANAGEMENT, |
| | | operationType = AdminOperationType.DELETE, |
| | | contentExpression = "'车队删除人员成员,fleetId=' + #p0 + ',operationUserId=' + #p1", |
| | | appendRequestData = false |
| | | ) |
| | | public R<?> removeOperationUser(Long fleetId, Long operationUserId) { |
| | | xpFleetService.removeOperationUser(fleetId, operationUserId); |
| | | return R.ok(); |