Commit f12fc489 authored by liudong1993's avatar liudong1993

推送调整

parent 10b4b775
......@@ -34,10 +34,16 @@ namespace Property.Common.Models
[EnumField("请购单审核")]
BuyingRequisition = 4,
/// <summary>
/// 请购单采购
/// </summary>
[EnumField("请购单采购")]
PurchaseRequisition = 5,
/// <summary>
/// 财务单据审核
/// </summary>
[EnumField("财务单据审核")]
Finance = 5,
Finance = 6,
}
}
......@@ -4044,11 +4044,11 @@ namespace Property.Module.FixedAssets
account.Add(new EmAccoutIdModel()
{
EmployeeId = emodel.EmployeeId,
EmAccount = emodel.LoginMobile
EmAccount = userInfo.emName
});
}
//发送通知
PushBuyingMessage(account, 0, "您有资产请购信息已购买,请往资产管理系统查看", "请购单通知", userInfo.EmployeeId, SysTemPushTypeEnum.RequisitionAudit);
PushBuyingMessage(account, 0, "您有资产请购信息已购买,请往资产管理系统查看", "请购单通知", userInfo.EmployeeId, Common.Models.PushMessageCategoryEnum.BuyingRequisition);
}
return flag;
}
......@@ -4062,17 +4062,27 @@ namespace Property.Module.FixedAssets
/// <param name="title"></param>
/// <param name="empId"></param>
/// <param name="type"></param>
public void PushBuyingMessage(List<EmAccoutIdModel> account, int workFlowId, string content, string title, int? empId, SysTemPushTypeEnum type)
public void PushBuyingMessage(List<EmAccoutIdModel> account, int workFlowId, string content, string title, int? empId, Common.Models.PushMessageCategoryEnum type)
{
//Dictionary<string, object> appExtras = new Dictionary<string, object>();
//Dictionary<string, object> webExtras = new Dictionary<string, object>
//{
// { "jumpUrl", "" }
//};
//appExtras.Add("jumpUrl", "vt://financeApprovalDetail/view?ID=" + workFlowId + "&Conditon=3&Source=message&Type=" + Type);
//IMService.PushFinanceMessage(account, empId, content, title, type, SystemPushLogTypeEnum.XMApp, appExtras);
//IMService.PushMessage(account.RefMapperToList<Property.Common.Models.EmAccoutIdModel>(), empId, content, title, type, SystemPushLogTypeEnum.Web, webExtras);
List<Common.Message.PushMessageModel> SendList = new List<Common.Message.PushMessageModel>();
foreach (var item in account)
{
Common.Message.PushMessageModel model = new Common.Message.PushMessageModel()
{
CategoryId = type,
Content = content,
CoverImg = "",
CreateByName = item.EmAccount,
JumpUrl = $"",
SendTime = DateTime.Now,
SendType = 0,
Title = title,
Platform = 2,
ReceiveId = item.EmployeeId.ToString(),
};
SendList.Add(model);
}
Common.Message.MessageHelper.SendMessage(SendList);
}
/// <summary>
......@@ -4337,11 +4347,11 @@ namespace Property.Module.FixedAssets
account.Add(new EmAccoutIdModel()
{
EmployeeId = emodel.EmployeeId,
EmAccount = emodel.LoginMobile
EmAccount = userInfo.emName
});
}
//发送通知 经办人有变更(让其快速处理采购)
PushBuyingMessage(account, 0, "您有请购单待采购,请往资产管理系统查看", "请购单通知", userInfo.EmployeeId, SysTemPushTypeEnum.RequisitionAudit);
PushBuyingMessage(account, 0, "您有请购单待采购,请往资产管理系统查看", "请购单通知", userInfo.EmployeeId, Common.Models.PushMessageCategoryEnum.BuyingRequisition);
}
}
return flag;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment