20240227本部检查优化
This commit is contained in:
@@ -63,9 +63,9 @@ namespace FineUIPro.Web.OfficeCheck.Check
|
||||
this.txtValues3.Text = checkReport.BasicInfo;
|
||||
//this.txtValues4.Text = checkReport.ConformItem;
|
||||
this.txtValues6.Text = checkReport.Opinion;
|
||||
this.txtValues7.Text = checkReport.CheckResult;
|
||||
this.BindGrid2();
|
||||
this.txtValues7.Text = checkReport.CheckResult;
|
||||
}
|
||||
this.BindGrid2();
|
||||
this.BindGrid();
|
||||
}
|
||||
checkReportItems.Clear();
|
||||
@@ -79,20 +79,12 @@ namespace FineUIPro.Web.OfficeCheck.Check
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"select checkTeam.CheckTeamId,
|
||||
checkTeam.CheckNoticeId,
|
||||
checkTeam.UserId,
|
||||
checkTeam.SortIndex,
|
||||
checkTeam.PostName,
|
||||
checkTeam.WorkTitle,
|
||||
checkTeam.CheckPostName,
|
||||
checkTeam.CheckDate,
|
||||
checkTeam.UserName,
|
||||
checkTeam.UnitId,
|
||||
checkTeam.SexName,
|
||||
unit.UnitName"
|
||||
+ @" from ProjectSupervision_CheckTeam as checkTeam "
|
||||
+ @" left join Base_Unit as unit on unit.UnitId = checkTeam.UnitId where 1=1 ";
|
||||
string strSql = @"select checkTeam.CheckTeamId, checkTeam.CheckNoticeId, checkTeam.UserId, checkTeam.SortIndex, checkTeam.PostName, checkTeam.WorkTitle,
|
||||
checkTeam.CheckPostName, checkTeam.CheckDate, checkTeam.UserName, checkTeam.UnitId, checkTeam.SexName,unit.UnitName,Depart.DepartName
|
||||
from ProjectSupervision_CheckTeam as checkTeam
|
||||
left join Base_Unit as unit on unit.UnitId = checkTeam.UnitId
|
||||
LEFT JOIN Base_Depart AS Depart ON CheckTeam.DepartId = Depart.DepartId where 1=1 ";
|
||||
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
strSql += " AND checkTeam.CheckNoticeId = @CheckNoticeId";
|
||||
listStr.Add(new SqlParameter("@CheckNoticeId", this.CheckNoticeId));
|
||||
@@ -125,10 +117,24 @@ namespace FineUIPro.Web.OfficeCheck.Check
|
||||
/// </summary>
|
||||
private void BindGrid2()
|
||||
{
|
||||
string strSql = @"select CheckReportItemId, CheckReportId, CheckReportCode, UnConformItem from ProjectSupervision_CheckReportItem ";
|
||||
string strSql = string.Empty;
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
strSql += "where CheckReportId = @CheckReportId";
|
||||
listStr.Add(new SqlParameter("@CheckReportId", this.hdCheckReportId.Text));
|
||||
if (Funs.DB.ProjectSupervision_CheckReportItem.FirstOrDefault(x => x.CheckReportId == this.hdCheckReportId.Text) != null)
|
||||
{
|
||||
strSql = @"select CheckReportItemId, CheckReportCode, UnConformItem from ProjectSupervision_CheckReportItem
|
||||
where CheckReportId = @CheckReportId";
|
||||
listStr.Add(new SqlParameter("@CheckReportId", this.hdCheckReportId.Text));
|
||||
}
|
||||
else
|
||||
{
|
||||
strSql = @"select NEWID() AS CheckReportItemId,ROW_NUMBER() over(order by SortIndex) AS CheckReportCode,
|
||||
('检查项目:'+CheckItem+',检查标准:'+CheckStandard+',检查结果:'+CheckStandard) AS UnConformItem
|
||||
from ProjectSupervision_Check1
|
||||
where IsSelect=1 and DeletScore >0
|
||||
and CheckNoticeId =@CheckNoticeId";
|
||||
listStr.Add(new SqlParameter("@CheckNoticeId", this.CheckNoticeId));
|
||||
}
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
var table = this.GetPagedDataTable(Grid2, tb);
|
||||
@@ -173,7 +179,7 @@ namespace FineUIPro.Web.OfficeCheck.Check
|
||||
else
|
||||
{
|
||||
newCheckReport.CheckNoticeId = this.CheckNoticeId;
|
||||
newCheckReport.CheckReportId = SQLHelper.GetNewID(typeof(Model.ProjectSupervision_CheckReport));
|
||||
newCheckReport.CheckReportId = SQLHelper.GetNewID();
|
||||
BLL.CheckReportService.AddCheckReport(newCheckReport);
|
||||
this.hdCheckReportId.Text = newCheckReport.CheckReportId;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user