Selaa lähdekoodia

110对接相关的修改

liyuanyuan 2 vuotta sitten
vanhempi
commit
58a8e4e951

+ 12 - 0
CallCenterApi/CallCenterApi.Common/CallCenterApi.Common.csproj

70
       <Project>{4da219cc-911e-4c81-bb0b-df5183fd50ff}</Project>
70
       <Project>{4da219cc-911e-4c81-bb0b-df5183fd50ff}</Project>
71
       <Name>CallCenter.Utility</Name>
71
       <Name>CallCenter.Utility</Name>
72
     </ProjectReference>
72
     </ProjectReference>
73
+    <ProjectReference Include="..\CallCenterApi.BLL\CallCenterApi.BLL.csproj">
74
+      <Project>{d99011c9-0a57-4706-b073-091681effad7}</Project>
75
+      <Name>CallCenterApi.BLL</Name>
76
+    </ProjectReference>
77
+    <ProjectReference Include="..\CallCenterApi.DB\CallCenterApi.DB.csproj">
78
+      <Project>{ae933bfc-b06c-4fe8-a352-0ce16db082d7}</Project>
79
+      <Name>CallCenterApi.DB</Name>
80
+    </ProjectReference>
81
+    <ProjectReference Include="..\CallCenterApi.Model\CallCenterApi.Model.csproj">
82
+      <Project>{03ac6599-ffc1-43db-8794-f42b9bf74ef5}</Project>
83
+      <Name>CallCenterApi.Model</Name>
84
+    </ProjectReference>
73
   </ItemGroup>
85
   </ItemGroup>
74
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
86
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
75
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
87
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 

+ 68 - 0
CallCenterApi/CallCenterApi.Common/CommonHelper.cs

7
 using System.Net;
7
 using System.Net;
8
 using System.IO;
8
 using System.IO;
9
 using System.Net.NetworkInformation;
9
 using System.Net.NetworkInformation;
10
+using CallCenterApi.DB;
11
+using System.Collections.Generic;
10
 
12
 
11
 namespace CallCenterApi.Common
13
 namespace CallCenterApi.Common
12
 {
14
 {
324
 
326
 
325
             return inUse;
327
             return inUse;
326
         }
328
         }
329
+
330
+
331
+        /// <summary>
332
+        ///   ///// 12345来源是110平台的工单结案时调用这个接口更新110的表的数据
333
+        /// </summary>
334
+        /// <param name="workorderid"></param>
335
+        public static void pushresult(string workorderid)
336
+        {
337
+            string url = Configs.GetValue("PushAyResultUrl");
338
+            //  string url = "http://localhost:51927/api/BusWorkorder/update";
339
+
340
+            Model.T_Bus_WorkOrder oldmodel = new BLL.T_Bus_WorkOrder().GetModel(workorderid);
341
+
342
+            //根据工单编号获取110的报警单编号
343
+            string jjdbh = "";
344
+            var objorderid = DbHelperSQL.GetSingle("select jjdbh from dy_jjdb where workorderId='" + workorderid + "'");
345
+            if (objorderid != null)
346
+            {
347
+                jjdbh = objorderid.ToString();
348
+            }
349
+            else
350
+            {
351
+
352
+                return;
353
+            }
354
+
355
+            Dictionary<string, object> dic = new Dictionary<string, object>();
356
+            dic.Add("jjdbh", jjdbh);
357
+            dic.Add("F_Result", oldmodel.F_Result);
358
+
359
+            var result = Post(url, dic);
360
+
361
+        }
362
+        public static string Post(string url, Dictionary<string, object> dic)
363
+        {
364
+            string result = "";
365
+            HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
366
+            req.Method = "POST";
367
+            req.ContentType = "application/x-www-form-urlencoded";
368
+            #region 添加Post 参数
369
+            StringBuilder builder = new StringBuilder();
370
+            int i = 0;
371
+            foreach (var item in dic)
372
+            {
373
+                if (i > 0)
374
+                    builder.Append("&");
375
+                builder.AppendFormat("{0}={1}", item.Key, item.Value);
376
+                i++;
377
+            }
378
+            byte[] data = Encoding.UTF8.GetBytes(builder.ToString());
379
+            req.ContentLength = data.Length;
380
+            using (Stream reqStream = req.GetRequestStream())
381
+            {
382
+                reqStream.Write(data, 0, data.Length);
383
+                reqStream.Close();
384
+            }
385
+            #endregion
386
+            HttpWebResponse resp = (HttpWebResponse)req.GetResponse();
387
+            Stream stream = resp.GetResponseStream();
388
+            //获取响应内容
389
+            using (StreamReader reader = new StreamReader(stream, Encoding.UTF8))
390
+            {
391
+                result = reader.ReadToEnd();
392
+            }
393
+            return result;
394
+        }
327
     }
