1
This commit is contained in:
@@ -460,16 +460,14 @@ namespace Tnb.WarehouseMgr
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[NonAction]
|
||||
public async Task GenTaskHandleAfter(GenPreTaskUpInput input)
|
||||
public async Task GenInStockTaskHandleAfter(GenPreTaskUpInput input)
|
||||
{
|
||||
try
|
||||
{
|
||||
await _db.Ado.BeginTranAsync();
|
||||
//根据载具移入Id,回更单据状态
|
||||
await _db.Updateable<WmsMoveInstock>().SetColumns(it => new WmsMoveInstock { status = WmsWareHouseConst.BILLSTATUS_ON_ID }).Where(it => it.id == input.PreTaskId).ExecuteCommandAsync();
|
||||
//根据生成的预任务,插入预任务操作记录
|
||||
await _db.Insertable(input.PreTaskRecord).ExecuteCommandAsync();
|
||||
if(input.PreTaskHandleCodes.Count > 0)
|
||||
if (input.PreTaskHandleCodes.Count > 0)
|
||||
{
|
||||
await _db.Insertable(input.PreTaskHandleCodes).ExecuteCommandAsync();
|
||||
}
|
||||
|
||||
@@ -138,8 +138,10 @@ namespace Tnb.WarehouseMgr
|
||||
handleH.create_id = _userManager.UserId;
|
||||
handleH.create_time = DateTime.Now;
|
||||
preTaskUpInput.PreTaskRecord = handleH;
|
||||
//根据载具移入Id,回更单据状态
|
||||
await _db.Updateable<WmsMoveInstock>().SetColumns(it => new WmsMoveInstock { status = WmsWareHouseConst.BILLSTATUS_ON_ID }).Where(it => it.id == preTaskUpInput.PreTaskId).ExecuteCommandAsync();
|
||||
|
||||
await _wareHouseService.GenTaskHandleAfter(preTaskUpInput);
|
||||
await _wareHouseService.GenInStockTaskHandleAfter(preTaskUpInput);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ namespace Tnb.WarehouseMgr
|
||||
preTaskUpInput.LocationIds = points.Select(x => x.location_id).ToList();
|
||||
preTaskUpInput.PreTaskRecords = preTasks.Adapt<List<WmsHandleH>>();
|
||||
preTaskUpInput.PreTaskRecords.ForEach(x => x.id = SnowflakeIdHelper.NextId());
|
||||
await _wareHouseService.GenTaskHandleAfter(preTaskUpInput);
|
||||
await _wareHouseService.GenInStockTaskHandleAfter(preTaskUpInput);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ namespace Tnb.WarehouseMgr
|
||||
preTaskUpInput.LocationIds = points.Select(x => x.id).ToList();
|
||||
preTaskUpInput.PreTaskRecords = preTasks.Adapt<List<WmsHandleH>>();
|
||||
preTaskUpInput.PreTaskRecords.ForEach(x => x.id = SnowflakeIdHelper.NextId());
|
||||
await _wareHouseService.GenTaskHandleAfter(preTaskUpInput);
|
||||
await _wareHouseService.GenInStockTaskHandleAfter(preTaskUpInput);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,6 @@ namespace Tnb.WarehouseMgr
|
||||
var carrys = await _db.Queryable<WmsCarryH>().LeftJoin<BasLocation>((a, b) => a.location_id == b.id)
|
||||
.Where(a => a.carrystd_id == input.data[nameof(WmsEmptyOutstockH.carrystd_id)].ToString())
|
||||
.ToListAsync();
|
||||
carrys.Where()
|
||||
WmsPointH sPoint = null;
|
||||
WmsPointH ePoint = null;
|
||||
if (input.data.ContainsKey(nameof(WmsPointH.location_id)))
|
||||
@@ -137,7 +136,7 @@ namespace Tnb.WarehouseMgr
|
||||
preTaskUpInput.LocationIds = points.Select(x => x.id).ToList();
|
||||
preTaskUpInput.PreTaskRecords = preTasks.Adapt<List<WmsHandleH>>();
|
||||
preTaskUpInput.PreTaskRecords.ForEach(x => x.id = SnowflakeIdHelper.NextId());
|
||||
await _wareHouseService.GenTaskHandleAfter(preTaskUpInput);
|
||||
await _wareHouseService.GenInStockTaskHandleAfter(preTaskUpInput);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ namespace Tnb.WarehouseMgr
|
||||
preTaskUpInput.LocationIds = points.Select(x => x.location_id).ToList();
|
||||
preTaskUpInput.PreTaskRecords = preTasks.Adapt<List<WmsHandleH>>();
|
||||
preTaskUpInput.PreTaskRecords.ForEach(x => x.id = SnowflakeIdHelper.NextId());
|
||||
await _wareHouseService.GenTaskHandleAfter(preTaskUpInput);
|
||||
await _wareHouseService.GenInStockTaskHandleAfter(preTaskUpInput);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ namespace Tnb.WarehouseMgr
|
||||
preTaskUpInput.LocationIds = points.Select(x => x.location_id).ToList();
|
||||
preTaskUpInput.PreTaskRecords = preTasks.Adapt<List<WmsHandleH>>();
|
||||
preTaskUpInput.PreTaskRecords.ForEach(x => x.id = SnowflakeIdHelper.NextId());
|
||||
await _wareHouseService.GenTaskHandleAfter(preTaskUpInput);
|
||||
await _wareHouseService.GenInStockTaskHandleAfter(preTaskUpInput);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ namespace Tnb.WarehouseMgr
|
||||
preTaskUpInput.LocationIds = points.Select(x => x.id).ToList();
|
||||
preTaskUpInput.PreTaskRecords = preTasks.Adapt<List<WmsHandleH>>();
|
||||
preTaskUpInput.PreTaskRecords.ForEach(x => x.id = SnowflakeIdHelper.NextId());
|
||||
await _wareHouseService.GenTaskHandleAfter(preTaskUpInput);
|
||||
await _wareHouseService.GenInStockTaskHandleAfter(preTaskUpInput);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -157,7 +157,6 @@ namespace Tnb.WarehouseMgr
|
||||
handleCode.code_batch = jo.Value<string>(nameof(WmsHandleCode.code_batch));
|
||||
handleCode.codeqty = jo.Value<int>(nameof(WmsHandleCode.codeqty));
|
||||
handleCode.unit_id = _db.Queryable<BasMaterial>().Single(it => it.id == materialId).unit_id;
|
||||
//handleCode.unit_code=_db.Queryable<BasMaterial>().Single(it => it.id == materialId);
|
||||
handleCode.create_id = _userManager.UserId;
|
||||
handleCode.create_time = DateTime.Now;
|
||||
preTaskUpInput.PreTaskHandleCodes.Add(handleCode);
|
||||
@@ -165,7 +164,8 @@ namespace Tnb.WarehouseMgr
|
||||
}
|
||||
}
|
||||
}
|
||||
await _wareHouseService.GenTaskHandleAfter(preTaskUpInput);
|
||||
await _db.Updateable<WmsCarryH>().SetColumns(it => new WmsCarryH { carry_code = input.data[nameof(WmsCarryH.carry_code)].ToString(), is_lock = 1, location_id = preTaskUpInput.CarryStartLocationId, location_code = preTaskUpInput.CarryStartLocationCode }).Where(it => it.id == preTaskUpInput.CarryId).ExecuteCommandAsync();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user