he wei
2024-09-21 70edda3b00f2528a473c28ec5a50b739ed160f0f
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
import const_curing from "@/assets/js/const/const_curing";
import const_dcdc from "@/assets/js/const/const_dcdc";
import axios from "axios";
 
/**
 * 获取当前选中的单体是否已经被关注过
 * Batt_attentionAction!judgeInOrNot // 旧
 * 参数:json={"BattGroupId":1005151,"MonNum":"1"}
 */
export const realTimeNot = (params) => {
  return axios({
    method: "GET",
    url: "battAttention/judgeInOrNot",
    params,
  });
};
/**
 * 根据电池组id查询该电池组中所有电池信息  (图表数据)
 * Batt_rtdataAction_serchByCondition // 旧
 * json={"BattGroupId":1005074}
 */
export const realTimeSearch = (params) => {
  return axios({
    method: "GET",
    url: "Batt_rtdataAction/serchByCondition",
    params,
  });
};
/**
 * 根据电池组id查询电池组实时组端信息
 * Batt_rtstateAction_serchByCondition // 旧
 */
export const realTimeGroup = (battGroupId) => {
  return axios({
    method: "GET",
    url: "BattRtstate/serchByCondition",
    params: {
      battGroupId,
    },
  });
};
/**
 * 根据设备id查询设备当前的开关状态
 * {devId}
 * Fbs9100_stateAction_action_serchContactorState // 旧
 */
export const realTimePowerOff = (params) => {
  return axios({
    method: "GET",
    url: "Fbs9100_stateAction/serchContactorState",
    params,
  });
};
/**
 * 通过设备id查询LD9数据
 * {devId}
 * LD9_stateAction_ld9action_searchByDevId // 旧
 * @returns
 */
export const realTimeLd9Data = (params) => {
  return axios({
    method: "GET",
    url: "LD9_stateAction/searchByDevId",
    params,
  });
};
/**
 * 获取参数
 * {
 *  battGroupid,
 *  devId,
 *  num
 * }
 * LD9_setparamAction_ld9action_serchByCondition // 旧
 */
export const getLD9Params = (params) => {
  return axios({
    method: "GET",
    url: "LD9_setparamAction/serchByCondition",
    params,
  });
};
 
/**
 * 设定参数
 * LD9_setparamAction_ld9action_update // 旧
 */
export const setLD9Params = (data) => {
  return axios({
    method: "POST",
    url: "LD9_setparamAction/update",
    data,
  });
};
 
/**
 * 获取参数
 * {
 *  devId
 * }
 */
export const getLD6Params = (params) => {
  return axios({
    method: "GET",
    url: "Fbs9100_setparamAction/searchLD6",
    params,
  });
};
 
/**
 * 设定参数
 */
export const setLD6Params = (data) => {
  return axios({
    method: "POST",
    url: "Fbs9100_setparamAction/updateLD6",
    data,
  });
};
/**
 * 获取剩余天数,工作模式,组端电压,峰值电压
 * Fbs9100s_fod_stateAction_action_serchByCondition // 旧
 */
export const realTimeStateList = (battGroupId) => {
  return axios({
    method: "GET",
    url: "Fbs9100s_fod_stateAction/serchByCondition",
    params: {
      battGroupId,
    },
  });
};
/**
 * 电池组单体告警
 * BattRtAlarmAction!getInfo // 旧
 * {battGroupId}
 */
export const BattRtAlarmActionGetInfo = (params) => {
  // 查询后台
  return axios({
    method: "GET",
    url: "BattRtAlarmAction/getInfo",
    params,
  });
};
/**
 * 读取模拟量
 * 读取锂电池信息 暂定读取组一的
 * Li9130BmsStateAction!searchParam // 旧
 * {devId}
 */
export const getDcDcAnalogParams = (params) => {
  // 查询后台
  return axios({
    method: "GET",
    url: "Li9130BmsStateAction/searchParam",
    params,
  });
};
/**
 * 读取告警量
 * {devId}
 * Li9130BmsAlmAction!searchParam // 旧
 */
export const getDcDcWarnParams = (params) => {
  // 请求后台查询内容
  return axios({
    method: "GET",
    url: "Li9130BmsAlmAction/searchParam",
    params,
  });
};
/**
 * 电池组组端告警
 * BattRsAlarmAction!getInfo // 旧
 * @param json:{"dev_id":618500002}
 * @returns {AxiosPromise}
 */