395
     }
328
 }
396
 }

File diff suppressed because it is too large
+ 14 - 5
CallCenterApi/CallCenterApi.DAL/T_Bus_WorkOrder.cs


+ 3 - 0
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Configs/system.config

139
 <add key="ForeNativeURL" value="http://172.16.1.5:8818/" />
139
 <add key="ForeNativeURL" value="http://172.16.1.5:8818/" />
140
       <add key="ISfiring" value="1" />
140
       <add key="ISfiring" value="1" />
141
 
141
 
142
+  <add key="PushAyResultUrl" value="http://192.168.8.20:5566/api/BusWorkorder/update"/>
143
+  <add key="PushAyOrderUrl" value="http://192.168.8.20:5566/api/BusWorkorder/add"/>
144
+  <add key="SendToPhone" value="15605815106"/>
142
 </appSettings>
145
 </appSettings>

File diff suppressed because it is too large
+ 620 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/AffairsController.cs


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

11030
                         {
11030
                         {
11031
                             System.Diagnostics.Debug.WriteLine(DateTime.Now);
11031
                             System.Diagnostics.Debug.WriteLine(DateTime.Now);
11032
                         });
11032
                         });
11033
+                        try
11034
+                        {
11035
+                            if (modelT_Bus_WorkOrder.F_InfoSource == 4606)
11036
+                            {
11037
+                                CommonHelper.pushresult(modelT_Bus_WorkOrder.F_WorkOrderId);
11038
+                            }
11039
+                        }
11040
+                        catch (Exception ex)
11041
+                        {
11042
+
11043
+                            //  FileLog.Error("结案110工单:" + ex.ToJson()); ;
11044
+                        }
11045
+                        
11046
+
11047
+
11033
                     }
11048
                     }
11034
                     var curuser = User;
11049
                     var curuser = User;
11035
                     Task.Run(() =>
11050
                     Task.Run(() =>
11665
                     //modelT_Bus_WorkOrder.F_Village  = village;
11680
                     //modelT_Bus_WorkOrder.F_Village  = village;
11666
                     keyValuePairs.Add("F_InfoType", type);
11681
                     keyValuePairs.Add("F_InfoType", type);
11667
                     //modelT_Bus_WorkOrder.F_InfoType = type;//信息类别
11682
                     //modelT_Bus_WorkOrder.F_InfoType = type;//信息类别
11668
-                    keyValuePairs.Add("F_InfoConBigType", bigtype);
11683
+                 //   keyValuePairs.Add("F_InfoConBigType", bigtype);
11669
                     //modelT_Bus_WorkOrder.F_InfoConBigType = bigtype;//内容大类
11684
                     //modelT_Bus_WorkOrder.F_InfoConBigType = bigtype;//内容大类
11670
                     keyValuePairs.Add("F_InfoConSmallType", smalltype);
11685
                     keyValuePairs.Add("F_InfoConSmallType", smalltype);
11671
                     //modelT_Bus_WorkOrder.F_InfoConSmallType = smalltype;//内容小类
11686
                     //modelT_Bus_WorkOrder.F_InfoConSmallType = smalltype;//内容小类
12020
                         {
12035
                         {
12021
                             System.Diagnostics.Debug.WriteLine(DateTime.Now);
12036
                             System.Diagnostics.Debug.WriteLine(DateTime.Now);
12022
                         });
12037
                         });
12038
+
12039
+                        try
12040
+                        {
12041
+                            if (modelT_Bus_WorkOrder.F_InfoSource == 4606)
12042
+                            {
12043
+                                CommonHelper.pushresult(modelT_Bus_WorkOrder.F_WorkOrderId);
12044
+                            }
12045
+                        }
12046
+                        catch (Exception ex)
12047
+                        {
12048
+
12049
+                            //  FileLog.Error("结案110工单:" + ex.ToJson()); ;
12050
+                        }
12023
                     }
