skyouc
2025-05-05 e211113fb94de4b54577fbcf6986bd5297b1e19e
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?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.vincent.rsf.server.manager.mapper.AsnOrderItemMapper">
 
    <select id="resultForMap" resultType="java.util.Map">
        SELECT
            *
        FROM
            (
                SELECT
                    aoi.id,
                    aoi.asn_id,
                    aoi.asn_code,
                    aoi.plat_item_id,
                    aoi.po_detl_id,
                    aoi.po_code,
                    aoi.fields_index,
                    aoi.matnr_id,
                    aoi.matnr_code,
                    aoi.maktx,
                    aoi.anfme,
                    aoi.stock_unit,
                    aoi.pur_qty,
                    aoi.pur_unit,
                    aoi.prod_time,
                    aoi.qty,
                    qii.safe_qty,
                    qii.dis_qty,
                    aoi.splr_code,
                    aoi.splr_batch,
                    aoi.splr_name,
                    aoi.qrcode,
                    aoi.track_code,
                    aoi.barcode,
                    aoi.pack_name,
                    aoi.nty_status,
                    aoi.`status`,
                    CASE
                        aoi.ispt_result
                        WHEN 0 THEN
                            '未检'
                        WHEN 1 THEN
                            '合格'
                        WHEN 2 THEN
                            '不合格'
                        WHEN 3 THEN
                            '待定'
                        WHEN 4 THEN
                            '部分合格'
                        END AS isptResult$,
                    aoi.deleted,
                    aoi.tenant_id,
                    aoi.create_by,
                    aoi.create_time,
                    aoi.update_by,
                    aoi.update_time,
                    aoi.memo
                FROM
                    man_asn_order_item aoi
                        LEFT JOIN man_qly_ispt_item qii ON aoi.id = qii.asn_item_id
            ) t
        ${ew.customSqlSegment}
    </select>
</mapper>