Quellcode durchsuchen

调整公告消息的读取

zhengbingbing vor 6 Jahren
Ursprung
Commit
8f64d21725

+ 46 - 44
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/MsgController.cs

@@ -333,54 +333,56 @@ namespace CallCenterApi.Interface.Controllers
333 333
         public ActionResult GetServerMsg()
334 334
         {
335 335
             string usercode = CurrentUser.UserData.F_UserCode;
336
+            #region   20190522 zhengbingbing 调整读取消息
336 337
             //获取一个月内服务周期到期的客户信息
337
-            var cusbaseList = new BLL.T_Cus_CustomerBaseNew().GetModelList(" F_DeleteFlag=0 and DATEDIFF(month,F_CycleEnd,getdate())<=1 ");
338
-            //获取一个月内当前登录工号的消息提醒
339
-            var msgList = new BLL.T_Msg_List().GetModelList(" ToUser='" + usercode + "'and IsDel=0 and DATEDIFF(month,CreateDate,getdate())<=1  ");
340
-            //获取一个月内的开票信息
341
-            var billList = new BLL.T_Wo_Bill().GetModelList(" F_State=0 and F_IsDel=0 and DATEDIFF(month,F_CreateOn,getdate())<=1 ");
338
+            //var cusbaseList = new BLL.T_Cus_CustomerBaseNew().GetModelList(" F_DeleteFlag=0 and DATEDIFF(month,F_CycleEnd,getdate())<=1 ");
339
+            ////获取一个月内当前登录工号的消息提醒
340
+            //var msgList = new BLL.T_Msg_List().GetModelList(" ToUser='" + usercode + "'and IsDel=0 and DATEDIFF(month,CreateDate,getdate())<=1  ");
341
+            ////获取一个月内的开票信息
342
+            //var billList = new BLL.T_Wo_Bill().GetModelList(" F_State=0 and F_IsDel=0 and DATEDIFF(month,F_CreateOn,getdate())<=1 ");
342 343
 
343
-            #region 服务周期到期客户消息
344
-            foreach (var cusbase in cusbaseList)
345
-            {
346
-                var msgnew = msgList.Where(m => m.ToID == cusbase.F_CustomerId && m.Type== (int)Model.MSGType.cusserver);
347
-                //若消息列表中不能存在该客户信息,则添加
348
-                if (msgnew.Count() > 0)
349
-                {
350
-                    continue;
351
-                }
352
-                Model.T_Msg_List msg = new Model.T_Msg_List();
353
-                msg.Type = (int)Model.MSGType.cusserver;//服务周期
354
-                msg.ToUser = usercode;
355
-                msg.ToID = cusbase.F_CustomerId;
356
-                msg.Detail = "客户编号为:“" + cusbase.F_CustomerCode + "”的客户服务周期即将到期,请及时处理!";
357
-                msg.State = 0;
358
-                msg.IsDel = 0;
359
-                msg.CreateDate = DateTime.Now;
344
+            //#region 服务周期到期客户消息
345
+            //foreach (var cusbase in cusbaseList)
346
+            //{
347
+            //    var msgnew = msgList.Where(m => m.ToID == cusbase.F_CustomerId && m.Type== (int)Model.MSGType.cusserver);
348
+            //    //若消息列表中不能存在该客户信息,则添加
349
+            //    if (msgnew.Count() > 0)
350
+            //    {
351
+            //        continue;
352
+            //    }
353
+            //    Model.T_Msg_List msg = new Model.T_Msg_List();
354
+            //    msg.Type = (int)Model.MSGType.cusserver;//服务周期
355
+            //    msg.ToUser = usercode;
356
+            //    msg.ToID = cusbase.F_CustomerId;
357
+            //    msg.Detail = "客户编号为:“" + cusbase.F_CustomerCode + "”的客户服务周期即将到期,请及时处理!";
358
+            //    msg.State = 0;
359
+            //    msg.IsDel = 0;
360
+            //    msg.CreateDate = DateTime.Now;
360 361
 
361
-                new BLL.T_Msg_List().Add(msg);
362
-            }
363
-            #endregion
364
-            #region 开票消息提醒
365
-            foreach (var billbase in billList)
366
-            {
367
-                var msgnew = msgList.Where(m => m.ToID == billbase.F_ID && m.Type == (int)Model.MSGType.bill);
368
-                //若消息列表中不能存在该客户信息,则添加
369
-                if (msgnew.Count() > 0)
370
-                {
371
-                    continue;
372
-                }
373
-                Model.T_Msg_List msg = new Model.T_Msg_List();
374
-                msg.Type = (int)Model.MSGType.bill;//开票
375
-                msg.ToUser = usercode;
376
-                msg.ToID = billbase.F_ID;
377
-                msg.Detail = "新增一条客户" + billbase.F_CusName + "的开票信息,请及时处理!";
378
-                msg.State = 0;
379
-                msg.IsDel = 0;
380
-                msg.CreateDate = DateTime.Now;
362
+            //    new BLL.T_Msg_List().Add(msg);
363
+            //}
364
+            //#endregion
365
+            //#region 开票消息提醒
366
+            //foreach (var billbase in billList)
367
+            //{
368
+            //    var msgnew = msgList.Where(m => m.ToID == billbase.F_ID && m.Type == (int)Model.MSGType.bill);
369
+            //    //若消息列表中不能存在该客户信息,则添加
370
+            //    if (msgnew.Count() > 0)
371
+            //    {
372
+            //        continue;
373
+            //    }
374
+            //    Model.T_Msg_List msg = new Model.T_Msg_List();
375
+            //    msg.Type = (int)Model.MSGType.bill;//开票
376
+            //    msg.ToUser = usercode;
377
+            //    msg.ToID = billbase.F_ID;
378
+            //    msg.Detail = "新增一条客户" + billbase.F_CusName + "的开票信息,请及时处理!";
379
+            //    msg.State = 0;
380
+            //    msg.IsDel = 0;
381
+            //    msg.CreateDate = DateTime.Now;
381 382
 
382
-                new BLL.T_Msg_List().Add(msg);
383
-            }
383
+            //    new BLL.T_Msg_List().Add(msg);
384
+            //}
385
+            //#endregion
384 386
             #endregion
385 387
             var msgListnew = new BLL.T_Msg_List().GetModelList(" ToUser='" + usercode + "' and Type in (2,4,5) and State=0 and IsDel=0 order by CreateDate desc");
386 388
             return Success("获取消息", msgListnew);