YLDExecuteService.java
2.8 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
package com.service.bkyld;
import java.util.List;
import com.dao.bkyld.YLDDataBase;
import com.vo.YLDDataManage;
import com.vo.YLD_outline_DataManage;
import com.vo.YLD_reason_DataManage;
import com.vo.yld_Sound;
public class YLDExecuteService {
YLDDataBase ylddb = new YLDDataBase();
/**
* 在线数据修改
*
* @param dm
*/
public void getDataManageUpdate(YLDDataManage dm) {
ylddb.updateData(dm);
}
public boolean getDataManageUpdate(YLD_outline_DataManage dm) {
return ylddb.updateData(dm);
}
public boolean insertoutlinedata(YLD_outline_DataManage data){
return ylddb.insertData(data);
}
/**
* 在线数据查询
*/
public String getDataForDB(String datetime) {
List<YLDDataManage> loaddata = ylddb.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<YLD_outline_DataManage> loaddata = ylddb.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;
}
/**
* 未开展自行监控查询
* @param datetime
* @return
*/
public String getreasonDataForDB(String datetime) {
List<YLD_reason_DataManage> loaddata = ylddb.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;
}
public String getSounds(String datetime) {
String re = ylddb.getSounds(datetime);
return "{totalProperty:'123',root:[" + re + "]}";
}
public boolean insertSound(yld_Sound sh) {
return ylddb.insertSound(sh);
}
public boolean updataSound(yld_Sound sh) {
return ylddb.updataSound(sh);
}
public List<Integer> selectSound(String date){
return ylddb.selectSound(date);
}
// public boolean insertreasondata(YLD_reason_DataManage sh) {
// return ylddb.insertreasondata(sh);
// }
/**
* 添加自行监测原因
* @param sh
* @return
*/
public boolean updatereasondata(YLD_reason_DataManage sh) {
return ylddb.updatereasondata(sh);
}
}