Просмотр исходного кода

短信限制,上传下载修改,app工单添加展示权限,日期分布表

duhongyu лет назад: 6
Родитель
Сommit
675002a0fd

+ 2 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Configs/system.config

@@ -36,4 +36,6 @@
36 36
   <add key="Redis_Defaultdatabase" value="2" />
37 37
   <!-- 录音存储地址 -->
38 38
   <add key="Sound_recording" value="D:\CallCenter_Sound\" />
39
+  <!-- 是否显示工单 -->
40
+  <add key="display" value="1" />
39 41
 </appSettings>

+ 9 - 4
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/ApplicationsVersionController.cs

@@ -128,13 +128,14 @@ namespace CallCenterApi.Interface.Controllers
128 128
             }
129 129
          
130 130
             List<Model.T_Sys_ApplicationsVersion> modlelist = new BLL.T_Sys_ApplicationsVersion().DataTableToList(dt);
131
+
131 132
             if (modlelist.Count > 0)
132 133
             {
133 134
                 var obj = new
134 135
                 {
135 136
                     state = "success",
136 137
                     message = "成功",
137
-                    rows = modlelist,
138
+                    rows = modeltoip(modlelist),
138 139
                     total = recordCount
139 140
                 };
140 141
 
@@ -151,10 +152,10 @@ namespace CallCenterApi.Interface.Controllers
151 152
             DataTable dt = new DataTable();
152 153
             if (!string.IsNullOrEmpty(ids))
153 154
             {
154
-                dt = DbHelperSQL.Query("select * from T_Sys_Accessories where F_FileId in (" + ids + ")").Tables[0];
155
+                dt = DbHelperSQL.Query("select * from T_Sys_Accessories where F_Id in (" + ids + ")").Tables[0];
155 156
                 foreach (DataRow dr in dt.Rows)
156 157
                 {
157
-                    dr["F_FileUrl"] = prefix + dr["F_FileUrl"].ToString();
158
+                    dr["F_Url"] = prefix + dr["F_Url"].ToString();
158 159
                 }
159 160
             }
160 161
             return dt;
@@ -178,6 +179,7 @@ namespace CallCenterApi.Interface.Controllers
178 179
                     app.F_Sort = (int )it.F_Sort;
179 180
                     app.F_Remarks = it.F_Remarks;
180 181
                     app.FileUrl = GetFileData(it.F_Files, configfj.F_ParamValue);
182
+                    model.Add(app);
181 183
                 }
182 184
             }
183 185
             return model;
@@ -200,11 +202,14 @@ namespace CallCenterApi.Interface.Controllers
200 202
                 var model = ApplicationsBLL.GetModel(id);
201 203
                 if (model == null)
202 204
                     return Error("该应用不存在");
205
+                List<Model.T_Sys_ApplicationsVersion> modlelist = new List<Model.T_Sys_ApplicationsVersion>();
206
+                modlelist.Add(model);
207
+
203 208
                 var obj = new
204 209
                 {
205 210
                     state = "success",
206 211
                     message = "成功",
207
-                    rows = model,
212
+                    rows = modeltoip(modlelist),
208 213
                 };
209 214
                 return Content(obj.ToJson());
210 215
             }

+ 80 - 9
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/IndexController.cs

@@ -95,14 +95,78 @@ namespace CallCenterApi.Interface.Controllers
95 95
             }
96 96
             return NoToken("未知错误,请重新登录");
97 97
         }
