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

催单,推送,报表修改

duhongyu лет назад: 5
Родитель
Сommit
4d8431d922
18 измененных файлов с 832 добавлено и 351 удалено
  1. 19 8
      codegit/CallCenterApi/CallCenterApi.DAL/T_Wo_WorkOrderItem_New.cs
  2. 8 1
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/DepartmentController.cs
  3. 3 3
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/IndexController.cs
  4. 375 13
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/PushMessageController.cs
  5. 30 7
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/UserAccountController.cs
  6. 1 1
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/customer/CustomerController.cs
  7. 26 8
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/BusinessController.cs
  8. 15 2
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallrecordsController.cs
  9. 119 23
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs
  10. 2 2
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkTypeController.cs
  11. 94 36
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkorderAppController.cs
  12. 8 238
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Global.asax.cs
  13. 1 1
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Common/ButtonGroup.cs
  14. 6 0
      codegit/CallCenterApi/CallCenterApi.Model/T_Wo_WorkOrderItem_New.cs
  15. 35 8
      codegit/CallCenterCommon/CallCenter.Utility/NPOI/NPOIHelper.cs
  16. BIN
      codegit/CallCenterWeb/CallCenterWeb.UI/Bin/Google.ProtocolBuffers.dll
  17. 54 0
      codegit/PushMessage/Program.cs
  18. 36 0
      codegit/PushMessage/Properties/AssemblyInfo.cs

+ 19 - 8
codegit/CallCenterApi/CallCenterApi.DAL/T_Wo_WorkOrderItem_New.cs

