|
@@ -0,0 +1,467 @@
|
|
|
+package com.gyee.alarm.service;
|
|
|
+
|
|
|
+import com.gyee.alarm.init.CacheContext;
|
|
|
+import com.gyee.alarm.model.auto.*;
|
|
|
+import com.gyee.alarm.model.vo.*;
|
|
|
+import com.gyee.alarm.service.auto.IAlarmTsService;
|
|
|
+import com.gyee.alarm.service.auto.IProEconAlarmInfoService;
|
|
|
+import com.gyee.alarm.util.DateUtils;
|
|
|
+import com.gyee.alarm.util.StringUtils;
|
|
|
+import com.gyee.alarm.websocket.PushParams;
|
|
|
+import com.gyee.alarm.websocket.WebSocket;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+import javax.websocket.EncodeException;
|
|
|
+import java.io.IOException;
|
|
|
+import java.sql.SQLException;
|
|
|
+import java.sql.Timestamp;
|
|
|
+import java.util.*;
|
|
|
+import java.util.concurrent.ConcurrentHashMap;
|
|
|
+
|
|
|
+@Service
|
|
|
+
|
|
|
+public class AlarmInService {
|
|
|
+ @Resource
|
|
|
+ private IAlarmTsService alarmTsService;
|
|
|
+ @Resource
|
|
|
+ private IProEconAlarmInfoService proEconAlarmInfoService;
|
|
|
+ @Value("${initialcode}")
|
|
|
+ private String initialcode;
|
|
|
+ @Value("${pushinterval}")
|
|
|
+ private Double pushinterval;
|
|
|
+ @Resource
|
|
|
+ private WebSocket webSocket;
|
|
|
+ public void dropSuperTable()
|
|
|
+ {
|
|
|
+ alarmTsService.dropSuperTable(AlarmSuperTalbeType.WT.getCode());
|
|
|
+ }
|
|
|
+ public void createSuperTable()
|
|
|
+ {
|
|
|
+
|
|
|
+ alarmTsService.createSuperTable(AlarmSuperTalbeType.WT.getCode());
|
|
|
+ }
|
|
|
+
|
|
|
+ public void initalWtAlarm() throws SQLException {
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ List<AlarmVo> alarmVoList=CacheContext.alarmWtList;
|
|
|
+ List<AlarmTag> alarmTags=new ArrayList<>();
|
|
|
+
|
|
|
+
|
|
|
+ if(!alarmVoList.isEmpty())
|
|
|
+ {
|
|
|
+ for(AlarmVo vo: alarmVoList)
|
|
|
+ {
|
|
|
+
|
|
|
+
|
|
|
+ alarmTsService.createTable(vo.getTbName(), vo.getAlarmid(), vo.getAlarmtype(),
|
|
|
+ vo.getCharacteristic(), vo.getComponents(),
|
|
|
+ vo.getDescription(),
|
|
|
+ vo.getDeviceid(), vo.getDevicename(),
|
|
|
+ vo.getDevicetype(), vo.getEnabled(),
|
|
|
+ vo.getLineid(), vo.getLinename(),
|
|
|
+ vo.getModelId(), vo.getProjectid(),
|
|
|
+ vo.getProjectname(), vo.getRank(),
|
|
|
+ vo.getResettable(), vo.getStationid(),
|
|
|
+ vo.getStationname(), vo.getSubcomponents(),
|
|
|
+ vo.getSuffix(), vo.getTagid(),
|
|
|
+ vo.getTriggertype(), vo.getUniformcode(),vo.getSuperTableName());
|
|
|
+
|
|
|
+ AlarmTag po=new AlarmTag();
|
|
|
+ po.setId(vo.getTbName());
|
|
|
+ po.setVal(0.0);
|
|
|
+ po.setTriggerType(vo.getTriggertype());
|
|
|
+ po.setTagId(vo.getTagid());
|
|
|
+ po.setOval(0.0);
|
|
|
+ po.setRank(vo.getRank());
|
|
|
+ po.setTimeLong(0.0);
|
|
|
+ po.setTs(new Date().getTime());
|
|
|
+ alarmTags.add(po);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ alarmTsService.insertList(alarmTags);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public List<AlarmVo> initalAlarmVo() {
|
|
|
+
|
|
|
+ List<AlarmVo> alarmVoList=new ArrayList<>();
|
|
|
+ Map<String, List<ProEconAlarmConfiguration>> wtAlarmMap = CacheContext.wtAlarmMap;
|
|
|
+ Map<String, Map<String, ProBasicEquipmentPoint>> wtpAimap = CacheContext.wtpAimap;
|
|
|
+ for (ProBasicEquipment wt : CacheContext.wtls) {
|
|
|
+
|
|
|
+ if (wtpAimap.containsKey(wt.getId())) {
|
|
|
+ Map<String, ProBasicEquipmentPoint> pointMap = wtpAimap.get(wt.getId());
|
|
|
+
|
|
|
+ StringBuilder sb = new StringBuilder();
|
|
|
+ sb.append(wt.getWindpowerstationId() + wt.getModelId());
|
|
|
+ if (StringUtils.notEmp(pointMap) && wtAlarmMap.containsKey(String.valueOf(sb))) {
|
|
|
+ List<ProEconAlarmConfiguration> alarmls = wtAlarmMap.get(String.valueOf(sb));
|
|
|
+
|
|
|
+ if (!alarmls.isEmpty()) {
|
|
|
+ for (ProEconAlarmConfiguration alarm : alarmls) {
|
|
|
+ if (pointMap.containsKey(alarm.getUniformCode())) {
|
|
|
+ ProBasicEquipmentPoint equipmentPoint = pointMap.get(alarm.getUniformCode());
|
|
|
+
|
|
|
+ if(StringUtils.notEmp(initialcode) &&
|
|
|
+ StringUtils.notEmp(equipmentPoint.getNemCode()) &&
|
|
|
+ !equipmentPoint.getNemCode().equals(initialcode) &&
|
|
|
+ alarm.getAlarmType().equals(AlarmTypeValue.IN.getCode())
|
|
|
+ )
|
|
|
+ {
|
|
|
+ AlarmVo vo=new AlarmVo();
|
|
|
+ StringBuilder tbName = new StringBuilder();
|
|
|
+ tbName.append(wt.getId()).append("_").append(alarm.getId());
|
|
|
+ vo.setTbName(String.valueOf(tbName));
|
|
|
+ vo.setAlarmid(alarm.getId());
|
|
|
+ vo.setTagid(equipmentPoint.getNemCode());
|
|
|
+ vo.setAlarmtype(alarm.getAlarmType());
|
|
|
+ vo.setCharacteristic(alarm.getCharacteristic());
|
|
|
+ vo.setComponents(alarm.getComponents());
|
|
|
+ vo.setDescription(alarm.getDescription());
|
|
|
+ vo.setDeviceid(wt.getId());
|
|
|
+ vo.setDevicename(wt.getName());
|
|
|
+ vo.setDevicetype(alarm.getDeviceType());
|
|
|
+ vo.setEnabled(alarm.getEnable());
|
|
|
+ vo.setLineid(wt.getLineId());
|
|
|
+ if(CacheContext.lnmap.containsKey(wt.getLineId()))
|
|
|
+ {
|
|
|
+ ProBasicLine ln=CacheContext.lnmap.get(wt.getLineId());
|
|
|
+ vo.setLinename(ln.getName());
|
|
|
+ }
|
|
|
+ vo.setModelId(wt.getModelId());
|
|
|
+ vo.setProjectid(wt.getProjectId());
|
|
|
+ if(CacheContext.pjmap.containsKey(wt.getProjectId()))
|
|
|
+ {
|
|
|
+ ProBasicProject pj=CacheContext.pjmap.get(wt.getProjectId());
|
|
|
+ vo.setProjectname(pj.getName());
|
|
|
+ }
|
|
|
+ vo.setRank(alarm.getRank());
|
|
|
+ vo.setResettable(alarm.getResetTable());
|
|
|
+ vo.setStationid(wt.getWindpowerstationId());
|
|
|
+ if(CacheContext.wpmap.containsKey(wt.getWindpowerstationId()))
|
|
|
+ {
|
|
|
+ ProBasicPowerstation wp=CacheContext.wpmap.get(wt.getWindpowerstationId());
|
|
|
+ vo.setStationname(wp.getName());
|
|
|
+ }
|
|
|
+ vo.setSubcomponents(alarm.getSubcomponents());
|
|
|
+ vo.setSuffix(alarm.getSuffix());
|
|
|
+ vo.setTriggertype(alarm.getTriggerType());
|
|
|
+ vo.setUniformcode(alarm.getUniformCode());
|
|
|
+ vo.setSuperTableName(AlarmSuperTalbeType.WT.getCode());
|
|
|
+ vo.setVal(0);
|
|
|
+ alarmVoList.add(vo);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+// else {
|
|
|
+//
|
|
|
+// //临时创建表
|
|
|
+// AlarmVo vo=new AlarmVo();
|
|
|
+// StringBuilder tbName = new StringBuilder();
|
|
|
+// tbName.append(wt.getId()).append("_").append(alarm.getId());
|
|
|
+// vo.setTbName(String.valueOf(tbName));
|
|
|
+// vo.setAlarmid(alarm.getId());
|
|
|
+// vo.setTagid("GF-TZ-SYZ.038200G9911SYB99GI017DB0111PA99RAW01");
|
|
|
+// vo.setAlarmtype(alarm.getAlarmType());
|
|
|
+// vo.setCharacteristic(alarm.getCharacteristic());
|
|
|
+// vo.setComponents(alarm.getComponents());
|
|
|
+// vo.setDescription(alarm.getDescription());
|
|
|
+// vo.setDeviceid(wt.getId());
|
|
|
+// vo.setDevicename(wt.getName());
|
|
|
+// vo.setDevicetype(alarm.getDeviceType());
|
|
|
+// vo.setEnabled(alarm.getEnable());
|
|
|
+// vo.setLineid(wt.getLineId());
|
|
|
+// if(CacheContext.lnmap.containsKey(wt.getLineId()))
|
|
|
+// {
|
|
|
+// ProBasicLine ln=CacheContext.lnmap.get(wt.getLineId());
|
|
|
+// vo.setLinename(ln.getName());
|
|
|
+// }
|
|
|
+// vo.setModelId(wt.getModelId());
|
|
|
+// vo.setProjectid(wt.getProjectId());
|
|
|
+// if(CacheContext.pjmap.containsKey(wt.getProjectId()))
|
|
|
+// {
|
|
|
+// ProBasicProject pj=CacheContext.pjmap.get(wt.getProjectId());
|
|
|
+// vo.setProjectname(pj.getName());
|
|
|
+// }
|
|
|
+// vo.setRank(alarm.getRank());
|
|
|
+// vo.setResettable(alarm.getResetTable());
|
|
|
+// vo.setStationid(wt.getWindpowerstationId());
|
|
|
+// if(CacheContext.wpmap.containsKey(wt.getWindpowerstationId()))
|
|
|
+// {
|
|
|
+// ProBasicPowerstation wp=CacheContext.wpmap.get(wt.getWindpowerstationId());
|
|
|
+// vo.setStationname(wp.getName());
|
|
|
+// }
|
|
|
+// vo.setSubcomponents(alarm.getSubcomponents());
|
|
|
+// vo.setSuffix(alarm.getSuffix());
|
|
|
+// vo.setTriggertype(alarm.getTriggerType());
|
|
|
+// vo.setUniformcode(alarm.getUniformCode());
|
|
|
+// vo.setSuperTableName(AlarmSuperTalbeType.WT.getCode());
|
|
|
+// vo.setVal(0);
|
|
|
+// vo.setOval(0);
|
|
|
+// alarmVoList.add(vo);
|
|
|
+//
|
|
|
+// }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ return alarmVoList;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ public List<AlarmTag> findTags(String stbaleName)
|
|
|
+ {
|
|
|
+ List<AlarmTag> ls=new ArrayList<>();
|
|
|
+ if(StringUtils.notEmp(stbaleName))
|
|
|
+ {
|
|
|
+ // List<AlarmVo> vos= alarmTsService.findTags(stbaleName);
|
|
|
+ List<AlarmVo> vos= CacheContext.alarmWtList;
|
|
|
+ if(!vos.isEmpty())
|
|
|
+ {
|
|
|
+ for(AlarmVo vo:vos)
|
|
|
+ {
|
|
|
+ AlarmTag po=new AlarmTag();
|
|
|
+ po.setId(vo.getTbName());
|
|
|
+ po.setOval(vo.getVal().doubleValue());
|
|
|
+ po.setTriggerType(vo.getTriggertype());
|
|
|
+ po.setTagId(vo.getTagid());
|
|
|
+ po.setVal(vo.getVal().doubleValue());
|
|
|
+ po.setRank(vo.getRank());
|
|
|
+
|
|
|
+ ls.add(po);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return ls;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public synchronized void saveAlarms(List<AlarmTag> ls) throws EncodeException, IOException {
|
|
|
+
|
|
|
+ if(StringUtils.notEmp(ls) && !ls.isEmpty()) {
|
|
|
+
|
|
|
+ alarmTsService.insertList(ls);
|
|
|
+
|
|
|
+
|
|
|
+ if (StringUtils.notEmp(ls) && !ls.isEmpty()) {
|
|
|
+
|
|
|
+ List<ProEconAlarmInfo> valuels = new ArrayList<>();
|
|
|
+ for (AlarmTag alarm : ls) {
|
|
|
+ if (CacheContext.alarmWtMap.containsKey(alarm.getId())) {
|
|
|
+ AlarmVo vo = CacheContext.alarmWtMap.get(alarm.getId());
|
|
|
+ ProEconAlarmInfo po = new ProEconAlarmInfo();
|
|
|
+ po.setTbname(vo.getTbName());
|
|
|
+ po.setLastUpdateTime(new Date(alarm.getTs()));
|
|
|
+ po.setTagId(alarm.getTagId());
|
|
|
+ po.setTriggerType(alarm.getTriggerType());
|
|
|
+ po.setAlarmId(vo.getAlarmid());
|
|
|
+ po.setDeviceId(vo.getDeviceid());
|
|
|
+ po.setSubcomponents(vo.getSuffix());
|
|
|
+ po.setRank(vo.getRank());
|
|
|
+ po.setConfirmed(false);
|
|
|
+ po.setUniformCode(vo.getUniformcode());
|
|
|
+ po.setAlarmType(vo.getAlarmtype());
|
|
|
+ po.setDeviceType(vo.getDevicetype());
|
|
|
+ po.setComponents(vo.getComponents());
|
|
|
+ po.setSubcomponents(vo.getSubcomponents());
|
|
|
+ po.setDescription(vo.getDescription());
|
|
|
+ po.setModelId(vo.getModelId());
|
|
|
+ po.setResetTable(vo.getResettable());
|
|
|
+ po.setEnable(vo.getEnabled());
|
|
|
+ po.setCharacteristic(vo.getCharacteristic());
|
|
|
+ po.setStationId(vo.getStationid());
|
|
|
+ po.setProjectId(vo.getProjectid());
|
|
|
+ po.setLineId(vo.getLineid());
|
|
|
+ po.setStationName(vo.getStationname());
|
|
|
+ po.setProjectiName(vo.getProjectname());
|
|
|
+ po.setLineidName(vo.getLinename());
|
|
|
+ po.setDeviceName(vo.getDevicename());
|
|
|
+ po.setOval(alarm.getOval().intValue());
|
|
|
+ po.setIsOpen(1);
|
|
|
+ po.setVal(alarm.getVal().intValue());
|
|
|
+
|
|
|
+ alarm.setDescription(vo.getDescription());
|
|
|
+ alarm.setAlarmType(vo.getAlarmtype());
|
|
|
+ alarm.setDeviceType(vo.getDevicetype());
|
|
|
+ pushData(alarm);
|
|
|
+
|
|
|
+ valuels.add(po);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ List<String> idls = new ArrayList<>();
|
|
|
+ for (ProEconAlarmInfo vo : valuels) {
|
|
|
+ idls.add(vo.getTbname());
|
|
|
+ }
|
|
|
+ if (!idls.isEmpty()) {
|
|
|
+
|
|
|
+ proEconAlarmInfoService.removeByIds(idls);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ List<ProEconAlarmInfo> templs = new ArrayList<>();
|
|
|
+ for (ProEconAlarmInfo vo : valuels) {
|
|
|
+ templs.add(vo);
|
|
|
+ if (templs.size() == 100) {
|
|
|
+ proEconAlarmInfoService.saveBatch(templs);
|
|
|
+ templs = new ArrayList<>();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!templs.isEmpty()) {
|
|
|
+ proEconAlarmInfoService.saveBatch(templs);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public synchronized void updateAlarms(List<AlarmTag> ls) {
|
|
|
+
|
|
|
+ if (StringUtils.notEmp(ls) && !ls.isEmpty()) {
|
|
|
+
|
|
|
+ StringBuilder sb=new StringBuilder();
|
|
|
+ Map<String, AlarmSimpleVo> map=new HashMap<>();
|
|
|
+ for (AlarmTag alarm : ls) {
|
|
|
+ sb.append("'").append(alarm.getId()).append("',");
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ String ids=sb.substring(0,sb.length()-1);
|
|
|
+
|
|
|
+ List<AlarmSimpleVo> alarmls=alarmTsService.selectLastRowByTbname(AlarmSuperTalbeType.WT.getCode(),ids);
|
|
|
+ if(!alarmls.isEmpty())
|
|
|
+ {
|
|
|
+ for(AlarmSimpleVo vo:alarmls)
|
|
|
+ {
|
|
|
+ map.put(vo.getTbName(),vo);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ for (AlarmTag alarm : ls) {
|
|
|
+ if(map.containsKey(alarm.getId()))
|
|
|
+ {
|
|
|
+ AlarmSimpleVo tag=map.get(alarm.getId());
|
|
|
+ alarm.setTs(tag.getTs().getTime());
|
|
|
+
|
|
|
+ Date begin = new Date(alarm.getEndts());
|
|
|
+ Date end = new Date(alarm.getTs());
|
|
|
+
|
|
|
+ double value= DateUtils.secondsDiff(begin,end);
|
|
|
+ alarm.setTimeLong(value);
|
|
|
+ alarm.setConfirmed(tag.getConfirmed());
|
|
|
+ alarm.setSuperTalbe(AlarmSuperTalbeType.WT.getCode());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ alarmTsService.insertList(ls);
|
|
|
+
|
|
|
+
|
|
|
+ if (StringUtils.notEmp(ls) && !ls.isEmpty()) {
|
|
|
+
|
|
|
+ List<ProEconAlarmInfo> valuels = new ArrayList<>();
|
|
|
+ for (AlarmTag alarm : ls) {
|
|
|
+ if (CacheContext.alarmWtMap.containsKey(alarm.getId())) {
|
|
|
+ AlarmVo vo = CacheContext.alarmWtMap.get(alarm.getId());
|
|
|
+ ProEconAlarmInfo po = new ProEconAlarmInfo();
|
|
|
+ po.setTbname(vo.getTbName());
|
|
|
+ po.setLastUpdateTime(new Date(alarm.getEndts()));
|
|
|
+ po.setTagId(alarm.getTagId());
|
|
|
+ po.setTriggerType(alarm.getTriggerType());
|
|
|
+ po.setAlarmId(vo.getAlarmid());
|
|
|
+ po.setDeviceId(vo.getDeviceid());
|
|
|
+ po.setSubcomponents(vo.getSuffix());
|
|
|
+ po.setRank(vo.getRank());
|
|
|
+ po.setConfirmed(false);
|
|
|
+ po.setUniformCode(vo.getUniformcode());
|
|
|
+ po.setAlarmType(vo.getAlarmtype());
|
|
|
+ po.setDeviceType(vo.getDevicetype());
|
|
|
+ po.setComponents(vo.getComponents());
|
|
|
+ po.setSubcomponents(vo.getSubcomponents());
|
|
|
+ po.setDescription(vo.getDescription());
|
|
|
+ po.setModelId(vo.getModelId());
|
|
|
+ po.setResetTable(vo.getResettable());
|
|
|
+ po.setEnable(vo.getEnabled());
|
|
|
+ po.setCharacteristic(vo.getCharacteristic());
|
|
|
+ po.setStationId(vo.getStationid());
|
|
|
+ po.setProjectId(vo.getProjectid());
|
|
|
+ po.setLineId(vo.getLineid());
|
|
|
+ po.setStationName(vo.getStationname());
|
|
|
+ po.setProjectiName(vo.getProjectname());
|
|
|
+ po.setLineidName(vo.getLinename());
|
|
|
+ po.setDeviceName(vo.getDevicename());
|
|
|
+ po.setOval(alarm.getOval().intValue());
|
|
|
+ po.setCloseTime(new Date(alarm.getEndts()));
|
|
|
+ po.setIsOpen(0);
|
|
|
+ po.setVal(alarm.getVal().intValue());
|
|
|
+ valuels.add(po);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ List<String> idls = new ArrayList<>();
|
|
|
+ for (ProEconAlarmInfo vo : valuels) {
|
|
|
+ idls.add(vo.getTbname());
|
|
|
+ }
|
|
|
+ if (!idls.isEmpty()) {
|
|
|
+
|
|
|
+ proEconAlarmInfoService.removeByIds(idls);
|
|
|
+ }
|
|
|
+
|
|
|
+ List<ProEconAlarmInfo> templs = new ArrayList<>();
|
|
|
+ for (ProEconAlarmInfo vo : valuels) {
|
|
|
+ templs.add(vo);
|
|
|
+ if (templs.size() == 1000) {
|
|
|
+ proEconAlarmInfoService.saveBatch(templs);
|
|
|
+ templs = new ArrayList<>();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!templs.isEmpty()) {
|
|
|
+ proEconAlarmInfoService.saveBatch(templs);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ public void pushData(AlarmTag po) throws EncodeException, IOException {
|
|
|
+ ConcurrentHashMap<String, WebSocket> webSocketPushMap = WebSocket.webSocketMap;
|
|
|
+ ConcurrentHashMap<String, PushParams> webSocketPushParamsMap = WebSocket.webSocketParamsMap;
|
|
|
+ if(!webSocketPushMap.isEmpty()){
|
|
|
+ for(String key : webSocketPushMap.keySet()){
|
|
|
+ // 根据ws连接用户ID获取推送参数
|
|
|
+ PushParams pushParams = webSocketPushParamsMap.get(key);
|
|
|
+
|
|
|
+ if(webSocketPushParamsMap.contains(po.getId()))
|
|
|
+ {
|
|
|
+ PushParams pp=webSocketPushParamsMap.get(po.getId());
|
|
|
+
|
|
|
+ double hours=DateUtils.hoursDiff(pp.getStartTime(),new Date());
|
|
|
+ if(hours>pushinterval)
|
|
|
+ {
|
|
|
+ webSocket.sendMessageByUserId(key,po);
|
|
|
+ pp.setStartTime(new Date(po.getTs()));
|
|
|
+ }
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ webSocket.sendMessageByUserId(key,po);
|
|
|
+ PushParams pp=new PushParams();
|
|
|
+ pp.setStartTime(new Date());
|
|
|
+ webSocketPushParamsMap.put(po.getId(),pp);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+}
|