| | |
| | | |
| | | <!--自定义分页查询--> |
| | | <select id="selectFirmInfoPage" resultType="org.springblade.modules.yw.vo.FirmInfoVO"> |
| | | select yfi.* from yw_firm_info yfi |
| | | where is_deleted = 0 |
| | | select |
| | | yfi.*,bdb.dict_value as categoryName |
| | | from yw_firm_info yfi |
| | | left join blade_dict_biz bdb on bdb.dict_key = yfi.category and bdb.code = 'industry_category' |
| | | where yfi.is_deleted = 0 |
| | | <if test="firmInfo.name!=null and firmInfo.name!=''"> |
| | | and yfi.name like concat('%',#{firmInfo.name},'%') |
| | | </if> |
| | |
| | | select * from yw_ind_park_info where is_deleted = 0 |
| | | </select> |
| | | |
| | | <!--自定义分页查询--> |
| | | <!--详情查询--> |
| | | <select id="getDetail" resultType="org.springblade.modules.yw.vo.IndParkInfoVO"> |
| | | select * from yw_ind_park_info where is_deleted = 0 |
| | | select |
| | | yipi.*,bdb.dict_value as parkLevel |
| | | from yw_ind_park_info yipi |
| | | left join blade_dict_biz bdb on bdb.dict_key = yipi.level and bdb.code = 'ind_park_level' |
| | | where yipi.is_deleted = 0 |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | long count = firmInfoService.count(); |
| | | // 设置企业数量 |
| | | indParkInfoVO.setFirmNum((int) count); |
| | | // 设置行政区划 |
| | | setRegionInfo(indParkInfoVO); |
| | | // 返回 |
| | | return indParkInfoVO; |
| | | } |
| | | |
| | | /** |
| | | * 设置行政区划 |
| | | * @param indParkInfoVO |
| | | */ |
| | | private void setRegionInfo(IndParkInfoVO indParkInfoVO) { |
| | | QueryWrapper<Region> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("ancestors","000000000000,"+indParkInfoVO.getAreaCode()); |
| | | List<Region> list = regionService.list(wrapper); |
| | | if (list.size()>0){ |
| | | Region region = list.get(0); |
| | | indParkInfoVO.setRegionName(region.getProvinceName()+"-"+region.getCityName()); |
| | | } |
| | | } |
| | | } |
| | |
| | | package org.springblade.modules.yw.vo; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springblade.modules.yw.entity.FirmInfo; |
| | | |
| | | @Data |
| | | public class FirmInfoVO extends FirmInfo { |
| | | |
| | | @ApiModelProperty(value = "行业名称") |
| | | private String categoryName; |
| | | } |
| | |
| | | */ |
| | | @ApiModelProperty(value = "企业数量", example = "") |
| | | private Integer firmNum; |
| | | |
| | | /** |
| | | * 园区级别 |
| | | */ |
| | | @ApiModelProperty(value = "园区级别", example = "") |
| | | private String parkLevel; |
| | | |
| | | /** |
| | | * 地市 |
| | | */ |
| | | @ApiModelProperty(value = "地市", example = "") |
| | | private String regionName; |
| | | } |