| | |
| | | import com.whyc.dto.RtStateDto; |
| | | import com.whyc.service.A200RealStateService; |
| | | import com.whyc.service.ActmRealStateService; |
| | | import com.whyc.service.BattRtDataService; |
| | | import com.whyc.service.BattLithiumRtDataService; |
| | | import com.whyc.service.WorkStateChangeEventService; |
| | | import com.whyc.util.ActionUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | private Thread thread; |
| | | |
| | | private static BattRtDataService battRtDataService; |
| | | private static BattLithiumRtDataService battLithiumRtDataService; |
| | | |
| | | private static A200RealStateService a200RtStateService; |
| | | |
| | |
| | | private volatile Map<Long,Boolean> threadFlagMap = new HashMap<>(); |
| | | |
| | | @Autowired |
| | | public void setBattRtDataService(BattRtDataService battRtDataService) { |
| | | DevLithiumRtStateSocket.battRtDataService = battRtDataService; |
| | | public void setBattRtDataService(BattLithiumRtDataService battLithiumRtDataService) { |
| | | DevLithiumRtStateSocket.battLithiumRtDataService = battLithiumRtDataService; |
| | | } |
| | | |
| | | @Autowired |
| | |
| | | private Response getActmState(int devId) { |
| | | Map<String, Response> map = new HashMap<>(); |
| | | Response resActmState=actmRtStateService.getActmState(devId); |
| | | Response rtDataState0=battRtDataService.getActmRtdataState(devId,0); |
| | | Response rtDataState1=battRtDataService.getActmRtdataState(devId,1); |
| | | Response rtDataState0= battLithiumRtDataService.getActmRtdataState(devId,0); |
| | | Response rtDataState1= battLithiumRtDataService.getActmRtdataState(devId,1); |
| | | Response event=eventService.getWorkEvent(devId); |
| | | map.put("resActmState",resActmState); |
| | | map.put("rtDataState0",rtDataState0); |
| | |
| | | private Response getA200State(int devId) { |
| | | Map<String, Response> map = new HashMap<>(); |
| | | Response resA200State=a200RtStateService.getA200State(devId); |
| | | Response rtDataState=battRtDataService.getA200RtdataState(devId); |
| | | Response rtDataState= battLithiumRtDataService.getA200RtdataState(devId); |
| | | Response event=eventService.getWorkEvent(devId); |
| | | map.put("resA200State",resA200State); |
| | | map.put("rtDataState",rtDataState); |