duhongyu 5 lat temu
rodzic
commit
42f2f0e0ef

+ 30 - 18
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/SMSController.cs

@@ -43,7 +43,7 @@ namespace CallCenterApi.Interface.Controllers
43 43
             }
44 44
             return strbul.ToString().ToLower (); ;
45 45
         }
46
-        public static  bool  SendSms(string  msg,string mobiles,string templetid,string excode = "")
46
+        public static  string   SendSms(string  msg,string mobiles,string templetid,string excode = "")
47 47
         {
48 48
             bool n=false ;
49 49
             string sign = Md5(cpcode + msg + mobiles + excode + templetid + key);
@@ -73,31 +73,37 @@ namespace CallCenterApi.Interface.Controllers
73 73
             var responseString = new StreamReader(response.GetResponseStream(), Encoding.GetEncoding("utf-8")).ReadToEnd();
74 74
             JObject jo = (JObject)JsonConvert.DeserializeObject(responseString );
75 75
             string access_token = jo["resultcode"].ToString();
76
-            if (access_token == "0")
77
-                n = true;
78
-            return n;
76
+            return access_token;
79 77
         }
80 78
         public static bool   AddSmS(int userId,string count ,string msg, string mobiles, string templetid)
81 79
         {
82
-        
83
-            bool n = SendSms(msg, mobiles, templetid);
84
-            if (n ==false )
85
-                return n;
80
+            bool res = false ;
81
+            string  n = SendSms(msg, mobiles, templetid);
86 82
             Model.T_SMS_RecvSMS dModel = new Model.T_SMS_RecvSMS();
87 83
             dModel.CallerNum = mobiles.Trim();
88 84
             dModel.Content = count.Trim();
85
+            dModel.RecvModemIMEI = n;
89 86
             dModel.State = 0;
90 87
             dModel.F_UserID = userId;
91 88
             dModel.RecvTime = DateTime.Now;
92 89
             int b = new BLL.T_SMS_RecvSMS().Add(dModel);
93
-            if (b > 0)
90
+            if (n == "0")
91
+                res = true;
92
+            if (res)
94 93
             {
95
-                return true;
94
+                if (b > 0)
95
+                {
96
+                    return true;
97
+                }
98
+                else
99
+                {
100
+                    return false;
101
+                }
96 102
             }
97 103
             else
98
-            {
99
-                return false;
100
-            }
104
+                return res;
105
+
106
+
101 107
         }
102 108
         #region 接收短信
103 109
         [Authority]
@@ -131,7 +137,7 @@ namespace CallCenterApi.Interface.Controllers
131 137
             {
132 138
                 sql += " and RecvTime <= '" + Convert.ToDateTime(strendtime.Trim()) + "' ";
133 139
             }
134
-
140
+            sql += "and F_UserID is not null";
135 141
             if (strpageindex.Trim() != "")
136 142
             {
137 143
                 pageindex = Convert.ToInt32(strpageindex);
@@ -152,14 +158,20 @@ namespace CallCenterApi.Interface.Controllers
152 158
                 pageindex,
153 159
                 true,
154 160
                 out recordCount);
155
-
161
+            List<Model.T_SMS_RecvSMS> modelList = new BLL.T_SMS_RecvSMS().DataTableToList(dt);
156 162
             var obj = new
157 163
             {
158
-                state = "success",
159
-                message = "成功",
160
-                rows = dt,
164
+                rows = modelList.Select(x => new
165
+                {
166
+                    x.CallerNum,
167
+                    x.Content,
168
+                    x.F_Name,
169
+                    usercode = new BLL.T_Sys_UserAccount().GetModel((int)x.F_UserID) != null ? new BLL.T_Sys_UserAccount().GetModel((int)x.F_UserID).F_UserCode : "系统发送",
170
+                    x.RecvTime
171
+                }),
161 172
                 total = recordCount
162 173
             };
174
+        
163 175
 
164 176
             return Content(obj.ToJson());
165 177
 

