人员组织结构导入 安环部 公司级 处理

This commit is contained in:
wyw 2026-04-15 10:31:47 +08:00
parent 24f69a65ba
commit 38217451d9

View File

@ -1003,7 +1003,7 @@ namespace APT.BS.WebApi.Controllers.Api
} }
} }
if (listi != null) if (listi != null)
dicIndexEmpty.Add(i + rowIndex, listi);//有空的 直接添加 dicIndexEmpty.Add(i + rowIndex - 1, listi);//有空的 直接添加
#endregion #endregion
@ -1015,14 +1015,21 @@ namespace APT.BS.WebApi.Controllers.Api
modelDep10 = listDepAll.FirstOrDefault(e => e.NAME == strDep10); modelDep10 = listDepAll.FirstOrDefault(e => e.NAME == strDep10);
if (modelDep10 != null && modelDep10.DEPARTMENT_TYPE != 10) if (modelDep10 != null && modelDep10.DEPARTMENT_TYPE != 10)
{ {
if (!listDepName10.Contains(strDep10)) if (modelDep10.DEPARTMENT_TYPE == 5 && modelDep10.DEPARTMENT_STATUS == 2)
{ {
listDepName10.Add(strDep10); //安环部
}
else
{
if (!listDepName10.Contains(strDep10))
{
listDepName10.Add(strDep10);
}
listDepartment10Index.Add(i + rowIndex - 1);
} }
listDepartment10Index.Add(i + rowIndex);
} }
if ((modelDep10 == null || modelDep10.ID == Guid.Empty) && !listDepartment10Index.Contains(i + rowIndex)) if ((modelDep10 == null || modelDep10.ID == Guid.Empty) && !listDepartment10Index.Contains(i + rowIndex - 1))
{ {
modelDep10 = new T_FM_DEPARTMENT(); modelDep10 = new T_FM_DEPARTMENT();
modelDep10.ID = Guid.NewGuid(); modelDep10.ID = Guid.NewGuid();
@ -1056,7 +1063,7 @@ namespace APT.BS.WebApi.Controllers.Api
{ {
if (modelDep10 == null) if (modelDep10 == null)
{ {
listDepartment13Index.Add(i + rowIndex); listDepartment13Index.Add(i + rowIndex - 1);
} }
else else
{ {
@ -1067,10 +1074,10 @@ namespace APT.BS.WebApi.Controllers.Api
{ {
listDepName15.Add(strDep15); listDepName15.Add(strDep15);
} }
listDepartment15Index.Add(i + rowIndex); listDepartment15Index.Add(i + rowIndex - 1);
} }
if ((modelDep15 == null || modelDep15.ID == Guid.Empty) && !listDepartment15Index.Contains(i + rowIndex)) if ((modelDep15 == null || modelDep15.ID == Guid.Empty) && !listDepartment15Index.Contains(i + rowIndex - 1))
{ {
modelDep15 = new T_FM_DEPARTMENT(); modelDep15 = new T_FM_DEPARTMENT();
modelDep15.ID = Guid.NewGuid(); modelDep15.ID = Guid.NewGuid();
@ -1105,7 +1112,7 @@ namespace APT.BS.WebApi.Controllers.Api
{ {
if (modelDep10 == null) if (modelDep10 == null)
{ {
listDepartment35Index.Add(i + rowIndex); listDepartment35Index.Add(i + rowIndex - 1);
} }
else else
{ {
@ -1116,10 +1123,10 @@ namespace APT.BS.WebApi.Controllers.Api
{ {
listDepName20.Add(strDep20); listDepName20.Add(strDep20);
} }
listDepartment20Index.Add(i + rowIndex); listDepartment20Index.Add(i + rowIndex - 1);
} }
if ((modelDep20 == null || modelDep20.ID == Guid.Empty) && !listDepartment20Index.Contains(i + rowIndex)) if ((modelDep20 == null || modelDep20.ID == Guid.Empty) && !listDepartment20Index.Contains(i + rowIndex - 1))
{ {
modelDep20 = new T_FM_DEPARTMENT(); modelDep20 = new T_FM_DEPARTMENT();
modelDep20.ID = Guid.NewGuid(); modelDep20.ID = Guid.NewGuid();
@ -1149,7 +1156,7 @@ namespace APT.BS.WebApi.Controllers.Api
#region 7 8 #region 7 8
isAddUser = false; isAddUser = false;
if (!listDepartment13Index.Contains(i + rowIndex) && !listDepartment35Index.Contains(i + rowIndex)) if (!listDepartment13Index.Contains(i + rowIndex - 1) && !listDepartment35Index.Contains(i + rowIndex - 1))
{ {
//组织信息 对 才进来判断 //组织信息 对 才进来判断
strNAME = dtSource.Rows[i][7].ToString().Trim(); strNAME = dtSource.Rows[i][7].ToString().Trim();
@ -1164,7 +1171,7 @@ namespace APT.BS.WebApi.Controllers.Api
{ {
listStrPHONE.Add(strPHONE); listStrPHONE.Add(strPHONE);
} }
listPHONEIndex.Add(i + rowIndex); listPHONEIndex.Add(i + rowIndex - 1);
} }
#endregion #endregion
@ -1177,7 +1184,7 @@ namespace APT.BS.WebApi.Controllers.Api
{ {
listStrID_CARD.Add(strID_CARD); listStrID_CARD.Add(strID_CARD);
} }
listID_CARDIndex.Add(i + rowIndex); listID_CARDIndex.Add(i + rowIndex - 1);
} }
#endregion #endregion
@ -1191,7 +1198,7 @@ namespace APT.BS.WebApi.Controllers.Api
{ {
listStrSEX.Add(strSEX); listStrSEX.Add(strSEX);
} }
listSEXIndex.Add(i + rowIndex); listSEXIndex.Add(i + rowIndex - 1);
} }
#endregion #endregion
@ -1238,7 +1245,7 @@ namespace APT.BS.WebApi.Controllers.Api
{ {
listStrENTRYTIME.Add(strENTRYTIME); listStrENTRYTIME.Add(strENTRYTIME);
} }
listENTRYTIMEIndex.Add(i + rowIndex); listENTRYTIMEIndex.Add(i + rowIndex - 1);
} }
} }
else else
@ -1262,7 +1269,7 @@ namespace APT.BS.WebApi.Controllers.Api
{ {
listStrWORKINGYEAR.Add(strWORKINGYEAR); listStrWORKINGYEAR.Add(strWORKINGYEAR);
} }
listWORKINGYEARIndex.Add(i + rowIndex); listWORKINGYEARIndex.Add(i + rowIndex - 1);
} }
} }
else else
@ -1586,9 +1593,6 @@ namespace APT.BS.WebApi.Controllers.Api
var conndefault = ConfigurationManager.ConnectionStrings["default"]; var conndefault = ConfigurationManager.ConnectionStrings["default"];
#region #region
if (isHead) if (isHead)