|
|
@@ -12,7 +12,7 @@ namespace FileWatcher
|
|
|
public partial class UploadMakePlan : Form
|
|
|
{
|
|
|
|
|
|
- string connectionString = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.1.81.208)(PORT=11710)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
|
|
|
+ string connectionString = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.3.7)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
|
|
|
|
|
|
|
|
|
StringBuilder sql = new StringBuilder();
|
|
|
@@ -72,7 +72,7 @@ namespace FileWatcher
|
|
|
{
|
|
|
//Console.WriteLine($"Processing sheet: {sheetName}");
|
|
|
// 获取标题行(第4行)
|
|
|
- string wccode = sheet.GetRow(2).GetCell(2).StringCellValue; // 第4行索引为3
|
|
|
+ string wccode = sheet.GetRow(2).GetCell(1).StringCellValue; // 第4行索引为3
|
|
|
if (wccode == "")
|
|
|
{
|
|
|
OperateResult.AppendText("工作中心不存在");
|
|
|
@@ -131,7 +131,7 @@ namespace FileWatcher
|
|
|
OperateResult.AppendText("列头缺少,请检查表结构");
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
+ bool GetPlan = false;
|
|
|
using (OracleConnection conn = new OracleConnection(connectionString))
|
|
|
{
|
|
|
conn.Open();
|
|
|
@@ -185,13 +185,21 @@ namespace FileWatcher
|
|
|
cmd.Parameters.Add(new OracleParameter(":6", stepcode));
|
|
|
cmd.ExecuteNonQuery();
|
|
|
}
|
|
|
+ GetPlan = true;
|
|
|
}
|
|
|
}
|
|
|
detno = detno + 1;
|
|
|
}
|
|
|
}
|
|
|
dh.ExecuteSql("delete from MakePlanDetail where mpd_orderdetno is null", "delete");
|
|
|
- OperateResult.AppendText($"Processing sheet: {sheetName}计划上传成功\n");
|
|
|
+ if (GetPlan)
|
|
|
+ {
|
|
|
+ OperateResult.AppendText($"Processing sheet: {sheetName}计划上传成功\n");
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ OperateResult.AppendText($"Processing sheet: {sheetName}没有需要上传的计划\n");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
string Error = "";
|