|
@@ -2,20 +2,16 @@ package com.steerinfo.dil.controller;
|
|
|
|
|
|
import com.steerinfo.dil.feign.ESFeign;
|
|
|
import com.steerinfo.dil.mapper.OmstruckOrderMapper;
|
|
|
-import com.steerinfo.dil.model.OmstruckOrder;
|
|
|
import com.steerinfo.dil.service.IOmstruckOrderService;
|
|
|
import com.steerinfo.dil.util.BaseRESTfulController;
|
|
|
import com.steerinfo.dil.util.ColumnDataUtil;
|
|
|
-import com.steerinfo.dil.util.DataChange;
|
|
|
import com.steerinfo.dil.util.PageListAdd;
|
|
|
|
|
|
import com.steerinfo.framework.controller.RESTfulResult;
|
|
|
import com.steerinfo.framework.service.pagehelper.PageHelper;
|
|
|
-import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
-import oracle.jdbc.proxy.annotation.Post;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
@@ -823,44 +819,22 @@ public class OmstruckOrderController extends BaseRESTfulController {
|
|
|
String con,
|
|
|
String carrierSsoId
|
|
|
) {
|
|
|
- int count = 0;
|
|
|
if (orderType != null) {
|
|
|
mapValue.put("orderTypee", orderType);
|
|
|
- count++;
|
|
|
}
|
|
|
|
|
|
if (orderStatus != null) {
|
|
|
mapValue.put("orderStatus", orderStatus);
|
|
|
- count++;
|
|
|
}
|
|
|
- mapValue.put("carrierSsoId",carrierSsoId);
|
|
|
- count++;
|
|
|
- //框计算
|
|
|
- if (con != null) {
|
|
|
- if (!"undefined".equals(con)) {
|
|
|
- String index = "get_driverinfo_for_sale";//设置要查询的索引名称
|
|
|
- return success(esFeign.getConResult(mapValue, index, apiId, pageNum, pageSize, con));//获取查询结果
|
|
|
- }
|
|
|
+ if (con != null && (con.equals("") || con.equals("undefined"))) {
|
|
|
+ con = null;
|
|
|
}
|
|
|
- //不分页筛选数据
|
|
|
- List<Map<String, Object>> DiverInfoForSale = null;
|
|
|
- //如果有条件查询则跳过初始化,和创建索引
|
|
|
- if (mapValue.size() == count) {
|
|
|
- //将查询结果存入索引中
|
|
|
- DiverInfoForSale = omstruckOrderService.selectTransportOrderForSale(mapValue);
|
|
|
- Map<String, Object> map = new HashMap<>();
|
|
|
- //添加索引
|
|
|
- map.put("index", "get_driverinfo_for_sale");
|
|
|
- //添加id
|
|
|
- map.put("indexId", "driverInfoId");
|
|
|
- DiverInfoForSale.add(map);
|
|
|
- //新建索引
|
|
|
- esFeign.insertIndex(DiverInfoForSale);
|
|
|
- //删除
|
|
|
- DiverInfoForSale.remove(DiverInfoForSale.size() - 1);
|
|
|
+ if (con != null && con.length() != 0) {
|
|
|
+ mapValue.put("con", "%" + con + "%");
|
|
|
}
|
|
|
- if (DiverInfoForSale == null)
|
|
|
- DiverInfoForSale = omstruckOrderService.selectTransportOrderForSale(mapValue);
|
|
|
+ mapValue.put("carrierSsoId",carrierSsoId);
|
|
|
+ //不分页筛选数据
|
|
|
+ List<Map<String, Object>> DiverInfoForSale = omstruckOrderService.selectTransportOrderForSale(mapValue);
|
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
|
//分页数据
|
|
|
List<Map<String, Object>> diverInfoForSaleorder = omstruckOrderService.selectTransportOrderForSale(mapValue);
|