1234
This commit is contained in:
commit
3d534d453f
@ -12380,238 +12380,301 @@ namespace APT.BaseData.Services.DomainServices
|
|||||||
var entity = this.GetEntity<T_SK_DOUBLE_PREVENT_MECHANISM>(modelApp != null ? modelApp.DATA_ID : entityInt.DATA_ID);
|
var entity = this.GetEntity<T_SK_DOUBLE_PREVENT_MECHANISM>(modelApp != null ? modelApp.DATA_ID : entityInt.DATA_ID);
|
||||||
entity.STATUS = PFStandardStatus.Archived;
|
entity.STATUS = PFStandardStatus.Archived;
|
||||||
List<Guid> libraryIds = new List<Guid>();
|
List<Guid> libraryIds = new List<Guid>();
|
||||||
List<Guid> libraryDepartIds = new List<Guid>();
|
List<Guid> libraryDepartIds = new List<Guid>();
|
||||||
|
List<Guid> libraryPostIds = new List<Guid>();
|
||||||
|
List<Guid> libraryPostDetIds = new List<Guid>();
|
||||||
List<Guid> detailIds = new List<Guid>();
|
List<Guid> detailIds = new List<Guid>();
|
||||||
List<Guid> contentIds = new List<Guid>();
|
List<Guid> contentIds = new List<Guid>();
|
||||||
List<Guid> departIds = new List<Guid>();
|
List<Guid> departIds = new List<Guid>();
|
||||||
List<Guid> postIds = new List<Guid>();
|
List<Guid> postIds = new List<Guid>();
|
||||||
List<Guid> hiddenIds = new List<Guid>();
|
List<Guid> hiddenIds = new List<Guid>();
|
||||||
List<T_SK_ENTERPRISE_LIBRARY> libraryList = new List<T_SK_ENTERPRISE_LIBRARY>();
|
List<T_SK_ENTERPRISE_LIBRARY> libraryList = new List<T_SK_ENTERPRISE_LIBRARY>();
|
||||||
List<T_SK_ENTERPRISE_LIBRARY_DEPART> libraryDepartList = new List<T_SK_ENTERPRISE_LIBRARY_DEPART>();
|
List<T_SK_ENTERPRISE_LIBRARY_DEPART> libraryDepartList = new List<T_SK_ENTERPRISE_LIBRARY_DEPART>();
|
||||||
|
List<T_SK_ENTERPRISE_LIBRARY_POST> libraryPostList = new List<T_SK_ENTERPRISE_LIBRARY_POST>();
|
||||||
|
List<T_SK_ENTERPRISE_LIBRARY_POST_DETAIL> libraryPostDetList = new List<T_SK_ENTERPRISE_LIBRARY_POST_DETAIL>();
|
||||||
List<T_SK_ENTERPRISE_LIBRARY_DETAIL> detailList = new List<T_SK_ENTERPRISE_LIBRARY_DETAIL>();
|
List<T_SK_ENTERPRISE_LIBRARY_DETAIL> detailList = new List<T_SK_ENTERPRISE_LIBRARY_DETAIL>();
|
||||||
List<T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT> contentList = new List<T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT>();
|
List<T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT> contentList = new List<T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT>();
|
||||||
List<T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_DEPART> departList = new List<T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_DEPART>();
|
List<T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_DEPART> departList = new List<T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_DEPART>();
|
||||||
List<T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_POST> postList = new List<T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_POST>();
|
List<T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_POST> postList = new List<T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_POST>();
|
||||||
List<T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_HIDDEN> hiddenList = new List<T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_HIDDEN>();
|
List<T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_HIDDEN> hiddenList = new List<T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_HIDDEN>();
|
||||||
//var librarys = this.GetEntities<T_SK_ENTERPRISE_LIBRARY>(t => t.ENABLE_STATUS == 0, new BaseFilter(entity.ORG_ID));
|
//var librarys = this.GetEntities<T_SK_ENTERPRISE_LIBRARY>(t => t.ENABLE_STATUS == 0, new BaseFilter(entity.ORG_ID));
|
||||||
|
//var libraryPosts = this.GetEntities<T_SK_ENTERPRISE_LIBRARY_POST>(t => t.IS_DELETED == false, new BaseFilter(entity.ORG_ID));
|
||||||
|
//var libraryPostDets = this.GetEntities<T_SK_ENTERPRISE_LIBRARY_POST_DETAIL>(t => t.IS_DELETED == false, new BaseFilter(entity.ORG_ID));
|
||||||
|
//var libraryDeparts = this.GetEntities<T_SK_ENTERPRISE_LIBRARY_DEPART>(t => t.IS_DELETED == false, new BaseFilter(entity.ORG_ID));
|
||||||
//var libraryDetails = this.GetEntities<T_SK_ENTERPRISE_LIBRARY_DETAIL>(t => t.IS_DELETED == false, new BaseFilter(entity.ORG_ID));
|
//var libraryDetails = this.GetEntities<T_SK_ENTERPRISE_LIBRARY_DETAIL>(t => t.IS_DELETED == false, new BaseFilter(entity.ORG_ID));
|
||||||
//var libraryDeparts = this.GetEntities<T_SK_ENTERPRISE_LIBRARY_DEPART>(t => t.IS_DELETED == false, new BaseFilter(entity.ORG_ID));
|
|
||||||
//var libraryContents = this.GetEntities<T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT>(t => t.IS_DELETED == false, new BaseFilter(entity.ORG_ID));
|
//var libraryContents = this.GetEntities<T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT>(t => t.IS_DELETED == false, new BaseFilter(entity.ORG_ID));
|
||||||
//var contentDeparts = this.GetEntities<T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_DEPART>(t => t.IS_DELETED == false, new BaseFilter(entity.ORG_ID));
|
//var contentDeparts = this.GetEntities<T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_DEPART>(t => t.IS_DELETED == false, new BaseFilter(entity.ORG_ID));
|
||||||
//var contentPosts = this.GetEntities<T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_POST>(t => t.IS_DELETED == false, new BaseFilter(entity.ORG_ID));
|
//var contentPosts = this.GetEntities<T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_POST>(t => t.IS_DELETED == false, new BaseFilter(entity.ORG_ID));
|
||||||
//var libraryHiddens = this.GetEntities<T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_HIDDEN>(t => t.IS_DELETED == false, new BaseFilter(entity.ORG_ID));
|
//var libraryHiddens = this.GetEntities<T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_HIDDEN>(t => t.IS_DELETED == false, new BaseFilter(entity.ORG_ID));
|
||||||
if (entity != null)
|
//if (entity != null)
|
||||||
{
|
//{
|
||||||
//var details = this.GetEntities<T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL>(t => t.DOUBLE_PREVENT_MECHANISM_ID == entity.ID, new BaseFilter(entity.ORG_ID), "Nav_DoubleDetailMeasures.Nav_DetailMeasureContents.Nav_DetailMeasureContentPosts.Nav_DetailPosts", "Nav_DoubleDetailMeasures.Nav_DetailMeasureContents.Nav_DetailMeasureContentHiddens", "Nav_DetailPosts");
|
// var details = this.GetEntities<T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL>(t => t.DOUBLE_PREVENT_MECHANISM_ID == entity.ID, new BaseFilter(entity.ORG_ID), "Nav_DoubleDetailMeasures.Nav_DetailMeasureContents.Nav_DetailMeasureContentPosts.Nav_DetailPosts", "Nav_DoubleDetailMeasures.Nav_DetailMeasureContents.Nav_DetailMeasureContentHiddens", "Nav_DetailPosts", "Nav_DetailDeparts.Nav_Department", "Nav_DetailDeparts.Nav_DepartDetails.Nav_Post");
|
||||||
//if (details != null && details.Any())
|
// if (details != null && details.Any())
|
||||||
{
|
// {
|
||||||
//foreach (var item in details)
|
// foreach (var item in details)
|
||||||
{
|
// {
|
||||||
//var libraryTemp = librarys.FirstOrDefault(t => t.MineType == item.MineType && t.AREA_ID == item.AREA_ID && t.RISK_NAME == item.RISK_NAME && t.RISK_DESCRIPTION == item.RISK_DESCRIPTION && t.EVALUATE_C == item.EVALUATE_C && t.EVALUATE_L == item.EVALUATE_L && t.EVALUATE_E == item.EVALUATE_E && t.TYPE_ID == item.TYPE_ID && t.EVALUATE_LEVEL == item.EVALUATE_LEVEL);
|
// var libraryTemp = librarys.FirstOrDefault(t => t.PRODUCTION_UNIT_ID == item.PRODUCTION_UNIT_ID && t.AREA_ID == item.AREA_ID && t.RISK_NAME == item.RISK_NAME && t.RISK_DESCRIPTION == item.RISK_DESCRIPTION && t.EVALUATE_C == item.EVALUATE_C && t.EVALUATE_L == item.EVALUATE_L && t.EVALUATE_E == item.EVALUATE_E && t.TYPE_ID == item.TYPE_ID && t.EVALUATE_LEVEL == item.EVALUATE_LEVEL);
|
||||||
//if (libraryTemp == null)
|
// if (libraryTemp == null && item.MARK == SKMarkEnum.Add && item.ENABLE_STATUS == SKEnableStatusEnum.Yes)
|
||||||
//{
|
// {
|
||||||
// T_SK_ENTERPRISE_LIBRARY library = new T_SK_ENTERPRISE_LIBRARY();
|
// T_SK_ENTERPRISE_LIBRARY library = new T_SK_ENTERPRISE_LIBRARY();
|
||||||
// library.ORG_ID = item.ORG_ID;
|
// library.ORG_ID = item.ORG_ID;
|
||||||
// library.MineType = item.MineType;
|
// library.MineType = item.MineType;
|
||||||
// library.AREA_ID = item.AREA_ID;
|
// library.PRODUCTION_UNIT_ID = item.PRODUCTION_UNIT_ID;
|
||||||
// library.RISK_NAME = item.RISK_NAME;
|
// library.AREA_ID = item.AREA_ID;
|
||||||
// library.RISK_DESCRIPTION = item.RISK_DESCRIPTION;
|
// library.RISK_NAME = item.RISK_NAME;
|
||||||
// library.TYPE_ID = item.TYPE_ID;
|
// library.RISK_DESCRIPTION = item.RISK_DESCRIPTION;
|
||||||
// library.EVALUATE_C = item.EVALUATE_C;
|
// library.TYPE_ID = item.TYPE_ID;
|
||||||
// library.EVALUATE_E = item.EVALUATE_E;
|
// library.EVALUATE_C = item.EVALUATE_C;
|
||||||
// library.EVALUATE_L = item.EVALUATE_L;
|
// library.EVALUATE_E = item.EVALUATE_E;
|
||||||
// library.EVALUATE_SCORE = item.EVALUATE_SCORE;
|
// library.EVALUATE_L = item.EVALUATE_L;
|
||||||
// library.EVALUATE_LEVEL = item.EVALUATE_LEVEL;
|
// library.EVALUATE_SCORE = item.EVALUATE_SCORE;
|
||||||
// libraryList.Add(library);
|
// library.EVALUATE_LEVEL = item.EVALUATE_LEVEL;
|
||||||
// if (item.Nav_DoubleDetailMeasures != null && item.Nav_DoubleDetailMeasures.Any())
|
// library.EMERGENCY = item.EMERGENCY;
|
||||||
// {
|
// libraryList.Add(library);
|
||||||
// foreach (var item2 in item.Nav_DoubleDetailMeasures)
|
// if (item.Nav_DoubleDetailMeasures != null && item.Nav_DoubleDetailMeasures.Any())
|
||||||
// {
|
// {
|
||||||
// T_SK_ENTERPRISE_LIBRARY_DETAIL detail = new T_SK_ENTERPRISE_LIBRARY_DETAIL();
|
// foreach (var item2 in item.Nav_DoubleDetailMeasures)
|
||||||
// detail.ENTERPRISE_LIBRARY_ID = library.ID;
|
// {
|
||||||
// detail.ORG_ID = item2.ORG_ID;
|
// T_SK_ENTERPRISE_LIBRARY_DETAIL detail = new T_SK_ENTERPRISE_LIBRARY_DETAIL();
|
||||||
// detail.MEASURES_NAME = item2.MEASURES_NAME;
|
// detail.ENTERPRISE_LIBRARY_ID = library.ID;
|
||||||
// detail.EMERGENCY = item2.EMERGENCY;
|
// detail.ORG_ID = item2.ORG_ID;
|
||||||
// detail.NUM = item2.NUM;
|
// detail.MEASURES_NAME = item2.MEASURES_NAME;
|
||||||
// detailList.Add(detail);
|
// detail.NUM = item2.NUM;
|
||||||
// if (item2.Nav_DetailMeasureContents != null && item2.Nav_DetailMeasureContents.Any())
|
// detailList.Add(detail);
|
||||||
// {
|
// if (item2.Nav_DetailMeasureContents != null && item2.Nav_DetailMeasureContents.Any())
|
||||||
// foreach (var item3 in item2.Nav_DetailMeasureContents)
|
// {
|
||||||
// {
|
// foreach (var item3 in item2.Nav_DetailMeasureContents)
|
||||||
// T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT content = new T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT();
|
// {
|
||||||
// content.ENTERPRISE_LIBRARY_DETAIL_ID = detail.ID;
|
// T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT content = new T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT();
|
||||||
// content.ORG_ID = item3.ORG_ID;
|
// content.ENTERPRISE_LIBRARY_DETAIL_ID = detail.ID;
|
||||||
// content.CHECK_CONTENTS_ID = item3.CHECK_CONTENTS_ID;
|
// content.ORG_ID = item3.ORG_ID;
|
||||||
// content.CHECK_CONTENT = item3.CHECK_CONTENT;
|
// content.CHECK_CONTENTS_ID = item3.CHECK_CONTENTS_ID;
|
||||||
// content.CHECK_BASIC = item3.CHECK_BASIC;
|
// content.CHECK_CONTENT = item3.CHECK_CONTENT;
|
||||||
// content.CHECK_STANDARD = item3.CHECK_STANDARD;
|
// content.CHECK_BASIC = item3.CHECK_BASIC;
|
||||||
// content.NUM = item3.NUM;
|
// content.CHECK_STANDARD = item3.CHECK_STANDARD;
|
||||||
// contentList.Add(content);
|
// content.NUM = item3.NUM;
|
||||||
// if (item3.Nav_DetailMeasureContentHiddens != null && item3.Nav_DetailMeasureContentHiddens.Any())
|
// contentList.Add(content);
|
||||||
// {
|
// if (item3.Nav_DetailMeasureContentHiddens != null && item3.Nav_DetailMeasureContentHiddens.Any())
|
||||||
// foreach (var item4 in item3.Nav_DetailMeasureContentHiddens)
|
// {
|
||||||
// {
|
// foreach (var item4 in item3.Nav_DetailMeasureContentHiddens)
|
||||||
// T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_HIDDEN hidden = new T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_HIDDEN();
|
// {
|
||||||
// hidden.ENTERPRISE_LIBRARY_DETAIL_CONTENT_ID = content.ID;
|
// T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_HIDDEN hidden = new T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_HIDDEN();
|
||||||
// hidden.ORG_ID = item4.ORG_ID;
|
// hidden.ENTERPRISE_LIBRARY_DETAIL_CONTENT_ID = content.ID;
|
||||||
// hidden.HIDDEN_DESCRIPTION = item4.HIDDEN_DESCRIPTION;
|
// hidden.ORG_ID = item4.ORG_ID;
|
||||||
// hidden.HIDDEN_LEVEL = item4.HIDDEN_LEVEL;
|
// hidden.HIDDEN_DESCRIPTION = item4.HIDDEN_DESCRIPTION;
|
||||||
// hidden.RECTIFICATION_MEASURES = item4.RECTIFICATION_MEASURES;
|
// hidden.HIDDEN_LEVEL = item4.HIDDEN_LEVEL;
|
||||||
// hidden.NUM = item4.NUM;
|
// hidden.RECTIFICATION_MEASURES = item4.RECTIFICATION_MEASURES;
|
||||||
// hiddenList.Add(hidden);
|
// hidden.NUM = item4.NUM;
|
||||||
// }
|
// hiddenList.Add(hidden);
|
||||||
// }
|
// }
|
||||||
// if (item3.Nav_DetailMeasureContentPosts != null && item3.Nav_DetailMeasureContentPosts.Any())
|
// }
|
||||||
// {
|
// if (item3.Nav_DetailMeasureContentPosts != null && item3.Nav_DetailMeasureContentPosts.Any())
|
||||||
// foreach (var item4 in item3.Nav_DetailMeasureContentPosts)
|
// {
|
||||||
// {
|
// foreach (var item4 in item3.Nav_DetailMeasureContentPosts)
|
||||||
// T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_DEPART hidden = new T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_DEPART();
|
// {
|
||||||
// hidden.ENTERPRISE_LIBRARY_DETAIL_CONTENT_ID = content.ID;
|
// T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_DEPART hidden = new T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_DEPART();
|
||||||
// hidden.ORG_ID = item4.ORG_ID;
|
// hidden.ENTERPRISE_LIBRARY_DETAIL_CONTENT_ID = content.ID;
|
||||||
// hidden.CHECK_CYCLE = item4.CHECK_CYCLE;
|
// hidden.ORG_ID = item4.ORG_ID;
|
||||||
// hidden.DEPARTMENT_ID = item4.DEPARTMENT_ID;
|
// hidden.CHECK_CYCLE = item4.CHECK_CYCLE;
|
||||||
// hidden.CHECK_TYPE = item4.CHECK_TYPE;
|
// hidden.DEPARTMENT_ID = item4.DEPARTMENT_ID;
|
||||||
// hidden.CHECK_TYPE_ID = item4.CHECK_TYPE_ID;
|
// hidden.CHECK_TYPE = item4.CHECK_TYPE;
|
||||||
// hidden.NUM = item4.NUM;
|
// hidden.CHECK_TYPE_ID = item4.CHECK_TYPE_ID;
|
||||||
// departList.Add(hidden);
|
// hidden.NUM = item4.NUM;
|
||||||
// if (item4.Nav_DetailPosts != null && item4.Nav_DetailPosts.Any())
|
// departList.Add(hidden);
|
||||||
// {
|
// if (item4.Nav_DetailPosts != null && item4.Nav_DetailPosts.Any())
|
||||||
// foreach (var item5 in item4.Nav_DetailPosts)
|
// {
|
||||||
// {
|
// foreach (var item5 in item4.Nav_DetailPosts)
|
||||||
// T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_POST depart = new T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_POST();
|
// {
|
||||||
// depart.ENTERPRISE_LIBRARY_DETAIL_CONTENT_DEPART_ID = hidden.ID;
|
// T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_POST depart = new T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_POST();
|
||||||
// depart.ORG_ID = item5.ORG_ID;
|
// depart.ENTERPRISE_LIBRARY_DETAIL_CONTENT_DEPART_ID = hidden.ID;
|
||||||
// depart.POST_ID = item5.POST_ID;
|
// depart.ORG_ID = item5.ORG_ID;
|
||||||
// postList.Add(depart);
|
// depart.POST_ID = item5.POST_ID;
|
||||||
// }
|
// postList.Add(depart);
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// if (item.Nav_DetailPosts != null && item.Nav_DetailPosts.Any())
|
// }
|
||||||
// {
|
// if (item.Nav_DetailPosts != null && item.Nav_DetailPosts.Any())
|
||||||
// foreach (var item3 in item.Nav_DetailPosts)
|
// {
|
||||||
// {
|
// foreach (var item3 in item.Nav_DetailPosts)
|
||||||
// T_SK_ENTERPRISE_LIBRARY_DEPART post = new T_SK_ENTERPRISE_LIBRARY_DEPART();
|
// {
|
||||||
// post.ENTERPRISE_LIBRARY_ID = library.ID;
|
// T_SK_ENTERPRISE_LIBRARY_DEPART post = new T_SK_ENTERPRISE_LIBRARY_DEPART();
|
||||||
// post.ORG_ID = item3.ORG_ID;
|
// post.ENTERPRISE_LIBRARY_ID = library.ID;
|
||||||
// post.DEPARTMENT_ID = item3.DEPARTMENT_ID;
|
// post.ORG_ID = item3.ORG_ID;
|
||||||
// post.DEPARTMENT_TYPE = item3.DEPARTMENT_TYPE;
|
// post.DEPARTMENT_ID = item3.DEPARTMENT_ID;
|
||||||
// post.USER_ID = item3.USER_ID;
|
// post.DEPARTMENT_TYPE = item3.DEPARTMENT_TYPE;
|
||||||
// libraryDepartList.Add(post);
|
// post.USER_ID = item3.USER_ID;
|
||||||
// }
|
// libraryDepartList.Add(post);
|
||||||
// }
|
// }
|
||||||
//}
|
// }
|
||||||
//else
|
// if (item.Nav_DetailDeparts != null && item.Nav_DetailDeparts.Any())
|
||||||
//{
|
// {
|
||||||
// libraryIds.Add(libraryTemp.ID);
|
// foreach (var item3 in item.Nav_DetailDeparts)
|
||||||
// libraryDepartIds = libraryDeparts.Where(t => libraryIds.Contains(t.ENTERPRISE_LIBRARY_ID)).Select(m=>m.ID).ToList();
|
// {
|
||||||
// detailIds = libraryDetails.Where(t => libraryIds.Contains(t.ENTERPRISE_LIBRARY_ID)).Select(m => m.ID).ToList();
|
// T_SK_ENTERPRISE_LIBRARY_POST post = new T_SK_ENTERPRISE_LIBRARY_POST();
|
||||||
// contentIds = libraryContents.Where(t => detailIds.Contains(t.ENTERPRISE_LIBRARY_DETAIL_ID)).Select(m => m.ID).ToList();
|
// post.ENTERPRISE_LIBRARY_ID = library.ID;
|
||||||
// hiddenIds = libraryHiddens.Where(t => contentIds.Contains(t.ENTERPRISE_LIBRARY_DETAIL_CONTENT_ID)).Select(m => m.ID).ToList();
|
// post.ORG_ID = item3.ORG_ID;
|
||||||
// departIds = contentDeparts.Where(t => contentIds.Contains(t.ENTERPRISE_LIBRARY_DETAIL_CONTENT_ID)).Select(m => m.ID).ToList();
|
// post.DEPARTMENT_ID = item3.DEPARTMENT_ID;
|
||||||
// postIds = contentPosts.Where(t => departIds.Contains(t.ENTERPRISE_LIBRARY_DETAIL_CONTENT_DEPART_ID)).Select(m => m.ID).ToList();
|
// libraryPostList.Add(post);
|
||||||
// T_SK_ENTERPRISE_LIBRARY library = new T_SK_ENTERPRISE_LIBRARY();
|
// if (item3.Nav_DepartDetails != null && item3.Nav_DepartDetails.Any())
|
||||||
// library.ORG_ID = item.ORG_ID;
|
// {
|
||||||
// library.MineType = item.MineType;
|
// foreach (var item4 in item3.Nav_DepartDetails)
|
||||||
// library.AREA_ID = item.AREA_ID;
|
// {
|
||||||
// library.RISK_NAME = item.RISK_NAME;
|
// T_SK_ENTERPRISE_LIBRARY_POST_DETAIL depart = new T_SK_ENTERPRISE_LIBRARY_POST_DETAIL();
|
||||||
// library.RISK_DESCRIPTION = item.RISK_DESCRIPTION;
|
// depart.ENTERPRISE_LIBRARY_POST_ID = post.ID;
|
||||||
// library.TYPE_ID = item.TYPE_ID;
|
// depart.ORG_ID = item4.ORG_ID;
|
||||||
// library.EVALUATE_C = item.EVALUATE_C;
|
// depart.POST_ID = item4.POST_ID;
|
||||||
// library.EVALUATE_E = item.EVALUATE_E;
|
// libraryPostDetList.Add(depart);
|
||||||
// library.EVALUATE_L = item.EVALUATE_L;
|
// }
|
||||||
// library.EVALUATE_SCORE = item.EVALUATE_SCORE;
|
// }
|
||||||
// library.EVALUATE_LEVEL = item.EVALUATE_LEVEL;
|
// }
|
||||||
// libraryList.Add(library);
|
// }
|
||||||
// if (item.Nav_DoubleDetailMeasures != null && item.Nav_DoubleDetailMeasures.Any())
|
// }
|
||||||
// {
|
// else
|
||||||
// foreach (var item2 in item.Nav_DoubleDetailMeasures)
|
// {
|
||||||
// {
|
// if (item.ENABLE_STATUS == SKEnableStatusEnum.No)
|
||||||
// T_SK_ENTERPRISE_LIBRARY_DETAIL detail = new T_SK_ENTERPRISE_LIBRARY_DETAIL();
|
// {
|
||||||
// detail.ENTERPRISE_LIBRARY_ID = library.ID;
|
// librarys.Where(t => t.PRODUCTION_UNIT_ID == item.PRODUCTION_UNIT_ID && t.AREA_ID == item.AREA_ID && t.RISK_NAME == item.RISK_NAME && t.RISK_DESCRIPTION == item.RISK_DESCRIPTION && t.EVALUATE_C == item.EVALUATE_C && t.EVALUATE_L == item.EVALUATE_L && t.EVALUATE_E == item.EVALUATE_E && t.TYPE_ID == item.TYPE_ID && t.EVALUATE_LEVEL == item.EVALUATE_LEVEL).ForEach(m => m.ENABLE_STATUS = FMEnableStatusEnum.禁用);
|
||||||
// detail.ORG_ID = item2.ORG_ID;
|
// libraryList.AddRange(librarys);
|
||||||
// detail.MEASURES_NAME = item2.MEASURES_NAME;
|
// }
|
||||||
// detail.EMERGENCY = item2.EMERGENCY;
|
// else
|
||||||
// detail.NUM = item2.NUM;
|
// {
|
||||||
// detailList.Add(detail);
|
// libraryIds.Add(libraryTemp.ID);
|
||||||
// if (item2.Nav_DetailMeasureContents != null && item2.Nav_DetailMeasureContents.Any())
|
// libraryPostIds = libraryPosts.Where(t => libraryIds.Contains(t.ENTERPRISE_LIBRARY_ID)).Select(m => m.ID).ToList();
|
||||||
// {
|
// libraryPostDetIds = libraryPostDets.Where(t => libraryPostIds.Contains(t.ENTERPRISE_LIBRARY_POST_ID)).Select(m => m.ID).ToList();
|
||||||
// foreach (var item3 in item2.Nav_DetailMeasureContents)
|
// libraryDepartIds = libraryDeparts.Where(t => libraryIds.Contains(t.ENTERPRISE_LIBRARY_ID)).Select(m => m.ID).ToList();
|
||||||
// {
|
// detailIds = libraryDetails.Where(t => libraryIds.Contains(t.ENTERPRISE_LIBRARY_ID)).Select(m => m.ID).ToList();
|
||||||
// T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT content = new T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT();
|
// contentIds = libraryContents.Where(t => detailIds.Contains(t.ENTERPRISE_LIBRARY_DETAIL_ID)).Select(m => m.ID).ToList();
|
||||||
// content.ENTERPRISE_LIBRARY_DETAIL_ID = detail.ID;
|
// hiddenIds = libraryHiddens.Where(t => contentIds.Contains(t.ENTERPRISE_LIBRARY_DETAIL_CONTENT_ID)).Select(m => m.ID).ToList();
|
||||||
// content.ORG_ID = item3.ORG_ID;
|
// departIds = contentDeparts.Where(t => contentIds.Contains(t.ENTERPRISE_LIBRARY_DETAIL_CONTENT_ID)).Select(m => m.ID).ToList();
|
||||||
// content.CHECK_CONTENTS_ID = item3.CHECK_CONTENTS_ID;
|
// postIds = contentPosts.Where(t => departIds.Contains(t.ENTERPRISE_LIBRARY_DETAIL_CONTENT_DEPART_ID)).Select(m => m.ID).ToList();
|
||||||
// content.CHECK_CONTENT = item3.CHECK_CONTENT;
|
// T_SK_ENTERPRISE_LIBRARY library = new T_SK_ENTERPRISE_LIBRARY();
|
||||||
// content.CHECK_BASIC = item3.CHECK_BASIC;
|
// library.ORG_ID = item.ORG_ID;
|
||||||
// content.CHECK_STANDARD = item3.CHECK_STANDARD;
|
// library.MineType = item.MineType;
|
||||||
// content.NUM = item3.NUM;
|
// library.PRODUCTION_UNIT_ID = item.PRODUCTION_UNIT_ID;
|
||||||
// contentList.Add(content);
|
// library.AREA_ID = item.AREA_ID;
|
||||||
// if (item3.Nav_DetailMeasureContentHiddens != null && item3.Nav_DetailMeasureContentHiddens.Any())
|
// library.RISK_NAME = item.RISK_NAME;
|
||||||
// {
|
// library.RISK_DESCRIPTION = item.RISK_DESCRIPTION;
|
||||||
// foreach (var item4 in item3.Nav_DetailMeasureContentHiddens)
|
// library.TYPE_ID = item.TYPE_ID;
|
||||||
// {
|
// library.EVALUATE_C = item.EVALUATE_C;
|
||||||
// T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_HIDDEN hidden = new T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_HIDDEN();
|
// library.EVALUATE_E = item.EVALUATE_E;
|
||||||
// hidden.ENTERPRISE_LIBRARY_DETAIL_CONTENT_ID = content.ID;
|
// library.EVALUATE_L = item.EVALUATE_L;
|
||||||
// hidden.ORG_ID = item4.ORG_ID;
|
// library.EVALUATE_SCORE = item.EVALUATE_SCORE;
|
||||||
// hidden.HIDDEN_DESCRIPTION = item4.HIDDEN_DESCRIPTION;
|
// library.EVALUATE_LEVEL = item.EVALUATE_LEVEL;
|
||||||
// hidden.HIDDEN_LEVEL = item4.HIDDEN_LEVEL;
|
// library.EMERGENCY = item.EMERGENCY;
|
||||||
// hidden.RECTIFICATION_MEASURES = item4.RECTIFICATION_MEASURES;
|
// libraryList.Add(library);
|
||||||
// hidden.NUM = item4.NUM;
|
// if (item.Nav_DoubleDetailMeasures != null && item.Nav_DoubleDetailMeasures.Any())
|
||||||
// hiddenList.Add(hidden);
|
// {
|
||||||
// }
|
// foreach (var item2 in item.Nav_DoubleDetailMeasures)
|
||||||
// }
|
// {
|
||||||
// if (item3.Nav_DetailMeasureContentPosts != null && item3.Nav_DetailMeasureContentPosts.Any())
|
// T_SK_ENTERPRISE_LIBRARY_DETAIL detail = new T_SK_ENTERPRISE_LIBRARY_DETAIL();
|
||||||
// {
|
// detail.ENTERPRISE_LIBRARY_ID = library.ID;
|
||||||
// foreach (var item4 in item3.Nav_DetailMeasureContentPosts)
|
// detail.ORG_ID = item2.ORG_ID;
|
||||||
// {
|
// detail.MEASURES_NAME = item2.MEASURES_NAME;
|
||||||
// T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_DEPART hidden = new T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_DEPART();
|
// detail.EMERGENCY = item2.EMERGENCY;
|
||||||
// hidden.ENTERPRISE_LIBRARY_DETAIL_CONTENT_ID = content.ID;
|
// detail.NUM = item2.NUM;
|
||||||
// hidden.ORG_ID = item4.ORG_ID;
|
// detailList.Add(detail);
|
||||||
// hidden.CHECK_CYCLE = item4.CHECK_CYCLE;
|
// if (item2.Nav_DetailMeasureContents != null && item2.Nav_DetailMeasureContents.Any())
|
||||||
// hidden.DEPARTMENT_ID = item4.DEPARTMENT_ID;
|
// {
|
||||||
// hidden.CHECK_TYPE = item4.CHECK_TYPE;
|
// foreach (var item3 in item2.Nav_DetailMeasureContents)
|
||||||
// hidden.CHECK_TYPE_ID = item4.CHECK_TYPE_ID;
|
// {
|
||||||
// hidden.NUM = item4.NUM;
|
// T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT content = new T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT();
|
||||||
// departList.Add(hidden);
|
// content.ENTERPRISE_LIBRARY_DETAIL_ID = detail.ID;
|
||||||
// if (item4.Nav_DetailPosts != null && item4.Nav_DetailPosts.Any())
|
// content.ORG_ID = item3.ORG_ID;
|
||||||
// {
|
// content.CHECK_CONTENTS_ID = item3.CHECK_CONTENTS_ID;
|
||||||
// foreach (var item5 in item4.Nav_DetailPosts)
|
// content.CHECK_CONTENT = item3.CHECK_CONTENT;
|
||||||
// {
|
// content.CHECK_BASIC = item3.CHECK_BASIC;
|
||||||
// T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_POST depart = new T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_POST();
|
// content.CHECK_STANDARD = item3.CHECK_STANDARD;
|
||||||
// depart.ENTERPRISE_LIBRARY_DETAIL_CONTENT_DEPART_ID = hidden.ID;
|
// content.NUM = item3.NUM;
|
||||||
// depart.ORG_ID = item5.ORG_ID;
|
// contentList.Add(content);
|
||||||
// depart.POST_ID = item5.POST_ID;
|
// if (item3.Nav_DetailMeasureContentHiddens != null && item3.Nav_DetailMeasureContentHiddens.Any())
|
||||||
// postList.Add(depart);
|
// {
|
||||||
// }
|
// foreach (var item4 in item3.Nav_DetailMeasureContentHiddens)
|
||||||
// }
|
// {
|
||||||
// }
|
// T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_HIDDEN hidden = new T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_HIDDEN();
|
||||||
// }
|
// hidden.ENTERPRISE_LIBRARY_DETAIL_CONTENT_ID = content.ID;
|
||||||
// }
|
// hidden.ORG_ID = item4.ORG_ID;
|
||||||
// }
|
// hidden.HIDDEN_DESCRIPTION = item4.HIDDEN_DESCRIPTION;
|
||||||
// }
|
// hidden.HIDDEN_LEVEL = item4.HIDDEN_LEVEL;
|
||||||
// }
|
// hidden.RECTIFICATION_MEASURES = item4.RECTIFICATION_MEASURES;
|
||||||
// if (item.Nav_DetailPosts != null && item.Nav_DetailPosts.Any())
|
// hidden.NUM = item4.NUM;
|
||||||
// {
|
// hiddenList.Add(hidden);
|
||||||
// foreach (var item3 in item.Nav_DetailPosts)
|
// }
|
||||||
// {
|
// }
|
||||||
// T_SK_ENTERPRISE_LIBRARY_DEPART post = new T_SK_ENTERPRISE_LIBRARY_DEPART();
|
// if (item3.Nav_DetailMeasureContentPosts != null && item3.Nav_DetailMeasureContentPosts.Any())
|
||||||
// post.ENTERPRISE_LIBRARY_ID = library.ID;
|
// {
|
||||||
// post.ORG_ID = item3.ORG_ID;
|
// foreach (var item4 in item3.Nav_DetailMeasureContentPosts)
|
||||||
// post.DEPARTMENT_ID = item3.DEPARTMENT_ID;
|
// {
|
||||||
// post.DEPARTMENT_TYPE = item3.DEPARTMENT_TYPE;
|
// T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_DEPART hidden = new T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_DEPART();
|
||||||
// post.USER_ID = item3.USER_ID;
|
// hidden.ENTERPRISE_LIBRARY_DETAIL_CONTENT_ID = content.ID;
|
||||||
// libraryDepartList.Add(post);
|
// hidden.ORG_ID = item4.ORG_ID;
|
||||||
// }
|
// hidden.CHECK_CYCLE = item4.CHECK_CYCLE;
|
||||||
// }
|
// hidden.DEPARTMENT_ID = item4.DEPARTMENT_ID;
|
||||||
//}
|
// hidden.CHECK_TYPE = item4.CHECK_TYPE;
|
||||||
}
|
// hidden.CHECK_TYPE_ID = item4.CHECK_TYPE_ID;
|
||||||
}
|
// hidden.NUM = item4.NUM;
|
||||||
}
|
// departList.Add(hidden);
|
||||||
|
// if (item4.Nav_DetailPosts != null && item4.Nav_DetailPosts.Any())
|
||||||
|
// {
|
||||||
|
// foreach (var item5 in item4.Nav_DetailPosts)
|
||||||
|
// {
|
||||||
|
// T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_POST depart = new T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_POST();
|
||||||
|
// depart.ENTERPRISE_LIBRARY_DETAIL_CONTENT_DEPART_ID = hidden.ID;
|
||||||
|
// depart.ORG_ID = item5.ORG_ID;
|
||||||
|
// depart.POST_ID = item5.POST_ID;
|
||||||
|
// postList.Add(depart);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// if (item.Nav_DetailPosts != null && item.Nav_DetailPosts.Any())
|
||||||
|
// {
|
||||||
|
// foreach (var item3 in item.Nav_DetailPosts)
|
||||||
|
// {
|
||||||
|
// T_SK_ENTERPRISE_LIBRARY_DEPART post = new T_SK_ENTERPRISE_LIBRARY_DEPART();
|
||||||
|
// post.ENTERPRISE_LIBRARY_ID = library.ID;
|
||||||
|
// post.ORG_ID = item3.ORG_ID;
|
||||||
|
// post.DEPARTMENT_ID = item3.DEPARTMENT_ID;
|
||||||
|
// post.DEPARTMENT_TYPE = item3.DEPARTMENT_TYPE;
|
||||||
|
// post.USER_ID = item3.USER_ID;
|
||||||
|
// libraryDepartList.Add(post);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// if (item.Nav_DetailDeparts != null && item.Nav_DetailDeparts.Any())
|
||||||
|
// {
|
||||||
|
// foreach (var item3 in item.Nav_DetailDeparts)
|
||||||
|
// {
|
||||||
|
// T_SK_ENTERPRISE_LIBRARY_POST post = new T_SK_ENTERPRISE_LIBRARY_POST();
|
||||||
|
// post.ENTERPRISE_LIBRARY_ID = library.ID;
|
||||||
|
// post.ORG_ID = item3.ORG_ID;
|
||||||
|
// post.DEPARTMENT_ID = item3.DEPARTMENT_ID;
|
||||||
|
// libraryPostList.Add(post);
|
||||||
|
// if (item3.Nav_DepartDetails != null && item3.Nav_DepartDetails.Any())
|
||||||
|
// {
|
||||||
|
// foreach (var item4 in item3.Nav_DepartDetails)
|
||||||
|
// {
|
||||||
|
// T_SK_ENTERPRISE_LIBRARY_POST_DETAIL depart = new T_SK_ENTERPRISE_LIBRARY_POST_DETAIL();
|
||||||
|
// depart.ENTERPRISE_LIBRARY_POST_ID = post.ID;
|
||||||
|
// depart.ORG_ID = item4.ORG_ID;
|
||||||
|
// depart.POST_ID = item4.POST_ID;
|
||||||
|
// libraryPostDetList.Add(depart);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//}
|
||||||
UnifiedCommit(() =>
|
UnifiedCommit(() =>
|
||||||
{
|
{
|
||||||
if (modelApp != null)
|
if (modelApp != null)
|
||||||
@ -12640,16 +12703,20 @@ namespace APT.BaseData.Services.DomainServices
|
|||||||
BantchDeleteEntityNoCommit<T_SK_ENTERPRISE_LIBRARY>(libraryIds);
|
BantchDeleteEntityNoCommit<T_SK_ENTERPRISE_LIBRARY>(libraryIds);
|
||||||
if (libraryList != null && libraryList.Any())
|
if (libraryList != null && libraryList.Any())
|
||||||
BantchSaveEntityNoCommit(libraryList);
|
BantchSaveEntityNoCommit(libraryList);
|
||||||
|
if (libraryDepartList != null && libraryDepartList.Any())
|
||||||
|
BantchSaveEntityNoCommit(libraryDepartList);
|
||||||
|
if (libraryPostList != null && libraryPostList.Any())
|
||||||
|
BantchSaveEntityNoCommit(libraryPostList);
|
||||||
|
if (libraryPostDetList != null && libraryPostDetList.Any())
|
||||||
|
BantchSaveEntityNoCommit(libraryPostDetList);
|
||||||
if (detailList != null && detailList.Any())
|
if (detailList != null && detailList.Any())
|
||||||
BantchSaveEntityNoCommit(detailList);
|
BantchSaveEntityNoCommit(detailList);
|
||||||
if (libraryDepartList != null && libraryDepartList.Any())
|
|
||||||
BantchSaveEntityNoCommit(libraryDepartList);
|
|
||||||
if (contentList != null && contentList.Any())
|
if (contentList != null && contentList.Any())
|
||||||
BantchSaveEntityNoCommit(contentList);
|
BantchSaveEntityNoCommit(contentList);
|
||||||
if (departList != null && departList.Any())
|
|
||||||
BantchSaveEntityNoCommit(departList);
|
|
||||||
if (hiddenList != null && hiddenList.Any())
|
if (hiddenList != null && hiddenList.Any())
|
||||||
BantchSaveEntityNoCommit(hiddenList);
|
BantchSaveEntityNoCommit(hiddenList);
|
||||||
|
if (departList != null && departList.Any())
|
||||||
|
BantchSaveEntityNoCommit(departList);
|
||||||
if (postList != null && postList.Any())
|
if (postList != null && postList.Any())
|
||||||
BantchSaveEntityNoCommit(postList);
|
BantchSaveEntityNoCommit(postList);
|
||||||
});
|
});
|
||||||
|
|||||||
@ -14384,6 +14384,7 @@ builder.HasOne(t => t.Nav_ProductionUnit).WithMany().HasForeignKey(t => t.PRODUC
|
|||||||
builder.HasOne(t => t.Nav_UserSend).WithMany().HasForeignKey(t => t.USER_ID_SEND).OnDelete(DeleteBehavior.Restrict);
|
builder.HasOne(t => t.Nav_UserSend).WithMany().HasForeignKey(t => t.USER_ID_SEND).OnDelete(DeleteBehavior.Restrict);
|
||||||
builder.Ignore(t => t.MONTHStr);
|
builder.Ignore(t => t.MONTHStr);
|
||||||
builder.Ignore(t => t.DATAStr);
|
builder.Ignore(t => t.DATAStr);
|
||||||
|
builder.Ignore(t => t.WEEKStr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@ -15281,6 +15282,7 @@ builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).
|
|||||||
builder.Property(t => t.NAME).HasMaxLength(500);
|
builder.Property(t => t.NAME).HasMaxLength(500);
|
||||||
builder.Ignore(t => t.MONTHStr);
|
builder.Ignore(t => t.MONTHStr);
|
||||||
builder.Ignore(t => t.DATAStr);
|
builder.Ignore(t => t.DATAStr);
|
||||||
|
builder.Ignore(t => t.WEEKStr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@ -156,6 +156,9 @@ namespace APT.MS.Domain.Entities.SK
|
|||||||
[DataFieldIngore]
|
[DataFieldIngore]
|
||||||
public string MONTHStr { get; set; }
|
public string MONTHStr { get; set; }
|
||||||
[DataFieldIngore]
|
[DataFieldIngore]
|
||||||
public string DATAStr { get; set; }
|
public string DATAStr { get; set; }
|
||||||
|
|
||||||
|
[DataFieldIngore]
|
||||||
|
public string WEEKStr { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -78,6 +78,9 @@ namespace APT.MS.Domain.Entities.SK
|
|||||||
[DataFieldIngore]
|
[DataFieldIngore]
|
||||||
public string MONTHStr { get; set; }
|
public string MONTHStr { get; set; }
|
||||||
[DataFieldIngore]
|
[DataFieldIngore]
|
||||||
public string DATAStr { get; set; }
|
public string DATAStr { get; set; }
|
||||||
|
|
||||||
|
[DataFieldIngore]
|
||||||
|
public string WEEKStr { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,128 +1,137 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
// T4模板文件:基础接口类
|
|
||||||
// 此代码由T4模板自动生成
|
|
||||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
using APT.Infrastructure.Core;
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
//------------------------------------------------------------------------------
|
||||||
using System.Collections.Generic;
|
// T4模板文件:基础接口类
|
||||||
using APT.Utility;
|
// 此代码由T4模板自动生成
|
||||||
using APT.Infrastructure.Api;
|
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||||
using APT.BaseData.Domain.ApiModel.PF;
|
//------------------------------------------------------------------------------
|
||||||
namespace APT.LG.WebApi.Controllers.Api
|
using APT.Infrastructure.Core;
|
||||||
{
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using APT.Utility;
|
||||||
|
using APT.Infrastructure.Api;
|
||||||
|
using APT.BaseData.Domain.ApiModel.PF;
|
||||||
|
namespace APT.LG.WebApi.Controllers.Api
|
||||||
|
{
|
||||||
using APT.BaseData.Domain.Entities.LG;
|
using APT.BaseData.Domain.Entities.LG;
|
||||||
#region Oprate-表单操作日志表
|
|
||||||
/// <summary>
|
#region Oprate-表单操作日志表
|
||||||
/// 表单操作日志表
|
/// <summary>
|
||||||
/// </summary>
|
/// 表单操作日志表
|
||||||
[Route("api/LG/Oprate")]
|
/// </summary>
|
||||||
public partial class OprateController : AuthorizeApiController<T_LG_OPRATE>
|
[Route("api/LG/Oprate")]
|
||||||
{
|
public partial class OprateController : AuthorizeApiController<T_LG_OPRATE>
|
||||||
/// <summary>
|
{
|
||||||
/// 查询所有数据
|
/// <summary>
|
||||||
/// </summary>
|
/// 查询所有数据
|
||||||
/// <param name="filter">过滤实体</param>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <param name="filter">过滤实体</param>
|
||||||
[HttpPost, Route("Entities")]
|
/// <returns></returns>
|
||||||
public JsonActionResult<IEnumerable<T_LG_OPRATE>> Entities([FromBody]KeywordFilter filter)
|
[HttpPost, Route("Entities")]
|
||||||
{
|
public JsonActionResult<IEnumerable<T_LG_OPRATE>> Entities([FromBody]KeywordFilter filter)
|
||||||
return WitEntities(null, filter);
|
{
|
||||||
}
|
return WitEntities(null, filter);
|
||||||
|
}
|
||||||
/// <summary>
|
|
||||||
/// 排序查询所有数据
|
/// <summary>
|
||||||
/// </summary>
|
/// 排序查询所有数据
|
||||||
/// <param name="filter">过滤实体</param>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <param name="filter">过滤实体</param>
|
||||||
|
/// <returns></returns>
|
||||||
[HttpPost, Route("OrderEntities")]
|
|
||||||
public JsonActionResult<IEnumerable<T_LG_OPRATE>> OrderEntities([FromBody]KeywordFilter filter)
|
[HttpPost, Route("OrderEntities")]
|
||||||
{
|
public JsonActionResult<IEnumerable<T_LG_OPRATE>> OrderEntities([FromBody]KeywordFilter filter)
|
||||||
return WitOrderEntities(null, filter);
|
{
|
||||||
}
|
return WitOrderEntities(null, filter);
|
||||||
|
}
|
||||||
/// <summary>
|
|
||||||
/// 分页查询数据
|
/// <summary>
|
||||||
/// </summary>
|
/// 分页查询数据
|
||||||
/// <param name="pageFilter">分页过滤实体</param>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <param name="pageFilter">分页过滤实体</param>
|
||||||
[HttpPost, Route("Paged")]
|
/// <returns></returns>
|
||||||
public PagedActionResult<T_LG_OPRATE> Paged([FromBody]KeywordPageFilter pageFilter)
|
[HttpPost, Route("Paged")]
|
||||||
{
|
public PagedActionResult<T_LG_OPRATE> Paged([FromBody]KeywordPageFilter pageFilter)
|
||||||
return WitPaged(null, pageFilter);
|
{
|
||||||
}
|
return WitPaged(null, pageFilter);
|
||||||
|
}
|
||||||
/// <summary>
|
|
||||||
/// 排序分页查询数据
|
/// <summary>
|
||||||
/// </summary>
|
/// 排序分页查询数据
|
||||||
/// <param name="pageFilter">分页过滤实体</param>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <param name="pageFilter">分页过滤实体</param>
|
||||||
[HttpPost, Route("OrderPaged")]
|
/// <returns></returns>
|
||||||
public PagedActionResult<T_LG_OPRATE> OrderPaged([FromBody]KeywordPageFilter pageFilter)
|
[HttpPost, Route("OrderPaged")]
|
||||||
{
|
public PagedActionResult<T_LG_OPRATE> OrderPaged([FromBody]KeywordPageFilter pageFilter)
|
||||||
return WitOrderPaged(null, pageFilter);
|
{
|
||||||
}
|
return WitOrderPaged(null, pageFilter);
|
||||||
|
}
|
||||||
/// <summary>
|
|
||||||
/// 根据主键删除数据
|
/// <summary>
|
||||||
/// </summary>
|
/// 根据主键删除数据
|
||||||
/// <param name="id">主键ID</param>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <param name="id">主键ID</param>
|
||||||
[HttpGet, Route("Delete")]
|
/// <returns></returns>
|
||||||
public JsonActionResult<bool> Delete(string id)
|
[HttpGet, Route("Delete")]
|
||||||
{
|
public JsonActionResult<bool> Delete(string id)
|
||||||
return WitRealDelete(id);
|
{
|
||||||
}
|
return WitRealDelete(id);
|
||||||
|
}
|
||||||
/// <summary>
|
|
||||||
/// 更新或新增数据
|
/// <summary>
|
||||||
/// </summary>
|
/// 更新或新增数据
|
||||||
/// <param name="entity">对象实体</param>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <param name="entity">对象实体</param>
|
||||||
[HttpPost, Route("Update")]
|
/// <returns></returns>
|
||||||
public JsonActionResult<bool> Update([FromBody]T_LG_OPRATE entity)
|
[HttpPost, Route("Update")]
|
||||||
{
|
public JsonActionResult<bool> Update([FromBody]T_LG_OPRATE entity)
|
||||||
return WitUpdate(entity);
|
{
|
||||||
}
|
return WitUpdate(entity);
|
||||||
|
}
|
||||||
/// <summary>
|
|
||||||
/// 批量更新
|
/// <summary>
|
||||||
/// </summary>
|
/// 批量更新
|
||||||
/// <param name="entity">对象实体</param>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <param name="entity">对象实体</param>
|
||||||
[HttpPost, Route("BatchUpdate")]
|
/// <returns></returns>
|
||||||
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_LG_OPRATE> entity)
|
[HttpPost, Route("BatchUpdate")]
|
||||||
{
|
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_LG_OPRATE> entity)
|
||||||
return WitBantchUpdate(entity?.Data);
|
{
|
||||||
}
|
return WitBantchUpdate(entity?.Data);
|
||||||
|
}
|
||||||
/// <summary>
|
|
||||||
/// 批量删除数据
|
/// <summary>
|
||||||
/// </summary>
|
/// 批量删除数据
|
||||||
/// <param name="ids">id字符串(id用逗号分隔)</param>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <param name="ids">id字符串(id用逗号分隔)</param>
|
||||||
[HttpGet, Route("BatchDelete")]
|
/// <returns></returns>
|
||||||
public JsonActionResult<bool> BatchDelete(string ids)
|
[HttpGet, Route("BatchDelete")]
|
||||||
{
|
public JsonActionResult<bool> BatchDelete(string ids)
|
||||||
return WitRealBatchDelete(ids);
|
{
|
||||||
}
|
return WitRealBatchDelete(ids);
|
||||||
|
}
|
||||||
/// <summary>
|
|
||||||
/// 获得单条实体数据
|
/// <summary>
|
||||||
/// </summary>
|
/// 获得单条实体数据
|
||||||
/// <param name="filter">过滤实体</param>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <param name="filter">过滤实体</param>
|
||||||
[HttpPost, Route("Get")]
|
/// <returns></returns>
|
||||||
public JsonActionResult<T_LG_OPRATE> Get([FromBody] KeywordFilter filter)
|
[HttpPost, Route("Get")]
|
||||||
{
|
public JsonActionResult<T_LG_OPRATE> Get([FromBody] KeywordFilter filter)
|
||||||
return WitEntity(null, filter);
|
{
|
||||||
}
|
return WitEntity(null, filter);
|
||||||
|
}
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@ -1,356 +1,370 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
// T4模板文件:基础接口类
|
|
||||||
// 此代码由T4模板自动生成
|
|
||||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
using APT.Infrastructure.Core;
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
//------------------------------------------------------------------------------
|
||||||
using System.Collections.Generic;
|
// T4模板文件:基础接口类
|
||||||
using APT.Utility;
|
// 此代码由T4模板自动生成
|
||||||
using APT.Infrastructure.Api;
|
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||||
using APT.BaseData.Domain.ApiModel.PF;
|
//------------------------------------------------------------------------------
|
||||||
namespace APT.NW.WebApi.Controllers.Api
|
using APT.Infrastructure.Core;
|
||||||
{
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using APT.Utility;
|
||||||
|
using APT.Infrastructure.Api;
|
||||||
|
using APT.BaseData.Domain.ApiModel.PF;
|
||||||
|
namespace APT.NW.WebApi.Controllers.Api
|
||||||
|
{
|
||||||
using APT.BaseData.Domain.Entities.NW;
|
using APT.BaseData.Domain.Entities.NW;
|
||||||
#region Enterprise-子企业表
|
|
||||||
/// <summary>
|
#region Enterprise-子企业表
|
||||||
/// 子企业表
|
/// <summary>
|
||||||
/// </summary>
|
/// 子企业表
|
||||||
[Route("api/NW/Enterprise")]
|
/// </summary>
|
||||||
public partial class EnterpriseController : AuthorizeTreeApiController<T_NW_ENTERPRISE>
|
[Route("api/NW/Enterprise")]
|
||||||
{
|
public partial class EnterpriseController : AuthorizeTreeApiController<T_NW_ENTERPRISE>
|
||||||
/// <summary>
|
{
|
||||||
/// 查询所有数据
|
/// <summary>
|
||||||
/// </summary>
|
/// 查询所有数据
|
||||||
/// <param name="filter">过滤实体</param>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <param name="filter">过滤实体</param>
|
||||||
[HttpPost, Route("Entities")]
|
/// <returns></returns>
|
||||||
public JsonActionResult<IEnumerable<T_NW_ENTERPRISE>> Entities([FromBody]KeywordFilter filter)
|
[HttpPost, Route("Entities")]
|
||||||
{
|
public JsonActionResult<IEnumerable<T_NW_ENTERPRISE>> Entities([FromBody]KeywordFilter filter)
|
||||||
return WitEntities(null, filter);
|
{
|
||||||
}
|
return WitEntities(null, filter);
|
||||||
|
}
|
||||||
/// <summary>
|
|
||||||
/// 排序查询所有数据
|
/// <summary>
|
||||||
/// </summary>
|
/// 排序查询所有数据
|
||||||
/// <param name="filter">过滤实体</param>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <param name="filter">过滤实体</param>
|
||||||
|
/// <returns></returns>
|
||||||
[HttpPost, Route("OrderEntities")]
|
|
||||||
public JsonActionResult<IEnumerable<T_NW_ENTERPRISE>> OrderEntities([FromBody]KeywordFilter filter)
|
[HttpPost, Route("OrderEntities")]
|
||||||
{
|
public JsonActionResult<IEnumerable<T_NW_ENTERPRISE>> OrderEntities([FromBody]KeywordFilter filter)
|
||||||
return WitOrderEntities(null, filter);
|
{
|
||||||
}
|
return WitOrderEntities(null, filter);
|
||||||
|
}
|
||||||
/// <summary>
|
|
||||||
/// 分页查询数据
|
/// <summary>
|
||||||
/// </summary>
|
/// 分页查询数据
|
||||||
/// <param name="pageFilter">分页过滤实体</param>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <param name="pageFilter">分页过滤实体</param>
|
||||||
[HttpPost, Route("Paged")]
|
/// <returns></returns>
|
||||||
public PagedActionResult<T_NW_ENTERPRISE> Paged([FromBody]KeywordPageFilter pageFilter)
|
[HttpPost, Route("Paged")]
|
||||||
{
|
public PagedActionResult<T_NW_ENTERPRISE> Paged([FromBody]KeywordPageFilter pageFilter)
|
||||||
return WitPaged(null, pageFilter);
|
{
|
||||||
}
|
return WitPaged(null, pageFilter);
|
||||||
|
}
|
||||||
/// <summary>
|
|
||||||
/// 排序分页查询数据
|
/// <summary>
|
||||||
/// </summary>
|
/// 排序分页查询数据
|
||||||
/// <param name="pageFilter">分页过滤实体</param>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <param name="pageFilter">分页过滤实体</param>
|
||||||
[HttpPost, Route("OrderPaged")]
|
/// <returns></returns>
|
||||||
public PagedActionResult<T_NW_ENTERPRISE> OrderPaged([FromBody]KeywordPageFilter pageFilter)
|
[HttpPost, Route("OrderPaged")]
|
||||||
{
|
public PagedActionResult<T_NW_ENTERPRISE> OrderPaged([FromBody]KeywordPageFilter pageFilter)
|
||||||
return WitOrderPaged(null, pageFilter);
|
{
|
||||||
}
|
return WitOrderPaged(null, pageFilter);
|
||||||
|
}
|
||||||
/// <summary>
|
|
||||||
/// 根据主键删除数据
|
/// <summary>
|
||||||
/// </summary>
|
/// 根据主键删除数据
|
||||||
/// <param name="id">主键ID</param>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <param name="id">主键ID</param>
|
||||||
[HttpGet, Route("Delete")]
|
/// <returns></returns>
|
||||||
public JsonActionResult<bool> Delete(string id)
|
[HttpGet, Route("Delete")]
|
||||||
{
|
public JsonActionResult<bool> Delete(string id)
|
||||||
return WitRealDelete(id);
|
{
|
||||||
}
|
return WitRealDelete(id);
|
||||||
|
}
|
||||||
/// <summary>
|
|
||||||
/// 更新或新增数据
|
/// <summary>
|
||||||
/// </summary>
|
/// 更新或新增数据
|
||||||
/// <param name="entity">对象实体</param>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <param name="entity">对象实体</param>
|
||||||
[HttpPost, Route("Update")]
|
/// <returns></returns>
|
||||||
public JsonActionResult<bool> Update([FromBody]T_NW_ENTERPRISE entity)
|
[HttpPost, Route("Update")]
|
||||||
{
|
public JsonActionResult<bool> Update([FromBody]T_NW_ENTERPRISE entity)
|
||||||
return WitUpdate(entity);
|
{
|
||||||
}
|
return WitUpdate(entity);
|
||||||
|
}
|
||||||
/// <summary>
|
|
||||||
/// 批量更新
|
/// <summary>
|
||||||
/// </summary>
|
/// 批量更新
|
||||||
/// <param name="entity">对象实体</param>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <param name="entity">对象实体</param>
|
||||||
[HttpPost, Route("BatchUpdate")]
|
/// <returns></returns>
|
||||||
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_NW_ENTERPRISE> entity)
|
[HttpPost, Route("BatchUpdate")]
|
||||||
{
|
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_NW_ENTERPRISE> entity)
|
||||||
return WitBantchUpdate(entity?.Data);
|
{
|
||||||
}
|
return WitBantchUpdate(entity?.Data);
|
||||||
|
}
|
||||||
/// <summary>
|
|
||||||
/// 批量删除数据
|
/// <summary>
|
||||||
/// </summary>
|
/// 批量删除数据
|
||||||
/// <param name="ids">id字符串(id用逗号分隔)</param>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <param name="ids">id字符串(id用逗号分隔)</param>
|
||||||
[HttpGet, Route("BatchDelete")]
|
/// <returns></returns>
|
||||||
public JsonActionResult<bool> BatchDelete(string ids)
|
[HttpGet, Route("BatchDelete")]
|
||||||
{
|
public JsonActionResult<bool> BatchDelete(string ids)
|
||||||
return WitRealBatchDelete(ids);
|
{
|
||||||
}
|
return WitRealBatchDelete(ids);
|
||||||
|
}
|
||||||
/// <summary>
|
|
||||||
/// 获得单条实体数据
|
/// <summary>
|
||||||
/// </summary>
|
/// 获得单条实体数据
|
||||||
/// <param name="filter">过滤实体</param>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <param name="filter">过滤实体</param>
|
||||||
[HttpPost, Route("Get")]
|
/// <returns></returns>
|
||||||
public JsonActionResult<T_NW_ENTERPRISE> Get([FromBody] KeywordFilter filter)
|
[HttpPost, Route("Get")]
|
||||||
{
|
public JsonActionResult<T_NW_ENTERPRISE> Get([FromBody] KeywordFilter filter)
|
||||||
return WitEntity(null, filter);
|
{
|
||||||
}
|
return WitEntity(null, filter);
|
||||||
/// <summary>
|
}
|
||||||
/// 获得树形实体数据
|
|
||||||
/// </summary>
|
/// <summary>
|
||||||
/// <param name="filter"></param>
|
/// 获得树形实体数据
|
||||||
/// <returns></returns>
|
/// </summary>
|
||||||
[HttpPost, Route("TreeData")]
|
/// <param name="filter"></param>
|
||||||
public JsonActionResult<IEnumerable<TreeNode<T_NW_ENTERPRISE>>> TreeData([FromBody] KeywordFilter filter)
|
/// <returns></returns>
|
||||||
{
|
[HttpPost, Route("TreeData")]
|
||||||
return WitTreeOrderEntities(null, filter);
|
public JsonActionResult<IEnumerable<TreeNode<T_NW_ENTERPRISE>>> TreeData([FromBody] KeywordFilter filter)
|
||||||
}
|
{
|
||||||
|
return WitTreeOrderEntities(null, filter);
|
||||||
}
|
}
|
||||||
#endregion
|
|
||||||
#region RoleDataPerm-子企业数据权限表
|
|
||||||
/// <summary>
|
}
|
||||||
/// 子企业数据权限表
|
#endregion
|
||||||
/// </summary>
|
|
||||||
[Route("api/NW/RoleDataPerm")]
|
#region RoleDataPerm-子企业数据权限表
|
||||||
public partial class RoleDataPermController : AuthorizeApiController<T_NW_ROLE_DATA_PERM>
|
/// <summary>
|
||||||
{
|
/// 子企业数据权限表
|
||||||
/// <summary>
|
/// </summary>
|
||||||
/// 查询所有数据
|
[Route("api/NW/RoleDataPerm")]
|
||||||
/// </summary>
|
public partial class RoleDataPermController : AuthorizeApiController<T_NW_ROLE_DATA_PERM>
|
||||||
/// <param name="filter">过滤实体</param>
|
{
|
||||||
/// <returns></returns>
|
/// <summary>
|
||||||
[HttpPost, Route("Entities")]
|
/// 查询所有数据
|
||||||
public JsonActionResult<IEnumerable<T_NW_ROLE_DATA_PERM>> Entities([FromBody]KeywordFilter filter)
|
/// </summary>
|
||||||
{
|
/// <param name="filter">过滤实体</param>
|
||||||
return WitEntities(null, filter);
|
/// <returns></returns>
|
||||||
}
|
[HttpPost, Route("Entities")]
|
||||||
|
public JsonActionResult<IEnumerable<T_NW_ROLE_DATA_PERM>> Entities([FromBody]KeywordFilter filter)
|
||||||
/// <summary>
|
{
|
||||||
/// 排序查询所有数据
|
return WitEntities(null, filter);
|
||||||
/// </summary>
|
}
|
||||||
/// <param name="filter">过滤实体</param>
|
|
||||||
/// <returns></returns>
|
/// <summary>
|
||||||
|
/// 排序查询所有数据
|
||||||
[HttpPost, Route("OrderEntities")]
|
/// </summary>
|
||||||
public JsonActionResult<IEnumerable<T_NW_ROLE_DATA_PERM>> OrderEntities([FromBody]KeywordFilter filter)
|
/// <param name="filter">过滤实体</param>
|
||||||
{
|
/// <returns></returns>
|
||||||
return WitOrderEntities(null, filter);
|
|
||||||
}
|
[HttpPost, Route("OrderEntities")]
|
||||||
|
public JsonActionResult<IEnumerable<T_NW_ROLE_DATA_PERM>> OrderEntities([FromBody]KeywordFilter filter)
|
||||||
/// <summary>
|
{
|
||||||
/// 分页查询数据
|
return WitOrderEntities(null, filter);
|
||||||
/// </summary>
|
}
|
||||||
/// <param name="pageFilter">分页过滤实体</param>
|
|
||||||
/// <returns></returns>
|
/// <summary>
|
||||||
[HttpPost, Route("Paged")]
|
/// 分页查询数据
|
||||||
public PagedActionResult<T_NW_ROLE_DATA_PERM> Paged([FromBody]KeywordPageFilter pageFilter)
|
/// </summary>
|
||||||
{
|
/// <param name="pageFilter">分页过滤实体</param>
|
||||||
return WitPaged(null, pageFilter);
|
/// <returns></returns>
|
||||||
}
|
[HttpPost, Route("Paged")]
|
||||||
|
public PagedActionResult<T_NW_ROLE_DATA_PERM> Paged([FromBody]KeywordPageFilter pageFilter)
|
||||||
/// <summary>
|
{
|
||||||
/// 排序分页查询数据
|
return WitPaged(null, pageFilter);
|
||||||
/// </summary>
|
}
|
||||||
/// <param name="pageFilter">分页过滤实体</param>
|
|
||||||
/// <returns></returns>
|
/// <summary>
|
||||||
[HttpPost, Route("OrderPaged")]
|
/// 排序分页查询数据
|
||||||
public PagedActionResult<T_NW_ROLE_DATA_PERM> OrderPaged([FromBody]KeywordPageFilter pageFilter)
|
/// </summary>
|
||||||
{
|
/// <param name="pageFilter">分页过滤实体</param>
|
||||||
return WitOrderPaged(null, pageFilter);
|
/// <returns></returns>
|
||||||
}
|
[HttpPost, Route("OrderPaged")]
|
||||||
|
public PagedActionResult<T_NW_ROLE_DATA_PERM> OrderPaged([FromBody]KeywordPageFilter pageFilter)
|
||||||
/// <summary>
|
{
|
||||||
/// 根据主键删除数据
|
return WitOrderPaged(null, pageFilter);
|
||||||
/// </summary>
|
}
|
||||||
/// <param name="id">主键ID</param>
|
|
||||||
/// <returns></returns>
|
/// <summary>
|
||||||
[HttpGet, Route("Delete")]
|
/// 根据主键删除数据
|
||||||
public JsonActionResult<bool> Delete(string id)
|
/// </summary>
|
||||||
{
|
/// <param name="id">主键ID</param>
|
||||||
return WitRealDelete(id);
|
/// <returns></returns>
|
||||||
}
|
[HttpGet, Route("Delete")]
|
||||||
|
public JsonActionResult<bool> Delete(string id)
|
||||||
/// <summary>
|
{
|
||||||
/// 更新或新增数据
|
return WitRealDelete(id);
|
||||||
/// </summary>
|
}
|
||||||
/// <param name="entity">对象实体</param>
|
|
||||||
/// <returns></returns>
|
/// <summary>
|
||||||
[HttpPost, Route("Update")]
|
/// 更新或新增数据
|
||||||
public JsonActionResult<bool> Update([FromBody]T_NW_ROLE_DATA_PERM entity)
|
/// </summary>
|
||||||
{
|
/// <param name="entity">对象实体</param>
|
||||||
return WitUpdate(entity);
|
/// <returns></returns>
|
||||||
}
|
[HttpPost, Route("Update")]
|
||||||
|
public JsonActionResult<bool> Update([FromBody]T_NW_ROLE_DATA_PERM entity)
|
||||||
/// <summary>
|
{
|
||||||
/// 批量更新
|
return WitUpdate(entity);
|
||||||
/// </summary>
|
}
|
||||||
/// <param name="entity">对象实体</param>
|
|
||||||
/// <returns></returns>
|
/// <summary>
|
||||||
[HttpPost, Route("BatchUpdate")]
|
/// 批量更新
|
||||||
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_NW_ROLE_DATA_PERM> entity)
|
/// </summary>
|
||||||
{
|
/// <param name="entity">对象实体</param>
|
||||||
return WitBantchUpdate(entity?.Data);
|
/// <returns></returns>
|
||||||
}
|
[HttpPost, Route("BatchUpdate")]
|
||||||
|
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_NW_ROLE_DATA_PERM> entity)
|
||||||
/// <summary>
|
{
|
||||||
/// 批量删除数据
|
return WitBantchUpdate(entity?.Data);
|
||||||
/// </summary>
|
}
|
||||||
/// <param name="ids">id字符串(id用逗号分隔)</param>
|
|
||||||
/// <returns></returns>
|
/// <summary>
|
||||||
[HttpGet, Route("BatchDelete")]
|
/// 批量删除数据
|
||||||
public JsonActionResult<bool> BatchDelete(string ids)
|
/// </summary>
|
||||||
{
|
/// <param name="ids">id字符串(id用逗号分隔)</param>
|
||||||
return WitRealBatchDelete(ids);
|
/// <returns></returns>
|
||||||
}
|
[HttpGet, Route("BatchDelete")]
|
||||||
|
public JsonActionResult<bool> BatchDelete(string ids)
|
||||||
/// <summary>
|
{
|
||||||
/// 获得单条实体数据
|
return WitRealBatchDelete(ids);
|
||||||
/// </summary>
|
}
|
||||||
/// <param name="filter">过滤实体</param>
|
|
||||||
/// <returns></returns>
|
/// <summary>
|
||||||
[HttpPost, Route("Get")]
|
/// 获得单条实体数据
|
||||||
public JsonActionResult<T_NW_ROLE_DATA_PERM> Get([FromBody] KeywordFilter filter)
|
/// </summary>
|
||||||
{
|
/// <param name="filter">过滤实体</param>
|
||||||
return WitEntity(null, filter);
|
/// <returns></returns>
|
||||||
}
|
[HttpPost, Route("Get")]
|
||||||
|
public JsonActionResult<T_NW_ROLE_DATA_PERM> Get([FromBody] KeywordFilter filter)
|
||||||
}
|
{
|
||||||
#endregion
|
return WitEntity(null, filter);
|
||||||
#region RoleMenu-子企业权限表
|
}
|
||||||
/// <summary>
|
|
||||||
/// 子企业权限表
|
|
||||||
/// </summary>
|
}
|
||||||
[Route("api/NW/RoleMenu")]
|
#endregion
|
||||||
public partial class RoleMenuController : AuthorizeApiController<T_NW_ROLE_MENU>
|
|
||||||
{
|
#region RoleMenu-子企业权限表
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查询所有数据
|
/// 子企业权限表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="filter">过滤实体</param>
|
[Route("api/NW/RoleMenu")]
|
||||||
/// <returns></returns>
|
public partial class RoleMenuController : AuthorizeApiController<T_NW_ROLE_MENU>
|
||||||
[HttpPost, Route("Entities")]
|
{
|
||||||
public JsonActionResult<IEnumerable<T_NW_ROLE_MENU>> Entities([FromBody]KeywordFilter filter)
|
/// <summary>
|
||||||
{
|
/// 查询所有数据
|
||||||
return WitEntities(null, filter);
|
/// </summary>
|
||||||
}
|
/// <param name="filter">过滤实体</param>
|
||||||
|
/// <returns></returns>
|
||||||
/// <summary>
|
[HttpPost, Route("Entities")]
|
||||||
/// 排序查询所有数据
|
public JsonActionResult<IEnumerable<T_NW_ROLE_MENU>> Entities([FromBody]KeywordFilter filter)
|
||||||
/// </summary>
|
{
|
||||||
/// <param name="filter">过滤实体</param>
|
return WitEntities(null, filter);
|
||||||
/// <returns></returns>
|
}
|
||||||
|
|
||||||
[HttpPost, Route("OrderEntities")]
|
/// <summary>
|
||||||
public JsonActionResult<IEnumerable<T_NW_ROLE_MENU>> OrderEntities([FromBody]KeywordFilter filter)
|
/// 排序查询所有数据
|
||||||
{
|
/// </summary>
|
||||||
return WitOrderEntities(null, filter);
|
/// <param name="filter">过滤实体</param>
|
||||||
}
|
/// <returns></returns>
|
||||||
|
|
||||||
/// <summary>
|
[HttpPost, Route("OrderEntities")]
|
||||||
/// 分页查询数据
|
public JsonActionResult<IEnumerable<T_NW_ROLE_MENU>> OrderEntities([FromBody]KeywordFilter filter)
|
||||||
/// </summary>
|
{
|
||||||
/// <param name="pageFilter">分页过滤实体</param>
|
return WitOrderEntities(null, filter);
|
||||||
/// <returns></returns>
|
}
|
||||||
[HttpPost, Route("Paged")]
|
|
||||||
public PagedActionResult<T_NW_ROLE_MENU> Paged([FromBody]KeywordPageFilter pageFilter)
|
/// <summary>
|
||||||
{
|
/// 分页查询数据
|
||||||
return WitPaged(null, pageFilter);
|
/// </summary>
|
||||||
}
|
/// <param name="pageFilter">分页过滤实体</param>
|
||||||
|
/// <returns></returns>
|
||||||
/// <summary>
|
[HttpPost, Route("Paged")]
|
||||||
/// 排序分页查询数据
|
public PagedActionResult<T_NW_ROLE_MENU> Paged([FromBody]KeywordPageFilter pageFilter)
|
||||||
/// </summary>
|
{
|
||||||
/// <param name="pageFilter">分页过滤实体</param>
|
return WitPaged(null, pageFilter);
|
||||||
/// <returns></returns>
|
}
|
||||||
[HttpPost, Route("OrderPaged")]
|
|
||||||
public PagedActionResult<T_NW_ROLE_MENU> OrderPaged([FromBody]KeywordPageFilter pageFilter)
|
/// <summary>
|
||||||
{
|
/// 排序分页查询数据
|
||||||
return WitOrderPaged(null, pageFilter);
|
/// </summary>
|
||||||
}
|
/// <param name="pageFilter">分页过滤实体</param>
|
||||||
|
/// <returns></returns>
|
||||||
/// <summary>
|
[HttpPost, Route("OrderPaged")]
|
||||||
/// 根据主键删除数据
|
public PagedActionResult<T_NW_ROLE_MENU> OrderPaged([FromBody]KeywordPageFilter pageFilter)
|
||||||
/// </summary>
|
{
|
||||||
/// <param name="id">主键ID</param>
|
return WitOrderPaged(null, pageFilter);
|
||||||
/// <returns></returns>
|
}
|
||||||
[HttpGet, Route("Delete")]
|
|
||||||
public JsonActionResult<bool> Delete(string id)
|
/// <summary>
|
||||||
{
|
/// 根据主键删除数据
|
||||||
return WitRealDelete(id);
|
/// </summary>
|
||||||
}
|
/// <param name="id">主键ID</param>
|
||||||
|
/// <returns></returns>
|
||||||
/// <summary>
|
[HttpGet, Route("Delete")]
|
||||||
/// 更新或新增数据
|
public JsonActionResult<bool> Delete(string id)
|
||||||
/// </summary>
|
{
|
||||||
/// <param name="entity">对象实体</param>
|
return WitRealDelete(id);
|
||||||
/// <returns></returns>
|
}
|
||||||
[HttpPost, Route("Update")]
|
|
||||||
public JsonActionResult<bool> Update([FromBody]T_NW_ROLE_MENU entity)
|
/// <summary>
|
||||||
{
|
/// 更新或新增数据
|
||||||
return WitUpdate(entity);
|
/// </summary>
|
||||||
}
|
/// <param name="entity">对象实体</param>
|
||||||
|
/// <returns></returns>
|
||||||
/// <summary>
|
[HttpPost, Route("Update")]
|
||||||
/// 批量更新
|
public JsonActionResult<bool> Update([FromBody]T_NW_ROLE_MENU entity)
|
||||||
/// </summary>
|
{
|
||||||
/// <param name="entity">对象实体</param>
|
return WitUpdate(entity);
|
||||||
/// <returns></returns>
|
}
|
||||||
[HttpPost, Route("BatchUpdate")]
|
|
||||||
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_NW_ROLE_MENU> entity)
|
/// <summary>
|
||||||
{
|
/// 批量更新
|
||||||
return WitBantchUpdate(entity?.Data);
|
/// </summary>
|
||||||
}
|
/// <param name="entity">对象实体</param>
|
||||||
|
/// <returns></returns>
|
||||||
/// <summary>
|
[HttpPost, Route("BatchUpdate")]
|
||||||
/// 批量删除数据
|
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_NW_ROLE_MENU> entity)
|
||||||
/// </summary>
|
{
|
||||||
/// <param name="ids">id字符串(id用逗号分隔)</param>
|
return WitBantchUpdate(entity?.Data);
|
||||||
/// <returns></returns>
|
}
|
||||||
[HttpGet, Route("BatchDelete")]
|
|
||||||
public JsonActionResult<bool> BatchDelete(string ids)
|
/// <summary>
|
||||||
{
|
/// 批量删除数据
|
||||||
return WitRealBatchDelete(ids);
|
/// </summary>
|
||||||
}
|
/// <param name="ids">id字符串(id用逗号分隔)</param>
|
||||||
|
/// <returns></returns>
|
||||||
/// <summary>
|
[HttpGet, Route("BatchDelete")]
|
||||||
/// 获得单条实体数据
|
public JsonActionResult<bool> BatchDelete(string ids)
|
||||||
/// </summary>
|
{
|
||||||
/// <param name="filter">过滤实体</param>
|
return WitRealBatchDelete(ids);
|
||||||
/// <returns></returns>
|
}
|
||||||
[HttpPost, Route("Get")]
|
|
||||||
public JsonActionResult<T_NW_ROLE_MENU> Get([FromBody] KeywordFilter filter)
|
/// <summary>
|
||||||
{
|
/// 获得单条实体数据
|
||||||
return WitEntity(null, filter);
|
/// </summary>
|
||||||
}
|
/// <param name="filter">过滤实体</param>
|
||||||
|
/// <returns></returns>
|
||||||
}
|
[HttpPost, Route("Get")]
|
||||||
#endregion
|
public JsonActionResult<T_NW_ROLE_MENU> Get([FromBody] KeywordFilter filter)
|
||||||
}
|
{
|
||||||
|
return WitEntity(null, filter);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -49,9 +49,9 @@ namespace APT.PF.WebApi.Controllers.Api
|
|||||||
}
|
}
|
||||||
|
|
||||||
var orgId = APT.Infrastructure.Api.AppContext.CurrentSession.OrgId;
|
var orgId = APT.Infrastructure.Api.AppContext.CurrentSession.OrgId;
|
||||||
//var roleCodes = this.GetEntities<T_PF_APPROVAL_ROLE>(t => true, new BaseFilter(orgId)).Select(x => x.NAME).ToList();
|
var roleCodes = this.GetEntities<T_PF_APPROVAL_ROLE>(t => !t.IS_DELETED, new BaseFilter(orgId)).Select(x => x.NAME).ToList();
|
||||||
//if (roleCodes.Contains(entity.NAME))
|
if (roleCodes.Contains(entity.NAME))
|
||||||
// throw new Exception("系统已存在审批角色编码为" + entity.NAME + "的数据,请勿重复!");
|
throw new Exception("系统已存在审批角色为" + entity.NAME + "的数据,请勿重复!");
|
||||||
var departs = entity.Nav_ApproveDeparts;
|
var departs = entity.Nav_ApproveDeparts;
|
||||||
entity.Nav_ApproveDeparts = null;
|
entity.Nav_ApproveDeparts = null;
|
||||||
if (departs != null && departs.Any())
|
if (departs != null && departs.Any())
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,13 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// T4模板文件:基础接口类
|
// T4模板文件:基础接口类
|
||||||
// 此代码由T4模板自动生成
|
// 此代码由T4模板自动生成
|
||||||
@ -15,4 +21,5 @@ using APT.Infrastructure.Api;
|
|||||||
using APT.BaseData.Domain.ApiModel.PF;
|
using APT.BaseData.Domain.ApiModel.PF;
|
||||||
namespace APT.PP.WebApi.Controllers.Api
|
namespace APT.PP.WebApi.Controllers.Api
|
||||||
{
|
{
|
||||||
}
|
|
||||||
|
}
|
||||||
|
|||||||
@ -1,21 +1,23 @@
|
|||||||
using APT.BaseData.Domain.Entities.FM;
|
using APT.BaseData.Domain.ApiModel;
|
||||||
using APT.Infrastructure.Core;
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
|
||||||
using APT.Infrastructure.Api;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq.Expressions;
|
|
||||||
using System;
|
|
||||||
using System.Linq;
|
|
||||||
using APT.BaseData.Domain.ApiModel;
|
|
||||||
using Ubiety.Dns.Core;
|
|
||||||
using System.Security.AccessControl;
|
|
||||||
using APT.MS.Domain.Entities.FO;
|
|
||||||
using APT.BaseData.Domain.Entities;
|
using APT.BaseData.Domain.Entities;
|
||||||
using APT.MS.Domain.Enums;
|
using APT.BaseData.Domain.Entities.FM;
|
||||||
|
using APT.Infrastructure.Api;
|
||||||
|
using APT.Infrastructure.Core;
|
||||||
using APT.MS.Domain.Entities.BI;
|
using APT.MS.Domain.Entities.BI;
|
||||||
using static APT.MS.Domain.Enums.BI.BIEnums;
|
|
||||||
using APT.Utility;
|
|
||||||
using APT.MS.Domain.Entities.BS;
|
using APT.MS.Domain.Entities.BS;
|
||||||
|
using APT.MS.Domain.Entities.FO;
|
||||||
|
using APT.MS.Domain.Entities.SK;
|
||||||
|
using APT.MS.Domain.Enums;
|
||||||
|
using APT.MS.Domain.Enums.SK;
|
||||||
|
using APT.Utility;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Linq.Expressions;
|
||||||
|
using System.Security.AccessControl;
|
||||||
|
using Ubiety.Dns.Core;
|
||||||
|
using static APT.MS.Domain.Enums.BI.BIEnums;
|
||||||
|
|
||||||
namespace APT.SC.WebApi.Controllers.Api.BI
|
namespace APT.SC.WebApi.Controllers.Api.BI
|
||||||
{
|
{
|
||||||
@ -107,8 +109,8 @@ namespace APT.SC.WebApi.Controllers.Api.BI
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="filter"></param>
|
/// <param name="filter"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost, Route("GetBI056Main")]
|
[HttpPost, Route("GetBI056MainOld")]
|
||||||
public JsonActionResult<ModelBI056Main> GetBI056Main([FromBody] KeywordFilter filter)
|
public JsonActionResult<ModelBI056Main> GetBI056MainOld([FromBody] KeywordFilter filter)
|
||||||
{
|
{
|
||||||
return SafeExecute<ModelBI056Main>(() =>
|
return SafeExecute<ModelBI056Main>(() =>
|
||||||
{
|
{
|
||||||
@ -372,8 +374,242 @@ namespace APT.SC.WebApi.Controllers.Api.BI
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 显示
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="filter"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost, Route("GetBI056Main")]
|
||||||
|
public JsonActionResult<ModelBI056Main> GetBI056Main([FromBody] KeywordFilter filter)
|
||||||
|
{
|
||||||
|
return SafeExecute<ModelBI056Main>(() =>
|
||||||
|
{
|
||||||
|
ModelBI056Main result = new ModelBI056Main();
|
||||||
|
DateTime dtStart = Convert.ToDateTime(DateTime.Now.Year.ToString() + "-01-01 00:00:00");
|
||||||
|
DateTime? dtEnd = null;
|
||||||
|
|
||||||
|
#region enmusLevel=> lisLevelOrder enmusMineType=>lisMineTypeOrder
|
||||||
|
|
||||||
|
// var enmus = GetEntities<T_FM_ENUMS>(e => !e.IS_DELETED, null, null);
|
||||||
|
var enmus = GetEntities<T_FM_USER_PRODUCTION_UNIT_SET>(e => !e.IS_DELETED, null, null);
|
||||||
|
if (enmus == null || !enmus.Any())
|
||||||
|
throw new Exception("获取生产单元信息失败!");
|
||||||
|
List<string> lisLevelOrder = new List<string>();
|
||||||
|
List<string> lisMineTypeOrder = new List<string>();
|
||||||
|
foreach (SKDepartmentTypeEnum level in Enum.GetValues(typeof(SKDepartmentTypeEnum)))
|
||||||
|
{
|
||||||
|
lisLevelOrder.Add(level.GetDescription());
|
||||||
|
}
|
||||||
|
var enmusMineType = enmus.ToList();
|
||||||
|
foreach (var item in enmusMineType)
|
||||||
|
{
|
||||||
|
lisMineTypeOrder.Add(item.NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 改良版 listSafeCheck 所有的符合条件的检查信息
|
||||||
|
|
||||||
|
Expression<Func<T_SK_SECURITY_INSPECTION_NOTICE, bool>> expression = e => !e.IS_DELETED && e.APPLY_USER_ID.HasValue && e.CHECK_TIME.HasValue && dtStart <= e.CHECK_TIME.Value;
|
||||||
|
|
||||||
|
if (dtEnd.HasValue)
|
||||||
|
expression = expression.And(e => e.CHECK_TIME.HasValue && dtEnd.Value >= e.CHECK_TIME.Value);
|
||||||
|
|
||||||
|
BaseFilter filterSearch = new BaseFilter(filter.OrgId);
|
||||||
|
filterSearch.IgnoreDataRule = true;
|
||||||
|
//filterSearch.Include.Add("Nav_CheckTypeLevel");
|
||||||
|
filterSearch.SelectField = new List<string>() { "ID", "APPLY_USER_ID", "PRODUCTION_UNIT_ID", "CHECK_TYPE_ID", "IS_DELETED", "CHECK_TIME", "DEPARTMENT_TYPE" };
|
||||||
|
//var listSafeCheck = GetEntities(expression, null, "Nav_CheckTypeLevel");
|
||||||
|
var listSafeCheck = GetEntities(expression, filterSearch, null);
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 1_1 改良版
|
||||||
|
|
||||||
|
List<List<int>> listCheckCount = new List<List<int>>();
|
||||||
|
List<int> listCheckLevelCount = null;
|
||||||
|
foreach (SKDepartmentTypeEnum item in Enum.GetValues(typeof(SKDepartmentTypeEnum)))
|
||||||
|
{
|
||||||
|
//mineTypeName: ["露天矿", "选矿厂", "尾矿库", "职能部门"],
|
||||||
|
//legendName: ["公司级", "部门级", "车间级", "班组级"],
|
||||||
|
//checkCount: [[3, 3, 3, 3], [12, 12, 12, 6], [24, 24, 24, 12], [90, 90, 120, 36]],
|
||||||
|
|
||||||
|
listCheckLevelCount = new List<int>();
|
||||||
|
//选矿 10, 尾矿 20, 矿山 30, 地下矿 40,
|
||||||
|
foreach (var itemMine in enmusMineType)
|
||||||
|
{
|
||||||
|
int count = listSafeCheck.Where(e => e.PRODUCTION_UNIT_ID == itemMine.ID && e.DEPARTMENT_TYPE == item).Count();
|
||||||
|
listCheckLevelCount.Add(count);
|
||||||
|
}
|
||||||
|
listCheckCount.Add(listCheckLevelCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
//数据组装
|
||||||
|
result.Count1_1 = listCheckCount;
|
||||||
|
result.lisMineTypeOrder = lisMineTypeOrder;
|
||||||
|
result.lisLevelOrder = lisLevelOrder;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#region 3_1 改良版
|
||||||
|
|
||||||
|
|
||||||
|
List<List<int>> listCheckTypeCount = new List<List<int>>();
|
||||||
|
List<int> listCheckTypeCountPer = null;
|
||||||
|
|
||||||
|
var listCheckType = GetEntities<T_SK_CHECK_TYPE>(e => !e.IS_DELETED, null).OrderBy(e => e.PRODUCTION_UNIT_ID).ThenBy(e => e.NUM);
|
||||||
|
List<string> listCheckTypeName = new List<string>();
|
||||||
|
List<Guid> listCheckTypeID = new List<Guid>();
|
||||||
|
List<Guid> listSum = new List<Guid>();
|
||||||
|
Guid guidParent = Guid.Empty;
|
||||||
|
foreach (var item in listCheckType)
|
||||||
|
{
|
||||||
|
listCheckTypeName.Add(item.NAME);
|
||||||
|
listCheckTypeID.Add(item.ID);
|
||||||
|
}
|
||||||
|
listSum.Add(guidParent);//有些人直接定义 综合检查
|
||||||
|
|
||||||
|
foreach (var item in enmusMineType)
|
||||||
|
{
|
||||||
|
listCheckTypeCountPer = new List<int>();
|
||||||
|
|
||||||
|
foreach (var itemCheckType in listCheckTypeID)
|
||||||
|
{
|
||||||
|
int count = listSafeCheck.Where(e => e.PRODUCTION_UNIT_ID == item.ID && e.CHECK_TYPE_ID == itemCheckType).Count();
|
||||||
|
listCheckTypeCountPer.Add(count);
|
||||||
|
}
|
||||||
|
listCheckTypeCount.Add(listCheckTypeCountPer);
|
||||||
|
}
|
||||||
|
|
||||||
|
//数据组装
|
||||||
|
result.Count3_1 = listCheckTypeCount;
|
||||||
|
result.lisCheckTypeName = listCheckTypeName;
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 隐患 1_2 2_1 2_2 3_2
|
||||||
|
|
||||||
|
Expression<Func<T_SK_HIDDEN_DANGER_RECTIFY_RECORD, bool>> expression2_2 = e => !e.IS_DELETED && e.CREATE_TIME.HasValue && e.CREATE_TIME.Value >= dtStart && !e.IS_DELETED;// && (e.RiskContentState.Value == 60 || e.RiskContentState.Value == 80)&& e.DESCREPTION != null
|
||||||
|
if (dtEnd.HasValue)
|
||||||
|
expression2_2 = expression2_2.And(e => e.CREATE_TIME.HasValue && dtEnd.Value >= e.CREATE_TIME.Value);
|
||||||
|
|
||||||
|
var listContent = GetEntities(expression2_2, null, "Nav_Question");
|
||||||
|
|
||||||
|
#region 1_2 各生产单元 隐患数
|
||||||
|
|
||||||
|
List<int> listRiskMineCount1_2 = new List<int>();
|
||||||
|
foreach (var item in enmusMineType)
|
||||||
|
{
|
||||||
|
listRiskMineCount1_2.Add(listContent.Where(e => e.PRODUCTION_UNIT_ID.HasValue && e.PRODUCTION_UNIT_ID ==item.ID).Count());
|
||||||
|
}
|
||||||
|
result.listRiskMineCount1_2 = listRiskMineCount1_2;
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 2_1 月度 已完成 未完成 整改率
|
||||||
|
|
||||||
|
List<int> listMonth = new List<int>() { 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12 };
|
||||||
|
if (dtStart.Year > DateTime.Now.Year)
|
||||||
|
{
|
||||||
|
listMonth.Clear();
|
||||||
|
}
|
||||||
|
else if (dtStart.Year == DateTime.Now.Year)
|
||||||
|
{
|
||||||
|
listMonth = listMonth.Where(e => e <= DateTime.Now.Month).OrderBy(e => e).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
List<int> listFinish2_1 = new List<int>();
|
||||||
|
List<int> listNotFinish2_1 = new List<int>();
|
||||||
|
List<decimal> listFinish2_1Percent = new List<decimal>();
|
||||||
|
foreach (var item in listMonth)
|
||||||
|
{
|
||||||
|
listFinish2_1.Add(listContent.Where(e => e.CREATE_TIME.HasValue && e.CREATE_TIME.Value.Month == item && e.STATUS == BaseData.Domain.Enums.PF.PFStandardStatus.Archived).Count());
|
||||||
|
listNotFinish2_1.Add(listContent.Where(e => e.PRODUCTION_UNIT_ID.HasValue && e.CREATE_TIME.HasValue && e.CREATE_TIME.Value.Month == item && e.STATUS != BaseData.Domain.Enums.PF.PFStandardStatus.Archived).Count());//只是上报 没有检查范围 不计算在内 不然与后面的弹窗不对等
|
||||||
|
}
|
||||||
|
for (int i = 0; i < listMonth.Count; i++)
|
||||||
|
{
|
||||||
|
if (listNotFinish2_1[i] == 0)
|
||||||
|
{
|
||||||
|
listFinish2_1Percent.Add(100);
|
||||||
|
}
|
||||||
|
else if (listFinish2_1[i] == 0)
|
||||||
|
{
|
||||||
|
listFinish2_1Percent.Add(0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
listFinish2_1Percent.Add((decimal)Math.Round((listFinish2_1[i] * 100.0 / (listNotFinish2_1[i] + listFinish2_1[i])), 2));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//result.listMonth = listMonth;
|
||||||
|
result.listFinish2_1 = listFinish2_1;
|
||||||
|
result.listNotFinish2_1 = listNotFinish2_1;
|
||||||
|
result.listFinish2_1Percent = listFinish2_1Percent;
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 2_2 隐患Top
|
||||||
|
var query = listContent.Where(e => e.Nav_Question != null).GroupBy(e => e.Nav_Question.DESCREPTION).Select(e => new
|
||||||
|
{
|
||||||
|
DESCREPTION = e.Key,
|
||||||
|
Count = e.Count()
|
||||||
|
}).OrderByDescending(e => e.Count).Take(6);//.Where(e => e.DESCREPTION != null) 名称不能为null
|
||||||
|
|
||||||
|
if (query != null && query.Any())
|
||||||
|
{
|
||||||
|
List<string> ListDescreption2_2 = new List<string>();
|
||||||
|
List<int> Count2_2 = new List<int>();
|
||||||
|
foreach (var item in query)
|
||||||
|
{
|
||||||
|
Count2_2.Add(item.Count);
|
||||||
|
ListDescreption2_2.Add(item.DESCREPTION);
|
||||||
|
}
|
||||||
|
result.Count2_2 = Count2_2;
|
||||||
|
result.ListDescreption2_2 = ListDescreption2_2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result.Count2_2 = new List<int>();
|
||||||
|
result.ListDescreption2_2 = new List<string>();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 3_2 检查类型隐患统计
|
||||||
|
|
||||||
|
List<List<int>> listRiskMoneCheckType = new List<List<int>>();
|
||||||
|
foreach (var item in enmusMineType)
|
||||||
|
{
|
||||||
|
listCheckTypeCountPer = new List<int>();
|
||||||
|
foreach (var itemCheckType in listCheckTypeID)
|
||||||
|
{
|
||||||
|
//检查类型
|
||||||
|
if (itemCheckType == guidParent)
|
||||||
|
{
|
||||||
|
int count = listContent.Where(e => e.CHECK_TYPE_ID.HasValue && e.PRODUCTION_UNIT_ID.HasValue && e.PRODUCTION_UNIT_ID== item.ID && listSum.Contains(e.CHECK_TYPE_ID.Value)).Count();
|
||||||
|
listCheckTypeCountPer.Add(count);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int count = listContent.Where(e => e.CHECK_TYPE_ID.HasValue && e.PRODUCTION_UNIT_ID.HasValue && e.PRODUCTION_UNIT_ID == item.ID && e.CHECK_TYPE_ID == itemCheckType).Count();
|
||||||
|
listCheckTypeCountPer.Add(count);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
listRiskMoneCheckType.Add(listCheckTypeCountPer);
|
||||||
|
}
|
||||||
|
result.Count3_2 = listRiskMoneCheckType;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
return result;
|
||||||
|
});
|
||||||
|
}
|
||||||
//#region 旧版直接查询 count
|
//#region 旧版直接查询 count
|
||||||
|
|
||||||
///// <summary>
|
///// <summary>
|
||||||
|
|||||||
@ -9617,13 +9617,14 @@ namespace APT.SC.WebApi.Controllers.Api.BIController
|
|||||||
return SafeExecute<List<T_FM_DEPARTMENT_COMPLETION_SORT>>(() =>
|
return SafeExecute<List<T_FM_DEPARTMENT_COMPLETION_SORT>>(() =>
|
||||||
{
|
{
|
||||||
var orgId = APT.Infrastructure.Api.AppContext.CurrentSession.OrgId.Value;
|
var orgId = APT.Infrastructure.Api.AppContext.CurrentSession.OrgId.Value;
|
||||||
var mineType = 30;
|
//var mineType = 30;
|
||||||
var departmentIds = new List<Guid>();
|
var departmentIds = new List<Guid>();
|
||||||
List<GroupbyDepartmentId> completionLists = new List<GroupbyDepartmentId>();
|
List<GroupbyDepartmentId> completionLists = new List<GroupbyDepartmentId>();
|
||||||
List<T_FM_DEPARTMENT_COMPLETION_SORT> completionSorts = new List<T_FM_DEPARTMENT_COMPLETION_SORT>();
|
List<T_FM_DEPARTMENT_COMPLETION_SORT> completionSorts = new List<T_FM_DEPARTMENT_COMPLETION_SORT>();
|
||||||
if (string.IsNullOrEmpty(filter.Keyword))
|
//if (string.IsNullOrEmpty(filter.Keyword))
|
||||||
return completionSorts;
|
// return completionSorts;
|
||||||
var departmentInfo = this.GetEntities<T_FM_DEPARTMENT>(t => t.MineType == int.Parse(filter.Keyword.ToString()), new BaseFilter(orgId));
|
//var departmentInfo = this.GetEntities<T_FM_DEPARTMENT>(t => t.MineType == int.Parse(filter.Keyword.ToString()), new BaseFilter(orgId));
|
||||||
|
var departmentInfo = this.GetEntities<T_FM_DEPARTMENT>(t => t.ENABLE_STATUS == 0 && t.CATEGORY == FMCATEGORY.ACTURE, new BaseFilter(orgId));
|
||||||
if (departmentInfo == null || !departmentInfo.Any())
|
if (departmentInfo == null || !departmentInfo.Any())
|
||||||
return completionSorts;
|
return completionSorts;
|
||||||
else
|
else
|
||||||
@ -9708,13 +9709,14 @@ namespace APT.SC.WebApi.Controllers.Api.BIController
|
|||||||
{
|
{
|
||||||
dynamic ret = new System.Dynamic.ExpandoObject();
|
dynamic ret = new System.Dynamic.ExpandoObject();
|
||||||
var orgId = APT.Infrastructure.Api.AppContext.CurrentSession.OrgId.Value;
|
var orgId = APT.Infrastructure.Api.AppContext.CurrentSession.OrgId.Value;
|
||||||
var mineType = 30;
|
//var mineType = 30;
|
||||||
var departmentIds = new List<Guid>();
|
var departmentIds = new List<Guid>();
|
||||||
List<GroupbyDepartmentCompletion> completionLists = new List<GroupbyDepartmentCompletion>();
|
List<GroupbyDepartmentCompletion> completionLists = new List<GroupbyDepartmentCompletion>();
|
||||||
List<T_FM_DEPARTMENT_COMPLETION> completionSorts = new List<T_FM_DEPARTMENT_COMPLETION>();
|
List<T_FM_DEPARTMENT_COMPLETION> completionSorts = new List<T_FM_DEPARTMENT_COMPLETION>();
|
||||||
if (string.IsNullOrEmpty(filter.Keyword))
|
//if (string.IsNullOrEmpty(filter.Keyword))
|
||||||
return ret;
|
// return ret;
|
||||||
var departmentInfo = this.GetEntities<T_FM_DEPARTMENT>(t => t.MineType == int.Parse(filter.Keyword.ToString()), new BaseFilter(orgId));
|
//var departmentInfo = this.GetEntities<T_FM_DEPARTMENT>(t => t.PRODUCTION_UNIT_ID == Guid.Parse(filter.Keyword.ToString()), new BaseFilter(orgId));
|
||||||
|
var departmentInfo = this.GetEntities<T_FM_DEPARTMENT>(t => t.ENABLE_STATUS == 0 && t.CATEGORY == FMCATEGORY.ACTURE, new BaseFilter(orgId));
|
||||||
if (departmentInfo == null || !departmentInfo.Any())
|
if (departmentInfo == null || !departmentInfo.Any())
|
||||||
return ret;
|
return ret;
|
||||||
else
|
else
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,10 @@
|
|||||||
using APT.Infrastructure.Core;
|
using APT.Infrastructure.Core;
|
||||||
using APT.MS.Domain.Entities.SK;
|
using APT.MS.Domain.Entities.SK;
|
||||||
|
using APT.MS.Domain.Enums;
|
||||||
|
using APT.MS.Domain.Enums.SK;
|
||||||
using APT.Utility;
|
using APT.Utility;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace APT.SK.WebApi.Controllers.Api
|
namespace APT.SK.WebApi.Controllers.Api
|
||||||
@ -86,9 +89,24 @@ namespace APT.SK.WebApi.Controllers.Api
|
|||||||
{
|
{
|
||||||
t.MONTHStr = "--";
|
t.MONTHStr = "--";
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
t.MONTHStr = t.MONTH.ToString();
|
||||||
|
}
|
||||||
if (t.DATA == null || t.DATA == 0)
|
if (t.DATA == null || t.DATA == 0)
|
||||||
{
|
{
|
||||||
t.DATAStr = "--";
|
t.DATAStr = "--";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
t.DATAStr = t.DATA.ToString();
|
||||||
|
}
|
||||||
|
if (t.WEEKDATA == null)
|
||||||
|
{
|
||||||
|
t.WEEKStr = "--";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
t.WEEKStr = Enum.GetName(typeof(WEEKDATAEnum), t.WEEKDATA);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -4,6 +4,7 @@ using APT.MS.Domain.Enums;
|
|||||||
using APT.MS.Domain.Enums.SK;
|
using APT.MS.Domain.Enums.SK;
|
||||||
using APT.Utility;
|
using APT.Utility;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace APT.SK.WebApi.Controllers.Api
|
namespace APT.SK.WebApi.Controllers.Api
|
||||||
@ -82,9 +83,25 @@ namespace APT.SK.WebApi.Controllers.Api
|
|||||||
{
|
{
|
||||||
t.MONTHStr = "--";
|
t.MONTHStr = "--";
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
t.MONTHStr = t.MONTH.ToString();
|
||||||
|
}
|
||||||
if (t.DATA == null || t.DATA == 0)
|
if (t.DATA == null || t.DATA == 0)
|
||||||
{
|
{
|
||||||
t.DATAStr = "--";
|
t.DATAStr = "--";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
t.DATAStr = t.DATA.ToString();
|
||||||
|
}
|
||||||
|
if (t.WEEKDATA == null)
|
||||||
|
{
|
||||||
|
t.WEEKStr = "--";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
t.WEEKStr = Enum.GetName(typeof(WEEKDATAEnum), t.WEEKDATA);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user