根据构筑物序号与设备名称对设备排序
正在显示
1 个修改的文件
包含
7 行增加
和
4 行删除
... | @@ -26,9 +26,12 @@ public interface InspectionPointFillGroupMapper extends BaseMapper<InspectionPoi | ... | @@ -26,9 +26,12 @@ public interface InspectionPointFillGroupMapper extends BaseMapper<InspectionPoi |
26 | "\tleft join inspection_fill_choice ifc on ifi.id = ifc.inspection_fill_id ${ew.customSqlSegment}") | 26 | "\tleft join inspection_fill_choice ifc on ifi.id = ifc.inspection_fill_id ${ew.customSqlSegment}") |
27 | List<InspectionPointFillGroupAndFillVO> getList(@Param(Constants.WRAPPER) QueryWrapper<InspectionPointFillGroupAndFillVO> inspectionPointFillGroupAndFillVOQueryWrapper); | 27 | List<InspectionPointFillGroupAndFillVO> getList(@Param(Constants.WRAPPER) QueryWrapper<InspectionPointFillGroupAndFillVO> inspectionPointFillGroupAndFillVOQueryWrapper); |
28 | 28 | ||
29 | @Select("select 'sys_struct_dict' node_type,id,'' parent_id,struct_name title from sys_struct_dict ssd where ssd.depart_id = #{departId}\n" + | 29 | @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" + |
30 | "union all\n" + | 30 | "\tFROM sys_struct_dict ssd WHERE ssd.depart_id = #{departId}\n" + |
31 | "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 " + | 31 | "\tUNION ALL SELECT\n" + |
32 | " ei.structures = ssd.id where ssd.depart_id = #{departId}") | 32 | "\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" + |
33 | "\tFROM equipment_info ei LEFT JOIN sys_struct_dict ssd ON ei.structures = ssd.id \n" + | ||
34 | "\tWHERE ssd.depart_id = #{departId}\n" + | ||
35 | "\t) AS combined_result ORDER BY node_type DESC,sort_num,equipment_name;") | ||
33 | List<InspectionStructEquipVO> getSysStructDictAndEquipInfo(@Param("departId") String departId); | 36 | List<InspectionStructEquipVO> getSysStructDictAndEquipInfo(@Param("departId") String departId); |
34 | } | 37 | } | ... | ... |
-
请 注册 或 登录 后发表评论