下升降机扫码优化 八工位入库优化 库存报表
This commit is contained in:
@@ -16,6 +16,7 @@ using Newtonsoft.Json;
|
||||
using Npgsql;
|
||||
using Senparc.Weixin.MP.AdvancedAPIs.Card;
|
||||
using SqlSugar;
|
||||
using Tnb.BasicData.Entities;
|
||||
using Tnb.WarehouseMgr.Entities;
|
||||
using Tnb.WarehouseMgr.Entities.Consts;
|
||||
using Tnb.WarehouseMgr.Entities.Dto;
|
||||
@@ -145,7 +146,6 @@ namespace Tnb.WarehouseMgr
|
||||
[HttpPost]
|
||||
public async Task<dynamic> GetInfoByCode(string code)
|
||||
{
|
||||
|
||||
var data = await _db.Queryable<WmsTempCode>().Where(p => p.barcode == code).FirstAsync();
|
||||
if (data == null)
|
||||
throw new AppFriendlyException("没有条码信息", 500);
|
||||
@@ -169,6 +169,11 @@ namespace Tnb.WarehouseMgr
|
||||
{
|
||||
throw new Exception($"托盘{input.carrycode}不存在!");
|
||||
}
|
||||
BasLocation carrryLoc = await _db.Queryable<BasLocation>().Where(r => r.id == carry.location_id).FirstAsync();
|
||||
if (carrryLoc != null && carrryLoc.is_type == "0")
|
||||
{
|
||||
throw new Exception($"托盘{carry.carry_code}在存储库位中,不能绑定!");
|
||||
}
|
||||
|
||||
var _WmsCarryCode = _db.Queryable<WmsCarryCode>().Where(it => it.carry_id == carry.id).OrderByDescending(it => it.id).First();
|
||||
if (_WmsCarryCode != null)
|
||||
@@ -230,7 +235,13 @@ namespace Tnb.WarehouseMgr
|
||||
db = dbConn;
|
||||
try
|
||||
{
|
||||
|
||||
WmsCarryH? carry = await db.Queryable<WmsCarryH>().SingleAsync(it => it.carry_code == input.carrycode);
|
||||
if (carry == null)
|
||||
{
|
||||
throw new Exception($"托盘{carry.carry_code}不存在!");
|
||||
}
|
||||
|
||||
List<WmsCarryCode> WmsCarryCodes = new List<WmsCarryCode>();
|
||||
foreach (var detail in input.details)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user