98
+        /// <summary>
99
+        /// APP上传图片
100
+        /// </summary>
101
+        /// <returns></returns>
102
+        public ActionResult Upload64()
103
+        {
104
+            //string dataurl = HttpUtility.UrlDecode(RequestString.GetFormString("dataurl"));
105
+            string dataurl = RequestString.GetFormString("dataurl");
106
+            string filename = RequestString.GetFormString("filename");
107
+            ActionResult res = NoToken("未知错误,请重新登录");
108
+            int userId = CurrentUser.UserData.F_UserId;
109
+            Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
110
+            if (userModel != null)
111
+            {
112
+                if (!string.IsNullOrEmpty(dataurl))
113
+                {
114
+                    string path = "/Upload/APP/" + DateTime.Now.ToString("yyyy") + "/" + DateTime.Now.ToString("MM") + "/" + DateTime.Now.ToString("dd") + "/";
115
+
116
+                    ImageUpload iu = new ImageUpload();
117
+                    iu.SavePath = path;
118
+                    iu.DataUrl = dataurl;
119
+                    if (!string.IsNullOrEmpty(filename))
120
+                    {
121
+                        iu.SaveType = 1;
122
+                        iu.InFileName = filename;
123
+                    }
124
+                    iu.Upload64();
98 125
 
126
+                    int n = iu.Error;
127
+                    if (n == 0)
128
+                    {
129
+                        path = path + iu.OutFileName;
130
+                        Model.T_Sys_Accessories model_T_Sys_Accessories = new Model.T_Sys_Accessories();
131
+                        model_T_Sys_Accessories.F_CreateTime = DateTime.Now;//上传时间
132
+                        model_T_Sys_Accessories.F_Name = iu.OutFileName;//附件名称
133
+                        model_T_Sys_Accessories.F_Type = ".jpg";//附件类型
134
+                        model_T_Sys_Accessories.F_Url = path;//附件地址
135
+                        model_T_Sys_Accessories.F_Size = iu.FileSize;
136
+                        //model_T_Sys_Accessories.F_UserCode = userModel.F_UserCode;//上传人  
137
+                        int id = new BLL.T_Sys_Accessories().Add(model_T_Sys_Accessories);
138
+                        model_T_Sys_Accessories.F_Id = id;
139
+                        userModel.F_PId = id;
140
+                        new BLL.T_Sys_UserAccount().Update(userModel);
141
+                        return Success("成功", model_T_Sys_Accessories);
142
+                    }
143
+                    else
144
+                    {
145
+                        string msg = string.Empty;
146
+                        switch (n)
147
+                        {
148
+                            case 1: msg = "请选择要上传的文件"; break;
149
+                            case 2: msg = "上传的文件类型不支持"; break;
150
+                            case 3: msg = "上传的文件过大"; break;
151
+                            case 4: msg = "未知错误"; break;
152
+                        }
153
+                        return Error(msg);
154
+                    }
155
+                }
156
+                else
157
+                {
158
+                    return Error("请选择要上传的文件");
159
+                }
160
+            }
161
+            return res;
162
+        }
99 163
         /// <summary>
100 164
         /// 上传用户图片
101 165
         /// </summary>
102 166
         /// <returns></returns>
103 167
         public ActionResult UploadTX64()
104 168
         {
105
-            
169
+            ActionResult res = NoToken("未知错误,请重新登录");
106 170
 
107 171
             if (Request.IsAuthenticated)
108 172
             {
@@ -126,12 +190,18 @@ namespace CallCenterApi.Interface.Controllers
126 190
                             int n = iu.Error;
127 191
                             if (n == 0)
128 192
                             {
129
-                                path = "/Upload/ZXTX/" + iu.OutFileName;
130
-
131
-                                userModel.F_See = path;
193
+                                path = path + iu.OutFileName;
194
+                                Model.T_Sys_Accessories model_T_Sys_Accessories = new Model.T_Sys_Accessories();
195
+                                model_T_Sys_Accessories.F_CreateTime = DateTime.Now;//上传时间
196
+                                model_T_Sys_Accessories.F_Name = iu.OutFileName;//附件名称
197
+                                model_T_Sys_Accessories.F_Type = ".jpg";//附件类型
198
+                                model_T_Sys_Accessories.F_Url = path;//附件地址
199
+                                model_T_Sys_Accessories.F_Size = iu.FileSize;
200
+                                int id = new BLL.T_Sys_Accessories().Add(model_T_Sys_Accessories);
201
+                                model_T_Sys_Accessories.F_Id = id;
202
+                                userModel.F_PId  = id;
132 203
                                 new BLL.T_Sys_UserAccount().Update(userModel);
133
-
134
-                                return Success("成功", path);
204
+                                res = Success("成功", path);
135 205
                             }
136 206
                             else
137 207
                             {
@@ -143,19 +213,20 @@ namespace CallCenterApi.Interface.Controllers
143 213
                                     case 3: msg = "上传的文件过大"; break;
144 214
                                     case 4: msg = "未知错误"; break;
145 215
                                 }
146
-                                return Error(msg);
216
+                                res = Error(msg);
147 217
                             }
148 218
                         }
149 219
                         else
150 220
                         {
151
-                            return Error("请选择要上传的文件");
221
+                            res = Error("请选择要上传的文件");
152 222
                         }
153 223
                     }
154 224
                 }
155 225
 
156 226
             }
157
-            return NoToken("未知错误,请重新登录");
227
+            return res;
158 228
         }
229
+
159 230
         /// <summary>
160 231
         /// 通话记录数量
