Conflicts:
This commit is contained in:
2024-09-19 15:13:11 +08:00
11 changed files with 121 additions and 12 deletions

View File

@@ -28,6 +28,7 @@ using Tnb.WarehouseMgr.Interfaces;
using Tnb.ProductionMgr.Entities.Entity;
using Tnb.BasicData;
using Tnb.WarehouseMgr.Entities.Entity;
using Microsoft.Extensions.Logging;
namespace Tnb.WarehouseMgr
{
@@ -297,11 +298,13 @@ namespace Tnb.WarehouseMgr
// 采购入库
if (instock.bill_type == WmsWareHouseConst.BILLTYPE_MATERIALINSTOCK_ID)
{
//await _db.Updateable<WmsCarryCode>().SetColumns(r => new WmsCarryCode
//{
// auxprop_gys = ,
// auxprop_xph =
//}).Where(r => r.id == input.wmsDistaskH.carry_id).ExecuteCommandAsync();
WmsPurchaseD wmsPurchaseD = await _db.Queryable<WmsPurchaseD>().SingleAsync(x => x.id == input.wmsDistaskH.source_id);
await _db.Updateable<WmsCarryCode>().SetColumns(r => new WmsCarryCode
{
auxprop_gys = wmsPurchaseD.auxprop_gys,
auxprop_xph = wmsPurchaseD.auxprop_xph
}).Where(r => r.carry_id == input.wmsDistaskH.carry_id).ExecuteCommandAsync();
if (instock.sync_status != WmsWareHouseConst.SYNC_STATUS_NONEEDSYNC)
{
@@ -449,11 +452,18 @@ namespace Tnb.WarehouseMgr
// 委外入库
else if (instock.bill_type == WmsWareHouseConst.BILLTYPE_OUTSOURCEINSTOCK_ID)
{
}
// 调拨入库
else if (instock.bill_type == WmsWareHouseConst.BILLTYPE_RAWMATTRANSFERINSTOCK_ID)
{
WmsRawmatTransferinstockD wmsRawmatTransferinstockD = await _db.Queryable<WmsRawmatTransferinstockD>().SingleAsync(x => x.id == input.wmsDistaskH.source_id);
await _db.Updateable<WmsCarryCode>().SetColumns(r => new WmsCarryCode
{
auxprop_gys = wmsRawmatTransferinstockD.auxprop_gys,
auxprop_xph = wmsRawmatTransferinstockD.auxprop_xph
}).Where(r => r.carry_id == input.wmsDistaskH.carry_id).ExecuteCommandAsync();
// List<WmsInstockD> allInstockDetails = await _db.Queryable<WmsInstockD>().Where(it => it.bill_id == input.requireId).ToListAsync();
//
// WmsTempCode wmsTempCode = await _db.Queryable<WmsCarryCode>()
@@ -569,8 +579,10 @@ namespace Tnb.WarehouseMgr
await _db.Ado.CommitTranAsync();
}
catch (Exception)
catch (Exception ex)
{
Logger.LogWarning($"【WmsInStockService Modify】 {ex.Message}");
Logger.LogWarning($"【MaterialSign Modify】 {ex.StackTrace}");
await _db.Ado.RollbackTranAsync();
throw;
}