using APT.Infrastructure.Core;
using APT.BaseData.Domain.ApiModel.EX;
using APT.BaseData.Domain.Entities.FM;
using APT.BaseData.Domain.Enums;
using System.Collections.Generic;
using APT.Infrastructure.Api;
using System;
using static APT.BaseData.Domain.ApiModel.SocketInfo;
using APT.BaseData.Domain.Entities;
namespace APT.BaseData.Domain.IServices.FM
{
public interface IFMNotificationTaskService : ICommonService
{
///
/// 1.按照多用户生成通知消息
///
/// 消息标题
/// 数据的ID
/// 组织ID
/// 用户ID集合
/// 通知开始时间
/// 通知结束时间
/// 通知类型
/// 表单编码
/// 执行方法
///
bool SendNotificationTask(string name, Guid dataId, Guid? orgId, List userIds, DateTime startTime,
DateTime endTime, int noticeType, string formCode, Action action);
bool SendNotificationTask(List names, List dataIds, Guid? orgId, List userIds, List userNames, DateTime startTime, List listEndTime, int noticeType, string formCode, Action action);
bool SendNotificationTask(List names, List dataIds, Guid? orgId, List userIds, List userNames, List listStartTime, List listEndTime, int noticeType, string formCode, Action action);
///
/// 2.按照单用户生成通知消息
///
/// 消息标题
/// 数据的ID
/// 组织ID
/// 用户ID集合
/// 通知开始时间
/// 通知结束时间
/// 通知类型
/// 表单编码
/// 执行方法
///
bool SendNotificationTask(string name, Guid dataId, Guid? orgId, Guid userId, DateTime startTime,
DateTime endTime, int noticeType, string formCode, Action action);
///
/// 3.按照用户生成通知消息(wjn)
///
/// 消息标题集合
/// 数据的ID
/// 组织ID
/// 用户ID集合
/// 通知开始时间
/// 通知结束时间
/// 通知类型
/// 表单编码
/// 执行方法
///
bool SendNotificationTask(List names, List dataIds, Guid? orgId, List userIds, List
userNames, DateTime startTime, DateTime endTime, int noticeType, string formCode, Action action);
///
/// 4.按照用户生成通知消息(wjn)
///
/// 消息标题集合
/// 数据的ID
/// 组织ID
/// 用户ID集合
/// 通知开始时间
/// 通知结束时间
/// 通知类型
/// 表单编码
/// 执行方法
///
bool SendNotificationTask(string name, Guid dataId, Guid? orgId, List userIds, List
userNames, DateTime startTime, DateTime endTime, int noticeType, string formCode, Action action, string formCodeDone, Guid? UserIDDone = null);
///
/// 4.按照用户生成通知消息(wjn)
///
/// 消息标题集合
/// 数据的ID
/// 组织ID
/// 用户ID集合
/// 通知开始时间
/// 通知结束时间
/// 通知类型
/// 表单编码
/// 执行方法
///
bool SendNotificationTask(string name, Guid dataId, Guid? orgId, List userIds, List
userNames, DateTime startTime, DateTime endTime, int noticeType, string formCode, Action action, string formCodeDone, List listUserIDDone);
/// ///
/// 5.按照单用户生成通知消息(wjn)增加用户名
///
/// 消息标题
/// 数据的ID
/// 组织ID
/// 用户ID
/// 用户名
/// 通知开始时间
/// 通知结束时间
/// 通知类型
/// 表单编码
/// 执行方法
///
bool SendNotificationTask(string name, Guid dataId, Guid? orgId, Guid userId, string userName, DateTime startTime,
DateTime endTime, int noticeType, string formCode, Action action);
///
/// 4.按照用户生成通知消息2.修改旧消息的状态(wjn)
///
/// 消息标题
/// 数据的ID
/// 组织ID
/// 用户ID集合
/// 用户ID集合
/// 通知开始时间
/// 通知结束时间
/// 通知类型
/// 表单编码
/// 执行方法
/// 修改通知为结束状态
/// 执行方法
///
bool SendAndFinishNotificationTask(string name, Guid dataId, Guid? orgId, List userIds, List userNames, DateTime startTime,
DateTime endTime, int noticeType, string formCode, Guid finishTaskId, Action action, string SOURCE_FORMCODE_Finish = "");
bool SendAndFinishNotificationTask(List ListName, List ListDataId, Guid? orgId, List userIds, List userNames, DateTime startTime,
DateTime endTime, int noticeType, string formCode, Guid? finishTaskId, Action action, string SOURCE_FORMCODE_Finish = "");
///
/// 5.按照用户生成通知消息2.修改旧消息的状态(wjn)
///
/// 消息标题
/// 数据的ID
/// 组织ID
/// 用户ID
/// 用户名
/// 通知开始时间
/// 通知结束时间
/// 通知类型
/// 表单编码
/// 执行方法
/// 修改通知为结束状态
/// 执行方法
///
bool SendAndFinishNotificationTask(string name, Guid dataId, Guid? orgId, Guid userId, string userName, DateTime startTime,
DateTime endTime, int noticeType, string formCode, Guid finishTaskId, Action action, string SOURCE_FORMCODE_Finish = "");
///
/// 6.1按照用户生成通知消息2.修改旧消息的状态(wjn)
///
/// 消息标题集合
/// 数据的ID
/// 组织ID
/// 用户ID集合
/// 通知开始时间
/// 通知结束时间
/// 通知类型
/// 表单编码
/// 执行方法
///
bool SendAndFinishNotificationTask(List names, List dataIds, Guid? orgId, List userIds, List
userNames, DateTime startTime, DateTime endTime, int noticeType, string formCode, Guid finishTaskId, Action action);
///
/// 6.2按照用户生成通知消息2.修改旧消息的状态(wjn)
///
/// 消息标题集合
/// 数据的ID
/// 组织ID
/// 用户ID集合
/// 通知开始时间
/// 通知结束时间
/// 通知类型
/// 表单编码
/// 执行方法
/// 编码
///
bool SendAndFinishNotificationTask(List names, List dataIds, Guid? orgId, List userIds, List
userNames, DateTime startTime, DateTime endTime, int noticeType, List formCodes, Guid finishTaskId, Action action);
///
/// 修改旧消息的状态为已完成
///
/// 消息ID
/// 执行方法
///
bool NotificationTaskFinish(Guid id, Action action);
///
/// 通过消息ID修改旧消息的状态为已完成
///
/// 消息ID
///
T_FM_NOTIFICATION_TASK NotificationTaskFinishModel(Guid id);
///
/// 修改旧消息的状态为已完成(wyw0513)
///
/// 消息ID
///
T_FM_NOTIFICATION_TASK GetTaskFinishModel(Guid id, string sourceFormCode = "");
///
/// FO修改旧消息的状态为已完成(wyw0513)
///
/// 消息ID
///
T_FM_NOTIFICATION_TASK FOGetTaskFinishModel(Guid id, Guid dataSourceId, string sourceFormCode = "");
///
/// 修改待办状态
///
///
///
///
T_FM_NOTIFICATION_TASK TaskFinishChangeProp(T_FM_NOTIFICATION_TASK task, string sourceFormCode = "");
///
/// 发送新消息返回实体
///
///
///
///
///
///
///
///
/// FMNoticeTypeEnum 0消息 1审批 2今日提醒
///
///
T_FM_NOTIFICATION_TASK InsertUserNoticeTaskModel(string Name, Guid DataId, Guid? OrgId, Guid UserId, string userName,
DateTime startTime, DateTime endTime, int noticeType, string formCode);
///
/// 发送新消息返回实体集合
///
/// 消息ID
///
List InsertUserNoticeTaskModels(string Name, Guid? DataId, Guid? OrgId, List UserId, List userName,
DateTime startTime, DateTime endTime, int noticeType, string formCode, Guid? AutoDoneID = null);
///
/// 发送新消息集合返回实体集合
///
/// 消息ID
///
List InsertUserNoticeTaskModels(List Name, List DataId, Guid? OrgId, List UserId, List userName,
DateTime startTime, DateTime endTime, int noticeType, string formCode);
///
/// 发送新消息集合返回实体集合
///
/// 消息ID
///
List InsertUserNoticeTaskModels(List Name, List DataId, Guid? OrgId, List UserId, List userName,
DateTime startTime, DateTime endTime, int noticeType, List formCode);
///
/// 发送新消息集合返回实体集合
///
/// 消息ID
///
List InsertUserNoticeTaskModels(string[] codeList, List Name, List DataId, Guid? OrgId, List UserId, List userName,
DateTime startTime, DateTime endTime, int noticeType, string formCode);
List InsertUserNoticeTaskModels(string[] codeList, List Name, List DataId, Guid? OrgId, List UserId, List userName,
DateTime startTime, List listEndTime, int noticeType, string formCode);
///
/// 获取和修改Task信息
///
///
/// 例:BS042_SHOWPRINT
/// 如果有参数 只能FMNoticeStatusEnum 对应的枚举值
///
T_FM_NOTIFICATION_TASK GetEntityTask(Guid TaskID, string SOURCE_FORMCODE = "", int NOTICE_STATUS = -1);
T_FM_NOTIFICATION_TASK InsertUserNoticeTaskModel(string Name, Guid? DataId, Guid? OrgId, Guid UserId, string userName,
DateTime startTime, int noticeType, string formCode, FMTASKTYPE TaskType, int? IFREQUENCYE = null, DateTime? DateTimeLastest = null, List listAllSet = null);
List InsertUserNoticeTaskModels(string Name, List DataId, Guid? OrgId, List UserId, List userName, DateTime startTime, int noticeType, string formCode, FMTASKTYPE TaskType, int? IFREQUENCYE = null, DateTime? DateTimeLastest = null, List listAllSet = null);
///
/// 插入新消息返回实体集合(wyw 0525)
///
/// 消息ID
///
List InsertUserNoticeTaskModels(string Name, Guid DataId, Guid? OrgId, List UserIds, List UserNames,
DateTime startTime, int noticeType, string formCode, FMTASKTYPE TaskType, int? IFREQUENCYE = null, DateTime? DateTimeLastest = null, List listAllSet = null, Guid? AutoDoneID = null);
List InsertUserNoticeTaskModels(string Name, List ListDataId, Guid? OrgId, Guid UserId, string UserName,
DateTime startTime, int noticeType, string formCode, FMTASKTYPE TaskType, int? IFREQUENCYE = null, DateTime? DateTimeLastest = null, List listAllSet = null, Guid? AutoDoneID = null);
///
/// 获取 待办期限
///
/// 枚举待办类型
/// 必须要有值
/// 当前时间 默认当前时间
/// BSPLANCHECKFREQUENCYEnum 触发频率
/// 业务表单最大限制时间 很多可能没有
/// 待办限制时间配置信息外部调用不传
///
DateTime GetTaskEndTime(FMTASKTYPE TASK_TYPE, Guid OrgId, DateTime? dtNow, int? FREQUENCYE, DateTime? DateTimeLastest, List listAllSet = null);
}
}