增加接口输入限制

This commit is contained in:
FanLian
2023-07-10 10:20:30 +08:00
parent 3f351cf23f
commit d662984b38
6 changed files with 34 additions and 27 deletions

View File

@@ -222,26 +222,27 @@ namespace Tnb.WarehouseMgr
[HttpPost]
public async Task<dynamic> MESEmptyCarryOutStk(MESEmptyCarryOutStkInput input)
{
if (input.IsNull()) throw new ArgumentNullException("input");
try
{
var location = await _db.Queryable<BasLocation>().SingleAsync(it => it.location_code == input.location_code);
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);
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;
VisualDevModelDataCrInput visualDevModelDataCrInput = new VisualDevModelDataCrInput
{
data = dic,
};
await PDAWmsEmptyOut(visualDevModelDataCrInput);
VisualDevModelDataCrInput visualDevModelDataCrInput = new VisualDevModelDataCrInput
{
data = dic,
};
await PDAWmsEmptyOut(visualDevModelDataCrInput);
}
catch (Exception ex)
{