其它入库
This commit is contained in:
@@ -58,6 +58,7 @@ using Tnb.BasicData;
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using NPOI.SS.Format;
|
using NPOI.SS.Format;
|
||||||
using Aspose.Cells.Drawing;
|
using Aspose.Cells.Drawing;
|
||||||
|
using SQLitePCL;
|
||||||
using Tnb.BasicData.Entities.Entity;
|
using Tnb.BasicData.Entities.Entity;
|
||||||
|
|
||||||
namespace Tnb.WarehouseMgr
|
namespace Tnb.WarehouseMgr
|
||||||
@@ -3225,8 +3226,10 @@ namespace Tnb.WarehouseMgr
|
|||||||
.Select((x, y) => y)
|
.Select((x, y) => y)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
||||||
|
WmsMaterialTransferCarry wmsMaterialTransferCarry = await db.Queryable<WmsMaterialTransferCarry>().Where(x=>x.bill_id==wmsMaterialTransfer.id).FirstAsync();
|
||||||
|
string carryId = wmsMaterialTransferCarry?.carry_id ?? "";
|
||||||
List<WmsCarryCode> wmsCarryCodes = await db.Queryable<WmsCarryCode>()
|
List<WmsCarryCode> wmsCarryCodes = await db.Queryable<WmsCarryCode>()
|
||||||
.Where(a => a.carry_id == dt.carry_id)
|
.Where(a => a.carry_id == carryId)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
||||||
List<string> supplierIds = wmsCarryCodes.Select(x => x.auxprop_gys).Distinct().ToList();
|
List<string> supplierIds = wmsCarryCodes.Select(x => x.auxprop_gys).Distinct().ToList();
|
||||||
@@ -3273,6 +3276,9 @@ namespace Tnb.WarehouseMgr
|
|||||||
List<Dictionary<string, object>> erpRequestDataDetails = new List<Dictionary<string, object>>();
|
List<Dictionary<string, object>> erpRequestDataDetails = new List<Dictionary<string, object>>();
|
||||||
foreach (WmsMaterialTransferD item in wmsMaterialTransferDs)
|
foreach (WmsMaterialTransferD item in wmsMaterialTransferDs)
|
||||||
{
|
{
|
||||||
|
WmsMaterialTransferCarry wmsMaterialTransferCarryItem = await db.Queryable<WmsMaterialTransferCarry>().Where(x=>x.mat_bill_id==item.id).FirstAsync();
|
||||||
|
string wmsMaterialTransferCarryItemCarryId = wmsMaterialTransferCarryItem?.carry_id ?? "";
|
||||||
|
WmsCarryCode wmsCarryCode = await db.Queryable<WmsCarryCode>().Where(x => x.carry_id == wmsMaterialTransferCarryItemCarryId).FirstAsync();
|
||||||
erpRequestDataDetails.Add(new Dictionary<string, object>()
|
erpRequestDataDetails.Add(new Dictionary<string, object>()
|
||||||
{
|
{
|
||||||
["cbodytranstypecode"] = "4A-02",
|
["cbodytranstypecode"] = "4A-02",
|
||||||
@@ -3287,8 +3293,8 @@ namespace Tnb.WarehouseMgr
|
|||||||
// ["crowno"] = (wmsMaterialTransferDs.FindIndex(x => x.id == item.id) + 1) * 10,
|
// ["crowno"] = (wmsMaterialTransferDs.FindIndex(x => x.id == item.id) + 1) * 10,
|
||||||
["crowno"] = item.lineno,
|
["crowno"] = item.lineno,
|
||||||
["cunitid"] = erpExtendFields.Find(x => x.table_id == (unitDatas.Find(x => x.EnCode == item.unit_id)?.Id ?? ""))?.cunitid ?? "",
|
["cunitid"] = erpExtendFields.Find(x => x.table_id == (unitDatas.Find(x => x.EnCode == item.unit_id)?.Id ?? ""))?.cunitid ?? "",
|
||||||
["cvendorid"] = "",
|
["cvendorid"] = erpExtendFields.Find(x => x.table_id == wmsCarryCode?.auxprop_gys)?.supplier_id ?? "",
|
||||||
["cvendorvid"] = "",
|
["cvendorvid"] = erpExtendFields.Find(x => x.table_id == wmsCarryCode?.auxprop_gys)?.supplier_vid ?? "",
|
||||||
["dbizdate"] = nowStr,
|
["dbizdate"] = nowStr,
|
||||||
["nnum"] = item.qty,
|
["nnum"] = item.qty,
|
||||||
["pk_group"] = erpOrg.pk_group,
|
["pk_group"] = erpOrg.pk_group,
|
||||||
@@ -3297,7 +3303,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
["csourcebillbid"] = item.erp_line_pk,
|
["csourcebillbid"] = item.erp_line_pk,
|
||||||
["csourcebillhid"] = wmsMaterialTransfer.erp_pk,
|
["csourcebillhid"] = wmsMaterialTransfer.erp_pk,
|
||||||
["vbatchcode"] = item.code_batch,
|
["vbatchcode"] = item.code_batch,
|
||||||
["vfree1"] = wmsCarryCodes[0].auxprop_xph,
|
["vfree1"] = wmsCarryCode?.auxprop_xph ?? "",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
erpRequestData.Add("dtls", erpRequestDataDetails);
|
erpRequestData.Add("dtls", erpRequestDataDetails);
|
||||||
|
|||||||
Reference in New Issue
Block a user