161 232
         /// </summary>

+ 10 - 5
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/UserAccountController.cs

@@ -117,7 +117,7 @@ namespace CallCenterApi.Interface.Controllers
117 117
                     Model.T_Sys_Department deptModel = new BLL.T_Sys_Department().GetModel(filter.dptid);
118 118
                     if (deptModel != null)
119 119
                     {
120
-                        sql += " and F_DeptId in ( select F_DeptId from T_Sys_Department where F_DeptCode like '" + deptModel.F_DeptCode + "%') ";
120
+                        sql += " and F_DeptId in ( select F_DeptId from T_Sys_Department where F_DeptCode like '%" + deptModel.F_DeptCode + "%') ";
121 121
                     }
122 122
                 }
123 123
                 if (!string.IsNullOrWhiteSpace(filter.Key))
@@ -434,7 +434,12 @@ namespace CallCenterApi.Interface.Controllers
434 434
                     userAccountModel.F_PId  = input.Pid;
435 435
                 //if (input.GroupId != 0)
436 436
                 //    userAccountModel.F_GroupId = input.GroupId;
437
-                userAccountModel.F_SeatFlag = input.IsSeat;
437
+               
438
+                    if (userAccountModel.F_RoleId==4|| userAccountModel.F_RoleId == 17 || userAccountModel.F_RoleId == 1)
439
+                    userAccountModel.F_SeatFlag = true ;
440
+                else 
441
+                    userAccountModel.F_SeatFlag = input.IsSeat;
442
+                
438 443
                 if (input.SearRight != null)
439 444
                     userAccountModel.F_SeatRight = input.SearRight;
440 445
                 if (input.Post != null)
@@ -591,10 +596,10 @@ namespace CallCenterApi.Interface.Controllers
591 596
             DataTable dt = new DataTable();
592 597
             if (!string.IsNullOrEmpty(ids))
593 598
             {
594
-                dt = DbHelperSQL.Query("select * from T_Sys_Accessories where F_FileId in (" + ids + ")").Tables[0];
599
+                dt = DbHelperSQL.Query("select * from T_Sys_Accessories where F_Id in (" + ids + ")").Tables[0];
595 600
                 foreach (DataRow dr in dt.Rows)
596 601
                 {
597
-                    dr["F_FileUrl"] = prefix + dr["F_FileUrl"].ToString();
602
+                    dr["F_Url"] = prefix + dr["F_Url"].ToString();
598 603
                 }
599 604
             }
600 605
             return dt;
