修复detection_info插入数据 同时根据detection_info状态修改detection_info_new表的状态
This commit is contained in:
@@ -942,7 +942,9 @@ public class ThreadService {
|
|||||||
try{
|
try{
|
||||||
List<String[]> insert = split.get("insert");
|
List<String[]> insert = split.get("insert");
|
||||||
List<String[]> update = split.get("update");
|
List<String[]> update = split.get("update");
|
||||||
for (String[] alarm : insert) {
|
if(null!=insert&&insert.size()>0) {
|
||||||
|
for (int i=insert.size()-1;i>=0;i--) {
|
||||||
|
String[] alarm= insert.get(i);
|
||||||
//seq_Id
|
//seq_Id
|
||||||
String seqId= alarm[1];
|
String seqId= alarm[1];
|
||||||
insertNewStmt.setObject(11, seqId);
|
insertNewStmt.setObject(11, seqId);
|
||||||
@@ -994,10 +996,12 @@ public class ThreadService {
|
|||||||
insertNewStmt.setObject(4, null);
|
insertNewStmt.setObject(4, null);
|
||||||
|
|
||||||
insertNewStmt.addBatch();
|
insertNewStmt.addBatch();
|
||||||
insert.remove(alarm);
|
insert.remove(i);
|
||||||
}
|
}
|
||||||
for (String[] alarm : update) {
|
}
|
||||||
|
if(null!=update&&update.size()>0) {
|
||||||
|
for (int i=update.size()-1;i>=0;i--) {
|
||||||
|
String[] alarm= update.get(i);
|
||||||
String seqId= alarm[1];
|
String seqId= alarm[1];
|
||||||
updateNewStmt.setObject(14, seqId);
|
updateNewStmt.setObject(14, seqId);
|
||||||
//detection_set_info_id
|
//detection_set_info_id
|
||||||
@@ -1046,7 +1050,8 @@ public class ThreadService {
|
|||||||
updateNewStmt.setObject(9, detectionId);
|
updateNewStmt.setObject(9, detectionId);
|
||||||
|
|
||||||
updateNewStmt.addBatch();
|
updateNewStmt.addBatch();
|
||||||
update.remove(alarm);
|
update.remove(i);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|||||||
Reference in New Issue
Block a user