BMSController.java 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  1. package com.steerinfo.dil.controller;
  2. import com.steerinfo.dil.feign.BmsshipFeign;
  3. import com.steerinfo.dil.feign.BmstrainFeign;
  4. import com.steerinfo.dil.feign.BmstruckFeign;
  5. import com.steerinfo.dil.util.BaseRESTfulController;
  6. import com.steerinfo.framework.controller.RESTfulResult;
  7. import io.swagger.annotations.ApiOperation;
  8. import org.springframework.beans.factory.annotation.Autowired;
  9. import org.springframework.web.bind.annotation.*;
  10. import java.math.BigDecimal;
  11. import java.util.HashMap;
  12. import java.util.List;
  13. import java.util.Map;
  14. /**
  15. * @author hujianguo
  16. * @create 2021-09-22 17:10
  17. */
  18. @RestController
  19. @RequestMapping("${api.version}/bms")
  20. public class BMSController extends BaseRESTfulController {
  21. @Autowired
  22. BmsshipFeign bmsshipFeign;
  23. @Autowired
  24. BmstrainFeign bmstrainFeign;
  25. @Autowired
  26. BmstruckFeign bmstruckFeign;
  27. /**
  28. * 水运结算
  29. *
  30. * @param mapValue
  31. * @param apiId
  32. * @param pageNum
  33. * @param pageSize
  34. * @return
  35. */
  36. @PostMapping("getDetailsOrderList")
  37. @ApiOperation(value = "展示详单列表")
  38. public RESTfulResult getDetailsOrderList(@RequestBody(required = false) Map<String, Object> mapValue,
  39. Integer pageNum,
  40. Integer pageSize,
  41. Integer apiId) {
  42. if (mapValue == null) {
  43. mapValue = new HashMap<>();
  44. }
  45. return bmsshipFeign.getDetailsOrderList(mapValue, pageNum, pageSize, apiId);
  46. }
  47. @PostMapping("getBatch")
  48. @ApiOperation(value = "展示批次信息")
  49. public RESTfulResult getBatch(@RequestBody(required = false) Map<String, Object> mapValue,
  50. Integer pageNum,
  51. Integer pageSize,
  52. Integer apiId) {
  53. if (mapValue == null) {
  54. mapValue = new HashMap<>();
  55. }
  56. return bmsshipFeign.getBatch(mapValue, pageNum, pageSize, apiId);
  57. }
  58. @PostMapping("getPortHandlingFeeList")
  59. @ApiOperation(value = "展示批次信息")
  60. public RESTfulResult getPortHandlingFeeList(@RequestBody(required = false) Map<String, Object> mapValue,
  61. Integer pageNum,
  62. Integer pageSize,
  63. Integer apiId) {
  64. if (mapValue == null) {
  65. mapValue = new HashMap<>();
  66. }
  67. return bmsshipFeign.getPortHandlingFeeList(mapValue, pageNum, pageSize, apiId);
  68. }
  69. @PostMapping("addPortHandlingFee")
  70. @ApiOperation(value = "生成港口装卸费")
  71. RESTfulResult addPortHandlingFee(@RequestBody Map<String, Object> portHandlingFee) throws Exception {
  72. return bmsshipFeign.addPortHandlingFee(portHandlingFee);
  73. }
  74. @PostMapping("updatePortHandlingFee")
  75. @ApiOperation(value = "修改港口装卸费信息")
  76. RESTfulResult updatePortHandlingFee(@RequestBody Map<String, Object> portHandlingFee) {
  77. return bmsshipFeign.updatePortHandlingFee(portHandlingFee);
  78. }
  79. @PostMapping("getFeeToUpdate/{feeId}")
  80. @ApiOperation(value = "查询修改港口装卸费数据渲染表单")
  81. RESTfulResult getFeeToUpdate(@PathVariable("feeId") BigDecimal feeId) {
  82. return bmsshipFeign.getFeeToUpdate(feeId);
  83. }
  84. @PostMapping("deletePortHandlingFee/{feeId}")
  85. @ApiOperation(value = "逻辑删除港口装卸费")
  86. RESTfulResult deletePortHandlingFee(@PathVariable("feeId") String feeId) {
  87. return bmsshipFeign.deletePortHandlingFee(feeId);
  88. }
  89. @PostMapping("getUncomplateDetailsOrderList")
  90. @ApiOperation(value = "展示未生成账单的详单信息")
  91. public RESTfulResult getUncomplateDetailsOrderList(@RequestBody(required = false) Map<String, Object> mapValue,
  92. Integer pageNum,
  93. Integer pageSize,
  94. Integer apiId) {
  95. if (mapValue == null) {
  96. mapValue = new HashMap<>();
  97. }
  98. return bmsshipFeign.getUncomplateDetailsOrderList(mapValue, pageNum, pageSize, apiId);
  99. }
  100. @PostMapping("addDetailsOrder/{resultId}")
  101. @ApiOperation(value = "生成水运计费详单")
  102. RESTfulResult addDetailsOrder(@PathVariable("resultId") BigDecimal resultId) throws Exception {
  103. return bmsshipFeign.addDetailsOrder(resultId);
  104. }
  105. @PostMapping("getStatementList")
  106. @ApiOperation(value = "展示水运费和水分质检费账单信息")
  107. public RESTfulResult getStatementList(@RequestBody(required = false) Map<String, Object> mapValue,
  108. Integer pageNum,
  109. Integer pageSize,
  110. Integer apiId) {
  111. if (mapValue == null) {
  112. mapValue = new HashMap<>();
  113. }
  114. return bmsshipFeign.getStatementList(mapValue, pageNum, pageSize, apiId);
  115. }
  116. @PostMapping("getLossStatementList")
  117. @ApiOperation(value = "展示途损费账单信息")
  118. public RESTfulResult getLossStatementList(@RequestBody(required = false) Map<String, Object> mapValue,
  119. Integer pageNum,
  120. Integer pageSize,
  121. Integer apiId) {
  122. if (mapValue == null) {
  123. mapValue = new HashMap<>();
  124. }
  125. return bmsshipFeign.getLossStatementList(mapValue, pageNum, pageSize, apiId);
  126. }
  127. @PostMapping("getWaterResult")
  128. @ApiOperation(value = "展示水分质检实绩")
  129. public RESTfulResult getWaterResult(@RequestBody(required = false) Map<String, Object> mapValue,
  130. Integer pageNum,
  131. Integer pageSize,
  132. Integer apiId) {
  133. if (mapValue == null) {
  134. mapValue = new HashMap<>();
  135. }
  136. return bmsshipFeign.getWaterResult(mapValue, pageNum, pageSize, apiId);
  137. }
  138. @PostMapping("addStatement")
  139. @ApiOperation(value = "生成水运费账单")
  140. RESTfulResult addStatement(@RequestBody List<Map<String, Object>> mapList) throws Exception {
  141. return bmsshipFeign.addStatement(mapList);
  142. }
  143. @PostMapping("addWaterStatement")
  144. @ApiOperation(value = "生成水分质检账单")
  145. RESTfulResult addWaterStatement(@RequestBody List<Map<String, Object>> mapList) throws Exception {
  146. return bmsshipFeign.addWaterStatement(mapList);
  147. }
  148. @PostMapping("addLossStatement")
  149. @ApiOperation(value = "生成途损账单")
  150. RESTfulResult addLossStatement(@RequestBody Map<String, Object> map) throws Exception {
  151. return bmsshipFeign.addLossStatement(map);
  152. }
  153. @PostMapping("getStatementDetailsOrderList")
  154. @ApiOperation(value = "展示账单下的详单")
  155. public RESTfulResult getStatementDetailsOrderList(@RequestBody(required = false) Map<String, Object> mapValue,
  156. BigDecimal batchId,
  157. Integer pageNum,
  158. Integer pageSize,
  159. Integer apiId) {
  160. if (mapValue == null) {
  161. mapValue = new HashMap<>();
  162. }
  163. return bmsshipFeign.getStatementDetailsOrderList(batchId, mapValue, pageNum, pageSize, apiId);
  164. }
  165. @PostMapping("getShipResult")
  166. @ApiOperation(value = "展示详单下的船运实绩")
  167. public RESTfulResult getShipResult(@RequestBody(required = false) Map<String, Object> mapValue,
  168. BigDecimal batchId,
  169. Integer pageNum,
  170. Integer pageSize,
  171. Integer apiId) {
  172. if (mapValue == null) {
  173. mapValue = new HashMap<>();
  174. }
  175. return bmsshipFeign.getShipResult(batchId, mapValue, pageNum, pageSize, apiId);
  176. }
  177. @PostMapping("getShipFeesFormula")
  178. @ApiOperation(value = "查询水运费计算公式")
  179. public RESTfulResult getShipFeesFormula() {
  180. return bmsshipFeign.getShipFeesFormula();
  181. }
  182. @PostMapping("getLossFeesFormula")
  183. @ApiOperation(value = "查询途损费计算公式")
  184. public RESTfulResult getLossFeesFormula() {
  185. return bmsshipFeign.getLossFeesFormula();
  186. }
  187. @PostMapping("getWaterFeesFormula")
  188. @ApiOperation(value = "查询水分质检计算公式")
  189. public RESTfulResult getWaterFeesFormula() {
  190. return bmsshipFeign.getWaterFeesFormula();
  191. }
  192. @PostMapping("getTrainDetailsOrderList")
  193. @ApiOperation(value = "展示火运详单")
  194. public RESTfulResult getTrainDetailsOrderList(@RequestBody(required = false) Map<String, Object> mapValue,
  195. Integer pageNum,
  196. Integer pageSize,
  197. Integer apiId) {
  198. if (mapValue == null) {
  199. mapValue = new HashMap<>();
  200. }
  201. return bmstrainFeign.getTrainDetailsOrderList(mapValue, pageNum, pageSize, apiId);
  202. }
  203. @PostMapping("getUncomplateTrainDetailsList")
  204. @ApiOperation(value = "展示未转账单的火运详单")
  205. public RESTfulResult getUncomplateTrainDetailsList(@RequestBody(required = false) Map<String, Object> mapValue,
  206. Integer pageNum,
  207. Integer pageSize,
  208. Integer apiId) {
  209. if (mapValue == null) {
  210. mapValue = new HashMap<>();
  211. }
  212. return bmstrainFeign.getUncomplateTrainDetailsList(mapValue, pageNum, pageSize, apiId);
  213. }
  214. @PostMapping("getTrainResultList")
  215. @ApiOperation(value = "展示火运实绩")
  216. public RESTfulResult getTrainResultList(@RequestBody(required = false) Map<String, Object> mapValue,
  217. Integer pageNum,
  218. Integer pageSize,
  219. Integer apiId) {
  220. if (mapValue == null) {
  221. mapValue = new HashMap<>();
  222. }
  223. return bmstrainFeign.getTrainResultList(mapValue, pageNum, pageSize, apiId);
  224. }
  225. @PostMapping("addTrainDetails")
  226. @ApiOperation(value = "生成火运详单")
  227. RESTfulResult addTrainDetails(@RequestBody Map<String, Object> map) {
  228. return bmstrainFeign.addTrainDetails(map);
  229. }
  230. @PostMapping("getTrainStatementList")
  231. @ApiOperation(value = "展示火运账单列表")
  232. public RESTfulResult getTrainStatementList(@RequestBody(required = false) Map<String, Object> mapValue,
  233. Integer pageNum,
  234. Integer pageSize,
  235. Integer apiId) {
  236. if (mapValue == null) {
  237. mapValue = new HashMap<>();
  238. }
  239. return bmstrainFeign.getTrainStatementList(mapValue, pageNum, pageSize, apiId);
  240. }
  241. @PostMapping("getStatementTrainResultList")
  242. @ApiOperation(value = "展示未转账单的火运详单")
  243. public RESTfulResult getStatementTrainResultList(@RequestBody(required = false) Map<String, Object> mapValue,
  244. Integer pageNum,
  245. Integer pageSize,
  246. Integer apiId,
  247. Integer detailsId) {
  248. if (mapValue == null) {
  249. mapValue = new HashMap<>();
  250. }
  251. return bmstrainFeign.getStatementTrainResultList(mapValue, pageNum, pageSize, apiId, detailsId);
  252. }
  253. @PostMapping("getComplateTrainDetailsList")
  254. @ApiOperation(value = "展示账单下的详单")
  255. public RESTfulResult getComplateTrainDetailsList(BigDecimal batchId,
  256. @RequestBody(required = false) Map<String, Object> mapValue,
  257. Integer pageNum,
  258. Integer pageSize,
  259. Integer apiId,
  260. BigDecimal statementId) {
  261. if (mapValue == null) {
  262. mapValue = new HashMap<>();
  263. }
  264. return bmstrainFeign.getComplateTrainDetailsList(batchId,mapValue, pageNum, pageSize, apiId,statementId);
  265. }
  266. @PostMapping("addTrainStatement")
  267. @ApiOperation(value = "生成火运费账单")
  268. RESTfulResult addTrainStatement(@RequestBody Map<String, Object> map) {
  269. return bmstrainFeign.addTrainStatement(map);
  270. }
  271. @PostMapping("getTruckDetailsOrderList")
  272. @ApiOperation(value = "展示汽运详单信息")
  273. public RESTfulResult getTruckDetailsOrderList(@RequestBody(required = false) Map<String, Object> mapValue,
  274. Integer pageNum,
  275. Integer pageSize,
  276. Integer apiId) {
  277. if (mapValue == null) {
  278. mapValue = new HashMap<>();
  279. }
  280. return bmstruckFeign.getTruckDetailsOrderList(mapValue, pageNum, pageSize, apiId);
  281. }
  282. @PostMapping("getTruckResultList")
  283. @ApiOperation(value = "展示汽运详单信息")
  284. public RESTfulResult getTruckResultList(@RequestBody(required = false) Map<String, Object> mapValue,
  285. Integer pageNum,
  286. Integer pageSize,
  287. Integer apiId,
  288. Integer orderId) {
  289. if (mapValue == null) {
  290. mapValue = new HashMap<>();
  291. }
  292. return bmstruckFeign.getTruckResultList(mapValue, pageNum, pageSize, apiId, new BigDecimal(orderId));
  293. }
  294. @PostMapping("addTruckDetailsOrder/{orderId}")
  295. @ApiOperation(value = "新增汽运详单")
  296. RESTfulResult addTruckDetailsOrder(@PathVariable("orderId") BigDecimal orderId) {
  297. return bmstruckFeign.addTruckDetailsOrder(orderId);
  298. }
  299. }