质量月报导出问题处理
This commit is contained in:
parent
9df2becf42
commit
6bebbe15ef
|
@ -251,7 +251,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
select x).FirstOrDefault();
|
||||
|
||||
Bookmark bkmark = doc.Range.Bookmarks["username"];
|
||||
if (bkmark != null) {
|
||||
if (bkmark != null)
|
||||
{
|
||||
|
||||
if (unitsYz != null)
|
||||
{
|
||||
|
@ -283,7 +284,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
}
|
||||
|
||||
bkmark = doc.Range.Bookmarks["quamanagername"];
|
||||
if (bkmark != null) {
|
||||
if (bkmark != null)
|
||||
{
|
||||
//var zlName = "";
|
||||
////根据项目获取质量经理
|
||||
//var puserList = db.Project_ProjectUser.Where(x => x.ProjectId == weekModel.ProjectId && x.RoleId.Contains(BLL.Const.QAManager)).ToList();
|
||||
|
@ -338,7 +340,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
whileIndex += 1;
|
||||
table = (Aspose.Words.Tables.Table)doc.GetChild(NodeType.Table, whileIndex, true);
|
||||
}
|
||||
else{
|
||||
else
|
||||
{
|
||||
isYm = false;
|
||||
}
|
||||
}
|
||||
|
@ -677,9 +680,11 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
}
|
||||
}
|
||||
int i = 1;
|
||||
var cNProfessionals = from x in Funs.DB.Base_CNProfessional where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId
|
||||
var cNProfessionals = from x in Funs.DB.Base_CNProfessional
|
||||
where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId
|
||||
&& x.CNProfessionalId != BLL.Const.ComprehensiveId
|
||||
orderby x.SortIndex select x;
|
||||
orderby x.SortIndex
|
||||
select x;
|
||||
foreach (var item in cNProfessionals)
|
||||
{
|
||||
//专业下所有集合
|
||||
|
@ -958,7 +963,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
//自动设置表格样式
|
||||
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
isYm = true;
|
||||
numberIndex = 1;
|
||||
whileIndex += 1;
|
||||
|
@ -1003,24 +1009,16 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
|
||||
int? totalNum0 = 0, totalNum1 = 0;//拍片数量合计
|
||||
|
||||
|
||||
endDate = endDate.AddDays(1);
|
||||
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)
|
||||
|
||||
&& c.CreateDate >= Convert.ToDateTime(startDate) && c.CreateDate < Convert.ToDateTime(endDate)
|
||||
orderby c.CreateDate descending
|
||||
|
||||
select new
|
||||
|
||||
{
|
||||
c.CreateDate,
|
||||
c.ProjectId,
|
||||
|
@ -1040,7 +1038,6 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
model.Id = Guid.NewGuid().ToString();
|
||||
model.CreateMan = item.UnitName;//用作存储施工单位名称
|
||||
model.ProfessionalName = "工艺管道";
|
||||
|
||||
if (gygdModel != null)
|
||||
{
|
||||
model.MonthQuantity = gygdModel.MonthQuantity;
|
||||
|
@ -1068,9 +1065,6 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
NondestructiveTestlist.Add(model);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//地管
|
||||
gygdModel = query.FirstOrDefault(x => x.ProfessionalName == "地管");
|
||||
model = new Model.ProcessControl_NondestructiveTest_New();
|
||||
|
@ -1175,11 +1169,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
int pageCount = 1;
|
||||
foreach (var item in NondestructiveTestlist)
|
||||
{
|
||||
|
||||
//创建行
|
||||
Row row = new Row(doc);
|
||||
|
||||
|
||||
//如果是第一列,或者
|
||||
if (numberIndex == 1 || Unitname != item.CreateMan)
|
||||
{
|
||||
|
@ -1199,8 +1190,6 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
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));
|
||||
|
@ -1233,7 +1222,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
//自动设置表格样式
|
||||
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
isYm = true;
|
||||
numberIndex = 1;
|
||||
whileIndex += 1;
|
||||
|
@ -1324,7 +1314,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
//自动设置表格样式
|
||||
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
isYm = true;
|
||||
numberIndex = 1;
|
||||
whileIndex += 1;
|
||||
|
|
Loading…
Reference in New Issue