SHExecuteService.java
2.7 KB
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
package com.service.bksh;
import java.util.List;
import com.dao.bksh.SHDataBase;
import com.vo.SHDataManage;
import com.vo.SH_outline_DataManage;
import com.vo.SH_reason_DataManage;
import com.vo.sh_Sound;
public class SHExecuteService {
SHDataBase shdb = new SHDataBase();
/**
* 在线数据修改
*
* @param dm
*/
public void getDataManageUpdate(SHDataManage dm) {
shdb.updateData(dm);
}
public boolean getDataManageUpdate(SH_outline_DataManage dm) {
return shdb.updateData(dm);
}
public boolean insertoutlinedata(SH_outline_DataManage data) {
return shdb.insertData(data);
}
/**
* 后台每日监测数据
*/
public String getDataForDB(String datetime) {
List<SHDataManage> loaddata = shdb.getDataForDate(datetime);
String resultbegin = "{totalProperty:'" + loaddata.size() + "',root:[";
for (int t = 0; t < loaddata.size(); t++) {
if (t == 0) {
resultbegin += loaddata.get(t).toString();
} else {
resultbegin += "," + loaddata.get(t).toString();
}
}
resultbegin += "]}";
return resultbegin;
}
/**
* 手工监测数据查询
* @param datetime
* @return
*/
public String getoutlineDataForDB(String datetime) {
List<SH_outline_DataManage> loaddata = shdb
.getDataForDate_outline(datetime);
String resultbegin = "{totalProperty:'" + loaddata.size() + "',root:[";
for (int t = 0; t < loaddata.size(); t++) {
if (t == 0) {
resultbegin += loaddata.get(t).toString();
} else {
resultbegin += "," + loaddata.get(t).toString();
}
}
resultbegin += "]}";
return resultbegin;
}
public String getSounds(String datetime) {
String re = shdb.getSounds(datetime);
return "{totalProperty:'123',root:[" + re + "]}";
}
public boolean insertSound(sh_Sound sh) {
return shdb.insertSound(sh);
}
public boolean updataSound(sh_Sound sh) {
return shdb.updataSound(sh);
}
public List<Integer> selectSound(String date){
return shdb.selectSound(date);
}
/**
* 未开展自行监控查询
* @param datetime
* @return
*/
public String getreasonDataForDB(String datetime) {
List<SH_reason_DataManage> loaddata = shdb.getDataForDate_reason(datetime);
String resultbegin = "{totalProperty:'" + loaddata.size() + "',root:[";
for (int t = 0; t < loaddata.size(); t++) {
if (t == 0) {
resultbegin += loaddata.get(t).toString();
} else {
resultbegin += "," + loaddata.get(t).toString();
}
}
resultbegin += "]}";
return resultbegin;
}
/**
* 添加自行监测原因
* @param sh
* @return
*/
public boolean updatereasondata(SH_reason_DataManage sh) {
return shdb.updatereasondata(sh);
}
}