|
|
@ -7,14 +7,17 @@ import com.ruoyi.common.core.page.TableDataInfo; |
|
|
|
import com.ruoyi.common.enums.BusinessType; |
|
|
|
import com.ruoyi.common.utils.poi.ExcelUtil; |
|
|
|
import com.zc.business.domain.DcEvent; |
|
|
|
import com.zc.business.domain.DcNoStakeWarningTable; |
|
|
|
import com.zc.business.enums.UniversalEnum; |
|
|
|
import com.zc.business.service.IDcEventService; |
|
|
|
import com.zc.business.service.impl.DcNoStakeWarningTableServiceImpl; |
|
|
|
import com.zc.common.core.websocket.WebSocketService; |
|
|
|
import com.zc.common.core.websocket.constant.WebSocketEvent; |
|
|
|
import io.swagger.annotations.*; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
import java.io.UnsupportedEncodingException; |
|
|
|
import java.net.URLEncoder; |
|
|
@ -39,7 +42,8 @@ public class DcEventController extends BaseController |
|
|
|
{ |
|
|
|
@Autowired |
|
|
|
private IDcEventService dcEventService; |
|
|
|
|
|
|
|
@Resource |
|
|
|
private DcNoStakeWarningTableServiceImpl dcNoStakeWarningTableService; |
|
|
|
/** |
|
|
|
* 查询事件信息列表 |
|
|
|
*/ |
|
|
@ -285,6 +289,15 @@ if (eventState==UniversalEnum.ZERO.getNumber()){ |
|
|
|
contentMap.put("contentType", title); |
|
|
|
contentMap.put("message", message); |
|
|
|
contentMap.put("warningTime", new Date()); |
|
|
|
|
|
|
|
DcNoStakeWarningTable dcNoStakeWarningTable = new DcNoStakeWarningTable(); |
|
|
|
dcNoStakeWarningTable.setWarningDescription(message); |
|
|
|
dcNoStakeWarningTable.setWarningType(UniversalEnum.FOUR.getValue()); |
|
|
|
dcNoStakeWarningTable.setOtherConfig(payload.toString()); |
|
|
|
dcNoStakeWarningTable.setWarningTime(new Date()); |
|
|
|
//存入记录
|
|
|
|
dcNoStakeWarningTableService.addDcNoStakeWarningTable(dcNoStakeWarningTable); |
|
|
|
|
|
|
|
WebSocketService.broadcast("opticalFiberAlarm", contentMap); |
|
|
|
return AjaxResult.success(); |
|
|
|
} |
|
|
|