代码合并

T_FM_SYNC_LOG 添加 时间限制才入库
log4Net 年月 添加
跑批 部分添加 try catch 记录错误(大概率比较少错误了懒得全部添加过来)
隐患整改单 获取数据改进 (检查库 添加 整改单 查看)
FMFlowPermitService 添加 记录信息 防止 全部注入依赖
This commit is contained in:
wyw 2024-04-09 13:56:33 +08:00
parent 00d009d88f
commit f0f1669d2a
40 changed files with 5907 additions and 5313 deletions

View File

@ -21,6 +21,7 @@ namespace APT.BaseData.Services.Services.FM
{
/// <summary>
/// 送审后,单据特殊处理
/// wyw此文件如果引入别的service 可能导致整个服务 都要依赖注入(引用依赖)
/// </summary>
public class FMFlowPermitService : CommonService, IFMFlowPermitService
{
@ -28,16 +29,13 @@ namespace APT.BaseData.Services.Services.FM
IFMNotificationTaskService NotificationTaskService { get; set; }
IPFSysLogService SysLogService { get; set; }
IPFApproveCallBackService ApproveCallBackService { get; set; }
IBSOperateLogService BSOperateLogService { get; set; }
public FMFlowPermitService(IRepository repository, IPFCodeRuleService codeRuleService, IFMNotificationTaskService notificationTaskService, IPFSysLogService sysLogService, IPFApproveCallBackService approveCallBackService, IBSOperateLogService bsOperateLogService)
public FMFlowPermitService(IRepository repository, IPFCodeRuleService codeRuleService, IFMNotificationTaskService notificationTaskService, IPFSysLogService sysLogService, IPFApproveCallBackService approveCallBackService)
: base(repository)
{
CodeRuleService = codeRuleService;
NotificationTaskService = notificationTaskService;
SysLogService = sysLogService;
ApproveCallBackService = approveCallBackService;
BSOperateLogService = bsOperateLogService;
}
/// <summary>
@ -590,7 +588,7 @@ namespace APT.BaseData.Services.Services.FM
}
}
listBSLog = BSOperateLogService.GetListOperateLog(OPERATEPOINT, id, APT.Infrastructure.Api.AppContext.CurrentSession.UserID.Value, null, ListUserID, ListUserName, approve.ORG_ID, null, null);
listBSLog = GetListOperateLog(OPERATEPOINT, id, APT.Infrastructure.Api.AppContext.CurrentSession.UserID.Value, null, ListUserID, ListUserName, approve.ORG_ID, null, null);
}
catch { }
}
@ -1954,5 +1952,155 @@ namespace APT.BaseData.Services.Services.FM
//#endregion
//#endregion
#region BSOperateLogService
public List<T_BS_OPERATE_LOG> GetListOperateLog(OPERATEPOINT_Enums OPERATEPOINT, Guid DATA_ID, Guid UserIDLogin, List<Guid> ListDATA_ID, List<Guid> ListUserID, List<string> ListUserName, Guid? ORG_ID, Guid? DATA_ID_SUB = null, List<Guid> ListUserIDDone = null, bool isEnd = true)
{
List<T_BS_OPERATE_LOG> listResult = new List<T_BS_OPERATE_LOG>();
T_BS_OPERATE_LOG modelLogUpdate = null;
switch (OPERATEPOINT)
{
case OPERATEPOINT_Enums.GotCheck:
//系统触发 只是新增
if (ListUserID != null && ListUserName != null)
for (int i = 0; i < ListUserID.Count; i++)
listResult.Add(AddModel(OPERATEPOINT, ListDATA_ID[i], ListUserID[i], ListUserName[i], ORG_ID, i));
break;
case OPERATEPOINT_Enums.CheckForm:
//BS032保存并发送 到审批流
modelLogUpdate = GetUpdateDeal(OPERATEPOINT_Enums.GotCheck, DATA_ID, UserIDLogin);
if (modelLogUpdate != null)
listResult.Add(modelLogUpdate);
if (ListUserID != null && ListUserName != null)
for (int i = 0; i < ListUserID.Count; i++)
listResult.Add(AddModel(OPERATEPOINT, DATA_ID, ListUserID[i], ListUserName[i], ORG_ID, i));
break;
case OPERATEPOINT_Enums.CheckAudit:
modelLogUpdate = GetUpdateDeal(OPERATEPOINT, DATA_ID, UserIDLogin);//处理自己的待办日志
if (modelLogUpdate != null)
listResult.Add(modelLogUpdate);
if (ListUserID != null && ListUserName != null)
for (int i = 0; i < ListUserID.Count; i++)//最后一个审批人 添加 通知
listResult.Add(AddModel(OPERATEPOINT_Enums.CheckerCheck, DATA_ID, ListUserID[i], ListUserName[i], ORG_ID, i));
break;
case OPERATEPOINT_Enums.CheckerCheck:
modelLogUpdate = GetUpdateDeal(OPERATEPOINT, DATA_ID, UserIDLogin);//处理自己的
if (modelLogUpdate != null)
listResult.Add(modelLogUpdate);
break;
case OPERATEPOINT_Enums.CheckRegister:
//检查登记
modelLogUpdate = GetUpdateDeal(OPERATEPOINT, DATA_ID, UserIDLogin);//处理自己的
if (modelLogUpdate != null)
listResult.Add(modelLogUpdate);
if (ListUserID != null && ListUserName != null)
for (int i = 0; i < ListUserID.Count; i++) //发起检查结果确认
listResult.Add(AddModel(OPERATEPOINT_Enums.CheckAgree, DATA_ID, ListUserID[i], ListUserName[i], ORG_ID, i));
break;
case OPERATEPOINT_Enums.CheckAgree:
modelLogUpdate = GetUpdateDeal(OPERATEPOINT, DATA_ID, UserIDLogin);//处理自己的
if (modelLogUpdate != null)
listResult.Add(modelLogUpdate);
if (ListUserID != null && ListUserName != null)
for (int i = 0; i < ListUserID.Count; i++) //检查结果确认完 直接到审批
listResult.Add(AddModel(OPERATEPOINT_Enums.CheckResultAudit, DATA_ID, ListUserID[i], ListUserName[i], ORG_ID, i));
break;
case OPERATEPOINT_Enums.CheckResultAudit:
modelLogUpdate = GetUpdateDeal(OPERATEPOINT, DATA_ID, UserIDLogin);//处理自己的
if (modelLogUpdate != null)
listResult.Add(modelLogUpdate);
if (isEnd) //最后一个审批就归档
{
listResult.Add(AddModel(OPERATEPOINT_Enums.CheckEnd, DATA_ID, UserIDLogin, APT.Infrastructure.Api.AppContext.CurrentSession.UserName, ORG_ID));
}
break;
case OPERATEPOINT_Enums.CheckEnd:
//此处没操作
break;
case OPERATEPOINT_Enums.RiskNoticeSD:
break;
case OPERATEPOINT_Enums.RiskUpSD:
break;
case OPERATEPOINT_Enums.RiskInfoCompleteSD:
break;
case OPERATEPOINT_Enums.RiskGet:
//审批结束后 如果有隐患
if (ListUserID != null && ListUserName != null)
for (int i = 0; i < ListUserID.Count; i++)
listResult.Add(AddModel(OPERATEPOINT, DATA_ID, ListUserID[i], ListUserName[i], ORG_ID, i));
break;
case OPERATEPOINT_Enums.RiskSend:
break;
default:
break;
}
if (ListUserIDDone != null && ListUserIDDone.Count > 0)
{
//除了登陆者 需要默认操作的
listResult.ForEach(e =>
{
if (ListUserIDDone.Contains(e.USER_ID))
e.OPERTETIME = DateTime.Now;
});
}
return listResult;
}
/// <summary>
/// 获取新记录
/// </summary>
/// <param name="OPERATEPOINT"></param>
/// <param name="DATA_ID"></param>
/// <param name="UserID"></param>
/// <param name="UserName"></param>
/// <param name="ORG_ID"></param>
/// <returns></returns>
private T_BS_OPERATE_LOG AddModel(OPERATEPOINT_Enums OPERATEPOINT, Guid DATA_ID, Guid UserID, string UserName, Guid? ORG_ID, int ORDERNO = 0)
{
T_BS_OPERATE_LOG ModelAdd = new T_BS_OPERATE_LOG()
{
ID = Guid.NewGuid(),
ORG_ID = ORG_ID,
LOGTYPE = ((int)OPERATEPOINT) > 80 ? LOGTYPE_Enums.RiskSubmit : LOGTYPE_Enums.SafeCheck,
DATA_ID = DATA_ID,
//DATA_ID_SUB = null,
OPERATEPOINT = OPERATEPOINT,
USER_ID = UserID,
USRTNAME = UserName,
ORDERNO = ORDERNO,
//OPERTETIME = null,
ISINTTIME = false,
CREATE_TIME = DateTime.Now,
CREATER_ID = APT.Infrastructure.Api.AppContext.CurrentSession.UserID
};
if (APT.Infrastructure.Api.AppContext.CurrentSession.UserID.HasValue && APT.Infrastructure.Api.AppContext.CurrentSession.UserID.Value == UserID)
{
ModelAdd.OPERTETIME = DateTime.Now;//默认通过
}
return ModelAdd;
}
/// <summary>
/// 获取需要修改的Model
/// </summary>
/// <param name="OPERATEPOINT">操作节点</param>
/// <param name="DATA_ID"></param>
/// <param name="UserID"></param>
/// <param name="DATA_ID_SUB"></param>
/// <returns></returns>
private T_BS_OPERATE_LOG GetUpdateDeal(OPERATEPOINT_Enums OPERATEPOINT, Guid DATA_ID, Guid UserID, Guid? DATA_ID_SUB = null)
{
Expression<Func<T_BS_OPERATE_LOG, bool>> expression = e => e.DATA_ID == DATA_ID && e.OPERATEPOINT == OPERATEPOINT && e.USER_ID == UserID;
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);
if (model != null)
model.OPERTETIME = DateTime.Now;
return model;
}
#endregion
}
}

