diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj
index 6a99931..cbd0619 100644
--- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj
@@ -371,6 +371,7 @@
+
Form
@@ -379,6 +380,7 @@
+
diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Product/PptPlan/PlanHelper.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Product/PptPlan/PlanHelper.cs
index 6939683..14d326f 100644
--- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Product/PptPlan/PlanHelper.cs
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Product/PptPlan/PlanHelper.cs
@@ -2894,11 +2894,7 @@ namespace Mesnac.Action.ChemicalWeighing.Product.PptPlan
throw new Exception(Mesnac.Basic.LanguageHelper.DataBaseConnectError);
}
dbHelper.CommandType = CommandType.Text;
- string strSql = @"select w.Weight_Id MID, p.Dosing_Id,p.Plan_Id,p.Plan_Serial,p.Recipe_ID,p.Recipe_Name,p.Version,p.Plan_Num,p.Real_Num,p.Shift_Id,p.Shift_Class,p.Plan_State,p.Plan_StateText,p.Plan_TotalWeight,p.Plan_TotalError,
- r.Total_Weight,r.Total_Error,m.ID as MaterialID,m.Material_name,b.Bin_Serial as Station,b.Bin_Name as StationName,w.Set_Weight,w.Set_Error,p.IsRetransmission,p.Retransmission_Num
- from (select * from RT_plan where Start_Date=(select MAX(Start_Date) from RT_plan)) p left join Pmt_recipe r on p.Recipe_ID=r.ID left join Pmt_weigh w on r.ID=w.Recipe_ID left join Pmt_material m on w.Material_ID=m.ID left join Pmt_Bin b on m.ID=b.Material_ID
- where p.Weighbridge='1号地磅' and p.Plan_State=3 ORDER BY w.Weight_Id";
-
+ string strSql = @"select w.Weight_Id MID, p.Dosing_Id,p.Plan_Id,p.Plan_Serial,p.Recipe_ID,p.Recipe_Name,p.Version,p.Plan_Num,p.Real_Num,p.Shift_Id,p.Shift_Class,p.Plan_State,p.Plan_StateText,p.Plan_TotalWeight,p.Plan_TotalError,r.Total_Weight,r.Total_Error,m.ID as MaterialID,m.Material_name,b.Bin_Serial as Station,b.Bin_Name as StationName,w.Set_Weight,w.Set_Error,p.IsRetransmission,p.Retransmission_Num from (select * from RT_plan where Start_Date=(select MAX(Start_Date) from RT_plan)) p left join Pmt_recipe r on p.Recipe_ID=r.ID left join Pmt_weigh w on r.ID=w.Recipe_ID left join Pmt_material m on w.Material_ID=m.ID left join Pmt_Bin b on m.ID=b.Material_ID where p.Weighbridge='1号地磅' and p.Plan_State=3 ORDER BY w.Weight_Id";
dbHelper.CommandText = strSql;
dbHelper.ClearParameter();
DataTable table = dbHelper.ToDataTable();
@@ -2934,7 +2930,7 @@ namespace Mesnac.Action.ChemicalWeighing.Product.PptPlan
throw new Exception(Mesnac.Basic.LanguageHelper.DataBaseConnectError);
}
dbHelper.CommandType = CommandType.Text;
- string strSql = @"select w.Weight_Id MID, p.Dosing_Id,p.Plan_Id,p.Plan_Serial,p.Recipe_ID,p.Recipe_Name,p.Version,p.Plan_Num,p.Real_Num,p.Shift_Id,p.Shift_Class,p.Plan_State,p.Plan_StateText,p.Plan_TotalWeight,p.Plan_TotalError,
+ string strSql = @"select w.Weight_Id MID, p.Plan_Id,p.Plan_Serial,p.Recipe_ID,p.Recipe_Name,p.Version,p.Plan_Num,p.Real_Num,p.Shift_Id,p.Shift_Class,p.Plan_State,p.Plan_StateText,p.Plan_TotalWeight,p.Plan_TotalError,
r.Total_Weight,r.Total_Error,m.ID as MaterialID,m.Material_name,b.Bin_Serial as Station,b.Bin_Name as StationName,w.Set_Weight,w.Set_Error,p.IsRetransmission,p.Retransmission_Num
from (select * from RT_plan where Start_Date=(select MAX(Start_Date) from RT_plan)) p left join Pmt_recipe r on p.Recipe_ID=r.ID left join Pmt_weigh w on r.ID=w.Recipe_ID left join Pmt_material m on w.Material_ID=m.ID left join Pmt_Bin b on m.ID=b.Material_ID
where p.Weighbridge='2号地磅' ORDER BY w.Weight_Id";
@@ -3281,7 +3277,7 @@ namespace Mesnac.Action.ChemicalWeighing.Product.PptPlan
{
MetagePlan plan = new MetagePlan();
plan.MID = Mesnac.Basic.DataProcessor.RowValue(dr, "MID", 0);
- plan.Dosing_Id = Mesnac.Basic.DataProcessor.RowValue(dr, "Dosing_Id", String.Empty);
+ //plan.Dosing_Id = Mesnac.Basic.DataProcessor.RowValue(dr, "Dosing_Id", String.Empty);
plan.Plan_Id = Mesnac.Basic.DataProcessor.RowValue(dr, "Plan_Id", String.Empty);
plan.Plan_Serial = Mesnac.Basic.DataProcessor.RowValue(dr, "Plan_Serial", 0);
plan.Recipe_ID = Mesnac.Basic.DataProcessor.RowValue(dr, "Recipe_ID", String.Empty);
@@ -3303,7 +3299,7 @@ namespace Mesnac.Action.ChemicalWeighing.Product.PptPlan
plan.StationName = Mesnac.Basic.DataProcessor.RowValue(dr, "StationName", String.Empty);
plan.Set_Weight = Convert.ToDecimal(Mesnac.Basic.DataProcessor.RowValue(dr, "Set_Weight", 0.000));
plan.Set_Error = Convert.ToDecimal(Mesnac.Basic.DataProcessor.RowValue(dr, "Set_Error", 0.000));
- var t= Mesnac.Basic.DataProcessor.RowValue(dr, "IsRate", String.Empty);
+ var t= Mesnac.Basic.DataProcessor.RowValue(dr, "IsRate", String.Empty);
plan.IsRate = t== "True" ?1:0;
plan.TheoryRate = Convert.ToDecimal(Mesnac.Basic.DataProcessor.RowValue(dr, "TheoryRate", 0.00));
plan.IsRetransmission = Mesnac.Basic.DataProcessor.RowValue(dr, "IsRetransmission", 0);
diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/PumpManage/DeleteAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/PumpManage/DeleteAction.cs
new file mode 100644
index 0000000..e473d94
--- /dev/null
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/PumpManage/DeleteAction.cs
@@ -0,0 +1,141 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using System.Data;
+using ICSharpCode.Core;
+using Mesnac.Controls.Base;
+using Mesnac.Action.Base;
+using Mesnac.Codd.Session;
+using Mesnac.Action.ChemicalWeighing.Entity;
+using System.Drawing;
+
+namespace Mesnac.Action.ChemicalWeighing.PumpManage
+{
+ ///
+ /// 删除计划业务
+ ///
+ public class DeleteAction : ChemicalWeighingAction, IAction
+ {
+ #region 事件定义
+
+ ///
+ /// 删除计划事件定义
+ ///
+ public static event EventHandler OnDeletePump;
+
+ #endregion
+
+ #region 字段定义
+
+ private RuntimeParameter _runtime;
+ private DbMCControl _clientGridControl = null;
+
+ #endregion
+
+ #region IAction接口实现
+
+ public void Run(RuntimeParameter runtime)
+ {
+ base.RunIni(runtime);
+ this._runtime = runtime;
+
+ ICSharpCode.Core.LoggingService.Debug("投料泵管理—删除投料泵业务...");
+
+ DbMCControl clientGridControl = this.GetDbMCControlByKey(Mesnac.Basic.DataSourceFactory.MCDbType.Local, "Pmt_recipe").FirstOrDefault();
+ if (clientGridControl == null || !(clientGridControl.BaseControl is DataGridView))
+ {
+ ICSharpCode.Core.LoggingService.Error("{投料泵管理—删除配方}缺少投料泵控件...");
+ return;
+ }
+ this._clientGridControl = clientGridControl;
+ this.DoWork();
+ }
+
+ #endregion
+
+ #region 方法定义
+
+ ///
+ /// 删除计划
+ ///
+ protected void DoWork()
+ {
+ this._runtime.BaseControl.MCEnabled = false;
+
+ try
+ {
+ DataGridView clientGridView = this._clientGridControl.BaseControl as DataGridView;
+
+ #region 1 变量定义
+
+ string selectId = clientGridView.SelectedRows[0].Cells["ID"].Value as string;
+ if (string.IsNullOrEmpty(selectId))
+ {
+ MessageBox.Show("未获到要删除泵信息?", Mesnac.Basic.LanguageHelper.Caption, MessageBoxButtons.OK, MessageBoxIcon.Information);
+ this._runtime.IsReturn = true;
+ return;
+ }
+ #endregion
+
+ #region 2 判断是否选择了要删除的物料
+
+ if (clientGridView.SelectedRows.Count != 1)
+ {
+ MessageBox.Show("请选择一条要删除的泵信息吗?", Mesnac.Basic.LanguageHelper.Caption, MessageBoxButtons.OK, MessageBoxIcon.Information);
+ this._runtime.IsReturn = true;
+ return;
+ }
+
+ #endregion
+
+
+
+ //删除配方前询问
+ string msg1 = "确认删除当前信息吗?";
+ DialogResult result = MessageBox.Show(msg1, Mesnac.Basic.LanguageHelper.Caption, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
+ if (result == DialogResult.Yes)
+ {
+ #region 执行删除操作
+
+ IFreeSql _freeSql = DBHelper.FreeHelper.Instance;
+ var t4 = _freeSql.Delete(new { ID = int.Parse(selectId) }).ExecuteAffrows();
+ if (t4<=0)
+ {
+ MessageBox.Show("泵信息删除失败!");
+ }
+
+
+ #region 触发事件
+ if (OnDeletePump != null)
+ {
+ OnDeletePump(this._runtime.BaseControl.MCRoot, System.EventArgs.Empty);
+ }
+ #endregion
+ MessageBox.Show("泵信息删除成功!");
+ #endregion
+ }
+
+ }
+ catch (Exception ex)
+ {
+ ICSharpCode.Core.LoggingService.Error("删除计划异常:" + ex.Message, ex);
+
+ #region 记录操作日志
+
+ base.DBLog(ex.Message);
+
+ #endregion
+
+ MessageBox.Show(ex.Message, Mesnac.Basic.LanguageHelper.WarnCaption, MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ }
+ finally
+ {
+ this._runtime.BaseControl.MCEnabled = true;
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/PumpManage/ModifyAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/PumpManage/ModifyAction.cs
new file mode 100644
index 0000000..74b485e
--- /dev/null
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/PumpManage/ModifyAction.cs
@@ -0,0 +1,133 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using System.Data;
+using ICSharpCode.Core;
+using Mesnac.Controls.Base;
+using Mesnac.Action.Base;
+using Mesnac.Codd.Session;
+using Mesnac.Action.ChemicalWeighing.Entity;
+
+namespace Mesnac.Action.ChemicalWeighing.PumpManage
+{
+ ///
+ /// 泵管理
+ ///
+ public class ModifyAction : ChemicalWeighingAction, IAction
+ {
+ #region 字段定义
+
+ private RuntimeParameter _runtime;
+ private DbMCControl _clientGridControl = null;
+
+ #endregion
+
+ #region 事件定义
+
+ ///
+ /// 修改计划数事件定义
+ ///
+ public static event EventHandler OnModifyRecipe;
+
+ #endregion
+
+ #region 业务入口
+
+ public void Run(RuntimeParameter runtime)
+ {
+ base.RunIni(runtime); //必须要调用的
+ this._runtime = runtime;
+ ICSharpCode.Core.LoggingService.Debug("泵管理-修改泵信息...");
+ try
+ {
+ #region 变量定义
+
+ string selectId = null;
+
+ #endregion
+
+ #region 1 获取界面控件
+
+ DbMCControl clientGridControl = this.GetDbMCControlByKey(Mesnac.Basic.DataSourceFactory.MCDbType.Local, "Pmt_recipe").FirstOrDefault();
+ if (clientGridControl == null || !(clientGridControl.BaseControl is DataGridView))
+ {
+ ICSharpCode.Core.LoggingService.Error("{泵管理—删除泵}缺少泵管理控件...");
+ return;
+ }
+ this._clientGridControl = clientGridControl;
+ this._runtime = runtime;
+ DataGridView clientGridView = this._clientGridControl.BaseControl as DataGridView;
+
+ #endregion
+
+ #region 2 判断是否选择了要修改的泵
+
+ if (clientGridView.SelectedRows.Count != 1)
+ {
+ MessageBox.Show("请选择一条要修改的泵信息", Mesnac.Basic.LanguageHelper.Caption, MessageBoxButtons.OK, MessageBoxIcon.Information);
+ this._runtime.IsReturn = true;
+ return;
+ }
+
+ #endregion
+
+ #region 3 获取泵信息
+
+ selectId = clientGridView.SelectedRows[0].Cells["ID"].Value as string;
+
+ #endregion
+
+ #region 4 获取泵信息实体
+
+ IFreeSql _freeSql = DBHelper.FreeHelper.Instance;
+ var t4 = _freeSql.Select().First(d=>d.ID==int.Parse(selectId));
+
+ #endregion
+
+ #region 5 执行配方修改
+
+ //if (pmt_Recipe != null)
+ //{
+ // _recipeName = pmt_Recipe.Recipe_Name;
+ // _version =pmt_Recipe.Version;
+ // _groupBags = pmt_Recipe.GroupBags.ToString();
+ // _remark = pmt_Recipe.Remark;
+ // double totalError = Convert.ToDouble(pmt_Recipe.Total_Error);
+
+ // FrmRecipe frmUpdateRecipe = new FrmRecipe(ActionType.Modify, _recipeName, _version, _groupBags, _remark, totalError);
+ // frmUpdateRecipe.ShowDialog(this._runtime.BaseControl.MCRoot as Control);
+ // if (frmUpdateRecipe.DialogResult == DialogResult.OK)
+ // {
+ // #region 触发事件
+
+ // if (OnModifyRecipe != null)
+ // {
+ // OnModifyRecipe(this._runtime.BaseControl.MCRoot, System.EventArgs.Empty);
+ // }
+
+ // #endregion
+
+ // frmUpdateRecipe.Dispose();
+ // MessageBox.Show("配方信息修改成功!");
+ // }
+ // else
+ // {
+ // frmUpdateRecipe.Dispose();
+ // }
+ // }
+
+ #endregion
+
+ }
+ catch (Exception ex)
+ {
+ ICSharpCode.Core.LoggingService.Error("修改泵信息失败:" + ex.Message, ex);
+ MessageBox.Show(ex.Message, Mesnac.Basic.LanguageHelper.ErrorCaption, MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/PumpManage/RefreshAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/PumpManage/RefreshAction.cs
index 3bdfd1f..99131b7 100644
--- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/PumpManage/RefreshAction.cs
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/PumpManage/RefreshAction.cs
@@ -42,11 +42,12 @@ namespace Mesnac.Action.ChemicalWeighing.PumpManage
#region 事件订阅
-
+ DeleteAction.OnDeletePump -= Process_Event;
+ DeleteAction.OnDeletePump += Process_Event;
#endregion
-
+
DbMCControl clientGridControl = this.GetDbMCControlByKey(Mesnac.Basic.DataSourceFactory.MCDbType.Local, "Hw_Pump").FirstOrDefault(); //获取本机台计划控件
diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/SolventReport/InitFormAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/SolventReport/InitFormAction.cs
index 90b2ba5..c693af4 100644
--- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/SolventReport/InitFormAction.cs
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/SolventReport/InitFormAction.cs
@@ -42,10 +42,14 @@ namespace Mesnac.Action.ChemicalWeighing.Report.SolventReport
var comRecipe = base.GetControlById("comRecipe") as System.Windows.Forms.ComboBox;//配方名称
if (comRecipe != null)
{
- List list = PlanHelper.GetRecipeMaterialListPY();
+ //List list = PlanHelper.GetRecipeMaterialListPY();
+ IFreeSql _freeSql = DBHelper.FreeHelper.Instance;
+ string sql = "select distinct Batch from RT_plan where Batch is not null";
+ var list = _freeSql.Select().WithSql(sql).ToList();
+
comRecipe.DataSource = list;
- comRecipe.DisplayMember = "Recipe_Name";
- comRecipe.ValueMember = "ID";
+ comRecipe.DisplayMember = "Batch";
+ comRecipe.ValueMember = "Batch";
}
@@ -67,4 +71,8 @@ namespace Mesnac.Action.ChemicalWeighing.Report.SolventReport
#endregion
}
+ public class BatchObj
+ {
+ public string Batch { get; set; }
+ }
}
diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/SolventReport/SelectPlanAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/SolventReport/SelectPlanAction.cs
index 77a5465..413857b 100644
--- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/SolventReport/SelectPlanAction.cs
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/SolventReport/SelectPlanAction.cs
@@ -85,7 +85,7 @@ namespace Mesnac.Action.ChemicalWeighing.Report.SolventReport
if (!String.IsNullOrEmpty(this._recipeName))
{
- sb.AppendLine(@" And p.Recipe_Name ='" + _recipeName + "' ");
+ sb.AppendLine(@" And p.Batch ='" + _recipeName + "' ");
}
//if (!String.IsNullOrEmpty(this._shiftName))
//{
diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Show/InitFormAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Show/InitFormAction.cs
index 435f939..14c57d3 100644
--- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Show/InitFormAction.cs
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Show/InitFormAction.cs
@@ -218,7 +218,6 @@ namespace Mesnac.Action.ChemicalWeighing.Show
lblStateMessage.Text = "请加料!";
}
-
int addmateral = BasePlcHelper.Instance.solvent_Set_R.NowValue.ToInt();
if (addmateral == 1)
{
@@ -229,14 +228,14 @@ namespace Mesnac.Action.ChemicalWeighing.Show
{
lblStateMessage.Text = "请扫描拉缸条码,核对投料类型!";
}
- else
- {
- if (status01 == 0 && setr == 0)
- {
- lblStateMessage.Text = "";
- }
- lblStateMessage.Text = "";
- }
+ //else
+ //{
+ // if (status01 == 0 && setr == 0)
+ // {
+ // lblStateMessage.Text = "";
+ // }
+ // lblStateMessage.Text = "";
+ //}
}
int status = BasePlcHelper.Instance.solvent_SystemRuning.NowValue.ToInt();
if (status01 == 0 && status04 == 0 && status != 1)
@@ -277,34 +276,28 @@ namespace Mesnac.Action.ChemicalWeighing.Show
lblPlanName.Text = p.Plan_Id;
lblRecipeName.Text = p.Recipe_Name;
lblMaterial.Text = plan.Material_name;//正在执行的物料号
-
- if (!string.IsNullOrEmpty(planFlag))
+ lblStandardWeight.Text = plan.Total_Weight.ToString("f2");
+ }
+ else
+ {
+ return;
+ }
+
+ if (!string.IsNullOrEmpty(planFlag))
+ {
+ if (planFlag == plan.Plan_Id)
{
- if (planFlag == plan.Plan_Id)
- {
- return;
- }
- else
- {
- planFlag = plan.Plan_Id;
- }
+ return;
}
else
{
planFlag = plan.Plan_Id;
}
-
-
- lblStandardWeight.Text = plan.Total_Weight.ToString("f2");
}
else
{
- return;
+ planFlag = plan.Plan_Id;
}
-
-
-
-
lock (String.Empty)
{
//本地计划
@@ -418,49 +411,36 @@ namespace Mesnac.Action.ChemicalWeighing.Show
{
return;
}
- //MetagePlan plan2 = materialList.FirstOrDefault();
- //if (plan2 != null) { lblPlanStateMessage.Text = plan2.Plan_StateText; }
- //var matSerial = materialList.Max(d => d.Exec_Num);
- //if (matSerial>1&& materialList.Count!= matSerial)
- //{
- // matSerial = matSerial - 1;
- //}
-
- //MetagePlan plan = materialList.FirstOrDefault(d => d.MID == matSerial);
-
if (plan2 != null)
{
var p = materialList.FirstOrDefault();
lblPlanName.Text = p.Plan_Id;
lblRecipeName.Text = p.Recipe_Name;
lblMaterial.Text = plan2.Material_name;//正在执行的物料号
+ lblStandardWeight.Text = plan2.Total_Weight.ToString("f2");
+ }
+ else
+ {
+ return;
+ }
- if (!string.IsNullOrEmpty(planFlag))
+ if (!string.IsNullOrEmpty(planFlag))
+ {
+ if (planFlag == plan2.Plan_Id)
{
- if (planFlag == plan2.Plan_Id)
- {
- return;
- }
- else
- {
- planFlag = plan2.Plan_Id;
- }
+ return;
}
else
{
planFlag = plan2.Plan_Id;
}
-
- lblStandardWeight.Text = plan2.Total_Weight.ToString("f2");
}
else
{
- return;
+ planFlag = plan2.Plan_Id;
}
-
-
lock (String.Empty)
{
//本地计划
diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Warehouse/ImportAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Warehouse/ImportAction.cs
index 649ba37..31c32d9 100644
--- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Warehouse/ImportAction.cs
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Warehouse/ImportAction.cs
@@ -101,9 +101,9 @@ namespace Mesnac.Action.ChemicalWeighing.Warehouse
// MessageBox.Show(String.Format(msg2), Mesnac.Basic.LanguageHelper.WarnCaption, MessageBoxButtons.OK, MessageBoxIcon.Warning);
// }
DataTable dt = ds.Tables[0];
- RjHelper.DownRjPlan(dt);
- RjHelper.DownZBPlan(dt);
- XLHelper.DownXlPlan(dt);
+ RjHelper.DownRjPlan(dt, Id);
+ RjHelper.DownZBPlan(dt, Id);
+ XLHelper.DownXlPlan(dt, Id);
string msg2 = "任务下发完成!";
MessageBox.Show(String.Format(msg2), Mesnac.Basic.LanguageHelper.WarnCaption, MessageBoxButtons.OK, MessageBoxIcon.Warning);
diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Warehouse/ImportHelper/RjHelper.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Warehouse/ImportHelper/RjHelper.cs
index 54f840e..14ef41d 100644
--- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Warehouse/ImportHelper/RjHelper.cs
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Warehouse/ImportHelper/RjHelper.cs
@@ -13,7 +13,7 @@ namespace Mesnac.Action.ChemicalWeighing
{
public class RjHelper
{
- public static void DownRjPlan(DataTable dt)
+ public static void DownRjPlan(DataTable dt,int MainId)
{
var list = DataTableHelper.DataTableToList(dt);
List subList = new List();
@@ -22,7 +22,7 @@ namespace Mesnac.Action.ChemicalWeighing
list.ForEach((a) =>
{
Hw_WareHouse_Sub sb = new Hw_WareHouse_Sub();
- sb.MainId = 1;
+ sb.MainId = MainId;
sb.PId = a.PId;
sb.ProductName = a.ProductName;
a.Plan_State = 3;//待下发
@@ -196,7 +196,7 @@ namespace Mesnac.Action.ChemicalWeighing
}
}
- public static void DownZBPlan(DataTable dt)
+ public static void DownZBPlan(DataTable dt,int MainId)
{
var list = DataTableHelper.DataTableToList(dt);
List subList = new List();
@@ -205,7 +205,7 @@ namespace Mesnac.Action.ChemicalWeighing
list.ForEach((a) =>
{
Hw_WareHouse_Sub sb = new Hw_WareHouse_Sub();
- sb.MainId = 1;
+ sb.MainId = MainId;
sb.PId = a.PId;
sb.ProductName = a.ProductName;
a.Plan_State = 3;//待下发
@@ -225,10 +225,15 @@ namespace Mesnac.Action.ChemicalWeighing
var xt = (from d in xlList
select new
{
+ //d.PId,
+ //d.ProductName,
+ //d.MaterialType,
+ //d.Recipe,
d.PId,
d.ProductName,
d.MaterialType,
d.Recipe,
+ d.Weighbridge,
}).Distinct();
foreach (var item in xt)
@@ -319,6 +324,7 @@ namespace Mesnac.Action.ChemicalWeighing
plan.Plan_StateText = CommHelper.StateToShow((int)PlanState.UnStart);
plan.Plan_Date = String.Format("{0:yyyy-MM-dd}", DateTime.Now);
plan.IF_FLAG = 1;
+ plan.Weighbridge = item.Weighbridge;
#endregion
if (recipe == null)
diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Warehouse/ImportHelper/XLHelper.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Warehouse/ImportHelper/XLHelper.cs
index ec1e73b..bf7c34a 100644
--- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Warehouse/ImportHelper/XLHelper.cs
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Warehouse/ImportHelper/XLHelper.cs
@@ -13,7 +13,7 @@ namespace Mesnac.Action.ChemicalWeighing
{
public class XLHelper
{
- public static void DownXlPlan(DataTable dt)
+ public static void DownXlPlan(DataTable dt,int MainId)
{
var list = DataTableHelper.DataTableToList(dt);
List subList = new List();
@@ -22,7 +22,7 @@ namespace Mesnac.Action.ChemicalWeighing
list.ForEach((a) =>
{
Hw_WareHouse_Sub sb = new Hw_WareHouse_Sub();
- sb.MainId = 1;
+ sb.MainId = MainId;
sb.PId = a.PId;
sb.ProductName = a.ProductName;
sb.BinId = a.BinId == "" || a.BinId == null ? 0 : int.Parse(a.BinId);
diff --git a/Main/MCEdit/Data/EventConfig/小料称量/泵管理.xml b/Main/MCEdit/Data/EventConfig/小料称量/泵管理.xml
index fa41742..6ffb221 100644
--- a/Main/MCEdit/Data/EventConfig/小料称量/泵管理.xml
+++ b/Main/MCEdit/Data/EventConfig/小料称量/泵管理.xml
@@ -14,7 +14,14 @@
新增
新增
-
+
+ 删除
+ 删除
+
+
+ 编辑
+ 编辑
+
@@ -28,6 +35,12 @@
+
+
+
+
+
+
@@ -35,6 +48,9 @@
+
+
+
\ No newline at end of file
diff --git a/Main/MCEdit/Data/MCProject/nodeDataSource.xml b/Main/MCEdit/Data/MCProject/nodeDataSource.xml
index 479381b..91d4223 100644
--- a/Main/MCEdit/Data/MCProject/nodeDataSource.xml
+++ b/Main/MCEdit/Data/MCProject/nodeDataSource.xml
@@ -1,3 +1,3 @@
-
+
\ No newline at end of file
diff --git a/Main/MCEdit/Data/MCProject/nodeDevice.xml b/Main/MCEdit/Data/MCProject/nodeDevice.xml
index f9f5e48..bb289b6 100644
--- a/Main/MCEdit/Data/MCProject/nodeDevice.xml
+++ b/Main/MCEdit/Data/MCProject/nodeDevice.xml
@@ -3370,83 +3370,82 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -4262,85 +4261,84 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Main/MCEdit/Data/MCProject/nodeForm/FrmProductionReport.xml b/Main/MCEdit/Data/MCProject/nodeForm/FrmProductionReport.xml
index 4ebaeaa..d5b6b55 100644
--- a/Main/MCEdit/Data/MCProject/nodeForm/FrmProductionReport.xml
+++ b/Main/MCEdit/Data/MCProject/nodeForm/FrmProductionReport.xml
@@ -155,11 +155,11 @@
None
True
True
- 配方名称
+ 批次
宋体, 12pt
685, 30
MCLabel6
- 72, 16
+ 40, 16
+
+
+
+
+
+