Merge branch 'master' of http://47.104.102.122:3000/lpf/sggl_cd
This commit is contained in:
@@ -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 };
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user