<?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.sy.coinage.workshop.dao.WorkshopTransferDetailDao">
  <resultMap id="BaseResultMap" type="com.sy.coinage.workshop.model.WorkshopTransferDetail">
    <id column="id" jdbcType="INTEGER" property="id"/>
    <result column="transfer_id" jdbcType="INTEGER" property="transferId"/>
    <result column="type" jdbcType="INTEGER" property="type"/>
    <result column="rfid" jdbcType="VARCHAR" property="rfid"/>
    <result column="serial_number" jdbcType="VARCHAR" property="serialNumber"/>
    <result column="qty" jdbcType="INTEGER" property="qty"/>
    <result column="qty_total" jdbcType="INTEGER" property="qtyTotal"/>
    <result column="crown_between_str" jdbcType="VARCHAR" property="crownBetweenStr"/>
  </resultMap>
  <sql id="Base_Column_List">
    id
    , transfer_id, type, rfid, serial_number, qty, qty_total, crown_between_str
  </sql>
  <select id="querylist" resultType="com.sy.coinage.workshop.model.WorkshopTransferDetail">
    SELECT
    rfid_workshop_transfer.operator_cn, rfid_workshop_transfer.dept,
    rfid_workshop_transfer.checker, rfid_workshop_transfer.create_time, rfid_workshop_transfer.securities,
    rfid_workshop_transfer_detail.*, rfid_base_info.weight_date, rfid_base_info.weight_time,
    rfid_workshop_transfer.securities,
    rfid_base_info.weightor,
    rfid_base_info.tare_weight,
    rfid_base_info.gross_weight
    from rfid_workshop_transfer_detail
    left join rfid_workshop_transfer on rfid_workshop_transfer_detail.transfer_id =
    rfid_workshop_transfer.id
    left join rfid_base_info on rfid_workshop_transfer_detail.rfid =
    rfid_base_info.rfid
    <if test="ew.emptyOfWhere == false">
      ${ew.customSqlSegment}
    </if>
  </select>

  <!--  <select id="queryPageList" resultType="com.sy.coinage.workshop.vo.WorkshopTransferDetailVO">-->
  <!--    SELECT-->
  <!--    rfid_workshop_transfer_detail.*-->
  <!--    FROM-->
  <!--    rfid_workshop_transfer_detail-->
  <!--    LEFT JOIN-->
  <!--    rfid_workshop_transfer_detail-->
  <!--    ON-->
  <!--    rfid_workshop_transfer_detail.id = rfid_workshop_transfer_detail.id-->
  <!--    <if test="ew.emptyOfWhere == false">-->
  <!--      ${ew.customSqlSegment}-->
  <!--    </if>-->
  <!--  </select>-->

</mapper>