@@ -606,7 +611,7 @@ namespace CallCenterApi.Interface.Controllers
606 611
             {
607 612
             string display = Configs.GetValue("display");
608 613
                 Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(CurrentUser.UserData.F_UserId);
609
-                if (userModel == null)
614
+              if (userModel == null)
610 615
                     return Error("获取失败");
611 616
                 var configfj = new BLL.T_Sys_SystemConfig().GetModelList(" F_ParamCode='FileUrlPath' ").FirstOrDefault();
612 617
                 Model.T_Sys_RoleInfo roleModel = new BLL.T_Sys_RoleInfo().GetModel(userModel.F_RoleId);

+ 68 - 3
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/BusinessController.cs

@@ -14,6 +14,64 @@ namespace CallCenterApi.Interface.Controllers.report
14 14
   //  [Authority]
15 15
     public class BusinessController : BaseController
16 16
     {
17
+        public ActionResult ExitUserCode(int deptid)
18
+        {
19
+            Model.T_Sys_Department deptModel = new BLL.T_Sys_Department().GetModel(deptid);
20
+            string sql = "";
21
+            if (deptModel != null)
22
+            {
23
+                sql += " and F_DeptId in ( select F_DeptId from T_Sys_Department where F_DeptCode like '" + deptModel.F_DeptCode + "%') ";
24
+            }
25
+            DataTable dt = new DataTable();
26
+            DataTable depts = new DataTable();
27
+            int recordCount = 0;
28
+            depts = BLL.PagerBLL.GetListPager(
29
+                                       "T_Sys_UserAccount",
30
+                                       "F_UserId",
31
+                                       "*",
32
+                                       sql,
33
+                                       "",
34
+                                       1000000,
35
+                                       1,
36
+                                       true,
37
+                                        out recordCount
38
+                                      );
39
+            List<Model.UserAccount> modelList = new BLL.UserAccount().DataTableToList(depts);
40
+            #region 
41
+            dt.Columns.Add("姓名");
42
+            dt.Columns.Add("账号");
43
+            dt.Columns.Add("密码");
44
+            dt.Columns.Add("手机");
45
+            dt.Columns.Add("角色");
46
+            dt.Columns.Add("部门");
47
+            dt.Columns.Add("职位");
48
+            #endregion
49
+            foreach (var it in modelList)
50
+            {
51
+                DataRow drNew = dt.NewRow();
52
+                #region 基本字段
53
+                drNew["姓名"] = it.F_UserName;//序号
54
+                drNew["账号"] = it.F_UserCode;//姓名
55
+                drNew["密码"] = it.F_Password;//地址
56
+                drNew["手机"] = it.F_Mobile;
57
+                drNew["角色"] = it.F_RoleName;
58
+                drNew["部门"] = it.F_DeptName;
59
+                drNew["职位"] = it.F_Post;
60
+                ;
61
+                dt.Rows.Add(drNew);
62
+                #endregion
63
+            }
64
+            NPOIHelper npoi = new NPOIHelper();
65
+            if (npoi.ExportToExcel(deptModel.F_DeptName + "大区人员表", dt) == "")
66
+            {
67
+                return Success("导出成功");
68
+            }
69
+            else
70
+            {
71
+                return Error("导出失败");
72
+
73
+            }
74
+        }
17 75
         /// <summary>
18 76
         /// 坐席话务量
19 77
         /// </summary>
@@ -258,11 +316,18 @@ namespace CallCenterApi.Interface.Controllers.report
258 316
                     }
259 317
                     if(it .F_State ==4|| it.F_State == 10)
260 318
                     {
261
-                        var handletime = DateTime.Parse(it.F_DealTime.ToString()).Hour;
262
-                        if (handletime == i)
319
+                        try
263 320
                         {
264
-                            acceptancetime.handle++;
321
+                            var handletime = DateTime.Parse(it.F_DealTime.ToString()).Hour;
322
+                            if (handletime == i)
323
+                            {
324
+                                acceptancetime.handle++;
325
+                            }
326
+
265 327
                         }
328
+                        catch
329
+                        { }
330
+                       
266 331
                     }
267 332
                 }
268 333
                 bigDate.realtime.Add(realtime);

+ 15 - 14
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs

@@ -172,7 +172,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
172 172
                         case 1://待分派
173 173
                             sql += "AND F_State in(1)";
174 174
                             sql += RetuSql(ro, see, ua);
175
-                            if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "QTJS" || ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBTZX")
175
+                            if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "QTJS" )
176 176
                                 return Error("无操作权限");
177 177
                             break;
178 178
                         case 3://待处理
@@ -182,7 +182,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
182 182
                             {
183 183
                                 sql += "AND F_Notifications=" + ua.F_UserCode;
184 184
                             }
185
-                            if (ro.F_RoleCode == "QTJS" || ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBTZX")
185
+                            if (ro.F_RoleCode == "QTJS" )
186 186
                                 return Error("无操作权限");
187 187
                             break;
188 188
                         case 4://处理中
@@ -192,13 +192,13 @@ namespace CallCenterApi.Interface.Controllers.workorder
192 192
                             {
193 193
                                 sql += "AND F_Notifications=" + ua.F_UserCode;
194 194
                             }
195
-                            if (ro.F_RoleCode == "QTJS" || ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBTZX")
195
+                            if (ro.F_RoleCode == "QTJS" )
196 196
                                 return Error("无操作权限");
197 197
                             break;
198 198
                         case 5://退回待分派
199 199
                             sql += "AND F_State=5";
200 200
                             sql += RetuSql(ro, see, ua);
201
-                            if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "QTJS" || ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBTZX")
201
+                            if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "QTJS" )
202 202
                                 return Error("无操作权限");
203 203
                             break;
204 204
                         case 6://退回待提交
@@ -212,8 +212,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
212 212
                             sql += RetuSql(ro, see, ua);
213 213
                             if (ro.F_RoleCode == "YWY")
214 214
                                 sql += "AND F_DealUser=" + ua.F_UserCode;
215
-                            if (ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBTZX")
216
-                                sql += "AND F_CreateUser=" + ua.F_UserCode;
215
+                           // if (ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBTZX")
216
+                            //    sql += "AND F_CreateUser=" + ua.F_UserCode;
217 217
                             if (ro.F_RoleCode == "QTJS")
218 218
                                 return Error("无操作权限");
219 219
                             break;
@@ -478,6 +478,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
478 478
             #endregion
479 479
 
480 480
         }
481
+    
481 482
         /// <summary>
482 483
         /// 查询工单详情
483 484
         /// </summary>
@@ -686,15 +687,15 @@ namespace CallCenterApi.Interface.Controllers.workorder
686 687
                         if (isbj==1)
687 688
                         {
688 689
                             model.F_Duplicate = model.F_Type;
689
-                           model.F_Type  = 3;
690
-                        }
691
-                        var res = workorderBLL.Update(model);
692
-                        if (res)
693
-                        {
694
-                            AddLog(model.F_Id, (int)model.F_State , deptname + ua.F_UserName + "标记重复工单", 11, 11, "",0 ,ua,1);
695
-                            return Success("标记重复成功");
690
+                            workorderBLL.Update(model);
691
+                            model.F_Type = 3;
692
+                            var res = workorderBLL.Update(model);
693
+                            if (res)
694
+                            {
695
+                                AddLog(model.F_Id, (int)model.F_State, deptname + ua.F_UserName + "标记重复工单", 11, 11, "", 0, ua, 1);
696
+                                return Success("标记重复成功");
697
+                            }
696 698
                         }
697
-                          
698 699
                         else
699 700
                             return Error("标记重复失败!");
700 701
                     }

