123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- package com.steerinfo.dil.controller;
- import com.steerinfo.dil.service.ITmstruckWeightResultService;
- import com.steerinfo.dil.util.BaseRESTfulController;
- import com.steerinfo.dil.util.ColumnDataUtil;
- 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.util.HashMap;
- import java.util.List;
- import java.util.Map;
- /**
- * TmstruckWeightResult RESTful接口:
- * @author generator
- * @version 1.0-SNAPSHORT 2021-09-09 02:21
- * 类描述
- * 修订历史:
- * 日期:2021-09-09
- * 作者:generator
- * 参考:
- * 描述:TmstruckWeightResult RESTful接口
- * @see null
- * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
- */
- @RestController
- @RequestMapping("/${api.version}/tmstruckweightresults")
- public class TmstruckWeightResultController extends BaseRESTfulController {
- @Autowired
- ITmstruckWeightResultService tmstruckWeightResultService;
- @Autowired
- ColumnDataUtil columnDataUtil;
- @ApiOperation(value="新增计量实绩 ")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "mapValue", value = "总实绩ID、计皮点、计毛点", required = false, dataType = "Map"),
- })
- @PostMapping("/addWeightResult")
- public RESTfulResult addWeightResult(@RequestBody Map<String, Object> mapValue){
- int i = tmstruckWeightResultService.addWeightResult(mapValue);
- return success(i);
- }
- @ApiOperation(value="查询计毛实绩")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
- @ApiImplicitParam(name = "apiId(102)", value = "动态表头", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
- })
- @PostMapping("/getAllJiMaoResult")
- public RESTfulResult getAllJiMaoResult(@RequestBody(required=false) Map<String,Object> mapValue,
- Integer apiId,
- Integer pageNum,
- Integer pageSize,
- Integer orderType
- ){
- if (mapValue == null){
- mapValue = new HashMap<>();
- }
- if(orderType != null){
- mapValue.put("orderTypee", orderType);
- }
- //不分页筛选数据
- List<Map<String, Object>> allJiMaoResult = tmstruckWeightResultService.getAllJiMaoResult(mapValue);
- PageHelper.startPage(pageNum,pageSize);
- //分页数据
- List<Map<String, Object>> jiMaoResult = tmstruckWeightResultService.getAllJiMaoResult(mapValue);
- PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allJiMaoResult,jiMaoResult);
- return success(pageList);
- }
- @ApiOperation(value="查询计皮实绩")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
- @ApiImplicitParam(name = "apiId(104)", value = "动态表头", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
- })
- @PostMapping("/getAllJiPiResult")
- public RESTfulResult getAllJiPiResult(@RequestBody(required=false) Map<String,Object> mapValue,
- Integer apiId,
- Integer pageNum,
- Integer pageSize,
- Integer orderType
- ){
- if (mapValue == null){
- mapValue = new HashMap<>();
- }
- if(orderType != null){
- mapValue.put("orderTypee", orderType);
- }
- //不分页筛选数据
- List<Map<String, Object>> allJiMaoResult = tmstruckWeightResultService.getAllJiPiResult(mapValue);
- PageHelper.startPage(pageNum,pageSize);
- //分页数据
- List<Map<String, Object>> jiMaoResult = tmstruckWeightResultService.getAllJiPiResult(mapValue);
- PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allJiMaoResult,jiMaoResult);
- return success(pageList);
- }
- @ApiOperation(value="采集新增计毛实绩 ")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "mapValue", value = "采集的数据", required = false, dataType = "Map"),
- })
- @PostMapping("/addJiMaoResult")
- public RESTfulResult addJiMaoResult(@RequestBody Map<String, Object> mapValue){
- int i = tmstruckWeightResultService.addJiMaoResult(mapValue);
- return success(i);
- }
- @ApiOperation(value="采集新增计皮实绩 ")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "mapValue", value = "采集的数据", required = false, dataType = "Map"),
- })
- @PostMapping("/addJiPiResult")
- public RESTfulResult addJiPiResult(@RequestBody Map<String, Object> mapValue){
- int i = tmstruckWeightResultService.addJiPiResult(mapValue);
- return success(i);
- }
- }
-
|