cuilei
2025-06-05 18eb8ad4c66fd8515706e2a910ad50ac8f06ba22
lxzn-module-tms/src/main/java/org/jeecg/modules/tms/mapper/xml/OutboundOrderMapper.xml
@@ -22,4 +22,43 @@
        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,
            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,
            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>