12051
                     }
12024
 
12052
 
12025
                     oper.F_CreateUser = User.F_UserCode;
12053
                     oper.F_CreateUser = User.F_UserCode;
12110
                         //modelT_Bus_WorkOrder.F_InfoSource = source;//信息来源
12138
                         //modelT_Bus_WorkOrder.F_InfoSource = source;//信息来源
12111
                         keyValuePairs.Add("F_InfoType", type);
12139
                         keyValuePairs.Add("F_InfoType", type);
12112
                         //modelT_Bus_WorkOrder.F_InfoType = type;//信息类别
12140
                         //modelT_Bus_WorkOrder.F_InfoType = type;//信息类别
12113
-                        keyValuePairs.Add("F_InfoConBigType", bigtype);
12141
+                      //  keyValuePairs.Add("F_InfoConBigType", bigtype);
12114
                         //modelT_Bus_WorkOrder.F_InfoConBigType = bigtype;//内容大类
12142
                         //modelT_Bus_WorkOrder.F_InfoConBigType = bigtype;//内容大类
12115
                         keyValuePairs.Add("F_InfoConSmallType", smalltype);
12143
                         keyValuePairs.Add("F_InfoConSmallType", smalltype);
12116
                         //modelT_Bus_WorkOrder.F_InfoConSmallType = smalltype;//内容小类
12144
                         //modelT_Bus_WorkOrder.F_InfoConSmallType = smalltype;//内容小类
19697
                                 oper.F_IsDelete = 0;
19725
                                 oper.F_IsDelete = 0;
19698
 
19726
 
19699
                                 int o = operBLL.Add(oper);
19727
                                 int o = operBLL.Add(oper);
19728
+
19729
+
19730
+                                try
19731
+                                {
19732
+                                    if (modelT_Bus_WorkOrder.F_InfoSource == 4606)
19733
+                                    {
19734
+                                        CommonHelper.pushresult(modelT_Bus_WorkOrder.F_WorkOrderId);
19735
+                                    }
19736
+                                }
19737
+                                catch (Exception ex)
19738
+                                {
19739
+
19740
+                                    //  FileLog.Error("结案110工单:" + ex.ToJson()); ;
19741
+                                }
19700
                                 Task.Run(() =>
19742
                                 Task.Run(() =>
19701
                                 {
19743
                                 {
19702
                                     process_info(o, "case_process_info", "审核工单");
19744
                                     process_info(o, "case_process_info", "审核工单");
19915
                                     {
19957
                                     {
19916
                                         System.Diagnostics.Debug.WriteLine(DateTime.Now);
19958
                                         System.Diagnostics.Debug.WriteLine(DateTime.Now);
19917
                                     });
19959
                                     });
19960
+
19961
+                                    try
19962
+                                    {
19963
+                                        if (modelT_Bus_WorkOrder.F_InfoSource == 4606)
19964
+                                        {
19965
+                                            CommonHelper.pushresult(modelT_Bus_WorkOrder.F_WorkOrderId);
19966
+                                        }
19967
+                                    }
19968
+                                    catch (Exception ex)
19969
+                                    {
19970
+
19971
+                                        //  FileLog.Error("结案110工单:" + ex.ToJson()); ;
19972
+                                    }
19973
+
19918
                                     var cureuser = User;
19974
                                     var cureuser = User;
19919
                                     Task.Run(() =>
19975
                                     Task.Run(() =>
19920
                                     {
19976
                                     {
20328
                             {
20384
                             {
20329
                                 System.Diagnostics.Debug.WriteLine(DateTime.Now);
20385
                                 System.Diagnostics.Debug.WriteLine(DateTime.Now);
20330
                             });
20386
                             });
20387
+                            try
20388
+                            {
20389
+                                if (model.F_InfoSource == 4606)
20390
+                                {
20391
+                                    CommonHelper.pushresult(model.F_WorkOrderId);
20392
+                                }
20393
+                            }
20394
+                            catch (Exception ex)
20395
+                            {
20396
+
20397
+                                //  FileLog.Error("结案110工单:" + ex.ToJson()); ;
20398
+                            }
20399
+
20331
                         }
20400
                         }
20332
                         else
20401
                         else
20333
                         {
20402
                         {
20350
                             {
20419
                             {
20351
                                 System.Diagnostics.Debug.WriteLine(DateTime.Now);
20420
                                 System.Diagnostics.Debug.WriteLine(DateTime.Now);
20352
                             });
20421
                             });
20422
+                            try
20423
+                            {
20424
+                                if (modelT_Bus_WorkOrder.F_InfoSource == 4606)
20425
+                                {
20426
+                                    CommonHelper.pushresult(modelT_Bus_WorkOrder.F_WorkOrderId);
20427
+                                }
20428
+                            }
20429
+                            catch (Exception ex)
20430
+                            {
20431
+
20432
+                                //  FileLog.Error("结案110工单:" + ex.ToJson()); ;
20433
+                            }
20353
                         }
20434
                         }