View File

@ -352,6 +352,7 @@ builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT
builder.HasOne(t => t.Nav_ApproveCheckAudit).WithMany().HasForeignKey(t => t.APPROVE_ID).OnDelete(DeleteBehavior.Restrict);
builder.Ignore(t => t.FORM_CODE);
builder.Ignore(t => t.IS_OVERTIME);
builder.Ignore(t => t.CREATE_NAME);
}
}
#endregion

View File

@ -207,5 +207,18 @@ namespace APT.MS.Domain.Entities.BS
public bool? ISFINISHINTTIME { get; set; }
[DataFieldIngore]
public int IS_OVERTIME { get; set; }
/// <summary>
/// 外界IDTPM
/// </summary>
public Guid? DATAID { get; set; }
/// <summary>
/// 完善人
/// </summary>
[Description("完善人")]
[DataFieldIngore]
public string CREATE_NAME { get; set; }
}
}

View File

@ -13,6 +13,7 @@ namespace APT.MS.Domain.Entities.BS
/// 隐患上报明细 隐患上报子表(关联检查内容)
/// </summary>
[Description("隐患上报明细")]
[DataRuleField("DEPARTMENT_ID")]
public class T_BS_RISK_SUBMIT_CONTENT : MesEntityBase
{
/// <summary>

View File

@ -1,9 +1,10 @@
using APT.MS.Domain.Entities.BS;
using APT.Infrastructure.Api;
using APT.MS.Domain.Entities.BS;
using APT.MS.Domain.Enums;
using System;
using System.Collections.Generic;
namespace APT.BaseData.Domain.IServices.BS
namespace APT.BaseData.Domain.IServices
{
public interface IBSOperateLogService
{

View File

@ -25,6 +25,6 @@ namespace APT.BaseData.Domain.IServices
/// <param name="listUserID"></param>
/// <param name="entity"></param>
/// <param name="listAllUser"></param>
void GetEntityInfo(Guid MEETINGID, string NAME, string THEME, string CODE, Guid? ORG_ID, Guid DEPARTMENT_ID, int? DEPARTMENT_TYPE, Guid USER_ID_ORIGINATOR, CREACTTYPEEnum CREACTTYPE, SCMEETINGTYPE MEETINGTYPE, IEnumerable<Guid> listUserID, out T_SC_MT_MEETING entity, out List<T_SC_MT_MEETING_PALL> listAllUser);
List<T_SC_MT_MEETING_PALL> GetEntityInfo(Guid MEETINGID, string NAME, string THEME, string CODE, Guid? ORG_ID, Guid DEPARTMENT_ID, int? DEPARTMENT_TYPE, Guid USER_ID_ORIGINATOR, CREACTTYPEEnum CREACTTYPE, SCMEETINGTYPE MEETINGTYPE, IEnumerable<Guid> listUserID, out T_SC_MT_MEETING entity);
}
}

View File

@ -16,7 +16,7 @@ using APT.BaseData.Domain.IServices.BS;
using APT.MS.Domain.Entities.BS;
namespace APT.BaseData.Services.Services.BS
namespace APT.BaseData.Services.DomainServices
{
/// <summary>
/// 安全检查
@ -185,9 +185,7 @@ namespace APT.BaseData.Services.Services.BS
expression = expression.And(e => e.DATA_ID_SUB.HasValue && e.DATA_ID_SUB == DATA_ID_SUB);
var model = GetEntity(expression);
if (model != null)
{
model.OPERTETIME = DateTime.Now;
}
return model;
}

View File

@ -48,13 +48,13 @@ namespace APT.BaseData.Services.DomainServices
/// <param name="listUserID"></param>
/// <param name="entity"></param>
/// <param name="listAllUser"></param>
public void GetEntityInfo(Guid MEETINGID, string NAME, string THEME, string CODE, Guid? ORG_ID, Guid DEPARTMENT_ID, int? DEPARTMENT_TYPE, Guid USER_ID_ORIGINATOR, CREACTTYPEEnum CREACTTYPE, SCMEETINGTYPE MEETINGTYPE, IEnumerable<Guid> listUserID, out T_SC_MT_MEETING entity, out List<T_SC_MT_MEETING_PALL> listAllUser)
public List<T_SC_MT_MEETING_PALL> GetEntityInfo(Guid MEETINGID, string NAME, string THEME, string CODE, Guid? ORG_ID, Guid DEPARTMENT_ID, int? DEPARTMENT_TYPE, Guid USER_ID_ORIGINATOR, CREACTTYPEEnum CREACTTYPE, SCMEETINGTYPE MEETINGTYPE, IEnumerable<Guid> listUserID, out T_SC_MT_MEETING entity)
{
listAllUser = new List<T_SC_MT_MEETING_PALL>();
var listAllUser = new List<T_SC_MT_MEETING_PALL>();
entity = new T_SC_MT_MEETING();
if (listUserID == null || !listUserID.Any())
{
return;
return listAllUser;
}
if (listUserID != null && listUserID.Any())
{
@ -119,6 +119,7 @@ namespace APT.BaseData.Services.DomainServices
modelUser.PERSONNATURE = PersonNature.JOIN;
listAllUser.Add(modelUser);
}
return listAllUser;
}
}
}

View File

@ -65,9 +65,9 @@ namespace APT.WebApi.Models
}
}
var TalSeconds = (DateTime.Now - START_TIME).TotalSeconds;
//if (TalSeconds > 1)
//{
double TalSeconds = (DateTime.Now - START_TIME).TotalSeconds;
if (TalSeconds > 0.8)
{
T_FM_SYNC_LOG log = new T_FM_SYNC_LOG()
{
ID = Guid.NewGuid(),
@ -121,6 +121,7 @@ namespace APT.WebApi.Models
}
}
}
}
catch
{
}

View File

@ -19,7 +19,7 @@
<appendToFile value="true" />
<rollingStyle value="Composite" />
<staticLogFileName value="false" />
<datePattern value="yyyyMMdd'.log'" />
<datePattern value="yyyyMM'.log'" />
<maxSizeRollBackups value="10" />
<maximumFileSize value="1MB" />
<layout type="log4net.Layout.PatternLayout">

View File

@ -56,11 +56,11 @@ namespace APT.BS.WebApi.Controllers.Api
}
}
filter.Include = Include;
List<FilterRule> filterRules = filter.FilterGroup.Rules.ToList();
var guid = new Guid(filterRules[0].Value.ToString());
var modelSubConDel = GetEntity<T_BS_RISK_SUBMIT_CONTENT_DEAL>(e => e.ID == guid, filter);
var modelSubConDel = GetEntity<T_BS_RISK_SUBMIT_CONTENT_DEAL>(null, filter);
if (modelSubConDel == null)
{
throw new Exception("获取整改单信息失败!");
}
List<Guid> listUserID = new List<Guid>();
if (modelSubConDel.DEAL_USER_ID.HasValue)
listUserID.Add(modelSubConDel.DEAL_USER_ID.Value);

View File

