From f4343036a4ce588137853eaf8e1ae98901b281b6 Mon Sep 17 00:00:00 2001 From: lyh <925863403@qq.com> Date: 星期三, 06 八月 2025 14:11:34 +0800 Subject: [PATCH] 修改返回值 --- lxzn-module-tms/src/main/java/org/jeecg/modules/tms/mapper/xml/ToolLedgerDetailMapper.xml | 173 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 173 insertions(+), 0 deletions(-) diff --git a/lxzn-module-tms/src/main/java/org/jeecg/modules/tms/mapper/xml/ToolLedgerDetailMapper.xml b/lxzn-module-tms/src/main/java/org/jeecg/modules/tms/mapper/xml/ToolLedgerDetailMapper.xml index c025550..78cb6cf 100644 --- a/lxzn-module-tms/src/main/java/org/jeecg/modules/tms/mapper/xml/ToolLedgerDetailMapper.xml +++ b/lxzn-module-tms/src/main/java/org/jeecg/modules/tms/mapper/xml/ToolLedgerDetailMapper.xml @@ -5,6 +5,7 @@ <select id="queryPageList" resultType="org.jeecg.modules.tms.entity.ToolLedgerDetail"> SELECT t.id, + t.id toolLedgerDetailId, t.tool_code toolCode, p.tool_code toolNum, t.tool_id toolId, @@ -19,4 +20,176 @@ LEFT JOIN tms_warehouse q on t.warehouse_id = q.id ${ew.customSqlSegment} </select> + + <!--<select id="queryToolByStatus" resultType="map" parameterType="String"> + SELECT + t.id, + t.tool_code toolCodeId, + p.tool_code toolCode, + t.tool_id onlyCode, + p.chinese_name chineseName, + p.accuracy_class accuracyClass, + p.tool_model toolModel, + t.quantity, + t.warehouse_id warehouseId, + ISNULL(q.warehouse_id, '') + '/' + ISNULL(q.warehouse_name, '') warehouseName, + t.position_code positionCode, + t2.item_text applicationTypeName + 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 + left join tms_tools_config_property t1 on t1.tool_code = p.id + left join (select * from v_sys_dict where dict_code = 'application_type') t2 on t2.item_value = t1.application_type + ${ew.customSqlSegment} + </select>--> + + <select id="queryLendTool" resultType="map" parameterType="String"> + SELECT + temp.id, + temp.toolCodeId, + temp.toolCode, + temp.onlyCode, + temp.chineseName, + temp.accuracyClass, + temp.toolModel, + temp.quantity, + temp.warehouseId, + temp.warehouseName, + temp.positionCode, + temp.applicationTypeName + FROM + ( + SELECT + t.id, + t.tool_code toolCodeId, + p.tool_code toolCode, + t.tool_id onlyCode, + p.chinese_name chineseName, + p.accuracy_class accuracyClass, + p.tool_model toolModel, + 1 quantity, + t.warehouse_id warehouseId, + ISNULL( q.warehouse_id, '' ) + '/' + ISNULL( q.warehouse_name, '' ) warehouseName, + t.position_code positionCode, + t2.item_text applicationTypeName + 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 + LEFT JOIN tms_tools_config_property t1 ON t1.tool_code = p.id + LEFT JOIN ( SELECT * FROM v_sys_dict WHERE dict_code = 'application_type' ) t2 ON t2.item_value = t1.application_type + ${ew.customSqlSegment} + UNION ALL + ( + SELECT + t.id, + t.tool_code toolCodeId, + p.tool_code toolCode, + t.tool_id onlyCode, + p.chinese_name chineseName, + p.accuracy_class accuracyClass, + p.tool_model toolModel, + t3.lend_count quantity, + t.warehouse_id warehouseId, + ISNULL( q.warehouse_id, '' ) + '/' + ISNULL( q.warehouse_name, '' ) warehouseName, + t.position_code positionCode, + t2.item_text applicationTypeName + FROM + tms_tool_ledger_detail t + LEFT JOIN tms_tool_ledger t3 ON t3.tool_id = t.tool_code + LEFT JOIN tms_base_tools p ON t.tool_code = p.id + LEFT JOIN tms_warehouse q ON t.warehouse_id = q.id + LEFT JOIN tms_tools_config_property t1 ON t1.tool_code = p.id + LEFT JOIN ( SELECT * FROM v_sys_dict WHERE dict_code = 'application_type' ) t2 ON t2.item_value = t1.application_type + WHERE + p.accuracy_class != 1 + AND t3.lend_count != 0 + ) + ) temp + </select> + + <select id="querySharpenTool" resultType="map" parameterType="String"> + SELECT + temp.id, + temp.toolCodeId, + temp.toolCode, + temp.onlyCode, + temp.chineseName, + temp.accuracyClass, + temp.toolModel, + temp.quantity, + temp.warehouseId, + temp.warehouseName, + temp.positionCode, + temp.applicationTypeName + FROM + ( + SELECT + t.id, + t.tool_code toolCodeId, + p.tool_code toolCode, + t.tool_id onlyCode, + p.chinese_name chineseName, + p.accuracy_class accuracyClass, + p.tool_model toolModel, + 1 quantity, + t.warehouse_id warehouseId, + ISNULL( q.warehouse_id, '' ) + '/' + ISNULL( q.warehouse_name, '' ) warehouseName, + t.position_code positionCode, + t2.item_text applicationTypeName + 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 + LEFT JOIN tms_tools_config_property t1 ON t1.tool_code = p.id + LEFT JOIN ( SELECT * FROM v_sys_dict WHERE dict_code = 'application_type' ) t2 ON t2.item_value = t1.application_type + ${ew.customSqlSegment} + UNION ALL + ( + SELECT + t.id, + t.tool_code toolCodeId, + p.tool_code toolCode, + t.tool_id onlyCode, + p.chinese_name chineseName, + p.accuracy_class accuracyClass, + p.tool_model toolModel, + t3.sharpening_count quantity, + t.warehouse_id warehouseId, + ISNULL( q.warehouse_id, '' ) + '/' + ISNULL( q.warehouse_name, '' ) warehouseName, + t.position_code positionCode, + t2.item_text applicationTypeName + FROM + tms_tool_ledger_detail t + LEFT JOIN tms_tool_ledger t3 ON t3.tool_id = t.tool_code + LEFT JOIN tms_base_tools p ON t.tool_code = p.id + LEFT JOIN tms_warehouse q ON t.warehouse_id = q.id + LEFT JOIN tms_tools_config_property t1 ON t1.tool_code = p.id + LEFT JOIN ( SELECT * FROM v_sys_dict WHERE dict_code = 'application_type' ) t2 ON t2.item_value = t1.application_type + WHERE + p.accuracy_class != 1 + AND t3.sharpening_count != 0 + ) + ) temp + </select> + <select id="queryToolLedgerDetailList" resultType="map" parameterType="String"> + SELECT + t1.id, + t1.tool_code toolCodeId, + t2.tool_code toolCode, + t1.tool_id onlyCode, + t2.chinese_name chineseName, + t2.tool_model toolModel, + t1.quantity, + t1.warehouse_id warehouseId, + ISNULL(t3.warehouse_id, '') + '/' + ISNULL(t3.warehouse_name, '') warehouseName, + t1.position_code positionCode, + t5.item_text applicationType + FROM tms_tool_ledger_detail t1 + LEFT JOIN tms_base_tools t2 on t1.tool_code = t2.id + LEFT JOIN tms_warehouse t3 on t1.warehouse_id = t3.id + left join tms_tools_config_property t4 on t4.tool_code = t2.id + left join (select * from v_sys_dict where dict_code ='application_type') t5 on t5.item_value = t4.application_type + ${ew.customSqlSegment} + </select> </mapper> \ No newline at end of file -- Gitblit v1.9.3