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
| <?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="cn.iocoder.yudao.module.mes.dal.mysql.wm.itemconsume.MesWmItemConsumeLineMapper">
|
| <!--
| 物料消耗行分页查询(关联 mdm_item + mdm_unit_measure)
| 通过 feedbackId 关联消耗头,再查消耗行
| -->
| <select id="selectPageByFeedbackId" resultType="cn.iocoder.yudao.module.mes.controller.admin.wm.itemconsume.vo.MesWmItemConsumeLineRespVO">
| SELECT
| l.id,
| l.consume_id,
| l.item_id,
| l.quantity,
| l.batch_id,
| l.batch_code,
| l.remark,
| l.create_time,
| i.code AS itemCode,
| i.name AS itemName,
| i.specification AS specification,
| u.name AS unitName
| FROM mes_wm_item_consume_line l
| INNER JOIN mes_wm_item_consume c ON l.consume_id = c.id AND c.deleted = 0
| LEFT JOIN mdm_item i ON l.item_id = i.id AND i.deleted = 0
| LEFT JOIN mdm_unit_measure u ON i.unit_measure_id = u.id AND u.deleted = 0
| WHERE l.deleted = 0
| AND c.feedback_id = #{feedbackId}
| ORDER BY l.id DESC
| </select>
|
| </mapper>
|
|