diff --git a/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/app/controller/admin/RescueInfoController.java b/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/app/controller/admin/RescueInfoController.java index 26b7c4cb..4a7cf012 100644 --- a/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/app/controller/admin/RescueInfoController.java +++ b/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/app/controller/admin/RescueInfoController.java @@ -9,6 +9,7 @@ import cn.iocoder.yudao.module.rescue.domain.RescueInfo; import cn.iocoder.yudao.module.rescue.dto.DriverInfo2Dto; import cn.iocoder.yudao.module.rescue.dto.DriverInfoDto; import cn.iocoder.yudao.module.rescue.service.IRescueInfoService; +import cn.iocoder.yudao.module.rescue.utils.StringUtils; import cn.iocoder.yudao.module.system.api.permission.PermissionApi; import cn.iocoder.yudao.module.system.api.permission.RoleApi; import cn.iocoder.yudao.module.system.api.permission.dto.RoleReqDTO; @@ -249,4 +250,21 @@ public class RescueInfoController extends BaseController { public CommonResult statisticsInfo(String type) { return success(rescueInfoService.statisticsInfo(type)); } + + + + @PostMapping("/toRepair") + public CommonResult toRepair(Long id) { + RescueInfo rescueInfo = rescueInfoService.getById(id); + if("1".equals(rescueInfo.getIsWeiXiu())){ + return error("已转维修,请勿重复操作"); + } + //创建维修订单 + + + + rescueInfo.setIsWeiXiu("1"); + rescueInfoService.updateRescueInfo(rescueInfo); + return success(rescueInfo); + } } diff --git a/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/domain/RescueInfo.java b/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/domain/RescueInfo.java index 1e29b112..f0550052 100644 --- a/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/domain/RescueInfo.java +++ b/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/domain/RescueInfo.java @@ -46,6 +46,14 @@ public class RescueInfo extends TenantBaseDO @Excel(name = "司机车牌号") private String driverCarNum; + /** 是否扣车 */ + @NotEmpty(message = "是否扣车不能为空") + private String isKouChe; + + /** 是否维修 */ + @NotEmpty(message = "是否维修不能为空") + private String isWeiXiu; + /** 是否为预约单 */ @NotEmpty(message = "是否为预约单不能为空") private String isAppointment;