出库签收输入参数删除,serviceModule属性
This commit is contained in:
@@ -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; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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() });
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user