cuilei
2025-06-16 bccc289548278cab5a045c153cb62256493954ce
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
65
66
67
68
69
70
71
72
73
74
<?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="org.jeecg.modules.tms.mapper.OutboundOrderMapper">
 
    <select id="queryPageList" resultType="org.jeecg.modules.tms.entity.OutboundOrder">
        SELECT
            t.id,
            t.out_num outNum,
            t.out_storehouse_type outStorehouseType,
            t.is_return isReturn,
            t.handler,
            t.reviewer,
            t.order_status orderStatus,
            t.out_status outStatus,
            t.audit_date auditDate,
            t.approval_opinion approvalOpinion,
            t.subject_matter subjectMatter,
            t.outbound_time outboundTime,
            t.part_drawing_no partDrawingNo,
            t.part_name partName,
            t.part_material partMaterial,
            t.production_processes_no productionProcessesNo,
            t.batch_code batchCode,
            t.machining_count machiningCount,
            t.equipment_code equipmentCode,
            t.nc_name ncName,
            t.remark,
            t.create_by createBy,
            t.create_time createTime
        FROM tms_outbound_order t
        ${ew.customSqlSegment}
    </select>
    <select id="querySharpenOutboundToolPageList"
            resultType="org.jeecg.modules.tms.entity.vo.SelectOutboundToolVo">
        SELECT
            t1.id,
            t2.id toolLedgerDetailId,
            t1.tool_code toolCode,
            t3.tool_code toolNum,
            t3.accuracy_class accuracyClass,
            t1.tool_id toolId,
            t3.chinese_name toolName,
            t3.tool_model toolModel,
            t2.quantity,
            t2.warehouse_id warehouseId,
            ISNULL(t4.warehouse_id, '') + '/' + ISNULL(t4.warehouse_name, '') warehouseName,
            t2.position_code positionCode
        FROM tms_tool_sharpening t1
        INNER JOIN tms_tool_ledger_detail t2 on t1.tool_id = t2.tool_id
        LEFT JOIN tms_base_tools t3 on t1.tool_code = t3.id
        LEFT JOIN tms_warehouse t4 on t2.warehouse_id = t4.id
        ${ew.customSqlSegment}
    </select>
    <select id="queryBorrowOutboundToolPageList"
            resultType="org.jeecg.modules.tms.entity.vo.SelectOutboundToolVo">
        SELECT
            t.id,
            t.id toolLedgerDetailId,
            t.tool_code toolCode,
            p.tool_code toolNum,
            p.accuracy_class accuracyClass,
            t.tool_id toolId,
            p.chinese_name toolName,
            p.tool_model toolModel,
            t.quantity,
            t.warehouse_id warehouseId,
            ISNULL(q.warehouse_id, '') + '/' + ISNULL(q.warehouse_name, '') warehouseName,
            t.position_code positionCode
        FROM tms_tool_ledger_detail t
        LEFT JOIN tms_base_tools p on t.tool_code = p.id
        LEFT JOIN tms_warehouse q on t.warehouse_id = q.id
        ${ew.customSqlSegment}
    </select>
</mapper>