|
@@ -1,5 +1,7 @@
|
|
|
package com.steerinfo.dil.controller;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
+import com.steerinfo.dil.feign.ESFeign;
|
|
|
import com.steerinfo.dil.model.TmstrainPleaseApproveResult;
|
|
|
import com.steerinfo.dil.service.ITmstrainPleaseApproveResultService;
|
|
|
import com.steerinfo.dil.util.BaseRESTfulController;
|
|
@@ -23,6 +25,7 @@ import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* TmstrainPleaseApproveResult RESTful接口:
|
|
|
+ *
|
|
|
* @author generator
|
|
|
* @version 1.0-SNAPSHORT 2021-08-30 02:27
|
|
|
* 类描述
|
|
@@ -31,8 +34,8 @@ import java.util.Map;
|
|
|
* 作者:generator
|
|
|
* 参考:
|
|
|
* 描述:TmstrainPleaseApproveResult RESTful接口
|
|
|
- * @see null
|
|
|
* @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
|
|
|
+ * @see null
|
|
|
*/
|
|
|
@RestController
|
|
|
@RequestMapping("/${api.version}/tmstrainpleaseapproveresults")
|
|
@@ -44,7 +47,10 @@ public class TmstrainPleaseApproveResultController extends BaseRESTfulController
|
|
|
@Autowired
|
|
|
ColumnDataUtil columnDataUtil;
|
|
|
|
|
|
- @ApiOperation(value="查询请车作业")
|
|
|
+ @Autowired
|
|
|
+ ESFeign esFeign;
|
|
|
+
|
|
|
+ @ApiOperation(value = "查询请车作业")
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
|
|
|
@ApiImplicitParam(name = "apiId(57)", value = "动态表头", required = false, dataType = "Integer"),
|
|
@@ -53,60 +59,101 @@ public class TmstrainPleaseApproveResultController extends BaseRESTfulController
|
|
|
@ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
|
|
|
})
|
|
|
@PostMapping("/getAllWagonPlease")
|
|
|
- public RESTfulResult getAllWagonPlease(@RequestBody(required=false) Map<String,Object> mapValue,
|
|
|
+ public RESTfulResult getAllWagonPlease(@RequestBody(required = false) Map<String, Object> mapValue,
|
|
|
Integer apiId,
|
|
|
Integer pageNum,
|
|
|
Integer pageSize,
|
|
|
Integer status,
|
|
|
- Integer resultType){
|
|
|
- mapValue.put("status", status);
|
|
|
- mapValue.put("resultType", resultType);
|
|
|
- //不分页筛选数据
|
|
|
- List<Map<String, Object>> wagonPleaseTotal = tmstrainPleaseApproveResultService.getAllWagonPlease(mapValue);
|
|
|
- PageHelper.startPage(pageNum,pageSize);
|
|
|
+ Integer resultType) {
|
|
|
+ //初始化过滤
|
|
|
+ List<Map<String, Object>> wagonPleaseList = null;
|
|
|
+ //如果有条件查询则跳过初始化,和创建索引
|
|
|
+ if (mapValue == null) {
|
|
|
+ mapValue.put("resultType", resultType);
|
|
|
+ mapValue.put("status", status);
|
|
|
+ //将查询结果存入索引中
|
|
|
+ wagonPleaseList = tmstrainPleaseApproveResultService.getAllWagonPlease(mapValue);
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ //添加索引
|
|
|
+ map.put("index", "get_all_wagon_please");
|
|
|
+ //添加id
|
|
|
+ map.put("indexId", "resultId3");
|
|
|
+ wagonPleaseList.add(map);
|
|
|
+ //新建索引
|
|
|
+ String s = JSON.toJSONString(wagonPleaseList);
|
|
|
+ esFeign.insertIndex(wagonPleaseList);
|
|
|
+ //删除
|
|
|
+ wagonPleaseList.remove(wagonPleaseList.size() - 1);
|
|
|
+ }
|
|
|
+ if (wagonPleaseList == null) {
|
|
|
+ mapValue.put("resultType", resultType);
|
|
|
+ mapValue.put("status", status);
|
|
|
+ wagonPleaseList = tmstrainPleaseApproveResultService.getAllWagonPlease(mapValue);
|
|
|
+ }
|
|
|
+ PageHelper.startPage(pageNum, pageSize);
|
|
|
//分页数据
|
|
|
List<Map<String, Object>> wagonPlease = tmstrainPleaseApproveResultService.getAllWagonPlease(mapValue);
|
|
|
DataChange.changeDateToDayDate(wagonPlease, "resultPleaseDate", "resultPlanDate");
|
|
|
- PageListAdd pageList = columnDataUtil.tableColumnData(apiId, wagonPleaseTotal,wagonPlease);
|
|
|
+ PageListAdd pageList = columnDataUtil.tableColumnData(apiId, wagonPleaseList, wagonPlease);
|
|
|
return success(pageList);
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="通过Id查询请车作业")
|
|
|
- @PostMapping ("/getWagonPleaseById/{resultId}")
|
|
|
- public RESTfulResult getWagonPleaseById(@PathVariable("resultId")Integer resultId){
|
|
|
+ @PostMapping("/getAllWagonPlease/{apiId}")
|
|
|
+ public RESTfulResult getAllWagonPleaseByCon(@PathVariable("apiId") Integer apiId,
|
|
|
+ @RequestBody(required = false) Map<String, Object> mapValue,
|
|
|
+ Integer pageNum,
|
|
|
+ Integer pageSize,
|
|
|
+ Integer resultType,
|
|
|
+ Integer status,
|
|
|
+ String con) {
|
|
|
+ if (mapValue == null) {
|
|
|
+ mapValue = new HashMap<>();
|
|
|
+ }
|
|
|
+ mapValue.put("status", status);
|
|
|
+ mapValue.put("resultType", resultType);
|
|
|
+ //设置要查询的索引名称
|
|
|
+ String index = "get_all_wagon_please";
|
|
|
+ //获取查询结果
|
|
|
+ PageListAdd list = esFeign.getConResult(mapValue, index, apiId, pageNum, pageSize, con);
|
|
|
+ return success(list);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "通过Id查询请车作业")
|
|
|
+ @PostMapping("/getWagonPleaseById/{resultId}")
|
|
|
+ public RESTfulResult getWagonPleaseById(@PathVariable("resultId") Integer resultId) {
|
|
|
List<Map<String, Object>> wagonPleaseById = tmstrainPleaseApproveResultService.getWagonPleaseById(resultId);
|
|
|
return success(wagonPleaseById);
|
|
|
}
|
|
|
|
|
|
|
|
|
- @ApiOperation(value="新增请车作业")
|
|
|
+ @ApiOperation(value = "新增请车作业")
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "amstrainWagonPlease", value = "请车作业对象", required = false, dataType = "AmstrainWagonPlease"),
|
|
|
})
|
|
|
@PostMapping("/addWagonPlease")
|
|
|
- public RESTfulResult addWagonPlease(@RequestBody TmstrainPleaseApproveResult tmstrainPleaseApproveResult){
|
|
|
+ public RESTfulResult addWagonPlease(@RequestBody TmstrainPleaseApproveResult tmstrainPleaseApproveResult) {
|
|
|
int i = tmstrainPleaseApproveResultService.insertSelective(tmstrainPleaseApproveResult);
|
|
|
return success(i);
|
|
|
}
|
|
|
|
|
|
|
|
|
- @ApiOperation(value="修改请车作业")
|
|
|
+ @ApiOperation(value = "修改请车作业")
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "tmstrainPleaseApproveResult", value = "请车作业实绩对象", required = false, dataType = "TmstrainPleaseApproveResult"),
|
|
|
})
|
|
|
@PostMapping("/updateWagonPlease")
|
|
|
- public RESTfulResult updateWagonPlease(@RequestBody TmstrainPleaseApproveResult tmstrainPleaseApproveResult){
|
|
|
+ public RESTfulResult updateWagonPlease(@RequestBody TmstrainPleaseApproveResult tmstrainPleaseApproveResult) {
|
|
|
tmstrainPleaseApproveResult.setUpdateTime(new Date());
|
|
|
int i = tmstrainPleaseApproveResultService.updateByPrimaryKeySelective(tmstrainPleaseApproveResult);
|
|
|
return success(i);
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="逻辑删除请车作业 设置状态码为 3")
|
|
|
+ @ApiOperation(value = "逻辑删除请车作业 设置状态码为 3")
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "tmstrainPleaseApproveResult", value = "请车作业实绩对象", required = false, dataType = "TmstrainPleaseApproveResult"),
|
|
|
})
|
|
|
@PostMapping("/deleteWagonPlease/{resultId}")
|
|
|
- public RESTfulResult deleteWagonPlease(@PathVariable("resultId") Integer resultId){
|
|
|
+ public RESTfulResult deleteWagonPlease(@PathVariable("resultId") Integer resultId) {
|
|
|
TmstrainPleaseApproveResult tmstrainPleaseApproveResult = new TmstrainPleaseApproveResult();
|
|
|
tmstrainPleaseApproveResult.setResultId(new BigDecimal(resultId));
|
|
|
tmstrainPleaseApproveResult.setStatus(new BigDecimal(3));
|
|
@@ -114,12 +161,12 @@ public class TmstrainPleaseApproveResultController extends BaseRESTfulController
|
|
|
return success(i);
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="下发请车作业 设置状态码为 1")
|
|
|
+ @ApiOperation(value = "下发请车作业 设置状态码为 1")
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "resultId", value = "请车作业实绩对象", required = false, dataType = "Integer"),
|
|
|
})
|
|
|
@PostMapping("/sendWagonPlease/{resultId}")
|
|
|
- public RESTfulResult sendWagonPlease(@PathVariable("resultId") Integer resultId){
|
|
|
+ public RESTfulResult sendWagonPlease(@PathVariable("resultId") Integer resultId) {
|
|
|
TmstrainPleaseApproveResult tmstrainPleaseApproveResult = new TmstrainPleaseApproveResult();
|
|
|
tmstrainPleaseApproveResult.setResultId(new BigDecimal(resultId));
|
|
|
tmstrainPleaseApproveResult.setStatus(new BigDecimal(1));
|
|
@@ -129,37 +176,39 @@ public class TmstrainPleaseApproveResultController extends BaseRESTfulController
|
|
|
|
|
|
//********************************下拉框******************************************
|
|
|
|
|
|
- @ApiOperation(value="查询所有发货单位")
|
|
|
+ @ApiOperation(value = "查询所有发货单位")
|
|
|
@GetMapping("/getShipper")
|
|
|
- public RESTfulResult getShipper(){
|
|
|
+ public RESTfulResult getShipper() {
|
|
|
List<Map<String, Object>> shipper = tmstrainPleaseApproveResultService.getShipper();
|
|
|
return success(shipper);
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="查询所有发运计划")
|
|
|
+ @ApiOperation(value = "查询所有发运计划")
|
|
|
@GetMapping("/getRailPlan")
|
|
|
- public RESTfulResult getRailPlan(){
|
|
|
+ public RESTfulResult getRailPlan() {
|
|
|
List<Map<String, Object>> shipper = tmstrainPleaseApproveResultService.getRailPlan();
|
|
|
return success(shipper);
|
|
|
}
|
|
|
+
|
|
|
//内转物流
|
|
|
- @ApiOperation(value="查询所有发站/到站")
|
|
|
+ @ApiOperation(value = "查询所有发站/到站")
|
|
|
@GetMapping("/getArrivalSend")
|
|
|
- public RESTfulResult getArrivalSend(){
|
|
|
+ public RESTfulResult getArrivalSend() {
|
|
|
List<Map<String, Object>> send = tmstrainPleaseApproveResultService.getArrivalSend();
|
|
|
return success(send);
|
|
|
}
|
|
|
+
|
|
|
//查询请车计划号
|
|
|
- @ApiOperation(value="查询请车计划号")
|
|
|
+ @ApiOperation(value = "查询请车计划号")
|
|
|
@GetMapping("/getPleasePlanNo")
|
|
|
- public RESTfulResult getPleasePlanNo(){
|
|
|
+ public RESTfulResult getPleasePlanNo() {
|
|
|
List<Map<String, Object>> PlanNo = tmstrainPleaseApproveResultService.getPleasePlanNo();
|
|
|
return success(PlanNo);
|
|
|
}
|
|
|
|
|
|
//******************************批车作业**************************************
|
|
|
|
|
|
- @ApiOperation(value="查询批车作业")
|
|
|
+ @ApiOperation(value = "查询批车作业")
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
|
|
|
@ApiImplicitParam(name = "apiId(70)", value = "动态表头", required = false, dataType = "Integer"),
|
|
@@ -168,59 +217,96 @@ public class TmstrainPleaseApproveResultController extends BaseRESTfulController
|
|
|
@ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
|
|
|
})
|
|
|
@PostMapping("/getApproveAllWagonPlease")
|
|
|
- public RESTfulResult getApproveAllWagonPlease(@RequestBody(required=false) Map<String,Object> mapValue,
|
|
|
- Integer apiId,
|
|
|
- Integer pageNum,
|
|
|
- Integer pageSize,
|
|
|
- Integer resultType){
|
|
|
- mapValue.put("resultType", resultType);
|
|
|
- //不分页筛选数据
|
|
|
- List<Map<String, Object>> wagonPleaseTotal = tmstrainPleaseApproveResultService.getAllApproveWagonPlease(mapValue);
|
|
|
- PageHelper.startPage(pageNum,pageSize);
|
|
|
+ public RESTfulResult getApproveAllWagonPlease(@RequestBody(required = false) Map<String, Object> mapValue,
|
|
|
+ Integer apiId,
|
|
|
+ Integer pageNum,
|
|
|
+ Integer pageSize,
|
|
|
+ Integer resultType) {
|
|
|
+ //初始化过滤
|
|
|
+ List<Map<String, Object>> approveWagonPleaseList = null;
|
|
|
+ //如果有条件查询则跳过初始化,和创建索引
|
|
|
+ if (mapValue == null) {
|
|
|
+ mapValue.put("resultType", resultType);
|
|
|
+ //将查询结果存入索引中
|
|
|
+ approveWagonPleaseList = tmstrainPleaseApproveResultService.getAllApproveWagonPlease(mapValue);
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ //添加索引
|
|
|
+ map.put("index", "get_approve_wagon_please");
|
|
|
+ //添加id
|
|
|
+ map.put("indexId", "resultId4");
|
|
|
+ approveWagonPleaseList.add(map);
|
|
|
+ //新建索引
|
|
|
+ String s = JSON.toJSONString(approveWagonPleaseList);
|
|
|
+ esFeign.insertIndex(approveWagonPleaseList);
|
|
|
+ //删除
|
|
|
+ approveWagonPleaseList.remove(approveWagonPleaseList.size() - 1);
|
|
|
+ }
|
|
|
+ if (approveWagonPleaseList == null) {
|
|
|
+ mapValue.put("resultType", resultType);
|
|
|
+ approveWagonPleaseList = tmstrainPleaseApproveResultService.getAllApproveWagonPlease(mapValue);
|
|
|
+ }
|
|
|
+ PageHelper.startPage(pageNum, pageSize);
|
|
|
//分页数据
|
|
|
List<Map<String, Object>> wagonPlease = tmstrainPleaseApproveResultService.getAllApproveWagonPlease(mapValue);
|
|
|
DataChange.changeDateToDayDate(wagonPlease, "resultApproveDate");
|
|
|
- PageListAdd pageList = columnDataUtil.tableColumnData(apiId, wagonPleaseTotal,wagonPlease);
|
|
|
+ PageListAdd pageList = columnDataUtil.tableColumnData(apiId, approveWagonPleaseList, wagonPlease);
|
|
|
return success(pageList);
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="通过Id查询批车作业")
|
|
|
- @PostMapping ("/getApproveWagonPleaseById/{resultId}")
|
|
|
- public RESTfulResult getApproveWagonPleaseById(@PathVariable("resultId")Integer resultId){
|
|
|
+ @PostMapping("/getApproveAllWagonPlease/{apiId}")
|
|
|
+ public RESTfulResult getApproveAllWagonPleaseByCon(@PathVariable("apiId") Integer apiId,
|
|
|
+ @RequestBody(required = false) Map<String, Object> mapValue,
|
|
|
+ Integer pageNum,
|
|
|
+ Integer pageSize,
|
|
|
+ Integer resultType,
|
|
|
+ String con) {
|
|
|
+ if (mapValue == null) {
|
|
|
+ mapValue = new HashMap<>();
|
|
|
+ }
|
|
|
+ mapValue.put("resultType", resultType);
|
|
|
+ //设置要查询的索引名称
|
|
|
+ String index = "get_approve_wagon_please";
|
|
|
+ //获取查询结果
|
|
|
+ PageListAdd list = esFeign.getConResult(mapValue, index, apiId, pageNum, pageSize, con);
|
|
|
+ return success(list);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "通过Id查询批车作业")
|
|
|
+ @PostMapping("/getApproveWagonPleaseById/{resultId}")
|
|
|
+ public RESTfulResult getApproveWagonPleaseById(@PathVariable("resultId") Integer resultId) {
|
|
|
List<Map<String, Object>> approveWagonPleaseById = tmstrainPleaseApproveResultService.getApproveWagonPleaseById(resultId);
|
|
|
return success(approveWagonPleaseById);
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="新增批车作业")
|
|
|
+ @ApiOperation(value = "新增批车作业")
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "tmstrainPleaseApproveResult", value = "请车作业实绩对象", required = false, dataType = "TmstrainPleaseApproveResult"),
|
|
|
})
|
|
|
@PostMapping("/addApproveWagonPlease")
|
|
|
- public RESTfulResult addApproveWagonPlease(@RequestBody TmstrainPleaseApproveResult tmstrainPleaseApproveResult){
|
|
|
+ public RESTfulResult addApproveWagonPlease(@RequestBody TmstrainPleaseApproveResult tmstrainPleaseApproveResult) {
|
|
|
tmstrainPleaseApproveResult.setStatus(new BigDecimal(2));
|
|
|
int i = tmstrainPleaseApproveResultService.updateByPrimaryKeySelective(tmstrainPleaseApproveResult);
|
|
|
return success(i);
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="修改批车作业")
|
|
|
+ @ApiOperation(value = "修改批车作业")
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "tmstrainPleaseApproveResult", value = "请车作业实绩对象", required = false, dataType = "TmstrainPleaseApproveResult"),
|
|
|
})
|
|
|
@PostMapping("/updateApproveWagonPlease")
|
|
|
- public RESTfulResult updateApproveWagonPlease(@RequestBody TmstrainPleaseApproveResult tmstrainPleaseApproveResult){
|
|
|
+ public RESTfulResult updateApproveWagonPlease(@RequestBody TmstrainPleaseApproveResult tmstrainPleaseApproveResult) {
|
|
|
tmstrainPleaseApproveResult.setUpdateTime(new Date()); //设置更新时间
|
|
|
int i = tmstrainPleaseApproveResultService.updateByPrimaryKeySelective(tmstrainPleaseApproveResult);
|
|
|
return success(i);
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
- @ApiOperation(value="逻辑删除批车作业")
|
|
|
+ @ApiOperation(value = "逻辑删除批车作业")
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "resultId", value = "请车作业实绩对象", required = false, dataType = "Integer"),
|
|
|
})
|
|
|
@PostMapping("/deleteApproveWagonPlease/{resultId}")
|
|
|
- public RESTfulResult deleteApproveWagonPlease(@PathVariable("resultId") Integer resultId){
|
|
|
+ public RESTfulResult deleteApproveWagonPlease(@PathVariable("resultId") Integer resultId) {
|
|
|
TmstrainPleaseApproveResult tmstrainPleaseApproveResult = new TmstrainPleaseApproveResult();
|
|
|
tmstrainPleaseApproveResult.setStatus(new BigDecimal(3));
|
|
|
tmstrainPleaseApproveResult.setResultId(new BigDecimal(resultId));
|
|
@@ -236,21 +322,23 @@ public class TmstrainPleaseApproveResultController extends BaseRESTfulController
|
|
|
* @return
|
|
|
*/
|
|
|
|
|
|
- @ApiOperation(value="新增请车作业")
|
|
|
+ @ApiOperation(value = "新增请车作业")
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "amstrainWagonPlease", value = "请车作业对象", required = false, dataType = "AmstrainWagonPlease"),
|
|
|
})
|
|
|
@PostMapping("/addWagonApprove")
|
|
|
- public RESTfulResult addWagonApprove(@RequestBody Map<String,Object> map){
|
|
|
+ public RESTfulResult addWagonApprove(@RequestBody Map<String, Object> map) {
|
|
|
int i = tmstrainPleaseApproveResultService.addPleaseApprove(map);
|
|
|
return success(i);
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* 内转查询请车实绩
|
|
|
+ *
|
|
|
* @return
|
|
|
*/
|
|
|
|
|
|
- @ApiOperation(value="查询请车作业")
|
|
|
+ @ApiOperation(value = "查询请车作业")
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
|
|
|
@ApiImplicitParam(name = "apiId(199)", value = "动态表头", required = false, dataType = "Integer"),
|
|
@@ -259,45 +347,82 @@ public class TmstrainPleaseApproveResultController extends BaseRESTfulController
|
|
|
@ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
|
|
|
})
|
|
|
@PostMapping("/getAllWagonPleaseForConverted")
|
|
|
- public RESTfulResult getAllWagonPleaseForConverted(@RequestBody(required=false) Map<String,Object> mapValue,
|
|
|
+ public RESTfulResult getAllWagonPleaseForConverted(@RequestBody(required = false) Map<String, Object> mapValue,
|
|
|
Integer apiId,
|
|
|
Integer pageNum,
|
|
|
Integer pageSize,
|
|
|
- Integer status){
|
|
|
- if(mapValue == null){
|
|
|
- mapValue = new HashMap<>();
|
|
|
+ Integer status) {
|
|
|
+ //初始化过滤
|
|
|
+ List<Map<String, Object>> wagonPleaseConvertedList = null;
|
|
|
+ //如果有条件查询则跳过初始化,和创建索引
|
|
|
+ if (mapValue == null) {
|
|
|
+ mapValue.put("status", status);
|
|
|
+ //将查询结果存入索引中
|
|
|
+ wagonPleaseConvertedList = tmstrainPleaseApproveResultService.selectPleaseApprovePlanForConverted(mapValue);
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ //添加索引
|
|
|
+ map.put("index", "get_tmstrain_wagon_load");
|
|
|
+ //添加id
|
|
|
+ map.put("indexId", "resultId5");
|
|
|
+ wagonPleaseConvertedList.add(map);
|
|
|
+ //新建索引
|
|
|
+ String s = JSON.toJSONString(wagonPleaseConvertedList);
|
|
|
+ esFeign.insertIndex(wagonPleaseConvertedList);
|
|
|
+ //删除
|
|
|
+ wagonPleaseConvertedList.remove(wagonPleaseConvertedList.size() - 1);
|
|
|
}
|
|
|
- mapValue.put("status", status);
|
|
|
- //不分页筛选数据
|
|
|
- List<Map<String, Object>> wagonPleaseTotal = tmstrainPleaseApproveResultService.selectPleaseApprovePlanForConverted(mapValue);
|
|
|
- PageHelper.startPage(pageNum,pageSize);
|
|
|
+ if (wagonPleaseConvertedList == null) {
|
|
|
+ mapValue.put("status", status);
|
|
|
+ wagonPleaseConvertedList = tmstrainPleaseApproveResultService.selectPleaseApprovePlanForConverted(mapValue);
|
|
|
+ }
|
|
|
+ PageHelper.startPage(pageNum, pageSize);
|
|
|
//分页数据
|
|
|
List<Map<String, Object>> wagonPlease = tmstrainPleaseApproveResultService.selectPleaseApprovePlanForConverted(mapValue);
|
|
|
DataChange.changeDateToDayDate(wagonPlease, "resultPleaseDate", "resultPlanDate");
|
|
|
- PageListAdd pageList = columnDataUtil.tableColumnData(apiId, wagonPleaseTotal,wagonPlease);
|
|
|
+ PageListAdd pageList = columnDataUtil.tableColumnData(apiId, wagonPleaseConvertedList, wagonPlease);
|
|
|
return success(pageList);
|
|
|
}
|
|
|
|
|
|
+ @PostMapping("/getAllWagonPleaseForConverted/{apiId}")
|
|
|
+ public RESTfulResult getAllWagonPleaseForConverted(@PathVariable("apiId") Integer apiId,
|
|
|
+ @RequestBody(required = false) Map<String, Object> mapValue,
|
|
|
+ Integer pageNum,
|
|
|
+ Integer pageSize,
|
|
|
+ Integer status,
|
|
|
+ String con) {
|
|
|
+ if (mapValue == null) {
|
|
|
+ mapValue = new HashMap<>();
|
|
|
+ }
|
|
|
+ mapValue.put("status", status);
|
|
|
+ //设置要查询的索引名称
|
|
|
+ String index = "get_wagon_please_converted";
|
|
|
+ //获取查询结果
|
|
|
+ PageListAdd list = esFeign.getConResult(mapValue, index, apiId, pageNum, pageSize, con);
|
|
|
+ return success(list);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 通过id查询请车作业
|
|
|
+ *
|
|
|
* @param resultId
|
|
|
* @return
|
|
|
*/
|
|
|
- @ApiOperation(value="通过Id查询请车作业")
|
|
|
- @PostMapping ("/getPleasePlanByResultId/{resultId}")
|
|
|
- public RESTfulResult getPleasePlanByResultId(@PathVariable("resultId")Integer resultId){
|
|
|
+ @ApiOperation(value = "通过Id查询请车作业")
|
|
|
+ @PostMapping("/getPleasePlanByResultId/{resultId}")
|
|
|
+ public RESTfulResult getPleasePlanByResultId(@PathVariable("resultId") Integer resultId) {
|
|
|
List<Map<String, Object>> WagonPleaseById = tmstrainPleaseApproveResultService.selectPleasePlanByResultId(resultId);
|
|
|
return success(WagonPleaseById);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 通过id查询批车作业
|
|
|
+ *
|
|
|
* @param resultId
|
|
|
* @return
|
|
|
*/
|
|
|
- @ApiOperation(value="通过id查询批车作业")
|
|
|
- @PostMapping ("/getApproveByResultId/{resultId}")
|
|
|
- public RESTfulResult getApproveByResultId(@PathVariable("resultId")Integer resultId){
|
|
|
+ @ApiOperation(value = "通过id查询批车作业")
|
|
|
+ @PostMapping("/getApproveByResultId/{resultId}")
|
|
|
+ public RESTfulResult getApproveByResultId(@PathVariable("resultId") Integer resultId) {
|
|
|
List<Map<String, Object>> ApproveBYResultId = tmstrainPleaseApproveResultService.selectApproveBYResultId(resultId);
|
|
|
return success(ApproveBYResultId);
|
|
|
}
|