export const BattRsAlarmActionGetInfo = (params) => {
  // 查询后台
  return axios({
    method: "GET",
    url: "BattRsAlarmAction/getInfo",
    params,
  });
};
/**
 * 清除告警 设置参数
 * Fbs9100_sysparamAction_action_update61850 // 旧
 */
export const clearWarn = (data) => {
  return axios({
    method: "POST",
    url: "Fbs9100_sysparamAction/update61850",
    data,
  });
};
/**
 * 获取参数
 * {devId}
 * Fbs9100_sysparamAction_action_serchByCondition // 旧
 */
export const getParams = (params) => {
  // 请求后台查询内容
  return axios({
    method: "GET",
    url: "Fbs9100_sysparamAction/serchByCondition",
    params,
  });
};
/**
 * 发送指令 启停
 * {
 *  num,
 *  devId
 * }
 * LD9_setparamAction_ld9action_serchbyDev_id // 旧
 */
export const ld9Control = (params) => {
  return axios({
    method: "GET",
    url: "LD9_setparamAction/serchbyDev_id",
    params,
  });
};
/**
 * 启动 停止测试 e61850Control
 *  {
 *  num,
 *  devId,
 *  testCmd = 0 默认为0
 * }
 * Fbs9100_setparamAction_action_serchbyDev_id // 旧
 */
export const btsControl = (params) => {
  return axios({
    method: "GET",
    url: "Fbs9100_setparamAction/serchbyDev_id",
    params: {
      testCmd: 0,
      ...params,
    },
  });
};
 
/**
 * 启动内阻测试
 * @param devId
 * @param battGroupNum
 * @return {AxiosPromise}
 */
export const startResTest = (devId, battGroupNum) => {
  return axios({
    method: "GET",
    url: "Fbs9100_setparamAction/serchbyDev_id_res",
    params: {
      devId,
      battGroupNum,
    },
  });
};
/**
 * 读取FBO_4830放电参数
 *  {
 *  opCmd,
 *  devId,
 * }
 */
export const getFBO4830Param = (params) => {
  return axios({
    method: "GET",
    url: "Fbs9100_setparamAction/searchFBO4830Param",
    params,
  });
};
/**
 * 读取FBO_4831放电参数
 *  {
 *  opCmd,
 *  devId,
 * }
 */
export const getFBO4831Param = (params) => {
  return axios({
    method: "GET",
    url: "Fbs9100_setparamAction/searchFBO4831Param",
    params,
  });
};
/**
 * 读取开关电源参数
 *  {
 *  opCmd,
 *  devId,
 * }
 */
export const getKgdyParam = (params) => {
  return axios({
    method: "GET",
    url: "Fbs9100_setparamAction/searchKgdyParam",
    params,
  });
};
/**
 * 更新开关电源参数
 */
export const setKgdyParam = (data) => {
  return axios({
    method: "POST",
    url: "Fbs9100_setparamAction/updateKgdyParam",
    data,
  });
};
/**
 * 更新FBO_4830放电参数
 */
export const setFBO4830Param = (data) => {
  return axios({
    method: "POST",
    url: "Fbs9100_setparamAction/updateFBO4830Param",
    data,
  });
};
/**
 * 控制FBO_4830 启动停止充放电
 * {opCmd, devId}
 */
export const controllerFBO4830 = (params) => {
  return axios({
    method: "GET",
    url: "Fbs9100_setparamAction/controllerFBO4830",
    params,
  });
};
/**
 * FBO4815实时页面需要前一百笔历史实时数据
 * {battGroupId}
 */
export const serchDate100 = (battGroupId) => {
  return axios({
    method: "GET",
    url: "Batt_realdataAction/serchDate100",
    params: { battGroupId },
  });
};
/**
 * 停止养护/除硫
 * {
 *  devId,
 *  groupNum, // 模块编号
 *  battGroupNum  // 电池编号
 * }
 * 设置参数时传表单对象
 * opStr: 'read', 'set', 'startYH', 'startCL', 'stop'
 * Fbs9100s_fod_paramAction_action_update // 旧
 */
export const curingControl = (data, opStr) => {
  // 请求后台
  return axios({
    method: "POST",
    url: "Fbs9100s_fod_paramAction/update",
    data: {
      ...data,
      opCmd: const_curing.cmd[opStr],
    },
  });
};
/**
 * 查询状态信息 控制信息
 * {categoryId: 1// 状态显示, 2 // 控制信息}
 * PageParamAction!findByCategoryId // 旧
 */
