cuijian
2025-06-06 35d9446131124e12616c7b6b9dfd79e23d20e1c9
lxzn-module-tms/src/main/java/org/jeecg/modules/tms/mapper/xml/ToolLedgerMapper.xml
@@ -2,4 +2,33 @@
<!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.ToolLedgerMapper">
    <select id="toolLedgerList" resultType="map" parameterType="String">
        select
            t1.id,
            t1.total_count totalCount,
            t1.available_count availableCount,
            t1.lend_count lendCount,
            t1.loss_count lossCount,
            t1.repair_count repairCount,
            t1.sharpening_count sharpeningCount,
            t1.detection_count detectionCount,
            t2.id toolCodeId,
            t2.tool_code toolCode,
            t2.chinese_name chineseName,
            t2.tool_model toolModel,
            t2.sign_code signCode,
            t2.accuracy_class accuracyClass,
            t2.standard_code standardCode,
            t2.standard_level standardLevel,
            t3.position_code positionCode,
            t3.storage_location storageLocation,
            t3.highest_inventory highestInventory,
            t3.lower_inventory lowerInventory,
            t4.item_text applicationType
        from tms_tool_ledger t1
            left join tms_base_tools t2 on t1.tool_id = t2.id
            left join tms_tools_config_property t3 on t3.tool_code = t2.id
            left join (select * from v_sys_dict where dict_code = 'application_type') t4 on t4.item_value = t3.application_type
        ${ew.customSqlSegment}
    </select>
</mapper>