baseline: 小军 WMS 二开代码原始快照(含 SynOABusiness.cs Debugger.Break)
This commit is contained in:
commit
c2b0e7be0d
6522 files changed
+3530643
No files matched your search
+67
@@ -0,0 +1,67 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Opsoft.NetCore.O3App.Domain;
|
||||
using Opsoft.NetCore.O3App.Domain.Interface;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.IRepositories;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.IServices;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.Model;
|
||||
using Opsoft.NetCore.O3App.Shared;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Opsoft.Data;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.Services.WMS
|
||||
{
|
||||
[MapTo(typeof(IProductBarcodeCheckService), ServiceLifetime.Transient)]
|
||||
public class ProductBarcodeCheckService : ServiceBase<BaseEntity, IProductBarcodeCheckRepository>, IProductBarcodeCheckService
|
||||
{
|
||||
private readonly IProductBarcodeCheckRepository productBarcodeCheckRepository;
|
||||
public ProductBarcodeCheckService(IProductBarcodeCheckRepository repository) : base(repository)
|
||||
{
|
||||
Init(repository);
|
||||
productBarcodeCheckRepository = repository;
|
||||
}
|
||||
|
||||
public async Task<bool> SubmitSave(List<ProductBarcodeCheckRequest> input)
|
||||
{
|
||||
Dictionary<string, string> sqls = new Dictionary<string, string>();
|
||||
DateTime now = DateTime.Now;
|
||||
foreach (var barcodeGroup in input)
|
||||
{
|
||||
sqls.Add($"{barcodeGroup.Inner}/{barcodeGroup.Middle}/{barcodeGroup.Outer}",
|
||||
$@" INSERT INTO T_PRD_BARCODECHECK
|
||||
(
|
||||
UID,
|
||||
FINTERID,
|
||||
FBILLNO,
|
||||
FBARCODEINNER,
|
||||
FBARCODEMIDDLE,
|
||||
FBARCODEOUTER,
|
||||
C_YMD,
|
||||
C_USER,
|
||||
FSTATUS,
|
||||
FDELETED
|
||||
) VALUES (
|
||||
'{Guid.NewGuid().ToStringEx()}',
|
||||
'{Guid.NewGuid().ToStringEx()}',
|
||||
'{Guid.NewGuid().ToStringEx()}',
|
||||
'{barcodeGroup.Inner}',
|
||||
'{barcodeGroup.Middle}',
|
||||
'{barcodeGroup.Outer}',
|
||||
'{now.ToShortDateString()}',
|
||||
'{LoginInfo.UserID}',
|
||||
40,
|
||||
0
|
||||
); ");
|
||||
}
|
||||
|
||||
List<string> errorBarcode = await productBarcodeCheckRepository.ExecuteAsync(sqls);
|
||||
if (errorBarcode.Count > 0)
|
||||
{
|
||||
throw new O3AppException($"数据【{string.Join("】,【", errorBarcode)}】保存失败。");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user