202306281、优化人员档案列表未培训判断。2、删除项目人员方法加判断存在重复身份证号码人员直接删除。3、项目劳务人员加部门查询下拉框。

This commit is contained in:
2023-06-28 16:17:27 +08:00
parent 124a6ec046
commit 4849aa0e2b
9 changed files with 207 additions and 48 deletions
@@ -39,12 +39,12 @@
</f:DatePicker>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnNew" ToolTip="增加" Icon="Add" runat="server" Hidden="true" OnClick="btnNew_Click">
<f:Button ID="btnNew" Text="增加" Icon="Add" runat="server" Hidden="true" OnClick="btnNew_Click">
</f:Button>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" Icon="FolderUp"
EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>
<f:Button ID="btnRefresh" ToolTip="刷明细" Icon="ArrowRefresh" runat="server" Hidden="true" OnClick="btnRefresh_Click">
<f:Button ID="btnRefresh" Text="刷明细" Icon="ArrowRefresh" runat="server" Hidden="true" OnClick="btnRefresh_Click">
</f:Button>
</Items>
</f:Toolbar>
@@ -191,34 +191,42 @@ namespace FineUIPro.Web.HSSE.SitePerson
projectId = str[1];
}
string strSql = @"SELECT ProjectId,SitePersonId,PersonId,PersonName,IdentityCard,CardNo,PersonName
,WorkPostId,WorkPostName,UnitId,UnitName,TeamGroupId,TeamGroupName,InTime,RealNameAddTime,States,TrainCount,TrainCount1
FROM View_SitePerson_Person
Where ProjectId=@ProjectId ";
string strSql = @"SELECT SitePerson.ProjectId,SitePerson.SitePersonId,SitePerson.PersonId,SitePerson.PersonName,SitePerson.IdentityCard,SitePerson.CardNo,SitePerson.PersonName
,SitePerson.WorkPostId,WorkPostName,SitePerson.UnitId,Unit.UnitName,SitePerson.TeamGroupId,TeamGroup.TeamGroupName,SitePerson.InTime,SitePerson.RealNameAddTime,SitePerson.States,
(SELECT COUNT(*) FROM EduTrain_TrainRecordDetail T
LEFT JOIN EduTrain_TrainRecord AS E ON T.TrainingId=E.TrainingId
WHERE T.PersonId=SitePerson.PersonId AND E.ProjectId=SitePerson.ProjectId AND T.CheckResult=1) AS TrainCount,
(SELECT COUNT(*) FROM Training_TestRecord R
WHERE R.TestManId=SitePerson.PersonId AND R.ProjectId=SitePerson.ProjectId and R.TestScores > ISNULL((SELECT TOP 1 PassingScore FROM Sys_TestRule),60)) AS TrainCount1
FROM SitePerson_Person AS SitePerson
LEFT JOIN Base_Unit AS Unit ON Unit.UnitId = SitePerson.UnitId
LEFT JOIN Base_WorkPost AS Post ON Post.WorkPostId = SitePerson.WorkPostId
LEFT JOIN ProjectData_TeamGroup AS TeamGroup ON TeamGroup.TeamGroupId=SitePerson.TeamGroupId
Where SitePerson.ProjectId=@ProjectId ";
List<SqlParameter> listStr = new List<SqlParameter>
{
new SqlParameter("@ProjectId", this.ProjectId)
};
if (!string.IsNullOrEmpty(unitId) && unitId != "0")
{
strSql += " AND UnitId =@UnitId ";
strSql += " AND SitePerson.UnitId =@UnitId ";
listStr.Add(new SqlParameter("@UnitId", unitId));
}
if (!string.IsNullOrEmpty(this.txtPersonName.Text.Trim()))
{
strSql += " AND PersonName LIKE @PersonName";
strSql += " AND SitePerson.PersonName LIKE @PersonName";
listStr.Add(new SqlParameter("@PersonName", "%" + this.txtPersonName.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(this.txtIdentityCard.Text.Trim()))
{
strSql += " AND IdentityCard LIKE @IdentityCard";
strSql += " AND SitePerson.IdentityCard LIKE @IdentityCard";
listStr.Add(new SqlParameter("@IdentityCard", "%" + this.txtIdentityCard.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(this.drpTreamGroup.SelectedValue) && this.drpTreamGroup.SelectedValue != BLL.Const._Null)
{
strSql += " AND TeamGroupId = @TeamGroupId";
strSql += " AND SitePerson.TeamGroupId = @TeamGroupId";
listStr.Add(new SqlParameter("@TeamGroupId", this.drpTreamGroup.SelectedValue));
}
@@ -230,7 +238,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
{
if (!string.IsNullOrEmpty(item) && item != BLL.Const._Null)
{
strSql += " OR WorkPostId = @WorkPostId" + i.ToString();
strSql += " OR SitePerson.WorkPostId = @WorkPostId" + i.ToString();
listStr.Add(new SqlParameter("@WorkPostId" + i.ToString(), item));
}
@@ -245,15 +253,15 @@ namespace FineUIPro.Web.HSSE.SitePerson
}
if (this.ckIsUsed.Checked)
{
strSql += " AND States ='1'";
strSql += " AND SitePerson.States ='1'";
}
if (this.ckJT.Checked)
{
strSql += " AND RealNameAddTime IS NULL";
strSql += " AND SitePerson.RealNameAddTime IS NULL";
}
if (this.ckIdCardInfoNotOK.Checked)
{
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) or TeamGroupId is null or WorkPostId is null)";
strSql += " AND (SitePerson.IdcardType is null or SitePerson.IdentityCard is null or SitePerson.PhotoUrl is null or SitePerson.HeadImage IS NULL OR (LEN(SitePerson.IdentityCard) != 15 AND LEN(SitePersonIdentityCard) != 18) or SitePerson.TeamGroupId is null or SitePerson.WorkPostId is null)";
}
SqlParameter[] parameter = listStr.ToArray();
@@ -33,6 +33,9 @@
</f:DropDownList>
<f:DropDownList runat="server" ID="drpUnit" EnableEdit="true" EnableAjax="false"
LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="btSearch_Click">
</f:DropDownList>
<f:DropDownList runat="server" ID="drpDepart" EnableEdit="true"
LabelAlign="Right" EmptyText="按部门" AutoPostBack="true" OnSelectedIndexChanged="btSearch_Click">
</f:DropDownList>
<f:DropDownList runat="server" ID="drpWorkPost" EnableEdit="true" EnableAjax="false" Width="150px"
LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="btSearch_Click">
@@ -25,6 +25,8 @@ namespace FineUIPro.Web.Person
Funs.FineUIPleaseSelect(drpProject, "按项目查询");
Funs.FineUIPleaseSelect(drpUnit, "按单位查询");
DepartService.InitDepartDropDownList(this.drpDepart, false);
Funs.FineUIPleaseSelect(drpDepart, "按部门查询");
WorkPostService.InitWorkPostDropDownList(this.drpWorkPost, false);
Funs.FineUIPleaseSelect(drpWorkPost, "按岗位查询");
DropListService.InitConstDropDownList(this.drpPersonType, DropListService.Group_PersonType, false);
@@ -94,7 +96,7 @@ namespace FineUIPro.Web.Person
/// </summary>
private void BindGrid()
{
var getData = SitePerson_PersonService.getListData(this.drpProject.SelectedValue, this.drpUnit.SelectedValue, this.drpWorkPost.SelectedValue,
var getData = SitePerson_PersonService.getListData(this.drpProject.SelectedValue, this.drpUnit.SelectedValue,this.drpDepart.SelectedValue, this.drpWorkPost.SelectedValue,
this.txtPersonName.Text.Trim(), this.txtIdCard.Text.Trim(), this.rbIsPostStates.SelectedValue, this.drpPersonType.SelectedValue, Grid1);
Grid1.RecordCount = SitePerson_PersonService.count;
Grid1.DataSource = getData;
@@ -77,6 +77,15 @@ namespace FineUIPro.Web.Person
/// </remarks>
protected global::FineUIPro.DropDownList drpUnit;
/// <summary>
/// drpDepart 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpDepart;
/// <summary>
/// drpWorkPost 控件。
/// </summary>