This commit is contained in:
杨红卫 2021-08-17 11:01:22 +08:00
parent dba64994c3
commit 9b4b36afdd
9 changed files with 94 additions and 50 deletions

View File

@ -35,7 +35,7 @@ namespace BLL
/// <param name="PageSize">每页数量</param>
/// <returns></returns>
public static IEnumerable getListData(string projectId, string unitId, string personName, string identityCard, string treamGroupId, string workPostIds,
bool ckTrain, bool ckIspost, bool ckJT, bool ckIdCardInfoNotOK, Grid Grid1)
bool ckTrain, string postType, bool ckJT, bool ckIdCardInfoNotOK, Grid Grid1)
{
IQueryable<Model.View_SitePerson_Person> getPersonList = getPersonLists.Where(x => x.ProjectId == projectId);
if (!string.IsNullOrEmpty(unitId))
@ -69,11 +69,16 @@ namespace BLL
{
getPersonList = getPersonList.Where(x => x.TrainCount == 0);
}
if (ckIspost)
if (postType =="0")
{
getPersonList = getPersonList.Where(x => x.IsUsed == false || x.InTime.Value > DateTime.Now
|| (x.OutTime.HasValue && x.OutTime < DateTime.Now));
}
else if (postType == "1")
{
getPersonList = getPersonList.Where(x => x.IsUsed == true && x.InTime <=DateTime.Now && (!x.OutTime.HasValue || x.OutTime.Value >DateTime.Now));
}
if (ckJT)
{
getPersonList = getPersonList.Where(x => x.RealNameAddTime == null);

View File

@ -917,9 +917,9 @@ namespace BLL
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 != null && x.IdentityCard != "" && identityCard == null) || (identityCard != null && x.IdentityCard == identityCard))
&& y.JTProjectCode == proCode
&& y.JTProjectCode == proCode
&& v.TeamId.HasValue && x.HeadImage != null && x.HeadImage.Length > 0
&& ((type == Const.BtnModify && !x.RealNameUpdateTime.HasValue) || (type != Const.BtnModify && !x.RealNameAddTime.HasValue))
&& ((type == Const.BtnModify && !x.RealNameUpdateTime.HasValue) || (type != Const.BtnModify && !x.RealNameAddTime.HasValue && x.IsUsed && !x.OutTime.HasValue))
&& (x.IdentityCard.Length == 15 || x.IdentityCard.Length == 18)
select new
{

View File

@ -36,3 +36,29 @@ IP地址:::1
出错时间:08/16/2021 16:29:05
错误信息开始=====>
错误类型:HttpParseException
错误信息:类型“FineUIPro.CheckBox”不具有名为“OnSelectedIndexChanged”的公共属性。
错误堆栈:
在 System.Web.UI.TemplateParser.ProcessException(Exception ex)
在 System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding)
在 System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding)
----错误类型:HttpException
----错误信息:
----类型“FineUIPro.CheckBox”不具有名为“OnSelectedIndexChanged”的公共属性。
----错误堆栈:
在 System.Web.UI.ControlBuilder.AddProperty(String filter, String name, String value, Boolean mainDirectiveMode)
在 System.Web.UI.ControlBuilder.PreprocessAttribute(String filter, String attribname, String attribvalue, Boolean mainDirectiveMode, Int32 line, Int32 column)
在 System.Web.UI.ControlBuilder.PreprocessAttributes(ParsedAttributeCollection attribs)
在 System.Web.UI.ControlBuilder.Init(TemplateParser parser, ControlBuilder parentBuilder, Type type, String tagName, String id, IDictionary attribs)
在 System.Web.UI.ControlBuilder.CreateBuilderFromType(TemplateParser parser, ControlBuilder parentBuilder, Type type, String tagName, String id, IDictionary attribs, Int32 line, String sourceFileName)
在 System.Web.UI.ControlBuilder.CreateChildBuilder(String filter, String tagName, IDictionary attribs, TemplateParser parser, ControlBuilder parentBuilder, String id, Int32 line, VirtualPath virtualPath, Type& childType, Boolean defaultProperty)
在 System.Web.UI.TemplateParser.ProcessBeginTag(Match match, String inputText)
在 System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding)
出错时间:08/17/2021 10:54:26
出错文件:http://localhost:8118/HSSE/SitePerson/PersonList.aspx
IP地址:::1
出错时间:08/17/2021 10:54:26

View File

