本文整理汇总了C#中Ebada.Scgl.Model.WF_ModleRecordWorkTaskIns.CreateID方法的典型用法代码示例。如果您正苦于以下问题:C# WF_ModleRecordWorkTaskIns.CreateID方法的具体用法?C# WF_ModleRecordWorkTaskIns.CreateID怎么用?C# WF_ModleRecordWorkTaskIns.CreateID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ebada.Scgl.Model.WF_ModleRecordWorkTaskIns
的用法示例。
在下文中一共展示了WF_ModleRecordWorkTaskIns.CreateID方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ExportExceljhbAllSubmitToWF_ModleRecordWorkTaskIns
public void ExportExceljhbAllSubmitToWF_ModleRecordWorkTaskIns(string orgid)
{
string filter = "";
int i = 0;
List<WF_ModleRecordWorkTaskIns> mrwtlist = new List<WF_ModleRecordWorkTaskIns>();
filter = " where 1=1 ";
if (orgid != "") filter += " and OrgCode='" + orgid + "'";
if (isWorkflowCall)
{
filter = filter + " and id not in (select ModleRecordID from WF_ModleRecordWorkTaskIns where WorkFlowId='"
+ WorkFlowData.Rows[0]["WorkFlowId"].ToString() + "') "
+ " or id in (select ModleRecordID from WF_ModleRecordWorkTaskIns where "
+ " RecordID='" + currRecord.ID + "') ";
}
IList<PJ_sbbzqsbgmxb3> datalist = Client.ClientHelper.PlatformSqlMap.GetListByWhere<PJ_sbbzqsbgmxb3>(
filter
);
if (isWorkflowCall)
{
for (i = 0; i < datalist.Count; i++)
{
WF_ModleRecordWorkTaskIns mrwt = new WF_ModleRecordWorkTaskIns();
mrwt.ID = mrwt.CreateID();
mrwt.ModleRecordID = datalist[i].ID;
mrwt.RecordID = currRecord.ID;
mrwt.WorkFlowId = WorkFlowData.Rows[0]["WorkFlowId"].ToString();
mrwt.WorkFlowInsId = WorkFlowData.Rows[0]["WorkFlowInsId"].ToString();
mrwt.WorkTaskId = WorkFlowData.Rows[0]["WorkTaskId"].ToString();
mrwt.WorkTaskInsId = WorkFlowData.Rows[0]["WorkTaskInsId"].ToString();
mrwt.ModleTableName = datalist[i].GetType().ToString();
mrwt.CreatTime = DateTime.Now;
Thread.Sleep(new TimeSpan(100000));//0.1毫秒
mrwtlist.Add(mrwt);
}
}
List<SqlQueryObject> list3 = new List<SqlQueryObject>();
if (mrwtlist.Count > 0)
{
SqlQueryObject obj3 = new SqlQueryObject(SqlQueryType.Insert, mrwtlist.ToArray());
list3.Add(obj3);
}
MainHelper.PlatformSqlMap.ExecuteTransationUpdate(list3);
}
示例2: gridViewOperation_AfterAdd
void gridViewOperation_AfterAdd(PJ_ccxqjh newobj)
{
WF_ModleRecordWorkTaskIns mrwt = new WF_ModleRecordWorkTaskIns();
if (isWorkflowCall)
{
mrwt.ModleRecordID = newobj.ID;
mrwt.RecordID = currRecord.ID;
mrwt.WorkFlowId = WorkFlowData.Rows[0]["WorkFlowId"].ToString();
mrwt.WorkFlowInsId = WorkFlowData.Rows[0]["WorkFlowInsId"].ToString();
mrwt.WorkTaskId = WorkFlowData.Rows[0]["WorkTaskId"].ToString();
mrwt.ModleTableName = newobj.GetType().ToString();
mrwt.WorkTaskInsId = WorkFlowData.Rows[0]["WorkTaskInsId"].ToString();
mrwt.CreatTime = DateTime.Now;
MainHelper.PlatformSqlMap.Create<WF_ModleRecordWorkTaskIns>(mrwt);
//currRecord.DocContent = newobj.BigData;
//MainHelper.PlatformSqlMap.Update<LP_Record>(currRecord);
}
if (newobj.xqlr != "")
{
PJ_qxfl qxfj = new PJ_qxfl();
qxfj.ID = newobj.ID;
qxfj.CreateDate = DateTime.Now;
qxfj.CreateMan = MainHelper.User.UserName;
qxfj.OrgCode = newobj.OrgCode;
qxfj.OrgName = newobj.OrgName;
qxfj.qxlb = newobj.qxlb;
qxfj.qxly = "春检消缺计划";
qxfj.qxnr = newobj.xqlr;
MainHelper.PlatformSqlMap.Create<PJ_qxfl>(qxfj);
//LP_Record lpr = new LP_Record();
//lpr.ID = "N" + lpr.CreateID();
//lpr.Kind = "设备缺陷管理流程";
//lpr.CreateTime = DateTime.Now.ToString();
//lpr.OrgName = qxfj.OrgName;
//string[] strtemp = RecordWorkTask.RunNewGZPRecord(lpr.ID, "设备缺陷管理流程", MainHelper.User.UserID, false);
//if (strtemp[0].IndexOf("未提交至任何人") > -1)
//{
// MsgBox.ShowTipMessageBox("未提交至任何人,创建失败,请检查流程模板和组织机构配置是否正确!");
// return;
//}
//DataTable recordWorkFlowData = RecordWorkTask.GetRecordWorkFlowData(lpr.ID, MainHelper.User.UserID);
//if (recordWorkFlowData == null)
//{
// MsgBox.ShowWarningMessageBox("出错,未找到该流程信息,请检查模板设置!");
//}
//LP_Temple ParentTemple = RecordWorkTask.GetWorkTaskTemple(recordWorkFlowData, lpr);
//if (ParentTemple == null)
// lpr.Number = RecordWorkTask.CreatWorkFolwNo(MainHelper.UserOrg, "设备缺陷管理流程");
//else
// lpr.Number = RecordWorkTask.CreatWorkFolwNo(MainHelper.UserOrg, ParentTemple.LPID);
//lpr.Status = recordWorkFlowData.Rows[0]["TaskCaption"].ToString();
//MainHelper.PlatformSqlMap.Create<LP_Record>(lpr);
//currRecord = lpr;
Thread.Sleep(new TimeSpan(100000));//0.1毫秒
mrwt = new WF_ModleRecordWorkTaskIns();
mrwt.ID = mrwt.CreateID();
mrwt.ModleRecordID = qxfj.ID;
mrwt.RecordID = currRecord.ID;
mrwt.WorkFlowId = WorkFlowData.Rows[0]["WorkFlowId"].ToString();
mrwt.WorkFlowInsId = WorkFlowData.Rows[0]["WorkFlowInsId"].ToString();
mrwt.WorkTaskId = WorkFlowData.Rows[0]["WorkTaskId"].ToString();
mrwt.ModleTableName = qxfj.GetType().ToString();
mrwt.WorkTaskInsId = WorkFlowData.Rows[0]["WorkTaskInsId"].ToString();
mrwt.CreatTime = DateTime.Now;
MainHelper.PlatformSqlMap.Create<WF_ModleRecordWorkTaskIns>(mrwt);
}
}
示例3: ExportExceljhbAllSubmitToWF_ModleRecordWorkTaskIns
public void ExportExceljhbAllSubmitToWF_ModleRecordWorkTaskIns(string orgid, string strProject, string strfenProject)
{
string filter = "";
int i = 0;
List<WF_ModleRecordWorkTaskIns> mrwtlist = new List<WF_ModleRecordWorkTaskIns>();
string strfirst = "";
string filter2 = "";
string filter3 = "";
string filter4 = "";
if (strProject != "全部")
filter2 = " where 1=1 and ssgc='" + strProject + "' and type = '撤旧材料出库单' ";
else
filter2 = " where 1=1 and type = '撤旧材料出库单' ";
IList mclist = ClientHelper.PlatformSqlMap.GetList("SelectOneStr", "select distinct ssgc from PJ_clcrkd " + filter2 + " order by ssgc");
foreach (string mc in mclist)
{
if (strfenProject == "全部")
filter3 = " where 1=1 and type = '撤旧材料出库单' ";
else
filter3 = " where ssxm='" + strfenProject + "' and type = '撤旧材料出库单' ";
IList xmlist = ClientHelper.PlatformSqlMap.GetList("SelectOneStr", "select distinct ssxm from PJ_clcrkd " + filter3 + " order by ssxm");
foreach (string xm in xmlist)
{
filter4 = " where 1=1 and type = '撤旧材料出库单'"
+ " and ssgc='" + mc + "' "
+ " and ssxm='" + xm + "' ";
//IList sjlist = ClientHelper.PlatformSqlMap.GetList("SelectOneStr", "select distinct CONVERT(varchar(50) ,indate, 112 ) from PJ_clcrkd " + filter4 + " ");
IList sjlist = ClientHelper.PlatformSqlMap.GetList("SelectOneStr", "select distinct num from PJ_clcrkd " + filter4 + " ");
foreach (string sj in sjlist)
{
filter = " where 1=1 and type = '撤旧材料出库单'"
+ " and ssgc='" + mc + "' "
+ " and ssxm='" + xm
+ "' and num= '" + sj + "' ";
if (isWorkflowCall)
{
filter = filter + " and id not in (select ModleRecordID from WF_ModleRecordWorkTaskIns where WorkFlowId='"
+ WorkFlowData.Rows[0]["WorkFlowId"].ToString() + "') "
+ " or id in (select ModleRecordID from WF_ModleRecordWorkTaskIns where "
+ " RecordID='" + currRecord.ID + "') "
;
}
IList<PJ_clcrkd> datalist = Client.ClientHelper.PlatformSqlMap.GetListByWhere<PJ_clcrkd>(
filter
);
if (isWorkflowCall)
{
for (i = 0; i < datalist.Count; i++)
{
WF_ModleRecordWorkTaskIns mrwt = new WF_ModleRecordWorkTaskIns();
mrwt.ID = mrwt.CreateID();
mrwt.ModleRecordID = datalist[i].ID;
mrwt.RecordID = currRecord.ID;
mrwt.WorkFlowId = WorkFlowData.Rows[0]["WorkFlowId"].ToString();
mrwt.WorkFlowInsId = WorkFlowData.Rows[0]["WorkFlowInsId"].ToString();
mrwt.WorkTaskId = WorkFlowData.Rows[0]["WorkTaskId"].ToString();
mrwt.WorkTaskInsId = WorkFlowData.Rows[0]["WorkTaskInsId"].ToString();
mrwt.ModleTableName = datalist[i].GetType().ToString();
mrwt.CreatTime = DateTime.Now;
Thread.Sleep(new TimeSpan(100000));//0.1毫秒
mrwtlist.Add(mrwt);
}
}
}
}
}
List<SqlQueryObject> list3 = new List<SqlQueryObject>();
if (mrwtlist.Count > 0)
{
SqlQueryObject obj3 = new SqlQueryObject(SqlQueryType.Insert, mrwtlist.ToArray());
list3.Add(obj3);
}
MainHelper.PlatformSqlMap.ExecuteTransationUpdate(list3);
}
示例4: gridViewOperation_AfterAdd
void gridViewOperation_AfterAdd(PJ_18gysbpjmx obj) {
//RefreshData(" where PJ_ID='" + PSObj.PJ_ID + "' order by id desc");
RefreshData(" where PJ_ID='" + PSObj.PJ_ID + "' order by xh ");
if (isWorkflowCall) {
WF_ModleRecordWorkTaskIns mrwt = new WF_ModleRecordWorkTaskIns();
mrwt.ModleRecordID = obj.PJ_ID;
mrwt.RecordID = currRecord.ID;
mrwt.WorkFlowId = WorkFlowData.Rows[0]["WorkFlowId"].ToString();
mrwt.WorkFlowInsId = WorkFlowData.Rows[0]["WorkFlowInsId"].ToString();
mrwt.WorkTaskId = WorkFlowData.Rows[0]["WorkTaskId"].ToString();
mrwt.ModleTableName = obj.GetType().ToString();
mrwt.WorkTaskInsId = WorkFlowData.Rows[0]["WorkTaskInsId"].ToString();
mrwt.CreatTime = DateTime.Now;
MainHelper.PlatformSqlMap.Create<WF_ModleRecordWorkTaskIns>(mrwt);
MainHelper.PlatformSqlMap.Update<LP_Record>(currRecord);
PJ_qxfl qxfj = new PJ_qxfl();
qxfj.CreateDate = PSObj.CreateDate;
qxfj.CreateMan = PSObj.CreateMan;
qxfj.LineID = "";
qxfj.LineName = "";
qxfj.OrgCode = PSObj.OrgCode;
qxfj.OrgName = PSObj.OrgName;
qxfj.qxlb = obj.qxlb;
qxfj.qxly = "高压配电设备评级表";
qxfj.qxnr = obj.qxnr;
qxfj.xcqx = "";
qxfj.xcr = "";
qxfj.xlqd = "";
qxfj.xsr = "";
qxfj.xssj = new DateTime(1900, 1, 1);
MainHelper.PlatformSqlMap.Create<PJ_qxfl>(qxfj);
LP_Record lpr = new LP_Record();
lpr.ID = "N" + lpr.CreateID();
lpr.Kind = "设备缺陷管理流程";
lpr.CreateTime = DateTime.Now.ToString();
lpr.OrgName = qxfj.OrgName;
string[] strtemp = RecordWorkTask.RunNewGZPRecord(lpr.ID, "设备缺陷管理流程", MainHelper.User.UserID, false);
if (strtemp[0].IndexOf("未提交至任何人") > -1) {
MsgBox.ShowTipMessageBox("未提交至任何人,创建失败,请检查流程模板和组织机构配置是否正确!");
return;
}
DataTable recordWorkFlowData = RecordWorkTask.GetRecordWorkFlowData(lpr.ID, MainHelper.User.UserID);
if (recordWorkFlowData == null) {
MsgBox.ShowWarningMessageBox("出错,未找到该流程信息,请检查模板设置!");
}
LP_Temple ParentTemple = RecordWorkTask.GetWorkTaskTemple(recordWorkFlowData, lpr);
if (ParentTemple == null)
lpr.Number = RecordWorkTask.CreatWorkFolwNo(MainHelper.UserOrg, "设备缺陷管理流程");
else
lpr.Number = RecordWorkTask.CreatWorkFolwNo(MainHelper.UserOrg, ParentTemple.LPID);
lpr.Status = recordWorkFlowData.Rows[0]["TaskCaption"].ToString();
MainHelper.PlatformSqlMap.Create<LP_Record>(lpr);
currRecord = lpr;
WorkFlowData = recordWorkFlowData;
Thread.Sleep(new TimeSpan(100000));//0.1毫秒
mrwt = new WF_ModleRecordWorkTaskIns();
mrwt.ID = mrwt.CreateID();
mrwt.ModleRecordID = qxfj.ID;
mrwt.RecordID = currRecord.ID;
mrwt.WorkFlowId = WorkFlowData.Rows[0]["WorkFlowId"].ToString();
mrwt.WorkFlowInsId = WorkFlowData.Rows[0]["WorkFlowInsId"].ToString();
mrwt.WorkTaskId = WorkFlowData.Rows[0]["WorkTaskId"].ToString();
mrwt.ModleTableName = qxfj.GetType().ToString();
mrwt.WorkTaskInsId = WorkFlowData.Rows[0]["WorkTaskInsId"].ToString();
mrwt.CreatTime = DateTime.Now;
MainHelper.PlatformSqlMap.Create<WF_ModleRecordWorkTaskIns>(mrwt);
}
}
示例5: barxqjh_ItemClick
private void barxqjh_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
//请求确认
if (MsgBox.ShowAskMessageBox("是否确认此节点结束,生成消缺计划并进入下一流程?") != DialogResult.OK)
{
//SendMessage(this.Handle, 0x0010, (IntPtr)0, (IntPtr)0);
return;
}
string slqwhere = "where OrgCode='" + parentID + "' ";
slqwhere = slqwhere + " and id not in (select ModleRecordID from WF_ModleRecordWorkTaskIns where RecordID='" + CurrRecord.ID + "'";
slqwhere = slqwhere + " and WorkFlowId='" + WorkFlowData.Rows[0]["WorkFlowId"].ToString() + "'"
+ " and WorkFlowInsId='" + WorkFlowData.Rows[0]["WorkFlowInsId"].ToString() + "'"
+ " and WorkTaskId='" + WorkFlowData.Rows[0]["WorkTaskId"].ToString() + "'"
+ " and WorkTaskInsId='" + WorkFlowData.Rows[0]["WorkTaskInsId"].ToString() + "')"
+ " and DATEDIFF(day,cast('1900-1-1' as datetime ) ,cast(xcrq as datetime) )<1 ";
slqwhere += " order by id desc";
dalist = MainHelper.PlatformSqlMap.GetListByWhere<PJ_06sbxs>(slqwhere);
string strmes = "";
if (RecordWorkTask.CheckOnRiZhi(WorkFlowData))
{
RecordWorkTask.CreatRiZhi(WorkFlowData, null, currRecord.ID, new object[] { currRecord });
}
WF_WorkTaskCommands wt = (WF_WorkTaskCommands)MainHelper.PlatformSqlMap.GetObject("SelectWF_WorkTaskCommandsList", " where WorkFlowId='" + WorkFlowData.Rows[0]["WorkFlowId"].ToString() + "' and WorkTaskId='" + WorkFlowData.Rows[0]["WorkTaskId"].ToString() + "'");
if (wt != null)
{
strmes = RecordWorkTask.RunWorkFlow(MainHelper.User.UserID, WorkFlowData.Rows[0]["OperatorInsId"].ToString(), WorkFlowData.Rows[0]["WorkTaskInsId"].ToString(), wt.CommandName);
}
else
{
strmes = RecordWorkTask.RunWorkFlow(MainHelper.User.UserID, WorkFlowData.Rows[0]["OperatorInsId"].ToString(), WorkFlowData.Rows[0]["WorkTaskInsId"].ToString(), "提交");
}
if (strmes.IndexOf("未提交至任何人") > -1)
{
MsgBox.ShowTipMessageBox("未提交至任何人,创建失败,请检查流程模板和组织机构配置是否正确!");
return;
}
else
MsgBox.ShowTipMessageBox(strmes);
if (fjly == null) fjly = new frmModleFjly();
fjly.btn_Submit_Click(sender, e);
strmes = RecordWorkTask.GetWorkFlowTaskCaption(WorkFlowData.Rows[0]["WorkTaskInsId"].ToString());
if (strmes == "结束节点1")
{
currRecord.Status = "存档";
}
else
{
currRecord.Status = strmes;
}
currRecord.LastChangeTime = DateTime.Now.ToString();
if (currRecord.ImageAttachment == null) currRecord.ImageAttachment = new byte[0];
if (currRecord.SignImg == null) currRecord.SignImg = new byte[0];
MainHelper.PlatformSqlMap.Update("UpdateLP_Record", CurrRecord);
DataTable dt = RecordWorkTask.GetRecordWorkFlowData(currRecord.ID, MainHelper.User.UserID);
slqwhere = "where OrgCode='" + parentID + "' ";
slqwhere = slqwhere + " and (id not in (select ModleRecordID from WF_ModleRecordWorkTaskIns where 1=1 ";
slqwhere = slqwhere + " and WorkFlowId='" + WorkFlowData.Rows[0]["WorkFlowId"].ToString() + "'"
+ " and WorkTaskId='" + WorkFlowData.Rows[0]["WorkTaskId"].ToString() + "') "
+ " or (id in (select ModleRecordID from WF_ModleRecordWorkTaskIns where 1=1 ";
slqwhere = slqwhere + " and RecordID='" + currRecord.ID + "'"
+ " and WorkFlowInsId='" + WorkFlowData.Rows[0]["WorkFlowInsId"].ToString() + "' "
+ " and WorkTaskInsId='" + WorkFlowData.Rows[0]["WorkTaskInsId"].ToString() + "' "
+ " and WorkTaskId='" + WorkFlowData.Rows[0]["WorkTaskId"].ToString() + "')) "
+ ")"
;
slqwhere += " order by id desc";
dalist = MainHelper.PlatformSqlMap.GetListByWhere<PJ_06sbxs>(slqwhere);
foreach (PJ_06sbxs sbxs in dalist)
{
if (sbxs.qxlb == "") continue;
WF_ModleRecordWorkTaskIns mrwt = new WF_ModleRecordWorkTaskIns();
PJ_qxfl qxfj = new PJ_qxfl();
if (WorkFlowData.Rows[0]["flowcaption"].ToString() == "春查消缺外查")
{
PJ_ccxqjh ccxqjh = new PJ_ccxqjh();
ccxqjh.ID = sbxs.ID;
ccxqjh.OrgCode = sbxs.OrgCode;
ccxqjh.OrgName = sbxs.OrgName;
ccxqjh.qxlb = sbxs.qxlb;
ccxqjh.xqlr = sbxs.qxnr;
Thread.Sleep(new TimeSpan(100000));//0.1毫秒
try
{
MainHelper.PlatformSqlMap.Create<PJ_ccxqjh>(ccxqjh);
}
catch { }
qxfj.ID = ccxqjh.ID;
mrwt.ID = mrwt.CreateID();
mrwt.ModleRecordID = ccxqjh.ID;
mrwt.RecordID = currRecord.ID;
mrwt.WorkFlowId = dt.Rows[0]["WorkFlowId"].ToString();
mrwt.WorkFlowInsId = dt.Rows[0]["WorkFlowInsId"].ToString();
//.........这里部分代码省略.........
示例6: gridViewOperation_AfterAdd
void gridViewOperation_AfterAdd(PJ_06sbxs newobj)
{
WF_ModleRecordWorkTaskIns mrwt = new WF_ModleRecordWorkTaskIns();
if (isWorkflowCall)
{
mrwt.ModleRecordID = newobj.ID;
mrwt.RecordID = currRecord.ID;
mrwt.WorkFlowId = WorkFlowData.Rows[0]["WorkFlowId"].ToString();
mrwt.WorkFlowInsId = WorkFlowData.Rows[0]["WorkFlowInsId"].ToString();
mrwt.WorkTaskId = WorkFlowData.Rows[0]["WorkTaskId"].ToString();
mrwt.ModleTableName = newobj.GetType().ToString();
mrwt.WorkTaskInsId = WorkFlowData.Rows[0]["WorkTaskInsId"].ToString();
mrwt.CreatTime = DateTime.Now;
MainHelper.PlatformSqlMap.Create<WF_ModleRecordWorkTaskIns>(mrwt);
//currRecord.DocContent = newobj.BigData;
//MainHelper.PlatformSqlMap.Update<LP_Record>(currRecord);
}
if (newobj.qxlb != "")
{
PJ_qxfl qxfj = new PJ_qxfl();
qxfj.ID = newobj.ID;
qxfj.CreateDate = newobj.CreateDate;
qxfj.CreateMan = newobj.CreateMan;
qxfj.LineID = newobj.LineID;
qxfj.LineName = newobj.LineName;
qxfj.OrgCode = newobj.OrgCode;
qxfj.OrgName = newobj.OrgName;
qxfj.qxlb = newobj.qxlb;
qxfj.qxly = "设备巡视";
qxfj.qxnr = newobj.qxnr;
qxfj.xcqx = newobj.xcqx;
qxfj.xcr = newobj.xcr;
qxfj.xlqd = newobj.xlqd;
qxfj.xsr = newobj.xsr;
qxfj.xssj = newobj.xssj;
MainHelper.PlatformSqlMap.Create<PJ_qxfl>(qxfj);
Thread.Sleep(new TimeSpan(100000));//0.1毫秒
mrwt = new WF_ModleRecordWorkTaskIns();
mrwt.ID = mrwt.CreateID();
mrwt.ModleRecordID = qxfj.ID;
mrwt.RecordID = currRecord.ID;
mrwt.WorkFlowId = WorkFlowData.Rows[0]["WorkFlowId"].ToString();
mrwt.WorkFlowInsId = WorkFlowData.Rows[0]["WorkFlowInsId"].ToString();
mrwt.WorkTaskId = WorkFlowData.Rows[0]["WorkTaskId"].ToString();
mrwt.ModleTableName = qxfj.GetType().ToString();
mrwt.WorkTaskInsId = WorkFlowData.Rows[0]["WorkTaskInsId"].ToString();
mrwt.CreatTime = DateTime.Now;
MainHelper.PlatformSqlMap.Create<WF_ModleRecordWorkTaskIns>(mrwt);
}
}
示例7: ExportExceljhbAllSubmitToWF_ModleRecordWorkTaskIns
public void ExportExceljhbAllSubmitToWF_ModleRecordWorkTaskIns(DateTime dt,DateTime dt2, string orgid)
{
string filter = "";
int i = 0;
if (orgid != "") filter = " and OrgCode='" + orgid + "'";
string startday = "20";
IList list = Client.ClientHelper.PlatformSqlMap.GetList("SelectOneStr",
string.Format("select nr from pj_dyk where dx='所月度停电计划' and sx like '%{0}%' and nr!=''", "申报截止日期"));
if (list.Count > 0)
startday = list[0].ToString();
filter = " where (TDtime between '" + dt.Year + "-"
+ dt.Month + "-" + dt.Day
+ " 00:00:00' and '"
+ dt2.Year + "-"
+ dt2.Month + "-" + dt2.Day + " 23:59:59' ) ";
if (orgid != "") filter += " and OrgCode='" + orgid + "'";
if (isWorkflowCall)
{
filter = filter + " and (id not in (select ModleRecordID from WF_ModleRecordWorkTaskIns where WorkFlowInsId='"
+ WorkFlowData.Rows[0]["WorkFlowInsId"].ToString() + "') "
+ " or id in (select ModleRecordID from WF_ModleRecordWorkTaskIns where "
+ " RecordID='" + currRecord.ID + "')) "
;
}
IList<PJ_tdjh> datalist = Client.ClientHelper.PlatformSqlMap.GetListByWhere<PJ_tdjh>(
filter
);
List<WF_ModleRecordWorkTaskIns> mrwtlist = new List<WF_ModleRecordWorkTaskIns>();
if (isWorkflowCall)
{
for (i = 0; i < datalist.Count; i++)
{
WF_ModleRecordWorkTaskIns mrwt = new WF_ModleRecordWorkTaskIns();
mrwt.ID = mrwt.CreateID();
mrwt.ModleRecordID = datalist[i].ID;
mrwt.RecordID = currRecord.ID;
mrwt.WorkFlowId = WorkFlowData.Rows[0]["WorkFlowId"].ToString();
mrwt.WorkFlowInsId = WorkFlowData.Rows[0]["WorkFlowInsId"].ToString();
mrwt.WorkTaskId = WorkFlowData.Rows[0]["WorkTaskId"].ToString();
mrwt.WorkTaskInsId = WorkFlowData.Rows[0]["WorkTaskInsId"].ToString();
mrwt.ModleTableName = datalist[i].GetType().ToString();
mrwt.CreatTime = DateTime.Now;
Thread.Sleep(new TimeSpan(100000));//0.1毫秒
mrwtlist.Add(mrwt);
}
}
List<SqlQueryObject> list3 = new List<SqlQueryObject>();
if (mrwtlist.Count > 0)
{
SqlQueryObject obj3 = new SqlQueryObject(SqlQueryType.Insert, mrwtlist.ToArray());
list3.Add(obj3);
}
MainHelper.PlatformSqlMap.ExecuteTransationUpdate(list3);
}
示例8: ExportExceljhbAllSubmitToWF_ModleRecordWorkTaskIns
public void ExportExceljhbAllSubmitToWF_ModleRecordWorkTaskIns(string orgid)
{
string filter = "";
int i = 0;
if (orgid != "") filter = " and OrgCode='" + orgid + "'";
if (isWorkflowCall)
{
filter = filter + " and (id not in (select ModleRecordID from WF_ModleRecordWorkTaskIns where "
+ " WorkFlowId='" + WorkFlowData.Rows[0]["WorkFlowId"].ToString() + "') "
+ " or id in (select ModleRecordID from WF_ModleRecordWorkTaskIns where "
+ " RecordID='" + currRecord.ID + "')) "
;
}
List<WF_ModleRecordWorkTaskIns> mrwtlist = new List<WF_ModleRecordWorkTaskIns>();
IList<PJ_yfsyjl> byqdatalist = Client.ClientHelper.PlatformSqlMap.GetList<PJ_yfsyjl>("SelectPJ_yfsyjlList", " where type='变压器' and planExpTime like '%" + DateTime.Now.Year + "%' " + filter + " order by xh ");
if (isWorkflowCall)
{
for (i = 0; i < byqdatalist.Count; i++)
{
WF_ModleRecordWorkTaskIns mrwt = new WF_ModleRecordWorkTaskIns();
mrwt.ID = mrwt.CreateID();
mrwt.ModleRecordID = byqdatalist[i].ID;
mrwt.RecordID = currRecord.ID;
mrwt.WorkFlowId = WorkFlowData.Rows[0]["WorkFlowId"].ToString();
mrwt.WorkFlowInsId = WorkFlowData.Rows[0]["WorkFlowInsId"].ToString();
mrwt.WorkTaskId = WorkFlowData.Rows[0]["WorkTaskId"].ToString();
mrwt.WorkTaskInsId = WorkFlowData.Rows[0]["WorkTaskInsId"].ToString();
mrwt.ModleTableName = byqdatalist[i].GetType().ToString();
mrwt.CreatTime = DateTime.Now;
Thread.Sleep(new TimeSpan(100000));//0.1毫秒
mrwtlist.Add(mrwt);
}
}
byqdatalist = Client.ClientHelper.PlatformSqlMap.GetList<PJ_yfsyjl>("SelectPJ_yfsyjlList", " where type='断路器' and planExpTime like '%" + DateTime.Now.Year + "%' " + filter + " order by xh ");
if (isWorkflowCall)
{
for (i = 0; i < byqdatalist.Count; i++)
{
WF_ModleRecordWorkTaskIns mrwt = new WF_ModleRecordWorkTaskIns();
mrwt.ID = mrwt.CreateID();
mrwt.ModleRecordID = byqdatalist[i].ID;
mrwt.RecordID = currRecord.ID;
mrwt.WorkFlowId = WorkFlowData.Rows[0]["WorkFlowId"].ToString();
mrwt.WorkFlowInsId = WorkFlowData.Rows[0]["WorkFlowInsId"].ToString();
mrwt.WorkTaskId = WorkFlowData.Rows[0]["WorkTaskId"].ToString();
mrwt.WorkTaskInsId = WorkFlowData.Rows[0]["WorkTaskInsId"].ToString();
mrwt.ModleTableName = byqdatalist[i].GetType().ToString();
mrwt.CreatTime = DateTime.Now;
Thread.Sleep(new TimeSpan(100000));//0.1毫秒
mrwtlist.Add(mrwt);
}
}
byqdatalist = Client.ClientHelper.PlatformSqlMap.GetList<PJ_yfsyjl>("SelectPJ_yfsyjlList", " where type='避雷器' and planExpTime like '%" + DateTime.Now.Year + "%' " + filter + " order by xh ");
if (isWorkflowCall)
{
for (i = 0; i < byqdatalist.Count; i++)
{
WF_ModleRecordWorkTaskIns mrwt = new WF_ModleRecordWorkTaskIns();
mrwt.ID = mrwt.CreateID();
mrwt.ModleRecordID = byqdatalist[i].ID;
mrwt.RecordID = currRecord.ID;
mrwt.WorkFlowId = WorkFlowData.Rows[0]["WorkFlowId"].ToString();
mrwt.WorkFlowInsId = WorkFlowData.Rows[0]["WorkFlowInsId"].ToString();
mrwt.WorkTaskId = WorkFlowData.Rows[0]["WorkTaskId"].ToString();
mrwt.WorkTaskInsId = WorkFlowData.Rows[0]["WorkTaskInsId"].ToString();
mrwt.ModleTableName = byqdatalist[i].GetType().ToString();
mrwt.CreatTime = DateTime.Now;
Thread.Sleep(new TimeSpan(100000));//0.1毫秒
mrwtlist.Add(mrwt);
}
}
byqdatalist = Client.ClientHelper.PlatformSqlMap.GetList<PJ_yfsyjl>("SelectPJ_yfsyjlList", " where type='电容器' and planExpTime like '%" + DateTime.Now.Year + "%' " + filter + " order by xh ");
if (isWorkflowCall)
{
for (i = 0; i < byqdatalist.Count; i++)
{
WF_ModleRecordWorkTaskIns mrwt = new WF_ModleRecordWorkTaskIns();
mrwt.ID = mrwt.CreateID();
mrwt.ModleRecordID = byqdatalist[i].ID;
mrwt.RecordID = currRecord.ID;
mrwt.WorkFlowId = WorkFlowData.Rows[0]["WorkFlowId"].ToString();
mrwt.WorkFlowInsId = WorkFlowData.Rows[0]["WorkFlowInsId"].ToString();
mrwt.WorkTaskId = WorkFlowData.Rows[0]["WorkTaskId"].ToString();
mrwt.WorkTaskInsId = WorkFlowData.Rows[0]["WorkTaskInsId"].ToString();
mrwt.ModleTableName = byqdatalist[i].GetType().ToString();
mrwt.CreatTime = DateTime.Now;
Thread.Sleep(new TimeSpan(100000));//0.1毫秒
mrwtlist.Add(mrwt);
}
List<SqlQueryObject> list3 = new List<SqlQueryObject>();
//.........这里部分代码省略.........