增加水位管理

This commit is contained in:
GiteaAdmin 2023-06-08 10:06:45 +08:00
parent 14fcbd54d6
commit 3016b91685
4 changed files with 30 additions and 25 deletions

View File

@ -393,7 +393,7 @@ namespace SolarPower.Repository.Implement
{ {
try try
{ {
var sql = @$"SELECT SerialNumber FROM {tableName} var sql = @$" SELECT SerialNumber FROM {tableName}
WHERE CityId = @CityId && AreaId = @AreaId ORDER BY SerialNumber DESC"; WHERE CityId = @CityId && AreaId = @AreaId ORDER BY SerialNumber DESC";
result = await conn.QueryFirstOrDefaultAsync<string>(sql, new { CityId = cityId, AreaId = areaId }); result = await conn.QueryFirstOrDefaultAsync<string>(sql, new { CityId = cityId, AreaId = areaId });

View File

@ -42,7 +42,7 @@ namespace solarApp.Service
// string yyyymm = System.DateTime.Now.AddMonths(-2).ToString("yyyy-MM"); // string yyyymm = System.DateTime.Now.AddMonths(-2).ToString("yyyy-MM");
_siteID = siteID; _siteID = siteID;
//搬移的月份 //搬移的月份
move_month = System.DateTime.Now.AddMonths(-2).ToString("yyyy-MM"); move_month = System.DateTime.Now.AddMonths(-1).ToString("yyyy-MM");
//_date1 = date1; //_date1 = date1;
get_siteInfo(); get_siteInfo();
checkTable(); checkTable();

View File

@ -30,8 +30,8 @@ namespace solarApp
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage(); this.tabPage1 = new System.Windows.Forms.TabPage();
this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.splitContainer1 = new System.Windows.Forms.SplitContainer();
@ -394,8 +394,8 @@ namespace solarApp
// //
this.gv_inv_detail.AllowUserToAddRows = false; this.gv_inv_detail.AllowUserToAddRows = false;
this.gv_inv_detail.AllowUserToDeleteRows = false; this.gv_inv_detail.AllowUserToDeleteRows = false;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.gv_inv_detail.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; this.gv_inv_detail.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.gv_inv_detail.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.gv_inv_detail.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.gv_inv_detail.Dock = System.Windows.Forms.DockStyle.Fill; this.gv_inv_detail.Dock = System.Windows.Forms.DockStyle.Fill;
this.gv_inv_detail.Location = new System.Drawing.Point(768, 75); this.gv_inv_detail.Location = new System.Drawing.Point(768, 75);
@ -411,8 +411,8 @@ namespace solarApp
// //
this.gv_rpt_invDay.AllowUserToAddRows = false; this.gv_rpt_invDay.AllowUserToAddRows = false;
this.gv_rpt_invDay.AllowUserToDeleteRows = false; this.gv_rpt_invDay.AllowUserToDeleteRows = false;
dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.gv_rpt_invDay.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle4; this.gv_rpt_invDay.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle2;
this.gv_rpt_invDay.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.gv_rpt_invDay.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.gv_rpt_invDay.Dock = System.Windows.Forms.DockStyle.Left; this.gv_rpt_invDay.Dock = System.Windows.Forms.DockStyle.Left;
this.gv_rpt_invDay.Location = new System.Drawing.Point(0, 75); this.gv_rpt_invDay.Location = new System.Drawing.Point(0, 75);
@ -760,7 +760,7 @@ namespace solarApp
this.ClientSize = new System.Drawing.Size(1782, 953); this.ClientSize = new System.Drawing.Size(1782, 953);
this.Controls.Add(this.tabControl1); this.Controls.Add(this.tabControl1);
this.Name = "fmArchive"; this.Name = "fmArchive";
this.Text = "fmArchive 03-20 拯救 Kevin"; this.Text = "fmArchive 05-29 拯救 Kevin";
this.Load += new System.EventHandler(this.fmArchive_Load); this.Load += new System.EventHandler(this.fmArchive_Load);
this.tabControl1.ResumeLayout(false); this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false); this.tabPage1.ResumeLayout(false);

View File

@ -191,24 +191,29 @@ namespace solarApp
//水位管理 //水位管理
//if (System.DateTime.Now.Hour == 03 && DateTime.Now.Minute == 30 if (System.DateTime.Now.Hour == 20 && DateTime.Now.Minute == 00
// && (DateTime.Now.Second >= 0 && DateTime.Now.Second <= 10) && (DateTime.Now.Second >= 0 && DateTime.Now.Second <= 10)
// && autoTask == false) && autoTask == false)
//{ {
// int i = 0; autoTask = true;
// var site_list = stationSvc.get_station_list(); bt_MoveRawData.PerformClick();
autoTask = false;
//int i = 0;
//var site_list = stationSvc.get_station_list();
// archiveLowData archiveData = new archiveLowData(); //archiveLowData archiveData = new archiveLowData();
// autoTask = true;
// foreach (var item in site_list) //bt_MoveRawData_Click
// {
//foreach (var item in site_list)
//{
// archiveData.archiveData(item.SiteID.Substring(0, 9)); // archiveData.archiveData(item.SiteID.Substring(0, 9));
// i++; // i++;
// }
// autoTask = false;
// lbMsgTitle.Text = System.DateTime.Now.ToString() + " 水位管理 - 資料搬移完成!";
//} //}
lbMsgTitle.Text = System.DateTime.Now.ToString() + " 水位管理 - 資料搬移完成!";
}
} }
private void rb_site_CheckedChanged(object sender, EventArgs e) private void rb_site_CheckedChanged(object sender, EventArgs e)