Browse Source

添加车队台账接口

阿伏兔 4 years ago
parent
commit
240b0d671f

+ 22 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/fleet/orderPlan/ftmsorderbillscarsController.java

@@ -16,7 +16,9 @@ import com.ruoyi.framework.web.service.TokenService;
 import com.ruoyi.orderPlan.domain.Ftmsorderbills;
 import com.ruoyi.orderPlan.domain.Ftmsorderbillscars;
 import com.ruoyi.orderPlan.domain.FtmsorderbillscarsExcel;
+import com.ruoyi.orderPlan.domain.VehicleLedgerExcel;
 import com.ruoyi.orderPlan.service.IftmsorderbillscarsService;
+import org.aspectj.weaver.loadtime.Aj;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
@@ -79,6 +81,26 @@ public class ftmsorderbillscarsController extends BaseController {
     }
 
     /**
+     * 查询陆运台账列表信息
+     */
+    @GetMapping("/queryLedgerList")
+    public TableDataInfo queryLedgerList(VehicleLedgerExcel vehicleLedgerExcel) {
+        startPage();
+        List<VehicleLedgerExcel> list = ftmsorderbillscarsService.queryLedgerList(vehicleLedgerExcel);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出陆运台账列表信息
+     */
+    @GetMapping("/ledgerListExport")
+    public AjaxResult ledgerListExport(VehicleLedgerExcel vehicleLedgerExcel) {
+        List<VehicleLedgerExcel> list = ftmsorderbillscarsService.queryLedgerList(vehicleLedgerExcel);
+        ExcelUtil<VehicleLedgerExcel> util = new ExcelUtil<VehicleLedgerExcel>(VehicleLedgerExcel.class);
+        return util.exportExcel(list, "陆运台账");
+    }
+
+    /**
      * 查询车辆可配载运单
      */
     @GetMapping(value = "/selectStowage")

+ 103 - 8
ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/domain/Ftmsorderbillscars.java

@@ -351,10 +351,10 @@ public class Ftmsorderbillscars extends BaseEntity {
     @Excel(name = "订单状态0新录入10车队安排20司机受理30提箱40装卸货50还卸柜60费用确认70回单")
     private Long orderStatus;
 
-    /** 对账日期 */
+    /** 付费对账日期 */
     @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "对账日期", width = 30, dateFormat = "yyyy-MM-dd")
-    private Date accchkDate;
+    @Excel(name = "付费对账日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date accchkDateCr;
 
     /** 出口业务其他费用 */
     @Excel(name = "出口业务其他费用")
@@ -425,6 +425,37 @@ public class Ftmsorderbillscars extends BaseEntity {
     @Excel(name = "配载运单号")
     private String mBillNo;
 
+    /** 付费发票金额 */
+    @Excel(name = "付费发票金额")
+    private BigDecimal invAmtCr;
+
+    /** 收费发票金额 */
+    @Excel(name = "收费发票金额")
+    private BigDecimal invAmtDr;
+
+    /** 付费发票日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "付费发票日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date invDateCr;
+
+    /** 收费发票日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "收费发票日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date invDateDr;
+
+    /** 付费对账金额 */
+    @Excel(name = "付费对账金额")
+    private BigDecimal accchkAmtCr;
+
+    /** 收费对账金额 */
+    @Excel(name = "收费对账金额")
+    private BigDecimal accchkAmtDr;
+
+    /** 收费对账日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "收费对账日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date accchkDateDr;
+
     /**
      *  查询日期区间
      */
@@ -1078,12 +1109,12 @@ public class Ftmsorderbillscars extends BaseEntity {
         this.orderStatus = orderStatus;
     }
 
-    public Date getAccchkDate() {
-        return accchkDate;
+    public Date getAccchkDateCr() {
+        return accchkDateCr;
     }
 
-    public void setAccchkDate(Date accchkDate) {
-        this.accchkDate = accchkDate;
+    public void setAccchkDateCr(Date accchkDateCr) {
+        this.accchkDateCr = accchkDateCr;
     }
 
     public BigDecimal getCostomAmt01() {
@@ -1222,6 +1253,62 @@ public class Ftmsorderbillscars extends BaseEntity {
         this.monthList = monthList;
     }
 
+    public BigDecimal getInvAmtCr() {
+        return invAmtCr;
+    }
+
+    public void setInvAmtCr(BigDecimal invAmtCr) {
+        this.invAmtCr = invAmtCr;
+    }
+
+    public BigDecimal getInvAmtDr() {
+        return invAmtDr;
+    }
+
+    public void setInvAmtDr(BigDecimal invAmtDr) {
+        this.invAmtDr = invAmtDr;
+    }
+
+    public Date getInvDateCr() {
+        return invDateCr;
+    }
+
+    public void setInvDateCr(Date invDateCr) {
+        this.invDateCr = invDateCr;
+    }
+
+    public Date getInvDateDr() {
+        return invDateDr;
+    }
+
+    public void setInvDateDr(Date invDateDr) {
+        this.invDateDr = invDateDr;
+    }
+
+    public BigDecimal getAccchkAmtCr() {
+        return accchkAmtCr;
+    }
+
+    public void setAccchkAmtCr(BigDecimal accchkAmtCr) {
+        this.accchkAmtCr = accchkAmtCr;
+    }
+
+    public BigDecimal getAccchkAmtDr() {
+        return accchkAmtDr;
+    }
+
+    public void setAccchkAmtDr(BigDecimal accchkAmtDr) {
+        this.accchkAmtDr = accchkAmtDr;
+    }
+
+    public Date getAccchkDateDr() {
+        return accchkDateDr;
+    }
+
+    public void setAccchkDateDr(Date accchkDateDr) {
+        this.accchkDateDr = accchkDateDr;
+    }
+
     @Override
     public String toString() {
         return "Ftmsorderbillscars{" +
@@ -1230,6 +1317,7 @@ public class Ftmsorderbillscars extends BaseEntity {
                 ", orgId=" + orgId +
                 ", orderNo='" + orderNo + '\'' +
                 ", cntrId=" + cntrId +
+                ", corpId=" + corpId +
                 ", cntrNo='" + cntrNo + '\'' +
                 ", carcorPid=" + carcorPid +
                 ", mblno='" + mblno + '\'' +
@@ -1305,7 +1393,7 @@ public class Ftmsorderbillscars extends BaseEntity {
                 ", accchkStaus='" + accchkStaus + '\'' +
                 ", billStatus=" + billStatus +
                 ", orderStatus=" + orderStatus +
-                ", accchkDate=" + accchkDate +
+                ", accchkDateCr=" + accchkDateCr +
                 ", costomAmt01=" + costomAmt01 +
                 ", stlAmtDr=" + stlAmtDr +
                 ", costomAmt02=" + costomAmt02 +
@@ -1322,6 +1410,13 @@ public class Ftmsorderbillscars extends BaseEntity {
                 ", remarks='" + remarks + '\'' +
                 ", billKind='" + billKind + '\'' +
                 ", mBillNo='" + mBillNo + '\'' +
+                ", invAmtCr=" + invAmtCr +
+                ", invAmtDr=" + invAmtDr +
+                ", invDateCr=" + invDateCr +
+                ", invDateDr=" + invDateDr +
+                ", accchkAmtCr=" + accchkAmtCr +
+                ", accchkAmtDr=" + accchkAmtDr +
+                ", accchkDateDr=" + accchkDateDr +
                 ", monthList=" + monthList +
                 '}';
     }

+ 417 - 0
ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/domain/VehicleLedgerExcel.java

@@ -0,0 +1,417 @@
+package com.ruoyi.orderPlan.domain;
+
+import com.ruoyi.common.annotation.Excel;
+
+import java.math.BigDecimal;
+
+/**
+ * 车辆台账Excel
+ */
+public class VehicleLedgerExcel {
+
+    private Long id;
+
+    @Excel(name = "装卸日期")
+    private String mdLoadDate;
+
+    @Excel(name = "贸易方式")
+    private String billType;
+
+    @Excel(name = "运输方式")
+    private String transType;
+
+    @Excel(name = "托运人")
+    private String corpId;
+
+    @Excel(name = "船名")
+    private String ysl;
+
+    @Excel(name = "航次")
+    private String voy;
+
+    @Excel(name = "柜量")
+    private Long cntrQty;
+
+    @Excel(name = "柜型")
+    private String cntrId;
+
+    @Excel(name = "品名")
+    private String goodsId;
+
+    @Excel(name = "重量")
+    private BigDecimal cntrWeight;
+
+    @Excel(name = "起运港")
+    private String polId;
+
+    @Excel(name = "目的港")
+    private String podId;
+
+    @Excel(name = "提箱场站")
+    private String loadAddr;
+
+    @Excel(name = "装货地")
+    private String mdLoadAddr;
+
+    @Excel(name = "卸货地")
+    private String unLoadAddr;
+
+    @Excel(name = "车号")
+    private String carregNo;
+
+    @Excel(name = "司机")
+    private String driverName;
+
+    @Excel(name = "运单号")
+    private String orderNo;
+
+    @Excel(name = "司机电话")
+    private String driverTel;
+
+    @Excel(name = "状态")
+    private String orderName;
+
+    @Excel(name = "接单日期")
+    private String acceptDate;
+
+    @Excel(name = "提箱日期")
+    private String loadDate;
+
+    @Excel(name = "还柜日期")
+    private String unLoadDate;
+
+    @Excel(name = "应收结算金额")
+    private BigDecimal amtDr;
+
+    @Excel(name = "应付结算金额")
+    private BigDecimal amtCr;
+
+    @Excel(name = "已收结算金额")
+    private BigDecimal stlAmtDr;
+
+    @Excel(name = "已付结算金额")
+    private BigDecimal stlAmtCr;
+
+    @Excel(name = "业务利润")
+    private BigDecimal profitBill;
+
+    @Excel(name = "车利润")
+    private BigDecimal profitCar;
+
+    /**
+     *  检索条件:结算状态
+     */
+    private String stlStatus;
+
+    /**
+     *  检索条件:对账状态
+     */
+    private String accchkStatus;
+
+    /**
+     *  检索条件:开票状态
+     */
+    private String invStatus;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getMdLoadDate() {
+        return mdLoadDate;
+    }
+
+    public void setMdLoadDate(String mdLoadDate) {
+        this.mdLoadDate = mdLoadDate;
+    }
+
+    public String getBillType() {
+        return billType;
+    }
+
+    public void setBillType(String billType) {
+        this.billType = billType;
+    }
+
+    public String getTransType() {
+        return transType;
+    }
+
+    public void setTransType(String transType) {
+        this.transType = transType;
+    }
+
+    public String getCorpId() {
+        return corpId;
+    }
+
+    public void setCorpId(String corpId) {
+        this.corpId = corpId;
+    }
+
+    public String getYsl() {
+        return ysl;
+    }
+
+    public void setYsl(String ysl) {
+        this.ysl = ysl;
+    }
+
+    public String getVoy() {
+        return voy;
+    }
+
+    public void setVoy(String voy) {
+        this.voy = voy;
+    }
+
+    public Long getCntrQty() {
+        return cntrQty;
+    }
+
+    public void setCntrQty(Long cntrQty) {
+        this.cntrQty = cntrQty;
+    }
+
+    public String getCntrId() {
+        return cntrId;
+    }
+
+    public void setCntrId(String cntrId) {
+        this.cntrId = cntrId;
+    }
+
+    public String getGoodsId() {
+        return goodsId;
+    }
+
+    public void setGoodsId(String goodsId) {
+        this.goodsId = goodsId;
+    }
+
+    public BigDecimal getCntrWeight() {
+        return cntrWeight;
+    }
+
+    public void setCntrWeight(BigDecimal cntrWeight) {
+        this.cntrWeight = cntrWeight;
+    }
+
+    public String getPolId() {
+        return polId;
+    }
+
+    public void setPolId(String polId) {
+        this.polId = polId;
+    }
+
+    public String getPodId() {
+        return podId;
+    }
+
+    public void setPodId(String podId) {
+        this.podId = podId;
+    }
+
+    public String getLoadAddr() {
+        return loadAddr;
+    }
+
+    public void setLoadAddr(String loadAddr) {
+        this.loadAddr = loadAddr;
+    }
+
+    public String getMdLoadAddr() {
+        return mdLoadAddr;
+    }
+
+    public void setMdLoadAddr(String mdLoadAddr) {
+        this.mdLoadAddr = mdLoadAddr;
+    }
+
+    public String getUnLoadAddr() {
+        return unLoadAddr;
+    }
+
+    public void setUnLoadAddr(String unLoadAddr) {
+        this.unLoadAddr = unLoadAddr;
+    }
+
+    public String getCarregNo() {
+        return carregNo;
+    }
+
+    public void setCarregNo(String carregNo) {
+        this.carregNo = carregNo;
+    }
+
+    public String getDriverName() {
+        return driverName;
+    }
+
+    public void setDriverName(String driverName) {
+        this.driverName = driverName;
+    }
+
+    public String getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(String orderNo) {
+        this.orderNo = orderNo;
+    }
+
+    public String getDriverTel() {
+        return driverTel;
+    }
+
+    public void setDriverTel(String driverTel) {
+        this.driverTel = driverTel;
+    }
+
+    public String getOrderName() {
+        return orderName;
+    }
+
+    public void setOrderName(String orderName) {
+        this.orderName = orderName;
+    }
+
+    public String getAcceptDate() {
+        return acceptDate;
+    }
+
+    public void setAcceptDate(String acceptDate) {
+        this.acceptDate = acceptDate;
+    }
+
+    public String getLoadDate() {
+        return loadDate;
+    }
+
+    public void setLoadDate(String loadDate) {
+        this.loadDate = loadDate;
+    }
+
+    public String getUnLoadDate() {
+        return unLoadDate;
+    }
+
+    public void setUnLoadDate(String unLoadDate) {
+        this.unLoadDate = unLoadDate;
+    }
+
+    public BigDecimal getAmtDr() {
+        return amtDr;
+    }
+
+    public void setAmtDr(BigDecimal amtDr) {
+        this.amtDr = amtDr;
+    }
+
+    public BigDecimal getAmtCr() {
+        return amtCr;
+    }
+
+    public void setAmtCr(BigDecimal amtCr) {
+        this.amtCr = amtCr;
+    }
+
+    public BigDecimal getStlAmtDr() {
+        return stlAmtDr;
+    }
+
+    public void setStlAmtDr(BigDecimal stlAmtDr) {
+        this.stlAmtDr = stlAmtDr;
+    }
+
+    public BigDecimal getStlAmtCr() {
+        return stlAmtCr;
+    }
+
+    public void setStlAmtCr(BigDecimal stlAmtCr) {
+        this.stlAmtCr = stlAmtCr;
+    }
+
+    public BigDecimal getProfitBill() {
+        return profitBill;
+    }
+
+    public void setProfitBill(BigDecimal profitBill) {
+        this.profitBill = profitBill;
+    }
+
+    public BigDecimal getProfitCar() {
+        return profitCar;
+    }
+
+    public void setProfitCar(BigDecimal profitCar) {
+        this.profitCar = profitCar;
+    }
+
+    public String getStlStatus() {
+        return stlStatus;
+    }
+
+    public void setStlStatus(String stlStatus) {
+        this.stlStatus = stlStatus;
+    }
+
+    public String getAccchkStatus() {
+        return accchkStatus;
+    }
+
+    public void setAccchkStatus(String accchkStatus) {
+        this.accchkStatus = accchkStatus;
+    }
+
+    public String getInvStatus() {
+        return invStatus;
+    }
+
+    public void setInvStatus(String invStatus) {
+        this.invStatus = invStatus;
+    }
+
+    @Override
+    public String toString() {
+        return "VehicleLedgerExcel{" +
+                "mdLoadDate='" + mdLoadDate + '\'' +
+                ", billType='" + billType + '\'' +
+                ", transType='" + transType + '\'' +
+                ", corpId='" + corpId + '\'' +
+                ", ysl='" + ysl + '\'' +
+                ", voy='" + voy + '\'' +
+                ", cntrQty=" + cntrQty +
+                ", cntrId='" + cntrId + '\'' +
+                ", goodsId='" + goodsId + '\'' +
+                ", cntrWeight=" + cntrWeight +
+                ", polId='" + polId + '\'' +
+                ", podId='" + podId + '\'' +
+                ", loadAddr='" + loadAddr + '\'' +
+                ", mdLoadAddr='" + mdLoadAddr + '\'' +
+                ", unLoadAddr='" + unLoadAddr + '\'' +
+                ", carregNo='" + carregNo + '\'' +
+                ", driverName='" + driverName + '\'' +
+                ", orderNo='" + orderNo + '\'' +
+                ", driverTel='" + driverTel + '\'' +
+                ", orderName='" + orderName + '\'' +
+                ", acceptDate='" + acceptDate + '\'' +
+                ", loadDate='" + loadDate + '\'' +
+                ", unLoadDate='" + unLoadDate + '\'' +
+                ", amtDr=" + amtDr +
+                ", amtCr=" + amtCr +
+                ", stlAmtDr=" + stlAmtDr +
+                ", stlAmtCr=" + stlAmtCr +
+                ", profitBill=" + profitBill +
+                ", profitCar=" + profitCar +
+                ", stlStatus='" + stlStatus + '\'' +
+                ", accchkStatus='" + accchkStatus + '\'' +
+                ", invStatus='" + invStatus + '\'' +
+                '}';
+    }
+}

+ 8 - 4
ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/mapper/FtmsorderbillscarsMapper.java

@@ -1,10 +1,7 @@
 package com.ruoyi.orderPlan.mapper;
 
 import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.orderPlan.domain.Ftmsorderbills;
-import com.ruoyi.orderPlan.domain.Ftmsorderbillscars;
-import com.ruoyi.orderPlan.domain.FtmsorderbillscarsExcel;
-import com.ruoyi.orderPlan.domain.Ftmsorderbillscntrs;
+import com.ruoyi.orderPlan.domain.*;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -203,4 +200,11 @@ public interface FtmsorderbillscarsMapper {
      * @return  结果
      */
     public Ftmsorderbillscars selectftmsorderbillscarsByOrderNo(String orderNo);
+
+    /**
+     *  查询陆运台账列表信息
+     * @param vehicleLedgerExcel    查询条件
+     * @return  结果
+     */
+    public List<VehicleLedgerExcel> queryLedgerList(VehicleLedgerExcel vehicleLedgerExcel);
 }

+ 8 - 0
ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/service/IftmsorderbillscarsService.java

@@ -5,6 +5,7 @@ import com.ruoyi.common.core.domain.model.LoginUser;
 import com.ruoyi.orderPlan.domain.Ftmsorderbills;
 import com.ruoyi.orderPlan.domain.Ftmsorderbillscars;
 import com.ruoyi.orderPlan.domain.FtmsorderbillscarsExcel;
+import com.ruoyi.orderPlan.domain.VehicleLedgerExcel;
 
 import java.util.List;
 import java.util.Map;
@@ -183,4 +184,11 @@ public interface IftmsorderbillscarsService {
      * @return  结果
      */
     public AjaxResult addStowage(Ftmsorderbillscars ftmsorderbillscars);
+
+    /**
+     *  查询陆运台账列表信息
+     * @param vehicleLedgerExcel    查询条件
+     * @return  结果
+     */
+    public List<VehicleLedgerExcel> queryLedgerList(VehicleLedgerExcel vehicleLedgerExcel);
 }

+ 10 - 0
ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/service/impl/FtmsorderbillscarsServiceImpl.java

@@ -576,6 +576,16 @@ public class FtmsorderbillscarsServiceImpl implements IftmsorderbillscarsService
     }
 
     /**
+     *  查询陆运台账列表信息
+     * @param vehicleLedgerExcel    查询条件
+     * @return  结果
+     */
+    @Override
+    public List<VehicleLedgerExcel> queryLedgerList(VehicleLedgerExcel vehicleLedgerExcel) {
+        return ftmsorderbillscarsMapper.queryLedgerList(vehicleLedgerExcel);
+    }
+
+    /**
      * 修改车队派车
      *
      * @param ftmsorderbillscars 车队派车

+ 320 - 149
ruoyi-fleet/src/main/resources/mapper/orderPlan/ftmsorderbillscarsMapper.xml

@@ -5,108 +5,117 @@
 <mapper namespace="com.ruoyi.orderPlan.mapper.FtmsorderbillscarsMapper">
 
     <resultMap type="ftmsorderbillscars" id="ftmsorderbillscarsResult">
-        <result property="id" column="id"/>
-        <result property="pId" column="p_id"/>
-        <result property="orgId" column="org_id"/>
-        <result property="orderNo" column="order_no"/>
-        <result property="cntrId" column="cntr_id"/>
-        <result property="corpId" column="corp_id"/>
-        <result property="cntrNo" column="cntr_no"/>
-        <result property="carcorPid" column="carcor_pid"/>
-        <result property="mblno" column="mblno"/>
-        <result property="carregNo" column="carreg_no"/>
-        <result property="driverName" column="driver_name"/>
-        <result property="driverUserId" column="driver_user_id"/>
-        <result property="driverTel" column="driver_tel"/>
-        <result property="planDate" column="plan_date"/>
-        <result property="planRemarks" column="plan_remarks"/>
-        <result property="acceptDate" column="accept_date"/>
-        <result property="acceptRemarks" column="accept_remarks"/>
-        <result property="loadDate" column="load_date"/>
-        <result property="loadRemarks" column="load_remarks"/>
-        <result property="mdLoadDate" column="md_load_date"/>
-        <result property="offData" column="off_data"/>
-        <result property="offRemarks" column="off_remarks"/>
-        <result property="mdLoadRemarks" column="md_load_remarks"/>
-        <result property="unLoadDate" column="un_load_date"/>
-        <result property="unLoadRemarks" column="un_load_remarks"/>
-        <result property="waybillDate" column="waybill_date"/>
-        <result property="qtyLoad" column="qty_load"/>
-        <result property="qtyUnLoad" column="qty_un_load"/>
-        <result property="cntrQty" column="cntr_qty"/>
-        <result property="gopodsLossQty" column="gopods_loss_qty"/>
-        <result property="cntrWeight" column="cntr_weight"/>
-        <result property="gopodsLossrate" column="gopods_lossrate"/>
-        <result property="waybillRemarks" column="waybill_remarks"/>
-        <result property="gopodsLossamtCr" column="gopods_lossamt_cr"/>
-        <result property="qtyDr" column="qty_dr"/>
-        <result property="gopodsLossamtDr" column="gopods_lossamt_dr"/>
-        <result property="qtyCr" column="qty_cr"/>
-        <result property="freightPriceDr" column="freight_price_dr"/>
-        <result property="freightPriceCr" column="freight_price_cr"/>
-        <result property="freightAmtDr" column="freight_amt_dr"/>
-        <result property="freightAmtCr" column="freight_amt_cr"/>
-        <result property="feeitemDr" column="feeitem_dr"/>
-        <result property="feeitemDrRemarks" column="feeitem_dr_remarks"/>
-        <result property="feeitemCr" column="feeitem_cr"/>
-        <result property="feeitemCrRemarks" column="feeitem_cr_remarks"/>
-        <result property="amtDr" column="amt_dr"/>
-        <result property="amtCr" column="amt_cr"/>
-        <result property="dueDateDr" column="due_date_dr"/>
-        <result property="dueDateCr" column="due_date_cr"/>
-        <result property="odometerFrom" column="odometer_from"/>
-        <result property="odometerEnd" column="odometer_end"/>
-        <result property="milesEmpty" column="miles_empty"/>
-        <result property="milesLoad" column="miles_load"/>
-        <result property="miles" column="miles"/>
-        <result property="driverbonus" column="driverbonus"/>
-        <result property="costtoll" column="costtoll"/>
-        <result property="costmaintain" column="costmaintain"/>
-        <result property="costOth" column="cost_oth"/>
-        <result property="costRemarks" column="cost_remarks"/>
-        <result property="oilQtyper" column="oil_qtyper"/>
-        <result property="oilQty1" column="oil_qty1"/>
-        <result property="oilPrice1" column="oil_price1"/>
-        <result property="oilAmt1" column="oil_amt1"/>
-        <result property="oilQty2" column="oil_qty2"/>
-        <result property="oilPrice2" column="oil_price2"/>
-        <result property="oilAmt2" column="oil_amt2"/>
-        <result property="oilQty" column="oil_qty"/>
-        <result property="oilPrice" column="oil_price"/>
-        <result property="oilAmt" column="oil_amt"/>
-        <result property="oilQtyBlc" column="oil_qty_blc"/>
-        <result property="oilAmtBlc" column="oil_amt_blc"/>
-        <result property="profit" column="profit"/>
-        <result property="invDrNeed" column="inv_dr_need"/>
-        <result property="invDrStatus" column="inv_dr_status"/>
-        <result property="invDrTaxrate" column="inv_dr_taxrate"/>
-        <result property="invDrTaxamt" column="inv_dr_taxamt"/>
-        <result property="invDrDate" column="inv_dr_date"/>
-        <result property="invDrNo" column="inv_dr_no"/>
-        <result property="accchkStaus" column="accchk_staus"/>
-        <result property="billStatus" column="bill_status"/>
-        <result property="orderStatus" column="order_status"/>
-        <result property="accchkDate" column="accchk_date"/>
-        <result property="costomAmt01" column="costom_amt_01"/>
-        <result property="stlAmtDr" column="stl_amt_dr"/>
-        <result property="costomAmt02" column="costom_amt_02"/>
-        <result property="stlDateDr" column="stl_date_dr"/>
-        <result property="costomAmt03" column="costom_amt_03"/>
-        <result property="stlAmtCr" column="stl_amt_cr"/>
-        <result property="costomAmt04" column="costom_amt_04"/>
-        <result property="stlDateCr" column="stl_date_cr"/>
-        <result property="costomAmt05" column="costom_amt_05"/>
-        <result property="costomAmt06" column="costom_amt_06"/>
-        <result property="delFlag" column="del_flag"/>
-        <result property="costomStr01" column="costom_str_01"/>
-        <result property="createBy" column="create_by"/>
-        <result property="createTime" column="create_time"/>
-        <result property="costomStr02" column="costom_str_02"/>
-        <result property="updateBy" column="update_by"/>
-        <result property="updateTime" column="update_time"/>
-        <result property="remarks" column="remarks"/>
-        <result property="mBillNo" column="m_bill_no"/>
-        <result property="billKind" column="bill_kind"/>
+        <result property="id"    column="id"    />
+        <result property="pId"    column="p_id"    />
+        <result property="orgId"    column="org_id"    />
+        <result property="orderNo"    column="order_no"    />
+        <result property="cntrId"    column="cntr_id"    />
+        <result property="cntrNo"    column="cntr_no"    />
+        <result property="carcorPid"    column="carcor_pid"    />
+        <result property="carregNo"    column="carreg_no"    />
+        <result property="mblno"    column="mblno"    />
+        <result property="driverName"    column="driver_name"    />
+        <result property="driverTel"    column="driver_tel"    />
+        <result property="driverUserId"    column="driver_user_id"    />
+        <result property="planDate"    column="plan_date"    />
+        <result property="planRemarks"    column="plan_remarks"    />
+        <result property="acceptDate"    column="accept_date"    />
+        <result property="acceptRemarks"    column="accept_remarks"    />
+        <result property="loadDate"    column="load_date"    />
+        <result property="loadRemarks"    column="load_remarks"    />
+        <result property="mdLoadDate"    column="md_load_date"    />
+        <result property="offData"    column="off_data"    />
+        <result property="offRemarks"    column="off_remarks"    />
+        <result property="mdLoadRemarks"    column="md_load_remarks"    />
+        <result property="unLoadDate"    column="un_load_date"    />
+        <result property="unLoadRemarks"    column="un_load_remarks"    />
+        <result property="waybillDate"    column="waybill_date"    />
+        <result property="qtyLoad"    column="qty_load"    />
+        <result property="cntrQty"    column="cntr_qty"    />
+        <result property="qtyUnLoad"    column="qty_un_load"    />
+        <result property="cntrWeight"    column="cntr_weight"    />
+        <result property="gopodsLossQty"    column="gopods_loss_qty"    />
+        <result property="gopodsLossrate"    column="gopods_lossrate"    />
+        <result property="gopodsLossamtCr"    column="gopods_lossamt_cr"    />
+        <result property="qtyDr"    column="qty_dr"    />
+        <result property="waybillRemarks"    column="waybill_remarks"    />
+        <result property="gopodsLossamtDr"    column="gopods_lossamt_dr"    />
+        <result property="qtyCr"    column="qty_cr"    />
+        <result property="freightPriceDr"    column="freight_price_dr"    />
+        <result property="freightPriceCr"    column="freight_price_cr"    />
+        <result property="freightAmtDr"    column="freight_amt_dr"    />
+        <result property="freightAmtCr"    column="freight_amt_cr"    />
+        <result property="feeitemDr"    column="feeitem_dr"    />
+        <result property="feeitemDrRemarks"    column="feeitem_dr_remarks"    />
+        <result property="feeitemCr"    column="feeitem_cr"    />
+        <result property="feeitemCrRemarks"    column="feeitem_cr_remarks"    />
+        <result property="amtDr"    column="amt_dr"    />
+        <result property="amtCr"    column="amt_cr"    />
+        <result property="dueDateDr"    column="due_date_dr"    />
+        <result property="dueDateCr"    column="due_date_cr"    />
+        <result property="odometerFrom"    column="odometer_from"    />
+        <result property="odometerEnd"    column="odometer_end"    />
+        <result property="milesEmpty"    column="miles_empty"    />
+        <result property="milesLoad"    column="miles_load"    />
+        <result property="miles"    column="miles"    />
+        <result property="driverbonus"    column="driverbonus"    />
+        <result property="costtoll"    column="costtoll"    />
+        <result property="costmaintain"    column="costmaintain"    />
+        <result property="costOth"    column="cost_oth"    />
+        <result property="costRemarks"    column="cost_remarks"    />
+        <result property="oilQtyper"    column="oil_qtyper"    />
+        <result property="oilQty1"    column="oil_qty1"    />
+        <result property="oilPrice1"    column="oil_price1"    />
+        <result property="oilAmt1"    column="oil_amt1"    />
+        <result property="oilQty2"    column="oil_qty2"    />
+        <result property="oilPrice2"    column="oil_price2"    />
+        <result property="oilAmt2"    column="oil_amt2"    />
+        <result property="oilQty"    column="oil_qty"    />
+        <result property="oilPrice"    column="oil_price"    />
+        <result property="oilAmt"    column="oil_amt"    />
+        <result property="oilQtyBlc"    column="oil_qty_blc"    />
+        <result property="oilAmtBlc"    column="oil_amt_blc"    />
+        <result property="profit"    column="profit"    />
+        <result property="invDrNeed"    column="inv_dr_need"    />
+        <result property="invDrStatus"    column="inv_dr_status"    />
+        <result property="invDrTaxrate"    column="inv_dr_taxrate"    />
+        <result property="invDrTaxamt"    column="inv_dr_taxamt"    />
+        <result property="invDrDate"    column="inv_dr_date"    />
+        <result property="invDrNo"    column="inv_dr_no"    />
+        <result property="accchkStaus"    column="accchk_staus"    />
+        <result property="billStatus"    column="bill_status"    />
+        <result property="orderStatus"    column="order_status"    />
+        <result property="costomAmt01"    column="costom_amt_01"    />
+        <result property="costomAmt02"    column="costom_amt_02"    />
+        <result property="stlAmtDr"    column="stl_amt_dr"    />
+        <result property="costomAmt03"    column="costom_amt_03"    />
+        <result property="stlDateDr"    column="stl_date_dr"    />
+        <result property="costomAmt04"    column="costom_amt_04"    />
+        <result property="stlAmtCr"    column="stl_amt_cr"    />
+        <result property="costomAmt05"    column="costom_amt_05"    />
+        <result property="stlDateCr"    column="stl_date_cr"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="costomAmt06"    column="costom_amt_06"    />
+        <result property="costomStr01"    column="costom_str_01"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="costomStr02"    column="costom_str_02"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="remarks"    column="remarks"    />
+        <result property="accchkDateCr"    column="accchk_date_cr"    />
+        <result property="mBillNo"    column="m_bill_no"    />
+        <result property="billKind"    column="bill_kind"    />
+        <result property="profitBill"    column="profit_bill"    />
+        <result property="profitCar"    column="profit_car"    />
+        <result property="corpId"    column="corp_id"    />
+        <result property="invAmtCr"    column="inv_amt_cr"    />
+        <result property="invAmtDr"    column="inv_amt_dr"    />
+        <result property="invDateCr"    column="inv_date_cr"    />
+        <result property="invDateDr"    column="inv_date_dr"    />
+        <result property="accchkAmtCr"    column="accchk_amt_cr"    />
+        <result property="accchkAmtDr"    column="accchk_amt_dr"    />
+        <result property="accchkDateDr"    column="accchk_date_dr"    />
     </resultMap>
 
     <sql id="selectftmsorderbillscarsVo">
@@ -118,10 +127,11 @@
              feeitem_cr, feeitem_cr_remarks, amt_dr, amt_cr, due_date_dr, due_date_cr, odometer_from, odometer_end, miles_empty,
               miles_load, miles, driverbonus, costtoll, costmaintain, cost_oth, cost_remarks, oil_qtyper, oil_qty1, oil_price1,
                oil_amt1, oil_qty2, oil_price2, oil_amt2, oil_qty, oil_price, oil_amt, oil_qty_blc, oil_amt_blc, profit, inv_dr_need,
-                inv_dr_status, inv_dr_taxrate, inv_dr_taxamt, inv_dr_date, inv_dr_no, accchk_staus, bill_status, order_status, accchk_date,
+                inv_dr_status, inv_dr_taxrate, inv_dr_taxamt, inv_dr_date, inv_dr_no, accchk_staus, bill_status, order_status, accchk_date_cr,
                  costom_amt_01, stl_amt_dr, costom_amt_02, stl_date_dr, costom_amt_03, stl_amt_cr, costom_amt_04, stl_date_cr,
                   costom_amt_05, costom_amt_06, del_flag, costom_str_01, create_by, create_time, costom_str_02, update_by, update_time,
-                  m_bill_no, bill_kind, remarks from F_TMSORDERBILLSCARS
+                  m_bill_no, bill_kind, remarks, profit_bill, profit_car, inv_amt_cr, inv_amt_dr, inv_date_cr, inv_date_dr, accchk_amt_cr, accchk_amt_dr,
+                   accchk_date_dr from F_TMSORDERBILLSCARS
     </sql>
 
     <select id="selectftmsorderbillscarsList" parameterType="ftmsorderbillscars" resultMap="ftmsorderbillscarsResult">
@@ -209,7 +219,7 @@
             <if test="accchkStaus != null  and accchkStaus != ''"> and accchk_staus = #{accchkStaus}</if>
             <if test="billStatus != null "> and bill_status = #{billStatus}</if>
             <if test="orderStatus != null "> and order_status = #{orderStatus}</if>
-            <if test="accchkDate != null "> and accchk_date = #{accchkDate}</if>
+            <if test="accchkDateCr != null "> and accchk_date_cr = #{accchkDateCr}</if>
             <if test="costomAmt01 != null "> and costom_amt_01 = #{costomAmt01}</if>
             <if test="stlAmtDr != null "> and stl_amt_dr = #{stlAmtDr}</if>
             <if test="costomAmt02 != null "> and costom_amt_02 = #{costomAmt02}</if>
@@ -308,7 +318,7 @@
             <if test="accchkStaus != null  and accchkStaus != ''"> and accchk_staus = #{accchkStaus}</if>
             <if test="billStatus != null "> and bill_status = #{billStatus}</if>
             <if test="orderStatus != null "> and order_status = #{orderStatus}</if>
-            <if test="accchkDate != null "> and accchk_date = #{accchkDate}</if>
+            <if test="accchkDateCr != null "> and accchk_date_cr = #{accchkDateCr}</if>
             <if test="costomAmt01 != null "> and costom_amt_01 = #{costomAmt01}</if>
             <if test="stlAmtDr != null "> and stl_amt_dr = #{stlAmtDr}</if>
             <if test="costomAmt02 != null "> and costom_amt_02 = #{costomAmt02}</if>
@@ -407,7 +417,7 @@
             <if test="accchkStaus != null  and accchkStaus != ''"> and accchk_staus = #{accchkStaus}</if>
             <if test="billStatus != null "> and bill_status = #{billStatus}</if>
             <if test="orderStatus != null "> and order_status = #{orderStatus}</if>
-            <if test="accchkDate != null "> and accchk_date = #{accchkDate}</if>
+            <if test="accchkDateCr != null "> and accchk_date_cr = #{accchkDateCr}</if>
             <if test="costomAmt01 != null "> and costom_amt_01 = #{costomAmt01}</if>
             <if test="stlAmtDr != null "> and stl_amt_dr = #{stlAmtDr}</if>
             <if test="costomAmt02 != null "> and costom_amt_02 = #{costomAmt02}</if>
@@ -804,6 +814,141 @@
         where order_no = #{orderNo}
     </select>
 
+    <select id="queryLedgerList" parameterType="com.ruoyi.orderPlan.domain.VehicleLedgerExcel" resultType="com.ruoyi.orderPlan.domain.VehicleLedgerExcel">
+        SELECT
+            c.id,
+            c.order_no orderNo,
+            c.mblno,
+            c.carreg_no carregNo,
+            driver.f_name driverName,
+            c.driver_tel driverTel,
+            CASE
+            c.order_status
+            WHEN 10 THEN
+            '车队安排'
+            WHEN 20 THEN
+            '司机受理'
+            WHEN 40 THEN
+            '提箱'
+            WHEN 50 THEN
+            '装卸货'
+            WHEN 60 THEN
+            '还卸柜'
+            WHEN 80 THEN
+            '回单'
+            END orderName,
+            c.order_status orderStatus,
+            p.f_name corpId,
+            CASE
+            t.bill_type
+            WHEN 1 THEN
+            '进口'
+            WHEN 2 THEN
+            '出口'
+            WHEN 3 THEN
+            '内贸'
+            WHEN 4 THEN
+            '其他'
+            END billType,
+            CASE
+            t.trans_type
+            WHEN 1 THEN
+            '集装箱'
+            WHEN 2 THEN
+            '搭建'
+            WHEN 3 THEN
+            '散货'
+            END transType,
+            CASE
+            t.trans_type
+            WHEN 1 THEN
+            '重去重回'
+            WHEN 2 THEN
+            '重去空回'
+            WHEN 3 THEN
+            '空去重回'
+            END transProp,
+            CASE
+            c.bill_kind
+            WHEN 'NN' THEN
+            '直单'
+            WHEN 'MM' THEN
+            '主单'
+            WHEN 'MH' THEN
+            '从单'
+            END billKind,
+            c.m_bill_no mBillNo,
+            g.f_name goodsId,
+            c.cntr_weight cntrWeight,
+            t.qty_plan qtyPlan,
+            t.weight_plan weightPlan,
+            t.ysl,
+            t.voy,
+            t.load_addr loadAddr,
+            t.load_date tLoadDate,
+            t.load_attn loadAttn,
+            t.load_attntel loadAttntel,
+            t.md_load_addr mdLoadAddr,
+            t.md_load_date tMdLoadDate,
+            t.md_load_attn mdLoadAttn,
+            t.md_load_attn_tel mdLoadAttnTel,
+            t.un_load_addr unLoadAddr,
+            t.un_load_date tUnLoadDate,
+            t.un_load_attn unLoadAttn,
+            t.un_load_attn_tel unLoadAttnTel,
+            dic.dict_label cntrId,
+            pol.f_name polId,
+            pod.f_name podId,
+            c.accept_date acceptDate,
+            c.cntr_qty cntrQty,
+            c.off_data offData,
+            c.load_date loadDate,
+            c.md_load_date mdLoadDate,
+            c.un_load_date unLoadDate,
+            c.waybill_date waybillDate,
+            c.waybill_remarks waybillRemarks,
+            c.oil_amt oilAmt,
+            c.cost_oth costOth,
+            c.driverbonus driverbonus,
+            c.cost_remarks costRemarks,
+            c.costom_amt_06 costomAmt06,
+            c.costom_amt_05 costomAmt05,
+            c.costom_amt_04 costomAmt04,
+            c.costom_amt_03 costomAmt03,
+            c.costom_amt_02 costomAmt02,
+            c.costom_amt_01 costomAmt01,
+            c.costom_str_02 costomStr02,
+            c.costom_str_01 costomStr01,
+            c.amt_dr amtDr,
+            c.amt_dr amtCr,
+            c.stl_amt_dr stlAmtDr,
+            c.stl_amt_cr stlAmtCr,
+            c.profit_bill profitBill,
+            c.profit_car profitCar
+        FROM
+            F_TMSORDERBILLSCARS c
+            LEFT JOIN F_TMSORDERBILLS t ON t.id = c.org_id
+            LEFT JOIN t_corps p ON p.f_id = t.corp_id
+            LEFT JOIN t_corps fleet ON fleet.f_id = c.carcor_pid
+            LEFT JOIN t_goods g ON g.f_id = t.goods_id
+            LEFT JOIN t_address pol ON pol.f_id = t.pol_id
+            AND pol.f_types = 1
+            LEFT JOIN t_address pod ON pod.f_id = t.pod_id
+            AND pod.f_types = 1
+            LEFT JOIN sys_dict_data dic ON dic.dict_value = c.cntr_id
+            AND dic.dict_type = 'data_cntrId'
+            LEFT JOIN t_corps driver ON driver.f_id = c.driver_user_id
+        <where>
+            <if test="stlStatus == null and stlStatus == 'T'">and c.stl_amt_dr != 0 or c.stl_amt_cr != 0</if>
+            <if test="stlStatus == null and stlStatus == 'F'">and c.stl_amt_dr = 0 or c.stl_amt_cr = 0</if>
+            <if test="accchkStatus == null and accchkStatus == 'T'">and c.accchk_amt_cr != 0 or c.accchk_amt_cr != 0</if>
+            <if test="accchkStatus == null and accchkStatus == 'F'">and c.accchk_amt_dr = 0 or c.accchk_amt_dr = 0</if>
+            <if test="invStatus == null and invStatus == 'T'">and c.inv_amt_cr != 0 or c.inv_amt_cr != 0</if>
+            <if test="invStatus == null and invStatus == 'F'">and c.inv_amt_dr = 0 or c.inv_amt_dr = 0</if>
+        </where>
+        ORDER BY c.id desc
+    </select>
+
     <insert id="insertftmsorderbillscars" parameterType="ftmsorderbillscars" useGeneratedKeys="true" keyProperty="id">
         insert into F_TMSORDERBILLSCARS
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -811,14 +956,13 @@
             <if test="orgId != null">org_id,</if>
             <if test="orderNo != null">order_no,</if>
             <if test="cntrId != null">cntr_id,</if>
-            <if test="corpId != null">corp_id,</if>
             <if test="cntrNo != null">cntr_no,</if>
             <if test="carcorPid != null">carcor_pid,</if>
-            <if test="mblno != null">mblno,</if>
             <if test="carregNo != null">carreg_no,</if>
+            <if test="mblno != null">mblno,</if>
             <if test="driverName != null">driver_name,</if>
-            <if test="driverUserId != null">driver_user_id,</if>
             <if test="driverTel != null">driver_tel,</if>
+            <if test="driverUserId != null">driver_user_id,</if>
             <if test="planDate != null">plan_date,</if>
             <if test="planRemarks != null">plan_remarks,</if>
             <if test="acceptDate != null">accept_date,</if>
@@ -833,14 +977,14 @@
             <if test="unLoadRemarks != null">un_load_remarks,</if>
             <if test="waybillDate != null">waybill_date,</if>
             <if test="qtyLoad != null">qty_load,</if>
-            <if test="qtyUnLoad != null">qty_un_load,</if>
             <if test="cntrQty != null">cntr_qty,</if>
-            <if test="gopodsLossQty != null">gopods_loss_qty,</if>
+            <if test="qtyUnLoad != null">qty_un_load,</if>
             <if test="cntrWeight != null">cntr_weight,</if>
+            <if test="gopodsLossQty != null">gopods_loss_qty,</if>
             <if test="gopodsLossrate != null">gopods_lossrate,</if>
-            <if test="waybillRemarks != null">waybill_remarks,</if>
             <if test="gopodsLossamtCr != null">gopods_lossamt_cr,</if>
             <if test="qtyDr != null">qty_dr,</if>
+            <if test="waybillRemarks != null">waybill_remarks,</if>
             <if test="gopodsLossamtDr != null">gopods_lossamt_dr,</if>
             <if test="qtyCr != null">qty_cr,</if>
             <if test="freightPriceDr != null">freight_price_dr,</if>
@@ -887,41 +1031,50 @@
             <if test="accchkStaus != null">accchk_staus,</if>
             <if test="billStatus != null">bill_status,</if>
             <if test="orderStatus != null">order_status,</if>
-            <if test="accchkDate != null">accchk_date,</if>
             <if test="costomAmt01 != null">costom_amt_01,</if>
-            <if test="stlAmtDr != null">stl_amt_dr,</if>
             <if test="costomAmt02 != null">costom_amt_02,</if>
-            <if test="stlDateDr != null">stl_date_dr,</if>
+            <if test="stlAmtDr != null">stl_amt_dr,</if>
             <if test="costomAmt03 != null">costom_amt_03,</if>
-            <if test="stlAmtCr != null">stl_amt_cr,</if>
+            <if test="stlDateDr != null">stl_date_dr,</if>
             <if test="costomAmt04 != null">costom_amt_04,</if>
-            <if test="stlDateCr != null">stl_date_cr,</if>
+            <if test="stlAmtCr != null">stl_amt_cr,</if>
             <if test="costomAmt05 != null">costom_amt_05,</if>
-            <if test="costomAmt06 != null">costom_amt_06,</if>
+            <if test="stlDateCr != null">stl_date_cr,</if>
             <if test="delFlag != null">del_flag,</if>
+            <if test="costomAmt06 != null">costom_amt_06,</if>
             <if test="costomStr01 != null">costom_str_01,</if>
             <if test="createBy != null">create_by,</if>
-            <if test="createTime != null">create_time,</if>
             <if test="costomStr02 != null">costom_str_02,</if>
+            <if test="createTime != null">create_time,</if>
             <if test="updateBy != null">update_by,</if>
             <if test="updateTime != null">update_time,</if>
             <if test="remarks != null">remarks,</if>
+            <if test="accchkDateCr != null">accchk_date_cr,</if>
             <if test="mBillNo != null">m_bill_no,</if>
             <if test="billKind != null">bill_kind,</if>
+            <if test="profitBill != null">profit_bill,</if>
+            <if test="profitCar != null">profit_car,</if>
+            <if test="corpId != null">corp_id,</if>
+            <if test="invAmtCr != null">inv_amt_cr,</if>
+            <if test="invAmtDr != null">inv_amt_dr,</if>
+            <if test="invDateCr != null">inv_date_cr,</if>
+            <if test="invDateDr != null">inv_date_dr,</if>
+            <if test="accchkAmtCr != null">accchk_amt_cr,</if>
+            <if test="accchkAmtDr != null">accchk_amt_dr,</if>
+            <if test="accchkDateDr != null">accchk_date_dr,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="pId != null">#{pId},</if>
             <if test="orgId != null">#{orgId},</if>
             <if test="orderNo != null">#{orderNo},</if>
             <if test="cntrId != null">#{cntrId},</if>
-            <if test="corpId != null">#{corpId},</if>
             <if test="cntrNo != null">#{cntrNo},</if>
             <if test="carcorPid != null">#{carcorPid},</if>
-            <if test="mblno != null">#{mblno},</if>
             <if test="carregNo != null">#{carregNo},</if>
+            <if test="mblno != null">#{mblno},</if>
             <if test="driverName != null">#{driverName},</if>
-            <if test="driverUserId != null">#{driverUserId},</if>
             <if test="driverTel != null">#{driverTel},</if>
+            <if test="driverUserId != null">#{driverUserId},</if>
             <if test="planDate != null">#{planDate},</if>
             <if test="planRemarks != null">#{planRemarks},</if>
             <if test="acceptDate != null">#{acceptDate},</if>
@@ -936,14 +1089,14 @@
             <if test="unLoadRemarks != null">#{unLoadRemarks},</if>
             <if test="waybillDate != null">#{waybillDate},</if>
             <if test="qtyLoad != null">#{qtyLoad},</if>
-            <if test="qtyUnLoad != null">#{qtyUnLoad},</if>
             <if test="cntrQty != null">#{cntrQty},</if>
-            <if test="gopodsLossQty != null">#{gopodsLossQty},</if>
+            <if test="qtyUnLoad != null">#{qtyUnLoad},</if>
             <if test="cntrWeight != null">#{cntrWeight},</if>
+            <if test="gopodsLossQty != null">#{gopodsLossQty},</if>
             <if test="gopodsLossrate != null">#{gopodsLossrate},</if>
-            <if test="waybillRemarks != null">#{waybillRemarks},</if>
             <if test="gopodsLossamtCr != null">#{gopodsLossamtCr},</if>
             <if test="qtyDr != null">#{qtyDr},</if>
+            <if test="waybillRemarks != null">#{waybillRemarks},</if>
             <if test="gopodsLossamtDr != null">#{gopodsLossamtDr},</if>
             <if test="qtyCr != null">#{qtyCr},</if>
             <if test="freightPriceDr != null">#{freightPriceDr},</if>
@@ -990,27 +1143,37 @@
             <if test="accchkStaus != null">#{accchkStaus},</if>
             <if test="billStatus != null">#{billStatus},</if>
             <if test="orderStatus != null">#{orderStatus},</if>
-            <if test="accchkDate != null">#{accchkDate},</if>
             <if test="costomAmt01 != null">#{costomAmt01},</if>
-            <if test="stlAmtDr != null">#{stlAmtDr},</if>
             <if test="costomAmt02 != null">#{costomAmt02},</if>
-            <if test="stlDateDr != null">#{stlDateDr},</if>
+            <if test="stlAmtDr != null">#{stlAmtDr},</if>
             <if test="costomAmt03 != null">#{costomAmt03},</if>
-            <if test="stlAmtCr != null">#{stlAmtCr},</if>
+            <if test="stlDateDr != null">#{stlDateDr},</if>
             <if test="costomAmt04 != null">#{costomAmt04},</if>
-            <if test="stlDateCr != null">#{stlDateCr},</if>
+            <if test="stlAmtCr != null">#{stlAmtCr},</if>
             <if test="costomAmt05 != null">#{costomAmt05},</if>
-            <if test="costomAmt06 != null">#{costomAmt06},</if>
+            <if test="stlDateCr != null">#{stlDateCr},</if>
             <if test="delFlag != null">#{delFlag},</if>
+            <if test="costomAmt06 != null">#{costomAmt06},</if>
             <if test="costomStr01 != null">#{costomStr01},</if>
             <if test="createBy != null">#{createBy},</if>
-            <if test="createTime != null">#{createTime},</if>
             <if test="costomStr02 != null">#{costomStr02},</if>
+            <if test="createTime != null">#{createTime},</if>
             <if test="updateBy != null">#{updateBy},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="remarks != null">#{remarks},</if>
+            <if test="accchkDateCr != null">#{accchkDateCr},</if>
             <if test="mBillNo != null">#{mBillNo},</if>
             <if test="billKind != null">#{billKind},</if>
+            <if test="profitBill != null">#{profitBill},</if>
+            <if test="profitCar != null">#{profitCar},</if>
+            <if test="corpId != null">#{corpId},</if>
+            <if test="invAmtCr != null">#{invAmtCr},</if>
+            <if test="invAmtDr != null">#{invAmtDr},</if>
+            <if test="invDateCr != null">#{invDateCr},</if>
+            <if test="invDateDr != null">#{invDateDr},</if>
+            <if test="accchkAmtCr != null">#{accchkAmtCr},</if>
+            <if test="accchkAmtDr != null">#{accchkAmtDr},</if>
+            <if test="accchkDateDr != null">#{accchkDateDr},</if>
         </trim>
     </insert>
 
@@ -1021,14 +1184,13 @@
             <if test="orgId != null">org_id = #{orgId},</if>
             <if test="orderNo != null">order_no = #{orderNo},</if>
             <if test="cntrId != null">cntr_id = #{cntrId},</if>
-            <if test="corpId != null">corp_id = #{corpId},</if>
             <if test="cntrNo != null">cntr_no = #{cntrNo},</if>
             <if test="carcorPid != null">carcor_pid = #{carcorPid},</if>
-            <if test="mblno != null">mblno = #{mblno},</if>
             <if test="carregNo != null">carreg_no = #{carregNo},</if>
+            <if test="mblno != null">mblno = #{mblno},</if>
             <if test="driverName != null">driver_name = #{driverName},</if>
-            <if test="driverUserId != null">driver_user_id = #{driverUserId},</if>
             <if test="driverTel != null">driver_tel = #{driverTel},</if>
+            <if test="driverUserId != null">driver_user_id = #{driverUserId},</if>
             <if test="planDate != null">plan_date = #{planDate},</if>
             <if test="planRemarks != null">plan_remarks = #{planRemarks},</if>
             <if test="acceptDate != null">accept_date = #{acceptDate},</if>
@@ -1043,14 +1205,14 @@
             <if test="unLoadRemarks != null">un_load_remarks = #{unLoadRemarks},</if>
             <if test="waybillDate != null">waybill_date = #{waybillDate},</if>
             <if test="qtyLoad != null">qty_load = #{qtyLoad},</if>
-            <if test="qtyUnLoad != null">qty_un_load = #{qtyUnLoad},</if>
             <if test="cntrQty != null">cntr_qty = #{cntrQty},</if>
-            <if test="gopodsLossQty != null">gopods_loss_qty = #{gopodsLossQty},</if>
+            <if test="qtyUnLoad != null">qty_un_load = #{qtyUnLoad},</if>
             <if test="cntrWeight != null">cntr_weight = #{cntrWeight},</if>
+            <if test="gopodsLossQty != null">gopods_loss_qty = #{gopodsLossQty},</if>
             <if test="gopodsLossrate != null">gopods_lossrate = #{gopodsLossrate},</if>
-            <if test="waybillRemarks != null">waybill_remarks = #{waybillRemarks},</if>
             <if test="gopodsLossamtCr != null">gopods_lossamt_cr = #{gopodsLossamtCr},</if>
             <if test="qtyDr != null">qty_dr = #{qtyDr},</if>
+            <if test="waybillRemarks != null">waybill_remarks = #{waybillRemarks},</if>
             <if test="gopodsLossamtDr != null">gopods_lossamt_dr = #{gopodsLossamtDr},</if>
             <if test="qtyCr != null">qty_cr = #{qtyCr},</if>
             <if test="freightPriceDr != null">freight_price_dr = #{freightPriceDr},</if>
@@ -1063,9 +1225,6 @@
             <if test="feeitemCrRemarks != null">feeitem_cr_remarks = #{feeitemCrRemarks},</if>
             <if test="amtDr != null">amt_dr = #{amtDr},</if>
             <if test="amtCr != null">amt_cr = #{amtCr},</if>
-            <if test="mBillNo != null">m_bill_no = #{mBillNo},</if>
-            <if test="mBillNo == ''">m_bill_no = null,</if>
-            <if test="billKind != null">bill_kind = #{billKind},</if>
             <if test="dueDateDr != null">due_date_dr = #{dueDateDr},</if>
             <if test="dueDateCr != null">due_date_cr = #{dueDateCr},</if>
             <if test="odometerFrom != null">odometer_from = #{odometerFrom},</if>
@@ -1100,25 +1259,37 @@
             <if test="accchkStaus != null">accchk_staus = #{accchkStaus},</if>
             <if test="billStatus != null">bill_status = #{billStatus},</if>
             <if test="orderStatus != null">order_status = #{orderStatus},</if>
-            <if test="accchkDate != null">accchk_date = #{accchkDate},</if>
             <if test="costomAmt01 != null">costom_amt_01 = #{costomAmt01},</if>
-            <if test="stlAmtDr != null">stl_amt_dr = #{stlAmtDr},</if>
             <if test="costomAmt02 != null">costom_amt_02 = #{costomAmt02},</if>
-            <if test="stlDateDr != null">stl_date_dr = #{stlDateDr},</if>
+            <if test="stlAmtDr != null">stl_amt_dr = #{stlAmtDr},</if>
             <if test="costomAmt03 != null">costom_amt_03 = #{costomAmt03},</if>
-            <if test="stlAmtCr != null">stl_amt_cr = #{stlAmtCr},</if>
+            <if test="stlDateDr != null">stl_date_dr = #{stlDateDr},</if>
             <if test="costomAmt04 != null">costom_amt_04 = #{costomAmt04},</if>
-            <if test="stlDateCr != null">stl_date_cr = #{stlDateCr},</if>
+            <if test="stlAmtCr != null">stl_amt_cr = #{stlAmtCr},</if>
             <if test="costomAmt05 != null">costom_amt_05 = #{costomAmt05},</if>
-            <if test="costomAmt06 != null">costom_amt_06 = #{costomAmt06},</if>
+            <if test="stlDateCr != null">stl_date_cr = #{stlDateCr},</if>
             <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="costomAmt06 != null">costom_amt_06 = #{costomAmt06},</if>
             <if test="costomStr01 != null">costom_str_01 = #{costomStr01},</if>
             <if test="createBy != null">create_by = #{createBy},</if>
-            <if test="createTime != null">create_time = #{createTime},</if>
             <if test="costomStr02 != null">costom_str_02 = #{costomStr02},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
             <if test="updateBy != null">update_by = #{updateBy},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="remarks != null">remarks = #{remarks},</if>
+            <if test="accchkDateCr != null">accchk_date_cr = #{accchkDateCr},</if>
+            <if test="mBillNo != null">m_bill_no = #{mBillNo},</if>
+            <if test="billKind != null">bill_kind = #{billKind},</if>
+            <if test="profitBill != null">profit_bill = #{profitBill},</if>
+            <if test="profitCar != null">profit_car = #{profitCar},</if>
+            <if test="corpId != null">corp_id = #{corpId},</if>
+            <if test="invAmtCr != null">inv_amt_cr = #{invAmtCr},</if>
+            <if test="invAmtDr != null">inv_amt_dr = #{invAmtDr},</if>
+            <if test="invDateCr != null">inv_date_cr = #{invDateCr},</if>
+            <if test="invDateDr != null">inv_date_dr = #{invDateDr},</if>
+            <if test="accchkAmtCr != null">accchk_amt_cr = #{accchkAmtCr},</if>
+            <if test="accchkAmtDr != null">accchk_amt_dr = #{accchkAmtDr},</if>
+            <if test="accchkDateDr != null">accchk_date_dr = #{accchkDateDr},</if>
         </trim>
         where id = #{id}
     </update>