|
|
@ -48,19 +48,16 @@ public interface OrganizationMapper extends BaseMapperX<OrganizationDO> {
|
|
|
|
.orderByDesc(OrganizationDO::getId));
|
|
|
|
.orderByDesc(OrganizationDO::getId));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Select("SELECT o.id AS organizationId, o.organization_name AS organizationName, o.organization_code AS organizationCode, " +
|
|
|
|
@Select("SELECT o.id AS organizationId, o.organization_name AS organizationName, o.organization_code AS organizationCode, "
|
|
|
|
"d.id AS depotId, d.name AS depotName, d.code AS depotCode, " +
|
|
|
|
+ "d.id AS depotId, d.name AS depotName, d.code AS depotCode, "
|
|
|
|
"c.id AS cabinetId, c.name AS cabinetName, c.code AS cabinetCode " +
|
|
|
|
+ "IFNULL(c.id, '') AS cabinetId, IFNULL(c.name, '') AS cabinetName, IFNULL(c.code, '') AS cabinetCode "
|
|
|
|
"FROM setting_organization o " +
|
|
|
|
+ "FROM setting_organization o "
|
|
|
|
"LEFT JOIN setting_depot d ON o.id = d.organization_id " +
|
|
|
|
+ "LEFT JOIN setting_depot d ON o.id = d.organization_id "
|
|
|
|
"LEFT JOIN setting_depot_cabinet c ON d.id = c.depot_id ")
|
|
|
|
+ "LEFT JOIN setting_depot_cabinet c ON d.id = c.depot_id ")
|
|
|
|
@Results({
|
|
|
|
@Results({ @Result(property = "organizationId", column = "organizationId"),
|
|
|
|
@Result(property = "organizationId", column = "organizationId"),
|
|
|
|
|
|
|
|
@Result(property = "organizationName", column = "organizationName"),
|
|
|
|
@Result(property = "organizationName", column = "organizationName"),
|
|
|
|
@Result(property = "organizationCode", column = "organizationCode"),
|
|
|
|
@Result(property = "organizationCode", column = "organizationCode"),
|
|
|
|
@Result(property = "children", column = "organizationId",javaType = List.class,
|
|
|
|
@Result(property = "children", column = "organizationId",javaType = List.class, many=@Many(select="cn.iocoder.yudao.module.setting.dal.mysql.depot.DepotMapper.getDepotCabinetByOrganization")) })
|
|
|
|
many=@Many(select="cn.iocoder.yudao.module.setting.dal.mysql.depot.DepotMapper.getDepotCabinetByOrganization"))
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
List<OrganizationDepotVO> getOrganizationDepotCabinets();
|
|
|
|
List<OrganizationDepotVO> getOrganizationDepotCabinets();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|