@ -4099,6 +4099,21 @@ namespace APT.BS.WebApi.Controllers.Api
//Expression<Func<T_BS_RISK_SUBMIT, bool>> expression = e => !e.IS_DELETED && e.DEPARTMENT_ID.HasValue && departmentIds.Contains(e.DEPARTMENT_ID.Value);
PagedActionResult<T_BS_RISK_SUBMIT> orderPageEntities = GetOrderPageEntities(expression, pageFilter, null);
if (orderPageEntities.TotalCount > 0)
{
var listCreateID = orderPageEntities.Data.Where(e => e.CREATER_ID.HasValue).Select(e => e.CREATER_ID.Value).Distinct();
if (listCreateID != null && listCreateID.Any())
{
var listUser = GetEntities<T_FM_USER>(e => listCreateID.Contains(e.ID), null, null);
foreach (var item in orderPageEntities.Data)
{
if (!item.CREATER_ID.HasValue)
continue;
item.CREATE_NAME = listUser.FirstOrDefault(e => e.ID == item.CREATER_ID.Value)?.NAME;
}
}
}
result.Data = orderPageEntities.Data;
result.TotalCount = orderPageEntities.TotalCount;
});
@ -4854,8 +4869,9 @@ namespace APT.BS.WebApi.Controllers.Api
}
}
BaseFilter filterRiskContent = new BaseFilter();
BaseFilter filterRiskContent = new BaseFilter(pageFilter.OrgId);
filterRiskContent.SelectField = new List<string> { "ID", "QUESTION_LEVEL", "RISK_AREA_ID", "CHECKCONTENT", "DESCREPTION" };
filterRiskContent.IgnoreDataRule = true;
var IlistRiskContent = GetEntities(expressionSC, filterRiskContent);
BaseFilter filterArea = new BaseFilter();
@ -5579,6 +5595,7 @@ namespace APT.BS.WebApi.Controllers.Api
#endregion
#region
@ -6131,6 +6148,9 @@ namespace APT.BS.WebApi.Controllers.Api
entity.STARTTIME = task.CREATE_TIME;
}
//记录完善人信息
entity.CREATER_ID = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
entity.CREATE_TIME = DateTime.Now;
if (entity.SUBMIT_STATUS == (int)BSSubmitStatusEnum.Temp)
{
this.UnifiedCommit(() =>

View File

@ -1879,12 +1879,14 @@ namespace APT.BS.WebApi.Controllers.Api
item.Nav_Standard = null;
}
}
if (DataHelper.GetRequestType(HttpContext.Response.Headers) == 2)
//var requestType = DataHelper.GetRequestType(HttpContext.Response.Headers);
//if (DataHelper.GetRequestType(HttpContext.Response.Headers) == 2)
//{
if (listDetail != null && listDetail.Count > 0)
{
foreach (var item in listDetail)
{
if (item.Nav_SafeCheck != null)
{
item.Nav_SafeCheck = null;
}
}
@ -1892,10 +1894,11 @@ namespace APT.BS.WebApi.Controllers.Api
{
foreach (var item in listDetailLaw)
{
if (item.Nav_Standard != null)
item.Nav_Standard = null;
}
}
}
//}
if (entity.STATUSPLAN == 0)
{
@ -7285,6 +7288,7 @@ namespace APT.BS.WebApi.Controllers.Api
break;
}
//var iListCheck = GetEntities(expressionCheck, null, "Nav_Department", "Nav_CheckType", "Nav_CheckTypeLevel.Nav_Enums").Select(e => new T_BS_SAFE_CHECK_SUM()
//{
// ID = e.ID.ToString() + "_",

View File

@ -45,6 +45,53 @@ namespace APT.WebApi.Models//APT.BS.WebApi.Models
{
try
{
#region
//var API_NAME = context.HttpContext.Request.Path;
//bool isRecord = false;
////switch (API_NAME)
////{
//// case "":
//// isRecord = true;
//// break;
//// default:
//// break;
////}
////isRecord = true;
//if (isRecord)
//{
// //避免不需要的反射
// //bool? IsSuccessful = null;
// //try
// //{
// // IsSuccessful = ((APT.Infrastructure.Core.JsonActionResult`1[System.Boolean])((Microsoft.AspNetCore.Mvc.ObjectResult)context.Result).Value).IsSuccessful;
// //}
// //catch { }
// var ResultValue = ((Microsoft.AspNetCore.Mvc.ObjectResult)context.Result).Value;
// Type TResultValue = ResultValue.GetType();
// bool? IsSuccessful = null;
// PropertyInfo[] propsVal = TResultValue.GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
// foreach (var prop in propsVal)
// {
// if (prop.Name == "IsSuccessful")
// {
// var fdsafd = prop.GetValue(ResultValue);
// IsSuccessful = (bool)fdsafd;
// break;
// }
// }
// if (IsSuccessful.HasValue && IsSuccessful.Value)
// {
// //执行成功记录操作结果
// }
//}
#endregion
#region T_FM_SYNC_LOG
T_FM_SYNC_LOG log = null;
if (context.HttpContext.Items != null && context.HttpContext.Items.ContainsKey("1"))
{
DateTime START_TIME = DateTime.Now;
@ -64,7 +111,9 @@ namespace APT.WebApi.Models//APT.BS.WebApi.Models
}
}
double SYNC_PARAM = (DateTime.Now - START_TIME).TotalSeconds;
T_FM_SYNC_LOG log = new T_FM_SYNC_LOG()
if (SYNC_PARAM > 0.8)
{
log = new T_FM_SYNC_LOG()
{
ID = Guid.NewGuid(),
START_TIME = START_TIME,
@ -95,6 +144,14 @@ namespace APT.WebApi.Models//APT.BS.WebApi.Models
//var commonService = APT.Infrastructure.Api.ServiceLocator.Instance.GetService<IFMUserService>();
//commonService.AddEntity<T_FM_SYNC_LOG>(log);
}
}
#endregion
#region
if (log != null)//增加别的判断 (log != null||(isRecord&& !=null ))
{
Infrastructure.Core.IUnitOfWork UnitOfWork = UserService.UnitWork();
Type TUnitOfWork = UnitOfWork.GetType();
PropertyInfo[] props = TUnitOfWork.GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
@ -118,6 +175,8 @@ namespace APT.WebApi.Models//APT.BS.WebApi.Models
}
}
}
#endregion
}
catch
{

View File

@ -99,6 +99,7 @@ namespace APT.BS.WebApi
services.AddSingleton(HtmlEncoder.Create(UnicodeRanges.All));
//UpdateDatabase();
services.RegisterBearAuth();
services.AddControllers(o => o.Filters.Add(typeof(APIAttributeActionFilter)));
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.

View File

@ -19,7 +19,7 @@
<appendToFile value="true" />
<rollingStyle value="Composite" />
<staticLogFileName value="false" />
<datePattern value="yyyyMMdd'.log'" />
<datePattern value="yyyyMM'.log'" />
<maxSizeRollBackups value="10" />
<maximumFileSize value="1MB" />
<layout type="log4net.Layout.PatternLayout">

View File

@ -66,8 +66,8 @@ namespace APT.WebApi.Models
}
var TalSeconds = (DateTime.Now - START_TIME).TotalSeconds;
//if (TalSeconds > 1)
//{
if (TalSeconds > 0.8)
{
T_FM_SYNC_LOG log = new T_FM_SYNC_LOG()
{
ID = Guid.NewGuid(),
@ -121,6 +121,7 @@ namespace APT.WebApi.Models
}
}
}
}
catch
{
}

View File

@ -19,7 +19,7 @@
<appendToFile value="true" />
<rollingStyle value="Composite" />
<staticLogFileName value="false" />
<datePattern value="yyyyMMdd'.log'" />
<datePattern value="yyyyMM'.log'" />
<maxSizeRollBackups value="10" />
<maximumFileSize value="1MB" />
<layout type="log4net.Layout.PatternLayout">

View File

@ -66,8 +66,8 @@ namespace APT.WebApi.Models
}
var TalSeconds = (DateTime.Now - START_TIME).TotalSeconds;
//if (TalSeconds > 1)
//{
if (TalSeconds > 0.8)
{
T_FM_SYNC_LOG log = new T_FM_SYNC_LOG()
{
ID = Guid.NewGuid(),
@ -121,6 +121,7 @@ namespace APT.WebApi.Models
}
}
}
}
catch
{
}

View File

@ -19,7 +19,7 @@
<appendToFile value="true" />
<rollingStyle value="Composite" />
<staticLogFileName value="false" />
<datePattern value="yyyyMMdd'.log'" />
<datePattern value="yyyyMM'.log'" />
<maxSizeRollBackups value="10" />
<maximumFileSize value="1MB" />
<layout type="log4net.Layout.PatternLayout">

View File

@ -66,8 +66,8 @@ namespace APT.WebApi.Models
}
var TalSeconds = (DateTime.Now - START_TIME).TotalSeconds;
//if (TalSeconds > 1)
//{
if (TalSeconds > 0.8)
{
T_FM_SYNC_LOG log = new T_FM_SYNC_LOG()
{
ID = Guid.NewGuid(),
@ -121,6 +121,7 @@ namespace APT.WebApi.Models
}
}
}
}
catch
{
}

View File

@ -19,7 +19,7 @@
<appendToFile value="true" />
<rollingStyle value="Composite" />
<staticLogFileName value="false" />
<datePattern value="yyyyMMdd'.log'" />
<datePattern value="yyyyMM'.log'" />
<maxSizeRollBackups value="10" />
<maximumFileSize value="1MB" />
<layout type="log4net.Layout.PatternLayout">

View File

@ -66,8 +66,8 @@ namespace APT.WebApi.Models
}
var TalSeconds = (DateTime.Now - START_TIME).TotalSeconds;
//if (TalSeconds > 1)
//{
if (TalSeconds > 0.8)
{
T_FM_SYNC_LOG log = new T_FM_SYNC_LOG()
{
ID = Guid.NewGuid(),
@ -121,6 +121,7 @@ namespace APT.WebApi.Models
}
}
}
}
catch
{
}

View File

@ -19,7 +19,7 @@
<appendToFile value="true" />
<rollingStyle value="Composite" />
<staticLogFileName value="false" />
<datePattern value="yyyyMMdd'.log'" />
<datePattern value="yyyyMM'.log'" />
<maxSizeRollBackups value="10" />
<maximumFileSize value="1MB" />
<layout type="log4net.Layout.PatternLayout">

View File

