廖井涛
2024-01-23 b3e67abc5f7bccfc60f5ea63e81f62c3475ff8b8
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.example.erp.mapper.mm.FinishedGoodsInventoryMapper" >
 
    <resultMap id="selectFinishedGoodsInventory" type="com.example.erp.entity.mm.FinishedGoodsInventory" >
        <id column="id" property="id"/>
        <result column="inventory" property="inventory"/>
        <result column="area" property="area"/>
        <result column="actual_signal_area" property="actualSignalArea"/>
        <result column="quantity_available" property="quantityAvailable"/>
        <result column="warehouse_number" property="warehouseNumber"/>
        <result column="storage_region" property="storageRegion"/>
        <result column="status" property="status"/>
        <result column="enter_storage_time" property="enterStorageTime"/>
        <result column="remark" property="remark"/>
        <result column="update_time" property="updateTime"/>
        <result column="end_time" property="endTime"/>
 
 
            <result column="order_id" property="order.orderId"/>
            <result column="project" property="order.project"/>
            <result column="order_type" property="order.orderType"/>
 
 
            <result column="order_number" property="orderDetail.orderNumber"/>
            <result column="width" property="orderDetail.width"/>
            <result column="height" property="orderDetail.height"/>
            <result column="product_name" property="orderDetail.product.productName"/>
            <result column="product_id" property="orderDetail.product.id"/>
 
 
 
    </resultMap>
    <select id="defaultfinishedGoodsInventory" resultMap="selectFinishedGoodsInventory">
        select od.order_number,
               o.order_id,
               o.project,
               o.order_type,
               od.product_name,
               od.product_id,
               od.width,
               od.height,
               fgi.inventory,
               fgi.quantity_available,
               fgi.actual_signal_area,
               fgi.area,
               fgi.warehouse_number,
               fgi.storage_region,
               fgi.`status`,
               fgi.update_time,
               fgi.enter_storage_time,
               fgi.end_time
        from finished_goods_inventory fgi
                 left join sd.order_detail od on fgi.order_number = od.order_number
                 inner join sd.`order` o on fgi.order_id = o.order_id
 
        order by fgi.id
        limit #{offset},#{pageSize}
        ;
    </select>
</mapper>