| | |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | @Transactional |
| | | public class BattalarmDataService { |
| | | |
| | | @Resource |
| | |
| | | import com.whyc.pojo.UserInf; |
| | | import com.whyc.util.ActionUtil; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.HashMap; |
| | |
| | | @Resource |
| | | private PwrdevAlarmMapper pwrdevAlarmMapper; |
| | | |
| | | @Transactional |
| | | public Response getDataMap(int uId){ |
| | | |
| | | Map dataMap = new HashMap(); |
| | |
| | | AlarmPar alarmPar = ActionUtil.getGson().fromJson(message, AlarmPar.class); |
| | | thread = new Thread("Thread_battAlarmData") { |
| | | public void run() { |
| | | while (runFlag) { |
| | | while (runFlag&&!isInterrupted()) { |
| | | Thread thread = currentThread(); |
| | | threadFlagMap.put(thread.getId(),true); |
| | | try { |
| | |
| | | public synchronized void onMessage(Session session, String uId){ |
| | | thread = new Thread("Thread_battAlarmFoot") { |
| | | public void run() { |
| | | while (runFlag) { |
| | | while (runFlag && !isInterrupted()) { |
| | | Thread thread = currentThread(); |
| | | threadFlagMap.put(thread.getId(), true); |
| | | try { |
| | |
| | | thread = new Thread("Thread_battDischargePlan") { |
| | | public void run() { |
| | | |
| | | while (runFlag) { |
| | | while (runFlag && !isInterrupted()) { |
| | | Thread thread = currentThread(); |
| | | threadFlagMap.put(thread.getId(), true); |
| | | try { |
| | |
| | | BattScrapPar battScrapPar = ActionUtil.getGson().fromJson(message, BattScrapPar.class); |
| | | thread = new Thread("Thread_battScrap") { |
| | | public void run() { |
| | | while (runFlag) { |
| | | while (runFlag && !isInterrupted()) { |
| | | Thread thread = currentThread(); |
| | | threadFlagMap.put(thread.getId(), true); |
| | | try { |
| | |
| | | BattSparePar battSparePar = ActionUtil.getGson("yyyy-MM-dd").fromJson(message, BattSparePar.class); |
| | | thread = new Thread("Thread_battSpare") { |
| | | public void run() { |
| | | while (runFlag) { |
| | | while (runFlag && !isInterrupted()) { |
| | | Thread thread = currentThread(); |
| | | threadFlagMap.put(thread.getId(), true); |
| | | try { |
| | |
| | | DevAlarmPar alarmPar = ActionUtil.getGson().fromJson(message, DevAlarmPar.class); |
| | | thread = new Thread("Thread_devAlarmData") { |
| | | public void run() { |
| | | while (runFlag) { |
| | | while (runFlag && !isInterrupted()) { |
| | | Thread thread = currentThread(); |
| | | threadFlagMap.put(thread.getId(), true); |
| | | try { |
| | |
| | | Fbs9100State stateParam = ActionUtil.getGson().fromJson(msg, Fbs9100State.class); |
| | | this.thread = new Thread("Thread_DeviceWorkState") { |
| | | public void run() { |
| | | while (runFlag) { |
| | | while (runFlag && !isInterrupted()) { |
| | | Thread thread = currentThread(); |
| | | threadFlagMap.put(thread.getId(), true); |
| | | try { |
| | |
| | | FbsStatePar fbsStatePar= ActionUtil.getGson().fromJson(message,FbsStatePar.class); |
| | | thread = new Thread("Thread_FbsState") { |
| | | public void run() { |
| | | while (runFlag) { |
| | | while (runFlag && !isInterrupted()) { |
| | | Thread thread = currentThread(); |
| | | threadFlagMap.put(thread.getId(), true); |
| | | try { |
| | |
| | | public void onMessage(Session session, String uId){ |
| | | thread = new Thread("Thread_homePage") { |
| | | public void run() { |
| | | while (runFlag) { |
| | | while (runFlag && !isInterrupted()) { |
| | | Thread thread = currentThread(); |
| | | threadFlagMap.put(thread.getId(),true); |
| | | try { |
| | |
| | | PwrdevAlarm pwrdevAlarm = ActionUtil.getGson().fromJson(message, PwrdevAlarm.class); |
| | | thread = new Thread("Thread_powerAlarmRt") { |
| | | public void run() { |
| | | while (runFlag) { |
| | | while (runFlag && !isInterrupted()) { |
| | | Thread thread = currentThread(); |
| | | threadFlagMap.put(thread.getId(),true); |
| | | try { |
| | |
| | | public void onMessage(Session session, String deviceId){ |
| | | thread = new Thread("Thread_PowerRT") { |
| | | public void run() { |
| | | while (runFlag) { |
| | | while (runFlag && !isInterrupted()) { |
| | | Thread thread = currentThread(); |
| | | threadFlagMap.put(thread.getId(),true); |
| | | try { |
| | |
| | | public synchronized void onMessage(Session session,String message){ |
| | | thread = new Thread("Thread_processSurvey") { |
| | | public void run() { |
| | | while (runFlag) { |
| | | while (runFlag && !isInterrupted()) { |
| | | Thread thread = currentThread(); |
| | | threadFlagMap.put(thread.getId(), true); |
| | | try { |
| | |
| | | PwrdevAlarm pwrdevAlarm = ActionUtil.getGson().fromJson(message, PwrdevAlarm.class); |
| | | thread = new Thread("Thread_pwrAlarm") { |
| | | public void run() { |
| | | while (runFlag) { |
| | | while (runFlag && !isInterrupted()) { |
| | | Thread thread = currentThread(); |
| | | threadFlagMap.put(thread.getId(), true); |
| | | try { |
| | |
| | | public synchronized void onMessage(Session session, String uId){ |
| | | thread = new Thread("Thread_powerAlarmTimeout") { |
| | | public void run() { |
| | | while (runFlag) { |
| | | while (runFlag && !isInterrupted()) { |
| | | Thread thread = currentThread(); |
| | | threadFlagMap.put(thread.getId(), true); |
| | | try { |
| | |
| | | realTimePar.setDevType(realTimePar.getDevId()/100000); |
| | | thread = new Thread("Thread_RealTime") { |
| | | public void run() { |
| | | while (runFlag) { |
| | | while (runFlag && !isInterrupted()) { |
| | | Thread thread = currentThread(); |
| | | threadFlagMap.put(thread.getId(),true); |
| | | try { |
| | |
| | | RealTimePar realTimePar= ActionUtil.getGson().fromJson(message,RealTimePar.class); |
| | | thread = new Thread("Thread_RealTime") { |
| | | public void run() { |
| | | while (runFlag) { |
| | | while (runFlag && !isInterrupted()) { |
| | | Thread thread = currentThread(); |
| | | threadFlagMap.put(thread.getId(),true); |
| | | try { |