@ -66,8 +66,8 @@ namespace APT.WebApi.Models
}
var TalSeconds = (DateTime.Now - START_TIME).TotalSeconds;
//if (TalSeconds > 1)
//{
if (TalSeconds > 0.8)
{
T_FM_SYNC_LOG log = new T_FM_SYNC_LOG()
{
ID = Guid.NewGuid(),
@ -121,6 +121,7 @@ namespace APT.WebApi.Models
}
}
}
}
catch
{
}

View File

@ -19,7 +19,7 @@
<appendToFile value="true" />
<rollingStyle value="Composite" />
<staticLogFileName value="false" />
<datePattern value="yyyyMMdd'.log'" />
<datePattern value="yyyyMM'.log'" />
<maxSizeRollBackups value="10" />
<maximumFileSize value="1MB" />
<layout type="log4net.Layout.PatternLayout">

View File

@ -66,8 +66,8 @@ namespace APT.WebApi.Models
}
var TalSeconds = (DateTime.Now - START_TIME).TotalSeconds;
//if (TalSeconds > 1)
//{
if (TalSeconds > 0.8)
{
T_FM_SYNC_LOG log = new T_FM_SYNC_LOG()
{
ID = Guid.NewGuid(),
@ -121,6 +121,7 @@ namespace APT.WebApi.Models
}
}
}
}
catch
{
}

View File

@ -19,7 +19,7 @@
<appendToFile value="true" />
<rollingStyle value="Composite" />
<staticLogFileName value="false" />
<datePattern value="yyyyMMdd'.log'" />
<datePattern value="yyyyMM'.log'" />
<maxSizeRollBackups value="10" />
<maximumFileSize value="1MB" />
<layout type="log4net.Layout.PatternLayout">

View File

@ -31,6 +31,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
public JsonActionResult<bool> AddRiskMoudleInfo([FromBody] KeywordFilter filter)
{
return SafeExecute<bool>(() =>
{
try
{
var sourceIds = new List<Guid>();
List<T_BI_FORM_RUN_ANALYSIS> formAnalysis = new List<T_BI_FORM_RUN_ANALYSIS>();
@ -844,6 +846,14 @@ namespace APT.PP.WebApi.Controllers.Api.PP
if (formAnalysis != null && formAnalysis.Any())
BantchSaveEntityNoCommit(formAnalysis);
});
}
catch (Exception ex)
{
if (!string.IsNullOrEmpty(ex.StackTrace))
throw new Exception("错误日志:[StackTrace]" + ex.StackTrace);
else
throw new Exception("【" + HttpContext.Request.Path + "】错误日志:[Message]" + ex.Message);
}
return true;
});
}
@ -852,6 +862,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
public JsonActionResult<bool> AddSafeCheckMoudleInfo([FromBody] KeywordFilter filter)
{
return SafeExecute<bool>(() =>
{
try
{
var sourceIds = new List<Guid>();
List<T_BI_FORM_RUN_ANALYSIS> formAnalysis = new List<T_BI_FORM_RUN_ANALYSIS>();
@ -1176,6 +1188,14 @@ namespace APT.PP.WebApi.Controllers.Api.PP
if (formAnalysis != null && formAnalysis.Any())
BantchSaveEntityNoCommit(formAnalysis);
});
}
catch (Exception ex)
{
if (!string.IsNullOrEmpty(ex.StackTrace))
throw new Exception("错误日志:[StackTrace]" + ex.StackTrace);
else
throw new Exception("【" + HttpContext.Request.Path + "】错误日志:[Message]" + ex.Message);
}
return true;
});
}
@ -1183,6 +1203,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
public JsonActionResult<bool> AddOperationMoudleInfo([FromBody] KeywordFilter filter)
{
return SafeExecute<bool>(() =>
{
try
{
var sourceIds = new List<Guid>();
List<T_BI_FORM_RUN_ANALYSIS> formAnalysis = new List<T_BI_FORM_RUN_ANALYSIS>();
@ -1753,6 +1775,14 @@ namespace APT.PP.WebApi.Controllers.Api.PP
if (formAnalysis != null && formAnalysis.Any())
BantchSaveEntityNoCommit(formAnalysis);
});
}
catch (Exception ex)
{
if (!string.IsNullOrEmpty(ex.StackTrace))
throw new Exception("错误日志:[StackTrace]" + ex.StackTrace);
else
throw new Exception("【" + HttpContext.Request.Path + "】错误日志:[Message]" + ex.Message);
}
return true;
});
}
@ -2630,10 +2660,12 @@ namespace APT.PP.WebApi.Controllers.Api.PP
public JsonActionResult<bool> AddTaskInfo([FromBody] KeywordPageFilter pageFilter)
{
return SafeExecute<bool>(() =>
{
try
{
List<T_BI_SYSTEM_RUN_SUMMARY> departSummary = new List<T_BI_SYSTEM_RUN_SUMMARY>();
List<T_BI_MOULD_RUN_SUMMARY> mouldSummary = new List<T_BI_MOULD_RUN_SUMMARY>();
var dt = DateTime.Now;
var dt = DateTime.Now.Date;
//最近一周
DateTime week = dt.AddDays(-7).Date;
//最近一月
@ -2644,8 +2676,9 @@ namespace APT.PP.WebApi.Controllers.Api.PP
DateTime sixMonth = dt.AddMonths(-6).Date;
//最近一年
DateTime year = dt.AddYears(-1).Date;
dt = Convert.ToDateTime(dt.ToString().Replace("0:00:00", "23:59:59"));
var newFilter = new BaseFilter(pageFilter.OrgId);
var taskYear = this.GetEntities<T_BI_NOTIFICATION_TASK_NEW>(t => t.CREATE_DATE >= year, new BaseFilter(pageFilter.OrgId)).ToList();
var taskYear = this.GetEntities<T_BI_NOTIFICATION_TASK_NEW>(t => t.CREATE_DATE >= year && t.CREATE_DATE <= dt, new BaseFilter(pageFilter.OrgId)).ToList();
newFilter.SelectField = new List<string> { "ID", "PARENT_ID", "NAME", "Nav_Parent", "DEPARTMENT_TYPE" };
var departmentInfos = this.GetEntities<T_FM_DEPARTMENT>(t => !t.IS_DELETED && t.ENABLE_STATUS == 0, newFilter).ToList();
//部门级
@ -2690,7 +2723,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
departSummary.Add(sum);
});
var groupYearMould = departGroupYear.GroupBy(t => t.MOUDLE_NAME).ToList();
groupYearMould.ForEach(t => {
groupYearMould.ForEach(t =>
{
T_BI_MOULD_RUN_SUMMARY sum = new T_BI_MOULD_RUN_SUMMARY();
sum.MOUDLE_NAME = t.Key;
sum.ORG_ID = pageFilter.OrgId;
@ -2778,7 +2812,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
departSummary.Add(sum);
});
var groupYearMould = taskSixMonth.GroupBy(t => t.MOUDLE_NAME).ToList();
groupYearMould.ForEach(t => {
groupYearMould.ForEach(t =>
{
T_BI_MOULD_RUN_SUMMARY sum = new T_BI_MOULD_RUN_SUMMARY();
sum.MOUDLE_NAME = t.Key;
sum.ORG_ID = pageFilter.OrgId;
@ -2866,7 +2901,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
departSummary.Add(sum);
});
var groupYearMould = taskThreeMonth.GroupBy(t => t.MOUDLE_NAME).ToList();
groupYearMould.ForEach(t => {
groupYearMould.ForEach(t =>
{
T_BI_MOULD_RUN_SUMMARY sum = new T_BI_MOULD_RUN_SUMMARY();
sum.MOUDLE_NAME = t.Key;
sum.ORG_ID = pageFilter.OrgId;
@ -2954,7 +2990,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
departSummary.Add(sum);
});
var groupYearMould = taskMonth.GroupBy(t => t.MOUDLE_NAME).ToList();
groupYearMould.ForEach(t => {
groupYearMould.ForEach(t =>
{
T_BI_MOULD_RUN_SUMMARY sum = new T_BI_MOULD_RUN_SUMMARY();
sum.MOUDLE_NAME = t.Key;
sum.ORG_ID = pageFilter.OrgId;
@ -3042,7 +3079,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
departSummary.Add(sum);
});
var groupYearMould = taskWeek.GroupBy(t => t.MOUDLE_NAME).ToList();
groupYearMould.ForEach(t => {
groupYearMould.ForEach(t =>
{
T_BI_MOULD_RUN_SUMMARY sum = new T_BI_MOULD_RUN_SUMMARY();
sum.MOUDLE_NAME = t.Key;
sum.ORG_ID = pageFilter.OrgId;
@ -3218,6 +3256,14 @@ namespace APT.PP.WebApi.Controllers.Api.PP
if (monthRuns != null && monthRuns.Any())
BantchSaveEntityNoCommit(monthRuns);
});
}
catch (Exception ex)
{
if (!string.IsNullOrEmpty(ex.StackTrace))
throw new Exception("错误日志:[StackTrace]" + ex.StackTrace);
else
throw new Exception("【" + HttpContext.Request.Path + "】错误日志:[Message]" + ex.Message);
}
return true;
});
}
@ -3233,6 +3279,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
public JsonActionResult<bool> UpdateTaskTable([FromBody] KeywordPageFilter pageFilter)
{
return SafeExecute<bool>(() =>
{
try
{
var dt = DateTime.Now;
//最近一天
@ -3270,6 +3318,14 @@ namespace APT.PP.WebApi.Controllers.Api.PP
if (taskInfos != null && taskInfos.Any())
BantchSaveEntityNoCommit(taskInfos);
});
}
catch (Exception ex)
{
if (!string.IsNullOrEmpty(ex.StackTrace))
throw new Exception("错误日志:[StackTrace]" + ex.StackTrace);
else
throw new Exception("【" + HttpContext.Request.Path + "】错误日志:[Message]" + ex.Message);
}
return true;
});
}
@ -3285,6 +3341,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
public JsonActionResult<bool> UpdateNoticeType([FromBody] KeywordPageFilter pageFilter)
{
return SafeExecute<bool>(() =>
{
try
{
var dt = DateTime.Now;
//最近一周
@ -3307,6 +3365,15 @@ namespace APT.PP.WebApi.Controllers.Api.PP
if (taskInfos != null && taskInfos.Any())
BantchSaveEntityNoCommit(taskInfos);
});
}
catch (Exception ex)
{
if (!string.IsNullOrEmpty(ex.StackTrace))
throw new Exception("错误日志:[StackTrace]" + ex.StackTrace);
else
throw new Exception("【" + HttpContext.Request.Path + "】错误日志:[Message]" + ex.Message);
}
return true;
});
}
@ -3322,6 +3389,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
public JsonActionResult<bool> AddNoticeTask([FromBody] KeywordPageFilter pageFilter)
{
return SafeExecute<bool>(() =>
{
try
{
var dt = DateTime.Now;
//最近一周
@ -3481,6 +3550,14 @@ namespace APT.PP.WebApi.Controllers.Api.PP
if (addTaskInfos != null && addTaskInfos.Any())
BantchAddEntityNoCommit(addTaskInfos);
});
}
catch (Exception ex)
{
if (!string.IsNullOrEmpty(ex.StackTrace))
throw new Exception("错误日志:[StackTrace]" + ex.StackTrace);
else
throw new Exception("【" + HttpContext.Request.Path + "】错误日志:[Message]" + ex.Message);
}
return true;
});
}
@ -3563,6 +3640,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
public JsonActionResult<bool> JobProfile([FromBody] KeywordPageFilter pageFilter)
{
return SafeExecute<bool>(() =>
{
try
{
//八大作业
var jobProfiles = new List<T_BI_JOB_PROFILE>();
@ -3597,6 +3676,14 @@ namespace APT.PP.WebApi.Controllers.Api.PP
if (jobProfiles != null && jobProfiles.Any())
BantchSaveEntityNoCommit(jobProfiles);
});
}
catch (Exception ex)
{
if (!string.IsNullOrEmpty(ex.StackTrace))
throw new Exception("错误日志:[StackTrace]" + ex.StackTrace);
else
throw new Exception("【" + HttpContext.Request.Path + "】错误日志:[Message]" + ex.Message);
}
return true;
});
}
@ -3612,6 +3699,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
public JsonActionResult<bool> AddNoticeTaskNew([FromBody] KeywordPageFilter pageFilter)
{
return SafeExecute<bool>(() =>
{
try
{
var dt = DateTime.Now;
//最近一天
@ -3818,6 +3907,14 @@ namespace APT.PP.WebApi.Controllers.Api.PP
//if (deleteIds != null && deleteIds.Any())
// BantchDeleteEntityNoCommit<T_BI_NOTIFICATION_TASK_NEW>(deleteIds);
});
}
catch (Exception ex)
{
if (!string.IsNullOrEmpty(ex.StackTrace))
throw new Exception("错误日志:[StackTrace]" + ex.StackTrace);
else
throw new Exception("【" + HttpContext.Request.Path + "】错误日志:[Message]" + ex.Message);
}
return true;
});
}
@ -3833,6 +3930,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
public JsonActionResult<bool> UpdateTaskTableNew([FromBody] KeywordPageFilter pageFilter)
{
return SafeExecute<bool>(() =>
{
try
{
var dt = DateTime.Now;
//最近一周
@ -3933,6 +4032,14 @@ namespace APT.PP.WebApi.Controllers.Api.PP
if (biTaskInfos != null && biTaskInfos.Any())
BantchSaveEntityNoCommit(biTaskInfos);
});
}
catch (Exception ex)
{
if (!string.IsNullOrEmpty(ex.StackTrace))
throw new Exception("错误日志:[StackTrace]" + ex.StackTrace);
else
throw new Exception("【" + HttpContext.Request.Path + "】错误日志:[Message]" + ex.Message);
}
return true;
});
}

