20210826
This commit is contained in:
@@ -83,6 +83,18 @@
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
<f:Toolbar ID="Toolbar2" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Label runat="server" ID="lbxx"></f:Label>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnAllPushData" Icon="DatabaseAdd" runat="server" Text="上报所有人员" ToolTip="单条循环推送(100条)"
|
||||
OnClick="btnAllPushData_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnUpdate" Icon="DatabaseAdd" runat="server" Text="更新所有人员" ToolTip="单条循环推送(100条)"
|
||||
OnClick="btnUpdate_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
</form>
|
||||
|
||||
@@ -369,5 +369,83 @@ namespace FineUIPro.Web.ZHGL.RealName
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnAllPushData_Click(object sender, EventArgs e)
|
||||
{
|
||||
string message = string.Empty;
|
||||
int count = 0;
|
||||
string projectId = this.drpProject.SelectedValue;
|
||||
string proCode = ProjectService.GetJTProjectCodeByProjectId(projectId);
|
||||
var getRProjects = Funs.DB.RealName_Project.FirstOrDefault(x => x.ProCode == proCode);
|
||||
if (getRProjects != null && !string.IsNullOrEmpty(getRProjects.ProCode))
|
||||
{
|
||||
var getIdentityCards = (from x in Funs.DB.SitePerson_Person
|
||||
join v in Funs.DB.ProjectData_TeamGroup on x.TeamGroupId equals v.TeamGroupId
|
||||
where x.ProjectId == projectId
|
||||
&& x.IdentityCard != null && (x.IdentityCard.Length == 15 || x.IdentityCard.Length == 18)
|
||||
&& v.TeamId.HasValue && x.HeadImage != null && x.HeadImage.Length > 0
|
||||
&& !x.RealNameAddTime.HasValue
|
||||
select x.IdentityCard).Take(100);
|
||||
foreach (var item in getIdentityCards)
|
||||
{
|
||||
string mes = BLL.SynchroSetService.PushPersonsByIdentityCard(Const.BtnAdd, getRProjects.ProCode, item) ?? "";
|
||||
if (mes != "请求成功")
|
||||
{
|
||||
message += ("身份证号码" + item + "新增失败" + mes);
|
||||
}
|
||||
else
|
||||
{
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (string.IsNullOrEmpty(message))
|
||||
{
|
||||
ShowNotify("同步完成!" + count.ToString() + "条", MessageBoxIcon.Success);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInParent("同步完成!" + count.ToString() + "条;" + message, MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnUpdate_Click(object sender, EventArgs e)
|
||||
{
|
||||
string message = string.Empty;
|
||||
int count = 0;
|
||||
string projectId = this.drpProject.SelectedValue;
|
||||
string proCode = ProjectService.GetJTProjectCodeByProjectId(projectId);
|
||||
var getRProjects = Funs.DB.RealName_Project.FirstOrDefault(x => x.ProCode == proCode);
|
||||
if (getRProjects != null && !string.IsNullOrEmpty(getRProjects.ProCode))
|
||||
{
|
||||
var getIdentityCards = (from x in Funs.DB.SitePerson_Person
|
||||
join v in Funs.DB.ProjectData_TeamGroup on x.TeamGroupId equals v.TeamGroupId
|
||||
where x.ProjectId == projectId
|
||||
&& x.IdentityCard != null && (x.IdentityCard.Length == 15 || x.IdentityCard.Length == 18)
|
||||
&& v.TeamId.HasValue && x.HeadImage != null && x.HeadImage.Length > 0
|
||||
&& !x.RealNameUpdateTime.HasValue
|
||||
select x.IdentityCard).Take(100);
|
||||
foreach (var item in getIdentityCards)
|
||||
{
|
||||
string mes = BLL.SynchroSetService.PushPersonsByIdentityCard(Const.BtnModify, getRProjects.ProCode, item) ?? "";
|
||||
if (mes != "请求成功")
|
||||
{
|
||||
message += ("身份证号码" + item + "更新失败" + mes);
|
||||
}
|
||||
else
|
||||
{
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (string.IsNullOrEmpty(message))
|
||||
{
|
||||
ShowNotify("同步完成!" + count.ToString() + "条", MessageBoxIcon.Success);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInParent("同步完成!" + count.ToString() + "条;" + message, MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -191,5 +191,41 @@ namespace FineUIPro.Web.ZHGL.RealName {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnDataProcess;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// lbxx 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbxx;
|
||||
|
||||
/// <summary>
|
||||
/// btnAllPushData 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAllPushData;
|
||||
|
||||
/// <summary>
|
||||
/// btnUpdate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnUpdate;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user