" INNER JOIN ( SELECT SUM ( Qty ) AS Qty, Kanban, MaterialCode FROM Set_HQ_H_Kanban GROUP BY Kanban, MaterialCode ) AS b ON a.HQHKanBan = b.Kanban \n"+
//" INNER JOIN ( SELECT SUM ( Qty ) AS Qty, Kanban, MaterialCode FROM Set_HQ_H_Kanban GROUP BY Kanban, MaterialCode ) AS b ON a.HQHKanBan = b.Kanban \n" +
//" AND a.MaterialCode = b.MaterialCode\n" +
//" LEFT OUTER JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" +
//" WHERE\n" +
//" ( a.Version= '{0}' AND a.HQHKanBan IS NOT NULL ) \n" +
//" AND a.HQHKanBan <> 'BJ' \n" +
//" ) AS temp1\n" +
//" LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE Version = '202110' ) AS TEMP2 ON temp1.Sap编码 = TEMP2.MaterialCode\n" +
//" LEFT JOIN (\n" +
//" SELECT\n" +
//" ROUND( SUM ( Amt ) / SUM ( Qty ), 4 ) price,\n" +
//" HQHKanBan,\n" +
//" MaterialCode,\n" +
//" Version \n" +
//" FROM\n" +
//" Set_HQ_H_Platform \n" +
//" WHERE\n" +
//" Version = '{0}' \n" +
//" AND HQHKanBan <> 'BJ' \n" +
//" GROUP BY\n" +
//" HQHKanBan,\n" +
//" MaterialCode,\n" +
//" Version \n" +
//" ) AS TEMP3 ON temp1.[结算物料代码] = TEMP3.MaterialCode \n" +
//" AND temp1.订货看板编号 = TEMP3.HQHKanBan\n" +
//" LEFT JOIN set_backQty temp4 ON temp1.订货看板编号 = temp4.Code \n" +