|
|
@@ -262,8 +262,8 @@ namespace UAS_MES.Make
|
|
|
if (re_autodecom != "0")
|
|
|
{
|
|
|
sql.Clear();
|
|
|
- sql.Append("select cm_makecode from craftmaterial left join makeserial on ms_makecode=");
|
|
|
- sql.Append("cm_makecode and ms_sncode=cm_barcode and ms_prodcode=cm_soncode where ms_id='" + Msid + "'");
|
|
|
+ sql.Append("select cm_makecode,cm_soncode,cm_barcode from craftmaterial left join makeserial on ms_makecode=");
|
|
|
+ sql.Append("cm_makecode and ms_sncode=cm_sncode and ms_prodcode=cm_maprodcode where ms_id='" + Msid + "'");
|
|
|
DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
|
|
|
string cm_makecode = "";
|
|
|
string cm_soncode = "";
|
|
|
@@ -282,7 +282,7 @@ namespace UAS_MES.Make
|
|
|
//TSN失效
|
|
|
sql.Clear();
|
|
|
sql.Append("update makeserial set ms_nextmacode='' where ms_nextmacode='" + cm_makecode + "'");
|
|
|
- sql.Append(" and ms_sncode='" + cm_barcode + "' and ms_prodcode='" + cm_barcode + "' ");
|
|
|
+ sql.Append(" and ms_sncode='" + cm_barcode + "' and ms_prodcode='" + cm_soncode + "' ");
|
|
|
SQLS.Add(sql.GetString());
|
|
|
}
|
|
|
dh.ExecuteSQLTran(SQLS.ToArray());
|