duhongyu 3 lat temu
rodzic
commit
ef50914924

+ 18 - 5
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/APPController.cs

@@ -1028,7 +1028,7 @@ namespace CallCenterApi.Interface.Controllers
1028 1028
         }
1029 1029
 
1030 1030
         //市民评议
1031
-        public ActionResult Comment(string workorderid,string Satisfaction,string content)
1031
+        public ActionResult Comment(string workorderid,string Satisfaction,string content,int type=0)
1032 1032
         {
1033 1033
             var model = new BLL.T_Bus_WorkOrder().GetModel(workorderid);
1034 1034
 
@@ -1048,9 +1048,12 @@ namespace CallCenterApi.Interface.Controllers
1048 1048
                 {
1049 1049
                     return Error("工单已评议");
1050 1050
                 }
1051
-
1051
+                if (type == 0)
1052
+                    type = 3;
1053
+                else
1054
+                    type = 4;
1052 1055
                 string strSql = string.Format(@"INSERT INTO PublicComment ( [WorkOrderId], [strStm_Src_Dsc], [strWrkOrder_Cst_Ssf_Cd], [strUdt_Psn_ID], [strSsf_Cst_Ass_CntDsc], [strRltv_InsID], [strInpt_Inst_Nm], [strHpCnt], [CreateTime],[str_type]) 
1053
-                   values   ('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}','{9}') ;select @@IDENTITY ", model.F_WorkOrderId, strStm_Src_Dsc, Satisfaction, "", content, "", "", "", DateTime.Now, 3);
1056
+                   values   ('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}','{9}') ;select @@IDENTITY ", model.F_WorkOrderId, strStm_Src_Dsc, Satisfaction, "", content, "", "", "", DateTime.Now, type);
1054 1057
                 object objres = DbHelperSQL.GetSingle(strSql);
1055 1058
                 if (Satisfaction == "非常满意" || Satisfaction == "满意" || Satisfaction == "基本满意")
1056 1059
                 {
@@ -1071,8 +1074,18 @@ namespace CallCenterApi.Interface.Controllers
1071 1074
                         oper.F_WorkOrderId = model.F_WorkOrderId;
1072 1075
                         // oper.F_AssignedId = modelT_Bus_AssignedInfo.F_Id;
1073 1076
                         oper.F_State = model.F_WorkState;
1074
-                        oper.F_Message = "市民短信评议满意,自动结案";
1075
-                        oper.F_CreateUser = "短信评议";
1077
+                        
1078
+                        if (type>3)
1079
+                        {
1080
+                            oper.F_Message = "市民微信评议满意,自动结案";
1081
+                            oper.F_CreateUser = "微信评议";
1082
+                        }
1083
+                        else
1084
+                        {
1085
+                            oper.F_Message = "市民短信评议满意,自动结案";
1086
+                            oper.F_CreateUser = "短信评议";
1087
+                        }
1088
+                        
1076 1089
                         oper.F_CreateTime = DateTime.Now;
1077 1090
                         oper.F_IsDelete = 0;
1078 1091
                         operBLL.Add(oper);

+ 6 - 2
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/DataAnalysisController.cs

@@ -161,10 +161,14 @@ namespace CallCenterApi.Interface.Controllers.report
161 161
             //var lsql = "select F_Key  ,COUNT(1) as keycount ,dbo.GetDictionaryName(F_Key) as keyname  from T_Bus_WorkOrder where F_CreateTime between '"+ sdate + "' and '"+ edate + "' and F_IsDelete = 0 "+sql +"  group by F_Key order by keycount desc";
162 162
             //var db = DbHelperSQL.Query(lsql).Tables[0];
163 163
             //return Success("成功", db);
164
-
164
+            string deptid = "";
165
+            if (User .F_RoleCode =="WLDW")
166
+            {
167
+                deptid += "and F_MainDeptId='" + User.F_DeptId  + "'";
168
+            }
165 169
 
166 170
             var date = DateTime.Now;
167
-            string sql = $" select F_Key ,count(1) keycount from dbo.T_Bus_WorkOrder where F_IsDelete=0 and F_CreateTime between '" + sdate + "' and '" + edate + "' "+ lsql + "group by F_Key ";
171
+            string sql = $" select F_Key ,count(1) keycount from dbo.T_Bus_WorkOrder where F_IsDelete=0"+ deptid + " and F_CreateTime between '" + sdate + "' and '" + edate + "' "+ lsql + "group by F_Key ";
168 172
             DataTable dt = DbHelperSQL.Query(sql).Tables[0];
169 173
 
170 174
             var keyAllList = new BLL.T_Sys_DictionaryValue().GetModelList(" F_State=0 ");

+ 1 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/WorkOrderReportController.cs

@@ -1874,7 +1874,7 @@ namespace CallCenterApi.Interface.Controllers.report
1874 1874
             }
1875 1875
             List<MergerHot.MergerHotSource> MergerHotSource = new List<MergerHot.MergerHotSource>();
1876 1876
             var source = new BLL.T_Sys_DictionaryValue().GetModelList
1877
-                ("F_PrentId ='2498'");
1877
+                ("F_PrentId ='2498'  and F_State =0");
1878 1878
             string key = "";
1879 1879
             foreach (var it in source)
1880 1880
             {

+ 92 - 22
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/APPSController.cs

@@ -1790,7 +1790,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1790 1790
         {
1791 1791
             StreamReader reader = new StreamReader(System.Web.HttpContext.Current.Request.InputStream);
1792 1792
             var postString = reader.ReadToEnd();
1793
-
1793
+            LogFactory.GetLogger("zmhd10003").Warn(postString);
1794 1794
             //     if (!string.IsNullOrWhiteSpace(postString))
1795 1795
             //      {
1796 1796
             JObject result = null;
@@ -3125,59 +3125,129 @@ namespace CallCenterApi.Interface.Controllers.workorder
3125 3125
             return Content(obj.ToJson().Replace("state", "C-Response-Desc").Replace("message", "C-API-Status").Replace("returnList", "C-Response-Body").Replace("code", "C-Response-Code"));
3126 3126
 
3127 3127
         }
3128
-
3128
+       
3129 3129
         public ActionResult Reminder()
3130 3130
         {
3131
-            string strSql = "select count(1) from T_Call_CallRecords where DATEDIFF (DAY ,BeginTime ,GETDATE ())=0 ";
3132
-
3131
+            string strSql = "select count(1) from T_Call_CallRecords where DATEDIFF (DAY ,BeginTime ,GETDATE ())=0 and CallType = 0 ";
3132
+            string strSql1 = "select count(1) from T_Call_CallRecords where DATEDIFF (DAY ,BeginTime ,GETDATE ())=0 and CallState=1 and CallType=0";
3133 3133
             object objres = DbHelperSQL.GetSingle(strSql);
3134
-            var model = new BLL.T_SMS_RecvSMS().GetModelList("DATEDIFF (DAY ,RecvTime ,GETDATE ())=0 and RecvModemIMEI='701484974439813120' order by RecvTime desc ");
3134
+            object objres1 = DbHelperSQL.GetSingle(strSql1);
3135
+            var model = new BLL.T_SMS_RecvSMS().GetModelList("DATEDIFF (DAY ,RecvTime ,GETDATE ())=0 and RecvModemIMEI='704047588659716096' order by RecvTime desc ");
3135 3136
             if (model!=null && model.Count >0)
3136 3137
             {
3137
-
3138
+                int count = int.Parse(model.First().F_Name )/1000*1000+ 1000;
3138 3139
                 int t = int.Parse(objres.ToString());
3139
-                if (t >3000)
3140
+                if (t >count )
3140 3141
                 {
3141
-                    int count = int.Parse(model.First().RecvModemIMEI) + 1000;
3142
-                    if (t > count)
3142
+                    if (t >= 3000 && t < 4000)
3143 3143
                     {
3144
-                        string mag = "[\"" + count + "\"]";
3145
-                        var userlist = new BLL.T_Sys_UserAccount().GetModelList(" F_DeleteFlag =0 and F_RoleId in (1, 4, 11)");
3144
+                        string mag = "[\"" + objres + "\",\"" + objres1 + "\"]";
3145
+                        var userlist = new BLL.T_Sys_UserAccount().GetModelList(" F_DeleteFlag =0 and F_RoleId in (6)");
3146 3146
                         if (userlist != null && userlist.Count > 0)
3147 3147
                         {
3148 3148
                             foreach (var it in userlist)
3149 3149
                             {
3150 3150
                                 if (!string.IsNullOrEmpty(it.F_Mobile))
3151 3151
                                 {
3152
-                                    string v = SmsNewController.AddSmS(0, "当前话务已超过" + count + "。请关注", it.F_Mobile, "701484974439813120", mag, "1000");
3152
+                                    string v = SmsNewController.AddSmS(0, "今日累计来电量" + objres + "个,已接通" + objres1 + "个。请关注!", it.F_Mobile, "704047588659716096", mag, objres.ToString());
3153
+                                }
3154
+                            }
3155
+
3156
+                        }
3157
+                    }
3158
+                    else if (t >= 4000 && t < 5000)
3159
+                    {
3160
+                        string mag = "[\"" + objres + "\",\"" + objres1 + "\"]";
3161
+                        string v = SmsNewController.AddSmS(0, "今日累计来电量" + objres + "个,已接通" + objres1 + "个。请关注!", "13569031100", "704047588659716096", mag, objres.ToString());
3162
+                    }
3163
+                    else if (t >= 5000)
3164
+                    {
3165
+
3166
+                        string mag = "[\"" + objres + "\",\"" + objres1 + "\"]";
3167
+                        var userlist = new BLL.T_Sys_UserAccount().GetModelList(" F_DeleteFlag =0 and F_RoleId in (1,6)");
3168
+
3169
+                        string v = SmsNewController.AddSmS(0, "今日累计来电量" + objres + "个,已接通" + objres1 + "个。请关注!", "13569031100", "704047588659716096", mag, objres.ToString());
3170
+                        if (v == "")
3171
+                        {
3172
+                            string ct =
3173
+                            SmsNewController.AddSmS(0, "今日累计来电量" + objres + "个,已接通" + objres1 + "个。请关注!", "13569098866", "704047588659716096", mag, objres.ToString());
3174
+                            if (ct == "")
3175
+                            {
3176
+                                if (userlist != null && userlist.Count > 0)
3177
+                                {
3178
+                                    foreach (var it in userlist)
3179
+                                    {
3180
+                                        if (!string.IsNullOrEmpty(it.F_Mobile))
3181
+                                        {
3182
+                                            string vd = SmsNewController.AddSmS(0, "今日累计来电量" + objres + "个,已接通" + objres1 + "个。请关注!", it.F_Mobile, "704047588659716096", mag, objres.ToString());
3183
+                                        }
3184
+                                    }
3185
+
3153 3186
                                 }
3154 3187
                             }
3155 3188
 
3156 3189
                         }
3190
+
3191
+
3192
+
3157 3193
                     }
3158 3194
                 }
3159
-               
3195
+             
3160 3196
 
3161 3197
             }
3162 3198
             else
3163 3199
             {
3164
-                if (int.Parse(objres.ToString()) > 3000)
3200
+
3201
+                int t = int.Parse(objres.ToString());
3202
+                if (t >= 3000 && t < 4000)
3165 3203
                 {
3166
-              
3167
-                    string mag = "[\"3000"  + "\"]";
3168
-                    var userlist = new BLL.T_Sys_UserAccount().GetModelList(" F_DeleteFlag =0 and F_RoleId in (1, 4, 11)");
3169
-                    if (userlist!=null && userlist.Count >0)
3204
+                    string mag = "[\"" + objres + "\",\"" + objres1 + "\"]";
3205
+                    var userlist = new BLL.T_Sys_UserAccount().GetModelList(" F_DeleteFlag =0 and F_RoleId in (6)");
3206
+                    if (userlist != null && userlist.Count > 0)
3170 3207
                     {
3171 3208
                         foreach (var it in userlist)
3172 3209
                         {
3173
-                            if (!string.IsNullOrEmpty(it.F_Mobile ))
3210
+                            if (!string.IsNullOrEmpty(it.F_Mobile))
3174 3211
                             {
3175
-                                string v = SmsNewController.AddSmS(0, "当前话务已超过3000。请关注", it.F_Mobile, "701484974439813120", mag, "3000");
3212
+                                string v = SmsNewController.AddSmS(0, "今日累计来电量" + objres + "个,已接通" + objres1 + "个。请关注!", it.F_Mobile, "704047588659716096", mag, objres.ToString());
3176 3213
                             }
3177 3214
                         }
3178
-                        
3215
+
3179 3216
                     }
3180
-                  
3217
+                }
3218
+                else if (t >= 4000 && t < 5000)
3219
+                {
3220
+                    string mag = "[\"" + objres + "\",\"" + objres1 + "\"]";
3221
+                    string v = SmsNewController.AddSmS(0, "今日累计来电量" + objres + "个,已接通" + objres1 + "个。请关注!", "13569031100", "704047588659716096", mag, objres.ToString());
3222
+                }
3223
+                else if (t >= 5000)
3224
+                {
3225
+
3226
+                    string mag = "[\"" + objres + "\",\"" + objres1 + "\"]";
3227
+                    var userlist = new BLL.T_Sys_UserAccount().GetModelList(" F_DeleteFlag =0 and F_RoleId in (1, 6)");
3228
+
3229
+                    string v = SmsNewController.AddSmS(0, "今日累计来电量" + objres + "个,已接通" + objres1 + "个。请关注!", "13569031100", "704047588659716096", mag, objres.ToString());
3230
+                    if (v == "")
3231
+                    {
3232
+                        string ct =
3233
+                        SmsNewController.AddSmS(0, "今日累计来电量" + objres + "个,已接通" + objres1 + "个。请关注!", "13569098866", "704047588659716096", mag, objres.ToString());
3234
+                        if (ct == "")
3235
+                        {
3236
+                            if (userlist != null && userlist.Count > 0)
3237
+                            {
3238
+                                foreach (var it in userlist)
3239
+                                {
3240
+                                    if (!string.IsNullOrEmpty(it.F_Mobile))
3241
+                                    {
3242
+                                        string vd = SmsNewController.AddSmS(0, "今日累计来电量" + objres + "个,已接通" + objres1 + "个。请关注!", it.F_Mobile, "704047588659716096", mag, objres.ToString());
3243
+                                    }
3244
+                                }
3245
+
3246
+                            }
3247
+                        }
3248
+
3249
+                    }
3250
+
3181 3251
                 }
3182 3252
             }
3183 3253
             return Success("");

+ 14 - 3
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs

@@ -22548,7 +22548,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
22548 22548
 
22549 22549
             foreach (DataRow dr in dt.Rows)
22550 22550
             {
22551
-                if (dr["F_UserCode"].ToString() == "jianhang"|| dr["F_UserCode"].ToString() == "shengpingtai")
22551
+                if (dr["F_UserCode"].ToString() == "jianhang"|| dr["F_UserCode"].ToString() == "shengpingtai"|| dr["F_UserCode"].ToString() == "人民网")
22552 22552
                 {
22553 22553
                     if (System.IO.File.Exists(Directory.GetCurrentDirectory() + dr["F_FileUrl"].ToString()))
22554 22554
                     {
@@ -22598,11 +22598,14 @@ namespace CallCenterApi.Interface.Controllers.workorder
22598 22598
                 {
22599 22599
                     return Error("回复内容应在20字以上");
22600 22600
                 }
22601
+              
22601 22602
                 string token = Login();
22603
+              
22602 22604
                 Dictionary<string, object> LY = new Dictionary<string, object>();
22603 22605
                 LY.Add("tid", prople.tid);
22604 22606
                 LY.Add("asContent", content);
22605 22607
                 LY.Add("organization", organization);
22608
+               
22606 22609
                 Dictionary<string, object> ParamMap = new Dictionary<string, object>();
22607 22610
                 ParamMap.Add("answer", LY);
22608 22611
                 if (prople.state == 1)
@@ -22712,24 +22715,29 @@ namespace CallCenterApi.Interface.Controllers.workorder
22712 22715
                 }
22713 22716
                 else
22714 22717
                 {  //序列化参数
22715
-                    // 发送请求
22718
+                   // 发送请求
22719
+                   
22716 22720
                     var request = (HttpWebRequest)WebRequest.Create(rmwurl+"/v1/org/addAnswerOne");
22717 22721
                     request.Method = "POST";
22718 22722
                     request.ContentType = "application/json;charset=UTF-8";
22719 22723
                     var byteData = Encoding.UTF8.GetBytes(createParamMap("/v1/org/addAnswerOne", ParamMap.ToJson(), token).ToJson());
22724
+                   
22720 22725
                     var length = byteData.Length;
22721 22726
                     request.ContentLength = length;
22722 22727
                     var writer = request.GetRequestStream();
22723 22728
                     writer.Write(byteData, 0, length);
22724 22729
                     writer.Close();
22730
+                   
22725 22731
                     //接收数据
22726 22732
                     var response = (HttpWebResponse)request.GetResponse();
22727 22733
                     var responseString = new StreamReader(response.GetResponseStream(), Encoding.GetEncoding("utf-8")).ReadToEnd();
22728 22734
                     try
22729 22735
                     {
22736
+                       
22730 22737
                         JObject paras = (JObject)Newtonsoft.Json.JsonConvert.DeserializeObject(responseString);
22731 22738
                         var txnBodyCom = paras["result"].ToString();
22732 22739
                         var result = (JObject)Newtonsoft.Json.JsonConvert.DeserializeObject(txnBodyCom);
22740
+                      
22733 22741
                         if (result["code"].ToString() == "0")
22734 22742
                         {
22735 22743
                             prople.state = 3;
@@ -22784,7 +22792,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
22784 22792
             var request = (HttpWebRequest)WebRequest.Create(rmwurl+"/v1/user/login");
22785 22793
             request.Method = "POST";
22786 22794
             request.ContentType = "application/json;charset=UTF-8";
22787
-
22795
+            LogFactory.GetLogger("12345").Warn("tid3" + login.ToJson()+"  "+ createParamMap("/v1/user/login", login.ToJson()).ToJson());
22788 22796
             var byteData = Encoding.UTF8.GetBytes(createParamMap("/v1/user/login", login.ToJson()).ToJson());
22789 22797
             var length = byteData.Length;
22790 22798
             request.ContentLength = length;
@@ -22796,8 +22804,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
22796 22804
             var responseString = new StreamReader(response.GetResponseStream(), Encoding.GetEncoding("utf-8")).ReadToEnd();
22797 22805
             JObject paras = null;
22798 22806
             paras = (JObject)Newtonsoft.Json.JsonConvert.DeserializeObject(responseString);
22807
+            
22799 22808
             var txnBodyCom = paras["resultData"].ToString();
22800 22809
             var result = (JObject)Newtonsoft.Json.JsonConvert.DeserializeObject(txnBodyCom);
22810
+          
22801 22811
             //  token = jo["token"].ToString();
22802 22812
             // string result = SmsNewHelper.Send(mobiles, Content);
22803 22813
 
@@ -22818,6 +22828,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
22818 22828
             parame.Add("appCode", APP_CODE);
22819 22829
             parame.Add("param", param);
22820 22830
             parame.Add("signature", Md5(url + param + APP_SECRET));
22831
+           
22821 22832
             return parame;
22822 22833
         }
22823 22834
 

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

@@ -23,9 +23,9 @@ namespace CallCenterApi.Interface
23 23
             //clq 增加异常日志记录 自定义 HandleErrorAttribute
24 24
             FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
25 25
             _worker = new QuartzWorker();
26
-          var satisfactionClose = new SatisfactionClose();
27
-           _worker.AddWork(satisfactionClose);
28
-          _worker.Start();
26
+        //  var satisfactionClose = new SatisfactionClose();
27
+          // _worker.AddWork(satisfactionClose);
28
+        //  _worker.Start();
29 29
            var ZhengWuDuiJie = new ZhengWuDuiJie();
30 30
            _worker.AddWork(ZhengWuDuiJie);
31 31
            _worker.Start();

+ 1 - 1
CallCenterCommon/CallCenter.QuartzService/ZhengWuDuiJie.cs

@@ -59,7 +59,7 @@ namespace CallCenter.QuartzService
59 59
         private void submit_dept_crnt_status(object sender, EventArgs e)
60 60
 
61 61
         {
62
-          //  var Dataurl = HttpMethods.HttpPost("http://docking.zwfw.anyang.gov.cn:9998/APPS/Reminder");
62
+           var Dataurl = HttpMethods.HttpPost("http://docking.zwfw.anyang.gov.cn:9998/APPS/Reminder");
63 63
             string token = GetToken();
64 64
            
65 65
             paras paras = new paras();