diff --git a/DataBase/版本日志/SGGLDB_V2021-09-09-001.sql b/DataBase/版本日志/SGGLDB_V2021-09-09-001.sql
new file mode 100644
index 00000000..6ce6c5f8
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_V2021-09-09-001.sql
@@ -0,0 +1,16 @@
+ALTER TABLE [dbo].[RealName_PushLog] ADD PushContent nvarchar(max) null
+go
+ALTER TABLE [dbo].[RealName_PushLog] ADD ReturnData nvarchar(max) null
+go
+
+/****** Object: Index [NonClusteredIndex-20210908-175111] Script Date: 2021/9/8 17:52:03 ******/
+CREATE NONCLUSTERED INDEX [NonClusteredIndex-20210908-175111] ON [dbo].[WBS_ControlItemAndCycle]
+(
+ [WorkPackageId] ASC,
+ [ProjectId] ASC,
+ [Weights] ASC,
+ [PlanCompleteDate] ASC
+)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
+GO
+
+
diff --git a/DataBase/版本日志/SGGLDB_V2021-09-07-001.sql b/DataBase/版本日志/已更新脚本/SGGLDB_V2021-09-07-001.sql
similarity index 100%
rename from DataBase/版本日志/SGGLDB_V2021-09-07-001.sql
rename to DataBase/版本日志/已更新脚本/SGGLDB_V2021-09-07-001.sql
diff --git a/SGGL/BLL/HSSE/SitePerson/PersonInOutService.cs b/SGGL/BLL/HSSE/SitePerson/PersonInOutService.cs
index 7da447bb..af8419bf 100644
--- a/SGGL/BLL/HSSE/SitePerson/PersonInOutService.cs
+++ b/SGGL/BLL/HSSE/SitePerson/PersonInOutService.cs
@@ -33,45 +33,7 @@ namespace BLL
{
return Funs.DB.SitePerson_PersonInOut.FirstOrDefault(x => x.PersonId == personId && x.ChangeTime == ChangeTime && x.IsIn == isIn);
}
-
- /////
- ///// 增加人员出入场信息
- /////
- ///// 人员实体
- //public static void AddPersonInOut(Model.SitePerson_PersonInOut PersonInOut)
- //{
- // Model.SGGLDB db = Funs.DB;
- // string postType = null;
- // string workpostId = null;
- // var getPerson = db.SitePerson_Person.FirstOrDefault(x => x.PersonId == PersonInOut.PersonId);
- // if (getPerson != null)
- // {
- // workpostId = getPerson.WorkPostId;
- // var getWokPost = db.Base_WorkPost.FirstOrDefault(x => x.PostType == getPerson.WorkPostId);
- // if (getWokPost != null)
- // {
- // postType = getWokPost.PostType;
- // }
- // }
-
- // Model.SitePerson_PersonInOut newPersonInOut = new Model.SitePerson_PersonInOut
- // {
- // PersonInOutId = SQLHelper.GetNewID(typeof(Model.SitePerson_PersonInOut)),
- // ProjectId = PersonInOut.ProjectId,
- // UnitId = PersonInOut.UnitId,
- // PersonId = PersonInOut.PersonId,
- // IsIn = PersonInOut.IsIn,
- // ChangeTime = PersonInOut.ChangeTime,
- // WorkPostId = workpostId,
- // PostType = postType,
- // };
-
- // db.SitePerson_PersonInOut.InsertOnSubmit(newPersonInOut);
- // db.SubmitChanges();
- // //// 插入当日记录表
- // InsertPersonInOutNowNow(newPersonInOut);
- //}
-
+
///
/// 插入当日出入记录表
///
diff --git a/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs b/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs
index 51bbc3ea..00f36da9 100644
--- a/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs
+++ b/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs
@@ -184,6 +184,7 @@ namespace BLL
try
{
string access_token = string.Empty;
+ string pushContent = string.Empty;
string clientId = SynchroSet.ClientId;
string userName = SynchroSet.UserName;
string password = Funs.EncryptionPassword(SynchroSet.Password);
@@ -197,8 +198,9 @@ namespace BLL
timestamp,
sign
};
- string contenttype = "application/json;charset=utf-8";
- var returndata = BLL.APIGetHttpService.OutsideHttp(Funs.RealNameApiUrl + "/foreignApi/auth/accessToken", "POST", contenttype, null, JsonConvert.SerializeObject(getToken));
+ string contenttype = "application/json;charset=utf-8";
+ pushContent= JsonConvert.SerializeObject(getToken);
+ var returndata = BLL.APIGetHttpService.OutsideHttp(Funs.RealNameApiUrl + "/foreignApi/auth/accessToken", "POST", contenttype, null,pushContent);
if (!string.IsNullOrEmpty(returndata))
{
JObject obj = JObject.Parse(returndata);
@@ -209,16 +211,16 @@ namespace BLL
SynchroSet.Tokenendtime = DateTime.Now.AddHours(23);
SynchroSet.Timestamp = Funs.GetNewDateTime(timestamp);
SaveSynchroSet(SynchroSet);
- InsertRealNamePushLog(null, SynchroSet.ProCode, "获取凭证", obj["success"].ToString(), obj["code"].ToString(), obj["message"].ToString());
+ InsertRealNamePushLog(null, SynchroSet.ProCode, "获取凭证", obj["success"].ToString(), obj["code"].ToString(), obj["message"].ToString(),access_token, pushContent);
}
else
{
- InsertRealNamePushLog(null, SynchroSet.ProCode, "获取凭证", "False", "", returndata);
+ InsertRealNamePushLog(null, SynchroSet.ProCode, "获取凭证", "False", "", returndata, access_token, pushContent);
}
}
else
{
- InsertRealNamePushLog(null, SynchroSet.ProCode, "获取凭证", "False", "", "获取凭证失败" + JsonConvert.SerializeObject(getToken));
+ InsertRealNamePushLog(null, SynchroSet.ProCode, "获取凭证", "False", "", "获取凭证失败", access_token, pushContent);
}
return access_token;
}
@@ -234,7 +236,7 @@ namespace BLL
///
/// 实名制推送记录日志
///
- public static void InsertRealNamePushLog(string ProjectId, string JTProjectCode, string PushType, string Success, string Code, string Message)
+ public static void InsertRealNamePushLog(string ProjectId, string JTProjectCode, string PushType, string Success, string Code, string Message, string ReturnData, string PushContent)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
@@ -248,6 +250,8 @@ namespace BLL
Code = Code,
Message = Message,
PushTime = DateTime.Now,
+ ReturnData = ReturnData,
+ PushContent = PushContent,
};
db.RealName_PushLog.InsertOnSubmit(newLog);
db.SubmitChanges();
@@ -269,6 +273,8 @@ namespace BLL
string mess = string.Empty;
string sucess = string.Empty;
string code = string.Empty;
+ string data = string.Empty;
+ string pushContent = string.Empty;
string contenttype = "application/json;charset=unicode";
string url = Funs.RealNameApiUrl + "/foreignApi/baseData/getDict";
var dictTypeCode = new
@@ -279,7 +285,8 @@ namespace BLL
{
{ "token", getaccess_token(null) }
};
- var returndata = BLL.APIGetHttpService.OutsideHttp(url, "POST", contenttype, newToken, JsonConvert.SerializeObject(dictTypeCode));
+ pushContent = JsonConvert.SerializeObject(dictTypeCode);
+ var returndata = BLL.APIGetHttpService.OutsideHttp(url, "POST", contenttype, newToken, pushContent);
if (!string.IsNullOrEmpty(returndata))
{
JObject obj = JObject.Parse(returndata);
@@ -288,7 +295,8 @@ namespace BLL
sucess = obj["success"].ToString();
if (Convert.ToBoolean(obj["success"].ToString()))
{
- JArray arr = JArray.Parse(obj["data"].ToString());
+ data = obj["data"].ToString();
+ JArray arr = JArray.Parse(data);
foreach (var item in arr)
{
string dictCode = item["dictCode"].ToString();
@@ -335,7 +343,7 @@ namespace BLL
}
}
}
- InsertRealNamePushLog(null, null, "获取基础字典[" + type + "]", sucess, code, mess);
+ InsertRealNamePushLog(null, null, "获取基础字典[" + type + "]", sucess, code, mess,data,pushContent);
return mess;
}
catch (Exception ex)
@@ -358,13 +366,15 @@ namespace BLL
string mess = string.Empty;
string sucess = string.Empty;
string code = string.Empty;
+ string data = string.Empty;
+ string pushContent = string.Empty;
string contenttype = "application/json;charset=unicode";
string url = Funs.RealNameApiUrl + "/foreignApi/baseData/getCountry";
Hashtable newToken = new Hashtable
{
{ "token", getaccess_token(null) }
- };
+ };
var returndata = BLL.APIGetHttpService.OutsideHttp(url, "POST", contenttype, newToken, null);
if (!string.IsNullOrEmpty(returndata))
{
@@ -374,7 +384,8 @@ namespace BLL
sucess = obj["success"].ToString();
if (Convert.ToBoolean(obj["success"].ToString()))
{
- JArray arr = JArray.Parse(obj["data"].ToString());
+ data = obj["data"].ToString();
+ JArray arr = JArray.Parse(data);
foreach (var item in arr)
{
string countryId = item["countryId"].ToString();
@@ -405,7 +416,7 @@ namespace BLL
}
}
}
- InsertRealNamePushLog(null, null, "获取国家数据", sucess, code, mess);
+ InsertRealNamePushLog(null, null, "获取国家数据", sucess, code, mess, data, pushContent);
return mess;
}
#endregion
@@ -422,6 +433,8 @@ namespace BLL
string mess = string.Empty;
string sucess = string.Empty;
string code = string.Empty;
+ string data = string.Empty;
+ string pushContent = string.Empty;
string contenttype = "application/json;charset=unicode";
string url = Funs.RealNameApiUrl + "/foreignApi/baseData/getCity";
@@ -436,7 +449,8 @@ namespace BLL
{
{ "token", getaccess_token(null) }
};
- var returndata = BLL.APIGetHttpService.OutsideHttp(url, "POST", contenttype, newToken, JsonConvert.SerializeObject(country));
+ pushContent = JsonConvert.SerializeObject(country);
+ var returndata = BLL.APIGetHttpService.OutsideHttp(url, "POST", contenttype, newToken,pushContent);
if (!string.IsNullOrEmpty(returndata))
{
JObject obj = JObject.Parse(returndata);
@@ -445,7 +459,8 @@ namespace BLL
sucess = obj["success"].ToString();
if (Convert.ToBoolean(obj["success"].ToString()))
{
- JArray arr = JArray.Parse(obj["data"].ToString());
+ data = obj["data"].ToString();
+ JArray arr = JArray.Parse(data);
foreach (var item in arr)
{
string provinceCode = item["provinceCode"].ToString();
@@ -476,7 +491,7 @@ namespace BLL
}
}
}
- InsertRealNamePushLog(null, null, "获取省份数据", sucess, code, mess);
+ InsertRealNamePushLog(null, null, "获取省份数据", sucess, code, mess, data, pushContent);
return mess;
}
#endregion
@@ -492,6 +507,8 @@ namespace BLL
string mess = string.Empty;
string sucess = string.Empty;
string code = string.Empty;
+ string data = string.Empty;
+ string pushContent = string.Empty;
string contenttype = "application/json;charset=unicode";
string url = Funs.RealNameApiUrl + "/foreignApi/baseData/getProjectList";
Hashtable newToken = new Hashtable
@@ -507,7 +524,8 @@ namespace BLL
sucess = obj["success"].ToString();
if (Convert.ToBoolean(obj["success"].ToString()))
{
- JArray arr = JArray.Parse(obj["data"].ToString());
+ data = obj["data"].ToString();
+ JArray arr = JArray.Parse(data);
foreach (var item in arr)
{
string JTproCode = item["proCode"].ToString();
@@ -540,7 +558,7 @@ namespace BLL
}
}
}
- InsertRealNamePushLog(null, proCode, "获取项目数据", sucess, code, mess);
+ InsertRealNamePushLog(null, proCode, "获取项目数据", sucess, code, mess, data, pushContent);
return mess;
}
#endregion
@@ -558,6 +576,8 @@ namespace BLL
string mess = string.Empty;
string sucess = string.Empty;
string code = string.Empty;
+ string data = string.Empty;
+ string pushContent = string.Empty;
string contenttype = "application/json;charset=unicode";
string url = Funs.RealNameApiUrl + "/foreignApi/baseData/getCollTeam";
var getProjects = from x in Funs.DB.RealName_Project where proCode == null || x.ProCode == proCode select x;
@@ -571,7 +591,8 @@ namespace BLL
{
{ "token", getaccess_token(citem.ProCode) }
};
- var returndata = BLL.APIGetHttpService.OutsideHttp(url, "POST", contenttype, newToken, JsonConvert.SerializeObject(getProject));
+ pushContent = JsonConvert.SerializeObject(getProject);
+ var returndata = BLL.APIGetHttpService.OutsideHttp(url, "POST", contenttype, newToken, pushContent);
if (!string.IsNullOrEmpty(returndata))
{
JObject obj = JObject.Parse(returndata);
@@ -582,7 +603,8 @@ namespace BLL
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
- JArray arr = JArray.Parse(obj["data"].ToString());
+ data = obj["data"].ToString();
+ JArray arr = JArray.Parse(data);
foreach (var item in arr)
{
long? teamId = Funs.GetNewlong(item["teamId"].ToString());
@@ -631,12 +653,12 @@ namespace BLL
}
else
{
- InsertRealNamePushLog(null, proCode, "获取施工队数据", sucess, code, mess);
+ InsertRealNamePushLog(null, proCode, "获取施工队数据", sucess, code, mess, data, pushContent);
}
}
else
{
- InsertRealNamePushLog(null, proCode, "获取施工队数据", sucess, code, mess);
+ InsertRealNamePushLog(null, proCode, "获取施工队数据", sucess, code, mess, data, pushContent);
}
}
return mess;
@@ -661,6 +683,8 @@ namespace BLL
string mess = string.Empty;
string sucess = string.Empty;
string code = string.Empty;
+ string data = string.Empty;
+ string pushContent = string.Empty;
string contenttype = "application/json;charset=unicode";
string url = Funs.RealNameApiUrl + "/foreignApi/accept/collCompany";
var getUnit = (from x in db.Base_Unit
@@ -676,13 +700,15 @@ namespace BLL
{
{ "token", getaccess_token(null) }
};
- var returndata = BLL.APIGetHttpService.OutsideHttp(url, "POST", contenttype, newToken, JsonConvert.SerializeObject(listObject));
+ pushContent = JsonConvert.SerializeObject(listObject);
+ var returndata = BLL.APIGetHttpService.OutsideHttp(url, "POST", contenttype, newToken, pushContent);
if (!string.IsNullOrEmpty(returndata))
{
JObject obj = JObject.Parse(returndata);
mess = obj["message"].ToString();
code = obj["code"].ToString();
sucess = obj["success"].ToString();
+ data = obj["data"].ToString();
if (Convert.ToBoolean(obj["success"].ToString()))
{
foreach (var item in getUnit)
@@ -693,7 +719,7 @@ namespace BLL
}
}
- InsertRealNamePushLog(null, null, "推送参建企业数据", sucess, code, mess);
+ InsertRealNamePushLog(null, null, "推送参建企业数据", sucess, code, mess, data, pushContent);
}
else
{
@@ -716,6 +742,8 @@ namespace BLL
string mess = string.Empty;
string sucess = string.Empty;
string code = string.Empty;
+ string data = string.Empty;
+ string pushContent = string.Empty;
string contenttype = "application/json;charset=unicode";
string url = Funs.RealNameApiUrl + "/foreignApi/accept/proCollCompany";
@@ -754,13 +782,15 @@ namespace BLL
};
PushCollCompany(getProjectUnits.Select(x => x.unitId).Distinct().ToList(), newToken);
- var returndata = BLL.APIGetHttpService.OutsideHttp(url, "POST", contenttype, newToken, JsonConvert.SerializeObject(listObject));
+ pushContent = JsonConvert.SerializeObject(listObject);
+ var returndata = BLL.APIGetHttpService.OutsideHttp(url, "POST", contenttype, newToken, pushContent);
if (!string.IsNullOrEmpty(returndata))
{
JObject obj = JObject.Parse(returndata);
mess = obj["message"].ToString();
code = obj["code"].ToString();
sucess = obj["success"].ToString();
+ data = obj["data"].ToString();
if (Convert.ToBoolean(obj["success"].ToString()))
{
foreach (var item in getProjectUnits)
@@ -774,7 +804,7 @@ namespace BLL
}
}
}
- InsertRealNamePushLog(null, proCode, "推送项目参建企业数据", sucess, code, mess);
+ InsertRealNamePushLog(null, proCode, "推送项目参建企业数据", sucess, code, mess, data, pushContent);
}
else
{
@@ -795,6 +825,8 @@ namespace BLL
string mess = string.Empty;
string sucess = string.Empty;
string code = string.Empty;
+ string data = string.Empty;
+ string pushContent = string.Empty;
string contenttype = "application/json;charset=unicode";
string url = Funs.RealNameApiUrl + "/foreignApi/accept/collCompany";
var getUnit = (from x in db.Base_Unit
@@ -805,14 +837,16 @@ namespace BLL
var listObject = new
{
list = getUnit.Select(x => new { collCompanyName = x.UnitName, collCropCode = x.CollCropCode, isChina = x.IsChina })
- };
- var returndata = BLL.APIGetHttpService.OutsideHttp(url, "POST", contenttype, newToken, JsonConvert.SerializeObject(listObject));
+ };
+ pushContent = JsonConvert.SerializeObject(listObject);
+ var returndata = BLL.APIGetHttpService.OutsideHttp(url, "POST", contenttype, newToken, pushContent);
if (!string.IsNullOrEmpty(returndata))
{
JObject obj = JObject.Parse(returndata);
mess = obj["message"].ToString();
code = obj["code"].ToString();
sucess = obj["success"].ToString();
+ data = obj["data"].ToString();
if (Convert.ToBoolean(obj["success"].ToString()))
{
foreach (var item in getUnit)
@@ -822,6 +856,7 @@ namespace BLL
}
}
}
+ InsertRealNamePushLog(null, null, "推送参建企业数据", sucess, code, mess, data, pushContent);
}
}
#endregion
@@ -836,6 +871,8 @@ namespace BLL
string mess = string.Empty;
string sucess = string.Empty;
string code = string.Empty;
+ string data = string.Empty;
+ string pushContent = string.Empty;
string contenttype = "application/json;charset=unicode";
string url = Funs.RealNameApiUrl + "/foreignApi/accept/collTeam";
@@ -874,13 +911,15 @@ namespace BLL
{
{ "token", getaccess_token(proCode) }
};
- var returndata = BLL.APIGetHttpService.OutsideHttp(url, "POST", contenttype, newToken, JsonConvert.SerializeObject(listObject));
+ pushContent = JsonConvert.SerializeObject(listObject);
+ var returndata = BLL.APIGetHttpService.OutsideHttp(url, "POST", contenttype, newToken, pushContent);
if (!string.IsNullOrEmpty(returndata))
{
JObject obj = JObject.Parse(returndata);
mess = obj["message"].ToString();
code = obj["code"].ToString();
sucess = obj["success"].ToString();
+ data = obj["data"].ToString();
if (obj["success"] != null && Convert.ToBoolean(obj["success"].ToString()))
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
@@ -897,7 +936,7 @@ namespace BLL
}
}
}
- InsertRealNamePushLog(null, proCode, "推送项目部/施工队数据", sucess, code, mess);
+ InsertRealNamePushLog(null, proCode, "推送项目部/施工队数据", sucess, code, mess, data, pushContent);
}
else
{
@@ -920,6 +959,9 @@ namespace BLL
string mess = string.Empty;
string sucess = string.Empty;
string code = string.Empty;
+ string data = string.Empty;
+ string pushContent = string.Empty;
+
string contenttype = "application/json;charset=unicode";
var getData = (from x in Funs.DB.SitePerson_Person
join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId
@@ -930,7 +972,8 @@ namespace BLL
where (identityCard == null || x.IdentityCard == identityCard)
&& y.JTProjectCode == proCode && z.JTproCode != null && x.IsCardNoOK ==true
&& v.TeamId.HasValue && x.HeadImage != null && x.HeadImage.Length > 0
- && ((type == Const.BtnModify && !x.RealNameUpdateTime.HasValue && x.RealNameAddTime.HasValue) || (type != Const.BtnModify && !x.RealNameAddTime.HasValue && x.IsUsed && !x.OutTime.HasValue))
+ && ((type == Const.BtnModify && !x.RealNameUpdateTime.HasValue
+ && x.RealNameAddTime.HasValue) || (type != Const.BtnModify && !x.RealNameAddTime.HasValue && x.IsUsed && !x.OutTime.HasValue))
&& p.UnitType != Const.ProjectUnitType_3 && p.UnitType != Const.ProjectUnitType_4
select new
{
@@ -979,7 +1022,9 @@ namespace BLL
{
list = getData.Select(x => new { x.name, x.idcardType, x.idcardNumber, x.idcardStartDate, x.idcardEndDate, x.idcardForever, x.politicsStatus, x.eduLevel, x.maritalStatus, x.sex, x.idcardAddress, x.homeAddress, x.birthday, x.nation, x.countryCode, x.provinceCode, x.proCode, x.teamId, x.mobile, x.teamLeaderFlag, x.userType, x.workType, x.isLeave, x.entryTime, x.exitTime })
};
- returndata = BLL.APIGetHttpService.OutsideHttp(Funs.RealNameApiUrl + "/foreignApi/accept/updatePersons", "POST", contenttype, newToken, JsonConvert.SerializeObject(updatelistObject));
+
+ pushContent = JsonConvert.SerializeObject(updatelistObject);
+ returndata = BLL.APIGetHttpService.OutsideHttp(Funs.RealNameApiUrl + "/foreignApi/accept/updatePersons", "POST", contenttype, newToken, pushContent);
}
else
{
@@ -987,7 +1032,9 @@ namespace BLL
{
list = getData.Select(x => new { x.name, x.idcardType, x.idcardNumber, x.idcardStartDate, x.idcardEndDate, x.idcardForever, x.politicsStatus, x.eduLevel, x.maritalStatus, x.sex, x.idcardAddress, x.homeAddress, x.birthday, x.nation, x.countryCode, x.provinceCode, x.headImage, x.proCode, x.teamId, x.mobile, x.teamLeaderFlag, x.userType, x.workType, x.isLeave, x.entryTime, x.exitTime })
};
- returndata = BLL.APIGetHttpService.OutsideHttp(Funs.RealNameApiUrl + "/foreignApi/accept/persons", "POST", contenttype, newToken, JsonConvert.SerializeObject(addlistObject));
+
+ pushContent = JsonConvert.SerializeObject(addlistObject);
+ returndata = BLL.APIGetHttpService.OutsideHttp(Funs.RealNameApiUrl + "/foreignApi/accept/persons", "POST", contenttype, newToken, pushContent);
}
if (!string.IsNullOrEmpty(returndata))
@@ -996,6 +1043,7 @@ namespace BLL
mess = obj["message"].ToString();
code = obj["code"].ToString();
sucess = obj["success"].ToString();
+ data = obj["data"].ToString();
if (obj["success"] != null && Convert.ToBoolean(obj["success"].ToString()) )
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
@@ -1017,7 +1065,7 @@ namespace BLL
}
}
- InsertRealNamePushLog(null, proCode, "推送人员数据", sucess, code, mess);
+ InsertRealNamePushLog(null, proCode, "推送人员数据", sucess, code, mess, data, pushContent);
}
else
{
@@ -1044,6 +1092,8 @@ namespace BLL
string mess = string.Empty;
string sucess = string.Empty;
string code = string.Empty;
+ string data = string.Empty;
+ string pushContent = string.Empty;
string contenttype = "application/json;charset=unicode";
var getData = (from x in Funs.DB.SitePerson_Person
join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId
@@ -1100,7 +1150,8 @@ namespace BLL
{
list = getData.Select(x => new { x.name, x.idcardType, x.idcardNumber, x.idcardStartDate, x.idcardEndDate, x.idcardForever, x.politicsStatus, x.eduLevel, x.maritalStatus, x.sex, x.idcardAddress, x.homeAddress, x.birthday, x.nation, x.countryCode, x.provinceCode, x.proCode, x.teamId, x.mobile, x.teamLeaderFlag, x.userType, x.workType, x.isLeave, x.entryTime, x.exitTime })
};
- returndata = BLL.APIGetHttpService.OutsideHttp(Funs.RealNameApiUrl + "/foreignApi/accept/updatePersons", "POST", contenttype, newToken, JsonConvert.SerializeObject(updatelistObject));
+ pushContent = JsonConvert.SerializeObject(updatelistObject);
+ returndata = BLL.APIGetHttpService.OutsideHttp(Funs.RealNameApiUrl + "/foreignApi/accept/updatePersons", "POST", contenttype, newToken, pushContent);
}
else
{
@@ -1108,7 +1159,8 @@ namespace BLL
{
list = getData.Select(x => new { x.name, x.idcardType, x.idcardNumber, x.idcardStartDate, x.idcardEndDate, x.idcardForever, x.politicsStatus, x.eduLevel, x.maritalStatus, x.sex, x.idcardAddress, x.homeAddress, x.birthday, x.nation, x.countryCode, x.provinceCode, x.headImage, x.proCode, x.teamId, x.mobile, x.teamLeaderFlag, x.userType, x.workType, x.isLeave, x.entryTime, x.exitTime })
};
- returndata = BLL.APIGetHttpService.OutsideHttp(Funs.RealNameApiUrl + "/foreignApi/accept/persons", "POST", contenttype, newToken, JsonConvert.SerializeObject(addlistObject));
+ pushContent = JsonConvert.SerializeObject(addlistObject);
+ returndata = BLL.APIGetHttpService.OutsideHttp(Funs.RealNameApiUrl + "/foreignApi/accept/persons", "POST", contenttype, newToken, pushContent);
}
if (!string.IsNullOrEmpty(returndata))
@@ -1117,6 +1169,7 @@ namespace BLL
mess = obj["message"].ToString();
code = obj["code"].ToString();
sucess = obj["success"].ToString();
+ data = obj["data"].ToString();
if (obj["success"] != null && Convert.ToBoolean(obj["success"].ToString()))
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
@@ -1138,7 +1191,7 @@ namespace BLL
}
}
- InsertRealNamePushLog(null, proCode, "推送人员数据", sucess, code, mess);
+ InsertRealNamePushLog(null, proCode, "推送人员数据", sucess, code, mess, data, pushContent);
}
else
{
@@ -1167,6 +1220,8 @@ namespace BLL
string mess = string.Empty;
string sucess = string.Empty;
string code = string.Empty;
+ string data = string.Empty;
+ string pushContent = string.Empty;
//string contenttype = "application/json;charset=unicode";
string url = Funs.RealNameApiUrl + "/foreignApi/accept/attendance";
var getData = (from x in Funs.DB.RealName_PersonInOutNow
@@ -1179,6 +1234,7 @@ namespace BLL
&& v.TeamId.HasValue && p.HeadImage != null && r.TeamId.HasValue
&& p.IsCardNoOK ==true && z.JTproCode != null
&& (!p.OutTime.HasValue || p.OutTime > x.ChangeTime)
+ && !x.RealNamePushTime.HasValue
orderby x.ChangeTime descending
select new
{
@@ -1212,14 +1268,15 @@ namespace BLL
addTeam(getData.Select(x => x.TeamGroupId).Distinct().ToList(), newToken);
getTeam(proCode, newToken);
addPerson(getData.Select(x => x.PersonId).Distinct().ToList(), newToken);
-
- var returndata = BLL.APIGetHttpService.OutsideHttp(url, "POST", null, newToken, JsonConvert.SerializeObject(listObject));
+ pushContent = JsonConvert.SerializeObject(listObject);
+ var returndata = BLL.APIGetHttpService.OutsideHttp(url, "POST", null, newToken, pushContent);
if (!string.IsNullOrEmpty(returndata))
{
JObject obj = JObject.Parse(returndata);
mess = obj["message"].ToString();
code = obj["code"].ToString();
sucess = obj["success"].ToString();
+ data = obj["data"].ToString();
if (obj["success"] != null && Convert.ToBoolean(obj["success"].ToString()))
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
@@ -1237,7 +1294,26 @@ namespace BLL
}
}
}
- InsertRealNamePushLog(null, proCode, "推送考勤数据", sucess, code, mess);
+ InsertRealNamePushLog(null, proCode, "推送考勤数据", sucess, code, mess, data, pushContent);
+ if (data.Contains("无法入场"))
+ {
+ foreach (var item in getData)
+ {
+ if (data.Contains(item.idcardNumber))
+ {
+ using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
+ {
+ var getPersonInOutNow = db.RealName_PersonInOutNow.FirstOrDefault(x => x.IdcardNumber == item.idcardNumber);
+ if (getPersonInOutNow != null)
+ {
+ getPersonInOutNow.RealNamePushTime = DateTime.Now;
+ // db.RealName_PersonInOutNow.DeleteOnSubmit(getPersonInOutNow);
+ db.SubmitChanges();
+ }
+ }
+ }
+ }
+ }
}
else
{
diff --git a/SGGL/FineUIPro.Web/ZHGL/RealName/SynchroRecord.aspx b/SGGL/FineUIPro.Web/ZHGL/RealName/SynchroRecord.aspx
index 06844d9b..afe0c3d8 100644
--- a/SGGL/FineUIPro.Web/ZHGL/RealName/SynchroRecord.aspx
+++ b/SGGL/FineUIPro.Web/ZHGL/RealName/SynchroRecord.aspx
@@ -47,23 +47,27 @@
-
-
+
+
-
-
private void GridBind()
{
- string strSql = @"SELECT PushLogId,ProjectId,ProjectCode,PushType,Success,Code,Message,PushTime
- FROM dbo.RealName_PushLog where 1 = 1";
+ string strSql = @"SELECT A.PushLogId,B.proName,B.proShortName,A.ProjectCode,A.PushType,A.Success,A.Code,A.Message,A.PushTime,A.ReturnData
+ FROM dbo.RealName_PushLog AS A
+ LEFT JOIN dbo.RealName_Project AS B ON A.ProjectCode=B.proCode
+ where 1 = 1";
List listStr = new List();
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
diff --git a/SGGL/FineUIPro.Web/ZHGL/RealName/SynchroSet.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/RealName/SynchroSet.aspx.cs
index 93c13111..3b27d1c5 100644
--- a/SGGL/FineUIPro.Web/ZHGL/RealName/SynchroSet.aspx.cs
+++ b/SGGL/FineUIPro.Web/ZHGL/RealName/SynchroSet.aspx.cs
@@ -416,7 +416,6 @@ namespace FineUIPro.Web.ZHGL.RealName
}
}
- SynchroSetService.InsertRealNamePushLog(projectId, proCode, "单条人员批量推送(增加)", "推送完成", null, message);
if (string.IsNullOrEmpty(message))
{
ShowNotify("同步完成!" + count.ToString() + "条", MessageBoxIcon.Success);
@@ -461,7 +460,6 @@ namespace FineUIPro.Web.ZHGL.RealName
}
}
- SynchroSetService.InsertRealNamePushLog(projectId, proCode, "单条人员批量推送(更新)", "推送完成", null, message);
if (string.IsNullOrEmpty(message))
{
ShowNotify("同步完成!" + count.ToString() + "条", MessageBoxIcon.Success);
diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs
index 8d6686a0..b8adf04f 100644
--- a/SGGL/Model/Model.cs
+++ b/SGGL/Model/Model.cs
@@ -15662,8 +15662,6 @@ namespace Model
private EntitySet _Comprehensive_DesignChangeOrder;
- private EntitySet _Comprehensive_DesignDrawings;
-
private EntitySet _Comprehensive_GeneralPlanApproval;
private EntitySet _Comprehensive_InspectionEquipment;
@@ -15704,7 +15702,6 @@ namespace Model
this._Base_DesignProfessional = new EntitySet(new Action(this.attach_Base_DesignProfessional), new Action(this.detach_Base_DesignProfessional));
this._Comprehensive_DataDistribution = new EntitySet(new Action(this.attach_Comprehensive_DataDistribution), new Action(this.detach_Comprehensive_DataDistribution));
this._Comprehensive_DesignChangeOrder = new EntitySet(new Action(this.attach_Comprehensive_DesignChangeOrder), new Action(this.detach_Comprehensive_DesignChangeOrder));
- this._Comprehensive_DesignDrawings = new EntitySet(new Action(this.attach_Comprehensive_DesignDrawings), new Action(this.detach_Comprehensive_DesignDrawings));
this._Comprehensive_GeneralPlanApproval = new EntitySet(new Action(this.attach_Comprehensive_GeneralPlanApproval), new Action(this.detach_Comprehensive_GeneralPlanApproval));
this._Comprehensive_InspectionEquipment = new EntitySet(new Action(this.attach_Comprehensive_InspectionEquipment), new Action(this.detach_Comprehensive_InspectionEquipment));
this._Comprehensive_MajorPlanApproval = new EntitySet(new Action(this.attach_Comprehensive_MajorPlanApproval), new Action(this.detach_Comprehensive_MajorPlanApproval));
@@ -15850,19 +15847,6 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_DesignDrawings_Base_CNProfessional", Storage="_Comprehensive_DesignDrawings", ThisKey="CNProfessionalId", OtherKey="CNProfessionalId", DeleteRule="NO ACTION")]
- public EntitySet Comprehensive_DesignDrawings
- {
- get
- {
- return this._Comprehensive_DesignDrawings;
- }
- set
- {
- this._Comprehensive_DesignDrawings.Assign(value);
- }
- }
-
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_GeneralPlanApproval_Base_CNProfessional", Storage="_Comprehensive_GeneralPlanApproval", ThisKey="CNProfessionalId", OtherKey="CNProfessionalId", DeleteRule="NO ACTION")]
public EntitySet Comprehensive_GeneralPlanApproval
{
@@ -16061,18 +16045,6 @@ namespace Model
entity.Base_CNProfessional = null;
}
- private void attach_Comprehensive_DesignDrawings(Comprehensive_DesignDrawings entity)
- {
- this.SendPropertyChanging();
- entity.Base_CNProfessional = this;
- }
-
- private void detach_Comprehensive_DesignDrawings(Comprehensive_DesignDrawings entity)
- {
- this.SendPropertyChanging();
- entity.Base_CNProfessional = null;
- }
-
private void attach_Comprehensive_GeneralPlanApproval(Comprehensive_GeneralPlanApproval entity)
{
this.SendPropertyChanging();
@@ -68353,8 +68325,6 @@ namespace Model
private string _UnitWorkId;
- private EntityRef _Base_CNProfessional;
-
private EntityRef _Base_Project;
#region 可扩展性方法定义
@@ -68393,7 +68363,6 @@ namespace Model
public Comprehensive_DesignDrawings()
{
- this._Base_CNProfessional = default(EntityRef);
this._Base_Project = default(EntityRef);
OnCreated();
}
@@ -68453,10 +68422,6 @@ namespace Model
{
if ((this._CNProfessionalId != value))
{
- if (this._Base_CNProfessional.HasLoadedOrAssignedValue)
- {
- throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
- }
this.OnCNProfessionalIdChanging(value);
this.SendPropertyChanging();
this._CNProfessionalId = value;
@@ -68686,40 +68651,6 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_DesignDrawings_Base_CNProfessional", Storage="_Base_CNProfessional", ThisKey="CNProfessionalId", OtherKey="CNProfessionalId", IsForeignKey=true)]
- public Base_CNProfessional Base_CNProfessional
- {
- get
- {
- return this._Base_CNProfessional.Entity;
- }
- set
- {
- Base_CNProfessional previousValue = this._Base_CNProfessional.Entity;
- if (((previousValue != value)
- || (this._Base_CNProfessional.HasLoadedOrAssignedValue == false)))
- {
- this.SendPropertyChanging();
- if ((previousValue != null))
- {
- this._Base_CNProfessional.Entity = null;
- previousValue.Comprehensive_DesignDrawings.Remove(this);
- }
- this._Base_CNProfessional.Entity = value;
- if ((value != null))
- {
- value.Comprehensive_DesignDrawings.Add(this);
- this._CNProfessionalId = value.CNProfessionalId;
- }
- else
- {
- this._CNProfessionalId = default(string);
- }
- this.SendPropertyChanged("Base_CNProfessional");
- }
- }
- }
-
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_DesignDrawings_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
public Base_Project Base_Project
{
@@ -232445,6 +232376,10 @@ namespace Model
private System.Nullable _PushTime;
+ private string _PushContent;
+
+ private string _ReturnData;
+
#region 可扩展性方法定义
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
@@ -232465,6 +232400,10 @@ namespace Model
partial void OnMessageChanged();
partial void OnPushTimeChanging(System.Nullable value);
partial void OnPushTimeChanged();
+ partial void OnPushContentChanging(string value);
+ partial void OnPushContentChanged();
+ partial void OnReturnDataChanging(string value);
+ partial void OnReturnDataChanged();
#endregion
public RealName_PushLog()
@@ -232632,6 +232571,46 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PushContent", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)]
+ public string PushContent
+ {
+ get
+ {
+ return this._PushContent;
+ }
+ set
+ {
+ if ((this._PushContent != value))
+ {
+ this.OnPushContentChanging(value);
+ this.SendPropertyChanging();
+ this._PushContent = value;
+ this.SendPropertyChanged("PushContent");
+ this.OnPushContentChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReturnData", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)]
+ public string ReturnData
+ {
+ get
+ {
+ return this._ReturnData;
+ }
+ set
+ {
+ if ((this._ReturnData != value))
+ {
+ this.OnReturnDataChanging(value);
+ this.SendPropertyChanging();
+ this._ReturnData = value;
+ this.SendPropertyChanged("ReturnData");
+ this.OnReturnDataChanged();
+ }
+ }
+ }
+
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
@@ -305998,7 +305977,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResponsibilityManName", DbType="NVarChar(50)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResponsibilityManName", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
public string ResponsibilityManName
{
get
@@ -306030,7 +306009,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckManName", DbType="NVarChar(50)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckManName", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
public string CheckManName
{
get
@@ -306078,7 +306057,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConfirmManName", DbType="NVarChar(50)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConfirmManName", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
public string ConfirmManName
{
get
@@ -306110,7 +306089,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResponsibilityManName2", DbType="NVarChar(50)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResponsibilityManName2", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
public string ResponsibilityManName2
{
get