/// <summary> 更改流程内容 /// </summary> /// <param name="cid">合同id</param> /// <param name="plan">进度</param> public string updateFlow(string cid, string plan) { try { SqlAgent sa = new SqlAgent(SysConfiguration.GetErpSqlConn()); sa.addParameterDB("F_3517_09", "getdate()", ""); sa.addParameterString("F_3517_22", "系统自动完成", 100, false, ""); sa.addParameterNumber("F_3517_18", 1, ""); sa.addCondition("F_3517_03", cid, CompareType.Equal, LogicType.none, ""); sa.addCondition("F_3517_18", 1, CompareType.NotEqual, LogicType.And, ""); if (plan == emContractSpan.资料收齐.GetHashCode().ToString()) { sa.addCondition("F_3517_06", "备齐按揭资料", CompareType.Equal, LogicType.And, ""); } if (plan == emContractSpan.审批通过.GetHashCode().ToString()) { //sa.addDBCondition("F_3517_06", "'按揭审批通过领取按揭合同','商业按揭审批通过'", CompareType.In, ""); //sa.addCondition("F_3517_06", "商业按揭审批通过", CompareType.Equal, LogicType.And, ""); sa.whereAppend = " (F_3517_06 = '商业按揭审批通过' or F_3517_06 = '按揭审批通过')"; } sa.update("T_3517"); sa.addSelect("F_3517_04"); DataTable dt = sa.@select("T_3517"); sa.whereAppend = ""; if (dt == null || dt.Rows.Count < 1) { return(""); } sa = new SqlAgent(SysConfiguration.GetErpSqlConn()); sa.addParameterDB("F_3517_08", "DATEADD(day,1,getdate())", ""); sa.addCondition("F_3517_03", cid, CompareType.Equal, LogicType.none, ""); sa.addCondition("F_3515_07", dt.Rows[0]["F_3517_04"].ToString(), CompareType.Equal, LogicType.And, ""); return(sa.update("T_3517")); } catch (Exception ex) { return(ex.ToString()); } }