Разница между файлами не показана из-за своего большого размера
+ 40 - 33
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkorderAppController.cs


+ 5 - 3
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Global.asax.cs

@@ -51,7 +51,8 @@ namespace CallCenterApi.Interface
51 51
                             int a = (int)modellast.F_IsSMS ;
52 52
                             if (id.TotalMinutes >= 120 + a*10 && id.TotalMinutes < 130 +a * 10)
53 53
                             {
54
-                                SendSMS(modellast);
54
+                                bool n = SendSMS(modellast);
55
+                                if (n)
55 56
                                 AddLog(modellast, a + 1);
56 57
                             }
57 58
                             else
@@ -59,8 +60,9 @@ namespace CallCenterApi.Interface
59 60
                         }
60 61
                         catch
61 62
                         {
62
-                            SendSMS(modellast);
63
-                            AddLog(modellast, 1);
63
+                              bool n = SendSMS(modellast);
64
+                                 if (n)
65
+                                AddLog(modellast, 1);
64 66
                         }
65 67
                     }
66 68
                 }

+ 1 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Web.config

@@ -22,7 +22,7 @@
22 22
   </connectionStrings>
23 23
   <system.web>
24 24
     <compilation debug="true" targetFramework="4.5"/>
25
-    <httpRuntime targetFramework="4.5"/>
25
+    <httpRuntime targetFramework="4.5" maxRequestLength="20971520" executionTimeout="360000"/>
26 26
     <httpModules>
27 27
       <add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web"/>
28 28
     </httpModules>

+ 1 - 1
codegit/CallCenterCommon/CallCenter.Utility/FileUp.cs

@@ -149,7 +149,7 @@ namespace CallCenter.Utility
149 149
         public string Upload(HttpPostedFile hpFile, string path)
