发票管理增加打印,和推送oa
This commit is contained in:
@@ -5,7 +5,14 @@ namespace BLL
|
||||
{
|
||||
public static class OAWebSevice
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 获取推送OA的PCurl
|
||||
/// </summary>
|
||||
/// <param name="projectid"></param>
|
||||
/// <param name="formname"></param>
|
||||
/// <param name="ID"></param>
|
||||
/// <param name="personId"></param>
|
||||
/// <returns></returns>
|
||||
public static string geturl(string projectid, string formname, string ID, string personId)
|
||||
{
|
||||
//string SGGLUrl = Funs.SGGLUrl.Substring(Funs.SGGLUrl.IndexOf("//")+2);
|
||||
@@ -37,12 +44,26 @@ namespace BLL
|
||||
case ActionPlanListApproveService.ActionPlanListEdit:
|
||||
PHTUrl = string.Format("PHTUrl=ZHGL/Plan/ActionPlanListEdit.aspx?ActionPlanListId={0}", ID);
|
||||
break;
|
||||
case PHTGL_ApproveService.Invoice_Input:
|
||||
PHTUrl = string.Format("PHTUrl=PHTGL/InvoiceManage/InvoiceOrderDetail.aspx?InvoiceId={0}&Type=0", ID);
|
||||
break;
|
||||
case PHTGL_ApproveService.Invoice_Output:
|
||||
PHTUrl = string.Format("PHTUrl=PHTGL/InvoiceManage/InvoiceOrderDetail.aspx?InvoiceId={0}&Type=1", ID);
|
||||
break;
|
||||
|
||||
}
|
||||
url = url + PHTUrl;
|
||||
//LogService.AddSys_Log(Person_PersonsService.GetPerson_PersonsById(personId),"", ID, "ActionPlanListEdit",url);
|
||||
return url;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取推送OA的Appurl
|
||||
/// </summary>
|
||||
/// <param name="projectid"></param>
|
||||
/// <param name="formname"></param>
|
||||
/// <param name="ID"></param>
|
||||
/// <param name="userid"></param>
|
||||
/// <returns></returns>
|
||||
public static string getAppurl(string projectid, string formname, string ID, string userid)
|
||||
{
|
||||
string mobileWebUrl = Funs.MobileWebUrl;
|
||||
@@ -65,12 +86,18 @@ namespace BLL
|
||||
case PHTGL_ApproveService.ContractReview:
|
||||
PHTUrl = string.Format("PHTGL/ContractCompile/{0}Detail.aspx?ContractReviewId={1}&PersonId={2}", formname, ID, userid);
|
||||
break;
|
||||
case PHTGL_ApproveService.Invoice_Input:
|
||||
PHTUrl = string.Format("PHTGL/InvoiceManage/InvoiceOrderDetail.aspx?InvoiceId={0}&Type=0&PersonId={1}", ID, userid);
|
||||
break;
|
||||
case PHTGL_ApproveService.Invoice_Output:
|
||||
PHTUrl = string.Format("PHTGL/InvoiceManage/InvoiceOrderDetail.aspx?InvoiceId={0}&Type=1&PersonId={1}", ID, userid);
|
||||
break;
|
||||
}
|
||||
url = url + PHTUrl;
|
||||
return url;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取审批表单主界面
|
||||
/// 获取审批表单主界面(用于推送给创建者)
|
||||
/// </summary>
|
||||
/// <param name="projectid"></param>
|
||||
/// <param name="formname"></param>
|
||||
@@ -103,6 +130,12 @@ namespace BLL
|
||||
case PHTGL_ApproveService.ContractReview_Countersign:
|
||||
PHTUrl = string.Format("PHTUrl=PHTGL/ContractCompile/{0}.aspx", formname);
|
||||
break;
|
||||
case PHTGL_ApproveService.Invoice_Input:
|
||||
PHTUrl = string.Format("PHTUrl=PHTGL/InvoiceManage/InvoiceOrder.aspx");
|
||||
break;
|
||||
case PHTGL_ApproveService.Invoice_Output:
|
||||
PHTUrl = string.Format("PHTUrl=PHTGL/InvoiceManage/InvoiceOrder.aspx");
|
||||
break;
|
||||
}
|
||||
url = url + PHTUrl;
|
||||
return url;
|
||||
@@ -226,6 +259,38 @@ namespace BLL
|
||||
|
||||
}
|
||||
break;
|
||||
case PHTGL_ApproveService.Invoice_Input:
|
||||
var invoice = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(users.ContractId);
|
||||
if (invoice != null)
|
||||
{
|
||||
var gereceiver = BLL.Person_PersonsService.GetPerson_PersonsById(invoice.CreateUser);
|
||||
var geCreatUser = BLL.Person_PersonsService.GetPerson_PersonsById(users.ApproveMan);
|
||||
var project = BLL.ProjectService.GetProjectByProjectId(invoice.ProjectId);
|
||||
webJson.flowid = users.ApproveId;
|
||||
webJson.requestname = "入库单审批(被拒) " + project.ProjectName;
|
||||
webJson.nodename = users.ApproveType;
|
||||
webJson.creator = geCreatUser.JobNum;
|
||||
webJson.receiver = gereceiver.JobNum;
|
||||
webJson.pcurl = geturl_Form(invoice.ProjectId, PHTGL_ApproveService.Invoice_Input, gereceiver.PersonId);
|
||||
webJson.appurl = getAppurl(invoice.ProjectId, PHTGL_ApproveService.Invoice_Input, invoice.InvoiceId, gereceiver.PersonId);
|
||||
}
|
||||
break;
|
||||
case PHTGL_ApproveService.Invoice_Output:
|
||||
var invoice_output = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(users.ContractId);
|
||||
if (invoice_output != null)
|
||||
{
|
||||
var gereceiver = BLL.Person_PersonsService.GetPerson_PersonsById(invoice_output.CreateUser);
|
||||
var geCreatUser = BLL.Person_PersonsService.GetPerson_PersonsById(users.ApproveMan);
|
||||
var project = BLL.ProjectService.GetProjectByProjectId(invoice_output.ProjectId);
|
||||
webJson.flowid = users.ApproveId;
|
||||
webJson.requestname = "出库单审批(被拒) " + project.ProjectName;
|
||||
webJson.nodename = users.ApproveType;
|
||||
webJson.creator = geCreatUser.JobNum;
|
||||
webJson.receiver = gereceiver.JobNum;
|
||||
webJson.pcurl = geturl_Form(invoice_output.ProjectId, PHTGL_ApproveService.Invoice_Output, gereceiver.PersonId);
|
||||
webJson.appurl = getAppurl(invoice_output.ProjectId, PHTGL_ApproveService.Invoice_Output, invoice_output.InvoiceId, gereceiver.PersonId);
|
||||
}
|
||||
break;
|
||||
}
|
||||
strjson = JsonConvert.SerializeObject(webJson);
|
||||
returnjson = OAWeb.receiveTodoRequestByJson(strjson);
|
||||
@@ -368,6 +433,38 @@ namespace BLL
|
||||
webJson.appurl = getAppurl(Con_Co.ProjectId, PHTGL_ApproveService.ContractReview, Ctr_Co.ContractReviewId, users[i].ApproveMan);
|
||||
}
|
||||
break;
|
||||
case PHTGL_ApproveService.Invoice_Input:
|
||||
var invoice = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(users[i].ContractId);
|
||||
if (invoice != null)
|
||||
{
|
||||
var geCreatUser = BLL.Person_PersonsService.GetPerson_PersonsById(invoice.CreateUser);
|
||||
var gereceiver = BLL.Person_PersonsService.GetPerson_PersonsById(users[i].ApproveMan);
|
||||
var project = BLL.ProjectService.GetProjectByProjectId(invoice.ProjectId);
|
||||
webJson.flowid = users[i].ApproveId;
|
||||
webJson.requestname = "入库单审批 " + project.ProjectName;
|
||||
webJson.nodename = users[i].ApproveType;
|
||||
webJson.creator = geCreatUser.JobNum;
|
||||
webJson.receiver = gereceiver.JobNum;
|
||||
webJson.pcurl = geturl(invoice.ProjectId, PHTGL_ApproveService.Invoice_Input, invoice.InvoiceId, users[i].ApproveMan);
|
||||
webJson.appurl = getAppurl(invoice.ProjectId, PHTGL_ApproveService.Invoice_Input, invoice.InvoiceId, users[i].ApproveMan);
|
||||
}
|
||||
break;
|
||||
case PHTGL_ApproveService.Invoice_Output:
|
||||
var invoice_output = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(users[i].ContractId);
|
||||
if (invoice_output != null)
|
||||
{
|
||||
var geCreatUser = BLL.Person_PersonsService.GetPerson_PersonsById(invoice_output.CreateUser);
|
||||
var gereceiver = BLL.Person_PersonsService.GetPerson_PersonsById(users[i].ApproveMan);
|
||||
var project = BLL.ProjectService.GetProjectByProjectId(invoice_output.ProjectId);
|
||||
webJson.flowid = users[i].ApproveId;
|
||||
webJson.requestname = "出库单审批 " + project.ProjectName;
|
||||
webJson.nodename = users[i].ApproveType;
|
||||
webJson.creator = geCreatUser.JobNum;
|
||||
webJson.receiver = gereceiver.JobNum;
|
||||
webJson.pcurl = geturl(invoice_output.ProjectId, PHTGL_ApproveService.Invoice_Output, invoice_output.InvoiceId, users[i].ApproveMan);
|
||||
webJson.appurl = getAppurl(invoice_output.ProjectId, PHTGL_ApproveService.Invoice_Output, invoice_output.InvoiceId, users[i].ApproveMan);
|
||||
}
|
||||
break;
|
||||
}
|
||||
strjson = JsonConvert.SerializeObject(webJson);
|
||||
returnjson = OAWeb.receiveTodoRequestByJson(strjson);
|
||||
@@ -497,6 +594,12 @@ namespace BLL
|
||||
case PHTGL_ApproveService.ContractReview:
|
||||
webJson.requestname = "合同审批";
|
||||
break;
|
||||
case PHTGL_ApproveService.Invoice_Input:
|
||||
webJson.requestname = "入库单审批";
|
||||
break;
|
||||
case PHTGL_ApproveService.Invoice_Output:
|
||||
webJson.requestname = "出库单审批";
|
||||
break;
|
||||
}
|
||||
string strjson = JsonConvert.SerializeObject(webJson);
|
||||
var returnjson = OAWeb.processDoneRequestByJson(strjson);
|
||||
|
||||
Reference in New Issue
Block a user