<?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.WorkshopEntryDetailDao">
  <resultMap id="BaseResultMap" type="com.sy.coinage.workshop.model.WorkshopEntryDetail">
    <id column="id" jdbcType="INTEGER" property="id"/>
    <result column="entry_id" jdbcType="INTEGER" property="entryId"/>
    <result column="type" jdbcType="INTEGER" property="type"/>
    <result column="rfid" jdbcType="VARCHAR" property="rfid"/>
    <result column="serial_number" jdbcType="VARCHAR" property="serialNumber"/>
    <result column="tare_weight" jdbcType="DOUBLE" property="tareWeight"/>
    <result column="gross_weight" jdbcType="DOUBLE" property="grossWeight"/>
    <result column="weightor_id" jdbcType="INTEGER" property="weightorId"/>
    <result column="weightor" jdbcType="VARCHAR" property="weightor"/>
    <result column="weight_time" jdbcType="TIMESTAMP" property="weightTime"/>
    <result column="crown_between_str" jdbcType="VARCHAR" property="crownBetweenStr"/>
      <result column="crown_between" jdbcType="VARCHAR" property="crownBetween"/>
      <result column="qty" jdbcType="INTEGER" property="qty"/>
      <result column="qty_total" jdbcType="INTEGER" property="qtyTotal"/>
      <result column="status" jdbcType="INTEGER" property="status"/>
      <result column="area_id" jdbcType="INTEGER" property="areaId"/>
  </resultMap>
    <sql id="Base_Column_List">
        id
        , entry_id, type, rfid, serial_number, tare_weight, gross_weight, weightor_id, weightor, weight_time, crown_between_str, crown_between, qty, qty_total, status, area_id
    </sql>
    <select id="querylist" resultType="com.sy.coinage.workshop.model.WorkshopEntryDetail">
      SELECT
      rfid_workshop_entry.operator_cn, rfid_workshop_entry.dept,
      rfid_workshop_entry.checker, rfid_workshop_entry.create_time,rfid_workshop_entry.securities,
      rfid_workshop_entry_detail.id,
      rfid_workshop_entry_detail.entry_id,
      rfid_workshop_entry_detail.type,
      rfid_workshop_entry_detail.rfid,
      rfid_workshop_entry_detail.serial_number,
      rfid_workshop_entry_detail.tare_weight,
      rfid_workshop_entry_detail.gross_weight,
      rfid_workshop_entry_detail.weightor_id,
      rfid_workshop_entry_detail.weightor,
      rfid_workshop_entry_detail.crown_between_str,
      rfid_workshop_entry_detail.crown_between,
      rfid_workshop_entry_detail.qty,
      rfid_workshop_entry_detail.qty_total,
      rfid_workshop_entry_detail.`status`,
      rfid_workshop_entry_detail.area_id,
      rfid_workshop_entry_detail.weight_time
      from rfid_workshop_entry_detail
      left join rfid_workshop_entry on rfid_workshop_entry_detail.entry_id =
      rfid_workshop_entry.id
      <if test="ew.emptyOfWhere == false">
        ${ew.customSqlSegment}
      </if>

    </select>

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

</mapper>

