소스 검색

Merge branch 'master' of ssh://10.10.101.21/source/mes-client

Hcsy 8 년 전
부모
커밋
9f75a4ba00
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      UAS-MES/FunctionCode/Make/Make_Repair.cs

+ 3 - 3
UAS-MES/FunctionCode/Make/Make_Repair.cs

@@ -641,9 +641,9 @@ namespace UAS_MES.Make
                             dt = (DataTable)dh.ExecuteSql("select mbl_id,mbl_loc from makebadrsloc where mbl_mbrid=" + mbr_id, "select");
                             BaseUtil.FillDgvWithDataTable(mbl_locdgv, dt);
                             sql.Clear();
-                            sql.Append("select bd_soncode from bom inner join bomdetail on bo_id = bd_bomid ");
-                            sql.Append("where bo_mothercode='" + ms_prodcode.Text + "' and bd_location<>' 'and  ");
-                            sql.Append(" instr(','||bd_location||',','," + mbl_loc.Text.ToUpper() + ",')>0  order by bd_detno desc ");
+                            sql.Append("with temp1 as (select bd_soncode,bd_location from bomdetail,bom where bo_id=bd_bomid ");
+                            sql.Append(" start with bo_mothercode='" + ms_prodcode.Text + "' connect by bo_mothercode= prior bd_soncode) ");
+                            sql.Append("select bd_soncode from temp1 where instr(','||bd_location||',','," + mbl_loc.Text.ToUpper() + ",')>0");
                             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                             if (dt.Rows.Count > 0)
                             {