+ 2 - 2
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/DeptAssessmentController.cs

@@ -442,8 +442,8 @@ namespace CallCenterApi.Interface.Controllers.report
442 442
             #region 不满意度评价100205
443 443
             var assignedList = assignedInfoBLL.DataTableToList(assignedInfoBLL.GetList($" F_MainDeptId = '{int.Parse(deptid)}' and F_IsDelete=0 and F_IsSure in (0,1,2) and  F_State in (0,1)   and  datediff(s,'{start}',F_CreateTime)>0 and datediff(s,'{end}',F_CreateTime)<0  ").Tables[0]).DistinctBy(y => y.F_WorkOrderId);
444 444
             //F_IsSatisfie 1不满意     F_IsReload 0不重办,>0重办次数
445
-            var assignedListsS = assignedList.Where(y => y.F_IsSatisfie == 1 && (y.F_IsReload == 0 || y.F_IsReload == null)).ToList();   //每件扣1分 F_IsReload == 0没有重办
446
-            var assignedListsR = assignedList.Where(y => y.F_IsSatisfie == 1 && y.F_IsReload > 0).ToList();    //每件扣2分 F_IsReload > 0重办次数
445
+            var assignedListsS = assignedList.Where(y => y.F_IsSatisfie == 0 && (y.F_IsReload == 0 || y.F_IsReload == null)).ToList();   //每件扣1分 F_IsReload == 0没有重办
446
+            var assignedListsR = assignedList.Where(y => y.F_IsSatisfie == 0 && y.F_IsReload > 0).ToList();    //每件扣2分 F_IsReload > 0重办次数
447 447
             int assignedCountS = assignedListsS.Count();
448 448
             int satisfieCountR = assignedListsR.Count() * 2;
449 449
             double nosatisfieCount = -(double)(assignedCountS + satisfieCountR);

+ 8 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs

@@ -7412,6 +7412,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
7412 7412
         /// <param name="deptid"></param>
7413 7413
         /// <param name="type"></param>
7414 7414
         /// <returns></returns>
7415
+        [HttpPost]
7415 7416
         public ActionResult SendSms(string workordercode,int deptid,int type=0)
7416 7417
         {
7417 7418
             if (deptid <= 0)
@@ -7437,11 +7438,16 @@ namespace CallCenterApi.Interface.Controllers.workorder
7437 7438
                             templetid = "26155";
7438 7439
                             count = "您有工单正在被督办,请及时处理,工单编号" + workordercode;
7439 7440
                         }
7440
-                        else
7441
+                        else if (type == 2)
7441 7442
                         {
7442 7443
                             templetid = "26154";
7443 7444
                             count = "您有紧急工单,请及时处理,工单编号" + workordercode;
7444 7445
                         }
7446
+                        else
7447
+                        {
7448
+                            templetid = "29265";
7449
+                            count = "您有工单已经超时,请尽快处理,工单编号" + workordercode;
7450
+                        }
7445 7451
 
7446 7452
                         bool n = SMSController.AddSmS(userId, count, workordercode, it.F_Mobile, templetid);
7447 7453
                         if (n == false)
@@ -7467,6 +7473,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
7467 7473
         /// <param name="msg4"></param>
7468 7474
         /// <param name="mobile"></param>
7469 7475
         /// <returns></returns>
7476
+
7470 7477
         public ActionResult SmsHand(string msg1 , string msg2 , string msg3,string msg4,string mobile)
7471 7478
         {
7472 7479
             

+ 1 - 1
Push/Program.cs

@@ -43,7 +43,7 @@ namespace Push
43 43
                 {
44 44
                     string seturl = "http://12345.shangqiu.gov.cn:8819/WorkOrder/SmsOverTime";
45 45
                     string Dataurl = web.DownloadString(seturl);//这一句话就能请求到数据了
46
-                    System.Console.WriteLine(Dataurl);
46
+               //     System.Console.WriteLine(Dataurl);
47 47
                 }
48 48
                 catch
49 49
                 {