export const searchInfo = (params) => {
  return axios({
    method: "GET",
    url: "pageParam/findByCategoryId",
    params,
  });
};
/**
 * 查询电池告警参数
 * Dev_paramAction!serchParamById // 旧
 * {devId}
 */
export const realTimeAlarm = (params) => {
  return axios({
    method: "GET",
    url: "Dev_paramAction/serchParamById",
    params,
  });
};
/**
 * 从数据库中读取除硫参数
 * Fbs9100s_fod_paramAction_action_serchByCondition // 旧
 * {devId}
 */
export const readFromDB = (params) => {
  return axios({
    method: "GET",
    url: "Fbs9100s_fod_paramAction/serchByCondition",
    params,
  });
};
/**
 * 更新离线养护除硫的信息 update start stop restart
 * Fbs9100_setparamAction_action_updateMaintain // 旧
 * offLineYHTimes 默认传0
 */
export const outlineControl = (data) => {
  return axios({
    method: "POST",
    url: "Fbs9100_setparamAction/updateMaintain",
    data: {
      offLineYHTimes: 0,
      ...data,
    },
  });
};
/**
 * 获取均衡参数
 * {devId}
 * Fbs9100_sysparamAction_action_searchJunHengParam // 旧
 */
export const getBalanceParams = (params) => {
  // 请求后台查询内容
  return axios({
    method: "GET",
    url: "Fbs9100_sysparamAction/searchJunHengParam",
    params,
  });
};
/**
 * 设置均衡参数
 * Fbs9100_sysparamAction_action_update61850JunHeng // 旧
 */
export const setBalanceParams = (data) => {
  return axios({
    method: "POST",
    url: "Fbs9100_sysparamAction/update61850JunHeng",
    data,
  });
};
/**
 * 读取DCDC工作参数
 * Li9130DCDCParamAction!searchParam // 旧
 */
export const getDcDcWorkParams = (params) => {
  return axios({
    method: "GET",
    url: "Li9130DCDCParamAction/searchParam",
    params,
  });
};
/**
 * 设置DCDC工作参数
 * Li9130DCDCParamAction!updateParam // 旧
 */
export const setDcDcWorkParams = (data) => {
  return axios({
    method: "POST",
    url: "Li9130DCDCParamAction/updateParam",
    data: {
      ...data,
      opCmd: const_dcdc.cmd.set,
    },
  });
};
/**
 * 启动BTS9611测试
 * {
 *  cmd,
 *  devId
 * }
 * Fbs9600_stateAction_action_update // 旧
 */
export const startBTS9611 = (params) => {
  return axios({
    method: "GET",
    url: "fbs9600State/update",
    params,
  });
};
/**
 * 查询历史实时数据
 * JhStateAction_action_serchByCondition // 旧
 * {devId}
 */
export const JhStateActionSerchByCondition = (params) => {
  // 查询后台
  return axios({
    method: "GET",
    url: "JhStateAction/serchByCondition",
    params,
  });
};
/**
 * 获取设备的逆变信息
 * Fbs9100s_nibian_stateAction_action_serchByCondition // 旧
 */
export const inversionInfo = (devId) => {
  return axios({
    method: "GET",
    url: "Fbs9100s_nibian_stateAction/serchByCondition",
    params: {
      devId,
    },
  });
};
 
/**
 * 获取逆变的其他信息
 * FBS9100sBuscoupleStateAction_action_searchDataByDevId // 旧
 */
export const inversionData = (devId) => {
  return axios({
    method: "GET",
    url: "FBS9100sBuscoupleStateAction/serchByDevId",
    params: {
      devId,
    },
  });
};
/**
 * 查询所有的放电计划
 * {devId}
 * Li9130_setparam_planAction_action_serchByCondition // 旧
 */
export const searchDcDcPlanAll = (devId) => {
  // 请求后台查询内容
  return axios({
    method: "GET",
    url: "Li9130_setparam_planAction/serchByCondition",
    params: {
      devId,
    },
  });
};
/**
 * 添加充放电计划
 * [
 * {}
 * ]
 * Li9130_setparam_planAction_action_add // 旧
 */
export const addDcDcPlan = (data) => {
  // 请求后台查询内容
  return axios({
    method: "POST",
    url: "Li9130_setparam_planAction/add",
    data,
  });
};
 
/**
 * 添加充放电计划
 * Li9130_setparam_planAction_action_update // 旧
 */
export const editDcDcPlan = (data) => {
  // 请求后台查询内容
  return axios({
    method: "POST",
    url: "Li9130_setparam_planAction/update",
    data,
  });
};
 
