|
|
@@ -569,13 +569,13 @@ namespace CallCenter.Utility
|
|
569
|
569
|
{
|
|
570
|
570
|
ICell cell101 = irow3list[td].CreateCell(3 * dt - 3);
|
|
571
|
571
|
cell101.SetCellValue(it.name );
|
|
572
|
|
- cell101.CellStyle = cellStyle;
|
|
|
572
|
+ cell101.CellStyle = cellStylebt;
|
|
573
|
573
|
ICell cell102 = irow3list[td].CreateCell(3 * dt - 2);
|
|
574
|
574
|
cell102.SetCellValue(it .number );
|
|
575
|
|
- cell102.CellStyle = cellStyle;
|
|
|
575
|
+ cell102.CellStyle = cellStylebt;
|
|
576
|
576
|
ICell cell103= irow3list[td].CreateCell(3 * dt-1 );
|
|
577
|
577
|
cell103.SetCellValue(it.Proportion );
|
|
578
|
|
- cell103.CellStyle = cellStyle;
|
|
|
578
|
+ cell103.CellStyle = cellStylebt;
|
|
579
|
579
|
}
|
|
580
|
580
|
else
|
|
581
|
581
|
{
|
|
|
@@ -583,13 +583,13 @@ namespace CallCenter.Utility
|
|
583
|
583
|
td++;
|
|
584
|
584
|
ICell cell101 = irow3list[td].CreateCell(3 * dt - 3);
|
|
585
|
585
|
cell101.SetCellValue(it.name);
|
|
586
|
|
- cell101.CellStyle = cellStyle;
|
|
|
586
|
+ cell101.CellStyle = cellStylebt;
|
|
587
|
587
|
ICell cell102 = irow3list[td].CreateCell(3 * dt - 2);
|
|
588
|
588
|
cell102.SetCellValue(it.number);
|
|
589
|
|
- cell102.CellStyle = cellStyle;
|
|
|
589
|
+ cell102.CellStyle = cellStylebt;
|
|
590
|
590
|
ICell cell103 = irow3list[td].CreateCell(3 * dt-1);
|
|
591
|
591
|
cell103.SetCellValue(it.Proportion);
|
|
592
|
|
- cell103.CellStyle = cellStyle;
|
|
|
592
|
+ cell103.CellStyle = cellStylebt;
|
|
593
|
593
|
}
|
|
594
|
594
|
}
|
|
595
|
595
|
|
|
|
@@ -611,13 +611,13 @@ namespace CallCenter.Utility
|
|
611
|
611
|
IRow irow5 = sheet.CreateRow(dtrow);
|
|
612
|
612
|
ICell cell51 = irow5.CreateCell(0);
|
|
613
|
613
|
cell51.SetCellValue(dt2.name);
|
|
614
|
|
- cell51.CellStyle = cellStyle;
|
|
|
614
|
+ cell51.CellStyle = cellStylebt;
|
|
615
|
615
|
ICell cell52 = irow5.CreateCell(1);
|
|
616
|
616
|
cell52.SetCellValue(dt2.number);
|
|
617
|
|
- cell52.CellStyle = cellStyle;
|
|
|
617
|
+ cell52.CellStyle = cellStylebt;
|
|
618
|
618
|
ICell cell53 = irow5.CreateCell(2);
|
|
619
|
619
|
cell53.SetCellValue(dt2.Proportion);
|
|
620
|
|
- cell53.CellStyle = cellStyle;
|
|
|
620
|
+ cell53.CellStyle = cellStylebt;
|
|
621
|
621
|
}
|
|
622
|
622
|
|
|
623
|
623
|
#endregion
|
|
|
@@ -635,13 +635,13 @@ namespace CallCenter.Utility
|
|
635
|
635
|
IRow irow10 = sheet.CreateRow(dtrow);
|
|
636
|
636
|
ICell cell53 = irow10.CreateCell(0);
|
|
637
|
637
|
cell53.SetCellValue(dt3.name);
|
|
638
|
|
- cell53.CellStyle = cellStyle;
|
|
|
638
|
+ cell53.CellStyle = cellStylebt;
|
|
639
|
639
|
ICell cell54 = irow10.CreateCell(1);
|
|
640
|
640
|
cell54.SetCellValue(dt3.number);
|
|
641
|
|
- cell54.CellStyle = cellStyle;
|
|
|
641
|
+ cell54.CellStyle = cellStylebt;
|
|
642
|
642
|
ICell cell55 = irow10.CreateCell(2);
|
|
643
|
643
|
cell55.SetCellValue(dt3.Proportion);
|
|
644
|
|
- cell55.CellStyle = cellStyle;
|
|
|
644
|
+ cell55.CellStyle = cellStylebt;
|
|
645
|
645
|
}
|
|
646
|
646
|
|
|
647
|
647
|
#endregion
|
|
|
@@ -660,13 +660,13 @@ namespace CallCenter.Utility
|
|
660
|
660
|
IRow irow12 = sheet.CreateRow(dtrow);
|
|
661
|
661
|
ICell cell55 = irow12.CreateCell(0);
|
|
662
|
662
|
cell55.SetCellValue(dt4.name);
|
|
663
|
|
- cell55.CellStyle = cellStyle;
|
|
|
663
|
+ cell55.CellStyle = cellStylebt;
|
|
664
|
664
|
ICell cell56 = irow12.CreateCell(1);
|
|
665
|
665
|
cell56.SetCellValue(dt4.number);
|
|
666
|
|
- cell56.CellStyle = cellStyle;
|
|
|
666
|
+ cell56.CellStyle = cellStylebt;
|
|
667
|
667
|
ICell cell57 = irow12.CreateCell(2);
|
|
668
|
668
|
cell57.SetCellValue(dt4.Proportion);
|
|
669
|
|
- cell57.CellStyle = cellStyle;
|
|
|
669
|
+ cell57.CellStyle = cellStylebt;
|
|
670
|
670
|
}
|
|
671
|
671
|
|
|
672
|
672
|
|
|
|
@@ -686,20 +686,21 @@ namespace CallCenter.Utility
|
|
686
|
686
|
IRow irow15 = sheet.CreateRow(dtrow);
|
|
687
|
687
|
ICell cell57 = irow15.CreateCell(0);
|
|
688
|
688
|
cell57.SetCellValue(dt4.name);
|
|
689
|
|
- cell57.CellStyle = cellStyle;
|
|
|
689
|
+ cell57.CellStyle = cellStylebt;
|
|
690
|
690
|
ICell cell58 = irow15.CreateCell(1);
|
|
691
|
691
|
cell58.SetCellValue(dt4.number);
|
|
692
|
|
- cell58.CellStyle = cellStyle;
|
|
|
692
|
+ cell58.CellStyle = cellStylebt;
|
|
693
|
693
|
ICell cell59 = irow15.CreateCell(2);
|
|
694
|
694
|
cell59.SetCellValue(dt5.Proportion);
|
|
695
|
|
- cell59.CellStyle = cellStyle;
|
|
|
695
|
+ cell59.CellStyle = cellStylebt;
|
|
696
|
696
|
}
|
|
697
|
697
|
|
|
698
|
698
|
#endregion
|
|
699
|
699
|
//自适应列宽度
|
|
700
|
700
|
for (int i = 0; i < 8; i++)
|
|
701
|
701
|
{
|
|
702
|
|
- sheet.AutoSizeColumn(i);
|
|
|
702
|
+ // sheet.AutoSizeColumn(i);
|
|
|
703
|
+ sheet.SetColumnWidth(i, 12 * 256);
|
|
703
|
704
|
}
|
|
704
|
705
|
|
|
705
|
706
|
using (MemoryStream ms = new MemoryStream())
|
|
|
@@ -749,6 +750,32 @@ namespace CallCenter.Utility
|
|
749
|
750
|
}
|
|
750
|
751
|
}
|
|
751
|
752
|
}
|
|
|
753
|
+ private string ReturnMsg(int j, int i, List<Factory> Factory1)
|
|
|
754
|
+ {
|
|
|
755
|
+ string msg = "";
|
|
|
756
|
+ switch (j)
|
|
|
757
|
+ {
|
|
|
758
|
+ case 0:
|
|
|
759
|
+ msg = Factory1[i * 2].name;
|
|
|
760
|
+ break;
|
|
|
761
|
+ case 1:
|
|
|
762
|
+ msg = Factory1[i * 2].number.ToString();
|
|
|
763
|
+ break;
|
|
|
764
|
+ case 2:
|
|
|
765
|
+ msg = Factory1[i * 2].proportion;
|
|
|
766
|
+ break;
|
|
|
767
|
+ case 3:
|
|
|
768
|
+ msg = Factory1[i * 2 + 1].name;
|
|
|
769
|
+ break;
|
|
|
770
|
+ case 4:
|
|
|
771
|
+ msg = Factory1[i * 2 + 1].number.ToString();
|
|
|
772
|
+ break;
|
|
|
773
|
+ case 5:
|
|
|
774
|
+ msg = Factory1[i * 2 + 1].proportion;
|
|
|
775
|
+ break;
|
|
|
776
|
+ }
|
|
|
777
|
+ return msg;
|
|
|
778
|
+ }
|
|
752
|
779
|
/// <summary>
|
|
753
|
780
|
/// 投诉产品日期分布表
|
|
754
|
781
|
/// </summary>
|
|
|
@@ -761,10 +788,15 @@ namespace CallCenter.Utility
|
|
761
|
788
|
HSSFWorkbook workbook = new HSSFWorkbook();
|
|
762
|
789
|
ISheet sheet = workbook.CreateSheet("Sheet1");
|
|
763
|
790
|
ICellStyle cellStyle = workbook.CreateCellStyle();
|
|
|
791
|
+
|
|
764
|
792
|
NPOI.SS.UserModel.IFont cellfont = workbook.CreateFont();
|
|
765
|
793
|
cellfont.Boldweight = (short)FontBoldWeight.Normal;
|
|
766
|
794
|
cellStyle.SetFont(cellfont);
|
|
767
|
795
|
ICellStyle cellStylebt = workbook.CreateCellStyle();
|
|
|
796
|
+ cellStylebt.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
|
|
|
797
|
+ cellStylebt.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
|
|
|
798
|
+ cellStylebt.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
|
|
|
799
|
+ cellStylebt.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
|
|
768
|
800
|
NPOI.SS.UserModel.IFont cellfontbt = workbook.CreateFont();
|
|
769
|
801
|
cellfontbt.Boldweight = (short)FontBoldWeight.Bold;
|
|
770
|
802
|
|
|
|
@@ -781,14 +813,20 @@ namespace CallCenter.Utility
|
|
781
|
813
|
IRow irow2 = sheet.CreateRow(1);
|
|
782
|
814
|
ICell cell2 = irow2.CreateCell(0);
|
|
783
|
815
|
ICellStyle style13 = workbook.CreateCellStyle();
|
|
|
816
|
+ style13.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
|
|
|
817
|
+ style13.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
|
|
|
818
|
+ style13.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
|
|
|
819
|
+ style13.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
|
|
784
|
820
|
style13.BorderDiagonalLineStyle = BorderStyle.Thin;
|
|
785
|
821
|
style13.BorderDiagonal = BorderDiagonal.Backward;
|
|
786
|
822
|
style13.BorderDiagonalColor = IndexedColors.Black .Index;
|
|
787
|
|
- StringBuilder sb = new StringBuilder();
|
|
788
|
|
- sb.AppendLine("数量".PadLeft(15));//该行不足长度10在左侧填空格
|
|
789
|
|
- sb.AppendLine("日期".PadRight(15));//该行不足长度10在右侧填空格
|
|
790
|
|
- cell2.SetCellValue(sb.ToString ());
|
|
|
823
|
+ string sb = " 数量\n日期";
|
|
|
824
|
+ // StringBuilder sb = new StringBuilder();
|
|
|
825
|
+ // sb.AppendLine("数量".PadLeft(15));//该行不足长度10在左侧填空格
|
|
|
826
|
+ // sb.AppendLine("日期".PadRight(15));//该行不足长度10在右侧填空格
|
|
|
827
|
+ cell2.SetCellValue(sb);
|
|
791
|
828
|
cell2.CellStyle = cellStylebt;
|
|
|
829
|
+ style13.WrapText = true;
|
|
792
|
830
|
irow2.GetCell(0).CellStyle = style13;
|
|
793
|
831
|
sheet.AddMergedRegion(new CellRangeAddress(1, 2, 0,0 ));
|
|
794
|
832
|
ICell cell6 = irow2.CreateCell(1);
|
|
|
@@ -801,16 +839,16 @@ namespace CallCenter.Utility
|
|
801
|
839
|
switch (i)
|
|
802
|
840
|
{
|
|
803
|
841
|
case 0:
|
|
804
|
|
- msg = datetime.AddMonths(-11).Month + "-" + datetime.AddMonths(-4).Month + "月份日期";
|
|
|
842
|
+ msg = datetime.AddMonths(-11).Month + "-" + datetime.AddMonths(-3).Month + "月份日期";
|
|
805
|
843
|
break;
|
|
806
|
844
|
case 1:
|
|
807
|
|
- msg = datetime.AddMonths(-3).Month + "月份日期";
|
|
|
845
|
+ msg = datetime.AddMonths(-2).Month + "月份日期";
|
|
808
|
846
|
break;
|
|
809
|
847
|
case 2:
|
|
810
|
|
- msg = datetime.AddMonths(-2).Month + "月份日期";
|
|
|
848
|
+ msg = datetime.AddMonths(-1).Month + "月份日期";
|
|
811
|
849
|
break;
|
|
812
|
850
|
case 3:
|
|
813
|
|
- msg = datetime.AddMonths(-1).Month + "月份日期";
|
|
|
851
|
+ msg = datetime.Month + "月份日期";
|
|
814
|
852
|
break;
|
|
815
|
853
|
case 4:
|
|
816
|
854
|
msg = "不清楚日期";
|
|
|
@@ -819,6 +857,8 @@ namespace CallCenter.Utility
|
|
819
|
857
|
ICell cell3 = irow2.CreateCell(i *2+ 2 );
|
|
820
|
858
|
cell3.SetCellValue(msg);
|
|
821
|
859
|
cell3.CellStyle = cellStylebt;
|
|
|
860
|
+ ICell cell4 = irow2.CreateCell(i * 2 + 3);
|
|
|
861
|
+ cell4.CellStyle = cellStylebt;
|
|
822
|
862
|
sheet.AddMergedRegion(new CellRangeAddress(1, 1, i * 2 + 2, i * 2 + 3));
|
|
823
|
863
|
}
|
|
824
|
864
|
IRow irow3 = sheet.CreateRow(2);
|
|
|
@@ -901,7 +941,7 @@ namespace CallCenter.Utility
|
|
901
|
941
|
}
|
|
902
|
942
|
}
|
|
903
|
943
|
}
|
|
904
|
|
- int t = dt1.Count + 3;int count = 0;
|
|
|
944
|
+ int t = dt1.Count + 2;int count = 0;
|
|
905
|
945
|
List<Factory> Factory1 = product.factory;
|
|
906
|
946
|
List<Factory> Factory2 = product.problem;
|
|
907
|
947
|
List<Factory> Factory3 = product.product;
|
|
|
@@ -923,77 +963,57 @@ namespace CallCenter.Utility
|
|
923
|
963
|
istrue = false;
|
|
924
|
964
|
count = total;
|
|
925
|
965
|
}
|
|
926
|
|
-
|
|
927
|
|
- IRow irow5 = sheet.CreateRow(t);
|
|
|
966
|
+ IRow irow5 = sheet.CreateRow(t+1);
|
|
928
|
967
|
ICell cell7 = irow5.CreateCell(0);
|
|
929
|
968
|
cell7.SetCellValue("工\n厂\n投\n诉\n占\n比\n");
|
|
|
969
|
+
|
|
930
|
970
|
cell7.CellStyle = cellStylebt;
|
|
931
|
|
- sheet.AddMergedRegion(new CellRangeAddress(t, t+ count, 0, 0));
|
|
|
971
|
+ cell7.CellStyle.WrapText=true ;
|
|
|
972
|
+ sheet.AddMergedRegion(new CellRangeAddress(t+1, t+ count, 0, 0));
|
|
932
|
973
|
ICell cell10 = irow5.CreateCell(7);
|
|
933
|
974
|
cell10.SetCellValue("各\n质\n量\n问\n题\n占\n比\n");
|
|
934
|
975
|
cell10.CellStyle = cellStylebt;
|
|
935
|
|
- int structure = 0;
|
|
|
976
|
+ cell10.CellStyle.WrapText = true;
|
|
|
977
|
+ int structure = t + problem;
|
|
936
|
978
|
if (istrue)
|
|
937
|
979
|
{
|
|
938
|
980
|
if (a >1)
|
|
939
|
981
|
{
|
|
940
|
982
|
structure = t + problem + a / 2;
|
|
941
|
|
- sheet.AddMergedRegion(new CellRangeAddress(t, t + problem + a / 2, 7, 7));
|
|
|
983
|
+ sheet.AddMergedRegion(new CellRangeAddress(t+1, t + problem + a / 2, 7, 7));
|
|
942
|
984
|
}
|
|
943
|
985
|
|
|
944
|
986
|
else
|
|
945
|
987
|
{
|
|
946
|
988
|
structure = t + problem;
|
|
947
|
|
- sheet.AddMergedRegion(new CellRangeAddress(t, t + problem + 1, 7, 7));
|
|
|
989
|
+ sheet.AddMergedRegion(new CellRangeAddress(t+1, t + problem, 7, 7));
|
|
948
|
990
|
}
|
|
949
|
991
|
}
|
|
950
|
992
|
else
|
|
951
|
|
- sheet.AddMergedRegion(new CellRangeAddress(t, t + problem, 7, 7));
|
|
952
|
|
- IRow irow7 = sheet.CreateRow(structure);
|
|
|
993
|
+ sheet.AddMergedRegion(new CellRangeAddress(t+1, t + problem, 7, 7));
|
|
|
994
|
+ IRow irow7 = sheet.CreateRow(structure+1);
|
|
953
|
995
|
ICell cell11 = irow7.CreateCell(7);
|
|
954
|
996
|
cell11.SetCellValue("结\n构\n占\n比\n");
|
|
955
|
997
|
cell11.CellStyle = cellStylebt;
|
|
|
998
|
+ cell11.CellStyle.WrapText = true;
|
|
956
|
999
|
if (istrue)
|
|
957
|
1000
|
{
|
|
958
|
1001
|
if (a > 1)
|
|
959
|
|
- sheet.AddMergedRegion(new CellRangeAddress(t + problem + a / 2+1, t + total + 1 +a/2, 7, 7));
|
|
|
1002
|
+ sheet.AddMergedRegion(new CellRangeAddress(structure + 1, structure+ productcode+a/2, 7, 7));
|
|
960
|
1003
|
else
|
|
961
|
|
- sheet.AddMergedRegion(new CellRangeAddress(t + problem + 2, t + total + 2, 7, 7));
|
|
|
1004
|
+ sheet.AddMergedRegion(new CellRangeAddress(structure + 1, structure + productcode+a, 7, 7));
|
|
962
|
1005
|
}
|
|
963
|
1006
|
else
|
|
964
|
|
- sheet.AddMergedRegion(new CellRangeAddress(t + problem+1, t + 1 + total, 7, 7));
|
|
|
1007
|
+ sheet.AddMergedRegion(new CellRangeAddress(structure + 1, structure + productcode, 7, 7));
|
|
965
|
1008
|
if (Factory1 != null)
|
|
966
|
1009
|
{
|
|
967
|
1010
|
for (int i = 0; i < count; i++)
|
|
968
|
1011
|
{
|
|
969
|
1012
|
if (i ==0 || t + i== structure)
|
|
970
|
1013
|
{
|
|
971
|
|
- if (i < Factory1.Count )
|
|
972
|
|
- {
|
|
973
|
1014
|
for (int j = 0; j < 6; j++)
|
|
974
|
1015
|
{
|
|
975
|
|
- string msg = "";
|
|
976
|
|
- switch (j)
|
|
977
|
|
- {
|
|
978
|
|
- case 0:
|
|
979
|
|
- msg = Factory1[i * 2].name;
|
|
980
|
|
- break;
|
|
981
|
|
- case 1:
|
|
982
|
|
- msg = Factory1[i * 2].number.ToString();
|
|
983
|
|
- break;
|
|
984
|
|
- case 2:
|
|
985
|
|
- msg = Factory1[i * 2].proportion;
|
|
986
|
|
- break;
|
|
987
|
|
- case 3:
|
|
988
|
|
- msg = Factory1[i * 2 + 1].name;
|
|
989
|
|
- break;
|
|
990
|
|
- case 4:
|
|
991
|
|
- msg = Factory1[i * 2 + 1].number.ToString();
|
|
992
|
|
- break;
|
|
993
|
|
- case 5:
|
|
994
|
|
- msg = Factory1[i * 2 + 1].proportion;
|
|
995
|
|
- break;
|
|
996
|
|
- }
|
|
|
1016
|
+ string msg = ReturnMsg(j ,i ,Factory1 );
|
|
997
|
1017
|
if (i == 0)
|
|
998
|
1018
|
{
|
|
999
|
1019
|
ICell cell8 = irow5.CreateCell(j + 1);
|
|
|
@@ -1002,64 +1022,64 @@ namespace CallCenter.Utility
|
|
1002
|
1022
|
}
|
|
1003
|
1023
|
else
|
|
1004
|
1024
|
{
|
|
1005
|
|
- ICell cell8 = irow7.CreateCell(j + 1);
|
|
1006
|
|
- cell8.SetCellValue(msg);
|
|
1007
|
|
- cell8.CellStyle = cellStylebt;
|
|
|
1025
|
+ ICell cell9 = irow7.CreateCell(j + 1);
|
|
|
1026
|
+ cell9.SetCellValue(msg);
|
|
|
1027
|
+ cell9.CellStyle = cellStylebt;
|
|
1008
|
1028
|
}
|
|
1009
|
|
-
|
|
1010
|
1029
|
}
|
|
1011
|
|
- }
|
|
1012
|
1030
|
if (i ==0)
|
|
1013
|
1031
|
{
|
|
1014
|
1032
|
for (int z = 0; z < 3; z++)
|
|
1015
|
1033
|
{
|
|
1016
|
|
- string msg = "";
|
|
1017
|
1034
|
switch (z)
|
|
1018
|
1035
|
{
|
|
1019
|
1036
|
case 0:
|
|
1020
|
|
- ICell cell8 = irow5.CreateCell(8);
|
|
1021
|
|
- cell8.SetCellValue(Factory2[0].name );
|
|
1022
|
|
- cell8.CellStyle = cellStylebt;
|
|
1023
|
|
- sheet.AddMergedRegion(new CellRangeAddress(t, t , 8, 9));
|
|
|
1037
|
+ ICell cell12 = irow5.CreateCell(8);
|
|
|
1038
|
+ cell12.SetCellValue(Factory2[0].name );
|
|
|
1039
|
+ cell12.CellStyle = cellStylebt;
|
|
|
1040
|
+ sheet.AddMergedRegion(new CellRangeAddress(t+1, t+1 , 8, 9));
|
|
|
1041
|
+ ICell cell22 = irow5.CreateCell(9);
|
|
|
1042
|
+ cell22.CellStyle = cellStylebt;
|
|
1024
|
1043
|
break;
|
|
1025
|
1044
|
case 1:
|
|
1026
|
|
- ICell cell9 = irow5.CreateCell(10);
|
|
1027
|
|
- cell9.SetCellValue(Factory2[0].number .ToString ());
|
|
1028
|
|
- cell9.CellStyle = cellStylebt;
|
|
|
1045
|
+ ICell cell13 = irow5.CreateCell(10);
|
|
|
1046
|
+ cell13.SetCellValue(Factory2[0].number .ToString ());
|
|
|
1047
|
+ cell13.CellStyle = cellStylebt;
|
|
1029
|
1048
|
|
|
1030
|
1049
|
break;
|
|
1031
|
1050
|
case 2:
|
|
1032
|
|
- ICell cell12 = irow5.CreateCell(11);
|
|
1033
|
|
- cell12.SetCellValue(Factory2[0].proportion);
|
|
1034
|
|
- cell12.CellStyle = cellStylebt;
|
|
|
1051
|
+ ICell cell14 = irow5.CreateCell(11);
|
|
|
1052
|
+ cell14.SetCellValue(Factory2[0].proportion);
|
|
|
1053
|
+ cell14.CellStyle = cellStylebt;
|
|
1035
|
1054
|
break;
|
|
1036
|
1055
|
}
|
|
1037
|
1056
|
|
|
1038
|
1057
|
}
|
|
1039
|
1058
|
}
|
|
1040
|
|
- else if (t + i == structure)
|
|
|
1059
|
+ else
|
|
1041
|
1060
|
{
|
|
1042
|
1061
|
for (int z = 0; z < 3; z++)
|
|
1043
|
1062
|
{
|
|
1044
|
|
- string msg = "";
|
|
1045
|
1063
|
switch (z)
|
|
1046
|
1064
|
{
|
|
1047
|
1065
|
case 0:
|
|
1048
|
|
- ICell cell8 = irow7.CreateCell(8);
|
|
1049
|
|
- cell8.SetCellValue(Factory3[1].name);
|
|
1050
|
|
- cell8.CellStyle = cellStylebt;
|
|
1051
|
|
- sheet.AddMergedRegion(new CellRangeAddress(structure, structure, 8, 9));
|
|
|
1066
|
+ ICell cell15 = irow7.CreateCell(8);
|
|
|
1067
|
+ cell15.SetCellValue(Factory3[0].name);
|
|
|
1068
|
+ cell15.CellStyle = cellStylebt;
|
|
|
1069
|
+ sheet.AddMergedRegion(new CellRangeAddress(structure+1, structure+1, 8, 9));
|
|
|
1070
|
+ ICell cell31 = irow7.CreateCell(9);
|
|
|
1071
|
+ cell15.CellStyle = cellStylebt;
|
|
1052
|
1072
|
break;
|
|
1053
|
1073
|
case 1:
|
|
1054
|
|
- ICell cell9 = irow7.CreateCell(10);
|
|
1055
|
|
- cell9.SetCellValue(Factory3[1].number.ToString());
|
|
1056
|
|
- cell9.CellStyle = cellStylebt;
|
|
|
1074
|
+ ICell cell16 = irow7.CreateCell(10);
|
|
|
1075
|
+ cell16.SetCellValue(Factory3[0].number.ToString());
|
|
|
1076
|
+ cell16.CellStyle = cellStylebt;
|
|
1057
|
1077
|
|
|
1058
|
1078
|
break;
|
|
1059
|
1079
|
case 2:
|
|
1060
|
|
- ICell cell12 = irow7.CreateCell(11);
|
|
1061
|
|
- cell12.SetCellValue(Factory3[1].proportion);
|
|
1062
|
|
- cell12.CellStyle = cellStylebt;
|
|
|
1080
|
+ ICell cell17= irow7.CreateCell(11);
|
|
|
1081
|
+ cell17.SetCellValue(Factory3[0].proportion);
|
|
|
1082
|
+ cell17.CellStyle = cellStylebt;
|
|
1063
|
1083
|
break;
|
|
1064
|
1084
|
}
|
|
1065
|
1085
|
|
|
|
@@ -1070,41 +1090,19 @@ namespace CallCenter.Utility
|
|
1070
|
1090
|
else
|
|
1071
|
1091
|
{
|
|
1072
|
1092
|
|
|
1073
|
|
- IRow irow6 = sheet.CreateRow(t + i);
|
|
1074
|
|
- if (i < Factory1.Count)
|
|
|
1093
|
+ IRow irow6 = sheet.CreateRow(t+1 + i);
|
|
|
1094
|
+
|
|
|
1095
|
+ if (i*2 < Factory1.Count)
|
|
1075
|
1096
|
{
|
|
1076
|
1097
|
for (int j = 0; j < 6; j++)
|
|
1077
|
1098
|
{
|
|
1078
|
|
- string msg = "";
|
|
1079
|
|
- switch (j)
|
|
1080
|
|
- {
|
|
1081
|
|
- case 0:
|
|
1082
|
|
- msg = Factory1[i * 2].name;
|
|
1083
|
|
- break;
|
|
1084
|
|
- case 1:
|
|
1085
|
|
- msg = Factory1[i * 2].number.ToString();
|
|
1086
|
|
- break;
|
|
1087
|
|
- case 2:
|
|
1088
|
|
- msg = Factory1[i * 2].proportion;
|
|
1089
|
|
- break;
|
|
1090
|
|
- case 3:
|
|
1091
|
|
- msg = Factory1[i * 2 + 1].name;
|
|
1092
|
|
- break;
|
|
1093
|
|
- case 4:
|
|
1094
|
|
- msg = Factory1[i * 2 + 1].number.ToString();
|
|
1095
|
|
- break;
|
|
1096
|
|
- case 5:
|
|
1097
|
|
- msg = Factory1[i * 2 + 1].proportion;
|
|
1098
|
|
- break;
|
|
1099
|
|
- }
|
|
1100
|
|
- ICell cell9 = irow6.CreateCell(j + 1);
|
|
1101
|
|
- cell9.SetCellValue(msg);
|
|
1102
|
|
- cell9.CellStyle = cellStylebt;
|
|
|
1099
|
+ string msg = ReturnMsg(j, i, Factory1);
|
|
|
1100
|
+ ICell cell18 = irow6.CreateCell(j + 1);
|
|
|
1101
|
+ cell18.SetCellValue(msg);
|
|
|
1102
|
+ cell18.CellStyle = cellStylebt;
|
|
1103
|
1103
|
}
|
|
1104
|
1104
|
}
|
|
1105
|
|
- if (istrue)
|
|
1106
|
|
- {
|
|
1107
|
|
- int b = 1;
|
|
|
1105
|
+ int b = 0;
|
|
1108
|
1106
|
if (a >1)
|
|
1109
|
1107
|
{
|
|
1110
|
1108
|
b= (a / 2) + (0 == a % 2 ? 0 : 1);
|
|
|
@@ -1113,14 +1111,15 @@ namespace CallCenter.Utility
|
|
1113
|
1111
|
{
|
|
1114
|
1112
|
for (int z = 0; z < 3; z++)
|
|
1115
|
1113
|
{
|
|
1116
|
|
- string msg = "";
|
|
1117
|
1114
|
switch (z)
|
|
1118
|
1115
|
{
|
|
1119
|
1116
|
case 0:
|
|
1120
|
1117
|
ICell cell8 = irow6.CreateCell(8);
|
|
1121
|
1118
|
cell8.SetCellValue(Factory2[i].name);
|
|
1122
|
1119
|
cell8.CellStyle = cellStylebt;
|
|
1123
|
|
- sheet.AddMergedRegion(new CellRangeAddress(t + i, t + i, 8, 9));
|
|
|
1120
|
+ sheet.AddMergedRegion(new CellRangeAddress(t+1 + i, t+1 + i, 8, 9));
|
|
|
1121
|
+ ICell cell22 = irow6.CreateCell(9);
|
|
|
1122
|
+ cell22.CellStyle = cellStylebt;
|
|
1124
|
1123
|
break;
|
|
1125
|
1124
|
case 1:
|
|
1126
|
1125
|
ICell cell9 = irow6.CreateCell(10);
|
|
|
@@ -1136,7 +1135,7 @@ namespace CallCenter.Utility
|
|
1136
|
1135
|
}
|
|
1137
|
1136
|
}
|
|
1138
|
1137
|
}
|
|
1139
|
|
- else if (i < Factory2.Count )
|
|
|
1138
|
+ else if (i == Factory2.Count-1 )
|
|
1140
|
1139
|
{
|
|
1141
|
1140
|
for (int z = 0; z < 3; z++)
|
|
1142
|
1141
|
{
|
|
|
@@ -1144,86 +1143,114 @@ namespace CallCenter.Utility
|
|
1144
|
1143
|
switch (z)
|
|
1145
|
1144
|
{
|
|
1146
|
1145
|
case 0:
|
|
1147
|
|
- ICell cell8 = irow7.CreateCell(8);
|
|
|
1146
|
+ ICell cell8 = irow6.CreateCell(8);
|
|
1148
|
1147
|
cell8.SetCellValue(Factory2[i].name);
|
|
1149
|
1148
|
cell8.CellStyle = cellStylebt;
|
|
1150
|
|
- sheet.AddMergedRegion(new CellRangeAddress(t + i, t + i+b , 8, 9));
|
|
|
1149
|
+ sheet.AddMergedRegion(new CellRangeAddress(t +1+ i, t+1 + i+b , 8, 9));
|
|
1151
|
1150
|
break;
|
|
1152
|
1151
|
case 1:
|
|
1153
|
|
- ICell cell9 = irow7.CreateCell(10);
|
|
|
1152
|
+ ICell cell9 = irow6.CreateCell(10);
|
|
1154
|
1153
|
cell9.SetCellValue(Factory2[i].number.ToString());
|
|
1155
|
1154
|
cell9.CellStyle = cellStylebt;
|
|
1156
|
|
- sheet.AddMergedRegion(new CellRangeAddress(t + i, t + i + b, 10, 10));
|
|
|
1155
|
+ sheet.AddMergedRegion(new CellRangeAddress(t+1 + i, t+1 + i + b, 10, 10));
|
|
1157
|
1156
|
|
|
1158
|
1157
|
break;
|
|
1159
|
1158
|
case 2:
|
|
1160
|
|
- ICell cell12 = irow7.CreateCell(11);
|
|
|
1159
|
+ ICell cell12 = irow6.CreateCell(11);
|
|
1161
|
1160
|
cell12.SetCellValue(Factory2[i].proportion);
|
|
1162
|
1161
|
cell12.CellStyle = cellStylebt;
|
|
1163
|
|
- sheet.AddMergedRegion(new CellRangeAddress(t + i, t + i + b, 11, 11));
|
|
|
1162
|
+ sheet.AddMergedRegion(new CellRangeAddress(t+1 + i, t+1 + i + b, 11, 11));
|
|
1164
|
1163
|
break;
|
|
1165
|
1164
|
}
|
|
|
1165
|
+
|
|
1166
|
1166
|
}
|
|
1167
|
1167
|
}
|
|
1168
|
1168
|
if (i <( Factory3.Count + Factory2.Count+b -1)&& i>= Factory2.Count + b)
|
|
1169
|
1169
|
{
|
|
1170
|
1170
|
for (int z = 0; z < 3; z++)
|
|
1171
|
1171
|
{
|
|
1172
|
|
- string msg = "";
|
|
|
1172
|
+
|
|
1173
|
1173
|
switch (z)
|
|
1174
|
1174
|
{
|
|
1175
|
1175
|
case 0:
|
|
1176
|
1176
|
ICell cell8 = irow6.CreateCell(8);
|
|
1177
|
1177
|
cell8.SetCellValue(Factory3[i- Factory2.Count -b ].name);
|
|
|
1178
|
+
|
|
1178
|
1179
|
cell8.CellStyle = cellStylebt;
|
|
1179
|
|
- sheet.AddMergedRegion(new CellRangeAddress(t + i, t + i, 8, 9));
|
|
|
1180
|
+ sheet.AddMergedRegion(new CellRangeAddress(t +1+ i, t +1+ i, 8, 9));
|
|
|
1181
|
+ ICell cel27 = irow6.CreateCell(9);
|
|
|
1182
|
+ cel27.CellStyle = cellStylebt;
|
|
1180
|
1183
|
break;
|
|
1181
|
1184
|
case 1:
|
|
1182
|
1185
|
ICell cell9 = irow6.CreateCell(10);
|
|
1183
|
|
- cell9.SetCellValue(Factory3[i - Factory2.Count - b].number.ToString());
|
|
|
1186
|
+ cell9.SetCellValue(Factory3[i - Factory2.Count - b ].number.ToString());
|
|
1184
|
1187
|
cell9.CellStyle = cellStylebt;
|
|
1185
|
1188
|
|
|
1186
|
1189
|
break;
|
|
1187
|
1190
|
case 2:
|
|
1188
|
1191
|
ICell cell12 = irow6.CreateCell(11);
|
|
1189
|
|
- cell12.SetCellValue(Factory3[i - Factory2.Count - b].proportion);
|
|
|
1192
|
+ cell12.SetCellValue(Factory3[i - Factory2.Count - b ].proportion);
|
|
1190
|
1193
|
cell12.CellStyle = cellStylebt;
|
|
1191
|
1194
|
break;
|
|
1192
|
1195
|
}
|
|
1193
|
1196
|
}
|
|
1194
|
1197
|
}
|
|
1195
|
|
- else if ( i >= Factory2.Count + b&& i < Factory2.Count + b+ Factory3.Count )
|
|
|
1198
|
+ else if ( i== Factory2.Count + b+ Factory3.Count-1 )
|
|
1196
|
1199
|
{
|
|
1197
|
1200
|
for (int z = 0; z < 3; z++)
|
|
1198
|
1201
|
{
|
|
1199
|
|
- string msg = "";
|
|
1200
|
1202
|
switch (z)
|
|
1201
|
1203
|
{
|
|
1202
|
1204
|
case 0:
|
|
1203
|
|
- ICell cell8 = irow7.CreateCell(8);
|
|
|
1205
|
+ ICell cell8 = irow6.CreateCell(8);
|
|
1204
|
1206
|
cell8.SetCellValue(Factory3[i - Factory2.Count - b].name);
|
|
1205
|
1207
|
cell8.CellStyle = cellStylebt;
|
|
1206
|
|
- sheet.AddMergedRegion(new CellRangeAddress(t + i, t + i + b, 8, 9));
|
|
|
1208
|
+ sheet.AddMergedRegion(new CellRangeAddress(t +1+ i, t+1 + i + b, 8, 9));
|
|
1207
|
1209
|
break;
|
|
1208
|
1210
|
case 1:
|
|
1209
|
|
- ICell cell9 = irow7.CreateCell(10);
|
|
|
1211
|
+ ICell cell9 = irow6.CreateCell(10);
|
|
1210
|
1212
|
cell9.SetCellValue(Factory3[i - Factory2.Count - b].number.ToString());
|
|
1211
|
1213
|
cell9.CellStyle = cellStylebt;
|
|
1212
|
|
- sheet.AddMergedRegion(new CellRangeAddress(t + i, t + i + b, 10, 10));
|
|
|
1214
|
+ sheet.AddMergedRegion(new CellRangeAddress(t + 1 + i, t + 1 + i + b, 10, 10));
|
|
1213
|
1215
|
|
|
1214
|
1216
|
break;
|
|
1215
|
1217
|
case 2:
|
|
1216
|
|
- ICell cell12 = irow7.CreateCell(11);
|
|
|
1218
|
+ ICell cell12 = irow6.CreateCell(11);
|
|
1217
|
1219
|
cell12.SetCellValue(Factory3[i - Factory2.Count - b].proportion);
|
|
1218
|
1220
|
cell12.CellStyle = cellStylebt;
|
|
1219
|
|
- sheet.AddMergedRegion(new CellRangeAddress(t + i, t + i + b, 11, 11));
|
|
|
1221
|
+ sheet.AddMergedRegion(new CellRangeAddress(t + 1 + i, t + 1 + i + b, 11, 11));
|
|
1220
|
1222
|
break;
|
|
1221
|
1223
|
}
|
|
1222
|
1224
|
}
|
|
1223
|
1225
|
}
|
|
1224
|
1226
|
|
|
|
1227
|
+
|
|
|
1228
|
+ if ( i == Factory2.Count)
|
|
|
1229
|
+ {
|
|
|
1230
|
+ ICell cell120 = irow6.CreateCell(7);
|
|
|
1231
|
+ cell120.CellStyle = cellStylebt;
|
|
|
1232
|
+ ICell cell124 = irow6.CreateCell(9);
|
|
|
1233
|
+ cell124.CellStyle = cellStylebt;
|
|
|
1234
|
+ ICell cell125 = irow6.CreateCell(10);
|
|
|
1235
|
+ cell125.CellStyle = cellStylebt;
|
|
|
1236
|
+ ICell cell126 = irow6.CreateCell(11);
|
|
|
1237
|
+ cell126.CellStyle = cellStylebt;
|
|
|
1238
|
+ }
|
|
|
1239
|
+ if (i ==count -1)
|
|
|
1240
|
+ {
|
|
|
1241
|
+ ICell cell119 = irow6.CreateCell(0);
|
|
|
1242
|
+ cell119.CellStyle = cellStylebt;
|
|
|
1243
|
+ ICell cell121 = irow6.CreateCell(7);
|
|
|
1244
|
+ cell121.CellStyle = cellStylebt;
|
|
|
1245
|
+ ICell cell132 = irow6.CreateCell(8);
|
|
|
1246
|
+ cell132.CellStyle = cellStylebt;
|
|
|
1247
|
+ ICell cell128 = irow6.CreateCell(9);
|
|
|
1248
|
+ cell128.CellStyle = cellStylebt;
|
|
|
1249
|
+ ICell cell129 = irow6.CreateCell(10);
|
|
|
1250
|
+ cell129.CellStyle = cellStylebt;
|
|
|
1251
|
+ ICell cell130 = irow6.CreateCell(11);
|
|
|
1252
|
+ cell130.CellStyle = cellStylebt;
|
|
1225
|
1253
|
}
|
|
1226
|
|
-
|
|
1227
|
1254
|
}
|
|
1228
|
1255
|
}
|
|
1229
|
1256
|
}
|