1550076451 %!s(int64=2) %!d(string=před) roky
rodič
revize
7ecc97a7e8

+ 61 - 12
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/AffairsController.cs

@@ -81,9 +81,9 @@ namespace CallCenterApi.Interface.Controllers.workorder
81 81
             // string GDCount = "select COUNT(1) from  T_Bus_WorkOrder WITH(NOLOCK)  where datediff(day , F_CreateTime   , getdate())= 0  ";
82 82
 
83 83
 
84
-            string ldCount = "SELECT COUNT(1) FROM T_Call_CallRecords  WITH(NOLOCK)  WHERE datediff(day , BeginTime    , getdate())= 0   ";
85
-            var ld = DbHelperSQL.GetSingle(ldCount).ToString();
86
-            paras.TDY_CALLNUM  = ld;
84
+            //string ldCount = "SELECT COUNT(1) FROM T_Call_CallRecords  WITH(NOLOCK)  WHERE datediff(day , BeginTime    , getdate())= 0    ";
85
+            //var ld = DbHelperSQL.GetSingle(ldCount).ToString();
86
+            //paras.TDY_CALLNUM  = ld;
87 87
 
88 88
             string DHCount = "SELECT  COUNT(1)  FROM T_Bus_WorkOrder WITH(NOLOCK) WHERE F_InfoSource = 1 AND datediff(day , F_CreateTime   , getdate())= 0    ";
89 89
             paras.TDY_TELNUM = DbHelperSQL.GetSingle(DHCount).ToString();
@@ -108,13 +108,17 @@ namespace CallCenterApi.Interface.Controllers.workorder
108 108
             var jtl = DbHelperSQL.GetSingle(jt).ToString();
109 109
             paras.TDY_CONNECTNUM  = jtl;
110 110
 
111
-            string wjt = "SELECT COUNT(1) FROM T_Call_CallRecords  WITH(NOLOCK)  WHERE datediff(day , BeginTime    , getdate())= 0 AND CallState =0  and isnull(UserCode,'')!=''";
112
-            var wjt1 = DbHelperSQL.GetSingle(wjt).ToString();
113
-
111
+            //  string wjt = "SELECT COUNT(1) FROM T_Call_CallRecords  WITH(NOLOCK)  WHERE datediff(day , BeginTime    , getdate())= 0 AND CallState =0  and isnull(UserCode,'')!=''";
112
+            //var wjt1 = DbHelperSQL.GetSingle(wjt).ToString();
113
+            string ldcount = "SELECT COUNT(1) FROM T_Call_CallRecords  WITH(NOLOCK) " +
114
+                 " WHERE datediff(day , BeginTime    , getdate())= 0   and isnull(UserCode,'')!=''";
115
+            var ldcount1 = DbHelperSQL.GetSingle(ldcount).ToString();
116
+            paras.TDY_CALLNUM = ldcount1;
114 117
             string TDY_TELRATE = "0";
115 118
             try
