去除检查范围(隐藏显示、默认露天矿)
检查库导入修改 对应导入模板修改 检查范围去除 手动隐患上报 检查范围默认 露天矿 跑批 默认露天矿 (限制未去除)
This commit is contained in:
		
							parent
							
								
									9b5be02e40
								
							
						
					
					
						commit
						1743bf6223
					
				@ -75,7 +75,7 @@ namespace APT.BS.WebApi.Controllers.Api
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
                    //获取数据
 | 
					                    //获取数据
 | 
				
			||||||
                    Dictionary<int, int> startRowIndexs = new Dictionary<int, int>();
 | 
					                    Dictionary<int, int> startRowIndexs = new Dictionary<int, int>();
 | 
				
			||||||
                    startRowIndexs.Add(0, 1);//根据Excel格式数据赋值
 | 
					                    startRowIndexs.Add(0, 3);//根据Excel格式数据赋值
 | 
				
			||||||
                    var dataTables = FileUtils.ReadExcelByOledb(filePath, startRowIndexs);
 | 
					                    var dataTables = FileUtils.ReadExcelByOledb(filePath, startRowIndexs);
 | 
				
			||||||
                    string Msg = string.Empty;
 | 
					                    string Msg = string.Empty;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -135,18 +135,20 @@ namespace APT.BS.WebApi.Controllers.Api
 | 
				
			|||||||
        /// <param name="rowIndex"></param>
 | 
					        /// <param name="rowIndex"></param>
 | 
				
			||||||
        /// <returns></returns>
 | 
					        /// <returns></returns>
 | 
				
			||||||
        /// <exception cref="Exception"></exception>
 | 
					        /// <exception cref="Exception"></exception>
 | 
				
			||||||
        public bool InsertModel(DataTable dtSource, Guid OrgID, ref string Msg, int rowIndex = 2)
 | 
					        public bool InsertModel(DataTable dtSource, Guid OrgID, ref string Msg, int rowIndex = 4)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            //检查对象0 检查区域1	检查类型2	检查项目分类3	检查层级4	责任单位5	检查周期6	检查项目7	检查内容8	检查依据9	检查问题描述10	检查问题等级11	重大隐患类别12	整改建议与措施13    责任人14 
 | 
					            //SMS 检查范围 默认露天矿
 | 
				
			||||||
 | 
					            //删除 检查范围、检查周期、检查依据、重大隐患类别 
 | 
				
			||||||
 | 
					            //检查区域 0   检查类型1    检查项目分类2  检查层级3    责任单位4  检查项目5    检查内容6   检查问题描述7   检查问题等级8  整改建议与措施9
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            //只有检查依据可以为空   
 | 
					            //检查对象0 检查区域1	检查类型2	检查项目分类3	检查层级4	责任单位5	检查周期6	检查项目7	检查内容8	检查依据9	检查问题描述10	检查问题等级11	重大隐患类别12	整改建议与措施13    责任人14 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (dtSource == null || dtSource.Rows.Count < 0)
 | 
					            if (dtSource == null || dtSource.Rows.Count < 0)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                Msg = "未获取到导入数据";
 | 
					                Msg = "未获取到导入数据";
 | 
				
			||||||
                throw new Exception(Msg);
 | 
					                throw new Exception(Msg);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            List<int> listNotEmpty = new List<int>() { 0, 1, 2, 3, 4, 5, 7, 8, 10, 11, 12, 13 };
 | 
					            List<int> listNotEmpty = new List<int>() { 0, 1, 2, 3, 4, 5, 7, 8, 9 };
 | 
				
			||||||
            //BSMineTypeEnum
 | 
					            //BSMineTypeEnum
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -154,9 +156,9 @@ namespace APT.BS.WebApi.Controllers.Api
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            Dictionary<int, List<int>> dicIndexEmpty = new Dictionary<int, List<int>>();
 | 
					            Dictionary<int, List<int>> dicIndexEmpty = new Dictionary<int, List<int>>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            //检查对象0
 | 
					            ////检查对象0
 | 
				
			||||||
            int ICheckObject = 0;
 | 
					            //int ICheckObject = 0;
 | 
				
			||||||
            string strCheckObject = string.Empty;
 | 
					            //string strCheckObject = string.Empty;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            //检查区域 1
 | 
					            //检查区域 1
 | 
				
			||||||
