修改撤销在发送后也能撤销问题,解决工艺卡审批在最后节点结束流程时报错问题(场景:因为不是从工艺卡创建跳转过来的,所以我们关联不到是哪个创建流程导致的报错)

master
孙亮 8 months ago
parent 837654f247
commit b908b3aff6

@ -1779,7 +1779,7 @@ namespace CCFlow.DataUser.API.Controllers
if (BP.Difference.SystemConfig.CCBPMRunModel == CCBPMRunModel.SAAS)
wfSql = " AND a.OrgNo='" + WebUser.OrgNo + "'";
ps.SQL = "SELECT count(b.WorkID) as Num FROM WF_Generworkflow a JOIN WF_GenerWorkerList b ON a.WorkID=b.WorkID WHERE b.FK_Emp=" + dbstr + "FK_Emp AND b.IsPass=0 AND a.WFState <> 0 " + wfSql;
ps.SQL = "SELECT count(b.WorkID) as Num FROM WF_Generworkflow a JOIN WF_GenerWorkerList b ON a.WorkID=b.WorkID WHERE b.FK_Emp=" + dbstr + "FK_Emp AND b.IsPass=0 AND a.WFState > 1 " + wfSql;
ps.Add("FK_Emp", UserNo);
int nums = DBAccess.RunSQLReturnValInt(ps);
return Return_Info(200, "查询成功", "EmpWorksNums:" + nums);

@ -13,7 +13,7 @@ namespace BP.Demo
public class DoEvnFlow : BP.WF.FlowEventBase
{
public override string FlowMark {
get {return "021,002"; }
get {return "021,002,060"; }
}
public override string FlowOverAfter()
{
@ -22,6 +22,13 @@ namespace BP.Demo
GenerWorkFlow gwf = new GenerWorkFlow(this.WorkID);
string pTable1 = BP.DA.DBAccess.RunSQLReturnString("SELECT PTable FROM WF_FLOW WHERE No = " + gwf.FlowNo);//当前触发流程存储表
DataTable BFParas = BP.DA.DBAccess.RunSQLReturnTable("SELECT LCBH,BFOID,FLOWENDERRDT FROM " + pTable1 + " WHERE OID='" + this.WorkID + "'");//要同步表的数据
if (BFParas.Rows[0][0].ToString() == "") {
return "";
}
if (BFParas.Rows[0][1].ToString() == "")
{
return "";
}
string pTable2 = BP.DA.DBAccess.RunSQLReturnString("SELECT PTable FROM WF_FLOW WHERE No = " + BFParas.Rows[0][0]);
if (gwf.FlowNo == "021")
{

@ -275,9 +275,15 @@ namespace BP.WF.HttpHandler
//BKGY 撤销发送
sql = "SELECT WorkID,FK_Emp,FK_Node,IsPass From WF_GenerWorkerlist WHERE WorkID=" + this.WorkID +" And FK_Node='"+ gwf.NodeID+"'";
DataTable dtt = DBAccess.RunSQLReturnTable(sql);
bool isCanShowUnSend = true;
foreach (DataRow item in dtt.Rows) {
if (item["IsPass"].ToString() == "0") {
isCanShowUnSend = false;
break;
}
}
if(nd.HisCancelRole == BP.WF.CancelRole.OnlyNextStep && dtt.Rows[0][3].ToString().Equals("0"))
if(nd.HisCancelRole == BP.WF.CancelRole.OnlyNextStep && isCanShowUnSend)
if (dtt.Rows.Count > 0 || powers.Contains("FlowDataUnSend") == true)
{
dr = dt.NewRow();

Loading…
Cancel
Save