This commit is contained in:
2021-07-09 16:47:06 +08:00
parent e092c6cfb0
commit ff100e0b7b
9 changed files with 310 additions and 57 deletions
@@ -24,7 +24,7 @@
EnableCollapse="true" Width="250" Title="人员信息" TitleToolTip="人员信息" ShowBorder="true"
ShowHeader="false" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
<Items>
<f:Tree ID="tvProjectAndUnit" EnableCollapse="true" ShowHeader="false" Title="所属项目单位" OnNodeCommand="tvProjectAndUnit_NodeCommand" AutoLeafIdentification="true" runat="server" ShowBorder="false"
<f:Tree ID="tvProjectAndUnit" EnableCollapse="true" ShowHeader="false" Title="所属单位" OnNodeCommand="tvProjectAndUnit_NodeCommand" AutoLeafIdentification="true" runat="server" ShowBorder="false"
EnableTextSelection="True">
</f:Tree>
</Items>
@@ -70,13 +70,15 @@
</Toolbars>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" ToolbarAlign="Right" runat="server">
<Items>
<f:CheckBox runat="server" ID="ckIdCardInfoNotOK" Label="身份信息不齐全" LabelAlign="right" LabelWidth="120px">
<Items>
<f:CheckBox runat="server" ID="ckIdCardInfoNotOK" Label="信息不全" LabelAlign="right" LabelWidth="80px">
</f:CheckBox>
<f:CheckBox runat="server" ID="ckTrain" Label="未参加培训" LabelAlign="right">
<f:CheckBox runat="server" ID="ckIspost" Label="未在岗" LabelAlign="right" LabelWidth="80px">
</f:CheckBox>
<f:CheckBox runat="server" ID="ckJT" Label="未同步" LabelAlign="right" LabelWidth="80px">
</f:CheckBox>
<f:CheckBox runat="server" ID="ckTrain" Label="未培训" LabelAlign="right" LabelWidth="80px">
</f:CheckBox>
<f:Label runat="server" Text="红色表示未进行过任何培训人员。" CssClass="LabelColor"></f:Label>
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
<f:Button ID="btSearch" ToolTip="查询" Icon="SystemSearch" runat="server" OnClick="TextBox_TextChanged"></f:Button>
<f:Button ID="btnNew" ToolTip="增加" Icon="Add" runat="server" Hidden="true" OnClick="btnNew_Click">
@@ -179,7 +179,6 @@ namespace FineUIPro.Web.HSSE.SitePerson
unitId = str[0];
}
}
string strSql = "select * from View_SitePerson_Person Where ProjectId=@ProjectId ";
List<SqlParameter> listStr = new List<SqlParameter>
{
@@ -190,17 +189,11 @@ namespace FineUIPro.Web.HSSE.SitePerson
strSql += " AND UnitId =@UnitId ";
listStr.Add(new SqlParameter("@UnitId", unitId));
}
//else
//{
// strSql += " AND UnitId IS NULL";
//}
if (!string.IsNullOrEmpty(this.txtPersonName.Text.Trim()))
{
strSql += " AND PersonName LIKE @PersonName";
listStr.Add(new SqlParameter("@PersonName", "%" + this.txtPersonName.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(this.txtCardNo.Text.Trim()))
{
strSql += " AND CardNo LIKE @CardNo";
@@ -238,9 +231,17 @@ namespace FineUIPro.Web.HSSE.SitePerson
{
strSql += " AND TrainCount =0";
}
if (this.ckIspost.Checked)
{
strSql += " AND IsUsedName ='否'";
}
if (this.ckJT.Checked)
{
strSql += " AND RealNameAddTime IS NULL";
}
if (this.ckIdCardInfoNotOK.Checked)
{
strSql += " AND (IdcardType is null or IdentityCard is null or PhotoUrl is null or (select count(*) from AttachFile where ToKeyId=PersonId+'#1')=0 or (select count(*) from AttachFile where ToKeyId=PersonId+'#5')=0)";
strSql += " AND (IdcardType is null or IdentityCard is null or PhotoUrl is null or HeadImage IS NULL OR (LEN(IdentityCard) != 15 AND LEN(IdentityCard) != 18))";
}
SqlParameter[] parameter = listStr.ToArray();
@@ -250,20 +251,6 @@ namespace FineUIPro.Web.HSSE.SitePerson
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
for (int i = 0; i < Grid1.Rows.Count; i++)
{
string personId = Grid1.Rows[i].DataKeys[0].ToString();
var isNull = from x in db.EduTrain_TrainRecordDetail
join y in db.EduTrain_TrainRecord on x.TrainingId equals y.TrainingId
where y.ProjectId == this.ProjectId && x.PersonId == personId
select x;
if (isNull.Count() == 0) ////未参加过培训的人员
{
Grid1.Rows[i].RowCssClass = "Red";
}
}
}
}
#endregion
@@ -594,7 +581,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("人员信息" + filename, System.Text.Encoding.UTF8) + ".xls");
Response.ContentType = "application/excel";
Response.ContentEncoding = System.Text.Encoding.UTF8;
//this.Grid1.PageSize = this.;
this.Grid1.PageSize = this.Grid1.RecordCount;
BindGrid();
Response.Write(GetGridTableHtml(Grid1));
Response.End();
@@ -734,11 +721,14 @@ namespace FineUIPro.Web.HSSE.SitePerson
var getPersons = from x in Funs.DB.SitePerson_Person
where x.ProjectId == this.ProjectId && x.HeadImage == null && x.PhotoUrl != null
select x;
int num = 0;
foreach (var item in getPersons)
{
item.HeadImage = AttachFileService.SetImageToByteArray(Funs.RootPath + item.PhotoUrl);
Funs.DB.SubmitChanges();
num++;
}
ShowNotify("操作完成,新转二进制照片" + num.ToString() + "条", MessageBoxIcon.Success);
}
}
}
@@ -165,6 +165,24 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// </remarks>
protected global::FineUIPro.CheckBox ckIdCardInfoNotOK;
/// <summary>
/// ckIspost 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox ckIspost;
/// <summary>
/// ckJT 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox ckJT;
/// <summary>
/// ckTrain 控件。
/// </summary>
@@ -104,6 +104,8 @@
</f:DatePicker>
<f:DatePicker ID="txtInTime" runat="server" Label="入场时间" LabelAlign="Right" LabelWidth="110px" ShowRedStar="true" Required="true">
</f:DatePicker>
<f:DatePicker ID="txtOutTime" runat="server" Label="出场时间" LabelAlign="Right" LabelWidth="110px">
</f:DatePicker>
</Items>
</f:Panel>
<f:Panel ID="Panel4" runat="server" BoxFlex="3" ShowBorder="false" ShowHeader="false"
@@ -143,7 +145,8 @@
<f:RadioItem Value="True" Text="是" />
<f:RadioItem Value="False" Text="否" />
</f:RadioButtonList>
<f:TextBox ID="txtOutResult" runat="server" Label="出场原因" LabelAlign="Right" MaxLength="50">
</f:TextBox>
</Items>
</f:Panel>
<f:Panel ID="Panel5" Title="面板1" BoxFlex="2" runat="server" ShowBorder="false" ShowHeader="false"
@@ -220,17 +223,9 @@
<f:FormRow>
<Items>
<f:TextBox ID="txtAddress" runat="server" Label="家庭地址" MaxLength="500" LabelAlign="Right" >
</f:TextBox>
<f:DatePicker ID="txtOutTime" runat="server" Label="出场时间" LabelAlign="Right">
</f:DatePicker>
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow ColumnWidths="100%">
<Items>
<f:TextBox ID="txtOutResult" runat="server" Label="出场原因" LabelAlign="Right" MaxLength="50">
</f:TextBox>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</Items>
@@ -273,6 +273,15 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// </remarks>
protected global::FineUIPro.DatePicker txtInTime;
/// <summary>
/// txtOutTime 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtOutTime;
/// <summary>
/// Panel4 控件。
/// </summary>
@@ -390,6 +399,15 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// </remarks>
protected global::FineUIPro.RadioButtonList rblIsUsed;
/// <summary>
/// txtOutResult 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtOutResult;
/// <summary>
/// Panel5 控件。
/// </summary>
@@ -552,24 +570,6 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// </remarks>
protected global::FineUIPro.TextBox txtAddress;
/// <summary>
/// txtOutTime 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtOutTime;
/// <summary>
/// txtOutResult 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtOutResult;
/// <summary>
/// Window1 控件。
/// </summary>