32 lines
977 B
C#
32 lines
977 B
C#
|
|
using WcsMain.ApiServe.Controllers.Dto;
|
|||
|
|
using WcsMain.ApiServe.Controllers.Dto.WcsDto.Scan;
|
|||
|
|
using WcsMain.ApiServe.Factory;
|
|||
|
|
using WcsMain.DataBase.Dao;
|
|||
|
|
using WcsMain.DataBase.TableEntity;
|
|||
|
|
using WcsMain.WcsAttribute.AutoFacAttribute;
|
|||
|
|
|
|||
|
|
namespace WcsMain.ApiServe.Service.WcsService;
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 扫码器相关控制器的Service
|
|||
|
|
/// </summary>
|
|||
|
|
[Service]
|
|||
|
|
public class ScanService(AppScanRecordDao scanRecordDao)
|
|||
|
|
{
|
|||
|
|
/// <summary>
|
|||
|
|
/// 分页查询扫码记录
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="request"></param>
|
|||
|
|
/// <returns></returns>
|
|||
|
|
public WcsApiResponse<int, List<AppScanRecord>> QueryScanRecordWithPage(QueryScanRecordWithPageRequest request)
|
|||
|
|
{
|
|||
|
|
(List<AppScanRecord>? records, int totalCount) = scanRecordDao.Query(request);
|
|||
|
|
if(records == default)
|
|||
|
|
{
|
|||
|
|
return WcsApiResponseFactory.DataBaseErr<int, List<AppScanRecord>>();
|
|||
|
|
}
|
|||
|
|
return WcsApiResponseFactory.Success(totalCount, records);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|