<?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.yougou.logistics.tms.dal.database.TmsBillTransportMapper">
<resultMap id="BaseResultMap"
type="com.yougou.logistics.tms.common.model.TmsBillTransport">
<id column="BILL_NO" property="billNo" jdbcType="VARCHAR" />
<result column="QUARTZCENTER_NO" property="quartzcenterNo"
jdbcType="VARCHAR" />
<result column="BILL_NO_ORIGINAL" property="billNoOriginal"
jdbcType="VARCHAR" />
<result column="BUSINESS_TYPE" property="businessType"
jdbcType="VARCHAR" />
<result column="CURRENT_BILLSTATUS" property="currentBillstatus"
jdbcType="DECIMAL" />
<result column="CONSIGNEE_NO" property="consigneeNo" jdbcType="VARCHAR" />
<result column="SHIPER_NO" property="shiperNo" jdbcType="VARCHAR" />
<result column="TRANSPORT_TIME" property="transportTime"
jdbcType="TIMESTAMP" />
<result column="ARRIVAL_DATE" property="arrivalDate" jdbcType="TIMESTAMP" />
<result column="TAKEDELIVERY_BEGIN_TIME" property="takedeliveryBeginTime"
jdbcType="VARCHAR" />
<result column="TAKEDELIVERY_END_TIME" property="takedeliveryEndTime"
jdbcType="VARCHAR" />
<result column="TRANSPORT_REQUIREMENTS" property="transportRequirements"
jdbcType="VARCHAR" />
<result column="EMERGENCY_DEGREE" property="emergencyDegree"
jdbcType="DECIMAL" />
<result column="GOODS_TYPE" property="goodsType" jdbcType="DECIMAL" />
<result column="GOODS_DESCRIPTION" property="goodsDescription"
jdbcType="VARCHAR" />
<result column="TOTAL_BOXCOUNT" property="totalBoxcount"
jdbcType="DECIMAL" />
<result column="TOTAL_COUNT" property="totalCount" jdbcType="DECIMAL" />
<result column="TOTAL_CUBAGE" property="totalCubage" jdbcType="DECIMAL" />
<result column="TOTAL_LENGTH" property="totalLength" jdbcType="DECIMAL" />
<result column="TOTAL_WIDTH" property="totalWidth" jdbcType="DECIMAL" />
<result column="TOTAL_HEIGHT" property="totalHeight" jdbcType="DECIMAL" />
<result column="TOTAL_WEIGHT" property="totalWeight" jdbcType="DECIMAL" />
<result column="CONSIGNEE_NAME" property="consigneeName"
jdbcType="VARCHAR" />
<result column="CONSIGNEE_TEL" property="consigneeTel"
jdbcType="VARCHAR" />
<result column="CONSIGNEE_ADDRESS" property="consigneeAddress"
jdbcType="VARCHAR" />
<result column="CONSIGNEE_ZONE" property="consigneeZone"
jdbcType="VARCHAR" />
<result column="LOAD_COMPANY" property="loadCompany" jdbcType="VARCHAR" />
<result column="LOAD_CONTACTNAME" property="loadContactname"
jdbcType="VARCHAR" />
<result column="LOAD_CONTACTTEL" property="loadContacttel"
jdbcType="VARCHAR" />
<result column="LOAD_COMPANYADDRESS" property="loadCompanyaddress"
jdbcType="VARCHAR" />
<result column="LOAD_COMPANYZONE" property="loadCompanyzone"
jdbcType="VARCHAR" />
<result column="SHIPER_NAME" property="shiperName" jdbcType="VARCHAR" />
<result column="SHIPER_ID" property="shiperId" jdbcType="VARCHAR" />
<result column="SHIPER_TEL" property="shiperTel" jdbcType="VARCHAR" />
<result column="SHIPER_ADDRESS" property="shiperAddress"
jdbcType="VARCHAR" />
<result column="SHIPER_ZONE" property="shiperZone" jdbcType="VARCHAR" />
<result column="PAYMENT_TYPE" property="paymentType" jdbcType="DECIMAL" />
<result column="SETTLEACCOUNTS_TYPE" property="settleaccountsType"
jdbcType="DECIMAL" />
<result column="CONSIGNMENT_TYPE" property="consignmentType"
jdbcType="DECIMAL" />
<result column="UNLOAD_TYPE" property="unloadType" jdbcType="DECIMAL" />
<result column="INSURED" property="insured" jdbcType="DECIMAL" />
<result column="CONTRACT_NO" property="contractNo" jdbcType="VARCHAR" />
<result column="DISTANCE" property="distance" jdbcType="DECIMAL" />
<result column="ORIGINAL_COST" property="originalCost"
jdbcType="DECIMAL" />
<result column="ACTUAL_COST" property="actualCost" jdbcType="DECIMAL" />
<result column="OPEN_FLAG" property="openFlag" jdbcType="DECIMAL" />
<result column="SECOND_TRANSPORTFLAG" property="secondTransportflag"
jdbcType="DECIMAL" />
<result column="SECOND_TRANSPORTSTATUS" property="secondTransportstatus"
jdbcType="DECIMAL" />
<result column="PRINTCOUNTS" property="printcounts" jdbcType="DECIMAL" />
<result column="REMARKS" property="remarks" jdbcType="VARCHAR" />
<result column="CREATOR" property="creator" jdbcType="VARCHAR" />
<result column="CREATE_TIME" property="createTime" jdbcType="TIMESTAMP" />
<result column="EDITOR" property="editor" jdbcType="VARCHAR" />
<result column="EDIT_TIME" property="editTime" jdbcType="TIMESTAMP" />
<result column="STATUS" property="status" jdbcType="DECIMAL" />
<result column="BUSINESS_TYPE_STR" property="businessTypeStr"
jdbcType="VARCHAR" />
<result column="CURRENT_BILLSTATUS_STR" property="currentBillstatusStr"
jdbcType="VARCHAR" />
<result column="EMERGENCY_DEGREE_STR" property="emergencyDegreeStr" />
<result column="GOODS_TYPE_STR" property="goodsTypeStr"
jdbcType="VARCHAR" />
<result column="PAYMENT_TYPE_STR" property="paymentTypeStr"
jdbcType="VARCHAR" />
<result column="SETTLEACCOUNTS_TYPE_STR" property="settleaccountsTypeStr"
jdbcType="VARCHAR" />
<result column="CONSIGNMENT_TYPE_STR" property="consignmentTypeStr"
jdbcType="VARCHAR" />
<result column="UNLOAD_TYPE_STR" property="unloadTypeStr"
jdbcType="VARCHAR" />
<result column="INSURED_STR" property="insuredStr" jdbcType="VARCHAR" />
<result column="OPEN_FLAG_STR" property="openFlagStr" jdbcType="VARCHAR" />
<result column="SECOND_TRANSPORTFLAG_STR" property="secondTransportflagStr"
jdbcType="VARCHAR" />
<result column="STATUS_STR" property="statusStr" jdbcType="VARCHAR" />
<result column="CONSIGNEE_NO_NAME" property="consigneeNoName"
jdbcType="VARCHAR" />
<result column="SHIPER_NO_NAME" property="shiperNoName"
jdbcType="VARCHAR" />
<result column="CONSIGNEE_NO_STR" property="consigneeNoStr"
jdbcType="VARCHAR" />
<result column="SHIPER_NO_STR" property="shiperNoStr"
jdbcType="VARCHAR" />
<result column="QUARTZCENTER_NO_NAME" property="quartzcenterNoName"
jdbcType="VARCHAR" />
<result column="DRIVER_NAME" property="driverName"
jdbcType="VARCHAR" />
<result column="TRUCK_NO" property="truckNo"
jdbcType="VARCHAR" />
<result column="SUB_TOTAL_BOX_COUNT" property="subTotalBoxCount"
jdbcType="VARCHAR" />
<result column="SUB_TOTAL_COUNT" property="subTotalCount"
jdbcType="VARCHAR" />
<result column="DTL_TOTAL_BOXCOUNT" property="dtlTotalboxcount"
jdbcType="DECIMAL" />
<result column="DTL_TOTAL_COUNT" property="dtlTotalCount"
jdbcType="DECIMAL" />
<result column="parent_bill_no" property="parentBillNo"
jdbcType="VARCHAR" />
</resultMap>
<resultMap id="TmsBillTransportAndDtlDto"
type="com.yougou.logistics.tms.common.dto.TmsBillTransportAndDtlDto">
<id column="BILL_NO" property="billNo" jdbcType="VARCHAR" />
<result column="QUARTZCENTER_NO" property="quartzcenterNo"
jdbcType="VARCHAR" />
<result column="BILL_NO_ORIGINAL" property="billNoOriginal"
jdbcType="VARCHAR" />
<result column="BUSINESS_TYPE" property="businessType"
jdbcType="VARCHAR" />
<result column="CURRENT_BILLSTATUS" property="currentBillstatus"
jdbcType="DECIMAL" />
<result column="CONSIGNEE_NO" property="consigneeNo" jdbcType="VARCHAR" />
<result column="SHIPER_NO" property="shiperNo" jdbcType="VARCHAR" />
<result column="TRANSPORT_TIME" property="transportTime"
jdbcType="TIMESTAMP" />
<result column="ARRIVAL_DATE" property="arrivalDate" jdbcType="TIMESTAMP" />
<result column="TAKEDELIVERY_BEGIN_TIME" property="takedeliveryBeginTime"
jdbcType="VARCHAR" />
<result column="TAKEDELIVERY_END_TIME" property="takedeliveryEndTime"
jdbcType="VARCHAR" />
<result column="TRANSPORT_REQUIREMENTS" property="transportRequirements"
jdbcType="VARCHAR" />
<result column="EMERGENCY_DEGREE" property="emergencyDegree"
jdbcType="DECIMAL" />
<result column="GOODS_TYPE" property="goodsType" jdbcType="DECIMAL" />
<result column="GOODS_DESCRIPTION" property="goodsDescription"
jdbcType="VARCHAR" />
<result column="TOTAL_BOXCOUNT" property="totalBoxcount"
jdbcType="DECIMAL" />
<result column="TOTAL_COUNT" property="totalCount" jdbcType="DECIMAL" />
<result column="TOTAL_CUBAGE" property="totalCubage" jdbcType="DECIMAL" />
<result column="TOTAL_LENGTH" property="totalLength" jdbcType="DECIMAL" />
<result column="TOTAL_WIDTH" property="totalWidth" jdbcType="DECIMAL" />
<result column="TOTAL_HEIGHT" property="totalHeight" jdbcType="DECIMAL" />
<result column="TOTAL_WEIGHT" property="totalWeight" jdbcType="DECIMAL" />
<result column="CONSIGNEE_NAME" property="consigneeName"
jdbcType="VARCHAR" />
<result column="CONSIGNEE_TEL" property="consigneeTel"
jdbcType="VARCHAR" />
<result column="CONSIGNEE_ADDRESS" property="consigneeAddress"
jdbcType="VARCHAR" />
<result column="CONSIGNEE_ZONE" property="consigneeZone"
jdbcType="VARCHAR" />
<result column="LOAD_COMPANY" property="loadCompany" jdbcType="VARCHAR" />
<result column="LOAD_CONTACTNAME" property="loadContactname"
jdbcType="VARCHAR" />
<result column="LOAD_CONTACTTEL" property="loadContacttel"
jdbcType="VARCHAR" />
<result column="LOAD_COMPANYADDRESS" property="loadCompanyaddress"
jdbcType="VARCHAR" />
<result column="LOAD_COMPANYZONE" property="loadCompanyzone"
jdbcType="VARCHAR" />
<result column="SHIPER_NAME" property="shiperName" jdbcType="VARCHAR" />
<result column="SHIPER_ID" property="shiperId" jdbcType="VARCHAR" />
<result column="SHIPER_TEL" property="shiperTel" jdbcType="VARCHAR" />
<result column="SHIPER_ADDRESS" property="shiperAddress"
jdbcType="VARCHAR" />
<result column="SHIPER_ZONE" property="shiperZone" jdbcType="VARCHAR" />
<result column="PAYMENT_TYPE" property="paymentType" jdbcType="DECIMAL" />
<result column="SETTLEACCOUNTS_TYPE" property="settleaccountsType"
jdbcType="DECIMAL" />
<result column="CONSIGNMENT_TYPE" property="consignmentType"
jdbcType="DECIMAL" />
<result column="UNLOAD_TYPE" property="unloadType" jdbcType="DECIMAL" />
<result column="INSURED" property="insured" jdbcType="DECIMAL" />
<result column="CONTRACT_NO" property="contractNo" jdbcType="VARCHAR" />
<result column="DISTANCE" property="distance" jdbcType="DECIMAL" />
<result column="ORIGINAL_COST" property="originalCost"
jdbcType="DECIMAL" />
<result column="ACTUAL_COST" property="actualCost" jdbcType="DECIMAL" />
<result column="OPEN_FLAG" property="openFlag" jdbcType="DECIMAL" />
<result column="SECOND_TRANSPORTFLAG" property="secondTransportflag"
jdbcType="DECIMAL" />
<result column="SECOND_TRANSPORTSTATUS" property="secondTransportstatus"
jdbcType="DECIMAL" />
<result column="PRINTCOUNTS" property="printcounts" jdbcType="DECIMAL" />
<result column="REMARKS" property="remarks" jdbcType="VARCHAR" />
<result column="CREATOR" property="creator" jdbcType="VARCHAR" />
<result column="CREATE_TIME" property="createTime" jdbcType="TIMESTAMP" />
<result column="EDITOR" property="editor" jdbcType="VARCHAR" />
<result column="EDIT_TIME" property="editTime" jdbcType="TIMESTAMP" />
<result column="STATUS" property="status" jdbcType="DECIMAL" />
<result column="BUSINESS_TYPE_STR" property="businessTypeStr"
jdbcType="VARCHAR" />
<result column="CURRENT_BILLSTATUS_STR" property="currentBillstatusStr"
jdbcType="VARCHAR" />
<result column="EMERGENCY_DEGREE_STR" property="emergencyDegreeStr" />
<result column="GOODS_TYPE_STR" property="goodsTypeStr"
jdbcType="VARCHAR" />
<result column="PAYMENT_TYPE_STR" property="paymentTypeStr"
jdbcType="VARCHAR" />
<result column="SETTLEACCOUNTS_TYPE_STR" property="settleaccountsTypeStr"
jdbcType="VARCHAR" />
<result column="CONSIGNMENT_TYPE_STR" property="consignmentTypeStr"
jdbcType="VARCHAR" />
<result column="UNLOAD_TYPE_STR" property="unloadTypeStr"
jdbcType="VARCHAR" />
<result column="INSURED_STR" property="insuredStr" jdbcType="VARCHAR" />
<result column="OPEN_FLAG_STR" property="openFlagStr" jdbcType="VARCHAR" />
<result column="SECOND_TRANSPORTFLAG_STR" property="secondTransportflagStr"
jdbcType="VARCHAR" />
<result column="STATUS_STR" property="statusStr" jdbcType="VARCHAR" />
<result column="CONSIGNEE_NO_NAME" property="consigneeNoName"
jdbcType="VARCHAR" />
<result column="SHIPER_NO_NAME" property="shiperNoName"
jdbcType="VARCHAR" />
<result column="CONSIGNEE_NO_STR" property="consigneeNoStr"
jdbcType="VARCHAR" />
<result column="SHIPER_NO_STR" property="shiperNoStr"
jdbcType="VARCHAR" />
<result column="QUARTZCENTER_NO_NAME" property="quartzcenterNoName"
jdbcType="VARCHAR" />
<result column="DRIVER_NAME" property="driverName"
jdbcType="VARCHAR" />
<result column="TRUCK_NO" property="truckNo"
jdbcType="VARCHAR" />
<result column="SUB_TOTAL_BOX_COUNT" property="subTotalBoxCount"
jdbcType="VARCHAR" />
<result column="SUB_TOTAL_COUNT" property="subTotalCount"
jdbcType="VARCHAR" />
<result column="DTL_TOTAL_BOXCOUNT" property="dtlTotalboxcount"
jdbcType="DECIMAL" />
<result column="DTL_TOTAL_COUNT" property="dtlTotalCount"
jdbcType="DECIMAL" />
<result column="parent_bill_no" property="parentBillNo"
jdbcType="VARCHAR" />
<result column="BOX_NO" property="boxNo" jdbcType="VARCHAR" />
<result column="SUBBILL_NO" property="subbillNo" jdbcType="VARCHAR" />
<result column="PACK_UNIT" property="packUnit" jdbcType="VARCHAR" />
<result column="PACK_SPEC" property="packSpec" jdbcType="VARCHAR" />
<result column="PACK_QTY" property="packQty" jdbcType="DECIMAL" />
<result column="SKU_L" property="skuL" jdbcType="DECIMAL" />
<result column="SKU_W" property="skuW" jdbcType="DECIMAL" />
<result column="SKU_H" property="skuH" jdbcType="DECIMAL" />
<result column="SKU_CUBAGE" property="skuCubage" jdbcType="DECIMAL" />
<result column="SKU_WEIGHT" property="skuWeight" jdbcType="DECIMAL" />
<result column="GOODS_DESCRIPTION" property="goodsDescriptionDtl" jdbcType="VARCHAR" />
<result column="REMARKS" property="packUnitStr" jdbcType="VARCHAR" />
</resultMap>
<resultMap id="TmsBillTransportAndTransportPointDto"
type="com.yougou.logistics.tms.common.dto.TmsBillTransportAndTransportPointDto">
<id column="BILL_NO" property="billNo" jdbcType="VARCHAR" />
<result column="QUARTZCENTER_NO" property="quartzcenterNo"
jdbcType="VARCHAR" />
<result column="BILL_NO_ORIGINAL" property="billNoOriginal"
jdbcType="VARCHAR" />
<result column="BUSINESS_TYPE" property="businessType"
jdbcType="VARCHAR" />
<result column="CURRENT_BILLSTATUS" property="currentBillstatus"
jdbcType="DECIMAL" />
<result column="CONSIGNEE_NO" property="consigneeNo" jdbcType="VARCHAR" />
<result column="SHIPER_NO" property="shiperNo" jdbcType="VARCHAR" />
<result column="TRANSPORT_TIME" property="transportTime"
jdbcType="TIMESTAMP" />
<result column="ARRIVAL_DATE" property="arrivalDate" jdbcType="TIMESTAMP" />
<result column="TAKEDELIVERY_BEGIN_TIME" property="takedeliveryBeginTime"
jdbcType="VARCHAR" />
<result column="TAKEDELIVERY_END_TIME" property="takedeliveryEndTime"
jdbcType="VARCHAR" />
<result column="TRANSPORT_REQUIREMENTS" property="transportRequirements"
jdbcType="VARCHAR" />
<result column="EMERGENCY_DEGREE" property="emergencyDegree"
jdbcType="DECIMAL" />
<result column="GOODS_TYPE" property="goodsType" jdbcType="DECIMAL" />
<result column="GOODS_DESCRIPTION" property="goodsDescription"
jdbcType="VARCHAR" />
<result column="TOTAL_BOXCOUNT" property="totalBoxcount"
jdbcType="DECIMAL" />
<result column="TOTAL_COUNT" property="totalCount" jdbcType="DECIMAL" />
<result column="TOTAL_CUBAGE" property="totalCubage" jdbcType="DECIMAL" />
<result column="TOTAL_LENGTH" property="totalLength" jdbcType="DECIMAL" />
<result column="TOTAL_WIDTH" property="totalWidth" jdbcType="DECIMAL" />
<result column="TOTAL_HEIGHT" property="totalHeight" jdbcType="DECIMAL" />
<result column="TOTAL_WEIGHT" property="totalWeight" jdbcType="DECIMAL" />
<result column="CONSIGNEE_NAME" property="consigneeName"
jdbcType="VARCHAR" />
<result column="CONSIGNEE_TEL" property="consigneeTel"
jdbcType="VARCHAR" />
<result column="CONSIGNEE_ADDRESS" property="consigneeAddress"
jdbcType="VARCHAR" />
<result column="CONSIGNEE_ZONE" property="consigneeZone"
jdbcType="VARCHAR" />
<result column="LOAD_COMPANY" property="loadCompany" jdbcType="VARCHAR" />
<result column="LOAD_CONTACTNAME" property="loadContactname"
jdbcType="VARCHAR" />
<result column="LOAD_CONTACTTEL" property="loadContacttel"
jdbcType="VARCHAR" />
<result column="LOAD_COMPANYADDRESS" property="loadCompanyaddress"
jdbcType="VARCHAR" />
<result column="LOAD_COMPANYZONE" property="loadCompanyzone"
jdbcType="VARCHAR" />
<result column="SHIPER_NAME" property="shiperName" jdbcType="VARCHAR" />
<result column="SHIPER_ID" property="shiperId" jdbcType="VARCHAR" />
<result column="SHIPER_TEL" property="shiperTel" jdbcType="VARCHAR" />
<result column="SHIPER_ADDRESS" property="shiperAddress"
jdbcType="VARCHAR" />
<result column="SHIPER_ZONE" property="shiperZone" jdbcType="VARCHAR" />
<result column="PAYMENT_TYPE" property="paymentType" jdbcType="DECIMAL" />
<result column="SETTLEACCOUNTS_TYPE" property="settleaccountsType"
jdbcType="DECIMAL" />
<result column="CONSIGNMENT_TYPE" property="consignmentType"
jdbcType="DECIMAL" />
<result column="UNLOAD_TYPE" property="unloadType" jdbcType="DECIMAL" />
<result column="INSURED" property="insured" jdbcType="DECIMAL" />
<result column="CONTRACT_NO" property="contractNo" jdbcType="VARCHAR" />
<result column="DISTANCE" property="distance" jdbcType="DECIMAL" />
<result column="ORIGINAL_COST" property="originalCost"
jdbcType="DECIMAL" />
<result column="ACTUAL_COST" property="actualCost" jdbcType="DECIMAL" />
<result column="OPEN_FLAG" property="openFlag" jdbcType="DECIMAL" />
<result column="SECOND_TRANSPORTFLAG" property="secondTransportflag"
jdbcType="DECIMAL" />
<result column="SECOND_TRANSPORTSTATUS" property="secondTransportstatus"
jdbcType="DECIMAL" />
<result column="PRINTCOUNTS" property="printcounts" jdbcType="DECIMAL" />
<result column="REMARKS" property="remarks" jdbcType="VARCHAR" />
<result column="CREATOR" property="creator" jdbcType="VARCHAR" />
<result column="CREATE_TIME" property="createTime" jdbcType="TIMESTAMP" />
<result column="EDITOR" property="editor" jdbcType="VARCHAR" />
<result column="EDIT_TIME" property="editTime" jdbcType="TIMESTAMP" />
<result column="STATUS" property="status" jdbcType="DECIMAL" />
<result column="BUSINESS_TYPE_STR" property="businessTypeStr"
jdbcType="VARCHAR" />
<result column="CURRENT_BILLSTATUS_STR" property="currentBillstatusStr"
jdbcType="VARCHAR" />
<result column="EMERGENCY_DEGREE_STR" property="emergencyDegreeStr" />
<result column="GOODS_TYPE_STR" property="goodsTypeStr"
jdbcType="VARCHAR" />
<result column="PAYMENT_TYPE_STR" property="paymentTypeStr"
jdbcType="VARCHAR" />
<result column="SETTLEACCOUNTS_TYPE_STR" property="settleaccountsTypeStr"
jdbcType="VARCHAR" />
<result column="CONSIGNMENT_TYPE_STR" property="consignmentTypeStr"
jdbcType="VARCHAR" />
<result column="UNLOAD_TYPE_STR" property="unloadTypeStr"
jdbcType="VARCHAR" />
<result column="INSURED_STR" property="insuredStr" jdbcType="VARCHAR" />
<result column="OPEN_FLAG_STR" property="openFlagStr" jdbcType="VARCHAR" />
<result column="SECOND_TRANSPORTFLAG_STR" property="secondTransportflagStr"
jdbcType="VARCHAR" />
<result column="STATUS_STR" property="statusStr" jdbcType="VARCHAR" />
<result column="CONSIGNEE_NO_NAME" property="consigneeNoName"
jdbcType="VARCHAR" />
<result column="SHIPER_NO_NAME" property="shiperNoName"
jdbcType="VARCHAR" />
<result column="CONSIGNEE_NO_STR" property="consigneeNoStr"
jdbcType="VARCHAR" />
<result column="SHIPER_NO_STR" property="shiperNoStr"
jdbcType="VARCHAR" />
<result column="QUARTZCENTER_NO_NAME" property="quartzcenterNoName"
jdbcType="VARCHAR" />
<result column="DRIVER_NAME" property="driverName"
jdbcType="VARCHAR" />
<result column="TRUCK_NO" property="truckNo"
jdbcType="VARCHAR" />
<result column="SUB_TOTAL_BOX_COUNT" property="subTotalBoxCount"
jdbcType="VARCHAR" />
<result column="SUB_TOTAL_COUNT" property="subTotalCount"
jdbcType="VARCHAR" />
<result column="DTL_TOTAL_BOXCOUNT" property="dtlTotalboxcount"
jdbcType="DECIMAL" />
<result column="DTL_TOTAL_COUNT" property="dtlTotalCount"
jdbcType="DECIMAL" />
<result column="parent_bill_no" property="parentBillNo"
jdbcType="VARCHAR" />
<result column="STORE_NO" property="storeNo" jdbcType="VARCHAR" />
<result column="TRANSPORT_POINT_NAME" property="transportPointName"
jdbcType="VARCHAR" />
<result column="TRANSPORT_POINT_SIMPLE_NAME" property="transportPointSimpleName"
jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List">
BILL_NO, QUARTZCENTER_NO, BILL_NO_ORIGINAL, BUSINESS_TYPE, CURRENT_BILLSTATUS,
CONSIGNEE_NO,
SHIPER_NO, TRANSPORT_TIME, ARRIVAL_DATE, TAKEDELIVERY_BEGIN_TIME,
TAKEDELIVERY_END_TIME,
TRANSPORT_REQUIREMENTS, EMERGENCY_DEGREE, GOODS_TYPE, GOODS_DESCRIPTION, TOTAL_BOXCOUNT,
TOTAL_COUNT, TOTAL_CUBAGE, TOTAL_LENGTH, TOTAL_WIDTH, TOTAL_HEIGHT,
TOTAL_WEIGHT,
CONSIGNEE_NAME, CONSIGNEE_TEL, CONSIGNEE_ADDRESS, CONSIGNEE_ZONE, LOAD_COMPANY,
LOAD_CONTACTNAME,
LOAD_CONTACTTEL, LOAD_COMPANYADDRESS, LOAD_COMPANYZONE, SHIPER_NAME, SHIPER_ID,
SHIPER_TEL,
SHIPER_ADDRESS, SHIPER_ZONE, PAYMENT_TYPE, SETTLEACCOUNTS_TYPE, CONSIGNMENT_TYPE,
UNLOAD_TYPE, INSURED, CONTRACT_NO, DISTANCE, ORIGINAL_COST,
ACTUAL_COST, OPEN_FLAG,
SECOND_TRANSPORTFLAG, SECOND_TRANSPORTSTATUS, PRINTCOUNTS, REMARKS, CREATOR, CREATE_TIME,
EDITOR, EDIT_TIME, STATUS,parent_bill_no
</sql>
<sql id="TmsBillTransportAndDtlDto_column">
T.BILL_NO, T.QUARTZCENTER_NO, T.BILL_NO_ORIGINAL, T.BUSINESS_TYPE, T.CURRENT_BILLSTATUS,
T.CONSIGNEE_NO,
T.SHIPER_NO, T.TRANSPORT_TIME, T.ARRIVAL_DATE, T.TAKEDELIVERY_BEGIN_TIME,
T.TAKEDELIVERY_END_TIME,
T.TRANSPORT_REQUIREMENTS, T.EMERGENCY_DEGREE, T.GOODS_TYPE, T.GOODS_DESCRIPTION, T.TOTAL_BOXCOUNT,
T.TOTAL_COUNT, T.TOTAL_CUBAGE, T.TOTAL_LENGTH, T.TOTAL_WIDTH, T.TOTAL_HEIGHT,
T.TOTAL_WEIGHT,
T.CONSIGNEE_NAME, T.CONSIGNEE_TEL, T.CONSIGNEE_ADDRESS, T.CONSIGNEE_ZONE, T.LOAD_COMPANY,
T.LOAD_CONTACTNAME,
T.LOAD_CONTACTTEL, T.LOAD_COMPANYADDRESS, T.LOAD_COMPANYZONE, T.SHIPER_NAME, T.SHIPER_ID,
T.SHIPER_TEL,
T.SHIPER_ADDRESS, T.SHIPER_ZONE, T.PAYMENT_TYPE, T.SETTLEACCOUNTS_TYPE, T.CONSIGNMENT_TYPE,
T.UNLOAD_TYPE, T.INSURED, T.CONTRACT_NO, T.DISTANCE, T.ORIGINAL_COST,
T.ACTUAL_COST, T.OPEN_FLAG,
T.SECOND_TRANSPORTFLAG, T.SECOND_TRANSPORTSTATUS, T.PRINTCOUNTS, T.REMARKS, T.CREATOR, T.CREATE_TIME,
T.EDITOR, T.EDIT_TIME, T.STATUS,T.parent_bill_no,
D.BOX_NO, D.SUBBILL_NO, D.PACK_UNIT, D.PACK_SPEC, D.PACK_QTY, D.SKU_L, D.SKU_W, D.SKU_H,
D.SKU_CUBAGE, D.SKU_WEIGHT, D.GOODS_DESCRIPTION, D.REMARKS
</sql>
<sql id="TmsBillTransportAndTransportPointDto_column">
T.BILL_NO, T.QUARTZCENTER_NO, T.BILL_NO_ORIGINAL, T.BUSINESS_TYPE, T.CURRENT_BILLSTATUS,
T.CONSIGNEE_NO,
T.SHIPER_NO, T.TRANSPORT_TIME, T.ARRIVAL_DATE, T.TAKEDELIVERY_BEGIN_TIME,
T.TAKEDELIVERY_END_TIME,
T.TRANSPORT_REQUIREMENTS, T.EMERGENCY_DEGREE, T.GOODS_TYPE, T.GOODS_DESCRIPTION, T.TOTAL_BOXCOUNT,
T.TOTAL_COUNT, T.TOTAL_CUBAGE, T.TOTAL_LENGTH, T.TOTAL_WIDTH, T.TOTAL_HEIGHT,
T.TOTAL_WEIGHT,
T.CONSIGNEE_NAME, T.CONSIGNEE_TEL, T.CONSIGNEE_ADDRESS, T.CONSIGNEE_ZONE, T.LOAD_COMPANY,
T.LOAD_CONTACTNAME,
T.LOAD_CONTACTTEL, T.LOAD_COMPANYADDRESS, T.LOAD_COMPANYZONE, T.SHIPER_NAME, T.SHIPER_ID,
T.SHIPER_TEL,
T.SHIPER_ADDRESS, T.SHIPER_ZONE, T.PAYMENT_TYPE, T.SETTLEACCOUNTS_TYPE, T.CONSIGNMENT_TYPE,
T.UNLOAD_TYPE, T.INSURED, T.CONTRACT_NO, T.DISTANCE, T.ORIGINAL_COST,
T.ACTUAL_COST, T.OPEN_FLAG,
T.SECOND_TRANSPORTFLAG, T.SECOND_TRANSPORTSTATUS, T.PRINTCOUNTS, T.REMARKS, T.CREATOR, T.CREATE_TIME,
T.EDITOR, T.EDIT_TIME, T.STATUS,parent_bill_no,
P.STORE_NO,P.TRANSPORT_POINT_NAME,P.TRANSPORT_POINT_SIMPLE_NAME
</sql>
<sql id="condition">
<if test="null!=params">
<if test="params.billNoSearch != null and params.billNoSearch != ''">
AND (T.BILL_NO LIKE '%${params.billNoSearch}%' or T.PARENT_BILL_NO LIKE '%${params.billNoSearch}%')
</if>
<if test="params.billNoList != null and params.billNoList != ''">
AND T.BILL_NO IN
<foreach collection="params.billNoList" item="billNo" index="index" open="(" close=")" separator=",">
'${billNo}'
</foreach>
</if>
<if test="params.arrivalDateBSearch != null and params.arrivalDateBSearch != ''">
AND to_char(T.ARRIVAL_DATE,'yyyy-MM-dd') >= #{params.arrivalDateBSearch}
</if>
<if test="params.arrivalDateESearch != null and params.arrivalDateESearch != ''">
AND to_char(T.ARRIVAL_DATE,'yyyy-MM-dd') <= #{params.arrivalDateESearch}
</if>
<if
test="params.emergencyDegree != null and params.emergencyDegree.toString() != ''">
AND T.EMERGENCY_DEGREE = #{params.emergencyDegree}
</if>
<if test="params.goodsType != null and params.goodsType.toString() != ''">
AND T.GOODS_TYPE = #{params.goodsType}
</if>
<if test="params.status != null and params.status.toString() != ''">
AND T.STATUS = #{params.status}
</if>
<if test="null!=params.queryCondition and ''!=params.queryCondition">
${params.queryCondition}
</if>
<if test="params.businessTypeSearch != null and params.businessTypeSearch != ''">
AND T.BUSINESS_TYPE = #{params.businessTypeSearch}
</if>
<if test="params.currentBillstatusSearch != null and params.currentBillstatusSearch != ''">
AND T.CURRENT_BILLSTATUS = #{params.currentBillstatusSearch}
</if>
<if test="params.currentBillstatusCk != null and params.currentBillstatusCk != ''">
AND T.CURRENT_BILLSTATUS in ('21','22','23','30','31','32','90')
</if>
<if test="null!=params.quartzcenterSearchLike and ''!=params.quartzcenterSearchLike">
and t.QUARTZCENTER_NO=#{params.quartzcenterSearchLike,jdbcType=VARCHAR}
</if>
<if test="params.shiperNoSearch != null and params.shiperNoSearch != ''">
AND t.SHIPER_NO = #{params.shiperNoSearch}
</if>
<if test="params.unloadPointList != null and params.unloadPointList != ''">
AND EXISTS( SELECT 1 FROM TMS_UNLOAD_POINT_DTL T2 WHERE (T2.TRANSPORT_POINT_NO = T.SHIPER_NO OR T2.TRANSPORT_POINT_NO = T.CONSIGNEE_NO) AND T2.UNLOAD_POINT_NO IN
<foreach collection="params.unloadPointList" item="unloadPointNo" index="index" open="(" close=")" separator=",">
'${unloadPointNo}'
</foreach>)
</if>
<if test="params.consigneeNoSearch != null and params.consigneeNoSearch != ''">
AND t.CONSIGNEE_NO = #{params.consigneeNoSearch}
</if>
<!-- <if test="params.noOpen != null and params.noOpen != ''">
AND T.BILL_NO = #{params.billNoForMobile}
</if>
<if test="params.open != null and params.open != ''">
AND TS.SUBBILL_NO = #{params.billNoForMobile}
</if> -->
<if test="params.billNo != null and params.billNo != ''">
AND T.BILL_NO = #{params.billNo}
</if>
<if test="params.truckNo != null and params.truckNo != ''">
AND T2.TRUCK_NO = #{params.truckNo}
</if>
<if test="params.quartzcenter4Export != null and params.quartzcenter4Export != ''">
AND T.QUARTZCENTER_NO = #{params.quartzcenter4Export,jdbcType=VARCHAR}
</if>
<if test="params.billNoOriginal != null and params.billNoOriginal != ''">
AND T.BILL_NO_ORIGINAL LIKE '%${params.billNoOriginal}%'
</if>
<if test="params.parentBillNo != null and params.parentBillNo != ''">
AND T.parent_bill_no = #{params.parentBillNo}
</if>
</if>
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap"
parameterType="java.lang.String">
select
<include refid="Base_Column_List" />
from TMS_BILL_TRANSPORT T
where T.BILL_NO = #{billNo,jdbcType=VARCHAR}
</select>
<select id="selectMaxBillNoLast5Num" resultType="java.lang.String">
SELECT MAX(SUBSTR(BILL_NO,12,5)) TRANSPORT_POINT_NO_STR FROM TMS_BILL_TRANSPORT WHERE CREATE_TIME >= trunc(SYSDATE) and substr(BILL_NO,5,1) = #{position}
</select>
<select id="selectCount" resultType="java.lang.Integer">
select count(1) as s from TMS_BILL_TRANSPORT T
LEFT JOIN TMS_QUARTZCENTER Q ON T.QUARTZCENTER_NO = Q.QUARTZCENTER_NO
LEFT JOIN TMS_TRANSPORT_POINT M ON (M.TRANSPORT_POINT_NO = T.CONSIGNEE_NO)
LEFT JOIN TMS_TRANSPORT_POINT N ON (N.TRANSPORT_POINT_NO = T.SHIPER_NO)
where 1=1
<include refid="condition" />
</select>
<select id="selectByPage" resultMap="BaseResultMap"
parameterType="map">
WITH DIC AS
(SELECT LOOKUPCODE, ITEMVALUE, ITEMNAME
FROM
TMS_STANDARD_DTL
WHERE STATUS = 0),
UNLOAD_POINT AS (SELECT T2.TRANSPORT_POINT_NO,T1.UNLOAD_POINT_NAME FROM TMS_UNLOAD_POINT_DTL T2,TMS_UNLOAD_POINT T1 WHERE T1.UNLOAD_POINT_NO = T2.UNLOAD_POINT_NO)
select B.*,
(SELECT ITEMNAME
FROM DIC
WHERE LOOKUPCODE = 'BUSINESS_TYPE' AND ITEMVALUE =
BUSINESS_TYPE) BUSINESS_TYPE_STR,
(SELECT ITEMNAME
FROM DIC
WHERE
LOOKUPCODE = 'CURRENT_BILLSTATUS' AND ITEMVALUE = CURRENT_BILLSTATUS)
CURRENT_BILLSTATUS_STR,
(SELECT ITEMNAME
FROM DIC
WHERE LOOKUPCODE =
'EMERGENCY_DEGREE' AND ITEMVALUE = EMERGENCY_DEGREE)
EMERGENCY_DEGREE_STR,
(SELECT ITEMNAME
FROM DIC
WHERE LOOKUPCODE =
'GOODS_TYPE' AND ITEMVALUE = GOODS_TYPE) GOODS_TYPE_STR,
(SELECT
ITEMNAME
FROM DIC
WHERE LOOKUPCODE = 'PAYMENT_TYPE' AND ITEMVALUE =
PAYMENT_TYPE) PAYMENT_TYPE_STR,
(SELECT ITEMNAME
FROM DIC
WHERE
LOOKUPCODE = 'SETTLEACCOUNTS_TYPE' AND ITEMVALUE =
SETTLEACCOUNTS_TYPE) SETTLEACCOUNTS_TYPE_STR,
(SELECT ITEMNAME
FROM DIC
WHERE LOOKUPCODE = 'CONSIGNMENT_TYPE' AND ITEMVALUE =
CONSIGNMENT_TYPE) CONSIGNMENT_TYPE_STR,
(SELECT ITEMNAME
FROM DIC
WHERE
LOOKUPCODE = 'UNLOAD_TYPE' AND ITEMVALUE = UNLOAD_TYPE)
UNLOAD_TYPE_STR,
(SELECT ITEMNAME
FROM DIC
WHERE LOOKUPCODE = 'INSURED'
AND ITEMVALUE = INSURED) INSURED_STR,
(SELECT ITEMNAME
FROM DIC
WHERE
LOOKUPCODE = 'OPEN_FLAG' AND ITEMVALUE = OPEN_FLAG) OPEN_FLAG_STR,
(SELECT ITEMNAME
FROM DIC
WHERE LOOKUPCODE = 'SECOND_TRANSPORTFLAG' AND
ITEMVALUE = SECOND_TRANSPORTFLAG) SECOND_TRANSPORTFLAG_STR,
(SELECT
ITEMNAME
FROM DIC
WHERE LOOKUPCODE = 'DATA_STATUS' AND ITEMVALUE =
STATUS) STATUS_STR
from (select A.*,rownum rn from( select
T.*,NVL((SELECT M.TRANSPORT_POINT_NAME || '【' || NVL(T5.UNLOAD_POINT_NAME,'未知') || '】' FROM UNLOAD_POINT T5 WHERE M.TRANSPORT_POINT_NO = T5.TRANSPORT_POINT_NO),M.TRANSPORT_POINT_NAME || '【未知】') CONSIGNEE_NO_NAME,
NVL((SELECT N.TRANSPORT_POINT_NAME || '【' || T5.UNLOAD_POINT_NAME || '】' FROM UNLOAD_POINT T5 WHERE N.TRANSPORT_POINT_NO = T5.TRANSPORT_POINT_NO),N.TRANSPORT_POINT_NAME || '【未知】') SHIPER_NO_NAME,
q.quartzcenter_name QUARTZCENTER_NO_NAME,
t.takedelivery_begin_time||'-'||t.takedelivery_end_time takedeliveryTimeStr,
M.TRANSPORT_POINT_NAME CONSIGNEE_NO_STR,N.TRANSPORT_POINT_NAME SHIPER_NO_STR
from TMS_BILL_TRANSPORT T
LEFT JOIN TMS_QUARTZCENTER Q ON T.QUARTZCENTER_NO = Q.QUARTZCENTER_NO
LEFT JOIN TMS_TRANSPORT_POINT M ON (M.TRANSPORT_POINT_NO = T.CONSIGNEE_NO)
LEFT JOIN TMS_TRANSPORT_POINT N ON (N.TRANSPORT_POINT_NO = T.SHIPER_NO)
where t.CURRENT_BILLSTATUS < 90 and 1=1
<include refid="condition" />
<choose>
<when test="orderByField != null and ''!=orderByField">
order by ${orderByField}
<if test="orderByField">
${orderBy},T.BILL_NO
</if>
</when>
<otherwise>ORDER BY T.EDIT_TIME DESC,T.BILL_NO</otherwise>
</choose>
) A where rownum < #{page.endRowNum}) B where rn >
#{page.startRowNum}
</select>
<select id="selectByParams" resultMap="BaseResultMap"
parameterType="map">
select
<include refid="Base_Column_List" />
from TMS_BILL_TRANSPORT T where 1=1
<include refid="condition" />
</select>
<delete id="updateBatchByIds">
update TMS_BILL_TRANSPORT T set T.CURRENT_BILLSTATUS =
#{operatorType},EDITOR = #{editor},EDIT_TIME = SYSDATE where T.BILL_NO
in
<foreach collection="list" index="index" item="id" open="("
close=")" separator=",">
'${id}'
</foreach>
</delete>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from TMS_BILL_TRANSPORT T
where T.BILL_NO = #{billNo,jdbcType=VARCHAR}
</delete>
<delete id="deleteByPrimarayKeyForModel"
parameterType="com.yougou.logistics.tms.common.model.TmsBillTransport">
delete from TMS_BILL_TRANSPORT
where BILL_NO = #{billNo,jdbcType=VARCHAR}
</delete>
<insert id="insert"
parameterType="com.yougou.logistics.tms.common.model.TmsBillTransport">
insert into TMS_BILL_TRANSPORT (BILL_NO, QUARTZCENTER_NO,
BILL_NO_ORIGINAL,
BUSINESS_TYPE, CURRENT_BILLSTATUS, CONSIGNEE_NO,
SHIPER_NO, TRANSPORT_TIME, ARRIVAL_DATE,
TAKEDELIVERY_BEGIN_TIME, TAKEDELIVERY_END_TIME,
TRANSPORT_REQUIREMENTS, EMERGENCY_DEGREE,
GOODS_TYPE, GOODS_DESCRIPTION, TOTAL_BOXCOUNT,
TOTAL_COUNT, TOTAL_CUBAGE, TOTAL_LENGTH,
TOTAL_WIDTH, TOTAL_HEIGHT, TOTAL_WEIGHT,
CONSIGNEE_NAME, CONSIGNEE_TEL, CONSIGNEE_ADDRESS,
CONSIGNEE_ZONE, LOAD_COMPANY, LOAD_CONTACTNAME,
LOAD_CONTACTTEL, LOAD_COMPANYADDRESS, LOAD_COMPANYZONE,
SHIPER_NAME, SHIPER_ID, SHIPER_TEL,
SHIPER_ADDRESS, SHIPER_ZONE, PAYMENT_TYPE,
SETTLEACCOUNTS_TYPE, CONSIGNMENT_TYPE, UNLOAD_TYPE,
INSURED, CONTRACT_NO, DISTANCE,
ORIGINAL_COST, ACTUAL_COST, OPEN_FLAG,
SECOND_TRANSPORTFLAG, SECOND_TRANSPORTSTATUS,
PRINTCOUNTS, REMARKS, CREATOR,
CREATE_TIME, EDITOR, EDIT_TIME,
STATUS,parent_bill_no)
values (#{billNo,jdbcType=VARCHAR}, #{quartzcenterNo,jdbcType=VARCHAR},
#{billNoOriginal,jdbcType=VARCHAR},
#{businessType,jdbcType=VARCHAR}, #{currentBillstatus,jdbcType=DECIMAL},
#{consigneeNo,jdbcType=VARCHAR},
#{shiperNo,jdbcType=VARCHAR}, #{transportTime,jdbcType=TIMESTAMP},
#{arrivalDate,jdbcType=TIMESTAMP},
#{takedeliveryBeginTime,jdbcType=VARCHAR},
#{takedeliveryEndTime,jdbcType=VARCHAR},
#{transportRequirements,jdbcType=VARCHAR},
#{emergencyDegree,jdbcType=DECIMAL},
#{goodsType,jdbcType=DECIMAL}, #{goodsDescription,jdbcType=VARCHAR},
#{totalBoxcount,jdbcType=DECIMAL},
#{totalCount,jdbcType=DECIMAL}, #{totalCubage,jdbcType=DECIMAL}, #{totalLength,jdbcType=DECIMAL},
#{totalWidth,jdbcType=DECIMAL}, #{totalHeight,jdbcType=DECIMAL},
#{totalWeight,jdbcType=DECIMAL},
#{consigneeName,jdbcType=VARCHAR}, #{consigneeTel,jdbcType=VARCHAR},
#{consigneeAddress,jdbcType=VARCHAR},
#{consigneeZone,jdbcType=VARCHAR}, #{loadCompany,jdbcType=VARCHAR},
#{loadContactname,jdbcType=VARCHAR},
#{loadContacttel,jdbcType=VARCHAR},
#{loadCompanyaddress,jdbcType=VARCHAR},
#{loadCompanyzone,jdbcType=VARCHAR},
#{shiperName,jdbcType=VARCHAR}, #{shiperId,jdbcType=VARCHAR}, #{shiperTel,jdbcType=VARCHAR},
#{shiperAddress,jdbcType=VARCHAR}, #{shiperZone,jdbcType=VARCHAR},
#{paymentType,jdbcType=DECIMAL},
#{settleaccountsType,jdbcType=DECIMAL},
#{consignmentType,jdbcType=DECIMAL}, #{unloadType,jdbcType=DECIMAL},
#{insured,jdbcType=DECIMAL}, #{contractNo,jdbcType=VARCHAR},
#{distance,jdbcType=DECIMAL},
#{originalCost,jdbcType=DECIMAL}, #{actualCost,jdbcType=DECIMAL}, #{openFlag,jdbcType=DECIMAL},
#{secondTransportflag,jdbcType=DECIMAL},
#{secondTransportstatus,jdbcType=DECIMAL},
#{printcounts,jdbcType=DECIMAL}, #{remarks,jdbcType=VARCHAR},
#{creator,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{editor,jdbcType=VARCHAR}, #{editTime,jdbcType=TIMESTAMP},
#{status,jdbcType=DECIMAL},#{parentBillNo,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective"
parameterType="com.yougou.logistics.tms.common.model.TmsBillTransport">
insert into TMS_BILL_TRANSPORT
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="billNo != null">
BILL_NO,
</if>
<if test="quartzcenterNo != null">
QUARTZCENTER_NO,
</if>
<if test="billNoOriginal != null">
BILL_NO_ORIGINAL,
</if>
<if test="businessType != null">
BUSINESS_TYPE,
</if>
<if test="currentBillstatus != null">
CURRENT_BILLSTATUS,
</if>
<if test="consigneeNo != null">
CONSIGNEE_NO,
</if>
<if test="shiperNo != null">
SHIPER_NO,
</if>
<if test="transportTime != null">
TRANSPORT_TIME,
</if>
<if test="arrivalDate != null">
ARRIVAL_DATE,
</if>
<if test="takedeliveryBeginTime != null">
TAKEDELIVERY_BEGIN_TIME,
</if>
<if test="takedeliveryEndTime != null">
TAKEDELIVERY_END_TIME,
</if>
<if test="transportRequirements != null">
TRANSPORT_REQUIREMENTS,
</if>
<if test="emergencyDegree != null">
EMERGENCY_DEGREE,
</if>
<if test="goodsType != null">
GOODS_TYPE,
</if>
<if test="goodsDescription != null">
GOODS_DESCRIPTION,
</if>
<if test="totalBoxcount != null">
TOTAL_BOXCOUNT,
</if>
<if test="totalCount != null">
TOTAL_COUNT,
</if>
<if test="totalCubage != null">
TOTAL_CUBAGE,
</if>
<if test="totalLength != null">
TOTAL_LENGTH,
</if>
<if test="totalWidth != null">
TOTAL_WIDTH,
</if>
<if test="totalHeight != null">
TOTAL_HEIGHT,
</if>
<if test="totalWeight != null">
TOTAL_WEIGHT,
</if>
<if test="consigneeName != null">
CONSIGNEE_NAME,
</if>
<if test="consigneeTel != null">
CONSIGNEE_TEL,
</if>
<if test="consigneeAddress != null">
CONSIGNEE_ADDRESS,
</if>
<if test="consigneeZone != null">
CONSIGNEE_ZONE,
</if>
<if test="loadCompany != null">
LOAD_COMPANY,
</if>
<if test="loadContactname != null">
LOAD_CONTACTNAME,
</if>
<if test="loadContacttel != null">
LOAD_CONTACTTEL,
</if>
<if test="loadCompanyaddress != null">
LOAD_COMPANYADDRESS,
</if>
<if test="loadCompanyzone != null">
LOAD_COMPANYZONE,
</if>
<if test="shiperName != null">
SHIPER_NAME,
</if>
<if test="shiperId != null">
SHIPER_ID,
</if>
<if test="shiperTel != null">
SHIPER_TEL,
</if>
<if test="shiperAddress != null">
SHIPER_ADDRESS,
</if>
<if test="shiperZone != null">
SHIPER_ZONE,
</if>
<if test="paymentType != null">
PAYMENT_TYPE,
</if>
<if test="settleaccountsType != null">
SETTLEACCOUNTS_TYPE,
</if>
<if test="consignmentType != null">
CONSIGNMENT_TYPE,
</if>
<if test="unloadType != null">
UNLOAD_TYPE,
</if>
<if test="insured != null">
INSURED,
</if>
<if test="contractNo != null">
CONTRACT_NO,
</if>
<if test="distance != null">
DISTANCE,
</if>
<if test="originalCost != null">
ORIGINAL_COST,
</if>
<if test="actualCost != null">
ACTUAL_COST,
</if>
<if test="openFlag != null">
OPEN_FLAG,
</if>
<if test="secondTransportflag != null">
SECOND_TRANSPORTFLAG,
</if>
<if test="secondTransportstatus != null">
SECOND_TRANSPORTSTATUS,
</if>
<if test="printcounts != null">
PRINTCOUNTS,
</if>
<if test="remarks != null">
REMARKS,
</if>
<if test="creator != null">
CREATOR,
</if>
<if test="createTime != null">
CREATE_TIME,
</if>
<if test="editor != null">
EDITOR,
</if>
<if test="editTime != null">
EDIT_TIME,
</if>
<if test="status != null">
STATUS,
</if>
<if test="parentBillNo != null">
parent_bill_no,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="billNo != null">
#{billNo,jdbcType=VARCHAR},
</if>
<if test="quartzcenterNo != null">
#{quartzcenterNo,jdbcType=VARCHAR},
</if>
<if test="billNoOriginal != null">
#{billNoOriginal,jdbcType=VARCHAR},
</if>
<if test="businessType != null">
#{businessType,jdbcType=VARCHAR},
</if>
<if test="currentBillstatus != null">
#{currentBillstatus,jdbcType=DECIMAL},
</if>
<if test="consigneeNo != null">
#{consigneeNo,jdbcType=VARCHAR},
</if>
<if test="shiperNo != null">
#{shiperNo,jdbcType=VARCHAR},
</if>
<if test="transportTime != null">
#{transportTime,jdbcType=TIMESTAMP},
</if>
<if test="arrivalDate != null">
#{arrivalDate,jdbcType=TIMESTAMP},
</if>
<if test="takedeliveryBeginTime != null">
#{takedeliveryBeginTime,jdbcType=VARCHAR},
</if>
<if test="takedeliveryEndTime != null">
#{takedeliveryEndTime,jdbcType=VARCHAR},
</if>
<if test="transportRequirements != null">
#{transportRequirements,jdbcType=VARCHAR},
</if>
<if test="emergencyDegree != null">
#{emergencyDegree,jdbcType=DECIMAL},
</if>
<if test="goodsType != null">
#{goodsType,jdbcType=DECIMAL},
</if>
<if test="goodsDescription != null">
#{goodsDescription,jdbcType=VARCHAR},
</if>
<if test="totalBoxcount != null">
#{totalBoxcount,jdbcType=DECIMAL},
</if>
<if test="totalCount != null">
#{totalCount,jdbcType=DECIMAL},
</if>
<if test="totalCubage != null">
#{totalCubage,jdbcType=DECIMAL},
</if>
<if test="totalLength != null">
#{totalLength,jdbcType=DECIMAL},
</if>
<if test="totalWidth != null">
#{totalWidth,jdbcType=DECIMAL},
</if>
<if test="totalHeight != null">
#{totalHeight,jdbcType=DECIMAL},
</if>
<if test="totalWeight != null">
#{totalWeight,jdbcType=DECIMAL},
</if>
<if test="consigneeName != null">
#{consigneeName,jdbcType=VARCHAR},
</if>
<if test="consigneeTel != null">
#{consigneeTel,jdbcType=VARCHAR},
</if>
<if test="consigneeAddress != null">
#{consigneeAddress,jdbcType=VARCHAR},
</if>
<if test="consigneeZone != null">
#{consigneeZone,jdbcType=VARCHAR},
</if>
<if test="loadCompany != null">
#{loadCompany,jdbcType=VARCHAR},
</if>
<if test="loadContactname != null">
#{loadContactname,jdbcType=VARCHAR},
</if>
<if test="loadContacttel != null">
#{loadContacttel,jdbcType=VARCHAR},
</if>
<if test="loadCompanyaddress != null">
#{loadCompanyaddress,jdbcType=VARCHAR},
</if>
<if test="loadCompanyzone != null">
#{loadCompanyzone,jdbcType=VARCHAR},
</if>
<if test="shiperName != null">
#{shiperName,jdbcType=VARCHAR},
</if>
<if test="shiperId != null">
#{shiperId,jdbcType=VARCHAR},
</if>
<if test="shiperTel != null">
#{shiperTel,jdbcType=VARCHAR},
</if>
<if test="shiperAddress != null">
#{shiperAddress,jdbcType=VARCHAR},
</if>
<if test="shiperZone != null">
#{shiperZone,jdbcType=VARCHAR},
</if>
<if test="paymentType != null">
#{paymentType,jdbcType=DECIMAL},
</if>
<if test="settleaccountsType != null">
#{settleaccountsType,jdbcType=DECIMAL},
</if>
<if test="consignmentType != null">
#{consignmentType,jdbcType=DECIMAL},
</if>
<if test="unloadType != null">
#{unloadType,jdbcType=DECIMAL},
</if>
<if test="insured != null">
#{insured,jdbcType=DECIMAL},
</if>
<if test="contractNo != null">
#{contractNo,jdbcType=VARCHAR},
</if>
<if test="distance != null">
#{distance,jdbcType=DECIMAL},
</if>
<if test="originalCost != null">
#{originalCost,jdbcType=DECIMAL},
</if>
<if test="actualCost != null">
#{actualCost,jdbcType=DECIMAL},
</if>
<if test="openFlag != null">
#{openFlag,jdbcType=DECIMAL},
</if>
<if test="secondTransportflag != null">
#{secondTransportflag,jdbcType=DECIMAL},
</if>
<if test="secondTransportstatus != null">
#{secondTransportstatus,jdbcType=DECIMAL},
</if>
<if test="printcounts != null">
#{printcounts,jdbcType=DECIMAL},
</if>
<if test="remarks != null">
#{remarks,jdbcType=VARCHAR},
</if>
<if test="creator != null">
#{creator,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="editor != null">
#{editor,jdbcType=VARCHAR},
</if>
<if test="editTime != null">
#{editTime,jdbcType=TIMESTAMP},
</if>
<if test="status != null">
#{status,jdbcType=DECIMAL},
</if>
<if test="parentBillNo != null">
#{parentBillNo,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective"
parameterType="com.yougou.logistics.tms.common.model.TmsBillTransport">
update TMS_BILL_TRANSPORT
<set>
<if test="quartzcenterNo != null">
QUARTZCENTER_NO = #{quartzcenterNo,jdbcType=VARCHAR},
</if>
<if test="billNoOriginal != null">
BILL_NO_ORIGINAL = #{billNoOriginal,jdbcType=VARCHAR},
</if>
<if test="businessType != null">
BUSINESS_TYPE = #{businessType,jdbcType=VARCHAR},
</if>
<if test="currentBillstatus != null">
CURRENT_BILLSTATUS = #{currentBillstatus,jdbcType=DECIMAL},
</if>
<if test="consigneeNo != null">
CONSIGNEE_NO = #{consigneeNo,jdbcType=VARCHAR},
</if>
<if test="shiperNo != null">
SHIPER_NO = #{shiperNo,jdbcType=VARCHAR},
</if>
<if test="transportTime != null">
TRANSPORT_TIME = #{transportTime,jdbcType=TIMESTAMP},
</if>
<if test="arrivalDate != null">
ARRIVAL_DATE = #{arrivalDate,jdbcType=TIMESTAMP},
</if>
<if test="takedeliveryBeginTime != null">
TAKEDELIVERY_BEGIN_TIME = #{takedeliveryBeginTime,jdbcType=VARCHAR},
</if>
<if test="takedeliveryEndTime != null">
TAKEDELIVERY_END_TIME = #{takedeliveryEndTime,jdbcType=VARCHAR},
</if>
<if test="transportRequirements != null">
TRANSPORT_REQUIREMENTS = #{transportRequirements,jdbcType=VARCHAR},
</if>
<if test="emergencyDegree != null">
EMERGENCY_DEGREE = #{emergencyDegree,jdbcType=DECIMAL},
</if>
<if test="goodsType != null">
GOODS_TYPE = #{goodsType,jdbcType=DECIMAL},
</if>
<if test="goodsDescription != null">
GOODS_DESCRIPTION = #{goodsDescription,jdbcType=VARCHAR},
</if>
<if test="totalBoxcount != null">
TOTAL_BOXCOUNT = #{totalBoxcount,jdbcType=DECIMAL},
</if>
<if test="totalCount != null">
TOTAL_COUNT = #{totalCount,jdbcType=DECIMAL},
</if>
<if test="totalCubage != null">
TOTAL_CUBAGE = #{totalCubage,jdbcType=DECIMAL},
</if>
<if test="totalLength != null">
TOTAL_LENGTH = #{totalLength,jdbcType=DECIMAL},
</if>
<if test="totalWidth != null">
TOTAL_WIDTH = #{totalWidth,jdbcType=DECIMAL},
</if>
<if test="totalHeight != null">
TOTAL_HEIGHT = #{totalHeight,jdbcType=DECIMAL},
</if>
<if test="totalWeight != null">
TOTAL_WEIGHT = #{totalWeight,jdbcType=DECIMAL},
</if>
<if test="consigneeName != null">
CONSIGNEE_NAME = #{consigneeName,jdbcType=VARCHAR},
</if>
<if test="consigneeTel != null">
CONSIGNEE_TEL = #{consigneeTel,jdbcType=VARCHAR},
</if>
<if test="consigneeAddress != null">
CONSIGNEE_ADDRESS = #{consigneeAddress,jdbcType=VARCHAR},
</if>
<if test="consigneeZone != null">
CONSIGNEE_ZONE = #{consigneeZone,jdbcType=VARCHAR},
</if>
<if test="loadCompany != null">
LOAD_COMPANY = #{loadCompany,jdbcType=VARCHAR},
</if>
<if test="loadContactname != null">
LOAD_CONTACTNAME = #{loadContactname,jdbcType=VARCHAR},
</if>
<if test="loadContacttel != null">
LOAD_CONTACTTEL = #{loadContacttel,jdbcType=VARCHAR},
</if>
<if test="loadCompanyaddress != null">
LOAD_COMPANYADDRESS = #{loadCompanyaddress,jdbcType=VARCHAR},
</if>
<if test="loadCompanyzone != null">
LOAD_COMPANYZONE = #{loadCompanyzone,jdbcType=VARCHAR},
</if>
<if test="shiperName != null">
SHIPER_NAME = #{shiperName,jdbcType=VARCHAR},
</if>
<if test="shiperId != null">
SHIPER_ID = #{shiperId,jdbcType=VARCHAR},
</if>
<if test="shiperTel != null">
SHIPER_TEL = #{shiperTel,jdbcType=VARCHAR},
</if>
<if test="shiperAddress != null">
SHIPER_ADDRESS = #{shiperAddress,jdbcType=VARCHAR},
</if>
<if test="shiperZone != null">
SHIPER_ZONE = #{shiperZone,jdbcType=VARCHAR},
</if>
<if test="paymentType != null">
PAYMENT_TYPE = #{paymentType,jdbcType=DECIMAL},
</if>
<if test="settleaccountsType != null">
SETTLEACCOUNTS_TYPE = #{settleaccountsType,jdbcType=DECIMAL},
</if>
<if test="consignmentType != null">
CONSIGNMENT_TYPE = #{consignmentType,jdbcType=DECIMAL},
</if>
<if test="unloadType != null">
UNLOAD_TYPE = #{unloadType,jdbcType=DECIMAL},
</if>
<if test="insured != null">
INSURED = #{insured,jdbcType=DECIMAL},
</if>
<if test="contractNo != null">
CONTRACT_NO = #{contractNo,jdbcType=VARCHAR},
</if>
<if test="distance != null">
DISTANCE = #{distance,jdbcType=DECIMAL},
</if>
<if test="originalCost != null">
ORIGINAL_COST = #{originalCost,jdbcType=DECIMAL},
</if>
<if test="actualCost != null">
ACTUAL_COST = #{actualCost,jdbcType=DECIMAL},
</if>
<if test="openFlag != null">
OPEN_FLAG = #{openFlag,jdbcType=DECIMAL},
</if>
<if test="secondTransportflag != null">
SECOND_TRANSPORTFLAG = #{secondTransportflag,jdbcType=DECIMAL},
</if>
<if test="secondTransportstatus != null">
SECOND_TRANSPORTSTATUS = #{secondTransportstatus,jdbcType=DECIMAL},
</if>
<if test="printcounts != null">
PRINTCOUNTS = #{printcounts,jdbcType=DECIMAL},
</if>
<if test="remarks != null">
REMARKS = #{remarks,jdbcType=VARCHAR},
</if>
<if test="creator != null">
CREATOR = #{creator,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="editor != null">
EDITOR = #{editor,jdbcType=VARCHAR},
</if>
<if test="editTime != null">
EDIT_TIME = #{editTime,jdbcType=TIMESTAMP},
</if>
<if test="status != null">
STATUS = #{status,jdbcType=DECIMAL},
</if>
<if test="parentBillNo != null">
parent_bill_no = #{parentBillNo,jdbcType=VARCHAR},
</if>
</set>
where BILL_NO = #{billNo,jdbcType=VARCHAR}
</update>
<update id="update4RecoverySourceBill" parameterType="com.yougou.logistics.tms.common.model.TmsBillTransport">
update TMS_BILL_TRANSPORT
<set>
<if test="quartzcenterNo != null and quartzcenterNo != ''">
QUARTZCENTER_NO = #{quartzcenterNo,jdbcType=VARCHAR},
</if>
<if test="billNoOriginal != null and billNoOriginal != ''">
BILL_NO_ORIGINAL = #{billNoOriginal,jdbcType=VARCHAR},
</if>
<if test="businessType != null and businessType.toString() != ''">
BUSINESS_TYPE = #{businessType,jdbcType=VARCHAR},
</if>
<if test="currentBillstatus != null and currentBillstatus.toString() != ''">
CURRENT_BILLSTATUS = #{currentBillstatus,jdbcType=DECIMAL},
</if>
<if test="consigneeNo != null and consigneeNo != ''">
CONSIGNEE_NO = #{consigneeNo,jdbcType=VARCHAR},
</if>
<if test="shiperNo != null and shiperNo != ''">
SHIPER_NO = #{shiperNo,jdbcType=VARCHAR},
</if>
<if test="transportTime != null and transportTime != ''">
TRANSPORT_TIME = #{transportTime,jdbcType=TIMESTAMP},
</if>
<if test="arrivalDate != null and arrivalDate != ''">
ARRIVAL_DATE = #{arrivalDate,jdbcType=TIMESTAMP},
</if>
<if test="takedeliveryBeginTime != null and takedeliveryBeginTime != ''">
TAKEDELIVERY_BEGIN_TIME = #{takedeliveryBeginTime,jdbcType=VARCHAR},
</if>
<if test="takedeliveryEndTime != null and takedeliveryEndTime != ''">
TAKEDELIVERY_END_TIME = #{takedeliveryEndTime,jdbcType=VARCHAR},
</if>
<if test="transportRequirements != null and transportRequirements != ''">
TRANSPORT_REQUIREMENTS = #{transportRequirements,jdbcType=VARCHAR},
</if>
<if test="emergencyDegree != null and emergencyDegree.toString() != ''">
EMERGENCY_DEGREE = #{emergencyDegree,jdbcType=DECIMAL},
</if>
<if test="goodsType != null and goodsType != ''">
GOODS_TYPE = #{goodsType,jdbcType=DECIMAL},
</if>
<if test="goodsDescription != null and goodsDescription != ''">
GOODS_DESCRIPTION = #{goodsDescription,jdbcType=VARCHAR},
</if>
<if test="totalBoxcount != null and totalBoxcount != ''">
TOTAL_BOXCOUNT = #{totalBoxcount,jdbcType=DECIMAL},
</if>
<if test="totalCount != null and totalCount != ''">
TOTAL_COUNT = #{totalCount,jdbcType=DECIMAL},
</if>
<if test="totalCubage != null and totalCubage != ''">
TOTAL_CUBAGE = #{totalCubage,jdbcType=DECIMAL},
</if>
<if test="totalLength != null and totalLength != ''">
TOTAL_LENGTH = #{totalLength,jdbcType=DECIMAL},
</if>
<if test="totalWidth != null and totalWidth != ''">
TOTAL_WIDTH = #{totalWidth,jdbcType=DECIMAL},
</if>
<if test="totalHeight != null and totalHeight != ''">
TOTAL_HEIGHT = #{totalHeight,jdbcType=DECIMAL},
</if>
<if test="totalWeight != null and totalWeight != ''">
TOTAL_WEIGHT = #{totalWeight,jdbcType=DECIMAL},
</if>
<if test="consigneeName != null and consigneeName != ''">
CONSIGNEE_NAME = #{consigneeName,jdbcType=VARCHAR},
</if>
<if test="consigneeTel != null and consigneeTel != ''">
CONSIGNEE_TEL = #{consigneeTel,jdbcType=VARCHAR},
</if>
<if test="consigneeAddress != null and consigneeAddress != ''">
CONSIGNEE_ADDRESS = #{consigneeAddress,jdbcType=VARCHAR},
</if>
<if test="consigneeZone != null and consigneeZone != ''">
CONSIGNEE_ZONE = #{consigneeZone,jdbcType=VARCHAR},
</if>
<if test="loadCompany != null and loadCompany != ''">
LOAD_COMPANY = #{loadCompany,jdbcType=VARCHAR},
</if>
<if test="loadContactname != null and loadContactname != ''">
LOAD_CONTACTNAME = #{loadContactname,jdbcType=VARCHAR},
</if>
<if test="loadContacttel != null and loadContacttel != ''">
LOAD_CONTACTTEL = #{loadContacttel,jdbcType=VARCHAR},
</if>
<if test="loadCompanyaddress != null and loadCompanyaddress != ''">
LOAD_COMPANYADDRESS = #{loadCompanyaddress,jdbcType=VARCHAR},
</if>
<if test="loadCompanyzone != null and loadCompanyzone != ''">
LOAD_COMPANYZONE = #{loadCompanyzone,jdbcType=VARCHAR},
</if>
<if test="shiperName != null and shiperName != ''">
SHIPER_NAME = #{shiperName,jdbcType=VARCHAR},
</if>
<if test="shiperId != null and shiperId != ''">
SHIPER_ID = #{shiperId,jdbcType=VARCHAR},
</if>
<if test="shiperTel != null and shiperTel != ''">
SHIPER_TEL = #{shiperTel,jdbcType=VARCHAR},
</if>
<if test="shiperAddress != null and shiperAddress != ''">
SHIPER_ADDRESS = #{shiperAddress,jdbcType=VARCHAR},
</if>
<if test="shiperZone != null and shiperZone != ''">
SHIPER_ZONE = #{shiperZone,jdbcType=VARCHAR},
</if>
<if test="paymentType != null and paymentType.toString() != ''">
PAYMENT_TYPE = #{paymentType,jdbcType=DECIMAL},
</if>
<if test="settleaccountsType != null and settleaccountsType.toString() != ''">
SETTLEACCOUNTS_TYPE = #{settleaccountsType,jdbcType=DECIMAL},
</if>
<if test="consignmentType != null and consignmentType.toString() != ''">
CONSIGNMENT_TYPE = #{consignmentType,jdbcType=DECIMAL},
</if>
<if test="unloadType != null and unloadType != ''">
UNLOAD_TYPE = #{unloadType,jdbcType=DECIMAL},
</if>
<if test="insured != null and insured != ''">
INSURED = #{insured,jdbcType=DECIMAL},
</if>
<if test="contractNo != null and contractNo != ''">
CONTRACT_NO = #{contractNo,jdbcType=VARCHAR},
</if>
<if test="distance != null and distance != ''">
DISTANCE = #{distance,jdbcType=DECIMAL},
</if>
<if test="originalCost != null and originalCost != ''">
ORIGINAL_COST = #{originalCost,jdbcType=DECIMAL},
</if>
<if test="actualCost != null and actualCost != ''">
ACTUAL_COST = #{actualCost,jdbcType=DECIMAL},
</if>
<if test="openFlag != null and openFlag.toString() != ''">
OPEN_FLAG = #{openFlag,jdbcType=DECIMAL},
</if>
<if test="secondTransportflag != null and secondTransportflag.toString() != ''">
SECOND_TRANSPORTFLAG = #{secondTransportflag,jdbcType=DECIMAL},
</if>
<if test="secondTransportstatus != null and secondTransportstatus.toString() != ''">
SECOND_TRANSPORTSTATUS = #{secondTransportstatus,jdbcType=DECIMAL},
</if>
<if test="printcounts != null and printcounts != ''">
PRINTCOUNTS = #{printcounts,jdbcType=DECIMAL},
</if>
<if test="remarks != null and remarks != ''">
REMARKS = #{remarks,jdbcType=VARCHAR},
</if>
<if test="creator != null and creator != ''">
CREATOR = #{creator,jdbcType=VARCHAR},
</if>
<if test="createTime != null and createTime != ''">
CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="editor != null and editor != ''">
EDITOR = #{editor,jdbcType=VARCHAR},
</if>
<if test="editTime != null and editTime != ''">
EDIT_TIME = #{editTime,jdbcType=TIMESTAMP},
</if>
<if test="status != null and status != ''">
STATUS = #{status,jdbcType=DECIMAL},
</if>
<if test="parentBillNo != null and parentBillNo != ''">
parent_bill_no = #{parentBillNo,jdbcType=VARCHAR},
</if>
</set>
where BILL_NO = #{billNo,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey"
parameterType="com.yougou.logistics.tms.common.model.TmsBillTransport">
update TMS_BILL_TRANSPORT
set QUARTZCENTER_NO = #{quartzcenterNo,jdbcType=VARCHAR},
BILL_NO_ORIGINAL = #{billNoOriginal,jdbcType=VARCHAR},
BUSINESS_TYPE = #{businessType,jdbcType=VARCHAR},
CURRENT_BILLSTATUS = #{currentBillstatus,jdbcType=DECIMAL},
CONSIGNEE_NO = #{consigneeNo,jdbcType=VARCHAR},
SHIPER_NO = #{shiperNo,jdbcType=VARCHAR},
TRANSPORT_TIME = #{transportTime,jdbcType=TIMESTAMP},
ARRIVAL_DATE = #{arrivalDate,jdbcType=TIMESTAMP},
TAKEDELIVERY_BEGIN_TIME = #{takedeliveryBeginTime,jdbcType=VARCHAR},
TAKEDELIVERY_END_TIME = #{takedeliveryEndTime,jdbcType=VARCHAR},
TRANSPORT_REQUIREMENTS = #{transportRequirements,jdbcType=VARCHAR},
EMERGENCY_DEGREE = #{emergencyDegree,jdbcType=DECIMAL},
GOODS_TYPE = #{goodsType,jdbcType=DECIMAL},
GOODS_DESCRIPTION = #{goodsDescription,jdbcType=VARCHAR},
TOTAL_BOXCOUNT = #{totalBoxcount,jdbcType=DECIMAL},
TOTAL_COUNT = #{totalCount,jdbcType=DECIMAL},
TOTAL_CUBAGE = #{totalCubage,jdbcType=DECIMAL},
TOTAL_LENGTH = #{totalLength,jdbcType=DECIMAL},
TOTAL_WIDTH = #{totalWidth,jdbcType=DECIMAL},
TOTAL_HEIGHT = #{totalHeight,jdbcType=DECIMAL},
TOTAL_WEIGHT = #{totalWeight,jdbcType=DECIMAL},
CONSIGNEE_NAME = #{consigneeName,jdbcType=VARCHAR},
CONSIGNEE_TEL = #{consigneeTel,jdbcType=VARCHAR},
CONSIGNEE_ADDRESS = #{consigneeAddress,jdbcType=VARCHAR},
CONSIGNEE_ZONE = #{consigneeZone,jdbcType=VARCHAR},
LOAD_COMPANY = #{loadCompany,jdbcType=VARCHAR},
LOAD_CONTACTNAME = #{loadContactname,jdbcType=VARCHAR},
LOAD_CONTACTTEL = #{loadContacttel,jdbcType=VARCHAR},
LOAD_COMPANYADDRESS = #{loadCompanyaddress,jdbcType=VARCHAR},
LOAD_COMPANYZONE = #{loadCompanyzone,jdbcType=VARCHAR},
SHIPER_NAME = #{shiperName,jdbcType=VARCHAR},
SHIPER_ID = #{shiperId,jdbcType=VARCHAR},
SHIPER_TEL = #{shiperTel,jdbcType=VARCHAR},
SHIPER_ADDRESS = #{shiperAddress,jdbcType=VARCHAR},
SHIPER_ZONE = #{shiperZone,jdbcType=VARCHAR},
PAYMENT_TYPE = #{paymentType,jdbcType=DECIMAL},
SETTLEACCOUNTS_TYPE = #{settleaccountsType,jdbcType=DECIMAL},
CONSIGNMENT_TYPE = #{consignmentType,jdbcType=DECIMAL},
UNLOAD_TYPE = #{unloadType,jdbcType=DECIMAL},
INSURED = #{insured,jdbcType=DECIMAL},
CONTRACT_NO = #{contractNo,jdbcType=VARCHAR},
DISTANCE = #{distance,jdbcType=DECIMAL},
ORIGINAL_COST = #{originalCost,jdbcType=DECIMAL},
ACTUAL_COST = #{actualCost,jdbcType=DECIMAL},
OPEN_FLAG = #{openFlag,jdbcType=DECIMAL},
SECOND_TRANSPORTFLAG = #{secondTransportflag,jdbcType=DECIMAL},
SECOND_TRANSPORTSTATUS = #{secondTransportstatus,jdbcType=DECIMAL},
PRINTCOUNTS = #{printcounts,jdbcType=DECIMAL},
REMARKS = #{remarks,jdbcType=VARCHAR},
CREATOR = #{creator,jdbcType=VARCHAR},
CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
EDITOR = #{editor,jdbcType=VARCHAR},
EDIT_TIME = #{editTime,jdbcType=TIMESTAMP},
STATUS = #{status,jdbcType=DECIMAL},
parent_bill_no=#{parentBillNo,jdbcType=VARCHAR}
where BILL_NO = #{billNo,jdbcType=VARCHAR}
</update>
<select id="selectTmsBillTransportById" resultMap="BaseResultMap"
parameterType="map">
select nvl(T.Consignee_Name, M.DUTY) as CONSIGNEE_NAME,
nvl(T.Consignee_Tel, M.TELNO) as CONSIGNEE_TEL,nvl (T.SHIPER_NAME,n.DUTY) as SHIPER_NAME ,nvl(T.Shiper_Tel,N.TELNO) as SHIPER_TEL,
Ts.Total_Boxcount as SUB_TOTAL_BOX_COUNT,Ts.Total_Count SUB_TOTAL_COUNT,
T.*,M.TRANSPORT_POINT_NAME CONSIGNEE_NO_NAME,N.TRANSPORT_POINT_NAME SHIPER_NO_NAME,T3.TRUCK_NO TRUCK_NO,
q.quartzcenter_name QUARTZCENTER_NO_NAME,T3.Driver_Name,
t.takedelivery_begin_time||'-'||t.takedelivery_end_time
takedeliveryTimeStr,
(select ld.ITEMNAME from tms_standard_dtl ld where T.business_type =ld.itemvalue and ld.lookupcode = 'BUSINESS_TYPE' ) as BUSINESS_TYPE_STR
,T2.TOTAL_BOXCOUNT as DTL_TOTAL_BOXCOUNT ,T2.TOTAL_COUNT DTL_TOTAL_COUNT from TMS_BILL_TRANSPORT T
LEFT JOIN TMS_QUARTZCENTER Q ON T.QUARTZCENTER_NO = Q.QUARTZCENTER_NO
LEFT JOIN TMS_TRANSPORT_POINT M ON (M.TRANSPORT_POINT_NO = T.CONSIGNEE_NO)
LEFT JOIN TMS_TRANSPORT_POINT N ON (N.TRANSPORT_POINT_NO =
T.SHIPER_NO) left join tms_bill_transport_subbill TS ON(T.BILL_NO=TS.BILL_NO)
,tms_bill_truck_dtl T2, tms_bill_truck T3
where 1 = 1 and T.BILL_NO = T2.bill_no and T2.truck_no=T3.truck_no and T3.status='0'
<include refid="condition" />
</select>
<select id="selectTmsBillTransportByBillNoOriginalBusinessType" resultMap="BaseResultMap">
select <include refid="Base_Column_List"/>
from TMS_BILL_TRANSPORT where
BILL_NO_ORIGINAL= #{billNoOriginal,jdbcType=VARCHAR} and
BUSINESS_TYPE=#{businessType,jdbcType=VARCHAR}
</select>
<update id="updateCurrentBillstatusById">
update TMS_BILL_TRANSPORT set CURRENT_BILLSTATUS=#{currentBillStatus}
where BILL_NO=#{billNo}
</update>
<select id="selectBillAndBillDtlByPrimaryKey" resultMap="TmsBillTransportAndDtlDto"
parameterType="java.lang.String">
select
<include refid="TmsBillTransportAndDtlDto_column" />
from TMS_BILL_TRANSPORT T LEFT JOIN TMS_BILL_TRANSPORT_DTL D ON T.BILL_NO = D.BILL_NO
where T.BILL_NO = #{billNo,jdbcType=VARCHAR}
ORDER BY T.BILL_NO ASC
</select>
<select id="selectTransportAndTranspointPointByBillNoList" resultMap="TmsBillTransportAndTransportPointDto" parameterType="list">
select
<include refid="TmsBillTransportAndTransportPointDto_column" />
from TMS_BILL_TRANSPORT T left join TMS_TRANSPORT_POINT P on T.consignee_no = P.transport_point_no
where T.BILL_NO in
<foreach collection="billNoList" index="index" item="item" open="(" close=")" separator=",">
#{item,jdbcType=VARCHAR}
</foreach>
</select>
</mapper>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.yougou.logistics.tms.dal.database.TmsBillTransportMapper">
<resultMap id="BaseResultMap"
type="com.yougou.logistics.tms.common.model.TmsBillTransport">
<id column="BILL_NO" property="billNo" jdbcType="VARCHAR" />
<result column="QUARTZCENTER_NO" property="quartzcenterNo"
jdbcType="VARCHAR" />
<result column="BILL_NO_ORIGINAL" property="billNoOriginal"
jdbcType="VARCHAR" />
<result column="BUSINESS_TYPE" property="businessType"
jdbcType="VARCHAR" />
<result column="CURRENT_BILLSTATUS" property="currentBillstatus"
jdbcType="DECIMAL" />
<result column="CONSIGNEE_NO" property="consigneeNo" jdbcType="VARCHAR" />
<result column="SHIPER_NO" property="shiperNo" jdbcType="VARCHAR" />
<result column="TRANSPORT_TIME" property="transportTime"
jdbcType="TIMESTAMP" />
<result column="ARRIVAL_DATE" property="arrivalDate" jdbcType="TIMESTAMP" />
<result column="TAKEDELIVERY_BEGIN_TIME" property="takedeliveryBeginTime"
jdbcType="VARCHAR" />
<result column="TAKEDELIVERY_END_TIME" property="takedeliveryEndTime"
jdbcType="VARCHAR" />
<result column="TRANSPORT_REQUIREMENTS" property="transportRequirements"
jdbcType="VARCHAR" />
<result column="EMERGENCY_DEGREE" property="emergencyDegree"
jdbcType="DECIMAL" />
<result column="GOODS_TYPE" property="goodsType" jdbcType="DECIMAL" />
<result column="GOODS_DESCRIPTION" property="goodsDescription"
jdbcType="VARCHAR" />
<result column="TOTAL_BOXCOUNT" property="totalBoxcount"
jdbcType="DECIMAL" />
<result column="TOTAL_COUNT" property="totalCount" jdbcType="DECIMAL" />
<result column="TOTAL_CUBAGE" property="totalCubage" jdbcType="DECIMAL" />
<result column="TOTAL_LENGTH" property="totalLength" jdbcType="DECIMAL" />
<result column="TOTAL_WIDTH" property="totalWidth" jdbcType="DECIMAL" />
<result column="TOTAL_HEIGHT" property="totalHeight" jdbcType="DECIMAL" />
<result column="TOTAL_WEIGHT" property="totalWeight" jdbcType="DECIMAL" />
<result column="CONSIGNEE_NAME" property="consigneeName"
jdbcType="VARCHAR" />
<result column="CONSIGNEE_TEL" property="consigneeTel"
jdbcType="VARCHAR" />
<result column="CONSIGNEE_ADDRESS" property="consigneeAddress"
jdbcType="VARCHAR" />
<result column="CONSIGNEE_ZONE" property="consigneeZone"
jdbcType="VARCHAR" />
<result column="LOAD_COMPANY" property="loadCompany" jdbcType="VARCHAR" />
<result column="LOAD_CONTACTNAME" property="loadContactname"
jdbcType="VARCHAR" />
<result column="LOAD_CONTACTTEL" property="loadContacttel"
jdbcType="VARCHAR" />
<result column="LOAD_COMPANYADDRESS" property="loadCompanyaddress"
jdbcType="VARCHAR" />
<result column="LOAD_COMPANYZONE" property="loadCompanyzone"
jdbcType="VARCHAR" />
<result column="SHIPER_NAME" property="shiperName" jdbcType="VARCHAR" />
<result column="SHIPER_ID" property="shiperId" jdbcType="VARCHAR" />
<result column="SHIPER_TEL" property="shiperTel" jdbcType="VARCHAR" />
<result column="SHIPER_ADDRESS" property="shiperAddress"
jdbcType="VARCHAR" />
<result column="SHIPER_ZONE" property="shiperZone" jdbcType="VARCHAR" />
<result column="PAYMENT_TYPE" property="paymentType" jdbcType="DECIMAL" />
<result column="SETTLEACCOUNTS_TYPE" property="settleaccountsType"
jdbcType="DECIMAL" />
<result column="CONSIGNMENT_TYPE" property="consignmentType"
jdbcType="DECIMAL" />
<result column="UNLOAD_TYPE" property="unloadType" jdbcType="DECIMAL" />
<result column="INSURED" property="insured" jdbcType="DECIMAL" />
<result column="CONTRACT_NO" property="contractNo" jdbcType="VARCHAR" />
<result column="DISTANCE" property="distance" jdbcType="DECIMAL" />
<result column="ORIGINAL_COST" property="originalCost"
jdbcType="DECIMAL" />
<result column="ACTUAL_COST" property="actualCost" jdbcType="DECIMAL" />
<result column="OPEN_FLAG" property="openFlag" jdbcType="DECIMAL" />
<result column="SECOND_TRANSPORTFLAG" property="secondTransportflag"
jdbcType="DECIMAL" />
<result column="SECOND_TRANSPORTSTATUS" property="secondTransportstatus"
jdbcType="DECIMAL" />
<result column="PRINTCOUNTS" property="printcounts" jdbcType="DECIMAL" />
<result column="REMARKS" property="remarks" jdbcType="VARCHAR" />
<result column="CREATOR" property="creator" jdbcType="VARCHAR" />
<result column="CREATE_TIME" property="createTime" jdbcType="TIMESTAMP" />
<result column="EDITOR" property="editor" jdbcType="VARCHAR" />
<result column="EDIT_TIME" property="editTime" jdbcType="TIMESTAMP" />
<result column="STATUS" property="status" jdbcType="DECIMAL" />
<result column="BUSINESS_TYPE_STR" property="businessTypeStr"
jdbcType="VARCHAR" />
<result column="CURRENT_BILLSTATUS_STR" property="currentBillstatusStr"
jdbcType="VARCHAR" />
<result column="EMERGENCY_DEGREE_STR" property="emergencyDegreeStr" />
<result column="GOODS_TYPE_STR" property="goodsTypeStr"
jdbcType="VARCHAR" />
<result column="PAYMENT_TYPE_STR" property="paymentTypeStr"
jdbcType="VARCHAR" />
<result column="SETTLEACCOUNTS_TYPE_STR" property="settleaccountsTypeStr"
jdbcType="VARCHAR" />
<result column="CONSIGNMENT_TYPE_STR" property="consignmentTypeStr"
jdbcType="VARCHAR" />
<result column="UNLOAD_TYPE_STR" property="unloadTypeStr"
jdbcType="VARCHAR" />
<result column="INSURED_STR" property="insuredStr" jdbcType="VARCHAR" />
<result column="OPEN_FLAG_STR" property="openFlagStr" jdbcType="VARCHAR" />
<result column="SECOND_TRANSPORTFLAG_STR" property="secondTransportflagStr"
jdbcType="VARCHAR" />
<result column="STATUS_STR" property="statusStr" jdbcType="VARCHAR" />
<result column="CONSIGNEE_NO_NAME" property="consigneeNoName"
jdbcType="VARCHAR" />
<result column="SHIPER_NO_NAME" property="shiperNoName"
jdbcType="VARCHAR" />
<result column="CONSIGNEE_NO_STR" property="consigneeNoStr"
jdbcType="VARCHAR" />
<result column="SHIPER_NO_STR" property="shiperNoStr"
jdbcType="VARCHAR" />
<result column="QUARTZCENTER_NO_NAME" property="quartzcenterNoName"
jdbcType="VARCHAR" />
<result column="DRIVER_NAME" property="driverName"
jdbcType="VARCHAR" />
<result column="TRUCK_NO" property="truckNo"
jdbcType="VARCHAR" />
<result column="SUB_TOTAL_BOX_COUNT" property="subTotalBoxCount"
jdbcType="VARCHAR" />
<result column="SUB_TOTAL_COUNT" property="subTotalCount"
jdbcType="VARCHAR" />
<result column="DTL_TOTAL_BOXCOUNT" property="dtlTotalboxcount"
jdbcType="DECIMAL" />
<result column="DTL_TOTAL_COUNT" property="dtlTotalCount"
jdbcType="DECIMAL" />
<result column="parent_bill_no" property="parentBillNo"
jdbcType="VARCHAR" />
</resultMap>
<resultMap id="TmsBillTransportAndDtlDto"
type="com.yougou.logistics.tms.common.dto.TmsBillTransportAndDtlDto">
<id column="BILL_NO" property="billNo" jdbcType="VARCHAR" />
<result column="QUARTZCENTER_NO" property="quartzcenterNo"
jdbcType="VARCHAR" />
<result column="BILL_NO_ORIGINAL" property="billNoOriginal"
jdbcType="VARCHAR" />
<result column="BUSINESS_TYPE" property="businessType"
jdbcType="VARCHAR" />
<result column="CURRENT_BILLSTATUS" property="currentBillstatus"
jdbcType="DECIMAL" />
<result column="CONSIGNEE_NO" property="consigneeNo" jdbcType="VARCHAR" />
<result column="SHIPER_NO" property="shiperNo" jdbcType="VARCHAR" />
<result column="TRANSPORT_TIME" property="transportTime"
jdbcType="TIMESTAMP" />
<result column="ARRIVAL_DATE" property="arrivalDate" jdbcType="TIMESTAMP" />
<result column="TAKEDELIVERY_BEGIN_TIME" property="takedeliveryBeginTime"
jdbcType="VARCHAR" />
<result column="TAKEDELIVERY_END_TIME" property="takedeliveryEndTime"
jdbcType="VARCHAR" />
<result column="TRANSPORT_REQUIREMENTS" property="transportRequirements"
jdbcType="VARCHAR" />
<result column="EMERGENCY_DEGREE" property="emergencyDegree"
jdbcType="DECIMAL" />
<result column="GOODS_TYPE" property="goodsType" jdbcType="DECIMAL" />
<result column="GOODS_DESCRIPTION" property="goodsDescription"
jdbcType="VARCHAR" />
<result column="TOTAL_BOXCOUNT" property="totalBoxcount"
jdbcType="DECIMAL" />
<result column="TOTAL_COUNT" property="totalCount" jdbcType="DECIMAL" />
<result column="TOTAL_CUBAGE" property="totalCubage" jdbcType="DECIMAL" />
<result column="TOTAL_LENGTH" property="totalLength" jdbcType="DECIMAL" />
<result column="TOTAL_WIDTH" property="totalWidth" jdbcType="DECIMAL" />
<result column="TOTAL_HEIGHT" property="totalHeight" jdbcType="DECIMAL" />
<result column="TOTAL_WEIGHT" property="totalWeight" jdbcType="DECIMAL" />
<result column="CONSIGNEE_NAME" property="consigneeName"
jdbcType="VARCHAR" />
<result column="CONSIGNEE_TEL" property="consigneeTel"
jdbcType="VARCHAR" />
<result column="CONSIGNEE_ADDRESS" property="consigneeAddress"
jdbcType="VARCHAR" />
<result column="CONSIGNEE_ZONE" property="consigneeZone"
jdbcType="VARCHAR" />
<result column="LOAD_COMPANY" property="loadCompany" jdbcType="VARCHAR" />
<result column="LOAD_CONTACTNAME" property="loadContactname"
jdbcType="VARCHAR" />
<result column="LOAD_CONTACTTEL" property="loadContacttel"
jdbcType="VARCHAR" />
<result column="LOAD_COMPANYADDRESS" property="loadCompanyaddress"
jdbcType="VARCHAR" />
<result column="LOAD_COMPANYZONE" property="loadCompanyzone"
jdbcType="VARCHAR" />
<result column="SHIPER_NAME" property="shiperName" jdbcType="VARCHAR" />
<result column="SHIPER_ID" property="shiperId" jdbcType="VARCHAR" />
<result column="SHIPER_TEL" property="shiperTel" jdbcType="VARCHAR" />
<result column="SHIPER_ADDRESS" property="shiperAddress"
jdbcType="VARCHAR" />
<result column="SHIPER_ZONE" property="shiperZone" jdbcType="VARCHAR" />
<result column="PAYMENT_TYPE" property="paymentType" jdbcType="DECIMAL" />
<result column="SETTLEACCOUNTS_TYPE" property="settleaccountsType"
jdbcType="DECIMAL" />
<result column="CONSIGNMENT_TYPE" property="consignmentType"
jdbcType="DECIMAL" />
<result column="UNLOAD_TYPE" property="unloadType" jdbcType="DECIMAL" />
<result column="INSURED" property="insured" jdbcType="DECIMAL" />
<result column="CONTRACT_NO" property="contractNo" jdbcType="VARCHAR" />
<result column="DISTANCE" property="distance" jdbcType="DECIMAL" />
<result column="ORIGINAL_COST" property="originalCost"
jdbcType="DECIMAL" />
<result column="ACTUAL_COST" property="actualCost" jdbcType="DECIMAL" />
<result column="OPEN_FLAG" property="openFlag" jdbcType="DECIMAL" />
<result column="SECOND_TRANSPORTFLAG" property="secondTransportflag"
jdbcType="DECIMAL" />
<result column="SECOND_TRANSPORTSTATUS" property="secondTransportstatus"
jdbcType="DECIMAL" />
<result column="PRINTCOUNTS" property="printcounts" jdbcType="DECIMAL" />
<result column="REMARKS" property="remarks" jdbcType="VARCHAR" />
<result column="CREATOR" property="creator" jdbcType="VARCHAR" />
<result column="CREATE_TIME" property="createTime" jdbcType="TIMESTAMP" />
<result column="EDITOR" property="editor" jdbcType="VARCHAR" />
<result column="EDIT_TIME" property="editTime" jdbcType="TIMESTAMP" />
<result column="STATUS" property="status" jdbcType="DECIMAL" />
<result column="BUSINESS_TYPE_STR" property="businessTypeStr"
jdbcType="VARCHAR" />
<result column="CURRENT_BILLSTATUS_STR" property="currentBillstatusStr"
jdbcType="VARCHAR" />
<result column="EMERGENCY_DEGREE_STR" property="emergencyDegreeStr" />
<result column="GOODS_TYPE_STR" property="goodsTypeStr"
jdbcType="VARCHAR" />
<result column="PAYMENT_TYPE_STR" property="paymentTypeStr"
jdbcType="VARCHAR" />
<result column="SETTLEACCOUNTS_TYPE_STR" property="settleaccountsTypeStr"
jdbcType="VARCHAR" />
<result column="CONSIGNMENT_TYPE_STR" property="consignmentTypeStr"
jdbcType="VARCHAR" />
<result column="UNLOAD_TYPE_STR" property="unloadTypeStr"
jdbcType="VARCHAR" />
<result column="INSURED_STR" property="insuredStr" jdbcType="VARCHAR" />
<result column="OPEN_FLAG_STR" property="openFlagStr" jdbcType="VARCHAR" />
<result column="SECOND_TRANSPORTFLAG_STR" property="secondTransportflagStr"
jdbcType="VARCHAR" />
<result column="STATUS_STR" property="statusStr" jdbcType="VARCHAR" />
<result column="CONSIGNEE_NO_NAME" property="consigneeNoName"
jdbcType="VARCHAR" />
<result column="SHIPER_NO_NAME" property="shiperNoName"
jdbcType="VARCHAR" />
<result column="CONSIGNEE_NO_STR" property="consigneeNoStr"
jdbcType="VARCHAR" />
<result column="SHIPER_NO_STR" property="shiperNoStr"
jdbcType="VARCHAR" />
<result column="QUARTZCENTER_NO_NAME" property="quartzcenterNoName"
jdbcType="VARCHAR" />
<result column="DRIVER_NAME" property="driverName"
jdbcType="VARCHAR" />
<result column="TRUCK_NO" property="truckNo"
jdbcType="VARCHAR" />
<result column="SUB_TOTAL_BOX_COUNT" property="subTotalBoxCount"
jdbcType="VARCHAR" />
<result column="SUB_TOTAL_COUNT" property="subTotalCount"
jdbcType="VARCHAR" />
<result column="DTL_TOTAL_BOXCOUNT" property="dtlTotalboxcount"
jdbcType="DECIMAL" />
<result column="DTL_TOTAL_COUNT" property="dtlTotalCount"
jdbcType="DECIMAL" />
<result column="parent_bill_no" property="parentBillNo"
jdbcType="VARCHAR" />
<result column="BOX_NO" property="boxNo" jdbcType="VARCHAR" />
<result column="SUBBILL_NO" property="subbillNo" jdbcType="VARCHAR" />
<result column="PACK_UNIT" property="packUnit" jdbcType="VARCHAR" />
<result column="PACK_SPEC" property="packSpec" jdbcType="VARCHAR" />
<result column="PACK_QTY" property="packQty" jdbcType="DECIMAL" />
<result column="SKU_L" property="skuL" jdbcType="DECIMAL" />
<result column="SKU_W" property="skuW" jdbcType="DECIMAL" />
<result column="SKU_H" property="skuH" jdbcType="DECIMAL" />
<result column="SKU_CUBAGE" property="skuCubage" jdbcType="DECIMAL" />
<result column="SKU_WEIGHT" property="skuWeight" jdbcType="DECIMAL" />
<result column="GOODS_DESCRIPTION" property="goodsDescriptionDtl" jdbcType="VARCHAR" />
<result column="REMARKS" property="packUnitStr" jdbcType="VARCHAR" />
</resultMap>
<resultMap id="TmsBillTransportAndTransportPointDto"
type="com.yougou.logistics.tms.common.dto.TmsBillTransportAndTransportPointDto">
<id column="BILL_NO" property="billNo" jdbcType="VARCHAR" />
<result column="QUARTZCENTER_NO" property="quartzcenterNo"
jdbcType="VARCHAR" />
<result column="BILL_NO_ORIGINAL" property="billNoOriginal"
jdbcType="VARCHAR" />
<result column="BUSINESS_TYPE" property="businessType"
jdbcType="VARCHAR" />
<result column="CURRENT_BILLSTATUS" property="currentBillstatus"
jdbcType="DECIMAL" />
<result column="CONSIGNEE_NO" property="consigneeNo" jdbcType="VARCHAR" />
<result column="SHIPER_NO" property="shiperNo" jdbcType="VARCHAR" />
<result column="TRANSPORT_TIME" property="transportTime"
jdbcType="TIMESTAMP" />
<result column="ARRIVAL_DATE" property="arrivalDate" jdbcType="TIMESTAMP" />
<result column="TAKEDELIVERY_BEGIN_TIME" property="takedeliveryBeginTime"
jdbcType="VARCHAR" />
<result column="TAKEDELIVERY_END_TIME" property="takedeliveryEndTime"
jdbcType="VARCHAR" />
<result column="TRANSPORT_REQUIREMENTS" property="transportRequirements"
jdbcType="VARCHAR" />
<result column="EMERGENCY_DEGREE" property="emergencyDegree"
jdbcType="DECIMAL" />
<result column="GOODS_TYPE" property="goodsType" jdbcType="DECIMAL" />
<result column="GOODS_DESCRIPTION" property="goodsDescription"
jdbcType="VARCHAR" />
<result column="TOTAL_BOXCOUNT" property="totalBoxcount"
jdbcType="DECIMAL" />
<result column="TOTAL_COUNT" property="totalCount" jdbcType="DECIMAL" />
<result column="TOTAL_CUBAGE" property="totalCubage" jdbcType="DECIMAL" />
<result column="TOTAL_LENGTH" property="totalLength" jdbcType="DECIMAL" />
<result column="TOTAL_WIDTH" property="totalWidth" jdbcType="DECIMAL" />
<result column="TOTAL_HEIGHT" property="totalHeight" jdbcType="DECIMAL" />
<result column="TOTAL_WEIGHT" property="totalWeight" jdbcType="DECIMAL" />
<result column="CONSIGNEE_NAME" property="consigneeName"
jdbcType="VARCHAR" />
<result column="CONSIGNEE_TEL" property="consigneeTel"
jdbcType="VARCHAR" />
<result column="CONSIGNEE_ADDRESS" property="consigneeAddress"
jdbcType="VARCHAR" />
<result column="CONSIGNEE_ZONE" property="consigneeZone"
jdbcType="VARCHAR" />
<result column="LOAD_COMPANY" property="loadCompany" jdbcType="VARCHAR" />
<result column="LOAD_CONTACTNAME" property="loadContactname"
jdbcType="VARCHAR" />
<result column="LOAD_CONTACTTEL" property="loadContacttel"
jdbcType="VARCHAR" />
<result column="LOAD_COMPANYADDRESS" property="loadCompanyaddress"
jdbcType="VARCHAR" />
<result column="LOAD_COMPANYZONE" property="loadCompanyzone"
jdbcType="VARCHAR" />
<result column="SHIPER_NAME" property="shiperName" jdbcType="VARCHAR" />
<result column="SHIPER_ID" property="shiperId" jdbcType="VARCHAR" />
<result column="SHIPER_TEL" property="shiperTel" jdbcType="VARCHAR" />
<result column="SHIPER_ADDRESS" property="shiperAddress"
jdbcType="VARCHAR" />
<result column="SHIPER_ZONE" property="shiperZone" jdbcType="VARCHAR" />
<result column="PAYMENT_TYPE" property="paymentType" jdbcType="DECIMAL" />
<result column="SETTLEACCOUNTS_TYPE" property="settleaccountsType"
jdbcType="DECIMAL" />
<result column="CONSIGNMENT_TYPE" property="consignmentType"
jdbcType="DECIMAL" />
<result column="UNLOAD_TYPE" property="unloadType" jdbcType="DECIMAL" />
<result column="INSURED" property="insured" jdbcType="DECIMAL" />
<result column="CONTRACT_NO" property="contractNo" jdbcType="VARCHAR" />
<result column="DISTANCE" property="distance" jdbcType="DECIMAL" />
<result column="ORIGINAL_COST" property="originalCost"
jdbcType="DECIMAL" />
<result column="ACTUAL_COST" property="actualCost" jdbcType="DECIMAL" />
<result column="OPEN_FLAG" property="openFlag" jdbcType="DECIMAL" />
<result column="SECOND_TRANSPORTFLAG" property="secondTransportflag"
jdbcType="DECIMAL" />
<result column="SECOND_TRANSPORTSTATUS" property="secondTransportstatus"
jdbcType="DECIMAL" />
<result column="PRINTCOUNTS" property="printcounts" jdbcType="DECIMAL" />
<result column="REMARKS" property="remarks" jdbcType="VARCHAR" />
<result column="CREATOR" property="creator" jdbcType="VARCHAR" />
<result column="CREATE_TIME" property="createTime" jdbcType="TIMESTAMP" />
<result column="EDITOR" property="editor" jdbcType="VARCHAR" />
<result column="EDIT_TIME" property="editTime" jdbcType="TIMESTAMP" />
<result column="STATUS" property="status" jdbcType="DECIMAL" />
<result column="BUSINESS_TYPE_STR" property="businessTypeStr"
jdbcType="VARCHAR" />
<result column="CURRENT_BILLSTATUS_STR" property="currentBillstatusStr"
jdbcType="VARCHAR" />
<result column="EMERGENCY_DEGREE_STR" property="emergencyDegreeStr" />
<result column="GOODS_TYPE_STR" property="goodsTypeStr"
jdbcType="VARCHAR" />
<result column="PAYMENT_TYPE_STR" property="paymentTypeStr"
jdbcType="VARCHAR" />
<result column="SETTLEACCOUNTS_TYPE_STR" property="settleaccountsTypeStr"
jdbcType="VARCHAR" />
<result column="CONSIGNMENT_TYPE_STR" property="consignmentTypeStr"
jdbcType="VARCHAR" />
<result column="UNLOAD_TYPE_STR" property="unloadTypeStr"
jdbcType="VARCHAR" />
<result column="INSURED_STR" property="insuredStr" jdbcType="VARCHAR" />
<result column="OPEN_FLAG_STR" property="openFlagStr" jdbcType="VARCHAR" />
<result column="SECOND_TRANSPORTFLAG_STR" property="secondTransportflagStr"
jdbcType="VARCHAR" />
<result column="STATUS_STR" property="statusStr" jdbcType="VARCHAR" />
<result column="CONSIGNEE_NO_NAME" property="consigneeNoName"
jdbcType="VARCHAR" />
<result column="SHIPER_NO_NAME" property="shiperNoName"
jdbcType="VARCHAR" />
<result column="CONSIGNEE_NO_STR" property="consigneeNoStr"
jdbcType="VARCHAR" />
<result column="SHIPER_NO_STR" property="shiperNoStr"
jdbcType="VARCHAR" />
<result column="QUARTZCENTER_NO_NAME" property="quartzcenterNoName"
jdbcType="VARCHAR" />
<result column="DRIVER_NAME" property="driverName"
jdbcType="VARCHAR" />
<result column="TRUCK_NO" property="truckNo"
jdbcType="VARCHAR" />
<result column="SUB_TOTAL_BOX_COUNT" property="subTotalBoxCount"
jdbcType="VARCHAR" />
<result column="SUB_TOTAL_COUNT" property="subTotalCount"
jdbcType="VARCHAR" />
<result column="DTL_TOTAL_BOXCOUNT" property="dtlTotalboxcount"
jdbcType="DECIMAL" />
<result column="DTL_TOTAL_COUNT" property="dtlTotalCount"
jdbcType="DECIMAL" />
<result column="parent_bill_no" property="parentBillNo"
jdbcType="VARCHAR" />
<result column="STORE_NO" property="storeNo" jdbcType="VARCHAR" />
<result column="TRANSPORT_POINT_NAME" property="transportPointName"
jdbcType="VARCHAR" />
<result column="TRANSPORT_POINT_SIMPLE_NAME" property="transportPointSimpleName"
jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List">
BILL_NO, QUARTZCENTER_NO, BILL_NO_ORIGINAL, BUSINESS_TYPE, CURRENT_BILLSTATUS,
CONSIGNEE_NO,
SHIPER_NO, TRANSPORT_TIME, ARRIVAL_DATE, TAKEDELIVERY_BEGIN_TIME,
TAKEDELIVERY_END_TIME,
TRANSPORT_REQUIREMENTS, EMERGENCY_DEGREE, GOODS_TYPE, GOODS_DESCRIPTION, TOTAL_BOXCOUNT,
TOTAL_COUNT, TOTAL_CUBAGE, TOTAL_LENGTH, TOTAL_WIDTH, TOTAL_HEIGHT,
TOTAL_WEIGHT,
CONSIGNEE_NAME, CONSIGNEE_TEL, CONSIGNEE_ADDRESS, CONSIGNEE_ZONE, LOAD_COMPANY,
LOAD_CONTACTNAME,
LOAD_CONTACTTEL, LOAD_COMPANYADDRESS, LOAD_COMPANYZONE, SHIPER_NAME, SHIPER_ID,
SHIPER_TEL,
SHIPER_ADDRESS, SHIPER_ZONE, PAYMENT_TYPE, SETTLEACCOUNTS_TYPE, CONSIGNMENT_TYPE,
UNLOAD_TYPE, INSURED, CONTRACT_NO, DISTANCE, ORIGINAL_COST,
ACTUAL_COST, OPEN_FLAG,
SECOND_TRANSPORTFLAG, SECOND_TRANSPORTSTATUS, PRINTCOUNTS, REMARKS, CREATOR, CREATE_TIME,
EDITOR, EDIT_TIME, STATUS,parent_bill_no
</sql>
<sql id="TmsBillTransportAndDtlDto_column">
T.BILL_NO, T.QUARTZCENTER_NO, T.BILL_NO_ORIGINAL, T.BUSINESS_TYPE, T.CURRENT_BILLSTATUS,
T.CONSIGNEE_NO,
T.SHIPER_NO, T.TRANSPORT_TIME, T.ARRIVAL_DATE, T.TAKEDELIVERY_BEGIN_TIME,
T.TAKEDELIVERY_END_TIME,
T.TRANSPORT_REQUIREMENTS, T.EMERGENCY_DEGREE, T.GOODS_TYPE, T.GOODS_DESCRIPTION, T.TOTAL_BOXCOUNT,
T.TOTAL_COUNT, T.TOTAL_CUBAGE, T.TOTAL_LENGTH, T.TOTAL_WIDTH, T.TOTAL_HEIGHT,
T.TOTAL_WEIGHT,
T.CONSIGNEE_NAME, T.CONSIGNEE_TEL, T.CONSIGNEE_ADDRESS, T.CONSIGNEE_ZONE, T.LOAD_COMPANY,
T.LOAD_CONTACTNAME,
T.LOAD_CONTACTTEL, T.LOAD_COMPANYADDRESS, T.LOAD_COMPANYZONE, T.SHIPER_NAME, T.SHIPER_ID,
T.SHIPER_TEL,
T.SHIPER_ADDRESS, T.SHIPER_ZONE, T.PAYMENT_TYPE, T.SETTLEACCOUNTS_TYPE, T.CONSIGNMENT_TYPE,
T.UNLOAD_TYPE, T.INSURED, T.CONTRACT_NO, T.DISTANCE, T.ORIGINAL_COST,
T.ACTUAL_COST, T.OPEN_FLAG,
T.SECOND_TRANSPORTFLAG, T.SECOND_TRANSPORTSTATUS, T.PRINTCOUNTS, T.REMARKS, T.CREATOR, T.CREATE_TIME,
T.EDITOR, T.EDIT_TIME, T.STATUS,T.parent_bill_no,
D.BOX_NO, D.SUBBILL_NO, D.PACK_UNIT, D.PACK_SPEC, D.PACK_QTY, D.SKU_L, D.SKU_W, D.SKU_H,
D.SKU_CUBAGE, D.SKU_WEIGHT, D.GOODS_DESCRIPTION, D.REMARKS
</sql>
<sql id="TmsBillTransportAndTransportPointDto_column">
T.BILL_NO, T.QUARTZCENTER_NO, T.BILL_NO_ORIGINAL, T.BUSINESS_TYPE, T.CURRENT_BILLSTATUS,
T.CONSIGNEE_NO,
T.SHIPER_NO, T.TRANSPORT_TIME, T.ARRIVAL_DATE, T.TAKEDELIVERY_BEGIN_TIME,
T.TAKEDELIVERY_END_TIME,
T.TRANSPORT_REQUIREMENTS, T.EMERGENCY_DEGREE, T.GOODS_TYPE, T.GOODS_DESCRIPTION, T.TOTAL_BOXCOUNT,
T.TOTAL_COUNT, T.TOTAL_CUBAGE, T.TOTAL_LENGTH, T.TOTAL_WIDTH, T.TOTAL_HEIGHT,
T.TOTAL_WEIGHT,
T.CONSIGNEE_NAME, T.CONSIGNEE_TEL, T.CONSIGNEE_ADDRESS, T.CONSIGNEE_ZONE, T.LOAD_COMPANY,
T.LOAD_CONTACTNAME,
T.LOAD_CONTACTTEL, T.LOAD_COMPANYADDRESS, T.LOAD_COMPANYZONE, T.SHIPER_NAME, T.SHIPER_ID,
T.SHIPER_TEL,
T.SHIPER_ADDRESS, T.SHIPER_ZONE, T.PAYMENT_TYPE, T.SETTLEACCOUNTS_TYPE, T.CONSIGNMENT_TYPE,
T.UNLOAD_TYPE, T.INSURED, T.CONTRACT_NO, T.DISTANCE, T.ORIGINAL_COST,
T.ACTUAL_COST, T.OPEN_FLAG,
T.SECOND_TRANSPORTFLAG, T.SECOND_TRANSPORTSTATUS, T.PRINTCOUNTS, T.REMARKS, T.CREATOR, T.CREATE_TIME,
T.EDITOR, T.EDIT_TIME, T.STATUS,parent_bill_no,
P.STORE_NO,P.TRANSPORT_POINT_NAME,P.TRANSPORT_POINT_SIMPLE_NAME
</sql>
<sql id="condition">
<if test="null!=params">
<if test="params.billNoSearch != null and params.billNoSearch != ''">
AND (T.BILL_NO LIKE '%${params.billNoSearch}%' or T.PARENT_BILL_NO LIKE '%${params.billNoSearch}%')
</if>
<if test="params.billNoList != null and params.billNoList != ''">
AND T.BILL_NO IN
<foreach collection="params.billNoList" item="billNo" index="index" open="(" close=")" separator=",">
'${billNo}'
</foreach>
</if>
<if test="params.arrivalDateBSearch != null and params.arrivalDateBSearch != ''">
AND to_char(T.ARRIVAL_DATE,'yyyy-MM-dd') >= #{params.arrivalDateBSearch}
</if>
<if test="params.arrivalDateESearch != null and params.arrivalDateESearch != ''">
AND to_char(T.ARRIVAL_DATE,'yyyy-MM-dd') <= #{params.arrivalDateESearch}
</if>
<if
test="params.emergencyDegree != null and params.emergencyDegree.toString() != ''">
AND T.EMERGENCY_DEGREE = #{params.emergencyDegree}
</if>
<if test="params.goodsType != null and params.goodsType.toString() != ''">
AND T.GOODS_TYPE = #{params.goodsType}
</if>
<if test="params.status != null and params.status.toString() != ''">
AND T.STATUS = #{params.status}
</if>
<if test="null!=params.queryCondition and ''!=params.queryCondition">
${params.queryCondition}
</if>
<if test="params.businessTypeSearch != null and params.businessTypeSearch != ''">
AND T.BUSINESS_TYPE = #{params.businessTypeSearch}
</if>
<if test="params.currentBillstatusSearch != null and params.currentBillstatusSearch != ''">
AND T.CURRENT_BILLSTATUS = #{params.currentBillstatusSearch}
</if>
<if test="params.currentBillstatusCk != null and params.currentBillstatusCk != ''">
AND T.CURRENT_BILLSTATUS in ('21','22','23','30','31','32','90')
</if>
<if test="null!=params.quartzcenterSearchLike and ''!=params.quartzcenterSearchLike">
and t.QUARTZCENTER_NO=#{params.quartzcenterSearchLike,jdbcType=VARCHAR}
</if>
<if test="params.shiperNoSearch != null and params.shiperNoSearch != ''">
AND t.SHIPER_NO = #{params.shiperNoSearch}
</if>
<if test="params.unloadPointList != null and params.unloadPointList != ''">
AND EXISTS( SELECT 1 FROM TMS_UNLOAD_POINT_DTL T2 WHERE (T2.TRANSPORT_POINT_NO = T.SHIPER_NO OR T2.TRANSPORT_POINT_NO = T.CONSIGNEE_NO) AND T2.UNLOAD_POINT_NO IN
<foreach collection="params.unloadPointList" item="unloadPointNo" index="index" open="(" close=")" separator=",">
'${unloadPointNo}'
</foreach>)
</if>
<if test="params.consigneeNoSearch != null and params.consigneeNoSearch != ''">
AND t.CONSIGNEE_NO = #{params.consigneeNoSearch}
</if>
<!-- <if test="params.noOpen != null and params.noOpen != ''">
AND T.BILL_NO = #{params.billNoForMobile}
</if>
<if test="params.open != null and params.open != ''">
AND TS.SUBBILL_NO = #{params.billNoForMobile}
</if> -->
<if test="params.billNo != null and params.billNo != ''">
AND T.BILL_NO = #{params.billNo}
</if>
<if test="params.truckNo != null and params.truckNo != ''">
AND T2.TRUCK_NO = #{params.truckNo}
</if>
<if test="params.quartzcenter4Export != null and params.quartzcenter4Export != ''">
AND T.QUARTZCENTER_NO = #{params.quartzcenter4Export,jdbcType=VARCHAR}
</if>
<if test="params.billNoOriginal != null and params.billNoOriginal != ''">
AND T.BILL_NO_ORIGINAL LIKE '%${params.billNoOriginal}%'
</if>
<if test="params.parentBillNo != null and params.parentBillNo != ''">
AND T.parent_bill_no = #{params.parentBillNo}
</if>
</if>
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap"
parameterType="java.lang.String">
select
<include refid="Base_Column_List" />
from TMS_BILL_TRANSPORT T
where T.BILL_NO = #{billNo,jdbcType=VARCHAR}
</select>
<select id="selectMaxBillNoLast5Num" resultType="java.lang.String">
SELECT MAX(SUBSTR(BILL_NO,12,5)) TRANSPORT_POINT_NO_STR FROM TMS_BILL_TRANSPORT WHERE CREATE_TIME >= trunc(SYSDATE) and substr(BILL_NO,5,1) = #{position}
</select>
<select id="selectCount" resultType="java.lang.Integer">
select count(1) as s from TMS_BILL_TRANSPORT T
LEFT JOIN TMS_QUARTZCENTER Q ON T.QUARTZCENTER_NO = Q.QUARTZCENTER_NO
LEFT JOIN TMS_TRANSPORT_POINT M ON (M.TRANSPORT_POINT_NO = T.CONSIGNEE_NO)
LEFT JOIN TMS_TRANSPORT_POINT N ON (N.TRANSPORT_POINT_NO = T.SHIPER_NO)
where 1=1
<include refid="condition" />
</select>
<select id="selectByPage" resultMap="BaseResultMap"
parameterType="map">
WITH DIC AS
(SELECT LOOKUPCODE, ITEMVALUE, ITEMNAME
FROM
TMS_STANDARD_DTL
WHERE STATUS = 0),
UNLOAD_POINT AS (SELECT T2.TRANSPORT_POINT_NO,T1.UNLOAD_POINT_NAME FROM TMS_UNLOAD_POINT_DTL T2,TMS_UNLOAD_POINT T1 WHERE T1.UNLOAD_POINT_NO = T2.UNLOAD_POINT_NO)
select B.*,
(SELECT ITEMNAME
FROM DIC
WHERE LOOKUPCODE = 'BUSINESS_TYPE' AND ITEMVALUE =
BUSINESS_TYPE) BUSINESS_TYPE_STR,
(SELECT ITEMNAME
FROM DIC
WHERE
LOOKUPCODE = 'CURRENT_BILLSTATUS' AND ITEMVALUE = CURRENT_BILLSTATUS)
CURRENT_BILLSTATUS_STR,
(SELECT ITEMNAME
FROM DIC
WHERE LOOKUPCODE =
'EMERGENCY_DEGREE' AND ITEMVALUE = EMERGENCY_DEGREE)
EMERGENCY_DEGREE_STR,
(SELECT ITEMNAME
FROM DIC
WHERE LOOKUPCODE =
'GOODS_TYPE' AND ITEMVALUE = GOODS_TYPE) GOODS_TYPE_STR,
(SELECT
ITEMNAME
FROM DIC
WHERE LOOKUPCODE = 'PAYMENT_TYPE' AND ITEMVALUE =
PAYMENT_TYPE) PAYMENT_TYPE_STR,
(SELECT ITEMNAME
FROM DIC
WHERE
LOOKUPCODE = 'SETTLEACCOUNTS_TYPE' AND ITEMVALUE =
SETTLEACCOUNTS_TYPE) SETTLEACCOUNTS_TYPE_STR,
(SELECT ITEMNAME
FROM DIC
WHERE LOOKUPCODE = 'CONSIGNMENT_TYPE' AND ITEMVALUE =
CONSIGNMENT_TYPE) CONSIGNMENT_TYPE_STR,
(SELECT ITEMNAME
FROM DIC
WHERE
LOOKUPCODE = 'UNLOAD_TYPE' AND ITEMVALUE = UNLOAD_TYPE)
UNLOAD_TYPE_STR,
(SELECT ITEMNAME
FROM DIC
WHERE LOOKUPCODE = 'INSURED'
AND ITEMVALUE = INSURED) INSURED_STR,
(SELECT ITEMNAME
FROM DIC
WHERE
LOOKUPCODE = 'OPEN_FLAG' AND ITEMVALUE = OPEN_FLAG) OPEN_FLAG_STR,
(SELECT ITEMNAME
FROM DIC
WHERE LOOKUPCODE = 'SECOND_TRANSPORTFLAG' AND
ITEMVALUE = SECOND_TRANSPORTFLAG) SECOND_TRANSPORTFLAG_STR,
(SELECT
ITEMNAME
FROM DIC
WHERE LOOKUPCODE = 'DATA_STATUS' AND ITEMVALUE =
STATUS) STATUS_STR
from (select A.*,rownum rn from( select
T.*,NVL((SELECT M.TRANSPORT_POINT_NAME || '【' || NVL(T5.UNLOAD_POINT_NAME,'未知') || '】' FROM UNLOAD_POINT T5 WHERE M.TRANSPORT_POINT_NO = T5.TRANSPORT_POINT_NO),M.TRANSPORT_POINT_NAME || '【未知】') CONSIGNEE_NO_NAME,
NVL((SELECT N.TRANSPORT_POINT_NAME || '【' || T5.UNLOAD_POINT_NAME || '】' FROM UNLOAD_POINT T5 WHERE N.TRANSPORT_POINT_NO = T5.TRANSPORT_POINT_NO),N.TRANSPORT_POINT_NAME || '【未知】') SHIPER_NO_NAME,
q.quartzcenter_name QUARTZCENTER_NO_NAME,
t.takedelivery_begin_time||'-'||t.takedelivery_end_time takedeliveryTimeStr,
M.TRANSPORT_POINT_NAME CONSIGNEE_NO_STR,N.TRANSPORT_POINT_NAME SHIPER_NO_STR
from TMS_BILL_TRANSPORT T
LEFT JOIN TMS_QUARTZCENTER Q ON T.QUARTZCENTER_NO = Q.QUARTZCENTER_NO
LEFT JOIN TMS_TRANSPORT_POINT M ON (M.TRANSPORT_POINT_NO = T.CONSIGNEE_NO)
LEFT JOIN TMS_TRANSPORT_POINT N ON (N.TRANSPORT_POINT_NO = T.SHIPER_NO)
where t.CURRENT_BILLSTATUS < 90 and 1=1
<include refid="condition" />
<choose>
<when test="orderByField != null and ''!=orderByField">
order by ${orderByField}
<if test="orderByField">
${orderBy},T.BILL_NO
</if>
</when>
<otherwise>ORDER BY T.EDIT_TIME DESC,T.BILL_NO</otherwise>
</choose>
) A where rownum < #{page.endRowNum}) B where rn >
#{page.startRowNum}
</select>
<select id="selectByParams" resultMap="BaseResultMap"
parameterType="map">
select
<include refid="Base_Column_List" />
from TMS_BILL_TRANSPORT T where 1=1
<include refid="condition" />
</select>
<delete id="updateBatchByIds">
update TMS_BILL_TRANSPORT T set T.CURRENT_BILLSTATUS =
#{operatorType},EDITOR = #{editor},EDIT_TIME = SYSDATE where T.BILL_NO
in
<foreach collection="list" index="index" item="id" open="("
close=")" separator=",">
'${id}'
</foreach>
</delete>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from TMS_BILL_TRANSPORT T
where T.BILL_NO = #{billNo,jdbcType=VARCHAR}
</delete>
<delete id="deleteByPrimarayKeyForModel"
parameterType="com.yougou.logistics.tms.common.model.TmsBillTransport">
delete from TMS_BILL_TRANSPORT
where BILL_NO = #{billNo,jdbcType=VARCHAR}
</delete>
<insert id="insert"
parameterType="com.yougou.logistics.tms.common.model.TmsBillTransport">
insert into TMS_BILL_TRANSPORT (BILL_NO, QUARTZCENTER_NO,
BILL_NO_ORIGINAL,
BUSINESS_TYPE, CURRENT_BILLSTATUS, CONSIGNEE_NO,
SHIPER_NO, TRANSPORT_TIME, ARRIVAL_DATE,
TAKEDELIVERY_BEGIN_TIME, TAKEDELIVERY_END_TIME,
TRANSPORT_REQUIREMENTS, EMERGENCY_DEGREE,
GOODS_TYPE, GOODS_DESCRIPTION, TOTAL_BOXCOUNT,
TOTAL_COUNT, TOTAL_CUBAGE, TOTAL_LENGTH,
TOTAL_WIDTH, TOTAL_HEIGHT, TOTAL_WEIGHT,
CONSIGNEE_NAME, CONSIGNEE_TEL, CONSIGNEE_ADDRESS,
CONSIGNEE_ZONE, LOAD_COMPANY, LOAD_CONTACTNAME,
LOAD_CONTACTTEL, LOAD_COMPANYADDRESS, LOAD_COMPANYZONE,
SHIPER_NAME, SHIPER_ID, SHIPER_TEL,
SHIPER_ADDRESS, SHIPER_ZONE, PAYMENT_TYPE,
SETTLEACCOUNTS_TYPE, CONSIGNMENT_TYPE, UNLOAD_TYPE,
INSURED, CONTRACT_NO, DISTANCE,
ORIGINAL_COST, ACTUAL_COST, OPEN_FLAG,
SECOND_TRANSPORTFLAG, SECOND_TRANSPORTSTATUS,
PRINTCOUNTS, REMARKS, CREATOR,
CREATE_TIME, EDITOR, EDIT_TIME,
STATUS,parent_bill_no)
values (#{billNo,jdbcType=VARCHAR}, #{quartzcenterNo,jdbcType=VARCHAR},
#{billNoOriginal,jdbcType=VARCHAR},
#{businessType,jdbcType=VARCHAR}, #{currentBillstatus,jdbcType=DECIMAL},
#{consigneeNo,jdbcType=VARCHAR},
#{shiperNo,jdbcType=VARCHAR}, #{transportTime,jdbcType=TIMESTAMP},
#{arrivalDate,jdbcType=TIMESTAMP},
#{takedeliveryBeginTime,jdbcType=VARCHAR},
#{takedeliveryEndTime,jdbcType=VARCHAR},
#{transportRequirements,jdbcType=VARCHAR},
#{emergencyDegree,jdbcType=DECIMAL},
#{goodsType,jdbcType=DECIMAL}, #{goodsDescription,jdbcType=VARCHAR},
#{totalBoxcount,jdbcType=DECIMAL},
#{totalCount,jdbcType=DECIMAL}, #{totalCubage,jdbcType=DECIMAL}, #{totalLength,jdbcType=DECIMAL},
#{totalWidth,jdbcType=DECIMAL}, #{totalHeight,jdbcType=DECIMAL},
#{totalWeight,jdbcType=DECIMAL},
#{consigneeName,jdbcType=VARCHAR}, #{consigneeTel,jdbcType=VARCHAR},
#{consigneeAddress,jdbcType=VARCHAR},
#{consigneeZone,jdbcType=VARCHAR}, #{loadCompany,jdbcType=VARCHAR},
#{loadContactname,jdbcType=VARCHAR},
#{loadContacttel,jdbcType=VARCHAR},
#{loadCompanyaddress,jdbcType=VARCHAR},
#{loadCompanyzone,jdbcType=VARCHAR},
#{shiperName,jdbcType=VARCHAR}, #{shiperId,jdbcType=VARCHAR}, #{shiperTel,jdbcType=VARCHAR},
#{shiperAddress,jdbcType=VARCHAR}, #{shiperZone,jdbcType=VARCHAR},
#{paymentType,jdbcType=DECIMAL},
#{settleaccountsType,jdbcType=DECIMAL},
#{consignmentType,jdbcType=DECIMAL}, #{unloadType,jdbcType=DECIMAL},
#{insured,jdbcType=DECIMAL}, #{contractNo,jdbcType=VARCHAR},
#{distance,jdbcType=DECIMAL},
#{originalCost,jdbcType=DECIMAL}, #{actualCost,jdbcType=DECIMAL}, #{openFlag,jdbcType=DECIMAL},
#{secondTransportflag,jdbcType=DECIMAL},
#{secondTransportstatus,jdbcType=DECIMAL},
#{printcounts,jdbcType=DECIMAL}, #{remarks,jdbcType=VARCHAR},
#{creator,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{editor,jdbcType=VARCHAR}, #{editTime,jdbcType=TIMESTAMP},
#{status,jdbcType=DECIMAL},#{parentBillNo,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective"
parameterType="com.yougou.logistics.tms.common.model.TmsBillTransport">
insert into TMS_BILL_TRANSPORT
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="billNo != null">
BILL_NO,
</if>
<if test="quartzcenterNo != null">
QUARTZCENTER_NO,
</if>
<if test="billNoOriginal != null">
BILL_NO_ORIGINAL,
</if>
<if test="businessType != null">
BUSINESS_TYPE,
</if>
<if test="currentBillstatus != null">
CURRENT_BILLSTATUS,
</if>
<if test="consigneeNo != null">
CONSIGNEE_NO,
</if>
<if test="shiperNo != null">
SHIPER_NO,
</if>
<if test="transportTime != null">
TRANSPORT_TIME,
</if>
<if test="arrivalDate != null">
ARRIVAL_DATE,
</if>
<if test="takedeliveryBeginTime != null">
TAKEDELIVERY_BEGIN_TIME,
</if>
<if test="takedeliveryEndTime != null">
TAKEDELIVERY_END_TIME,
</if>
<if test="transportRequirements != null">
TRANSPORT_REQUIREMENTS,
</if>
<if test="emergencyDegree != null">
EMERGENCY_DEGREE,
</if>
<if test="goodsType != null">
GOODS_TYPE,
</if>
<if test="goodsDescription != null">
GOODS_DESCRIPTION,
</if>
<if test="totalBoxcount != null">
TOTAL_BOXCOUNT,
</if>
<if test="totalCount != null">
TOTAL_COUNT,
</if>
<if test="totalCubage != null">
TOTAL_CUBAGE,
</if>
<if test="totalLength != null">
TOTAL_LENGTH,
</if>
<if test="totalWidth != null">
TOTAL_WIDTH,
</if>
<if test="totalHeight != null">
TOTAL_HEIGHT,
</if>
<if test="totalWeight != null">
TOTAL_WEIGHT,
</if>
<if test="consigneeName != null">
CONSIGNEE_NAME,
</if>
<if test="consigneeTel != null">
CONSIGNEE_TEL,
</if>
<if test="consigneeAddress != null">
CONSIGNEE_ADDRESS,
</if>
<if test="consigneeZone != null">
CONSIGNEE_ZONE,
</if>
<if test="loadCompany != null">
LOAD_COMPANY,
</if>
<if test="loadContactname != null">
LOAD_CONTACTNAME,
</if>
<if test="loadContacttel != null">
LOAD_CONTACTTEL,
</if>
<if test="loadCompanyaddress != null">
LOAD_COMPANYADDRESS,
</if>
<if test="loadCompanyzone != null">
LOAD_COMPANYZONE,
</if>
<if test="shiperName != null">
SHIPER_NAME,
</if>
<if test="shiperId != null">
SHIPER_ID,
</if>
<if test="shiperTel != null">
SHIPER_TEL,
</if>
<if test="shiperAddress != null">
SHIPER_ADDRESS,
</if>
<if test="shiperZone != null">
SHIPER_ZONE,
</if>
<if test="paymentType != null">
PAYMENT_TYPE,
</if>
<if test="settleaccountsType != null">
SETTLEACCOUNTS_TYPE,
</if>
<if test="consignmentType != null">
CONSIGNMENT_TYPE,
</if>
<if test="unloadType != null">
UNLOAD_TYPE,
</if>
<if test="insured != null">
INSURED,
</if>
<if test="contractNo != null">
CONTRACT_NO,
</if>
<if test="distance != null">
DISTANCE,
</if>
<if test="originalCost != null">
ORIGINAL_COST,
</if>
<if test="actualCost != null">
ACTUAL_COST,
</if>
<if test="openFlag != null">
OPEN_FLAG,
</if>
<if test="secondTransportflag != null">
SECOND_TRANSPORTFLAG,
</if>
<if test="secondTransportstatus != null">
SECOND_TRANSPORTSTATUS,
</if>
<if test="printcounts != null">
PRINTCOUNTS,
</if>
<if test="remarks != null">
REMARKS,
</if>
<if test="creator != null">
CREATOR,
</if>
<if test="createTime != null">
CREATE_TIME,
</if>
<if test="editor != null">
EDITOR,
</if>
<if test="editTime != null">
EDIT_TIME,
</if>
<if test="status != null">
STATUS,
</if>
<if test="parentBillNo != null">
parent_bill_no,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="billNo != null">
#{billNo,jdbcType=VARCHAR},
</if>
<if test="quartzcenterNo != null">
#{quartzcenterNo,jdbcType=VARCHAR},
</if>
<if test="billNoOriginal != null">
#{billNoOriginal,jdbcType=VARCHAR},
</if>
<if test="businessType != null">
#{businessType,jdbcType=VARCHAR},
</if>
<if test="currentBillstatus != null">
#{currentBillstatus,jdbcType=DECIMAL},
</if>
<if test="consigneeNo != null">
#{consigneeNo,jdbcType=VARCHAR},
</if>
<if test="shiperNo != null">
#{shiperNo,jdbcType=VARCHAR},
</if>
<if test="transportTime != null">
#{transportTime,jdbcType=TIMESTAMP},
</if>
<if test="arrivalDate != null">
#{arrivalDate,jdbcType=TIMESTAMP},
</if>
<if test="takedeliveryBeginTime != null">
#{takedeliveryBeginTime,jdbcType=VARCHAR},
</if>
<if test="takedeliveryEndTime != null">
#{takedeliveryEndTime,jdbcType=VARCHAR},
</if>
<if test="transportRequirements != null">
#{transportRequirements,jdbcType=VARCHAR},
</if>
<if test="emergencyDegree != null">
#{emergencyDegree,jdbcType=DECIMAL},
</if>
<if test="goodsType != null">
#{goodsType,jdbcType=DECIMAL},
</if>
<if test="goodsDescription != null">
#{goodsDescription,jdbcType=VARCHAR},
</if>
<if test="totalBoxcount != null">
#{totalBoxcount,jdbcType=DECIMAL},
</if>
<if test="totalCount != null">
#{totalCount,jdbcType=DECIMAL},
</if>
<if test="totalCubage != null">
#{totalCubage,jdbcType=DECIMAL},
</if>
<if test="totalLength != null">
#{totalLength,jdbcType=DECIMAL},
</if>
<if test="totalWidth != null">
#{totalWidth,jdbcType=DECIMAL},
</if>
<if test="totalHeight != null">
#{totalHeight,jdbcType=DECIMAL},
</if>
<if test="totalWeight != null">
#{totalWeight,jdbcType=DECIMAL},
</if>
<if test="consigneeName != null">
#{consigneeName,jdbcType=VARCHAR},
</if>
<if test="consigneeTel != null">
#{consigneeTel,jdbcType=VARCHAR},
</if>
<if test="consigneeAddress != null">
#{consigneeAddress,jdbcType=VARCHAR},
</if>
<if test="consigneeZone != null">
#{consigneeZone,jdbcType=VARCHAR},
</if>
<if test="loadCompany != null">
#{loadCompany,jdbcType=VARCHAR},
</if>
<if test="loadContactname != null">
#{loadContactname,jdbcType=VARCHAR},
</if>
<if test="loadContacttel != null">
#{loadContacttel,jdbcType=VARCHAR},
</if>
<if test="loadCompanyaddress != null">
#{loadCompanyaddress,jdbcType=VARCHAR},
</if>
<if test="loadCompanyzone != null">
#{loadCompanyzone,jdbcType=VARCHAR},
</if>
<if test="shiperName != null">
#{shiperName,jdbcType=VARCHAR},
</if>
<if test="shiperId != null">
#{shiperId,jdbcType=VARCHAR},
</if>
<if test="shiperTel != null">
#{shiperTel,jdbcType=VARCHAR},
</if>
<if test="shiperAddress != null">
#{shiperAddress,jdbcType=VARCHAR},
</if>
<if test="shiperZone != null">
#{shiperZone,jdbcType=VARCHAR},
</if>
<if test="paymentType != null">
#{paymentType,jdbcType=DECIMAL},
</if>
<if test="settleaccountsType != null">
#{settleaccountsType,jdbcType=DECIMAL},
</if>
<if test="consignmentType != null">
#{consignmentType,jdbcType=DECIMAL},
</if>
<if test="unloadType != null">
#{unloadType,jdbcType=DECIMAL},
</if>
<if test="insured != null">
#{insured,jdbcType=DECIMAL},
</if>
<if test="contractNo != null">
#{contractNo,jdbcType=VARCHAR},
</if>
<if test="distance != null">
#{distance,jdbcType=DECIMAL},
</if>
<if test="originalCost != null">
#{originalCost,jdbcType=DECIMAL},
</if>
<if test="actualCost != null">
#{actualCost,jdbcType=DECIMAL},
</if>
<if test="openFlag != null">
#{openFlag,jdbcType=DECIMAL},
</if>
<if test="secondTransportflag != null">
#{secondTransportflag,jdbcType=DECIMAL},
</if>
<if test="secondTransportstatus != null">
#{secondTransportstatus,jdbcType=DECIMAL},
</if>
<if test="printcounts != null">
#{printcounts,jdbcType=DECIMAL},
</if>
<if test="remarks != null">
#{remarks,jdbcType=VARCHAR},
</if>
<if test="creator != null">
#{creator,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="editor != null">
#{editor,jdbcType=VARCHAR},
</if>
<if test="editTime != null">
#{editTime,jdbcType=TIMESTAMP},
</if>
<if test="status != null">
#{status,jdbcType=DECIMAL},
</if>
<if test="parentBillNo != null">
#{parentBillNo,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective"
parameterType="com.yougou.logistics.tms.common.model.TmsBillTransport">
update TMS_BILL_TRANSPORT
<set>
<if test="quartzcenterNo != null">
QUARTZCENTER_NO = #{quartzcenterNo,jdbcType=VARCHAR},
</if>
<if test="billNoOriginal != null">
BILL_NO_ORIGINAL = #{billNoOriginal,jdbcType=VARCHAR},
</if>
<if test="businessType != null">
BUSINESS_TYPE = #{businessType,jdbcType=VARCHAR},
</if>
<if test="currentBillstatus != null">
CURRENT_BILLSTATUS = #{currentBillstatus,jdbcType=DECIMAL},
</if>
<if test="consigneeNo != null">
CONSIGNEE_NO = #{consigneeNo,jdbcType=VARCHAR},
</if>
<if test="shiperNo != null">
SHIPER_NO = #{shiperNo,jdbcType=VARCHAR},
</if>
<if test="transportTime != null">
TRANSPORT_TIME = #{transportTime,jdbcType=TIMESTAMP},
</if>
<if test="arrivalDate != null">
ARRIVAL_DATE = #{arrivalDate,jdbcType=TIMESTAMP},
</if>
<if test="takedeliveryBeginTime != null">
TAKEDELIVERY_BEGIN_TIME = #{takedeliveryBeginTime,jdbcType=VARCHAR},
</if>
<if test="takedeliveryEndTime != null">
TAKEDELIVERY_END_TIME = #{takedeliveryEndTime,jdbcType=VARCHAR},
</if>
<if test="transportRequirements != null">
TRANSPORT_REQUIREMENTS = #{transportRequirements,jdbcType=VARCHAR},
</if>
<if test="emergencyDegree != null">
EMERGENCY_DEGREE = #{emergencyDegree,jdbcType=DECIMAL},
</if>
<if test="goodsType != null">
GOODS_TYPE = #{goodsType,jdbcType=DECIMAL},
</if>
<if test="goodsDescription != null">
GOODS_DESCRIPTION = #{goodsDescription,jdbcType=VARCHAR},
</if>
<if test="totalBoxcount != null">
TOTAL_BOXCOUNT = #{totalBoxcount,jdbcType=DECIMAL},
</if>
<if test="totalCount != null">
TOTAL_COUNT = #{totalCount,jdbcType=DECIMAL},
</if>
<if test="totalCubage != null">
TOTAL_CUBAGE = #{totalCubage,jdbcType=DECIMAL},
</if>
<if test="totalLength != null">
TOTAL_LENGTH = #{totalLength,jdbcType=DECIMAL},
</if>
<if test="totalWidth != null">
TOTAL_WIDTH = #{totalWidth,jdbcType=DECIMAL},
</if>
<if test="totalHeight != null">
TOTAL_HEIGHT = #{totalHeight,jdbcType=DECIMAL},
</if>
<if test="totalWeight != null">
TOTAL_WEIGHT = #{totalWeight,jdbcType=DECIMAL},
</if>
<if test="consigneeName != null">
CONSIGNEE_NAME = #{consigneeName,jdbcType=VARCHAR},
</if>
<if test="consigneeTel != null">
CONSIGNEE_TEL = #{consigneeTel,jdbcType=VARCHAR},
</if>
<if test="consigneeAddress != null">
CONSIGNEE_ADDRESS = #{consigneeAddress,jdbcType=VARCHAR},
</if>
<if test="consigneeZone != null">
CONSIGNEE_ZONE = #{consigneeZone,jdbcType=VARCHAR},
</if>
<if test="loadCompany != null">
LOAD_COMPANY = #{loadCompany,jdbcType=VARCHAR},
</if>
<if test="loadContactname != null">
LOAD_CONTACTNAME = #{loadContactname,jdbcType=VARCHAR},
</if>
<if test="loadContacttel != null">
LOAD_CONTACTTEL = #{loadContacttel,jdbcType=VARCHAR},
</if>
<if test="loadCompanyaddress != null">
LOAD_COMPANYADDRESS = #{loadCompanyaddress,jdbcType=VARCHAR},
</if>
<if test="loadCompanyzone != null">
LOAD_COMPANYZONE = #{loadCompanyzone,jdbcType=VARCHAR},
</if>
<if test="shiperName != null">
SHIPER_NAME = #{shiperName,jdbcType=VARCHAR},
</if>
<if test="shiperId != null">
SHIPER_ID = #{shiperId,jdbcType=VARCHAR},
</if>
<if test="shiperTel != null">
SHIPER_TEL = #{shiperTel,jdbcType=VARCHAR},
</if>
<if test="shiperAddress != null">
SHIPER_ADDRESS = #{shiperAddress,jdbcType=VARCHAR},
</if>
<if test="shiperZone != null">
SHIPER_ZONE = #{shiperZone,jdbcType=VARCHAR},
</if>
<if test="paymentType != null">
PAYMENT_TYPE = #{paymentType,jdbcType=DECIMAL},
</if>
<if test="settleaccountsType != null">
SETTLEACCOUNTS_TYPE = #{settleaccountsType,jdbcType=DECIMAL},
</if>
<if test="consignmentType != null">
CONSIGNMENT_TYPE = #{consignmentType,jdbcType=DECIMAL},
</if>
<if test="unloadType != null">
UNLOAD_TYPE = #{unloadType,jdbcType=DECIMAL},
</if>
<if test="insured != null">
INSURED = #{insured,jdbcType=DECIMAL},
</if>
<if test="contractNo != null">
CONTRACT_NO = #{contractNo,jdbcType=VARCHAR},
</if>
<if test="distance != null">
DISTANCE = #{distance,jdbcType=DECIMAL},
</if>
<if test="originalCost != null">
ORIGINAL_COST = #{originalCost,jdbcType=DECIMAL},
</if>
<if test="actualCost != null">
ACTUAL_COST = #{actualCost,jdbcType=DECIMAL},
</if>
<if test="openFlag != null">
OPEN_FLAG = #{openFlag,jdbcType=DECIMAL},
</if>
<if test="secondTransportflag != null">
SECOND_TRANSPORTFLAG = #{secondTransportflag,jdbcType=DECIMAL},
</if>
<if test="secondTransportstatus != null">
SECOND_TRANSPORTSTATUS = #{secondTransportstatus,jdbcType=DECIMAL},
</if>
<if test="printcounts != null">
PRINTCOUNTS = #{printcounts,jdbcType=DECIMAL},
</if>
<if test="remarks != null">
REMARKS = #{remarks,jdbcType=VARCHAR},
</if>
<if test="creator != null">
CREATOR = #{creator,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="editor != null">
EDITOR = #{editor,jdbcType=VARCHAR},
</if>
<if test="editTime != null">
EDIT_TIME = #{editTime,jdbcType=TIMESTAMP},
</if>
<if test="status != null">
STATUS = #{status,jdbcType=DECIMAL},
</if>
<if test="parentBillNo != null">
parent_bill_no = #{parentBillNo,jdbcType=VARCHAR},
</if>
</set>
where BILL_NO = #{billNo,jdbcType=VARCHAR}
</update>
<update id="update4RecoverySourceBill" parameterType="com.yougou.logistics.tms.common.model.TmsBillTransport">
update TMS_BILL_TRANSPORT
<set>
<if test="quartzcenterNo != null and quartzcenterNo != ''">
QUARTZCENTER_NO = #{quartzcenterNo,jdbcType=VARCHAR},
</if>
<if test="billNoOriginal != null and billNoOriginal != ''">
BILL_NO_ORIGINAL = #{billNoOriginal,jdbcType=VARCHAR},
</if>
<if test="businessType != null and businessType.toString() != ''">
BUSINESS_TYPE = #{businessType,jdbcType=VARCHAR},
</if>
<if test="currentBillstatus != null and currentBillstatus.toString() != ''">
CURRENT_BILLSTATUS = #{currentBillstatus,jdbcType=DECIMAL},
</if>
<if test="consigneeNo != null and consigneeNo != ''">
CONSIGNEE_NO = #{consigneeNo,jdbcType=VARCHAR},
</if>
<if test="shiperNo != null and shiperNo != ''">
SHIPER_NO = #{shiperNo,jdbcType=VARCHAR},
</if>
<if test="transportTime != null and transportTime != ''">
TRANSPORT_TIME = #{transportTime,jdbcType=TIMESTAMP},
</if>
<if test="arrivalDate != null and arrivalDate != ''">
ARRIVAL_DATE = #{arrivalDate,jdbcType=TIMESTAMP},
</if>
<if test="takedeliveryBeginTime != null and takedeliveryBeginTime != ''">
TAKEDELIVERY_BEGIN_TIME = #{takedeliveryBeginTime,jdbcType=VARCHAR},
</if>
<if test="takedeliveryEndTime != null and takedeliveryEndTime != ''">
TAKEDELIVERY_END_TIME = #{takedeliveryEndTime,jdbcType=VARCHAR},
</if>
<if test="transportRequirements != null and transportRequirements != ''">
TRANSPORT_REQUIREMENTS = #{transportRequirements,jdbcType=VARCHAR},
</if>
<if test="emergencyDegree != null and emergencyDegree.toString() != ''">
EMERGENCY_DEGREE = #{emergencyDegree,jdbcType=DECIMAL},
</if>
<if test="goodsType != null and goodsType != ''">
GOODS_TYPE = #{goodsType,jdbcType=DECIMAL},
</if>
<if test="goodsDescription != null and goodsDescription != ''">
GOODS_DESCRIPTION = #{goodsDescription,jdbcType=VARCHAR},
</if>
<if test="totalBoxcount != null and totalBoxcount != ''">
TOTAL_BOXCOUNT = #{totalBoxcount,jdbcType=DECIMAL},
</if>
<if test="totalCount != null and totalCount != ''">
TOTAL_COUNT = #{totalCount,jdbcType=DECIMAL},
</if>
<if test="totalCubage != null and totalCubage != ''">
TOTAL_CUBAGE = #{totalCubage,jdbcType=DECIMAL},
</if>
<if test="totalLength != null and totalLength != ''">
TOTAL_LENGTH = #{totalLength,jdbcType=DECIMAL},
</if>
<if test="totalWidth != null and totalWidth != ''">
TOTAL_WIDTH = #{totalWidth,jdbcType=DECIMAL},
</if>
<if test="totalHeight != null and totalHeight != ''">
TOTAL_HEIGHT = #{totalHeight,jdbcType=DECIMAL},
</if>
<if test="totalWeight != null and totalWeight != ''">
TOTAL_WEIGHT = #{totalWeight,jdbcType=DECIMAL},
</if>
<if test="consigneeName != null and consigneeName != ''">
CONSIGNEE_NAME = #{consigneeName,jdbcType=VARCHAR},
</if>
<if test="consigneeTel != null and consigneeTel != ''">
CONSIGNEE_TEL = #{consigneeTel,jdbcType=VARCHAR},
</if>
<if test="consigneeAddress != null and consigneeAddress != ''">
CONSIGNEE_ADDRESS = #{consigneeAddress,jdbcType=VARCHAR},
</if>
<if test="consigneeZone != null and consigneeZone != ''">
CONSIGNEE_ZONE = #{consigneeZone,jdbcType=VARCHAR},
</if>
<if test="loadCompany != null and loadCompany != ''">
LOAD_COMPANY = #{loadCompany,jdbcType=VARCHAR},
</if>
<if test="loadContactname != null and loadContactname != ''">
LOAD_CONTACTNAME = #{loadContactname,jdbcType=VARCHAR},
</if>
<if test="loadContacttel != null and loadContacttel != ''">
LOAD_CONTACTTEL = #{loadContacttel,jdbcType=VARCHAR},
</if>
<if test="loadCompanyaddress != null and loadCompanyaddress != ''">
LOAD_COMPANYADDRESS = #{loadCompanyaddress,jdbcType=VARCHAR},
</if>
<if test="loadCompanyzone != null and loadCompanyzone != ''">
LOAD_COMPANYZONE = #{loadCompanyzone,jdbcType=VARCHAR},
</if>
<if test="shiperName != null and shiperName != ''">
SHIPER_NAME = #{shiperName,jdbcType=VARCHAR},
</if>
<if test="shiperId != null and shiperId != ''">
SHIPER_ID = #{shiperId,jdbcType=VARCHAR},
</if>
<if test="shiperTel != null and shiperTel != ''">
SHIPER_TEL = #{shiperTel,jdbcType=VARCHAR},
</if>
<if test="shiperAddress != null and shiperAddress != ''">
SHIPER_ADDRESS = #{shiperAddress,jdbcType=VARCHAR},
</if>
<if test="shiperZone != null and shiperZone != ''">
SHIPER_ZONE = #{shiperZone,jdbcType=VARCHAR},
</if>
<if test="paymentType != null and paymentType.toString() != ''">
PAYMENT_TYPE = #{paymentType,jdbcType=DECIMAL},
</if>
<if test="settleaccountsType != null and settleaccountsType.toString() != ''">
SETTLEACCOUNTS_TYPE = #{settleaccountsType,jdbcType=DECIMAL},
</if>
<if test="consignmentType != null and consignmentType.toString() != ''">
CONSIGNMENT_TYPE = #{consignmentType,jdbcType=DECIMAL},
</if>
<if test="unloadType != null and unloadType != ''">
UNLOAD_TYPE = #{unloadType,jdbcType=DECIMAL},
</if>
<if test="insured != null and insured != ''">
INSURED = #{insured,jdbcType=DECIMAL},
</if>
<if test="contractNo != null and contractNo != ''">
CONTRACT_NO = #{contractNo,jdbcType=VARCHAR},
</if>
<if test="distance != null and distance != ''">
DISTANCE = #{distance,jdbcType=DECIMAL},
</if>
<if test="originalCost != null and originalCost != ''">
ORIGINAL_COST = #{originalCost,jdbcType=DECIMAL},
</if>
<if test="actualCost != null and actualCost != ''">
ACTUAL_COST = #{actualCost,jdbcType=DECIMAL},
</if>
<if test="openFlag != null and openFlag.toString() != ''">
OPEN_FLAG = #{openFlag,jdbcType=DECIMAL},
</if>
<if test="secondTransportflag != null and secondTransportflag.toString() != ''">
SECOND_TRANSPORTFLAG = #{secondTransportflag,jdbcType=DECIMAL},
</if>
<if test="secondTransportstatus != null and secondTransportstatus.toString() != ''">
SECOND_TRANSPORTSTATUS = #{secondTransportstatus,jdbcType=DECIMAL},
</if>
<if test="printcounts != null and printcounts != ''">
PRINTCOUNTS = #{printcounts,jdbcType=DECIMAL},
</if>
<if test="remarks != null and remarks != ''">
REMARKS = #{remarks,jdbcType=VARCHAR},
</if>
<if test="creator != null and creator != ''">
CREATOR = #{creator,jdbcType=VARCHAR},
</if>
<if test="createTime != null and createTime != ''">
CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="editor != null and editor != ''">
EDITOR = #{editor,jdbcType=VARCHAR},
</if>
<if test="editTime != null and editTime != ''">
EDIT_TIME = #{editTime,jdbcType=TIMESTAMP},
</if>
<if test="status != null and status != ''">
STATUS = #{status,jdbcType=DECIMAL},
</if>
<if test="parentBillNo != null and parentBillNo != ''">
parent_bill_no = #{parentBillNo,jdbcType=VARCHAR},
</if>
</set>
where BILL_NO = #{billNo,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey"
parameterType="com.yougou.logistics.tms.common.model.TmsBillTransport">
update TMS_BILL_TRANSPORT
set QUARTZCENTER_NO = #{quartzcenterNo,jdbcType=VARCHAR},
BILL_NO_ORIGINAL = #{billNoOriginal,jdbcType=VARCHAR},
BUSINESS_TYPE = #{businessType,jdbcType=VARCHAR},
CURRENT_BILLSTATUS = #{currentBillstatus,jdbcType=DECIMAL},
CONSIGNEE_NO = #{consigneeNo,jdbcType=VARCHAR},
SHIPER_NO = #{shiperNo,jdbcType=VARCHAR},
TRANSPORT_TIME = #{transportTime,jdbcType=TIMESTAMP},
ARRIVAL_DATE = #{arrivalDate,jdbcType=TIMESTAMP},
TAKEDELIVERY_BEGIN_TIME = #{takedeliveryBeginTime,jdbcType=VARCHAR},
TAKEDELIVERY_END_TIME = #{takedeliveryEndTime,jdbcType=VARCHAR},
TRANSPORT_REQUIREMENTS = #{transportRequirements,jdbcType=VARCHAR},
EMERGENCY_DEGREE = #{emergencyDegree,jdbcType=DECIMAL},
GOODS_TYPE = #{goodsType,jdbcType=DECIMAL},
GOODS_DESCRIPTION = #{goodsDescription,jdbcType=VARCHAR},
TOTAL_BOXCOUNT = #{totalBoxcount,jdbcType=DECIMAL},
TOTAL_COUNT = #{totalCount,jdbcType=DECIMAL},
TOTAL_CUBAGE = #{totalCubage,jdbcType=DECIMAL},
TOTAL_LENGTH = #{totalLength,jdbcType=DECIMAL},
TOTAL_WIDTH = #{totalWidth,jdbcType=DECIMAL},
TOTAL_HEIGHT = #{totalHeight,jdbcType=DECIMAL},
TOTAL_WEIGHT = #{totalWeight,jdbcType=DECIMAL},
CONSIGNEE_NAME = #{consigneeName,jdbcType=VARCHAR},
CONSIGNEE_TEL = #{consigneeTel,jdbcType=VARCHAR},
CONSIGNEE_ADDRESS = #{consigneeAddress,jdbcType=VARCHAR},
CONSIGNEE_ZONE = #{consigneeZone,jdbcType=VARCHAR},
LOAD_COMPANY = #{loadCompany,jdbcType=VARCHAR},
LOAD_CONTACTNAME = #{loadContactname,jdbcType=VARCHAR},
LOAD_CONTACTTEL = #{loadContacttel,jdbcType=VARCHAR},
LOAD_COMPANYADDRESS = #{loadCompanyaddress,jdbcType=VARCHAR},
LOAD_COMPANYZONE = #{loadCompanyzone,jdbcType=VARCHAR},
SHIPER_NAME = #{shiperName,jdbcType=VARCHAR},
SHIPER_ID = #{shiperId,jdbcType=VARCHAR},
SHIPER_TEL = #{shiperTel,jdbcType=VARCHAR},
SHIPER_ADDRESS = #{shiperAddress,jdbcType=VARCHAR},
SHIPER_ZONE = #{shiperZone,jdbcType=VARCHAR},
PAYMENT_TYPE = #{paymentType,jdbcType=DECIMAL},
SETTLEACCOUNTS_TYPE = #{settleaccountsType,jdbcType=DECIMAL},
CONSIGNMENT_TYPE = #{consignmentType,jdbcType=DECIMAL},
UNLOAD_TYPE = #{unloadType,jdbcType=DECIMAL},
INSURED = #{insured,jdbcType=DECIMAL},
CONTRACT_NO = #{contractNo,jdbcType=VARCHAR},
DISTANCE = #{distance,jdbcType=DECIMAL},
ORIGINAL_COST = #{originalCost,jdbcType=DECIMAL},
ACTUAL_COST = #{actualCost,jdbcType=DECIMAL},
OPEN_FLAG = #{openFlag,jdbcType=DECIMAL},
SECOND_TRANSPORTFLAG = #{secondTransportflag,jdbcType=DECIMAL},
SECOND_TRANSPORTSTATUS = #{secondTransportstatus,jdbcType=DECIMAL},
PRINTCOUNTS = #{printcounts,jdbcType=DECIMAL},
REMARKS = #{remarks,jdbcType=VARCHAR},
CREATOR = #{creator,jdbcType=VARCHAR},
CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
EDITOR = #{editor,jdbcType=VARCHAR},
EDIT_TIME = #{editTime,jdbcType=TIMESTAMP},
STATUS = #{status,jdbcType=DECIMAL},
parent_bill_no=#{parentBillNo,jdbcType=VARCHAR}
where BILL_NO = #{billNo,jdbcType=VARCHAR}
</update>
<select id="selectTmsBillTransportById" resultMap="BaseResultMap"
parameterType="map">
select nvl(T.Consignee_Name, M.DUTY) as CONSIGNEE_NAME,
nvl(T.Consignee_Tel, M.TELNO) as CONSIGNEE_TEL,nvl (T.SHIPER_NAME,n.DUTY) as SHIPER_NAME ,nvl(T.Shiper_Tel,N.TELNO) as SHIPER_TEL,
Ts.Total_Boxcount as SUB_TOTAL_BOX_COUNT,Ts.Total_Count SUB_TOTAL_COUNT,
T.*,M.TRANSPORT_POINT_NAME CONSIGNEE_NO_NAME,N.TRANSPORT_POINT_NAME SHIPER_NO_NAME,T3.TRUCK_NO TRUCK_NO,
q.quartzcenter_name QUARTZCENTER_NO_NAME,T3.Driver_Name,
t.takedelivery_begin_time||'-'||t.takedelivery_end_time
takedeliveryTimeStr,
(select ld.ITEMNAME from tms_standard_dtl ld where T.business_type =ld.itemvalue and ld.lookupcode = 'BUSINESS_TYPE' ) as BUSINESS_TYPE_STR
,T2.TOTAL_BOXCOUNT as DTL_TOTAL_BOXCOUNT ,T2.TOTAL_COUNT DTL_TOTAL_COUNT from TMS_BILL_TRANSPORT T
LEFT JOIN TMS_QUARTZCENTER Q ON T.QUARTZCENTER_NO = Q.QUARTZCENTER_NO
LEFT JOIN TMS_TRANSPORT_POINT M ON (M.TRANSPORT_POINT_NO = T.CONSIGNEE_NO)
LEFT JOIN TMS_TRANSPORT_POINT N ON (N.TRANSPORT_POINT_NO =
T.SHIPER_NO) left join tms_bill_transport_subbill TS ON(T.BILL_NO=TS.BILL_NO)
,tms_bill_truck_dtl T2, tms_bill_truck T3
where 1 = 1 and T.BILL_NO = T2.bill_no and T2.truck_no=T3.truck_no and T3.status='0'
<include refid="condition" />
</select>
<select id="selectTmsBillTransportByBillNoOriginalBusinessType" resultMap="BaseResultMap">
select <include refid="Base_Column_List"/>
from TMS_BILL_TRANSPORT where
BILL_NO_ORIGINAL= #{billNoOriginal,jdbcType=VARCHAR} and
BUSINESS_TYPE=#{businessType,jdbcType=VARCHAR}
</select>
<update id="updateCurrentBillstatusById">
update TMS_BILL_TRANSPORT set CURRENT_BILLSTATUS=#{currentBillStatus}
where BILL_NO=#{billNo}
</update>
<select id="selectBillAndBillDtlByPrimaryKey" resultMap="TmsBillTransportAndDtlDto"
parameterType="java.lang.String">
select
<include refid="TmsBillTransportAndDtlDto_column" />
from TMS_BILL_TRANSPORT T LEFT JOIN TMS_BILL_TRANSPORT_DTL D ON T.BILL_NO = D.BILL_NO
where T.BILL_NO = #{billNo,jdbcType=VARCHAR}
ORDER BY T.BILL_NO ASC
</select>
<select id="selectTransportAndTranspointPointByBillNoList" resultMap="TmsBillTransportAndTransportPointDto" parameterType="list">
select
<include refid="TmsBillTransportAndTransportPointDto_column" />
from TMS_BILL_TRANSPORT T left join TMS_TRANSPORT_POINT P on T.consignee_no = P.transport_point_no
where T.BILL_NO in
<foreach collection="billNoList" index="index" item="item" open="(" close=")" separator=",">
#{item,jdbcType=VARCHAR}
</foreach>
</select>
</mapper>