五环质量月报修改
This commit is contained in:
parent
76a9c48dd1
commit
749ae58770
|
@ -152,12 +152,33 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
* @param doc Document对象
|
||||
* @return
|
||||
*/
|
||||
public static Cell CreateCell(String value, Document doc, double cellWidth)
|
||||
public static Cell CreateCell(String value, Document doc, double cellWidth, string cellMerge = "")
|
||||
{
|
||||
Cell cell = new Cell(doc);
|
||||
Paragraph p = new Paragraph(doc);
|
||||
if (!string.IsNullOrEmpty(cellMerge))
|
||||
{
|
||||
if (cellMerge == "0")
|
||||
{
|
||||
cell.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.First;//竖直方向合并的第一个单元格
|
||||
}
|
||||
else
|
||||
{
|
||||
cell.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.Previous;//竖直方向合并的第一个单元格
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
cell.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
|
||||
}
|
||||
|
||||
p.AppendChild(new Run(doc, value));
|
||||
|
||||
cell.CellFormat.Width = cellWidth;
|
||||
|
||||
cell.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;
|
||||
|
||||
cell.AppendChild(p);
|
||||
return cell;
|
||||
}
|
||||
|
@ -608,7 +629,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
}
|
||||
}
|
||||
int i = 1;
|
||||
var cNProfessionals = from x in Funs.DB.Base_CNProfessional orderby x.SortIndex select x;
|
||||
var cNProfessionals = from x in Funs.DB.Base_CNProfessional where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId orderby x.SortIndex select x;
|
||||
foreach (var item in cNProfessionals)
|
||||
{
|
||||
//专业下所有集合
|
||||
|
@ -889,6 +910,237 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region 7.3无损检测管理情况
|
||||
var NondestructiveTestlist = new List<Model.ProcessControl_NondestructiveTest_New>();
|
||||
//加载所有施工分包单位
|
||||
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)
|
||||
orderby y.UnitCode
|
||||
select new { x.UnitId, y.UnitName };
|
||||
|
||||
int? totalNum0 = 0, totalNum1 = 0;//拍片数量合计
|
||||
|
||||
|
||||
foreach (var item in units)
|
||||
{
|
||||
int? num0 = 0, num1 = 0;//拍片数量小计
|
||||
|
||||
var query = from c in db.ProcessControl_NondestructiveTest_New
|
||||
|
||||
join u in db.Base_Unit on c.UnitId equals u.UnitId
|
||||
|
||||
|
||||
|
||||
where c.ProjectId == this.CurrUser.LoginProjectId && c.UnitId == item.UnitId
|
||||
&& c.CreateDate >= Convert.ToDateTime(startDate) && c.CreateDate <= Convert.ToDateTime(endDate)
|
||||
|
||||
orderby c.CreateDate descending
|
||||
|
||||
select new
|
||||
|
||||
{
|
||||
c.CreateDate,
|
||||
c.ProjectId,
|
||||
u.UnitId,
|
||||
u.UnitName,
|
||||
c.ProfessionalName,
|
||||
c.MonthQuantity,
|
||||
c.TotalQuantity,
|
||||
c.MonthRate,
|
||||
c.TotalRate
|
||||
};
|
||||
if (query.ToList().Count > 0)
|
||||
{
|
||||
//加载工艺管道
|
||||
var gygdModel = query.FirstOrDefault(x => x.ProfessionalName == "工艺管道");
|
||||
var model = new Model.ProcessControl_NondestructiveTest_New();
|
||||
model.Id = Guid.NewGuid().ToString();
|
||||
model.CreateMan = item.UnitName;//用作存储施工单位名称
|
||||
model.ProfessionalName = "工艺管道";
|
||||
|
||||
if (gygdModel != null)
|
||||
{
|
||||
model.MonthQuantity = gygdModel.MonthQuantity;
|
||||
model.TotalQuantity = gygdModel.TotalQuantity;
|
||||
model.MonthRate = gygdModel.MonthRate + "%";
|
||||
model.TotalRate = gygdModel.TotalRate + "%";
|
||||
#region 小计和合计
|
||||
//小计
|
||||
num0 += gygdModel.MonthQuantity;
|
||||
num1 += gygdModel.TotalQuantity;
|
||||
|
||||
//合计
|
||||
totalNum0 += gygdModel.MonthQuantity;
|
||||
totalNum1 += gygdModel.TotalQuantity;
|
||||
|
||||
#endregion
|
||||
NondestructiveTestlist.Add(model);
|
||||
}
|
||||
else
|
||||
{
|
||||
model.MonthQuantity = 0;
|
||||
model.TotalQuantity = 0;
|
||||
model.MonthRate = "0%";
|
||||
model.TotalRate = "0%";
|
||||
NondestructiveTestlist.Add(model);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//地管
|
||||
gygdModel = query.FirstOrDefault(x => x.ProfessionalName == "地管");
|
||||
model = new Model.ProcessControl_NondestructiveTest_New();
|
||||
model.Id = Guid.NewGuid().ToString();
|
||||
model.CreateMan = item.UnitName;//用作存储施工单位名称
|
||||
model.ProfessionalName = "地管";
|
||||
|
||||
if (gygdModel != null)
|
||||
{
|
||||
model.MonthQuantity = gygdModel.MonthQuantity;
|
||||
model.TotalQuantity = gygdModel.TotalQuantity;
|
||||
model.MonthRate = gygdModel.MonthRate + "%";
|
||||
model.TotalRate = gygdModel.TotalRate + "%";
|
||||
#region 小计和合计
|
||||
//小计
|
||||
num0 += gygdModel.MonthQuantity;
|
||||
num1 += gygdModel.TotalQuantity;
|
||||
|
||||
//合计
|
||||
totalNum0 += gygdModel.MonthQuantity;
|
||||
totalNum1 += gygdModel.TotalQuantity;
|
||||
|
||||
#endregion
|
||||
NondestructiveTestlist.Add(model);
|
||||
}
|
||||
else
|
||||
{
|
||||
model.MonthQuantity = 0;
|
||||
model.TotalQuantity = 0;
|
||||
model.MonthRate = "0%";
|
||||
model.TotalRate = "0%";
|
||||
NondestructiveTestlist.Add(model);
|
||||
}
|
||||
|
||||
|
||||
//非标
|
||||
gygdModel = query.FirstOrDefault(x => x.ProfessionalName == "非标");
|
||||
model = new Model.ProcessControl_NondestructiveTest_New();
|
||||
model.Id = Guid.NewGuid().ToString();
|
||||
model.CreateMan = item.UnitName;//用作存储施工单位名称
|
||||
model.ProfessionalName = "非标";
|
||||
|
||||
if (gygdModel != null)
|
||||
{
|
||||
model.MonthQuantity = gygdModel.MonthQuantity;
|
||||
model.TotalQuantity = gygdModel.TotalQuantity;
|
||||
model.MonthRate = gygdModel.MonthRate + "%";
|
||||
model.TotalRate = gygdModel.TotalRate + "%";
|
||||
#region 小计和合计
|
||||
//小计
|
||||
num0 += gygdModel.MonthQuantity;
|
||||
num1 += gygdModel.TotalQuantity;
|
||||
|
||||
//合计
|
||||
totalNum0 += gygdModel.MonthQuantity;
|
||||
totalNum1 += gygdModel.TotalQuantity;
|
||||
|
||||
#endregion
|
||||
NondestructiveTestlist.Add(model);
|
||||
}
|
||||
else
|
||||
{
|
||||
model.MonthQuantity = 0;
|
||||
model.TotalQuantity = 0;
|
||||
model.MonthRate = "0%";
|
||||
model.TotalRate = "0%";
|
||||
NondestructiveTestlist.Add(model);
|
||||
}
|
||||
//小计
|
||||
model = new Model.ProcessControl_NondestructiveTest_New();
|
||||
model.Id = Guid.NewGuid().ToString();
|
||||
model.CreateMan = item.UnitName;//用作存储施工单位名称
|
||||
model.ProfessionalName = "小计";
|
||||
model.MonthQuantity = num0;
|
||||
model.TotalQuantity = num1;
|
||||
model.MonthRate = "";
|
||||
model.TotalRate = "";
|
||||
NondestructiveTestlist.Add(model);
|
||||
}
|
||||
}
|
||||
if (NondestructiveTestlist.Count > 0)
|
||||
{
|
||||
isYm = true;
|
||||
whileIndex += 1;
|
||||
table = (Aspose.Words.Tables.Table)doc.GetChild(NodeType.Table, whileIndex, true);
|
||||
//跳过页眉的表头
|
||||
while (isYm)
|
||||
{
|
||||
if (table.Range.Text.Substring(0, 2) != "序号")
|
||||
{
|
||||
whileIndex += 1;
|
||||
table = (Aspose.Words.Tables.Table)doc.GetChild(NodeType.Table, whileIndex, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
isYm = false;
|
||||
}
|
||||
}
|
||||
numberIndex = 1;
|
||||
//需要插入的table
|
||||
var Unitname = "";
|
||||
foreach (var item in NondestructiveTestlist)
|
||||
{
|
||||
|
||||
//创建行
|
||||
Row row = new Row(doc);
|
||||
row.Cells.Add(CreateCell((numberIndex).ToString(), doc, table.Rows[0].Cells[0].CellFormat.Width));
|
||||
|
||||
//如果是第一列,或者
|
||||
if (numberIndex == 1 || Unitname != item.CreateMan)
|
||||
{
|
||||
row.Cells.Add(CreateCell(item.CreateMan, doc, table.Rows[0].Cells[1].CellFormat.Width, "0"));
|
||||
Unitname = item.CreateMan;
|
||||
}
|
||||
else
|
||||
{
|
||||
row.Cells.Add(CreateCell(item.CreateMan, doc, table.Rows[0].Cells[1].CellFormat.Width, "1"));
|
||||
Unitname = item.CreateMan;
|
||||
}
|
||||
|
||||
|
||||
|
||||
row.Cells.Add(CreateCell(item.ProfessionalName.ToString(), doc, table.Rows[0].Cells[2].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.MonthQuantity.ToString(), doc, table.Rows[0].Cells[3].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.TotalQuantity.ToString(), doc, table.Rows[0].Cells[4].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.MonthRate.ToString(), doc, table.Rows[0].Cells[5].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.TotalRate.ToString(), doc, table.Rows[0].Cells[6].CellFormat.Width));
|
||||
|
||||
table.Rows.Insert(numberIndex, row);
|
||||
numberIndex += 1;
|
||||
}
|
||||
//自动设置表格样式
|
||||
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
|
||||
//创建合计
|
||||
//创建行
|
||||
Row rowhj = new Row(doc);
|
||||
rowhj.Cells.Add(CreateCell("", doc, table.Rows[0].Cells[0].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell("合计", doc, table.Rows[0].Cells[1].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell("", doc, table.Rows[0].Cells[2].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell(totalNum0.ToString(), doc, table.Rows[0].Cells[3].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell(totalNum1.ToString(), doc, table.Rows[0].Cells[4].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell("", doc, table.Rows[0].Cells[5].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell("", doc, table.Rows[0].Cells[6].CellFormat.Width));
|
||||
|
||||
table.Rows.Insert(numberIndex, rowhj);
|
||||
|
||||
//自动设置表格样式
|
||||
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
var reportItem = db.Report_CQMS_MonthReportItem.Where(x => x.ReportId == Id).OrderBy(x => x.ContentName).ToList();
|
||||
#region 9.计量器具报验管理情况
|
||||
#endregion
|
||||
|
|
|
@ -197,6 +197,14 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
//加载所有grid
|
||||
lodAllGrid("1");
|
||||
|
||||
Grid10.EmptyText = "<raw><div class=\"grid-empty-text\">无数据</div></raw>";
|
||||
gvTj.EmptyText = "<raw><div class=\"grid-empty-text\">无数据</div></raw>";
|
||||
GvSb.EmptyText = "<raw><div class=\"grid-empty-text\">无数据</div></raw>";
|
||||
GvGD.EmptyText = "<raw><div class=\"grid-empty-text\">无数据</div></raw>";
|
||||
GvDq.EmptyText = "<raw><div class=\"grid-empty-text\">无数据</div></raw>";
|
||||
GvYb.EmptyText = "<raw><div class=\"grid-empty-text\">无数据</div></raw>";
|
||||
GvFf.EmptyText = "<raw><div class=\"grid-empty-text\">无数据</div></raw>";
|
||||
GvXf.EmptyText = "<raw><div class=\"grid-empty-text\">无数据</div></raw>";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -794,7 +802,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
}
|
||||
}
|
||||
int i = 1;
|
||||
var cNProfessionals = from x in Funs.DB.Base_CNProfessional orderby x.SortIndex select x;
|
||||
var cNProfessionals = from x in Funs.DB.Base_CNProfessional where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId orderby x.SortIndex select x;
|
||||
foreach (var item in cNProfessionals)
|
||||
{
|
||||
//专业下所有集合
|
||||
|
@ -1117,9 +1125,9 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
c.MonthRate,
|
||||
c.TotalRate
|
||||
};
|
||||
|
||||
//加载工艺管道
|
||||
var gygdModel = query.FirstOrDefault(x => x.ProfessionalName == "工艺管道");
|
||||
if (query.ToList().Count > 0) {
|
||||
//加载工艺管道
|
||||
var gygdModel = query.FirstOrDefault(x => x.ProfessionalName == "工艺管道");
|
||||
var model = new Model.ProcessControl_NondestructiveTest_New();
|
||||
model.Id = Guid.NewGuid().ToString();
|
||||
model.CreateMan = item.UnitName;//用作存储施工单位名称
|
||||
|
@ -1234,6 +1242,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
model.TotalRate = "";
|
||||
list.Add(model);
|
||||
}
|
||||
}
|
||||
|
||||
Grid10.DataSource = list;
|
||||
Grid10.DataBind();
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -12,11 +12,7 @@
|
|||
<appSettings>
|
||||
<!--连接字符串-->
|
||||
<!--<add key="ConnectionString" value="Server=.;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>-->
|
||||
<<<<<<< HEAD
|
||||
<add key="ConnectionString" value="Server=.\SQL2012;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>
|
||||
=======
|
||||
<add key="ConnectionString" value="Server=.;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>
|
||||
>>>>>>> 0ae4143492852fa438a0c21d967acf7271ee604e
|
||||
<add key="ConnectionString" value="Server=DESKTOP-1QITK9E\MSSQLSERVER2;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=123;MultipleActiveResultSets=true;Connect Timeout=1200"/>
|
||||
<!--系统名称-->
|
||||
<add key="SystemName" value="智慧施工管理信息系统V1.0"/>
|
||||
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/Images/;"/>
|
||||
|
@ -81,7 +77,7 @@
|
|||
<add verb="GET" path="res.axd" type="FineUIPro.ResourceHandler, FineUIPro" validate="false"/>
|
||||
<add path="ChartImg.axd" verb="GET,POST,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
|
||||
</httpHandlers>
|
||||
<compilation debug="false" targetFramework="4.6.1"/>
|
||||
<compilation debug="true" targetFramework="4.6.1"/>
|
||||
<httpRuntime requestValidationMode="2.0" maxRequestLength="2147483647" executionTimeout="36000"/>
|
||||
<authentication mode="Forms">
|
||||
<forms loginUrl="Login.aspx" name="PUBLISHERCOOKIE" protection="All" timeout="1440" path="/"/>
|
||||
|
|
Loading…
Reference in New Issue