package com.fzzy.igds.io.notify; import com.fzzy.igds.constant.OrderRespEnum; import com.fzzy.igds.data.QuantityProgressData; import com.fzzy.igds.websocket.WebSocketPacket; import com.fzzy.igds.websocket.WebSocketServer; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; /** * @Description * @Author CZT * @Date 2026/01/08 16:36 */ @Slf4j @Component public class NotifyWebInvokerImpl implements NotifyWebInvoker { @Override public void notifyWeb(String companyId, OrderRespEnum orderResp, String bizType, String notifyMsg) { // 通知前端 WebSocketPacket packet = new WebSocketPacket(); packet.setBizType(bizType); packet.setCompanyId(companyId); packet.setOrderResp(orderResp.getCode()); packet.setData(notifyMsg); WebSocketServer.sendByPocket(packet); } @Override public void notifyQuantityProgress(QuantityProgressData progress) { // 通知前端进度信息 WebSocketPacket packet = new WebSocketPacket(); packet.setBizType("quantity"); packet.setCompanyId(progress.getCompanyId()); packet.setOrderResp(OrderRespEnum.ORDER_INPROGRESS.getCode()); packet.setData(progress); packet.setDeptId(progress.getDeptId()); WebSocketServer.sendByPocket(packet); } }