|
@@ -0,0 +1,393 @@
|
|
|
+using Hotline.Application.ExportWord;
|
|
|
+using Hotline.Share.Dtos.Early;
|
|
|
+using Hotline.Share.Dtos.ExportWord;
|
|
|
+using XF.Domain.Dependency;
|
|
|
+
|
|
|
+namespace Hotline.Application.Early
|
|
|
+{
|
|
|
+ public class EarlyReportProvider : IEarlyReportProvder, IScopeDependency
|
|
|
+ {
|
|
|
+ public string PushReport(EarlyReportDto earlyReportDtoreportDto)
|
|
|
+ {
|
|
|
+ string summarize = CreateSummarize(earlyReportDtoreportDto);
|
|
|
+
|
|
|
+ var reportDto = new ReportDto
|
|
|
+ {
|
|
|
+ CssStyle = "padding-left: 10%;padding-right: 10%;padding-top: 10px;",
|
|
|
+ Title = new TitleDto
|
|
|
+ {
|
|
|
+ Content = earlyReportDtoreportDto.ReportName,
|
|
|
+ CssStyle = "font-weight:bolder;color: red;font-size: 50px;font-family:宋体; width: 100 %; text-align: center; word-spacing: 10px;letter-spacing: 2px; margin-bottom: 10; line-height: 2; "
|
|
|
+ },
|
|
|
+ SubTitleDtos = new List<SubTitleDto>
|
|
|
+ {
|
|
|
+ new SubTitleDto
|
|
|
+ {
|
|
|
+ CssStyle = "font-weight: bold; font-size: 24px;font-family:方正楷体_GBK;width: 100%;\r\n text-align: center;letter-spacing: 5px;line-height: 1.5;",
|
|
|
+ Content = "2025年第32期"
|
|
|
+ },
|
|
|
+ new SubTitleDto
|
|
|
+ {
|
|
|
+ CssStyle = "font-weight: bold; font-size: 24px;font-family:方正楷体_GBK;width: 100%;\r\n text-align: center;letter-spacing: 5px;line-height: 1.5;",
|
|
|
+ Content = "(截至3月17日12时)"
|
|
|
+ },
|
|
|
+ new SubTitleDto
|
|
|
+ {
|
|
|
+ CssStyle = "font-weight: bold; font-size: 20px;font-family:楷体_GB2312;\r\n width: 100%;letter-spacing: 5px;line-height: 1.5;\r\n border-bottom:2px solid red;float: left;margin-bottom: 20px;",
|
|
|
+ Children = new List<SubTitleDto>
|
|
|
+ {
|
|
|
+ new SubTitleDto
|
|
|
+ {
|
|
|
+ CssStyle = "float: left;",
|
|
|
+ Content = "市政务服务非公经济局"
|
|
|
+ },
|
|
|
+ new SubTitleDto
|
|
|
+ {
|
|
|
+ CssStyle="float: right;",
|
|
|
+ Content = earlyReportDtoreportDto.ReportPushTime.ToString()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ ContentDto = new ContentDto
|
|
|
+ {
|
|
|
+ CssStyle = "font-weight: normal; font-size: 18px;font-family:宋体;width: 100%;letter-spacing: 5px;line-height: 1.5;",
|
|
|
+ TitleDto = new TitleDto
|
|
|
+ {
|
|
|
+ Content = "领导批示:",
|
|
|
+ CssStyle = "font-weight: normal; font-size: 22px;font-family:黑体;width: 100%;letter-spacing: 5px;line-height: 1.5;"
|
|
|
+ },
|
|
|
+ ParagraphDtos = new List<ParagraphDto>
|
|
|
+ {
|
|
|
+ new ParagraphDto
|
|
|
+ {
|
|
|
+ CssStyle = "text-indent: 2rem;",
|
|
|
+ Content = summarize
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+ int index = FillParagraphes(earlyReportDtoreportDto, reportDto);
|
|
|
+
|
|
|
+ var olderOrderName = $"{earlyReportDtoreportDto.ReportPushTime.Month}月{earlyReportDtoreportDto.ReportPushTime.Day}日重点诉求处置情况";
|
|
|
+
|
|
|
+ reportDto.ContentDto.ParagraphDtos.Add(new ParagraphDto
|
|
|
+ {
|
|
|
+ Content = $"附件1:{olderOrderName}",
|
|
|
+ CssStyle = "text-indent: 2rem;",
|
|
|
+ SortIndex = ++index
|
|
|
+ });
|
|
|
+
|
|
|
+ var orderName = "前期重点问题办结情况";
|
|
|
+ reportDto.ContentDto.ParagraphDtos.Add(new ParagraphDto
|
|
|
+ {
|
|
|
+ Content = $"附件2:{orderName}",
|
|
|
+ CssStyle = "text-indent: 2rem;",
|
|
|
+ SortIndex = ++index
|
|
|
+ });
|
|
|
+
|
|
|
+ reportDto.AttachmentDtos = [];
|
|
|
+ AttachmentDto orderAttachmentDto = CreateOrderAttachment(earlyReportDtoreportDto, olderOrderName);
|
|
|
+ reportDto.AttachmentDtos.Add(orderAttachmentDto);
|
|
|
+ AttachmentDto fileOrderAttachmentDto = CreateFileOrderAttachment(earlyReportDtoreportDto, orderName);
|
|
|
+ reportDto.AttachmentDtos.Add(fileOrderAttachmentDto);
|
|
|
+
|
|
|
+ reportDto.BottomDtos = new List<BaseReportDto>
|
|
|
+ {
|
|
|
+ new BaseReportDto
|
|
|
+ {
|
|
|
+ CssStyle = "font-weight: normal; font-size: 18px;font-family:楷体_GB2312;\r\n width: 100%;letter-spacing: 2px;line-height: 1;\r\n border-bottom:1px solid #000;float: left;margin-bottom: 20px;",
|
|
|
+ Children = new List<BaseReportDto>
|
|
|
+ {
|
|
|
+ new BaseReportDto
|
|
|
+ {
|
|
|
+ CssStyle = "float: left;",
|
|
|
+ Content = "信息公开属性:"
|
|
|
+ },new BaseReportDto
|
|
|
+ {
|
|
|
+ CssStyle = "font-weight: bolder;float: left;",
|
|
|
+ Content = "不予公开"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ new BaseReportDto
|
|
|
+ {
|
|
|
+ CssStyle = "font-weight: normal; font-size: 18px;font-family:楷体_GB2312;\r\n width: 100%;letter-spacing: 2px;line-height: 1;\r\n border-bottom:1px solid #000;float: left;margin-bottom: 20px;",
|
|
|
+ Content = "主送:市长,常务副市长、分管副市长,联系副秘书长。"
|
|
|
+ },new BaseReportDto
|
|
|
+ {
|
|
|
+ CssStyle="font-weight: normal; font-size: 18px;font-family:楷体_GB2312;\r\n width: 100%;letter-spacing: 2px;line-height: 1;float: left;margin-bottom: 20px;",
|
|
|
+ Children = new List<BaseReportDto>
|
|
|
+ {
|
|
|
+ new BaseReportDto
|
|
|
+ {
|
|
|
+ CssStyle = "float:left;",
|
|
|
+ Content = "市政务服务非公经济发展局"
|
|
|
+ },
|
|
|
+ new BaseReportDto
|
|
|
+ {
|
|
|
+ CssStyle = "float:right;",
|
|
|
+ Content = $"{earlyReportDtoreportDto.ReportPushTime.ToString()}印发"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
+ return reportDto.RenderHtml();
|
|
|
+ }
|
|
|
+
|
|
|
+ private static AttachmentDto CreateOrderAttachment(EarlyReportDto earlyReportDtoreportDto, string olderOrderName)
|
|
|
+ {
|
|
|
+ TableDto orderTableDto = CreateOrderTable(earlyReportDtoreportDto);
|
|
|
+ var attachmentDto = new AttachmentDto
|
|
|
+ {
|
|
|
+ Title = new TitleDto
|
|
|
+ {
|
|
|
+ CssStyle = "font-weight: bold; font-size: 18px;font-family:宋体;width: 100%; float:right;",
|
|
|
+ Content = "附件1"
|
|
|
+ },
|
|
|
+ SubTitleDtos = new List<SubTitleDto>
|
|
|
+ {
|
|
|
+ new SubTitleDto
|
|
|
+ {
|
|
|
+ CssStyle = "font-weight: bold; font-size: 24px;font-family:宋体;width: 100%; text-align: center;margin-bottom: 20px;",
|
|
|
+ Content = olderOrderName
|
|
|
+ }
|
|
|
+ },
|
|
|
+ TableDtos = new List<TableDto>
|
|
|
+ {
|
|
|
+ orderTableDto
|
|
|
+ }
|
|
|
+ };
|
|
|
+ return attachmentDto;
|
|
|
+ }
|
|
|
+
|
|
|
+ private static AttachmentDto CreateFileOrderAttachment(EarlyReportDto earlyReportDtoreportDto, string olderOrderName)
|
|
|
+ {
|
|
|
+ TableDto orderTableDto = CreateFileOrderTable(earlyReportDtoreportDto);
|
|
|
+ var attachmentDto = new AttachmentDto
|
|
|
+ {
|
|
|
+ Title = new TitleDto
|
|
|
+ {
|
|
|
+ CssStyle = "font-weight: bold; font-size: 18px;font-family:宋体;width: 100%; float:right;",
|
|
|
+ Content = "附件2"
|
|
|
+ },
|
|
|
+ SubTitleDtos = new List<SubTitleDto>
|
|
|
+ {
|
|
|
+ new SubTitleDto
|
|
|
+ {
|
|
|
+ CssStyle = "font-weight: bold; font-size: 24px;font-family:宋体;width: 100%; text-align: center;margin-bottom: 20px;",
|
|
|
+ Content = olderOrderName
|
|
|
+ }
|
|
|
+ },
|
|
|
+ TableDtos = new List<TableDto>
|
|
|
+ {
|
|
|
+ orderTableDto
|
|
|
+ }
|
|
|
+ };
|
|
|
+ return attachmentDto;
|
|
|
+ }
|
|
|
+
|
|
|
+ private static TableDto CreateFileOrderTable(EarlyReportDto earlyReportDtoreportDto)
|
|
|
+ {
|
|
|
+ var tableDto = new TableDto
|
|
|
+ {
|
|
|
+ CssStyle = "border-collapse: collapse;"
|
|
|
+ };
|
|
|
+ tableDto.HeadDto.RowDtos.Add(new RowDto
|
|
|
+ {
|
|
|
+ ColumnDtos = new List<ColumnDto>
|
|
|
+ {
|
|
|
+ new ColumnDto
|
|
|
+ {
|
|
|
+ CssStyle = "border: solid 1px #000;width: 10%;text-align: center;",
|
|
|
+ Content = "序号",
|
|
|
+ },
|
|
|
+ new ColumnDto
|
|
|
+ {
|
|
|
+ CssStyle = "border: solid 1px #000;width: 10%;text-align: center;",
|
|
|
+ Content = "期刊",
|
|
|
+ },
|
|
|
+ new ColumnDto
|
|
|
+ {
|
|
|
+ CssStyle = "border: solid 1px #000;width: 10%;text-align: center;",
|
|
|
+ Content = "诉求来源",
|
|
|
+ },
|
|
|
+ new ColumnDto
|
|
|
+ {
|
|
|
+ CssStyle = "border: solid 1px #000;width: 20%;text-align: center;",
|
|
|
+ Content = "问题类型",
|
|
|
+ },
|
|
|
+ new ColumnDto
|
|
|
+ {
|
|
|
+ CssStyle = "border: solid 1px #000;width: 25%;text-align: center;",
|
|
|
+ Content = "诉求内容",
|
|
|
+ },
|
|
|
+ new ColumnDto
|
|
|
+ {
|
|
|
+ CssStyle = "border: solid 1px #000;width: 25%;text-align: center;",
|
|
|
+ Content = "答复情况",
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ var number = 1;
|
|
|
+ earlyReportDtoreportDto.ReportFiledOrderDetails.ForEach(item =>
|
|
|
+ {
|
|
|
+ tableDto.BodyDto.RowDtos.Add(new RowDto
|
|
|
+ {
|
|
|
+ CssStyle = "border: solid 1px #000;",
|
|
|
+ ColumnDtos = new List<ColumnDto>
|
|
|
+ {
|
|
|
+ new ColumnDto
|
|
|
+ {
|
|
|
+ CssStyle = "border: solid 1px #000;text-align: center;",
|
|
|
+ Content = number.ToString(),
|
|
|
+ },
|
|
|
+ new ColumnDto
|
|
|
+ {
|
|
|
+ CssStyle = "border: solid 1px #000;text-align: center;",
|
|
|
+ Content = item.ReportName,
|
|
|
+ },
|
|
|
+ new ColumnDto
|
|
|
+ {
|
|
|
+ CssStyle = "border: solid 1px #000;text-align: center;",
|
|
|
+ Content = item.OneHotSportName,
|
|
|
+ },
|
|
|
+ new ColumnDto
|
|
|
+ {
|
|
|
+ CssStyle = "border: solid 1px #000;text-align: center;",
|
|
|
+ Content = item.HotSportName,
|
|
|
+ },
|
|
|
+ new ColumnDto
|
|
|
+ {
|
|
|
+ CssStyle = "border: solid 1px #000;",
|
|
|
+ Content = item.Content,
|
|
|
+ },
|
|
|
+ new ColumnDto
|
|
|
+ {
|
|
|
+ CssStyle = "border: solid 1px #000;",
|
|
|
+ Content = item.ActualOpinion,
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ number++;
|
|
|
+ });
|
|
|
+ return tableDto;
|
|
|
+ }
|
|
|
+
|
|
|
+ private static TableDto CreateOrderTable(EarlyReportDto earlyReportDtoreportDto)
|
|
|
+ {
|
|
|
+ var tableDto = new TableDto
|
|
|
+ {
|
|
|
+ CssStyle = "border-collapse: collapse;"
|
|
|
+ };
|
|
|
+ tableDto.HeadDto.RowDtos.Add(new RowDto
|
|
|
+ {
|
|
|
+ ColumnDtos = new List<ColumnDto>
|
|
|
+ {
|
|
|
+ new ColumnDto
|
|
|
+ {
|
|
|
+ CssStyle = "border: solid 1px #000;width: 10%;text-align: center;",
|
|
|
+ Content = "序号",
|
|
|
+ },
|
|
|
+ new ColumnDto
|
|
|
+ {
|
|
|
+ CssStyle = "border: solid 1px #000;width: 20%;text-align: center;",
|
|
|
+ Content = "诉求来源",
|
|
|
+ },
|
|
|
+ new ColumnDto
|
|
|
+ {
|
|
|
+ CssStyle = "border: solid 1px #000;width: 20%;text-align: center;",
|
|
|
+ Content = "问题类型",
|
|
|
+ },
|
|
|
+ new ColumnDto
|
|
|
+ {
|
|
|
+ CssStyle = "border: solid 1px #000;width: 25%;text-align: center;",
|
|
|
+ Content = "诉求内容",
|
|
|
+ },
|
|
|
+ new ColumnDto
|
|
|
+ {
|
|
|
+ CssStyle = "border: solid 1px #000;width: 25%;text-align: center;",
|
|
|
+ Content = "办理情况",
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ var number = 1;
|
|
|
+ earlyReportDtoreportDto.ReportOrderDetails.ForEach(item =>
|
|
|
+ {
|
|
|
+ tableDto.BodyDto.RowDtos.Add(new RowDto
|
|
|
+ {
|
|
|
+ CssStyle = "border: solid 1px #000;",
|
|
|
+ ColumnDtos = new List<ColumnDto>
|
|
|
+ {
|
|
|
+ new ColumnDto
|
|
|
+ {
|
|
|
+ CssStyle = "border: solid 1px #000;text-align: center;",
|
|
|
+ Content = number.ToString(),
|
|
|
+ },
|
|
|
+ new ColumnDto
|
|
|
+ {
|
|
|
+ CssStyle = "border: solid 1px #000;text-align: center;",
|
|
|
+ Content = item.OneHotSportName,
|
|
|
+ },
|
|
|
+ new ColumnDto
|
|
|
+ {
|
|
|
+ CssStyle = "border: solid 1px #000;text-align: center;",
|
|
|
+ Content = item.HotSportName,
|
|
|
+ },
|
|
|
+ new ColumnDto
|
|
|
+ {
|
|
|
+ CssStyle = "border: solid 1px #000;",
|
|
|
+ Content = item.Content,
|
|
|
+ },
|
|
|
+ new ColumnDto
|
|
|
+ {
|
|
|
+ CssStyle = "border: solid 1px #000;",
|
|
|
+ Content = item.ActualOpinion,
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ number++;
|
|
|
+ });
|
|
|
+ return tableDto;
|
|
|
+ }
|
|
|
+
|
|
|
+ private static int FillParagraphes(EarlyReportDto earlyReportDtoreportDto, ReportDto reportDto)
|
|
|
+ {
|
|
|
+ var index = 1;
|
|
|
+ earlyReportDtoreportDto.ReportHotDetails.ForEach(item =>
|
|
|
+ {
|
|
|
+ reportDto.ContentDto.ParagraphDtos.Add(new ParagraphDto
|
|
|
+ {
|
|
|
+ titleDto = new TitleDto
|
|
|
+ {
|
|
|
+ Content = item.HotName,
|
|
|
+ CssStyle = "text-indent: 2rem;font-weight: bolder;",
|
|
|
+ },
|
|
|
+ Content = item.Content,
|
|
|
+ CssStyle = "text-indent: 2rem;",
|
|
|
+ SortIndex = index
|
|
|
+ });
|
|
|
+ index++;
|
|
|
+ });
|
|
|
+ return index;
|
|
|
+ }
|
|
|
+
|
|
|
+ private static string CreateSummarize(EarlyReportDto earlyReportDtoreportDto)
|
|
|
+ {
|
|
|
+ var hotDetails = new List<string>();
|
|
|
+ earlyReportDtoreportDto.ReportHotDetails.ForEach(item =>
|
|
|
+ {
|
|
|
+ hotDetails.Add($"{item.HotName}{item.Content}件");
|
|
|
+ });
|
|
|
+ var areaDetails = new List<string>();
|
|
|
+ earlyReportDtoreportDto.ReportAreaDetails.ForEach(item =>
|
|
|
+ {
|
|
|
+ areaDetails.Add($"{item.AreaName}{item.Count}件");
|
|
|
+ });
|
|
|
+ var summarize = $"{earlyReportDtoreportDto.ReportPushTime},市12345热线共受理重点领域问题{earlyReportDtoreportDto.ReportHotDetails.Sum(x => x.Count)}件,其中,{string.Join("、", hotDetails)}。从区域分布来看,{string.Join(",", areaDetails)}。";
|
|
|
+ return summarize;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+}
|