package com.ld.igds.io.impl;
|
|
import com.ld.igds.constant.BizType;
|
import com.ld.igds.gas.dto.GasProgressData;
|
import com.ld.igds.io.constant.OrderRespEnum;
|
import com.ld.igds.pest.dto.PestProgressData;
|
import com.ld.igds.websocket.WebSocketPacket;
|
import com.ld.igds.websocket.WebSocketServer;
|
|
public class NotifyWebParent {
|
|
public void notifyWeb(String companyId, OrderRespEnum orderResp,
|
BizType bizType, String notifyMsg) {
|
// 通知前端
|
WebSocketPacket packet = new WebSocketPacket();
|
packet.setBizType(bizType.getCode());
|
packet.setCompanyId(companyId);
|
packet.setOrderResp(orderResp.getCode());
|
packet.setData(notifyMsg);
|
WebSocketServer.sendByPocket(packet);
|
}
|
|
public void notifyGasProgress(GasProgressData progress) {
|
// 通知前端进度信息
|
WebSocketPacket packet = new WebSocketPacket();
|
packet.setBizType(BizType.GAS.getCode());
|
packet.setCompanyId(progress.getCompanyId());
|
packet.setOrderResp(OrderRespEnum.ORDER_INPROGRESS.getCode());
|
packet.setData(progress);
|
WebSocketServer.sendByPocket(packet);
|
}
|
|
public void notifyPestProgress(PestProgressData progress) {
|
// 通知前端进度信息
|
WebSocketPacket packet = new WebSocketPacket();
|
packet.setBizType(BizType.PEST.getCode());
|
packet.setCompanyId(progress.getCompanyId());
|
packet.setOrderResp(OrderRespEnum.ORDER_INPROGRESS.getCode());
|
packet.setData(progress);
|
WebSocketServer.sendByPocket(packet);
|
}
|
|
}
|