package com.sandu.ximon.admin.utils;
|
|
import com.sandu.common.util.SpringContextHolder;
|
import com.sandu.ximon.admin.manager.iot.frame.A5Frame;
|
import com.sandu.ximon.admin.manager.iot.rrpc.dto.CommonFrame;
|
import com.sandu.ximon.admin.service.InnerFrameDataService;
|
|
/**
|
* @author ZZQ
|
* @date 2022/5/13 15:06
|
*/
|
public class StoreOperationRecordsUtils {
|
public static void storeInnerFrameData(String mac, String innerFrameTpye, A5Frame a5Frame, CommonFrame commonFrame) {
|
String reportInnerFrame = "";
|
if (commonFrame != null) {
|
reportInnerFrame = commonFrame.getConnectType() + commonFrame.getFunctionCode() + commonFrame.getOrderType() + commonFrame.getPayloadLength() + commonFrame.getPayload();
|
}
|
String requstInnerFrame = a5Frame.getConnectType() + a5Frame.getFunctionCode() + a5Frame.getOrderType() + a5Frame.getPayloadLength() + a5Frame.getPayload();
|
String syncType;
|
if ("FE".equals(a5Frame.getConnectType())) {
|
syncType = "同步";
|
} else {
|
syncType = "异步";
|
}
|
SpringContextHolder.getBean(InnerFrameDataService.class).storeInnerFrameData(mac, innerFrameTpye, syncType, requstInnerFrame, reportInnerFrame);
|
|
}
|
|
public static void storeOperationData(String mac, String innerFrameTpye, String syncType, String requsetInnerFrame, String reportInnerFrame) {
|
//TODO
|
|
}
|
}
|