日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

easyui一行显示多行_easyui datagrid以及oracle中的多行合并一行

發布時間:2023/12/15 编程问答 43 豆豆
生活随笔 收集整理的這篇文章主要介紹了 easyui一行显示多行_easyui datagrid以及oracle中的多行合并一行 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

頁面顯示:

前端代碼:

toolbar="#toolbar" rownumbers="true" singleSelect="true" fitColumns="true">

大箱碼關聯的箱碼(不同箱碼用分號分開,相同箱碼用逗號分開)關聯數量

data-options="

total: 0,

pageSize:15,

pageList: [15,30,50,100],

onSelectPage: function(pageNumber, pageSize){ // 頁面切換動作

getDataByPageRows(pageNumber,pageSize);

}">

js:

function getDataByPageRows(pageNum, rowsLimit){

$("#pp").show();

pageNum = pageNum || 1; // 設置默認的頁號

rowsLimit = rowsLimit || 2;// 設置默認的每頁記錄數

$.ajax({

type: "POST",

dataType: 'json', // 注意格式是html,不是json

url:"outdata/querydetaillist",

data: {

startdate: $("#startdate").datetimebox('getValue'),

enddate: $("#enddate").datetimebox('getValue'),

storecode: $("#storecode").val(),

page: pageNum,

rows: rowsLimit

},

success: function(data){ // 請求成功,將返回的數據(一頁的記錄數)綁定到 datagrid控件

var count = data.total; // 總記錄個數

var datarow = data.rows; //獲取條數;

$('#dgs').datagrid('loadData',datarow);

$('#pp').pagination({

total: count, // 由于顯示 ”共XXX條記錄” 等信息用

pageNumber: pageNum //

});

}

});//ajax

}

controller:

@RequestMapping(value="/querydetaillist")

@ResponseBody

public String querydetaillist(Model model,HttpServletResponse response,HttpServletRequest request,

@RequestParam(value = "page", required = false, defaultValue = "") String page,

@RequestParam(value = "storecode", required = false, defaultValue = "") String storecode,

@RequestParam(value = "startdate", required = false, defaultValue = "") String startdate,

@RequestParam(value = "enddate", required = false, defaultValue = "") String enddate,

@RequestParam(value = "rows", required = false, defaultValue = "") String rows){

int endindex=Integer.valueOf(page)*Integer.valueOf(rows);

int startindex=(Integer.valueOf(page)-1)*Integer.valueOf(rows);

Map params = new HashMap();

if(!storecode.equals("")){

storecode = storecode.replaceFirst("^0*", "");

}

if(!startdate.equals("")){

startdate = startdate.replaceAll(" ", "");

}

if(!enddate.equals("")){

enddate = enddate.replaceAll(" ", "");

}

params.put("endIndex", endindex);

params.put("storecode", storecode);

params.put("startIndex", startindex);

params.put("startdate", startdate);

params.put("enddate", enddate);

List datalist=outdataDao.querydetaillist(params);

String total=outdataDao.querydetaillistcount(params);

JSONObject obj=new JSONObject();

obj.put("total", total);

obj.put("rows", datalist);

return obj.toJSONString();

}

xml:

select * from (

select tt1.*, ROWNUM as rowno

from (

select storecode,listagg(casecode,';') within group (order by casecode) as casecode,count(casecode) as "count" from

(

select s.storecode,c.caseid,listagg(c.casecode,',') within group (order by c.casecode,c.caseid) as casecode,

count(distinct caseid)

from ys_store s

left join ys_case c on s.id=c.storeid

where 1=1 and casecode is not null

and to_char(s.gldate,'yyyy-MM-dd')>='${startdate}'

and to_char(s.gldate,'yyyy-MM-dd')<='${enddate}'

and s.storecode=${storecode}

group by s.storecode,c.caseid

)

group by storecode

) tt1

where ROWNUM <= '${endIndex}') tt2

where tt2.rowno > '${startIndex}'

select count(*) from(

select storecode,listagg(casecode,';') within group (order by casecode) as casecode,count(casecode) as "count" from

(

select s.storecode,c.caseid,listagg(c.casecode,',') within group (order by c.casecode,c.caseid) as casecode,

count(distinct caseid)

from ys_store s

left join ys_case c on s.id=c.storeid

where 1=1 and casecode is not null

and to_char(s.gldate,'yyyy-MM-dd')>='${startdate}'

and to_char(s.gldate,'yyyy-MM-dd')<='${enddate}'

and s.storecode=${storecode}

group by s.storecode,c.caseid

)

group by storecode

)

參考文檔:

總結

以上是生活随笔為你收集整理的easyui一行显示多行_easyui datagrid以及oracle中的多行合并一行的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。