@@ -39,9 +39,9 @@ namespace CallCenterApi.DAL
39 39
         {
40 40
             StringBuilder strSql = new StringBuilder();
41 41
             strSql.Append("insert into T_Wo_WorkOrderItem_New(");
42
-            strSql.Append("F_WoID,F_WoState,F_ItemType,F_OptType,F_OptContent,F_NextUser,F_NextDept,F_IsUsed,F_LimitTime,F_IsSMS,F_SMSToUser,F_SMSToPhone,F_SMSContent,F_CreateUser,F_CreateTime)");
42
+            strSql.Append("F_WoID,F_WoState,F_ItemType,F_OptType,F_OptContent,F_NextUser,F_NextDept,F_IsUsed,F_LimitTime,F_IsSMS,F_SMSToUser,F_SMSToPhone,F_SMSContent,F_CreateUser,F_Push,F_CreateTime)");
43 43
             strSql.Append(" values (");
44
-            strSql.Append("@F_WoID,@F_WoState,@F_ItemType,@F_OptType,@F_OptContent,@F_NextUser,@F_NextDept,@F_IsUsed,@F_LimitTime,@F_IsSMS,@F_SMSToUser,@F_SMSToPhone,@F_SMSContent,@F_CreateUser,@F_CreateTime)");
44
+            strSql.Append("@F_WoID,@F_WoState,@F_ItemType,@F_OptType,@F_OptContent,@F_NextUser,@F_NextDept,@F_IsUsed,@F_LimitTime,@F_IsSMS,@F_SMSToUser,@F_SMSToPhone,@F_SMSContent,@F_CreateUser,@F_Push,@F_CreateTime)");
45 45
             strSql.Append(";select @@IDENTITY");
46 46
             SqlParameter[] parameters = {
47 47
                     new SqlParameter("@F_WoID", SqlDbType.BigInt,8),
@@ -58,6 +58,7 @@ namespace CallCenterApi.DAL
58 58
                     new SqlParameter("@F_SMSToPhone", SqlDbType.VarChar,50),
59 59
                     new SqlParameter("@F_SMSContent", SqlDbType.NText),
60 60
                     new SqlParameter("@F_CreateUser", SqlDbType.VarChar,50),
61
+                     new SqlParameter("@F_Push", SqlDbType.Int,4),
61 62
                     new SqlParameter("@F_CreateTime", SqlDbType.DateTime)};
62 63
             parameters[0].Value = model.F_WoID;
63 64
             parameters[1].Value = model.F_WoState;
@@ -73,7 +74,8 @@ namespace CallCenterApi.DAL
73 74
             parameters[11].Value = model.F_SMSToPhone;
74 75
             parameters[12].Value = model.F_SMSContent;
75 76
             parameters[13].Value = model.F_CreateUser;
76
-            parameters[14].Value = model.F_CreateTime;
77
+            parameters[14].Value = model.F_Push;
78
+            parameters[15].Value = model.F_CreateTime;
77 79
 
78 80
             object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
79 81
             if (obj == null)
@@ -106,6 +108,8 @@ namespace CallCenterApi.DAL
106 108
             strSql.Append("F_SMSToPhone=@F_SMSToPhone,");
107 109
             strSql.Append("F_SMSContent=@F_SMSContent,");
108 110
             strSql.Append("F_CreateUser=@F_CreateUser,");
111
+            strSql.Append("F_Push=@F_Push,");
112
+            
109 113
             strSql.Append("F_CreateTime=@F_CreateTime");
110 114
             strSql.Append(" where F_ID=@F_ID");
111 115
             SqlParameter[] parameters = {
@@ -123,6 +127,8 @@ namespace CallCenterApi.DAL
123 127
                     new SqlParameter("@F_SMSToPhone", SqlDbType.VarChar,50),
124 128
                     new SqlParameter("@F_SMSContent", SqlDbType.NText),
125 129
                     new SqlParameter("@F_CreateUser", SqlDbType.VarChar,50),
130
+                        new SqlParameter("@F_Push", SqlDbType.Int,4),
131
+                    
126 132
                     new SqlParameter("@F_CreateTime", SqlDbType.DateTime),
127 133
                     new SqlParameter("@F_ID", SqlDbType.BigInt,8)};
128 134
             parameters[0].Value = model.F_WoID;
@@ -139,8 +145,9 @@ namespace CallCenterApi.DAL
139 145
             parameters[11].Value = model.F_SMSToPhone;
140 146
             parameters[12].Value = model.F_SMSContent;
141 147
             parameters[13].Value = model.F_CreateUser;
142
-            parameters[14].Value = model.F_CreateTime;
143
-            parameters[15].Value = model.F_ID;
148
+            parameters[14].Value = model.F_Push;
149
+            parameters[15].Value = model.F_CreateTime;
150
+            parameters[16].Value = model.F_ID;
144 151
 
145 152
             int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
146 153
             if (rows > 0)
@@ -204,7 +211,7 @@ namespace CallCenterApi.DAL
204 211
         {
205 212
 
206 213
             StringBuilder strSql = new StringBuilder();
207
-            strSql.Append("select  top 1 F_ID,F_WoID,F_WoState,F_ItemType,F_OptType,F_OptContent,F_NextUser,F_NextDept,F_IsUsed,F_LimitTime,F_IsSMS,F_SMSToUser,F_SMSToPhone,F_SMSContent,F_CreateUser,F_CreateTime from T_Wo_WorkOrderItem_New ");
214
+            strSql.Append("select  top 1 F_ID,F_WoID,F_WoState,F_ItemType,F_OptType,F_OptContent,F_NextUser,F_NextDept,F_IsUsed,F_LimitTime,F_IsSMS,F_SMSToUser,F_SMSToPhone,F_SMSContent,F_CreateUser,F_Push,F_CreateTime from T_Wo_WorkOrderItem_New ");
208 215
             strSql.Append(" where F_ID=@F_ID");
209 216
             SqlParameter[] parameters = {
210 217
                     new SqlParameter("@F_ID", SqlDbType.BigInt)
@@ -276,6 +283,10 @@ namespace CallCenterApi.DAL
276 283
                 {
277 284
                     model.F_IsSMS = int.Parse(row["F_IsSMS"].ToString());
278 285
                 }
286
+                if (row["F_Push"] != null && row["F_Push"].ToString() != "")
287
+                {
288
+                    model.F_Push = int.Parse(row["F_Push"].ToString());
289
+                }
279 290
                 if (row["F_SMSToUser"] != null)
280 291
                 {
281 292
                     model.F_SMSToUser = row["F_SMSToUser"].ToString();
@@ -306,7 +317,7 @@ namespace CallCenterApi.DAL
306 317
         public DataSet GetList(string strWhere)
307 318
         {
308 319
             StringBuilder strSql = new StringBuilder();
309
-            strSql.Append("select F_ID,F_WoID,F_WoState,F_ItemType,F_OptType,F_OptContent,F_NextUser,F_NextDept,F_IsUsed,F_LimitTime,F_IsSMS,F_SMSToUser,F_SMSToPhone,F_SMSContent,F_CreateUser,F_CreateTime ");
320
+            strSql.Append("select F_ID,F_WoID,F_WoState,F_ItemType,F_OptType,F_OptContent,F_NextUser,F_NextDept,F_IsUsed,F_LimitTime,F_IsSMS,F_SMSToUser,F_SMSToPhone,F_SMSContent,F_CreateUser,F_Push,F_CreateTime ");
310 321
             strSql.Append(" FROM T_Wo_WorkOrderItem_New ");
311 322
             if (strWhere.Trim() != "")
312 323
             {
@@ -326,7 +337,7 @@ namespace CallCenterApi.DAL
326 337
             {
327 338
                 strSql.Append(" top " + Top.ToString());
328 339
             }
329
-            strSql.Append(" F_ID,F_WoID,F_WoState,F_ItemType,F_OptType,F_OptContent,F_NextUser,F_NextDept,F_IsUsed,F_LimitTime,F_IsSMS,F_SMSToUser,F_SMSToPhone,F_SMSContent,F_CreateUser,F_CreateTime ");
340
+            strSql.Append(" F_ID,F_WoID,F_WoState,F_ItemType,F_OptType,F_OptContent,F_NextUser,F_NextDept,F_IsUsed,F_LimitTime,F_IsSMS,F_SMSToUser,F_SMSToPhone,F_SMSContent,F_CreateUser,F_Push,F_CreateTime ");
330 341
             strSql.Append(" FROM T_Wo_WorkOrderItem_New ");
331 342
             if (strWhere.Trim() != "")
332 343
             {

+ 8 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/DepartmentController.cs

@@ -445,10 +445,17 @@ namespace CallCenterApi.Interface.Controllers
445 445
             {
446 446
                 int userId = CurrentUser.UserData.F_UserId;
447 447
                 Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
448
+            
448 449
                 if (userModel != null)
449 450
                     pId = userModel.F_DeptId;
451
+                Model.T_Sys_RoleInfo ro = rolebll.GetModel(userModel.F_RoleId);
450 452
                 string where = "";
451 453
                 DataTable dt = new DataTable();
454
+                if (ro != null)
455
+                {
456
+                    if (ro.F_RoleCode == "CLZY")
457
+                        pId=1;
458
+                }
452 459
                 if (pId == 2)
453 460
                 {
454 461
                     where = "(isnull(F_DeptId,0)='" + pId + "'or F_Layer=1 ) and F_State=1";
@@ -461,7 +468,7 @@ namespace CallCenterApi.Interface.Controllers
461 468
                 {
462 469
                      where = " isnull(F_DeptId,0)='" + pId + "' and F_State=1 ";
463 470
                 }
464
-              
471
+             
465 472
                 //if (!string.IsNullOrEmpty(userModel.groupcode))
466 473
                 //{
467 474
                 //    where += " and F_GroupCode = '" + userModel.groupcode + "'";

+ 3 - 3
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/IndexController.cs

@@ -168,7 +168,7 @@ namespace CallCenterApi.Interface.Controllers
168 168
         {
169 169
             //string dataurl = HttpUtility.UrlDecode(RequestString.GetFormString("dataurl"));
170 170
             string dataurl = RequestString.GetFormString("dataurl");
171
-            string filename = RequestString.GetFormString("filename");
171
+            string filename = DateTime.Now.ToString("yyyyMMddHHmmssfff") + ".jpg";
172 172
             ActionResult res = NoToken("未知错误,请重新登录");
173 173
             int userId = CurrentUser.UserData.F_UserId;
174 174
             Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
@@ -723,8 +723,8 @@ namespace CallCenterApi.Interface.Controllers
723 723
                       
724 724
                         uwhere += " and F_IsDelete=0";
725 725
                         uwhere += "and F_Duplicate!=5";
726
-                        
727
-                 
726
+                        uwhere += $" and (F_Type=" + 2 + "or (F_Duplicate in(2,0)and F_Type=3))";
727
+
728 728
                         var obj = new
729 729
                         {
730 730
                             dtj = bll.GetList(uwhere+ "  and F_State=0 ").Tables[0].Rows.Count,

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


+ 30 - 7
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/UserAccountController.cs

@@ -225,7 +225,19 @@ namespace CallCenterApi.Interface.Controllers
225 225
 
226 226
                 if (userModel != null)
227 227
                 {
228
-                    filter.dptid = userModel.F_DeptId;
228
+                    if (userModel.F_RoleId == 1 || userModel.F_RoleId == 4 || userModel.F_RoleId == 17
229
+                         || userModel.F_RoleId == 50 || userModel.F_RoleId == 67 || userModel.F_RoleId == 49)
230
+                    {
231
+                        if (filter.dptid == 0)
232
+                        {
233
+                            filter.dptid = 1;
234
+                        }
235
+                    }
236
+                    else
237
+                    {
238
+                        filter.dptid = userModel.F_DeptId;
239
+
240
+                    }
229 241
                 }
230 242
                 if (filter.dptid > 0)
231 243
                 {
@@ -331,13 +343,14 @@ namespace CallCenterApi.Interface.Controllers
331 343
                 //}
332 344
                 if (userModel != null)
333 345
                 {
334
-                    Model.T_Sys_Department deptModel = new BLL.T_Sys_Department().GetModel(filter.dptid);
335
-                    if (deptModel != null)
346
+                    if (userModel.F_RoleId == 1 || userModel.F_RoleId == 4 || userModel.F_RoleId == 17
347
+                          || userModel.F_RoleId == 50 || userModel.F_RoleId == 67 || userModel.F_RoleId == 49)
336 348
                     {
337
-                        if (userModel.F_RoleId != 1 || userModel.F_RoleId != 4 || userModel.F_RoleId != 17
338
-                        || userModel.F_RoleId != 50 || userModel.F_RoleId != 67)
339
-                            sql += " and F_DeptId in ( select F_DeptId from T_Sys_Department where F_DeptCode like '%" + deptModel.F_DeptCode + "%') ";
340
-                    }
349
+                            if (filter.dptid == 0)
350
+                            {
351
+                                filter.dptid = 1;
352
+                            }
353
+                        }
341 354
                     else
342 355
                     {
343 356
                         filter.dptid = userModel.F_DeptId;
@@ -681,6 +694,16 @@ namespace CallCenterApi.Interface.Controllers
681 694
                 {
682 695
                     return Error("无操作权限");
683 696
                 }
697
+                if (userModel .F_RoleId ==49)
698
+                {
699
+                    var uModel = new BLL.T_Sys_UserAccount().GetModel(input.Usercode);
700
+                    if (uModel!=null )
701
+                    {
702
+                        if (userModel.F_UserCode != uModel.F_UserCode&& uModel.F_RoleId ==49)
703
+                            return Error("不能修改其他人员");
704
+                    }
705
+                  
706
+                }
684 707
                 BLL.T_Sys_UserAccount sysUserAccountBll = new BLL.T_Sys_UserAccount();
685 708
                 Model.T_Sys_UserAccount userAccountModel = sysUserAccountBll.GetModelList("  F_UserId = " + 
686 709
                     input.UserId).FirstOrDefault();

+ 1 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/customer/CustomerController.cs

@@ -867,7 +867,7 @@ namespace CallCenterApi.Interface.Controllers.customer
867 867
         public ActionResult Import()
868 868
         {
869 869
             DataTable dt = new DataTable();
870
-            var depts = new BLL.T_Sys_UserAccount().GetModelList("F_DeptId in (select F_DeptId   FROM T_Sys_Department WHERE F_State=1 and ( F_DeptCode like '|0|1|12|%' or F_DeptCode like '|0|1|15|%')) ");
870
+            var depts = new BLL.T_Sys_UserAccount().GetModelList("F_DeptId in (select F_DeptId   FROM T_Sys_Department WHERE F_State=1 and ( F_DeptCode like '|0|1|14|%' )) ");
871 871
            
872 872
             #region 
873 873
             dt.Columns.Add("工号");

+ 26 - 8
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/BusinessController.cs

@@ -654,23 +654,38 @@ namespace CallCenterApi.Interface.Controllers.report
654 654
             {
655 655
                  days = System.Threading.Thread.CurrentThread.CurrentUICulture.Calendar.GetDaysInMonth(time.Year, time.Month - 1);//获取天数
656 656
             }
657
+            int day = 31;
657 658
             DateTime lastmonth= time.AddMonths(-1);
658 659
             sql += " and F_CreateTime>='" + lastmonth.ToString ("yyyy-MM") +"-28" + " 00:00:00' ";
659
-            sql += " and F_CreateTime<='" + time.ToString("yyyy-MM") + "-27" + " 23:59:59' ";
660
+            if (time.Month != 12)
661
+            {
662
+                sql += " and F_CreateTime<='" + time.ToString("yyyy-MM") + "-27" + " 23:59:59' ";
663
+                day = 27;
664
+            }
665
+            else
666
+            {
667
+                sql += " and F_CreateTime<='" + time.ToString("yyyy-MM") + "-31" + " 23:59:59' ";
668
+            }
660 669
             sql += $" and (F_Type=2 or (F_Duplicate in(2,0)and F_Type=3))";
661 670
             var modelList= new BLL.T_Bus_WorkOrder().GetModelList(sql);
662 671
             Product product = new Product();
663 672
             product.dates = new List<Date>();
664 673
             int lastday = days - 27;
665 674
             #region 上月28号至最后一天
666
-            for (int i=0;i< lastday;i ++)
675
+          
676
+            if (time .Month !=1)
667 677
             {
668
-               string  name = string.Format("{0}-{1}", lastmonth.ToString("yyyy-MM"), 28 + i) ;
669
-                product.dates.Add(RetuDate(name, timeslot, modelList));
678
+                for (int i = 0; i < lastday; i++)
679
+                {
680
+                    string name = string.Format("{0}-{1}", lastmonth.ToString("yyyy-MM"), 28 + i);
681
+                    product.dates.Add(RetuDate(name, timeslot, modelList));
682
+                }
670 683
             }
684
+           
685
+
671 686
             #endregion
672
-            #region 本月一号至27号
673
-            for (int i=0;i < 27; i++)
687
+                #region 本月一号至27号
688
+            for (int i=0;i < day; i++)
674 689
             {
675 690
                 string name = "";
676 691
                 if (i <9)
@@ -762,9 +777,12 @@ namespace CallCenterApi.Interface.Controllers.report
762 777
             product.dates.Add(date);
763 778
             product.factory = new List<Factory>();
764 779
             var EquipmentNumber = new BLL.T_Sys_EquipmentNumber().GetModelList("F_IsDelete=0");
765
-            
780
+
781
+            Model.T_Sys_EquipmentNumber t_Sys_EquipmentNumber = new Model.T_Sys_EquipmentNumber();
782
+            t_Sys_EquipmentNumber.F_Production = "不清"; ;
766 783
             if (EquipmentNumber!=null )
767 784
             {
785
+                EquipmentNumber.Add(t_Sys_EquipmentNumber);
768 786
                 int total = 0;
769 787
                 foreach (var it in EquipmentNumber)
770 788
                 {
@@ -840,7 +858,7 @@ namespace CallCenterApi.Interface.Controllers.report
840 858
                     factory.proportion = "0.00%";
841 859
                     for (int i = 0; i < modelList.Count; i++)
842 860
                     {
843
-                        if (modelList[i].F_ProblemCode == it.F_Name)
861
+                        if (modelList[i].F_ProductType == it.F_Name)
844 862
                         {
845 863
                             total++;
846 864
                             factory.number++;

+ 15 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallrecordsController.cs

@@ -17,7 +17,7 @@ namespace CallCenterApi.Interface.Controllers.tel
17 17
     {
18 18
         BLL.T_Call_CallRecords bll = new BLL.T_Call_CallRecords();
19 19
         //获取通话记录列表
20
-        public ActionResult GetList(string phone, string usercode)
20
+        public ActionResult GetList(string phone, string usercode,string workordercode)
21 21
         {
22 22
             int userId = CurrentUser.UserData.F_UserId;
23 23
             Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
@@ -40,7 +40,7 @@ namespace CallCenterApi.Interface.Controllers.tel
40 40
             //{
41 41
             //    sql += " and groupcode = '" + userModel.groupcode + "' ";
42 42
             //}
43
-
43
+        
44 44
             if (usercode != null && usercode.Trim() != "")
45 45
             {
46 46
                 sql += " and UserCode='" + usercode + "'";
@@ -49,6 +49,19 @@ namespace CallCenterApi.Interface.Controllers.tel
49 49
             {
50 50
                 sql += " and F_DeptId='" + dept.Trim() + "'";
51 51
             }
52
+            if (!string .IsNullOrEmpty (workordercode))
53
+            {
54
+                var modellist = new BLL.T_Bus_WorkOrder().GetModelList("F_WorkOrderId='" + workordercode + "'").FirstOrDefault ();
55
+               if (modellist!=null )
56
+                {
57
+                    if (!string.IsNullOrEmpty(modellist.F_CallId))
58
+                    {
59
+                        sql += " and CallId = '" + modellist.F_CallId + "' ";
60
+                    }
61
+                    else
62
+                        return Error("此工单未查询到通话记录");
63
+                }
64
+            }
52 65
             if (dealtype != null && dealtype.Trim() != "")
53 66
             {
54 67
                 //处理方式

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


+ 2 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkTypeController.cs

@@ -18,12 +18,12 @@ namespace CallCenterApi.Interface.Controllers.workorder
18 18
     public class WorkTypeController : BaseController
19 19
     {
20 20
 
21
-        public bool SendReminderSMS(string F_Mobile, string countent)
21
+        public bool SendReminderSMS(string msg ,string F_Mobile, string countent)
22 22
         {
23 23
            
24 24
             if (!string.IsNullOrEmpty(F_Mobile))
25 25
             {
26
-                string msg = "工单催单提醒:";
26
+              
27 27
                 msg += countent;
28 28
                 Dictionary<string, string> paras = new Dictionary<string, string>();
29 29
                 paras.Add("@JSHM", F_Mobile);

+ 94 - 36
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkorderAppController.cs

@@ -153,8 +153,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
153 153
                 DataTable dt = new DataTable();
154 154
                 Model.T_Sys_UserAccount ua = userBLL.GetModel(userId);
155 155
                 Model.T_Sys_RoleInfo ro = rolebll.GetModel(ua.F_RoleId);
156
-                int DTJ = 0, DFP = 0, DCL = 0, CLZ = 0, YWJ = 0, THDTJ = 0, THDFP = 0, YJGD = 0, EJGD = 0, SJGD = 0, CJSL=0;  
157
-                for (int i=0;i<11;i ++)
156
+                int DTJ = 0, DFP = 0, DCL = 0, CLZ = 0, YWJ = 0, THDTJ = 0, THDFP = 0, YJGD = 0, EJGD = 0, SJGD = 0, CJSL=0,ZX=0;
157
+             string    uwhere = "and F_Area in( select  F_DeptId  from T_Sys_Department  where  (F_DeptCode like '|0|1|18|%' or F_DeptCode like '|0|1|19|%' or F_DeptCode like '|0|1|8|%' or F_DeptCode like '|0|1|9|%'or F_DeptCode like '|0|1|61|%'or F_DeptCode like '|0|1|10|%'or F_DeptCode like '|0|1|11|%' or F_DeptCode like '|0|1|12|%' or F_DeptCode like '|0|1|15|%' or F_DeptCode like '|0|1|13|%' or F_DeptCode like '|0|1|482|%' or F_DeptCode like '|0|1|14|%'))";
158
+              string where = $" and (F_Type=" + 2 + "or (F_Duplicate in(2,0)and F_Type=3))";
159
+                for (int i=0;i<12;i ++)
158 160
                 {
159 161
                     switch (i )
160 162
                     {
@@ -162,7 +164,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
162 164
                             sql = "";
163 165
 
164 166
                             sql += $"  F_IsDelete=0";
165
-                            sql += "AND F_Duplicate !=5";
167
+                            sql += "AND F_Duplicate !=5"+ where;
166 168
                             if (ro.F_RoleCode == "XTGLY" || ro.F_RoleCode == "JCRY")
167 169
                             {
168 170
                                 sql += "AND F_State in(0)";
@@ -181,7 +183,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
181 183
                         case 1://待分派
182 184
                             sql = "";
183 185
                             sql += $"  F_IsDelete=0";
184
-                            sql += "AND F_Duplicate !=5";
186
+                            sql += "AND F_Duplicate !=5"+ uwhere+ where;
185 187
                             sql += "AND F_State in (1)";
186 188
                             sql += RetuSql(ro, 0, ua);
187 189
                             if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "QTJS" || ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBTZX")
@@ -194,7 +196,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
194 196
                         case 2://待处理
195 197
                             sql = "";
196 198
                             sql += $"  F_IsDelete=0";
197
-                            sql += "AND F_Duplicate !=5";
199
+                            sql += "AND F_Duplicate !=5" + uwhere+ where;
198 200
                             sql += "AND F_State=3";
199 201
                             sql += RetuSql(ro, 0, ua);
200 202
                             if (ro.F_RoleCode == "YWY")
@@ -211,7 +213,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
211 213
                         case 3://处理中
212 214
                             sql = "";
213 215
                             sql += $"  F_IsDelete=0";
214
-                            sql += "AND F_Duplicate !=5";
216
+                            sql += "AND F_Duplicate !=5" + uwhere+ where;
215 217
                             sql += "AND F_State=4";
216 218
                             sql += RetuSql(ro, 0, ua);
217 219
                             if (ro.F_RoleCode == "YWY")
@@ -228,7 +230,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
228 230
                         case 4://退回待分派
229 231
                             sql = "";
230 232
                             sql += $"  F_IsDelete=0";
231
-                            sql += "AND F_Duplicate !=5";
233
+                            sql += "AND F_Duplicate !=5" + uwhere+ where;
232 234
                             sql += "AND F_State=5";
233 235
                             sql += RetuSql(ro, 0, ua);
234 236
                             if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "QTJS" || ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBTZX")
@@ -241,7 +243,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
241 243
                         case 5://退回待提交
242 244
                             sql = "";
243 245
                             sql += $" F_IsDelete=0";
244
-                            sql += "AND F_Duplicate !=5";
246
+                            sql += "AND F_Duplicate !=5"+ where;
245 247
                             sql += "AND F_State=6";
246 248
                             sql += RetuSql(ro, 0, ua);
247 249
                             if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "QTJS")
@@ -254,11 +256,14 @@ namespace CallCenterApi.Interface.Controllers.workorder
254 256
                         case 6://已完结
255 257
                             sql = "";
256 258
                             sql += $"  F_IsDelete=0";
257
-                            sql += "AND F_Duplicate !=5";
259
+                            sql += "AND F_Duplicate !=5" + uwhere+ where;
258 260
                             sql += "AND F_State=10";
259 261
                             sql += RetuSql(ro, 0, ua);
260 262
                             if (ro.F_RoleCode == "YWY")
261
-                                sql += "AND F_DealUser=" + ua.F_UserCode;
263
+                            {
264
+                                sql += "AND F_Notifications ='" + ua.F_UserCode + "'";
265
+                            }
266
+                             
262 267
                             if (ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBTZX")
263 268
                                 sql += "AND F_CreateUser=" + ua.F_UserCode;
264 269
                             if (ro.F_RoleCode == "QTJS")
@@ -268,9 +273,9 @@ namespace CallCenterApi.Interface.Controllers.workorder
268 273
                             }
269 274
                             YWJ = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//待处理
270 275
                             break;
271
-                        case 7://已完结
276
+                        case 7://
272 277
                             sql = "";
273
-                            sql += $"  F_IsDelete=0";
278
+                            sql += $"  F_IsDelete=0" + where+ uwhere;
274 279
                             // sql += $" and F_DealTimely = 'Ⅰ级'";
275 280
 
276 281
 
@@ -284,9 +289,9 @@ namespace CallCenterApi.Interface.Controllers.workorder
284 289
                                 sql += "AND F_CreateUser=" + ua.F_UserCode;
285 290
                             YJGD = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//待处理
286 291
                             break;
287
-                        case 8://已完结
292
+                        case 8://
288 293
                             sql = "";
289
-                            sql += $" F_IsDelete=0";
294
+                            sql += $" F_IsDelete=0" + where+ uwhere;
290 295
                             // sql += $" and F_DealTimely = 'Ⅱ级'";
291 296
 
292 297
                             sql += "AND F_Duplicate !=5";
@@ -301,7 +306,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
301 306
                             break;
302 307
                         case 9://
303 308
                             sql = "";
304
-                            sql += $"  F_IsDelete=0";
309
+                            sql += $"  F_IsDelete=0" + where+ uwhere;
305 310
                             sql += "AND F_Duplicate !=5";
306 311
                             //  sql += $" and F_DealTimely = '普通工单'";
307 312
                             sql += $" and (F_DealTimely= '3类问题' or F_DealTimely= '普通工单' )";
@@ -315,12 +320,12 @@ namespace CallCenterApi.Interface.Controllers.workorder
315 320
                             break;
316 321
                         case 10://
317 322
                             sql = "";
318
-                            sql += $"  F_IsDelete=0";
323
+                            sql += $"  F_IsDelete=0" + uwhere+ where;
319 324
                             sql += "AND F_Duplicate !=5";
320 325
                             sql += "AND F_Duplicate=6";
321 326
                             if (ro.F_RoleCode == "BSCJL" || ro.F_RoleCode == "YWY")
322 327
                             {
323
-                                sql += "AND F_Notifications =" + ua.F_UserCode;
328
+                                sql += "AND F_Notifications ='" + ua.F_UserCode + "'";
324 329
                             }
325 330
                             else if (ro.F_RoleCode == "ZR" || ro.F_RoleCode == "BBZY" || ro.F_RoleCode == "CJZY" || ro.F_RoleCode == "XTGLY" || ro.F_RoleCode == "JCRY")
326 331
                             {
@@ -332,6 +337,21 @@ namespace CallCenterApi.Interface.Controllers.workorder
332 337
                             }
333 338
                             CJSL = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//
334 339
                             break;
340
+                        case 11://咨询
341
+                            sql = "";
342
+                            sql += $"  F_IsDelete=0";
343
+                            sql += "AND F_Duplicate !=5" + uwhere ;
344
+                            sql += " and (F_Type=" + 1 + "or ( F_Duplicate in(1)and F_Type!=2 ))";
345
+                            sql += RetuSql(ro, 0, ua);
346
+                            if (ro.F_RoleCode == "YWY")
347
+                                sql += "AND F_DealUser=" + ua.F_UserCode;
348
+                            if (ro.F_RoleCode == "QTJS")
349
+                            {
350
+                                ZX = 0;
351
+                                break;
352
+                            }
353
+                            ZX = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//待处理
354
+                            break;
335 355
 
336 356
                     }
337 357
 
@@ -350,7 +370,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
350 370
                     YJGD = YJGD,
351 371
                     EJGD = EJGD,
352 372
                     SJGD = SJGD,
353
-                    CJSL= CJSL
373
+                    CJSL= CJSL,
374
+                    ZX= ZX
354 375
                 };
355 376
                 return Content(obj.ToJson()); ;
356 377
             }
@@ -375,6 +396,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
375 396
                 DataTable dt = new DataTable();
376 397
                 Model.T_Sys_UserAccount ua = userBLL.GetModel(userId);
377 398
                 Model.T_Sys_RoleInfo ro = rolebll.GetModel(ua.F_RoleId);
399
+                string uwhere = "and F_Area in( select  F_DeptId  from T_Sys_Department  where  (F_DeptCode like '|0|1|18|%' or F_DeptCode like '|0|1|19|%' or F_DeptCode like '|0|1|8|%' or F_DeptCode like '|0|1|9|%'or F_DeptCode like '|0|1|61|%'or F_DeptCode like '|0|1|10|%'or F_DeptCode like '|0|1|11|%' or F_DeptCode like '|0|1|12|%' or F_DeptCode like '|0|1|15|%' or F_DeptCode like '|0|1|13|%' or F_DeptCode like '|0|1|482|%' or F_DeptCode like '|0|1|14|%'))";
378 400
                 #region 筛选条件
379 401
                 if (CJ == 1)
380 402
                 {
@@ -477,9 +499,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
477 499
                         sql += "AND F_CreateUser=" + ua.F_UserCode;
478 500
                     sql += "AND F_State in(10)";
479 501
                 }
480
-                    
481
-                string uwhere = " ";
482
-                if(state>-1)
502
+                if (state != 11)
503
+                    sql += $" and (F_Type=" + 2 + "or (F_Duplicate in(2,0)and F_Type=3))";
504
+                // string uwhere = " ";
505
+                if (state>-1)
483 506
                 {
484 507
                     switch (state)
485 508
                     {
@@ -505,13 +528,13 @@ namespace CallCenterApi.Interface.Controllers.workorder
505 528
                                 return Error("无操作权限");
506 529
                             break;
507 530
                         case 1://待分派
508
-                            sql += "AND F_State in (1)";
531
+                            sql += "AND F_State in (1)"+ uwhere;
509 532
                             sql += RetuSql(ro, see, ua);
510 533
                             if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "QTJS" )
511 534
                                 return Error("无操作权限");
512 535
                             break;
513 536
                         case 3://待处理
514
-                            sql += "AND F_State=3";
537
+                            sql += "AND F_State=3"+ uwhere;
515 538
                             sql += RetuSql(ro, see, ua);
516 539
                             if (ro.F_RoleCode == "YWY")
517 540
                             {
@@ -521,17 +544,17 @@ namespace CallCenterApi.Interface.Controllers.workorder
521 544
                                 return Error("无操作权限");
522 545
                             break;
523 546
                         case 4://处理中
524
-                            sql += "AND F_State=4";
547
+                            sql += "AND F_State=4"+ uwhere;
525 548
                             sql += RetuSql(ro, see, ua);
526 549
                             if (ro.F_RoleCode == "YWY")
527 550
                             {
528
-                                sql += "AND F_Notifications=" + ua.F_UserCode;
551
+                                sql += "AND F_Notifications ='" + ua.F_UserCode + "'";
529 552
                             }
530 553
                             if (ro.F_RoleCode == "QTJS" )
531 554
                                 return Error("无操作权限");
532 555
                             break;
533 556
                         case 5://退回待分派
534
-                            sql += "AND F_State=5";
557
+                            sql += "AND F_State=5"+ uwhere;
535 558
                             sql += RetuSql(ro, see, ua);
536 559
                             if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "QTJS" )
537 560
                                 return Error("无操作权限");
@@ -544,12 +567,23 @@ namespace CallCenterApi.Interface.Controllers.workorder
544 567
                             break;
545 568
                    
546 569
                         case 10://已完结
547
-                            sql += "AND F_State=10";
570
+                            sql += "AND F_State=10"+ uwhere;
571
+                            sql += RetuSql(ro, see, ua);
572
+
573
+                            if ( ro.F_RoleCode == "YWY")
574
+                            {
575
+                                sql += "AND F_Notifications ='" + ua.F_UserCode + "'";
576
+                            }
577
+                            //      if (ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBTZX")
578
+                            //    sql += "AND F_CreateUser=" + ua.F_UserCode;
579
+                            if (ro.F_RoleCode == "QTJS")
580
+                                return Error("无操作权限");
581
+                            break;
582
+                        case 11:
583
+                            sql += $" and (F_Type=" + 1 + "or ( F_Duplicate in(1)and F_Type!=2 ))";
548 584
                             sql += RetuSql(ro, see, ua);
549 585
                             if (ro.F_RoleCode == "YWY")
550 586
                                 sql += "AND F_DealUser=" + ua.F_UserCode;
551
-                      //      if (ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBTZX")
552
-                            //    sql += "AND F_CreateUser=" + ua.F_UserCode;
553 587
                             if (ro.F_RoleCode == "QTJS")
554 588
                                 return Error("无操作权限");
555 589
                             break;
@@ -557,7 +591,9 @@ namespace CallCenterApi.Interface.Controllers.workorder
557 591
                 }
558 592
                 else
559 593
                 {
560
-                    sql += RetuSql(ro, see, ua);
594
+                    sql += RetuSql(ro, see, ua)+ uwhere;
595
+                 
596
+
561 597
                     if (ro.F_RoleCode == "QTJS")
562 598
                     {
563 599
                         sql += "AND F_CreateUser='"+ua .F_UserCode +"'";
@@ -607,6 +643,14 @@ namespace CallCenterApi.Interface.Controllers.workorder
607 643
             #endregion
608 644
 
609 645
         }
646
+        private string GetWorkorderid(string F_UserCode)
647
+        {
648
+            string str = "";
649
+            str = "select F_WoID from T_Wo_WorkOrderItem_New where F_WoState =4 and  F_NextUser='" + F_UserCode + "'"
650
+               + ""
651
+               + " and isnull(F_IsUsed,'0')='0' ";
652
+            return str;
653
+        }
610 654
         public DataTable GetFileData(string ids, string prefix)
611 655
         {
612 656
             DataTable dt = new DataTable();
@@ -925,7 +969,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
925 969
                 }
926 970
 
927 971
             }
928
-            else if (ro.F_RoleCode == "DQJL" || ro.F_RoleCode == "DQZG")
972
+            else if (ro.F_RoleCode == "DQJL" || ro.F_RoleCode == "DQZG" || ro.F_RoleCode == "DQYWZG" || ro.F_RoleCode == "DQTJ"
973
+                || ro.F_RoleCode == "DQJHY" || ro.F_RoleCode == "DQBZ")
929 974
             {
930 975
                 sql += "AND F_Area =" + ua.F_DeptId;
931 976
             }
@@ -1051,7 +1096,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1051 1096
                 string deptname = "";
1052 1097
                 if (deptmodel != null)
1053 1098
                    deptname = deptmodel.F_DeptName;
1054
-                AddLog(modlelist.F_Id, 0, deptname + userModel.F_UserName + "创建工单", 0, 0, "", 0, userModel);
1099
+                AddLog(modlelist.F_Id, 0, deptname + userModel.F_UserName+ "创建工单", 0, 0, "", 0, userModel);
1055 1100
                 if (IsAssign>0)
1056 1101
                 {
1057 1102
                      if (clid == 0)
@@ -1304,7 +1349,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1304 1349
                 deptname = deptmodel.F_DeptName + "-";
1305 1350
             }
1306 1351
             #endregion
1307
-            var content = deptname + nowUser.F_UserName + "(" + nowUser.F_WorkNumber + ")" + opt;
1352
+            var content = deptname + nowUser.F_UserName + "(" + nowUser.F_UserCode  + ")" + opt;
1308 1353
             var itemid = AddLog((int)model.F_Id , wostate, content, 1, optbut, nowUser.F_UserCode, nowUser.F_DeptId, nowUser);
1309 1354
           
1310 1355
             if (itemid > 0)
@@ -1374,6 +1419,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
1374 1419
                         if (model != null)
1375 1420
                         {
1376 1421
                             string Title = "工单催单提醒";
1422
+                            if (string .IsNullOrEmpty (count))
1423
+                                return Error("请填写催单内容");
1377 1424
                             if (model.F_State == 0)
1378 1425
                                 return Error("工单未提交");
1379 1426
                             else  if (model.F_State == 10)
@@ -1393,7 +1440,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1393 1440
                                     {
1394 1441
                                         if (!string .IsNullOrEmpty (user.F_Mobile))
1395 1442
                                         {
1396
-                                            bool n = new WorkTypeController().SendReminderSMS(user.F_Mobile, count);
1443
+                                            bool n = new WorkTypeController().SendReminderSMS("工单催单提醒:",user.F_Mobile, count);
1397 1444
                                           //  string msg = new PushMessageController().Push(Title, count, user.F_UserCode);
1398 1445
                                             if (n )
1399 1446
                                             {
@@ -1569,7 +1616,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1569 1616
                 deptname = deptmodel.F_DeptName + "-";
1570 1617
             }
1571 1618
             #endregion
1572
-            var content = deptname + nowUser.F_UserName + "(" + nowUser.F_WorkNumber + ")" + opt + "工单,退回说明:" + cont;
1619
+            var content = deptname + nowUser.F_UserName + "(" + nowUser.F_UserCode  + ")" + opt + "工单,退回说明:" + cont;
1573 1620
             //获取上一级处理人员
1574 1621
             int deptid = 0;
1575 1622
             var touser = new BLL.T_Sys_UserAccount().GetModel(creatuser);
@@ -1643,7 +1690,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1643 1690
             var optcont = "";
1644 1691
             if (!string.IsNullOrEmpty(cont))
1645 1692
                 optcont = ",处理内容:" + cont;
1646
-            var content = deptname + nowUser.F_UserName + "(" + nowUser.F_WorkNumber + ")" + opt + "工单" + optcont;
1693
+            var content = deptname + nowUser.F_UserName + "(" + nowUser.F_UserCode  + ")" + opt + "工单" + optcont;
1647 1694
             var itemid = AddLog(model.F_Id, wostate, content, 1, optbut, touser, deptid, nowUser);
1648 1695
             if (itemid > 0)
1649 1696
             {
@@ -1814,6 +1861,15 @@ namespace CallCenterApi.Interface.Controllers.workorder
1814 1861
                 model.F_Officeid = F_Officeid;//转派办事处id
1815 1862
                 model.F_Distribution = F_Distribution; //转派分销组id
1816 1863
                 workorderBLL.Update(model);
1864
+                string optnext = "指派";
1865
+                if (opt == "指派")
1866
+                    optnext = "处理";
1867
+                var modellitlast = new BLL.T_Wo_WorkOrderItem_New().GetModel(itemid);
1868
+                if (modellitlast != null)
1869
+                {
1870
+                    string msg = new PushMessageController().Push("工单处理提醒", "你有工单待" + optnext, touser);
1871
+                  
1872
+                }
1817 1873
                 #endregion
1818 1874
                 return true;
1819 1875
             }
@@ -1821,6 +1877,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1821 1877
                 return false;
1822 1878
             #endregion
1823 1879
         }
1880
+      
1824 1881
         /// <summary>
1825 1882
         /// 添加工单记录
1826 1883
         /// </summary>
@@ -1851,6 +1908,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1851 1908
             itemModel.F_OptContent = content;
1852 1909
             itemModel.F_NextUser = nextuser;
1853 1910
             itemModel.F_IsSMS = 0;
1911
+            itemModel.F_Push = 0;
1854 1912
             itemModel.F_NextDept = nextdept;
1855 1913
             itemModel.F_IsUsed = F_IsUsed;
1856 1914
             itemModel.F_CreateTime = DateTime.Now;

Разница между файлами не показана из-за своего большого размера
+ 8 - 238
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Global.asax.cs


+ 1 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Common/ButtonGroup.cs

@@ -127,7 +127,7 @@ namespace CallCenterApi.Interface.Models.Common
127 127
                     break;
128 128
                 case "6":
129 129
                     //坐席 坐席班长 管理员
130
-                    if (code == "JDYPTZX" || code == "JDYBTZX" || code == "XTGLY")
130
+                    if (code == "JDYPTZX" || code == "JDYBTZX" || code == "XTGLY" || code == "BBZY" || code == "CJZY" || code == "CLZY" || code == "ZR")
131 131
                     {
132 132
                         buttons.Add(submit());
133 133
                          buttons.Add(delete());

+ 6 - 0
codegit/CallCenterApi/CallCenterApi.Model/T_Wo_WorkOrderItem_New.cs

@@ -26,6 +26,12 @@ namespace CallCenterApi. Model
26 26
         private string _f_smscontent;
27 27
         private string _f_createuser;
28 28
         private DateTime? _f_createtime;
29
+        private int? _f_push;
30
+        public int? F_Push
31
+        {
32
+            set { _f_push = value; }
33
+            get { return _f_push; }
34
+        }
29 35
         /// <summary>
30 36
         /// 工单记录ID
31 37
         /// </summary>

+ 35 - 8
codegit/CallCenterCommon/CallCenter.Utility/NPOI/NPOIHelper.cs

@@ -1101,17 +1101,44 @@ namespace CallCenter.Utility
1101 1101
                         {
1102 1102
                             
1103 1103
                             IRow irow6 = sheet.CreateRow(t+1 + i);
1104
+                            if (Factory1.Count %2!=0)
1105
+                            {
1106
+                                if (i * 2+1 < Factory1.Count)
1107
+                                {
1108
+                                    for (int j = 0; j < 6; j++)
1109
+                                    {
1110
+                                        string msg = ReturnMsg(j, i, Factory1);
1111
+                                        ICell cell18 = irow6.CreateCell(j + 1);
1112
+                                        cell18.SetCellValue(msg);
1113
+                                        cell18.CellStyle = cellStylebt;
1114
+                                    }
1115
+                                }
1116
+                                else if (i * 2 + 1 == Factory1.Count)
1117
+                                {
1118
+                                    for (int j = 0; j < 3; j++)
1119
+                                    {
1120
+                                        string msg = ReturnMsg(j, i, Factory1);
1121
+                                        ICell cell18 = irow6.CreateCell(j + 1);
1122
+                                        cell18.SetCellValue(msg);
1123
+                                        cell18.CellStyle = cellStylebt;
1124
+                                    }
1125
+                                }
1104 1126
 
1105
-                            if (i*2 < Factory1.Count)
1127
+                            }
1128
+                            else
1106 1129
                             {
1107
-                                for (int j = 0; j < 6; j++)
1130
+                                if (i * 2 < Factory1.Count)
1108 1131
                                 {
1109
-                                    string msg = ReturnMsg(j, i, Factory1);
1110
-                                    ICell cell18 = irow6.CreateCell(j + 1);
1111
-                                    cell18.SetCellValue(msg);
1112
-                                    cell18.CellStyle = cellStylebt;
1132
+                                    for (int j = 0; j < 6; j++)
1133
+                                    {
1134
+                                        string msg = ReturnMsg(j, i, Factory1);
1135
+                                        ICell cell18 = irow6.CreateCell(j + 1);
1136
+                                        cell18.SetCellValue(msg);
1137
+                                        cell18.CellStyle = cellStylebt;
1138
+                                    }
1113 1139
                                 }
1114 1140
                             }
1141
+                           
1115 1142
                                 int b = 0;
1116 1143
                                 if (a >1)
1117 1144
                                 {
@@ -1248,12 +1275,12 @@ namespace CallCenter.Utility
1248 1275
                             }
1249 1276
                             if (!istrue )
1250 1277
                             {
1251
-                                if (i * 2 >= Factory1.Count)
1278
+                                if (i * 2>= Factory1.Count)
1252 1279
                                 {
1253 1280
                                     ICell cell119 = irow6.CreateCell(0);
1254 1281
                                     cell119.CellStyle = cellStylebt;
1255 1282
                                 }
1256
-                                if (i *2 >= Factory1.Count&i < Factory2.Count)
1283
+                                if (i *2 +1>= Factory1.Count&i < Factory2.Count)
1257 1284
                                 {
1258 1285
                                     ICell cell119 = irow6.CreateCell(7);
1259 1286
                                     cell119.CellStyle = cellStylebt;

BIN
codegit/CallCenterWeb/CallCenterWeb.UI/Bin/Google.ProtocolBuffers.dll


+ 54 - 0
codegit/PushMessage/Program.cs

@@ -0,0 +1,54 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Net;
5
+using System.Text;
6
+using System.Threading;
7
+using System.Threading.Tasks;
8
+
9
+namespace Push
10
+{
11
+    class Program
12
+    {
13
+
14
+
15
+        static void Main(string[] args)
16
+        {
17
+            Console.OutputEncoding = System.Text.Encoding.UTF8;
18
+            Environment.SetEnvironmentVariable("needDetails", "true");
19
+            Console.OutputEncoding = System.Text.Encoding.UTF8;
20
+            Environment.SetEnvironmentVariable("needDetails", "true");
21
+
22
+            System.Console.WriteLine("Hello Push!");
23
+       
24
+            Thread t = new Thread(new ThreadStart(SetCensusURL));
25
+            t.Start();
26
+
27
+        }
28
+        private static void SetCensusURL()
29
+        {
30
+            int n = 0;
31
+            while (true)
32
+            {
33
+                Thread.Sleep(60 * 1000);
34
+                n += 1;
35
+                WebClient web = new WebClient();
36
+                web.Encoding = Encoding.UTF8;
37
+                try
38
+                {
39
+                    string seturl = "http://oa.shuanghui.net:8046/PushMessage/SetCensusURL";
40
+                    string Dataaaurl = web.DownloadString(seturl);//这一句话就能请求到数据了
41
+                    string url = "http://oa.shuanghui.net:8046/PushMessage/SetPush";
42
+                    string Dataaa = web.DownloadString(url);//这一句话就能请求到数据了
43
+                }
44
+                catch
45
+                {
46
+
47
+                }
48
+               
49
+                
50
+            }
51
+        }
52
+    }
53
+}
54
+

+ 36 - 0
codegit/PushMessage/Properties/AssemblyInfo.cs

@@ -0,0 +1,36 @@
1
+using System.Reflection;
2
+using System.Runtime.CompilerServices;
3
+using System.Runtime.InteropServices;
4
+
5
+// 有关程序集的一般信息由以下
6
+// 控制。更改这些特性值可修改
7
+// 与程序集关联的信息。
8
+[assembly: AssemblyTitle("PushMessage")]
9
+[assembly: AssemblyDescription("")]
10
+[assembly: AssemblyConfiguration("")]
11
+[assembly: AssemblyCompany("")]
12
+[assembly: AssemblyProduct("PushMessage")]
13
+[assembly: AssemblyCopyright("Copyright ©  2020")]
14
+[assembly: AssemblyTrademark("")]
15
+[assembly: AssemblyCulture("")]
16
+
17
+// 将 ComVisible 设置为 false 会使此程序集中的类型
18
+//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
19
+//请将此类型的 ComVisible 特性设置为 true。
20
+[assembly: ComVisible(false)]
21
+
22
+// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23
+[assembly: Guid("12d0c6ee-2f13-47b6-9bb1-6625af6e75cd")]
24
+
25
+// 程序集的版本信息由下列四个值组成: 
26
+//
27
+//      主版本
28
+//      次版本
29
+//      生成号
30
+//      修订号
31
+//
32
+// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
33
+// 方法是按如下所示使用“*”: :
34
+// [assembly: AssemblyVersion("1.0.*")]
35
+[assembly: AssemblyVersion("1.0.0.0")]
36
+[assembly: AssemblyFileVersion("1.0.0.0")]