20230627人员档案未参加培训人员标记方法优化
This commit is contained in:
@@ -149,5 +149,46 @@ namespace BLL
|
|||||||
{
|
{
|
||||||
return (from x in Funs.DB.EduTrain_TrainRecord where x.TrainStartDate < time && x.ProjectId == projectId select x).Count();
|
return (from x in Funs.DB.EduTrain_TrainRecord where x.TrainStartDate < time && x.ProjectId == projectId select x).Count();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取培训结果
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="WorkStage"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static string ConvertTrainResult(object sitepersonId)
|
||||||
|
{
|
||||||
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
string result = string.Empty;
|
||||||
|
var getSiteperson = SitePerson_PersonService.GetSitePersonById(sitepersonId.ToString());
|
||||||
|
if (getSiteperson != null)
|
||||||
|
{
|
||||||
|
List<Model.Base_TrainType> trainTypeList = BLL.TrainTypeService.GetIsAboutSendCardTrainTypeList();
|
||||||
|
int i = 0; //培训合格次数
|
||||||
|
foreach (var item in trainTypeList)
|
||||||
|
{
|
||||||
|
var q = (from x in db.EduTrain_TrainRecord
|
||||||
|
join y in db.EduTrain_TrainRecordDetail
|
||||||
|
on x.TrainingId equals y.TrainingId
|
||||||
|
where x.TrainTypeId == item.TrainTypeId && y.PersonId == getSiteperson.PersonId
|
||||||
|
&& x.ProjectId == getSiteperson.ProjectId
|
||||||
|
&& y.CheckResult == true
|
||||||
|
select y);
|
||||||
|
i += q.Count();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i >= trainTypeList.Count)
|
||||||
|
{
|
||||||
|
result = "通过";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result = "未通过";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3365,6 +3365,7 @@
|
|||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="PHTGL\BiddingManagement\BidDocumentsReviewDetail.aspx.cs">
|
<Compile Include="PHTGL\BiddingManagement\BidDocumentsReviewDetail.aspx.cs">
|
||||||
<DependentUpon>BidDocumentsReviewDetail.aspx</DependentUpon>
|
<DependentUpon>BidDocumentsReviewDetail.aspx</DependentUpon>
|
||||||
|
<SubType>ASPXCodeBehind</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="PHTGL\BiddingManagement\BidDocumentsReviewDetail.aspx.designer.cs">
|
<Compile Include="PHTGL\BiddingManagement\BidDocumentsReviewDetail.aspx.designer.cs">
|
||||||
<DependentUpon>BidDocumentsReviewDetail.aspx</DependentUpon>
|
<DependentUpon>BidDocumentsReviewDetail.aspx</DependentUpon>
|
||||||
|
|||||||
@@ -76,7 +76,7 @@
|
|||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:TemplateField ColumnID="tflTrainResult" Width="100px" HeaderText="培训结果" HeaderTextAlign="Center" TextAlign="Left">
|
<f:TemplateField ColumnID="tflTrainResult" Width="100px" HeaderText="培训结果" HeaderTextAlign="Center" TextAlign="Left">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblTrainResult" runat="server" Text='<%# ConvertTrainResult(Eval("SitePersonId")) %>'></asp:Label>
|
<asp:Label ID="lblTrainResult" runat="server" Text='<%# BLL.EduTrain_TrainRecordService.ConvertTrainResult(Eval("SitePersonId")) %>'></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</f:TemplateField>
|
</f:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (ConvertTrainResult(person.PersonId) == "通过")
|
if (EduTrain_TrainRecordService.ConvertTrainResult(person.PersonId) == "通过")
|
||||||
{
|
{
|
||||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ReadWriteCard.aspx?PersonId={0}", this.SitePersonId, "发卡 - ")));
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ReadWriteCard.aspx?PersonId={0}", this.SitePersonId, "发卡 - ")));
|
||||||
}
|
}
|
||||||
@@ -225,49 +225,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 获取培训结果
|
|
||||||
/// <summary>
|
|
||||||
/// 获取培训结果
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="WorkStage"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
protected string ConvertTrainResult(object sitepersonId)
|
|
||||||
{
|
|
||||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
|
||||||
{
|
|
||||||
string result = string.Empty;
|
|
||||||
var getSiteperson = SitePerson_PersonService.GetSitePersonById(sitepersonId.ToString());
|
|
||||||
if (getSiteperson != null)
|
|
||||||
{
|
|
||||||
List<Model.Base_TrainType> trainTypeList = BLL.TrainTypeService.GetIsAboutSendCardTrainTypeList();
|
|
||||||
int i = 0; //培训合格次数
|
|
||||||
foreach (var item in trainTypeList)
|
|
||||||
{
|
|
||||||
var q = (from x in db.EduTrain_TrainRecord
|
|
||||||
join y in db.EduTrain_TrainRecordDetail
|
|
||||||
on x.TrainingId equals y.TrainingId
|
|
||||||
where x.TrainTypeId == item.TrainTypeId && y.PersonId == getSiteperson.PersonId
|
|
||||||
&& x.ProjectId == getSiteperson.ProjectId
|
|
||||||
&& y.CheckResult == true
|
|
||||||
select y);
|
|
||||||
i += q.Count();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (i >= trainTypeList.Count)
|
|
||||||
{
|
|
||||||
result = "通过";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
result = "未通过";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region 导出按钮
|
#region 导出按钮
|
||||||
/// 导出按钮
|
/// 导出按钮
|
||||||
|
|||||||
Reference in New Issue
Block a user