Эх сурвалжийг харах

返工数据采集语句修改,卡通箱整箱过站修改

Hcsy 8 жил өмнө
parent
commit
5c1398f1de

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_GetReMakeSN.cs

@@ -262,7 +262,7 @@ namespace UAS_MES.Make
                                 if (re_autodecom != "0")
                                 {
                                     sql.Clear();
-                                    sql.Append("select cm_makecode from craftmaterial left join makeserial where cm_makecode=");
+                                    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 + "'");
                                     DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                                     string cm_makecode = "";

+ 3 - 2
UAS-MES/PublicMethod/LogicHandler.cs

@@ -519,12 +519,13 @@ 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_barcode from packagedetail where pd_outboxcode='" + iCartonBox + "'", "select");
+            DataTable dt = (DataTable)dh.ExecuteSql("select pd_makecode,pd_barcode from packagedetail where pd_outboxcode='" + iCartonBox + "'", "select");
             oErrorMessage = "";
             for (int i = 0; i < dt.Rows.Count; i++)
             {
                 string sn = dt.Rows[i]["pd_barcode"].ToString();
-                CS_SetResult(iMakeCode, iSourceCode, sn, iUserCode, iResult, out oErrorMessage);
+                string makecode = dt.Rows[i]["pd_makecode"].ToString();
+                CS_SetResult(makecode, iSourceCode, sn, iUserCode, iResult, out oErrorMessage);
             }
         }