Commit 2b94b455 authored by 王晓倩's avatar 王晓倩

修改工单接口异常提示信息

parent 4a5ae085
......@@ -51,7 +51,7 @@ public class TWorkOrderController extends BaseController
list = tWorkOrderService.selectTWorkOrderList(tWorkOrderForm);
} catch (Exception e) {
e.printStackTrace();
throw new Exception(StringUtils.format("查询工单基础信息列表失败"));
throw new Exception("查询工单基础信息列表失败");
}
return getDataTable(list);
}
......@@ -69,7 +69,7 @@ public class TWorkOrderController extends BaseController
list = tWorkOrderService.selectTWorkOrderList(tWorkOrderForm);
} catch (Exception e) {
e.printStackTrace();
throw new Exception(StringUtils.format("导出工单基础信息列表失败"));
throw new Exception("导出工单基础信息列表失败");
}
ExcelUtil<WorkOrderVo> util = new ExcelUtil<WorkOrderVo>(WorkOrderVo.class);
return util.exportExcel(list, "工单基础信息数据");
......@@ -87,7 +87,7 @@ public class TWorkOrderController extends BaseController
workOrderVo = tWorkOrderService.selectTWorkOrderById(orderId);
} catch (Exception e) {
e.printStackTrace();
throw new Exception(StringUtils.format("获取工单({})工详细信息失败", orderId));
throw new Exception("获取工单详细信息失败");
}
return AjaxResult.success(workOrderVo);
}
......@@ -104,7 +104,7 @@ public class TWorkOrderController extends BaseController
tWorkOrderService.insertTWorkOrder(tWorkOrder);
} catch (Exception e) {
e.printStackTrace();
throw new Exception(StringUtils.format("工单({})信息有误", tWorkOrder.getOrderId()));
throw new Exception("新增工单信息失败");
}
return AjaxResult.success();
}
......@@ -120,14 +120,14 @@ public class TWorkOrderController extends BaseController
String orderStatus = tWorkOrder.getOrderStatus();
// 工单状态只有是0未接收才允许修改
if(!"0".equals(orderStatus)){
throw new Exception(StringUtils.format("工单({})当前状态不允许修改", tWorkOrder.getOrderId()));
throw new Exception("当前状态不允许修改");
}
try {
tWorkOrderService.updateTWorkOrder(tWorkOrder);
} catch (Exception e) {
e.printStackTrace();
throw new Exception(StringUtils.format("修改工单({})信息失败,", tWorkOrder.getOrderId()));
throw new Exception("修改工单信息失败");
}
return AjaxResult.success();
}
......@@ -149,14 +149,14 @@ public class TWorkOrderController extends BaseController
} else if("2".equals(orderStatus)) {
tWorkOrder.setOrderStatus("3");
} else if("3".equals(orderStatus)) {
throw new Exception(StringUtils.format("工单({})已归档,不允许更改状态", tWorkOrder.getOrderId()));
throw new Exception("当前工单已归档,不允许更改状态");
}
try {
tWorkOrderService.updateTWorkOrder(tWorkOrder);
} catch (Exception e) {
e.printStackTrace();
throw new Exception(StringUtils.format("修改工单({})状态失败", tWorkOrder.getOrderId()));
throw new Exception("修改工单状态失败");
}
return AjaxResult.success();
}
......
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