View File

@ -30,14 +30,16 @@ namespace APT.PP.WebApi.Controllers.Api.PP
IFMSyncLogDetailService SyncLogDetailService { get; set; }
//IBSSafeCheckService SafeCheckService { get; set; }, IBSSafeCheckService safeCheckService
IPFSysLogService SysLogService { get; set; }
IBSOperateLogService BSOperateLogService { get; set; }
//private readonly ILogger<BSController> _logger = null;
public BSController(IFMNotificationTaskService notificationTaskService, IPFSysLogService sysLogService, IFMSyncLogDetailService syncLogDetailService)//, ILogger<BSController> logger
public BSController(IFMNotificationTaskService notificationTaskService, IPFSysLogService sysLogService, IFMSyncLogDetailService syncLogDetailService, IBSOperateLogService bsOperateLogService)//, ILogger<BSController> logger
{
NotificationTaskService = notificationTaskService;
//SafeCheckService = safeCheckService;
//_logger = logger;
NotificationTaskService = notificationTaskService;
SysLogService = sysLogService;
SyncLogDetailService = syncLogDetailService;
//_logger = logger;
BSOperateLogService = bsOperateLogService;
}
/// <summary>
@ -104,6 +106,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
public JsonActionResult<bool> CreateCheckPlanSet([FromBody] KeywordFilter filter)
{
return SafeExecute<bool>(() =>
{
try
{
DateTime CURR_TASK_START_TIME = DateTime.Now;
DateTime dtNow = DateTime.Now;
@ -833,6 +837,14 @@ namespace APT.PP.WebApi.Controllers.Api.PP
}
#endregion
}
}
catch (Exception ex)
{
if (!string.IsNullOrEmpty(ex.StackTrace))
throw new Exception("错误日志:[StackTrace]" + ex.StackTrace);
else
throw new Exception("【" + HttpContext.Request.Path + "】错误日志:[Message]" + ex.Message);
}
return true;
});
}
@ -847,6 +859,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
public JsonActionResult<bool> CreateCheckPlanSetClass([FromBody] KeywordFilter filter)
{
return SafeExecute<bool>(() =>
{
try
{
DateTime CURR_TASK_START_TIME = DateTime.Now;
DateTime dtNow = DateTime.Now;
@ -1242,17 +1256,19 @@ namespace APT.PP.WebApi.Controllers.Api.PP
task.UPDATE_SUCCES_TIME = DateTime.Now;
}
var listOperateLog = BSOperateLogService.GetListOperateLog(OPERATEPOINT_Enums.GotCheck, Guid.Empty, Guid.Empty, noticeDataIds, noticeUserIds, noticeUserNames, filter.OrgId, null, null);
//给 T_FM_NOTIFICATION_TASK 添加实体
NotificationTaskService.SendNotificationTask(noticeTitles, noticeDataIds, filter.GetOrgId(), noticeUserIds, noticeUserNames, listStartTime, listEndTime, 0, "BS032", () =>
{
if (listSafeCheckAdd.Any())
{
this.BantchAddEntityNoCommit(listSafeCheckAdd);
if (listOperateLog != null && listOperateLog.Any())
BantchSaveEntityNoCommit(listOperateLog);
if (task != null)
{
UpdateEntityNoCommit(task);
}
}
});
if (HttpContext.Items.ContainsKey("Count"))
@ -1270,6 +1286,14 @@ namespace APT.PP.WebApi.Controllers.Api.PP
}
#endregion
}
catch (Exception ex)
{
if (!string.IsNullOrEmpty(ex.StackTrace))
throw new Exception("错误日志:[StackTrace]" + ex.StackTrace);
else
throw new Exception("【" + HttpContext.Request.Path + "】错误日志:[Message]" + ex.Message);
}
return true;
});
}
@ -1301,6 +1325,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
public JsonActionResult<bool> BeginCheck([FromBody] KeywordFilter filter)
{
return SafeExecute<bool>(() =>
{
try
{
DateTime dtNow = DateTime.Now;
if (!string.IsNullOrEmpty(filter.Parameter1))
@ -1418,6 +1444,14 @@ namespace APT.PP.WebApi.Controllers.Api.PP
BantchSaveEntityNoCommit(checks);//检查记录表单 STATUCHECK (int)HMAuditStatusEnmu.审批中;
});
}
catch (Exception ex)
{
if (!string.IsNullOrEmpty(ex.StackTrace))
throw new Exception("错误日志:[StackTrace]" + ex.StackTrace);
else
throw new Exception("【" + HttpContext.Request.Path + "】错误日志:[Message]" + ex.Message);
}
return true;
});
}
@ -1489,6 +1523,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
public JsonActionResult<bool> CreateSubmitContentNotice([FromBody] KeywordFilter filter)
{
return SafeExecute<bool>(() =>
{
try
{
DateTime dtNow = DateTime.Now;
var run = this.GetEntity<T_FM_SYNC_TASK>(filter.Keyword);
@ -1592,11 +1628,20 @@ namespace APT.PP.WebApi.Controllers.Api.PP
});
}
}
catch (Exception ex)
{
if (!string.IsNullOrEmpty(ex.StackTrace))
throw new Exception("错误日志:[StackTrace]" + ex.StackTrace);
else
throw new Exception("【" + HttpContext.Request.Path + "】错误日志:[Message]" + ex.Message);
}
return true;
});
}
/// <summary>
/// 获取部门负责人(根据组织结构)
/// </summary>

