质量bug
This commit is contained in:
@@ -439,12 +439,12 @@ namespace Tnb.QcMgr
|
|||||||
|
|
||||||
if (list.IsEmpty())
|
if (list.IsEmpty())
|
||||||
{
|
{
|
||||||
throw Oops.Bah("未找到质检方案");
|
throw Oops.Bah($"{entity.triggerevent.ToString()}未找到质检方案");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (list.Count > 1)
|
if (list.Count > 1)
|
||||||
{
|
{
|
||||||
throw Oops.Bah("找到多个质检方案");
|
throw Oops.Bah($"{entity.triggerevent.ToString()}找到多个质检方案");
|
||||||
}
|
}
|
||||||
|
|
||||||
// List<string> removes = new();
|
// List<string> removes = new();
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ namespace Tnb.QcMgr
|
|||||||
checknum = !string.IsNullOrEmpty(QcCheckExecH.checknum) ? int.Parse(QcCheckExecH.checknum) : 0,
|
checknum = !string.IsNullOrEmpty(QcCheckExecH.checknum) ? int.Parse(QcCheckExecH.checknum) : 0,
|
||||||
worker_name = userEntity?.RealName ?? "",
|
worker_name = userEntity?.RealName ?? "",
|
||||||
bill_code = QcCheckExecH.bill_code,
|
bill_code = QcCheckExecH.bill_code,
|
||||||
carry_code = prdReport?.material_box_code,
|
carry_code = prdReport!=null ? prdReport.material_box_code : "",
|
||||||
};
|
};
|
||||||
if (!string.IsNullOrEmpty(CheckTaskOut.workid))
|
if (!string.IsNullOrEmpty(CheckTaskOut.workid))
|
||||||
{
|
{
|
||||||
@@ -195,7 +195,8 @@ namespace Tnb.QcMgr
|
|||||||
Item.setData.errorcause = new List<Error>();
|
Item.setData.errorcause = new List<Error>();
|
||||||
foreach (string str in strs)
|
foreach (string str in strs)
|
||||||
{
|
{
|
||||||
Item.setData.errorcause.Add(new Error { id = str, name = QcErrorCauses.Where(p => p.id == str).First().name! });
|
if (string.IsNullOrEmpty(str) || str == "null") continue;
|
||||||
|
Item.setData.errorcause.Add(new Error { id = str, name = QcErrorCauses.Where(p => p.id == str).First()?.name! });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(QcCheckExecD.errorlevel))
|
if (!string.IsNullOrEmpty(QcCheckExecD.errorlevel))
|
||||||
@@ -204,7 +205,8 @@ namespace Tnb.QcMgr
|
|||||||
Item.setData.errorlevel = new List<Error>();
|
Item.setData.errorlevel = new List<Error>();
|
||||||
foreach (string str in strs)
|
foreach (string str in strs)
|
||||||
{
|
{
|
||||||
Item.setData.errorlevel.Add(new Error { id = str, name = QcErrorLevels.Where(p => p.id == str).First().name! });
|
if (string.IsNullOrEmpty(str) || str == "null") continue;
|
||||||
|
Item.setData.errorlevel.Add(new Error { id = str, name = QcErrorLevels.Where(p => p.id == str).First()?.name! });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item.setData.remark = QcCheckExecD.remark!;
|
Item.setData.remark = QcCheckExecD.remark!;
|
||||||
|
|||||||
Reference in New Issue
Block a user