baseline: 小军 WMS 二开代码原始快照(含 SynOABusiness.cs Debugger.Break)
This commit is contained in:
commit
c2b0e7be0d
6522 files changed
+3530643
No files matched your search
+75
@@ -0,0 +1,75 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Opsoft.NetCore.O3App.Domain;
|
||||
using Opsoft.NetCore.O3App.Domain.Interface;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.Assets.IRepositories;
|
||||
using Opsoft.NetCore.O3App.Shared;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.Assets.IServices;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.Assets.Model;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.Services.Assets
|
||||
{
|
||||
[MapTo(typeof(IAssetInventoryService), ServiceLifetime.Transient)]
|
||||
public class AssetInventoryService : ServiceBase<BaseEntity, IAssetInventoryRepository>, IAssetInventoryService
|
||||
{
|
||||
public AssetInventoryService(IAssetInventoryRepository repository) : base(repository)
|
||||
{
|
||||
Init(repository);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取盘点方案信息及暂存信息
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<GetAssetInventory>> GetAssetInventory(Inventory SData)
|
||||
{
|
||||
if (SData.FBILLNO==null)
|
||||
{
|
||||
throw new O3AppException("资产盘点方案条码信息错误,未定义!!",400);
|
||||
}
|
||||
return await (repository as IAssetInventoryRepository).GetAssetInventory(SData);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取资产信息
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<GetAssets>> GetAssets(Inventory SData)
|
||||
{
|
||||
if (SData.FBILLNO == null)
|
||||
{
|
||||
throw new O3AppException("资产条码信息错误,未定义!!", 400);
|
||||
}
|
||||
return await (repository as IAssetInventoryRepository).GetAssets(SData);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 资产盘点暂存
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> TemporaryStorage(Temporary SData)
|
||||
{
|
||||
if (SData.basicType.ToString() == "")
|
||||
{
|
||||
throw new O3AppException("资产盘点操作类型信息错误,未定义!!",400);
|
||||
}
|
||||
if (SData.FINTERID == null||SData.FBILLNO==null)
|
||||
{
|
||||
throw new O3AppException("资产盘点信息错误,未定义!!",400);
|
||||
}
|
||||
if (SData.SData.Count == 0)
|
||||
{
|
||||
throw new O3AppException("暂存资产信息错误,未定义!!", 400);
|
||||
}
|
||||
return await (repository as IAssetInventoryRepository).TemporaryStorage(SData);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user