This commit is contained in:
alex
2023-07-10 13:35:01 +08:00
6 changed files with 34 additions and 27 deletions

View File

@@ -5,6 +5,8 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Aop.Api.Domain; using Aop.Api.Domain;
using JNPF.Common.Extension;
using JNPF.FriendlyException;
using Mapster; using Mapster;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using SqlSugar; using SqlSugar;
@@ -32,6 +34,7 @@ namespace Tnb.WarehouseMgr
[HttpPost] [HttpPost]
public async Task<dynamic> MESCarryQuery(MESCarryQueryInput input) public async Task<dynamic> MESCarryQuery(MESCarryQueryInput input)
{ {
if (input.IsNull()) throw new ArgumentNullException("input");
var results = new List<CarryQueryOutput>(); var results = new List<CarryQueryOutput>();
try try
{ {
@@ -58,6 +61,7 @@ namespace Tnb.WarehouseMgr
[HttpPost] [HttpPost]
public async Task<dynamic> MESCarryQueryResult(MESCarryQueryResultInput input) public async Task<dynamic> MESCarryQueryResult(MESCarryQueryResultInput input)
{ {
if (input.IsNull()) throw new ArgumentNullException("input");
var result = new CarryQueryOutput(); var result = new CarryQueryOutput();
try try
{ {

View File

@@ -90,6 +90,7 @@ namespace Tnb.WarehouseMgr
[HttpPost] [HttpPost]
public async Task<dynamic> MESCollocationSchemeQuery(MESCollocationSchemeQueryInput input) public async Task<dynamic> MESCollocationSchemeQuery(MESCollocationSchemeQueryInput input)
{ {
if (input.IsNull()) throw new ArgumentNullException("input");
var results = new List<CollocationSchemeOutput>(); var results = new List<CollocationSchemeOutput>();
try try
{ {

View File

@@ -171,6 +171,7 @@ namespace Tnb.WarehouseMgr
[HttpPost] [HttpPost]
public async Task<dynamic> MesEmptyCarryInStock(MESEmptyCarryInStockInput input) public async Task<dynamic> MesEmptyCarryInStock(MESEmptyCarryInStockInput input)
{ {
if(input.IsNull())throw new ArgumentNullException("input");
try try
{ {
var carry = await _db.Queryable<WmsCarryH>().SingleAsync(it => it.carry_code == input.carry_code); var carry = await _db.Queryable<WmsCarryH>().SingleAsync(it => it.carry_code == input.carry_code);
@@ -201,8 +202,6 @@ namespace Tnb.WarehouseMgr
data = dic data = dic
}; };
await WmsEmptyIn(visualDevModelDataCrInput); await WmsEmptyIn(visualDevModelDataCrInput);
}
} }
catch (Exception ex) catch (Exception ex)
{ {

View File

@@ -222,6 +222,7 @@ namespace Tnb.WarehouseMgr
[HttpPost] [HttpPost]
public async Task<dynamic> MESEmptyCarryOutStk(MESEmptyCarryOutStkInput input) public async Task<dynamic> MESEmptyCarryOutStk(MESEmptyCarryOutStkInput input)
{ {
if (input.IsNull()) throw new ArgumentNullException("input");
try try
{ {
var location = await _db.Queryable<BasLocation>().SingleAsync(it => it.location_code == input.location_code); var location = await _db.Queryable<BasLocation>().SingleAsync(it => it.location_code == input.location_code);

View File

@@ -121,6 +121,7 @@ namespace Tnb.WarehouseMgr
[HttpPost] [HttpPost]
public async Task MESCarrySign(MESCarrySignInput input) public async Task MESCarrySign(MESCarrySignInput input)
{ {
if (input.IsNull()) throw new ArgumentNullException("input");
var signInput = input.Adapt<SignForDeliveryInput>(); var signInput = input.Adapt<SignForDeliveryInput>();
await SignForDelivery(signInput); await SignForDelivery(signInput);
} }

View File

@@ -54,6 +54,7 @@ namespace Tnb.WarehouseMgr
[HttpPost] [HttpPost]
public async Task KittingOutByAdd() public async Task KittingOutByAdd()
{ {
if (input.IsNull()) throw new ArgumentNullException("input");
try try
{ {
await _db.Ado.BeginTranAsync(); await _db.Ado.BeginTranAsync();