|
|
|
@ -92,7 +92,9 @@ namespace _24Hour.Controllers.Common
|
|
|
|
|
.WhereIF(Lawyerdata?.unitId != null, q => q.unitCode.Contains(Lawyerdata.unitId)) |
|
|
|
|
.WhereIF(Lawyerdata?.state != null, q => q.state == Lawyerdata.state) |
|
|
|
|
.WhereIF(Lawyerdata?.StartTime != null && Lawyerdata.EndTime != null, q => q.receptiontime >= Lawyerdata.StartTime && q.receptiontime < Lawyerdata.EndTime.Value.AddDays(1)) |
|
|
|
|
.Where(q => q.IsDeleted == 0 && q.unitCode == _userdata.unitCode).OrderByDescending(q => q.creationtime).ToPageListAsync(Lawyerdata.PageIndex, Lawyerdata.PageSize, totalNumber); |
|
|
|
|
.Where(q => q.IsDeleted == 0) |
|
|
|
|
.WhereIF(_userdata.phone != "admin", q => q.unitCode == _userdata.unitCode) |
|
|
|
|
.OrderByDescending(q => q.creationtime).ToPageListAsync(Lawyerdata.PageIndex, Lawyerdata.PageSize, totalNumber); |
|
|
|
|
Lawyerdata.RowsCount = totalNumber; |
|
|
|
|
var data = new QueryResult<App_LawyerServicesModel>(Lawyerdata, list.OrderByDescending(q => q.creationtime).ToList()); |
|
|
|
|
result.IsSucceed = true; |
|
|
|
@ -281,8 +283,15 @@ namespace _24Hour.Controllers.Common
|
|
|
|
|
Lawyerboldata.reason = reason; |
|
|
|
|
Lawyerboldata.acceptancetime = DateTime.Now; |
|
|
|
|
_db.BeginTran(); |
|
|
|
|
var num = await _db.Updateable(Lawyerboldata).UpdateColumns(it => new { it.state, it.reason, it.acceptancetime ,it.receptiontime,it |
|
|
|
|
.receptionEndtime}).ExecuteCommandAsync(); |
|
|
|
|
var num = await _db.Updateable(Lawyerboldata).UpdateColumns(it => new |
|
|
|
|
{ |
|
|
|
|
it.state, |
|
|
|
|
it.reason, |
|
|
|
|
it.acceptancetime, |
|
|
|
|
it.receptiontime, |
|
|
|
|
it |
|
|
|
|
.receptionEndtime |
|
|
|
|
}).ExecuteCommandAsync(); |
|
|
|
|
_db.CommitTran(); |
|
|
|
|
if (num > 0) |
|
|
|
|
{ |
|
|
|
|