diff --git a/APT.MicroApi/APT.FM.WebApi/Controllers/FMUserController.cs b/APT.MicroApi/APT.FM.WebApi/Controllers/FMUserController.cs index ff96f2b..179ea67 100644 --- a/APT.MicroApi/APT.FM.WebApi/Controllers/FMUserController.cs +++ b/APT.MicroApi/APT.FM.WebApi/Controllers/FMUserController.cs @@ -801,7 +801,7 @@ namespace APT.BS.WebApi.Controllers.Api bool isAddUser = false;//是否新增人员 是角色信息得新增 否 查询后处理 bool isAdddep5 = false;//是否新增 公司 DateTime dtNow = DateTime.Now; - Dictionary> dicIndexEmpty = new Dictionary>(); + Dictionary> dicIndexEmpty = new Dictionary>(); List listDepAll = GetEntities(e => e.ENABLE_STATUS == 0, null).ToList(); List listUSER = GetEntities(e => e.ENABLE_STATUS == 0, null).ToList(); List listPerson = GetEntities(null, null).ToList(); @@ -987,7 +987,7 @@ namespace APT.BS.WebApi.Controllers.Api { #region 不能为空 - List listi = null; + List listi = null; for (int j = 0; j < 17; j++) { if (!listNotEmpty.Contains(j)) @@ -997,9 +997,9 @@ namespace APT.BS.WebApi.Controllers.Api { if (listi == null) { - listi = new List(); + listi = new List(); } - listi.Add(j); + listi.Add(GetCol(j)); } } if (listi != null) @@ -1677,6 +1677,60 @@ namespace APT.BS.WebApi.Controllers.Api return true; } + /// + /// 根据列信息 获取Excel列头 + /// + /// + /// + private string GetCol(int colIndex) + { + switch (colIndex) + { + case 0: + return "A"; + case 1: + return "B"; + case 2: + return "C"; + case 3: + return "D"; + case 4: + return "E"; + case 5: + return "F"; + case 6: + return "G"; + case 7: + return "H"; + case 8: + return "I"; + case 9: + return "J"; + case 10: + return "K"; + case 11: + return "L"; + case 12: + return "M"; + case 13: + return "N"; + case 14: + return "O"; + case 15: + return "P"; + case 16: + return "Q"; + case 17: + return "R"; + case 18: + return "S"; + case 19: + return "T"; + default: + break; + } + return ""; + } public bool InsertModel2(DataTable dtSource, Guid? orgId, string telnetCode, ref string Msg, int rowIndex = 1) { var userId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;