/**
 * 删除充放电计划
 * {
 *  devId,
 *  num
 * }
 * Li9130_setparam_planAction_action_del // 旧
 */
export const delDcDcPlan = (params) => {
  // 请求后台查询内容
  return axios({
    method: "GET",
    url: "Li9130_setparam_planAction/del",
    params,
  });
};
/**
 * 设置参数
 * Fbs9100_setparamAction_action_update // 旧
 */
export const setParams = (data) => {
  return axios({
    method: "POST",
    url: "Fbs9100_setparamAction/update",
    data,
  });
};
/**
 * 设置61850放电参数
 * Fbs9100_setparamAction_action_update61850Param // 旧
 */
export const set61850Params = (data) => {
  // 请求后台
  return axios({
    method: "POST",
    url: "Fbs9100_setparamAction/update61850Param",
    data,
  });
};
/**
 * Ess3100_sysstateAction_action_searchAll
 * 查询所有的系统状态信息 无参
 */
export const getSysState = () => {
  return axios({
    method: "GET",
    url: "Ess3100_sysstateAction/searchAll",
  });
};
 
/**
 * Ess3100_pcs_stateAction_action_searchAll
 * 查询所有的pcs状态信息 无参
 */
export const getPcsState = () => {
  return axios({
    method: "GET",
    url: "Ess3100_pcs_stateAction/searchAll",
  });
};
 
/**
 * Batt_gtstateAction_action_serchByCondition
 * 根据电池组id查询储能电池组信息
 * {"battGroupId":"1000060"}
 */
export const getBattGrpState = (params) => {
  return axios({
    method: "GET",
    url: "Batt_gtstateAction/serchByCondition",
    params,
  });
};
/**
 * 添加关注单体
 * Batt_attentionAction!add // 旧
 * json={"battGroupId":"1005151","monNum":"1"}
 */
export const realTimeAdd = (data) => {
  return axios({
    method: "POST",
    url: "battAttention/add",
    data,
  });
};
/**
 * 获取配电柜的实时数据
 * {powerDeviceId}
 * PowerAction_power_getPowerInfoById // 旧
 */
export const getPowerBoxData = (powerDeviceId) => {
  return axios({
    method: "GET",
    url: "PowerACDCDataAction/getPowerInfoById",
    params: {
      powerDeviceId,
    },
  });
};
/**
 * 查询历史实时数据
 * Batt_realdataAction!serchByCondition // 旧
 */
export const searchHistoryRealtimeData = (data) => {
  // 查询后台
  return axios({
    method: "POST",
    url: "Batt_realdataAction/serchByCondition",
    data,
  });
};
/**
 * 根据电池id查询锂电池信息
 * {battGroupId}
 * LithiumAction_action_getInfoByBattGroupId // 旧
 */
export const lithiumBattery = (data) => {
  return axios({
    method: "GET",
    url: "LithiumAction/getInfoByBattGroupId",
    data,
  });
};
/**
 * 平台自检
 * @param deviceId 设备ID
 * @param battGroupId 电池组ID
 * @param index 电池组编号
 * @param type 自检步骤
 * CheckAction!checkStatus 旧
 */
export const checkStatus = (battGroupId, deviceId, index, type) => {
  return axios({
    method: "GET",
    url: "check/checkStatus",
    params: {
      battGroupId,
      deviceId,
      index,
      type,
    },
  });
};
/**
 * 获取基站的图集
 * @param stationId
 * @returns {AxiosPromise}
 */
export const getStationPic = (stationId) => {
  return axios({
    method: "POST",
    url: "battInf/getStationPic",
    params: {
      stationId,
    },
  });
};
/**
 * 获取电池组参考线值
 *
 * 参数:json={"BattGroupId":1005151}
 */
export const getGuidesData = (params) => {
  return axios({
    method: "GET",
    url: "/battGroupGuides",
    params,
  });
};
/**
 * 获取电池组参考线值
 *
 * 参数:json={"BattGroupId":1005151}
 */
export const setGuidesData = (data) => {
  return axios({
    method: "POST",
    url: "/battGroupGuides/update",
    data,
  });
};
 
/**
 * 更新参数
 * @param data
 * @returns {AxiosPromise}
 */
export const update61851 = (data) => {
  // 查询后台
  return axios({
    method: "POST",
    url: "Fbs9100_sysparamAction/update61851",
    data,
  });
};
 
/**
 * 读取参数
 * @param data
 * @returns {AxiosPromise}
 */
