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

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

81
             // string GDCount = "select COUNT(1) from  T_Bus_WorkOrder WITH(NOLOCK)  where datediff(day , F_CreateTime   , getdate())= 0  ";
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
             string DHCount = "SELECT  COUNT(1)  FROM T_Bus_WorkOrder WITH(NOLOCK) WHERE F_InfoSource = 1 AND datediff(day , F_CreateTime   , getdate())= 0    ";
88
             string DHCount = "SELECT  COUNT(1)  FROM T_Bus_WorkOrder WITH(NOLOCK) WHERE F_InfoSource = 1 AND datediff(day , F_CreateTime   , getdate())= 0    ";
89
             paras.TDY_TELNUM = DbHelperSQL.GetSingle(DHCount).ToString();
89
             paras.TDY_TELNUM = DbHelperSQL.GetSingle(DHCount).ToString();
108
             var jtl = DbHelperSQL.GetSingle(jt).ToString();
108
             var jtl = DbHelperSQL.GetSingle(jt).ToString();
109
             paras.TDY_CONNECTNUM  = jtl;
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
             string TDY_TELRATE = "0";
117
             string TDY_TELRATE = "0";
115
             try
118
             try
116
             {
119
             {
117
-                float total = float.Parse(ld) ;
120
+             
121
+                float total = float.Parse(ldcount1) ;
118
                 if (total > 0)
122
                 if (total > 0)
119
                 {
123
                 {
120
                     TDY_TELRATE = string.Format("{0:f2}", float.Parse(jtl) / total * 100);
124
                     TDY_TELRATE = string.Format("{0:f2}", float.Parse(jtl) / total * 100);
131
 
135
 
132
             string jsonParam = "access_token=" + token + "&paras=" + paras.ToJson();
136
             string jsonParam = "access_token=" + token + "&paras=" + paras.ToJson();
133
             var responseString = HttpMethods.HttpPost("http://59.227.93.14:9000/share/ssfwxx", jsonParam);
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
             var obj = new
183
             var obj = new
135
             {
184
             {
136
                 responseString,
185
                 responseString,
1693
         [Authority]
1742
         [Authority]
1694
         public ActionResult SubmitWorkOrder(string[] ids)
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
                 if (ids != null && ids.Length > 0)
1747
                 if (ids != null && ids.Length > 0)
1699
                 {
1748
                 {
1834
         public ActionResult RebackWorkOrder()
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
                 string workorderid = RequestString.GetFormString("workorderid");
1888
                 string workorderid = RequestString.GetFormString("workorderid");
1840
                 string backreason = RequestString.GetFormString("backreason");
1889
                 string backreason = RequestString.GetFormString("backreason");
1921
         public ActionResult ForceFinishWorkOrder()
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
                 string workorderid = RequestString.GetFormString("workorderid");
1976
                 string workorderid = RequestString.GetFormString("workorderid");
1945
                 if (modelT_Bus_WorkOrder != null)
1994
                 if (modelT_Bus_WorkOrder != null)
1946
                 {
1995
                 {
1947
                     if (User.F_RoleCode != "GLY" && User.F_RoleCode != "DDZG"
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
                         if (modelT_Bus_AssignedInfo != null && modelT_Bus_AssignedInfo.F_CreateUser != User.F_UserCode)
1999
                         if (modelT_Bus_AssignedInfo != null && modelT_Bus_AssignedInfo.F_CreateUser != User.F_UserCode)
1951
                         {
2000
                         {
2261
         public ActionResult DelayWorkOrder()
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
                 string workorderid = RequestString.GetFormString("workorderid");
2315
                 string workorderid = RequestString.GetFormString("workorderid");
2267
                 int newlimittime = RequestString.GetInt("newlimittime", 0);
2316
                 int newlimittime = RequestString.GetInt("newlimittime", 0);

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

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

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

59
         /// <param name="sender"></param>
59
         /// <param name="sender"></param>
60
         /// <param name="e"></param>
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
         private string GetToken()
68
         private string GetToken()