Пример #1
0
        public static void EndAllLinkageAndCall()
        {
            //结束所有联动历史记录
            var req = new EndAllRequest
            {
                EndTime = DateTime.Now
            };

            EmergencyLinkHistoryService.EndAll(req);

            //结束之前的应急联动rcall
            var res3 = SysEmergencyLinkageService.GetAllSysEmergencyLinkageListDb();
            //var allLinkageConfigInDel = res3.Data.Where(a => a.Type == 1).ToList();
            var allLinkageConfigInDel   = res3.Data;
            var allLinkageConfigInDelId = new List <string>(); //所有存储的应急联动id

            foreach (var item in allLinkageConfigInDel)
            {
                if (item.Type == 1)
                {
                    allLinkageConfigInDelId.Add(item.Id);
                }
                else
                {
                    allLinkageConfigInDelId.Add(item.MasterModelId);
                }
            }

            var res2           = RcallService.GetAllCall();
            var allRcall       = res2.Data;
            var allNormalRcall = allRcall
                                 .Where(a => allLinkageConfigInDelId.Contains(a.MasterId) && a.CallType == 1)
                                 .ToList(); //所有呼叫中的rcall
            var req15 = new EndRcallDbByRcallInfoListEequest
            {
                RcallInfo = allNormalRcall
            };

            RcallService.EndRcallDbByRcallInfoList(req15);

            //结束之前的应急联动bcall
            var req13          = new BasicRequest();
            var res13          = BcallService.GetAll(req13);
            var allBcall       = res13.Data;
            var allNormalBcall = allBcall
                                 .Where(a => allLinkageConfigInDelId.Contains(a.MasterId) && a.CallType == 1)
                                 .ToList(); //所有呼叫中的bcall
            var req16 = new EndBcallDbByBcallInfoListRequest
            {
                Info = allNormalBcall
            };

            BcallService.EndBcallDbByBcallInfoList(req16);
        }
Пример #2
0
 public BasicResponse EndBcallDbByBcallInfoList(EndBcallDbByBcallInfoListRequest request)
 {
     return(_bcallService.EndBcallDbByBcallInfoList(request));
 }