This commit is contained in:
2024-09-20 18:10:18 +08:00

View File

@@ -399,6 +399,9 @@ namespace Tnb.WarehouseMgr
List<Dictionary<string, object>> erpRequestDataDetails = new List<Dictionary<string, object>>();
foreach(var item in wmsMaterialSignDs)
{
WmsCarryCode wmsCarryCode = await _db.Queryable<WmsCarryCode>().Where(x=>x.barcode==item.barcode).FirstAsync();
string gysid = wmsCarryCode?.auxprop_gys ?? "";
ErpExtendField supplier = await _db.Queryable<ErpExtendField>().Where(x=>x.supplier_id==gysid).FirstAsync();
// 出库数量wmsMaterialSignD.sign_qty
erpRequestDataDetails.Add(new Dictionary<string, object>()
{
@@ -414,8 +417,8 @@ namespace Tnb.WarehouseMgr
["vsourcebillcode"] = wmsTransferOrderH?.erp_bill_code ?? "",
["vsourcerowno"] = wmsRawmatTransferoutstockD?.lineno ?? "",
["cunitid"] = erpExtendFields.Find(x => x.table_id == wmsRawmatTransferoutstockD.unit_id)?.cunitid ?? "",
["cvendorid"] = erpExtendFields.Find(x => x.table_id == supplierId)?.supplier_id ?? "",
["cvendorvid"] = erpExtendFields.Find(x => x.table_id == supplierId)?.supplier_vid ?? "",
["cvendorid"] = gysid,
["cvendorvid"] = supplier?.supplier_vid ?? gysid,
["dbizdate"] = wmsTransferOrderH.create_time.Value.ToString("yyyy-MM-dd HH:mm:ss"),
["dplanarrivedate"] = nowStr,
["dplanoutdate"] = nowStr,
@@ -425,7 +428,7 @@ namespace Tnb.WarehouseMgr
["pk_org"] = erpOrg.pk_org,
["pk_org_v"] = erpOrg.pk_org_v,
["vbatchcode"] = item.code_batch,
["vfree1"] = item.code_batch,
["vfree1"] = wmsCarryCode?.auxprop_xph,
});
}
erpRequestData.Add("dtls", erpRequestDataDetails);
@@ -437,7 +440,7 @@ namespace Tnb.WarehouseMgr
thirdWebapiRecord.name = "调拨出库";
thirdWebapiRecord.method = "POST";
//thirdWebapiRecord.url = config.value + "uapws/rest/transOut/save";
thirdWebapiRecord.url = WmsWareHouseConst.BIP_DOMAIN + "/uapws/rest/transOut/save";
thirdWebapiRecord.url = WmsWareHouseConst.BIP_DOMAIN + "uapws/rest/transOut/save";
thirdWebapiRecord.request_data = JsonConvert.SerializeObject(requestData);
thirdWebapiRecord.create_time = DateTime.Now;
thirdWebapiRecord.remark = $"原材料调拨出库wms_rawmat_transferoutstock_h:{wmsRawmatTransferoutstockH.bill_code}";