This commit is contained in:
2021-07-08 20:34:29 +08:00
parent 7f785d6423
commit e092c6cfb0
24 changed files with 5142 additions and 177 deletions
@@ -1,5 +1,6 @@
using BLL;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
@@ -45,11 +46,7 @@ namespace FineUIPro.Web.ZHGL.RealName
Password = this.txtword.Text.Trim(),
Intervaltime=Funs.GetNewInt(this.txtintervaltime.Text.Trim()),
};
var getProject = ProjectService.GetProjectByProjectId(this.drpProject.SelectedValue);
if (getProject != null)
{
newSynchroSet.ProCode = getProject.ProjectCode;
}
newSynchroSet.ProCode = ProjectService.GetJTProjectCodeByProjectId(this.drpProject.SelectedValue);
BLL.SynchroSetService.SaveSynchroSet(newSynchroSet);
ShowNotify("保存成功!", MessageBoxIcon.Success);
}
@@ -70,12 +67,7 @@ namespace FineUIPro.Web.ZHGL.RealName
Password = this.txtword.Text.Trim(),
Intervaltime = Funs.GetNewInt(this.txtintervaltime.Text.Trim()),
};
var getProject = ProjectService.GetProjectByProjectId(this.drpProject.SelectedValue);
if (getProject != null)
{
newSynchroSet.ProCode = getProject.ProjectCode;
}
newSynchroSet.ProCode = ProjectService.GetJTProjectCodeByProjectId(this.drpProject.SelectedValue);
if (!string.IsNullOrEmpty(SynchroSetService.SaveToken(newSynchroSet)))
{
ShowNotify("连接成功!", MessageBoxIcon.Success);
@@ -132,7 +124,7 @@ namespace FineUIPro.Web.ZHGL.RealName
protected void btnProCollCompany_Click(object sender, EventArgs e)
{
string message = string.Empty;
string proCode =BLL.ProjectService.GetProjectCodeByProjectId(this.drpProject.SelectedValue);
string proCode =BLL.ProjectService.GetJTProjectCodeByProjectId(this.drpProject.SelectedValue);
var getRProjects = Funs.DB.RealName_Project.FirstOrDefault(x => x.ProCode == proCode);
if (getRProjects != null)
{
@@ -153,7 +145,7 @@ namespace FineUIPro.Web.ZHGL.RealName
protected void btnCollTeam_Click(object sender, EventArgs e)
{
string message = string.Empty;
string proCode = BLL.ProjectService.GetProjectCodeByProjectId(this.drpProject.SelectedValue);
string proCode = BLL.ProjectService.GetJTProjectCodeByProjectId(this.drpProject.SelectedValue);
var getRProjects = Funs.DB.RealName_Project.FirstOrDefault(x => x.ProCode == proCode);
if (getRProjects != null)
{
@@ -177,7 +169,7 @@ namespace FineUIPro.Web.ZHGL.RealName
//string update ="更新"+ BLL.SynchroSetService.PushPersons(Const.BtnModify,null) ?? "";
//ShowNotify(add+"|"+ update, MessageBoxIcon.Information);
string message = string.Empty;
string proCode = BLL.ProjectService.GetProjectCodeByProjectId(this.drpProject.SelectedValue);
string proCode = BLL.ProjectService.GetJTProjectCodeByProjectId(this.drpProject.SelectedValue);
var getRProjects = Funs.DB.RealName_Project.FirstOrDefault(x => x.ProCode == proCode);
if (getRProjects != null)
{
@@ -199,7 +191,7 @@ namespace FineUIPro.Web.ZHGL.RealName
protected void btnAttendance_Click(object sender, EventArgs e)
{
string message = string.Empty;
string proCode = BLL.ProjectService.GetProjectCodeByProjectId(this.drpProject.SelectedValue);
string proCode = BLL.ProjectService.GetJTProjectCodeByProjectId(this.drpProject.SelectedValue);
var getRProjects = Funs.DB.RealName_Project.FirstOrDefault(x => x.ProCode == proCode);
if (getRProjects != null)
{
@@ -233,10 +225,10 @@ namespace FineUIPro.Web.ZHGL.RealName
this.txtapiUrl.Text = Funs.RealNameApiUrl;
this.txtintervaltime.Text = ConfigurationManager.AppSettings["Intervaltime"];
string proCode = BLL.ProjectService.GetProjectCodeByProjectId(this.drpProject.SelectedValue);
if (!string.IsNullOrEmpty(proCode))
var getpro = Funs.DB.Base_Project.FirstOrDefault(x=>x.ProjectId == this.drpProject.SelectedValue);
if (getpro !=null && !string.IsNullOrEmpty(getpro.JTProjectCode))
{
var getSynchroSet = SynchroSetService.GetSynchroSetByUnitId(Const.UnitId_CWCEC, proCode);
var getSynchroSet = SynchroSetService.GetSynchroSetByUnitId(Const.UnitId_CWCEC, getpro.JTProjectCode);
if (getSynchroSet != null)
{
this.txtapiUrl.Text = Funs.RealNameApiUrl;
@@ -256,15 +248,40 @@ namespace FineUIPro.Web.ZHGL.RealName
protected void btnPushData_Click(object sender, EventArgs e)
{
string message = string.Empty;
if (!string.IsNullOrEmpty(this.txtIdentityCard.Text.Trim()))
string idText = this.txtIdentityCard.Text.Trim();
if (!string.IsNullOrEmpty(idText))
{
string proCode = BLL.ProjectService.GetProjectCodeByProjectId(this.drpProject.SelectedValue);
string proCode = ProjectService.GetJTProjectCodeByProjectId(this.drpProject.SelectedValue);
var getRProjects = Funs.DB.RealName_Project.FirstOrDefault(x => x.ProCode == proCode);
if (getRProjects != null && !string.IsNullOrEmpty(getRProjects.ProCode))
{
string idc = this.txtIdentityCard.Text.Trim().Replace('', ',');
var getList = Funs.GetStrListByStr(idc, ',');
if (getList.Count > 0)
idText = idText.Replace("",",").Replace("(条)","").Replace("",";").Replace("","(").Replace("",")");
List<string> getList = new List<string>();
if (idText.Contains("("))
{
var getData = Funs.GetStrListByStr(idText, ';');
foreach (var itemD in getData)
{
if (!string.IsNullOrEmpty(itemD))
{
var a = itemD.Split('(');
if (a.Count() > 1)
{
var b = a[1].Split(')');
if (b.Count() > 1)
{
getList.Add(b[0]);
}
}
}
}
}
else
{
getList = Funs.GetStrListByStr(idText, ',');
}
if (getList != null && getList.Count > 0)
{
foreach (var item in getList)
{