449 changed files with 25512 additions and 361347 deletions
Binary file not shown.
@ -0,0 +1,35 @@ |
|||
{ |
|||
"Version": 1, |
|||
"WorkspaceRootPath": "D:\\www\\WZC2_New\\", |
|||
"Documents": [], |
|||
"DocumentGroupContainers": [ |
|||
{ |
|||
"Orientation": 1, |
|||
"VerticalTabListWidth": 256, |
|||
"DocumentGroups": [ |
|||
{ |
|||
"DockedHeight": 200, |
|||
"SelectedChildIndex": -1, |
|||
"Children": [ |
|||
{ |
|||
"$type": "Bookmark", |
|||
"Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}" |
|||
}, |
|||
{ |
|||
"$type": "Bookmark", |
|||
"Name": "ST:128:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" |
|||
}, |
|||
{ |
|||
"$type": "Bookmark", |
|||
"Name": "ST:129:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" |
|||
}, |
|||
{ |
|||
"$type": "Bookmark", |
|||
"Name": "ST:128:0:{1fc202d4-d401-403c-9834-5b218574bb67}" |
|||
} |
|||
] |
|||
} |
|||
] |
|||
} |
|||
] |
|||
} |
Binary file not shown.
@ -0,0 +1,14 @@ |
|||
using Win_in.Sfs.Wms.DataExchange.Dapper.Fawtyg.Tyrp; |
|||
using Win_in.Sfs.Wms.DataExchange.Dapper.Fawtyg.Tyrp.Bases; |
|||
using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Tyrp; |
|||
|
|||
namespace Win_in.Sfs.Wms.DataExchange.LinqToDB.Fawtyg.Tyrp.PurchasePrices; |
|||
public class PurchasePriceLinq2DbRepository : |
|||
Linq2DbCrudRepository<ismout>, |
|||
IPurchasePriceLinq2DbRepository |
|||
{ |
|||
public PurchasePriceLinq2DbRepository(TyrpDb tyrpDb) : base(tyrpDb) |
|||
{ |
|||
|
|||
} |
|||
} |
@ -0,0 +1,20 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Win_in.Sfs.Wms.DataExchange.Dapper.Fawtyg.Tyrp.Bases; |
|||
using Win_in.Sfs.Wms.DataExchange.Dapper.Fawtyg.Tyrp; |
|||
using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Tyrp; |
|||
|
|||
namespace Win_in.Sfs.Wms.DataExchange.LinqToDB.Fawtyg.Tyrp.SalePrices; |
|||
|
|||
public class SalePriceLinq2DbRepository : |
|||
Linq2DbCrudRepository<spriceout>, |
|||
ISalePriceLinq2DbRepository |
|||
{ |
|||
public SalePriceLinq2DbRepository(TyrpDb tyrpDb) : base(tyrpDb) |
|||
{ |
|||
|
|||
} |
|||
} |
@ -0,0 +1,10 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Tyrp; |
|||
public interface IPurchasePriceLinq2DbRepository : ILinq2DbRepository<ismout> |
|||
{ |
|||
} |
@ -0,0 +1,8 @@ |
|||
using System.Collections.Generic; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Tyrp; |
|||
public interface IPurchasePriceManager |
|||
{ |
|||
Task<List<ismout>> GetToBeProcessedListAsync(); |
|||
} |
@ -0,0 +1,23 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Domain.Services; |
|||
|
|||
namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Tyrp; |
|||
public class PurchasePriceManager : DomainService, IPurchasePriceManager |
|||
{ |
|||
private readonly IPurchasePriceLinq2DbRepository _repository; |
|||
public PurchasePriceManager(IPurchasePriceLinq2DbRepository repository) |
|||
{ |
|||
_repository = repository; |
|||
} |
|||
|
|||
public async Task<List<ismout>> GetToBeProcessedListAsync() |
|||
{ |
|||
var purchaseprice = await _repository.GetListAsync().ConfigureAwait(false); |
|||
return purchaseprice.ToList(); |
|||
} |
|||
} |
|||
|
@ -0,0 +1,33 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Domain.Entities; |
|||
|
|||
namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Tyrp; |
|||
/// <summary>
|
|||
/// 采购价格
|
|||
/// </summary>
|
|||
public class ismout : Entity |
|||
{ |
|||
/// <summary>
|
|||
/// 物料代码
|
|||
/// </summary>
|
|||
public string ismout_part { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 供应商代码
|
|||
/// </summary>
|
|||
public string ismout_vend { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 采购价格
|
|||
/// </summary>
|
|||
public decimal ismout_price { get; set; } |
|||
|
|||
public override object[] GetKeys() |
|||
{ |
|||
return new object[] { ismout_part, ismout_vend }; |
|||
} |
|||
} |
@ -0,0 +1,10 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Tyrp; |
|||
public interface ISalePriceLinq2DbRepository : ILinq2DbRepository<spriceout> |
|||
{ |
|||
} |
@ -0,0 +1,8 @@ |
|||
using System.Collections.Generic; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Tyrp; |
|||
public interface ISalePriceManager |
|||
{ |
|||
Task<List<spriceout>> GetToBeProcessedListAsync(); |
|||
} |
@ -0,0 +1,23 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Domain.Services; |
|||
|
|||
namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Tyrp; |
|||
|
|||
public class SalePriceManager : DomainService, ISalePriceManager |
|||
{ |
|||
private readonly ISalePriceLinq2DbRepository _repository; |
|||
public SalePriceManager(ISalePriceLinq2DbRepository repository) |
|||
{ |
|||
_repository = repository; |
|||
} |
|||
|
|||
public async Task<List<spriceout>> GetToBeProcessedListAsync() |
|||
{ |
|||
var saleprice = await _repository.GetListAsync().ConfigureAwait(false); |
|||
return saleprice.ToList(); |
|||
} |
|||
} |
@ -0,0 +1,33 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Domain.Entities; |
|||
|
|||
namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Tyrp; |
|||
/// <summary>
|
|||
/// 销售价格
|
|||
/// </summary>
|
|||
public class spriceout : Entity |
|||
{ |
|||
/// <summary>
|
|||
/// 物料代码
|
|||
/// </summary>
|
|||
public string spriceout_part { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 客户代码
|
|||
/// </summary>
|
|||
public string spriceout_cust { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 销售价格
|
|||
/// </summary>
|
|||
public decimal spriceout_price { get; set; } |
|||
|
|||
public override object[] GetKeys() |
|||
{ |
|||
return new object[] { spriceout_part, spriceout_cust }; |
|||
} |
|||
} |
@ -0,0 +1,75 @@ |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text.Json; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.Extensions.Logging; |
|||
using Volo.Abp.Guids; |
|||
using Volo.Abp.ObjectMapping; |
|||
using Win_in.Sfs.Basedata.Application.Contracts; |
|||
using Win_in.Sfs.Wms.DataExchange.Domain; |
|||
using Win_in.Sfs.Wms.DataExchange.WMS.PurchasePrice; |
|||
|
|||
namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent.Incoming; |
|||
|
|||
public class PurchasePriceConverter : IIncomingConverter |
|||
{ |
|||
private readonly IIncomingToWmsManager _incomingToWmsManager; |
|||
private readonly IObjectMapper _objectMapper; |
|||
private readonly ILogger<PurchasePriceConverter> _logger; |
|||
private readonly IGuidGenerator _guidGenerator; |
|||
private readonly IIncomingFromExternalManager _incomingFromExternalManager; |
|||
|
|||
public PurchasePriceConverter( |
|||
IIncomingToWmsManager incomingToWmsManager, |
|||
IObjectMapper objectMapper, |
|||
ILogger<PurchasePriceConverter> logger, |
|||
IGuidGenerator guidGenerator |
|||
, |
|||
IIncomingFromExternalManager incomingFromExternalManager |
|||
|
|||
) |
|||
{ |
|||
_incomingToWmsManager = incomingToWmsManager; |
|||
_objectMapper = objectMapper; |
|||
_logger = logger; |
|||
_guidGenerator = guidGenerator; |
|||
_incomingFromExternalManager = incomingFromExternalManager; |
|||
} |
|||
public virtual async Task ConvertAsync(List<IncomingFromExternal> incomingFromExternalList) |
|||
{ |
|||
if (!incomingFromExternalList.Any()) |
|||
{ |
|||
_logger.LogInformation("无采购价格转换"); |
|||
return; |
|||
} |
|||
var incomingToWmsDataList = await BuildIncomingToWmsOfPurchaseOrderAsync(incomingFromExternalList).ConfigureAwait(false); |
|||
await _incomingToWmsManager.CreateBulkAsync(incomingToWmsDataList).ConfigureAwait(false); |
|||
//归档
|
|||
await _incomingFromExternalManager.ArchiveManyAsync(incomingFromExternalList).ConfigureAwait(false); |
|||
|
|||
} |
|||
private async Task<List<IncomingToWms>> BuildIncomingToWmsOfPurchaseOrderAsync(List<IncomingFromExternal> incomingDataList) |
|||
{ |
|||
await Task.CompletedTask.ConfigureAwait(false); |
|||
var incomingToWmsList = new List<IncomingToWms>(); |
|||
var groups = incomingDataList.GroupBy(p => p.SourceDataGroupCode); |
|||
foreach (var group in groups) |
|||
{ |
|||
var first = group.First(); |
|||
var incomingToWms = new IncomingToWms() |
|||
{ |
|||
DataType = first.DataType, |
|||
DataAction = first.DataAction, |
|||
SourceSystem = first.SourceSystem, |
|||
DataIdentityCode = first.SourceDataGroupCode, |
|||
}; |
|||
incomingToWms.SetId(_guidGenerator.Create()); |
|||
incomingToWms.SetEffectiveDate(first.EffectiveDate); |
|||
var exchangePurchasePrice = JsonSerializer.Deserialize<PurchasePriceExchangeDto>(first.DestinationDataContent); |
|||
var wmsPurchasePrice = _objectMapper.Map<PurchasePriceExchangeDto, PurchasePriceSheetEditInput>(exchangePurchasePrice); |
|||
incomingToWms.DataContent = JsonSerializer.Serialize(wmsPurchasePrice); |
|||
incomingToWmsList.Add(incomingToWms); |
|||
} |
|||
return incomingToWmsList; |
|||
} |
|||
} |
@ -0,0 +1,133 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text.Json; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.Extensions.Configuration; |
|||
using Microsoft.Extensions.Logging; |
|||
using Volo.Abp.Guids; |
|||
using Volo.Abp.ObjectMapping; |
|||
using Win_in.Sfs.Basedata.Application.Contracts; |
|||
using Win_in.Sfs.Wms.DataExchange.Domain; |
|||
using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Tyrp; |
|||
using Win_in.Sfs.Wms.DataExchange.Domain.Shared; |
|||
using Win_in.Sfs.Wms.DataExchange.WMS.PurchasePrice; |
|||
|
|||
namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent.Incoming; |
|||
|
|||
public class PurchasePriceReader : IReader |
|||
{ |
|||
private readonly IPurchasePriceManager _iPurchasePriceManager; |
|||
private readonly IIncomingFromExternalManager _incomingFromExternalManager; |
|||
private readonly ILogger<PurchasePriceReader> _logger; |
|||
private readonly IGuidGenerator _guidGenerator; |
|||
private readonly IConfiguration _configuration; |
|||
private readonly IPurchasePriceSheetAppService _purchasePriceAppService; |
|||
private readonly IObjectMapper _objectMapper; |
|||
public PurchasePriceReader( |
|||
IPurchasePriceManager iPurchasePriceManager |
|||
, IIncomingFromExternalManager incomingFromExternalManager |
|||
, IGuidGenerator guidGenerator |
|||
, ILogger<PurchasePriceReader> logger |
|||
, IConfiguration configuration, |
|||
IPurchasePriceSheetAppService purchasePriceSheetAppService, |
|||
IObjectMapper objectMapper |
|||
) |
|||
{ |
|||
_guidGenerator = guidGenerator; |
|||
_configuration = configuration; |
|||
_iPurchasePriceManager = iPurchasePriceManager; |
|||
_incomingFromExternalManager = incomingFromExternalManager; |
|||
_logger = logger; |
|||
_purchasePriceAppService = purchasePriceSheetAppService; |
|||
_objectMapper = objectMapper; |
|||
} |
|||
|
|||
public virtual async Task<List<IncomingFromExternal>> ReadAsync() |
|||
{ |
|||
//从Tyrp读取待处理PurchasePrice
|
|||
var toBeProcessedPurchasePrices = await _iPurchasePriceManager.GetToBeProcessedListAsync().ConfigureAwait(false); |
|||
if (!toBeProcessedPurchasePrices.Any()) |
|||
{ |
|||
_logger.LogInformation("no PurchasePrices"); |
|||
return new List<IncomingFromExternal>(); |
|||
} |
|||
//获取wms采购单价数据
|
|||
SfsBaseDataRequestInputBase input = new SfsBaseDataRequestInputBase(); |
|||
var wmsPurchasePrices = await _purchasePriceAppService.GetAllListByFilterAsync(input).ConfigureAwait(false); |
|||
var wmsToPurchasePriceExchangeDtos = _objectMapper.Map<List<PurchasePriceSheetDTO>, List<PurchasePriceExchangeDto>>(wmsPurchasePrices); |
|||
List<PurchasePriceExchangeDto> eosToBomExchangeDtos = new List<PurchasePriceExchangeDto>(); |
|||
foreach (var toBeProcessedPurchasePrice in toBeProcessedPurchasePrices) |
|||
{ |
|||
var purchasePrice = BuildScrapNoteOrderExchangeMes(toBeProcessedPurchasePrice); |
|||
eosToBomExchangeDtos.Add(purchasePrice); |
|||
} |
|||
//和wms和eos数据进行比较,获取需要处理得数据
|
|||
var updateDatas = eosToBomExchangeDtos.Except(wmsToPurchasePriceExchangeDtos).ToList(); |
|||
if (!updateDatas.Any()) |
|||
{ |
|||
_logger.LogInformation("no PurchasePrices"); |
|||
return new List<IncomingFromExternal>(); |
|||
} |
|||
//PurchasePrice逐一转换为PurchasePrice
|
|||
var incomingDataList = BuildIncomingFromExternalFromBomAsync(updateDatas, toBeProcessedPurchasePrices); |
|||
await _incomingFromExternalManager.CreateBulkAsync(incomingDataList).ConfigureAwait(false); |
|||
return incomingDataList; |
|||
} |
|||
private List<IncomingFromExternal> BuildIncomingFromExternalFromBomAsync(List<PurchasePriceExchangeDto> updateDatas,List<ismout> toBeProcessedPurchasePrices) |
|||
{ |
|||
var incomingDataList = new List<IncomingFromExternal>(); |
|||
foreach (var data in updateDatas) |
|||
{ |
|||
var item = toBeProcessedPurchasePrices.FirstOrDefault(r => r.ismout_part == data.ItemCode && r.ismout_vend == data.SupplierCode); |
|||
var incomingData = BuildIncomingFromExternal(item); |
|||
|
|||
incomingData.SetEffectiveDate(DateTime.Now); |
|||
|
|||
try |
|||
{ |
|||
incomingData.DestinationDataContent = JsonSerializer.Serialize(data); |
|||
incomingData.SetId(_guidGenerator.Create()); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
incomingData.SetError(EnumExchangeDataErrorCode.Exception, ex.Message, ex.ToString()); |
|||
} |
|||
|
|||
incomingDataList.Add(incomingData); |
|||
|
|||
} |
|||
return incomingDataList; |
|||
} |
|||
private IncomingFromExternal BuildIncomingFromExternal(ismout PurchasePrice) |
|||
{ |
|||
var incomingData = new IncomingFromExternal() |
|||
{ |
|||
|
|||
DataType = EnumIncomingDataType.PurchasePrice.ToString(), |
|||
DataAction = EnumExchangeDataAction.Add, |
|||
SourceSystem = EnumSystemType.ERP.ToString(), |
|||
SourceDataId = PurchasePrice.ismout_part, |
|||
SourceDataGroupCode = PurchasePrice.ismout_part, |
|||
SourceDataDetailCode = PurchasePrice.ismout_vend, |
|||
SourceDataContent = JsonSerializer.Serialize(PurchasePrice), |
|||
WriteTime = DateTime.Now, |
|||
Writer = nameof(TyrpIncomingBackgroundWorker), |
|||
DestinationSystem = EnumSystemType.ERP.ToString(), |
|||
}; |
|||
return incomingData; |
|||
} |
|||
|
|||
private static PurchasePriceExchangeDto BuildScrapNoteOrderExchangeMes(ismout PurchasePrice) |
|||
{ |
|||
|
|||
var price = new PurchasePriceExchangeDto() |
|||
{ |
|||
ItemCode = PurchasePrice.ismout_part, |
|||
SupplierCode = PurchasePrice.ismout_vend, |
|||
PurchasePrice = PurchasePrice.ismout_price, |
|||
Description = "接口同步", |
|||
}; |
|||
return price; |
|||
} |
|||
} |
@ -0,0 +1,74 @@ |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text.Json; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.Extensions.Logging; |
|||
using Volo.Abp.Guids; |
|||
using Volo.Abp.ObjectMapping; |
|||
using Win_in.Sfs.Basedata.Application.Contracts; |
|||
using Win_in.Sfs.Wms.DataExchange.Domain; |
|||
using Win_in.Sfs.Wms.DataExchange.WMS.SalePrice; |
|||
|
|||
namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent.Incoming; |
|||
public class SalePriceConverter : IIncomingConverter |
|||
{ |
|||
private readonly IIncomingToWmsManager _incomingToWmsManager; |
|||
private readonly IObjectMapper _objectMapper; |
|||
private readonly ILogger<SalePriceConverter> _logger; |
|||
private readonly IGuidGenerator _guidGenerator; |
|||
private readonly IIncomingFromExternalManager _incomingFromExternalManager; |
|||
|
|||
public SalePriceConverter( |
|||
IIncomingToWmsManager incomingToWmsManager, |
|||
IObjectMapper objectMapper, |
|||
ILogger<SalePriceConverter> logger, |
|||
IGuidGenerator guidGenerator |
|||
, |
|||
IIncomingFromExternalManager incomingFromExternalManager |
|||
|
|||
) |
|||
{ |
|||
_incomingToWmsManager = incomingToWmsManager; |
|||
_objectMapper = objectMapper; |
|||
_logger = logger; |
|||
_guidGenerator = guidGenerator; |
|||
_incomingFromExternalManager = incomingFromExternalManager; |
|||
} |
|||
public virtual async Task ConvertAsync(List<IncomingFromExternal> incomingFromExternalList) |
|||
{ |
|||
if (!incomingFromExternalList.Any()) |
|||
{ |
|||
_logger.LogInformation("无销售价格转换"); |
|||
return; |
|||
} |
|||
var incomingToWmsDataList = await BuildIncomingToWmsOfPurchaseOrderAsync(incomingFromExternalList).ConfigureAwait(false); |
|||
await _incomingToWmsManager.CreateBulkAsync(incomingToWmsDataList).ConfigureAwait(false); |
|||
//归档
|
|||
await _incomingFromExternalManager.ArchiveManyAsync(incomingFromExternalList).ConfigureAwait(false); |
|||
|
|||
} |
|||
private async Task<List<IncomingToWms>> BuildIncomingToWmsOfPurchaseOrderAsync(List<IncomingFromExternal> incomingDataList) |
|||
{ |
|||
await Task.CompletedTask.ConfigureAwait(false); |
|||
var incomingToWmsList = new List<IncomingToWms>(); |
|||
var groups = incomingDataList.GroupBy(p => p.SourceDataGroupCode); |
|||
foreach (var group in groups) |
|||
{ |
|||
var first = group.First(); |
|||
var incomingToWms = new IncomingToWms() |
|||
{ |
|||
DataType = first.DataType, |
|||
DataAction = first.DataAction, |
|||
SourceSystem = first.SourceSystem, |
|||
DataIdentityCode = first.SourceDataGroupCode, |
|||
}; |
|||
incomingToWms.SetId(_guidGenerator.Create()); |
|||
incomingToWms.SetEffectiveDate(first.EffectiveDate); |
|||
var exchangeSalePrice = JsonSerializer.Deserialize<SalePriceExchangeDto>(first.DestinationDataContent); |
|||
var wmsSalePrice = _objectMapper.Map<SalePriceExchangeDto, SalePriceSheetEditInput>(exchangeSalePrice); |
|||
incomingToWms.DataContent = JsonSerializer.Serialize(wmsSalePrice); |
|||
incomingToWmsList.Add(incomingToWms); |
|||
} |
|||
return incomingToWmsList; |
|||
} |
|||
} |
@ -0,0 +1,132 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text.Json; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.Extensions.Configuration; |
|||
using Microsoft.Extensions.Logging; |
|||
using Volo.Abp.Guids; |
|||
using Volo.Abp.ObjectMapping; |
|||
using Win_in.Sfs.Basedata.Application.Contracts; |
|||
using Win_in.Sfs.Wms.DataExchange.Domain; |
|||
using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Tyrp; |
|||
using Win_in.Sfs.Wms.DataExchange.Domain.Shared; |
|||
using Win_in.Sfs.Wms.DataExchange.WMS.SalePrice; |
|||
|
|||
namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent.Incoming; |
|||
public class SalePriceReader : IReader |
|||
{ |
|||
private readonly ISalePriceManager _iSalePriceManager; |
|||
private readonly IIncomingFromExternalManager _incomingFromExternalManager; |
|||
private readonly ILogger<SalePriceReader> _logger; |
|||
private readonly IGuidGenerator _guidGenerator; |
|||
private readonly IConfiguration _configuration; |
|||
private readonly ISalePriceSheetAppService _SalePriceAppService; |
|||
private readonly IObjectMapper _objectMapper; |
|||
public SalePriceReader( |
|||
ISalePriceManager iSalePriceManager |
|||
, IIncomingFromExternalManager incomingFromExternalManager |
|||
, IGuidGenerator guidGenerator |
|||
, ILogger<SalePriceReader> logger |
|||
, IConfiguration configuration, |
|||
ISalePriceSheetAppService SalePriceSheetAppService, |
|||
IObjectMapper objectMapper |
|||
) |
|||
{ |
|||
_guidGenerator = guidGenerator; |
|||
_configuration = configuration; |
|||
_iSalePriceManager = iSalePriceManager; |
|||
_incomingFromExternalManager = incomingFromExternalManager; |
|||
_logger = logger; |
|||
_SalePriceAppService = SalePriceSheetAppService; |
|||
_objectMapper = objectMapper; |
|||
} |
|||
|
|||
public virtual async Task<List<IncomingFromExternal>> ReadAsync() |
|||
{ |
|||
//从Tyrp读取待处理SalePrice
|
|||
var toBeProcessedSalePrices = await _iSalePriceManager.GetToBeProcessedListAsync().ConfigureAwait(false); |
|||
if (!toBeProcessedSalePrices.Any()) |
|||
{ |
|||
_logger.LogInformation("no SalePrices"); |
|||
return new List<IncomingFromExternal>(); |
|||
} |
|||
//获取wms销售单价数据
|
|||
SfsBaseDataRequestInputBase input = new SfsBaseDataRequestInputBase(); |
|||
var wmsSalePrices = await _SalePriceAppService.GetAllListByFilterAsync(input).ConfigureAwait(false); |
|||
var wmsToSalePriceExchangeDtos = _objectMapper.Map<List<SalePriceSheetDTO>, List<SalePriceExchangeDto>>(wmsSalePrices); |
|||
List<SalePriceExchangeDto> eosToBomExchangeDtos = new List<SalePriceExchangeDto>(); |
|||
foreach (var toBeProcessedSalePrice in toBeProcessedSalePrices) |
|||
{ |
|||
var SalePrice = BuildScrapNoteOrderExchangeMes(toBeProcessedSalePrice); |
|||
eosToBomExchangeDtos.Add(SalePrice); |
|||
} |
|||
//和wms和eos数据进行比较,获取需要处理得数据
|
|||
var updateDatas = eosToBomExchangeDtos.Except(wmsToSalePriceExchangeDtos).ToList(); |
|||
if (!updateDatas.Any()) |
|||
{ |
|||
_logger.LogInformation("no SalePrices"); |
|||
return new List<IncomingFromExternal>(); |
|||
} |
|||
//SalePrice逐一转换为SalePrice
|
|||
var incomingDataList = BuildIncomingFromExternalFromBomAsync(updateDatas, toBeProcessedSalePrices); |
|||
await _incomingFromExternalManager.CreateBulkAsync(incomingDataList).ConfigureAwait(false); |
|||
return incomingDataList; |
|||
} |
|||
private List<IncomingFromExternal> BuildIncomingFromExternalFromBomAsync(List<SalePriceExchangeDto> updateDatas, List<spriceout> toBeProcessedSalePrices) |
|||
{ |
|||
var incomingDataList = new List<IncomingFromExternal>(); |
|||
foreach (var data in updateDatas) |
|||
{ |
|||
var item = toBeProcessedSalePrices.FirstOrDefault(r => r.spriceout_part == data.ItemCode && r.spriceout_cust == data.CustomerCode); |
|||
var incomingData = BuildIncomingFromExternal(item); |
|||
|
|||
incomingData.SetEffectiveDate(DateTime.Now); |
|||
|
|||
try |
|||
{ |
|||
incomingData.DestinationDataContent = JsonSerializer.Serialize(data); |
|||
incomingData.SetId(_guidGenerator.Create()); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
incomingData.SetError(EnumExchangeDataErrorCode.Exception, ex.Message, ex.ToString()); |
|||
} |
|||
|
|||
incomingDataList.Add(incomingData); |
|||
|
|||
} |
|||
return incomingDataList; |
|||
} |
|||
private IncomingFromExternal BuildIncomingFromExternal(spriceout SalePrice) |
|||
{ |
|||
var incomingData = new IncomingFromExternal() |
|||
{ |
|||
|
|||
DataType = EnumIncomingDataType.SalePrice.ToString(), |
|||
DataAction = EnumExchangeDataAction.Add, |
|||
SourceSystem = EnumSystemType.ERP.ToString(), |
|||
SourceDataId = SalePrice.spriceout_part, |
|||
SourceDataGroupCode = SalePrice.spriceout_part, |
|||
SourceDataDetailCode = SalePrice.spriceout_cust, |
|||
SourceDataContent = JsonSerializer.Serialize(SalePrice), |
|||
WriteTime = DateTime.Now, |
|||
Writer = nameof(TyrpIncomingBackgroundWorker), |
|||
DestinationSystem = EnumSystemType.ERP.ToString(), |
|||
}; |
|||
return incomingData; |
|||
} |
|||
|
|||
private static SalePriceExchangeDto BuildScrapNoteOrderExchangeMes(spriceout SalePrice) |
|||
{ |
|||
|
|||
var price = new SalePriceExchangeDto() |
|||
{ |
|||
ItemCode = SalePrice.spriceout_part, |
|||
CustomerCode = SalePrice.spriceout_cust, |
|||
SalePrice = SalePrice.spriceout_price, |
|||
Description = "接口同步", |
|||
}; |
|||
return price; |
|||
} |
|||
} |
@ -0,0 +1,75 @@ |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text.Json; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.Extensions.Logging; |
|||
using Volo.Abp.Guids; |
|||
using Volo.Abp.ObjectMapping; |
|||
using Win_in.Sfs.Basedata.Application.Contracts; |
|||
using Win_in.Sfs.Wms.DataExchange.Domain; |
|||
using Win_in.Sfs.Wms.DataExchange.WMS.StdCostPrice; |
|||
|
|||
namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent.Incoming; |
|||
|
|||
public class StdCostPriceConverter : IIncomingConverter |
|||
{ |
|||
private readonly IIncomingToWmsManager _incomingToWmsManager; |
|||
private readonly IObjectMapper _objectMapper; |
|||
private readonly ILogger<StdCostPriceConverter> _logger; |
|||
private readonly IGuidGenerator _guidGenerator; |
|||
private readonly IIncomingFromExternalManager _incomingFromExternalManager; |
|||
|
|||
public StdCostPriceConverter( |
|||
IIncomingToWmsManager incomingToWmsManager, |
|||
IObjectMapper objectMapper, |
|||
ILogger<StdCostPriceConverter> logger, |
|||
IGuidGenerator guidGenerator |
|||
, |
|||
IIncomingFromExternalManager incomingFromExternalManager |
|||
|
|||
) |
|||
{ |
|||
_incomingToWmsManager = incomingToWmsManager; |
|||
_objectMapper = objectMapper; |
|||
_logger = logger; |
|||
_guidGenerator = guidGenerator; |
|||
_incomingFromExternalManager = incomingFromExternalManager; |
|||
} |
|||
public virtual async Task ConvertAsync(List<IncomingFromExternal> incomingFromExternalList) |
|||
{ |
|||
if (!incomingFromExternalList.Any()) |
|||
{ |
|||
_logger.LogInformation("无标准成本价格转换"); |
|||
return; |
|||
} |
|||
var incomingToWmsDataList = await BuildIncomingToWmsOfPurchaseOrderAsync(incomingFromExternalList).ConfigureAwait(false); |
|||
await _incomingToWmsManager.CreateBulkAsync(incomingToWmsDataList).ConfigureAwait(false); |
|||
//归档
|
|||
await _incomingFromExternalManager.ArchiveManyAsync(incomingFromExternalList).ConfigureAwait(false); |
|||
|
|||
} |
|||
private async Task<List<IncomingToWms>> BuildIncomingToWmsOfPurchaseOrderAsync(List<IncomingFromExternal> incomingDataList) |
|||
{ |
|||
await Task.CompletedTask.ConfigureAwait(false); |
|||
var incomingToWmsList = new List<IncomingToWms>(); |
|||
var groups = incomingDataList.GroupBy(p => p.SourceDataGroupCode); |
|||
foreach (var group in groups) |
|||
{ |
|||
var first = group.First(); |
|||
var incomingToWms = new IncomingToWms() |
|||
{ |
|||
DataType = first.DataType, |
|||
DataAction = first.DataAction, |
|||
SourceSystem = first.SourceSystem, |
|||
DataIdentityCode = first.SourceDataGroupCode, |
|||
}; |
|||
incomingToWms.SetId(_guidGenerator.Create()); |
|||
incomingToWms.SetEffectiveDate(first.EffectiveDate); |
|||
var exchangeStdCostPrice = JsonSerializer.Deserialize<StdCostPriceExchangeDto>(first.DestinationDataContent); |
|||
var wmsStdCostPrice = _objectMapper.Map<StdCostPriceExchangeDto, StdCostPriceSheetEditInput>(exchangeStdCostPrice); |
|||
incomingToWms.DataContent = JsonSerializer.Serialize(wmsStdCostPrice); |
|||
incomingToWmsList.Add(incomingToWms); |
|||
} |
|||
return incomingToWmsList; |
|||
} |
|||
} |
@ -0,0 +1,131 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text.Json; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.Extensions.Configuration; |
|||
using Microsoft.Extensions.Logging; |
|||
using Volo.Abp.Guids; |
|||
using Volo.Abp.ObjectMapping; |
|||
using Win_in.Sfs.Basedata.Application.Contracts; |
|||
using Win_in.Sfs.Wms.DataExchange.Domain; |
|||
using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Tyrp; |
|||
using Win_in.Sfs.Wms.DataExchange.Domain.Shared; |
|||
using Win_in.Sfs.Wms.DataExchange.WMS.StdCostPrice; |
|||
|
|||
namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent.Incoming; |
|||
public class StdCostPriceReader : IReader |
|||
{ |
|||
private readonly IProductManager _productManager; |
|||
private readonly IIncomingFromExternalManager _incomingFromExternalManager; |
|||
private readonly ILogger<StdCostPriceReader> _logger; |
|||
private readonly IGuidGenerator _guidGenerator; |
|||
private readonly IConfiguration _configuration; |
|||
private readonly IStdCostPriceSheetAppService _StdCostPriceAppService; |
|||
private readonly IObjectMapper _objectMapper; |
|||
public StdCostPriceReader( |
|||
IProductManager productManager |
|||
, IIncomingFromExternalManager incomingFromExternalManager |
|||
, IGuidGenerator guidGenerator |
|||
, ILogger<StdCostPriceReader> logger |
|||
, IConfiguration configuration, |
|||
IStdCostPriceSheetAppService StdCostPriceSheetAppService, |
|||
IObjectMapper objectMapper |
|||
) |
|||
{ |
|||
_guidGenerator = guidGenerator; |
|||
_configuration = configuration; |
|||
_productManager = productManager; |
|||
_incomingFromExternalManager = incomingFromExternalManager; |
|||
_logger = logger; |
|||
_StdCostPriceAppService = StdCostPriceSheetAppService; |
|||
_objectMapper = objectMapper; |
|||
} |
|||
|
|||
public virtual async Task<List<IncomingFromExternal>> ReadAsync() |
|||
{ |
|||
//从ERP读取待处理part
|
|||
var toBeProcessedProducts = await _productManager.GetToBeProcessedListAsync().ConfigureAwait(false); |
|||
if (!toBeProcessedProducts.Any()) |
|||
{ |
|||
_logger.LogInformation("no StdCostPrices"); |
|||
return new List<IncomingFromExternal>(); |
|||
} |
|||
//获取wms标准成本单价数据
|
|||
SfsBaseDataRequestInputBase input = new SfsBaseDataRequestInputBase(); |
|||
var wmsStdCostPrices = await _StdCostPriceAppService.GetAllListByFilterAsync(input).ConfigureAwait(false); |
|||
var wmsToStdCostPriceExchangeDtos = _objectMapper.Map<List<StdCostPriceSheetDTO>, List<StdCostPriceExchangeDto>>(wmsStdCostPrices); |
|||
List<StdCostPriceExchangeDto> eosToBomExchangeDtos = new List<StdCostPriceExchangeDto>(); |
|||
foreach (var toBeProcessedProduct in toBeProcessedProducts) |
|||
{ |
|||
var StdCostPrice = BuildScrapNoteOrderExchangeMes(toBeProcessedProduct); |
|||
eosToBomExchangeDtos.Add(StdCostPrice); |
|||
} |
|||
//和wms和eos数据进行比较,获取需要处理得数据
|
|||
var updateDatas = eosToBomExchangeDtos.Except(wmsToStdCostPriceExchangeDtos).ToList(); |
|||
if (!updateDatas.Any()) |
|||
{ |
|||
_logger.LogInformation("no StdCostPrices"); |
|||
return new List<IncomingFromExternal>(); |
|||
} |
|||
//StdCostPrice逐一转换为StdCostPrice
|
|||
var incomingDataList = BuildIncomingFromExternalFromBomAsync(updateDatas, toBeProcessedProducts); |
|||
await _incomingFromExternalManager.CreateBulkAsync(incomingDataList).ConfigureAwait(false); |
|||
return incomingDataList; |
|||
} |
|||
private List<IncomingFromExternal> BuildIncomingFromExternalFromBomAsync(List<StdCostPriceExchangeDto> updateDatas, List<mes_product> toBeProcessedProducts) |
|||
{ |
|||
var incomingDataList = new List<IncomingFromExternal>(); |
|||
foreach (var data in updateDatas) |
|||
{ |
|||
var item = toBeProcessedProducts.FirstOrDefault(r => r.mes_product_part == data.ItemCode); |
|||
var incomingData = BuildIncomingFromExternal(item); |
|||
|
|||
incomingData.SetEffectiveDate(DateTime.Now); |
|||
|
|||
try |
|||
{ |
|||
incomingData.DestinationDataContent = JsonSerializer.Serialize(data); |
|||
incomingData.SetId(_guidGenerator.Create()); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
incomingData.SetError(EnumExchangeDataErrorCode.Exception, ex.Message, ex.ToString()); |
|||
} |
|||
|
|||
incomingDataList.Add(incomingData); |
|||
|
|||
} |
|||
return incomingDataList; |
|||
} |
|||
private IncomingFromExternal BuildIncomingFromExternal(mes_product product) |
|||
{ |
|||
var incomingData = new IncomingFromExternal() |
|||
{ |
|||
|
|||
DataType = EnumIncomingDataType.StdCostPrice.ToString(), |
|||
DataAction = EnumExchangeDataAction.Add, |
|||
SourceSystem = EnumSystemType.ERP.ToString(), |
|||
SourceDataId = product.mes_product_part_ser.ToString(), |
|||
SourceDataGroupCode = product.mes_product_part, |
|||
SourceDataDetailCode = product.mes_product_part, |
|||
SourceDataContent = JsonSerializer.Serialize(product), |
|||
WriteTime = DateTime.Now, |
|||
Writer = nameof(TyrpIncomingBackgroundWorker), |
|||
DestinationSystem = EnumSystemType.ERP.ToString(), |
|||
}; |
|||
return incomingData; |
|||
} |
|||
|
|||
private static StdCostPriceExchangeDto BuildScrapNoteOrderExchangeMes(mes_product product) |
|||
{ |
|||
|
|||
var price = new StdCostPriceExchangeDto() |
|||
{ |
|||
ItemCode = product.mes_product_part, |
|||
StdCostPrice = product.mes_product_price_std, |
|||
Description = "接口同步", |
|||
}; |
|||
return price; |
|||
} |
|||
} |
@ -0,0 +1,52 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using System.Xml.Linq; |
|||
|
|||
namespace Win_in.Sfs.Wms.DataExchange.WMS.ProductReceiptNote; |
|||
public class ProductReceiptNoteSumDetailExchangeDto |
|||
{ |
|||
/// <summary>
|
|||
/// 零件编号
|
|||
/// </summary>
|
|||
[Display(Name = "零件编号")] |
|||
public string itemCode { get; set; } |
|||
/// <summary>
|
|||
/// 库位编码
|
|||
/// </summary>
|
|||
[Display(Name = "零件编号")] |
|||
public string locationCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// MesGuid
|
|||
/// </summary>
|
|||
[Display(Name = "MesGuid")] |
|||
public string MesGuid { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// id
|
|||
/// </summary>
|
|||
[Display(Name = "id")] |
|||
public string Memo { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 生效日期
|
|||
/// </summary>
|
|||
[Display(Name = "生效日期")] |
|||
public DateTime CreatDate { get; set; } = DateTime.Now.Date; |
|||
|
|||
/// <summary>
|
|||
/// 数量
|
|||
/// </summary>
|
|||
[Display(Name = "数量")] |
|||
public decimal Qty { get; set; } |
|||
/// <summary>
|
|||
/// 返喷数量
|
|||
/// </summary>
|
|||
[Display(Name = "返喷数量")] |
|||
public decimal BadQty { get; set; } |
|||
|
|||
} |
@ -0,0 +1,49 @@ |
|||
using System.ComponentModel; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
using Win_in.Sfs.Wms.DataExchange.WMS.Bom; |
|||
|
|||
namespace Win_in.Sfs.Wms.DataExchange.WMS.PurchasePrice; |
|||
public class PurchasePriceExchangeDto |
|||
{ |
|||
/// <summary>
|
|||
/// 物品代码
|
|||
/// </summary>
|
|||
|
|||
[Display(Name = "物品代码")] |
|||
[Required] |
|||
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string ItemCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 供应商编号
|
|||
/// </summary>
|
|||
[Display(Name = "供应商编号")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string SupplierCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 价格单描述
|
|||
/// </summary>
|
|||
public string Description { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 客户简称
|
|||
/// </summary>
|
|||
public decimal PurchasePrice { get; set; } |
|||
|
|||
public override bool Equals(object obj) |
|||
{ |
|||
if (obj is PurchasePriceExchangeDto) |
|||
{ |
|||
PurchasePriceExchangeDto purchaseprice = obj as PurchasePriceExchangeDto; |
|||
return ItemCode == purchaseprice.ItemCode && SupplierCode == purchaseprice.SupplierCode && PurchasePrice == purchaseprice.PurchasePrice; |
|||
} |
|||
return false; |
|||
} |
|||
public override int GetHashCode() |
|||
{ |
|||
return ItemCode.GetHashCode() ^ SupplierCode.GetHashCode() ^ PurchasePrice.GetHashCode(); |
|||
} |
|||
} |
@ -0,0 +1,55 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using IdentityServer4.Models; |
|||
using System.Xml.Linq; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
|
|||
namespace Win_in.Sfs.Wms.DataExchange.WMS.SalePrice; |
|||
|
|||
public class SalePriceExchangeDto |
|||
{ |
|||
/// <summary>
|
|||
/// 物品代码
|
|||
/// </summary>
|
|||
|
|||
[Display(Name = "物品代码")] |
|||
[Required] |
|||
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string ItemCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 客户编号
|
|||
/// </summary>
|
|||
[Display(Name = "客户编号")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string CustomerCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 价格单描述
|
|||
/// </summary>
|
|||
public string Description { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 销售价格
|
|||
/// </summary>
|
|||
public decimal SalePrice { get; set; } |
|||
|
|||
public override bool Equals(object obj) |
|||
{ |
|||
if (obj is SalePriceExchangeDto) |
|||
{ |
|||
SalePriceExchangeDto saleprice = obj as SalePriceExchangeDto; |
|||
return ItemCode == saleprice.ItemCode && CustomerCode == saleprice.CustomerCode && SalePrice == saleprice.SalePrice; |
|||
} |
|||
return false; |
|||
} |
|||
public override int GetHashCode() |
|||
{ |
|||
return ItemCode.GetHashCode() ^ CustomerCode.GetHashCode() ^ SalePrice.GetHashCode(); |
|||
} |
|||
} |
@ -0,0 +1,45 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using IdentityServer4.Models; |
|||
using System.Xml.Linq; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
|
|||
namespace Win_in.Sfs.Wms.DataExchange.WMS.StdCostPrice; |
|||
public class StdCostPriceExchangeDto |
|||
{ |
|||
/// <summary>
|
|||
/// 物品代码
|
|||
/// </summary>
|
|||
|
|||
[Display(Name = "物品代码")] |
|||
[Required] |
|||
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string ItemCode { get; set; } |
|||
/// <summary>
|
|||
/// 价格单描述
|
|||
/// </summary>
|
|||
public string Description { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 标准成本价
|
|||
/// </summary>
|
|||
public decimal StdCostPrice { get; set; } |
|||
|
|||
public override bool Equals(object obj) |
|||
{ |
|||
if (obj is StdCostPriceExchangeDto) |
|||
{ |
|||
StdCostPriceExchangeDto scp = obj as StdCostPriceExchangeDto; |
|||
return ItemCode == scp.ItemCode && StdCostPrice == scp.StdCostPrice; |
|||
} |
|||
return false; |
|||
} |
|||
public override int GetHashCode() |
|||
{ |
|||
return ItemCode.GetHashCode() ^ StdCostPrice.GetHashCode(); |
|||
} |
|||
} |
@ -1,16 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<!-- |
|||
https://go.microsoft.com/fwlink/?LinkID=208121. |
|||
--> |
|||
<Project> |
|||
<PropertyGroup> |
|||
<DeleteExistingFiles>False</DeleteExistingFiles> |
|||
<ExcludeApp_Data>False</ExcludeApp_Data> |
|||
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish> |
|||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration> |
|||
<LastUsedPlatform>Any CPU</LastUsedPlatform> |
|||
<PublishProvider>FileSystem</PublishProvider> |
|||
<PublishUrl>D:\~all-publish\WMS2.0_东阳\Win_in.Sfs.Wms.Store.HttpApi.Host</PublishUrl> |
|||
<WebPublishMethod>FileSystem</WebPublishMethod> |
|||
</PropertyGroup> |
|||
</Project> |
@ -0,0 +1,64 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Microsoft.Extensions.Options; |
|||
using Volo.Abp.AspNetCore.Mvc; |
|||
using Volo.Abp.Json; |
|||
using Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
namespace Win_in.Sfs.Wms.Pda.Controllers.BaseDatas; |
|||
|
|||
/// <summary>
|
|||
/// 器具控制器
|
|||
/// </summary>
|
|||
[ApiController] |
|||
[Route($"{PdaHostConst.ROOT_ROUTE}Equipment")] |
|||
public class EquipmentController : AbpController |
|||
{ |
|||
private readonly IEquipmentAppService _dictApp; |
|||
private readonly IEquipmentLocAppService _locApp; |
|||
|
|||
/// <summary>
|
|||
///
|
|||
/// </summary>
|
|||
/// <param name="dictApp"></param>
|
|||
public EquipmentController(IEquipmentAppService dictApp, |
|||
|
|||
|
|||
IEquipmentLocAppService locApp, |
|||
|
|||
IOptions<AbpJsonOptions> options) |
|||
{ |
|||
_locApp = locApp; |
|||
_dictApp = dictApp; |
|||
var str = options.Value.DefaultDateTimeFormat; |
|||
Console.WriteLine(str); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 按代码获取字典
|
|||
/// </summary>
|
|||
/// <param name="code">字典代码</param>
|
|||
/// <returns></returns>
|
|||
[HttpGet("by-code")] |
|||
public virtual async Task<EquipmentDTO> GetByCodeAsync(string code) |
|||
{ |
|||
var dtos = await _dictApp.GetByCodeAsync(code).ConfigureAwait(false); |
|||
|
|||
return dtos; |
|||
} |
|||
[HttpGet("getLocs")] |
|||
|
|||
|
|||
public virtual async Task<List<string>> GetLocsAsync() |
|||
{ |
|||
var dtos = await _locApp.GetLocsAsync().ConfigureAwait(false); |
|||
|
|||
return dtos; |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,43 @@ |
|||
using System; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Microsoft.Extensions.Options; |
|||
using Volo.Abp.AspNetCore.Mvc; |
|||
using Volo.Abp.Json; |
|||
using Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
namespace Win_in.Sfs.Wms.Pda.Controllers.BaseDatas; |
|||
|
|||
/// <summary>
|
|||
/// 器具控制器
|
|||
/// </summary>
|
|||
[ApiController] |
|||
[Route($"{PdaHostConst.ROOT_ROUTE}Kitting")] |
|||
public class KittingController : AbpController |
|||
{ |
|||
private readonly IKittingAppService _dictApp; |
|||
|
|||
/// <summary>
|
|||
///
|
|||
/// </summary>
|
|||
/// <param name="dictApp"></param>
|
|||
public KittingController(IKittingAppService dictApp,IOptions<AbpJsonOptions> options) |
|||
{ |
|||
_dictApp = dictApp; |
|||
var str = options.Value.DefaultDateTimeFormat; |
|||
Console.WriteLine(str); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 按代码获取字典
|
|||
/// </summary>
|
|||
/// <param name="code">字典代码</param>
|
|||
/// <returns></returns>
|
|||
[HttpGet("by-code")] |
|||
public virtual async Task<KittingDTO> GetByCodeAsync(string code) |
|||
{ |
|||
var dtos = await _dictApp.GetByCodeAsync(code).ConfigureAwait(false); |
|||
|
|||
return dtos; |
|||
} |
|||
} |
@ -0,0 +1,40 @@ |
|||
using System.Collections.Generic; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp.AspNetCore.Mvc; |
|||
using Win_in.Sfs.Basedata.Application.Contracts; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
|
|||
namespace Win_in.Sfs.Wms.Pda.Controllers.BaseDatas; |
|||
|
|||
/// <summary>
|
|||
///
|
|||
/// </summary>
|
|||
[ApiController] |
|||
[Route($"{PdaHostConst.ROOT_ROUTE}position-code")] |
|||
public class PositionCodeController : AbpController |
|||
{ |
|||
private readonly IPositionCodeAppService _positionCodeAppService; |
|||
|
|||
/// <summary>
|
|||
///
|
|||
/// </summary>
|
|||
/// <param name="locationAppService"></param>
|
|||
public PositionCodeController(IPositionCodeAppService positionCodeAppService) |
|||
{ |
|||
_positionCodeAppService = positionCodeAppService; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 根据code获取库位信息
|
|||
/// </summary>
|
|||
/// <param name="code"></param>
|
|||
/// <returns></returns>
|
|||
[HttpGet("{code}")] |
|||
public virtual async Task<PositionCodeDTO> GetAsync(string code) |
|||
{ |
|||
var result = await _positionCodeAppService.GetByCodeAsync(code).ConfigureAwait(false); |
|||
return result; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,42 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Microsoft.Extensions.Options; |
|||
using Volo.Abp.AspNetCore.Mvc; |
|||
using Volo.Abp.Json; |
|||
using Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
namespace Win_in.Sfs.Wms.Pda.Controllers.BaseDatas; |
|||
|
|||
/// <summary>
|
|||
/// 字典控制器
|
|||
/// </summary>
|
|||
[ApiController] |
|||
[Route($"{PdaHostConst.ROOT_ROUTE}split-packing-rec")] |
|||
public class SplitPackingRecController : AbpController |
|||
{ |
|||
private readonly ISplitPackingRecAppService _splitPackingRecApp; |
|||
|
|||
/// <summary>
|
|||
///
|
|||
/// </summary>
|
|||
/// <param name="splitPackingRecApp"></param>
|
|||
public SplitPackingRecController(ISplitPackingRecAppService splitPackingRecApp, IOptions<AbpJsonOptions> options) |
|||
{ |
|||
_splitPackingRecApp = splitPackingRecApp; |
|||
var str = options.Value.DefaultDateTimeFormat; |
|||
Console.WriteLine(str); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 取拆分记录列表
|
|||
/// </summary>
|
|||
/// <param name="input"></param>
|
|||
/// <returns></returns>
|
|||
[HttpPost("get-all")] |
|||
public virtual async Task<List<SplitPackingRecDTO>> GetAllListByFilterAsync(SfsBaseDataRequestInputBase input) |
|||
{ |
|||
return await _splitPackingRecApp.GetAllListByFilterAsync(input).ConfigureAwait(false); |
|||
} |
|||
} |
@ -0,0 +1,213 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text.Json; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Polly.Caching; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Application.Dtos; |
|||
using Volo.Abp.AspNetCore.Mvc; |
|||
using Win_in.Sfs.Auth.Application.Contracts; |
|||
using Win_in.Sfs.Basedata.Application.Contracts; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
using Win_in.Sfs.Wms.Inventory.Application.Contracts; |
|||
using Win_in.Sfs.Wms.Store.Application.Contracts; |
|||
|
|||
namespace Win_in.Sfs.Wms.Pda.Controllers.Jobs; |
|||
|
|||
/// <summary>
|
|||
///
|
|||
/// </summary>
|
|||
[ApiController] |
|||
[Route($"{PdaHostConst.ROOT_ROUTE}job/container")] |
|||
public class ContainerJobController : AbpController |
|||
{ |
|||
private readonly IContainerJobAppService _containerJobAppService; |
|||
|
|||
private readonly IUserWorkGroupAppService _userWorkGroupAppService; |
|||
|
|||
private readonly IDictAppService _dictApp; |
|||
|
|||
/// <summary>
|
|||
///
|
|||
/// </summary>
|
|||
/// <param name="ContainerJobAppService"></param>
|
|||
/// <param name="userWorkGroupAppService"></param>
|
|||
public ContainerJobController( |
|||
IContainerJobAppService containerJobAppService, |
|||
IDictAppService dictApp |
|||
, IUserWorkGroupAppService userWorkGroupAppService) |
|||
{ |
|||
_userWorkGroupAppService = userWorkGroupAppService; |
|||
_containerJobAppService = containerJobAppService; |
|||
_dictApp=dictApp; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 获取任务详情
|
|||
/// </summary>
|
|||
/// <param name="id"></param>
|
|||
/// <returns></returns>
|
|||
[HttpGet("{id}")] |
|||
|
|||
public virtual async Task<ActionResult<ContainerJobDTO>> GetAsync(Guid id) |
|||
{ |
|||
var result = await _containerJobAppService.GetAsync(id).ConfigureAwait(false); |
|||
return Ok(result); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 获取列表 筛选
|
|||
/// </summary>
|
|||
/// <param name="sfsRequestDTO"></param>
|
|||
/// <returns></returns>
|
|||
[HttpPost("list")] |
|||
public virtual async Task<PagedResultDto<ContainerJobDTO>> GetListAsync(SfsJobRequestInputBase sfsRequestDTO) |
|||
{ |
|||
var list = await _containerJobAppService.GetPagedListByFilterAsync(sfsRequestDTO, true).ConfigureAwait(false); |
|||
return list; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 获取列表
|
|||
/// </summary>
|
|||
/// <param name="pageSize"></param>
|
|||
/// <param name="pageIndex"></param>
|
|||
/// <returns></returns>
|
|||
[HttpGet("list")] |
|||
public virtual async Task<PagedResultDto<ContainerJobDTO>> GetListAsync(int pageSize, int pageIndex, bool isFinished) |
|||
{ |
|||
var dtos = await _dictApp.GetByCodeAsync("ContainerSpecificationsType").ConfigureAwait(false); |
|||
|
|||
var status = new List<int>(); |
|||
if(isFinished==true) |
|||
{ |
|||
status.Add((int)EnumJobStatus.Done); |
|||
} |
|||
else |
|||
{ |
|||
status.Add((int)EnumJobStatus.Open); |
|||
} |
|||
var jsonStatus = JsonSerializer.Serialize(status); |
|||
|
|||
var request = new SfsJobRequestInputBase |
|||
{ |
|||
MaxResultCount = pageSize, |
|||
SkipCount = (pageIndex - 1) * pageSize, |
|||
Sorting = $"{nameof(ContainerJobDTO.CreationTime)} ASC", |
|||
Condition = new Condition |
|||
{ |
|||
Filters = new List<Filter> |
|||
{ |
|||
new(nameof(ContainerJobDTO.JobStatus),jsonStatus,"In") |
|||
} |
|||
} |
|||
}; |
|||
|
|||
var list = await _containerJobAppService.GetPagedListByFilterAsync(request, true).ConfigureAwait(false); |
|||
foreach (var item in list.Items) |
|||
{ |
|||
if(!string.IsNullOrEmpty(item.SpecificationsType)) |
|||
{ |
|||
var dictName= dtos.Items.FirstOrDefault(t => t.Code == item.SpecificationsType); |
|||
item.SpecificationsTypeName = dictName.Name; |
|||
} |
|||
|
|||
|
|||
} |
|||
|
|||
return list; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 根据Job Number 获取任务列表
|
|||
/// </summary>
|
|||
/// <param name="jobNumber"></param>
|
|||
/// <returns></returns>
|
|||
[HttpGet("by-number/{jobNumber}")] |
|||
public virtual async Task<ActionResult<ContainerJobDTO>> GetByNumberAsync(string jobNumber) |
|||
{ |
|||
var jobDto = await _containerJobAppService.GetByNumberAsync(jobNumber).ConfigureAwait(false); |
|||
if (jobDto == null) |
|||
{ |
|||
throw new UserFriendlyException($"未找到编号为 {jobNumber} 的任务"); |
|||
} |
|||
var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); |
|||
if (!wlgCodes.Contains(jobDto.WorkGroupCode)) |
|||
{ |
|||
return new NotFoundObjectResult($"任务属于工作组 {jobDto.WorkGroupCode}"); |
|||
} |
|||
if (jobDto.JobStatus == EnumJobStatus.Doing && jobDto.AcceptUserId != CurrentUser.Id) |
|||
{ |
|||
return new NotFoundObjectResult($"任务正在被 {jobDto.AcceptUserName} 处理"); |
|||
} |
|||
return jobDto; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 获取任务数量
|
|||
/// </summary>
|
|||
/// <returns></returns>
|
|||
[HttpGet("count")] |
|||
public virtual async Task<ActionResult<long>> CountAsync() |
|||
{ |
|||
var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); |
|||
var jsonCodes = JsonSerializer.Serialize(wlgCodes); |
|||
|
|||
var status = new List<int>() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; |
|||
var jsonStatus = JsonSerializer.Serialize(status); |
|||
|
|||
var request = new SfsJobRequestInputBase |
|||
{ |
|||
Sorting = $"{nameof(ContainerJobDTO.Priority)} ASC", |
|||
Condition = new Condition |
|||
{ |
|||
Filters = new List<Filter> |
|||
{ |
|||
new(nameof(ContainerJobDTO.WorkGroupCode),jsonCodes,"In"), |
|||
new(nameof(ContainerJobDTO.JobStatus),jsonStatus,"In") |
|||
} |
|||
} |
|||
}; |
|||
|
|||
var count = await _containerJobAppService.GetCountByFilterAsync(request).ConfigureAwait(false); |
|||
|
|||
return Ok(count); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 承接任务
|
|||
/// </summary>
|
|||
/// <param name="id"></param>
|
|||
/// <returns></returns>
|
|||
[HttpPost("take/{id}")] |
|||
public virtual async Task TakeAsync(Guid id) |
|||
{ |
|||
await _containerJobAppService.AcceptAsync(id).ConfigureAwait(false); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 取消承接任务
|
|||
/// </summary>
|
|||
/// <param name="id"></param>
|
|||
/// <returns></returns>
|
|||
[HttpPost("cancel-take/{id}")] |
|||
public virtual async Task CancelTakeAsync(Guid id) |
|||
{ |
|||
await _containerJobAppService.CancelAcceptAsync(id).ConfigureAwait(false); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 执行任务
|
|||
/// </summary>
|
|||
/// <param name="id"></param>
|
|||
/// <param name="dto"></param>
|
|||
/// <returns></returns>
|
|||
[HttpPost("finish/{id}")] |
|||
public virtual async Task FinishAsync(Guid id, [FromBody] ContainerJobDTO dto) |
|||
{ |
|||
await _containerJobAppService.CompleteAsync(id, dto).ConfigureAwait(false); |
|||
} |
|||
} |
@ -0,0 +1,38 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp.AspNetCore.Mvc; |
|||
using Win_in.Sfs.Wms.Store.Application.Contracts; |
|||
|
|||
namespace Win_in.Sfs.Wms.Pda.Controllers.Stores; |
|||
|
|||
/// <summary>
|
|||
///
|
|||
/// </summary>
|
|||
[ApiController] |
|||
[Route($"{PdaHostConst.ROOT_ROUTE}store/container")] |
|||
|
|||
public class ContainerNoteController : AbpController |
|||
{ |
|||
private readonly IContainerNoteAppService _containerNoteAppService; |
|||
|
|||
/// <summary>
|
|||
///
|
|||
/// </summary>
|
|||
/// <param name="containerNoteAppService"></param>
|
|||
public ContainerNoteController(IContainerNoteAppService containerNoteAppService) |
|||
{ |
|||
_containerNoteAppService = containerNoteAppService; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 创建器具转移记录
|
|||
/// </summary>
|
|||
/// <param name="input">CreateInput</param>
|
|||
/// <returns></returns>
|
|||
[HttpPost("")] |
|||
public virtual async Task CreateAsync(ContainerNoteEditInput input) |
|||
{ |
|||
await _containerNoteAppService.CreateAsync(input).ConfigureAwait(false); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,51 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp.AspNetCore.Mvc; |
|||
using Win_in.Sfs.Wms.Store.Application.Contracts; |
|||
|
|||
namespace Win_in.Sfs.Wms.Pda.Controllers.Stores; |
|||
|
|||
/// <summary>
|
|||
///空器具呼叫请求
|
|||
/// </summary>
|
|||
[ApiController] |
|||
[Route($"{PdaHostConst.ROOT_ROUTE}store/container-request")] |
|||
|
|||
public class ContainerRequestController : AbpController |
|||
{ |
|||
private readonly IContainerRequestAppService _containerRequestAppService; |
|||
|
|||
/// <summary>
|
|||
///
|
|||
/// </summary>
|
|||
/// <param name="ContainerRequestAppService"></param>
|
|||
public ContainerRequestController(IContainerRequestAppService ContainerRequestAppService) |
|||
{ |
|||
_containerRequestAppService = ContainerRequestAppService; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 空器具申请
|
|||
/// </summary>
|
|||
/// <param name="input"></param>
|
|||
/// <returns></returns>
|
|||
[HttpPost("")] |
|||
public virtual async Task CreateAsync(ContainerRequestEditInput input) |
|||
{ |
|||
_ = await _containerRequestAppService.CreateAsync(input).ConfigureAwait(false); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 根据number获取空器具申请详情
|
|||
/// </summary>
|
|||
/// <param name="number"></param>
|
|||
/// <returns></returns>
|
|||
[HttpGet("{number}")] |
|||
|
|||
public virtual async Task<ActionResult<ContainerRequestDTO>> GetAsync(string number) |
|||
{ |
|||
var result = await _containerRequestAppService.GetByNumberAsync(number).ConfigureAwait(false); |
|||
return Ok(result); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,74 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp; |
|||
using Volo.Abp.AspNetCore.Mvc; |
|||
using Volo.Abp.Domain.Entities.Auditing; |
|||
using Volo.Abp.ObjectMapping; |
|||
using Win_in.Sfs.Basedata.Application.Contracts; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
using Win_in.Sfs.Wms.Pda.Models; |
|||
using Win_in.Sfs.Wms.Store.Application.Contracts; |
|||
using Win_in.Sfs.Wms.Store.Domain; |
|||
|
|||
namespace Win_in.Sfs.Wms.Pda.Controllers.Stores; |
|||
|
|||
[ApiController] |
|||
[Route($"{PdaHostConst.ROOT_ROUTE}store/purchase-return-request")] |
|||
public class PurchaseReturnRequestController : AbpController |
|||
{ |
|||
private readonly IPurchaseReturnRequestAppService _purchaseReturnRequestAppService; |
|||
private readonly ITransactionTypeAppService _transactionTypeAppService; |
|||
public PurchaseReturnRequestController(IPurchaseReturnRequestAppService purchaseReturnRequestAppService, |
|||
ITransactionTypeAppService transactionTypeAppService |
|||
) |
|||
{ |
|||
_purchaseReturnRequestAppService = purchaseReturnRequestAppService; |
|||
_transactionTypeAppService = transactionTypeAppService; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 创建退货申请
|
|||
/// </summary>
|
|||
[HttpPost("create-many")] |
|||
public virtual async Task<ActionResult> CreateManyAsync(List<PurchaseReturnRequestPdaInput> input) |
|||
{ |
|||
List<PurchaseReturnRequestEditInput> entitys = new List<PurchaseReturnRequestEditInput>(); |
|||
var groups = input.GroupBy(r => r.AsnNumber).ToList(); |
|||
foreach (var group in groups) |
|||
{ |
|||
var list = group.ToList(); |
|||
var entity = ObjectMapper.Map<PurchaseReturnRequestPdaInput, PurchaseReturnRequestEditInput>(list[0]); |
|||
await SetRequestAutoPropertiesAsync(entity).ConfigureAwait(false); |
|||
entity.Details = new List<PurchaseReturnRequestDetailInput>(); |
|||
foreach (var item in list) |
|||
{ |
|||
var detail = ObjectMapper.Map<PurchaseReturnRequestPdaInput, PurchaseReturnRequestDetailInput>(list[0]); |
|||
entity.Details.Add(detail); |
|||
} |
|||
entitys.Add(entity); |
|||
} |
|||
await _purchaseReturnRequestAppService.CreateManyAsync(entitys).ConfigureAwait(false); |
|||
return Ok(); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 赋值Request业务属性
|
|||
/// </summary>
|
|||
/// <param name="entity"></param>
|
|||
/// <returns></returns>
|
|||
private async Task SetRequestAutoPropertiesAsync(PurchaseReturnRequestEditInput entity) |
|||
{ |
|||
var tranType = await _transactionTypeAppService.GetByTransTypeAsync(EnumTransType.PurchaseReturn, EnumTransSubType.None).ConfigureAwait(false); |
|||
|
|||
Check.NotNull(tranType, "事务类型", "事务类型不存在"); |
|||
|
|||
entity.AutoCompleteJob = tranType.AutoCompleteJob; |
|||
entity.AutoSubmit = tranType.AutoSubmitRequest; |
|||
entity.AutoAgree = tranType.AutoAgreeRequest; |
|||
entity.AutoHandle = tranType.AutoHandleRequest; |
|||
entity.DirectCreateNote = tranType.DirectCreateNote; |
|||
} |
|||
} |
@ -0,0 +1,54 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
|
|||
[Display(Name = "器具基本信息")] |
|||
|
|||
public class EquipmentAreaDTO : SfsBaseDataDTOBase, IHasCode |
|||
{ |
|||
/// <summary>
|
|||
/// 器具编号
|
|||
/// </summary>
|
|||
[Display(Name = "器具编号")] |
|||
public string Code { get; set; } |
|||
/// <summary>
|
|||
/// 类型
|
|||
/// </summary>
|
|||
[Display(Name = "类型")] |
|||
public string Type { get; set; } = string.Empty; |
|||
/// <summary>
|
|||
/// 型号
|
|||
/// </summary>
|
|||
[Display(Name = "型号")] |
|||
public string Model { get; set; } = string.Empty; |
|||
/// <summary>
|
|||
/// 库位编号
|
|||
/// </summary>
|
|||
[Display(Name = "库位编号")] |
|||
public string LocCode { get; set; } = string.Empty; |
|||
/// <summary>
|
|||
/// 状态
|
|||
/// </summary>
|
|||
[Display(Name = "状态")] |
|||
public int State { get; set; } = 0; |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 位置编号
|
|||
/// </summary>
|
|||
[Display(Name = "位置编号")] |
|||
public string AreaCode { get; set; } |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 数量
|
|||
/// </summary>
|
|||
[Display(Name = "数量")] |
|||
public decimal Qty { get; set; } |
|||
|
|||
} |
@ -0,0 +1,49 @@ |
|||
using System; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
[Display(Name = "物料信息")] |
|||
public class EquipmentAreaForDongyangExportDTO |
|||
{ |
|||
/// <summary>
|
|||
/// 器具编号
|
|||
/// </summary>
|
|||
[Display(Name = "器具编号")] |
|||
public string Code { get; set; } |
|||
/// <summary>
|
|||
/// 类型
|
|||
/// </summary>
|
|||
[Display(Name = "类型")] |
|||
public string Type { get; set; } = string.Empty; |
|||
/// <summary>
|
|||
/// 型号
|
|||
/// </summary>
|
|||
[Display(Name = "型号")] |
|||
public string Model { get; set; } = string.Empty; |
|||
/// <summary>
|
|||
/// 库位编号
|
|||
/// </summary>
|
|||
[Display(Name = "库位编号")] |
|||
public string LocCode { get; set; } = string.Empty; |
|||
/// <summary>
|
|||
/// 状态
|
|||
/// </summary>
|
|||
[Display(Name = "状态")] |
|||
public int State { get; set; } = 0; |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 位置编号
|
|||
/// </summary>
|
|||
[Display(Name = "位置编号")] |
|||
public string AreaCode { get; set; } |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 数量
|
|||
/// </summary>
|
|||
[Display(Name = "数量")] |
|||
public decimal Qty { get; set; } |
|||
} |
@ -0,0 +1,64 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
using Win_in.Sfs.Shared.Domain.Shared.Enums.Basedata; |
|||
|
|||
[Display(Name = "器具基本信息")] |
|||
|
|||
public class EquipmentDTO : SfsBaseDataDTOBase, IHasCode |
|||
{ |
|||
/// <summary>
|
|||
/// 类型
|
|||
/// </summary>
|
|||
[Display(Name = "类型")] |
|||
public EnumEquipmentType Type { get; set; } |
|||
/// <summary>
|
|||
/// 器具编号
|
|||
/// </summary>
|
|||
[Display(Name = "器具代码")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public string Code { get; set; } |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 标包数量
|
|||
/// </summary>
|
|||
[Display(Name = "标包数")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public decimal StdQty { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 型号
|
|||
/// </summary>
|
|||
[Display(Name = "型号")] |
|||
public EnumEquipmentModel Model { get; set; } |
|||
/// <summary>
|
|||
/// 库位编号
|
|||
/// </summary>
|
|||
[Display(Name = "库位代码")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public string LocCode { get; set; } = string.Empty; |
|||
/// <summary>
|
|||
/// 状态
|
|||
/// </summary>
|
|||
|
|||
[Display(Name = "状态")] |
|||
public int State { get; set; } = 0; |
|||
|
|||
/// <summary>
|
|||
/// 创建人
|
|||
/// </summary>
|
|||
[Display(Name = "创建人")] |
|||
public string Creator { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 创建时间
|
|||
/// </summary>
|
|||
[Display(Name = "创建时间")] |
|||
public DateTime CreatTime { get; set; } = DateTime.Now; |
|||
} |
@ -0,0 +1,53 @@ |
|||
using System; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
[Display(Name = "物料信息")] |
|||
public class EquipmentForDongyangExportDTO |
|||
{ |
|||
/// <summary>
|
|||
/// 器具编号
|
|||
/// </summary>
|
|||
[Display(Name = "器具编号")] |
|||
public string Code { get; set; } |
|||
/// <summary>
|
|||
/// 类型
|
|||
/// </summary>
|
|||
[Display(Name = "类型")] |
|||
public string Type { get; set; } = string.Empty; |
|||
/// <summary>
|
|||
/// 型号
|
|||
/// </summary>
|
|||
[Display(Name = "型号")] |
|||
public string Model { get; set; } = string.Empty; |
|||
/// <summary>
|
|||
/// 库位编号
|
|||
/// </summary>
|
|||
[Display(Name = "库位编号")] |
|||
public string LocCode { get; set; } = string.Empty; |
|||
/// <summary>
|
|||
/// 状态
|
|||
/// </summary>
|
|||
[Display(Name = "状态")] |
|||
public int State { get; set; } = 0; |
|||
/// <summary>
|
|||
/// 备注
|
|||
/// </summary>
|
|||
[Display(Name = "备注")] |
|||
public string Remark { get; set; } = string.Empty; |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 创建人
|
|||
/// </summary>
|
|||
[Display(Name = "创建人")] |
|||
public string Creator { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 创建时间
|
|||
/// </summary>
|
|||
[Display(Name = "创建时间")] |
|||
public DateTime CreatTime { get; set; } = DateTime.Now; |
|||
} |
@ -0,0 +1,40 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
|
|||
|
|||
[Display(Name = "器具容量占用信息")] |
|||
|
|||
public class EquipmentLocCapDTO : SfsBaseDataDTOBase, IHasCode |
|||
{ |
|||
/// <summary>
|
|||
/// 器具代码
|
|||
/// </summary>
|
|||
[Display(Name = "器具代码")] |
|||
public string Code { get; set; } |
|||
/// 占用百分比
|
|||
/// </summary>
|
|||
[Display(Name = "占用百分比")] |
|||
public decimal Percent { get; set; } |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 零件号
|
|||
/// </summary>
|
|||
public string PartCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 录入数量
|
|||
/// </summary>
|
|||
public decimal Qty { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 标包数量
|
|||
/// </summary>
|
|||
public decimal StdQty { get; set; } |
|||
|
|||
|
|||
} |
@ -0,0 +1,31 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
|
|||
[Display(Name = "器具库位关系")] |
|||
|
|||
public class EquipmentLocDTO : SfsBaseDataDTOBase, IHasCode |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// 器具编号
|
|||
/// </summary>
|
|||
[Display(Name = "器具代码")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public string Code { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 库位编号
|
|||
/// </summary>
|
|||
[Display(Name = "库位代码")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public string LocCode { get; set; } |
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,73 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
|
|||
[Display(Name = "器具零件关系信息")] |
|||
|
|||
public class EquipmentPartCodeDTO : SfsBaseDataDTOBase, IHasCode |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// 器具代号
|
|||
/// </summary>
|
|||
[Display(Name = "器具代码")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public string Code { get; set; } |
|||
|
|||
|
|||
///// <summary>
|
|||
///// 型号
|
|||
///// </summary>
|
|||
//[Display(Name = "型号")]
|
|||
//public string Model { get; set; } = string.Empty;
|
|||
/// <summary>
|
|||
/// 库位编号
|
|||
/// </summary>
|
|||
[Display(Name = "零件代码")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public string PartCode { get; set; } |
|||
|
|||
|
|||
|
|||
/// <summary>
|
|||
/// 标包数量
|
|||
/// </summary>
|
|||
[Display(Name = "标包数")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public decimal StdQty { get; set; } |
|||
|
|||
|
|||
|
|||
/// <summary>
|
|||
/// 单位
|
|||
/// </summary>
|
|||
[Display(Name = "单位")] |
|||
public string Unit { get; set; } |
|||
|
|||
|
|||
|
|||
|
|||
/// <summary>
|
|||
/// 状态
|
|||
/// </summary>
|
|||
|
|||
//[Display(Name = "状态")]
|
|||
//public int State { get; set; } = 0;
|
|||
|
|||
///// <summary>
|
|||
///// 创建人
|
|||
///// </summary>
|
|||
//[Display(Name = "创建人")]
|
|||
//public string Creator { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 创建时间
|
|||
///// </summary>
|
|||
//[Display(Name = "创建时间")]
|
|||
//public DateTime CreatTime { get; set; } = DateTime.Now;
|
|||
} |
@ -0,0 +1,19 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Equipments.DTOs; |
|||
[Display(Name = "器具校验信息")] |
|||
public class EquipmentRecordErrorDTO |
|||
{ |
|||
[Display(Name = "器具代码")] |
|||
public string EqptCode { set; get; } |
|||
[Display(Name = "零件代码")] |
|||
public string PartCode { set; get; } |
|||
[Display(Name = "错误信息")] |
|||
public string Error { set; get; } |
|||
|
|||
} |
@ -0,0 +1,21 @@ |
|||
using Volo.Abp.Authorization.Permissions; |
|||
using Win_in.Sfs.Basedata.Domain; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
public static class EquipmentAreaPermissions |
|||
{ |
|||
|
|||
public const string Default = BasedataPermissions.GroupName + "." + nameof(Equipment); |
|||
public const string Create = Default + "." + BasedataPermissions.CreateStr; |
|||
public const string Update = Default + "." + BasedataPermissions.UpdateStr; |
|||
public const string Delete = Default + "." + BasedataPermissions.DeleteStr; |
|||
|
|||
public static void AddEquipmentPermission(this PermissionGroupDefinition permissionGroup) |
|||
{ |
|||
var EquipmentPermission = permissionGroup.AddPermission(Default, BasedataPermissionDefinitionProvider.L(nameof(Equipment))); |
|||
EquipmentPermission.AddChild(Create, BasedataPermissionDefinitionProvider.L(BasedataPermissions.CreateStr)); |
|||
EquipmentPermission.AddChild(Update, BasedataPermissionDefinitionProvider.L(BasedataPermissions.UpdateStr)); |
|||
EquipmentPermission.AddChild(Delete, BasedataPermissionDefinitionProvider.L(BasedataPermissions.DeleteStr)); |
|||
} |
|||
} |
@ -0,0 +1,21 @@ |
|||
using Volo.Abp.Authorization.Permissions; |
|||
using Win_in.Sfs.Basedata.Domain; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
public static class EquipmentPermissions |
|||
{ |
|||
|
|||
public const string Default = BasedataPermissions.GroupName + "." + nameof(Equipment); |
|||
public const string Create = Default + "." + BasedataPermissions.CreateStr; |
|||
public const string Update = Default + "." + BasedataPermissions.UpdateStr; |
|||
public const string Delete = Default + "." + BasedataPermissions.DeleteStr; |
|||
|
|||
public static void AddEquipmentPermission(this PermissionGroupDefinition permissionGroup) |
|||
{ |
|||
var EquipmentPermission = permissionGroup.AddPermission(Default, BasedataPermissionDefinitionProvider.L(nameof(Equipment))); |
|||
EquipmentPermission.AddChild(Create, BasedataPermissionDefinitionProvider.L(BasedataPermissions.CreateStr)); |
|||
EquipmentPermission.AddChild(Update, BasedataPermissionDefinitionProvider.L(BasedataPermissions.UpdateStr)); |
|||
EquipmentPermission.AddChild(Delete, BasedataPermissionDefinitionProvider.L(BasedataPermissions.DeleteStr)); |
|||
} |
|||
} |
@ -0,0 +1,28 @@ |
|||
using System.Collections.Generic; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Win_in.Sfs.Shared.Application.Contracts; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
public interface IEquipmentAppService |
|||
: ISfsBaseDataAppServiceBase<EquipmentDTO, SfsBaseDataRequestInputBase, EquipmentEditInput> |
|||
, ISfsGetByCodeAppService<EquipmentDTO> |
|||
, ISfsCheckAppService<EquipmentCheckInput> |
|||
, ISfsUpsertAppService<EquipmentEditInput> |
|||
{ |
|||
//Task<bool> CheckItemIsAvailable(string itemCode);
|
|||
//[HttpGet("check-item-is-available-no-select-sql")]
|
|||
//void CheckItemIsAvailable(EquipmentDTO EquipmentDTO);
|
|||
|
|||
//Task<List<EquipmentDTO>> GetListByNameAsync(string name);
|
|||
|
|||
//Task<EquipmentDTO> GetOrAddAsync(EquipmentEditInput input);
|
|||
|
|||
//Task<EnumItemManageType> GetManageTypeAsync(string itemCode);
|
|||
//Task<Dictionary<string, EnumItemManageType>> GetManageTypesAsync(List<string> itemCodes);
|
|||
|
|||
//Task UpsertAsyncByInterface(EquipmentEditInput input);
|
|||
//Task UpsertStdPackQtyAsync(string itemCode, decimal stdpackqty);
|
|||
} |
@ -0,0 +1,28 @@ |
|||
using System.Collections.Generic; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Win_in.Sfs.Shared.Application.Contracts; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
public interface IEquipmentAreaAppService |
|||
: ISfsBaseDataAppServiceBase<EquipmentAreaDTO, SfsBaseDataRequestInputBase, EquipmentAreaEditInput> |
|||
, ISfsGetByCodeAppService<EquipmentAreaDTO> |
|||
, ISfsCheckAppService<EquipmentAreaCheckInput> |
|||
, ISfsUpsertAppService<EquipmentAreaEditInput> |
|||
{ |
|||
//Task<bool> CheckItemIsAvailable(string itemCode);
|
|||
//[HttpGet("check-item-is-available-no-select-sql")]
|
|||
//void CheckItemIsAvailable(EquipmentDTO EquipmentDTO);
|
|||
|
|||
//Task<List<EquipmentDTO>> GetListByNameAsync(string name);
|
|||
|
|||
//Task<EquipmentDTO> GetOrAddAsync(EquipmentEditInput input);
|
|||
|
|||
//Task<EnumItemManageType> GetManageTypeAsync(string itemCode);
|
|||
//Task<Dictionary<string, EnumItemManageType>> GetManageTypesAsync(List<string> itemCodes);
|
|||
|
|||
//Task UpsertAsyncByInterface(EquipmentEditInput input);
|
|||
//Task UpsertStdPackQtyAsync(string itemCode, decimal stdpackqty);
|
|||
} |
@ -0,0 +1,33 @@ |
|||
using System.Collections.Generic; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Win_in.Sfs.Shared.Application.Contracts; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
public interface IEquipmentLocAppService |
|||
: ISfsBaseDataAppServiceBase<EquipmentLocDTO, SfsBaseDataRequestInputBase, EquipmentLocEditInput> |
|||
, ISfsGetByCodeAppService<EquipmentLocDTO> |
|||
, ISfsCheckAppService<EquipmentLocCheckInput> |
|||
, ISfsUpsertAppService<EquipmentLocEditInput> |
|||
{ |
|||
|
|||
|
|||
Task<List<EquipmentLocDTO>> GetEquipmentLocAsync(List<string> p_ls); |
|||
Task<List<string>> GetLocsAsync(); |
|||
|
|||
//Task<bool> CheckItemIsAvailable(string itemCode);
|
|||
//[HttpGet("check-item-is-available-no-select-sql")]
|
|||
//void CheckItemIsAvailable(EquipmentLocDTO EquipmentLocDTO);
|
|||
|
|||
//Task<List<EquipmentLocDTO>> GetListByNameAsync(string name);
|
|||
|
|||
//Task<EquipmentLocDTO> GetOrAddAsync(EquipmentLocEditInput input);
|
|||
|
|||
//Task<EnumItemManageType> GetManageTypeAsync(string itemCode);
|
|||
//Task<Dictionary<string, EnumItemManageType>> GetManageTypesAsync(List<string> itemCodes);
|
|||
|
|||
//Task UpsertAsyncByInterface(EquipmentLocEditInput input);
|
|||
//Task UpsertStdPackQtyAsync(string itemCode, decimal stdpackqty);
|
|||
} |
@ -0,0 +1,28 @@ |
|||
using System.Collections.Generic; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Win_in.Sfs.Shared.Application.Contracts; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
public interface IEquipmentLocCapAppService |
|||
: ISfsBaseDataAppServiceBase<EquipmentLocCapDTO, SfsBaseDataRequestInputBase, EquipmentLocCapEditInput> |
|||
, ISfsGetByCodeAppService<EquipmentLocCapDTO> |
|||
, ISfsCheckAppService<EquipmentLocCapCheckInput> |
|||
, ISfsUpsertAppService<EquipmentLocCapEditInput> |
|||
{ |
|||
//Task<bool> CheckItemIsAvailable(string itemCode);
|
|||
//[HttpGet("check-item-is-available-no-select-sql")]
|
|||
//void CheckItemIsAvailable(EquipmentLocCapDTO EquipmentLocCapDTO);
|
|||
|
|||
//Task<List<EquipmentLocCapDTO>> GetListByNameAsync(string name);
|
|||
|
|||
//Task<EquipmentLocCapDTO> GetOrAddAsync(EquipmentLocCapEditInput input);
|
|||
|
|||
//Task<EnumItemManageType> GetManageTypeAsync(string itemCode);
|
|||
//Task<Dictionary<string, EnumItemManageType>> GetManageTypesAsync(List<string> itemCodes);
|
|||
|
|||
//Task UpsertAsyncByInterface(EquipmentLocCapEditInput input);
|
|||
//Task UpsertStdPackQtyAsync(string itemCode, decimal stdpackqty);
|
|||
} |
@ -0,0 +1,31 @@ |
|||
using System.Collections.Generic; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Win_in.Sfs.Shared.Application.Contracts; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
public interface IEquipmentPartCodeAppService |
|||
: ISfsBaseDataAppServiceBase<EquipmentPartCodeDTO, SfsBaseDataRequestInputBase, EquipmentPartCodeEditInput> |
|||
, ISfsGetByCodeAppService<EquipmentPartCodeDTO> |
|||
|
|||
, ISfsUpsertAppService<EquipmentPartCodeEditInput> |
|||
{ |
|||
|
|||
|
|||
Task<List<EquipmentPartCodeDTO>> GetEquipmentPartCodesAsync(List<string> p_ls); |
|||
//Task<bool> CheckItemIsAvailable(string itemCode);
|
|||
//[HttpGet("check-item-is-available-no-select-sql")]
|
|||
//void CheckItemIsAvailable(EquipmentPartCodeDTO EquipmentPartCodeDTO);
|
|||
|
|||
//Task<List<EquipmentPartCodeDTO>> GetListByNameAsync(string name);
|
|||
|
|||
//Task<EquipmentPartCodeDTO> GetOrAddAsync(EquipmentPartCodeEditInput input);
|
|||
|
|||
//Task<EnumItemManageType> GetManageTypeAsync(string itemCode);
|
|||
//Task<Dictionary<string, EnumItemManageType>> GetManageTypesAsync(List<string> itemCodes);
|
|||
|
|||
//Task UpsertAsyncByInterface(EquipmentPartCodeEditInput input);
|
|||
//Task UpsertStdPackQtyAsync(string itemCode, decimal stdpackqty);
|
|||
} |
@ -0,0 +1,51 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
public class EquipmentAreaCheckInput |
|||
{ |
|||
/// <summary>
|
|||
/// 器具编号
|
|||
/// </summary>
|
|||
[Display(Name = "器具编号")] |
|||
public string Code { get; set; } |
|||
/// <summary>
|
|||
/// 类型
|
|||
/// </summary>
|
|||
[Display(Name = "类型")] |
|||
public string Type { get; set; } = string.Empty; |
|||
/// <summary>
|
|||
/// 型号
|
|||
/// </summary>
|
|||
[Display(Name = "型号")] |
|||
public string Model { get; set; } = string.Empty; |
|||
/// <summary>
|
|||
/// 库位编号
|
|||
/// </summary>
|
|||
[Display(Name = "库位编号")] |
|||
public string LocCode { get; set; } = string.Empty; |
|||
/// <summary>
|
|||
/// 状态
|
|||
/// </summary>
|
|||
[Display(Name = "状态")] |
|||
public int State { get; set; } = 0; |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 位置编号
|
|||
/// </summary>
|
|||
[Display(Name = "位置编号")] |
|||
public string AreaCode { get; set; } |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 数量
|
|||
/// </summary>
|
|||
[Display(Name = "数量")] |
|||
public decimal Qty { get; set; } |
|||
|
|||
|
|||
} |
@ -0,0 +1,225 @@ |
|||
using System; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
public class EquipmentAreaEditInput : SfsBaseDataCreateOrUpdateInputBase |
|||
{ |
|||
/// <summary>
|
|||
/// 器具编号
|
|||
/// </summary>
|
|||
[Display(Name = "器具编号")] |
|||
public string Code { get; set; } |
|||
/// <summary>
|
|||
/// 类型
|
|||
/// </summary>
|
|||
[Display(Name = "类型")] |
|||
public string Type { get; set; } = string.Empty; |
|||
/// <summary>
|
|||
/// 型号
|
|||
/// </summary>
|
|||
[Display(Name = "型号")] |
|||
public string Model { get; set; } = string.Empty; |
|||
/// <summary>
|
|||
/// 库位编号
|
|||
/// </summary>
|
|||
[Display(Name = "库位编号")] |
|||
public string LocCode { get; set; } = string.Empty; |
|||
/// <summary>
|
|||
/// 状态
|
|||
/// </summary>
|
|||
[Display(Name = "状态")] |
|||
public int State { get; set; } = 0; |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 位置编号
|
|||
/// </summary>
|
|||
[Display(Name = "位置编号")] |
|||
public string AreaCode { get; set; } |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 数量
|
|||
/// </summary>
|
|||
[Display(Name = "数量")] |
|||
public decimal Qty { get; set; } |
|||
|
|||
|
|||
|
|||
//#region Base
|
|||
///// <summary>
|
|||
///// 名称
|
|||
///// </summary>
|
|||
//[Display(Name = "名称")]
|
|||
//[Required(ErrorMessage = "{0}是必填项")]
|
|||
//[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
|
|||
//public string Name { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 描述1
|
|||
///// </summary>
|
|||
//[Display(Name = "描述1")]
|
|||
//[StringLength(SfsEfCorePropertyConst.DescLength, ErrorMessage = "{0}最多输入{1}个字符")]
|
|||
//public string Desc1 { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 描述2
|
|||
///// </summary>
|
|||
//[Display(Name = "描述2")]
|
|||
//[StringLength(SfsEfCorePropertyConst.DescLength, ErrorMessage = "{0}最多输入{1}个字符")]
|
|||
//public string Desc2 { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 状态
|
|||
///// </summary>
|
|||
//[Display(Name = "状态")]
|
|||
//[Required(ErrorMessage = "{0}是必填项")]
|
|||
//public EnumItemStatus Status { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 制造件
|
|||
///// </summary>
|
|||
//[Display(Name = "制造件")]
|
|||
//[Required(ErrorMessage = "{0}是必填项")]
|
|||
//public bool CanMake { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 采购件
|
|||
///// </summary>
|
|||
//[Display(Name = "采购件")]
|
|||
//[Required(ErrorMessage = "{0}是必填项")]
|
|||
//public bool CanBuy { get; set; }
|
|||
///// <summary>
|
|||
///// 外包件
|
|||
///// </summary>
|
|||
//[Display(Name = "外包件")]
|
|||
//public bool CanOutsourcing { get; set; }
|
|||
///// <summary>
|
|||
///// 回收件
|
|||
///// </summary>
|
|||
//[Display(Name = "回收件")]
|
|||
//public bool IsRecycled { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 类型
|
|||
///// </summary>
|
|||
//[Display(Name = "类型")]
|
|||
//[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
|
|||
//public string Type { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 种类
|
|||
///// </summary>
|
|||
//[Display(Name = "种类")]
|
|||
//[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
|
|||
//public string Category { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 分组
|
|||
///// </summary>
|
|||
//[Display(Name = "分组")]
|
|||
//[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
|
|||
//public string Group { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 颜色
|
|||
///// </summary>
|
|||
//[Display(Name = "颜色")]
|
|||
//[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
|
|||
//public string Color { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 配置
|
|||
///// </summary>
|
|||
//[Display(Name = "配置")]
|
|||
//[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
|
|||
//public string Configuration { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 虚零件
|
|||
///// </summary>
|
|||
//[Display(Name = "虚零件(Is phantom)")]
|
|||
//public virtual bool IsPhantom { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 基本计量单位
|
|||
///// </summary>
|
|||
//[Display(Name = "基本计量单位")]
|
|||
//[Required(ErrorMessage = "{0}是必填项")]
|
|||
//[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
|
|||
//public string BasicUom { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 标包数
|
|||
///// </summary>
|
|||
//[Display(Name = "标包数")]
|
|||
//[Required(ErrorMessage = "{0}是必填项")]
|
|||
//public decimal StdPackQty { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// ABC类
|
|||
///// </summary>
|
|||
//[Display(Name = "ABC类")]
|
|||
//[Required(ErrorMessage = "{0}是必填项", AllowEmptyStrings = true)]
|
|||
//[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
|
|||
//public string AbcClass { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 项目
|
|||
///// </summary>
|
|||
//[Display(Name = "项目")]
|
|||
//[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
|
|||
//public string Project { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 版本
|
|||
///// </summary>
|
|||
//[Display(Name = "版本")]
|
|||
//[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
|
|||
//public string Version { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 工程变革
|
|||
///// </summary>
|
|||
//[Display(Name = "工程变革")]
|
|||
//[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
|
|||
//public string Eco { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 有效期
|
|||
///// </summary>
|
|||
//[Display(Name = "有效期")]
|
|||
//public int Validity { get; set; }
|
|||
///// <summary>
|
|||
///// 有效期单位
|
|||
///// </summary>
|
|||
//[Display(Name = "有效期单位")]
|
|||
//public EnumValidityUnit ValidityUnit { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 管理类型
|
|||
///// </summary>
|
|||
//[Display(Name = "管理类型")]
|
|||
//public EnumItemManageType ManageType { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 打印标签用的一个等级
|
|||
///// </summary>
|
|||
//[Display(Name = "Elevel")]
|
|||
//[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
|
|||
//public string Elevel { get; set; }
|
|||
//#endregion
|
|||
|
|||
//#region Create
|
|||
///// <summary>
|
|||
///// 代码
|
|||
///// </summary>
|
|||
//[Display(Name = "代码")]
|
|||
//[Required(ErrorMessage = "{0}是必填项")]
|
|||
//[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
|
|||
//public string Code { get; set; }
|
|||
//#endregion
|
|||
} |
@ -0,0 +1,53 @@ |
|||
using System; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Application.Contracts; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
[Display(Name = "器具位置")] |
|||
public class EquipmentAreaImportInput : SfsBaseDataImportInputBase |
|||
{ |
|||
/// <summary>
|
|||
/// 器具编号
|
|||
/// </summary>
|
|||
[Display(Name = "器具编号")] |
|||
public string Code { get; set; } |
|||
/// <summary>
|
|||
/// 类型
|
|||
/// </summary>
|
|||
[Display(Name = "类型")] |
|||
public string Type { get; set; } = string.Empty; |
|||
/// <summary>
|
|||
/// 型号
|
|||
/// </summary>
|
|||
[Display(Name = "型号")] |
|||
public string Model { get; set; } = string.Empty; |
|||
/// <summary>
|
|||
/// 库位编号
|
|||
/// </summary>
|
|||
[Display(Name = "库位编号")] |
|||
public string LocCode { get; set; } = string.Empty; |
|||
/// <summary>
|
|||
/// 状态
|
|||
/// </summary>
|
|||
[Display(Name = "状态")] |
|||
public int State { get; set; } = 0; |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 位置编号
|
|||
/// </summary>
|
|||
[Display(Name = "位置编号")] |
|||
public string AreaCode { get; set; } |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 数量
|
|||
/// </summary>
|
|||
[Display(Name = "数量")] |
|||
public decimal Qty { get; set; } |
|||
|
|||
|
|||
} |
@ -0,0 +1,55 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
public class EquipmentCheckInput |
|||
{ |
|||
/// <summary>
|
|||
/// 器具编号
|
|||
/// </summary>
|
|||
[Display(Name = "器具编号")] |
|||
public string Code { get; set; } |
|||
/// <summary>
|
|||
/// 类型
|
|||
/// </summary>
|
|||
[Display(Name = "类型")] |
|||
public string Type { get; set; } = string.Empty; |
|||
/// <summary>
|
|||
/// 型号
|
|||
/// </summary>
|
|||
[Display(Name = "型号")] |
|||
public string Model { get; set; } = string.Empty; |
|||
/// <summary>
|
|||
/// 库位编号
|
|||
/// </summary>
|
|||
[Display(Name = "库位编号")] |
|||
public string LocCode { get; set; } = string.Empty; |
|||
/// <summary>
|
|||
/// 状态
|
|||
/// </summary>
|
|||
[Display(Name = "状态")] |
|||
public int State { get; set; } = 0; |
|||
/// <summary>
|
|||
/// 备注
|
|||
/// </summary>
|
|||
[Display(Name = "备注")] |
|||
public string Remark { get; set; } = string.Empty; |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 创建人
|
|||
/// </summary>
|
|||
[Display(Name = "创建人")] |
|||
public string Creator { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 创建时间
|
|||
/// </summary>
|
|||
[Display(Name = "创建时间")] |
|||
public DateTime CreatTime { get; set; }=DateTime.Now; |
|||
|
|||
|
|||
} |
@ -0,0 +1,236 @@ |
|||
using System; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
using Win_in.Sfs.Shared.Domain.Shared.Enums.Basedata; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
public class EquipmentEditInput : SfsBaseDataCreateOrUpdateInputBase |
|||
{ |
|||
/// <summary>
|
|||
/// 类型
|
|||
/// </summary>
|
|||
[Display(Name = "类型")] |
|||
public EnumEquipmentType Type { get; set; } |
|||
/// <summary>
|
|||
/// 器具编号
|
|||
/// </summary>
|
|||
[Display(Name = "器具代码")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public string Code { get; set; } |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 标包数量
|
|||
/// </summary>
|
|||
[Display(Name = "标包数")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public decimal StdQty { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 型号
|
|||
/// </summary>
|
|||
[Display(Name = "型号")] |
|||
public EnumEquipmentModel Model { get; set; } |
|||
/// <summary>
|
|||
/// 库位编号
|
|||
/// </summary>
|
|||
[Display(Name = "库位代码")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public string LocCode { get; set; } = string.Empty; |
|||
/// <summary>
|
|||
/// 状态
|
|||
/// </summary>
|
|||
|
|||
[Display(Name = "状态")] |
|||
public int State { get; set; } = 0; |
|||
|
|||
/// <summary>
|
|||
/// 创建人
|
|||
/// </summary>
|
|||
[Display(Name = "创建人")] |
|||
public string Creator { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 创建时间
|
|||
/// </summary>
|
|||
[Display(Name = "创建时间")] |
|||
public DateTime CreatTime { get; set; }=DateTime.Now; |
|||
|
|||
|
|||
|
|||
//#region Base
|
|||
///// <summary>
|
|||
///// 名称
|
|||
///// </summary>
|
|||
//[Display(Name = "名称")]
|
|||
//[Required(ErrorMessage = "{0}是必填项")]
|
|||
//[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
|
|||
//public string Name { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 描述1
|
|||
///// </summary>
|
|||
//[Display(Name = "描述1")]
|
|||
//[StringLength(SfsEfCorePropertyConst.DescLength, ErrorMessage = "{0}最多输入{1}个字符")]
|
|||
//public string Desc1 { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 描述2
|
|||
///// </summary>
|
|||
//[Display(Name = "描述2")]
|
|||
//[StringLength(SfsEfCorePropertyConst.DescLength, ErrorMessage = "{0}最多输入{1}个字符")]
|
|||
//public string Desc2 { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 状态
|
|||
///// </summary>
|
|||
//[Display(Name = "状态")]
|
|||
//[Required(ErrorMessage = "{0}是必填项")]
|
|||
//public EnumItemStatus Status { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 制造件
|
|||
///// </summary>
|
|||
//[Display(Name = "制造件")]
|
|||
//[Required(ErrorMessage = "{0}是必填项")]
|
|||
//public bool CanMake { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 采购件
|
|||
///// </summary>
|
|||
//[Display(Name = "采购件")]
|
|||
//[Required(ErrorMessage = "{0}是必填项")]
|
|||
//public bool CanBuy { get; set; }
|
|||
///// <summary>
|
|||
///// 外包件
|
|||
///// </summary>
|
|||
//[Display(Name = "外包件")]
|
|||
//public bool CanOutsourcing { get; set; }
|
|||
///// <summary>
|
|||
///// 回收件
|
|||
///// </summary>
|
|||
//[Display(Name = "回收件")]
|
|||
//public bool IsRecycled { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 类型
|
|||
///// </summary>
|
|||
//[Display(Name = "类型")]
|
|||
//[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
|
|||
//public string Type { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 种类
|
|||
///// </summary>
|
|||
//[Display(Name = "种类")]
|
|||
//[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
|
|||
//public string Category { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 分组
|
|||
///// </summary>
|
|||
//[Display(Name = "分组")]
|
|||
//[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
|
|||
//public string Group { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 颜色
|
|||
///// </summary>
|
|||
//[Display(Name = "颜色")]
|
|||
//[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
|
|||
//public string Color { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 配置
|
|||
///// </summary>
|
|||
//[Display(Name = "配置")]
|
|||
//[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
|
|||
//public string Configuration { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 虚零件
|
|||
///// </summary>
|
|||
//[Display(Name = "虚零件(Is phantom)")]
|
|||
//public virtual bool IsPhantom { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 基本计量单位
|
|||
///// </summary>
|
|||
//[Display(Name = "基本计量单位")]
|
|||
//[Required(ErrorMessage = "{0}是必填项")]
|
|||
//[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
|
|||
//public string BasicUom { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 标包数
|
|||
///// </summary>
|
|||
//[Display(Name = "标包数")]
|
|||
//[Required(ErrorMessage = "{0}是必填项")]
|
|||
//public decimal StdPackQty { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// ABC类
|
|||
///// </summary>
|
|||
//[Display(Name = "ABC类")]
|
|||
//[Required(ErrorMessage = "{0}是必填项", AllowEmptyStrings = true)]
|
|||
//[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
|
|||
//public string AbcClass { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 项目
|
|||
///// </summary>
|
|||
//[Display(Name = "项目")]
|
|||
//[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
|
|||
//public string Project { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 版本
|
|||
///// </summary>
|
|||
//[Display(Name = "版本")]
|
|||
//[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
|
|||
//public string Version { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 工程变革
|
|||
///// </summary>
|
|||
//[Display(Name = "工程变革")]
|
|||
//[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
|
|||
//public string Eco { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 有效期
|
|||
///// </summary>
|
|||
//[Display(Name = "有效期")]
|
|||
//public int Validity { get; set; }
|
|||
///// <summary>
|
|||
///// 有效期单位
|
|||
///// </summary>
|
|||
//[Display(Name = "有效期单位")]
|
|||
//public EnumValidityUnit ValidityUnit { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 管理类型
|
|||
///// </summary>
|
|||
//[Display(Name = "管理类型")]
|
|||
//public EnumItemManageType ManageType { get; set; }
|
|||
|
|||
///// <summary>
|
|||
///// 打印标签用的一个等级
|
|||
///// </summary>
|
|||
//[Display(Name = "Elevel")]
|
|||
//[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
|
|||
//public string Elevel { get; set; }
|
|||
//#endregion
|
|||
|
|||
//#region Create
|
|||
///// <summary>
|
|||
///// 代码
|
|||
///// </summary>
|
|||
//[Display(Name = "代码")]
|
|||
//[Required(ErrorMessage = "{0}是必填项")]
|
|||
//[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
|
|||
//public string Code { get; set; }
|
|||
//#endregion
|
|||
} |
@ -0,0 +1,64 @@ |
|||
using System; |
|||
using System.ComponentModel.DataAnnotations; |
|||
|
|||
using Win_in.Sfs.Shared.Domain.Shared.Enums.Basedata; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
[Display(Name = "物品")] |
|||
public class EquipmentImportInput : SfsBaseDataImportInputBase |
|||
{ |
|||
/// <summary>
|
|||
/// 类型
|
|||
/// </summary>
|
|||
[Display(Name = "类型")] |
|||
public Win_in.Sfs.Shared.Domain.Shared.Enums.Basedata.EnumEquipmentType Type { get; set; } |
|||
/// <summary>
|
|||
/// 器具编号
|
|||
/// </summary>
|
|||
[Display(Name = "器具代码")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public string Code { get; set; } |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 标包数量
|
|||
/// </summary>
|
|||
[Display(Name = "标包数")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public decimal StdQty { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 型号
|
|||
/// </summary>
|
|||
[Display(Name = "型号")] |
|||
public EnumEquipmentModel Model { get; set; } |
|||
/// <summary>
|
|||
/// 库位编号
|
|||
/// </summary>
|
|||
[Display(Name = "库位代码")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public string LocCode { get; set; } = string.Empty; |
|||
/// <summary>
|
|||
/// 状态
|
|||
/// </summary>
|
|||
|
|||
[Display(Name = "状态")] |
|||
public int State { get; set; } = 0; |
|||
|
|||
/// <summary>
|
|||
/// 创建人
|
|||
/// </summary>
|
|||
[Display(Name = "创建人")] |
|||
public string Creator { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 创建时间
|
|||
/// </summary>
|
|||
[Display(Name = "创建时间")] |
|||
public DateTime CreatTime { get; set; } = DateTime.Now; |
|||
|
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,20 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
public class EquipmentLocCapCheckInput |
|||
{ |
|||
/// <summary>
|
|||
/// 器具代码
|
|||
/// </summary>
|
|||
[Display(Name = "器具代码")] |
|||
public string Code { get; set; } |
|||
/// 占用百分比
|
|||
/// </summary>
|
|||
[Display(Name = "占用百分比")] |
|||
public decimal Percent { get; set; } |
|||
|
|||
} |
@ -0,0 +1,20 @@ |
|||
using System; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
using Win_in.Sfs.Shared.Domain.Shared.Enums.Basedata; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
public class EquipmentLocCapEditInput : SfsBaseDataCreateOrUpdateInputBase |
|||
{ |
|||
/// <summary>
|
|||
/// 器具代码
|
|||
/// </summary>
|
|||
[Display(Name = "器具代码")] |
|||
public string Code { get; set; } |
|||
/// 占用百分比
|
|||
/// </summary>
|
|||
[Display(Name = "占用百分比")] |
|||
public decimal Percent { get; set; } |
|||
} |
@ -0,0 +1,38 @@ |
|||
using System; |
|||
using System.ComponentModel.DataAnnotations; |
|||
|
|||
using Win_in.Sfs.Shared.Domain.Shared.Enums.Basedata; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
[Display(Name = "器具容量")] |
|||
public class EquipmentLocCapImportInput : SfsBaseDataImportInputBase |
|||
{ |
|||
/// <summary>
|
|||
/// 器具代码
|
|||
/// </summary>
|
|||
[Display(Name = "器具代码")] |
|||
public string Code { get; set; } |
|||
/// 占用百分比
|
|||
/// </summary>
|
|||
[Display(Name = "占用百分比")] |
|||
public decimal Percent { get; set; } |
|||
//[Display(Name = "零件代码")]
|
|||
|
|||
//public string PartCode { get; set; }
|
|||
|
|||
//[Display(Name = "当前数量")]
|
|||
///// <summary>
|
|||
///// 录入数量
|
|||
///// </summary>
|
|||
//public decimal Qty { get; set; }
|
|||
//[Display(Name = "标包数量")]
|
|||
///// <summary>
|
|||
///// 标包数量
|
|||
///// </summary>
|
|||
//public decimal StdQty { get; set; }
|
|||
|
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,27 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
public class EquipmentLocCheckInput |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// 器具编号
|
|||
/// </summary>
|
|||
[Display(Name = "器具代码")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public string Code { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 库位编号
|
|||
/// </summary>
|
|||
[Display(Name = "库位代码")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public string LocCode { get; set; } |
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,28 @@ |
|||
using System; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
public class EquipmentLocEditInput : SfsBaseDataCreateOrUpdateInputBase |
|||
{ |
|||
/// <summary>
|
|||
/// 器具编号
|
|||
/// </summary>
|
|||
[Display(Name = "器具代码")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public string Code { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 库位编号
|
|||
/// </summary>
|
|||
[Display(Name = "库位代码")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public string LocCode { get; set; } |
|||
|
|||
[Display(Name = "状态")] |
|||
public int State { get; set; } = 0; |
|||
|
|||
|
|||
} |
@ -0,0 +1,33 @@ |
|||
using System; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Application.Contracts; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
[Display(Name = "器具")] |
|||
public class EquipmentLocImportInput : SfsBaseDataImportInputBase |
|||
{ |
|||
/// <summary>
|
|||
/// 器具编号
|
|||
/// </summary>
|
|||
[Display(Name = "器具代码")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public string Code { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 库位编号
|
|||
/// </summary>
|
|||
[Display(Name = "库位代码")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public string LocCode { get; set; } |
|||
|
|||
|
|||
[Display(Name = "状态")] |
|||
public int State { get; set; } = 0; |
|||
|
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,43 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
public class EquipmentPartCodeCheckInput |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// 器具代号
|
|||
/// </summary>
|
|||
[Display(Name = "器具代码")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public string Code { get; set; } |
|||
|
|||
|
|||
|
|||
|
|||
///// <summary>
|
|||
///// 型号
|
|||
///// </summary>
|
|||
//[Display(Name = "型号")]
|
|||
//public string Model { get; set; } = string.Empty;
|
|||
/// <summary>
|
|||
/// 库位编号
|
|||
/// </summary>
|
|||
[Display(Name = "零件代码")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public string PartCode { get; set; } |
|||
|
|||
|
|||
|
|||
/// <summary>
|
|||
/// 标包数量
|
|||
/// </summary>
|
|||
[Display(Name = "标包数")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public decimal StdQty { get; set; } |
|||
|
|||
|
|||
} |
@ -0,0 +1,53 @@ |
|||
using System; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
public class EquipmentPartCodeEditInput : SfsBaseDataCreateOrUpdateInputBase |
|||
{ |
|||
/// <summary>
|
|||
/// 器具代号
|
|||
/// </summary>
|
|||
[Display(Name = "器具代码")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public string Code { get; set; } |
|||
|
|||
|
|||
|
|||
|
|||
///// <summary>
|
|||
///// 型号
|
|||
///// </summary>
|
|||
//[Display(Name = "型号")]
|
|||
//public string Model { get; set; } = string.Empty;
|
|||
/// <summary>
|
|||
/// 库位编号
|
|||
/// </summary>
|
|||
[Display(Name = "零件代码")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public string PartCode { get; set; } |
|||
|
|||
|
|||
|
|||
/// <summary>
|
|||
/// 标包数量
|
|||
/// </summary>
|
|||
[Display(Name = "标包数")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public decimal StdQty { get; set; } |
|||
|
|||
|
|||
|
|||
/// <summary>
|
|||
/// 标包数量
|
|||
/// </summary>
|
|||
[Display(Name = "单位")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public string Unit { get; set; } |
|||
|
|||
[Display(Name = "状态")] |
|||
public int State { get; set; } = 0; |
|||
|
|||
} |
@ -0,0 +1,60 @@ |
|||
using System; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Application.Contracts; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
[Display(Name = "器具")] |
|||
public class EquipmentPartCodeImportInput : SfsBaseDataImportInputBase |
|||
{ |
|||
/// <summary>
|
|||
/// 器具代号
|
|||
/// </summary>
|
|||
[Display(Name = "器具代码")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public string Code { get; set; } |
|||
|
|||
|
|||
|
|||
|
|||
///// <summary>
|
|||
///// 型号
|
|||
///// </summary>
|
|||
//[Display(Name = "型号")]
|
|||
//public string Model { get; set; } = string.Empty;
|
|||
/// <summary>
|
|||
/// 库位编号
|
|||
/// </summary>
|
|||
[Display(Name = "零件代码")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public string PartCode { get; set; } |
|||
|
|||
|
|||
|
|||
/// <summary>
|
|||
/// 标包数量
|
|||
/// </summary>
|
|||
[Display(Name = "标包数")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public decimal StdQty { get; set; } |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 标包数量
|
|||
/// </summary>
|
|||
[Display(Name = "单位")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public string Unit { get; set; } |
|||
|
|||
|
|||
[Display(Name = "状态")] |
|||
public int State { get; set; } = 0; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,41 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Volo.Abp.Application.Dtos; |
|||
using Win_in.Sfs.Basedata.Domain; |
|||
using Win_in.Sfs.Basedata.Domain.Shared; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
using Win_in.Sfs.Shared.Domain.Entities; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
[Display(Name = "Kitting箱")] |
|||
public class KittingDTO : EntityDto<Guid>, IHasCode, IHasName |
|||
{ |
|||
[Display(Name ="编号")] |
|||
public string Code { get; set; } |
|||
[Display(Name = "名称")] |
|||
public string Name { get; set; } |
|||
|
|||
[Display(Name = "明细")] |
|||
public List<KittingDetailDTO> Details { set; get; }= new List<KittingDetailDTO>(); |
|||
} |
|||
|
|||
public class KittingErrorDto |
|||
{ |
|||
|
|||
[Display(Name = "Kitting编号")] |
|||
public string Code { get; set; } |
|||
|
|||
|
|||
[Display(Name = "零件代码")] |
|||
public string PartCode { get; set; } |
|||
|
|||
|
|||
[Display(Name = "错误信息")] |
|||
public string Content { get; set; } |
|||
|
|||
|
|||
|
|||
} |
|||
|
@ -0,0 +1,49 @@ |
|||
using System; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Volo.Abp.Application.Dtos; |
|||
using Volo.Abp.MultiTenancy; |
|||
using Win_in.Sfs.Basedata.Domain.Shared; |
|||
using Win_in.Sfs.Shared.Application.Contracts; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
[Display(Name = "Kitting箱明细")] |
|||
public class KittingDetailDTO: AuditedEntityDto<Guid>, IMultiTenant, IRemark |
|||
{ |
|||
/// <summary>
|
|||
/// 主表ID
|
|||
/// </summary>
|
|||
[Display(Name = "主表ID")] |
|||
public Guid MasterId { get; set; } |
|||
/// <summary>
|
|||
/// 物料编码
|
|||
/// </summary>
|
|||
[Display(Name = "物料编码")] |
|||
public string PartCode { set; get; } |
|||
/// <summary>
|
|||
/// 描述1
|
|||
/// </summary>
|
|||
[Display(Name = "描述1")] |
|||
public string Desc1 { set; get; } |
|||
/// <summary>
|
|||
/// 描述2
|
|||
/// </summary>
|
|||
[Display(Name = "描述2")] |
|||
public string Desc2 { set; get; } |
|||
/// <summary>
|
|||
/// 包装数量
|
|||
/// </summary>
|
|||
[Display(Name = "包装数量")] |
|||
public decimal Qty { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 配置
|
|||
/// </summary>
|
|||
[Display(Name = "配置")] |
|||
public string Conf { set; get; } |
|||
|
|||
public Guid? TenantId { set; get; } |
|||
|
|||
public string Remark { get; set; } |
|||
} |
@ -0,0 +1,9 @@ |
|||
using System.Threading.Tasks; |
|||
using Win_in.Sfs.Shared.Application.Contracts; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
public interface IKittingAppService: ISfsBaseDataAppServiceBase<KittingDTO, SfsBaseDataRequestInputBase, KittingEditInput>, ISfsGetByCodeAppService<KittingDTO> |
|||
{ |
|||
Task UpdateAsync(KittingEditInput input); |
|||
} |
@ -0,0 +1,49 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Application.Dtos; |
|||
using Volo.Abp.MultiTenancy; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Kittings.Inputs; |
|||
public class KittingDetailInput: EntityDto<Guid>, IMultiTenant, IRemark |
|||
{ |
|||
/// <summary>
|
|||
/// 主表ID
|
|||
/// </summary>
|
|||
[Display(Name = "主表ID")] |
|||
public Guid MasterId { get; set; } |
|||
/// <summary>
|
|||
/// 物料编码
|
|||
/// </summary>
|
|||
[Display(Name = "物料编码")] |
|||
public string PartCode { set; get; } |
|||
/// <summary>
|
|||
/// 描述1
|
|||
/// </summary>
|
|||
[Display(Name = "描述1")] |
|||
public string Desc1 { set; get; } |
|||
/// <summary>
|
|||
/// 描述2
|
|||
/// </summary>
|
|||
[Display(Name = "描述2")] |
|||
public string Desc2 { set; get; } |
|||
/// <summary>
|
|||
/// 包装数量
|
|||
/// </summary>
|
|||
[Display(Name = "包装数量")] |
|||
public decimal Qty { set; get; } |
|||
/// <summary>
|
|||
/// 配置
|
|||
/// </summary>
|
|||
[Display(Name = "配置")] |
|||
public string Conf { set; get; } |
|||
[Display(Name = "租户ID")] |
|||
public Guid? TenantId { set; get; |
|||
} |
|||
[Display(Name = "备注")] |
|||
public string Remark { get; set; } |
|||
} |
@ -0,0 +1,32 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Volo.Abp.Application.Dtos; |
|||
using Volo.Abp.Data; |
|||
using Volo.Abp.MultiTenancy; |
|||
using Win_in.Sfs.Basedata.Domain; |
|||
using Win_in.Sfs.Basedata.Domain.Shared; |
|||
using Win_in.Sfs.Basedata.Kittings.Inputs; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
using Win_in.Sfs.Shared.Domain.Entities; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
public class KittingEditInput : EntityDto<Guid>, IMultiTenant, IRemark, IHasExtraProperties |
|||
{ |
|||
|
|||
public string Code { get; set; } |
|||
public string Name { get; set; } |
|||
|
|||
|
|||
public virtual List<KittingDetailInput> Details { get; set; }=new List<KittingDetailInput>(); |
|||
|
|||
[DefaultValue(null)] |
|||
public Guid? TenantId { get; set; } |
|||
|
|||
public string Remark { get; set; } |
|||
|
|||
[DefaultValue("{}")] |
|||
public ExtraPropertyDictionary ExtraProperties { get; set; } |
|||
} |
@ -0,0 +1,149 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Basedata.Domain; |
|||
using Win_in.Sfs.Basedata.Domain.Shared; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
using Win_in.Sfs.Shared.Domain.Entities; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
[Display(Name = "Kitting箱")] |
|||
public class KittingImportInput : SfsBaseDataImportInputBase |
|||
{ |
|||
/// <summary>
|
|||
/// Kitting编码
|
|||
/// </summary>
|
|||
[Display(Name ="Kitting编码")] |
|||
public string Code { get; set; } |
|||
/// <summary>
|
|||
/// Kitting名称
|
|||
/// </summary>
|
|||
[Display(Name = "Kitting名称")] |
|||
public string Name { get; set; } |
|||
/// <summary>
|
|||
/// 物料编码
|
|||
/// </summary>
|
|||
[Display(Name = "物料编码")] |
|||
public string PartCode { set; get; } |
|||
/// <summary>
|
|||
/// 描述1
|
|||
/// </summary>
|
|||
[Display(Name = "物料描述1")] |
|||
public string Desc1 { set; get; } |
|||
/// <summary>
|
|||
/// 描述2
|
|||
/// </summary>
|
|||
[Display(Name = "物料描述2")] |
|||
public string Desc2 { set; get; } |
|||
/// <summary>
|
|||
/// 包装数量
|
|||
/// </summary>
|
|||
[Display(Name = "包装数量")] |
|||
public decimal Qty { set; get; } |
|||
/// <summary>
|
|||
/// 配置
|
|||
/// </summary>
|
|||
[Display(Name = "配置")] |
|||
public string Conf { set; get; } |
|||
//[Display(Name = "租户ID")]
|
|||
//public Guid? TenantId
|
|||
//{
|
|||
// set; get;
|
|||
//}
|
|||
//[Display(Name = "备注")]
|
|||
//public string Remark { get; set; }
|
|||
|
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
//[Serializable]
|
|||
//public class CustomerDTO : SfsBaseDataDTOBase
|
|||
//{
|
|||
// ///<summary>
|
|||
// ///�ͻ�����
|
|||
// ///</summary>
|
|||
// [Display(Name = "�ͻ�����")]
|
|||
// [Required(ErrorMessage = "{0}�DZ�����")]
|
|||
// [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}�������{1}���ַ�")]
|
|||
// public string Code { get; set; }
|
|||
|
|||
// /// <summary>
|
|||
// /// �ͻ�����
|
|||
// /// </summary>
|
|||
// [Display(Name = "�ͻ�����")]
|
|||
// [Required(ErrorMessage = "{0}�DZ�����")]
|
|||
// [StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}�������{1}���ַ�")]
|
|||
// public string Name { get; set; }
|
|||
|
|||
// /// <summary>
|
|||
// /// �ͻ�����
|
|||
// /// </summary>
|
|||
// [Display(Name = "�ͻ�����")]
|
|||
// [StringLength(SfsEfCorePropertyConst.DescLength, ErrorMessage = "{0}�������{1}���ַ�")]
|
|||
// public string Description { get; set; }
|
|||
|
|||
// /// <summary>
|
|||
// /// ��ϵ��ַ
|
|||
// /// </summary>
|
|||
// [Display(Name = "��ϵ��ַ")]
|
|||
// [StringLength(SfsEfCorePropertyConst.DescLength, ErrorMessage = "{0}�������{1}���ַ�")]
|
|||
// public string Address { get; set; }
|
|||
|
|||
// /// <summary>
|
|||
// /// ��ϵ��
|
|||
// /// </summary>
|
|||
|
|||
// [Display(Name = "��ϵ��")]
|
|||
// [StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}�������{1}���ַ�")]
|
|||
// public string Contact { get; set; }
|
|||
|
|||
// /// <summary>
|
|||
// /// ��ϵ�绰
|
|||
// /// </summary>
|
|||
// [Display(Name = "��ϵ�绰")]
|
|||
// public string ContactPhone { get; set; }
|
|||
|
|||
// /// <summary>
|
|||
// /// ��ϵ�ʼ�
|
|||
// /// </summary>
|
|||
// [Display(Name = "��ϵ�ʼ�")]
|
|||
|
|||
// public string ContactEmail { get; set; }
|
|||
|
|||
// /// <summary>
|
|||
// /// ��ϵ����
|
|||
// /// </summary>
|
|||
// [Display(Name = "��ϵ����")]
|
|||
// public string ContactFax { get; set; }
|
|||
|
|||
// /// <summary>
|
|||
// /// ˰��
|
|||
// /// </summary>
|
|||
// [Display(Name = "˰��")]
|
|||
// public Nullable<decimal> TaxRate { get; set; }
|
|||
|
|||
// /// <summary>
|
|||
// /// ����ID
|
|||
// /// </summary>
|
|||
// [Display(Name = "����Id")]
|
|||
// public Guid CurrencyId { get; set; }
|
|||
|
|||
// /// <summary>
|
|||
// /// ����ID
|
|||
// /// </summary>
|
|||
// [Display(Name = "��������")]
|
|||
// public string CurrencyName { get; set; }
|
|||
|
|||
// /// <summary>
|
|||
// /// �ͻ�����
|
|||
// /// </summary>
|
|||
// [Display(Name = "�ͻ�����")]
|
|||
// public Nullable<int> CustomerType { get; set; }
|
|||
|
|||
// public bool Enabled { get; set; }
|
|||
|
|||
// //public ICollection<CustomerItemDTO> CustomerItems { set; get; }
|
|||
//}
|
@ -0,0 +1,21 @@ |
|||
using Volo.Abp.Authorization.Permissions; |
|||
using Win_in.Sfs.Basedata.Domain; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
public static class KittingPermissions |
|||
{ |
|||
|
|||
public const string Default = BasedataPermissions.GroupName + "." + nameof(Kitting); |
|||
public const string Create = Default + "." + BasedataPermissions.CreateStr; |
|||
public const string Update = Default + "." + BasedataPermissions.UpdateStr; |
|||
public const string Delete = Default + "." + BasedataPermissions.DeleteStr; |
|||
|
|||
public static void AddKittingPermission(this PermissionGroupDefinition permissionGroup) |
|||
{ |
|||
var customerPermission = permissionGroup.AddPermission(Default, BasedataPermissionDefinitionProvider.L(nameof(Kitting))); |
|||
customerPermission.AddChild(Create, BasedataPermissionDefinitionProvider.L(BasedataPermissions.CreateStr)); |
|||
customerPermission.AddChild(Update, BasedataPermissionDefinitionProvider.L(BasedataPermissions.UpdateStr)); |
|||
customerPermission.AddChild(Delete, BasedataPermissionDefinitionProvider.L(BasedataPermissions.DeleteStr)); |
|||
} |
|||
} |
@ -0,0 +1,63 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
[Display(Name = "位置码")] |
|||
|
|||
public class PositionCodeDTO : SfsBaseDataDTOBase, IHasCode |
|||
{ |
|||
/// <summary>
|
|||
/// 代码
|
|||
/// </summary>
|
|||
[Display(Name = "代码")] |
|||
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string Code { get; set; } |
|||
/// <summary>
|
|||
/// 物料号
|
|||
/// </summary>
|
|||
[Display(Name = "物料号")] |
|||
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string PartCode { get; set; } |
|||
/// <summary>
|
|||
/// 物料名称
|
|||
/// </summary>
|
|||
[Display(Name = "物料名称")] |
|||
[StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string PartName { get; set; } |
|||
/// <summary>
|
|||
/// 物料描述
|
|||
/// </summary>
|
|||
[Display(Name = "物料描述")] |
|||
[StringLength(SfsEfCorePropertyConst.DescLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string PartDesc { get; set; } |
|||
/// <summary>
|
|||
/// 基本计量单位
|
|||
/// </summary>
|
|||
[Display(Name = "基本计量单位")] |
|||
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string BasicUom { get; set; } |
|||
/// <summary>
|
|||
/// 库位
|
|||
/// </summary>
|
|||
[Display(Name = "库位")] |
|||
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string LocationCode { get; set; } |
|||
/// <summary>
|
|||
/// 库位名称
|
|||
/// </summary>
|
|||
[Display(Name = "库位名称")] |
|||
[StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string LocationName { get; set; } |
|||
/// <summary>
|
|||
/// 标包数量
|
|||
/// </summary>
|
|||
[Display(Name = "标包数量")] |
|||
public decimal StdPackQty { get; set; } |
|||
/// <summary>
|
|||
/// 类型
|
|||
/// </summary>
|
|||
[Display(Name = "类型")] |
|||
public EnumRecommendType Type { get; set; } |
|||
} |
@ -0,0 +1,9 @@ |
|||
using Win_in.Sfs.Shared.Application.Contracts; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
public interface IPositionCodeAppService |
|||
: ISfsBaseDataAppServiceBase<PositionCodeDTO, SfsBaseDataRequestInputBase, PositionCodeEditInput> |
|||
, ISfsGetByCodeAppService<PositionCodeDTO> |
|||
{ |
|||
} |
@ -0,0 +1,67 @@ |
|||
using System; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
[Serializable] |
|||
public class PositionCodeEditInput : SfsBaseDataCreateOrUpdateInputBase |
|||
{ |
|||
#region Base
|
|||
/// <summary>
|
|||
/// 物料号
|
|||
/// </summary>
|
|||
[Display(Name = "物料号")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public string PartCode { get; set; } |
|||
/// <summary>
|
|||
/// 物料名称
|
|||
/// </summary>
|
|||
[Display(Name = "物料名称")] |
|||
public string PartName { get; set; } |
|||
/// <summary>
|
|||
/// 物料描述
|
|||
/// </summary>
|
|||
[Display(Name = "物料描述")] |
|||
public string PartDesc { get; set; } |
|||
/// <summary>
|
|||
/// 基本计量单位
|
|||
/// </summary>
|
|||
[Display(Name = "基本计量单位")] |
|||
public string BasicUom { get; set; } |
|||
/// <summary>
|
|||
/// 库位
|
|||
/// </summary>
|
|||
[Display(Name = "库位")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public string LocationCode { get; set; } |
|||
/// <summary>
|
|||
/// 库位名称
|
|||
/// </summary>
|
|||
[Display(Name = "库位名称")] |
|||
public string LocationName { get; set; } |
|||
/// <summary>
|
|||
/// 标包数量
|
|||
/// </summary>
|
|||
[Display(Name = "标包数量")] |
|||
public decimal StdPackQty { get; set; } |
|||
/// <summary>
|
|||
/// 类型
|
|||
/// </summary>
|
|||
[Display(Name = "类型")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public EnumRecommendType Type { get; set; } |
|||
|
|||
#endregion
|
|||
|
|||
#region Create
|
|||
/// <summary>
|
|||
/// 代码
|
|||
/// </summary>
|
|||
[Display(Name = "代码")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string Code { get; set; } |
|||
#endregion
|
|||
} |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue