呼叫输送相关
This commit is contained in:
commit
4a8eab7692
8 files changed
+47
-36
No files matched your search
Generated
+9
@@ -915,6 +915,15 @@ namespace DyeingComputer.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 ProductName 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string ProductName {
|
||||
get {
|
||||
return ResourceManager.GetString("ProductName", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 ProgramGroup 的本地化字符串。
|
||||
/// </summary>
|
||||
|
||||
@@ -543,4 +543,7 @@
|
||||
<data name="refuse" xml:space="preserve">
|
||||
<value>Refuse</value>
|
||||
</data>
|
||||
<data name="ProductName" xml:space="preserve">
|
||||
<value>Product Name</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -543,4 +543,7 @@
|
||||
<data name="refuse" xml:space="preserve">
|
||||
<value>Refuse</value>
|
||||
</data>
|
||||
<data name="ProductName" xml:space="preserve">
|
||||
<value>ProductName</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -543,4 +543,7 @@
|
||||
<data name="refuse" xml:space="preserve">
|
||||
<value>拒绝</value>
|
||||
</data>
|
||||
<data name="ProductName" xml:space="preserve">
|
||||
<value>原料名</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -543,4 +543,7 @@
|
||||
<data name="refuse" xml:space="preserve">
|
||||
<value>拒絕</value>
|
||||
</data>
|
||||
<data name="ProductName" xml:space="preserve">
|
||||
<value>原料名</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -434,6 +434,7 @@ namespace DyeingComputer.UserClass
|
||||
{
|
||||
Dictionary<string, object> Chart_new = new Dictionary<string, object>();//缓存函数
|
||||
Chart_new.Add("LOCK", MainWindowViewModel._Lock_bool);
|
||||
Chart_new.Add("CALL", MainWindowViewModel.CALL_FR);
|
||||
Chart_new.Add("Status", MainWindowViewModel.StatusStr);
|
||||
Chart_new.Add("Machine", MainWindowViewModel.S01);
|
||||
Chart_new.Add("WorkNumder", MainWindowViewModel.WorkNumder);
|
||||
|
||||
@@ -6,10 +6,14 @@
|
||||
xmlns:local="clr-namespace:DyeingComputer.View"
|
||||
xmlns:lang="clr-namespace:DyeingComputer.Properties"
|
||||
xmlns:viewmodel="clr-namespace:DyeingComputer.ViewModel"
|
||||
xmlns:ConvertMoels="clr-namespace:DyeingComputer.ConvertMoels"
|
||||
d:DataContext="{d:DesignInstance Type=viewmodel:MainWindowViewModel}"
|
||||
mc:Ignorable="d" Loaded="UserControl_Loaded"
|
||||
KeyDown="UserControl_KeyDown"
|
||||
d:DesignHeight="630" d:DesignWidth="1280">
|
||||
<UserControl.Resources>
|
||||
<ConvertMoels:StatenConvert x:Key="StatenConvert"/>
|
||||
</UserControl.Resources>
|
||||
<Grid>
|
||||
<DataGrid x:Name="GridSTEP" AlternationCount="2" IsReadOnly="True" SelectionChanged="Grid_SelectionChanged"
|
||||
Margin="630,40,0,0" d:ItemsSource="{d:SampleData ItemCount=90}" AutoGenerateColumns="False" MinColumnWidth="30"
|
||||
@@ -109,7 +113,7 @@
|
||||
<DataTrigger Binding="{Binding Amount}" Value="{x:Null}">
|
||||
<Setter Property="Foreground" Value="#FFADADAD"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Amount}" Value="0">
|
||||
<DataTrigger Binding="{Binding State}" Value="309">
|
||||
<Setter Property="Foreground" Value="Red"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
@@ -130,10 +134,11 @@
|
||||
</DataGrid.CellStyle>
|
||||
<DataGrid.Columns>
|
||||
<!--列信息绑定-->
|
||||
<DataGridTextColumn Header="{x:Static lang:Resources.Step}" Binding="{Binding Step}" Width="60"/>
|
||||
<DataGridTextColumn Header="{x:Static lang:Resources.Directives}" Width="200" Binding="{Binding ProductCode}"/>
|
||||
<DataGridTextColumn Header="{x:Static lang:Resources.ParameterSet}" Width="*" Binding="{Binding Grams}"/>
|
||||
<DataGridTextColumn Header="{x:Static lang:Resources.ParameterSet}" Width="*" Binding="{Binding Amount}"/>
|
||||
<DataGridTextColumn Header="{x:Static lang:Resources.Step}" Binding="{Binding Step}" Width="30"/>
|
||||
<DataGridTextColumn Header="{x:Static lang:Resources.State}" Width="50" Binding="{Binding State}"/>
|
||||
<DataGridTextColumn Header="{x:Static lang:Resources.ProductName}" Width="180" Binding="{Binding ProductName}"/>
|
||||
<DataGridTextColumn Header="{x:Static lang:Resources.Grams}" Width="*" Binding="{Binding Grams}"/>
|
||||
<DataGridTextColumn Header="{x:Static lang:Resources.Amount}" Width="*" Binding="{Binding Amount}"/>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
<DataGrid x:Name="Parameter_set" Visibility="Collapsed"
|
||||
|
||||
@@ -124,7 +124,6 @@ namespace DyeingComputer.ViewModel
|
||||
execute: ProgramgroupView_stop_);//结束事件
|
||||
}
|
||||
|
||||
|
||||
DataTable dt_con = new DataTable();
|
||||
DataTable dt_sys = new DataTable();
|
||||
public string Selet_con(string key)//配置缓存
|
||||
@@ -267,16 +266,16 @@ namespace DyeingComputer.ViewModel
|
||||
public ICommand ProgramgroupView_run { get; }
|
||||
private void ProgramgroupView_stop_()//结束
|
||||
{
|
||||
APILog.LOGlog(MainWindowViewModel.WorkNumder.ToString(), "UserActions", "WORK_RUN = STOP", MainWindowViewModel.WORK_RUN.ToString());
|
||||
APILog.LOGlog(WorkNumder.ToString(), "UserActions", "WORK_RUN = STOP", WORK_RUN.ToString());
|
||||
|
||||
MessageBoxResult messageBoxResult = System.Windows.MessageBox.Show(Properties.Resources.StopProcess, "800", MessageBoxButton.OKCancel);
|
||||
if (messageBoxResult == MessageBoxResult.OK)
|
||||
{
|
||||
MainWindowViewModel.WORK_RUN = 0;// 运行时停止键为
|
||||
MainWindowViewModel.DIDETime = 0;
|
||||
APILog.LOGlog(MainWindowViewModel.WorkNumder.ToString(), "UserActions", "PROCESS_END", MainWindowViewModel.WORK_RUN.ToString());
|
||||
WORK_RUN = 0;// 运行时停止键为
|
||||
DIDETime = 0;
|
||||
APILog.LOGlog(WorkNumder.ToString(), "UserActions", "PROCESS_END", WORK_RUN.ToString());
|
||||
|
||||
MainWindowViewModel.dt_TP.Rows.Clear();
|
||||
dt_TP.Rows.Clear();
|
||||
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
|
||||
SQLiteHelpers.Open(); //打开数据库
|
||||
SQLiteHelpers.Delete("RUN", null, null);
|
||||
@@ -1496,7 +1495,7 @@ namespace DyeingComputer.ViewModel
|
||||
case "067":
|
||||
|
||||
STEP_finish = true;
|
||||
break;//呼叫输送准备
|
||||
break;//等待输送
|
||||
case "090":
|
||||
if (((STEP_P1-1)<Selet_dtm("1010"))&&(Selet_dtm("1010") < (STEP_P1+1))) PH_start = true;//达到温度开始ph控制
|
||||
if (PH_start)
|
||||
@@ -1659,35 +1658,20 @@ namespace DyeingComputer.ViewModel
|
||||
}
|
||||
}
|
||||
|
||||
public static bool CALL_FR = false;
|
||||
void FeedingRecords(string WorkOrder,string Dyelot,int TANK,int STEP,int Type) //呼叫输送
|
||||
{
|
||||
DataTable data_t = new DataTable();
|
||||
data_t.Columns.Add("Dyelot", typeof(string)); //添加列
|
||||
data_t.Columns.Add("Machine", typeof(string));
|
||||
data_t.Columns.Add("WorkOrder", typeof(string));
|
||||
data_t.Columns.Add("TIME", typeof(string));
|
||||
data_t.Columns.Add("Tank", typeof(int));
|
||||
data_t.Columns.Add("STEP", typeof(int));
|
||||
data_t.Columns.Add("Type", typeof(int));
|
||||
data_t.Columns.Add("State", typeof(int));
|
||||
data_t.Columns.Add("Redye", typeof(int));
|
||||
DataRow dr = data_t.NewRow();
|
||||
dr.BeginEdit(); //添加订单号
|
||||
dr["Dyelot"] = Dyelot;
|
||||
dr["Machine"] = S01;
|
||||
dr["WorkOrder"] = WorkOrder;
|
||||
dr["TIME"] = sys_Time;
|
||||
dr["Tank"] = TANK;
|
||||
dr["STEP"] = STEP;
|
||||
dr["Type"] = Type;
|
||||
dr["State"] = 201;
|
||||
dr["Redye"] = SYS_REDYE;
|
||||
dr.EndEdit();
|
||||
data_t.Rows.InsertAt(dr, 0); //行转换
|
||||
Dictionary<string, object> dat_FR = new Dictionary<string, object>();
|
||||
dat_FR.Add("State", "201");
|
||||
dat_FR.Add("Tank", TANK.ToString());
|
||||
dat_FR.Add("Machine", S01);
|
||||
dat_FR.Add("CALL_TIME", sys_Time);
|
||||
|
||||
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
|
||||
SQLiteHelpers.Open(); //打开数据库
|
||||
SQLiteHelpers.InsertData("FeedingRecords", SQLiteHelpers.DataTableToDictionary(data_t));//行插入
|
||||
int SQLI = SQLiteHelpers.ExecuteDataSet("select * from Dyelot where " +
|
||||
"Dyelot = '"+Dyelot+ "' AND Step = '"+STEP+ "' AND Redye ='"+SYS_REDYE+"' AND State = '101'", null).Tables[0].Rows.Count;
|
||||
if(SQLI>0) SQLiteHelpers.Update("Dyelot", dat_FR, "Dyelot = '"+Dyelot+ "' AND Step = '"+STEP+ "' AND Redye ='"+SYS_REDYE+"'", null);//行更新
|
||||
SQLiteHelpers.Close(); //关闭连接
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user