|
|
|
@ -0,0 +1,75 @@
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.Reflection.PortableExecutable;
|
|
|
|
|
using Entity.Base;
|
|
|
|
|
using Entity.DbModel.Station;
|
|
|
|
|
using Entity.DbModel.System;
|
|
|
|
|
using Entity.Dto.Req;
|
|
|
|
|
using HybirdFrameworkCore.Autofac.Attribute;
|
|
|
|
|
using HybirdFrameworkCore.Entity;
|
|
|
|
|
using Mapster;
|
|
|
|
|
using Repository.Station;
|
|
|
|
|
using Service.Mgr;
|
|
|
|
|
using SqlSugar;
|
|
|
|
|
|
|
|
|
|
namespace Service.Station;
|
|
|
|
|
|
|
|
|
|
[Scope("SingleInstance")]
|
|
|
|
|
public class ManualOperationRecordService : BaseServices<ManualOperationRecord>
|
|
|
|
|
{
|
|
|
|
|
private ManualOperationRecordRepository _manualOperationRecordRepository;
|
|
|
|
|
|
|
|
|
|
public ManualOperationRecordService(ManualOperationRecordRepository dal)
|
|
|
|
|
{
|
|
|
|
|
_manualOperationRecordRepository = dal;
|
|
|
|
|
BaseDal = dal;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 异常人工操作分页列表 🔖
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="input"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[DisplayName("异常人工操作分页列表")]
|
|
|
|
|
public async Task<PageResult<ManualOperationRecord>> Page(PageManualOperationRecordReq input)
|
|
|
|
|
{
|
|
|
|
|
RefAsync<int> total = 0;
|
|
|
|
|
var items = await _manualOperationRecordRepository.QueryPageAsync(
|
|
|
|
|
entity => true,
|
|
|
|
|
false, entity => true,
|
|
|
|
|
!string.IsNullOrEmpty(input.SwapOrderSn), u => u.SwapOrderSn == input.SwapOrderSn,
|
|
|
|
|
input.Type != null, (u => input.Type != null && u.Type.Equals(input.Type.Value)),
|
|
|
|
|
u => u.CreatedTime, input.PageNum, input.PageSize, total
|
|
|
|
|
);
|
|
|
|
|
return new PageResult<ManualOperationRecord>()
|
|
|
|
|
{
|
|
|
|
|
PageNum = input.PageNum,
|
|
|
|
|
PageSize = input.PageSize,
|
|
|
|
|
ToTal = total,
|
|
|
|
|
Rows = items,
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 增加
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="sn"></param>
|
|
|
|
|
/// <param name="type"></param>
|
|
|
|
|
public void AddManualOperationRecord(string sn,int type)
|
|
|
|
|
{
|
|
|
|
|
if (sn!=null)
|
|
|
|
|
{
|
|
|
|
|
var manualOperationRecord = new ManualOperationRecord()
|
|
|
|
|
{
|
|
|
|
|
SwapOrderSn = sn,
|
|
|
|
|
Type = type,
|
|
|
|
|
CreatedBy = UserManager.Account,
|
|
|
|
|
UpdatedBy = UserManager.Account,
|
|
|
|
|
Operator = UserManager.Account
|
|
|
|
|
};
|
|
|
|
|
_manualOperationRecordRepository.Insert(manualOperationRecord);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|