|
@@ -74,7 +74,7 @@ namespace TimedUpload.QuartzJobs
|
|
#region 获取水质
|
|
#region 获取水质
|
|
string ph = "0", chlorine = "0", turbidity = "0";
|
|
string ph = "0", chlorine = "0", turbidity = "0";
|
|
string waterQulitySql = @"SELECT TOP 2 [RecordName],[RecordValue] FROM [dbo].[历史记录] where DevId = 3 order by GetDateTime DESC";
|
|
string waterQulitySql = @"SELECT TOP 2 [RecordName],[RecordValue] FROM [dbo].[历史记录] where DevId = 3 order by GetDateTime DESC";
|
|
- DataTable waterQulityDt = dbHelper.Fill(waterQulitySql);
|
|
|
|
|
|
+ DataTable waterQulityDt = waterQulityDbHelper.Fill(waterQulitySql);
|
|
if (waterQulityDt != null && waterQulityDt.Rows.Count > 0)
|
|
if (waterQulityDt != null && waterQulityDt.Rows.Count > 0)
|
|
{
|
|
{
|
|
for (int i = 0; i < waterQulityDt.Rows.Count; i++)
|
|
for (int i = 0; i < waterQulityDt.Rows.Count; i++)
|
|
@@ -125,7 +125,7 @@ namespace TimedUpload.QuartzJobs
|
|
,[出水端实际压力] 泵出口压力
|
|
,[出水端实际压力] 泵出口压力
|
|
,[进水端实际压力] 泵进口压力
|
|
,[进水端实际压力] 泵进口压力
|
|
FROM [dbo].[历史记录_000015_" + yearStr + "] order by id DESC";
|
|
FROM [dbo].[历史记录_000015_" + yearStr + "] order by id DESC";
|
|
- DataTable dtDevice = dbHelper.Fill(factorySql);
|
|
|
|
|
|
+ DataTable dtDevice = secondDbHelper.Fill(factorySql);
|
|
if (dtDevice == null || dtDevice.Rows.Count == 0)
|
|
if (dtDevice == null || dtDevice.Rows.Count == 0)
|
|
{
|
|
{
|
|
return;
|
|
return;
|
|
@@ -211,7 +211,7 @@ namespace TimedUpload.QuartzJobs
|
|
,[qingshuichiFluidLevel] 清水池液位
|
|
,[qingshuichiFluidLevel] 清水池液位
|
|
FROM[Waterwell].[dbo].[WaterFactoryDaliyRecord] order by id DESC";
|
|
FROM[Waterwell].[dbo].[WaterFactoryDaliyRecord] order by id DESC";
|
|
|
|
|
|
- DataTable dtDevice = dbHelper.Fill(factorySql);
|
|
|
|
|
|
+ DataTable dtDevice = waterFactoryDbHelper.Fill(factorySql);
|
|
if (dtDevice == null || dtDevice.Rows.Count == 0)
|
|
if (dtDevice == null || dtDevice.Rows.Count == 0)
|
|
{
|
|
{
|
|
return;
|
|
return;
|
|
@@ -272,6 +272,33 @@ namespace TimedUpload.QuartzJobs
|
|
}
|
|
}
|
|
|
|
|
|
static IDbProvider dbHelper
|
|
static IDbProvider dbHelper
|
|
|
|
+ {
|
|
|
|
+ get
|
|
|
|
+ {
|
|
|
|
+ var DbDefine = DbFactoryProvider.GetProvider(CurrentDbType.SqlServer, Constants.DbConncetion);
|
|
|
|
+ return DbDefine;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ static IDbProvider waterFactoryDbHelper
|
|
|
|
+ {
|
|
|
|
+ get
|
|
|
|
+ {
|
|
|
|
+ var DbDefine = DbFactoryProvider.GetProvider(CurrentDbType.SqlServer, Constants.changleWaterFactoryDb);
|
|
|
|
+ return DbDefine;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ static IDbProvider waterQulityDbHelper
|
|
|
|
+ {
|
|
|
|
+ get
|
|
|
|
+ {
|
|
|
|
+ var DbDefine = DbFactoryProvider.GetProvider(CurrentDbType.SqlServer, Constants.changLeWaterQualityDb);
|
|
|
|
+ return DbDefine;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ static IDbProvider secondDbHelper
|
|
{
|
|
{
|
|
get
|
|
get
|
|
{
|
|
{
|