BMSController.java 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  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.ApiImplicitParam;
  8. import io.swagger.annotations.ApiImplicitParams;
  9. import io.swagger.annotations.ApiModelProperty;
  10. import io.swagger.annotations.ApiOperation;
  11. import org.springframework.beans.factory.annotation.Autowired;
  12. import org.springframework.web.bind.annotation.*;
  13. import java.math.BigDecimal;
  14. import java.util.HashMap;
  15. import java.util.List;
  16. import java.util.Map;
  17. /**
  18. * @author hujianguo
  19. * @create 2021-09-22 17:10
  20. */
  21. @RestController
  22. @RequestMapping("${api.version}/bms")
  23. public class BMSController extends BaseRESTfulController {
  24. @Autowired
  25. BmsshipFeign bmsshipFeign;
  26. @Autowired
  27. BmstrainFeign bmstrainFeign;
  28. @Autowired
  29. BmstruckFeign bmstruckFeign;
  30. /**
  31. * 水运结算
  32. *
  33. * @param mapValue
  34. * @param apiId
  35. * @param pageNum
  36. * @param pageSize
  37. * @return
  38. */
  39. @PostMapping("getDetailsOrderList")
  40. @ApiOperation(value = "展示详单列表")
  41. public RESTfulResult getDetailsOrderList(@RequestBody(required = false) Map<String, Object> mapValue,
  42. Integer pageNum,
  43. Integer pageSize,
  44. Integer apiId) {
  45. if (mapValue == null) {
  46. mapValue = new HashMap<>();
  47. }
  48. return bmsshipFeign.getDetailsOrderList(mapValue, pageNum, pageSize, apiId);
  49. }
  50. @PostMapping("getBatch")
  51. @ApiOperation(value = "展示批次信息")
  52. public RESTfulResult getBatch(@RequestBody(required = false) Map<String, Object> mapValue,
  53. Integer pageNum,
  54. Integer pageSize,
  55. Integer apiId) {
  56. if (mapValue == null) {
  57. mapValue = new HashMap<>();
  58. }
  59. return bmsshipFeign.getBatch(mapValue, pageNum, pageSize, apiId);
  60. }
  61. @PostMapping("getPortHandlingFeeList")
  62. @ApiOperation(value = "展示批次信息")
  63. public RESTfulResult getPortHandlingFeeList(@RequestBody(required = false) Map<String, Object> mapValue,
  64. Integer pageNum,
  65. Integer pageSize,
  66. Integer apiId) {
  67. if (mapValue == null) {
  68. mapValue = new HashMap<>();
  69. }
  70. return bmsshipFeign.getPortHandlingFeeList(mapValue, pageNum, pageSize, apiId);
  71. }
  72. @PostMapping("addPortHandlingFee")
  73. @ApiOperation(value = "生成港口装卸费")
  74. RESTfulResult addPortHandlingFee(@RequestBody Map<String, Object> portHandlingFee) throws Exception {
  75. return bmsshipFeign.addPortHandlingFee(portHandlingFee);
  76. }
  77. @PostMapping("updatePortHandlingFee")
  78. @ApiOperation(value = "修改港口装卸费信息")
  79. RESTfulResult updatePortHandlingFee(@RequestBody Map<String, Object> portHandlingFee) {
  80. return bmsshipFeign.updatePortHandlingFee(portHandlingFee);
  81. }
  82. @PostMapping("getFeeToUpdate/{feeId}")
  83. @ApiOperation(value = "查询修改港口装卸费数据渲染表单")
  84. RESTfulResult getFeeToUpdate(@PathVariable("feeId") BigDecimal feeId) {
  85. return bmsshipFeign.getFeeToUpdate(feeId);
  86. }
  87. @PostMapping("deletePortHandlingFee/{feeId}")
  88. @ApiOperation(value = "逻辑删除港口装卸费")
  89. RESTfulResult deletePortHandlingFee(@PathVariable("feeId") String feeId) {
  90. return bmsshipFeign.deletePortHandlingFee(feeId);
  91. }
  92. @PostMapping("getUncomplateDetailsOrderList")
  93. @ApiOperation(value = "展示未生成账单的详单信息")
  94. public RESTfulResult getUncomplateDetailsOrderList(@RequestBody(required = false) Map<String, Object> mapValue,
  95. Integer pageNum,
  96. Integer pageSize,
  97. Integer apiId) {
  98. if (mapValue == null) {
  99. mapValue = new HashMap<>();
  100. }
  101. return bmsshipFeign.getUncomplateDetailsOrderList(mapValue, pageNum, pageSize, apiId);
  102. }
  103. @PostMapping("addDetailsOrder/{resultId}")
  104. @ApiOperation(value = "生成水运计费详单")
  105. RESTfulResult addDetailsOrder(@PathVariable("resultId") BigDecimal resultId) throws Exception {
  106. return bmsshipFeign.addDetailsOrder(resultId);
  107. }
  108. @PostMapping("getStatementList")
  109. @ApiOperation(value = "展示水运费和水分质检费账单信息")
  110. public RESTfulResult getStatementList(@RequestBody(required = false) Map<String, Object> mapValue,
  111. Integer pageNum,
  112. Integer pageSize,
  113. Integer apiId) {
  114. if (mapValue == null) {
  115. mapValue = new HashMap<>();
  116. }
  117. return bmsshipFeign.getStatementList(mapValue, pageNum, pageSize, apiId);
  118. }
  119. @PostMapping("getLossStatementList")
  120. @ApiOperation(value = "展示途损费账单信息")
  121. public RESTfulResult getLossStatementList(@RequestBody(required = false) Map<String, Object> mapValue,
  122. Integer pageNum,
  123. Integer pageSize,
  124. Integer apiId) {
  125. if (mapValue == null) {
  126. mapValue = new HashMap<>();
  127. }
  128. return bmsshipFeign.getLossStatementList(mapValue, pageNum, pageSize, apiId);
  129. }
  130. @PostMapping("getWaterResult")
  131. @ApiOperation(value = "展示水分质检实绩")
  132. public RESTfulResult getWaterResult(@RequestBody(required = false) Map<String, Object> mapValue,
  133. Integer pageNum,
  134. Integer pageSize,
  135. Integer apiId) {
  136. if (mapValue == null) {
  137. mapValue = new HashMap<>();
  138. }
  139. return bmsshipFeign.getWaterResult(mapValue, pageNum, pageSize, apiId);
  140. }
  141. @PostMapping("addStatement")
  142. @ApiOperation(value = "生成水运费账单")
  143. RESTfulResult addStatement(@RequestBody List<Map<String, Object>> mapList) throws Exception {
  144. return bmsshipFeign.addStatement(mapList);
  145. }
  146. @PostMapping("addWaterStatement")
  147. @ApiOperation(value = "生成水分质检账单")
  148. RESTfulResult addWaterStatement(@RequestBody List<Map<String, Object>> mapList) throws Exception {
  149. return bmsshipFeign.addWaterStatement(mapList);
  150. }
  151. @PostMapping("addLossStatement")
  152. @ApiOperation(value = "生成途损账单")
  153. RESTfulResult addLossStatement(@RequestBody Map<String, Object> map) throws Exception {
  154. return bmsshipFeign.addLossStatement(map);
  155. }
  156. @PostMapping("getStatementDetailsOrderList")
  157. @ApiOperation(value = "展示账单下的详单")
  158. public RESTfulResult getStatementDetailsOrderList(@RequestBody(required = false) Map<String, Object> mapValue,
  159. BigDecimal batchId,
  160. Integer pageNum,
  161. Integer pageSize,
  162. Integer apiId,
  163. BigDecimal statementId) {
  164. if (mapValue == null) {
  165. mapValue = new HashMap<>();
  166. }
  167. return bmsshipFeign.getStatementDetailsOrderList(batchId, mapValue, pageNum, pageSize, apiId,statementId);
  168. }
  169. @PostMapping("getShipResult")
  170. @ApiOperation(value = "展示详单下的船运实绩")
  171. public RESTfulResult getShipResult(@RequestBody(required = false) Map<String, Object> mapValue,
  172. BigDecimal batchId,
  173. Integer pageNum,
  174. Integer pageSize,
  175. Integer apiId) {
  176. if (mapValue == null) {
  177. mapValue = new HashMap<>();
  178. }
  179. return bmsshipFeign.getShipResult(batchId, mapValue, pageNum, pageSize, apiId);
  180. }
  181. @PostMapping("getShipFeesFormula")
  182. @ApiOperation(value = "查询水运费计算公式")
  183. public RESTfulResult getShipFeesFormula() {
  184. return bmsshipFeign.getShipFeesFormula();
  185. }
  186. @PostMapping("getLossFeesFormula")
  187. @ApiOperation(value = "查询途损费计算公式")
  188. public RESTfulResult getLossFeesFormula() {
  189. return bmsshipFeign.getLossFeesFormula();
  190. }
  191. @PostMapping("getWaterFeesFormula")
  192. @ApiOperation(value = "查询水分质检计算公式")
  193. public RESTfulResult getWaterFeesFormula() {
  194. return bmsshipFeign.getWaterFeesFormula();
  195. }
  196. @PostMapping("getTrainDetailsOrderList")
  197. @ApiOperation(value = "展示火运详单")
  198. public RESTfulResult getTrainDetailsOrderList(@RequestBody(required = false) Map<String, Object> mapValue,
  199. Integer pageNum,
  200. Integer pageSize,
  201. Integer apiId) {
  202. if (mapValue == null) {
  203. mapValue = new HashMap<>();
  204. }
  205. return bmstrainFeign.getTrainDetailsOrderList(mapValue, pageNum, pageSize, apiId);
  206. }
  207. @PostMapping("getUncomplateTrainDetailsList")
  208. @ApiOperation(value = "展示未转账单的火运详单")
  209. public RESTfulResult getUncomplateTrainDetailsList(@RequestBody(required = false) Map<String, Object> mapValue,
  210. Integer pageNum,
  211. Integer pageSize,
  212. Integer apiId) {
  213. if (mapValue == null) {
  214. mapValue = new HashMap<>();
  215. }
  216. return bmstrainFeign.getUncomplateTrainDetailsList(mapValue, pageNum, pageSize, apiId);
  217. }
  218. @PostMapping("getTrainResultList")
  219. @ApiOperation(value = "展示火运实绩")
  220. public RESTfulResult getTrainResultList(@RequestBody(required = false) Map<String, Object> mapValue,
  221. Integer pageNum,
  222. Integer pageSize,
  223. Integer apiId) {
  224. if (mapValue == null) {
  225. mapValue = new HashMap<>();
  226. }
  227. return bmstrainFeign.getTrainResultList(mapValue, pageNum, pageSize, apiId);
  228. }
  229. @PostMapping("addTrainDetails")
  230. @ApiOperation(value = "生成火运详单")
  231. RESTfulResult addTrainDetails(@RequestBody Map<String, Object> map) {
  232. return bmstrainFeign.addTrainDetails(map);
  233. }
  234. @PostMapping("getTrainStatementList")
  235. @ApiOperation(value = "展示火运账单列表")
  236. public RESTfulResult getTrainStatementList(@RequestBody(required = false) Map<String, Object> mapValue,
  237. Integer pageNum,
  238. Integer pageSize,
  239. Integer apiId) {
  240. if (mapValue == null) {
  241. mapValue = new HashMap<>();
  242. }
  243. return bmstrainFeign.getTrainStatementList(mapValue, pageNum, pageSize, apiId);
  244. }
  245. @PostMapping("getStatementTrainResultList")
  246. @ApiOperation(value = "展示未转账单的火运详单")
  247. public RESTfulResult getStatementTrainResultList(@RequestBody(required = false) Map<String, Object> mapValue,
  248. Integer pageNum,
  249. Integer pageSize,
  250. Integer apiId,
  251. Integer detailsId) {
  252. if (mapValue == null) {
  253. mapValue = new HashMap<>();
  254. }
  255. return bmstrainFeign.getStatementTrainResultList(mapValue, pageNum, pageSize, apiId, detailsId);
  256. }
  257. @PostMapping("getComplateTrainDetailsList")
  258. @ApiOperation(value = "展示账单下的详单")
  259. public RESTfulResult getComplateTrainDetailsList(BigDecimal batchId,
  260. @RequestBody(required = false) Map<String, Object> mapValue,
  261. Integer pageNum,
  262. Integer pageSize,
  263. Integer apiId,
  264. BigDecimal statementId) {
  265. if (mapValue == null) {
  266. mapValue = new HashMap<>();
  267. }
  268. return bmstrainFeign.getComplateTrainDetailsList(batchId,mapValue, pageNum, pageSize, apiId,statementId);
  269. }
  270. @PostMapping("addTrainStatement")
  271. @ApiOperation(value = "生成火运费账单")
  272. RESTfulResult addTrainStatement(@RequestBody Map<String, Object> map) {
  273. return bmstrainFeign.addTrainStatement(map);
  274. }
  275. @ApiModelProperty(value = "展示销售火运结算列表")
  276. @ApiImplicitParams({
  277. @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
  278. @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
  279. @ApiImplicitParam(name = "apiId", value = "180", required = false, dataType = "BigDecimal")
  280. })
  281. @PostMapping("/getSettlementList")
  282. public RESTfulResult getSettlementList(@RequestBody(required = false) Map<String, Object> mapValue,
  283. Integer pageNum,
  284. Integer pageSize,
  285. Integer apiId) {
  286. if (mapValue == null) {
  287. mapValue = new HashMap<>();
  288. }
  289. return bmstrainFeign.getSettlementList(mapValue, pageNum, pageSize, apiId);
  290. }
  291. @ApiModelProperty(value = "新增销售火运结算")
  292. @ApiImplicitParams({
  293. @ApiImplicitParam(name = "bmstrainSettlement", value = "销售火运结算实体", required = false, dataType = "BmstrainSettlement"),
  294. })
  295. @PostMapping("/addTrainSettlement")
  296. public Map<String,Object> addTrainSettlement(@RequestBody Map<String, Object> bmstrainSettlement) {
  297. return bmstrainFeign.addTrainSettlement(bmstrainSettlement);
  298. }
  299. @ApiModelProperty(value = "修改销售火运结算")
  300. @ApiImplicitParams({
  301. @ApiImplicitParam(name = "bmstrainSettlement", value = "销售火运结算实体", required = false, dataType = "BmstrainSettlement"),
  302. })
  303. @PostMapping("/updateTrainSettlement")
  304. public Map<String,Object> updateTrainSettlement(@RequestBody Map<String, Object> bmstrainSettlement) {
  305. return bmstrainFeign.updateTrainSettlement(bmstrainSettlement);
  306. }
  307. @ApiModelProperty(value = "逻辑删除销售火运结算")
  308. @ApiImplicitParams({
  309. @ApiImplicitParam(name = "settlementId", value = "结算id", required = false, dataType = "BigDecimal"),
  310. })
  311. @PostMapping("/deleteTrainSettlement/{settlementId}")
  312. public Map<String,Object> deleteTrainSettlement(@PathVariable("settlementId") BigDecimal settlementId) {
  313. return bmstrainFeign.deleteTrainSettlement(settlementId);
  314. }
  315. @ApiModelProperty(value = "得到修改渲染")
  316. @ApiImplicitParams({
  317. @ApiImplicitParam(name = "settlementId", value = "结算id", required = false, dataType = "BigDecimal"),
  318. })
  319. @PostMapping("/selectTrainSettlement/{settlementId}")
  320. public List<Map<String,Object>> selectTrainSettlement(@PathVariable("settlementId") BigDecimal settlementId) {
  321. return bmstrainFeign.selectTrainSettlement(settlementId);
  322. }
  323. @PostMapping("getTruckDetailsOrderList")
  324. @ApiOperation(value = "展示汽运详单信息")
  325. public RESTfulResult getTruckDetailsOrderList(@RequestBody(required = false) Map<String, Object> mapValue,
  326. Integer pageNum,
  327. Integer pageSize,
  328. Integer apiId) {
  329. if (mapValue == null) {
  330. mapValue = new HashMap<>();
  331. }
  332. return bmstruckFeign.getTruckDetailsOrderList(mapValue, pageNum, pageSize, apiId);
  333. }
  334. @PostMapping("getTruckResultList")
  335. @ApiOperation(value = "展示汽运详单信息")
  336. public RESTfulResult getTruckResultList(@RequestBody(required = false) Map<String, Object> mapValue,
  337. Integer pageNum,
  338. Integer pageSize,
  339. Integer apiId,
  340. Integer orderId) {
  341. if (mapValue == null) {
  342. mapValue = new HashMap<>();
  343. }
  344. return bmstruckFeign.getTruckResultList(mapValue, pageNum, pageSize, apiId, new BigDecimal(orderId));
  345. }
  346. @PostMapping("addTruckDetailsOrder/{orderId}")
  347. @ApiOperation(value = "新增汽运详单")
  348. RESTfulResult addTruckDetailsOrder(@PathVariable("orderId") BigDecimal orderId) {
  349. return bmstruckFeign.addTruckDetailsOrder(orderId);
  350. }
  351. /**
  352. * 展示汽运未生成账单的详单信息
  353. * @param mapVal
  354. * @param pageNum
  355. * @param pageSize
  356. * @param apiId
  357. * @return
  358. */
  359. @ApiModelProperty(value = "展示内转汽运未生成账单的作业详单信息")
  360. @ApiImplicitParams({
  361. @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
  362. @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
  363. @ApiImplicitParam(name = "apiId", value = "还没定", required = false, dataType = "BigDecimal"),
  364. @ApiImplicitParam(name = "orderType" ,value = "1:计时,2:计数,3:计重,4:包月",required = false,dataType = "Integer")
  365. })
  366. @PostMapping("/getUnFinishedConvertedTruckDetailsOrderList")
  367. public RESTfulResult getUnFinishedConvertedTruckDetailsOrderList(@RequestBody(required = false) Map<String,Object> mapVal,
  368. Integer pageNum,
  369. Integer pageSize,
  370. Integer apiId,
  371. Integer orderType) {
  372. if (mapVal == null) {
  373. mapVal = new HashMap<>();
  374. }
  375. return bmstruckFeign.getUnFinishedConvertedTruckDetailsOrderList(mapVal, pageNum, pageSize, apiId, new BigDecimal(orderType));
  376. }
  377. @PostMapping("/addConvertedDetailsOrder/{orderId}")
  378. RESTfulResult addConvertedDetailsOrder(@PathVariable("orderId") BigDecimal orderId) {
  379. return bmstruckFeign.addConvertedDetailsOrder(orderId);
  380. }
  381. /**
  382. * 生成内转汽运账单
  383. * @param mapList
  384. * @return
  385. */
  386. @ApiModelProperty(value = "生成内转汽运账单")
  387. @PostMapping("/addConvertedTruckStatement")
  388. public RESTfulResult addConvertedTruckStatement(@RequestBody List<Map<String, Object>> mapList) {
  389. return bmstruckFeign.addConvertedTruckStatement(mapList);
  390. }
  391. /**
  392. *删除汽运账单
  393. */
  394. @PostMapping("/deleteConvertedTruckStatement/{statementId}")
  395. public RESTfulResult deleteConvertedTruckStatement(@PathVariable("statementId") BigDecimal statementId) {
  396. return bmstruckFeign.delete(statementId);
  397. }
  398. /**
  399. * 审批计费账单
  400. */
  401. @PostMapping("/updateConvertedTruckStatement/{statementId}")
  402. public RESTfulResult updateConvertedTruckStatement(@PathVariable("statementId") BigDecimal statementId) {
  403. return bmstruckFeign.update(statementId);
  404. }
  405. }