export const search61851 = (devId) => {
  // 查询后台
  return axios({
    method: "POST",
    url: "Fbs9100_sysparamAction/search61851",
    params: {
      opCmd: 0x80,
      devId,
    },
  });
};
 
/**
 * 获取电操开关的放电参数
 * @param devId
 * @returns {AxiosPromise}
 */
export const searchEleOperationParams = (devId, battGroupNum) => {
  // 查询后台
  return axios({
    method: "POST",
    url: "Fbs9100_setparamAction/getEOperatingSwitchParam",
    params: {
      devId,
      battGroupNum,
    },
  });
};
 
/**
 * 设置电操开关的
 * @param devId
 * @returns {AxiosPromise}
 */
export const updateEleOperationParams = (data) => {
  // 查询后台
  return axios({
    method: "POST",
    url: "Fbs9100_setparamAction/updateEOperatingSwitchParam",
    data: data,
  });
};
 
/**
 * 启动电操开关放电
 * @param devId
 * @returns {AxiosPromise}
 */
export const startEleOperation = (devId, testCmd) => {
  // 查询后台
  return axios({
    method: "POST",
    url: "Fbs9100_setparamAction/updateEOperatingSwitchStart",
    data: {
      testCmd,
      devId,
    },
  });
};
 
/**
 * 停止电操开关放电
 * @param devId
 * @returns {AxiosPromise}
 */
export const stopEleOperation = (devId) => {
  // 查询后台
  return axios({
    method: "POST",
    url: "Fbs9100_setparamAction/updateEOperatingSwitchStop",
    data: {
      devId,
    },
  });
};
 
export const setEleOperationSwitch = (data) => {
  // 查询后台
  return axios({
    method: "POST",
    url: "Fbs9100_setparamAction/updateEOperatingSwitchControl",
    data: data,
  });
};
 
/**
 * 设置初始电量
 * @param {battGroupId":"xxx","nomCapWH":""}
 * @returns
 */
export const setDefaultCap = (data) => {
  // 查询后台
  return axios({
    method: "POST",
    url: "battInf/updateMonCapWH",
    data,
  });
};
/**
 * 一键停止
 * @returns
 */
export const oneKeyStop = (params) => {
  // 查询后台
  return axios({
    method: "GET",
    url: "Fbs9100_setparamAction/serchbyDev_id_li9130",
    params: {
      testCmd: 0,
      ...params,
    },
  });
};
 
/**
 * 9141读取参数 opCmd,devId, hvMonUppernum1, battGroupNum
 */
export const searchParalleParam = (params) => {
  return axios({
    method: "GET",
    url: "Fbs9100_setparamAction/searchParalleParam",
    params,
  });
};
/**
 * 9141设置参数
 */
export const updateParalleParam = (data) => {
  return axios({
    method: "POST",
    url: "Fbs9100_setparamAction/updateParalleParam",
    data,
  });
};
/**
 * 9141 控制启停
 */
export const controllerParalle = (params) => {
  return axios({
    method: "GET",
    url: "Fbs9100_setparamAction/controllerParalle",
    params,
  });
};
 
/**
 * 读取并联电源9149放电参数
 * {devId, opCmd, paramtype}
 */
export const searchParalleParam9149 = (params) => {
  return axios({
    method: "GET",
    url: "fbs9149Setparam/searchParalleParam9149",
    params,
  });
};
/**
 * 设置并联电源9149放电参数
 * 对象数组 参数
 */
export const updateParalleParam9149 = (data) => {
  return axios({
    method: "POST",
    url: "fbs9149Setparam/updateParalleParam9149",
    data,
  });
};
 
/**
 * 控制并联电源9149充放电停止
 * {battGroupNums, devId, opCmd, testCmd}
 */
export const controllerParalle9149 = (params) => {
  return axios({
    method: "GET",
    url: "fbs9149Setparam/controllerParalle9149",
    params,
  });
};
 
/**
 * 启动LD6设备
 * @param devId 设备ID
 * @return {AxiosPromise}
 */
export const startLd6 = (devId) => {
  return axios({
    method: "POST",
    url: "Fbs9100_setparamAction/updateLD6StartTest",
    params: {
      devId,
    },
  });
};
 
/**
 * 停止LD6设备
 * @param devId 设备ID
 * @return {AxiosPromise}
 */
export const stopLd6 = (devId) => {
  return axios({
    method: "POST",
    url: "Fbs9100_setparamAction/updateLD6StopTest",
    params: {
      devId,
    },
  });
};
 
/**
 * 二次放电申请
 * @param {*} data 放电参数加 申请原因
 * @returns
 */
