检查库 导入 检查项目分类 删除
This commit is contained in:
parent
79b1c6944f
commit
680b067bc3
@ -148,7 +148,7 @@ namespace APT.BS.WebApi.Controllers.Api
|
|||||||
Msg = "未获取到导入数据";
|
Msg = "未获取到导入数据";
|
||||||
throw new Exception(Msg);
|
throw new Exception(Msg);
|
||||||
}
|
}
|
||||||
List<int> listNotEmpty = new List<int>() { 0, 1, 2, 3, 4, 5, 7, 8, 9 };
|
List<int> listNotEmpty = new List<int>() { 0, 1, 3, 4, 5, 7, 8, 9 };//2,
|
||||||
//BSMineTypeEnum
|
//BSMineTypeEnum
|
||||||
|
|
||||||
|
|
||||||
@ -176,12 +176,12 @@ namespace APT.BS.WebApi.Controllers.Api
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//检查项目分类 3
|
////检查项目分类 3
|
||||||
List<int> listProjCate = new List<int>();
|
//List<int> listProjCate = new List<int>();
|
||||||
List<string> listStrProjCate = new List<string>();
|
//List<string> listStrProjCate = new List<string>();
|
||||||
var listModelProjCate = GetEntities<T_BS_CHECK_PROJECT_CATEGORY>(e => !e.IS_DELETED, null, null);
|
//var listModelProjCate = GetEntities<T_BS_CHECK_PROJECT_CATEGORY>(e => !e.IS_DELETED, null, null);
|
||||||
string strProjCate = string.Empty;
|
//string strProjCate = string.Empty;
|
||||||
T_BS_CHECK_PROJECT_CATEGORY modelProjCate = new T_BS_CHECK_PROJECT_CATEGORY();
|
//T_BS_CHECK_PROJECT_CATEGORY modelProjCate = new T_BS_CHECK_PROJECT_CATEGORY();
|
||||||
|
|
||||||
//检查层级 4
|
//检查层级 4
|
||||||
List<int> listTypeLevel = new List<int>();
|
List<int> listTypeLevel = new List<int>();
|
||||||
@ -288,7 +288,7 @@ namespace APT.BS.WebApi.Controllers.Api
|
|||||||
|
|
||||||
strArea = dtSource.Rows[i][0].ToString().Trim();
|
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 && listTypeLevel.Count < 1 && listQuestionLevel.Count < 1)//&& listProjCate.Count < 1
|
||||||
{
|
{
|
||||||
//检查区域
|
//检查区域
|
||||||
modelArea = new T_HM_RISK_AREA();
|
modelArea = new T_HM_RISK_AREA();
|
||||||
@ -356,18 +356,18 @@ namespace APT.BS.WebApi.Controllers.Api
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 项目分类 2
|
#region //项目分类 2
|
||||||
|
|
||||||
strProjCate = dtSource.Rows[i][2].ToString().Trim();
|
//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 + rowIndex);
|
// listProjCate.Add(i + rowIndex);
|
||||||
if (!listStrProjCate.Contains(strProjCate))
|
// if (!listStrProjCate.Contains(strProjCate))
|
||||||
listStrProjCate.Add(strProjCate);
|
// listStrProjCate.Add(strProjCate);
|
||||||
continue;
|
// continue;
|
||||||
}
|
//}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -470,7 +470,7 @@ namespace APT.BS.WebApi.Controllers.Api
|
|||||||
|
|
||||||
strProject = dtSource.Rows[i][5].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 && listTypeLevel.Count < 1 && listQuestionLevel.Count < 1)//&& listProjCate.Count < 1
|
||||||
{
|
{
|
||||||
//检查项目 listProject.Add(i);
|
//检查项目 listProject.Add(i);
|
||||||
modelProject = new T_BS_CHECK_PROJECT();
|
modelProject = new T_BS_CHECK_PROJECT();
|
||||||
@ -542,7 +542,7 @@ namespace APT.BS.WebApi.Controllers.Api
|
|||||||
strDescreption = dtSource.Rows[i][7].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 && listTypeLevel.Count < 1 && listQuestionLevel.Count < 1)//&& listProjCate.Count < 1
|
||||||
{
|
{
|
||||||
strDemand = dtSource.Rows[i][9].ToString().Trim();
|
strDemand = dtSource.Rows[i][9].ToString().Trim();
|
||||||
|
|
||||||
@ -575,7 +575,7 @@ namespace APT.BS.WebApi.Controllers.Api
|
|||||||
|
|
||||||
#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 && listTypeLevel.Count < 1 && listQuestionLevel.Count < 1 && listDepartment.Count < 1)// && listProjCate.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();
|
||||||
@ -603,7 +603,7 @@ namespace APT.BS.WebApi.Controllers.Api
|
|||||||
//modelAdd.CREATER_ID = ;
|
//modelAdd.CREATER_ID = ;
|
||||||
//modelAdd.MODIFIER_ID = ;
|
//modelAdd.MODIFIER_ID = ;
|
||||||
modelAdd.ISRISK = false;
|
modelAdd.ISRISK = false;
|
||||||
modelAdd.CHECK_PROJECT_CATEGORY_ID = modelProjCate.ID;
|
//modelAdd.CHECK_PROJECT_CATEGORY_ID = modelProjCate.ID;
|
||||||
//modelAdd.CHECK_PROJECT_PROJECT_CATEGORY_ID = ;
|
//modelAdd.CHECK_PROJECT_PROJECT_CATEGORY_ID = ;
|
||||||
//wyw1114-1
|
//wyw1114-1
|
||||||
//modelAdd.RESPONOBJECT = RESPONOBJECT.Value;
|
//modelAdd.RESPONOBJECT = RESPONOBJECT.Value;
|
||||||
@ -662,11 +662,11 @@ namespace APT.BS.WebApi.Controllers.Api
|
|||||||
{
|
{
|
||||||
strTypeError = "未找到检查类型:" + string.Join(",", listStrType) + ",行:" + string.Join(',', listType);
|
strTypeError = "未找到检查类型:" + string.Join(",", listStrType) + ",行:" + string.Join(',', listType);
|
||||||
}
|
}
|
||||||
string strProjCateError = string.Empty;
|
//string strProjCateError = string.Empty;
|
||||||
if (listProjCate != null && listProjCate.Count > 0)
|
//if (listProjCate != null && listProjCate.Count > 0)
|
||||||
{
|
//{
|
||||||
strProjCateError = "未找到检查项目分类:" + string.Join(",", listStrProjCate) + ",行:" + string.Join(',', listProjCate);
|
// strProjCateError = "未找到检查项目分类:" + string.Join(",", listStrProjCate) + ",行:" + string.Join(',', listProjCate);
|
||||||
}
|
//}
|
||||||
//listStrProjCate listStrTypeLevel
|
//listStrProjCate listStrTypeLevel
|
||||||
string strTypeLevelError = string.Empty;
|
string strTypeLevelError = string.Empty;
|
||||||
if (listTypeLevel != null && listTypeLevel.Count > 0)
|
if (listTypeLevel != null && listTypeLevel.Count > 0)
|
||||||
@ -705,10 +705,10 @@ namespace APT.BS.WebApi.Controllers.Api
|
|||||||
{
|
{
|
||||||
Msg += (Msg.Length > 0 ? "、\r\n" : "") + strTypeError;
|
Msg += (Msg.Length > 0 ? "、\r\n" : "") + strTypeError;
|
||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(strProjCateError))
|
//if (!string.IsNullOrEmpty(strProjCateError))
|
||||||
{
|
//{
|
||||||
Msg += (Msg.Length > 0 ? "、\r\n" : "") + strProjCateError;
|
// Msg += (Msg.Length > 0 ? "、\r\n" : "") + strProjCateError;
|
||||||
}
|
//}
|
||||||
if (!string.IsNullOrEmpty(strTypeLevelError))
|
if (!string.IsNullOrEmpty(strTypeLevelError))
|
||||||
{
|
{
|
||||||
Msg += (Msg.Length > 0 ? "、\r\n" : "") + strTypeLevelError;
|
Msg += (Msg.Length > 0 ? "、\r\n" : "") + strTypeLevelError;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user