This commit is contained in:
2024-07-17 14:58:41 +08:00
6 changed files with 172 additions and 21 deletions

View File

@@ -829,7 +829,6 @@ namespace Tnb.WarehouseMgr
ids.Add(wmsMaterialTransfer.warehouse_instock);
ids.Add(wmsMaterialTransferd.material_id);
ids.Add(unitData.Id);
List<ErpExtendField> erpExtendFields = await _db.Queryable<ErpExtendField>().Where(x=>ids.Contains(x.table_id)).ToListAsync();
ErpExtendField erpOrg = erpExtendFields.Find(x => x.table_id == (wmsMaterialTransfer.org_id ?? WmsWareHouseConst.AdministratorOrgId));
@@ -837,13 +836,13 @@ namespace Tnb.WarehouseMgr
List<Dictionary<string, object>> requestData = new List<Dictionary<string, object>>();
Dictionary<string, object> erpRequestData = new Dictionary<string, object>();
string nowStr = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss");
string nowStr = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
erpRequestData.Add("billmaker",erpCreateId);
erpRequestData.Add("cdptid","1001A1100000000JRLI1A100");// 先写死
erpRequestData.Add("cdptvid","0001A11000000007GGO8");// 先写死
erpRequestData.Add("corpoid",erpOrg.corpoid);
erpRequestData.Add("corpvid",erpOrg.corpoid);
erpRequestData.Add("cothercalbodyoid",erpOrg.cdptid);
erpRequestData.Add("cothercalbodyoid",erpOrg.pk_org);
erpRequestData.Add("cotherwhid",erpExtendFields.Find(x=>x.table_id==wmsMaterialTransfer.warehouse_instock)?.cotherwhid ?? "");
erpRequestData.Add("creationtime",nowStr);
erpRequestData.Add("creator",erpCreateId);
@@ -867,8 +866,8 @@ namespace Tnb.WarehouseMgr
["corpoid"] = erpOrg.corpoid,
["corpvid"] = erpOrg.corpvid,
["crowno"] = (dList.FindIndex(x=>x.id==wmsMaterialTransferd.id)+1) * 10,
["csourcebillbid"] = wmsMaterialTransferd.id,
["csourcebillhid"] = wmsMaterialTransferd.bill_id,
["csourcebillbid"] = wmsMaterialTransferd.erp_line_pk ?? "",
["csourcebillhid"] = wmsMaterialTransfer.erp_pk ?? "",
["cunitid"] = erpExtendFields.Find(x=>x.table_id==unitData.Id)?.cunitid ?? "",
["cvendorid"] = "",
["cvendorvid"] = "",