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.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiOperation; import io.swagger.models.auth.In; 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, String con) { if (mapValue == null) { mapValue = new HashMap<>(); } return bmsshipFeign.getDetailsOrderList(mapValue, pageNum, pageSize, apiId, con); } @PostMapping("getBatch") @ApiOperation(value = "展示批次信息") public RESTfulResult getBatch(@RequestBody(required = false) Map mapValue, Integer pageNum, Integer pageSize, Integer apiId, String con) { if (mapValue == null) { mapValue = new HashMap<>(); } return bmsshipFeign.getBatch(mapValue, pageNum, pageSize, apiId,con); } @PostMapping("getPortHandlingFeeList") @ApiOperation(value = "展示批次信息") public RESTfulResult getPortHandlingFeeList(@RequestBody(required = false) Map mapValue, Integer pageNum, Integer pageSize, Integer apiId, String con) { if (mapValue == null) { mapValue = new HashMap<>(); } return bmsshipFeign.getPortHandlingFeeList(mapValue, pageNum, pageSize, apiId, con); } @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, String con) { if (mapValue == null) { mapValue = new HashMap<>(); } return bmsshipFeign.getUncomplateDetailsOrderList(mapValue, pageNum, pageSize, apiId, con); } @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, String con) { if (mapValue == null) { mapValue = new HashMap<>(); } return bmsshipFeign.getStatementList(mapValue, pageNum, pageSize, apiId, con); } @PostMapping("getLossStatementList") @ApiOperation(value = "展示途损费账单信息") public RESTfulResult getLossStatementList(@RequestBody(required = false) Map mapValue, Integer pageNum, Integer pageSize, Integer apiId, String con) { if (mapValue == null) { mapValue = new HashMap<>(); } return bmsshipFeign.getLossStatementList(mapValue, pageNum, pageSize, apiId, con); } @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, Integer batchId, Integer pageNum, Integer pageSize, Integer apiId, Integer statementId, String con) { if (mapValue == null) { mapValue = new HashMap<>(); } return bmsshipFeign.getStatementDetailsOrderList(new BigDecimal(batchId), mapValue, pageNum, pageSize, apiId, new BigDecimal(statementId), con); } @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, String con) { if (mapValue == null) { mapValue = new HashMap<>(); } return bmstrainFeign.getTrainDetailsOrderList(mapValue, pageNum, pageSize, apiId, con); } @PostMapping("getUncomplateTrainDetailsList") @ApiOperation(value = "展示未转账单的火运详单") public RESTfulResult getUncomplateTrainDetailsList(@RequestBody(required = false) Map mapValue, Integer pageNum, Integer pageSize, Integer apiId, String con) { if (mapValue == null) { mapValue = new HashMap<>(); } return bmstrainFeign.getUncomplateTrainDetailsList(mapValue, pageNum, pageSize, apiId, con); } @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, String con) { if (mapValue == null) { mapValue = new HashMap<>(); } return bmstrainFeign.getTrainStatementList(mapValue, pageNum, pageSize, apiId, con); } @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(Integer batchId, @RequestBody(required = false) Map mapValue, Integer pageNum, Integer pageSize, Integer apiId, Integer statementId, String con) { if (mapValue == null) { mapValue = new HashMap<>(); } return bmstrainFeign.getComplateTrainDetailsList(new BigDecimal(batchId), mapValue, pageNum, pageSize, apiId, new BigDecimal(statementId), con); } @PostMapping("addTrainStatement") @ApiOperation(value = "生成火运费账单") RESTfulResult addTrainStatement(@RequestBody List> mapList) { return bmstrainFeign.addTrainStatement(mapList); } @ApiModelProperty(value = "展示销售火运结算列表") @ApiImplicitParams({ @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"), @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"), @ApiImplicitParam(name = "apiId", value = "180", required = false, dataType = "BigDecimal") }) @PostMapping("/getSettlementList") public RESTfulResult getSettlementList(@RequestBody(required = false) Map mapValue, Integer pageNum, Integer pageSize, Integer apiId, String con) { if (mapValue == null) { mapValue = new HashMap<>(); } return bmstrainFeign.getSettlementList(mapValue, pageNum, pageSize, apiId, con); } @ApiModelProperty(value = "新增销售火运结算") @ApiImplicitParams({ @ApiImplicitParam(name = "bmstrainSettlement", value = "销售火运结算实体", required = false, dataType = "BmstrainSettlement"), }) @PostMapping("/addTrainSettlement") public Map addTrainSettlement(@RequestBody Map bmstrainSettlement) { return bmstrainFeign.addTrainSettlement(bmstrainSettlement); } @ApiModelProperty(value = "修改销售火运结算") @ApiImplicitParams({ @ApiImplicitParam(name = "bmstrainSettlement", value = "销售火运结算实体", required = false, dataType = "BmstrainSettlement"), }) @PostMapping("/updateTrainSettlement") public Map updateTrainSettlement(@RequestBody Map bmstrainSettlement) { return bmstrainFeign.updateTrainSettlement(bmstrainSettlement); } @ApiModelProperty(value = "逻辑删除销售火运结算") @ApiImplicitParams({ @ApiImplicitParam(name = "settlementId", value = "结算id", required = false, dataType = "BigDecimal"), }) @PostMapping("/deleteTrainSettlement/{settlementId}") public Map deleteTrainSettlement(@PathVariable("settlementId") BigDecimal settlementId) { return bmstrainFeign.deleteTrainSettlement(settlementId); } @ApiModelProperty(value = "得到修改渲染") @ApiImplicitParams({ @ApiImplicitParam(name = "settlementId", value = "结算id", required = false, dataType = "BigDecimal"), }) @PostMapping("/selectTrainSettlement/{settlementId}") public Map selectTrainSettlement(@PathVariable("settlementId") Integer settlementId) { return bmstrainFeign.selectTrainSettlement(new BigDecimal(settlementId)); } @PostMapping("getTruckDetailsOrderList") @ApiOperation(value = "展示汽运详单信息") public RESTfulResult getTruckDetailsOrderList(@RequestBody(required = false) Map mapValue, Integer pageNum, Integer pageSize, Integer apiId, Integer orderType, String carrierSsoId) { if (mapValue == null) { mapValue = new HashMap<>(); } return bmstruckFeign.getTruckDetailsOrderList(mapValue, pageNum, pageSize, apiId, orderType,carrierSsoId); } @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("getTruckStatementList") @ApiOperation(value = "展示汽运账单信息") public RESTfulResult getTruckStatementList(@RequestBody(required = false) Map mapValue, Integer pageNum, Integer pageSize, Integer apiId) { if (mapValue == null) { mapValue = new HashMap<>(); } return bmstruckFeign.getTruckStatementList(mapValue, pageNum, pageSize, apiId); } @PostMapping("getInvoiceList") @ApiOperation(value = "展示发票") public RESTfulResult getInvoiceList(@RequestBody(required = false) Map mapValue, Integer pageNum, Integer pageSize, Integer apiId, String con) { if (mapValue == null) { mapValue = new HashMap<>(); } return bmstruckFeign.getInvoiceList(mapValue, pageNum, pageSize, apiId, con); } @PostMapping("getSaleTruckStatementDetailsOrderList") @ApiOperation(value = "展示账单下的详单") public RESTfulResult getSaleTruckStatementDetailsOrderList(@RequestBody(required = false) Map mapValue, Integer pageNum, Integer pageSize, Integer apiId, Integer statementId) { if (mapValue == null) { mapValue = new HashMap<>(); } return bmstruckFeign.getSaleTruckStatementDetailsOrderList(mapValue, pageNum, pageSize, apiId, new BigDecimal(statementId)); } @PostMapping("getUnFinishedTruckDetailsOrderList") @ApiOperation(value = "展示汽运未生成账单的详单信息") public RESTfulResult getUnFinishedTruckDetailsOrderList(@RequestBody(required = false) Map mapValue, Integer pageNum, Integer pageSize, Integer apiId, Integer orderType, String carrierSsoId) { if (mapValue == null) { mapValue = new HashMap<>(); } return bmstruckFeign.getUnFinishedTruckDetailsOrderList(mapValue, pageNum, pageSize, apiId, orderType,carrierSsoId); } @PostMapping("addBmstruckInvoice") @ApiOperation(value = "新增发票") RESTfulResult addBmstruckInvoice(@RequestBody Map mapVal) { return bmstruckFeign.addBmstruckInvoice(mapVal); } @PostMapping("updateBmstruckCheck") @ApiOperation(value = "修改审核状态") RESTfulResult updateBmstruckCheck(@RequestParam Integer statementId, @RequestParam Integer status, @RequestParam Integer person) { return bmstruckFeign.updateBmstruckCheck(new BigDecimal(statementId), status, person); } @PostMapping("getSmallTruckFormula") @ApiOperation(value = "查询销售汽运离100KM差距10KM内计费公式") RESTfulResult getSmallTruckFormula() { return bmstruckFeign.getSmallTruckFormula(); } @PostMapping("getBigTruckFormula") @ApiOperation(value = "查询销售汽运离100KM差距10KM外计费公式") RESTfulResult getBigTruckFormula() { return bmstruckFeign.getBigTruckFormula(); } @PostMapping("addTruckStatement") @ApiOperation(value = "新增汽运详单") RESTfulResult addTruckStatement(@RequestBody List> mapList) { return bmstruckFeign.addTruckStatement(mapList); } @PostMapping("addTruckDetailsOrder/{orderId}") @ApiOperation(value = "新增汽运详单") RESTfulResult addTruckDetailsOrder(@PathVariable("orderId") BigDecimal orderId) { return bmstruckFeign.addTruckDetailsOrder(orderId); } /** * 展示汽运未生成账单的详单信息 * * @param mapVal * @param pageNum * @param pageSize * @param apiId * @return */ @ApiModelProperty(value = "展示内转汽运未生成账单的作业详单信息") @ApiImplicitParams({ @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"), @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"), @ApiImplicitParam(name = "apiId", value = "还没定", required = false, dataType = "BigDecimal"), @ApiImplicitParam(name = "orderType", value = "1:计时,2:计数,3:计重,4:包月", required = false, dataType = "Integer") }) @PostMapping("/getUnFinishedConvertedTruckDetailsOrderList") public RESTfulResult getUnFinishedConvertedTruckDetailsOrderList(@RequestBody(required = false) Map mapVal, Integer pageNum, Integer pageSize, Integer apiId, Integer orderType) { if (mapVal == null) { mapVal = new HashMap<>(); } return bmstruckFeign.getUnFinishedConvertedTruckDetailsOrderList(mapVal, pageNum, pageSize, apiId, new BigDecimal(orderType)); } @PostMapping("/addConvertedDetailsOrder/{orderId}") RESTfulResult addConvertedDetailsOrder(@PathVariable("orderId") BigDecimal orderId) { return bmstruckFeign.addConvertedDetailsOrder(orderId); } /** * 生成内转汽运账单 * * @param mapList * @return */ @ApiModelProperty(value = "生成内转汽运账单") @PostMapping("/addConvertedTruckStatement") public RESTfulResult addConvertedTruckStatement(@RequestBody List> mapList) { return bmstruckFeign.addConvertedTruckStatement(mapList); } /** * 删除汽运账单 */ @PostMapping("/deleteConvertedTruckStatement/{statementId}") public RESTfulResult deleteConvertedTruckStatement(@PathVariable("statementId") BigDecimal statementId) { return bmstruckFeign.delete(statementId); } /** * 审批计费账单 */ @PostMapping("/updateConvertedTruckStatement/{statementId}") public RESTfulResult updateConvertedTruckStatement(@PathVariable("statementId") BigDecimal statementId) { return bmstruckFeign.update(statementId); } @PostMapping("/updateDetailsOrder") @ApiOperation(value = "修改详单") public RESTfulResult updateDetailsOrder(@RequestBody Map mapValue) { return bmstruckFeign.updateDetailsOrder(mapValue); } @PostMapping("/addLossFeeOfCoke") @ApiOperation(value = "增加焦炭途损费") public RESTfulResult addLossFeeOfCoke(@RequestBody Map map) { return bmstruckFeign.addLossFeeOfCoke(map); } /** * 展示详单信息 * * @param mapVal * @param pageNum * @param pageSize * @param apiId * @return */ @ApiModelProperty(value = "展示内转汽运未生成账单的作业详单信息") @ApiImplicitParams({ @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"), @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"), @ApiImplicitParam(name = "apiId", value = "还没定", required = false, dataType = "BigDecimal"), @ApiImplicitParam(name = "orderType", value = "1:计时,2:计数,3:计重,4:包月", required = false, dataType = "Integer") }) @PostMapping("/getInwardWeightDetailsOrder") public Map getInwardWeightDetailsOrder(@RequestBody(required = false) Map mapVal, Integer pageNum, Integer pageSize, Integer apiId, String carrierSsoId, Integer detailStatus, Integer orderType, String userId, String startTime, String endTime) { if (mapVal == null) { mapVal = new HashMap<>(); } return bmstruckFeign.getInwardWeightDetailsOrder(mapVal, pageNum, pageSize, apiId, carrierSsoId,detailStatus,orderType,userId, startTime, endTime); } @PostMapping("/getInwardWeightTimeDetailsOrder") public Map getInwardWeightTimeDetailsOrder(@RequestBody(required = false) Map mapVal, Integer pageNum, Integer pageSize, Integer apiId, String carrierSsoId, Integer detailStatus, Integer orderType, String userId, String startTime, String endTime) { if (mapVal == null) { mapVal = new HashMap<>(); } return bmstruckFeign.getInwardWeightTimeDetailsOrder(mapVal, pageNum, pageSize, apiId, carrierSsoId,detailStatus,orderType,userId, startTime, endTime); } }