|
|
@ -1447,7 +1447,7 @@ namespace Mesnac.Action.ChemicalWeighing.Product.PptPlan
|
|
|
|
dbHelper.CommandType = CommandType.Text;
|
|
|
|
dbHelper.CommandType = CommandType.Text;
|
|
|
|
string strSql = @"select row_number() over (order by create_Time) as index_Id ,uid, plan_Id, recipe_Id, recipe_Name, plan_Team, plan_Amount, real_Amount,
|
|
|
|
string strSql = @"select row_number() over (order by create_Time) as index_Id ,uid, plan_Id, recipe_Id, recipe_Name, plan_Team, plan_Amount, real_Amount,
|
|
|
|
case run_Type when '0' then '自动运行' else '手动运行' end as 'run_Type',
|
|
|
|
case run_Type when '0' then '自动运行' else '手动运行' end as 'run_Type',
|
|
|
|
case run_Type when '0' then '待执行' else '执行中' end as 'plan_State',
|
|
|
|
case plan_State when '0' then '待执行' else '执行中' end as 'plan_State',
|
|
|
|
plan_beginTime, plan_endTime, create_By, create_Time, update_By, update_Time,plan_order from Base_PlanInfo
|
|
|
|
plan_beginTime, plan_endTime, create_By, create_Time, update_By, update_Time,plan_order from Base_PlanInfo
|
|
|
|
order by plan_order asc";
|
|
|
|
order by plan_order asc";
|
|
|
|
dbHelper.CommandText = strSql;
|
|
|
|
dbHelper.CommandText = strSql;
|
|
|
@ -2706,6 +2706,8 @@ namespace Mesnac.Action.ChemicalWeighing.Product.PptPlan
|
|
|
|
/// <param name="remark">备注</param>
|
|
|
|
/// <param name="remark">备注</param>
|
|
|
|
/// <returns>返回新加计划的计划号</returns>
|
|
|
|
/// <returns>返回新加计划的计划号</returns>
|
|
|
|
public static string SaveBasePlanInfo(Base_PlanInfo base_PlanInfo)
|
|
|
|
public static string SaveBasePlanInfo(Base_PlanInfo base_PlanInfo)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
DbHelper dbHelper = Mesnac.Basic.DataSourceFactory.Instance.GetDbHelper(Mesnac.Basic.DataSourceFactory.MCDbType.Local);
|
|
|
|
DbHelper dbHelper = Mesnac.Basic.DataSourceFactory.Instance.GetDbHelper(Mesnac.Basic.DataSourceFactory.MCDbType.Local);
|
|
|
|
if (dbHelper == null)
|
|
|
|
if (dbHelper == null)
|
|
|
@ -2718,7 +2720,7 @@ namespace Mesnac.Action.ChemicalWeighing.Product.PptPlan
|
|
|
|
//添加计划的SQL语句
|
|
|
|
//添加计划的SQL语句
|
|
|
|
string strSql3 = @"insert into Base_PlanInfo (uid, plan_Id, recipe_Id, recipe_Name, plan_Team, plan_Amount, run_Type, plan_State, plan_beginTime,
|
|
|
|
string strSql3 = @"insert into Base_PlanInfo (uid, plan_Id, recipe_Id, recipe_Name, plan_Team, plan_Amount, run_Type, plan_State, plan_beginTime,
|
|
|
|
grid_Amount,line_Amount,car_Amount,create_By, create_Time,plan_order) VALUES (@uid, @plan_Id, @recipe_Id, @recipe_Name, @plan_Team,
|
|
|
|
grid_Amount,line_Amount,car_Amount,create_By, create_Time,plan_order) VALUES (@uid, @plan_Id, @recipe_Id, @recipe_Name, @plan_Team,
|
|
|
|
@plan_Amount, @run_Type, @plan_State, @plan_beginTime,@grid_Amount,@line_Amount,@car_Amount @create_By, @create_Time,@plan_order)";
|
|
|
|
@plan_Amount, @run_Type, @plan_State, @plan_beginTime,@grid_Amount,@line_Amount,@car_Amount,@create_By, @create_Time,@plan_order)";
|
|
|
|
dbHelper.CommandText = strSql3;
|
|
|
|
dbHelper.CommandText = strSql3;
|
|
|
|
|
|
|
|
|
|
|
|
dbHelper.AddParameter("@uid", base_PlanInfo.uid);
|
|
|
|
dbHelper.AddParameter("@uid", base_PlanInfo.uid);
|
|
|
@ -2740,6 +2742,10 @@ namespace Mesnac.Action.ChemicalWeighing.Product.PptPlan
|
|
|
|
dbHelper.AddParameter("@plan_order", base_PlanInfo.plan_order);
|
|
|
|
dbHelper.AddParameter("@plan_order", base_PlanInfo.plan_order);
|
|
|
|
|
|
|
|
|
|
|
|
dbHelper.ExecuteNonQuery();
|
|
|
|
dbHelper.ExecuteNonQuery();
|
|
|
|
|
|
|
|
}catch(Exception e)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
ICSharpCode.Core.LoggingService<InsertAction>.Error("当班计划—添加计划失败"+e.Message);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return base_PlanInfo.plan_Id;
|
|
|
|
return base_PlanInfo.plan_Id;
|
|
|
|
}
|
|
|
|
}
|
|
|
|