package com.steerinfo.dil.controller; import com.steerinfo.dil.feign.BmsshipFeign; import com.steerinfo.dil.feign.BmstrainFeign; import com.steerinfo.dil.feign.BmstruckFeign; import com.steerinfo.dil.util.BaseRESTfulController; import com.steerinfo.framework.controller.RESTfulResult; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.math.BigDecimal; import java.util.HashMap; import java.util.List; import java.util.Map; /** * @author hujianguo * @create 2021-09-22 17:10 */ @RestController @RequestMapping("${api.version}/bms") public class BMSController extends BaseRESTfulController { @Autowired BmsshipFeign bmsshipFeign; @Autowired BmstrainFeign bmstrainFeign; @Autowired BmstruckFeign bmstruckFeign; /** * 水运结算 * * @param mapValue * @param apiId * @param pageNum * @param pageSize * @return */ @PostMapping("getDetailsOrderList") @ApiOperation(value = "展示详单列表") public RESTfulResult getDetailsOrderList(@RequestBody(required = false) Map mapValue, Integer pageNum, Integer pageSize, Integer apiId) { if (mapValue == null) { mapValue = new HashMap<>(); } return bmsshipFeign.getDetailsOrderList(mapValue, pageNum, pageSize, apiId); } @PostMapping("getBatch") @ApiOperation(value = "展示批次信息") public RESTfulResult getBatch(@RequestBody(required = false) Map mapValue, Integer pageNum, Integer pageSize, Integer apiId) { if (mapValue == null) { mapValue = new HashMap<>(); } return bmsshipFeign.getBatch(mapValue, pageNum, pageSize, apiId); } @PostMapping("getPortHandlingFeeList") @ApiOperation(value = "展示批次信息") public RESTfulResult getPortHandlingFeeList(@RequestBody(required = false) Map mapValue, Integer pageNum, Integer pageSize, Integer apiId) { if (mapValue == null) { mapValue = new HashMap<>(); } return bmsshipFeign.getPortHandlingFeeList(mapValue, pageNum, pageSize, apiId); } @PostMapping("addPortHandlingFee") @ApiOperation(value = "生成港口装卸费") RESTfulResult addPortHandlingFee(@RequestBody Map portHandlingFee) throws Exception { return bmsshipFeign.addPortHandlingFee(portHandlingFee); } @PostMapping("updatePortHandlingFee") @ApiOperation(value = "修改港口装卸费信息") RESTfulResult updatePortHandlingFee(@RequestBody Map portHandlingFee) { return bmsshipFeign.updatePortHandlingFee(portHandlingFee); } @PostMapping("getFeeToUpdate/{feeId}") @ApiOperation(value = "查询修改港口装卸费数据渲染表单") RESTfulResult getFeeToUpdate(@PathVariable("feeId") BigDecimal feeId) { return bmsshipFeign.getFeeToUpdate(feeId); } @PostMapping("deletePortHandlingFee/{feeId}") @ApiOperation(value = "逻辑删除港口装卸费") RESTfulResult deletePortHandlingFee(@PathVariable("feeId") String feeId) { return bmsshipFeign.deletePortHandlingFee(feeId); } @PostMapping("getUncomplateDetailsOrderList") @ApiOperation(value = "展示未生成账单的详单信息") public RESTfulResult getUncomplateDetailsOrderList(@RequestBody(required = false) Map mapValue, Integer pageNum, Integer pageSize, Integer apiId) { if (mapValue == null) { mapValue = new HashMap<>(); } return bmsshipFeign.getUncomplateDetailsOrderList(mapValue, pageNum, pageSize, apiId); } @PostMapping("addDetailsOrder/{resultId}") @ApiOperation(value = "生成水运计费详单") RESTfulResult addDetailsOrder(@PathVariable("resultId") BigDecimal resultId) throws Exception { return bmsshipFeign.addDetailsOrder(resultId); } @PostMapping("getStatementList") @ApiOperation(value = "展示水运费和水分质检费账单信息") public RESTfulResult getStatementList(@RequestBody(required = false) Map mapValue, Integer pageNum, Integer pageSize, Integer apiId) { if (mapValue == null) { mapValue = new HashMap<>(); } return bmsshipFeign.getStatementList(mapValue, pageNum, pageSize, apiId); } @PostMapping("getLossStatementList") @ApiOperation(value = "展示途损费账单信息") public RESTfulResult getLossStatementList(@RequestBody(required = false) Map mapValue, Integer pageNum, Integer pageSize, Integer apiId) { if (mapValue == null) { mapValue = new HashMap<>(); } return bmsshipFeign.getLossStatementList(mapValue, pageNum, pageSize, apiId); } @PostMapping("getWaterResult") @ApiOperation(value = "展示水分质检实绩") public RESTfulResult getWaterResult(@RequestBody(required = false) Map mapValue, Integer pageNum, Integer pageSize, Integer apiId) { if (mapValue == null) { mapValue = new HashMap<>(); } return bmsshipFeign.getWaterResult(mapValue, pageNum, pageSize, apiId); } @PostMapping("addStatement") @ApiOperation(value = "生成水运费账单") RESTfulResult addStatement(@RequestBody List> mapList) throws Exception { return bmsshipFeign.addStatement(mapList); } @PostMapping("addWaterStatement") @ApiOperation(value = "生成水分质检账单") RESTfulResult addWaterStatement(@RequestBody List> mapList) throws Exception { return bmsshipFeign.addWaterStatement(mapList); } @PostMapping("addLossStatement") @ApiOperation(value = "生成途损账单") RESTfulResult addLossStatement(@RequestBody Map map) throws Exception { return bmsshipFeign.addLossStatement(map); } @PostMapping("getStatementDetailsOrderList") @ApiOperation(value = "展示账单下的详单") public RESTfulResult getStatementDetailsOrderList(@RequestBody(required = false) Map mapValue, BigDecimal batchId, Integer pageNum, Integer pageSize, Integer apiId) { if (mapValue == null) { mapValue = new HashMap<>(); } return bmsshipFeign.getStatementDetailsOrderList(batchId, mapValue, pageNum, pageSize, apiId); } @PostMapping("getShipResult") @ApiOperation(value = "展示详单下的船运实绩") public RESTfulResult getShipResult(@RequestBody(required = false) Map mapValue, BigDecimal batchId, Integer pageNum, Integer pageSize, Integer apiId) { if (mapValue == null) { mapValue = new HashMap<>(); } return bmsshipFeign.getShipResult(batchId, mapValue, pageNum, pageSize, apiId); } @PostMapping("getShipFeesFormula") @ApiOperation(value = "查询水运费计算公式") public RESTfulResult getShipFeesFormula() { return bmsshipFeign.getShipFeesFormula(); } @PostMapping("getLossFeesFormula") @ApiOperation(value = "查询途损费计算公式") public RESTfulResult getLossFeesFormula() { return bmsshipFeign.getLossFeesFormula(); } @PostMapping("getWaterFeesFormula") @ApiOperation(value = "查询水分质检计算公式") public RESTfulResult getWaterFeesFormula() { return bmsshipFeign.getWaterFeesFormula(); } @PostMapping("getTrainDetailsOrderList") @ApiOperation(value = "展示火运详单") public RESTfulResult getTrainDetailsOrderList(@RequestBody(required = false) Map mapValue, Integer pageNum, Integer pageSize, Integer apiId) { if (mapValue == null) { mapValue = new HashMap<>(); } return bmstrainFeign.getTrainDetailsOrderList(mapValue, pageNum, pageSize, apiId); } @PostMapping("getUncomplateTrainDetailsList") @ApiOperation(value = "展示未转账单的火运详单") public RESTfulResult getUncomplateTrainDetailsList(@RequestBody(required = false) Map mapValue, Integer pageNum, Integer pageSize, Integer apiId) { if (mapValue == null) { mapValue = new HashMap<>(); } return bmstrainFeign.getUncomplateTrainDetailsList(mapValue, pageNum, pageSize, apiId); } @PostMapping("getTrainResultList") @ApiOperation(value = "展示火运实绩") public RESTfulResult getTrainResultList(@RequestBody(required = false) Map mapValue, Integer pageNum, Integer pageSize, Integer apiId) { if (mapValue == null) { mapValue = new HashMap<>(); } return bmstrainFeign.getTrainResultList(mapValue, pageNum, pageSize, apiId); } @PostMapping("addTrainDetails") @ApiOperation(value = "生成火运详单") RESTfulResult addTrainDetails(@RequestBody Map map) { return bmstrainFeign.addTrainDetails(map); } @PostMapping("getTrainStatementList") @ApiOperation(value = "展示火运账单列表") public RESTfulResult getTrainStatementList(@RequestBody(required = false) Map mapValue, Integer pageNum, Integer pageSize, Integer apiId) { if (mapValue == null) { mapValue = new HashMap<>(); } return bmstrainFeign.getTrainStatementList(mapValue, pageNum, pageSize, apiId); } @PostMapping("getStatementTrainResultList") @ApiOperation(value = "展示未转账单的火运详单") public RESTfulResult getStatementTrainResultList(@RequestBody(required = false) Map mapValue, Integer pageNum, Integer pageSize, Integer apiId, Integer detailsId) { if (mapValue == null) { mapValue = new HashMap<>(); } return bmstrainFeign.getStatementTrainResultList(mapValue, pageNum, pageSize, apiId, detailsId); } @PostMapping("getComplateTrainDetailsList") @ApiOperation(value = "展示账单下的详单") public RESTfulResult getComplateTrainDetailsList(BigDecimal batchId, @RequestBody(required = false) Map mapValue, Integer pageNum, Integer pageSize, Integer apiId, BigDecimal statementId) { if (mapValue == null) { mapValue = new HashMap<>(); } return bmstrainFeign.getComplateTrainDetailsList(batchId,mapValue, pageNum, pageSize, apiId,statementId); } @PostMapping("addTrainStatement") @ApiOperation(value = "生成火运费账单") RESTfulResult addTrainStatement(@RequestBody Map map) { return bmstrainFeign.addTrainStatement(map); } @PostMapping("getTruckDetailsOrderList") @ApiOperation(value = "展示汽运详单信息") public RESTfulResult getTruckDetailsOrderList(@RequestBody(required = false) Map mapValue, Integer pageNum, Integer pageSize, Integer apiId) { if (mapValue == null) { mapValue = new HashMap<>(); } return bmstruckFeign.getTruckDetailsOrderList(mapValue, pageNum, pageSize, apiId); } @PostMapping("getTruckResultList") @ApiOperation(value = "展示汽运详单信息") public RESTfulResult getTruckResultList(@RequestBody(required = false) Map mapValue, Integer pageNum, Integer pageSize, Integer apiId, Integer orderId) { if (mapValue == null) { mapValue = new HashMap<>(); } return bmstruckFeign.getTruckResultList(mapValue, pageNum, pageSize, apiId, new BigDecimal(orderId)); } @PostMapping("addTruckDetailsOrder/{orderId}") @ApiOperation(value = "新增汽运详单") RESTfulResult addTruckDetailsOrder(@PathVariable("orderId") BigDecimal orderId) { return bmstruckFeign.addTruckDetailsOrder(orderId); } }