20240514 修改月报

This commit is contained in:
毕文静 2024-05-14 18:07:37 +08:00
parent 8b3c544f40
commit 8fac345874
4 changed files with 34 additions and 15 deletions

View File

@ -177,7 +177,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
//序号
value = " " + value;
}
p.ParagraphFormat.Alignment = ParagraphAlignment.Center;
p.AppendChild(new Run(doc, value));
@ -230,8 +230,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
//更新书签内容
Document doc = new Aspose.Words.Document(newUrl);
DocumentBuilder builder = new DocumentBuilder(doc);
//builder.CellFormat.VerticalAlignment = CellVerticalAlignment.Center;
//builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;
#region
//业主单位
var unitsYz = (from x in db.Base_Unit
@ -343,16 +342,12 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
row.Cells.Add(CreateCell(item.TargetValue, doc, table.FirstRow.Cells[3].CellFormat.Width));
row.Cells.Add(CreateCell(item.MonthPer, doc, table.FirstRow.Cells[4].CellFormat.Width));
row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[5].CellFormat.Width));
table.Rows.Insert(numberIndex, row);
table.Rows.Insert(numberIndex, row);
numberIndex += 1;
}
//自动设置表格样式
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
//table.Alignment = Aspose.Words.Tables.TableAlignment.Center;
//builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;
#endregion
#region

View File

@ -178,6 +178,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
value = " " + value;
}
p.ParagraphFormat.Alignment = ParagraphAlignment.Center;
p.AppendChild(new Run(doc, value));

View File

@ -60,17 +60,40 @@ namespace FineUIPro.Web.CQMS.ProcessControl
}
//统计所给时间段的全部数量
List<Model.ProcessControl_InspectionManagement> managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, string.Empty, StartDate, DateTime.Now, false);
List<string> compileMans = managementListSunNumber.Select(x => x.CompileMan).Distinct().ToList();
foreach (var item in compileMans)
var checkMans = managementListSunNumber.Select(x => x.AcceptanceCheckMan.Split(',').ToList());
List<string> compileMans = new List<string>();
foreach (var item in checkMans)
{
Model.Sys_User user = BLL.UserService.GetUserByUserId(item);
string id = item.FirstOrDefault().Trim();
compileMans.Add(id);
}
checkMans= managementListSunNumber.Select(x => x.AcceptanceCheckMan.Split('、').ToList());
foreach (var item in checkMans)
{
string name = item.FirstOrDefault().Trim();
compileMans.Add(name);
}
//List<string> compileMans = managementListSunNumber.Select(x => x.CompileMan).Distinct().ToList();
foreach (var item in compileMans.Distinct())
{
Model.NCRStatisc Statistics = new Model.NCRStatisc();
Model.Sys_User user = BLL.UserService.GetUserByUserId(item);//新数据保存的用户Id
if (user != null)
{
Model.NCRStatisc Statistics = new Model.NCRStatisc();
Statistics.WorkName = user.UserName;
Statistics.CheckNum = managementListSunNumber.Where(x => x.CompileMan == item).Count();
Statistics.CheckNum = managementListSunNumber.Where(x => x.AcceptanceCheckMan == item).Count();
StatisticsList.Add(Statistics);
}
else
{
Model.Sys_User u = BLL.UserService.GetUserByUserName(item);//老数据保存的姓名
if (u!=null)
{
Statistics.WorkName = u.UserName;
Statistics.CheckNum = managementListSunNumber.Where(x => x.AcceptanceCheckMan == item).Count();
StatisticsList.Add(Statistics);
}
}
}
Model.NCRStatisc StatisticsLast = new Model.NCRStatisc();
StatisticsLast.WorkName = "合计";

View File

@ -12,7 +12,7 @@
<appSettings>
<!--连接字符串-->
<!--<add key="ConnectionString" value="Server=.;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"/>
<add key="ConnectionString" value="Server=.\SQL2012;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>
<!--系统名称-->
<add key="SystemName" value="智慧施工管理信息系统V1.0"/>
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/Images/;"/>