diff --git a/FCL/FineUIPro.Web/Evaluation/ContractorEvaluation.aspx.cs b/FCL/FineUIPro.Web/Evaluation/ContractorEvaluation.aspx.cs index 5666ba2..30da713 100644 --- a/FCL/FineUIPro.Web/Evaluation/ContractorEvaluation.aspx.cs +++ b/FCL/FineUIPro.Web/Evaluation/ContractorEvaluation.aspx.cs @@ -339,6 +339,21 @@ namespace FineUIPro.Web.Evaluation content_Font.FontName = "Wingdings 2";//字体 content_Font.FontHeightInPoints = 11; //字体大小 + XSSFFont contentArial_Font = (XSSFFont)hssfworkbook.CreateFont(); //创建字体 + contentArial_Font.FontName = "Arial";//字体 + contentArial_Font.FontHeightInPoints = 11; //字体大小 + ICellStyle styleArialFont = hssfworkbook.CreateCellStyle(); + styleArialFont.VerticalAlignment = VerticalAlignment.Center; + styleArialFont.SetFont(contentArial_Font); + + XSSFFont contentNoAduit_Font = (XSSFFont)hssfworkbook.CreateFont(); //创建字体 + contentNoAduit_Font.FontName = "Arial";//字体 + contentNoAduit_Font.FontHeightInPoints = 11; //字体大小 + ICellStyle styleNoAduitFont = hssfworkbook.CreateCellStyle(); + styleNoAduitFont.VerticalAlignment = VerticalAlignment.Center; + styleNoAduitFont.Alignment = HorizontalAlignment.Right; + styleNoAduitFont.SetFont(contentNoAduit_Font); + XSSFFont cs_content_Font = (XSSFFont)hssfworkbook.CreateFont(); //创建字体 cs_content_Font.FontName = "宋体";//字体 cs_content_Font.FontHeightInPoints = 8; //字体大小 @@ -437,7 +452,7 @@ namespace FineUIPro.Web.Evaluation DateTime dtime = DateTime.Now.AddMonths(-1); endTime = DateTime.Parse(dtime.Year + "-" + dtime.Month + "-13"); } - if (eva.IfExtend=="Y")//续签合同 + if (eva.IfExtend == "Y")//续签合同 { List yearToDateParam = new List(); yearToDateParam.Add(new SqlParameter("@StartTime", startTime)); @@ -480,7 +495,7 @@ namespace FineUIPro.Web.Evaluation if (reportModel.GetRow(23) == null) reportModel.CreateRow(23); if (reportModel.GetRow(24) == null) reportModel.CreateRow(24); if (reportModel.GetRow(25) == null) reportModel.CreateRow(25); - + for (int j = 0; j < 24; j++) { var curDate = DateTime.Parse("" + startDate.Year + "-" + startDate.Month + "-01").AddMonths(j); @@ -537,30 +552,30 @@ namespace FineUIPro.Web.Evaluation } } else - { - List yearToDateParam = new List(); - yearToDateParam.Add(new SqlParameter("@StartTime", startTime)); - yearToDateParam.Add(new SqlParameter("@EndTime", endTime)); - yearToDateParam.Add(new SqlParameter("@FoNo", eva.FO_NO)); - SqlParameter[] yearToDateParList = yearToDateParam.ToArray(); + { + List yearToDateParam = new List(); + yearToDateParam.Add(new SqlParameter("@StartTime", startTime)); + yearToDateParam.Add(new SqlParameter("@EndTime", endTime)); + yearToDateParam.Add(new SqlParameter("@FoNo", eva.FO_NO)); + SqlParameter[] yearToDateParList = yearToDateParam.ToArray(); - var sesDataTable = SQLHelper.GetDataTableRunProc("Sp_ContractorEvaluation", yearToDateParList); - var sesDataScore = JsonConvert.DeserializeObject>(JsonConvert.SerializeObject(sesDataTable)); + var sesDataTable = SQLHelper.GetDataTableRunProc("Sp_ContractorEvaluation", yearToDateParList); + var sesDataScore = JsonConvert.DeserializeObject>(JsonConvert.SerializeObject(sesDataTable)); + + // 15行 + if (reportModel.GetRow(14) == null) reportModel.CreateRow(14); + if (reportModel.GetRow(15) == null) reportModel.CreateRow(15); + if (reportModel.GetRow(16) == null) reportModel.CreateRow(16); + if (reportModel.GetRow(17) == null) reportModel.CreateRow(17); + if (reportModel.GetRow(18) == null) reportModel.CreateRow(18); + if (reportModel.GetRow(19) == null) reportModel.CreateRow(19); + if (reportModel.GetRow(20) == null) reportModel.CreateRow(20); + if (reportModel.GetRow(21) == null) reportModel.CreateRow(21); + if (reportModel.GetRow(22) == null) reportModel.CreateRow(22); + if (reportModel.GetRow(23) == null) reportModel.CreateRow(23); + if (reportModel.GetRow(24) == null) reportModel.CreateRow(24); + if (reportModel.GetRow(25) == null) reportModel.CreateRow(25); - // 15行 - if (reportModel.GetRow(14) == null) reportModel.CreateRow(14); - if (reportModel.GetRow(15) == null) reportModel.CreateRow(15); - if (reportModel.GetRow(16) == null) reportModel.CreateRow(16); - if (reportModel.GetRow(17) == null) reportModel.CreateRow(17); - if (reportModel.GetRow(18) == null) reportModel.CreateRow(18); - if (reportModel.GetRow(19) == null) reportModel.CreateRow(19); - if (reportModel.GetRow(20) == null) reportModel.CreateRow(20); - if (reportModel.GetRow(21) == null) reportModel.CreateRow(21); - if (reportModel.GetRow(22) == null) reportModel.CreateRow(22); - if (reportModel.GetRow(23) == null) reportModel.CreateRow(23); - if (reportModel.GetRow(24) == null) reportModel.CreateRow(24); - if (reportModel.GetRow(25) == null) reportModel.CreateRow(25); - for (int j = 0; j < 24; j++) { var curDate = DateTime.Parse("" + startDate.Year + "-" + startDate.Month + "-01").AddMonths(j); @@ -611,19 +626,68 @@ namespace FineUIPro.Web.Evaluation reportModel.GetRow(17).GetCell(6).SetCellValue(eva.PriceEvaluation1);//参照1 if (reportModel.GetRow(18).GetCell(6) == null) reportModel.GetRow(18).CreateCell(6); reportModel.GetRow(18).GetCell(6).SetCellValue(eva.PriceEvaluation2);//参照2 - + //价格水平 if (reportModel.GetRow(21).GetCell(6) == null) reportModel.GetRow(21).CreateCell(6); - reportModel.GetRow(21).GetCell(6).SetCellValue(eva.PriceLevel == "1" ? "☑" : "□");//很高 + //很高 + if (eva.PriceLevel == "1") + { + reportModel.GetRow(21).GetCell(6).SetCellValue("☑"); + reportModel.GetRow(21).GetCell(6).CellStyle = styleArialFont; + } + else + { + reportModel.GetRow(21).GetCell(6).SetCellValue(txtNo); + reportModel.GetRow(21).GetCell(6).CellStyle.SetFont(content_Font); + } if (reportModel.GetRow(22).GetCell(6) == null) reportModel.GetRow(22).CreateCell(6); - reportModel.GetRow(22).GetCell(6).SetCellValue(eva.PriceLevel == "2" ? "☑" : "□");//较高 + //较高 + if (eva.PriceLevel == "2") + { + reportModel.GetRow(22).GetCell(6).SetCellValue("☑"); + reportModel.GetRow(22).GetCell(6).CellStyle = styleArialFont; + } + else + { + reportModel.GetRow(22).GetCell(6).SetCellValue(txtNo); + reportModel.GetRow(22).GetCell(6).CellStyle.SetFont(content_Font); + } if (reportModel.GetRow(23).GetCell(6) == null) reportModel.GetRow(23).CreateCell(6); - reportModel.GetRow(23).GetCell(6).SetCellValue(eva.PriceLevel == "3" ? "☑" : "□");//适宜 + //适宜 + if (eva.PriceLevel == "3") + { + reportModel.GetRow(23).GetCell(6).SetCellValue("☑"); + reportModel.GetRow(23).GetCell(6).CellStyle = styleArialFont; + } + else + { + reportModel.GetRow(23).GetCell(6).SetCellValue(txtNo); + reportModel.GetRow(23).GetCell(6).CellStyle.SetFont(content_Font); + } if (reportModel.GetRow(24).GetCell(6) == null) reportModel.GetRow(24).CreateCell(6); - reportModel.GetRow(24).GetCell(6).SetCellValue(eva.PriceLevel == "4" ? "☑" : "□");//较低 + //较低 + if (eva.PriceLevel == "4") + { + reportModel.GetRow(24).GetCell(6).SetCellValue("☑"); + reportModel.GetRow(24).GetCell(6).CellStyle = styleArialFont; + } + else + { + reportModel.GetRow(24).GetCell(6).SetCellValue(txtNo); + reportModel.GetRow(24).GetCell(6).CellStyle.SetFont(content_Font); + } if (reportModel.GetRow(25).GetCell(6) == null) reportModel.GetRow(25).CreateCell(6); - reportModel.GetRow(25).GetCell(6).SetCellValue(eva.PriceLevel == "5" ? "☑" : "□");//很低 - + //很低 + if (eva.PriceLevel == "5") + { + reportModel.GetRow(25).GetCell(6).SetCellValue("☑"); + reportModel.GetRow(25).GetCell(6).CellStyle = styleArialFont; + } + else + { + reportModel.GetRow(25).GetCell(6).SetCellValue(txtNo); + reportModel.GetRow(25).GetCell(6).CellStyle.SetFont(content_Font); + } if (reportModel.GetRow(27).GetCell(2) == null) reportModel.GetRow(27).CreateCell(2); reportModel.GetRow(27).GetCell(2).SetCellValue(eva.InterviewTimes.ToString());//约谈次数 if (reportModel.GetRow(27).GetCell(5) == null) reportModel.GetRow(27).CreateCell(5); @@ -645,7 +709,17 @@ namespace FineUIPro.Web.Evaluation if (reportModel.GetRow(38).GetCell(2) == null) reportModel.GetRow(38).CreateCell(2); reportModel.GetRow(38).GetCell(2).SetCellValue(eva.RedTimes.ToString());//红区次数 if (reportModel.GetRow(38).GetCell(3) == null) reportModel.GetRow(38).CreateCell(3); - reportModel.GetRow(38).GetCell(3).SetCellValue(eva.NotAudit == "√" ? "☑" : "□");//不在审计清单 + //不在审计清单 + if (eva.NotAudit == "√") + { + reportModel.GetRow(38).GetCell(3).SetCellValue("☑"); + reportModel.GetRow(38).GetCell(3).CellStyle = styleNoAduitFont; + } + else + { + reportModel.GetRow(38).GetCell(3).SetCellValue(txtNo); + reportModel.GetRow(38).GetCell(3).CellStyle.SetFont(content_Font); + } //41行 if (reportModel.GetRow(40).GetCell(3) == null) reportModel.GetRow(40).CreateCell(3); reportModel.GetRow(40).GetCell(3).SetCellValue(eva.OthersNum.ToString());//其他 diff --git a/FCL/FineUIPro.Web/FineUIPro.Web.csproj.user b/FCL/FineUIPro.Web/FineUIPro.Web.csproj.user index fcf3204..accb770 100644 --- a/FCL/FineUIPro.Web/FineUIPro.Web.csproj.user +++ b/FCL/FineUIPro.Web/FineUIPro.Web.csproj.user @@ -2,7 +2,7 @@ ShowAllFiles - Debug|Any CPU + Release|Any CPU true diff --git a/FCL/WebApi/WebApi.csproj.user b/FCL/WebApi/WebApi.csproj.user index ca0d73e..643f3e5 100644 --- a/FCL/WebApi/WebApi.csproj.user +++ b/FCL/WebApi/WebApi.csproj.user @@ -8,7 +8,7 @@ - Debug|Any CPU + Release|Any CPU