修改试车
This commit is contained in:
@@ -56,14 +56,19 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun
|
||||
public void PageInit()
|
||||
{
|
||||
//获取用户信息
|
||||
var users = from user in Funs.DB.Sys_User
|
||||
join projectrole in Funs.DB.Project_ProjectUser on user.UserId equals projectrole.UserId
|
||||
where projectrole.ProjectId == this.CurrUser.LoginProjectId
|
||||
select user;
|
||||
//检查人和审核人
|
||||
var userList = from user in Funs.DB.Sys_User
|
||||
join projectrole in Funs.DB.Project_ProjectUser on user.UserId equals projectrole.UserId
|
||||
where projectrole.ProjectId == this.CurrUser.LoginProjectId
|
||||
select user;
|
||||
var userids = new List<string>() { Const.sysglyId, Const.hfnbdId, Const.sedinId };
|
||||
var addUserList = Funs.DB.Sys_User.Where(x => userids.Contains(x.UserId));
|
||||
var users = userList.ToList();
|
||||
if (addUserList.Count() > 0)
|
||||
{
|
||||
users.AddRange(addUserList);
|
||||
}
|
||||
if (users.Count() > 0)
|
||||
{
|
||||
//检查人
|
||||
ddlApproveUser.DataTextField = "UserName";
|
||||
ddlApproveUser.DataValueField = "UserId";
|
||||
ddlApproveUser.DataSource = users;
|
||||
@@ -84,7 +89,7 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun
|
||||
tail.TailTermCode,
|
||||
unit.UnitName,
|
||||
TermItemName = termitem.WorkInspectName,
|
||||
tail.QuestionTechnologyId,
|
||||
tail.SubInspectId,
|
||||
tail.QuestionDesc,
|
||||
tail.RectifyOpinion,
|
||||
tail.RectifyTime,
|
||||
@@ -107,18 +112,18 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun
|
||||
//管道/设备
|
||||
if (model.ProblemType == 1)
|
||||
{
|
||||
var piping = Funs.DB.PreRun_PropertySysPiping.FirstOrDefault(x => x.PropertyId == model.QuestionTechnologyId);
|
||||
var piping = Funs.DB.PreRun_PropertySysPiping.FirstOrDefault(x => x.PropertyId == model.SubInspectId);
|
||||
if (piping != null)
|
||||
{
|
||||
lblQuestionTechnologyId.Text = $"管道:{piping.PipingCode}";
|
||||
lblSubInspectId.Text = $"管道:{piping.PipingCode}";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var piping = Funs.DB.PreRun_TechnologySysPiping.FirstOrDefault(x => x.TechnologyId == model.QuestionTechnologyId);
|
||||
var piping = Funs.DB.PreRun_TechnologySysPiping.FirstOrDefault(x => x.TechnologyId == model.SubInspectId);
|
||||
if (piping != null)
|
||||
{
|
||||
lblQuestionTechnologyId.Text = $"设备:{piping.TagNumber}";
|
||||
lblSubInspectId.Text = $"设备:{piping.TagNumber}";
|
||||
}
|
||||
}
|
||||
//检查项
|
||||
@@ -190,6 +195,18 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun
|
||||
if (termItemModel != null)
|
||||
{
|
||||
termItemModel.InspectionResults = 1;
|
||||
var subModel = Funs.DB.PreRun_SubInspectTerm.FirstOrDefault(x => x.SubInspectId == termItemModel.SubInspectId);
|
||||
if (subModel != null)
|
||||
{
|
||||
if (Funs.DB.PreRun_SubInspectTermItem.Count(x => x.SubInspectId == termItemModel.SubInspectId && x.InspectionResults.GetValueOrDefault() != 1 && x.TermItemId != termItemModel.TermItemId) == 0)
|
||||
{
|
||||
subModel.InspectionIsAllPass = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
subModel.InspectionIsAllPass = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
tailTerm.ApproveState = 3;
|
||||
var model = new PreRun_InspectTermApproveRecords();
|
||||
|
||||
Reference in New Issue
Block a user