You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

147 lines
4.4 KiB
Plaintext

11 months ago
using System;
using System.Threading;
using System.Collections;
using System.Data;
using BP.DA;
using BP.DTS;
using BP.En;
using BP.Web;
using BP.Sys;
using BP.WF;
namespace BP.LIMS
{
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>002
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>뵽 BP.*.dll <20><><EFBFBD>ܱ<EFBFBD><DCB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
public class F002 : BP.WF.FlowEventBase
{
#region <20><><EFBFBD><EFBFBD>.
/// <summary>
/// <20><>д<EFBFBD><D0B4><EFBFBD>̱<EFBFBD><CCB1><EFBFBD>
/// </summary>
public override string FlowMark
{
get { return ",002,"; }
}
#endregion <20><><EFBFBD><EFBFBD>.
#region <20><><EFBFBD><EFBFBD>.
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>
/// </summary>
public F002()
{
}
#endregion <20><><EFBFBD><EFBFBD>.
#region <20><><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>.
/// <summary>
/// <20><>д<EFBFBD><D0B4><EFBFBD><EFBFBD>ǰ<EFBFBD>¼<EFBFBD>
/// </summary>
/// <returns></returns>
public override string SendWhen()
{
if (this.HisNode.NodeID == 201)
{
// StartSubFlows();
}
return null;
}
#endregion <20><><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>.
/// <summary>
/// <20><><EFBFBD>ͳɹ<CDB3><C9B9>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳɹ<CDB3>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̵Ĵ<CCB5><C4B4><EFBFBD>д<EFBFBD><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳ<CFB5><CDB3>.
/// </summary>
/// <returns><3E><><EFBFBD><EFBFBD>ִ<EFBFBD>н<EFBFBD><D0BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>null<6C>Ͳ<EFBFBD><CDB2><EFBFBD>ʾ<EFBFBD><CABE></returns>
public override string SendSuccess()
{
try
{
// <20><>֯<EFBFBD><D6AF>Ҫ<EFBFBD>ı<EFBFBD><C4B1><EFBFBD>.
Int64 workid = this.WorkID; // <20><><EFBFBD><EFBFBD>id.w
string flowNo = this.HisNode.FK_Flow; // <20><><EFBFBD>̱<EFBFBD><CCB1><EFBFBD>.
int currNodeID = this.SendReturnObjs.VarCurrNodeID; //<2F><>ǰ<EFBFBD>ڵ<EFBFBD>id
int toNodeID = this.SendReturnObjs.VarToNodeID; //<2F><><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD>id.
string toNodeName = this.SendReturnObjs.VarToNodeName; // <20><><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD>ơ<EFBFBD>
string acceptersID = this.SendReturnObjs.VarAcceptersID; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Աid, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD> <20><><EFBFBD>ŷֿ<C5B7> ,<2C><><EFBFBD><EFBFBD> zhangsan,lisi<73><69>
string acceptersName = this.SendReturnObjs.VarAcceptersName; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><D4B1><EFBFBD>ƣ<EFBFBD><C6A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><D4B1><EFBFBD>ö<EFBFBD><C3B6>ŷֿ<C5B7><D6BF><EFBFBD><EFBFBD><EFBFBD>:<3A><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>.
//ִ<><D6B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳд<CDB3><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
/*
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA>д<EFBFBD><D0B4><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD>߼<EFBFBD><DFBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֯<EFBFBD>ı<EFBFBD><C4B1><EFBFBD>.
*/
if (this.HisNode.NodeID == 203)
{
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬Ϊ<CCAC><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
DBAccess.RunSQL("UPDATE YB_YBFenXi SET YBSta=3 WHERE RefPK=" + this.WorkID);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҳ<EFBFBD><D2B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬.
YBFenXis ens = new YBFenXis();
ens.Retrieve(YBFenXiAttr.RefPK, this.WorkID);
foreach (YBFenXi en in ens)
{
DBAccess.RunSQL("UPDATE YB_Pool SET YBSta=3 WHERE OID=" + en.OID);
}
//<2F><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>ͬ<EFBFBD><CDAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Let001Run();
}
//<2F><><EFBFBD><EFBFBD>.
return base.SendSuccess();
}
catch (Exception ex)
{
return base.SendSuccess();
// throw new Exception("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳд<CDB3><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>ϸ<EFBFBD><CFB8>Ϣ<EFBFBD><CFA2>"+ex.Message);
}
}
/// <summary>
/// <20>ø<EFBFBD><C3B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><D0B5><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD>ȥ.
/// </summary>
public void Let001Run()
{
//<2F><><EFBFBD>Ȼ<EFBFBD><C8BB>ñ<EFBFBD><C3B1>η<EFBFBD><CEB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD><D0B6>ٸ<EFBFBD>ί<EFBFBD>У<EFBFBD>
string sql = "SELECT DISTINCT WorkIDOfWT FROM YB_YBFenXi WHERE RefPK=" + this.WorkID;
DataTable dt = DBAccess.RunSQLReturnTable(sql);
string webUserNo = BP.Web.WebUser.No;
//<2F><><EFBFBD><EFBFBD>ί<EFBFBD>У<EFBFBD>ִ<EFBFBD>м<EFBFBD><D0BC><EFBFBD><E9A3AC>ί<EFBFBD><CEAF><EFBFBD>£<EFBFBD><C2A3>Ƿ<EFBFBD><C7B7>Ѿ<EFBFBD>ȫ<EFBFBD><C8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>״̬.
foreach (DataRow dr in dt.Rows)
{
Int64 workidOfWT = Int64.Parse(dr[0].ToString());
sql = "SELECT count(*) as Num FROM YB_Pool WHERE YBSta!=3 where refpk=" + workidOfWT;
//<2F><><EFBFBD>еĶ<D0B5><C4B6>ѷ<EFBFBD><D1B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
if (DBAccess.RunSQLReturnValInt(sql) == 0)
{
}
else
{
continue;
}
//<2F><> ί<><CEAF><EFBFBD><EFBFBD><EFBFBD>̣<EFBFBD><CCA3>ӵȴ<D3B5><C8B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵ㣬<DAB5>˶<EFBFBD><CBB6><EFBFBD> <20><>Ȩ<EFBFBD><C8A8>ǩ<EFBFBD>ֽڵ<D6BD>.
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD>˵Ĵ<CBB5><C4B4><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼.
sql = "select fk_emp from wf_generworkerlist where ispass=0 and workid="+workidOfWT +" and fk_node=103";
string empNo = DBAccess.RunSQLReturnString(sql);
BP.WF.Dev2Interface.Port_Login(empNo);
// ִ<>з<EFBFBD><D0B7>͡<EFBFBD>
BP.WF.Dev2Interface.Node_SendWork("001", workidOfWT, 0, null);
}
}
}
}