设置货物状态修改

usertest
cjy 3 months ago
parent 029a64e18e
commit 4efe898c50

@ -875,13 +875,9 @@ namespace DS.WMS.Core.Op.Method
/// <param name="code"></param> /// <param name="code"></param>
/// <param name="bookingId"></param> /// <param name="bookingId"></param>
/// <returns></returns> /// <returns></returns>
public async Task SetGoodsStatus(string code, long bookingId,SqlSugarScopeProvider tenantDb) public async Task SetGoodsStatus(string code, long bookingId, SqlSugarScopeProvider tenantDb)
{ {
//var tenantDb = saasService.GetBizDbScopeById(user.TenantId); var gsCfg = tenantDb.Queryable<BookingGoodsStatusConfig>().First(x => x.SystemCode == code);
var CreatedUserId = tenantDb.Queryable<SeaExport>().Filter(null, true).Where(x => x.Id == bookingId).Select(x => x.CreateBy).First();
if (CreatedUserId != null)
{
var gsCfg = tenantDb.Queryable<BookingGoodsStatusConfig>().First(x => x.SystemCode == code && x.CreateBy == (long)CreatedUserId);
if (gsCfg != null) if (gsCfg != null)
{ {
_logger.Info($"检查{code}货物状态:{bookingId}"); _logger.Info($"检查{code}货物状态:{bookingId}");
@ -905,7 +901,6 @@ namespace DS.WMS.Core.Op.Method
} }
} }
} }
}
/// <summary> /// <summary>
/// 更新主单货物状态 /// 更新主单货物状态
@ -917,10 +912,9 @@ namespace DS.WMS.Core.Op.Method
//var tenantDb = saasService.GetBizDbScopeById(user.TenantId); //var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var order = tenantDb.Queryable<SeaExport>().Filter(null, true).First(x => x.Id == bookingId); var order = tenantDb.Queryable<SeaExport>().Filter(null, true).First(x => x.Id == bookingId);
var createUserid = order.CreateBy;
//获取当前用户已经录入的货物状态 //获取当前用户已经录入的货物状态
var list = await tenantDb.Queryable<BookingGoodsStatus>().LeftJoin(tenantDb.Queryable<BookingGoodsStatusConfig>(), var list = await tenantDb.Queryable<BookingGoodsStatus>().LeftJoin(tenantDb.Queryable<BookingGoodsStatusConfig>(),
(goods, config) => config.Id == goods.ConfigId).Where((goods, config) => config.CreateBy == createUserid && goods.BusinessId == bookingId). (goods, config) => config.Id == goods.ConfigId).Where((goods, config) => goods.BusinessId == bookingId).
OrderBy((goods, config) => config.OrderNo). OrderBy((goods, config) => config.OrderNo).
Select((goods, config) => new Select((goods, config) => new
{ {

Loading…
Cancel
Save