This commit is contained in:
2024-05-22 16:57:34 +08:00
3 changed files with 521 additions and 6 deletions
+10 -5
View File
@@ -29,7 +29,6 @@ namespace WebAPI.Controllers
var user = db.Sys_User.FirstOrDefault(x => x.UserId == userId);
var person = db.SitePerson_Person.FirstOrDefault(x => x.ProjectId == projectId && x.IdentityCard == user.IdentityCard);
var getDataList1 = db.Sp_APP_GetToDoItems(projectId, userId).ToList();
var getDataList2 = db.Sp_APP_GetToDoItems(projectId, person.PersonId).ToList();
List<ToDoItem> getDataList = new List<ToDoItem>();
HashSet<string> ids = new HashSet<string>();
foreach (var item in getDataList1)
@@ -37,14 +36,20 @@ namespace WebAPI.Controllers
getDataList.Add(item);
ids.Add(item.DataId);
}
foreach (var item in getDataList2)
if (person != null)
{
if (!ids.Contains(item.DataId))
var getDataList2 = db.Sp_APP_GetToDoItems(projectId, person.PersonId).ToList();
foreach (var item in getDataList2)
{
getDataList.Add(item);
if (!ids.Contains(item.DataId))
{
getDataList.Add(item);
}
}
}
responeData.data = new { getDataList.Count, getDataList };
}
}
+1 -1
View File
@@ -30,7 +30,7 @@ namespace WebAPI
BLL.Funs.ConnString = ConfigurationManager.AppSettings["ConnectionString"];
BLL.Funs.PageSize = Convert.ToInt32(ConfigurationManager.AppSettings["PageSize"]);
BLL.ErrLogInfo.DefaultErrLogFullPath = Server.MapPath("~/ErrLog.txt");
PersonKqSocketSersvices.init(1000);
//PersonKqSocketSersvices.init(1000);
// 使api返回为json
GlobalConfiguration.Configuration.Formatters.XmlFormatter.SupportedMediaTypes.Clear();
}