|
|
@@ -519,13 +519,17 @@ namespace UAS_MES.PublicMethod
|
|
|
|
|
|
public static void CartonBoxStepPass(string iMakeCode, string iSourceCode, string iCartonBox, string iUserCode, string iResult, out string oErrorMessage)
|
|
|
{
|
|
|
- DataTable dt = (DataTable)dh.ExecuteSql("select pd_makecode,pd_barcode from packagedetail where pd_outboxcode='" + iCartonBox + "'", "select");
|
|
|
+ DataTable dt = (DataTable)dh.ExecuteSql("select ms_status,V_BARCODE,V_MAKECODE from mes_package_view left join makeserial on V_MAKECODE=ms_makecode and v_barcode = ms_sncode where V_OUTBOXCODE='" + iCartonBox + "'", "select");
|
|
|
oErrorMessage = "";
|
|
|
for (int i = 0; i < dt.Rows.Count; i++)
|
|
|
{
|
|
|
- string sn = dt.Rows[i]["pd_barcode"].ToString();
|
|
|
- string makecode = dt.Rows[i]["pd_makecode"].ToString();
|
|
|
- CS_SetResult(makecode, iSourceCode, sn, iUserCode, iResult, out oErrorMessage);
|
|
|
+ string ms_status = dt.Rows[i]["ms_status"].ToString();
|
|
|
+ string sn = dt.Rows[i]["V_BARCODE"].ToString();
|
|
|
+ string makecode = dt.Rows[i]["V_MAKECODE"].ToString();
|
|
|
+ if (ms_status != "2")
|
|
|
+ {
|
|
|
+ CS_SetResult(makecode, iSourceCode, sn, iUserCode, iResult, out oErrorMessage);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -1311,14 +1315,14 @@ namespace UAS_MES.PublicMethod
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- public static void RecordProdWeight(string iSN, string iType, string iScanValue, float iWeight, string iUnit, string iLineCode, string iPrCode, string iSource, string iUser)
|
|
|
+ public static void RecordProdWeight(string iSN, string iType,float iWeight, string iUnit, string iLineCode, string iPrCode, string iSource, string iUser)
|
|
|
{
|
|
|
//记录重量
|
|
|
sql.Clear();
|
|
|
sql.Append("insert into weightlog(wl_id,wl_type,wl_scancode,wl_weight,wl_unit,wl_linecode,");
|
|
|
- sql.Append("wl_prodcode,wl_sccode,wl_indate,wl_inman) values (weightlog_seq.nextval,:type,:palletcode,");
|
|
|
- sql.Append(":weight,:unit,:linecode,:prodcode,:sccode,sysdate,:inman)");
|
|
|
- dh.ExecuteSql(sql.ToString(), "insert", iType,iScanValue, iWeight,iUnit, User.UserLineCode, iPrCode, iSource, iUser);
|
|
|
+ sql.Append("wl_prodcode,wl_sccode,wl_indate,wl_inman) values (weightlog_seq.nextval,:wl_type,:wl_scancode,");
|
|
|
+ sql.Append(":wl_weight,:wl_unit,:wl_linecode,:wl_prodcode,:wl_sccode,sysdate,:wl_inman)");
|
|
|
+ dh.BatchInsert(sql.ToString(), new string[] { "wl_type", "wl_scancode", "wl_weight", "wl_unit", "wl_linecode", "wl_prodcode", "wl_sccode", "wl_inman" }, new string[] { iType } , new string[] { iSN } , new float[] { iWeight }, new string[] { iUnit } , new string[] { iLineCode } , new string[] { iPrCode }, iSource, iUser);
|
|
|
}
|
|
|
|
|
|
|