采购入库仓库修改

This commit is contained in:
2024-08-19 16:24:40 +08:00
parent e824409036
commit 509a51cc80
2 changed files with 13 additions and 1 deletions

View File

@@ -44,6 +44,16 @@ public partial class WmsErpWarehouserelaH : BaseEntity<string>
/// </summary>
public string? erp_warehousecode { get; set; }
/// <summary>
/// erp仓库id
/// </summary>
public string? erp_warehouseid { get; set; }
/// <summary>
/// erp仓库vid
/// </summary>
public string? erp_warehousevid { get; set; }
/// <summary>
/// wms仓库编码
/// </summary>

View File

@@ -340,6 +340,7 @@ namespace Tnb.WarehouseMgr
.Where((x, y) => x.EnCode == DictConst.MeasurementUnit && unitCodes.Contains(y.EnCode))
.Select((x, y) => y)
.ToListAsync();
List<WmsErpWarehouserelaH> erpWarehouserelaHs = await _db.Queryable<WmsErpWarehouserelaH>().Where(x=>x.id!=null).ToListAsync();
DictionaryDataEntity tranType = await _db.Queryable<DictionaryDataEntity>().Where(x=>x.DictionaryTypeId=="25043925951909" && x.EnCode==wmsPurchaseH.transaction_type).FirstAsync();
string tranTypeId = tranType?.Id ?? "";
@@ -371,7 +372,8 @@ namespace Tnb.WarehouseMgr
erpRequestData.Add("ctrantypeid", erpExtendFields.Find(x => x.table_id == tranTypeId)?.transaction_type_id ?? "");
erpRequestData.Add("cvendorid", erpExtendFields.Find(x => x.table_id == supplierId)?.supplier_id ?? "");
erpRequestData.Add("cvendorvid", erpExtendFields.Find(x => x.table_id == supplierId)?.supplier_vid ?? "");
erpRequestData.Add("cwarehouseid", erpExtendFields.Find(x => x.table_id == instock.warehouse_id)?.cotherwhid ?? "");//类型视图里取
// erpRequestData.Add("cwarehouseid", erpExtendFields.Find(x => x.table_id == instock.warehouse_id)?.cotherwhid ?? "");//类型视图里取
erpRequestData.Add("cwarehouseid", erpWarehouserelaHs.Find(x => x.erp_warehousecode == wmsPurchaseD.erp_wh_type)?.erp_warehouseid ?? "");//类型视图里取
erpRequestData.Add("dbilldate", nowStr);
erpRequestData.Add("dmakedate", nowStr);
erpRequestData.Add("fbillflag", 2);