bip委外回传

This commit is contained in:
2024-10-17 14:25:53 +08:00
parent 5e572577c7
commit 9d74b03416

View File

@@ -344,7 +344,7 @@ namespace Tnb.WarehouseMgr
erpRequestDataDetails.Add(new Dictionary<string, object>() erpRequestDataDetails.Add(new Dictionary<string, object>()
{ {
["castunitid"] = erpExtendFields.Find(x => x.table_id == (unitDatas.Find(x => x.EnCode == item.unit_id || x.Id == item.unit_id)?.Id ?? ""))?.cunitid, ["castunitid"] = erpExtendFields.Find(x => x.table_id == (unitDatas.Find(x => x.EnCode == item.unit || x.Id == item.unit)?.Id ?? ""))?.cunitid,
["cfirstbid"] = wmsOutsourceOrderH?.erp_pk, ["cfirstbid"] = wmsOutsourceOrderH?.erp_pk,
["cfirstid"] = item.erp_outsource_order_d_pk, ["cfirstid"] = item.erp_outsource_order_d_pk,
["cfirsttypecode"] = null, ["cfirsttypecode"] = null,
@@ -353,7 +353,7 @@ namespace Tnb.WarehouseMgr
["csendcountryid"] = "0001Z010000000079UJJ", ["csendcountryid"] = "0001Z010000000079UJJ",
["csourcetypecode"] = null, ["csourcetypecode"] = null,
["ctaxcountryid"] = "0001Z010000000079UJJ", ["ctaxcountryid"] = "0001Z010000000079UJJ",
["cunitid"] = erpExtendFields.Find(x => x.table_id == (unitDatas.Find(x => x.EnCode == item.unit_id || x.Id == item.unit_id)?.Id ?? ""))?.cunitid, ["cunitid"] = erpExtendFields.Find(x => x.table_id == (unitDatas.Find(x => x.EnCode == item.unit || x.Id == item.unit)?.Id ?? ""))?.cunitid,
["dbilldate"] = wmsOutsourceH.create_time.ToString("yyyy-MM-dd HH:mm:ss"), ["dbilldate"] = wmsOutsourceH.create_time.ToString("yyyy-MM-dd HH:mm:ss"),
["dplanreceivedate"] = wmsOutsourceH.create_time.ToString("yyyy-MM-dd HH:mm:ss"), ["dplanreceivedate"] = wmsOutsourceH.create_time.ToString("yyyy-MM-dd HH:mm:ss"),
["dproducedate"] = wmsOutsourceH.create_time.ToString("yyyy-MM-dd HH:mm:ss"), ["dproducedate"] = wmsOutsourceH.create_time.ToString("yyyy-MM-dd HH:mm:ss"),
@@ -383,7 +383,7 @@ namespace Tnb.WarehouseMgr
["pk_receivestore"] = item.erp_wh_type, ["pk_receivestore"] = item.erp_wh_type,
["pk_reqstoorg"] = erpOrg.pk_org, ["pk_reqstoorg"] = erpOrg.pk_org,
["pk_reqstoorg_v"] = erpOrg.pk_org_v, ["pk_reqstoorg_v"] = erpOrg.pk_org_v,
["pk_srcmaterial"] = erpExtendFields.Find(x => x.table_id == item.matcode_id)?.cmaterialoid, ["pk_srcmaterial"] = basMaterial == null ? null : erpExtendFields.Find(x => x.table_id == basMaterial.id)?.cmaterialoid,
["vbatchcode"] = item.code_batch, ["vbatchcode"] = item.code_batch,
["Vfree1"] = item.code_batch, ["Vfree1"] = item.code_batch,
["mes_detail_id"] = item.id, ["mes_detail_id"] = item.id,
@@ -395,7 +395,7 @@ namespace Tnb.WarehouseMgr
["csourcetypecode"] = null, ["csourcetypecode"] = null,
["vsourcerowno"] = null, ["vsourcerowno"] = null,
["vsourcetrantype"] = null, ["vsourcetrantype"] = null,
["cproductorid"] = item.production_unit, ["cproductorid"] = erpExtendFields.Find(x => x.table_id == (unitDatas.Find(x => x.EnCode == item.unit || x.Id == item.unit)?.Id ?? ""))?.cunitid,
}); });
} }
erpRequestData.Add("dtls", erpRequestDataDetails); erpRequestData.Add("dtls", erpRequestDataDetails);
@@ -407,8 +407,8 @@ namespace Tnb.WarehouseMgr
thirdWebapiRecord.third_name = WmsWareHouseConst.BIP; thirdWebapiRecord.third_name = WmsWareHouseConst.BIP;
thirdWebapiRecord.name = "委外到货"; thirdWebapiRecord.name = "委外到货";
thirdWebapiRecord.method = "POST"; thirdWebapiRecord.method = "POST";
// thirdWebapiRecord.url = config.value+"uapws/rest/purarrvial/save"; thirdWebapiRecord.url = config.value + "uapws/rest/purarrvial/save";
thirdWebapiRecord.url = WmsWareHouseConst.BIP_DOMAIN + "uapws/rest/purarrvial/save"; //thirdWebapiRecord.url = WmsWareHouseConst.BIP_DOMAIN + "uapws/rest/purarrvial/save";
thirdWebapiRecord.request_data = JsonConvert.SerializeObject(erpRequestData); thirdWebapiRecord.request_data = JsonConvert.SerializeObject(erpRequestData);
thirdWebapiRecord.create_time = DateTime.Now; thirdWebapiRecord.create_time = DateTime.Now;
thirdWebapiRecord.remark = $"【WmsOutsourceService Purchase】erp委外订单:{wmsOutsourceOrderH.erp_bill_code}"; thirdWebapiRecord.remark = $"【WmsOutsourceService Purchase】erp委外订单:{wmsOutsourceOrderH.erp_bill_code}";