123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- package com.steerinfo.dil.controller;
- import com.steerinfo.dil.service.ITmstrainMeasureCommissionService;
- 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.List;
- import java.util.Map;
- /**
- * TmstrainMeasureCommission RESTful接口:
- * @author generator
- * @version 1.0-SNAPSHORT 2021-12-09 06:52
- * 类描述
- * 修订历史:
- * 日期:2021-12-09
- * 作者:generator
- * 参考:
- * 描述:TmstrainMeasureCommission RESTful接口
- * @see null
- * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
- */
- @RestController
- @RequestMapping("/${api.version}/tmstrainmeasurecommissions")
- public class TmstrainMeasureCommissionController extends BaseRESTfulController {
- @Autowired
- ITmstrainMeasureCommissionService tmstrainMeasureCommissionService;
- @Autowired
- ColumnDataUtil columnDataUtil;
- @ApiOperation(value = "查询待计量的计量委托并展示")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "apiId(209)", value = "表头", required = false, dataType = "Interger")
- })
- @PostMapping(value = "/getLoadResultToSendMC")
- public RESTfulResult getLoadResultToSendMC(
- @RequestBody(required = false) Map<String, Object> mapValue,
- Integer apiId,
- Integer pageNum,
- Integer pageSize,
- Integer resultType,
- String startTime,
- String endTime,
- String con) {
- mapValue.put("resultType",resultType);
- mapValue.put("startTime",startTime);
- mapValue.put("endTime",endTime);
- mapValue.put("con",con);
- //不分页筛选数据
- PageHelper.startPage(pageNum, pageSize);
- //分页数据
- List<Map<String, Object>> mes = tmstrainMeasureCommissionService.getLoadResultToSendMC(mapValue);
- PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, mes);
- return success(pageList);
- }
- @ApiOperation(value = "查询已计量的计量委托并展示")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "apiId(209)", value = "表头", required = false, dataType = "Interger")
- })
- @PostMapping(value = "/getWeightResult")
- public RESTfulResult getWeightResult(
- @RequestBody(required = false) Map<String, Object> mapValue,
- Integer apiId,
- Integer pageNum,
- Integer pageSize,
- Integer resultType,
- String startTime,
- String endTime,
- String con) {
- mapValue.put("resultType",resultType);
- mapValue.put("startTime",startTime);
- mapValue.put("endTime",endTime);
- mapValue.put("con",con);
- //不分页筛选数据
- PageHelper.startPage(pageNum, pageSize);
- //分页数据
- List<Map<String, Object>> mes = tmstrainMeasureCommissionService.getWeightResult(mapValue);
- PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, mes);
- return success(pageList);
- }
- @ApiOperation(value = "批量新增计量委托")
- @PostMapping(value = "/batchSendMeasureCommission")
- public RESTfulResult batchSendMeasureCommission(@RequestBody(required = false) Map<String, Object> map) {
- System.out.println(map);
- int i = tmstrainMeasureCommissionService.batchSendMeasureCommission(map);
- if (i==-1){
- return success("有委托发送失败,请联系技术人员");
- }
- return success("发送成功");
- }
- }
|