52 lines
1.8 KiB
C#
Executable File
52 lines
1.8 KiB
C#
Executable File
using Microsoft.Extensions.DependencyInjection;
|
|
using Opsoft.Data;
|
|
using Opsoft.NetCore.O3App.Domain.UnitOfWork.BaseData.IRepositories;
|
|
using Opsoft.NetCore.O3App.Domain.UnitOfWork.BaseData.Model;
|
|
using Opsoft.NetCore.O3App.Shared;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
namespace Opsoft.NetCore.O3App.Repositories.BaseData
|
|
{
|
|
[MapTo(typeof(IAssetinventoryRepository), ServiceLifetime.Transient)]
|
|
public class AssetinventoryRepository : RepositoryBase<IAS_ASSETSINVENTORY>, IAssetinventoryRepository
|
|
{
|
|
|
|
public AssetinventoryRepository() : base()
|
|
{
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// 新闻列表显示方法
|
|
/// </summary>
|
|
/// <param name="data"></param>
|
|
/// <returns></returns>
|
|
public async Task<List<IAS_ASSETSINVENTORY>> GetAllAssetinventoryUnRead(object data)
|
|
{
|
|
dynamic getData = JsonOperator.JsonDeserialize<dynamic>(data.ToString());
|
|
|
|
using APPServerContext context = new APPServerContext(LoginInfo.DBAias, LoginInfo.UserID);
|
|
|
|
string sql = string.Format(@"
|
|
SELECT
|
|
FBILLNO,
|
|
FNAME,
|
|
FDATE,
|
|
FNOTE,
|
|
FSTATUS,
|
|
FCHECKDATE
|
|
FROM T_IAS_ASSETSINVENTORY
|
|
WHERE FNAME BETWEEN ({1}-1)*({2}+1) AND {1}*{2}
|
|
ORDER BY FNAME DESC ",
|
|
LoginInfo.UserID, getData.pageNum, getData.pageCount);
|
|
var retData = await context.Database.SqlQueryAsync<IAS_ASSETSINVENTORY>(sql);
|
|
|
|
|
|
return retData;
|
|
}
|
|
}
|
|
}
|