瀏覽代碼

特殊报表处理

callm 6 天之前
父節點
當前提交
eb35109264
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      UAS_MES_LGDZ/FunctionCode/Query/Query_SpecialReport.cs

+ 1 - 1
UAS_MES_LGDZ/FunctionCode/Query/Query_SpecialReport.cs

@@ -88,7 +88,7 @@ namespace UAS_MES_NEW.Query
                 for (int i = importdata.Rows.Count - 1; i >= 0; i--)
                 {
                     string Refer = importdata.Rows[i]["Refer"].ToString();
-                    DataTable bom = (DataTable)dh.ExecuteSql("select bd_soncode,replace(wm_concat(distinct bd_location),',',' ')||';'||replace(wm_concat(distinct bd_soncode),',',' ')||'  '||replace(wm_concat(distinct PRE_REPCODE),',','  ') from BOMDetail " +
+                    DataTable bom = (DataTable)dh.ExecuteSql("select bd_soncode,replace(wm_concat(distinct bd_location),',',' ')||';'||replace(wm_concat(distinct bd_soncode),',',' ')||case when wm_concat(distinct PRE_REPCODE) is null then '  ' else ' ' end||replace(wm_concat(distinct PRE_REPCODE),',','')||case when wm_concat(distinct PRE_REPCODE) is null then '' else '  ' end from BOMDetail " +
                         "LEFT JOIN bom on bd_bomid=bo_id left join Product ON bd_soncode=pr_code left join ProdReplace on pre_bdid =bd_id where " +
                         "bo_mothercode='" + pr_code.Text + "' and instr(','||bd_location||',','," + Refer + ",')>0 group by bd_soncode", "select");
                     if (bom.Rows.Count > 0)