代码提交测试
This commit is contained in:
parent
591be7e1d2
commit
5e11201784
@ -105,10 +105,16 @@ namespace APT.BaseData.Domain.Enums
|
||||
public enum NOTICETYPE
|
||||
{
|
||||
/// <summary>
|
||||
/// 会议
|
||||
/// 会议 行洛坑
|
||||
/// </summary>
|
||||
[Description("1747261")]
|
||||
Meeting = 5
|
||||
[Description("2054208")]
|
||||
Meeting = 5,
|
||||
|
||||
/// <summary>
|
||||
/// 会议 金鼎
|
||||
/// </summary>
|
||||
[Description("2163620")]
|
||||
MeetingJD = 50
|
||||
}
|
||||
|
||||
public enum FMDepartmentType
|
||||
|
||||
@ -52,7 +52,7 @@ namespace APT.BaseData.Domain.IServices.FM
|
||||
/// <param name="dicApproveDepartMentID">自定义审批流程人员部门信息</param>
|
||||
/// <param name="approveTaskName">审批流名称</param>
|
||||
/// <returns></returns>
|
||||
void InsertApprove(string serialCode, string fromCode, string param, Guid id, string approveCode, Guid? finishNoticeId, bool sendMessage, Action action, Guid? approveId = null, Guid? approveUserId = null, Dictionary<int, T_FM_USER> dicApproveUser = null, Dictionary<int, Guid> dicApproveDepartMentID = null, string NoticeCode = "", string taskSourceFormCode = "", Guid? operaterID = null, string approveTaskName = "", Enums.FMTASKTYPE? TASK_TYPE = null, int? FREQUENCYE = null, DateTime? DateTimeLastest = null, int? BSOperateEnum = null, Guid? DATA_ID_LOG = null, Guid? DATA_ID_SUB = null);
|
||||
void InsertApprove(string serialCode, string fromCode, string param, Guid id, string approveCode, Guid? finishNoticeId, bool sendMessage, Action action, Guid? approveId = null, Guid? approveUserId = null, Dictionary<int, T_FM_USER> dicApproveUser = null, Dictionary<int, Guid> dicApproveDepartMentID = null, string NoticeCode = "", string taskSourceFormCode = "", Guid? operaterID = null, string approveTaskName = "", Enums.FMTASKTYPE? TASK_TYPE = null, int? FREQUENCYE = null, DateTime? DateTimeLastest = null, int? BSOperateEnum = null, Guid? DATA_ID_LOG = null, Guid? DATA_ID_SUB = null, DateTime? dtTaskEnd = null, List<Guid> listDataIdSub = null);
|
||||
|
||||
/// <summary>
|
||||
/// 发布审批流
|
||||
|
||||
@ -16,6 +16,13 @@ namespace APT.BaseData.Domain.IServices.FM
|
||||
/// </summary>
|
||||
/// <param name="noticeType"></param>
|
||||
/// <param name="DATA_ID"></param>
|
||||
void SendMsg(Enums.NOTICETYPE? noticeType, Guid? DATA_ID, Guid? KEY = null, T_FM_SYNC_TASK task = null);
|
||||
void SendMsg(Enums.NOTICETYPE noticeType, Guid? DATA_ID, Guid? KEY = null, T_FM_SYNC_TASK task = null);
|
||||
|
||||
/// <summary>
|
||||
/// 获取会议模板ID
|
||||
/// </summary>
|
||||
/// <param name="ORG_ID"></param>
|
||||
/// <returns></returns>
|
||||
string GetTEMPLATE_ID(Guid ORG_ID);
|
||||
}
|
||||
}
|
||||
|
||||
@ -316,7 +316,7 @@ namespace APT.BaseData.Services.Services.FM
|
||||
/// <param name="operaterID"></param>
|
||||
/// <param name="approveTaskName">审批流名称</param>
|
||||
/// <returns></returns>
|
||||
public void InsertApprove(string serialCode, string fromCode, string param, Guid id, string approveCode, Guid? finishNoticeId, bool sendMessage, Action action, Guid? approveId = null, Guid? approveUserId = null, Dictionary<int, T_FM_USER> dicApproveUser = null, Dictionary<int, Guid> dicApproveDepartMentID = null, string NoticeCode = "", string taskSourceFormCode = "", Guid? operaterID = null, string approveTaskName = "", FMTASKTYPE? TASK_TYPE = null, int? FREQUENCYE = null, DateTime? DateTimeLastest = null, int? iBSOperateEnum = null, Guid? DATA_ID_LOG = null, Guid? DATA_ID_SUB = null)
|
||||
public void InsertApprove(string serialCode, string fromCode, string param, Guid id, string approveCode, Guid? finishNoticeId, bool sendMessage, Action action, Guid? approveId = null, Guid? approveUserId = null, Dictionary<int, T_FM_USER> dicApproveUser = null, Dictionary<int, Guid> dicApproveDepartMentID = null, string NoticeCode = "", string taskSourceFormCode = "", Guid? operaterID = null, string approveTaskName = "", FMTASKTYPE? TASK_TYPE = null, int? FREQUENCYE = null, DateTime? DateTimeLastest = null, int? iBSOperateEnum = null, Guid? DATA_ID_LOG = null, Guid? DATA_ID_SUB = null, DateTime? dtTaskEnd = null, List<Guid> listDataIdSub = null)
|
||||
{
|
||||
T_PF_APPROVE approve = null;
|
||||
//上个消息
|
||||
@ -563,10 +563,18 @@ namespace APT.BaseData.Services.Services.FM
|
||||
e.DEFAULT_APPROVE_USER_ID = null;
|
||||
});
|
||||
}
|
||||
|
||||
if (iBSOperateEnum == 200 || iBSOperateEnum == 20 || iBSOperateEnum == 60)
|
||||
if (finishNotice == null && dtTaskEnd != null)
|
||||
{
|
||||
listBSLog = GetOperateLogInfo(DATA_ID_LOG, approve.ORG_ID, appdetails, iBSOperateEnum, finishNotice, DATA_ID_SUB);//验收人确认整改
|
||||
finishNotice = new T_FM_NOTIFICATION_TASK();
|
||||
finishNotice.ID = Guid.Empty;
|
||||
finishNotice.TASK_ENDDT = dtTaskEnd.Value;
|
||||
}
|
||||
if (iBSOperateEnum == 200 || iBSOperateEnum == 20 || iBSOperateEnum == 60 || iBSOperateEnum == 165)
|
||||
{
|
||||
if (listDataIdSub != null && listDataIdSub.Any())
|
||||
listBSLog = GetOperateLogInfo(DATA_ID_LOG, approve.ORG_ID, appdetails, iBSOperateEnum, finishNotice, listDataIdSub);
|
||||
else
|
||||
listBSLog = GetOperateLogInfo(DATA_ID_LOG, approve.ORG_ID, appdetails, iBSOperateEnum, finishNotice, DATA_ID_SUB);//验收人确认整改
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -582,7 +590,7 @@ namespace APT.BaseData.Services.Services.FM
|
||||
AddEntityNoCommit(approve);
|
||||
if (appdetails != null && appdetails.Any())
|
||||
BantchAddEntityNoCommit(appdetails);
|
||||
if (finishNotice != null)
|
||||
if (finishNotice != null && finishNotice.ID != Guid.Empty)
|
||||
UpdateEntityNoCommit(finishNotice, "NOTICE_STATUS", "TASK_DT", "MODIFIER_ID");
|
||||
if (notice != null)
|
||||
AddEntityNoCommit(notice);
|
||||
@ -2091,26 +2099,40 @@ namespace APT.BaseData.Services.Services.FM
|
||||
if (finishNotice != null)
|
||||
taskEnd = finishNotice.TASK_ENDDT;
|
||||
listOperateLog = new List<T_BS_OPERATE_LOG>();
|
||||
|
||||
//OPERATEPOINT_Enums.CheckResultAudit => //(int)OPERATEPOINT_Enums.RiskGet
|
||||
if (OPERATEPOINT == OPERATEPOINT_Enums.RiskInfoCompleteSD)
|
||||
if (OPERATEPOINT == OPERATEPOINT_Enums.RiskDelayApply)
|
||||
{
|
||||
//手动隐患上报
|
||||
var modelLog = GetUpdateDeal(OPERATEPOINT, dataId.Value, LoginID, ListDATA_ID_SUB[0], taskEnd);
|
||||
if (modelLog != null)
|
||||
listOperateLog.Add(modelLog);
|
||||
//添加当前操作者的 处理信息
|
||||
//给所有人 添加 带操作记录
|
||||
foreach (var item in ListDATA_ID_SUB)
|
||||
{
|
||||
listOperateLog.Add(AddModel(OPERATEPOINT_Enums.RiskDelayApply, dataId.Value, LoginID, APT.Infrastructure.Api.AppContext.CurrentSession.UserName, ORG_ID, 0, true, item));
|
||||
for (int i = 0; i < ListUserID.Count; i++)
|
||||
listOperateLog.Add(AddModel(OPERATEPOINT_Enums.RiskDelayApplyAudit, dataId.Value, ListUserID[i], ListUserName[i], ORG_ID, i, false, item));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//看看 是不是可以改到上面方法
|
||||
var modelLog = GetUpdateDeal(OPERATEPOINT, dataId.Value, LoginID, null, taskEnd);
|
||||
if (modelLog != null)
|
||||
listOperateLog.Add(modelLog);
|
||||
}
|
||||
foreach (var item in ListDATA_ID_SUB)
|
||||
{
|
||||
for (int i = 0; i < ListUserID.Count; i++)
|
||||
listOperateLog.Add(AddModel(OPERATEPOINT_Enums.RiskSendAudit, dataId.Value, ListUserID[i], ListUserName[i], ORG_ID, i, false, item));
|
||||
//OPERATEPOINT_Enums.CheckResultAudit => //(int)OPERATEPOINT_Enums.RiskGet
|
||||
if (OPERATEPOINT == OPERATEPOINT_Enums.RiskInfoCompleteSD)
|
||||
{
|
||||
//手动隐患上报
|
||||
var modelLog = GetUpdateDeal(OPERATEPOINT, dataId.Value, LoginID, ListDATA_ID_SUB[0], taskEnd);
|
||||
if (modelLog != null)
|
||||
listOperateLog.Add(modelLog);
|
||||
}
|
||||
else
|
||||
{
|
||||
//看看 是不是可以改到上面方法
|
||||
var modelLog = GetUpdateDeal(OPERATEPOINT, dataId.Value, LoginID, null, taskEnd);
|
||||
if (modelLog != null)
|
||||
listOperateLog.Add(modelLog);
|
||||
}
|
||||
foreach (var item in ListDATA_ID_SUB)
|
||||
{
|
||||
for (int i = 0; i < ListUserID.Count; i++)
|
||||
listOperateLog.Add(AddModel(OPERATEPOINT_Enums.RiskSendAudit, dataId.Value, ListUserID[i], ListUserName[i], ORG_ID, i, false, item));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
@ -2292,6 +2314,7 @@ namespace APT.BaseData.Services.Services.FM
|
||||
if (isAddLog || (APT.Infrastructure.Api.AppContext.CurrentSession.UserID.HasValue && APT.Infrastructure.Api.AppContext.CurrentSession.UserID.Value == UserID))
|
||||
{
|
||||
ModelAdd.OPERTETIME = DateTime.Now;//默认通过
|
||||
ModelAdd.ISINTTIME = true;
|
||||
}
|
||||
return ModelAdd;
|
||||
}
|
||||
|
||||
@ -15,6 +15,7 @@ using APT.MS.Domain.Entities.PF;
|
||||
using APT.BaseData.Domain.Dtos;
|
||||
using Castle.Core.Internal;
|
||||
using APT.MS.Domain.Entities.SC;
|
||||
using TencentCloud.Sms.V20210111.Models;
|
||||
|
||||
namespace APT.BaseData.Services.Services.FM
|
||||
{
|
||||
@ -30,7 +31,7 @@ namespace APT.BaseData.Services.Services.FM
|
||||
/// </summary>
|
||||
/// <param name="noticeType">现在只支持会议</param>
|
||||
/// <param name="DATA_ID"></param>
|
||||
public void SendMsg(NOTICETYPE? noticeType, Guid? DATA_ID, Guid? KEY = null, T_FM_SYNC_TASK task = null)
|
||||
public void SendMsg(NOTICETYPE noticeType, Guid? DATA_ID, Guid? KEY = null, T_FM_SYNC_TASK task = null)
|
||||
{
|
||||
var mtConfig = GetEntity<T_SC_MT_CONFIG>(e => e.IS_SENDMSG);
|
||||
if (mtConfig == null)
|
||||
@ -39,10 +40,11 @@ namespace APT.BaseData.Services.Services.FM
|
||||
}
|
||||
|
||||
Expression<Func<T_FM_NOTICE, bool>> expression = e => e.NOTICE_STATUS == FMNoticeStatus.等待发送;
|
||||
if (noticeType != null && noticeType.HasValue)
|
||||
{
|
||||
expression = expression.And(e => e.NOTICETYPE == noticeType.Value);
|
||||
}
|
||||
//if (noticeType != null && noticeType.HasValue)
|
||||
//{
|
||||
// expression = expression.And(e => e.NOTICETYPE == noticeType.Value);
|
||||
//}
|
||||
expression = expression.And(e => e.NOTICETYPE == noticeType);
|
||||
if (DATA_ID != null && DATA_ID.HasValue)
|
||||
{
|
||||
expression = expression.And(e => e.DATA_ID == DATA_ID.Value);
|
||||
@ -145,18 +147,46 @@ namespace APT.BaseData.Services.Services.FM
|
||||
{
|
||||
var listTemp = listNoticeSend.Where(e => e.KEY == item && e.NOTICE_STATUS == FMNoticeStatus.等待发送);
|
||||
phoneNumbers = listTemp.Select(e => e.TEL).ToArray();
|
||||
//2个参数
|
||||
foreach (var itemS in listTemp)
|
||||
switch (noticeType)
|
||||
{
|
||||
if (templates == null)
|
||||
{
|
||||
templates = new List<string>();
|
||||
templates.Add(itemS.TITLE);
|
||||
templates.Add(itemS.ENDDT.Value.ToString("yyyy-MM-dd HH:mm"));
|
||||
TEMPLATE_ID = itemS.TEMPLATE_ID;
|
||||
case NOTICETYPE.Meeting:
|
||||
//2个参数
|
||||
foreach (var itemS in listTemp)
|
||||
{
|
||||
if (templates == null)
|
||||
{
|
||||
templates = new List<string>();
|
||||
TEMPLATE_ID = itemS.TEMPLATE_ID;
|
||||
templates.Add(itemS.TITLE);
|
||||
templates.Add(itemS.ENDDT.Value.ToString("yyyy-MM-dd HH:mm"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case NOTICETYPE.MeetingJD:
|
||||
//2个参数
|
||||
foreach (var itemS in listTemp)
|
||||
{
|
||||
if (templates == null)
|
||||
{
|
||||
templates = new List<string>();
|
||||
|
||||
TEMPLATE_ID = itemS.TEMPLATE_ID;
|
||||
templates.AddRange(GetSplit(itemS.TITLE.Split('[')[0]));
|
||||
templates.Add(itemS.ENDDT.Value.Year.ToString());
|
||||
templates.Add(itemS.ENDDT.Value.Month.ToString("00"));
|
||||
templates.Add(itemS.ENDDT.Value.Day.ToString("00"));
|
||||
templates.Add(itemS.ENDDT.Value.Hour.ToString("00"));
|
||||
templates.Add(itemS.ENDDT.Value.Minute.ToString("00"));
|
||||
templates.Add(itemS.ENDDT.Value.Second.ToString("00"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(TEMPLATE_ID) || phoneNumbers.Length < 1 || !templates.Any())
|
||||
{
|
||||
continue;
|
||||
@ -164,30 +194,41 @@ namespace APT.BaseData.Services.Services.FM
|
||||
|
||||
try
|
||||
{
|
||||
var result = tencentSendSMS.sendSMS(TEMPLATE_ID, phoneNumbers, templates.ToArray());
|
||||
foreach (var itemResult in result.SendStatusSet)
|
||||
SendSmsResponse result = null;
|
||||
if (noticeType == NOTICETYPE.Meeting)
|
||||
{
|
||||
foreach (var itemRN in listNoticeSend)
|
||||
result = tencentSendSMS.sendSMS(TEMPLATE_ID, phoneNumbers, templates.ToArray());
|
||||
}
|
||||
else if (noticeType == NOTICETYPE.MeetingJD)
|
||||
{
|
||||
//result = tencentSendSMS.sendSMSDCJD(TEMPLATE_ID, phoneNumbers, templates.ToArray());
|
||||
}
|
||||
if (result != null)
|
||||
{
|
||||
foreach (var itemResult in result.SendStatusSet)
|
||||
{
|
||||
if (itemRN.KEY == item && itemRN.NOTICE_STATUS == FMNoticeStatus.等待发送 && itemResult.PhoneNumber.EndsWith(itemRN.TEL))
|
||||
foreach (var itemRN in listNoticeSend)
|
||||
{
|
||||
itemRN.TRYCOUNT++;
|
||||
if (itemResult.Code == "Ok")
|
||||
if (itemRN.KEY == item && itemRN.NOTICE_STATUS == FMNoticeStatus.等待发送 && itemResult.PhoneNumber.EndsWith(itemRN.TEL))
|
||||
{
|
||||
isSend = true;
|
||||
itemRN.NOTICE_STATUS = FMNoticeStatus.发送成功;
|
||||
}
|
||||
else if (itemRN.TRYCOUNT == 3)
|
||||
{
|
||||
//3次发送失败 记录信息
|
||||
itemRN.NOTICE_STATUS = FMNoticeStatus.发送失败;
|
||||
itemRN.ERRORMSG = itemResult.Message;
|
||||
if (itemRN.ERRORMSG != null && itemRN.ERRORMSG.Length > 100)
|
||||
itemRN.TRYCOUNT++;
|
||||
if (itemResult.Code == "Ok")
|
||||
{
|
||||
itemRN.ERRORMSG = itemRN.ERRORMSG.Substring(0, 95);
|
||||
isSend = true;
|
||||
itemRN.NOTICE_STATUS = FMNoticeStatus.发送成功;
|
||||
}
|
||||
else if (itemRN.TRYCOUNT == 3)
|
||||
{
|
||||
//3次发送失败 记录信息
|
||||
itemRN.NOTICE_STATUS = FMNoticeStatus.发送失败;
|
||||
itemRN.ERRORMSG = itemResult.Message;
|
||||
if (itemRN.ERRORMSG != null && itemRN.ERRORMSG.Length > 100)
|
||||
{
|
||||
itemRN.ERRORMSG = itemRN.ERRORMSG.Substring(0, 95);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -231,5 +272,86 @@ namespace APT.BaseData.Services.Services.FM
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取会议模板ID
|
||||
/// </summary>
|
||||
/// <param name="ORG_ID"></param>
|
||||
/// <returns></returns>
|
||||
public string GetTEMPLATE_ID(Guid ORG_ID)
|
||||
{
|
||||
if (ORG_ID == new Guid("B043B28B-BBC3-C452-6052-4FBA1457ABFA"))
|
||||
{
|
||||
return NOTICETYPE.Meeting.GetDescription();
|
||||
}
|
||||
else if (ORG_ID == new Guid("8B3C41AA-51B1-7CE9-1879-248A038C1B5C"))
|
||||
{
|
||||
return NOTICETYPE.MeetingJD.GetDescription();
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 文本分块(发送信息时用)
|
||||
/// </summary>
|
||||
/// <param name="title"></param>
|
||||
/// <param name="piece"></param>
|
||||
/// <param name="splitMax"></param>
|
||||
/// <returns></returns>
|
||||
private List<string> GetSplit(string title, int piece = 3, int splitMax = 6)
|
||||
{
|
||||
int titleLength = title.Length;
|
||||
List<string> listResult = new List<string>();
|
||||
if (titleLength == piece)
|
||||
{
|
||||
//每个字一份
|
||||
for (int i = 0; i < piece; i++)
|
||||
{
|
||||
listResult.Add(title.Substring(i, 1));
|
||||
}
|
||||
|
||||
}
|
||||
else if (titleLength >= splitMax * piece)
|
||||
{
|
||||
//按最长给 多的也不给
|
||||
for (int i = 0; i < piece; i++)
|
||||
{
|
||||
listResult.Add(title.Substring(i * splitMax, splitMax));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
int remain = titleLength % piece;
|
||||
int Per = titleLength / piece;
|
||||
|
||||
//分割长度
|
||||
List<int> listLength = new List<int>();
|
||||
if (remain == 0)
|
||||
{
|
||||
for (int i = 0; i < piece; i++)
|
||||
listLength.Add(Per);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < piece; i++)
|
||||
{
|
||||
remain--;
|
||||
if (remain < 0)
|
||||
listLength.Add(Per);
|
||||
else
|
||||
listLength.Add(Per + 1);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < piece; i++)
|
||||
{
|
||||
listResult.Add(title.Substring(0, listLength[i]));
|
||||
title = title.Substring(listLength[i]);
|
||||
}
|
||||
}
|
||||
return listResult;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -5658,6 +5658,31 @@ namespace APT.BaseData.Services.DomainServices
|
||||
|
||||
if (!isLast && isApprovel)
|
||||
{
|
||||
IEnumerable<T_BS_OPERATE_LOG> listLog = null;
|
||||
|
||||
switch (CALLBACK_INTERFACE)
|
||||
{
|
||||
case "BS/BSRiskSubmitDelayApply/DealEndNew":
|
||||
var listApplyDetail = GetEntities<T_BS_RISK_SUBMIT_DELAY_APPLY_DETAIL>(e => e.RISK_SUBMIT_DELAY_APPLY_ID == modelApp.DATA_ID);
|
||||
if (listApplyDetail != null && listApplyDetail.Any())
|
||||
{
|
||||
var listContentID = listApplyDetail.Select(e => e.RISK_SUBMIT_CONTENT_ID).ToList();
|
||||
listLog = GetUpdateDeal(OPERATEPOINT_Enums.RiskDelayApplyAudit, Guid.Empty, APT.Infrastructure.Api.AppContext.CurrentSession.UserID.Value, listContentID, taskFinish.TASK_ENDDT);
|
||||
}
|
||||
break;
|
||||
case "BS/BSRiskSubmit/NoticeNew":
|
||||
var listContents = GetEntities<T_BS_RISK_SUBMIT_CONTENT>(e => e.RISK_SUBMIT_NOTICE_ID == modelApp.DATA_ID);
|
||||
if (listContents != null && listContents.Any())
|
||||
{
|
||||
var listContentID = listContents.Select(e => e.ID);
|
||||
var RISK_SUBMIT_ID = listContents.ToList()[0].RISK_SUBMIT_ID;
|
||||
listLog = GetUpdateDeal(OPERATEPOINT_Enums.RiskSendAudit, RISK_SUBMIT_ID.Value, APT.Infrastructure.Api.AppContext.CurrentSession.UserID.Value, listContentID, taskFinish.TASK_ENDDT);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
//如果感觉taskID会乱 taskFinish 做case 判断
|
||||
this.UnifiedCommit(() =>
|
||||
{
|
||||
@ -8070,6 +8095,7 @@ namespace APT.BaseData.Services.DomainServices
|
||||
List<Guid> listCheckUserID = new List<Guid>();
|
||||
List<T_FM_NOTIFICATION_TASK> listTaskBS044 = new List<T_FM_NOTIFICATION_TASK>();
|
||||
|
||||
List<T_BS_OPERATE_LOG> listLog = new List<T_BS_OPERATE_LOG>();
|
||||
Dictionary<Guid, DateTime> dicContentIDDtEnd = new Dictionary<Guid, DateTime>();
|
||||
foreach (var item in listContent)
|
||||
{
|
||||
@ -8111,6 +8137,7 @@ namespace APT.BaseData.Services.DomainServices
|
||||
listNotice.Add(notice);
|
||||
}
|
||||
dicContentIDDtEnd.Add(item.RISK_SUBMIT_CONTENT_ID, item.LastDateApply.Value);
|
||||
listLog.Add(AddModel(OPERATEPOINT_Enums.RiskDelayApplyCheck, entity.RISK_SUBMIT_ID, subContent.CHECK_USER_ID.Value, subContent.Nav_UserCheck.NAME, subContent.ORG_ID, 0, false, subContent.ID));//每个明细都要添加操作记录(最终查看是整改单)
|
||||
}
|
||||
|
||||
#region 隐患整改单待办结束时间修改
|
||||
@ -8140,6 +8167,13 @@ namespace APT.BaseData.Services.DomainServices
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
if (listContent != null && listContent.Any())
|
||||
{
|
||||
var listContentID = listContent.Select(e => e.RISK_SUBMIT_CONTENT_ID).ToList();
|
||||
listLog.AddRange(GetUpdateDeal(OPERATEPOINT_Enums.RiskDelayApplyAudit, entity.RISK_SUBMIT_ID, APT.Infrastructure.Api.AppContext.CurrentSession.UserID.Value, listContentID, taskFinish.TASK_ENDDT));
|
||||
}
|
||||
|
||||
//修改 model
|
||||
UnifiedCommit(() =>
|
||||
{
|
||||
@ -8166,6 +8200,8 @@ namespace APT.BaseData.Services.DomainServices
|
||||
}
|
||||
if (listTaskBS044 != null && listTaskBS044.Any())//隐患整改单修改 待办结束时间
|
||||
BantchUpdateEntityNoCommit(listTaskBS044);
|
||||
if (listLog != null && listLog.Any())//下个审批节点
|
||||
BantchSaveEntityNoCommit(listLog);
|
||||
});
|
||||
}
|
||||
return true;
|
||||
@ -8505,6 +8541,7 @@ namespace APT.BaseData.Services.DomainServices
|
||||
if (isAddLog || (APT.Infrastructure.Api.AppContext.CurrentSession.UserID.HasValue && APT.Infrastructure.Api.AppContext.CurrentSession.UserID.Value == UserID))
|
||||
{
|
||||
ModelAdd.OPERTETIME = DateTime.Now;//默认通过
|
||||
ModelAdd.ISINTTIME = true;
|
||||
}
|
||||
return ModelAdd;
|
||||
}
|
||||
@ -8536,6 +8573,31 @@ namespace APT.BaseData.Services.DomainServices
|
||||
}
|
||||
return model;
|
||||
}
|
||||
|
||||
private IEnumerable<T_BS_OPERATE_LOG> GetUpdateDeal(OPERATEPOINT_Enums OPERATEPOINT, Guid DATA_ID, Guid UserID, IEnumerable<Guid> listDataIdSub, DateTime TASK_ENDDT)
|
||||
{
|
||||
if (UserID == Guid.Empty)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
Expression<Func<T_BS_OPERATE_LOG, bool>> expression = e => e.OPERATEPOINT == OPERATEPOINT && e.USER_ID == UserID;
|
||||
if (DATA_ID != Guid.Empty && listDataIdSub != null && listDataIdSub.Any())
|
||||
expression = expression.And(e => e.DATA_ID == DATA_ID);
|
||||
|
||||
if (listDataIdSub != null && listDataIdSub.Any())
|
||||
expression = expression.And(e => e.DATA_ID_SUB.HasValue && listDataIdSub.Contains(e.DATA_ID_SUB.Value));
|
||||
var listModel = GetEntities(expression);
|
||||
if (listModel != null && listModel.Any())
|
||||
{
|
||||
foreach (var item in listModel)
|
||||
{
|
||||
item.OPERTETIME = DateTime.Now;
|
||||
if (TASK_ENDDT != null)
|
||||
item.ISINTTIME = (item.OPERTETIME > TASK_ENDDT ? false : true);
|
||||
}
|
||||
}
|
||||
return listModel;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@ -1508,7 +1508,23 @@ namespace APT.MS.Domain.Enums
|
||||
[Description("整改落实人确认")]
|
||||
RiskNoticeActureCheck = 160,
|
||||
|
||||
//延期申请
|
||||
/// <summary>
|
||||
/// 延期申请 165
|
||||
/// </summary>
|
||||
[Description("延期申请")]
|
||||
RiskDelayApply = 165,
|
||||
|
||||
/// <summary>
|
||||
/// 延期申请审批 170
|
||||
/// </summary>
|
||||
[Description("延期申请审批")]
|
||||
RiskDelayApplyAudit = 170,
|
||||
|
||||
/// <summary>
|
||||
/// 验收人确认 175
|
||||
/// </summary>
|
||||
[Description("验收人确认")]
|
||||
RiskDelayApplyCheck = 175,
|
||||
|
||||
/// <summary>
|
||||
/// 整改落实人确认 180
|
||||
|
||||
@ -180,6 +180,11 @@ namespace APT.BaseData.Services.DomainServices
|
||||
for (int i = 0; i < ListUserID.Count; i++)
|
||||
listResult.Add(AddModel(OPERATEPOINT_Enums.RiskDeal, DATA_ID, ListUserID[i], ListUserName[i], ORG_ID, i, false, DATA_ID_SUB));
|
||||
break;
|
||||
case OPERATEPOINT_Enums.RiskDelayApplyCheck:
|
||||
modelLogUpdate = GetUpdateDeal(OPERATEPOINT, DATA_ID, UserIDLogin, DATA_ID_SUB, TASK_ENDDT);//处理自己的
|
||||
if (modelLogUpdate != null)
|
||||
listResult.Add(modelLogUpdate);
|
||||
break;
|
||||
case OPERATEPOINT_Enums.RiskDeal:
|
||||
modelLogUpdate = GetUpdateDeal(OPERATEPOINT, DATA_ID, UserIDLogin, DATA_ID_SUB, TASK_ENDDT);//处理自己的
|
||||
if (modelLogUpdate != null)
|
||||
@ -267,6 +272,7 @@ namespace APT.BaseData.Services.DomainServices
|
||||
if (isAddLog || (APT.Infrastructure.Api.AppContext.CurrentSession.UserID.HasValue && APT.Infrastructure.Api.AppContext.CurrentSession.UserID.Value == UserID))
|
||||
{
|
||||
ModelAdd.OPERTETIME = DateTime.Now;//默认通过
|
||||
ModelAdd.ISINTTIME = true;
|
||||
}
|
||||
return ModelAdd;
|
||||
}
|
||||
@ -285,7 +291,10 @@ namespace APT.BaseData.Services.DomainServices
|
||||
{
|
||||
return null;
|
||||
}
|
||||
Expression<Func<T_BS_OPERATE_LOG, bool>> expression = e => e.DATA_ID == DATA_ID && e.OPERATEPOINT == OPERATEPOINT && e.USER_ID == UserID;
|
||||
Expression<Func<T_BS_OPERATE_LOG, bool>> expression = e => e.OPERATEPOINT == OPERATEPOINT && e.USER_ID == UserID;
|
||||
if (DATA_ID != Guid.Empty)
|
||||
expression = expression.And(e => e.DATA_ID == DATA_ID);
|
||||
|
||||
if (DATA_ID_SUB.HasValue)
|
||||
expression = expression.And(e => e.DATA_ID_SUB.HasValue && e.DATA_ID_SUB == DATA_ID_SUB);
|
||||
var model = GetEntity(expression);
|
||||
|
||||
@ -26,13 +26,15 @@ namespace APT.BS.WebApi.Controllers.Api
|
||||
IPFCodeRuleService CodeRuleService { get; set; }
|
||||
IPFApproveCallBackService ApproveCallBackService { get; set; }
|
||||
IFMDepartmentService DepartmentService { get; set; }
|
||||
public BSRiskSubmitDelayApplyController(IFMNotificationTaskService notificationTaskService, IFMFlowPermitService mFlowPermitService, IPFCodeRuleService codeRuleService, IPFApproveCallBackService approveCallBackService, IFMDepartmentService departmentService)
|
||||
IBSOperateLogService OperateLogService { get; set; }
|
||||
public BSRiskSubmitDelayApplyController(IFMNotificationTaskService notificationTaskService, IFMFlowPermitService mFlowPermitService, IPFCodeRuleService codeRuleService, IPFApproveCallBackService approveCallBackService, IFMDepartmentService departmentService, IBSOperateLogService operateLogService)
|
||||
{
|
||||
NotificationTaskService = notificationTaskService;
|
||||
MFlowPermitService = mFlowPermitService;
|
||||
CodeRuleService = codeRuleService;
|
||||
ApproveCallBackService = approveCallBackService;
|
||||
DepartmentService = departmentService;
|
||||
OperateLogService = operateLogService;
|
||||
}
|
||||
|
||||
|
||||
@ -137,7 +139,6 @@ namespace APT.BS.WebApi.Controllers.Api
|
||||
Guid NoticePersonID = new Guid(filter.Keyword);
|
||||
DateTime dtNowDate = DateTime.Now.Date;
|
||||
Guid LoginID = APT.Infrastructure.Api.AppContext.CurrentSession.UserID.Value;
|
||||
|
||||
var info = GetEntities<T_BS_RISK_SUBMIT_CONTENT>(e => e.RISK_SUBMIT_NOTICE_PERSON_ID == NoticePersonID && e.ACTUAL_DEAL_USER_ID.HasValue && e.ACTUAL_DEAL_USER_ID.Value == LoginID && !e.IS_DELETED && e.LastDateUser.HasValue && e.LastDateUser.Value >= dtNowDate && (e.RiskContentState == (int)RiskContentState.ActualDealCheck || e.RiskContentState == (int)RiskContentState.OKNotBack), null, null).ToList();
|
||||
var listContID = info.Select(e => e.ID);
|
||||
|
||||
@ -395,14 +396,15 @@ namespace APT.BS.WebApi.Controllers.Api
|
||||
|
||||
entity.APPROVE_ID = Guid.NewGuid();
|
||||
|
||||
var listDataIdSub = listContent.Select(e => e.ID).ToList();
|
||||
MFlowPermitService.InsertApprove(serialCode, "BS046", parms, entity.ID, "BS046_SHOWPRINT", entity.TaskID, true, () =>
|
||||
{
|
||||
if (entity != null)
|
||||
UpdateEntityNoCommit(entity); //保存主表 NoCommit
|
||||
//UpdateEntityNoCommit(content); //延期申请提交
|
||||
BantchSaveEntityNoCommit(listApplyDetail);//延期申请明细
|
||||
BantchSaveEntityNoCommit(listContent);//延期申请提交
|
||||
}, entity.APPROVE_ID, null, dicApproveUser, dicApproveDepartMent, null, null, null, null, FMTASKTYPE.BS_RiskUp_DealApply);
|
||||
{
|
||||
if (entity != null)
|
||||
UpdateEntityNoCommit(entity); //保存主表 NoCommit
|
||||
//UpdateEntityNoCommit(content); //延期申请提交
|
||||
BantchSaveEntityNoCommit(listApplyDetail);//延期申请明细
|
||||
BantchSaveEntityNoCommit(listContent);//延期申请提交
|
||||
}, entity.APPROVE_ID, null, dicApproveUser, dicApproveDepartMent, null, null, null, null, FMTASKTYPE.BS_RiskUp_DealApply, null, null, (int)OPERATEPOINT_Enums.RiskDelayApply, entity.RISK_SUBMIT_ID, null, null, listDataIdSub);
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -556,10 +558,6 @@ namespace APT.BS.WebApi.Controllers.Api
|
||||
Guid LoginID = APT.Infrastructure.Api.AppContext.CurrentSession.UserID.Value;
|
||||
//var details = GetEntities<T_BS_RISK_SUBMIT_DELAY_APPLY_DETAIL>(e => e.RISK_SUBMIT_DELAY_APPLY_ID == DataID && !e.IS_DELETED && e.CHCEKUSERID == LoginID, null, null).ToList();
|
||||
var details = GetEntities<T_BS_RISK_SUBMIT_DELAY_APPLY_DETAIL>(e => listDetailGuid.Contains(e.ID) && e.CHCEKTIME == null, null, null).ToList();
|
||||
for (int i = 0; i < details.Count; i++)
|
||||
{
|
||||
details[i].CHCEKTIME = DateTime.Now; //设置审批时间
|
||||
}
|
||||
|
||||
T_FM_NOTIFICATION_TASK task = this.GetEntity<T_FM_NOTIFICATION_TASK>(TaskID);
|
||||
task.TASK_DT = DateTime.Now;
|
||||
@ -567,12 +565,20 @@ namespace APT.BS.WebApi.Controllers.Api
|
||||
task.NOTICE_STATUS = FMNoticeStatusEnum.正常已办.GetInt();
|
||||
else
|
||||
task.NOTICE_STATUS = FMNoticeStatusEnum.超期办理.GetInt();
|
||||
List<T_BS_OPERATE_LOG> listOperateLog = new List<T_BS_OPERATE_LOG>();
|
||||
for (int i = 0; i < details.Count; i++)
|
||||
{
|
||||
details[i].CHCEKTIME = DateTime.Now; //设置审批时间
|
||||
listOperateLog.AddRange(OperateLogService.GetListOperateLog(OPERATEPOINT_Enums.RiskDelayApplyCheck, Guid.Empty, LoginID, null, null, null, filter.OrgId, details[i].RISK_SUBMIT_CONTENT_ID, null, false, task.TASK_ENDDT));//修改操作日志
|
||||
}
|
||||
|
||||
this.UnifiedCommit(() =>
|
||||
{
|
||||
BantchUpdateEntityNoCommit(details);
|
||||
if (task != null)//代办消息 清除
|
||||
UpdateEntityNoCommit(task, "NOTICE_STATUS", "TASK_DT", "MODIFIER_ID");
|
||||
if (listOperateLog != null && listOperateLog.Any())
|
||||
BantchSaveEntityNoCommit(listOperateLog);
|
||||
|
||||
});
|
||||
return true;
|
||||
|
||||
@ -121,7 +121,15 @@ namespace APT.BS.WebApi.Controllers.Api
|
||||
}
|
||||
filter.Include = listInclude;
|
||||
|
||||
var safecheck = GetEntity<T_BS_SAFE_CHECK>(null, filter);
|
||||
T_BS_SAFE_CHECK safecheck = new T_BS_SAFE_CHECK();
|
||||
try
|
||||
{
|
||||
safecheck = GetEntity<T_BS_SAFE_CHECK>(null, filter);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return safecheck;
|
||||
}
|
||||
|
||||
#region 主体的很多属性只需要显示名称 例:区域 项目等
|
||||
|
||||
@ -2063,14 +2071,15 @@ namespace APT.BS.WebApi.Controllers.Api
|
||||
appOperaterID = userOper.ID;
|
||||
}
|
||||
}
|
||||
DateTime? dtTaskEnd = null;
|
||||
T_FM_NOTIFICATION_TASK task = null;
|
||||
if (entity.TaskID != Guid.Empty)
|
||||
{
|
||||
task = NotificationTaskService.GetEntityTask(entity.TaskID, "BS032_SHOWPRINT");
|
||||
dtTaskEnd = task.TASK_ENDDT;
|
||||
if (!task.SOURCE_DATA_ID.HasValue)
|
||||
task.SOURCE_DATA_ID = entity.ID;
|
||||
}
|
||||
|
||||
MFlowPermitService.InsertApprove(serialCode, "BS032", param, entity.ID, "BS032_SHOWPRINT", null, true, () =>
|
||||
{
|
||||
if (entity != null)
|
||||
@ -2101,7 +2110,7 @@ namespace APT.BS.WebApi.Controllers.Api
|
||||
BantchDeleteEntityNoCommit<T_BS_SAFE_CHECK_PROJECT_CATEGORY>(listDelCategoryID);
|
||||
if (listDelUserIDs != null)
|
||||
BantchDeleteEntityNoCommit<T_BS_SAFE_CHECK_DETAIL_USER>(listDelUserIDs);
|
||||
}, entity.APPROVE_ID, null, null, null, null, "BS032_SHOWPRINT", appOperaterID, approveTaskName, FMTASKTYPE.BS_SafeCheck_Make_Audit, null, entity.CHECKTIME, (int)OPERATEPOINT_Enums.CheckForm, entity.ID);//, entity.LIMITDATETIME
|
||||
}, entity.APPROVE_ID, null, null, null, null, "BS032_SHOWPRINT", appOperaterID, approveTaskName, FMTASKTYPE.BS_SafeCheck_Make_Audit, null, entity.CHECKTIME, (int)OPERATEPOINT_Enums.CheckForm, entity.ID, null, dtTaskEnd);//, entity.LIMITDATETIME
|
||||
|
||||
#endregion
|
||||
}
|
||||
@ -3692,61 +3701,61 @@ namespace APT.BS.WebApi.Controllers.Api
|
||||
//question.CREATER_ID
|
||||
//question.MODIFIER_ID
|
||||
|
||||
T_BS_CHECK_QUESTION questionQT = new T_BS_CHECK_QUESTION();
|
||||
questionQT.ID = new Guid("77777777-7777-7777-7777-777777777777");
|
||||
questionQT.DESCREPTION = "其他";
|
||||
//question.DEMAND
|
||||
questionQT.NUM = 0;
|
||||
//question.ENABLE_STATUS
|
||||
questionQT.IS_DELETED = false;
|
||||
questionQT.ORG_ID = result.ORG_ID;
|
||||
//question.ENTITY_ORG_TPYE
|
||||
//question.FORM_ID
|
||||
//question.FLOW_STATUS
|
||||
//question.FLOW_SEND_STATUS
|
||||
//question.FLOW_ID
|
||||
//question.CREATE_TIME
|
||||
//question.MODIFY_TIME
|
||||
//question.CREATER_ID
|
||||
//question.MODIFIER_ID
|
||||
T_BS_CHECK_QUESTION questionQT = new T_BS_CHECK_QUESTION();
|
||||
questionQT.ID = new Guid("77777777-7777-7777-7777-777777777777");
|
||||
questionQT.DESCREPTION = "其他";
|
||||
//question.DEMAND
|
||||
questionQT.NUM = 0;
|
||||
//question.ENABLE_STATUS
|
||||
questionQT.IS_DELETED = false;
|
||||
questionQT.ORG_ID = result.ORG_ID;
|
||||
//question.ENTITY_ORG_TPYE
|
||||
//question.FORM_ID
|
||||
//question.FLOW_STATUS
|
||||
//question.FLOW_SEND_STATUS
|
||||
//question.FLOW_ID
|
||||
//question.CREATE_TIME
|
||||
//question.MODIFY_TIME
|
||||
//question.CREATER_ID
|
||||
//question.MODIFIER_ID
|
||||
|
||||
Infrastructure.Core.IUnitOfWork UnitOfWork = MFlowPermitService.UnitWork();
|
||||
Type TUnitOfWork = UnitOfWork.GetType();
|
||||
PropertyInfo[] props = TUnitOfWork.GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
|
||||
List<string> listInfo = new List<string>();
|
||||
TenantInfo tenantInfo = null;
|
||||
foreach (var prop in props)
|
||||
Infrastructure.Core.IUnitOfWork UnitOfWork = MFlowPermitService.UnitWork();
|
||||
Type TUnitOfWork = UnitOfWork.GetType();
|
||||
PropertyInfo[] props = TUnitOfWork.GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
|
||||
List<string> listInfo = new List<string>();
|
||||
TenantInfo tenantInfo = null;
|
||||
foreach (var prop in props)
|
||||
{
|
||||
if (prop.Name == "TenantInfo")
|
||||
{
|
||||
if (prop.Name == "TenantInfo")
|
||||
{
|
||||
var fdsafd = prop.GetValue(UnitOfWork);
|
||||
tenantInfo = (TenantInfo)fdsafd;
|
||||
break;
|
||||
}
|
||||
var fdsafd = prop.GetValue(UnitOfWork);
|
||||
tenantInfo = (TenantInfo)fdsafd;
|
||||
break;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tenantInfo.Conn))
|
||||
{
|
||||
using (var contextCnn = new MigrationContext(tenantInfo.Conn))
|
||||
{
|
||||
string sql = string.Format("INSERT INTO[T_BS_CHECK_QUESTION]([ID],[DESCREPTION],[DEMAND],[NUM],[ENABLE_STATUS],[IS_DELETED],[ORG_ID],[ENTITY_ORG_TPYE],[FORM_ID],[FLOW_STATUS],[FLOW_SEND_STATUS],[FLOW_ID],[CREATE_TIME],[MODIFY_TIME],[CREATER_ID],[MODIFIER_ID],[CHECK_CONTENTS_ID],[QUESTION_LEVEL])VALUES('55555555-5555-5555-5555-555555555555', '无', null, 0, 0, 0,'{0}',0 ,null,0 ,0,null,GETDATE() ,GETDATE() ,null ,null,null ,0) INSERT INTO[T_BS_CHECK_QUESTION]([ID],[DESCREPTION],[DEMAND],[NUM],[ENABLE_STATUS],[IS_DELETED],[ORG_ID],[ENTITY_ORG_TPYE],[FORM_ID],[FLOW_STATUS],[FLOW_SEND_STATUS],[FLOW_ID],[CREATE_TIME],[MODIFY_TIME],[CREATER_ID],[MODIFIER_ID],[CHECK_CONTENTS_ID],[QUESTION_LEVEL])VALUES('77777777-7777-7777-7777-777777777777', '其他', null, 0, 0, 0,'{0}',0 ,null,0 ,0,null,GETDATE() ,GETDATE() ,null ,null,null ,0)", result.ORG_ID);
|
||||
|
||||
contextCnn.ExecuteSqlCommand(sql);
|
||||
contextCnn.SaveChanges();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception("请联系管理员添加检查问题描述(T_BS_CHECK_QUESTION 【5555】)");
|
||||
}
|
||||
//这样会报错
|
||||
|
||||
//this.UnifiedCommit(() =>
|
||||
//{
|
||||
// AddEntityNoCommit(question); //保存主表
|
||||
// AddEntityNoCommit(questionQT); //保存主表
|
||||
//});
|
||||
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tenantInfo.Conn))
|
||||
{
|
||||
using (var contextCnn = new MigrationContext(tenantInfo.Conn))
|
||||
{
|
||||
string sql = string.Format("INSERT INTO[T_BS_CHECK_QUESTION]([ID],[DESCREPTION],[DEMAND],[NUM],[ENABLE_STATUS],[IS_DELETED],[ORG_ID],[ENTITY_ORG_TPYE],[FORM_ID],[FLOW_STATUS],[FLOW_SEND_STATUS],[FLOW_ID],[CREATE_TIME],[MODIFY_TIME],[CREATER_ID],[MODIFIER_ID],[CHECK_CONTENTS_ID],[QUESTION_LEVEL])VALUES('55555555-5555-5555-5555-555555555555', '无', null, 0, 0, 0,'{0}',0 ,null,0 ,0,null,GETDATE() ,GETDATE() ,null ,null,null ,0) INSERT INTO[T_BS_CHECK_QUESTION]([ID],[DESCREPTION],[DEMAND],[NUM],[ENABLE_STATUS],[IS_DELETED],[ORG_ID],[ENTITY_ORG_TPYE],[FORM_ID],[FLOW_STATUS],[FLOW_SEND_STATUS],[FLOW_ID],[CREATE_TIME],[MODIFY_TIME],[CREATER_ID],[MODIFIER_ID],[CHECK_CONTENTS_ID],[QUESTION_LEVEL])VALUES('77777777-7777-7777-7777-777777777777', '其他', null, 0, 0, 0,'{0}',0 ,null,0 ,0,null,GETDATE() ,GETDATE() ,null ,null,null ,0)", result.ORG_ID);
|
||||
|
||||
contextCnn.ExecuteSqlCommand(sql);
|
||||
contextCnn.SaveChanges();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception("请联系管理员添加检查问题描述(T_BS_CHECK_QUESTION 【5555】)");
|
||||
}
|
||||
//这样会报错
|
||||
|
||||
//this.UnifiedCommit(() =>
|
||||
//{
|
||||
// AddEntityNoCommit(question); //保存主表
|
||||
// AddEntityNoCommit(questionQT); //保存主表
|
||||
//});
|
||||
|
||||
}
|
||||
|
||||
foreach (var item in listDetail)
|
||||
{
|
||||
@ -4177,7 +4186,7 @@ namespace APT.BS.WebApi.Controllers.Api
|
||||
else
|
||||
{
|
||||
listDetail[i].CHECKTYPE = (int)CHECKTYPEEnum.PartCheck;//设置记录为部分人员检查
|
||||
//listDetail[i].Nav_ListCheckDetailUser = null;//置空
|
||||
//listDetail[i].Nav_ListCheckDetailUser = null;//置空
|
||||
if (listDetail[i].QUESTION_LEVEL == 0)
|
||||
{
|
||||
listDetail[i].QUESTION_LEVEL = null;
|
||||
@ -4812,8 +4821,10 @@ namespace APT.BS.WebApi.Controllers.Api
|
||||
//{
|
||||
// param = entity.Nav_CheckType.CODE + "_" + param;
|
||||
//}
|
||||
DateTime? dtTaskEnd = null;
|
||||
if (task != null)
|
||||
dtTaskEnd = task.TASK_ENDDT;
|
||||
|
||||
//entity.TaskID
|
||||
MFlowPermitService.InsertApprove(serialCode, FORM_CODE, param, entity.ID, "BS034_SHOWPRINT", null, true, () =>
|
||||
{
|
||||
if (entity != null)
|
||||
@ -4842,7 +4853,7 @@ namespace APT.BS.WebApi.Controllers.Api
|
||||
UpdateEntityNoCommit(Record);
|
||||
if (listOpLog != null && listOpLog.Count > 0)
|
||||
BantchSaveEntityNoCommit(listOpLog);//日志
|
||||
}, entity.APPROVE_CHECKAUDIT_ID, entity.USERID_DOPLAN, null, null, null, "BS034_VIEW", null, entity.NAME.Replace("任务表", "记录表") + "-审批", FMTASKTYPE.BS_SafeCheck_Audit, null, entity.LIMITDATETIME, ((int)OPERATEPOINT_Enums.CheckAgree), entity.ID);
|
||||
}, entity.APPROVE_CHECKAUDIT_ID, entity.USERID_DOPLAN, null, null, null, "BS034_VIEW", null, entity.NAME.Replace("任务表", "记录表") + "-审批", FMTASKTYPE.BS_SafeCheck_Audit, null, entity.LIMITDATETIME, ((int)OPERATEPOINT_Enums.CheckAgree), entity.ID, null, dtTaskEnd);
|
||||
|
||||
#endregion
|
||||
|
||||
@ -8272,6 +8283,27 @@ namespace APT.BS.WebApi.Controllers.Api
|
||||
{
|
||||
throw new Exception("获取检查人员信息失败!");
|
||||
}
|
||||
|
||||
//Nav_ListCheckDetail ID 修改防止页面数据未清理直接修改 ID保持不变带来的影响
|
||||
foreach (var item in entity.Nav_ListCheckDetail)
|
||||
{
|
||||
item.ID = Guid.NewGuid();
|
||||
if (item.Nav_Files != null && item.Nav_Files.Any())
|
||||
{
|
||||
foreach (var itemF in item.Nav_Files)
|
||||
{
|
||||
itemF.SAFE_CHECK_DETAIL_ID = item.ID;
|
||||
}
|
||||
}
|
||||
if (item.Nav_ListCheckDetailReason != null && item.Nav_ListCheckDetailReason.Any())
|
||||
{
|
||||
foreach (var itemR in item.Nav_ListCheckDetailReason)
|
||||
{
|
||||
itemR.CHECK_DETAIL_ID = item.ID;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var loginId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
DateTime dtNow = DateTime.Now;
|
||||
List<T_BS_CHECK_MAIN> listMain = new List<T_BS_CHECK_MAIN>();
|
||||
|
||||
@ -317,9 +317,7 @@ namespace APT.BS.WebApi.Controllers.Api
|
||||
{
|
||||
//相同
|
||||
var UserReject = GetEntity<T_FM_USER>(entity.USERID_REJECT.Value);
|
||||
|
||||
listTaskToday.Add(NotificationTaskService.InsertUserNoticeTaskModel("检查退回结果保持不变【编号:" + safeCheck.CODE + ",序号:" + entity.ROW_NO + "】", entity.ID, entity.ORG_ID, UserReject.ID, UserReject.NAME, DateTime.Now, 2, "", FMTASKTYPE.Default));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -353,6 +351,11 @@ namespace APT.BS.WebApi.Controllers.Api
|
||||
|
||||
var TaskEnd = NotificationTaskService.GetEntityTask(entity.TaskID, "BS069_SHOWPRINT");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
////保存草稿 只保存页面数据
|
||||
this.UnifiedCommit(() =>
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user