奉贤数据单独控制
This commit is contained in:
@ -7,10 +7,7 @@ import com.alibaba.fastjson2.TypeReference;
|
||||
import com.xzzn.common.utils.DateUtils;
|
||||
import com.xzzn.common.utils.StringUtils;
|
||||
import com.xzzn.ems.domain.*;
|
||||
import com.xzzn.ems.service.IEmsBatteryDataService;
|
||||
import com.xzzn.ems.service.IEmsMqttMessageService;
|
||||
import com.xzzn.ems.service.IEmsPcsBranchDataService;
|
||||
import com.xzzn.ems.service.IEmsPcsDataService;
|
||||
import com.xzzn.ems.service.*;
|
||||
import com.xzzn.framework.manager.MqttLifecycleManager;
|
||||
import com.xzzn.framework.web.service.MqttPublisher;
|
||||
import com.xzzn.framework.web.service.MqttSubscriber;
|
||||
@ -47,6 +44,14 @@ public class MqttMessageController implements MqttPublisher, MqttSubscriber {
|
||||
@Autowired
|
||||
private IEmsPcsBranchDataService emsPcsBranchDataService;
|
||||
|
||||
@Autowired
|
||||
private IEmsBatteryClusterService emsBatteryClusterService;
|
||||
|
||||
@Autowired
|
||||
private IEmsBatteryStackService emsBatteryStackService;
|
||||
|
||||
|
||||
|
||||
@Autowired
|
||||
public MqttMessageController(MqttLifecycleManager mqttLifecycleManager) {
|
||||
this.mqttLifecycleManager = mqttLifecycleManager;
|
||||
@ -200,6 +205,9 @@ public class MqttMessageController implements MqttPublisher, MqttSubscriber {
|
||||
data.setMinCellSocId(Long.parseLong("1"));
|
||||
data.setMaxCellSohId(Long.parseLong("1"));
|
||||
data.setMinCellSohId(Long.parseLong("1"));
|
||||
data.setStackDeviceId("1");
|
||||
emsBatteryClusterService.insertEmsBatteryCluster(data);
|
||||
|
||||
|
||||
//电池堆
|
||||
//BMS 电池簇
|
||||
@ -257,6 +265,9 @@ public class MqttMessageController implements MqttPublisher, MqttSubscriber {
|
||||
dataStack.setMaxCellSohId(Long.parseLong("1"));
|
||||
dataStack.setMinCellSohId(Long.parseLong("1"));
|
||||
|
||||
emsBatteryStackService.insertEmsBatteryStack(dataStack);
|
||||
|
||||
|
||||
//单体电池
|
||||
Map<String, Map<String, Object>> records = processData(JSON.parseObject(jsonData, new TypeReference<Map<String, Object>>() {}));
|
||||
List<EmsBatteryData> list = new ArrayList<>();
|
||||
@ -384,7 +395,7 @@ public class MqttMessageController implements MqttPublisher, MqttSubscriber {
|
||||
data.setTotalLoadRatio(BigDecimal.ZERO);
|
||||
data.setAcLeakageCurrent(BigDecimal.ZERO);
|
||||
data.setInsulationResistance(BigDecimal.ZERO);
|
||||
|
||||
data.setBranchId(Long.parseLong("1"));
|
||||
list.add(data);
|
||||
}
|
||||
if (list.size() > 0 ) {
|
||||
|
Reference in New Issue
Block a user