1
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
using JNPF.Common.Const;
|
||||
using JNPF;
|
||||
using JNPF.Common.Contracts;
|
||||
using JNPF.Common.Security;
|
||||
using SqlSugar;
|
||||
@@ -164,4 +166,13 @@ public partial class WmsInstockCode : BaseEntity<string>
|
||||
/// </summary>
|
||||
public string? mo_bom_detail_id { get; set; }
|
||||
|
||||
public void Create()
|
||||
{
|
||||
var orgId = App.User?.FindFirst(ClaimConst.CLAINMORGID)?.Value;
|
||||
if (!string.IsNullOrEmpty(orgId))
|
||||
{
|
||||
this.org_id = orgId;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -46,10 +46,10 @@ namespace Tnb.WarehouseMgr
|
||||
|
||||
private async Task<dynamic> WmsPDAFeeding(VisualDevModelDataCrInput input)
|
||||
{
|
||||
|
||||
var isOk = false;
|
||||
try
|
||||
{
|
||||
var isOk = false;
|
||||
|
||||
await _db.Ado.BeginTranAsync();
|
||||
var carryId = input.data.ContainsKey("carry_id") ? input.data["carry_id"]?.ToString() : "";
|
||||
var feedBoxCode = input.data.ContainsKey("feedbox_code") ? input.data["feedbox_code"]?.ToString() : "";
|
||||
@@ -117,7 +117,7 @@ namespace Tnb.WarehouseMgr
|
||||
await _db.Ado.RollbackTranAsync();
|
||||
throw;
|
||||
}
|
||||
|
||||
return isOk;
|
||||
}
|
||||
|
||||
public async Task<int> UpdateNullCarry(WmsCarryH carryObj)
|
||||
|
||||
@@ -214,7 +214,7 @@ namespace Tnb.WarehouseMgr
|
||||
|
||||
|
||||
var items = instockDetails.Adapt<List<WmsInstockCode>>();
|
||||
items.ForEach(it => it.org_id = _userManager.User.OrganizeId);
|
||||
//items.ForEach(it => it.org_id = _userManager.User.OrganizeId);
|
||||
List<WmsInstockCode> instockCOdes = new();
|
||||
jArr = JArray.Parse(input.data["tablefield115"].ToString()!);
|
||||
if (jArr?.Children().Count() > 0)
|
||||
@@ -234,7 +234,7 @@ namespace Tnb.WarehouseMgr
|
||||
}
|
||||
}
|
||||
await _db.Insertable(carryCodes).ExecuteCommandAsync();
|
||||
await _db.Insertable(instockCOdes).ExecuteCommandAsync();
|
||||
await _db.Insertable(instockCOdes).CallEntityMethod(it => it.Create()).ExecuteCommandAsync();
|
||||
await _wareHouseService.GenInStockTaskHandleAfter(preTaskUpInput,
|
||||
it => new WmsCarryH { carry_code = input.data[nameof(WmsCarryH.carry_code)].ToString()!, is_lock = 1, status = (int)EnumCarryStatus.占用, location_id = preTaskUpInput.CarryStartLocationId, location_code = preTaskUpInput.CarryStartLocationCode },
|
||||
it => new BasLocation { is_lock = 1, is_use = "1" });
|
||||
|
||||
@@ -51,4 +51,8 @@ public class ClaimConst
|
||||
/// 登录类型用于区分Pc或Pda端
|
||||
/// </summary>
|
||||
public const string LOGINTYPE = "LoginType";
|
||||
/// <summary>
|
||||
/// 组织ID
|
||||
/// </summary>
|
||||
public const string CLAINMORGID = "OrgId";
|
||||
}
|
||||
@@ -16,4 +16,6 @@ public class BaseEntity<TKey> : IEntity where TKey : IEquatable<TKey>
|
||||
[SugarColumn(ColumnName = "id", ColumnDescription = "主键", IsPrimaryKey = true)]
|
||||
public TKey id { get; set; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -591,6 +591,7 @@ public class OAuthService : IDynamicApiController, ITransient
|
||||
{ ClaimConst.CLAINMUSERID, userAnyPwd.Id },
|
||||
{ ClaimConst.CLAINMACCOUNT, userAnyPwd.Account },
|
||||
{ ClaimConst.CLAINMREALNAME, userAnyPwd.RealName },
|
||||
{ ClaimConst.CLAINMORGID, userAnyPwd.OrganizeId },
|
||||
{ ClaimConst.CLAINMADMINISTRATOR, userAnyPwd.IsAdministrator },
|
||||
{ ClaimConst.TENANTID, options.ConfigId },
|
||||
{ ClaimConst.CONNECTIONCONFIG, options},
|
||||
|
||||
Reference in New Issue
Block a user