This commit is contained in:
2024-10-11 14:34:23 +08:00

View File

@@ -2598,14 +2598,18 @@ namespace Tnb.ProductionMgr
string erpCreateId = WmsWareHouseConst.ERPUSERID;
ErpExtendField erpOrg = erpExtendFields.Find(x => x.table_id == (WmsWareHouseConst.AdministratorOrgId));
string nowStr = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
ErpExtendField deptExtendField = null;
if (!string.IsNullOrEmpty(prdMo.dept_id))
{
deptExtendField = await _db.Queryable<ErpExtendField>().Where(x => x.cdptid==prdMo.dept_id).FirstAsync();
}
List<Dictionary<string, object>> requestData = new List<Dictionary<string, object>>();
Dictionary<string, object> erpRequestData = new Dictionary<string, object>();
erpRequestData.Add("auditer", erpCreateId);
erpRequestData.Add("billmaker", erpCreateId);
erpRequestData.Add("cdeptid", prdMo.dept_id); //部门先写死1001A1100000001JFOPQ
erpRequestData.Add("cdeptvid", erpExtendFields.Find(x=>x.cdptid==prdMo.dept_id)?.cdptvid ?? ""); //部门先写死
erpRequestData.Add("cdeptvid", deptExtendField?.cdptvid); //部门先写死
erpRequestData.Add("taudittime", nowStr);
erpRequestData.Add("creationtime", nowStr);
erpRequestData.Add("creator", erpCreateId);
@@ -2624,7 +2628,7 @@ namespace Tnb.ProductionMgr
erpRequestDataDetails.Add(new Dictionary<string, object>()
{
["cbdeptid"] = prdMo.dept_id,
["cbdeptvid"] = erpExtendFields.Find(x=>x.cdptid==prdMo.dept_id)?.cdptvid ?? "", //部门先写死
["cbdeptvid"] = deptExtendField?.cdptvid,
["cbmainmaterialid"] = erpExtendFields.Find(x => x.table_id == report.material_id)?.cmaterialoid ?? "",
["cbmainmaterialvid"] = erpExtendFields.Find(x => x.table_id == report.material_id)?.cmaterialvid ?? "",
["cbmaterialid"] = erpExtendFields.Find(x => x.table_id == report.material_id)?.cmaterialvid ?? "",