现在问题处理

This commit is contained in:
2024-09-14 11:58:14 +08:00
parent 2511e4f099
commit 7d44c723e4
24 changed files with 677 additions and 369 deletions

View File

@@ -116,7 +116,7 @@ namespace Tnb.WarehouseMgr
string wmsPurchaseOrderHId = wmsPurchaseH?.erp_bill_code ?? "";
WmsPurchaseOrderH wmsPurchaseOrderH = await _db.Queryable<WmsPurchaseOrderH>().SingleAsync(x => x.id == wmsPurchaseOrderHId);
WmsPurchaseOrderD wmsPurchaseOrderDs = await _db.Queryable<WmsPurchaseOrderD>().FirstAsync(x => x.fk_wms_purchase_order_id == wmsPurchaseOrderHId);
BasWarehouse basWarehouse = await _db.Queryable<BasWarehouse>().SingleAsync(x=>x.id==instock.warehouse_id);
//BasWarehouse basWarehouse = await _db.Queryable<BasWarehouse>().SingleAsync(x=>x.id==instock.warehouse_id);
List<String> materialIds = allInstockDetails.Select(x => x.material_id).Distinct().ToList();
List<String> unitCodes = allInstockDetails.Select(x => x.unit_id).Distinct().ToList();
@@ -134,6 +134,7 @@ namespace Tnb.WarehouseMgr
tableIds.Add(_userManager.UserId);
tableIds.Add(WmsWareHouseConst.AdministratorOrgId);
tableIds.Add(instock.warehouse_id);
tableIds.Add("1001A11000000002OOGU");
tableIds.AddRange(materialIds);
tableIds.Add(supplierId);
tableIds.Add(tranTypeId);
@@ -177,9 +178,10 @@ namespace Tnb.WarehouseMgr
["castunitid"] = erpExtendFields.Find(x => x.table_id == (unitDatas.Find(x => x.EnCode == item.unit_id)?.Id ?? ""))?.cunitid ?? "",
["cbodytranstypecode"] = erpExtendFields.Find(x => x.table_id == tranTypeId)?.transaction_type_id ?? "",
// ["cbodywarehouseid"] = erpExtendFields.Find(x => x.table_id == instock.warehouse_id)?.cotherwhid ?? "",
["cbodywarehouseid"] = erpWarehouserelaHs.Find(x => x.erp_warehousecode == basWarehouse.whcode)?.erp_warehouseid ?? "",
["cgeneralbid"] = "",
["cgeneralhid"] = "",
//["cbodywarehouseid"] = erpWarehouserelaHs.Find(x => x.erp_warehousecode == basWarehouse.whcode)?.erp_warehouseid ?? "",
["cbodywarehouseid"] = "1001A11000000002OOGU",
["cgeneralbid"] = null,
["cgeneralhid"] = null,
["cmaterialoid"] = erpExtendFields.Find(x => x.table_id == item.material_id)?.cmaterialoid ?? "",
["cmaterialvid"] = erpExtendFields.Find(x => x.table_id == item.material_id)?.cmaterialvid ?? "",
["corpoid"] = erpOrg.corpoid,
@@ -192,7 +194,7 @@ namespace Tnb.WarehouseMgr
["nnum"] = item.qty,
["nshouldnum"] = item.pr_qty,
// ["pk_creqwareid"] = erpExtendFields.Find(x => x.table_id == instock.warehouse_id)?.cotherwhid ?? "",
["pk_creqwareid"] = erpWarehouserelaHs.Find(x => x.erp_warehousecode == basWarehouse.whcode)?.erp_warehouseid ?? "",
["pk_creqwareid"] = "1001A11000000002OOGU",
["pk_group"] = erpOrg.pk_group,
["pk_org"] = erpOrg.pk_org,
["pk_org_v"] = erpOrg.pk_org_v,