unit单位初始化
This commit is contained in:
36
ZR.Service/mes/md/UnitService.cs
Normal file
36
ZR.Service/mes/md/UnitService.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Collections.Generic;
|
||||
using Infrastructure.Attribute;
|
||||
using SqlSugar;
|
||||
using ZR.Model.mes.md;
|
||||
using ZR.Model.mes.md.DTO;
|
||||
using ZR.Model.System;
|
||||
using ZR.Service.mes.md.IService;
|
||||
using ZR.Service.System.IService;
|
||||
using NotImplementedException = System.NotImplementedException;
|
||||
|
||||
namespace ZR.Service.mes.md;
|
||||
|
||||
/// <summary>
|
||||
/// 文件管理
|
||||
/// </summary>
|
||||
[AppService(ServiceType = typeof(IUnitService), ServiceLifetime = LifeTime.Transient)]
|
||||
public class UnitService : BaseService<Unit>, IUnitService
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取列表
|
||||
/// </summary>
|
||||
/// <param name="pageNum"></param>
|
||||
/// <param name="pageSize"></param>
|
||||
/// <returns></returns>
|
||||
public UnitPageDTO GetList(int pageNum,int pageSize)
|
||||
{
|
||||
int totalNum = 0;
|
||||
List<Unit> data = Context.Queryable<Unit>().ToPageList(pageNum, pageSize, ref totalNum);
|
||||
UnitPageDTO unitPageDto = new UnitPageDTO();
|
||||
unitPageDto.list = data;
|
||||
unitPageDto.Total = totalNum;
|
||||
return unitPageDto ;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user