|
|
|
@ -29,6 +29,7 @@ import com.techsor.datacenter.sender.dto.DeviceAlertInfo; |
|
|
|
import com.techsor.datacenter.sender.dto.DeviceInfoVO; |
|
|
|
import com.techsor.datacenter.sender.entitiy.*; |
|
|
|
import com.techsor.datacenter.sender.entitiy.bastatus.BaStatusEntity; |
|
|
|
import com.techsor.datacenter.sender.entitiy.bastatus.BaStatusHistoryEntity; |
|
|
|
import com.techsor.datacenter.sender.entitiy.bastatus.BaStatusThirdReqEntity; |
|
|
|
import com.techsor.datacenter.sender.entitiy.company.CompanyEntity; |
|
|
|
import com.techsor.datacenter.sender.entitiy.delta.DeltaNumEntity; |
|
|
|
@ -1465,6 +1466,17 @@ public class DataProcessServiceImpl implements IDataProcessService { |
|
|
|
log.warn("No deviceId exist for ba_status:"+deviceId); |
|
|
|
return; |
|
|
|
} |
|
|
|
//Insert history data to ba_status_history
|
|
|
|
Long update_ts = System.currentTimeMillis(); |
|
|
|
try{ |
|
|
|
BaStatusHistoryEntity baStatusHistoryEntity = new BaStatusHistoryEntity(); |
|
|
|
baStatusHistoryEntity.setDeviceInfoId(deviceInfo.getId()); |
|
|
|
baStatusHistoryEntity.setIsRunning(value); |
|
|
|
baStatusHistoryEntity.setUpdateTs(update_ts.toString()); |
|
|
|
baStatusDao.insertHistory(baStatusHistoryEntity); |
|
|
|
}catch (Exception e){ |
|
|
|
log.error("Insert ba_status_history Error:",e.getMessage(),e.fillInStackTrace()); |
|
|
|
} |
|
|
|
//Update Or insert to mysql [ba_status_statistics]
|
|
|
|
if (historyData==null){ |
|
|
|
//insert
|
|
|
|
@ -1488,7 +1500,7 @@ public class DataProcessServiceImpl implements IDataProcessService { |
|
|
|
return; |
|
|
|
} |
|
|
|
baStatusDao.insert(newData); |
|
|
|
sendBAStatus2Third(companyId,deviceId,newData); |
|
|
|
// sendBAStatus2Third(companyId,deviceId,newData);
|
|
|
|
}else{ |
|
|
|
//update
|
|
|
|
BaStatusEntity updateData = new BaStatusEntity(); |
|
|
|
@ -1535,7 +1547,7 @@ public class DataProcessServiceImpl implements IDataProcessService { |
|
|
|
return; |
|
|
|
} |
|
|
|
baStatusDao.update(updateData); |
|
|
|
sendBAStatus2Third(companyId,deviceId,updateData); |
|
|
|
// sendBAStatus2Third(companyId,deviceId,updateData);
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|