diff --git a/24Hour/Controllers/Common/CommonController.cs b/24Hour/Controllers/Common/CommonController.cs index 68df658..b2a64a8 100644 --- a/24Hour/Controllers/Common/CommonController.cs +++ b/24Hour/Controllers/Common/CommonController.cs @@ -366,7 +366,7 @@ namespace _24Hour.Controllers.Common name = q.name, phone = q.phone, matter = q.matter,//事由 - objectstr = "",//访问对象(案件名称) + objectstr = q.objectstr,//访问对象(案件名称) lawyerunit = "", location = "", @@ -613,7 +613,7 @@ namespace _24Hour.Controllers.Common name = q.name, phone = q.phone, matter = q.matter,//事由 - objectstr = "",//访问对象(案件名称) + objectstr = q.objectstr,//访问对象(案件名称) handleId = q.receptionuser, handleuser = q.receptionusername, operatorId = q.operatorId, @@ -1272,12 +1272,12 @@ namespace _24Hour.Controllers.Common { if (dto.Type == 1) { - if (Lawyerbol.FirstOrDefault().operatorId!=null) - { - result.IsSucceed = false; - result.result = "预约已受理"; - return result; - } + //if (Lawyerbol.FirstOrDefault().operatorId!=null) + //{ + // result.IsSucceed = false; + // result.result = "预约已受理"; + // return result; + //} Lawyerbol.FirstOrDefault().acceptancetime = dto.time; Lawyerbol.FirstOrDefault().reason = dto.reason; Lawyerbol.FirstOrDefault().state = Convert.ToInt32(dto.state); @@ -1306,12 +1306,12 @@ namespace _24Hour.Controllers.Common if (dto.Type == 1) { - if (RemoteModelbol.FirstOrDefault().operatorId != null) - { - result.IsSucceed = false; - result.result = "预约已受理"; - return result; - } + //if (RemoteModelbol.FirstOrDefault().operatorId != null) + //{ + // result.IsSucceed = false; + // result.result = "预约已受理"; + // return result; + //} RemoteModelbol.FirstOrDefault().acceptancetime = dto.time; RemoteModelbol.FirstOrDefault().reason = dto.reason; RemoteModelbol.FirstOrDefault().state = Convert.ToInt32(dto.state); @@ -1340,12 +1340,12 @@ namespace _24Hour.Controllers.Common if (dto.Type == 1) { - if (Receptiondata.FirstOrDefault().operatorId != null) - { - result.IsSucceed = false; - result.result = "预约已受理"; - return result; - } + //if (Receptiondata.FirstOrDefault().operatorId != null) + //{ + // result.IsSucceed = false; + // result.result = "预约已受理"; + // return result; + //} Receptiondata.FirstOrDefault().acceptancetime = dto.time; Receptiondata.FirstOrDefault().reason = dto.reason; Receptiondata.FirstOrDefault().state = Convert.ToInt32(dto.state); @@ -1373,12 +1373,12 @@ namespace _24Hour.Controllers.Common { if (dto.Type == 1) { - if (Confessiondata.FirstOrDefault().operatorId != null) - { - result.IsSucceed = false; - result.result = "预约已受理"; - return result; - } + //if (Confessiondata.FirstOrDefault().operatorId != null) + //{ + // result.IsSucceed = false; + // result.result = "预约已受理"; + // return result; + //} Confessiondata.FirstOrDefault().acceptancetime = dto.time; Confessiondata.FirstOrDefault().reason = dto.reason; Confessiondata.FirstOrDefault().state =Convert.ToInt32(dto.state); @@ -1407,12 +1407,12 @@ namespace _24Hour.Controllers.Common if (dto.Type == 1) { - if (Hearingdata.FirstOrDefault().operatorId != null) - { - result.IsSucceed = false; - result.result = "预约已受理"; - return result; - } + //if (Hearingdata.FirstOrDefault().operatorId != null) + //{ + // result.IsSucceed = false; + // result.result = "预约已受理"; + // return result; + //} Hearingdata.FirstOrDefault().acceptancetime = dto.time; Hearingdata.FirstOrDefault().reason = dto.reason; Hearingdata.FirstOrDefault().state = Convert.ToInt32(dto.state); diff --git a/24Hour/Controllers/Common/WebSocketController.cs b/24Hour/Controllers/Common/WebSocketController.cs index cdeddae..d47bcba 100644 --- a/24Hour/Controllers/Common/WebSocketController.cs +++ b/24Hour/Controllers/Common/WebSocketController.cs @@ -122,8 +122,8 @@ namespace _24Hour.Controllers.Common try { //获取发送人连接 - var socket = CONNECT_POOL.Where(q => q.Key == _userdata.Id).Select(q => q.Value).First(); - if (socket.State == WebSocketState.Open) + var socket = CONNECT_POOL.Where(q => q.Key == _userdata.Id).Select(q => q.Value).FirstOrDefault(); + if (socket!=null&&socket.State == WebSocketState.Open) { ArraySegment buffer = new ArraySegment(new byte[2048]); //WebSocketReceiveResult ret = await socket.ReceiveAsync(buffer, CancellationToken.None); diff --git a/24Hour/Controllers/system/SystemControllerController.cs b/24Hour/Controllers/system/SystemControllerController.cs index f466ebd..2f4cc0f 100644 --- a/24Hour/Controllers/system/SystemControllerController.cs +++ b/24Hour/Controllers/system/SystemControllerController.cs @@ -1106,10 +1106,10 @@ namespace _24Hour.Controllers.system /// /// [HttpGet] - [Route("GetQueryMenusssslist")] - public async Task GetQueryMenusssslist() + [Route("GetQueryMenulist")] + public async Task GetQueryMenulist() { - var list = await _db.Queryable().Where(q => q.IsDelete == 0 && q.pid.IsNull()).Select(q => new { q.Id, q.name }).ToListAsync(); + var list = await _db.Queryable().Where(q => q.IsDelete == 0 || q.pid==null || q.pid == "").Select(q => new { q.Id, q.name }).ToListAsync(); result.IsSucceed = true; result.result = list; return result;