|
@@ -561,12 +561,20 @@ namespace UAS_MES.Make
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
//判断是否所有的不良信息都有维护不良原因
|
|
//判断是否所有的不良信息都有维护不良原因
|
|
|
- DataTable dt = (DataTable)dh.ExecuteSql("select mb_id,bc_name,mbr_mbid from makebad left join makebadreason on mbr_mbid=mb_id left join badcode on mb_badcode=bc_code where mb_sncode='" + ms_sncode.Text + "' and mb_makecode='" + ms_makecode.Text + "' and mb_status=0", "select");
|
|
|
|
|
|
|
+ DataTable dt = (DataTable)dh.ExecuteSql("select mb_id,bc_name,mbr_mbid,MBR_SOLUTIONCODE from makebad left join makebadreason on mbr_mbid=mb_id left join badcode on mb_badcode=bc_code where mb_sncode='" + ms_sncode.Text + "' and mb_makecode='" + ms_makecode.Text + "' and mb_status=0", "select");
|
|
|
string ErrorMessage = "";
|
|
string ErrorMessage = "";
|
|
|
for (int i = 0; i < dt.Rows.Count; i++)
|
|
for (int i = 0; i < dt.Rows.Count; i++)
|
|
|
{
|
|
{
|
|
|
if (dt.Rows[i]["mb_id"].ToString() != dt.Rows[i]["mbr_mbid"].ToString())
|
|
if (dt.Rows[i]["mb_id"].ToString() != dt.Rows[i]["mbr_mbid"].ToString())
|
|
|
ErrorMessage += "【" + dt.Rows[i]["bc_name"].ToString() + "】";
|
|
ErrorMessage += "【" + dt.Rows[i]["bc_name"].ToString() + "】";
|
|
|
|
|
+ if (dt.Rows[i]["MBR_SOLUTIONCODE"].ToString() == "JJ_123")
|
|
|
|
|
+ {
|
|
|
|
|
+ if (dh.getRowCount("craftmaterial", "nvl(cm_mbid,0)<>0 and cm_sncode='" + GetSNCode.Text + "' and cm_makecode='" + ms_makecode.Text + "'") == 0)
|
|
|
|
|
+ {
|
|
|
|
|
+ OperatResult.AppendText(">>解决方案为更换物料,必须存在拆解记录\n", Color.Red);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
if (ErrorMessage != "")
|
|
if (ErrorMessage != "")
|
|
|
{
|
|
{
|