|
|
@@ -245,7 +245,62 @@ namespace CallCenterApi.Interface.Controllers
|
|
245
|
245
|
return pushResult; ;
|
|
246
|
246
|
}
|
|
247
|
247
|
|
|
248
|
|
-
|
|
|
248
|
+ public ActionResult SmsOverTime()
|
|
|
249
|
+ {
|
|
|
250
|
+
|
|
|
251
|
+ var workorder = new BLL.T_Bus_WorkOrder().GetModelList("F_IsDelete=0 and F_WorkState in (2,4,8) and (F_Remind!=1 or F_Remind is null) " +
|
|
|
252
|
+ "and DATEDIFF(HH, GETDATE(), F_LimitTime) < 24 and F_LimitTime > GETDATE()");
|
|
|
253
|
+ if (workorder != null)
|
|
|
254
|
+ {
|
|
|
255
|
+ foreach (var it in workorder)
|
|
|
256
|
+ {
|
|
|
257
|
+ System.TimeSpan time = DateTime.Parse(it.F_LimitTime.ToString()) - DateTime.Now;
|
|
|
258
|
+ if (time.TotalHours <= 24)
|
|
|
259
|
+ {
|
|
|
260
|
+
|
|
|
261
|
+ var user = new BLL.T_Sys_UserAccount().GetModelList(" F_DeptId=" + it.F_MainDeptId + "and F_DeleteFlag=0");
|
|
|
262
|
+ if (user != null)
|
|
|
263
|
+ {
|
|
|
264
|
+ foreach (var iv in user)
|
|
|
265
|
+ {
|
|
|
266
|
+ if (!string.IsNullOrEmpty(iv.F_Mobile))
|
|
|
267
|
+ {
|
|
|
268
|
+ string count = " 您有工单24小时后超期,请及时处理,工单号" + it.F_WorkOrderId;
|
|
|
269
|
+ Dictionary<string, object> keyValuePairs = new Dictionary<string, object>();
|
|
|
270
|
+ keyValuePairs.Add("F_Remind", "1");
|
|
|
271
|
+ bool t = new BLL.T_Bus_WorkOrder().UpdateWorkOrder(it.F_Id, keyValuePairs);
|
|
|
272
|
+ PushApp("临期提醒", count, iv.F_UserCode);
|
|
|
273
|
+ }
|
|
|
274
|
+ }
|
|
|
275
|
+ }
|
|
|
276
|
+ }
|
|
|
277
|
+ }
|
|
|
278
|
+ }
|
|
|
279
|
+ var LimitTime = new BLL.T_Bus_WorkOrder().GetModelList("F_IsDelete=0 and F_WorkState in (2,4,8) and (F_Remind=1 or F_Remind is null) " +
|
|
|
280
|
+ "AND F_LimitTime<getdate()");
|
|
|
281
|
+ if (LimitTime != null)
|
|
|
282
|
+ {
|
|
|
283
|
+ foreach (var it in LimitTime)
|
|
|
284
|
+ {
|
|
|
285
|
+ var user = new BLL.T_Sys_UserAccount().GetModelList(" F_DeptId=" + it.F_MainDeptId + "and F_DeleteFlag=0");
|
|
|
286
|
+ if (user != null)
|
|
|
287
|
+ {
|
|
|
288
|
+ foreach (var iv in user)
|
|
|
289
|
+ {
|
|
|
290
|
+ if (!string.IsNullOrEmpty(iv.F_Mobile))
|
|
|
291
|
+ {
|
|
|
292
|
+ string count = " 您有工单已超期,请及时处理,工单号" + it.F_WorkOrderId;
|
|
|
293
|
+ Dictionary<string, object> keyValuePairs = new Dictionary<string, object>();
|
|
|
294
|
+ keyValuePairs.Add("F_Remind", "2");
|
|
|
295
|
+ bool t = new BLL.T_Bus_WorkOrder().UpdateWorkOrder(it.F_Id, keyValuePairs);
|
|
|
296
|
+ PushApp("超期提醒", count, iv.F_UserCode);
|
|
|
297
|
+ }
|
|
|
298
|
+ }
|
|
|
299
|
+ }
|
|
|
300
|
+ }
|
|
|
301
|
+ }
|
|
|
302
|
+ return Success("发送成功");
|
|
|
303
|
+ }
|
|
249
|
304
|
private static string PushMessageToList(string Title, string count, string CLIENTID)
|
|
250
|
305
|
{
|
|
251
|
306
|
// 推送主类(方式1,不可与方式2共存)
|