|
@@ -18,9 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.util.*;
|
|
|
|
|
|
/**
|
|
|
* AmsContractTransportPrice RESTful接口:
|
|
@@ -64,10 +62,14 @@ public class AmsContractTruckPriceController extends BaseRESTfulController {
|
|
|
Integer apiId,
|
|
|
Integer pageNum,
|
|
|
Integer pageSize,
|
|
|
+ String con,
|
|
|
Integer deleted){
|
|
|
if(deleted != null) {
|
|
|
mapValue.put("deleted", deleted);
|
|
|
}
|
|
|
+ if(con !=null){
|
|
|
+ mapValue.put("con",con);
|
|
|
+ }
|
|
|
PageHelper.startPage(pageNum,pageSize);
|
|
|
List<Map<String, Object>> amsContractTransportPrice1 = amsContractTruckPriceService.getAmsContractTransportPrice(mapValue);
|
|
|
PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null,amsContractTransportPrice1);
|
|
@@ -247,10 +249,38 @@ public class AmsContractTruckPriceController extends BaseRESTfulController {
|
|
|
PageHelper.startPage(pageNum,pageSize);
|
|
|
//分页数据
|
|
|
List<Map<String, Object>> saleOrderList = amsContractTruckPriceService.getAddressDeliveryAddress(mapValue);
|
|
|
- PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null,saleOrderList);
|
|
|
+ List<Map<String, Object>> columnDataList = columnDataFeign.getColumnData(apiId);
|
|
|
+ int i=0;
|
|
|
+ for (Map<String, Object> columnData : columnDataList) {
|
|
|
+ //每个表头字段的过滤条件
|
|
|
+ columnData.put("filters", setListMap(saleOrderList, columnData.get("prop").toString()));
|
|
|
+ if (i==0){
|
|
|
+ columnData.put("min-width","78px");
|
|
|
+ }else if (i==2){
|
|
|
+ columnData.put("min-width","94px");
|
|
|
+ }
|
|
|
+ i++;
|
|
|
+ }
|
|
|
+ PageListAdd pageList = new PageListAdd(saleOrderList);
|
|
|
+ pageList.setColumnData(columnDataList);
|
|
|
+ //PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null,saleOrderList);
|
|
|
return success(pageList);
|
|
|
}
|
|
|
|
|
|
+ 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
|