1
This commit is contained in:
@@ -51,8 +51,9 @@ namespace Tnb.WarehouseMgr
|
||||
IUserManager userManager,
|
||||
IBillRullService billRullService,
|
||||
IWareHouseService wareHouseService,
|
||||
IPrdInstockService prdInstockService
|
||||
)
|
||||
IPrdInstockService prdInstockService,
|
||||
ITaskMessageNotify taskMessageNotify
|
||||
) : base(taskMessageNotify.Writer)
|
||||
{
|
||||
_db = repository.AsSugarClient();
|
||||
_dictionaryDataService = dictionaryDataService;
|
||||
@@ -70,11 +71,11 @@ namespace Tnb.WarehouseMgr
|
||||
public async Task<dynamic> GetInStockDetailsListById([FromRoute] string billId)
|
||||
{
|
||||
var dic = await _dictionaryDataService.GetDictionaryByTypeId(WmsWareHouseConst.WMS_INSTOCK_D_BILL_STATUS_TYPEID);
|
||||
var items = await _db.Queryable<WmsInstockD>().LeftJoin<BasWarehouse>((a,b)=>a.warehouse_id == b.id)
|
||||
var items = await _db.Queryable<WmsInstockD>().LeftJoin<BasWarehouse>((a, b) => a.warehouse_id == b.id)
|
||||
.Select((a, b) => new WmsInstockD
|
||||
{
|
||||
warehouse_name = b.whname
|
||||
},true)
|
||||
}, true)
|
||||
.Where(a => a.bill_id == billId).ToListAsync();
|
||||
_db.ThenMapper(items,
|
||||
it => it.line_status = dic.ContainsKey(it.line_status) ? dic[it.line_status]?.ToString()! : "");
|
||||
@@ -287,7 +288,7 @@ namespace Tnb.WarehouseMgr
|
||||
if (!isMatch) throw new AppFriendlyException("库位与载具规格不匹配", 500);
|
||||
|
||||
loc = await _db.Queryable<BasLocation>().FirstAsync(it => it.location_code == input.instock.location_code && it.is_type != EnumLocationType.存储库位.ToString());
|
||||
|
||||
|
||||
//如果数据不全或有误,
|
||||
if (carry.IsNull() || loc.IsNull() || instockds?.Count < 1 || instockcodes?.Count < 1)
|
||||
{
|
||||
@@ -343,7 +344,7 @@ namespace Tnb.WarehouseMgr
|
||||
await _db.Insertable(instockCOdes).CallEntityMethod(it => it.Create(orgId)).ExecuteCommandAsync();
|
||||
|
||||
//生成预任务申请
|
||||
|
||||
|
||||
if (sPoint != null && ePoint != null)
|
||||
{
|
||||
var points = await _wareHouseService.PathAlgorithms(sPoint.id, ePoint.id);
|
||||
@@ -474,6 +475,10 @@ namespace Tnb.WarehouseMgr
|
||||
await _db.Ado.RollbackTranAsync();
|
||||
//return await ToApiResult(JNPF.Common.Enums.HttpStatusCode.InternalServerError, ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
await Publish(nameof(IWareHouseService.GenTaskExecute));
|
||||
}
|
||||
return isSuccessFul;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user