whyczyk
2022-02-09 3d8a4eb4995756b02d31417cafb882de0678cba0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
import axios from "@/assets/js/axios";
 
/**
 * 查询机房信息
 * 参数:json = {"StationName1":"北京市","StationName2":"市辖区","StationName5":"海淀区"}
 */
export const searchStation = (params) => {
    return axios({
        method: "post",
        url: "BattInfAction!serchAllStationName",
        data: "json=" + JSON.stringify(params)
    })
}
/**
 * 查询电池组信息
 * 参数:json = {"StationName1":"北京市","StationName2":"市辖区","StationName5":"海淀区","StationName3":"紫晶科技机房"}
 */
export const searchBattInfo = (params) => {
    return axios({
        method: "post",
        url: "BattInfAction!serchAllBattinf",
        data: "json=" + JSON.stringify(params)
    })
}
/**
 * 根据电池组ID查询电池组信息
 * @param data
 * @returns {AxiosPromise}
 */
export const getBattGroupInfo = (params) => {
    return axios({
        method: 'post',
        url: 'BattInfAction!findByBattGroupId',
        data: 'bif.BattGroupId=' + params,
    })
}
/**
 * 查询电池告警参数
 * 参数:json={"dev_id":910000022}
 */
export const realTimeAlarm = (params) => {
    return axios({
        method: "post",
        url: "Dev_paramAction!serchParamById",
        data: "json=" + JSON.stringify(params)
    })
}
/**
 * 根据电池组id查询该电池组中所有电池信息  (图表数据)
 * json={"BattGroupId":1005074}
 */
export const realTimeSearch = (params) => {
    return axios({
        method: "post",
        url: "Batt_rtdataAction_serchByCondition",
        data: "json=" + JSON.stringify(params)
    })
}
/**
 * 根据电池组id查询电池组实时组端信息
 * 参数:rtstate.battGroupId=1005074
 */
export const realTimeGroup = (params) => {
    return axios({
        method: "post",
        url: "Batt_rtstateAction_serchByCondition",
        data: "rtstate.battGroupId=" + params
    })
}
/**
 * 查询历史实时数据
 * @param json:{"dev_id":618500002}
 * @returns {AxiosPromise}
 */
export const JhStateActionSerchByCondition = (params) => {
    // 查询后台
    return axios({
        method: "post",
        url: "JhStateAction_action_serchByCondition",
        data: "json=" + JSON.stringify(params)
    });
}
 
export const searchAll_lowAction = () => {
    return axios({
        method: "post",
        url: "Batt_param_lowAction_searchAll",
        data: null
    });
}
 
export const searchBattresdata = (BattGroupId) => {
    return axios({
        method: "post",
        url: "Batt_rtdataAction!serchResById",
        data: "json=" + JSON.stringify({
            BattGroupId: BattGroupId,
        })
    });
}
 
/**
 * 获取充放电记录
 * 参数:json={"num":910000119,"BattGroupId":1005129}
 * 返回结果说明:
 * test_type==3&&test_starttype==3?核容放电:监测放电
 * test_type==2&&test_starttype=3?核容充电:监测充电
 * test_starttime 开始测试时间
 * test_record_count 后台记录的笔数
 * test_stoptype_reason 停止原因
 */
 
export const searchBattTestData = (params) => {
    return axios({
        method: "post",
        url: "Batttestdata_infAction_searchBattTestInfDataById",
        data: "json=" + JSON.stringify(params)
    })
}
 
/**
 * 获取顶部电池组信息
 * 参数:btds.BattGroupId=1005129&btds.test_record_count=7 
 */
export const searchBattTestDataStop = (BattGroupId, count) => {
    return axios({
        method: "post",
        url: "BatttestdatastopAction_findByInfo",
        data: "btds.BattGroupId=" + BattGroupId + "&btds.test_record_count=" + count
    })
}
 
/**
 * 查询历史数据
 * 参数: json={"BattGroupId":1005129,"test_record_count":"7"}
 */
export const searchHistory = (params) => {
    params.data_new = params.data_new ? params.data_new : 1000;
    return axios({
        method: "post",
        url: "BatttestdataAction!findhistory",
        data: "json=" + JSON.stringify(params)
    })
}