20354
 
20435
 
20355
                     }
20436
                     }
20397
                                         {
20478
                                         {
20398
                                             System.Diagnostics.Debug.WriteLine(DateTime.Now);
20479
                                             System.Diagnostics.Debug.WriteLine(DateTime.Now);
20399
                                         });
20480
                                         });
20481
+                                        try
20482
+                                        {
20483
+                                            if (model1.F_InfoSource == 4606)
20484
+                                            {
20485
+                                                CommonHelper.pushresult(model1.F_WorkOrderId);
20486
+                                            }
20487
+                                        }
20488
+                                        catch (Exception ex)
20489
+                                        {
20490
+
20491
+                                            //  FileLog.Error("结案110工单:" + ex.ToJson()); ;
20492
+                                        }
20400
                                     }
20493
                                     }
20401
                                 }
20494
                                 }
20402
                             }
20495
                             }
20446
                             System.Diagnostics.Debug.WriteLine(DateTime.Now);
20539
                             System.Diagnostics.Debug.WriteLine(DateTime.Now);
20447
                         });
20540
                         });
20448
                         workorderBLL.UpdateWorkOrder(it.F_Id, keyValuePairs1);
20541
                         workorderBLL.UpdateWorkOrder(it.F_Id, keyValuePairs1);
20542
+                        try
20543
+                        {
20544
+                            if (it.F_InfoSource == 4606)
20545
+                            {
20546
+                                CommonHelper.pushresult(it.F_WorkOrderId);
20547
+                            }
20548
+                        }
20549
+                        catch (Exception ex)
20550
+                        {
20551
+
20552
+                            //  FileLog.Error("结案110工单:" + ex.ToJson()); ;
20553
+                        }
20554
+
20449
                     }
20555
                     }
20450
                 }
20556
                 }
20451
 
20557
 
20558
                                                     {
20664
                                                     {
20559
                                                         System.Diagnostics.Debug.WriteLine(DateTime.Now);
20665
                                                         System.Diagnostics.Debug.WriteLine(DateTime.Now);
20560
                                                     });
20666
                                                     });
20667
+
20668
+                                                    try
20669
+                                                    {
20670
+                                                        if (model2.F_InfoSource == 4606)
20671
+                                                        {
20672
+                                                            CommonHelper.pushresult(model2.F_WorkOrderId);
20673
+                                                        }
20674
+                                                    }
20675
+                                                    catch (Exception ex)
20676
+                                                    {
20677
+
20678
+                                                        //  FileLog.Error("结案110工单:" + ex.ToJson()); ;
20679
+                                                    }
20680
+
20561
                                                 }
20681
                                                 }
20562
                                                 else
20682
                                                 else
20563
                                                     workorderBLL.UpdateWorkOrder(model2.F_Id, keyValuePairs3);
20683
                                                     workorderBLL.UpdateWorkOrder(model2.F_Id, keyValuePairs3);
20583
                                                 {
20703
                                                 {
20584
                                                     System.Diagnostics.Debug.WriteLine(DateTime.Now);
20704
                                                     System.Diagnostics.Debug.WriteLine(DateTime.Now);
20585
                                                 });
20705
                                                 });
20706
+                                                try
20707
+                                                {
20708
+                                                    if (model2.F_InfoSource == 4606)
20709
+                                                    {
20710
+                                                        CommonHelper.pushresult(model2.F_WorkOrderId);
20711
+                                                    }
20712
+                                                }
20713
+                                                catch (Exception ex)
20714
+                                                {
20715
+
20716
+                                                    //  FileLog.Error("结案110工单:" + ex.ToJson()); ;
20717
+                                                }
20718
+
20719
+
20586
                                             }
