|
版本: |
其它(帖子中说明) |
小版本号: |
3.9 |
|
|
数据库: |
MS SQLServer |
服务器操作系统: |
Windows |
应用服务器: |
|
客户端操作系统: |
Windows 其它 |
浏览器: |
Chrome |
|
|
本帖最后由 badnjcf 于 2021-6-3 13:32 编辑
菜鸟不懂,问一下.就是普通的查询...控制台有两条,第二条select count(*)怎么这么慢. .
action 里面
select MOD.*,MOH.TRAN_DATE as TRAN_DATE,MOH.FRMUSER as FRMUSER,MOH.TOUSER as TOUSER,MOH.FEE1 as FEE1,MOH.REMARK as HREMARK,MOH.FLOWREMARK1 as FLOWREMARK1,MOH.FLOWREMARK2 as FLOWREMARK2,MOH.SYSUSER as SYSUSER,MOH.SYSDATE as SYSDATE,MOH.FLOWSTATUS as FLOWSTATUS,ORDID.ORD_DESCC as ORD_DESCC,MOH.ORD_ID as ORD_ID,ITEMMSTR.SPEC01 as ITEMSPEC01,ITEMMSTR.SPEC02 as ITEMSPEC02,( SQL.ISNULL(MOD.PACKQTY, 0) - SQL.ISNULL(MOD.PACKQTY_F, 0) ) as PACKQTY_BAL,0.0000 as QTY_SEL,0.0000 as QTY_THIS,MOH.APPR_FLAG as APPR_FLAG,PARAUNIT.S_DESC as UNIT_DESC,MOH.FRMORG_CODE as HFRMORG_CODE,MOH.FRMORG_DESC as HFRMORG_DESC,MOH.TOORG_CODE as HTOORG_CODE,MOH.TOORG_DESC as HTOORG_DESC,PARACURR.S_DESC as CURR_DESC,MOH.FILE_NO as MOHFILE_NO,ITEMTYPE.ITEM_TYPE_DESCC as ITEM_TYPE_DESCC
from MOD MOD
optional join MOH MOH on MOD.HID = MOH
optional join ORDID ORDID on MOH.ORD_ID = ORDID.ORD_ID
optional join ITEMMSTR ITEMMSTR on MOD.ITEM_NO = ITEMMSTR.ITEM_NO
optional join PARA PARAUNIT on MOD.UNIT = PARAUNIT.S AND PARAUNIT.P = '300'
optional join PARA PARACURR on MOD.CURR_CODE = PARACURR.S AND PARACURR.P = '200'
optional join ITEMTYPE ITEMTYPE on ITEMMSTR.ITEM_TYPE = ITEMTYPE.ITEM_TYPE
下面是js代码
Model.prototype.button1Click = function(event){
var M=this.comp("mainData");
var D=this.comp("data1");
// alert(D.getValue("FILE_NO"))
M.setFilter("F1","MOH.TRAN_DATE>= '"+D.getValue("FRMDATE")+"'"+
" AND (MOH.TRAN_DATE<= '"+D.getValue("TODATE")+"'"+
" OR '"+D.getValue("TODATE")+"'='')"+
" AND SQL.ISNULL(MOD.FILE_NO,'') LIKE '%"+D.getValue("FILE_NO")+"%'"+
" AND SQL.ISNULL(MOD.RFILE_NO,'') LIKE '%"+D.getValue("JOB_NO")+"%'"+
" AND SQL.ISNULL(MOD.ITEM_NO,'') LIKE '%"+D.getValue("ITEM_NO")+"%'"+
" AND SQL.ISNULL(MOD.ITEM_DESCC,'') LIKE '%"+D.getValue("ITEM_DESC")+"%'"+
" AND SQL.ISNULL(ITEMMSTR.SPEC01,'') LIKE '%"+D.getValue("SPEC01")+"%'"+
" AND SQL.ISNULL(MOH.FRMORG_DESC,'') LIKE '%"+D.getValue("FRMLOC")+"%'"+
" AND SQL.ISNULL(MOH.TOORG_DESC,'') LIKE '%"+D.getValue("TOLOC")+"%'" +
" AND SQL.ISNULL(MOH.ORD_ID,'') LIKE '%"+this.comp("data1").getValue("ORD_ID")+"%'"+
" AND SQL.ISNULL(MOH.SYSUSER,'') LIKE '%"+this.comp("data1").getValue("SYSUSER")+"%'"
);
M.refreshData();
|
-
|