You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
717 lines
21 KiB
717 lines
21 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Data;
|
|
|
|
namespace SiaSun.LMS.Implement
|
|
{
|
|
public class PlanBase:S_BaseService
|
|
{
|
|
private static readonly object lockObj = new object();
|
|
public PlanBase()
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// 计划创建
|
|
/// </summary>
|
|
/// <param name="mPLAN_MAIN">计划模型</param>
|
|
/// <param name="lsPLAN_LIST">计划列表</param>
|
|
/// <param name="sResult">返回结果</param>
|
|
/// <returns></returns>
|
|
public bool PlanCreate(SiaSun.LMS.Model.PLAN_MAIN mPLAN_MAIN,
|
|
DataTable dtPLAN_LIST,
|
|
out int PLAN_ID,
|
|
out string sResult)
|
|
{
|
|
bool bResult = true;
|
|
|
|
sResult = string.Empty;
|
|
|
|
PLAN_ID = 0;
|
|
|
|
try
|
|
{
|
|
this._P_Base_House.BeginTransaction();
|
|
|
|
if (null != this._P_PLAN_MAIN.GetModel(mPLAN_MAIN.PLAN_ID))
|
|
{
|
|
if (mPLAN_MAIN.PLAN_STATUS.Equals(SiaSun.LMS.Enum.PLAN_STATUS.Complete.ToString()))
|
|
{
|
|
bResult = false;
|
|
|
|
sResult = string.Format("{0}单号已经完成 不能编辑!", mPLAN_MAIN.PLAN_CODE);
|
|
|
|
this._P_Base_House.RollBackTransaction();
|
|
|
|
return bResult;
|
|
}
|
|
|
|
this._P_PLAN_MAIN.Update(mPLAN_MAIN);
|
|
}
|
|
else
|
|
{
|
|
if (null != this._P_PLAN_MAIN.GetModelPlanCode(mPLAN_MAIN.PLAN_CODE))
|
|
{
|
|
bResult = false;
|
|
|
|
sResult = string.Format("{0}单号已经存在!", mPLAN_MAIN.PLAN_CODE);
|
|
|
|
this._P_Base_House.RollBackTransaction();
|
|
|
|
return bResult;
|
|
}
|
|
|
|
this._P_PLAN_MAIN.Add(mPLAN_MAIN);
|
|
}
|
|
|
|
|
|
foreach (DataRow drPLAN_LIST in dtPLAN_LIST.Rows)
|
|
{
|
|
|
|
if (drPLAN_LIST.RowState != DataRowState.Deleted)
|
|
{
|
|
drPLAN_LIST["PLAN_ID"] = mPLAN_MAIN.PLAN_ID;
|
|
}
|
|
}
|
|
|
|
this.Save(dtPLAN_LIST, "PLAN_LIST");
|
|
|
|
|
|
this._P_Base_House.CommitTransaction();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
bResult = false;
|
|
|
|
sResult = ex.Message;
|
|
|
|
this._P_Base_House.RollBackTransaction();
|
|
}
|
|
|
|
PLAN_ID = mPLAN_MAIN.PLAN_ID;
|
|
|
|
return bResult;
|
|
}
|
|
|
|
/// <summary>创建
|
|
/// 创建
|
|
/// </summary>
|
|
/// <param name="mPLAN_MAIN">计划模型</param>
|
|
/// <param name="lsPLAN_LIST">计划列表</param>
|
|
/// <param name="sResult">返回结果</param>
|
|
/// <returns></returns>
|
|
public bool PlanCreate(SiaSun.LMS.Model.PLAN_MAIN mPLAN_MAIN,
|
|
IList<SiaSun.LMS.Model.PLAN_LIST> lsPLAN_LIST,
|
|
out int PLAN_ID,
|
|
out string sResult)
|
|
{
|
|
bool bResult = true;
|
|
|
|
sResult = string.Empty;
|
|
|
|
PLAN_ID = 0;
|
|
|
|
try
|
|
{
|
|
this._P_Base_House.BeginTransaction();
|
|
|
|
if (null != this._P_PLAN_MAIN.GetModel(mPLAN_MAIN.PLAN_ID))
|
|
{
|
|
if (mPLAN_MAIN.PLAN_STATUS.Equals(SiaSun.LMS.Enum.PLAN_STATUS.Complete.ToString()))
|
|
{
|
|
bResult = false;
|
|
|
|
sResult = string.Format("{0}单号已经完成 不能编辑!", mPLAN_MAIN.PLAN_CODE);
|
|
|
|
return bResult;
|
|
}
|
|
|
|
this._P_PLAN_MAIN.Update(mPLAN_MAIN);
|
|
}
|
|
else
|
|
{
|
|
if (null != this._P_PLAN_MAIN.GetModelPlanCode(mPLAN_MAIN.PLAN_CODE))
|
|
{
|
|
bResult = false;
|
|
|
|
sResult = string.Format("{0}单号已经存在!", mPLAN_MAIN.PLAN_CODE);
|
|
|
|
return bResult;
|
|
}
|
|
|
|
this._P_PLAN_MAIN.Add(mPLAN_MAIN);
|
|
}
|
|
|
|
foreach (SiaSun.LMS.Model.PLAN_LIST mPLAN_LIST in lsPLAN_LIST)
|
|
{
|
|
bResult = this._S_GoodsService.GoodsPropertyCheck(mPLAN_LIST.GOODS_ID, mPLAN_LIST, out sResult);
|
|
|
|
if (!bResult)
|
|
{
|
|
sResult = string.Format("属性校验错误: {0}", sResult);
|
|
|
|
return bResult;
|
|
}
|
|
|
|
if (mPLAN_LIST.PLAN_ID.Equals(0))
|
|
{
|
|
mPLAN_LIST.PLAN_ID = mPLAN_MAIN.PLAN_ID;
|
|
this._P_PLAN_LIST.Add(mPLAN_LIST);
|
|
}
|
|
else
|
|
{
|
|
this._P_PLAN_LIST.Update(mPLAN_LIST);
|
|
}
|
|
}
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
bResult = false;
|
|
|
|
sResult = ex.Message;
|
|
|
|
this._P_Base_House.RollBackTransaction();
|
|
}
|
|
finally
|
|
{
|
|
if (bResult)
|
|
{
|
|
this._P_Base_House.CommitTransaction();
|
|
}
|
|
else
|
|
{
|
|
this._P_Base_House.RollBackTransaction();
|
|
}
|
|
}
|
|
|
|
PLAN_ID = mPLAN_MAIN.PLAN_ID;
|
|
|
|
return bResult;
|
|
}
|
|
|
|
|
|
public bool PlanImport(SiaSun.LMS.Model.PLAN_MAIN mPLAN_MAIN,
|
|
IList<SiaSun.LMS.Model.PLAN_LIST> lsPLAN_LIST,
|
|
out int PLAN_ID,
|
|
out string sResult)
|
|
{
|
|
bool bResult = true;
|
|
|
|
sResult = string.Empty;
|
|
|
|
PLAN_ID = 0;
|
|
|
|
//try
|
|
//{
|
|
// this._P_Base_House.BeginTransaction();
|
|
|
|
// if (null != this._P_PLAN_MAIN.GetModel(mPLAN_MAIN.PLAN_ID))
|
|
// {
|
|
// if (mPLAN_MAIN.PLAN_STATUS.Equals(SiaSun.LMS.Enum.PLAN_STATUS.Complete.ToString()))
|
|
// {
|
|
// bResult = false;
|
|
|
|
// sResult = string.Format("{0}单号已经完成 不能编辑!", mPLAN_MAIN.PLAN_CODE);
|
|
|
|
// return bResult;
|
|
// }
|
|
|
|
// this._P_PLAN_MAIN.Update(mPLAN_MAIN);
|
|
// }
|
|
// else
|
|
// {
|
|
// if (null != this._P_PLAN_MAIN.GetModel(mPLAN_MAIN.PLAN_CODE))
|
|
// {
|
|
// bResult = false;
|
|
|
|
// sResult = string.Format("{0}单号已经存在!", mPLAN_MAIN.PLAN_CODE);
|
|
|
|
// return bResult;
|
|
// }
|
|
|
|
// this._P_PLAN_MAIN.Add(mPLAN_MAIN);
|
|
|
|
// mPLAN_RELATE.PLAN_ID = mPLAN_MAIN.PLAN_ID;
|
|
|
|
// this._P_PLAN_RELATE.Add(mPLAN_RELATE);
|
|
// }
|
|
|
|
// foreach (SiaSun.LMS.Model.PLAN_LIST mPLAN_LIST in lsPLAN_LIST)
|
|
// {
|
|
// bResult = this._S_Goods.GoodsPropertyCheck(mPLAN_LIST.GOODS_ID, mPLAN_LIST, out sResult);
|
|
|
|
// if (!bResult)
|
|
// {
|
|
// sResult = string.Format("属性校验错误: {0}", sResult);
|
|
|
|
// return bResult;
|
|
// }
|
|
|
|
// if (mPLAN_LIST.PLAN_ID.Equals(0))
|
|
// {
|
|
// mPLAN_LIST.PLAN_ID = mPLAN_MAIN.PLAN_ID;
|
|
// this._P_PLAN_LIST.Add(mPLAN_LIST);
|
|
// }
|
|
// else
|
|
// {
|
|
// this._P_PLAN_LIST.Update(mPLAN_LIST);
|
|
// }
|
|
// }
|
|
|
|
//}
|
|
//catch (Exception ex)
|
|
//{
|
|
// bResult = false;
|
|
|
|
// sResult = ex.Message;
|
|
//}
|
|
//finally
|
|
//{
|
|
// if (bResult)
|
|
// {
|
|
// this._P_Base_House.CommitTransaction();
|
|
// }
|
|
// else
|
|
// {
|
|
// this._P_Base_House.RollBackTransaction();
|
|
// }
|
|
//}
|
|
|
|
//PLAN_ID = mPLAN_MAIN.PLAN_ID;
|
|
|
|
return bResult;
|
|
}
|
|
|
|
|
|
/// <summary>取消
|
|
/// 取消
|
|
/// </summary>
|
|
/// <param name="PLAN_ID">计划编号</param>
|
|
/// <param name="sResult">返回结果</param>
|
|
/// <returns></returns>
|
|
public bool PlanCancel(int PLAN_ID,
|
|
out string sResult)
|
|
{
|
|
bool bResult = true;
|
|
|
|
sResult = string.Empty;
|
|
|
|
try
|
|
{
|
|
SiaSun.LMS.Model.PLAN_MAIN mPLAN_MAIN = this._P_PLAN_MAIN.GetModel(PLAN_ID);
|
|
|
|
if (null == mPLAN_MAIN)
|
|
{
|
|
bResult = false;
|
|
|
|
sResult = string.Format("未找到计划{0}", PLAN_ID.ToString());
|
|
|
|
return bResult;
|
|
}
|
|
|
|
IList<SiaSun.LMS.Model.MANAGE_MAIN> lsMANAGE_MAIN = this._P_MANAGE_MAIN.GetListPlanID(PLAN_ID);
|
|
|
|
if (lsMANAGE_MAIN.Count > 0)
|
|
{
|
|
bResult = false;
|
|
|
|
sResult = string.Format("此计划存在任务。不能删除");
|
|
|
|
return bResult;
|
|
}
|
|
|
|
IList<SiaSun.LMS.Model.RECORD_MAIN> lsRECORD_MAIN = this._P_RECORD_MAIN.GetListPlanCode(mPLAN_MAIN.PLAN_CODE);
|
|
|
|
if (lsRECORD_MAIN.Count > 0)
|
|
{
|
|
bResult = false;
|
|
|
|
sResult = string.Format("此计划已经存在出入库记录。不能删除");
|
|
|
|
return bResult;
|
|
}
|
|
|
|
|
|
this._P_Base_House.BeginTransaction();
|
|
|
|
this._P_PLAN_LIST.DeletePlanID(PLAN_ID);
|
|
|
|
this._P_PLAN_MAIN.Delete(PLAN_ID);
|
|
|
|
this._P_Base_House.CommitTransaction();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
bResult = false;
|
|
|
|
sResult = ex.Message;
|
|
|
|
this._P_Base_House.RollBackTransaction();
|
|
}
|
|
|
|
return bResult;
|
|
}
|
|
|
|
/// <summary>检验计划是否可以完成
|
|
/// 检验计划是否可以完成
|
|
/// </summary>
|
|
/// <param name="PLAN_ID">计划编号</param>
|
|
/// <param name="sResult">返回结果</param>
|
|
/// <returns></returns>
|
|
public bool PlanCheckComplete(int PLAN_ID,
|
|
out string sResult)
|
|
{
|
|
bool bResult = true;
|
|
|
|
sResult = string.Empty;
|
|
|
|
SiaSun.LMS.Model.PLAN_MAIN mPLAN_MAIN = this._P_PLAN_MAIN.GetModel(PLAN_ID);
|
|
|
|
if (null == mPLAN_MAIN)
|
|
{
|
|
bResult = false;
|
|
|
|
sResult = string.Format("未找到计划{0}", PLAN_ID.ToString());
|
|
|
|
return bResult;
|
|
}
|
|
|
|
IList<SiaSun.LMS.Model.PLAN_LIST> lsPLAN_LIST = this._P_PLAN_LIST.GetListNoComplete(PLAN_ID);
|
|
|
|
|
|
if (lsPLAN_LIST.Count <= 0)
|
|
{
|
|
bResult = false;
|
|
|
|
return bResult;
|
|
}
|
|
|
|
|
|
return bResult;
|
|
}
|
|
|
|
/// <summary>计划完成
|
|
/// 计划完成
|
|
/// </summary>
|
|
/// <param name="PLAN_ID">计划编号</param>
|
|
/// <param name="sResult">返回结果</param>
|
|
/// <returns></returns>
|
|
public bool PlanComplete(int PLAN_ID,
|
|
out string sResult)
|
|
{
|
|
return this.PlanComplete(PLAN_ID, true, out sResult);
|
|
}
|
|
|
|
/// <summary>完成-支持事务
|
|
/// 完成-支持事务
|
|
/// </summary>
|
|
/// <param name="PLAN_ID">计划编号</param>
|
|
/// <param name="sResult">返回结果</param>
|
|
/// <returns></returns>
|
|
public bool PlanComplete(int PLAN_ID,
|
|
bool bTrans,
|
|
out string sResult)
|
|
{
|
|
bool bResult = true;
|
|
|
|
sResult = string.Empty;
|
|
|
|
SiaSun.LMS.Model.PLAN_MAIN mPLAN_MAIN = this._P_PLAN_MAIN.GetModel(PLAN_ID);
|
|
|
|
if (null == mPLAN_MAIN)
|
|
{
|
|
bResult = false;
|
|
|
|
sResult = string.Format("未找到计划{0}", PLAN_ID.ToString());
|
|
|
|
return bResult;
|
|
}
|
|
|
|
try
|
|
{
|
|
this._P_Base_House.BeginTransaction(bTrans);
|
|
|
|
mPLAN_MAIN.PLAN_END_TIME = SiaSun.LMS.Common.StringUtil.GetDateTime();
|
|
|
|
mPLAN_MAIN.PLAN_STATUS = SiaSun.LMS.Enum.PLAN_STATUS.Complete.ToString();
|
|
|
|
this._P_PLAN_MAIN.Update(mPLAN_MAIN);
|
|
this._P_PLAN_MAIN.Delete(PLAN_ID);
|
|
this._P_PLAN_LIST.DeletePlanID(PLAN_ID);
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
bResult = false;
|
|
|
|
sResult = ex.Message;
|
|
}
|
|
finally
|
|
{
|
|
if (bResult)
|
|
{
|
|
this._P_Base_House.CommitTransaction(bTrans);
|
|
}
|
|
else
|
|
{
|
|
this._P_Base_House.RollBackTransaction(bTrans);
|
|
}
|
|
}
|
|
|
|
return bResult;
|
|
}
|
|
|
|
/// <summary>计划完成
|
|
/// 计划删除
|
|
/// </summary>erp获取到wms的信息标志位写0
|
|
/// <param name="sResult">返回结果</param>
|
|
/// <returns></returns>
|
|
public bool PlanComplete_det(bool bTrans, out string sResult)
|
|
{
|
|
bool bResult = true;
|
|
|
|
sResult = string.Empty;
|
|
|
|
try
|
|
{
|
|
this._P_Base_House.BeginTransaction(bTrans);
|
|
|
|
DataTable plan_det = this.GetList(string.Format(@"SELECT PLAN_LIST_ID FROM PLAN_LIST WHERE GOODS_PROPERTY4 = 0"));
|
|
|
|
for (int i = 0; i < plan_det.Rows.Count; i++)
|
|
{
|
|
this._P_PLAN_LIST.Delete(Convert.ToInt32(plan_det.Rows[i]["PLAN_LIST_ID"]));
|
|
}
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
bResult = false;
|
|
|
|
sResult = ex.Message;
|
|
}
|
|
finally
|
|
{
|
|
if (bResult)
|
|
{
|
|
this._P_Base_House.CommitTransaction(bTrans);
|
|
}
|
|
else
|
|
{
|
|
this._P_Base_House.RollBackTransaction(bTrans);
|
|
}
|
|
}
|
|
|
|
return bResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 计划执行
|
|
/// </summary>
|
|
/// <param name="PLAN_ID">计划编号</param>
|
|
/// <param name="sResult">返回结果</param>
|
|
/// <returns></returns>
|
|
public bool PlanExecute(int PLAN_ID,
|
|
out string sResult)
|
|
{
|
|
bool bResult = true;
|
|
|
|
sResult = string.Empty;
|
|
|
|
SiaSun.LMS.Model.PLAN_MAIN mPLAN_MAIN = this._P_PLAN_MAIN.GetModel(PLAN_ID);
|
|
|
|
if (null == mPLAN_MAIN)
|
|
{
|
|
bResult = false;
|
|
|
|
sResult = string.Format("未找到计划{0}", PLAN_ID);
|
|
|
|
return bResult;
|
|
}
|
|
try
|
|
{
|
|
this._P_Base_House.BeginTransaction();
|
|
|
|
if( string.IsNullOrEmpty(mPLAN_MAIN.PLAN_BEGIN_TIME))
|
|
mPLAN_MAIN.PLAN_BEGIN_TIME = SiaSun.LMS.Common.StringUtil.GetDateTime();
|
|
|
|
mPLAN_MAIN.PLAN_STATUS = SiaSun.LMS.Enum.PLAN_STATUS.Executing.ToString();
|
|
|
|
this._P_PLAN_MAIN.Update(mPLAN_MAIN);
|
|
|
|
|
|
this._P_Base_House.CommitTransaction();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
bResult = false;
|
|
|
|
sResult = ex.Message;
|
|
|
|
this._P_Base_House.RollBackTransaction();
|
|
}
|
|
|
|
return bResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 计划自动执行
|
|
/// </summary>
|
|
/// <param name="PLAN_ID">计划编号</param>
|
|
/// <param name="sResult">返回结果</param>
|
|
/// <returns></returns>
|
|
public bool PlanAutoExecute(int PLAN_ID,
|
|
out string sResult)
|
|
{
|
|
bool bResult = true;
|
|
|
|
sResult = string.Empty;
|
|
|
|
SiaSun.LMS.Model.PLAN_MAIN mPLAN_MAIN = this._P_PLAN_MAIN.GetModel(PLAN_ID);
|
|
|
|
if (null == mPLAN_MAIN)
|
|
{
|
|
bResult = false;
|
|
|
|
sResult = string.Format("未找到计划{0}", PLAN_ID);
|
|
|
|
return bResult;
|
|
}
|
|
try
|
|
{
|
|
this._P_Base_House.BeginTransaction();
|
|
|
|
if (string.IsNullOrEmpty(mPLAN_MAIN.PLAN_BEGIN_TIME))
|
|
mPLAN_MAIN.PLAN_BEGIN_TIME = SiaSun.LMS.Common.StringUtil.GetDateTime();
|
|
|
|
mPLAN_MAIN.PLAN_STATUS = SiaSun.LMS.Enum.PLAN_STATUS.Executing.ToString();
|
|
mPLAN_MAIN.PLAN_CONFIRM_USER = "管理系统";
|
|
this._P_PLAN_MAIN.Update(mPLAN_MAIN);
|
|
|
|
|
|
this._P_Base_House.CommitTransaction();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
bResult = false;
|
|
|
|
sResult = ex.Message;
|
|
|
|
this._P_Base_House.RollBackTransaction();
|
|
}
|
|
|
|
return bResult;
|
|
}
|
|
|
|
/// <summary>计划执行默认动作
|
|
/// 计划执行默认动作
|
|
/// </summary>
|
|
/// <param name="PLAN_ID">计划编号</param>
|
|
/// <param name="sResult">返回结果</param>
|
|
/// <returns></returns>
|
|
public bool PlanExcuteDefault(int PLAN_ID, out string sResult)
|
|
{
|
|
bool bResult = true;
|
|
|
|
sResult = string.Empty;
|
|
|
|
string ACTION_EVENT = string.Empty;
|
|
|
|
SiaSun.LMS.Model.PLAN_MAIN mPLAN_MAIN = this._P_PLAN_MAIN.GetModel(PLAN_ID);
|
|
|
|
DataTable dtPlan = this.GetList(string.Format("SELECT * FROM V_PLAN WHERE PLAN_ID = {0}", PLAN_ID));
|
|
|
|
DataTable dtACTION = this._S_FlowService.PlanGetAction(PLAN_ID.ToString(), "1");
|
|
|
|
if (dtACTION.Rows.Count.Equals(0))
|
|
{
|
|
return bResult;
|
|
}
|
|
|
|
foreach (DataRow drPlan in dtPlan.Rows)
|
|
{
|
|
foreach (DataRow drACTION in dtACTION.Rows)
|
|
{
|
|
IList<SiaSun.LMS.Model.FLOW_PARA> lsFLOW_PARA = this._S_FlowService.FlowGetParameters("FLOW_PLAN");
|
|
|
|
string[] aFLOW_PARA = new string[lsFLOW_PARA.Count];
|
|
|
|
int i = 0;
|
|
|
|
foreach (SiaSun.LMS.Model.FLOW_PARA mFLOW_PARA in lsFLOW_PARA)
|
|
{
|
|
aFLOW_PARA[i] = drPlan[mFLOW_PARA.FLOW_PARA_CODE].ToString();
|
|
|
|
i++;
|
|
}
|
|
|
|
SiaSun.LMS.Model.PLAN_ACTION_EXCUTE mPLAN_ACTION_EXCUTE = new SiaSun.LMS.Model.PLAN_ACTION_EXCUTE();
|
|
|
|
mPLAN_ACTION_EXCUTE.PLAN_ID = Convert.ToInt32(drPlan["PLAN_ID"]);
|
|
|
|
mPLAN_ACTION_EXCUTE.ACTION_EVENT = string.Format(drACTION["FLOW_ACTION_EVENT"].ToString(), aFLOW_PARA);
|
|
|
|
bResult = this._S_FlowService.EventExecute(mPLAN_ACTION_EXCUTE.ACTION_EVENT, out sResult);
|
|
}
|
|
}
|
|
|
|
if (bResult)
|
|
{
|
|
mPLAN_MAIN.PLAN_BEGIN_TIME = SiaSun.LMS.Common.StringUtil.GetDateTime();
|
|
|
|
bResult = this.PlanExcuteDefault(PLAN_ID, out sResult);
|
|
}
|
|
|
|
return bResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 计划暂停
|
|
/// </summary>
|
|
/// <param name="PLAN_ID">计划编号</param>
|
|
/// <param name="sResult">返回结果</param>
|
|
/// <returns></returns>
|
|
public bool PlanPause(int PLAN_ID, out string sResult)
|
|
{
|
|
bool bResult = true;
|
|
|
|
sResult = string.Empty;
|
|
|
|
SiaSun.LMS.Model.PLAN_MAIN mPLAN_MAIN = this._P_PLAN_MAIN.GetModel(PLAN_ID);
|
|
|
|
if (null == mPLAN_MAIN)
|
|
{
|
|
bResult = false;
|
|
|
|
sResult = string.Format("未找到计划{0}", PLAN_ID);
|
|
|
|
return bResult;
|
|
}
|
|
|
|
try
|
|
{
|
|
this._P_Base_House.BeginTransaction();
|
|
|
|
mPLAN_MAIN.PLAN_STATUS = SiaSun.LMS.Enum.PLAN_STATUS.Waiting.ToString();
|
|
|
|
this._P_PLAN_MAIN.Update(mPLAN_MAIN);
|
|
|
|
this._P_Base_House.CommitTransaction();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
bResult = false;
|
|
|
|
sResult = ex.Message;
|
|
|
|
this._P_Base_House.RollBackTransaction();
|
|
}
|
|
|
|
return bResult;
|
|
}
|
|
|
|
}
|
|
}
|