出库签收输入参数删除,serviceModule属性

This commit is contained in:
alex
2023-06-27 09:25:16 +08:00
parent 60e8168355
commit 4b9817b858
3 changed files with 29 additions and 21 deletions

View File

@@ -19,9 +19,5 @@ namespace Tnb.WarehouseMgr.Entities.Dto.Inputs
/// 载具ID /// 载具ID
/// </summary> /// </summary>
public string carryId { get; set; } public string carryId { get; set; }
/// <summary>
/// 服务模块
/// </summary>
public string serviceModule { get; set; }
} }
} }

View File

@@ -124,7 +124,7 @@ namespace Tnb.WarehouseMgr
GenPreTaskUpInput genPreTaskAfterUpInput = new(); GenPreTaskUpInput genPreTaskAfterUpInput = new();
genPreTaskAfterUpInput.CarryIds = preTasks.Select(x => x.carry_id).ToList(); genPreTaskAfterUpInput.CarryIds = preTasks.Select(x => x.carry_id).ToList();
genPreTaskAfterUpInput.LocationIds = new HashSet<string>(locIds).ToList(); genPreTaskAfterUpInput.LocationIds = new HashSet<string>(locIds).ToList();
await _wareHouseService.GenInStockTaskHandleAfter(genPreTaskAfterUpInput, it => new WmsCarryH { is_lock = 1 }, it => new BasLocation { is_lock = 1 }); await _wareHouseService.GenInStockTaskHandleAfter(genPreTaskAfterUpInput, it => new WmsCarryH { is_lock = 1, carry_status = ((int)EnumCarryStatus.).ToString() }, it => new BasLocation { is_use = ((int)EnumCarryStatus.).ToString() });
} }
} }

View File

@@ -57,28 +57,40 @@ namespace Tnb.WarehouseMgr
{ {
_dicBizType = await _dictionaryDataService.GetDictionaryByTypeId(WmsWareHouseConst.WMS_BIZTYPE_ID); _dicBizType = await _dictionaryDataService.GetDictionaryByTypeId(WmsWareHouseConst.WMS_BIZTYPE_ID);
} }
var carry = await _db.Queryable<WmsCarryH>().SingleAsync(it => it.id == input.carryId); try
if (carry != null)
{ {
var disTask = await _db.Queryable<WmsDistaskH>().SingleAsync(it => it.id == input.disTaskId); await _db.Ado.BeginTranAsync();
if (disTask != null)
var carry = await _db.Queryable<WmsCarryH>().SingleAsync(it => it.id == input.carryId);
if (carry != null)
{ {
if (_dicBizType.ContainsKey(disTask.biz_type)) var disTask = await _db.Queryable<WmsDistaskH>().SingleAsync(it => it.id == input.disTaskId);
if (disTask != null)
{ {
switch (_dicBizType[disTask.biz_type]) if (_dicBizType.ContainsKey(disTask.biz_type))
{ {
case "空载具出库": switch (_dicBizType[disTask.biz_type])
case "寄存出库": {
case "齐套出库": case "空载具出库":
case "一般出库": case "寄存出库":
await _wareCarryService.UpdateNullCarry(carry); case "齐套出库":
break; case "一般出库":
await _wareCarryService.UpdateNullCarry(carry);
break;
}
} }
} }
var loc = await _db.Queryable<BasLocation>().SingleAsync(it => it.id == carry.location_id);
loc.is_use = "0";
await _db.Updateable(loc).UpdateColumns(it => it.is_use).ExecuteCommandAsync();
} }
var loc = await _db.Queryable<BasLocation>().SingleAsync(it => it.id == carry.location_id);
loc.is_use = "0"; await _db.Ado.CommitTranAsync();
await _db.Updateable(loc).UpdateColumns(it => it.is_use).ExecuteCommandAsync(); }
catch (Exception)
{
await _db.Ado.RollbackTranAsync();
throw;
} }
} }
} }