This commit is contained in:
杨红卫 2021-09-06 12:27:07 +08:00
parent 8ce6070be5
commit 4955bbcba0
7 changed files with 42 additions and 26 deletions

View File

@ -64,8 +64,8 @@ namespace BLL
SynchroSetService.PushProCollCompany(item.ProCode); SynchroSetService.PushProCollCompany(item.ProCode);
//SynchroSetService.PushCollTeam(item.ProCode); //SynchroSetService.PushCollTeam(item.ProCode);
//SynchroSetService.getCollTeam(item.ProCode); //SynchroSetService.getCollTeam(item.ProCode);
//SynchroSetService.PushPersons(Const.BtnAdd, item.ProCode); SynchroSetService.PushPersons(Const.BtnAdd, item.ProCode, null);
//SynchroSetService.PushPersons(Const.BtnModify, item.ProCode); SynchroSetService.PushPersons(Const.BtnModify, item.ProCode, null);
SynchroSetService.PushAttendance(item.ProCode); SynchroSetService.PushAttendance(item.ProCode);
} }
} }

View File

@ -151,7 +151,15 @@ namespace BLL
public static string getaccess_token(string proCode) public static string getaccess_token(string proCode)
{ {
string access_token = string.Empty; string access_token = string.Empty;
var getToken = GetSynchroSetByUnitId(Const.UnitId_CWCEC, proCode); Model.RealName_SynchroSet getToken = new Model.RealName_SynchroSet();
if (!string.IsNullOrEmpty(proCode))
{
getToken = Funs.DB.RealName_SynchroSet.FirstOrDefault(x => x.ProCode == proCode);
}
else
{
getToken = Funs.DB.RealName_SynchroSet.FirstOrDefault(x => x.Tokenendtime > DateTime.Now);
}
if (getToken != null) if (getToken != null)
{ {
if (getToken.Tokenendtime > DateTime.Now) if (getToken.Tokenendtime > DateTime.Now)
@ -557,7 +565,7 @@ namespace BLL
{ {
var getProject = new var getProject = new
{ {
proCode = citem.ProCode proCode = RealName_ProjectService.GeJTproCodeByproCode(citem.ProCode),
}; };
Hashtable newToken = new Hashtable Hashtable newToken = new Hashtable
{ {
@ -916,14 +924,14 @@ namespace BLL
var getData = (from x in Funs.DB.SitePerson_Person var getData = (from x in Funs.DB.SitePerson_Person
join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId
join z in Funs.DB.RealName_Project on y.JTProjectCode equals z.ProCode join z in Funs.DB.RealName_Project on y.JTProjectCode equals z.ProCode
join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId join p in Funs.DB.Project_ProjectUnit on new { x.UnitId, x.ProjectId } equals new { p.UnitId, p.ProjectId }
join v in Funs.DB.ProjectData_TeamGroup on x.TeamGroupId equals v.TeamGroupId join v in Funs.DB.ProjectData_TeamGroup on x.TeamGroupId equals v.TeamGroupId
join w in Funs.DB.Base_WorkPost on x.WorkPostId equals w.WorkPostId join w in Funs.DB.Base_WorkPost on x.WorkPostId equals w.WorkPostId
where ((x.IdentityCard != null && x.IdentityCard != "" && identityCard == null) || (identityCard != null && x.IdentityCard == identityCard)) where (identityCard == null || x.IdentityCard == identityCard)
&& y.JTProjectCode == proCode && z.JTproCode != null && y.JTProjectCode == proCode && z.JTproCode != null && x.IsCardNoOK ==true
&& v.TeamId.HasValue && x.HeadImage != null && x.HeadImage.Length > 0 && 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))
&& (x.IdentityCard.Length == 15 || x.IdentityCard.Length == 18) && p.UnitType != Const.ProjectUnitType_3 && p.UnitType != Const.ProjectUnitType_4
select new select new
{ {
name = x.PersonName, name = x.PersonName,
@ -951,7 +959,7 @@ namespace BLL
teamLeaderFlag = (v.GroupLeaderId == x.PersonId ? "Y" : "N"), teamLeaderFlag = (v.GroupLeaderId == x.PersonId ? "Y" : "N"),
userType = ((w.PostType == "1" || w.PostType == "4") ? "LAB_USER_MANAGE" : "LAB_USER_BULIDER"), userType = ((w.PostType == "1" || w.PostType == "4") ? "LAB_USER_MANAGE" : "LAB_USER_BULIDER"),
workType = w.WorkPostCode, workType = w.WorkPostCode,
isLeave = x.OutTime < DateTime.Now ? "Y" : "N", isLeave = x.OutTime.HasValue ? "Y" : "N",
entryTime = x.InTime.HasValue ? string.Format("{0:yyyy-MM-dd}", x.InTime) : null, entryTime = x.InTime.HasValue ? string.Format("{0:yyyy-MM-dd}", x.InTime) : null,
exitTime = x.OutTime.HasValue ? string.Format("{0:yyyy-MM-dd}", x.OutTime) : null, exitTime = x.OutTime.HasValue ? string.Format("{0:yyyy-MM-dd}", x.OutTime) : null,
x.RealNameAddTime, x.RealNameAddTime,
@ -1039,14 +1047,14 @@ namespace BLL
string contenttype = "application/json;charset=unicode"; string contenttype = "application/json;charset=unicode";
var getData = (from x in Funs.DB.SitePerson_Person var getData = (from x in Funs.DB.SitePerson_Person
join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId
join z in Funs.DB.RealName_Project on y.JTProjectCode equals z.ProCode join z in Funs.DB.RealName_Project on y.JTProjectCode equals z.ProCode
join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId
join v in Funs.DB.ProjectData_TeamGroup on x.TeamGroupId equals v.TeamGroupId join v in Funs.DB.ProjectData_TeamGroup on x.TeamGroupId equals v.TeamGroupId
join w in Funs.DB.Base_WorkPost on x.WorkPostId equals w.WorkPostId join w in Funs.DB.Base_WorkPost on x.WorkPostId equals w.WorkPostId
join p in Funs.DB.Project_ProjectUnit on new { x.UnitId,x.ProjectId } equals new { p.UnitId,p.ProjectId }
where x.IdentityCard == identityCard && y.JTProjectCode == proCode where x.IdentityCard == identityCard && y.JTProjectCode == proCode
&& v.TeamId.HasValue && x.HeadImage != null && x.HeadImage.Length > 0 && v.TeamId.HasValue && x.HeadImage != null && x.HeadImage.Length > 0
&& (x.IdentityCard.Length == 15 || x.IdentityCard.Length == 18) && z.JTproCode != null
&& z.JTproCode != null && p.UnitType != Const.ProjectUnitType_3 && p.UnitType != Const.ProjectUnitType_4
select new select new
{ {
name = x.PersonName, name = x.PersonName,
@ -1072,7 +1080,7 @@ namespace BLL
teamLeaderFlag = (v.GroupLeaderId == x.PersonId ? "Y" : "N"), teamLeaderFlag = (v.GroupLeaderId == x.PersonId ? "Y" : "N"),
userType = ((w.PostType == "1" || w.PostType == "4") ? "LAB_USER_MANAGE" : "LAB_USER_BULIDER"), userType = ((w.PostType == "1" || w.PostType == "4") ? "LAB_USER_MANAGE" : "LAB_USER_BULIDER"),
workType = w.WorkPostCode, workType = w.WorkPostCode,
isLeave = x.OutTime < DateTime.Now ? "Y" : "N", isLeave = x.OutTime.HasValue ? "Y" : "N",
entryTime = x.InTime.HasValue ? string.Format("{0:yyyy-MM-dd}", x.InTime) : null, entryTime = x.InTime.HasValue ? string.Format("{0:yyyy-MM-dd}", x.InTime) : null,
exitTime = x.OutTime.HasValue ? string.Format("{0:yyyy-MM-dd}", x.OutTime) : null, exitTime = x.OutTime.HasValue ? string.Format("{0:yyyy-MM-dd}", x.OutTime) : null,
x.RealNameAddTime, x.RealNameAddTime,
@ -1169,7 +1177,7 @@ namespace BLL
where x.IdcardNumber != null && x.IdcardType != null && x.ChangeTime.HasValue where x.IdcardNumber != null && x.IdcardType != null && x.ChangeTime.HasValue
&& (proCode == null || x.ProCode == proCode) && p.HeadImage != null && p.HeadImage.Length > 0 && (proCode == null || x.ProCode == proCode) && p.HeadImage != null && p.HeadImage.Length > 0
&& v.TeamId.HasValue && p.HeadImage != null && r.TeamId.HasValue && v.TeamId.HasValue && p.HeadImage != null && r.TeamId.HasValue
&& (p.IdentityCard.Length == 15 || p.IdentityCard.Length == 18) && p.RealNameAddTime.HasValue && p.IsCardNoOK ==true
&& z.JTproCode != null && z.JTproCode != null
orderby x.ChangeTime descending orderby x.ChangeTime descending
select new select new
@ -1352,10 +1360,12 @@ namespace BLL
{ {
var getData = (from x in db.SitePerson_Person var getData = (from x in db.SitePerson_Person
join y in db.Base_Project on x.ProjectId equals y.ProjectId join y in db.Base_Project on x.ProjectId equals y.ProjectId
join z in Funs.DB.RealName_Project on y.JTProjectCode equals z.ProCode join z in db.RealName_Project on y.JTProjectCode equals z.ProCode
join v in db.ProjectData_TeamGroup on x.TeamGroupId equals v.TeamGroupId join v in db.ProjectData_TeamGroup on x.TeamGroupId equals v.TeamGroupId
join w in db.Base_WorkPost on x.WorkPostId equals w.WorkPostId join w in db.Base_WorkPost on x.WorkPostId equals w.WorkPostId
join p in db.Project_ProjectUnit on new { x.UnitId, x.ProjectId } equals new { p.UnitId, p.ProjectId }
where personList.Contains(x.PersonId) && z.JTproCode != null where personList.Contains(x.PersonId) && z.JTproCode != null
&& p.UnitType != Const.ProjectUnitType_3 && p.UnitType != Const.ProjectUnitType_4
select new select new
{ {
name = x.PersonName, name = x.PersonName,
@ -1383,7 +1393,7 @@ namespace BLL
teamLeaderFlag = (v.GroupLeaderId == x.PersonId ? "Y" : "N"), teamLeaderFlag = (v.GroupLeaderId == x.PersonId ? "Y" : "N"),
userType = ((w.PostType == "1" || w.PostType == "4") ? "LAB_USER_MANAGE" : "LAB_USER_BULIDER"), userType = ((w.PostType == "1" || w.PostType == "4") ? "LAB_USER_MANAGE" : "LAB_USER_BULIDER"),
workType = w.WorkPostCode, workType = w.WorkPostCode,
isLeave = x.OutTime < DateTime.Now ? "Y" : "N", isLeave = x.OutTime.HasValue ? "Y" : "N",
entryTime = x.InTime.HasValue ? string.Format("{0:yyyy-MM-dd}", x.InTime) : null, entryTime = x.InTime.HasValue ? string.Format("{0:yyyy-MM-dd}", x.InTime) : null,
exitTime = x.OutTime.HasValue ? string.Format("{0:yyyy-MM-dd}", x.OutTime) : null, exitTime = x.OutTime.HasValue ? string.Format("{0:yyyy-MM-dd}", x.OutTime) : null,
x.RealNameAddTime, x.RealNameAddTime,

View File

@ -32,7 +32,7 @@
EnableMultiSelect="true" MatchFieldWidth="false" Values="105,108" AutoPostBack="true" OnTextChanged="drpPersonId_TextChanged"> EnableMultiSelect="true" MatchFieldWidth="false" Values="105,108" AutoPostBack="true" OnTextChanged="drpPersonId_TextChanged">
<PopPanel> <PopPanel>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" runat="server" Width="900px" Height="500px" Hidden="true" <f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" runat="server" Width="900px" Height="500px" Hidden="true"
DataIDField="PersonId" DataTextField="PersonName" EnableMultiSelect="true" KeepCurrentSelection="true" DataIDField="PersonId" DataTextField="PersonName" EnableMultiSelect="true" KeepCurrentSelection="true" PageSize="10000"
DataKeyNames="PersonId" EnableCheckBoxSelect="true"> DataKeyNames="PersonId" EnableCheckBoxSelect="true">
<Toolbars> <Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server"> <f:Toolbar ID="Toolbar2" Position="Top" runat="server">

View File

@ -90,6 +90,10 @@ namespace FineUIPro.Web.ZHGL.RealName
{ {
html = (row.FindControl("labNumber") as AspNet.Label).Text; html = (row.FindControl("labNumber") as AspNet.Label).Text;
} }
if (column.ColumnID == "tfShortName")
{
html = (row.FindControl("lblShortName") as AspNet.Label).Text;
}
if (column.ColumnID == "tfAge") if (column.ColumnID == "tfAge")
{ {
html = (row.FindControl("lblAge") as AspNet.Label).Text; html = (row.FindControl("lblAge") as AspNet.Label).Text;

View File

@ -87,10 +87,10 @@
<Items> <Items>
<f:Label runat="server" ID="lbxx"></f:Label> <f:Label runat="server" ID="lbxx"></f:Label>
<f:ToolbarFill runat="server"></f:ToolbarFill> <f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnAllPushData" Icon="DatabaseAdd" runat="server" Text="上报所有人员" ToolTip="单条循环推送(100条)" <f:Button ID="btnAllPushData" Icon="DatabaseAdd" runat="server" Text="上报所有人员" ToolTip="单条循环推送(500条)"
OnClick="btnAllPushData_Click"> OnClick="btnAllPushData_Click">
</f:Button> </f:Button>
<f:Button ID="btnUpdate" Icon="DatabaseAdd" runat="server" Text="更新所有人员" ToolTip="单条循环推送(100条)" <f:Button ID="btnUpdate" Icon="DatabaseAdd" runat="server" Text="更新所有人员" ToolTip="单条循环推送(500条)"
OnClick="btnUpdate_Click"> OnClick="btnUpdate_Click">
</f:Button> </f:Button>
</Items> </Items>

View File

@ -395,15 +395,17 @@ namespace FineUIPro.Web.ZHGL.RealName
{ {
var getIdentityCards = (from x in Funs.DB.SitePerson_Person var getIdentityCards = (from x in Funs.DB.SitePerson_Person
join v in Funs.DB.ProjectData_TeamGroup on x.TeamGroupId equals v.TeamGroupId join v in Funs.DB.ProjectData_TeamGroup on x.TeamGroupId equals v.TeamGroupId
join p in Funs.DB.Project_ProjectUnit on new { x.UnitId, x.ProjectId } equals new { p.UnitId, p.ProjectId }
where x.ProjectId == projectId where x.ProjectId == projectId
&& x.IdentityCard != null && (x.IdentityCard.Length == 15 || x.IdentityCard.Length == 18) && x.IdentityCard != null && (x.IdentityCard.Length == 15 || x.IdentityCard.Length == 18)
&& v.TeamId.HasValue && x.HeadImage != null && x.HeadImage.Length > 0 && v.TeamId.HasValue && x.HeadImage != null && x.HeadImage.Length > 0
&& !x.RealNameAddTime.HasValue && !x.RealNameAddTime.HasValue
select x.IdentityCard).Take(100); && p.UnitType != Const.ProjectUnitType_3 && p.UnitType != Const.ProjectUnitType_4
select x.IdentityCard).Take(500);
foreach (var item in getIdentityCards) foreach (var item in getIdentityCards)
{ {
string mes = BLL.SynchroSetService.PushPersonsByIdentityCard(Const.BtnAdd, getRProjects.ProCode, item) ?? ""; string mes = BLL.SynchroSetService.PushPersonsByIdentityCard(Const.BtnAdd, getRProjects.ProCode, item) ?? "";
if (mes != "请求成功") if (mes.Contains("不合法"))
{ {
message += ("身份证号码" + item + "新增失败" + mes); message += ("身份证号码" + item + "新增失败" + mes);
} }
@ -444,11 +446,11 @@ namespace FineUIPro.Web.ZHGL.RealName
&& x.IdentityCard != null && (x.IdentityCard.Length == 15 || x.IdentityCard.Length == 18) && x.IdentityCard != null && (x.IdentityCard.Length == 15 || x.IdentityCard.Length == 18)
&& v.TeamId.HasValue && x.HeadImage != null && x.HeadImage.Length > 0 && v.TeamId.HasValue && x.HeadImage != null && x.HeadImage.Length > 0
&& !x.RealNameUpdateTime.HasValue && !x.RealNameUpdateTime.HasValue
select x.IdentityCard).Take(100); select x.IdentityCard).Take(500);
foreach (var item in getIdentityCards) foreach (var item in getIdentityCards)
{ {
string mes = BLL.SynchroSetService.PushPersonsByIdentityCard(Const.BtnModify, getRProjects.ProCode, item) ?? ""; string mes = BLL.SynchroSetService.PushPersonsByIdentityCard(Const.BtnModify, getRProjects.ProCode, item) ?? "";
if (mes != "请求成功") if (mes.Contains("不合法"))
{ {
message += ("身份证号码" + item + "更新失败" + mes); message += ("身份证号码" + item + "更新失败" + mes);
} }