This commit is contained in:
nyoung 2024-12-23 12:23:39 +08:00
parent 0df4310330
commit 2bdd4d7fa4
2 changed files with 26 additions and 0 deletions

View File

@ -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);
}
}

View File

@ -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;