This commit is contained in:
2024-07-16 12:45:43 +08:00
3 changed files with 23 additions and 9 deletions

View File

@@ -2368,6 +2368,7 @@ namespace Tnb.WarehouseMgr
List<ErpExtendField> erpExtendFields = await _db.Queryable<ErpExtendField>().Where(x=>ids.Contains(x.table_id)).ToListAsync();
string erpCreateId = erpExtendFields.Find(x=>x.table_id==wmsMaterialTransfer.create_id)?.user_id ?? "";
ErpExtendField erpOrg = erpExtendFields.Find(x => x.table_id == (wmsMaterialTransfer.org_id ?? WmsWareHouseConst.AdministratorOrgId));
string nowStr = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss");
List<Dictionary<string, object>> requestData = new List<Dictionary<string, object>>();
Dictionary<string, object> erpRequestData = new Dictionary<string, object>();
@@ -2375,13 +2376,13 @@ namespace Tnb.WarehouseMgr
erpRequestData.Add("billmaker",erpCreateId);
erpRequestData.Add("corpoid",erpOrg.corpoid);
erpRequestData.Add("corpvid",erpOrg.corpvid);
erpRequestData.Add("creationtime",DateTime.Now);
erpRequestData.Add("creationtime",nowStr);
erpRequestData.Add("creator",erpCreateId);
erpRequestData.Add("ctrantypeid","0001H11000000000D30Z");
erpRequestData.Add("cwarehouseid",erpExtendFields.Find(x=>x.table_id==wmsMaterialTransfer.warehouse_instock)?.cotherwhid ?? "");
erpRequestData.Add("cwhsmanagerid","");
erpRequestData.Add("dbilldate",DateTime.Now);
erpRequestData.Add("dmakedate",DateTime.Now);
erpRequestData.Add("dbilldate",nowStr);
erpRequestData.Add("dmakedate",nowStr);
erpRequestData.Add("ntotalnum",wmsMaterialTransferDs.Sum(x=>x.qty));
erpRequestData.Add("pk_group",erpOrg.pk_group);
erpRequestData.Add("pk_org",erpOrg.pk_org);
@@ -2406,7 +2407,7 @@ namespace Tnb.WarehouseMgr
["cunitid"] = erpExtendFields.Find(x=>x.table_id==(unitDatas.Find(x=>x.EnCode==item.unit_id)?.Id ?? ""))?.cunitid ?? "",
["cvendorid"] = "",
["cvendorvid"] = "",
["dbizdate"] = DateTime.Now,
["dbizdate"] = nowStr,
["nnum"] = item.qty,
["pk_group"] = erpOrg.pk_group,
["pk_org"] = erpOrg.pk_org,

View File

@@ -649,6 +649,7 @@ namespace Tnb.WarehouseMgr
List<Dictionary<string, object>> requestData = new List<Dictionary<string, object>>();
Dictionary<string, object> erpRequestData = new Dictionary<string, object>();
string nowStr = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss");
erpRequestData.Add("billmaker",erpCreateId);
erpRequestData.Add("cdptid","1001A1100000000JRLI1A100");// 先写死
erpRequestData.Add("cdptvid","0001A11000000007GGO8");// 先写死
@@ -656,12 +657,12 @@ namespace Tnb.WarehouseMgr
erpRequestData.Add("corpvid",erpOrg.corpoid);
erpRequestData.Add("cothercalbodyoid",erpOrg.cdptid);
erpRequestData.Add("cotherwhid",erpExtendFields.Find(x=>x.table_id==wmsMaterialTransfer.warehouse_instock)?.cotherwhid ?? "");
erpRequestData.Add("creationtime",DateTime.Now);
erpRequestData.Add("creationtime",nowStr);
erpRequestData.Add("creator",erpCreateId);
erpRequestData.Add("ctrantypeid","0001H11000000000D31W");
erpRequestData.Add("cwarehouseid",erpExtendFields.Find(x=>x.table_id==wmsMaterialTransfer.warehouse_outstock)?.cotherwhid ?? "");
erpRequestData.Add("dbilldate",DateTime.Now);
erpRequestData.Add("dmakedate",DateTime.Now);
erpRequestData.Add("dbilldate",nowStr);
erpRequestData.Add("dmakedate",nowStr);
erpRequestData.Add("ntotalnum",wmsCarryCodes.Sum(r => r.codeqty));
erpRequestData.Add("pk_group",erpOrg.pk_group);
erpRequestData.Add("pk_org",erpOrg.pk_org);
@@ -683,7 +684,7 @@ namespace Tnb.WarehouseMgr
["cunitid"] = erpExtendFields.Find(x=>x.table_id==unitData.Id)?.cunitid ?? "",
["cvendorid"] = "",
["cvendorvid"] = "",
["dbizdate"] = DateTime.Now,
["dbizdate"] = nowStr,
["nnum"] = wmsCarryCodes.Sum(r => r.codeqty),
["nshouldnum"] = wmsMaterialTransferd.qty,
["pk_group"] = erpOrg.pk_group,