增加提单功能
This commit is contained in:
+58
@@ -0,0 +1,58 @@
|
|||||||
|
package com.bms.web.controller.price;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.bms.common.core.controller.BaseController;
|
||||||
|
import com.bms.common.core.domain.AjaxResult;
|
||||||
|
import com.bms.common.core.page.TableDataInfo;
|
||||||
|
import com.bms.common.utils.StringUtils;
|
||||||
|
import com.bms.price.domain.vo.SrvBillAirQuery;
|
||||||
|
import com.bms.price.domain.vo.SrvBillAirVo;
|
||||||
|
import com.bms.price.service.ISrvBillAirService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 空运提单(计费中心)
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/price/airBill")
|
||||||
|
public class SrvBillAirController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ISrvBillAirService srvBillAirService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提单列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('price:airBill:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(SrvBillAirQuery query)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<SrvBillAirVo> list = srvBillAirService.selectSrvBillAirList(query);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提单详情(按提单号)
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasAnyPermi('price:airBill:list,price:airBill:query')")
|
||||||
|
@GetMapping("/detail")
|
||||||
|
public AjaxResult getInfo(@RequestParam("billCode") String billCode)
|
||||||
|
{
|
||||||
|
if (StringUtils.isEmpty(billCode))
|
||||||
|
{
|
||||||
|
return error("提单号不能为空");
|
||||||
|
}
|
||||||
|
SrvBillAirVo vo = srvBillAirService.selectSrvBillAirByBillCode(billCode);
|
||||||
|
if (vo == null)
|
||||||
|
{
|
||||||
|
return error("提单不存在");
|
||||||
|
}
|
||||||
|
return success(vo);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
package com.bms.price.domain.vo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 空运提单查询条件
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SrvBillAirQuery
|
||||||
|
{
|
||||||
|
/** 提单号(单个,模糊) */
|
||||||
|
private String billCode;
|
||||||
|
|
||||||
|
/** 提单号列表(精确) */
|
||||||
|
private List<String> billCodes;
|
||||||
|
|
||||||
|
/** 提单类型 */
|
||||||
|
private Integer billType;
|
||||||
|
|
||||||
|
/** 始发机场 */
|
||||||
|
private String startAirport;
|
||||||
|
|
||||||
|
/** 目的机场 */
|
||||||
|
private String endAirport;
|
||||||
|
|
||||||
|
/** 目的港 */
|
||||||
|
private String desPort;
|
||||||
|
|
||||||
|
/** 航线名称 */
|
||||||
|
private String routeName;
|
||||||
|
|
||||||
|
/** 航空公司 */
|
||||||
|
private String airCompany;
|
||||||
|
|
||||||
|
/** 航班号 */
|
||||||
|
private String airNo;
|
||||||
|
|
||||||
|
/** 发货日期起 */
|
||||||
|
private String shippingDateBegin;
|
||||||
|
|
||||||
|
/** 发货日期止 */
|
||||||
|
private String shippingDateEnd;
|
||||||
|
|
||||||
|
/** 创建时间起 */
|
||||||
|
private String createTimeBegin;
|
||||||
|
|
||||||
|
/** 创建时间止 */
|
||||||
|
private String createTimeEnd;
|
||||||
|
}
|
||||||
@@ -0,0 +1,132 @@
|
|||||||
|
package com.bms.price.domain.vo;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 空运提单列表/详情视图(srv_bill_air + finance/flight/op/track)
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SrvBillAirVo
|
||||||
|
{
|
||||||
|
/** 主键 */
|
||||||
|
private String guid;
|
||||||
|
|
||||||
|
/** 提单号 */
|
||||||
|
private String billCode;
|
||||||
|
|
||||||
|
/** 提单类型 */
|
||||||
|
private Integer billType;
|
||||||
|
|
||||||
|
/** 状态 */
|
||||||
|
private Integer blStatus;
|
||||||
|
|
||||||
|
/** 始发机场 */
|
||||||
|
private String startAirport;
|
||||||
|
|
||||||
|
/** 目的机场 */
|
||||||
|
private String endAirport;
|
||||||
|
|
||||||
|
/** 目的港 */
|
||||||
|
private String desPort;
|
||||||
|
|
||||||
|
/** 航线名称 */
|
||||||
|
private String routeName;
|
||||||
|
|
||||||
|
/** 航空公司 */
|
||||||
|
private String airCompany;
|
||||||
|
|
||||||
|
/** 报关费 */
|
||||||
|
private BigDecimal baoguanFee;
|
||||||
|
|
||||||
|
/** 报关其他费用 */
|
||||||
|
private BigDecimal baoguanOtherFee;
|
||||||
|
|
||||||
|
/** 仓储费 */
|
||||||
|
private BigDecimal stockFee;
|
||||||
|
|
||||||
|
/** 目的港代理费 */
|
||||||
|
private BigDecimal desPortAgentFee;
|
||||||
|
|
||||||
|
/** 空运其他费用 */
|
||||||
|
private BigDecimal airOtherFee;
|
||||||
|
|
||||||
|
/** 其他费用 */
|
||||||
|
private BigDecimal otherFee;
|
||||||
|
|
||||||
|
/** 总件数 */
|
||||||
|
private Integer pieceNumber;
|
||||||
|
|
||||||
|
/** 总体积 */
|
||||||
|
private BigDecimal volume;
|
||||||
|
|
||||||
|
/** 实际重量 */
|
||||||
|
private BigDecimal actualWeight;
|
||||||
|
|
||||||
|
/** 实际体积 */
|
||||||
|
private BigDecimal actualVolume;
|
||||||
|
|
||||||
|
/** 体积重 */
|
||||||
|
private BigDecimal volumeWeight;
|
||||||
|
|
||||||
|
/** 首程落地时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date firstLandingTime;
|
||||||
|
|
||||||
|
/** 航班号 */
|
||||||
|
private String airNo;
|
||||||
|
|
||||||
|
/** 实际航班号 */
|
||||||
|
private String actualAirNo;
|
||||||
|
|
||||||
|
/** 航空公司代理 */
|
||||||
|
private String airCompanyAgent;
|
||||||
|
|
||||||
|
/** 目的港代理编码 */
|
||||||
|
private String desPortAgentCode;
|
||||||
|
|
||||||
|
/** 报关公司编码 */
|
||||||
|
private String declareCode;
|
||||||
|
|
||||||
|
/** 清关编码 */
|
||||||
|
private String clearanceCode;
|
||||||
|
|
||||||
|
/** 清关代理 */
|
||||||
|
private String qingguanAgent;
|
||||||
|
|
||||||
|
/** 出仓仓库地址 */
|
||||||
|
private String stockAddr;
|
||||||
|
|
||||||
|
/** 发货日期 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date shippingDate;
|
||||||
|
|
||||||
|
/** 起飞时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date startTime;
|
||||||
|
|
||||||
|
/** 到达时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date arriveTime;
|
||||||
|
|
||||||
|
/** 到仓时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date arriveStockTime;
|
||||||
|
|
||||||
|
/** 清关时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date clearanceTime;
|
||||||
|
|
||||||
|
/** 创建时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/** 修改时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date modifyTime;
|
||||||
|
|
||||||
|
/** 总备注 */
|
||||||
|
private String remark;
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.bms.price.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.bms.price.domain.vo.SrvBillAirQuery;
|
||||||
|
import com.bms.price.domain.vo.SrvBillAirVo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 空运提单 Mapper
|
||||||
|
*/
|
||||||
|
public interface SrvBillAirMapper
|
||||||
|
{
|
||||||
|
List<SrvBillAirVo> selectSrvBillAirList(SrvBillAirQuery query);
|
||||||
|
|
||||||
|
SrvBillAirVo selectSrvBillAirByBillCode(String billCode);
|
||||||
|
|
||||||
|
SrvBillAirVo selectSrvBillAirByGuid(String guid);
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.bms.price.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.bms.price.domain.vo.SrvBillAirQuery;
|
||||||
|
import com.bms.price.domain.vo.SrvBillAirVo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 空运提单 Service
|
||||||
|
*/
|
||||||
|
public interface ISrvBillAirService
|
||||||
|
{
|
||||||
|
List<SrvBillAirVo> selectSrvBillAirList(SrvBillAirQuery query);
|
||||||
|
|
||||||
|
SrvBillAirVo selectSrvBillAirByBillCode(String billCode);
|
||||||
|
|
||||||
|
SrvBillAirVo selectSrvBillAirByGuid(String guid);
|
||||||
|
}
|
||||||
+37
@@ -0,0 +1,37 @@
|
|||||||
|
package com.bms.price.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.bms.price.domain.vo.SrvBillAirQuery;
|
||||||
|
import com.bms.price.domain.vo.SrvBillAirVo;
|
||||||
|
import com.bms.price.mapper.SrvBillAirMapper;
|
||||||
|
import com.bms.price.service.ISrvBillAirService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 空运提单 Service 实现
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class SrvBillAirServiceImpl implements ISrvBillAirService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private SrvBillAirMapper srvBillAirMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SrvBillAirVo> selectSrvBillAirList(SrvBillAirQuery query)
|
||||||
|
{
|
||||||
|
return srvBillAirMapper.selectSrvBillAirList(query);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SrvBillAirVo selectSrvBillAirByBillCode(String billCode)
|
||||||
|
{
|
||||||
|
return srvBillAirMapper.selectSrvBillAirByBillCode(billCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SrvBillAirVo selectSrvBillAirByGuid(String guid)
|
||||||
|
{
|
||||||
|
return srvBillAirMapper.selectSrvBillAirByGuid(guid);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,156 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.bms.price.mapper.SrvBillAirMapper">
|
||||||
|
|
||||||
|
<resultMap id="SrvBillAirResult" type="com.bms.price.domain.vo.SrvBillAirVo">
|
||||||
|
<result property="guid" column="guid"/>
|
||||||
|
<result property="billCode" column="bill_code"/>
|
||||||
|
<result property="billType" column="bill_type"/>
|
||||||
|
<result property="blStatus" column="bl_status"/>
|
||||||
|
<result property="startAirport" column="start_airport"/>
|
||||||
|
<result property="endAirport" column="end_airport"/>
|
||||||
|
<result property="desPort" column="des_port"/>
|
||||||
|
<result property="routeName" column="route_name"/>
|
||||||
|
<result property="airCompany" column="air_company"/>
|
||||||
|
<result property="baoguanFee" column="baoguan_fee"/>
|
||||||
|
<result property="baoguanOtherFee" column="baoguan_other_fee"/>
|
||||||
|
<result property="stockFee" column="stock_fee"/>
|
||||||
|
<result property="desPortAgentFee" column="des_port_agent_fee"/>
|
||||||
|
<result property="airOtherFee" column="air_other_fee"/>
|
||||||
|
<result property="otherFee" column="other_fee"/>
|
||||||
|
<result property="pieceNumber" column="piece_number"/>
|
||||||
|
<result property="volume" column="volume"/>
|
||||||
|
<result property="actualWeight" column="actual_weight"/>
|
||||||
|
<result property="actualVolume" column="actual_volume"/>
|
||||||
|
<result property="volumeWeight" column="volume_weight"/>
|
||||||
|
<result property="firstLandingTime" column="first_landing_time"/>
|
||||||
|
<result property="airNo" column="air_no"/>
|
||||||
|
<result property="actualAirNo" column="actual_air_no"/>
|
||||||
|
<result property="airCompanyAgent" column="air_ompany_agent"/>
|
||||||
|
<result property="desPortAgentCode" column="des_port_agent_code"/>
|
||||||
|
<result property="declareCode" column="declare_code"/>
|
||||||
|
<result property="clearanceCode" column="clearance_code"/>
|
||||||
|
<result property="qingguanAgent" column="qingguan_agent"/>
|
||||||
|
<result property="stockAddr" column="stock_addr"/>
|
||||||
|
<result property="shippingDate" column="shipping_date"/>
|
||||||
|
<result property="startTime" column="start_time"/>
|
||||||
|
<result property="arriveTime" column="arrive_time"/>
|
||||||
|
<result property="arriveStockTime" column="arrive_stock_time"/>
|
||||||
|
<result property="clearanceTime" column="clearance_time"/>
|
||||||
|
<result property="createTime" column="create_time"/>
|
||||||
|
<result property="modifyTime" column="modify_time"/>
|
||||||
|
<result property="remark" column="remark"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectAirBillVo">
|
||||||
|
select a.guid,
|
||||||
|
a.bill_code,
|
||||||
|
a.bill_type,
|
||||||
|
a.bl_status,
|
||||||
|
a.start_airport,
|
||||||
|
a.end_airport,
|
||||||
|
a.des_port,
|
||||||
|
a.route_name,
|
||||||
|
a.air_company,
|
||||||
|
f.baoguan_fee,
|
||||||
|
f.baoguan_other_fee,
|
||||||
|
f.stock_fee,
|
||||||
|
f.des_port_agent_fee,
|
||||||
|
f.air_other_fee,
|
||||||
|
f.other_fee,
|
||||||
|
a.piece_number,
|
||||||
|
a.volume,
|
||||||
|
a.actual_weight,
|
||||||
|
a.actual_volume,
|
||||||
|
a.volume_weight,
|
||||||
|
fl.first_landing_time,
|
||||||
|
fl.air_no,
|
||||||
|
fl.actual_air_no,
|
||||||
|
fl.air_ompany_agent,
|
||||||
|
fl.des_port_agent_code,
|
||||||
|
o.declare_code,
|
||||||
|
o.clearance_code,
|
||||||
|
o.qingguan_agent,
|
||||||
|
o.stock_addr,
|
||||||
|
t.shipping_date,
|
||||||
|
t.start_time,
|
||||||
|
t.arrive_time,
|
||||||
|
t.arrive_stock_time,
|
||||||
|
t.clearance_time,
|
||||||
|
a.create_time,
|
||||||
|
a.modify_time,
|
||||||
|
a.remark
|
||||||
|
from srv_bill_air a
|
||||||
|
left join srv_bill_air_finance f on f.bill_code = a.bill_code
|
||||||
|
left join srv_bill_air_flight fl on fl.bill_code = a.bill_code
|
||||||
|
left join srv_bill_air_op o on o.bill_code = a.bill_code
|
||||||
|
left join srv_bill_air_track t on t.bill_code = a.bill_code
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<sql id="airBillWhere">
|
||||||
|
<where>
|
||||||
|
<if test="billCode != null and billCode != ''">
|
||||||
|
AND a.bill_code like concat('%', #{billCode}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="billCodes != null and billCodes.size() > 0">
|
||||||
|
AND a.bill_code in
|
||||||
|
<foreach collection="billCodes" item="code" open="(" separator="," close=")">
|
||||||
|
#{code}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="billType != null">
|
||||||
|
AND a.bill_type = #{billType}
|
||||||
|
</if>
|
||||||
|
<if test="startAirport != null and startAirport != ''">
|
||||||
|
AND a.start_airport like concat('%', #{startAirport}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="endAirport != null and endAirport != ''">
|
||||||
|
AND a.end_airport like concat('%', #{endAirport}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="desPort != null and desPort != ''">
|
||||||
|
AND a.des_port like concat('%', #{desPort}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="routeName != null and routeName != ''">
|
||||||
|
AND a.route_name like concat('%', #{routeName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="airCompany != null and airCompany != ''">
|
||||||
|
AND a.air_company like concat('%', #{airCompany}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="airNo != null and airNo != ''">
|
||||||
|
AND fl.air_no like concat('%', #{airNo}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="shippingDateBegin != null and shippingDateBegin != ''">
|
||||||
|
AND t.shipping_date >= #{shippingDateBegin}
|
||||||
|
</if>
|
||||||
|
<if test="shippingDateEnd != null and shippingDateEnd != ''">
|
||||||
|
AND t.shipping_date <= #{shippingDateEnd}
|
||||||
|
</if>
|
||||||
|
<if test="createTimeBegin != null and createTimeBegin != ''">
|
||||||
|
AND a.create_time >= #{createTimeBegin}
|
||||||
|
</if>
|
||||||
|
<if test="createTimeEnd != null and createTimeEnd != ''">
|
||||||
|
AND a.create_time <= #{createTimeEnd}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectSrvBillAirList" parameterType="com.bms.price.domain.vo.SrvBillAirQuery" resultMap="SrvBillAirResult">
|
||||||
|
<include refid="selectAirBillVo"/>
|
||||||
|
<include refid="airBillWhere"/>
|
||||||
|
order by a.create_time desc, a.bill_code desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSrvBillAirByBillCode" parameterType="String" resultMap="SrvBillAirResult">
|
||||||
|
<include refid="selectAirBillVo"/>
|
||||||
|
where a.bill_code = #{billCode}
|
||||||
|
limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSrvBillAirByGuid" parameterType="String" resultMap="SrvBillAirResult">
|
||||||
|
<include refid="selectAirBillVo"/>
|
||||||
|
where a.guid = #{guid}
|
||||||
|
limit 1
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
-- 空运提单列表: under 计费中心
|
||||||
|
SET NAMES utf8mb4;
|
||||||
|
|
||||||
|
INSERT INTO sys_menu (menu_id, menu_name, parent_id, order_num, path, component, query, route_name, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, remark)
|
||||||
|
SELECT 2520, N'提单列表', 2300, 2, 'airBill', 'price/billing/airBill', '', 'AirBill', 1, 0, 'C', '0', '0',
|
||||||
|
'price:airBill:list', 'list', 'admin', sysdate(), N'查看空运提单列表与详情(srv_bill_air*)'
|
||||||
|
WHERE NOT EXISTS (SELECT 1 FROM sys_menu WHERE menu_id = 2520 OR perms = 'price:airBill:list');
|
||||||
|
|
||||||
|
INSERT INTO sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, remark)
|
||||||
|
SELECT 2521, N'查询', 2520, 1, '', NULL, 1, 0, 'F', '0', '0', 'price:airBill:list', '#', 'admin', sysdate(), N'提单列表查询'
|
||||||
|
WHERE NOT EXISTS (SELECT 1 FROM sys_menu WHERE menu_id = 2521);
|
||||||
|
|
||||||
|
INSERT INTO sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, remark)
|
||||||
|
SELECT 2522, N'详情', 2520, 2, '', NULL, 1, 0, 'F', '0', '0', 'price:airBill:query', '#', 'admin', sysdate(), N'提单详情'
|
||||||
|
WHERE NOT EXISTS (SELECT 1 FROM sys_menu WHERE menu_id = 2522 OR perms = 'price:airBill:query');
|
||||||
|
|
||||||
|
INSERT INTO sys_role_menu (role_id, menu_id)
|
||||||
|
SELECT 1, m.menu_id FROM (SELECT 2520 AS menu_id UNION SELECT 2521 UNION SELECT 2522) m
|
||||||
|
WHERE NOT EXISTS (SELECT 1 FROM sys_role_menu rm WHERE rm.role_id = 1 AND rm.menu_id = m.menu_id);
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
-- 空运提单类型字典 srv_air_bill_type
|
||||||
|
-- 0=整板 1=散板 2=其他(对应 srv_bill_air.bill_type)
|
||||||
|
SET NAMES utf8mb4;
|
||||||
|
|
||||||
|
INSERT INTO sys_dict_type (dict_name, dict_type, status, create_by, create_time, remark)
|
||||||
|
SELECT N'提单类型', 'srv_air_bill_type', '0', 'admin', sysdate(), N'空运提单 bill_type:整板/散板/其他'
|
||||||
|
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM sys_dict_type WHERE dict_type = 'srv_air_bill_type');
|
||||||
|
|
||||||
|
INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark)
|
||||||
|
SELECT v.dict_sort, v.dict_label, v.dict_value, 'srv_air_bill_type', '', v.list_class, 'N', '0', 'admin', sysdate(), v.remark
|
||||||
|
FROM (
|
||||||
|
SELECT 1 AS dict_sort, N'整板' AS dict_label, '0' AS dict_value, 'primary' AS list_class, N'bill_type=0' AS remark
|
||||||
|
UNION ALL SELECT 2, N'散板', '1', 'success', N'bill_type=1'
|
||||||
|
UNION ALL SELECT 3, N'其他', '2', 'info', N'bill_type=2'
|
||||||
|
) v
|
||||||
|
WHERE NOT EXISTS (
|
||||||
|
SELECT 1 FROM sys_dict_data d WHERE d.dict_type = 'srv_air_bill_type' AND d.dict_value = v.dict_value
|
||||||
|
);
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
/** Air bill list */
|
||||||
|
export function listAirBill(query) {
|
||||||
|
return request({
|
||||||
|
url: '/price/airBill/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Air bill detail by bill code */
|
||||||
|
export function getAirBill(billCode) {
|
||||||
|
return request({
|
||||||
|
url: '/price/airBill/detail',
|
||||||
|
method: 'get',
|
||||||
|
params: { billCode }
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -0,0 +1,205 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container air-bill-page">
|
||||||
|
<basic-table
|
||||||
|
ref="tableRef"
|
||||||
|
:columns="columns"
|
||||||
|
:search-columns="searchColumns"
|
||||||
|
:query="queryList"
|
||||||
|
row-key="billCode"
|
||||||
|
:search-per-row="4"
|
||||||
|
:page-sizes="[50, 100, 200, 300]"
|
||||||
|
:page-size="100"
|
||||||
|
:height="tableHeight"
|
||||||
|
virtual
|
||||||
|
>
|
||||||
|
<template #search-billCodes="{ model }">
|
||||||
|
<el-input
|
||||||
|
v-model="model.billCodes"
|
||||||
|
type="textarea"
|
||||||
|
:rows="1"
|
||||||
|
resize="none"
|
||||||
|
placeholder="提单号,多个用逗号/换行分隔"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
<template #search-shippingDateRange="{ model }">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="model.shippingDateRange"
|
||||||
|
type="datetimerange"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
range-separator="-"
|
||||||
|
start-placeholder="开始"
|
||||||
|
end-placeholder="结束"
|
||||||
|
style="width: 100%"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
<template #search-createTimeRange="{ model }">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="model.createTimeRange"
|
||||||
|
type="datetimerange"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
range-separator="-"
|
||||||
|
start-placeholder="开始"
|
||||||
|
end-placeholder="结束"
|
||||||
|
style="width: 100%"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
<template #col-billCode="{ row }">
|
||||||
|
<el-button link type="primary" @click="openDetail(row)">{{ row.billCode || '-' }}</el-button>
|
||||||
|
</template>
|
||||||
|
<template #col-action="{ row }">
|
||||||
|
<el-button link type="primary" v-hasPermi="['price:airBill:query']" @click="openDetail(row)">详情</el-button>
|
||||||
|
</template>
|
||||||
|
</basic-table>
|
||||||
|
|
||||||
|
<air-bill-detail v-model="open" :title="title" :loading="loading" :detail="detail" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="AirBill">
|
||||||
|
import { listAirBill, getAirBill } from '@/api/price/airBill'
|
||||||
|
import AirBillDetail from './components/AirBillDetail.vue'
|
||||||
|
|
||||||
|
const tableRef = ref()
|
||||||
|
const tableHeight = ref(480)
|
||||||
|
let tableResizeObserver = null
|
||||||
|
|
||||||
|
const open = ref(false)
|
||||||
|
const title = ref('提单详情')
|
||||||
|
const loading = ref(false)
|
||||||
|
const detail = ref(null)
|
||||||
|
|
||||||
|
const columns = [
|
||||||
|
{ label: '提单号', prop: 'billCode', minWidth: 150, fixed: 'left', slot: 'billCode', showOverflowTooltip: true },
|
||||||
|
{ label: '首程落地时间', prop: 'firstLandingTime', width: 170, parseTime: true },
|
||||||
|
{ label: '航班号', prop: 'airNo', minWidth: 120, showOverflowTooltip: true },
|
||||||
|
{ label: '实际航班号', prop: 'actualAirNo', minWidth: 120, showOverflowTooltip: true },
|
||||||
|
{ label: '航空公司代理', prop: 'airCompanyAgent', minWidth: 160, showOverflowTooltip: true },
|
||||||
|
{ label: '目的港代理编码', prop: 'desPortAgentCode', width: 130 },
|
||||||
|
{ label: '报关公司编码', prop: 'declareCode', width: 120 },
|
||||||
|
{ label: '清关编码', prop: 'clearanceCode', width: 110 },
|
||||||
|
{ label: '清关代理', prop: 'qingguanAgent', minWidth: 120, showOverflowTooltip: true },
|
||||||
|
{ label: '出仓仓库地址', prop: 'stockAddr', minWidth: 140, showOverflowTooltip: true },
|
||||||
|
{ label: '提单类型', prop: 'billType', width: 100, align: 'center', dict: 'srv_air_bill_type' },
|
||||||
|
{ label: '始发机场', prop: 'startAirport', width: 100 },
|
||||||
|
{ label: '目的机场', prop: 'endAirport', width: 100 },
|
||||||
|
{ label: '目的港', prop: 'desPort', width: 100 },
|
||||||
|
{ label: '航线名称', prop: 'routeName', minWidth: 120, showOverflowTooltip: true },
|
||||||
|
{ label: '航空公司', prop: 'airCompany', minWidth: 110, showOverflowTooltip: true },
|
||||||
|
{ label: '报关费', prop: 'baoguanFee', width: 100, align: 'right' },
|
||||||
|
{ label: '报关其他费用', prop: 'baoguanOtherFee', width: 120, align: 'right' },
|
||||||
|
{ label: '仓储费', prop: 'stockFee', width: 100, align: 'right' },
|
||||||
|
{ label: '目的港代理费', prop: 'desPortAgentFee', width: 120, align: 'right' },
|
||||||
|
{ label: '空运其他费用', prop: 'airOtherFee', width: 120, align: 'right' },
|
||||||
|
{ label: '其他费用', prop: 'otherFee', width: 100, align: 'right' },
|
||||||
|
{ label: '总件数', prop: 'pieceNumber', width: 90, align: 'center' },
|
||||||
|
{ label: '总体积', prop: 'volume', width: 100, align: 'right' },
|
||||||
|
{ label: '实际重量', prop: 'actualWeight', width: 100, align: 'right' },
|
||||||
|
{ label: '实际体积', prop: 'actualVolume', width: 100, align: 'right' },
|
||||||
|
{ label: '体积重', prop: 'volumeWeight', width: 100, align: 'right' },
|
||||||
|
{ label: '发货日期', prop: 'shippingDate', width: 170, parseTime: true },
|
||||||
|
{ label: '起飞时间', prop: 'startTime', width: 170, parseTime: true },
|
||||||
|
{ label: '到达时间', prop: 'arriveTime', width: 170, parseTime: true },
|
||||||
|
{ label: '到仓时间', prop: 'arriveStockTime', width: 170, parseTime: true },
|
||||||
|
{ label: '清关时间', prop: 'clearanceTime', width: 170, parseTime: true },
|
||||||
|
{ label: '操作', prop: 'action', align: 'center', width: 90, fixed: 'right', slot: 'action', showInToolbar: false, showOverflowTooltip: false }
|
||||||
|
]
|
||||||
|
|
||||||
|
const searchColumns = [
|
||||||
|
{ label: '提单号', prop: 'billCodes', span: 6, slot: 'billCodes' },
|
||||||
|
{ label: '始发机场', prop: 'startAirport', span: 6 },
|
||||||
|
{ label: '目的机场', prop: 'endAirport', span: 6 },
|
||||||
|
{ label: '目的港', prop: 'desPort', span: 6 },
|
||||||
|
{ label: '航线名称', prop: 'routeName', span: 6 },
|
||||||
|
{ label: '航空公司', prop: 'airCompany', span: 6 },
|
||||||
|
{ label: '航班号', prop: 'airNo', span: 6 },
|
||||||
|
{ label: '提单类型', prop: 'billType', span: 6, component: 'select', dict: 'srv_air_bill_type', placeholder: '请选择' },
|
||||||
|
{ label: '发货日期', prop: 'shippingDateRange', span: 12, slot: 'shippingDateRange' },
|
||||||
|
{ label: '创建时间', prop: 'createTimeRange', span: 12, slot: 'createTimeRange' }
|
||||||
|
]
|
||||||
|
|
||||||
|
function parseBillCodes(raw) {
|
||||||
|
const values = Array.isArray(raw) ? raw : [raw]
|
||||||
|
return [...new Set(
|
||||||
|
values
|
||||||
|
.filter(v => v !== null && v !== undefined)
|
||||||
|
.flatMap(v => String(v).split(/[\s,,;;]+/))
|
||||||
|
.map(v => v.trim())
|
||||||
|
.filter(Boolean)
|
||||||
|
)]
|
||||||
|
}
|
||||||
|
|
||||||
|
function normalizeQuery(params = {}) {
|
||||||
|
const query = { ...params }
|
||||||
|
const codes = parseBillCodes(query.billCodes)
|
||||||
|
if (codes.length === 1) {
|
||||||
|
query.billCode = codes[0]
|
||||||
|
delete query.billCodes
|
||||||
|
} else if (codes.length > 1) {
|
||||||
|
query.billCodes = codes
|
||||||
|
} else {
|
||||||
|
delete query.billCodes
|
||||||
|
delete query.billCode
|
||||||
|
}
|
||||||
|
const ship = query.shippingDateRange
|
||||||
|
if (Array.isArray(ship) && ship.length === 2) {
|
||||||
|
query.shippingDateBegin = ship[0]
|
||||||
|
query.shippingDateEnd = ship[1]
|
||||||
|
}
|
||||||
|
delete query.shippingDateRange
|
||||||
|
const create = query.createTimeRange
|
||||||
|
if (Array.isArray(create) && create.length === 2) {
|
||||||
|
query.createTimeBegin = create[0]
|
||||||
|
query.createTimeEnd = create[1]
|
||||||
|
}
|
||||||
|
delete query.createTimeRange
|
||||||
|
if (query.billType === '' || query.billType === null || query.billType === undefined) {
|
||||||
|
delete query.billType
|
||||||
|
}
|
||||||
|
return query
|
||||||
|
}
|
||||||
|
|
||||||
|
function queryList(params) {
|
||||||
|
return listAirBill(normalizeQuery(params))
|
||||||
|
}
|
||||||
|
|
||||||
|
function openDetail(row) {
|
||||||
|
if (!row?.billCode) return
|
||||||
|
open.value = true
|
||||||
|
title.value = '提单详情 - ' + row.billCode
|
||||||
|
loading.value = true
|
||||||
|
detail.value = null
|
||||||
|
getAirBill(row.billCode).then(res => {
|
||||||
|
detail.value = res.data || null
|
||||||
|
}).finally(() => {
|
||||||
|
loading.value = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateTableHeight() {
|
||||||
|
const tableEl = document.querySelector('.air-bill-page > .basic-table .el-table, .air-bill-page > .basic-table .basic-table-virtual')
|
||||||
|
if (!tableEl) return
|
||||||
|
const top = tableEl.getBoundingClientRect().top
|
||||||
|
tableHeight.value = Math.max(240, Math.floor(window.innerHeight - top - 70))
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
nextTick(() => {
|
||||||
|
updateTableHeight()
|
||||||
|
const form = document.querySelector('.air-bill-page > .basic-table .basic-form')
|
||||||
|
if (form && typeof ResizeObserver !== 'undefined') {
|
||||||
|
tableResizeObserver = new ResizeObserver(() => updateTableHeight())
|
||||||
|
tableResizeObserver.observe(form)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
window.addEventListener('resize', updateTableHeight)
|
||||||
|
})
|
||||||
|
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
window.removeEventListener('resize', updateTableHeight)
|
||||||
|
if (tableResizeObserver) {
|
||||||
|
tableResizeObserver.disconnect()
|
||||||
|
tableResizeObserver = null
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,116 @@
|
|||||||
|
<template>
|
||||||
|
<el-drawer
|
||||||
|
:model-value="modelValue"
|
||||||
|
:title="title"
|
||||||
|
size="840px"
|
||||||
|
append-to-body
|
||||||
|
destroy-on-close
|
||||||
|
class="air-bill-detail-drawer"
|
||||||
|
@update:model-value="$emit('update:modelValue', $event)"
|
||||||
|
>
|
||||||
|
<div v-loading="loading" class="air-bill-detail-wrap">
|
||||||
|
<el-empty v-if="!detail" description="暂无详情" />
|
||||||
|
<div v-else class="air-bill-detail">
|
||||||
|
<section class="detail-block">
|
||||||
|
<div class="sec-title">基本信息</div>
|
||||||
|
<el-descriptions class="detail-desc" :column="2" border size="small">
|
||||||
|
<el-descriptions-item label="提单号">{{ detail.billCode || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="提单类型"><dict-tag :options="srv_air_bill_type" :value="detail.billType" /></el-descriptions-item>
|
||||||
|
<el-descriptions-item label="始发机场">{{ detail.startAirport || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="目的机场">{{ detail.endAirport || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="目的港">{{ detail.desPort || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="航线名称">{{ detail.routeName || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="航空公司">{{ detail.airCompany || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="总件数">{{ numOrDash(detail.pieceNumber) }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="总体积">{{ numOrDash(detail.volume) }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="实际重量">{{ numOrDash(detail.actualWeight) }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="实际体积">{{ numOrDash(detail.actualVolume) }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="体积重">{{ numOrDash(detail.volumeWeight) }}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="detail-block">
|
||||||
|
<div class="sec-title">费用信息</div>
|
||||||
|
<el-descriptions class="detail-desc" :column="2" border size="small">
|
||||||
|
<el-descriptions-item label="报关费">{{ money(detail.baoguanFee) }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="报关其他费用">{{ money(detail.baoguanOtherFee) }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="仓储费">{{ money(detail.stockFee) }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="目的港代理费">{{ money(detail.desPortAgentFee) }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="空运其他费用">{{ money(detail.airOtherFee) }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="其他费用">{{ money(detail.otherFee) }}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="detail-block">
|
||||||
|
<div class="sec-title">航班与代理</div>
|
||||||
|
<el-descriptions class="detail-desc" :column="2" border size="small">
|
||||||
|
<el-descriptions-item label="航班号">{{ detail.airNo || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="实际航班号">{{ detail.actualAirNo || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="航空公司代理">{{ detail.airCompanyAgent || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="目的港代理编码">{{ detail.desPortAgentCode || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="报关公司编码">{{ detail.declareCode || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="清关编码">{{ detail.clearanceCode || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="清关代理">{{ detail.qingguanAgent || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="出仓仓库地址">{{ detail.stockAddr || '-' }}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="detail-block">
|
||||||
|
<div class="sec-title">时效信息</div>
|
||||||
|
<el-descriptions class="detail-desc" :column="2" border size="small">
|
||||||
|
<el-descriptions-item label="首程落地时间">{{ formatDateTime(detail.firstLandingTime) }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="发货日期">{{ formatDateTime(detail.shippingDate) }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="起飞时间">{{ formatDateTime(detail.startTime) }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="到达时间">{{ formatDateTime(detail.arriveTime) }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="到仓时间">{{ formatDateTime(detail.arriveStockTime) }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="清关时间">{{ formatDateTime(detail.clearanceTime) }}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-drawer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="AirBillDetail">
|
||||||
|
import { parseTime } from '@/utils/bms'
|
||||||
|
|
||||||
|
const { srv_air_bill_type } = useDict('srv_air_bill_type')
|
||||||
|
|
||||||
|
defineProps({
|
||||||
|
modelValue: { type: Boolean, default: false },
|
||||||
|
title: { type: String, default: '提单详情' },
|
||||||
|
loading: { type: Boolean, default: false },
|
||||||
|
detail: { type: Object, default: null }
|
||||||
|
})
|
||||||
|
|
||||||
|
defineEmits(['update:modelValue'])
|
||||||
|
|
||||||
|
function numOrDash(v) {
|
||||||
|
return v === null || v === undefined || v === '' ? '-' : v
|
||||||
|
}
|
||||||
|
|
||||||
|
function money(v) {
|
||||||
|
if (v === null || v === undefined || v === '') return '-'
|
||||||
|
const n = Number(v)
|
||||||
|
if (Number.isNaN(n)) return String(v)
|
||||||
|
return n.toFixed(4)
|
||||||
|
}
|
||||||
|
|
||||||
|
function formatDateTime(v) {
|
||||||
|
return v ? parseTime(v) : '-'
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.air-bill-detail-wrap {
|
||||||
|
min-height: 200px;
|
||||||
|
}
|
||||||
|
.detail-block + .detail-block {
|
||||||
|
margin-top: 16px;
|
||||||
|
}
|
||||||
|
.sec-title {
|
||||||
|
font-weight: 600;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
color: var(--el-text-color-primary);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user