View File

@ -64,6 +64,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
public JsonActionResult<bool> CreateDepartmentCompletion([FromBody] KeywordFilter filter)
{
return SafeExecute<bool>(() =>
{
try
{
List<T_FM_DEPARTMENT_COMPLETION> completions = new List<T_FM_DEPARTMENT_COMPLETION>();
BaseFilter baseFilter = new BaseFilter(filter.GetOrgId());
@ -221,6 +223,15 @@ namespace APT.PP.WebApi.Controllers.Api.PP
BantchAddEntityNoCommit(completions);
});
}
catch (Exception ex)
{
if (!string.IsNullOrEmpty(ex.StackTrace))
throw new Exception("错误日志:[StackTrace]" + ex.StackTrace);
else
throw new Exception("【" + HttpContext.Request.Path + "】错误日志:[Message]" + ex.Message);
}
return true;
});
}
@ -234,6 +245,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
public JsonActionResult<bool> CreateDepartmentCompletionNew([FromBody] KeywordFilter filter)
{
return SafeExecute<bool>(() =>
{
try
{
List<T_FM_DEPARTMENT_COMPLETION> completions = new List<T_FM_DEPARTMENT_COMPLETION>();
BaseFilter baseFilter = new BaseFilter(filter.GetOrgId());
@ -474,6 +487,15 @@ namespace APT.PP.WebApi.Controllers.Api.PP
}
});
}
catch (Exception ex)
{
if (!string.IsNullOrEmpty(ex.StackTrace))
throw new Exception("错误日志:[StackTrace]" + ex.StackTrace);
else
throw new Exception("【" + HttpContext.Request.Path + "】错误日志:[Message]" + ex.Message);
}
return true;
});
}
@ -506,7 +528,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
{
return SafeExecute<bool>(() =>
{
try
{
BaseFilter baseFilter = new BaseFilter(filter.GetOrgId());
var riskLevelProportions = new List<T_FM_RISK_LEVEL_PROPORTION>();
var riskTypeProportions = new List<T_FM_RISK_TYPE_PROPORTION>();
@ -573,6 +596,14 @@ namespace APT.PP.WebApi.Controllers.Api.PP
if (riskTypeProportions.Any() && riskTypeProportions.Count > 0)
BantchAddEntityNoCommit(riskTypeProportions);
});
}
catch (Exception ex)
{
if (!string.IsNullOrEmpty(ex.StackTrace))
throw new Exception("错误日志:[StackTrace]" + ex.StackTrace);
else
throw new Exception("【" + HttpContext.Request.Path + "】错误日志:[Message]" + ex.Message);
}
return true;
});
@ -586,6 +617,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
public JsonActionResult<bool> CreateDepartmentCompletionSort([FromBody] KeywordFilter filter)
{
return SafeExecute<bool>(() =>
{
try
{
List<T_FM_DEPARTMENT_COMPLETION_SORT> completionSortTemps = new List<T_FM_DEPARTMENT_COMPLETION_SORT>();
List<T_FM_DEPARTMENT_COMPLETION_SORT> completionSorts = new List<T_FM_DEPARTMENT_COMPLETION_SORT>();
@ -627,7 +660,14 @@ namespace APT.PP.WebApi.Controllers.Api.PP
if (completionSorts1.Any() && completionSorts1.Count > 0)
BantchAddEntityNoCommit(completionSorts1);
});
}
catch (Exception ex)
{
if (!string.IsNullOrEmpty(ex.StackTrace))
throw new Exception("错误日志:[StackTrace]" + ex.StackTrace);
else
throw new Exception("【" + HttpContext.Request.Path + "】错误日志:[Message]" + ex.Message);
}
return true;
});
}
@ -671,6 +711,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
//隐患总数
//var listCheckDetail = this.GetEntities<T_BS_SAFE_CHECK_DETAIL>(e => e.CHECKRESULT.HasValue && (e.CHECKRESULT == (int)CHECKRESULTEnum.Same || e.CHECKRESULT == (int)CHECKRESULTEnum.Other) && e.Nav_SafeCheck.APPROVE_ID.HasValue && e.Nav_SafeCheck.STATUCHECK == (int)FOPreMeetingStatusEnum.归档, null, new string[] { "Nav_SafeCheck" });
try
{
//隐患上报总数
var listAll = this.GetEntities<T_BS_RISK_SUBMIT_CONTENT>(e => e.ISBACK.HasValue && !e.ISBACK.Value && e.RiskContentState.HasValue && e.Nav_Department != null, null, new string[] { "Nav_Department" })
@ -734,6 +776,15 @@ namespace APT.PP.WebApi.Controllers.Api.PP
BantchAddEntityNoCommit(listResult);
});
}
catch (Exception ex)
{
if (!string.IsNullOrEmpty(ex.StackTrace))
throw new Exception("错误日志:[StackTrace]" + ex.StackTrace);
else
throw new Exception("【" + HttpContext.Request.Path + "】错误日志:[Message]" + ex.Message);
}
return true;
});
}
@ -748,6 +799,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
public JsonActionResult<bool> CreateWorkTiketCompletion([FromBody] KeywordFilter filter)
{
return SafeExecute<bool>(() =>
{
try
{
List<T_FM_WORK_TICKET_COMPLETION> completions = new List<T_FM_WORK_TICKET_COMPLETION>();
var jobIds = GetEntities<T_FO_CRUCIAL_LICENSE_JOB>(i => true, new BaseFilter(filter.GetOrgId())).Select(t => t.ID).ToList();
@ -800,6 +853,14 @@ namespace APT.PP.WebApi.Controllers.Api.PP
if (completions.Any() && completions.Count > 0)
BantchAddEntityNoCommit(completions);
});
}
catch (Exception ex)
{
if (!string.IsNullOrEmpty(ex.StackTrace))
throw new Exception("错误日志:[StackTrace]" + ex.StackTrace);
else
throw new Exception("【" + HttpContext.Request.Path + "】错误日志:[Message]" + ex.Message);
}
return true;
});
}
@ -814,6 +875,9 @@ namespace APT.PP.WebApi.Controllers.Api.PP
{
return SafeExecute<bool>(() =>
{
try
{
List<T_FM_WORK_TICKET_COMPLETION> completions = new List<T_FM_WORK_TICKET_COMPLETION>();
BaseFilter baseFilter = new BaseFilter(filter.GetOrgId());
var startTime = Convert.ToDateTime(DateTime.Now.AddMonths(-11).Year + "-" + DateTime.Now.AddMonths(-11).Month + "-01 00:00:00");
@ -896,6 +960,14 @@ namespace APT.PP.WebApi.Controllers.Api.PP
BantchAddEntityNoCommit(completions);
}
});
}
catch (Exception ex)
{
if (!string.IsNullOrEmpty(ex.StackTrace))
throw new Exception("错误日志:[StackTrace]" + ex.StackTrace);
else
throw new Exception("【" + HttpContext.Request.Path + "】错误日志:[Message]" + ex.Message);
}
return true;
});
}
@ -908,11 +980,21 @@ namespace APT.PP.WebApi.Controllers.Api.PP
public JsonActionResult<bool> BITask([FromBody] KeywordFilter filter)
{
return SafeExecute<bool>(() =>
{
try
{
//风险模块数据
getRiskType(filter);
//培训模块数据
getTrainPlan(filter);
}
catch (Exception ex)
{
if (!string.IsNullOrEmpty(ex.StackTrace))
throw new Exception("错误日志:[StackTrace]" + ex.StackTrace);
else
throw new Exception("【" + HttpContext.Request.Path + "】错误日志:[Message]" + ex.Message);
}
return true;
});
}
@ -926,6 +1008,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
public JsonActionResult<bool> getRiskType([FromBody] KeywordFilter filter)
{
return SafeExecute<bool>(() =>
{
try
{
DeleteEntity<T_BI_RISK_LEVEL1>(t => true);
DeleteEntity<T_BI_RISK_LEVEL2>(t => true);
@ -999,6 +1083,14 @@ namespace APT.PP.WebApi.Controllers.Api.PP
BantchAddEntityNoCommit(risk1s);
BantchAddEntityNoCommit(risk2s);
});
}
catch (Exception ex)
{
if (!string.IsNullOrEmpty(ex.StackTrace))
throw new Exception("错误日志:[StackTrace]" + ex.StackTrace);
else
throw new Exception("【" + HttpContext.Request.Path + "】错误日志:[Message]" + ex.Message);
}
return true;
});
}
@ -1011,6 +1103,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
public JsonActionResult<bool> getTrainPlan([FromBody] KeywordFilter filter)
{
return SafeExecute<bool>(() =>
{
try
{
DeleteEntity<T_BI_TRAIN_PLAN_COUNT>(t => true);
List<T_BI_TRAIN_PLAN_COUNT> items = new List<T_BI_TRAIN_PLAN_COUNT>();
@ -1036,6 +1130,14 @@ namespace APT.PP.WebApi.Controllers.Api.PP
{
BantchAddEntityNoCommit(items);
});
}
catch (Exception ex)
{
if (!string.IsNullOrEmpty(ex.StackTrace))
throw new Exception("错误日志:[StackTrace]" + ex.StackTrace);
else
throw new Exception("【" + HttpContext.Request.Path + "】错误日志:[Message]" + ex.Message);
}
return true;
});
}
@ -1049,6 +1151,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
public JsonActionResult<bool> CreateJobActivityCompletion([FromBody] KeywordFilter filter)
{
return SafeExecute<bool>(() =>
{
try
{
List<T_FM_JOB_ACTIVITY_COMPLETION> completions = new List<T_FM_JOB_ACTIVITY_COMPLETION>();
BaseFilter baseFilter = new BaseFilter(filter.GetOrgId());
@ -1186,6 +1290,14 @@ namespace APT.PP.WebApi.Controllers.Api.PP
}
});
}
catch (Exception ex)
{
if (!string.IsNullOrEmpty(ex.StackTrace))
throw new Exception("错误日志:[StackTrace]" + ex.StackTrace);
else
throw new Exception("【" + HttpContext.Request.Path + "】错误日志:[Message]" + ex.Message);
}
return true;
});
}
@ -1199,6 +1311,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
public JsonActionResult<bool> ExecuteJob([FromBody] KeywordPageFilter pageFilter)
{
return SafeExecute<bool>(() =>
{
try
{
var orgId = APT.Infrastructure.Api.AppContext.CurrentSession.OrgId.Value;
BaseFilter baseFilter = new BaseFilter(orgId);
@ -1272,6 +1386,14 @@ namespace APT.PP.WebApi.Controllers.Api.PP
BantchAddEntityNoCommit(techUserLists);
}
});
}
catch (Exception ex)
{
if (!string.IsNullOrEmpty(ex.StackTrace))
throw new Exception("错误日志:[StackTrace]" + ex.StackTrace);
else
throw new Exception("【" + HttpContext.Request.Path + "】错误日志:[Message]" + ex.Message);
}
return true;
});
}
@ -1294,6 +1416,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
public JsonActionResult<bool> CaculateRiskReason([FromBody] KeywordFilter filter)
{
return SafeExecute<bool>(() =>
{
try
{
DateTime dtMin = Convert.ToDateTime(DateTime.Now.ToString("yyyy-01-01 00:00:00"));
if (!string.IsNullOrEmpty(filter.Parameter1))
@ -1307,7 +1431,7 @@ namespace APT.PP.WebApi.Controllers.Api.PP
catch { }
}
BaseFilter filterR = new BaseFilter();
BaseFilter filterR = new BaseFilter(filter.OrgId);
filterR.SelectField = new List<string> { "ID", "NAME" };
var listRiskReasons = GetEntities<T_BS_RISK_REASON>(e => !e.IS_DELETED, filterR, null).OrderBy(e => e.NAME).ToList();
string CODE = DateTime.Now.ToString("yyyyMMddHHmm");
@ -1316,7 +1440,7 @@ namespace APT.PP.WebApi.Controllers.Api.PP
filterD.SelectField = new List<string> { "ID", "NAME", "DEPARTMENT_TYPE", "PARENT_ID" };
var listDep = GetEntities<T_FM_DEPARTMENT>(e => !e.IS_DELETED && e.ENABLE_STATUS == 0, filterD, null);
BaseFilter filterCR = new BaseFilter();
BaseFilter filterCR = new BaseFilter(filter.OrgId);
filterCR.SelectField = new List<string> { "ID", "RISK_SUBMIT_CONTENT_ID", "RISK_REASON_ID", "Nav_RiskSubmitContent.DEPARTMENT_ID", "Nav_RiskSubmitContent.ID" };
var listContentReason = GetEntities<T_BS_RISK_SUBMIT_CONTENT_REASON>(e => e.CREATE_TIME.HasValue && e.CREATE_TIME.Value >= dtMin && e.Nav_RiskSubmitContent.DEPARTMENT_ID.HasValue, filterCR, "Nav_RiskSubmitContent");
var year = dtMin.Year;
@ -1363,7 +1487,7 @@ namespace APT.PP.WebApi.Controllers.Api.PP
listReason.Add(reason);//地址引用 应该是支持
}
perCount = listContentReason.Where(e => e.Nav_RiskSubmitContent.DEPARTMENT_ID.Value == itemD.ID && e.RISK_REASON_ID == perReasonID).Count();
perCount = listContentReason.Where(e => e.RISK_REASON_ID == perReasonID && e.Nav_RiskSubmitContent != null && e.Nav_RiskSubmitContent.DEPARTMENT_ID.HasValue && e.Nav_RiskSubmitContent.DEPARTMENT_ID.Value == itemD.ID).Count();
reason.DEPARTMENT_TYPE = FMDepartmentType.;
reason.NUMD = depNum;
reason.COUNT = perCount;
@ -1389,7 +1513,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
listReason.Add(reason);//地址引用 应该是支持
}
perCount = listContentReason.Where(e => e.Nav_RiskSubmitContent.DEPARTMENT_ID.Value == itemD.ID && e.RISK_REASON_ID == perReasonID).Count();
//perCount = listContentReason.Where(e => e.Nav_RiskSubmitContent.DEPARTMENT_ID.Value == itemD.ID && e.RISK_REASON_ID == perReasonID).Count();
perCount = listContentReason.Where(e => e.RISK_REASON_ID == perReasonID && e.Nav_RiskSubmitContent != null && e.Nav_RiskSubmitContent.DEPARTMENT_ID.HasValue && e.Nav_RiskSubmitContent.DEPARTMENT_ID.Value == itemD.ID).Count();
perSubCount = 0;//每次清零 后相加
if (listSubDepID != null && listSubDepID.Any())
@ -1429,7 +1554,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
listReason.Add(reason);//地址引用 应该是支持
}
perCount = listContentReason.Where(e => e.Nav_RiskSubmitContent.DEPARTMENT_ID.Value == itemD.ID && e.RISK_REASON_ID == perReasonID).Count();
//perCount = listContentReason.Where(e => e.Nav_RiskSubmitContent.DEPARTMENT_ID.Value == itemD.ID && e.RISK_REASON_ID == perReasonID).Count();
perCount = listContentReason.Where(e => e.RISK_REASON_ID == perReasonID && e.Nav_RiskSubmitContent != null && e.Nav_RiskSubmitContent.DEPARTMENT_ID.HasValue && e.Nav_RiskSubmitContent.DEPARTMENT_ID.Value == itemD.ID).Count();
perSubCount = 0;//每次清零 后相加
if (listSubDepID != null && listSubDepID.Any())
@ -1487,6 +1613,15 @@ namespace APT.PP.WebApi.Controllers.Api.PP
if (UpdateResult != null && UpdateResult.Any())
BantchSaveEntityNoCommit(UpdateResult);
});
}
catch (Exception ex)
{
if (!string.IsNullOrEmpty(ex.StackTrace))
throw new Exception("错误日志:[StackTrace]" + ex.StackTrace);
else
throw new Exception("【" + HttpContext.Request.Path + "】错误日志:[Message]" + ex.Message);
}
return true;
});
}
@ -1520,13 +1655,17 @@ namespace APT.PP.WebApi.Controllers.Api.PP
BaseFilter filterD = new BaseFilter(filter.OrgId);
filterD.SelectField = new List<string> { "ID", "NAME", "DEPARTMENT_TYPE", "PARENT_ID" };
filterD.IgnoreDataRule = true;
IEnumerable<T_FM_DEPARTMENT> listDep = null;
try
{
//可能会报错
listDep = GetEntities<T_FM_DEPARTMENT>(e => !e.IS_DELETED && e.ENABLE_STATUS == 0, filterD, null);
listDep = GetEntities<T_FM_DEPARTMENT>(e => !e.IS_DELETED && e.ENABLE_STATUS == 0, filterD, null);//这句代码在跑批的时候 listDep 获取不到数据
//listDep = GetEntities<T_FM_DEPARTMENT>(e => !e.IS_DELETED && e.ENABLE_STATUS == 0, null, null);
}
catch
{
}
catch { }
if ((listDep == null || !listDep.Any()))
{
@ -2035,7 +2174,6 @@ namespace APT.PP.WebApi.Controllers.Api.PP
Logger.LogError("错误日志:[StackTrace]" + ex.StackTrace);
else
Logger.LogError("【" + HttpContext.Request.Path + "】错误日志:[Message]" + ex.Message);
Logger.LogError("filter" + filter.ToJson());
}
return true;
});
@ -2106,30 +2244,41 @@ namespace APT.PP.WebApi.Controllers.Api.PP
BaseFilter filterD = new BaseFilter(filter.OrgId);
filterD.SelectField = new List<string> { "ID", "NAME", "DEPARTMENT_TYPE", "PARENT_ID" };
var listDep = GetEntities<T_FM_DEPARTMENT>(e => !e.IS_DELETED && e.ENABLE_STATUS == 0, filterD, null);
IEnumerable<T_FM_DEPARTMENT> listDep = null;
try
{
listDep = GetEntities<T_FM_DEPARTMENT>(e => !e.IS_DELETED && e.ENABLE_STATUS == 0, filterD, null);
}
catch { }
if ((listDep == null || !listDep.Any()))
{
return true; //如果 没有部门 或者 为设置隐患原因 一般不会这样
}
BaseFilter filterC = new BaseFilter();
BaseFilter filterC = new BaseFilter(filter.OrgId);
filterC.SelectField = new List<string> { "ID", "DEPARTMENTID", "CREATE_TIME", "ENABLE_STATUS", "STATUSPLAN", "CHECK_TYPE_ID" };
filterC.IgnoreDataRule = true;
//隐患已上报 统计 有没有处理 处理的及时性
var dtSafeCheck = GetEntities<T_BS_SAFE_CHECK>(e => e.CHECK_TYPE_ID.HasValue && e.DEPARTMENTID.HasValue && e.CREATE_TIME.HasValue && e.ENABLE_STATUS == 0 && e.CREATE_TIME.Value >= dtMin, filterC, null); //&& e.STATUSPLAN > 0
IEnumerable<T_BS_SAFE_CHECK> dtSafeCheck = null;
try
{
dtSafeCheck = GetEntities<T_BS_SAFE_CHECK>(e => e.CHECK_TYPE_ID.HasValue && e.DEPARTMENTID.HasValue && e.CREATE_TIME.HasValue && e.ENABLE_STATUS == 0 && e.CREATE_TIME.Value >= dtMin, filterC, null); //&& e.STATUSPLAN > 0
}
catch { }
if ((dtSafeCheck == null || !dtSafeCheck.Any()))
{
return true; //如果没有检查信息
}
BaseFilter filterCT = new BaseFilter();
BaseFilter filterCT = new BaseFilter(filter.OrgId);
filterCT.SelectField = new List<string> { "ID", "NAME", "IS_DELETED", "ENABLE_STATUS" };
var listCheckTypeAll = GetEntities<T_BS_CHECK_TYPE>(null, filterCT, null);//
IEnumerable<T_BS_CHECK_TYPE> listCheckTypeAll = null;
try
{
listCheckTypeAll = GetEntities<T_BS_CHECK_TYPE>(null, filterCT, null);//
}
catch { }
if ((listCheckTypeAll == null || !listCheckTypeAll.Any()))
{
return true; //如果没有检查信息
@ -2428,6 +2577,9 @@ namespace APT.PP.WebApi.Controllers.Api.PP
{
return SafeExecute<bool>(() =>
{
try
{
Guid? DataID = null;
Guid? KEY = null;
if (!string.IsNullOrEmpty(filter.Parameter1))
@ -2481,6 +2633,15 @@ namespace APT.PP.WebApi.Controllers.Api.PP
}
FMNoticeService.SendMsg(NOTICETYPE.Meeting, DataID, KEY, task);
}
catch (Exception ex)
{
if (!string.IsNullOrEmpty(ex.StackTrace))
throw new Exception("错误日志:[StackTrace]" + ex.StackTrace);
else
throw new Exception("【" + HttpContext.Request.Path + "】错误日志:[Message]" + ex.Message);
}
return true;
});
}

