diff --git a/APT.MicroApi/APT.BS.WebApi/Controllers/Api/BSCheckMainController.cs b/APT.MicroApi/APT.BS.WebApi/Controllers/Api/BSCheckMainController.cs index 6f5045a..472091c 100644 --- a/APT.MicroApi/APT.BS.WebApi/Controllers/Api/BSCheckMainController.cs +++ b/APT.MicroApi/APT.BS.WebApi/Controllers/Api/BSCheckMainController.cs @@ -148,7 +148,7 @@ namespace APT.BS.WebApi.Controllers.Api Msg = "未获取到导入数据"; throw new Exception(Msg); } - List listNotEmpty = new List() { 0, 1, 2, 3, 4, 5, 7, 8, 9 }; + List listNotEmpty = new List() { 0, 1, 3, 4, 5, 7, 8, 9 };//2, //BSMineTypeEnum @@ -176,12 +176,12 @@ namespace APT.BS.WebApi.Controllers.Api - //检查项目分类 3 - List listProjCate = new List(); - List listStrProjCate = new List(); - var listModelProjCate = GetEntities(e => !e.IS_DELETED, null, null); - string strProjCate = string.Empty; - T_BS_CHECK_PROJECT_CATEGORY modelProjCate = new T_BS_CHECK_PROJECT_CATEGORY(); + ////检查项目分类 3 + //List listProjCate = new List(); + //List listStrProjCate = new List(); + //var listModelProjCate = GetEntities(e => !e.IS_DELETED, null, null); + //string strProjCate = string.Empty; + //T_BS_CHECK_PROJECT_CATEGORY modelProjCate = new T_BS_CHECK_PROJECT_CATEGORY(); //检查层级 4 List listTypeLevel = new List(); @@ -288,7 +288,7 @@ namespace APT.BS.WebApi.Controllers.Api strArea = dtSource.Rows[i][0].ToString().Trim(); modelArea = listModelArea.FirstOrDefault(e => e.NAME == strArea); - if (modelArea == null && dicIndexEmpty.Count < 1 && listType.Count < 1 && listProjCate.Count < 1 && listTypeLevel.Count < 1 && listQuestionLevel.Count < 1) + if (modelArea == null && dicIndexEmpty.Count < 1 && listType.Count < 1 && listTypeLevel.Count < 1 && listQuestionLevel.Count < 1)//&& listProjCate.Count < 1 { //检查区域 modelArea = new T_HM_RISK_AREA(); @@ -356,18 +356,18 @@ namespace APT.BS.WebApi.Controllers.Api #endregion - #region 项目分类 2 + #region //项目分类 2 - strProjCate = dtSource.Rows[i][2].ToString().Trim(); - modelProjCate = listModelProjCate.FirstOrDefault(e => e.NAME == strProjCate); - if (modelProjCate == null) - { - //检查项目分类 - listProjCate.Add(i + rowIndex); - if (!listStrProjCate.Contains(strProjCate)) - listStrProjCate.Add(strProjCate); - continue; - } + //strProjCate = dtSource.Rows[i][2].ToString().Trim(); + //modelProjCate = listModelProjCate.FirstOrDefault(e => e.NAME == strProjCate); + //if (modelProjCate == null) + //{ + // //检查项目分类 + // listProjCate.Add(i + rowIndex); + // if (!listStrProjCate.Contains(strProjCate)) + // listStrProjCate.Add(strProjCate); + // continue; + //} #endregion @@ -470,7 +470,7 @@ namespace APT.BS.WebApi.Controllers.Api strProject = dtSource.Rows[i][5].ToString().Trim(); modelProject = listModelProject.FirstOrDefault(e => e.NAME == strProject); - if (modelProject == null && dicIndexEmpty.Count < 1 && listType.Count < 1 && listProjCate.Count < 1 && listTypeLevel.Count < 1 && listQuestionLevel.Count < 1) + if (modelProject == null && dicIndexEmpty.Count < 1 && listType.Count < 1 && listTypeLevel.Count < 1 && listQuestionLevel.Count < 1)//&& listProjCate.Count < 1 { //检查项目 listProject.Add(i); modelProject = new T_BS_CHECK_PROJECT(); @@ -542,7 +542,7 @@ namespace APT.BS.WebApi.Controllers.Api strDescreption = dtSource.Rows[i][7].ToString().Trim(); modelQuestion = listCheckQuestion.FirstOrDefault(e => !e.IS_DELETED && e.DESCREPTION == strDescreption);// && e.DEMAND == strDemand 不报错 - if (modelQuestion == null && dicIndexEmpty.Count < 1 && listType.Count < 1 && listProjCate.Count < 1 && listTypeLevel.Count < 1 && listQuestionLevel.Count < 1) + if (modelQuestion == null && dicIndexEmpty.Count < 1 && listType.Count < 1 && listTypeLevel.Count < 1 && listQuestionLevel.Count < 1)//&& listProjCate.Count < 1 { strDemand = dtSource.Rows[i][9].ToString().Trim(); @@ -575,7 +575,7 @@ namespace APT.BS.WebApi.Controllers.Api #region listMain - if (dicIndexEmpty.Count < 1 && listType.Count < 1 && listProjCate.Count < 1 && listTypeLevel.Count < 1 && listQuestionLevel.Count < 1 && listDepartment.Count < 1) + if (dicIndexEmpty.Count < 1 && listType.Count < 1 && listTypeLevel.Count < 1 && listQuestionLevel.Count < 1 && listDepartment.Count < 1)// && listProjCate.Count < 1 { T_BS_CHECK_MAIN modelAdd = new T_BS_CHECK_MAIN(); modelAdd.ID = Guid.NewGuid(); @@ -603,7 +603,7 @@ namespace APT.BS.WebApi.Controllers.Api //modelAdd.CREATER_ID = ; //modelAdd.MODIFIER_ID = ; modelAdd.ISRISK = false; - modelAdd.CHECK_PROJECT_CATEGORY_ID = modelProjCate.ID; + //modelAdd.CHECK_PROJECT_CATEGORY_ID = modelProjCate.ID; //modelAdd.CHECK_PROJECT_PROJECT_CATEGORY_ID = ; //wyw1114-1 //modelAdd.RESPONOBJECT = RESPONOBJECT.Value; @@ -662,11 +662,11 @@ namespace APT.BS.WebApi.Controllers.Api { strTypeError = "未找到检查类型:" + string.Join(",", listStrType) + ",行:" + string.Join(',', listType); } - string strProjCateError = string.Empty; - if (listProjCate != null && listProjCate.Count > 0) - { - strProjCateError = "未找到检查项目分类:" + string.Join(",", listStrProjCate) + ",行:" + string.Join(',', listProjCate); - } + //string strProjCateError = string.Empty; + //if (listProjCate != null && listProjCate.Count > 0) + //{ + // strProjCateError = "未找到检查项目分类:" + string.Join(",", listStrProjCate) + ",行:" + string.Join(',', listProjCate); + //} //listStrProjCate listStrTypeLevel string strTypeLevelError = string.Empty; if (listTypeLevel != null && listTypeLevel.Count > 0) @@ -705,10 +705,10 @@ namespace APT.BS.WebApi.Controllers.Api { Msg += (Msg.Length > 0 ? "、\r\n" : "") + strTypeError; } - if (!string.IsNullOrEmpty(strProjCateError)) - { - Msg += (Msg.Length > 0 ? "、\r\n" : "") + strProjCateError; - } + //if (!string.IsNullOrEmpty(strProjCateError)) + //{ + // Msg += (Msg.Length > 0 ? "、\r\n" : "") + strProjCateError; + //} if (!string.IsNullOrEmpty(strTypeLevelError)) { Msg += (Msg.Length > 0 ? "、\r\n" : "") + strTypeLevelError;