116 119
             {
117
-                float total = float.Parse(ld) ;
120
+             
121
+                float total = float.Parse(ldcount1) ;
118 122
                 if (total > 0)
119 123
                 {
120 124
                     TDY_TELRATE = string.Format("{0:f2}", float.Parse(jtl) / total * 100);
@@ -131,6 +135,51 @@ namespace CallCenterApi.Interface.Controllers.workorder
131 135
 
132 136
             string jsonParam = "access_token=" + token + "&paras=" + paras.ToJson();
133 137
             var responseString = HttpMethods.HttpPost("http://59.227.93.14:9000/share/ssfwxx", jsonParam);
138
+            Push jo = JsonConvert.DeserializeObject<Push>(responseString);
139
+
140
+            if (jo.code == "1")
141
+            {
142
+
143
+                string strSql = string.Format(@"INSERT INTO T_Sys_PushMsg ( [WorkOrderId], [Conent], [CreatTime], 
144
+                [Code], [Message], [Title], [ErrorObjs], [Remarks]) 
145
+                   values   ('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}') ;select @@IDENTITY ",
146
+                   "", "", DateTime.Now, jo.code, jo.message, "实时服务信息上报接口", "", "推送成功数:"
147
+                   + jo.body.successCount + " 推送总数:" + jo.body.totalCount);
148
+                object objres = DbHelperSQL.GetSingle(strSql);
149
+            }
150
+            else
151
+            {
152
+                string error = "";
153
+                if (jo.body.errorObjs != null && jo.body.errorObjs.Length > 0)
154
+                {
155
+                    foreach (var it in jo.body.errorObjs)
156
+                    {
157
+                        if (!string.IsNullOrEmpty(it.resturl))
158
+                        {
159
+                            error += " 推送接口名称:" + it.resturl;
160
+                        }
161
+                        if (!string.IsNullOrEmpty(it.caseserial))
162
+                        {
163
+                            error += " 推送工单号:" + it.caseserial;
164
+                        }
165
+                        if (!string.IsNullOrEmpty(it.resturl))
166
+                        {
167
+                            error += " 推送标识:" + it.errorid;
168
+                        }
169
+                        if (!string.IsNullOrEmpty(it.resturl))
170
+                        {
171
+                            error += " 推送失败原因:" + it.errormsg;
172
+                        }
173
+                    }
174
+                }
175
+                string strSql = string.Format(@"INSERT INTO T_Sys_PushMsg ( [WorkOrderId], [Conent], 
176
+[CreatTime], [Code], [Message], [Title], [ErrorObjs], [Remarks]) 
177
+                   values   ('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}') ;select @@IDENTITY ", "",
178
+                   paras.ToJson(), DateTime.Now, jo.code, jo.message, "实时服务信息上报接口", error, "推送成功数:"
179
+                   + jo.body.successCount + " 推送总数:" + jo.body.totalCount);
180
+                object objres = DbHelperSQL.GetSingle(strSql);
181
+
182
+            }
134 183
             var obj = new
