SQL does not have row conversion columns:
The ideal result is that the groupName with Objectid 77 is merged into one row.
Finally, let's look at the page effects of js processing.
Some friends may ask different results. I modified the data later. After all, this is the final page with some bugs modified.
Js Code:
Js:
Var ztCallBack = function ztCallBack (json) {if (json. result = "0") {json = null;} else {for (var I = 0; I <json. rows. length-1; I ++) {for (var j = I + 1; j <json. rows. length; j ++) {if (json. rows [I]. objectID = json. rows [j]. objectID) {json. rows [I]. groupName + = "," + json. rows [j]. groupName; json. rows. splice (j, 1) ;}}for (var I = 0; I <json. rows. length; I ++) {if (json. rows [I]. groupName = Null | json. rows [I]. groupName = "") {json. rows [I]. groupName = "ungrouped";} json. rows [I] ["direct"] = Math. random () * 360; json. rows [I] ["uni_status"] = []; json. rows [I] ["uni_alerts"] = [] ;}} var columns = [{display: 'terminal card No. ', name: 'sim', minWidth: 90 }, {display: 'group', name: 'groupname', width: 120, align: 'left'}, {display: 'status', name: 'state', width: 70, align: 'left'}, {display: 'id', n Ame: 'objectid', id: "ObjectID", minWidth: 0, isAllowHide: false}]; var id = $ ("# userGridID"), obj = {id: id, columns: columns, data: json, sortName: 'usermangerid', width: "98%", height: "94%"}; guidObj = liGrid (obj); guidObj. onload = f_hideCity (); if (json! = Null) {// added batch vehicles wimap. addVehicles (json. Rows); wimap. findVehicle (json. Rows [0]. ObjectID, true, true );}}