@ -222,14 +224,14 @@ namespace APT.BS.WebApi.Controllers.Api
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            //检查问题等级11
 | 
					            //检查问题等级11
 | 
				
			||||||
            List<string> listStrQuestionLevel = new List<string>() { "重大", "A", "B", "C", "D", };
 | 
					            //List<string> listStrQuestionLevel = new List<string>() { "重大", "A", "B", "C", "D", };
 | 
				
			||||||
            string strQuestionLevel = string.Empty;
 | 
					            string strQuestionLevel = string.Empty;
 | 
				
			||||||
            List<int> listQuestionLevel = new List<int>();
 | 
					            List<int> listQuestionLevel = new List<int>();
 | 
				
			||||||
            int iQuestionLevel = 0;
 | 
					            int iQuestionLevel = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            //责任人14 
 | 
					            //责任人14 
 | 
				
			||||||
            BSPLANCHECKOBJECTEnum? RESPONOBJECT = null;
 | 
					            //BSPLANCHECKOBJECTEnum? RESPONOBJECT = null;
 | 
				
			||||||
            string strResponObject = string.Empty;
 | 
					            //string strResponObject = string.Empty;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            #endregion
 | 
					            #endregion
 | 
				
			||||||
@ -252,14 +254,16 @@ namespace APT.BS.WebApi.Controllers.Api
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            //第一行是标题 跳过
 | 
					            //第一行是标题 跳过
 | 
				
			||||||
            int rowAll = dtSource.Rows.Count;
 | 
					            int rowAll = dtSource.Rows.Count;
 | 
				
			||||||
            List<EnumsResult> list = DataHelper.GetEnum("BSMineTypeEnum");
 | 
					            //List<EnumsResult> list = DataHelper.GetEnum("BSMineTypeEnum");
 | 
				
			||||||
 | 
					            //EnumsResult? enumCheck = null;
 | 
				
			||||||
 | 
					            List<EnumsResult> listLevel = DataHelper.GetEnum("BSQuestionLevelEnum");
 | 
				
			||||||
            EnumsResult? enumCheck = null;
 | 
					            EnumsResult? enumCheck = null;
 | 
				
			||||||
            for (int i = 0; i < rowAll; i++)
 | 
					            for (int i = 0; i < rowAll; i++)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                #region    不能为空
 | 
					                #region    不能为空
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                List<int> listi = null;
 | 
					                List<int> listi = null;
 | 
				
			||||||
                for (int j = 0; j < 16; j++)
 | 
					                for (int j = 0; j < 10; j++)
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    if (!listNotEmpty.Contains(j))
 | 
					                    if (!listNotEmpty.Contains(j))
 | 
				
			||||||
                        continue;
 | 
					                        continue;
 | 
				
			||||||
