|
@@ -2,6 +2,7 @@ package com.steerinfo.dil.controller;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.steerinfo.dil.component.ImageFileUtils;
|
|
|
+import com.steerinfo.dil.feign.ColumnDataFeign;
|
|
|
import com.steerinfo.dil.feign.ESFeign;
|
|
|
import com.steerinfo.dil.model.RmsCapacity;
|
|
|
import com.steerinfo.dil.service.impl.RmsCapacityServiceImpl;
|
|
@@ -18,10 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.util.*;
|
|
|
|
|
|
/**
|
|
|
* @Description:
|
|
@@ -41,6 +39,23 @@ public class RmsCapacityController extends BaseRESTfulController {
|
|
|
@Autowired
|
|
|
private ImageFileUtils imageFileUtils;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ ColumnDataFeign columnDataFeign;
|
|
|
+
|
|
|
+ private Set<Map<String, Object>> setListMap(List<Map<String, Object>> list, String name) {
|
|
|
+ Set<Map<String, Object>> setString = new HashSet<>();
|
|
|
+ for (Map<String, Object> map : list) {//遍历每条数据
|
|
|
+ Map<String, Object> map1 = new HashMap<>();
|
|
|
+ //map.get(name)获取每条数据中对应表头字段的数据
|
|
|
+ map1.put("text", map.get(name));
|
|
|
+ if (map.get(name) != null) {
|
|
|
+ map1.put("value", map.get(name));
|
|
|
+ setString.add(map1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return setString;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 创建运力信息
|
|
|
* @param
|
|
@@ -165,8 +180,36 @@ public class RmsCapacityController extends BaseRESTfulController {
|
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
|
//分页查询数据
|
|
|
List<Map<String, Object>> columnList = rmsCapacityService.getCapacityList(mapValue);
|
|
|
- PageListAdd data = columnDataUtil.tableColumnData(apiId, null, columnList);
|
|
|
- return success(data);
|
|
|
+ //获取样式
|
|
|
+ List<Map<String, Object>> columnDataList = columnDataFeign.getColumnData(apiId);
|
|
|
+ int i=0;
|
|
|
+ for (Map<String, Object> columnData : columnDataList) {
|
|
|
+ //每个表头字段的过滤条
|
|
|
+ columnData.put("filters", setListMap(columnList, columnData.get("prop").toString()));
|
|
|
+ if (i==1){
|
|
|
+ columnData.put("min-width","128px");
|
|
|
+ }else if (i==2){
|
|
|
+ columnData.put("min-width","129px");
|
|
|
+ }else if (i==3){
|
|
|
+ columnData.put("min-width","139px");
|
|
|
+ }else if (i==4){
|
|
|
+ columnData.put("min-width","125px");
|
|
|
+ }else if (i==5){
|
|
|
+ columnData.put("min-width","135px");
|
|
|
+ }else if (i==6){
|
|
|
+ columnData.put("min-width","149px");
|
|
|
+ }else if (i==7){
|
|
|
+ columnData.put("min-width","109px");
|
|
|
+ }else if (i==8){
|
|
|
+ columnData.put("min-width","125px");
|
|
|
+ }else if (i==9){
|
|
|
+ columnData.put("min-width","89px");
|
|
|
+ }
|
|
|
+ i++;
|
|
|
+ }
|
|
|
+ PageListAdd pageList = new PageListAdd(columnList);
|
|
|
+ pageList.setColumnData(columnDataList);
|
|
|
+ return success(pageList);
|
|
|
}
|
|
|
|
|
|
//根据carrierSSOId查询承运商
|