20720
                                             }
20587
 
20721
 
20588
                                         }
20722
                                         }
22310
                         {
22444
                         {
22311
                             System.Diagnostics.Debug.WriteLine(DateTime.Now);
22445
                             System.Diagnostics.Debug.WriteLine(DateTime.Now);
22312
                         });
22446
                         });
22447
+
22448
+                        try
22449
+                        {
22450
+                            if (modelT_Bus_WorkOrder.F_InfoSource == 4606)
22451
+                            {
22452
+                                CommonHelper.pushresult(modelT_Bus_WorkOrder.F_WorkOrderId);
22453
+                            }
22454
+                        }
22455
+                        catch (Exception ex)
22456
+                        {
22457
+
22458
+                            //  FileLog.Error("结案110工单:" + ex.ToJson()); ;
22459
+                        }
22460
+
22313
                         return Success("操作成功");
22461
                         return Success("操作成功");
22314
                     }
22462
                     }
22315
                     else
22463
                     else
22705
                     {
22853
                     {
22706
                         System.Diagnostics.Debug.WriteLine(DateTime.Now);
22854
                         System.Diagnostics.Debug.WriteLine(DateTime.Now);
22707
                     });
22855
                     });
22856
+
22857
+                    try
22858
+                    {
22859
+                        if (modelT_Bus_WorkOrder.F_InfoSource == 4606)
22860
+                        {
22861
+                            CommonHelper.pushresult(modelT_Bus_WorkOrder.F_WorkOrderId);
22862
+                        }
22863
+                    }
22864
+                    catch (Exception ex)
22865
+                    {
22866
+
22867
+                        //  FileLog.Error("结案110工单:" + ex.ToJson()); ;
22868
+                    }
22708
                     return Success("操作成功");
22869
                     return Success("操作成功");
22709
                 }
22870
                 }
22710
                 else
22871
                 else
23724
 
23885
 
23725
                         keyValuePairs.Add("F_InfoType", type);
23886
                         keyValuePairs.Add("F_InfoType", type);
23726
                         //modelT_Bus_WorkOrder.F_InfoType = type;//信息类别
23887
                         //modelT_Bus_WorkOrder.F_InfoType = type;//信息类别
23727
-                        keyValuePairs.Add("F_InfoConBigType", bigtype);
23888
+                   //     keyValuePairs.Add("F_InfoConBigType", bigtype);
23728
                         //modelT_Bus_WorkOrder.F_InfoConBigType = bigtype;//内容大类
23889
                         //modelT_Bus_WorkOrder.F_InfoConBigType = bigtype;//内容大类
23729
                         keyValuePairs.Add("F_InfoConSmallType", smalltype);
23890
                         keyValuePairs.Add("F_InfoConSmallType", smalltype);
23730
                         //modelT_Bus_WorkOrder.F_InfoConSmallType = smalltype;//内容小类
23891
                         //modelT_Bus_WorkOrder.F_InfoConSmallType = smalltype;//内容小类

+ 9 - 0
CallCenterApi/CallCenterApi.Model/T_Bus_WorkOrder.cs

82
         private int _f_tobereply = 0;
82
         private int _f_tobereply = 0;
83
         private int _f_isopen = 0;
83
         private int _f_isopen = 0;
84
         private int _f_business = 0;
84
         private int _f_business = 0;
85
+        private int? _f_ordersign = 0;
85
 
86
 
86
         /// <summary>
87
         /// <summary>
87
         /// 
88
         /// 
758
         public string F_See { set; get; }
759
         public string F_See { set; get; }
759
         public int? F_Remind { set; get; }
760
         public int? F_Remind { set; get; }
760
         public string F_HandlingFile { set; get; }
761
         public string F_HandlingFile { set; get; }
762
+        /// <summary>
763
+        /// 推给110 是1,110推过来是2
764
+        /// </summary>
765
+        public int? F_OrderSign
766
+        {
767
+            set { _f_ordersign = value; }
768
+            get { return _f_ordersign; }
769
+        }
761
         #endregion Model
770
         #endregion Model
762
 
771
 
763
     }
772
     }