WmshGridMaterialController.java 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. package com.steerinfo.dil.controller;
  2. import com.steerinfo.dil.service.IWmshGridMaterialService;
  3. import com.steerinfo.dil.util.ColumnDataUtil;
  4. import com.steerinfo.dil.util.PageListAdd;
  5. import com.steerinfo.framework.controller.BaseRESTfulController;
  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.ApiModelProperty;
  11. import io.swagger.annotations.ApiOperation;
  12. import org.springframework.beans.factory.annotation.Autowired;
  13. import org.springframework.web.bind.annotation.PostMapping;
  14. import org.springframework.web.bind.annotation.RequestBody;
  15. import org.springframework.web.bind.annotation.RequestMapping;
  16. import org.springframework.web.bind.annotation.RestController;
  17. import java.util.List;
  18. import java.util.Map;
  19. /**
  20. * WmshGridMaterial RESTful接口:
  21. * @author generator
  22. * @version 1.0-SNAPSHORT 2021-10-09 07:25
  23. * 类描述
  24. * 修订历史:
  25. * 日期:2021-10-09
  26. * 作者:generator
  27. * 参考:
  28. * 描述:WmshGridMaterial RESTful接口
  29. * @see null
  30. * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
  31. */
  32. @RestController
  33. @RequestMapping("/${api.version}/wmshgridmaterials")
  34. public class WmshGridMaterialController extends BaseRESTfulController {
  35. @Autowired
  36. IWmshGridMaterialService wmshGridMaterialService;
  37. @Autowired
  38. ColumnDataUtil columnDataUtil;
  39. /**
  40. * 展示下游港口港存库库存列表
  41. * @param mapVal
  42. * @param pageNum
  43. * @param pageSize
  44. * @param apiId
  45. * @return
  46. */
  47. @ApiOperation(value="展示下游港口港存库库存列表", notes="分页查询")
  48. @ApiImplicitParams({
  49. @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
  50. @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
  51. @ApiImplicitParam(name = "apiId", value = "158", required = false, dataType = "BigDecimal"),
  52. })
  53. @PostMapping(value = "/getUnloadPortStockList")
  54. public RESTfulResult getUnloadPortStockList(@RequestBody(required = false) Map<String,Object> mapVal,
  55. Integer pageNum,
  56. Integer pageSize,
  57. Integer apiId){
  58. PageHelper.startPage(pageNum, pageSize);
  59. //分页查询数据
  60. List<Map<String, Object>> columnList = wmshGridMaterialService.getUnloadPortStockList(mapVal);
  61. PageListAdd data = columnDataUtil.tableColumnData(apiId, null, columnList);
  62. return success(data);
  63. }
  64. /**
  65. * 展示万州港港存库库存列表
  66. * @param mapVal
  67. * @param pageNum
  68. * @param pageSize
  69. * @param apiId
  70. * @return
  71. */
  72. @ApiOperation(value="展示万州港港存库库存列表", notes="分页查询")
  73. @ApiImplicitParams({
  74. @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
  75. @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
  76. @ApiImplicitParam(name = "apiId", value = "158", required = false, dataType = "BigDecimal"),
  77. })
  78. @PostMapping(value = "/getLoadPortStockList")
  79. public RESTfulResult getLoadPortStockList(@RequestBody(required = false) Map<String,Object> mapVal,
  80. Integer pageNum,
  81. Integer pageSize,
  82. Integer apiId,
  83. String con){
  84. if (con!=null&&!"".equals(con)){
  85. mapVal.put("con",con);
  86. }
  87. PageHelper.startPage(pageNum, pageSize);
  88. //分页查询数据
  89. List<Map<String, Object>> columnList = wmshGridMaterialService.getLoadPortStockList(mapVal);
  90. PageListAdd data = columnDataUtil.tableColumnData(apiId, null, columnList);
  91. return success(data);
  92. }
  93. @ApiOperation(value="船舶动态表展示库存吨位", notes="分页查询")
  94. @ApiImplicitParams({
  95. @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
  96. @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
  97. @ApiImplicitParam(name = "apiId", value = "158", required = false, dataType = "BigDecimal"),
  98. })
  99. @PostMapping(value = "/gePortStockList")
  100. public RESTfulResult gePortStockList(@RequestBody(required = false) Map<String,Object> mapVal
  101. ){
  102. List<Map<String, Object>> columnList = wmshGridMaterialService.getLoadPortStockList(mapVal);
  103. return success(columnList);
  104. }
  105. /**
  106. * 展示万州港港存库库存列表
  107. * @param mapVal
  108. * @param pageNum
  109. * @param pageSize
  110. * @param apiId
  111. * @return
  112. */
  113. @ApiOperation(value="展示万州港当前物资实时库存", notes="分页查询")
  114. @ApiImplicitParams({
  115. @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
  116. @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
  117. @ApiImplicitParam(name = "apiId", value = "158", required = false, dataType = "BigDecimal"),
  118. })
  119. @PostMapping(value = "/getLoadPortStockByMaterialName")
  120. public RESTfulResult getLoadPortStockByMaterialName(@RequestBody(required = false) Map<String,Object> mapVal,
  121. Integer pageNum,
  122. Integer pageSize,
  123. Integer apiId,
  124. String con){
  125. if (con!=null&&!"".equals(con)){
  126. mapVal.put("con",con);
  127. }
  128. PageHelper.startPage(pageNum, pageSize);
  129. //分页查询数据
  130. List<Map<String, Object>> columnList = wmshGridMaterialService.getLoadPortStockByMaterialName(mapVal);
  131. PageListAdd data = columnDataUtil.tableColumnData(apiId, null, columnList);
  132. return success(data);
  133. }
  134. /**
  135. * 展示万州港港存库库存列表
  136. * @param mapVal
  137. * @param pageNum
  138. * @param pageSize
  139. * @param apiId
  140. * @return
  141. */
  142. @ApiOperation(value="展示港存库出库", notes="分页查询")
  143. @ApiImplicitParams({
  144. @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
  145. @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
  146. @ApiImplicitParam(name = "apiId", value = "494", required = false, dataType = "BigDecimal"),
  147. })
  148. @PostMapping(value = "/getUnLockPortStock")
  149. public RESTfulResult getUnLockPortStock(@RequestBody(required = false) Map<String,Object> mapVal,
  150. Integer pageNum,
  151. Integer pageSize,
  152. Integer apiId,
  153. String con){
  154. if (con!=null&&!"".equals(con)){
  155. mapVal.put("con",con);
  156. }
  157. PageHelper.startPage(pageNum, pageSize);
  158. //分页查询数据
  159. List<Map<String, Object>> columnList = wmshGridMaterialService.getUnLockPortStock(mapVal);
  160. PageListAdd data = columnDataUtil.tableColumnData(apiId, null, columnList);
  161. return success(data);
  162. }
  163. //清场
  164. @ApiModelProperty(value = "清场远程调用")
  165. @ApiImplicitParams({
  166. @ApiImplicitParam(name = "amsContractBreach", value = "违约规则实体", required = false, dataType = "AmsContractBreach"),
  167. })
  168. @PostMapping("/clearWmshGridMaterial")
  169. public RESTfulResult clearWmshGridMaterial(@RequestBody Map<String,Object> map) {
  170. int result = wmshGridMaterialService.clearWmshGridMaterial(map);
  171. return success(result);
  172. }
  173. }