package com.steerinfo.dil.controller; import com.steerinfo.dil.config.ImageFileUtils; 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.http.MediaType; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartRequest; import java.math.BigDecimal; import java.text.SimpleDateFormat; import java.util.*; /** * @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; @Autowired private ImageFileUtils imageFileUtils; /** * 水运结算 * * @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("deletePortHandlingFeeSecond/{feeId}") @ApiOperation(value = "逻辑删除二程港口装卸费") Map deletePortHandlingFeeSecond(@PathVariable("feeId") BigDecimal feeId) { return bmsshipFeign.deletePortHandlingFeeSecond(feeId); } @PostMapping("addwaterStatement") @ApiOperation(value = "修改港口装卸费信息") Map addwaterStatement(@RequestBody Map map) { return bmsshipFeign.addwaterStatement(map); } @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, String userId, String startTime, String endTime, String con) { if (mapValue == null) { mapValue = new HashMap<>(); } return bmstruckFeign.getTruckStatementList(mapValue, pageNum, pageSize, apiId,userId,startTime,endTime,con); } @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(@RequestParam("excludeTax") BigDecimal excludeTax, @RequestParam("userId") String userId, @RequestParam("statementTime") String statementTime, @RequestParam("orderList")BigDecimal[] orderList, MultipartRequest request) { String url=""; List files = new ArrayList<>(); //获取图片 for(int i=0;i<=10;i++){ MultipartFile temp = request.getFile("file"+i); if(temp!=null){ files.add(temp); } } if(files.size() < 1){ return failed("没有上传图片!"); } //上传图片 try{ for(int i=0;i map=new HashMap<>(); map.put("excludeTax",excludeTax); map.put("orderList",orderList); map.put("url",url); map.put("userId",userId); map.put("statementTime",statementTime); return bmstruckFeign.addTruckStatement(map); } @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("/getBmsshipFee/{id}") public Map updateConvertedTruckStatement(@PathVariable("id") Integer id) { return bmsshipFeign.getBmsshipFee(id); } @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); } @PostMapping("/addPortHandlingFeeSecond") @ApiOperation(value = "新增二程船装卸费用") public Map addPortHandlingFeeSecond(@RequestBody(required = false) Map map) { return bmsshipFeign.addPortHandlingFeeSecond(map); } @PostMapping("/uploadBmsshipOrder") @ApiOperation(value = "上传水运单图片") public Map uploadBmsshipOrder(@RequestParam("file") MultipartFile multipartFile) throws Exception { return bmsshipFeign.uploadBmsshipOrder(multipartFile); } //获取水运单图片 @ApiOperation(value = "获取水运单图片") @ApiImplicitParams({ }) @PostMapping(value = "/downloadBmsshipOrder") public Map downloadBmsshipOrder(@RequestParam Integer resultId) { return bmsshipFeign.downloadBmsshipOrder(resultId); } /** * 展示详单信息 * * @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, String capacityNo, String shipperNames, String transRangeValues, String materialTypeNames, String isPage) { if (mapVal == null) { mapVal = new HashMap<>(); } return bmstruckFeign.getInwardWeightDetailsOrder(mapVal, pageNum, pageSize, apiId, carrierSsoId,detailStatus,orderType,userId, startTime, endTime,capacityNo,shipperNames,transRangeValues,materialTypeNames,isPage); } @PostMapping("/getNoInwardDetails") public Map getNoInwardDetails(@RequestBody(required = false) Map mapVal, Integer pageNum, Integer pageSize, Integer apiId, String carrierSsoId, String userId, String startTime, String endTime, String orgCode, String capacityNo, String transRangeValues, String materialTypeNames, String shipperNames, String isPage){ if (mapVal == null) { mapVal = new HashMap<>(); } return bmstruckFeign.getNoInwardDetails(mapVal, pageNum, pageSize, apiId, carrierSsoId,userId, startTime, endTime,orgCode,capacityNo,transRangeValues,materialTypeNames,shipperNames,isPage); } @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); } @PostMapping("/selectPortFeeSecondList") public Map selectPortFeeSecondList(@RequestBody(required = false) Map mapVal, Integer pageNum, Integer pageSize, Integer apiId, String startTime, String endTime, Integer feeType, String con){ if (mapVal == null) { mapVal = new HashMap<>(); } return bmsshipFeign.selectPortFeeSecondList(mapVal, pageNum, pageSize, apiId, startTime, feeType,endTime,con); } /** * 根据批次查火运湿吨详情 * @param batchId * @return */ @PostMapping("/getTrainDetailsByBatch/{batchId}") public Map getTrainDetailsByBatch(@PathVariable("batchId")BigDecimal batchId){ return bmsshipFeign.getTrainDetailsByBatch(batchId); } /** * 根据批次查汽运湿吨详情 * @param batchId * @return */ @PostMapping("/getTruckDetailsByBatch/{batchId}") public Map getTruckDetailsByBatch(@PathVariable("batchId")BigDecimal batchId){ return bmsshipFeign.getTruckDetailsByBatch(batchId); } /** * 根据批次查询装船作业 * @param * @return */ @PostMapping("/findLoadByBatch") public Map findLoadByBatch(@RequestBody(required = false) Map mapVal, Integer pageNum, Integer pageSize, Integer apiId, BigDecimal batchId){ if (mapVal == null) { mapVal = new HashMap<>(); } return bmsshipFeign.findLoadByBatch(mapVal, pageNum, pageSize, apiId,batchId); } @PostMapping("getSteelTruckDetailsOrder") public Map getSteelTruckDetailsOrder(@RequestBody(required = false) Mapmap, Integer pageNum, Integer pageSize, Integer apiId, Integer orderType, String carrierSsoId, String startTime, String endTime, String con){ if(map == null){ map = new HashMap<>(); } return bmstruckFeign.getSteelTruckDetailsOrder(map,pageNum,pageSize,apiId,orderType,carrierSsoId,startTime,endTime,con); } @PostMapping("/getShipFeeStatement") public Map getShipFeeStatement(@RequestBody(required = false) Map map){ if(map == null){ map = new HashMap<>(); } return bmsshipFeign.getShipFeeStatement(map); } @PostMapping("/getShipFeeStatemented") public Map getShipFeeStatemented(@RequestBody(required = false) Map map){ if(map == null){ map = new HashMap<>(); } return bmsshipFeign.getShipFeeStatemented(map); } @PostMapping("/addShipFeeStatement") public Map addShipFeeStatement(@RequestBody(required = false) Map map){ if(map == null){ map = new HashMap<>(); } return bmsshipFeign.addShipFeeStatement(map); } @PostMapping("/editShipFeeStatement") public Map editShipFeeStatement(@RequestBody(required = false) Map map){ if(map == null){ map = new HashMap<>(); } return bmsshipFeign.editShipFeeStatement(map); } //手动生成详单 @PostMapping("/newInwardSettle") public Map newInwardSettle(@RequestBody Map map){ return bmstruckFeign.newInwardSettle(map); } @PostMapping("/getWetDryDetails") public Map getWetDryDetails(@RequestBody Map map){ return bmsshipFeign.getWetDryDetails(map); } @PostMapping("updateDetailsStatus") public Map updateDetailsStatus(@RequestBody Map map) { return bmstruckFeign.updateDetailsStatus(map); } @PostMapping("updateBatchDetailsOrder") public Map updateBatchDetailsOrder(@RequestBody Map map) { return bmstruckFeign.updateBatchDetailsOrder(map); } @PostMapping("findDetailsForStatement") public Map findDetailsForStatement(@RequestBody Map map) { return bmstruckFeign.findDetailsForStatement(map); } @ApiOperation("查询发票图片") @PostMapping("/getStatementPhoto") public List getStatementPhoto(@RequestParam BigDecimal statementId) throws Exception{ try{ String statementPhoto=bmstruckFeign.getStatementPhoto(statementId); return getPhotoByUrl(statementPhoto); }catch (Exception e){ return null; } } //切割字符串,下载图片并返回 private List getPhotoByUrl(String urls) throws Exception { List results=new ArrayList<>(); String files[]=urls.split(";"); for(int i=0;i5;i++){ results.add((String)imageFileUtils.downloadFile(files[i])); } return results; } }