检查关联培训

This commit is contained in:
2026-11-19 16:31:11 +08:00
parent 461bca785b
commit 8490311e94
22 changed files with 442 additions and 132 deletions
@@ -58,7 +58,7 @@ namespace FineUIPro.Web.Check.QMS
{
this.drpUnit.SelectedValue = model.UnitId;
this.drpRectificationUser.Items.Clear();
BLL.UserService.InitUserUnitIdDropDownList(this.drpRectificationUser, model.UnitId, true);
//BLL.UserService.InitUserUnitIdDropDownList(this.drpRectificationUser, model.UnitId, true);
this.drpPMUser.Items.Clear();
BLL.UserService.InitUserUnitIdDropDownList(this.drpPMUser, model.UnitId, true);
this.drpQCUser.Items.Clear();
@@ -75,7 +75,7 @@ namespace FineUIPro.Web.Check.QMS
var pro = BLL.ProjectService.GetProjectByProjectId(model.ProjectId);
this.txtAddress.Text = pro.ProjectAddress;
this.drpRectificationUser.Items.Clear();
BLL.UserService.InitUserDropDownList(this.drpRectificationUser, model.ProjectId, true);
//BLL.UserService.InitUserDropDownList(this.drpRectificationUser, model.ProjectId, true);
this.drpPMUser.Items.Clear();
BLL.UserService.InitUserDropDownList(this.drpPMUser, model.ProjectId, true);
this.drpQCUser.Items.Clear();
@@ -85,6 +85,8 @@ namespace FineUIPro.Web.Check.QMS
{
this.drpProject.Text = model.ProjectName;
}
PersonService.InitPersonByProjectUnitDropDownList(this.drpRectificationUser, model.ProjectId, model.UnitId, true);
this.drpClassify.SelectedValue = model.ClassifyId;
BLL.QualityProblemClassifyItemService.InitClassifyItemDownList(this.drpClassifyItem, model.ClassifyId, true);
if (!string.IsNullOrWhiteSpace(model.ClassifyItemId))
@@ -174,7 +176,8 @@ namespace FineUIPro.Web.Check.QMS
BLL.ProjectService.InitProjectDropDownList(this.drpProject, this.drpUnit.SelectedValue, true);
this.drpRectificationUser.Items.Clear();
BLL.UserService.InitUserUnitIdDropDownList(this.drpRectificationUser, this.drpUnit.SelectedValue, true);
//BLL.UserService.InitUserUnitIdDropDownList(this.drpRectificationUser, this.drpUnit.SelectedValue, true);
PersonService.InitPersonByProjectUnitDropDownList(this.drpRectificationUser, null, this.drpUnit.SelectedValue, true);
this.drpPMUser.Items.Clear();
BLL.UserService.InitUserUnitIdDropDownList(this.drpPMUser, this.drpUnit.SelectedValue, true);
this.drpQCUser.Items.Clear();
@@ -196,7 +199,8 @@ namespace FineUIPro.Web.Check.QMS
{
this.txtAddress.Text = pro.ProjectAddress;
this.drpRectificationUser.Items.Clear();
BLL.UserService.InitUserDropDownList(this.drpRectificationUser, proId, true);
//BLL.UserService.InitUserDropDownList(this.drpRectificationUser, proId, true);
PersonService.InitPersonByProjectUnitDropDownList(this.drpRectificationUser, proId, this.drpUnit.SelectedValue, true);
this.drpPMUser.Items.Clear();
BLL.UserService.InitUserDropDownList(this.drpPMUser, proId, true);
this.drpQCUser.Items.Clear();
@@ -109,6 +109,11 @@ namespace FineUIPro.Web.Check.QMS
/// </summary>
public static List<Sys_User> users = new List<Sys_User>();
/// <summary>
/// 项目人员
/// </summary>
public static List<SitePerson_Person> persons = new List<SitePerson_Person>();
#endregion
protected void Page_Load(object sender, EventArgs e)
@@ -118,6 +123,8 @@ namespace FineUIPro.Web.Check.QMS
//users = BLL.ProjectUserService.GetProjectUserByProjectId(this.ProjectId,null,null);
//获取所有在岗用户
users = BLL.UserService.GetProjectUserListByProjectId(null);
//获取所有项目人员
persons = BLL.PersonService.GetPersonLitsByProjectIdUnitId(null, null);
classifys = QualityProblemClassifyService.GetClassify();
classifyItems = QualityProblemClassifyItemService.GetClassifyItemList("");
@@ -465,10 +472,12 @@ namespace FineUIPro.Web.Check.QMS
}
if (!string.IsNullOrEmpty(rData9))
{
var user = users.Where(x => x.UserName == rData9).FirstOrDefault();
var user = persons.Where(x => (x.ProjectId == ProjectId || ProjectId == null) && x.PersonName == rData9).FirstOrDefault();
//var user = users.Where(x => x.UserName == rData9).FirstOrDefault();
if (user != null)
{
RectificationUserId = user.UserId;
RectificationUserId = user.PersonName;
//RectificationUserId = user.UserId;
RectificationUserName = rData9;
}
else