whycxzp
2025-03-18 f127214ad1076769c9cb4a97963ee3ad5053e970
src/main/java/com/whyc/webSocket/DevLithiumRtStateSocket.java
@@ -5,7 +5,7 @@
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;
@@ -27,7 +27,7 @@
    private Thread thread;
    private static BattRtDataService battRtDataService;
    private static BattLithiumRtDataService battLithiumRtDataService;
    private static A200RealStateService a200RtStateService;
@@ -43,8 +43,8 @@
    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
@@ -111,8 +111,8 @@
    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);
@@ -125,7 +125,7 @@
    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);