施工月报新 增加3、4、5、6节点内容
This commit is contained in:
@@ -98,6 +98,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 加载文本框内容
|
||||
var txtReportList = Funs.DB.Report_TextBoxContent.Where(x => x.ReportId == ReportId).ToList();
|
||||
txtAre0.Text = txtReportList.FirstOrDefault(x => x.ContentType == "0").ContentText;
|
||||
@@ -108,7 +109,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||
txtAre21.Text = txtReportList.FirstOrDefault(x => x.ContentType == "21").ContentText;
|
||||
txtAre22.Text = txtReportList.FirstOrDefault(x => x.ContentType == "22").ContentText;
|
||||
#endregion
|
||||
|
||||
//加载所有grid
|
||||
lodAllGrid("1");
|
||||
|
||||
}
|
||||
else
|
||||
@@ -118,10 +120,37 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||
//给个新的主键
|
||||
ReportId = Guid.NewGuid().ToString();
|
||||
AddOrUpdate = "add";
|
||||
|
||||
//加载所有grid
|
||||
lodAllGrid("0");
|
||||
}
|
||||
hidReportId.Value = ReportId;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加载grid
|
||||
/// </summary>
|
||||
/// <param name="objType"></param>
|
||||
void lodAllGrid(string objType) {
|
||||
//加载一般施工方案审批情况
|
||||
loadGeneralPlanApproval(objType);
|
||||
|
||||
//加载危大工程方案审批情况
|
||||
loadMajorPlanApproval(objType);
|
||||
|
||||
//质量控制点或检验试验计划(ITP)情况
|
||||
loadInspectionTestPlan(objType);
|
||||
|
||||
//加载设计交底管理情况
|
||||
loadDesignDetailsApprove(objType);
|
||||
|
||||
//加载图纸会审管理情况
|
||||
loadReviewDrawings(objType);
|
||||
|
||||
//加载设计变更管理情况
|
||||
loadDesignChangeOrder();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 时间选择事件
|
||||
@@ -142,6 +171,24 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||
Response.Redirect(url + "?startdate=" + txtStartDate.Text + "&enddate=" + txtEndDate.Text);
|
||||
}
|
||||
}
|
||||
|
||||
protected void TextBox_TextChanged(object sender, EventArgs e) {
|
||||
if (!string.IsNullOrEmpty(this.txtStartDate.Text.Trim())&& !string.IsNullOrEmpty(this.txtEndDate.Text.Trim())) {
|
||||
|
||||
if (Funs.GetNewDateTime(this.txtStartDate.Text.Trim()) > Funs.GetNewDateTime(this.txtEndDate.Text.Trim()))
|
||||
{
|
||||
Alert.ShowInTop("开始时间不能大于结束时间!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (AddOrUpdate == "update")
|
||||
{
|
||||
lodAllGrid("1");
|
||||
}
|
||||
else {
|
||||
lodAllGrid("0");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 本月质量目标管理情况 Grid1方法
|
||||
@@ -188,6 +235,490 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 3.1一般施工方案审批情况 Grid2方法
|
||||
/// <summary>
|
||||
/// 加载一般施工审批情况
|
||||
/// </summary>
|
||||
void loadGeneralPlanApproval(string objType)
|
||||
{
|
||||
var db = Funs.DB;
|
||||
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
||||
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
||||
var list = new List<Model.Report_Construction_Plan>();
|
||||
int i = 1;
|
||||
|
||||
int Quantity1Sum = 0;
|
||||
int Quantity2Sum = 0;
|
||||
//加载所有单位
|
||||
var units = from x in Funs.DB.Project_ProjectUnit
|
||||
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && (x.UnitType == BLL.Const.ProjectUnitType_2|| x.UnitType == BLL.Const.ProjectUnitType_1)
|
||||
orderby y.UnitCode
|
||||
select new { x.UnitId, y.UnitName };
|
||||
foreach (var item in units)
|
||||
{
|
||||
|
||||
var query = from c in db.Comprehensive_GeneralPlanApproval
|
||||
|
||||
join u in db.Base_Unit on c.UnitId equals u.UnitId into unitJoin
|
||||
|
||||
from u in unitJoin.DefaultIfEmpty()
|
||||
|
||||
where c.ProjectId == this.CurrUser.LoginProjectId && c.UnitId == item.UnitId
|
||||
select new
|
||||
|
||||
{
|
||||
c.ApprovalDate,
|
||||
c.ProjectId,
|
||||
u.UnitId,
|
||||
u.UnitName,
|
||||
c.CompileDate
|
||||
};
|
||||
|
||||
var AllList = query.ToList();
|
||||
var monethCount = query
|
||||
.Where(x => (x.ApprovalDate >= Convert.ToDateTime(startDate) && x.ApprovalDate <= Convert.ToDateTime(endDate)));
|
||||
|
||||
Model.Report_Construction_Plan model = new Model.Report_Construction_Plan();
|
||||
|
||||
model.Id = Guid.NewGuid().ToString();
|
||||
model.UnitOrMajor = item.UnitName;
|
||||
model.Quantity1 = monethCount.Count();
|
||||
model.Quantity2 = AllList.Count();
|
||||
model.ReportId = ReportId;
|
||||
//如果是修改,查询表中数据
|
||||
if (objType=="1")
|
||||
{
|
||||
var NewModel = db.Report_Construction_Plan.FirstOrDefault(x => x.ReportId == ReportId && x.UnitOrMajor == item.UnitName && x.ReType == "0");
|
||||
if (NewModel!=null)
|
||||
{
|
||||
model.Remarks = NewModel.Remarks;
|
||||
}
|
||||
}
|
||||
list.Add(model);
|
||||
|
||||
Quantity1Sum+= monethCount.Count();
|
||||
Quantity2Sum += AllList.Count();
|
||||
i++;
|
||||
}
|
||||
Grid2.DataSource = list;
|
||||
Grid2.DataBind();
|
||||
|
||||
//合计
|
||||
JObject summary = new JObject();
|
||||
summary.Add("UnitOrMajor", "合计");
|
||||
summary.Add("Quantity1", Quantity1Sum.ToString());
|
||||
summary.Add("Quantity2", Quantity2Sum.ToString());
|
||||
|
||||
Grid2.SummaryData = summary;
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region 3.2 危大工程方案审批情况 Grid3方法
|
||||
/// <summary>
|
||||
/// 加载一般施工审批情况
|
||||
/// </summary>
|
||||
void loadMajorPlanApproval(string objType)
|
||||
{
|
||||
var db = Funs.DB;
|
||||
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
||||
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
||||
var list = new List<Model.Report_Construction_Plan>();
|
||||
int i = 1;
|
||||
|
||||
int Quantity1Sum = 0;
|
||||
int Quantity2Sum = 0;
|
||||
int Quantity3Sum = 0;
|
||||
//加载所有单位
|
||||
var units = from x in Funs.DB.Project_ProjectUnit
|
||||
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && (x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1)
|
||||
orderby y.UnitCode
|
||||
select new { x.UnitId, y.UnitName };
|
||||
foreach (var item in units)
|
||||
{
|
||||
|
||||
var query = from c in db.Comprehensive_MajorPlanApproval
|
||||
|
||||
join u in db.Base_Unit on c.UnitId equals u.UnitId into unitJoin
|
||||
|
||||
from u in unitJoin.DefaultIfEmpty()
|
||||
|
||||
where c.ProjectId == this.CurrUser.LoginProjectId && c.UnitId == item.UnitId
|
||||
select new
|
||||
|
||||
{
|
||||
c.ApprovalDate,
|
||||
c.ProjectId,
|
||||
u.UnitId,
|
||||
u.UnitName,
|
||||
c.ExpertReviewMan,
|
||||
c.CompileDate
|
||||
};
|
||||
|
||||
var AllList = query.ToList();
|
||||
var monethCount = query
|
||||
.Where(x => (x.ApprovalDate >= Convert.ToDateTime(startDate) && x.ApprovalDate <= Convert.ToDateTime(endDate)));
|
||||
|
||||
Model.Report_Construction_Plan model = new Model.Report_Construction_Plan();
|
||||
|
||||
model.Id = Guid.NewGuid().ToString();
|
||||
model.UnitOrMajor = item.UnitName;
|
||||
model.Quantity1 = monethCount.Count();
|
||||
model.Quantity2 = AllList.Count();
|
||||
model.Quantity3 = AllList.Where(x => x.ExpertReviewMan != "").ToList().Count();
|
||||
model.ReportId = ReportId;
|
||||
//如果是修改,查询表中数据
|
||||
if (objType == "1")
|
||||
{
|
||||
var NewModel = db.Report_Construction_Plan.FirstOrDefault(x => x.ReportId == ReportId && x.UnitOrMajor == item.UnitName && x.ReType == "1");
|
||||
if (NewModel != null)
|
||||
{
|
||||
model.Remarks = NewModel.Remarks;
|
||||
}
|
||||
}
|
||||
list.Add(model);
|
||||
|
||||
Quantity1Sum += monethCount.Count();
|
||||
Quantity2Sum += AllList.Count();
|
||||
Quantity3Sum += Convert.ToInt32(model.Quantity3);
|
||||
i++;
|
||||
}
|
||||
Grid3.DataSource = list;
|
||||
Grid3.DataBind();
|
||||
|
||||
//合计
|
||||
JObject summary = new JObject();
|
||||
summary.Add("UnitOrMajor", "合计");
|
||||
summary.Add("Quantity1", Quantity1Sum.ToString());
|
||||
summary.Add("Quantity2", Quantity2Sum.ToString());
|
||||
summary.Add("Quantity3", Quantity3Sum.ToString());
|
||||
Grid3.SummaryData = summary;
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region 3.3 质量控制点或检验试验计划(ITP)情况 Grid4方法
|
||||
/// <summary>
|
||||
/// 加载一般施工审批情况
|
||||
/// </summary>
|
||||
void loadInspectionTestPlan(string objType)
|
||||
{
|
||||
var db = Funs.DB;
|
||||
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
||||
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
||||
var list = new List<Model.Report_Construction_Plan>();
|
||||
int i = 1;
|
||||
|
||||
int Quantity1Sum = 0;
|
||||
int Quantity2Sum = 0;
|
||||
//加载所有专业
|
||||
var CNProfessionals = from x in Funs.DB.Base_CNProfessional
|
||||
where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId
|
||||
orderby x.SortIndex
|
||||
select new
|
||||
{
|
||||
x.CNProfessionalId,
|
||||
x.ProfessionalName
|
||||
};
|
||||
|
||||
|
||||
foreach (var item in CNProfessionals)
|
||||
{
|
||||
|
||||
var query = from c in db.Inspection_Test_Plan
|
||||
|
||||
join u in db.Base_Unit on c.UnitId equals u.UnitId into unitJoin
|
||||
|
||||
from u in unitJoin.DefaultIfEmpty()
|
||||
|
||||
where c.ProjectId == this.CurrUser.LoginProjectId && c.CNProfessionalId == item.CNProfessionalId
|
||||
select new
|
||||
|
||||
{
|
||||
c.ApprovalDate,
|
||||
c.ProjectId,
|
||||
u.UnitId,
|
||||
u.UnitName,
|
||||
c.CreateDate
|
||||
};
|
||||
|
||||
var AllList = query.ToList();
|
||||
var monethCount = query
|
||||
.Where(x => (x.CreateDate >= Convert.ToDateTime(startDate) && x.CreateDate <= Convert.ToDateTime(endDate)));
|
||||
|
||||
Model.Report_Construction_Plan model = new Model.Report_Construction_Plan();
|
||||
|
||||
model.Id = Guid.NewGuid().ToString();
|
||||
model.UnitOrMajor = item.ProfessionalName;
|
||||
model.Quantity1 = monethCount.Count();
|
||||
model.Quantity2 = AllList.Count();
|
||||
|
||||
model.ReportId = ReportId;
|
||||
//如果是修改,查询表中数据
|
||||
if (objType == "1")
|
||||
{
|
||||
var NewModel = db.Report_Construction_Plan.FirstOrDefault(x => x.ReportId == ReportId && x.UnitOrMajor == item.ProfessionalName && x.ReType == "2");
|
||||
if (NewModel != null)
|
||||
{
|
||||
model.Remarks = NewModel.Remarks;
|
||||
}
|
||||
}
|
||||
list.Add(model);
|
||||
|
||||
Quantity1Sum += monethCount.Count();
|
||||
Quantity2Sum += AllList.Count();
|
||||
|
||||
i++;
|
||||
}
|
||||
Grid4.DataSource = list;
|
||||
Grid4.DataBind();
|
||||
|
||||
//合计
|
||||
JObject summary = new JObject();
|
||||
summary.Add("UnitOrMajor", "合计");
|
||||
summary.Add("Quantity1", Quantity1Sum.ToString());
|
||||
summary.Add("Quantity2", Quantity2Sum.ToString());
|
||||
Grid4.SummaryData = summary;
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region 4 设计交底管理情况 Grid5方法
|
||||
/// <summary>
|
||||
/// 加载一般施工审批情况
|
||||
/// </summary>
|
||||
void loadDesignDetailsApprove(string objType)
|
||||
{
|
||||
var db = Funs.DB;
|
||||
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
||||
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
||||
var list = new List<Model.Report_Construction_Plan>();
|
||||
int i = 1;
|
||||
|
||||
int Quantity1Sum = 0;
|
||||
int Quantity2Sum = 0;
|
||||
//加载所有专业
|
||||
var CNProfessionals = from x in Funs.DB.Base_CNProfessional
|
||||
where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId
|
||||
orderby x.SortIndex
|
||||
select new
|
||||
{
|
||||
x.CNProfessionalId,
|
||||
x.ProfessionalName
|
||||
};
|
||||
|
||||
|
||||
foreach (var item in CNProfessionals)
|
||||
{
|
||||
|
||||
var query = from c in db.Comprehensive_DesignDetails
|
||||
|
||||
where c.ProjectId == this.CurrUser.LoginProjectId && c.CNProfessionalId == item.CNProfessionalId
|
||||
&& c.Status=="3"
|
||||
select new
|
||||
|
||||
{
|
||||
c.Status,
|
||||
c.CompileDate,
|
||||
c.ProjectId,
|
||||
|
||||
};
|
||||
|
||||
var AllList = query.ToList();
|
||||
var monethCount = query
|
||||
.Where(x => (x.CompileDate >= Convert.ToDateTime(startDate) && x.CompileDate <= Convert.ToDateTime(endDate)));
|
||||
|
||||
Model.Report_Construction_Plan model = new Model.Report_Construction_Plan();
|
||||
|
||||
model.Id = Guid.NewGuid().ToString();
|
||||
model.UnitOrMajor = item.ProfessionalName;
|
||||
model.Quantity1 = monethCount.Count();
|
||||
model.Quantity2 = AllList.Count();
|
||||
|
||||
model.ReportId = ReportId;
|
||||
//如果是修改,查询表中数据
|
||||
if (objType == "1")
|
||||
{
|
||||
var NewModel = db.Report_Construction_Plan.FirstOrDefault(x => x.ReportId == ReportId && x.UnitOrMajor == item.ProfessionalName && x.ReType == "3");
|
||||
if (NewModel != null)
|
||||
{
|
||||
model.Remarks = NewModel.Remarks;
|
||||
}
|
||||
}
|
||||
list.Add(model);
|
||||
|
||||
Quantity1Sum += monethCount.Count();
|
||||
Quantity2Sum += AllList.Count();
|
||||
|
||||
i++;
|
||||
}
|
||||
Grid5.DataSource = list;
|
||||
Grid5.DataBind();
|
||||
|
||||
//合计
|
||||
JObject summary = new JObject();
|
||||
summary.Add("UnitOrMajor", "合计");
|
||||
summary.Add("Quantity1", Quantity1Sum.ToString());
|
||||
summary.Add("Quantity2", Quantity2Sum.ToString());
|
||||
Grid5.SummaryData = summary;
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region 5 图纸会审管理情况 Grid6方法
|
||||
/// <summary>
|
||||
/// 加载一图纸会审管理情况
|
||||
/// </summary>
|
||||
void loadReviewDrawings(string objType)
|
||||
{
|
||||
var db = Funs.DB;
|
||||
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
||||
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
||||
var list = new List<Model.Report_Construction_Plan>();
|
||||
int i = 1;
|
||||
|
||||
int Quantity1Sum = 0;
|
||||
int Quantity2Sum = 0;
|
||||
//加载所有专业
|
||||
var CNProfessionals = from x in Funs.DB.Base_CNProfessional
|
||||
where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId
|
||||
orderby x.SortIndex
|
||||
select new
|
||||
{
|
||||
x.CNProfessionalId,
|
||||
x.ProfessionalName
|
||||
};
|
||||
|
||||
|
||||
foreach (var item in CNProfessionals)
|
||||
{
|
||||
|
||||
var query = from c in db.Comprehensive_ReviewDrawings
|
||||
|
||||
where c.ProjectId == this.CurrUser.LoginProjectId && c.CNProfessionalId == item.CNProfessionalId
|
||||
&& c.Status == "3"
|
||||
select new
|
||||
|
||||
{
|
||||
c.Status,
|
||||
c.ReviewDate,
|
||||
c.ProjectId,
|
||||
|
||||
};
|
||||
|
||||
var AllList = query.ToList();
|
||||
var monethCount = query
|
||||
.Where(x => (x.ReviewDate >= Convert.ToDateTime(startDate) && x.ReviewDate <= Convert.ToDateTime(endDate)));
|
||||
|
||||
Model.Report_Construction_Plan model = new Model.Report_Construction_Plan();
|
||||
|
||||
model.Id = Guid.NewGuid().ToString();
|
||||
model.UnitOrMajor = item.ProfessionalName;
|
||||
model.Quantity1 = monethCount.Count();
|
||||
model.Quantity2 = AllList.Count();
|
||||
|
||||
model.ReportId = ReportId;
|
||||
//如果是修改,查询表中数据
|
||||
if (objType == "1")
|
||||
{
|
||||
var NewModel = db.Report_Construction_Plan.FirstOrDefault(x => x.ReportId == ReportId && x.UnitOrMajor == item.ProfessionalName && x.ReType == "4");
|
||||
if (NewModel != null)
|
||||
{
|
||||
model.Remarks = NewModel.Remarks;
|
||||
}
|
||||
}
|
||||
list.Add(model);
|
||||
|
||||
Quantity1Sum += monethCount.Count();
|
||||
Quantity2Sum += AllList.Count();
|
||||
|
||||
i++;
|
||||
}
|
||||
Grid6.DataSource = list;
|
||||
Grid6.DataBind();
|
||||
|
||||
//合计
|
||||
JObject summary = new JObject();
|
||||
summary.Add("UnitOrMajor", "合计");
|
||||
summary.Add("Quantity1", Quantity1Sum.ToString());
|
||||
summary.Add("Quantity2", Quantity2Sum.ToString());
|
||||
Grid6.SummaryData = summary;
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region 6 设计变更管理情况 Grid7方法
|
||||
/// <summary>
|
||||
/// 加载设计变更管理情况
|
||||
/// </summary>
|
||||
void loadDesignChangeOrder()
|
||||
{
|
||||
int Quantity1Sum=0, Quantity2Sum=0, Quantity3Sum=0, Quantity4Sum=0, Quantity5Sum=0, Quantity6Sum = 0;
|
||||
|
||||
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
||||
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
||||
DateTime projectStartDate = Convert.ToDateTime("2015-01-01");
|
||||
List<Model.CheckStatisc> StatisticsList = new List<Model.CheckStatisc>();
|
||||
Model.Base_Project project = BLL.ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId);
|
||||
if (project != null)
|
||||
{
|
||||
if (project.StartDate != null)
|
||||
{
|
||||
projectStartDate = Convert.ToDateTime(project.StartDate);
|
||||
}
|
||||
}
|
||||
int i = 1;
|
||||
var cNProfessionals = from x in Funs.DB.Base_CNProfessional orderby x.SortIndex select x;
|
||||
foreach (var item in cNProfessionals)
|
||||
{
|
||||
//专业下所有集合
|
||||
List<Model.Comprehensive_DesignChangeOrder> totalManagementList = BLL.DesignChangeOrderService.GetDesignChangeOrderListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, item.CNProfessionalId, projectStartDate, DateTime.Now);
|
||||
//专业下当期集合
|
||||
List<Model.Comprehensive_DesignChangeOrder> managementList = BLL.DesignChangeOrderService.GetDesignChangeOrderListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, item.CNProfessionalId, startDate, endDate);
|
||||
Model.CheckStatisc checkStatisc = new Model.CheckStatisc();
|
||||
checkStatisc.Num = i;
|
||||
checkStatisc.WorkName = item.ProfessionalName;
|
||||
checkStatisc.CheckNum = managementList.Count();
|
||||
checkStatisc.TotalCheckNum = totalManagementList.Count();
|
||||
checkStatisc.OKNum = managementList.Count(x => x.ApprovalDate != null);
|
||||
checkStatisc.TotalOKNum = totalManagementList.Count(x => x.ApprovalDate != null);
|
||||
checkStatisc.OneOKRate = managementList.Count(x => x.Status == "3").ToString(); //当期完成数
|
||||
checkStatisc.TotalOneOKRate = totalManagementList.Count(x => x.Status == "3").ToString(); //累计完成数
|
||||
|
||||
StatisticsList.Add(checkStatisc);
|
||||
Quantity1Sum += checkStatisc.CheckNum;
|
||||
Quantity2Sum += checkStatisc.TotalCheckNum;
|
||||
Quantity3Sum+= checkStatisc.OKNum;
|
||||
Quantity4Sum += checkStatisc.TotalOKNum;
|
||||
Quantity5Sum += Convert.ToInt32(checkStatisc.OneOKRate);
|
||||
Quantity6Sum += Convert.ToInt32(checkStatisc.TotalOneOKRate);
|
||||
}
|
||||
|
||||
Grid7.DataSource = StatisticsList;
|
||||
Grid7.DataBind();
|
||||
|
||||
//合计
|
||||
JObject summary = new JObject();
|
||||
summary.Add("WorkName", "合计");
|
||||
summary.Add("CheckNum", Quantity1Sum.ToString());
|
||||
summary.Add("TotalCheckNum", Quantity2Sum.ToString());
|
||||
summary.Add("OKNum", Quantity3Sum.ToString());
|
||||
summary.Add("TotalOKNum", Quantity4Sum.ToString());
|
||||
summary.Add("OneOKRate", Quantity5Sum.ToString());
|
||||
summary.Add("TotalOneOKRate", Quantity6Sum.ToString());
|
||||
Grid7.SummaryData = summary;
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region 保存
|
||||
/// <summary>
|
||||
/// 保存按钮
|
||||
@@ -228,12 +759,30 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||
|
||||
//所有文本框表
|
||||
TextBoxContentService.Delete(ReportId);
|
||||
|
||||
//删除施工方案及检验试验计划审批情况
|
||||
BLL.CQMS.ManageReport.ReportNew.ConstructionPlanService.Delete(ReportId);
|
||||
#endregion
|
||||
|
||||
#region 保存所有子表
|
||||
//保存本月质量目标管理情况
|
||||
saveTarget();
|
||||
|
||||
//保存3.1一般施工方案审批情况
|
||||
saveYbsgfa();
|
||||
|
||||
//保存3.2危大工程方案审批情况
|
||||
saveWdgcfa();
|
||||
|
||||
//保存3.2质量控制点或检验试验计划(ITP)情况
|
||||
saveJysyjh();
|
||||
|
||||
//保存4 设计交底管理情况
|
||||
saveSjjd();
|
||||
|
||||
//保存4图纸会审管理情况
|
||||
saveTzhs();
|
||||
|
||||
//保存文本框
|
||||
saveTxtContent();
|
||||
#endregion
|
||||
@@ -284,6 +833,172 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 3.1保存一般施工方案审批情况
|
||||
/// </summary>
|
||||
void saveYbsgfa() {
|
||||
List<Model.Report_Construction_Plan> detailLists = new List<Model.Report_Construction_Plan>();
|
||||
JArray teamGroupData = Grid2.GetMergedData();
|
||||
foreach (JObject teamGroupRow in teamGroupData)
|
||||
{
|
||||
JObject values = teamGroupRow.Value<JObject>("values");
|
||||
int rowIndex = teamGroupRow.Value<int>("index");
|
||||
Model.Report_Construction_Plan newDetail = new Model.Report_Construction_Plan
|
||||
{
|
||||
//Id = values.Value<string>("Id"),
|
||||
ReportId = ReportId,
|
||||
ReType = "0",
|
||||
UnitOrMajor = values.Value<string>("UnitOrMajor"),
|
||||
Quantity1 = values.Value<int>("Quantity1"),
|
||||
Quantity2 = values.Value<int>("Quantity2"),
|
||||
Remarks = values.Value<string>("Remarks")
|
||||
};
|
||||
if (Grid2.Rows[rowIndex].DataKeys.Length > 0)
|
||||
{
|
||||
newDetail.Id = Grid2.Rows[rowIndex].DataKeys[0].ToString();
|
||||
}
|
||||
detailLists.Add(newDetail);
|
||||
}
|
||||
if (detailLists.Count > 0)
|
||||
{
|
||||
Funs.DB.Report_Construction_Plan.InsertAllOnSubmit(detailLists);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 3.2保存危大工程方案审批情况
|
||||
/// </summary>
|
||||
void saveWdgcfa() {
|
||||
List<Model.Report_Construction_Plan> detailLists = new List<Model.Report_Construction_Plan>();
|
||||
JArray teamGroupData = Grid3.GetMergedData();
|
||||
foreach (JObject teamGroupRow in teamGroupData)
|
||||
{
|
||||
JObject values = teamGroupRow.Value<JObject>("values");
|
||||
int rowIndex = teamGroupRow.Value<int>("index");
|
||||
Model.Report_Construction_Plan newDetail = new Model.Report_Construction_Plan
|
||||
{
|
||||
//Id = values.Value<string>("Id"),
|
||||
ReportId = ReportId,
|
||||
ReType = "1",
|
||||
UnitOrMajor = values.Value<string>("UnitOrMajor"),
|
||||
Quantity1 = values.Value<int>("Quantity1"),
|
||||
Quantity2 = values.Value<int>("Quantity2"),
|
||||
Quantity3 = values.Value<int>("Quantity3"),
|
||||
Remarks = values.Value<string>("Remarks")
|
||||
};
|
||||
if (Grid3.Rows[rowIndex].DataKeys.Length > 0)
|
||||
{
|
||||
newDetail.Id = Grid3.Rows[rowIndex].DataKeys[0].ToString();
|
||||
}
|
||||
detailLists.Add(newDetail);
|
||||
}
|
||||
if (detailLists.Count > 0)
|
||||
{
|
||||
Funs.DB.Report_Construction_Plan.InsertAllOnSubmit(detailLists);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 3.3 质量控制点或检验试验计划(ITP)情况
|
||||
/// </summary>
|
||||
void saveJysyjh() {
|
||||
List<Model.Report_Construction_Plan> detailLists = new List<Model.Report_Construction_Plan>();
|
||||
JArray teamGroupData = Grid4.GetMergedData();
|
||||
foreach (JObject teamGroupRow in teamGroupData)
|
||||
{
|
||||
JObject values = teamGroupRow.Value<JObject>("values");
|
||||
int rowIndex = teamGroupRow.Value<int>("index");
|
||||
Model.Report_Construction_Plan newDetail = new Model.Report_Construction_Plan
|
||||
{
|
||||
//Id = values.Value<string>("Id"),
|
||||
ReportId = ReportId,
|
||||
ReType = "2",
|
||||
UnitOrMajor = values.Value<string>("UnitOrMajor"),
|
||||
Quantity1 = values.Value<int>("Quantity1"),
|
||||
Quantity2 = values.Value<int>("Quantity2"),
|
||||
Remarks = values.Value<string>("Remarks")
|
||||
};
|
||||
if (Grid4.Rows[rowIndex].DataKeys.Length > 0)
|
||||
{
|
||||
newDetail.Id = Grid4.Rows[rowIndex].DataKeys[0].ToString();
|
||||
}
|
||||
detailLists.Add(newDetail);
|
||||
}
|
||||
if (detailLists.Count > 0)
|
||||
{
|
||||
Funs.DB.Report_Construction_Plan.InsertAllOnSubmit(detailLists);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存设计交底管理情况
|
||||
/// </summary>
|
||||
void saveSjjd() {
|
||||
List<Model.Report_Construction_Plan> detailLists = new List<Model.Report_Construction_Plan>();
|
||||
JArray teamGroupData = Grid5.GetMergedData();
|
||||
foreach (JObject teamGroupRow in teamGroupData)
|
||||
{
|
||||
JObject values = teamGroupRow.Value<JObject>("values");
|
||||
int rowIndex = teamGroupRow.Value<int>("index");
|
||||
Model.Report_Construction_Plan newDetail = new Model.Report_Construction_Plan
|
||||
{
|
||||
//Id = values.Value<string>("Id"),
|
||||
ReportId = ReportId,
|
||||
ReType = "3",
|
||||
UnitOrMajor = values.Value<string>("UnitOrMajor"),
|
||||
Quantity1 = values.Value<int>("Quantity1"),
|
||||
Quantity2 = values.Value<int>("Quantity2"),
|
||||
Remarks = values.Value<string>("Remarks")
|
||||
};
|
||||
if (Grid5.Rows[rowIndex].DataKeys.Length > 0)
|
||||
{
|
||||
newDetail.Id = Grid5.Rows[rowIndex].DataKeys[0].ToString();
|
||||
}
|
||||
detailLists.Add(newDetail);
|
||||
}
|
||||
if (detailLists.Count > 0)
|
||||
{
|
||||
Funs.DB.Report_Construction_Plan.InsertAllOnSubmit(detailLists);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存图纸会审
|
||||
/// </summary>
|
||||
void saveTzhs() {
|
||||
List<Model.Report_Construction_Plan> detailLists = new List<Model.Report_Construction_Plan>();
|
||||
JArray teamGroupData = Grid6.GetMergedData();
|
||||
foreach (JObject teamGroupRow in teamGroupData)
|
||||
{
|
||||
JObject values = teamGroupRow.Value<JObject>("values");
|
||||
int rowIndex = teamGroupRow.Value<int>("index");
|
||||
Model.Report_Construction_Plan newDetail = new Model.Report_Construction_Plan
|
||||
{
|
||||
//Id = values.Value<string>("Id"),
|
||||
ReportId = ReportId,
|
||||
ReType = "4",
|
||||
UnitOrMajor = values.Value<string>("UnitOrMajor"),
|
||||
Quantity1 = values.Value<int>("Quantity1"),
|
||||
Quantity2 = values.Value<int>("Quantity2"),
|
||||
Remarks = values.Value<string>("Remarks")
|
||||
};
|
||||
if (Grid6.Rows[rowIndex].DataKeys.Length > 0)
|
||||
{
|
||||
newDetail.Id = Grid6.Rows[rowIndex].DataKeys[0].ToString();
|
||||
}
|
||||
detailLists.Add(newDetail);
|
||||
}
|
||||
if (detailLists.Count > 0)
|
||||
{
|
||||
Funs.DB.Report_Construction_Plan.InsertAllOnSubmit(detailLists);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存文本框内容
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user