150 150
         {
151 151
             path = HttpContext.Current.Server.MapPath("..") + path;
152
-            string newName = "(" + DateTime.Now.ToString("yyyyMMddHHmmssfff") + ")" + hpFile.FileName;
152
+            string newName = "" + DateTime.Now.ToString("yyyyMMddHHmmssfff") + "" + hpFile.FileName;
153 153
             int iLen = hpFile.ContentLength;
154 154
             if (!Directory.Exists(path)) Directory.CreateDirectory(path);
155 155
             byte[] bData = new byte[iLen];

+ 50 - 3
codegit/CallCenterCommon/CallCenter.Utility/NPOI/NPOIHelper.cs

@@ -792,6 +792,7 @@ namespace CallCenter.Utility
792 792
                 NPOI.SS.UserModel.IFont cellfont = workbook.CreateFont();
793 793
                 cellfont.Boldweight = (short)FontBoldWeight.Normal;
794 794
                 cellStyle.SetFont(cellfont);
795
+               
795 796
                 ICellStyle cellStylebt = workbook.CreateCellStyle();
796 797
                 cellStylebt.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
797 798
                 cellStylebt.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
@@ -809,7 +810,11 @@ namespace CallCenter.Utility
809 810
                 cell1.CellStyle = cellStylebt;
810 811
                 sheet.AddMergedRegion(new CellRangeAddress(0, 0, 0, 13));
811 812
                 #region 产品投诉情况
812
-                
813
+                ICellStyle cellStylebt1 = workbook.CreateCellStyle();
814
+                cellStylebt1.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
815
+                cellStylebt1.SetFont(cellfontbt);
816
+                cellStylebt1.VerticalAlignment = VerticalAlignment.Center;
817
+                cellStylebt1.Alignment = HorizontalAlignment.Center;
813 818
                 IRow irow2 = sheet.CreateRow(1);
814 819
                 ICell cell2 = irow2.CreateCell(0);
815 820
                 ICellStyle style13 = workbook.CreateCellStyle();
@@ -1010,9 +1015,11 @@ namespace CallCenter.Utility
1010 1015
                     {
1011 1016
                         if (i ==0 || t + i== structure)
1012 1017
                         {
1018
+                             if (Factory1.Count > i*2)
1019
+                            {
1013 1020
                                 for (int j = 0; j < 6; j++)
1014 1021
                                 {
1015
-                                    string msg = ReturnMsg(j ,i ,Factory1 );
1022
+                                    string msg = ReturnMsg(j, i, Factory1);
1016 1023
                                     if (i == 0)
1017 1024
                                     {
1018 1025
                                         ICell cell8 = irow5.CreateCell(j + 1);
@@ -1026,6 +1033,8 @@ namespace CallCenter.Utility
1026 1033
                                         cell9.CellStyle = cellStylebt;
1027 1034
                                     }
1028 1035
                                 }
1036
+                            }
1037
+                               
1029 1038
                             if (i ==0)
1030 1039
                             {
1031 1040
                                 for (int z = 0; z < 3; z++)
@@ -1057,6 +1066,8 @@ namespace CallCenter.Utility
1057 1066
                             }
1058 1067
                             else 
1059 1068
                             {
1069
+                                ICell cell119 = irow7.CreateCell(0);
1070
+                                cell119.CellStyle = cellStylebt;
1060 1071
                                 for (int z = 0; z < 3; z++)
1061 1072
                                 {
1062 1073
                                     switch (z)
@@ -1235,7 +1246,42 @@ namespace CallCenter.Utility
1235 1246
                                 ICell cell126 = irow6.CreateCell(11);
1236 1247
                                 cell126.CellStyle = cellStylebt;
1237 1248
                             }
1238
-                             if (i ==count -1)
1249
+                            if (!istrue )
1250
+                            {
1251
+                                if (i * 2 >= Factory1.Count)
1252
+                                {
1253
+                                    ICell cell119 = irow6.CreateCell(0);
1254
+                                    cell119.CellStyle = cellStylebt;
1255
+                                }
1256
+                                if (i *2 >= Factory1.Count&i < Factory2.Count)
1257
+                                {
1258
+                                    ICell cell119 = irow6.CreateCell(7);
1259
+                                    cell119.CellStyle = cellStylebt;
1260
+                                }
1261
+                                if (i > Factory2.Count)
1262
+                                {
1263
+                                    ICell cell119 = irow6.CreateCell(7);
1264
+                                    cell119.CellStyle = cellStylebt;
1265
+                                }
1266
+                                if (i == count - 1)
1267
+                                {
1268
+                                    ICell cell119 = irow6.CreateCell(1);
1269
+                                    cell119.CellStyle = cellStylebt1;
1270
+                                    ICell cell121 = irow6.CreateCell(2);
1271
+                                    cell121.CellStyle = cellStylebt1;
1272
+                                    ICell cell132 = irow6.CreateCell(3);
1273
+                                    cell132.CellStyle = cellStylebt1;
1274
+                                    ICell cell128 = irow6.CreateCell(4);
1275
+                                    cell128.CellStyle = cellStylebt1;
1276
+                                    ICell cell129 = irow6.CreateCell(5);
1277
+                                    cell129.CellStyle = cellStylebt1;
1278
+                                    ICell cell130 = irow6.CreateCell(6);
1279
+                                    cell130.CellStyle = cellStylebt1;
1280
+                                    ICell cell131 = irow6.CreateCell(9);
1281
+                                    cell131.CellStyle = cellStylebt1;
1282
+                                }
1283
+                            }
1284
+                            else  if (i == count - 1)
1239 1285
                             {
1240 1286
                                 ICell cell119 = irow6.CreateCell(0);
1241 1287
                                 cell119.CellStyle = cellStylebt;
@@ -1251,6 +1297,7 @@ namespace CallCenter.Utility
1251 1297
                                 cell130.CellStyle = cellStylebt;
1252 1298
                             }
1253 1299
                         }
1300
+
1254 1301
                     }
1255 1302
                 }
1256 1303