Houjie
2025-05-28 c3ef5e22767d76a181ac224d919fe436405210d2
lxzn-module-tms/src/main/java/org/jeecg/modules/tms/mapper/xml/BaseToolsMapper.xml
@@ -358,6 +358,7 @@
    <select id="pageWithLedgerAndConfig" resultType="org.jeecg.modules.tms.entity.vo.StocktakingPoundVo">
        SELECT
        DISTINCT
        t.id,
        t.classify_id AS classifyId,
        t.tool_code AS toolCode,
@@ -369,7 +370,7 @@
        t.tool_id AS toolId,
        t1.total_count AS totalCount,
        t1.available_count AS availableCount,
        t4.position_code AS positionCode,
        t3.position_code AS positionCode,
        t3.application_type AS applicationType,
        t3.chinese_name AS chineseName,
        t3.supplier_id AS supplierId,
@@ -412,7 +413,7 @@
        FROM tms_base_tools t
        LEFT JOIN tms_tool_ledger t1 ON t1.tool_id = t.id
        LEFT JOIN tms_tools_config_property t3 ON t3.tool_code = t.id
        LEFT JOIN tms_tool_ledger_detail t4 ON t4.tool_code = t.id
        <!-- 动态表关联,确保所有情况都有对应的 LEFT JOIN -->
        <choose>
@@ -452,7 +453,9 @@
    <select id="pageWithSharpedAndConfig" resultType="org.jeecg.modules.tms.entity.vo.SharpeeningVo">
        SELECT
        DISTINCT
        t.id,
        t.create_time AS createTime,
        t.classify_id AS classifyId,
        t.tool_code AS toolCode,
        t.foreign_language_name AS foreignLanguageName,
@@ -463,19 +466,19 @@
        t.tool_id AS toolId,
        t1.total_count AS totalCount,
        t1.available_count AS availableCount,
        t4.position_code AS positionCode,
        t3.position_code AS positionCode,
        t3.application_type AS applicationType,
        t3.chinese_name AS chineseName,
        t3.supplier_id AS supplierId,
        t3.storage_location AS storageLocation,
        t3.main_unit AS mainUnit,
        t4.warehouse_id AS warehouseId,
        t3.warehouse_id AS warehouseId,
        t3.province_city AS provinceCity
        FROM tms_base_tools t
        LEFT JOIN tms_tool_ledger t1 ON t1.tool_id = t.id
        LEFT JOIN tms_tools_config_property t3 ON t3.tool_code = t.id
        LEFT JOIN tms_tool_ledger_detail t4 ON t4.tool_code = t.id
        <where>
            <if test="ew.paramNameValuePairs.toolCode != null and ew.paramNameValuePairs.toolCode != ''">