package com.steerinfo.dil.service.impl; import com.steerinfo.dil.mapper.BmsportHandlingFeeMapper; import com.steerinfo.dil.service.IBmsportHandlingFeeService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.Date; import java.math.BigDecimal; import java.util.HashMap; import java.util.List; import java.util.Map; /** * BmsportHandlingFee服务实现: * @author generator * @version 1.0-SNAPSHORT 2021-11-05 07:43 * 类描述 * 修订历史: * 日期:2021-11-05 * 作者:generator * 参考: * 描述:BmsportHandlingFee服务实现 * @see null * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved. */ @Service(value = "bmsportHandlingFeeService") public class BmsportHandlingFeeServiceImpl implements IBmsportHandlingFeeService { @Autowired private BmsportHandlingFeeMapper bmsportHandlingFeeMapper; /** * 得到港口装卸费信息 * @param feeId * @return */ @Override public Map getPortFee(Integer feeId) { List> entries = bmsportHandlingFeeMapper.getPortFee(new BigDecimal(feeId)); for (Map map : entries) { map.put("carNum",""); map.put("forwarder",""); } Map map = entries.get(0); BigDecimal statementTotalAmount = (BigDecimal) map.get("amount"); BigDecimal qty = (BigDecimal) map.get("qty"); map.remove("amount"); map.remove("qty"); map.put("amount",statementTotalAmount.toString()); map.put("qty",qty.toString()); String detailNum = (String) map.get("detailNum"); Date statementTime = (Date) map.get("detailDate"); Map head = new HashMap<>(); Map otherMap = bmsportHandlingFeeMapper.getOtherMessage(new BigDecimal(feeId)); head.put("allAmount",statementTotalAmount.toString()); head.put("bizDate",statementTime); head.put("billNum",detailNum); String amountType = "港口装卸费"; head.put("amountType",amountType); head.put("payUnitNum",""); head.put("receivedUnitNum",""); head.putAll(otherMap); Map input = new HashMap<>(); input.put("entries",entries); input.put("head",head); return input; } }