注释和报错

This commit is contained in:
FanLian
2023-07-18 09:10:57 +08:00
parent c92dbc3397
commit 919af3542c
6 changed files with 103 additions and 89 deletions

View File

@@ -58,12 +58,12 @@ namespace Tnb.WarehouseMgr
_wareHouseService = wareHouseService;
_userManager = userManager;
_billRullService = billRullService;
OverideFuncs.CreateAsync = PDAWmsEmptyOut;
OverideFuncs.CreateAsync = WmsEmptyOut;
}
private async Task<dynamic> PDAWmsEmptyOut(VisualDevModelDataCrInput input)
private async Task<dynamic> WmsEmptyOut(VisualDevModelDataCrInput input)
{
try
@@ -226,24 +226,26 @@ namespace Tnb.WarehouseMgr
if (input.IsNull()) throw new ArgumentNullException("input");
try
{
var location = await _db.Queryable<BasLocation>().SingleAsync(it => it.location_code == input.location_code && it.is_type != EnumLocationType..ToString());
var dic = new Dictionary<string, object>();
dic[nameof(WmsEmptyOutstockH.id)] = SnowflakeIdHelper.NextId();
dic[nameof(WmsEmptyOutstockH.org_id)] = input.org_id;
dic[nameof(WmsEmptyOutstockH.location_id)] = location.id;
dic[nameof(WmsEmptyOutstockH.carrystd_id)] = input.carrystd_id;
dic[nameof(WmsEmptyOutstockH.bill_code)] = _billRullService.GetBillNumber(WmsWareHouseConst.WMS_EMPTYOUTSTK_ENCODE).GetAwaiter().GetResult();
dic[nameof(WmsEmptyOutstockH.status)] = WmsWareHouseConst.BILLSTATUS_ADD_ID;
dic[nameof(WmsEmptyOutstockH.qty)] = input.qty;
dic[nameof(WmsEmptyOutstockH.biz_type)] = WmsWareHouseConst.BIZTYPE_WMSEPTYOUTSTK_ID;
dic[nameof(WmsEmptyOutstockH.create_id)] = input.create_id;
dic[nameof(WmsEmptyOutstockH.create_time)] = DateTime.Now;
var location = await _db.Queryable<BasLocation>().SingleAsync(it => it.location_code == input.location_code && it.is_type != EnumLocationType..ToString()) ?? throw new AppFriendlyException("无此库位或为存储库位",500);
Dictionary<string, object> dic = new()
{
[nameof(WmsEmptyOutstockH.id)] = SnowflakeIdHelper.NextId(),
[nameof(WmsEmptyOutstockH.org_id)] = input.org_id,
[nameof(WmsEmptyOutstockH.location_id)] = location.id,
[nameof(WmsEmptyOutstockH.carrystd_id)] = input.carrystd_id,
[nameof(WmsEmptyOutstockH.bill_code)] = _billRullService.GetBillNumber(WmsWareHouseConst.WMS_EMPTYOUTSTK_ENCODE).GetAwaiter().GetResult(),
[nameof(WmsEmptyOutstockH.status)] = WmsWareHouseConst.BILLSTATUS_ADD_ID,
[nameof(WmsEmptyOutstockH.qty)] = input.qty,
[nameof(WmsEmptyOutstockH.biz_type)] = WmsWareHouseConst.BIZTYPE_WMSEPTYOUTSTK_ID,
[nameof(WmsEmptyOutstockH.create_id)] = input.create_id,
[nameof(WmsEmptyOutstockH.create_time)] = DateTime.Now
};
VisualDevModelDataCrInput visualDevModelDataCrInput = new VisualDevModelDataCrInput
{
data = dic,
};
await PDAWmsEmptyOut(visualDevModelDataCrInput);
await WmsEmptyOut(visualDevModelDataCrInput);
}
catch (Exception ex)
{