From fb5aa087eaf6a68cf7ea8114beb270551016e7dd Mon Sep 17 00:00:00 2001 From: lyh <925863403@qq.com> Date: 星期二, 29 七月 2025 11:27:45 +0800 Subject: [PATCH] 添加定型指派设备 --- lxzn-module-tms/src/main/java/org/jeecg/modules/tms/mapper/xml/BaseToolsMapper.xml | 228 +++++++++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 189 insertions(+), 39 deletions(-) diff --git a/lxzn-module-tms/src/main/java/org/jeecg/modules/tms/mapper/xml/BaseToolsMapper.xml b/lxzn-module-tms/src/main/java/org/jeecg/modules/tms/mapper/xml/BaseToolsMapper.xml index 6cd55f0..c51a68b 100644 --- a/lxzn-module-tms/src/main/java/org/jeecg/modules/tms/mapper/xml/BaseToolsMapper.xml +++ b/lxzn-module-tms/src/main/java/org/jeecg/modules/tms/mapper/xml/BaseToolsMapper.xml @@ -13,6 +13,7 @@ t.standard_code standardCode, t.tool_model toolModel, t.parama_table_name paramaTableName, + t.tool_picture toolPicture, t1.application_type applicationType, t1.supplier_id supplierId, t1.province_city provinceCity, @@ -59,43 +60,49 @@ t2.adapt_holder adaptHolder, t2.remark, t3.classify_id classifyNum, - t3.type_name classifyName - from tms_base_tools t - left join tms_tools_config_property t1 on t1.tool_code = t.id - left join tms_para_hole_tools t2 on t2.tool_code = t.id - left join tms_tools_classify t3 on t3.id = t.classify_id - ${ew.customSqlSegment} + t3.type_name classifyName, + t4.item_text applicationTypeName + from tms_base_tools t + left join tms_tools_config_property t1 on t1.tool_code = t.id + left join tms_para_hole_tools t2 on t2.tool_code = t.id + left join tms_tools_classify t3 on t3.id = t.classify_id + left join (select * from v_sys_dict where dict_code = 'application_type') t4 on t4.item_value = t1.application_type + ${ew.customSqlSegment} </select> <select id="paraCommonToolList" resultType="org.jeecg.modules.tms.entity.vo.ParaCommonToolVo"> - select - t.id, - t.classify_id classifyId, - t.tool_code toolCode, - t.sign_code signCode, - t.chinese_name chineseName, - t.foreign_language_name foreignLanguageName, - t.standard_level standardLevel, - t.standard_code standardCode, - t.tool_model toolModel, - t.parama_table_name paramaTableName, - t1.application_type applicationType, - t1.supplier_id supplierId, - t1.province_city provinceCity, - t1.position_code positionCode, - t1.storage_location storageLocation, - t1.main_unit mainUnit, - t1.auxiliary_unit auxiliaryUnit, - t1.auxiliary_unit_flag auxiliaryUnitFlag, - t1.price, - t1.lower_inventory lowerInventory, - t1.highest_inventory highestInventory, - t3.classify_id classifyNum, - t3.type_name classifyName - from tms_base_tools t - left join tms_tools_config_property t1 on t1.tool_code = t.id - left join tms_tools_classify t3 on t3.id = t.classify_id - ${ew.customSqlSegment} -</select> + select + t.id, + t.id toolCodeId, + t.classify_id classifyId, + t.tool_code toolCode, + t.sign_code signCode, + t.chinese_name chineseName, + t.foreign_language_name foreignLanguageName, + t.standard_level standardLevel, + t.standard_code standardCode, + t.tool_model toolModel, + t.parama_table_name paramaTableName, + t.tool_picture toolPicture, + t1.application_type applicationType, + t1.supplier_id supplierId, + t1.province_city provinceCity, + t1.position_code positionCode, + t1.storage_location storageLocation, + t1.main_unit mainUnit, + t1.auxiliary_unit auxiliaryUnit, + t1.auxiliary_unit_flag auxiliaryUnitFlag, + t1.price, + t1.lower_inventory lowerInventory, + t1.highest_inventory highestInventory, + t3.classify_id classifyNum, + t3.type_name classifyName, + t4.item_text applicationTypeName + from tms_base_tools t + left join tms_tools_config_property t1 on t1.tool_code = t.id + left join tms_tools_classify t3 on t3.id = t.classify_id + left join (select * from v_sys_dict where dict_code = 'application_type') t4 on t4.item_value = t1.application_type + ${ew.customSqlSegment} + </select> <select id="paraThreadingToolList" resultType="org.jeecg.modules.tms.entity.vo.ParaThreadingToolVo"> SELECT t.id, @@ -108,6 +115,7 @@ t.standard_code standardCode, t.tool_model toolModel, t.parama_table_name paramaTableName, + t.tool_picture toolPicture, t1.application_type applicationType, t1.supplier_id supplierId, t1.province_city provinceCity, @@ -144,12 +152,14 @@ t2.connection_aperture connectionAperture, t2.connecting_keyway connectingKeyway, t3.classify_id classifyNum, - t3.type_name classifyName + t3.type_name classifyName, + t4.item_text applicationTypeName FROM tms_base_tools t LEFT JOIN tms_tools_config_property t1 ON t1.tool_code = t.id LEFT JOIN tms_para_threading_tool t2 ON t2.tool_code = t.id LEFT JOIN tms_tools_classify t3 ON t3.id = t.classify_id + left join (select * from v_sys_dict where dict_code = 'application_type') t4 on t4.item_value = t1.application_type ${ew.customSqlSegment} </select> <select id="paraMillToolList" resultType="org.jeecg.modules.tms.entity.vo.ParaMillToolVo"> @@ -164,6 +174,7 @@ t.standard_code standardCode, t.tool_model toolModel, t.parama_table_name paramaTableName, + t.tool_picture toolPicture, t1.application_type applicationType, t1.supplier_id supplierId, t1.province_city provinceCity, @@ -209,12 +220,14 @@ t2.pitch, t2.recently_diameter recentlyDiameter, t3.classify_id classifyNum, - t3.type_name classifyName + t3.type_name classifyName, + t4.item_text applicationTypeName FROM tms_base_tools t LEFT JOIN tms_tools_config_property t1 ON t1.tool_code = t.id LEFT JOIN tms_para_mill_tool t2 ON t2.tool_code = t.id LEFT JOIN tms_tools_classify t3 ON t3.id = t.classify_id + left join (select * from v_sys_dict where dict_code = 'application_type') t4 on t4.item_value = t1.application_type ${ew.customSqlSegment} </select> <select id="paraTurningToolsList" resultType="org.jeecg.modules.tms.entity.vo.ParaTurningToolsVo"> @@ -229,6 +242,7 @@ t.standard_code standardCode, t.tool_model toolModel, t.parama_table_name paramaTableName, + t.tool_picture toolPicture, t1.application_type applicationType, t1.supplier_id supplierId, t1.province_city provinceCity, @@ -278,12 +292,14 @@ t2.blade_thickness bladeThickness, t2.min_diameter minDiameter, t3.classify_id classifyNum, - t3.type_name classifyName + t3.type_name classifyName, + t4.item_text applicationTypeName FROM tms_base_tools t LEFT JOIN tms_tools_config_property t1 ON t1.tool_code = t.id LEFT JOIN tms_para_turning_tools t2 ON t2.tool_code = t.id LEFT JOIN tms_tools_classify t3 ON t3.id = t.classify_id + left join (select * from v_sys_dict where dict_code = 'application_type') t4 on t4.item_value = t1.application_type ${ew.customSqlSegment} </select> <select id="paraBladeList" resultType="org.jeecg.modules.tms.entity.vo.ParaBladeVo"> @@ -298,6 +314,7 @@ t.standard_code standardCode, t.tool_model toolModel, t.parama_table_name paramaTableName, + t.tool_picture toolPicture, t1.application_type applicationType, t1.supplier_id supplierId, t1.province_city provinceCity, @@ -335,12 +352,145 @@ t2.pitch, t2.min_internal_thread minInternalThread, t3.classify_id classifyNum, - t3.type_name classifyName + t3.type_name classifyName, + t4.item_text applicationTypeName FROM tms_base_tools t LEFT JOIN tms_tools_config_property t1 ON t1.tool_code = t.id LEFT JOIN tms_para_blade t2 ON t2.tool_code = t.id LEFT JOIN tms_tools_classify t3 ON t3.id = t.classify_id + left join (select * from v_sys_dict where dict_code = 'application_type') t4 on t4.item_value = t1.application_type ${ew.customSqlSegment} </select> + + <select id="pageWithLedgerAndConfig" resultType="org.jeecg.modules.tms.entity.vo.StocktakingPoundVo"> + SELECT + t.id, + t.create_time AS createTime, + t.tool_code AS toolCode, + t2.tool_model AS toolModel, + t2.parama_table_name AS paramaTableName, + t.tool_id AS toolId, + 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, + t1.available_count AS availableCount, + t1.total_count AS totalCount, + t3.warehouse_id AS warehouseId, + t4.classify_id AS classifyId, + t3.province_city AS provinceCity, + <!-- 鍔ㄦ�佸瓧娈甸�夋嫨锛屼娇鐢ㄨ〃鍒悕锛堥渶纭繚琛ㄥ凡鍏宠仈锛� --> + <choose> + <when test="ew.paramNameValuePairs.paramaTableName == '1'"> + c.tool_material AS toolMaterial, + c.part_material AS partMaterial + </when> + <when test="ew.paramNameValuePairs.paramaTableName == '2'"> + h.tool_material AS toolMaterial, + h.part_material AS partMaterial + </when> + <when test="ew.paramNameValuePairs.paramaTableName == '3'"> + th.tool_material AS toolMaterial, + th.part_material AS partMaterial + </when> + <when test="ew.paramNameValuePairs.paramaTableName == '4'"> + m.tool_material AS toolMaterial, + m.part_material AS partMaterial + </when> + <when test="ew.paramNameValuePairs.paramaTableName == '5'"> + tr.tool_material AS toolMaterial, + tr.part_material AS partMaterial + </when> + <when test="ew.paramNameValuePairs.paramaTableName == '6'"> + b.tool_material AS toolMaterial, + b.part_material AS partMaterial + </when> + <!-- 榛樿鎯呭喌锛歱aramaTableName 涓虹┖鎴栨湭浼犻�掓椂锛屽叧鑱� tms_para_common_tool 琛� --> + <otherwise> + c.tool_material AS toolMaterial, + c.part_material AS partMaterial + </otherwise> + </choose> + FROM tms_tool_ledger_detail t + left join tms_tool_ledger t1 ON t1.tool_id= t.tool_Code + left join tms_tools_classify t4 on t4.id = t1.classify_id + left join tms_base_tools t2 on t2.id = t.tool_code + left join tms_tools_config_property t3 on t3.tool_code = t.tool_code + + + <!-- 鍔ㄦ�佽〃鍏宠仈锛岀‘淇濇墍鏈夋儏鍐甸兘鏈夊搴旂殑 LEFT JOIN --> + <choose> + <when test="ew.paramNameValuePairs.paramaTableName == '1'"> + LEFT JOIN tms_para_common_tool c ON c.tool_code = t.id + </when> + <when test="ew.paramNameValuePairs.paramaTableName == '2'"> + LEFT JOIN tms_para_hole_tools h ON h.tool_code = t.id + </when> + <when test="ew.paramNameValuePairs.paramaTableName == '3'"> + LEFT JOIN tms_para_threading_tool th ON th.tool_code = t.id + </when> + <when test="ew.paramNameValuePairs.paramaTableName == '4'"> + LEFT JOIN tms_para_mill_tool m ON m.tool_code = t.id + </when> + <when test="ew.paramNameValuePairs.paramaTableName == '5'"> + LEFT JOIN tms_para_turning_tools tr ON tr.tool_code = t.id + </when> + <when test="ew.paramNameValuePairs.paramaTableName == '6'"> + LEFT JOIN tms_para_blade b ON b.tool_code = t.id + </when> + <!-- 榛樿鎯呭喌锛氭坊鍔� LEFT JOIN tms_para_common_tool c --> + <otherwise> + LEFT JOIN tms_para_common_tool c ON c.tool_code = t.id + </otherwise> + </choose> + + <where> + <if test="ew.paramNameValuePairs.toolId != null and ew.paramNameValuePairs.toolId != ''"> + AND t.tool_id LIKE CONCAT('%', #{ew.paramNameValuePairs.toolId}, '%') + </if> + </where> + + ORDER BY t.create_time DESC + </select> + + + <select id="pageWithSharpedAndConfig" resultType="org.jeecg.modules.tms.entity.vo.SharpeeningVo"> + SELECT + t.id, + t.create_time AS createTime, + t.tool_code AS toolCode, + t2.tool_model AS toolModel, + t2.parama_table_name AS paramaTableName, + t.tool_id AS toolId, + 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, + t3.warehouse_id AS warehouseId, + t4.classify_id AS classifyId, + t3.province_city AS provinceCity + FROM tms_tool_ledger_detail t + left join tms_tool_ledger t1 ON t1.tool_id= t.tool_Code + left join tms_tools_classify t4 on t4.id = t1.classify_id + left join tms_base_tools t2 on t2.id = t.tool_code + left join tms_tools_config_property t3 on t3.tool_code = t.tool_code +-- 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 + + + <where> + <if test="ew.paramNameValuePairs.toolId != null and ew.paramNameValuePairs.toolId != ''"> + AND t.tool_id LIKE CONCAT('%', #{ew.paramNameValuePairs.toolId}, '%') + </if> + </where> + + ORDER BY t.create_time DESC + </select> + </mapper> \ No newline at end of file -- Gitblit v1.9.3