调拨出库

This commit is contained in:
2024-08-26 14:26:08 +08:00
parent 94c22b8888
commit f56c0ed321
7 changed files with 114 additions and 123 deletions

View File

@@ -98,10 +98,14 @@ namespace Tnb.WarehouseMgr
.ToListAsync();
List<WmsErpWarehouserelaH> erpWarehouserelaHs = await _db.Queryable<WmsErpWarehouserelaH>().Where(x=>x.id!=null).ToListAsync();
BasWarehouse basWarehouse = await _db.Queryable<BasWarehouse>().SingleAsync(x=>x.id==instock.warehouse_id);
string userAccount = wmsRawmatTransferinstockH?.biller ?? "";
string deptCode = wmsRawmatTransferinstockH?.dept_code ?? "";
UserEntity userEntity = await _db.Queryable<UserEntity>().Where(x=>x.Account==userAccount).FirstAsync();
string userId = userEntity?.Id ?? "";
string supplierId = WmsWareHouseConst.TIANYIGONGYINGSHANG_ID;
List<string> tableIds = new List<string>();
tableIds.Add(_userManager.UserId);
tableIds.Add(userId);
tableIds.Add(WmsWareHouseConst.AdministratorOrgId);
tableIds.Add(instock.warehouse_id);
tableIds.AddRange(materialIds);
@@ -109,10 +113,6 @@ namespace Tnb.WarehouseMgr
tableIds.AddRange(unitDatas.Select(x => x.Id).ToList());
List<ErpExtendField> erpExtendFields = await _db.Queryable<ErpExtendField>().Where(x => tableIds.Contains(x.table_id)).ToListAsync();
string userAccount = wmsRawmatTransferinstockH?.biller ?? "";
string deptCode = wmsRawmatTransferinstockH?.dept_code ?? "";
UserEntity userEntity = await _db.Queryable<UserEntity>().Where(x=>x.Account==userAccount).FirstAsync();
string userId = userEntity?.Id ?? "";
string erpCreateId = erpExtendFields.Find(x => x.table_id == userId)?.user_id ?? "";
ErpExtendField erpOrg = erpExtendFields.Find(x => x.table_id == (WmsWareHouseConst.AdministratorOrgId));
string nowStr = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");