erp接口制单人指定1001A1100000002QG0WU

This commit is contained in:
2024-09-20 16:38:08 +08:00
parent adc18cebd6
commit 6169963db8
11 changed files with 34 additions and 27 deletions

View File

@@ -180,7 +180,8 @@ namespace Tnb.WarehouseMgr
string userId = _userManager.UserId ?? WmsWareHouseConst.AdministratorUserId;
ids.Add(userId);
List<ErpExtendField> erpExtendFields = await _db.Queryable<ErpExtendField>().Where(x=>ids.Contains(x.table_id)).ToListAsync();
string erpCreateId = erpExtendFields.Find(x=>x.table_id==userId)?.user_id ?? WmsWareHouseConst.ERPUSERID;
// string erpCreateId = erpExtendFields.Find(x=>x.table_id==userId)?.user_id ?? WmsWareHouseConst.ERPUSERID;
string erpCreateId = WmsWareHouseConst.ERPUSERID;
ErpExtendField erpOrg = erpExtendFields.Find(x => x.table_id == (WmsWareHouseConst.AdministratorOrgId));
string nowStr = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
@@ -279,6 +280,7 @@ namespace Tnb.WarehouseMgr
thirdWebapiRecord.url = WmsWareHouseConst.BIP_DOMAIN+"uapws/rest/purarrvial/save";
thirdWebapiRecord.request_data = JsonConvert.SerializeObject(erpRequestData);
thirdWebapiRecord.create_time = DateTime.Now;
thirdWebapiRecord.remark = $"erp采购订单:{wmsPurchaseOrderH.erp_bill_code}";
await _db.Insertable(thirdWebapiRecord).ExecuteCommandAsync();
}