This commit is contained in:
2023-03-03 10:46:22 +08:00
36 changed files with 319 additions and 3738 deletions
+5 -1
View File
@@ -46,7 +46,7 @@ namespace BLL
/// <param name="personType">人员类型</param> /// <param name="personType">人员类型</param>
/// <param name="Grid1"></param> /// <param name="Grid1"></param>
/// <returns></returns> /// <returns></returns>
public static IEnumerable getListData(string unitId, string departId, string projetcId, string name, string idCard, string isPost, string personType, Grid Grid1) public static IEnumerable getListData(string unitId, string departId, string projetcId, string name, string idCard, string isPost, string personType,string account, Grid Grid1)
{ {
IQueryable<Model.Person_Persons> getDataList = getDataLists.OrderBy(x => x.UnitId).ThenBy(x => x.DepartId); IQueryable<Model.Person_Persons> getDataList = getDataLists.OrderBy(x => x.UnitId).ThenBy(x => x.DepartId);
if (!string.IsNullOrEmpty(unitId) && unitId != Const._Null) if (!string.IsNullOrEmpty(unitId) && unitId != Const._Null)
@@ -73,6 +73,10 @@ namespace BLL
{ {
getDataList = getDataList.Where(e => e.PersonName.Contains(name)); getDataList = getDataList.Where(e => e.PersonName.Contains(name));
} }
if (!string.IsNullOrEmpty(account))
{
getDataList = getDataList.Where(e => e.Account.Contains(account));
}
if (!string.IsNullOrEmpty(idCard)) if (!string.IsNullOrEmpty(idCard))
{ {
getDataList = getDataList.Where(e => e.IdentityCard.Contains(idCard)); getDataList = getDataList.Where(e => e.IdentityCard.Contains(idCard));
+142 -7
View File
@@ -257,9 +257,12 @@ namespace BLL
Code = Code, Code = Code,
Message = Message, Message = Message,
PushTime = DateTime.Now, PushTime = DateTime.Now,
ReturnData = ReturnData,
PushContent = PushContent,
}; };
if (Code != "200")
{
newLog.ReturnData = ReturnData;
newLog.PushContent = PushContent;
}
db.RealName_PushLog.InsertOnSubmit(newLog); db.RealName_PushLog.InsertOnSubmit(newLog);
db.SubmitChanges(); db.SubmitChanges();
} }
@@ -890,6 +893,7 @@ namespace BLL
var getCollTeam = (from x in Funs.DB.ProjectData_TeamGroup var getCollTeam = (from x in Funs.DB.ProjectData_TeamGroup
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.ContractNo equals z.ProCode join z in Funs.DB.RealName_Project on y.ContractNo equals z.ProCode
join p in Funs.DB.Project_ProjectUnit on new { x.UnitId, x.ProjectId } equals new { p.UnitId, p.ProjectId }
join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId
join s in Funs.DB.SitePerson_Person on x.GroupLeaderId equals s.PersonId into jonPerson join s in Funs.DB.SitePerson_Person on x.GroupLeaderId equals s.PersonId into jonPerson
from s in jonPerson.DefaultIfEmpty() from s in jonPerson.DefaultIfEmpty()
@@ -897,6 +901,7 @@ namespace BLL
&& (proCode == null || y.ContractNo == proCode) && (proCode == null || y.ContractNo == proCode)
&& u.CollCropCode != null && u.CollCropCode != "" && u.CollCropCode != null && u.CollCropCode != ""
&& z.JTproCode != null && z.JTproCode != null
&& p.UnitType != Const.ProjectUnitType_3 && p.UnitType != Const.ProjectUnitType_4
select new select new
{ {
proCode = z.JTproCode, proCode = z.JTproCode,
@@ -1027,6 +1032,7 @@ namespace BLL
x.RealNameAddTime, x.RealNameAddTime,
x.RealNameUpdateTime, x.RealNameUpdateTime,
x.PersonId, x.PersonId,
x.SitePersonId,
}).Take(200).ToList(); }).Take(200).ToList();
if (getData.Count() > 0) if (getData.Count() > 0)
{ {
@@ -1067,7 +1073,7 @@ namespace BLL
{ {
foreach (var item in getData) foreach (var item in getData)
{ {
var getPerson = db.SitePerson_Person.FirstOrDefault(x => x.PersonId == item.PersonId); var getPerson = db.SitePerson_Person.FirstOrDefault(x => x.SitePersonId == item.SitePersonId);
if (getPerson != null) if (getPerson != null)
{ {
if (!getPerson.RealNameAddTime.HasValue) if (!getPerson.RealNameAddTime.HasValue)
@@ -1160,6 +1166,7 @@ namespace BLL
x.RealNameAddTime, x.RealNameAddTime,
x.RealNameUpdateTime, x.RealNameUpdateTime,
x.PersonId, x.PersonId,
x.SitePersonId,
}).ToList(); }).ToList();
if (getData.Count() > 0) if (getData.Count() > 0)
{ {
@@ -1200,7 +1207,7 @@ namespace BLL
{ {
foreach (var item in getData) foreach (var item in getData)
{ {
var getPerson = db.SitePerson_Person.FirstOrDefault(x => x.PersonId == item.PersonId); var getPerson = db.SitePerson_Person.FirstOrDefault(x => x.SitePersonId == item.SitePersonId);
if (getPerson != null) if (getPerson != null)
{ {
if (!getPerson.RealNameAddTime.HasValue) if (!getPerson.RealNameAddTime.HasValue)
@@ -1226,7 +1233,7 @@ namespace BLL
} }
InsertRealNamePushLog(null, proCode, "推送人员数据", sucess, code, mess, data, pushContent); InsertRealNamePushLog(null, proCode, "推送人员数据", sucess, code, mess, data, pushContent);
if (data.Contains("已存在") || mess.Contains("已存在")) if (data.Contains("已存在") || mess.Contains("已存在") || mess.Contains("重合") || data.Contains("重合"))
{ {
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{ {
@@ -1234,7 +1241,133 @@ namespace BLL
{ {
if (data.Contains(item.idcardNumber) || mess.Contains(item.idcardNumber)) if (data.Contains(item.idcardNumber) || mess.Contains(item.idcardNumber))
{ {
var getPerson = db.SitePerson_Person.FirstOrDefault(x => x.PersonId == item.PersonId); var getPerson = db.SitePerson_Person.FirstOrDefault(x => x.SitePersonId == item.SitePersonId);
if (getPerson != null)
{
if (!getPerson.RealNameAddTime.HasValue)
{
getPerson.RealNameAddTime = DateTime.Now;
}
db.SubmitChanges();
}
}
}
}
}
}
else
{
mess = "没有符合条件的数据!";
}
return mess;
}
catch (Exception ex)
{
ErrLogInfo.WriteLog(ex, "推送人员数据", "SynchroSetService.PushPersons");
return "推送人员异常";
}
}
/// <summary>
/// 推送人员数据
/// </summary>
/// <returns></returns>
public static string PushPersonsByIdentityCardUpdate(string proCode, string identityCard)
{
try
{
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
join Persons in Funs.DB.Person_Persons on x.IdentityCard equals Persons.IdentityCard
join z in Funs.DB.RealName_Project on y.ContractNo equals z.ProCode
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
where x.IdentityCard == identityCard && y.ContractNo == proCode
&& v.TeamId.HasValue
&& z.JTproCode != null
select new
{
name = x.PersonName,
idcardType = "SHENFEN_ZHENGJIAN",
idcardNumber = x.IdentityCard,
proCode = z.JTproCode,
teamId = v.TeamId,
userType = ((w.PostType == "1" || w.PostType == "4") ? "LAB_USER_MANAGE" : "LAB_USER_BULIDER"),
workType = w.WorkPostCode,
isLeave = x.OutTime.HasValue ? "Y" : "N",
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,
x.RealNameAddTime,
x.RealNameUpdateTime,
x.PersonId,
x.SitePersonId,
}).ToList();
if (getData.Count() > 0)
{
string returndata = string.Empty;
Hashtable newToken = new Hashtable
{
{ "token", getaccess_token(proCode) }
};
var updatelistObject = new
{
list = getData.Select(x => new { x.name, x.idcardType, x.idcardNumber, x.proCode, x.teamId, x.userType, x.workType, x.isLeave, x.entryTime, x.exitTime })
};
pushContent = JsonConvert.SerializeObject(updatelistObject);
returndata = BLL.APIGetHttpService.OutsideHttp(Funs.RealNameApiUrl + "/foreignApi/accept/updatePersons", "POST", contenttype, newToken, JsonConvert.SerializeObject(updatelistObject));
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))
{
foreach (var item in getData)
{
var getPerson = db.SitePerson_Person.FirstOrDefault(x => x.SitePersonId == item.SitePersonId);
if (getPerson != null)
{
if (!getPerson.RealNameAddTime.HasValue)
{
getPerson.RealNameAddTime = DateTime.Now;
}
getPerson.RealNameUpdateTime = DateTime.Now;
db.SubmitChanges();
}
}
}
}
else
{
if (mess.Contains("token无效"))
{
getaccess_token_New(proCode);
}
}
}
InsertRealNamePushLog(null, proCode, "推送人员数据", sucess, code, mess, data, pushContent);
if (data.Contains("已存在") || mess.Contains("已存在") || mess.Contains("重合") || data.Contains("重合"))
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
foreach (var item in getData)
{
if (data.Contains(item.idcardNumber) || mess.Contains(item.idcardNumber))
{
var getPerson = db.SitePerson_Person.FirstOrDefault(x => x.SitePersonId == item.SitePersonId);
if (getPerson != null) if (getPerson != null)
{ {
if (!getPerson.RealNameAddTime.HasValue) if (!getPerson.RealNameAddTime.HasValue)
@@ -1293,6 +1426,7 @@ namespace BLL
x.RealNameUpdateTime, x.RealNameUpdateTime,
name = x.PersonName, name = x.PersonName,
x.PersonId, x.PersonId,
x.SitePersonId,
}); });
if (getData.Count() > 0) if (getData.Count() > 0)
{ {
@@ -1322,7 +1456,7 @@ namespace BLL
{ {
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{ {
var getPerson = db.SitePerson_Person.FirstOrDefault(x => x.PersonId == itemData.PersonId); var getPerson = db.SitePerson_Person.FirstOrDefault(x => x.SitePersonId == itemData.SitePersonId);
if (getPerson != null) if (getPerson != null)
{ {
if (!getPerson.RealNameAddTime.HasValue) if (!getPerson.RealNameAddTime.HasValue)
@@ -1635,6 +1769,7 @@ namespace BLL
x.RealNameAddTime, x.RealNameAddTime,
x.RealNameUpdateTime, x.RealNameUpdateTime,
x.PersonId, x.PersonId,
x.SitePersonId,
}).ToList(); }).ToList();
if (getData.Count() > 0) if (getData.Count() > 0)
{ {
@@ -53,7 +53,7 @@ namespace FineUIPro.Web.CQMS.Plan
this.rblIsAgree.Hidden = true; this.rblIsAgree.Hidden = true;
this.drpPerson.DataTextField = "PersonName"; this.drpPerson.DataTextField = "PersonName";
this.drpPerson.DataValueField = "PersonId"; this.drpPerson.DataValueField = "PersonId";
this.drpPerson.DataSource = (from x in Funs.DB.Person_Persons where x.UnitId == Const.UnitId_SEDIN && x.DepartId == Const.Depart_constructionId && x.IsOffice == true select x).ToList(); this.drpPerson.DataSource = (from x in Funs.DB.Person_Persons where x.UnitId == Const.UnitId_SEDIN && x.DepartId == Const.Depart_constructionId select x).ToList();
this.drpPerson.DataBind(); this.drpPerson.DataBind();
Funs.FineUIPleaseSelect(this.drpPerson); Funs.FineUIPleaseSelect(this.drpPerson);
if (!string.IsNullOrEmpty(MainPlanId)) if (!string.IsNullOrEmpty(MainPlanId))
@@ -45,7 +45,7 @@
<f:FormRow> <f:FormRow>
<Items> <Items>
<f:TextBox ID="txtProjectName" runat="server" Readonly="true" Label="项目名称" LabelAlign="Right" <f:TextBox ID="txtProjectName" runat="server" Readonly="true" Label="项目名称" LabelAlign="Right"
MaxLength="50" > >
</f:TextBox> </f:TextBox>
<f:TextBox ID="txtCode" runat="server" Required="true" ShowRedStar="true" Label="编号" LabelAlign="Right" MaxLength="50" LabelWidth="120px"> <f:TextBox ID="txtCode" runat="server" Required="true" ShowRedStar="true" Label="编号" LabelAlign="Right" MaxLength="50" LabelWidth="120px">
</f:TextBox> </f:TextBox>
@@ -45,7 +45,7 @@
<f:FormRow> <f:FormRow>
<Items> <Items>
<f:TextBox ID="txtProjectName" runat="server" Readonly="true" Label="项目名称" LabelAlign="Right" <f:TextBox ID="txtProjectName" runat="server" Readonly="true" Label="项目名称" LabelAlign="Right"
MaxLength="50"> >
</f:TextBox> </f:TextBox>
<f:TextBox ID="txtCode" runat="server" Required="true" Readonly="true" ShowRedStar="true" Label="编号" LabelAlign="Right" <f:TextBox ID="txtCode" runat="server" Required="true" Readonly="true" ShowRedStar="true" Label="编号" LabelAlign="Right"
MaxLength="50" LabelWidth="120px"> MaxLength="50" LabelWidth="120px">
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -12848,7 +12848,7 @@
<AutoAssignPort>True</AutoAssignPort> <AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>0</DevelopmentServerPort> <DevelopmentServerPort>0</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath> <DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:8899/</IISUrl> <IISUrl>http://localhost:2087/</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication> <NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer> <UseCustomServer>False</UseCustomServer>
<CustomServerUrl> <CustomServerUrl>
@@ -39,7 +39,7 @@ namespace FineUIPro.Web.Person
private void BindGrid() private void BindGrid()
{ {
var getData = Person_PersonsService.getListData(Const.UnitId_SEDIN, this.drpDepart.SelectedValue, this.drpProject.SelectedValue, var getData = Person_PersonsService.getListData(Const.UnitId_SEDIN, this.drpDepart.SelectedValue, this.drpProject.SelectedValue,
this.txtPersonName.Text.Trim(), this.txtIdCard.Text.Trim(), this.drpIsPost.SelectedValue,this.drpPersonType.SelectedValue, Grid1); this.txtPersonName.Text.Trim(), this.txtIdCard.Text.Trim(), this.drpIsPost.SelectedValue, this.drpPersonType.SelectedValue, null, Grid1);
Grid1.RecordCount = Person_PersonsService.count; Grid1.RecordCount = Person_PersonsService.count;
Grid1.DataSource = getData; Grid1.DataSource = getData;
Grid1.DataBind(); Grid1.DataBind();
@@ -90,7 +90,7 @@ namespace FineUIPro.Web.Person
private void BindGrid() private void BindGrid()
{ {
var getData = Person_PersonsService.getListData(Const.UnitId_SEDIN, Const.Depart_constructionId, this.drpProject.SelectedValue, var getData = Person_PersonsService.getListData(Const.UnitId_SEDIN, Const.Depart_constructionId, this.drpProject.SelectedValue,
this.txtPersonName.Text.Trim(), this.txtIdCard.Text.Trim(), this.drpIsPost.SelectedValue, this.drpPersonType.SelectedValue, Grid1); this.txtPersonName.Text.Trim(), this.txtIdCard.Text.Trim(), this.drpIsPost.SelectedValue, this.drpPersonType.SelectedValue, null, Grid1);
Grid1.RecordCount = Person_PersonsService.count; Grid1.RecordCount = Person_PersonsService.count;
Grid1.DataSource = getData; Grid1.DataSource = getData;
Grid1.DataBind(); Grid1.DataBind();
+1
View File
@@ -35,6 +35,7 @@
</f:DropDownList> </f:DropDownList>
<f:TextBox runat="server" ID="txtPersonName" EmptyText="按姓名查询" ></f:TextBox> <f:TextBox runat="server" ID="txtPersonName" EmptyText="按姓名查询" ></f:TextBox>
<f:TextBox runat="server" ID="txtIdCard" EmptyText="按身份证查询" ></f:TextBox> <f:TextBox runat="server" ID="txtIdCard" EmptyText="按身份证查询" ></f:TextBox>
<f:TextBox runat="server" ID="txtAccount" EmptyText="按账号查询" ></f:TextBox>
<f:DropDownList runat="server" ID="drpIsPost" EnableEdit="true" <f:DropDownList runat="server" ID="drpIsPost" EnableEdit="true"
LabelAlign="Right" EmptyText="请选择人员状态" AutoPostBack="true" OnSelectedIndexChanged="btSearch_Click"> LabelAlign="Right" EmptyText="请选择人员状态" AutoPostBack="true" OnSelectedIndexChanged="btSearch_Click">
</f:DropDownList> </f:DropDownList>
+1 -1
View File
@@ -43,7 +43,7 @@ namespace FineUIPro.Web.Person
private void BindGrid() private void BindGrid()
{ {
var getData = Person_PersonsService.getListData(this.drpUnit.SelectedValue, this.drpDepart.SelectedValue, this.drpProject.SelectedValue, var getData = Person_PersonsService.getListData(this.drpUnit.SelectedValue, this.drpDepart.SelectedValue, this.drpProject.SelectedValue,
this.txtPersonName.Text.Trim(), this.txtIdCard.Text.Trim(), this.drpIsPost.SelectedValue, this.drpPersonType.SelectedValue, Grid1); this.txtPersonName.Text.Trim(), this.txtIdCard.Text.Trim(), this.drpIsPost.SelectedValue, this.drpPersonType.SelectedValue, this.txtAccount.Text.Trim(), Grid1);
Grid1.RecordCount = Person_PersonsService.count; Grid1.RecordCount = Person_PersonsService.count;
Grid1.DataSource = getData; Grid1.DataSource = getData;
Grid1.DataBind(); Grid1.DataBind();
+9
View File
@@ -104,6 +104,15 @@ namespace FineUIPro.Web.Person
/// </remarks> /// </remarks>
protected global::FineUIPro.TextBox txtIdCard; protected global::FineUIPro.TextBox txtIdCard;
/// <summary>
/// txtAccount 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtAccount;
/// <summary> /// <summary>
/// drpIsPost 控件。 /// drpIsPost 控件。
/// </summary> /// </summary>
@@ -51,7 +51,7 @@ namespace FineUIPro.Web.ZHGL.Plan
this.rblIsAgree.Hidden = true; this.rblIsAgree.Hidden = true;
this.drpPerson.DataTextField = "PersonName"; this.drpPerson.DataTextField = "PersonName";
this.drpPerson.DataValueField = "PersonId"; this.drpPerson.DataValueField = "PersonId";
this.drpPerson.DataSource = (from x in Funs.DB.Person_Persons where x.UnitId == Const.UnitId_SEDIN && x.DepartId == Const.Depart_constructionId && x.IsOffice == true select x).ToList(); this.drpPerson.DataSource = (from x in Funs.DB.Person_Persons where x.UnitId == Const.UnitId_SEDIN && x.DepartId == Const.Depart_constructionId select x).ToList();
this.drpPerson.DataBind(); this.drpPerson.DataBind();
Funs.FineUIPleaseSelect(this.drpPerson); Funs.FineUIPleaseSelect(this.drpPerson);
if (!string.IsNullOrEmpty(MainPlanId)) if (!string.IsNullOrEmpty(MainPlanId))
@@ -22,7 +22,7 @@
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="SimpleForm1" /> <f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="SimpleForm1" />
<f:Panel ID="Panel2" runat="server" ShowHeader="false" ShowBorder="false" ColumnWidth="100%" MarginRight="5px"> <f:Panel ID="Panel2" runat="server" ShowHeader="false" ShowBorder="false" ColumnWidth="100%" MarginRight="5px">
<Items> <Items>
<f:TabStrip ID="TabStrip1" CssClass="f-tabstrip-theme-simple" Height="550px" ShowBorder="true" <f:TabStrip ID="TabStrip1" CssClass="f-tabstrip-theme-simple" ShowBorder="true" Height="650px"
TabPosition="Top" MarginBottom="5px" EnableTabCloseMenu="false" runat="server" TabPosition="Top" MarginBottom="5px" EnableTabCloseMenu="false" runat="server"
ActiveTabIndex="0"> ActiveTabIndex="0">
<Tabs> <Tabs>
@@ -31,6 +31,9 @@
</f:DatePicker> </f:DatePicker>
<f:DatePicker ID="txtEndDate" runat="server" Label="结束日期" LabelWidth="80px" Width="220px"> <f:DatePicker ID="txtEndDate" runat="server" Label="结束日期" LabelWidth="80px" Width="220px">
</f:DatePicker> </f:DatePicker>
<f:DropDownList runat="server" Width="320px" ID="drpProject" EnableEdit="true" Label="项目"
LabelWidth="60px" LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="drpProject_SelectedIndexChanged">
</f:DropDownList>
<f:TextBox runat="server" ID="txtConet" EmptyText="请输入查询条件" Width="220px"></f:TextBox> <f:TextBox runat="server" ID="txtConet" EmptyText="请输入查询条件" Width="220px"></f:TextBox>
<f:ToolbarFill runat="server"></f:ToolbarFill> <f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnSearch" runat="server" Icon="SystemSearch" ToolTip="查询" OnClick="btnSearch_Click"> <f:Button ID="btnSearch" runat="server" Icon="SystemSearch" ToolTip="查询" OnClick="btnSearch_Click">
@@ -38,6 +41,8 @@
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp" <f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp"
EnableAjax="false" DisableControlBeforePostBack="false"> EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button> </f:Button>
<f:Button ID="btnDele" runat="server" Icon="Delete" ToolTip="清理同步记录" OnClick="btnDele_Click">
</f:Button>
</Items> </Items>
</f:Toolbar> </f:Toolbar>
</Toolbars> </Toolbars>
@@ -5,6 +5,7 @@ using System.Data;
using System.Data.SqlClient; using System.Data.SqlClient;
using System.Text; using System.Text;
using AspNet = System.Web.UI.WebControls; using AspNet = System.Web.UI.WebControls;
using System.Linq;
namespace FineUIPro.Web.ZHGL.RealName namespace FineUIPro.Web.ZHGL.RealName
{ {
@@ -22,6 +23,12 @@ namespace FineUIPro.Web.ZHGL.RealName
Funs.DropDownPageSize(this.ddlPageSize); Funs.DropDownPageSize(this.ddlPageSize);
this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
ProjectService.InitAllProjectShortNameDropDownList(this.drpProject, this.CurrUser.PersonId, true);
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
this.drpProject.SelectedValue = this.CurrUser.LoginProjectId;
this.drpProject.Readonly = true;
}
this.GridBind(); this.GridBind();
} }
} }
@@ -46,6 +53,11 @@ namespace FineUIPro.Web.ZHGL.RealName
strSql += " AND PushTime < @EndDate"; strSql += " AND PushTime < @EndDate";
listStr.Add(new SqlParameter("@EndDate", Funs.GetNewDateTime(this.txtEndDate.Text).Value.AddDays(1))); listStr.Add(new SqlParameter("@EndDate", Funs.GetNewDateTime(this.txtEndDate.Text).Value.AddDays(1)));
} }
if (this.drpProject.SelectedValue != Const._Null && !string.IsNullOrEmpty(this.drpProject.SelectedValue))
{
strSql += " AND ProjectId = @ProjectId";
listStr.Add(new SqlParameter("@ProjectId", this.drpProject.SelectedValue));
}
if (!string.IsNullOrEmpty(this.txtConet.Text)) if (!string.IsNullOrEmpty(this.txtConet.Text))
{ {
strSql += " AND (Success LIKE @name OR Message LIKE @name OR ReturnData LIKE @name)"; strSql += " AND (Success LIKE @name OR Message LIKE @name OR ReturnData LIKE @name)";
@@ -154,5 +166,23 @@ namespace FineUIPro.Web.ZHGL.RealName
this.GridBind(); this.GridBind();
} }
#endregion #endregion
protected void drpProject_SelectedIndexChanged(object sender, EventArgs e)
{
GridBind();
}
protected void btnDele_Click(object sender, EventArgs e)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
var getRealName_PushLog = from x in db.RealName_PushLog select x;
if (getRealName_PushLog.Count() > 0)
{
db.RealName_PushLog.DeleteAllOnSubmit(getRealName_PushLog);
db.SubmitChanges();
}
}
}
} }
} }
@@ -7,10 +7,12 @@
// </自动生成> // </自动生成>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace FineUIPro.Web.ZHGL.RealName { namespace FineUIPro.Web.ZHGL.RealName
{
public partial class SynchroRecord { public partial class SynchroRecord
{
/// <summary> /// <summary>
/// form1 控件。 /// form1 控件。
@@ -75,6 +77,15 @@ namespace FineUIPro.Web.ZHGL.RealName {
/// </remarks> /// </remarks>
protected global::FineUIPro.DatePicker txtEndDate; protected global::FineUIPro.DatePicker txtEndDate;
/// <summary>
/// drpProject 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpProject;
/// <summary> /// <summary>
/// txtConet 控件。 /// txtConet 控件。
/// </summary> /// </summary>
@@ -102,6 +113,15 @@ namespace FineUIPro.Web.ZHGL.RealName {
/// </remarks> /// </remarks>
protected global::FineUIPro.Button btnOut; protected global::FineUIPro.Button btnOut;
/// <summary>
/// btnDele 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnDele;
/// <summary> /// <summary>
/// labNumber 控件。 /// labNumber 控件。
/// </summary> /// </summary>
@@ -41,11 +41,15 @@
</f:NumberBox> </f:NumberBox>
</Items> </Items>
</f:FormRow> </f:FormRow>
<f:FormRow ColumnWidths="90% 10%"> <f:FormRow ColumnWidths="80% 6% 6% 7%">
<Items> <Items>
<f:TextArea ID="txtIdentityCard" runat="server" Label="身份证号码" LabelWidth="120px"> <f:TextArea ID="txtIdentityCard" runat="server" Label="身份证号码" LabelWidth="120px">
</f:TextArea> </f:TextArea>
<f:Button ID="btnPushData" Icon="Accept" runat="server" Text="提交" ToolTip="多身份证用逗号(,)隔开;或直接复制日志中错误提示信息。" OnClick="btnPushData_Click"> <f:Button ID="btnPushData" Icon="Accept" runat="server" Text="提交" ToolTip="多身份证用逗号(,)隔开;或直接复制日志中错误提示信息。"
OnClick="btnPushData_Click">
</f:Button>
<f:Button ID="btnPushUpdate" Icon="Accept" runat="server" Text="更新" ToolTip="多身份证用逗号(,)隔开;或直接复制日志中错误提示信息。"
OnClick="btnPushUpdate_Click">
</f:Button> </f:Button>
<f:Button ID="btnDelete" Icon="Delete" runat="server" Text="删除" <f:Button ID="btnDelete" Icon="Delete" runat="server" Text="删除"
ToolTip="删除这些身份证号码对应的实名制考勤,多身份证用逗号(,)隔开。" OnClick="btnDelete_Click"> ToolTip="删除这些身份证号码对应的实名制考勤,多身份证用逗号(,)隔开。" OnClick="btnDelete_Click">
@@ -287,7 +287,33 @@ namespace FineUIPro.Web.ZHGL.RealName
} }
} }
} }
protected void btnPushUpdate_Click(object sender, EventArgs e)
{
string message = string.Empty;
string idText = this.txtIdentityCard.Text.Trim();
if (!string.IsNullOrEmpty(idText))
{
string proCode = ProjectService.GetContractNoByProjectId(this.drpProject.SelectedValue);
var getRProjects = Funs.DB.RealName_Project.FirstOrDefault(x => x.ProCode == proCode);
if (getRProjects != null && !string.IsNullOrEmpty(getRProjects.ProCode))
{
var getList = returnCardList();
if (getList != null && getList.Count > 0)
{
foreach (var item in getList)
{
message += ("项目" + getRProjects.ProCode + "更新" + BLL.SynchroSetService.PushPersonsByIdentityCardUpdate(getRProjects.ProCode, item) ?? "");
}
ShowNotify(message, MessageBoxIcon.Information);
}
}
else
{
ShowNotify("当前项目还没有与实名制对接!", MessageBoxIcon.Information);
}
}
}
protected void btnDelete_Click(object sender, EventArgs e) protected void btnDelete_Click(object sender, EventArgs e)
{ {
var getList = returnCardList(); var getList = returnCardList();
@@ -637,5 +663,7 @@ namespace FineUIPro.Web.ZHGL.RealName
ShowNotify("操作完成!" + count.ToString() + "条", MessageBoxIcon.Success); ShowNotify("操作完成!" + count.ToString() + "条", MessageBoxIcon.Success);
} }
} }
} }
} }
+13 -2
View File
@@ -7,10 +7,12 @@
// </自动生成> // </自动生成>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace FineUIPro.Web.ZHGL.RealName { namespace FineUIPro.Web.ZHGL.RealName
{
public partial class SynchroSet { public partial class SynchroSet
{
/// <summary> /// <summary>
/// form1 控件。 /// form1 控件。
@@ -102,6 +104,15 @@ namespace FineUIPro.Web.ZHGL.RealName {
/// </remarks> /// </remarks>
protected global::FineUIPro.Button btnPushData; protected global::FineUIPro.Button btnPushData;
/// <summary>
/// btnPushUpdate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnPushUpdate;
/// <summary> /// <summary>
/// btnDelete 控件。 /// btnDelete 控件。
/// </summary> /// </summary>
+2 -3
View File
@@ -50,9 +50,8 @@
<DocumentationFile>bin\WebAPI.xml</DocumentationFile> <DocumentationFile>bin\WebAPI.xml</DocumentationFile>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Aspose.Words, Version=10.5.0.0, Culture=neutral, PublicKeyToken=fa9a48344f15a022, processorArchitecture=MSIL"> <Reference Include="Aspose.Words">
<SpecificVersion>False</SpecificVersion> <HintPath>..\FineUIPro\Reference BLL\Aspose.Words.dll</HintPath>
<HintPath>bin\Aspose.Words.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">