cuijian
2025-06-05 c17e36e49be715a3305c79625187631184278c19
lxzn-module-tms/src/main/java/org/jeecg/modules/tms/mapper/xml/BaseToolsMapper.xml
@@ -71,6 +71,7 @@
    <select id="paraCommonToolList" resultType="org.jeecg.modules.tms.entity.vo.ParaCommonToolVo">
        select
            t.id,
            t.id toolCodeId,
            t.classify_id classifyId,
            t.tool_code toolCode,
            t.sign_code signCode,
@@ -358,6 +359,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 +371,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 +414,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 +454,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 +467,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 != ''">