|
|
|
@ -118,6 +118,9 @@ namespace DSWeb.Areas.CommMng.DAL
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
向手机APP通知接口发送通知(OP,WORKFLOWID);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return _Result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -240,6 +243,9 @@ namespace DSWeb.Areas.CommMng.DAL
|
|
|
|
|
//SaveMessage(_Message);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
向手机APP通知接口发送通知(OP, WORKFLOWID);
|
|
|
|
|
|
|
|
|
|
return _Result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2590,8 +2596,6 @@ namespace DSWeb.Areas.CommMng.DAL
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 提交时通知审核人
|
|
|
|
|
static public int StartMessage(string WORKFLOWID, string OP, string RECEIVER, string BSNO,string BILLNO)
|
|
|
|
|
{
|
|
|
|
@ -2609,6 +2613,8 @@ namespace DSWeb.Areas.CommMng.DAL
|
|
|
|
|
|
|
|
|
|
var _message = SetInsertMessage(strSql);
|
|
|
|
|
if (SaveMessage(_message)) { _count = 1; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return _count;
|
|
|
|
|
}
|
|
|
|
@ -2936,7 +2942,121 @@ namespace DSWeb.Areas.CommMng.DAL
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
public class SendAppMessage {
|
|
|
|
|
public string title { get; set; }
|
|
|
|
|
public string content { get; set; }
|
|
|
|
|
public List<string> userIds { get; set; }
|
|
|
|
|
|
|
|
|
|
public SendAppMessage()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public SendAppMessage(string title,string content="")
|
|
|
|
|
{
|
|
|
|
|
this.title = title;
|
|
|
|
|
this.content = content;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static SendAppMessage JGWLAPPHelp(string title, List<Auditormb> AuditorList, VW_user_md Sender, DSWeb.Areas.OA.Models.WorkFlow.WorkFlowmb workflow) {
|
|
|
|
|
var result = new SendAppMessage(title);
|
|
|
|
|
result.userIds = AuditorList.Select(s=>s.GID).ToList();
|
|
|
|
|
|
|
|
|
|
result.content = $"{Sender.SHOWNAME}提交了[{workflow.NAME}],请及时处理";
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
public static void 向手机APP通知接口发送通知(string SenderUserid, string WORKFLOWID, string GROUPID="1")
|
|
|
|
|
{
|
|
|
|
|
//目前只有金港物流使用此功能
|
|
|
|
|
|
|
|
|
|
var companylist = new List<string>
|
|
|
|
|
{
|
|
|
|
|
"JGWL"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (BasicDataRefDAL.具有webconfig公司代码(companylist))
|
|
|
|
|
{
|
|
|
|
|
if (BasicDataRefDAL.具有webconfig公司代码("JGWL")) {
|
|
|
|
|
//目前根据工作流 判断哪些需要推送通知
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var workflowidList = new List<string> {
|
|
|
|
|
"5061D587-E806-EE82-7A3E-9260130A32AD",
|
|
|
|
|
"00378522-EFCE-F2C1-2DCE-0D72812303AE",
|
|
|
|
|
"2963F1D8-3C4E-1A0E-6B68-B2982C188F3A",
|
|
|
|
|
"E4C0A0DB-A44E-376B-3C95-7D9A913A31B8", //付费申请
|
|
|
|
|
"832DA470-C827-A58C-AF47-7BB931FDF6AD",
|
|
|
|
|
"6E15C788-BE00-06AD-291A-420A96A951FF",
|
|
|
|
|
"1E2E0FF1-61B6-64A4-2139-43E66F6F7CC7",
|
|
|
|
|
"97B3A9F2-E8D2-D466-A15E-946FA2A5EFBD",
|
|
|
|
|
"E3682F86-8820-8A7C-6EC7-FFAB8E1E75FE",
|
|
|
|
|
"F346CF2B-F074-3349-1842-F28306360FF7",//付费发票核销
|
|
|
|
|
"45C43498-FBD8-D83A-6ED6-3420E97E0680",
|
|
|
|
|
"707BBC82-943F-1F3A-FA7A-2C13F278182A",
|
|
|
|
|
"818E31B5-FC5D-03BB-D0A8-1925BFCE6C2D",//发票申请
|
|
|
|
|
"4500D029-65F7-46FC-7F6A-F1746C59C85E" //往来单位审批
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//var workflowid_dic = new Dictionary<string, string>
|
|
|
|
|
//{
|
|
|
|
|
// { "5061D587-E806-EE82-7A3E-9260130A32AD", "付费申请-货代部" }
|
|
|
|
|
// { "00378522-EFCE-F2C1-2DCE-0D72812303AE", "付费申请" }
|
|
|
|
|
// { "2963F1D8-3C4E-1A0E-6B68-B2982C188F3A", "付费申请" }
|
|
|
|
|
// { "E4C0A0DB-A44E-376B-3C95-7D9A913A31B8", "付费申请" } //付费申请
|
|
|
|
|
// { "832DA470-C827-A58C-AF47-7BB931FDF6AD", "付费发票核销" }
|
|
|
|
|
// { "6E15C788-BE00-06AD-291A-420A96A951FF", "付费发票核销" }
|
|
|
|
|
// { "1E2E0FF1-61B6-64A4-2139-43E66F6F7CC7", "付费发票核销" }
|
|
|
|
|
// { "97B3A9F2-E8D2-D466-A15E-946FA2A5EFBD", "付费发票核销" }
|
|
|
|
|
// { "E3682F86-8820-8A7C-6EC7-FFAB8E1E75FE", "付费发票核销" }
|
|
|
|
|
// { "F346CF2B-F074-3349-1842-F28306360FF7", "付费发票核销" }//付费发票核销
|
|
|
|
|
// { "45C43498-FBD8-D83A-6ED6-3420E97E0680", "发票申请" }
|
|
|
|
|
// { "707BBC82-943F-1F3A-FA7A-2C13F278182A", "发票申请" }
|
|
|
|
|
// { "818E31B5-FC5D-03BB-D0A8-1925BFCE6C2D", "发票申请" }//发票申请
|
|
|
|
|
// { "4500D029-65F7-46FC-7F6A-F1746C59C85E", "往来单位审批" } //往来单位审批
|
|
|
|
|
//};
|
|
|
|
|
|
|
|
|
|
if (workflowidList.Exists(x => x == WORKFLOWID)) {
|
|
|
|
|
var cdc = new CommonDataContext();
|
|
|
|
|
var Auditor = GetAuditor(WORKFLOWID, GROUPID);
|
|
|
|
|
|
|
|
|
|
//测试数据
|
|
|
|
|
//var testuser = cdc.VW_user.FirstOrDefault(x=>x.USERID== "1BEC90E1-9780-472F-90C2-0C6390C044A4");
|
|
|
|
|
//var auditor = new Auditormb();
|
|
|
|
|
//auditor.GID = "1BEC90E1-9780-472F-90C2-0C6390C044A4";
|
|
|
|
|
//Auditor.Add(auditor);
|
|
|
|
|
|
|
|
|
|
var workflowList= OA.DAL.WorkFlow.WorkFlowDAL.GetWorkFlowList($" wf.GID='{WORKFLOWID}'");
|
|
|
|
|
var workflow = workflowList[0];
|
|
|
|
|
|
|
|
|
|
var Sender = cdc.VW_user.FirstOrDefault(x => x.USERID == SenderUserid);
|
|
|
|
|
|
|
|
|
|
if (Auditor != null && Auditor.Count > 0) {
|
|
|
|
|
var sendinfo = SendAppMessage.JGWLAPPHelp($"[{workflow.NAME}]提交审核", Auditor, Sender, workflow);
|
|
|
|
|
|
|
|
|
|
DoSend(sendinfo);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void DoSend(SendAppMessage sendinfo) {
|
|
|
|
|
var SendAppInfoServiceURL = MsSysParamSetDAL.GetData("PARAMNAME='SendAppInfoServiceURL'");
|
|
|
|
|
if (SendAppInfoServiceURL.PARAMVALUE != "")
|
|
|
|
|
{
|
|
|
|
|
var url = SendAppInfoServiceURL.PARAMVALUE;
|
|
|
|
|
BasicDataRefDAL.SaveLog(sendinfo,"","发送APP提醒","发送");
|
|
|
|
|
string rtn = DSWeb.Areas.Dispatch.Helper.WebRequestHelper.DoPost_Json(url, sendinfo);
|
|
|
|
|
BasicDataRefDAL.SaveLog(rtn, "", "发送APP提醒", "返回");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#region 保存信息
|
|
|
|
|
public static Boolean SaveMessage(SYSMessagemb Message)
|
|
|
|
|