From dfc47094e8ec57dd9229d64be0702658c6065b9d Mon Sep 17 00:00:00 2001 From: qushaowei <qushaowei@163.com> Date: 星期五, 06 六月 2025 15:29:42 +0800 Subject: [PATCH] 备件报废 --- lxzn-module-tms/src/main/java/org/jeecg/modules/tms/mapper/xml/ToolLedgerDetailMapper.xml | 153 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 153 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..9d8a3db 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,156 @@ 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> </mapper> \ No newline at end of file -- Gitblit v1.9.3