View File

@ -93,10 +93,12 @@ namespace APT.WebApi.Models
}
}
}
if (!context.HttpContext.Items.ContainsKey("syncLog"))
{
context.HttpContext.Items.Add("syncLog", log);
context.HttpContext.Items.Add("syncID", log.ID);
}
}
/// <summary>
/// 在方法执行之后

View File

@ -19,7 +19,7 @@
<appendToFile value="true" />
<rollingStyle value="Composite" />
<staticLogFileName value="false" />
<datePattern value="yyyyMMdd'.log'" />
<datePattern value="yyyyMM'.log'" />
<maxSizeRollBackups value="10" />
<maximumFileSize value="1MB" />
<layout type="log4net.Layout.PatternLayout">

View File

@ -62,7 +62,6 @@ namespace APT.HM.WebApi.App_Start
builder.RegisterType<BSSafeCheckService>().As<IBSSafeCheckService>().InstancePerLifetimeScope();
builder.RegisterType<BIHomeService>().As<IBIHomeService>().InstancePerLifetimeScope();
builder.RegisterType<FMNoticeService>().As<IFMNoticeService>().InstancePerLifetimeScope();
builder.RegisterType<BSOperateLogService>().As<IBSOperateLogService>().InstancePerLifetimeScope();
}
}
}