@ -270,29 +274,19 @@ namespace APT.BS.WebApi.Controllers.Api
 | 
				
			|||||||
                        {
 | 
					                        {
 | 
				
			||||||
                            listi = new List<int>();
 | 
					                            listi = new List<int>();
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
                        listi.Add(j);
 | 
					                        listi.Add(j + 1);
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                if (listi != null)
 | 
					                if (listi != null)
 | 
				
			||||||
                    dicIndexEmpty.Add(i + rowIndex, listi);//有空的 直接添加
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                #endregion
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                #region    检查范围 0
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                strCheckObject = dtSource.Rows[i][0].ToString().Trim();
 | 
					 | 
				
			||||||
                ICheckObject = 0;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                enumCheck = list.FirstOrDefault(e => e.NAME == strCheckObject);
 | 
					 | 
				
			||||||
                if (enumCheck != null)
 | 
					 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    ICheckObject = enumCheck.ID;
 | 
					                    dicIndexEmpty.Add(i + rowIndex, listi);//有空的 直接添加
 | 
				
			||||||
 | 
					                    continue;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					 | 
				
			||||||
                #endregion
 | 
					                #endregion
 | 
				
			||||||
                #region 检查区域  1
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
                strArea = dtSource.Rows[i][1].ToString().Trim();
 | 
					                #region 检查区域  0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                strArea = dtSource.Rows[i][0].ToString().Trim();
 | 
				
			||||||
                modelArea = listModelArea.FirstOrDefault(e => e.NAME == strArea);
 | 
					                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 && listProjCate.Count < 1 && listTypeLevel.Count < 1 && listQuestionLevel.Count < 1)
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
@ -323,9 +317,9 @@ namespace APT.BS.WebApi.Controllers.Api
 | 
				
			|||||||
                }
 | 
					                }
 | 
				
			||||||
                #endregion
 | 
					                #endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                #region 检查类型  2
 | 
					                #region 检查类型  1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                strType = dtSource.Rows[i][2].ToString().Trim();
 | 
					                strType = dtSource.Rows[i][1].ToString().Trim();
 | 
				
			||||||
                modelType = listModelType.FirstOrDefault(e => e.NAME == strType);
 | 
					                modelType = listModelType.FirstOrDefault(e => e.NAME == strType);
 | 
				
			||||||
                if (modelType == null)
 | 
					                if (modelType == null)
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
@ -361,22 +355,25 @@ namespace APT.BS.WebApi.Controllers.Api
 | 
				
			|||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                #endregion
 | 
					                #endregion
 | 
				
			||||||
                #region 项目分类  3
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
                strProjCate = dtSource.Rows[i][3].ToString().Trim();
 | 
					                #region 项目分类  2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                strProjCate = dtSource.Rows[i][2].ToString().Trim();
 | 
				
			||||||
                modelProjCate = listModelProjCate.FirstOrDefault(e => e.NAME == strProjCate);
 | 
					                modelProjCate = listModelProjCate.FirstOrDefault(e => e.NAME == strProjCate);
 | 
				
			||||||
                if (modelProjCate == null)
 | 
					                if (modelProjCate == null)
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    //检查项目分类
 | 
					                    //检查项目分类
 | 
				
			||||||
                    listProjCate.Add(i);
 | 
					                    listProjCate.Add(i + rowIndex);
 | 
				
			||||||
                    if (!listStrProjCate.Contains(strProjCate))
 | 
					                    if (!listStrProjCate.Contains(strProjCate))
 | 
				
			||||||
                        listStrProjCate.Add(strProjCate);
 | 
					                        listStrProjCate.Add(strProjCate);
 | 
				
			||||||
 | 
					                    continue;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                #endregion
 | 
					                #endregion
 | 
				
			||||||
                #region 检查层级  4
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
                strTypeLevel = dtSource.Rows[i][4].ToString().Trim();
 | 
					                #region 检查层级  3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                strTypeLevel = dtSource.Rows[i][3].ToString().Trim();
 | 
				
			||||||
                modelTypeLevel = listModelTypeLevel.FirstOrDefault(e => e.Nav_Enums.NAME == strTypeLevel && e.Nav_CheckType.NAME == strType);
 | 
					                modelTypeLevel = listModelTypeLevel.FirstOrDefault(e => e.Nav_Enums.NAME == strTypeLevel && e.Nav_CheckType.NAME == strType);
 | 
				
			||||||
                if (modelTypeLevel == null)
 | 
					                if (modelTypeLevel == null)
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
@ -389,9 +386,10 @@ namespace APT.BS.WebApi.Controllers.Api
 | 
				
			|||||||
                    TypeLevelEnumsTemp = listCheckTypeLevelEnums.FirstOrDefault(e => e.NAME == strTypeLevel);
 | 
					                    TypeLevelEnumsTemp = listCheckTypeLevelEnums.FirstOrDefault(e => e.NAME == strTypeLevel);
 | 
				
			||||||
                    if (TypeLevelEnumsTemp == null)
 | 
					                    if (TypeLevelEnumsTemp == null)
 | 
				
			||||||
                    {
 | 
					                    {
 | 
				
			||||||
                        listTypeLevel.Add(i);
 | 
					                        listTypeLevel.Add(i + rowIndex);
 | 
				
			||||||
                        if (!listStrTypeLevel.Contains(strType + "-" + strTypeLevel))
 | 
					                        if (!listStrTypeLevel.Contains(strType + "-" + strTypeLevel))
 | 
				
			||||||
                            listStrTypeLevel.Add(strType + "-" + strTypeLevel);
 | 
					                            listStrTypeLevel.Add(strType + "-" + strTypeLevel);
 | 
				
			||||||
 | 
					                        continue;
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                    else
 | 
					                    else
 | 
				
			||||||
                    {
 | 
					                    {
 | 
				
			||||||
@ -442,33 +440,35 @@ namespace APT.BS.WebApi.Controllers.Api
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
                #endregion
 | 
					                #endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                #region     责任单位 5
 | 
					                #region     责任单位 4
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                strDepName = dtSource.Rows[i][5].ToString().Trim();
 | 
					                strDepName = dtSource.Rows[i][4].ToString().Trim();
 | 
				
			||||||
                listDepName = strDepName.Split(charSplit, StringSplitOptions.RemoveEmptyEntries).ToList();
 | 
					                listDepName = strDepName.Split(charSplit, StringSplitOptions.RemoveEmptyEntries).ToList();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                ListModelDepartment = listDep.FindAll(e => listDepName.Contains(e.NAME));
 | 
					                ListModelDepartment = listDep.FindAll(e => listDepName.Contains(e.NAME));
 | 
				
			||||||
                if (ListModelDepartment == null || ListModelDepartment.Count == 0)
 | 
					                if (ListModelDepartment == null || ListModelDepartment.Count == 0)
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    listDepartment.Add(i);
 | 
					                    listDepartment.Add(i + rowIndex);
 | 
				
			||||||
                    if (!listStrDepartmentName.Contains(strDepName))
 | 
					                    if (!listStrDepartmentName.Contains(strDepName))
 | 
				
			||||||
                    {
 | 
					                    {
 | 
				
			||||||
                        listStrDepartmentName.Add(strDepName);
 | 
					                        listStrDepartmentName.Add(strDepName);
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
 | 
					                    continue;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                else if (ListModelDepartment.Count != listDepName.Count)
 | 
					                else if (ListModelDepartment.Count != listDepName.Count)
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    listDepartment.Add(i);
 | 
					                    listDepartment.Add(i + rowIndex);
 | 
				
			||||||
                    if (!listStrDepartmentName.Contains(strDepName))
 | 
					                    if (!listStrDepartmentName.Contains(strDepName))
 | 
				
			||||||
                    {
 | 
					                    {
 | 
				
			||||||
                        listStrDepartmentName.Add(strDepName);
 | 
					                        listStrDepartmentName.Add(strDepName);
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
 | 
					                    continue;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                #endregion
 | 
					                #endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                #region  检查项目 7 
 | 
					                #region  检查项目 5 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                strProject = dtSource.Rows[i][7].ToString().Trim();
 | 
					                strProject = dtSource.Rows[i][5].ToString().Trim();
 | 
				
			||||||
                modelProject = listModelProject.FirstOrDefault(e => e.NAME == strProject);
 | 
					                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 && listProjCate.Count < 1 && listTypeLevel.Count < 1 && listQuestionLevel.Count < 1)
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
@ -496,10 +496,10 @@ namespace APT.BS.WebApi.Controllers.Api
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
                #endregion
 | 
					                #endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                #region   检查内容 8
 | 
					                #region   检查内容 6
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                strContents = dtSource.Rows[i][8].ToString().Trim();
 | 
					                strContents = dtSource.Rows[i][6].ToString().Trim();
 | 
				
			||||||
                modelContents = listModelContents.FirstOrDefault(e => e.CHECKCONTENT == strContents && (BSMineTypeEnum)ICheckObject == e.CHECKOBJECT);
 | 
					                modelContents = listModelContents.FirstOrDefault(e => e.CHECKCONTENT == strContents && BSMineTypeEnum.Mine == e.CHECKOBJECT);
 | 
				
			||||||
                if (modelContents == null)
 | 
					                if (modelContents == null)
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    modelContents = new T_BS_CHECK_CONTENTS();
 | 
					                    modelContents = new T_BS_CHECK_CONTENTS();
 | 
				
			||||||
@ -516,7 +516,7 @@ namespace APT.BS.WebApi.Controllers.Api
 | 
				
			|||||||
                    modelContents.MODIFY_TIME = dtNow;
 | 
					                    modelContents.MODIFY_TIME = dtNow;
 | 
				
			||||||
                    //modelContents.CREATER_ID =;
 | 
					                    //modelContents.CREATER_ID =;
 | 
				
			||||||
                    //modelContents.MODIFIER_ID =;
 | 
					                    //modelContents.MODIFIER_ID =;
 | 
				
			||||||
                    modelContents.CHECKOBJECT = (BSMineTypeEnum)ICheckObject;
 | 
					                    modelContents.CHECKOBJECT = BSMineTypeEnum.Mine;// (BSMineTypeEnum)ICheckObject;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    listModelContents.Add(modelContents);
 | 
					                    listModelContents.Add(modelContents);
 | 
				
			||||||
                    listModelContentsAdd.Add(modelContents);
 | 
					                    listModelContentsAdd.Add(modelContents);
 | 
				
			||||||
@ -524,50 +524,27 @@ namespace APT.BS.WebApi.Controllers.Api
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
                #endregion
 | 
					                #endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                #region  检查问题等级   8
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                #region  检查问题等级   11
 | 
					                strQuestionLevel = dtSource.Rows[i][8].ToString().Trim();
 | 
				
			||||||
 | 
					                enumCheck = listLevel.FirstOrDefault(e => e.NAME == strQuestionLevel);
 | 
				
			||||||
                strQuestionLevel = dtSource.Rows[i][11].ToString().Trim();
 | 
					                if (enumCheck != null)
 | 
				
			||||||
                if (listStrQuestionLevel.Contains(strQuestionLevel))
 | 
					                    iQuestionLevel = enumCheck.ID;
 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    iQuestionLevel = 0;
 | 
					 | 
				
			||||||
                    switch (strQuestionLevel)
 | 
					 | 
				
			||||||
                    {
 | 
					 | 
				
			||||||
                        case "重大":
 | 
					 | 
				
			||||||
                            iQuestionLevel = 10;
 | 
					 | 
				
			||||||
                            break;
 | 
					 | 
				
			||||||
                        case "A":
 | 
					 | 
				
			||||||
                            iQuestionLevel = 20;
 | 
					 | 
				
			||||||
                            break;
 | 
					 | 
				
			||||||
                        case "B":
 | 
					 | 
				
			||||||
                            iQuestionLevel = 30;
 | 
					 | 
				
			||||||
                            break;
 | 
					 | 
				
			||||||
                        case "C":
 | 
					 | 
				
			||||||
                            iQuestionLevel = 40;
 | 
					 | 
				
			||||||
                            break;
 | 
					 | 
				
			||||||
                        case "D":
 | 
					 | 
				
			||||||
                            iQuestionLevel = 50;
 | 
					 | 
				
			||||||
                            break;
 | 
					 | 
				
			||||||
                        default:
 | 
					 | 
				
			||||||
                            break;
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
                else
 | 
					                else
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    //检查问题等级
 | 
					                    listQuestionLevel.Add(i + rowIndex); //检查问题等级
 | 
				
			||||||
                    listQuestionLevel.Add(i);
 | 
					                    continue;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					 | 
				
			||||||
                #endregion
 | 
					                #endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                #region   检查问题  (添加数据库)
 | 
					                #region   检查问题 7  (添加数据库)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                strDescreption = dtSource.Rows[i][10].ToString().Trim();
 | 
					                strDescreption = dtSource.Rows[i][7].ToString().Trim();
 | 
				
			||||||
                modelQuestion = listCheckQuestion.FirstOrDefault(e => !e.IS_DELETED && e.DESCREPTION == strDescreption);// && e.DEMAND == strDemand  不报错
 | 
					                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 && listProjCate.Count < 1 && listTypeLevel.Count < 1 && listQuestionLevel.Count < 1)
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    strDemand = dtSource.Rows[i][13].ToString().Trim();
 | 
					                    strDemand = dtSource.Rows[i][9].ToString().Trim();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    modelQuestion = new T_BS_CHECK_QUESTION();
 | 
					                    modelQuestion = new T_BS_CHECK_QUESTION();
 | 
				
			||||||
                    modelQuestion.ID = Guid.NewGuid();
 | 
					                    modelQuestion.ID = Guid.NewGuid();
 | 
				
			||||||
@ -596,27 +573,17 @@ namespace APT.BS.WebApi.Controllers.Api
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
                #endregion
 | 
					                #endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                #region     责任人14
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                strResponObject = dtSource.Rows[i][14].ToString().Trim();
 | 
					 | 
				
			||||||
                RESPONOBJECT = GetBSPLANCHECKOBJECTEnum(strResponObject, strTypeLevel.Contains("班") ? true : false);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                #endregion
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                #region      listMain
 | 
					                #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 && listProjCate.Count < 1 && listTypeLevel.Count < 1 && listQuestionLevel.Count < 1 && listDepartment.Count < 1)
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    T_BS_CHECK_MAIN modelAdd = new T_BS_CHECK_MAIN();
 | 
					                    T_BS_CHECK_MAIN modelAdd = new T_BS_CHECK_MAIN();
 | 
				
			||||||
                    modelAdd.ID = Guid.NewGuid();
 | 
					                    modelAdd.ID = Guid.NewGuid();
 | 
				
			||||||
                    modelAdd.CHECKOBJECT = ICheckObject;
 | 
					                    modelAdd.CHECKOBJECT = (int)BSMineTypeEnum.Mine;// ICheckObject;
 | 
				
			||||||
                    modelAdd.CHECK_PROJECT_ID = modelProject.ID;
 | 
					                    modelAdd.CHECK_PROJECT_ID = modelProject.ID;
 | 
				
			||||||
                    modelAdd.CHECK_QUESTION_ID = modelQuestion.ID;
 | 
					                    modelAdd.CHECK_QUESTION_ID = modelQuestion.ID;
 | 
				
			||||||
                    modelAdd.CHECKCONTENT = dtSource.Rows[i][8].ToString().Trim();
 | 
					                    modelAdd.CHECKCONTENT = dtSource.Rows[i][6].ToString().Trim();//dtSource.Rows[i][8]
 | 
				
			||||||
                    modelAdd.CHECKPROOF = dtSource.Rows[i][9].ToString().Trim();
 | 
					                    //modelAdd.CHECKPROOF = dtSource.Rows[i][9].ToString().Trim();
 | 
				
			||||||
                    modelAdd.QUESTION_LEVEL = iQuestionLevel;
 | 
					                    modelAdd.QUESTION_LEVEL = iQuestionLevel;
 | 
				
			||||||
                    modelAdd.SERIOUS_RISK = iQuestionLevel == 10 ? 1 : 0;
 | 
					                    modelAdd.SERIOUS_RISK = iQuestionLevel == 10 ? 1 : 0;
 | 
				
			||||||
                    modelAdd.CHECK_TYPE_ID = modelType.ID;
 | 
					                    modelAdd.CHECK_TYPE_ID = modelType.ID;
 | 
				
			||||||
@ -653,7 +620,7 @@ namespace APT.BS.WebApi.Controllers.Api
 | 
				
			|||||||
                            MAIN_ID = modelAdd.ID,
 | 
					                            MAIN_ID = modelAdd.ID,
 | 
				
			||||||
                            ORG_ID = modelAdd.ORG_ID,
 | 
					                            ORG_ID = modelAdd.ORG_ID,
 | 
				
			||||||
                            DEPARTMENT_ID = item.ID,
 | 
					                            DEPARTMENT_ID = item.ID,
 | 
				
			||||||
                            RESPONOBJECT = RESPONOBJECT.Value
 | 
					                            RESPONOBJECT = BSPLANCHECKOBJECTEnum.Head,// RESPONOBJECT.Value
 | 
				
			||||||
                        });
 | 
					                        });
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
@ -713,7 +680,6 @@ namespace APT.BS.WebApi.Controllers.Api
 | 
				
			|||||||
            //    strProjectError = "未找到检查项目" + string.Join(',', listProject);
 | 
					            //    strProjectError = "未找到检查项目" + string.Join(',', listProject);
 | 
				
			||||||
            //}
 | 
					            //}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
            string strQuestionLevelError = string.Empty;
 | 
					            string strQuestionLevelError = string.Empty;
 | 
				
			||||||
            if (listQuestionLevel != null && listQuestionLevel.Count > 0)
 | 
					            if (listQuestionLevel != null && listQuestionLevel.Count > 0)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
 | 
				
			|||||||
@ -217,7 +217,7 @@ namespace APT.BS.WebApi.Controllers.Api
 | 
				
			|||||||
            {
 | 
					            {
 | 
				
			||||||
                List<FilterRule> filterRules = filter.FilterGroup.Rules.ToList();
 | 
					                List<FilterRule> filterRules = filter.FilterGroup.Rules.ToList();
 | 
				
			||||||
                var guid = new Guid(filterRules[0].Value.ToString());
 | 
					                var guid = new Guid(filterRules[0].Value.ToString());
 | 
				
			||||||
                var modelSub = GetEntity<T_BS_RISK_SUBMIT>(e => e.ID == guid, new string[] { "Nav_CheckType", "Nav_CheckTypeLevel.Nav_Enums", "Nav_Files.Nav_ImgFile.Nav_File", "Nav_User" });
 | 
					                var modelSub = GetEntity<T_BS_RISK_SUBMIT>(e => e.ID == guid, new string[] { "Nav_Check", "Nav_CheckType", "Nav_CheckTypeLevel.Nav_Enums", "Nav_Files.Nav_ImgFile.Nav_File", "Nav_User" });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                //上报明细 是不完整的 明细信息重新 整理
 | 
					                //上报明细 是不完整的 明细信息重新 整理
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -6037,6 +6037,7 @@ namespace APT.BS.WebApi.Controllers.Api
 | 
				
			|||||||
                    risk.ORG_ID = entity.ORG_ID;
 | 
					                    risk.ORG_ID = entity.ORG_ID;
 | 
				
			||||||
                    risk.SUBMIT_STATUS = entity.RiskContentState;
 | 
					                    risk.SUBMIT_STATUS = entity.RiskContentState;
 | 
				
			||||||
                    risk.NAME = "手动隐患上报";
 | 
					                    risk.NAME = "手动隐患上报";
 | 
				
			||||||
 | 
					                    risk.CHECKOBJECT = BSMineTypeEnum.Mine;//SMS 默认露天矿
 | 
				
			||||||
                    if (!risk.CHECKTIME.HasValue)
 | 
					                    if (!risk.CHECKTIME.HasValue)
 | 
				
			||||||
                        risk.CHECKTIME = DateTime.Now;
 | 
					                        risk.CHECKTIME = DateTime.Now;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -802,7 +802,7 @@ namespace APT.PP.WebApi.Controllers.Api.PP
 | 
				
			|||||||
                                //modelRun.CHECKTIME = listPlanSetRund[i].CHECKTIME.HasValue ? Convert.ToDateTime(dtNow.ToString("yyyy-MM-dd ") + listPlanSetRund[i].CHECKTIME.Value.ToString("HH:mm:ss")) : DateTime.Now;
 | 
					                                //modelRun.CHECKTIME = listPlanSetRund[i].CHECKTIME.HasValue ? Convert.ToDateTime(dtNow.ToString("yyyy-MM-dd ") + listPlanSetRund[i].CHECKTIME.Value.ToString("HH:mm:ss")) : DateTime.Now;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                                modelRun.CREATER_ID = listFMUserNotice[j].ID;//安全检查的创建人 就是通知人
 | 
					                                modelRun.CREATER_ID = listFMUserNotice[j].ID;//安全检查的创建人 就是通知人
 | 
				
			||||||
                                modelRun.CHECKOBJECT = CHECKOBJECT;
 | 
					                                modelRun.CHECKOBJECT =(int) BSMineTypeEnum.Mine;// CHECKOBJECT;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                                modelRun.PLAN_SET_ID = listPlanSetRund[i].ID;
 | 
					                                modelRun.PLAN_SET_ID = listPlanSetRund[i].ID;
 | 
				
			||||||
                                modelRun.CREACTTYPE = CREACTTYPEEnum.System;// 10;//系统生成
 | 
					                                modelRun.CREACTTYPE = CREACTTYPEEnum.System;// 10;//系统生成
 | 
				
			||||||
@ -1258,7 +1258,7 @@ namespace APT.PP.WebApi.Controllers.Api.PP
 | 
				
			|||||||
                            //modelRun.CHECKTIME = listPlanSetRund[i].CHECKTIME.HasValue ? Convert.ToDateTime(dtNow.ToString("yyyy-MM-dd ") + listPlanSetRund[i].CHECKTIME.Value.ToString("HH:mm:ss")) : DateTime.Now;
 | 
					                            //modelRun.CHECKTIME = listPlanSetRund[i].CHECKTIME.HasValue ? Convert.ToDateTime(dtNow.ToString("yyyy-MM-dd ") + listPlanSetRund[i].CHECKTIME.Value.ToString("HH:mm:ss")) : DateTime.Now;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                            modelRun.CREATER_ID = listFMUserNotice[j].ID;//安全检查的创建人 就是通知人
 | 
					                            modelRun.CREATER_ID = listFMUserNotice[j].ID;//安全检查的创建人 就是通知人
 | 
				
			||||||
                            modelRun.CHECKOBJECT = CHECKOBJECT;
 | 
					                            modelRun.CHECKOBJECT = (int)BSMineTypeEnum.Mine;// CHECKOBJECT;
 | 
				
			||||||
                            modelRun.PLAN_SET_ID = listPlanSetRund[i].ID;
 | 
					                            modelRun.PLAN_SET_ID = listPlanSetRund[i].ID;
 | 
				
			||||||
                            modelRun.CREACTTYPE = CREACTTYPEEnum.System;// 10;//系统生成
 | 
					                            modelRun.CREACTTYPE = CREACTTYPEEnum.System;// 10;//系统生成
 | 
				
			||||||
                            modelRun.CODE = CHECK_TYPENAME_CODE + i.ToString() + j.ToString();//mmss 因为审批流 CODE 长度20 减少长度
 | 
					                            modelRun.CODE = CHECK_TYPENAME_CODE + i.ToString() + j.ToString();//mmss 因为审批流 CODE 长度20 减少长度
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user