|
@@ -10,6 +10,7 @@ import com.steerinfo.dil.service.impl.WmspOutboundResultServiceImpl;
|
|
import com.steerinfo.dil.service.impl.WmspOutboundScanResultServiceImpl;
|
|
import com.steerinfo.dil.service.impl.WmspOutboundScanResultServiceImpl;
|
|
import com.steerinfo.dil.util.BaseRESTfulController;
|
|
import com.steerinfo.dil.util.BaseRESTfulController;
|
|
import com.steerinfo.dil.util.ColumnDataUtil;
|
|
import com.steerinfo.dil.util.ColumnDataUtil;
|
|
|
|
+import com.steerinfo.dil.util.DataChange;
|
|
import com.steerinfo.dil.util.PageListAdd;
|
|
import com.steerinfo.dil.util.PageListAdd;
|
|
import com.steerinfo.dil.vo.OutBoundDetailed;
|
|
import com.steerinfo.dil.vo.OutBoundDetailed;
|
|
import com.steerinfo.framework.controller.RESTfulResult;
|
|
import com.steerinfo.framework.controller.RESTfulResult;
|
|
@@ -22,6 +23,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
|
|
+import java.text.SimpleDateFormat;
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
@@ -57,6 +59,7 @@ public class WmspOutboundResultController extends BaseRESTfulController {
|
|
@Autowired
|
|
@Autowired
|
|
private ESFeign esFeign;
|
|
private ESFeign esFeign;
|
|
|
|
|
|
|
|
+ private SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
|
/**
|
|
/**
|
|
* 编写人:hukui
|
|
* 编写人:hukui
|
|
@@ -80,34 +83,13 @@ public class WmspOutboundResultController extends BaseRESTfulController {
|
|
Integer pageNum,
|
|
Integer pageNum,
|
|
Integer pageSize,
|
|
Integer pageSize,
|
|
Integer apiId,
|
|
Integer apiId,
|
|
- String con)
|
|
|
|
|
|
+ String con,
|
|
|
|
+ String startTime,
|
|
|
|
+ String endTime)
|
|
{
|
|
{
|
|
|
|
|
|
- if (con != null) {
|
|
|
|
- if (!"undefined".equals(con)) {
|
|
|
|
- String index = "get_wms_outResult";//设置要查询的索引名称
|
|
|
|
- return success(esFeign.getConResult(mapval, index, apiId, pageNum, pageSize, con));//获取查询结果
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- List<Map<String, Object>> libaryOutBoundList = null;
|
|
|
|
- if (mapval.size() == 0) {
|
|
|
|
- //将查询结果存入索引中
|
|
|
|
- libaryOutBoundList = wmspOutboundResultService.selectResultNumber(mapval);
|
|
|
|
- Map<String, Object> map1 = new HashMap<>();
|
|
|
|
- //添加索引
|
|
|
|
- map1.put("index", "get_wms_outresult");
|
|
|
|
- //添加id
|
|
|
|
- map1.put("indexId", "outBoundResultId");
|
|
|
|
- libaryOutBoundList.add(map1);
|
|
|
|
- //新建索引
|
|
|
|
- esFeign.insertIndex(libaryOutBoundList);
|
|
|
|
- //删除
|
|
|
|
- libaryOutBoundList.remove(libaryOutBoundList.size() - 1);
|
|
|
|
- }
|
|
|
|
- if (libaryOutBoundList == null) {
|
|
|
|
- libaryOutBoundList = wmspOutboundResultService.selectResultNumber(mapval);
|
|
|
|
- }
|
|
|
|
|
|
+ DataChange.queryDataByDateTime(startTime,endTime,mapval,simpleDateFormat);
|
|
|
|
+ List<Map<String, Object>> libaryOutBoundList = wmspOutboundResultService.selectResultNumber(mapval);
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
List<Map<String, Object>> columnList =wmspOutboundResultService.selectResultNumber(mapval);
|
|
List<Map<String, Object>> columnList =wmspOutboundResultService.selectResultNumber(mapval);
|
|
PageListAdd pageList = columnDataUtil.tableColumnData(apiId, libaryOutBoundList, columnList);
|
|
PageListAdd pageList = columnDataUtil.tableColumnData(apiId, libaryOutBoundList, columnList);
|