|
@@ -1,6 +1,7 @@
|
|
|
package restcontroller.webmanage.sale.workorder;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
+import java.util.Collections;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
@@ -16,6 +17,7 @@ import common.data.Rows;
|
|
|
import common.data.RowsMap;
|
|
|
import common.data.SQLFactory;
|
|
|
import restcontroller.R;
|
|
|
+import restcontroller.webmanage.sale.itemclass.SortByNum;
|
|
|
|
|
|
/**
|
|
|
* 服务工单模板工作明细
|
|
@@ -88,6 +90,7 @@ public class workorderTemplateWorks extends Controller{
|
|
|
* 获取所有一级分类
|
|
|
*/
|
|
|
Rows toprows = allrows.toRowsMap("parentid").get("0");
|
|
|
+ Collections.sort(toprows, new SortByNum());
|
|
|
/*
|
|
|
* 递归查询
|
|
|
*/
|
|
@@ -137,6 +140,7 @@ public class workorderTemplateWorks extends Controller{
|
|
|
*/
|
|
|
private Rows getSubWorkorderTemplate(Row root, Rows allWorkorderTemplate) {
|
|
|
Rows childrenRows = allWorkorderTemplate.toRowsMap("parentid").get(root.getString("sa_workorder_template_worksid"));
|
|
|
+ Collections.sort(childrenRows, new SortByNum());
|
|
|
for (Row row : childrenRows) {
|
|
|
row.put("subdep", getSubWorkorderTemplate(row, allWorkorderTemplate));
|
|
|
}
|