bug
This commit is contained in:
@@ -102,6 +102,12 @@ namespace Tnb.ProductionMgr
|
||||
throw Oops.Bah("计划数量不能为空");
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(item.dept_id))
|
||||
{
|
||||
Log.Error("【SavePrdMo】生产部门id不能为空");
|
||||
throw Oops.Bah("生产部门id不能为空");
|
||||
}
|
||||
|
||||
if (item.ebom_version == null || item.ebom_version.IsEmpty())
|
||||
{
|
||||
Log.Error("【SavePrdMo】物料清单版本不能为空");
|
||||
@@ -153,6 +159,7 @@ namespace Tnb.ProductionMgr
|
||||
item.erp_line_pk = item.erp_line_pk;
|
||||
item.erp_lineno = item.erp_lineno;
|
||||
item.unit_id = unitDic?.EnCode ?? item.unit_id;
|
||||
item.dept_id = item.dept_id;
|
||||
|
||||
moList.Add(item);
|
||||
}
|
||||
|
||||
@@ -2503,6 +2503,8 @@ namespace Tnb.ProductionMgr
|
||||
// erpExtendIds.Add(report.create_id);
|
||||
erpExtendIds.Add(WmsWareHouseConst.AdministratorOrgId);
|
||||
erpExtendIds.Add(report.material_id);
|
||||
erpExtendIds.Add(prdMo.dept_id);
|
||||
|
||||
// erpExtendIds.Add(report.unit_id);
|
||||
erpExtendIds.AddRange(unitDatas.Select(x => x.Id).ToList());
|
||||
|
||||
@@ -2512,14 +2514,14 @@ namespace Tnb.ProductionMgr
|
||||
string erpCreateId = erpExtendFields.Find(x => x.table_id == userId)?.user_id ?? WmsWareHouseConst.ERPUSERID;
|
||||
ErpExtendField erpOrg = erpExtendFields.Find(x => x.table_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>();
|
||||
erpRequestData.Add("auditer", erpCreateId);
|
||||
erpRequestData.Add("billmaker", erpCreateId);
|
||||
erpRequestData.Add("cdeptid", "1001A1100000001JFOPQ"); //部门先写死
|
||||
erpRequestData.Add("cdeptvid", "0001A1100000000AOMIQ"); //部门先写死
|
||||
erpRequestData.Add("cdeptid", prdMo.dept_id); //部门先写死1001A1100000001JFOPQ
|
||||
erpRequestData.Add("cdeptvid", erpExtendFields.Find(x=>x.cdptid==prdMo.dept_id)?.cdptvid ?? ""); //部门先写死
|
||||
erpRequestData.Add("taudittime", nowStr);
|
||||
erpRequestData.Add("creationtime", nowStr);
|
||||
erpRequestData.Add("creator", erpCreateId);
|
||||
@@ -2537,8 +2539,8 @@ namespace Tnb.ProductionMgr
|
||||
List<Dictionary<string, object>> erpRequestDataDetails = new List<Dictionary<string, object>>();
|
||||
erpRequestDataDetails.Add(new Dictionary<string, object>()
|
||||
{
|
||||
["cbdeptid"] = "1001A1100000001JFOPQ", //部门先写死
|
||||
["cbdeptvid"] = "0001A1100000000AOMIQ", //部门先写死
|
||||
["cbdeptid"] = prdMo.dept_id,
|
||||
["cbdeptvid"] = erpExtendFields.Find(x=>x.cdptid==prdMo.dept_id)?.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 ?? "",
|
||||
@@ -2557,6 +2559,7 @@ namespace Tnb.ProductionMgr
|
||||
["vbmobillcode"] = prdMo.mo_code,
|
||||
["vbmorowno"] = prdMo.erp_lineno,
|
||||
["vbrowno"] = prdMo.erp_lineno,
|
||||
["vbdef2"] = null,//todo 工时后续要改
|
||||
|
||||
});
|
||||
erpRequestData.Add("AggWrDtl", erpRequestDataDetails);
|
||||
|
||||
@@ -1617,7 +1617,7 @@ namespace Tnb.ProductionMgr
|
||||
|
||||
await _db.Ado.CommitTranAsync();
|
||||
|
||||
msg = $"新增供应商{insertDepts.Count}条,修改供应商{editCount}条";
|
||||
msg = $"新增部门{insertDepts.Count}条,修改部门{editCount}条";
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user