TmstruckEnfactoryResultController.java 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. package com.steerinfo.dil.controller;
  2. import com.steerinfo.dil.service.ITmstruckEnfactoryResultService;
  3. import com.steerinfo.dil.util.BaseRESTfulController;
  4. import com.steerinfo.dil.util.ColumnDataUtil;
  5. import com.steerinfo.dil.util.PageListAdd;
  6. import com.steerinfo.framework.controller.RESTfulResult;
  7. import com.steerinfo.framework.service.pagehelper.PageHelper;
  8. import io.swagger.annotations.ApiImplicitParam;
  9. import io.swagger.annotations.ApiImplicitParams;
  10. import io.swagger.annotations.ApiOperation;
  11. import org.springframework.beans.factory.annotation.Autowired;
  12. import org.springframework.web.bind.annotation.*;
  13. import java.util.HashMap;
  14. import java.util.List;
  15. import java.util.Map;
  16. /**
  17. * TmstruckEnfactoryResult RESTful接口:
  18. * @author generator
  19. * @version 1.0-SNAPSHORT 2021-09-08 06:23
  20. * 类描述
  21. * 修订历史:
  22. * 日期:2021-09-08
  23. * 作者:TXF
  24. * 参考:
  25. * 描述:TmstruckEnfactoryResult RESTful接口
  26. * @see null
  27. * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
  28. */
  29. @RestController
  30. @RequestMapping("/${api.version}/tmstruckenfactoryresults")
  31. public class TmstruckEnfactoryResultController extends BaseRESTfulController {
  32. @Autowired
  33. ITmstruckEnfactoryResultService tmstruckEnfactoryResultService;
  34. @Autowired
  35. ColumnDataUtil columnDataUtil;
  36. @ApiOperation(value="查询所有的进厂实绩")
  37. @ApiImplicitParams({
  38. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  39. @ApiImplicitParam(name = "apiId(99)", value = "动态表头", required = false, dataType = "Integer"),
  40. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  41. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  42. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  43. })
  44. @PostMapping("/getAllEnFactoryResult")
  45. public RESTfulResult getAllEnFactoryResult(@RequestBody(required=false) Map<String,Object> mapValue,
  46. Integer apiId,
  47. Integer pageNum,
  48. Integer pageSize,
  49. Integer orderType
  50. ){
  51. mapValue.put("orderTypee", orderType);
  52. //不分页筛选数据
  53. List<Map<String, Object>> allEnFactoryResult = tmstruckEnfactoryResultService.getAllEnFactoryResult(mapValue);
  54. PageHelper.startPage(pageNum,pageSize);
  55. //分页数据
  56. List<Map<String, Object>> enFactoryResult = tmstruckEnfactoryResultService.getAllEnFactoryResult(mapValue);
  57. PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allEnFactoryResult,enFactoryResult);
  58. return success(pageList);
  59. }
  60. @ApiOperation(value="通过PDA添加进厂实绩")
  61. @ApiImplicitParams({
  62. @ApiImplicitParam(name = "mapValue", value = "门岗名称 运输订单号", required = false, dataType = "Map"),
  63. })
  64. @PostMapping("/enFactoryResultByPDA")
  65. public RESTfulResult enFactoryResultByPDA(@RequestBody(required=false) Map<String,Object> mapValue){
  66. int i = tmstruckEnfactoryResultService.enFactoryResultByPDA(mapValue);
  67. return success(i);
  68. }
  69. @ApiOperation(value="通过门禁进厂")
  70. @ApiImplicitParams({
  71. @ApiImplicitParam(name = "mapValue", value = "门岗名称 运输订单号 车牌号 进厂时间", required = false, dataType = "Map"),
  72. })
  73. @PostMapping("/enFactoryResultByMJ")
  74. public RESTfulResult enFactoryResultByMJ(@RequestBody(required=false) Map<String,Object> mapValue){
  75. int i = tmstruckEnfactoryResultService.enFactoryResultByMJ(mapValue);
  76. return success(i);
  77. }
  78. @ApiOperation(value="新增进厂作业实绩:oms远程调用")
  79. @ApiImplicitParams({
  80. @ApiImplicitParam(name = "mapValue", value = "总实绩Id、线路起点", required = false, dataType = "Map"),
  81. })
  82. @PostMapping("/addEnFactoryResult")
  83. public RESTfulResult addEnFactoryResult(@RequestBody(required=false) Map<String,Object> mapValue){
  84. int i = tmstruckEnfactoryResultService.addEnFactoryResult(mapValue);
  85. return success(i);
  86. }
  87. }