ShipmentContainerHeaderMapper.xml 3.72 KB
<?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.huaheng.pc.shipment.shipmentContainerHeader.mapper.ShipmentContainerHeaderMapper">
  <resultMap id="BaseResultMap" type="com.huaheng.pc.shipment.shipmentContainerHeader.domain.ShipmentContainerHeader">
    <!--@mbg.generated-->
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="containerCode" jdbcType="VARCHAR" property="containerCode" />
    <result column="warehouseCode" jdbcType="VARCHAR" property="warehouseCode" />
    <result column="containerType" jdbcType="VARCHAR" property="containerType" />
    <result column="enable" jdbcType="INTEGER" property="status" />
    <result column="parent" jdbcType="INTEGER" property="parent" />
    <result column="totalWeight" jdbcType="DECIMAL" property="totalWeight" />
    <result column="totalVolume" jdbcType="DECIMAL" property="totalVolume" />
    <result column="length" jdbcType="DECIMAL" property="length" />
    <result column="width" jdbcType="DECIMAL" property="width" />
    <result column="height" jdbcType="DECIMAL" property="height" />
    <result column="companyCode" jdbcType="VARCHAR" property="companyCode" />
    <result column="totalQty" jdbcType="INTEGER" property="totalQty" />
    <result column="waybillCode" jdbcType="VARCHAR" property="waybillCode" />
    <result column="groupNum" jdbcType="INTEGER" property="groupNum" />
    <result column="groupIndex" jdbcType="INTEGER" property="groupIndex" />
    <result column="taskCreated" jdbcType="INTEGER" property="taskCreated" />
    <result column="oqcBench" jdbcType="VARCHAR" property="oqcBench" />
    <result column="oqcBy" jdbcType="VARCHAR" property="oqcBy" />
    <result column="oqcStartAt" jdbcType="TIMESTAMP" property="oqcStartAt" />
    <result column="oqcEndAt" jdbcType="TIMESTAMP" property="oqcEndAt" />
    <result column="created" jdbcType="TIMESTAMP" property="created" />
    <result column="createdBy" jdbcType="VARCHAR" property="createdBy" />
    <result column="lastUpdated" jdbcType="TIMESTAMP" property="lastUpdated" />
    <result column="lastUpdatedBy" jdbcType="VARCHAR" property="lastUpdatedBy" />
    <result column="version" jdbcType="INTEGER" property="version" />
    <result column="userDef1" jdbcType="VARCHAR" property="userDef1" />
    <result column="userDef2" jdbcType="VARCHAR" property="userDef2" />
    <result column="userDef3" jdbcType="VARCHAR" property="userDef3" />
    <result column="carrierCode" jdbcType="VARCHAR" property="carrierCode" />
    <result column="picUrls" jdbcType="VARCHAR" property="picUrls" />
    <result column="pidIds" jdbcType="VARCHAR" property="pidIds" />
    <result column="actualShipDateTime" jdbcType="TIMESTAMP" property="actualShipDateTime" />
    <result column="systemCreated" jdbcType="INTEGER" property="systemCreated" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--@mbg.generated-->
    id, containerCode, warehouseCode, containerType, `enable`, parent, totalWeight, totalVolume,
    `length`, width, height, totalValue, companyCode, totalQty, waybillCode, groupNum, groupIndex, taskCreated,
    transContCode, oqcBench, oqcBy, oqcStartAt, oqcEndAt, created, createdBy, lastUpdated, lastUpdatedBy, version,
     userDef1, userDef2,userDef3,carrierCode,picUrls, pidIds, actualShipDateTime, systemCreated
  </sql>

  <select id="getShipmentContainerMaxAndMinStatusByShipmentID" resultType="java.util.Map">
        SELECT
          MAX( t.STATUS ) maxStatus,
          MIN( t.STATUS ) minStatus
        FROM
          shipment_container_header t
        WHERE t.id in (select DISTINCT b.shippingContainerId from shipment_container_detail b where b.shipmentId = #{shipmentId})
    </select>

</mapper>