|
版本: |
BeX5V3.5 |
小版本号: |
|
|
|
数据库: |
Oracle |
服务器操作系统: |
Windows |
应用服务器: |
Tomcat |
客户端操作系统: |
Windows 其它 |
浏览器: |
Chrome |
|
|
本帖最后由 xqbq2517 于 2019-6-14 23:09 编辑
- public static Table pop(String Fpurchasetype,String Fsupplyname,java.sql.Date Ftime){
- String oracle = "SELECT * FROM (SELECT FPURCHASETYPE,FSUPPLYNAME,FTIME,ROUND((1 - (SUM(FBACKRECEIVED) + SUM(FCHECKEDBACKNUMBER)) / SUM(FPROCHECKNUM)), 4) AS FPASSEDRATE FROM MG_Q3GRADE GROUP BY FTIME,FPURCHASETYPE,FSUPPLYNAME)" ;
- oracle += " WHERE 1=1 ";
-
-
- if(!"".equals(Fpurchasetype)){
- oracle += "and Fpurchasetype like '%"+Fpurchasetype+"%' ";
- }
- if(!"".equals(Fsupplyname)){
- oracle += "and Fsupplyname like '%"+Fsupplyname+"%' ";
- }
- if(!"".equals(Ftime)){
- oracle += "and Ftime like '%"+Ftime+"%' ";
- }
-
- HashMap<String, String> sqlMap = new HashMap<String, String>();
- sqlMap.put(DatabaseProduct.ORACLE.name(), oracle);
- return SQL.select(sqlMap, null, "/MS/MS_Report/data");
- }
复制代码
|
|