View File

@ -103,6 +103,7 @@ namespace APT.SC.WebApi.Controllers.Api.CM
entity.Nav_ListProject = null;
List<T_FM_NOTIFICATION_TASK> listTask = null;
T_FM_NOTIFICATION_TASK taskEnd = null;
#region
if (listUsers == null || !listUsers.Any())
@ -146,6 +147,15 @@ namespace APT.SC.WebApi.Controllers.Api.CM
{
throw new Exception("未获取到评估明细,操作失败!");
}
if (entity.TaskID != Guid.Empty)
{
taskEnd = NotificationTaskService.GetEntityTask(entity.TaskID, "CM026_SHOWPRINT");
if (!taskEnd.SOURCE_DATA_ID.HasValue)
{
taskEnd.SOURCE_DATA_ID = entity.ID;
}
}
}
#endregion
@ -155,6 +165,8 @@ namespace APT.SC.WebApi.Controllers.Api.CM
{
if (entity != null)
UpdateEntityNoCommit(entity);
if (taskEnd != null)
UpdateEntityNoCommit(taskEnd);
if (listUsers != null && listUsers.Any())//明细
BantchSaveEntityNoCommit(listUsers);
if (listListProject != null && listListProject.Any())//关联应急预案

View File

@ -126,10 +126,19 @@ namespace APT.SC.WebApi.Controllers.Api.CM
entity.APPROVE_ID = Guid.NewGuid();
var serialCode = DateTime.Now.ToString("yyyyMMddHHmmss");
MFlowPermitService.InsertApprove("CM" + serialCode, "CM002", null, entity.ID, "CM002_SHOWPRINT", entity.TaskID, true, () =>
T_FM_NOTIFICATION_TASK taskEnd = null;
if (entity.TaskID != Guid.Empty)
{
taskEnd = NotificationTaskService.GetEntityTask(entity.TaskID, "CM002_SHOWPRINT");
if (!taskEnd.SOURCE_DATA_ID.HasValue)
taskEnd.SOURCE_DATA_ID = entity.ID;
}
MFlowPermitService.InsertApprove("CM" + serialCode, "CM002", null, entity.ID, "CM002_SHOWPRINT", null, true, () =>
{
if (entity != null)
UpdateEntityNoCommit(entity);
if (taskEnd != null)//明细
UpdateEntityNoCommit(taskEnd);
if (listPlanDetail != null && listPlanDetail.Any())//明细
BantchSaveEntityNoCommit(listPlanDetail);
if (listFiles != null && listFiles.Any())//关联应急预案

View File

@ -112,7 +112,11 @@ namespace APT.SC.WebApi.Controllers.Api.CM
}
T_FM_NOTIFICATION_TASK taskEnd = null;
if (entity.TaskID != Guid.Empty)
{
taskEnd = NotificationTaskService.GetEntityTask(entity.TaskID, "CM018_SHOWPRINT");
if (!taskEnd.SOURCE_DATA_ID.HasValue)
taskEnd.SOURCE_DATA_ID = entity.ID;
}
if (entity.ENABLE_STATUS == FMEnableStatusEnum.)
{

View File

@ -66,8 +66,8 @@ namespace APT.WebApi.Models
}
var TalSeconds = (DateTime.Now - START_TIME).TotalSeconds;
//if (TalSeconds > 1)
//{
if (TalSeconds > 0.8)
{
T_FM_SYNC_LOG log = new T_FM_SYNC_LOG()
{
ID = Guid.NewGuid(),
@ -121,6 +121,7 @@ namespace APT.WebApi.Models
}
}
}
}
catch
{
}

View File

@ -19,7 +19,7 @@
<appendToFile value="true" />
<rollingStyle value="Composite" />
<staticLogFileName value="false" />
<datePattern value="yyyyMMdd'.log'" />
<datePattern value="yyyyMM'.log'" />
<maxSizeRollBackups value="10" />
<maximumFileSize value="1MB" />
<layout type="log4net.Layout.PatternLayout">

View File

@ -19,7 +19,7 @@
<appendToFile value="true" />
<rollingStyle value="Composite" />
<staticLogFileName value="false" />
<datePattern value="yyyyMMdd'.log'" />
<datePattern value="yyyyMM'.log'" />
<maxSizeRollBackups value="10" />
<maximumFileSize value="1MB" />
<layout type="log4net.Layout.PatternLayout">