This commit is contained in:
2024-08-30 17:33:06 +08:00
parent 285618ada9
commit c3eb35bfd2
3 changed files with 18 additions and 9 deletions

View File

@@ -347,8 +347,8 @@ namespace Tnb.WarehouseMgr
WmsPrdInstockD wmsPrdInstockD = await _db.Queryable<WmsPrdInstockD>().SingleAsync(x=>x.id==input.requireId);
WmsPrdInstockH instock = await _db.Queryable<WmsPrdInstockH>().SingleAsync(x=>x.id==wmsPrdInstockD.prd_instock_id);
BasWarehouse scWarehouse = await _db.Queryable<BasWarehouse>().SingleAsync(x=>x.id==wmsPrdInstockD.scwarehouse_id);
BasWarehouse kcWarehouse = await _db.Queryable<BasWarehouse>().SingleAsync(x=>x.id==wmsPrdInstockD.warehouse_id);
// BasWarehouse scWarehouse = await _db.Queryable<BasWarehouse>().SingleAsync(x=>x.id==wmsPrdInstockD.scwarehouse_id);
// BasWarehouse kcWarehouse = await _db.Queryable<BasWarehouse>().SingleAsync(x=>x.id==wmsPrdInstockD.warehouse_id);
PrdReport prdReport = await _db.Queryable<PrdReport>().SingleAsync(x => x.id == instock.prd_report_id);
List<WmsPrdInstockCode> allInstockDetails = await _db.Queryable<WmsPrdInstockCode>().Where(it => it.prd_instock_id == instock.id).ToListAsync();
@@ -386,8 +386,8 @@ namespace Tnb.WarehouseMgr
erpRequestData.Add("creationtime", nowStr);
erpRequestData.Add("creator", erpCreateId);
erpRequestData.Add("ctrantypeid", "0001H11000000000D30X");//先写死
erpRequestData.Add("cprowarehouseid", erpWarehouserelaHs.Find(x=>x.wms_warehousecode==scWarehouse.whcode)?.erp_warehouseid ?? "");//先写死
erpRequestData.Add("cwarehouseid", erpWarehouserelaHs.Find(x=>x.wms_warehousecode==kcWarehouse.whcode)?.erp_warehouseid ?? "");//先写死
erpRequestData.Add("cprowarehouseid", wmsPrdInstockD.scwarehouse_id);
erpRequestData.Add("cwarehouseid", wmsPrdInstockD.warehouse_id);//先写死
erpRequestData.Add("cwhsmanagerid", null);
erpRequestData.Add("dbilldate", nowStr);
erpRequestData.Add("dmakedate", nowStr);
@@ -407,7 +407,7 @@ namespace Tnb.WarehouseMgr
erpRequestDataDetails.Add(new Dictionary<string, object>()
{
["cbodytranstypecode"] = "46-01",
["cbodywarehouseid"] = erpWarehouserelaHs.Find(x=>x.wms_warehousecode==kcWarehouse.whcode)?.erp_warehouseid ?? "",
["cbodywarehouseid"] = wmsPrdInstockD.warehouse_id,
["cmaterialoid"] = erpExtendFields.Find(x => x.table_id == instock.material_id)?.cmaterialoid ?? "",
["cmaterialvid"] = erpExtendFields.Find(x => x.table_id == instock.material_id)?.cmaterialvid ?? "",
["corpoid"] = erpOrg.corpoid,