export const addWorkMain = (data) => {
  return axios({
    method: "POST",
    url: "paramTemp/addTmpWorkMain",
    data,
  });
};
 
/**
 * 查询二次放电参数
 * @param {*} battGroupId
 * @returns
 */
export const searchTemp = (battGroupId) => {
  return axios({
    method: "GET",
    url: "paramTemp/searchTemp",
    params: { battGroupId },
  });
};
 
/**
 * 读取放电参数
 * @param devId 设备ID
 * @param opCmd 读取命令
 * @return {AxiosPromise}
 */
export const get9612Params = (devId, opCmd) => {
  return axios({
    method: "GET",
    url: "Fbs9100_setparamAction/searchFBS9612Param",
    params: {
      devId,
      opCmd,
    },
  });
};
 
/**
 * 设置放电参数
 * @param data 放电参数
 * @return {AxiosPromise}
 */
export const set9612Params = (data) => {
  return axios({
    method: "POST",
    url: "Fbs9100_setparamAction/updateFBS9612Param",
    data,
  });
};
 
/**
 * 9162设备启停控制<br/>
 * opCmd=81,testType=37放电测试<br/>
 * opCmd=81,testType=50内阻测试<br/>
 * opCmd=83,testType=0内阻测试<br/>
 * @param devId 设备ID
 * @param opCmd 启停命令
 * @param testType 测试类型
 * @return {AxiosPromise}
 */
export const dev9612Control = (devId, opCmd, testType) => {
  return axios({
    method: "GET",
    url: "Fbs9100_setparamAction/controllerFBS9612",
    params: {
      devId,
      opCmd,
      testType,
    },
  });
};
 
/**
 * 更新设备的时间
 * @param devId   设备ID
 * @param syncTime  更新时间
 * @return {AxiosPromise}
 */
export const updateDevTimeApi = (devId, syncTime) => {
  return axios({
    method: "GET",
    url: "Fbs9100_setparamAction/update61850SyncTime",
    params: {
      devId,
      syncTime,
    },
  });
};
 
/**
 * 6159开关控制
 * @param devId  swtichName swtichState
 * @return {AxiosPromise}
 */
export const setDev6159Swtich = (devId, swtichName, swtichState) => {
  return axios({
    method: "GET",
    url: "dev6159Param/setDev6159Swtich",
    params: {
      devId,
      swtichName,
      swtichState,
    },
  });
};
/**
 * 整流模块控制
 * @param devId  ctlNum ctlState
 * @return {AxiosPromise}
 */
export const setDev6159RectifModel = (devId, ctlNum, ctlState) => {
  return axios({
    method: "GET",
    url: "dev6159Param/setDev6159RectifModel",
    params: {
      devId,
      ctlNum,
      ctlState,
    },
  });
};
 
/**
 * 读取6159交流配电参数
 * @param devId  
 * @return {AxiosPromise}
 */
export const getDev6159ACParam = (devId) => {
  return axios({
    method: "GET",
    url: "dev6159Param/getDev6159ACParam",
    params: {
      devId
    },
  });
};
 
/**
 * 设置6159交流配电参数
 * @param {}  
 * @return {AxiosPromise}
 */
export const setDev6159ACParam = (data) => {
  return axios({
    method: "POST",
    url: "dev6159Param/setDev6159ACParam",
    data
  });
};
 
 
/**
 * 读取6159直流配电参数
 * @param devId  
 * @return {AxiosPromise}
 */
export const getDev6159DCParam = (devId) => {
  return axios({
    method: "GET",
    url: "dev6159Param/getDev6159DCParam",
    params: {
      devId
    },
  });
};
 
/**
 * 设置6159交流配电参数
 * @param {}  
 * @return {AxiosPromise}
 */
export const setDev6159DCParam = (data) => {
  return axios({
    method: "POST",
    url: "dev6159Param/setDev6159DCParam",
    data
  });
};
 
 
/**
 * 读取6159整流模块参数
 * @param devId  
 * @return {AxiosPromise}
 */
export const getDev6159RectifierParam = (devId) => {
  return axios({
    method: "GET",
    url: "dev6159Param/getDev6159RectifierParam",
    params: {
      devId
    },
  });
};
 
/**
 * 设置6159整流模块参数
 * @param {}  
 * @return {AxiosPromise}
 */
export const setDev6159RectifierParam = (data) => {
  return axios({
    method: "POST",
    url: "dev6159Param/setDev6159RectifierParam",
    data
  });
};