|
@@ -16,6 +16,7 @@ using OASystem.Domain.Entities.Financial;
|
|
|
using OASystem.Domain.Entities.Groups;
|
|
|
using OASystem.Domain.Entities.Resource;
|
|
|
using OASystem.Domain.ViewModels.Business;
|
|
|
+using OASystem.Domain.ViewModels.CRM;
|
|
|
using OASystem.Domain.ViewModels.Financial;
|
|
|
using OASystem.Domain.ViewModels.Groups;
|
|
|
using OASystem.Infrastructure.Repositories.Business;
|
|
@@ -709,6 +710,45 @@ Where c.ConfListId = {0}", ConfId);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 表操作记录
|
|
|
+ /// 分页
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost]
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
+ public async Task<IActionResult> PostTableOperationRecordPageList(TableOperationRecordPageDto _dto)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ string whereSql = "";
|
|
|
+
|
|
|
+ if (!string.IsNullOrEmpty(_dto.TableName))
|
|
|
+ {
|
|
|
+ whereSql = string.Format(" And tor.TableName = '{0}'", _dto.TableName);
|
|
|
+ }
|
|
|
+
|
|
|
+ string sql = string.Format(@"Select row_number() over(order by tor.CreateTime Desc) As Row_Number,
|
|
|
+ tor.TableName,tor.PortType,tor.OperationItem,tor.DataId,u.CnName As OperationUserName,
|
|
|
+ tor.CreateTime,tor.Remark
|
|
|
+ From Crm_TableOperationRecord tor
|
|
|
+ Left Join Sys_Users u On tor.CreateUserId = u.Id
|
|
|
+ Where tor.Isdel = 0 {0}", whereSql);
|
|
|
+
|
|
|
+ RefAsync<int> total = 0;//REF和OUT不支持异步,想要真的异步这是最优解
|
|
|
+ var _view = await _TableOperationRecordRep._sqlSugar.SqlQueryable<TableOperationRecordPageView>(sql).ToPageListAsync(_dto.PageIndex, _dto.PageSize, total);//ToPageAsync
|
|
|
+
|
|
|
+ return Ok(JsonView(true, "查询成功!", _view, total));
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "程序错误!Msg:" + ex.Message));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
#endregion
|
|
|
|
|
|
|