@ -51,37 +51,47 @@
<f:Toolbar ID="Toolbar3" Position="Top" ToolbarAlign="Left" runat="server">
<Items>
<f:TextBox runat="server" Label="姓名" ID="txtPersonName" EmptyText="输入查询条件"
Width="200px" LabelWidth="70px" LabelAlign="right">
Width="150px" LabelWidth="50px" >
</f:TextBox>
<f:DropDownList ID="drpPost" runat="server" Label="岗位" EnableEdit="true" EnableMultiSelect="true"
AutoPostBack="true" OnSelectedIndexChanged="drpPost_SelectedIndexChanged"
Width="200px" LabelWidth="50px" LabelAlign="right" ForceSelection="false" EnableCheckBoxSelect="true">
Width="200px" LabelWidth="50px" ForceSelection="false" EnableCheckBoxSelect="true">
</f:DropDownList>
<f:DropDownList ID="drpTreamGroup" runat="server" Label="班组" EnableEdit="true"
Width="200px" LabelWidth="50px" LabelAlign="right" ForceSelection="false">
Width="150px" LabelWidth="50px" ForceSelection="false">
</f:DropDownList>
<f:TextBox runat="server" Label="身份证" ID="txtIdentityCard" EmptyText="输入查询条件"
Width="200px" LabelWidth="70px"
LabelAlign="right">
</f:TextBox>
<f:ToolbarFill 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">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" ToolbarAlign="Right" runat="server">
<Items>
<f:CheckBox runat="server" ID="ckIdCardInfoNotOK" Label="信息不全" LabelAlign="right" LabelWidth="80px">
<f:RadioButtonList ID="rblPost" runat="server" AutoPostBack="true" Width="220px"
OnSelectedIndexChanged="TextBox_TextChanged">
<f:RadioItem Value="-1" Text="全部" Selected="true" />
<f:RadioItem Value="1" Text="在岗" />
<f:RadioItem Value="0" Text="不在岗" />
</f:RadioButtonList>
<f:CheckBox runat="server" ID="ckJT" Label="未同步" LabelAlign="right" LabelWidth="70px"
AutoPostBack="true" OnCheckedChanged="TextBox_TextChanged">
</f:CheckBox>
<f:CheckBox runat="server" ID="ckIspost" Label="未在岗" LabelAlign="right" LabelWidth="80px">
<f:CheckBox runat="server" ID="ckTrain" Label="未培训" LabelAlign="right" LabelWidth="70px"
AutoPostBack="true" OnCheckedChanged="TextBox_TextChanged">
</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 runat="server" ID="ckIdCardInfoNotOK" Label="信息不全" LabelAlign="right" LabelWidth="80px"
AutoPostBack="true" OnCheckedChanged="TextBox_TextChanged">
</f:CheckBox>
<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">
</f:Button>
<f:Button ID="btnPersonOut" ToolTip="批量出场" Icon="UserGo" runat="server" Hidden="true" OnClick="btnPersonOut_Click">
</f:Button>
<f:Button ID="btnImport" ToolTip="导入" Icon="ApplicationGet" Hidden="true" runat="server"
@ -127,7 +137,6 @@
<f:RenderField HeaderText="状态" ColumnID="PersonState" DataField="PersonState" SortField="PersonState"
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="60px">
</f:RenderField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />

View File

@ -181,7 +181,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
}
var getData = PersonService.getListData(this.ProjectId, unitId, this.txtPersonName.Text.Trim(), this.txtIdentityCard.Text.Trim(),
this.drpTreamGroup.SelectedValue, Funs.GetStringByArray(this.drpPost.SelectedValueArray), this.ckTrain.Checked, this.ckIspost.Checked, this.ckJT.Checked,
this.drpTreamGroup.SelectedValue, Funs.GetStringByArray(this.drpPost.SelectedValueArray), this.ckTrain.Checked, this.rblPost.SelectedValue, this.ckJT.Checked,
this.ckIdCardInfoNotOK.Checked, Grid1);
Grid1.RecordCount = PersonService.count;
Grid1.DataSource = getData;

View File

@ -138,6 +138,24 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// </remarks>
protected global::FineUIPro.TextBox txtIdentityCard;
/// <summary>
/// btSearch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btSearch;
/// <summary>
/// btnNew 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnNew;
/// <summary>
/// Toolbar1 控件。
/// </summary>
@ -148,22 +166,13 @@ namespace FineUIPro.Web.HSSE.SitePerson {
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// ckIdCardInfoNotOK 控件。
/// rblPost 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox ckIdCardInfoNotOK;
/// <summary>
/// ckIspost 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox ckIspost;
protected global::FineUIPro.RadioButtonList rblPost;
/// <summary>
/// ckJT 控件。
@ -183,6 +192,15 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// </remarks>
protected global::FineUIPro.CheckBox ckTrain;
/// <summary>
/// ckIdCardInfoNotOK 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox ckIdCardInfoNotOK;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
@ -192,24 +210,6 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btSearch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btSearch;
/// <summary>
/// btnNew 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnNew;
/// <summary>
/// btnPersonOut 控件。
/// </summary>

View File

@ -30,7 +30,7 @@
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" runat="server" DataIDField="PersonId" DataTextField="PersonName"
DataKeyNames="PersonId" AllowSorting="true" SortField="PersonName" SortDirection="ASC" EnableColumnLines="true"
Hidden="true" Width="700px" Height="360px" EnableMultiSelect="true" KeepCurrentSelection="true" ForceFit="true"
EnableCheckBoxSelect="True" PageSize="500">
EnableCheckBoxSelect="True" PageSize="100000">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server">
<Items>

View File

@ -41,7 +41,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
string strSql = string.Empty;
///在场人员出场
strSql = @"SELECT PersonId,CardNo,PersonName,IdentityCard"
+ @" FROM SitePerson_Person WHERE (OutTime IS NULL OR OutTime>= GETDATE())";
+ @" FROM SitePerson_Person WHERE IsUsed =1 AND (OutTime IS NULL OR OutTime>= GETDATE())";
List<SqlParameter> listStr = new List<SqlParameter>();
strSql += " AND ProjectId = @ProjectId";
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
@ -89,8 +89,12 @@ namespace FineUIPro.Web.HSSE.SitePerson
if (person != null)
{
person.OutTime = Funs.GetNewDateTime(this.txtChangeTime.Text);
person.IsUsed = false;
BLL.PersonService.UpdatePerson(person);
person.IsUsed = true;
person.OutTime = null;
person.ExchangeTime = null;
person.ExchangeTime2 = null;
person.RealNameUpdateTime = null;
Funs.DB.SubmitChanges();
}
}

View File

@ -0,0 +1,13 @@
1、
2、另外在手动考勤的下拉菜单中已出场人员应该不自动显示
3、
4、
5、