135 184
             {
136 185
                 responseString,
@@ -1693,7 +1742,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1693 1742
         [Authority]
1694 1743
         public ActionResult SubmitWorkOrder(string[] ids)
1695 1744
         {
1696
-            if (User.F_RoleCode == "ZXHWY" || User.F_RoleCode == "ZXBZ" || User.F_RoleCode == "GLY" || User.F_RoleCode == "ZXLD" || User.F_RoleCode == "DDZG" || User.F_RoleCode == "MTDD" || User.F_RoleCode == "DMTSH")
1745
+            if (User.F_RoleCode == "ZXHWY" || User.F_RoleCode == "ZXBZ" || User.F_RoleCode == "SPZJZ" || User.F_RoleCode == "GLY" || User.F_RoleCode == "ZXLD"||User.F_RoleCode == "SPZJZ" || User.F_RoleCode == "DDZG" || User.F_RoleCode == "MTDD" || User.F_RoleCode == "DMTSH")
1697 1746
             {
1698 1747
                 if (ids != null && ids.Length > 0)
1699 1748
                 {
@@ -1834,7 +1883,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1834 1883
         public ActionResult RebackWorkOrder()
1835 1884
         {
1836 1885
 
1837
-            if (User.F_RoleCode == "WLDW" || User.F_RoleCode == "ZXLD" || User.F_RoleCode == "GLY" || User.F_RoleCode == "DDZG")
1886
+            if (User.F_RoleCode == "WLDW" || User.F_RoleCode == "ZXLD" || User.F_RoleCode == "SPZJZ" || User.F_RoleCode == "GLY" || User.F_RoleCode == "DDZG")
1838 1887
             {
1839 1888
                 string workorderid = RequestString.GetFormString("workorderid");
1840 1889
                 string backreason = RequestString.GetFormString("backreason");
@@ -1921,7 +1970,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1921 1970
         public ActionResult ForceFinishWorkOrder()
1922 1971
         {
1923 1972
 
1924
-            if (User.F_RoleCode == "ZXLD" || User.F_RoleCode == "ZXHWY" || User.F_RoleCode == "ZXLD" || User.F_RoleCode == "ZXLDGLYGLY" || User.F_RoleCode == "GLY" || User.F_RoleCode == "DDZG" || User.F_RoleCode == "MTDD" || User.F_RoleCode == "DMTSH" || User.F_RoleCode == "DBZY")
1973
+            if (User.F_RoleCode == "ZXLD" || User.F_RoleCode == "SPZJZ" || User.F_RoleCode == "ZXHWY" || User.F_RoleCode == "ZXLD" || User.F_RoleCode == "ZXLDGLYGLY" || User.F_RoleCode == "GLY" || User.F_RoleCode == "DDZG" || User.F_RoleCode == "MTDD" || User.F_RoleCode == "DMTSH" || User.F_RoleCode == "DBZY")
1925 1974
             {
1926 1975
 
1927 1976
                 string workorderid = RequestString.GetFormString("workorderid");
@@ -1945,7 +1994,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1945 1994
                 if (modelT_Bus_WorkOrder != null)
1946 1995
                 {
1947 1996
                     if (User.F_RoleCode != "GLY" && User.F_RoleCode != "DDZG"
1948
-                        && User.F_RoleCode != "ZXHWY" && User.F_RoleCode != "ZXLD" && User.F_RoleCode != "YSZY" && User.F_RoleCode != "MTDD" && User.F_RoleCode != "DBZY" && User.F_RoleCode != "DMTSH")
1997
+                        && User.F_RoleCode != "ZXHWY" &&User .F_RoleCode !="SPZJZ"&& User.F_RoleCode != "ZXLD" && User.F_RoleCode != "YSZY" && User.F_RoleCode != "MTDD" && User.F_RoleCode != "DBZY" && User.F_RoleCode != "DMTSH")
1949 1998
                     {
1950 1999
                         if (modelT_Bus_AssignedInfo != null && modelT_Bus_AssignedInfo.F_CreateUser != User.F_UserCode)
1951 2000
                         {
@@ -2261,7 +2310,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
2261 2310
         public ActionResult DelayWorkOrder()
2262 2311
         {
2263 2312
 
2264
-            if (User.F_RoleCode == "WLDW" || User.F_RoleCode == "ZXLD" || User.F_RoleCode == "GLY" || User.F_RoleCode == "DDZG")
2313
+            if (User.F_RoleCode == "WLDW" || User.F_RoleCode == "SPZJZ" || User.F_RoleCode == "ZXLD" || User.F_RoleCode == "GLY" || User.F_RoleCode == "DDZG")
2265 2314
             {
2266 2315
                 string workorderid = RequestString.GetFormString("workorderid");
2267 2316
                 int newlimittime = RequestString.GetInt("newlimittime", 0);

+ 3 - 4
CallCenterCommon/CallCenter.QuartzService/Peoplewebsite.cs

@@ -20,12 +20,11 @@ namespace CallCenter.QuartzService
20 20
             CronExpression = "0 0 0 * * ? *";
21 21
             DoWork += GetLY;
22 22
         }
23
-        string ISfiring = Configs.GetValue("ISfiring");
23
+      
24 24
         public void GetLY(object sender, EventArgs e)
25 25
         {
26 26
 
27
-            if(ISfiring=="1")
28
-            {
27
+          
29 28
                 while (true)
30 29
                 {
31 30
                     if (DateTime.Now.Hour >= 0 && DateTime.Now.Hour < 7)
@@ -43,7 +42,7 @@ namespace CallCenter.QuartzService
43 42
                     else
44 43
                         break;
45 44
                 }
46
-            }
45
+            
47 46
            
48 47
 
49 48
         }

+ 2 - 7
CallCenterCommon/CallCenter.QuartzService/ZhengWuDuiJie.cs

@@ -59,15 +59,10 @@ namespace CallCenter.QuartzService
59 59
         /// <param name="sender"></param>
60 60
         /// <param name="e"></param>
61 61
 
62
-        private void submit_dept_crnt_status(object sender, EventArgs e)
62
+        public  void submit_dept_crnt_status(object sender, EventArgs e)
63 63
 
64 64
         {
65
-            if (ISfiring=="1")
66
-            {
67
-                var Dataurl = HttpMethods.HttpPost(FrontUrl + "/Affairs/submit_dept_crnt_status");
68
-            }
69
-          
70
-
65
+            var Dataurl = HttpMethods.HttpPost("http://10.0.22.201:8002/Affairs/submit_dept_crnt_status");
71 66
         }
72 67
    
73 68
         private string GetToken()