diff --git a/src/WmsWebApi.Application/ProductRecieve/ProductRecieveService.cs b/src/WmsWebApi.Application/ProductRecieve/ProductRecieveService.cs index 28b58cb..2f8e812 100644 --- a/src/WmsWebApi.Application/ProductRecieve/ProductRecieveService.cs +++ b/src/WmsWebApi.Application/ProductRecieve/ProductRecieveService.cs @@ -16,6 +16,7 @@ using WmsWebApi.Domain; using WmsWebApi.EntityFrameworkCore; using WmsWebApi.Jsons; using WmsWebApi.Wms; +using WmsWebApi.WMS; namespace WmsWebApi.ProductRecieve; @@ -81,11 +82,11 @@ public class ProductRecieveService : ApplicationService, IProductRecieveService }); } - [HttpPost("add")] + [HttpPost("add/IF01")] public async Task AddAsync([FromBody] object content) { var result = new ReturnResult(); - result.MESSAGE = ""; + result.MESSAGE = String.Empty; PRDto _PRDto; //bool bUpdate = false,bOtherWork = false, bDel = false,bNotFind = false, bPartGroup = false; bool bErr = false; @@ -121,11 +122,13 @@ public class ProductRecieveService : ApplicationService, IProductRecieveService List _stockUpdateList = new List(); List _stockDelList = new List(); List _transList = new List(); + List listTSUNIAPI = new List(); #region 添加BILL var tbBill = new TB_BILL { BillNum = "AGV." + DateTime.Now.ToString("yyyyMMddHHmmss"), + SourceBillNum = _PRDto.SourceBillNum, SourceBillNum2 = _PRDto.SourceBillNum, BillTime = DateTime.Now, StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), @@ -295,6 +298,11 @@ public class ProductRecieveService : ApplicationService, IProductRecieveService result.TYPE = 'E'; apiPRdto.ITYPE = result.MESSAGE; } + else + { + result.MESSAGE = "成功"; + apiPRdto.ITYPE = "成功"; + } try { await AddWmsWebApiProductRecieveDTONowUnitOfWorkAsync(apiPRdto); diff --git a/src/WmsWebApi.Application/StockMove/StockMoveService.cs b/src/WmsWebApi.Application/StockMove/StockMoveService.cs index e18cbe5..3d26236 100644 --- a/src/WmsWebApi.Application/StockMove/StockMoveService.cs +++ b/src/WmsWebApi.Application/StockMove/StockMoveService.cs @@ -91,10 +91,11 @@ public class StockMoveService : ApplicationService, IStockMoveService /// /// /// - [HttpPost("add")] + [HttpPost("add/IF02")] public async Task AddAsync([FromBody] object content) { var result = new ReturnResult(); + result.MESSAGE = String.Empty; SSDto _SSDto; //bool bUpdate = false,bOtherWork = false, bDel = false,bNotFind = false, bPartGroup = false; bool bErr = false; @@ -135,6 +136,7 @@ public class StockMoveService : ApplicationService, IStockMoveService var tbBill = new TB_BILL { BillNum = "AGVM." + DateTime.Now.ToString("yyyyMMddHHmmss"), + SourceBillNum = _SSDto.SourceBillNum, SourceBillNum2 = _SSDto.SourceBillNum, BillTime = DateTime.Now, StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), @@ -436,6 +438,10 @@ public class StockMoveService : ApplicationService, IStockMoveService result.TYPE = 'E'; apiSSdto.ITYPE = result.MESSAGE; } + else + { + apiSSdto.ITYPE = "成功"; + } try { await AddWmsWebApiStockMoveDTONowUnitOfWorkAsync(apiSSdto); diff --git a/src/WmsWebApi.Domain/WMS/TS_UNI_API.cs b/src/WmsWebApi.Domain/WMS/TS_UNI_API.cs new file mode 100644 index 0000000..ff5ad48 --- /dev/null +++ b/src/WmsWebApi.Domain/WMS/TS_UNI_API.cs @@ -0,0 +1,172 @@ +using System; +using Volo.Abp.Domain.Entities; + +namespace WmsWebApi.WMS +{ + public class TS_UNI_API : Entity + { + #region 实体属性 + /// + /// 接口类型 + /// + public string InterfaceType { get; set; } + + /// + /// 接口表 + /// + public string TableName { get; set; } + + /// + /// 单据类型 + /// + public int? BillType { get; set; } + + /// + /// 子单据类型 + /// + public int? SubBillType { get; set; } + + /// + /// 单据编号 + /// + public string BillNum { get; set; } + + /// + /// 零件号 + /// + public string PartCode { get; set; } + + /// + /// 批次 + /// + public string Batch { get; set; } + + /// + /// 来源库位 + /// + public string FromLoc { get; set; } + + /// + /// 目标库位 + /// + public string ToLoc { get; set; } + + /// + /// 来源ERP库位 + /// + public string FromErpLoc { get; set; } + + /// + /// 目标ERP库位 + /// + public string ToErpLoc { get; set; } + + /// + /// 数量 + /// + public double? Qty { get; set; } + + /// + /// 状态 + /// + public int? State { get; set; } + + /// + /// 创建操作员 + /// + public string CreateOper { get; set; } + + /// + /// 创建时间 + /// + public DateTime? CreateTime { get; set; } + + /// + /// 发送时间 + /// + public DateTime? PutTime { get; set; } + + /// + /// 客户编号 + /// + public string CustId { get; set; } + + /// + /// 供应商编号 + /// + public string VendId { get; set; } + + /// + /// 采购单位 + /// + public string PoUnit { get; set; } + + /// + /// 存储单位 + /// + public string LocUnit { get; set; } + + /// + /// 生效日期 + /// + public DateTime? ValidDate { get; set; } + + /// + /// ERP单据号 + /// + public string ErpBillNum { get; set; } + + /// + /// ERP行号 + /// + public int? ErpLineNum { get; set; } + + /// + /// 器具编号 + /// + public string EqptCode { get; set; } + + /// + /// 器具类型 + /// + public string EqptType { get; set; } + + /// + /// 供应商批次 + /// + public string VendBatch { get; set; } + + /// + /// 生产线 + /// + public string WorklineId { get; set; } + + /// + /// 上游单据号 + /// + public string SourceBillNum { get; set; } + + /// + /// ProcessId + /// + public int? ProcessId { get; set; } + + /// + /// GoodQty + /// + public double? GoodQty { get; set; } + + /// + /// ScrapQty + /// + public double? ScrapQty { get; set; } + + /// + /// InvalidQty + /// + public double? InvalidQty { get; set; } + + #endregion + + } +} diff --git a/src/WmsWebApi.EntityFrameworkCore/EntityFrameworkCore/WmsWebApiDbContext.cs b/src/WmsWebApi.EntityFrameworkCore/EntityFrameworkCore/WmsWebApiDbContext.cs index 3c243be..43418f2 100644 --- a/src/WmsWebApi.EntityFrameworkCore/EntityFrameworkCore/WmsWebApiDbContext.cs +++ b/src/WmsWebApi.EntityFrameworkCore/EntityFrameworkCore/WmsWebApiDbContext.cs @@ -10,6 +10,7 @@ using WmsWebApi.PPlan; using WmsWebApi.Purchase; using WmsWebApi.TbOrfers; using WmsWebApi.Wms; +using WmsWebApi.WMS; using WmsWebApi.ZlldcjLogs; namespace WmsWebApi.EntityFrameworkCore @@ -44,6 +45,7 @@ namespace WmsWebApi.EntityFrameworkCore public virtual DbSet StockMoveDtos { get; set; } public virtual DbSet ProductRecieveDtos { get; set; } public virtual DbSet TbStockMoves { get; set; } + public virtual DbSet TSUNIAPIs { get; set; } public WmsWebApiDbContext(DbContextOptions options) : base(options) diff --git a/src/WmsWebApi.EntityFrameworkCore/EntityFrameworkCore/WmsWebApiDbContextModelCreatingExtensions.cs b/src/WmsWebApi.EntityFrameworkCore/EntityFrameworkCore/WmsWebApiDbContextModelCreatingExtensions.cs index 231282b..ed3f413 100644 --- a/src/WmsWebApi.EntityFrameworkCore/EntityFrameworkCore/WmsWebApiDbContextModelCreatingExtensions.cs +++ b/src/WmsWebApi.EntityFrameworkCore/EntityFrameworkCore/WmsWebApiDbContextModelCreatingExtensions.cs @@ -10,6 +10,7 @@ using WmsWebApi.PPlan; using WmsWebApi.Purchase; using WmsWebApi.TbOrfers; using WmsWebApi.Wms; +using WmsWebApi.WMS; using WmsWebApi.ZlldcjLogs; namespace WmsWebApi.EntityFrameworkCore @@ -88,6 +89,7 @@ namespace WmsWebApi.EntityFrameworkCore ConfigureWmsWebApiStockMove(builder); ConfigureTbStockMoves(builder); + ConfigureTSUNIAPIs(builder); } private static void ConfigureTbOrder(ModelBuilder builder) @@ -683,5 +685,15 @@ namespace WmsWebApi.EntityFrameworkCore b.Property(p => p.EnumRetryStatus).HasMaxLength(64).HasConversion(); }); } + + private static void ConfigureTSUNIAPIs(ModelBuilder builder) + { + builder.Entity(b => + { + b.ToTable("TS_UNI_API", WmsWebApiDbProperties.DbSchema); + b.ConfigureByConvention(); + b.Property(q => q.Id).HasColumnName("UID").ValueGeneratedOnAdd(); + }); + } } } \ No newline at end of file