工单管理优化
This commit is contained in:
@ -1,7 +1,10 @@
|
||||
package com.xzzn.web.controller.ems;
|
||||
|
||||
import com.xzzn.common.core.controller.BaseController;
|
||||
import com.xzzn.common.core.domain.AjaxResult;
|
||||
import com.xzzn.common.core.page.TableDataInfo;
|
||||
import com.xzzn.common.utils.StringUtils;
|
||||
import com.xzzn.ems.domain.EmsAlarmRecords;
|
||||
import com.xzzn.ems.domain.vo.AlarmRecordListRequestVo;
|
||||
import com.xzzn.ems.domain.vo.AlarmRecordListResponseVo;
|
||||
import com.xzzn.ems.service.IEmsAlarmRecordsService;
|
||||
@ -34,4 +37,22 @@ public class EmsAlarmRecordsController extends BaseController
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成工单
|
||||
*/
|
||||
@PostMapping("/createTicketNo")
|
||||
public AjaxResult createTicketNo(@RequestBody EmsAlarmRecords emsAlarmRecords)
|
||||
{
|
||||
Long id = emsAlarmRecords.getId();
|
||||
if (id == null) {
|
||||
return error("告警id不能为空");
|
||||
}
|
||||
String ticketNo= iEmsAlarmRecordsService.createTicketNo(id,getUserId());
|
||||
if (StringUtils.isNotEmpty(ticketNo) && ticketNo.contains("T")) {
|
||||
return AjaxResult.success("操作成功", ticketNo);
|
||||
} else {
|
||||
return error(ticketNo);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -102,4 +102,15 @@ public class EmsTicketController extends BaseController
|
||||
{
|
||||
return toAjax(emsTicketService.deleteEmsTicketByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 废弃工单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:ticket:delete')")
|
||||
@Log(title = "工单主", businessType = BusinessType.DELETE)
|
||||
@PostMapping("/drop")
|
||||
public AjaxResult drop(@RequestBody EmsTicket emsTicket)
|
||||
{
|
||||
return toAjax(emsTicketService.dropEmsTicketById(emsTicket.getId()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user