c9cf715b qiukui

根据构筑物序号与设备名称对设备排序

1 个父辈 b2c7b5be
......@@ -26,9 +26,12 @@ public interface InspectionPointFillGroupMapper extends BaseMapper<InspectionPoi
"\tleft join inspection_fill_choice ifc on ifi.id = ifc.inspection_fill_id ${ew.customSqlSegment}")
List<InspectionPointFillGroupAndFillVO> getList(@Param(Constants.WRAPPER) QueryWrapper<InspectionPointFillGroupAndFillVO> inspectionPointFillGroupAndFillVOQueryWrapper);
@Select("select 'sys_struct_dict' node_type,id,'' parent_id,struct_name title from sys_struct_dict ssd where ssd.depart_id = #{departId}\n" +
"union all\n" +
"select 'equip_info' node_type,ei.id,ssd.id parent_id,ei.equipment_name title from equipment_info ei left join sys_struct_dict ssd on " +
" ei.structures = ssd.id where ssd.depart_id = #{departId}")
@Select("SELECT * FROM\t(\tSELECT 'sys_struct_dict' AS node_type,ssd.id,'' AS parent_id,ssd.struct_name AS title,ssd.sort_num,NULL AS equipment_name\n" +
"\tFROM sys_struct_dict ssd WHERE ssd.depart_id = #{departId}\n" +
"\tUNION ALL SELECT\n" +
"\t\t'equip_info' AS node_type,ei.id,ssd.id AS parent_id,ei.equipment_name AS title,ssd.sort_num,ei.equipment_name -- 用于排序\n" +
"\tFROM equipment_info ei LEFT JOIN sys_struct_dict ssd ON ei.structures = ssd.id \n" +
"\tWHERE ssd.depart_id = #{departId}\n" +
"\t) AS combined_result ORDER BY node_type DESC,sort_num,equipment_name;")
List<InspectionStructEquipVO> getSysStructDictAndEquipInfo(@Param("departId") String departId);
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!