李林
2023-10-07 658d4927d468c47208fd012d9128b09249c07eff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?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.chinaztt.mes.warehouse.mapper.SendBackMapper">
 
    <resultMap id="sendBackDtoMap" type="com.chinaztt.mes.warehouse.dto.SendBackDTO">
        <id property="id" column="id"/>
        <result property="escortDetailId" column="escort_detail_id"/>
        <result property="partNo" column="part_no"/>
        <result property="partName" column="part_name"/>
        <result property="partBatchNo" column="part_batch_no"/>
        <result property="systemNo" column="system_no"/>
        <result property="sendBackQuantity" column="send_back_quantity"/>
        <result property="partUnit" column="part_unit"/>
        <result property="sendBackDate" column="send_back_date"/>
        <result property="isCompany" column="is_company"/>
        <result property="sendBackCompanyDate" column="send_back_company_date"/>
        <result property="sendBackReason" column="send_back_reason"/>
        <result property="sendBackLocationId" column="send_back_location_id"/>
        <result property="sendBackLocationName" column="send_back_location_name"/>
        <result property="status" column="status"/>
    </resultMap>
 
    <select id="getSendBackPage" resultMap="sendBackDtoMap">
        SELECT *
        FROM (SELECT wsb.*,we.escort_no
              FROM warehouse_send_back wsb
                       LEFT JOIN warehouse_escort_detail wed ON wed."id" = wsb.escort_detail_id
                       LEFT JOIN warehouse_escort we ON we."id" = wed.escort_id) E
        <if test="ew.emptyOfWhere == false">
            ${ew.customSqlSegment}
        </if>
    </select>
</mapper>