123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 |
- package com.steerinfo.dil.controller;
- import com.steerinfo.dil.feign.ColumnDataFeign;
- import com.steerinfo.dil.feign.ESFeign;
- import com.steerinfo.dil.service.impl.TmsshipTotalResultServiceImpl;
- 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.ApiImplicitParam;
- import io.swagger.annotations.ApiImplicitParams;
- import io.swagger.annotations.ApiOperation;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.*;
- import java.math.BigDecimal;
- import java.text.SimpleDateFormat;
- import java.util.*;
- /**
- * TmsshipTotalResult RESTful接口:
- * @author generator
- * @version 1.0-SNAPSHORT 2021-08-19 08:55
- * 类描述
- * 修订历史:
- * 日期:2021-08-19
- * 作者:generator
- * 参考:
- * 描述:TmsshipTotalResult RESTful接口
- * @see null
- * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
- */
- @RestController
- @RequestMapping("/${api.version}/tmsshiptotalresults")
- public class TmsshipTotalResultController extends BaseRESTfulController {
- @Autowired
- TmsshipTotalResultServiceImpl tmsshipTotalResultService;
- @Autowired
- ColumnDataFeign columnDataFeign;
- @Autowired
- ColumnDataUtil columnDataUtil;
- @Autowired
- ESFeign esFeign;
- private final SimpleDateFormat sdfDateTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
- /**
- * 展示水路货物运单列表
- * @param mapVal
- * @param pageNum
- * @param pageSize
- * @param apiId
- * @return
- */
- @ApiOperation(value="展示水路货物运单", notes="分页查询")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "apiId", value = "56", required = false, dataType = "BigDecimal"),
- })
- @PostMapping(value = "/listAllOrders")
- public RESTfulResult listAllOrders(@RequestBody(required = false) Map<String,Object> mapVal,
- Integer pageNum,
- Integer pageSize,
- Integer apiId){
- List<Map<String, Object>> detailListTotal = tmsshipTotalResultService.getOrderList(mapVal);
- PageHelper.startPage(pageNum, pageSize);
- //分页查询数据
- List<Map<String, Object>> columnList = tmsshipTotalResultService.getOrderList(mapVal);
- PageListAdd data = columnDataUtil.tableColumnData(apiId, detailListTotal, columnList);
- return success(data);
- }
- /**
- * 展示船只信息
- * @param mapVal
- * @param pageNum
- * @param pageSize
- * @param apiId
- * @return
- */
- @ApiOperation(value="展示船只信息", notes="分页查询")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "apiId", value = "138", required = false, dataType = "BigDecimal"),
- })
- @PostMapping(value = "/getCapacityList")
- public RESTfulResult getCapacityList(@RequestBody(required = false) Map<String,Object> mapVal,
- Integer pageNum,
- Integer pageSize,
- Integer apiId,
- String con){
- if (mapVal == null) {
- mapVal = new HashMap<>();
- }
- mapVal.put("con",con);
- List<Map<String, Object>> detailListTotal = tmsshipTotalResultService.getCapacity(mapVal);
- PageHelper.startPage(pageNum, pageSize);
- //分页查询数据
- List<Map<String, Object>> columnList = tmsshipTotalResultService.getCapacity(mapVal);
- PageListAdd data = columnDataUtil.tableColumnData(apiId, detailListTotal, columnList);
- return success(data);
- }
- //批复车皮
- @PostMapping("/addPleaseResult")
- public RESTfulResult addPleaseResult(@RequestBody(required = false) Map<String, Object> mapVal){
- if (mapVal == null) {
- mapVal = new HashMap<>();
- }
- return success(tmsshipTotalResultService.addPleaseResult(mapVal));
- }
- @PostMapping("/editPleaseResult")
- public RESTfulResult editPleaseResult(@RequestBody(required = false) Map<String, Object> mapVal){
- if (mapVal == null) {
- mapVal = new HashMap<>();
- }
- return success(tmsshipTotalResultService.editPleaseResult(mapVal));
- }
- @PostMapping("/getAllPleaseResult")
- public RESTfulResult getAllPleaseResult(@RequestBody(required = false) Map<String, Object> mapVal,
- Integer pageNum,
- Integer pageSize,
- Integer apiId,
- String con,
- String startTime,
- String endTime){
- if (mapVal == null) {
- mapVal = new HashMap<>();
- }
- mapVal.put("con",con);
- if(startTime!=null && endTime!=null){
- DataChange.queryDataByDateTime(startTime,endTime,mapVal,sdfDateTime);
- }
- List<Map<String, Object>> detailListTotal = tmsshipTotalResultService.getCapacity(mapVal);
- PageHelper.startPage(pageNum, pageSize);
- //分页查询数据
- List<Map<String, Object>> columnList = tmsshipTotalResultService.getAllPleaseResult(mapVal);
- PageListAdd data = columnDataUtil.tableColumnData(apiId, detailListTotal, columnList);
- return success(data);
- }
- @PostMapping("/getPleaseResult/{resultId}")
- public RESTfulResult getPleaseResult(@PathVariable("resultId") BigDecimal resultId){
- return success(tmsshipTotalResultService.getPleaseResult(resultId));
- }
- @PostMapping("/getRealNumber")
- public RESTfulResult getRealNumber(@RequestBody(required = false) Map<String, Object> map){
- DataChange.queryDataByDateTime(map.get("resultDate")+"",null,map,sdfDateTime);
- return success(tmsshipTotalResultService.getRealNumber(map));
- }
- }
|