src/main/java/org/springblade/modules/yw/controller/IndParkInfoController.java
@@ -118,4 +118,14 @@ return R.data(200, data, data); } /** * 园区基本信息详情查询 */ @GetMapping("/getDetail") @ApiOperationSupport(order = 9) @ApiOperation(value = "详情", notes = "传入indParkInfo") public R getDetail(IndParkInfoEntity indParkInfo) { IndParkInfoVO detail = indParkInfoService.getDetail(indParkInfo); return R.data(detail); } } src/main/java/org/springblade/modules/yw/mapper/IndParkInfoMapper.java
@@ -1,5 +1,6 @@ package org.springblade.modules.yw.mapper; import org.apache.ibatis.annotations.Param; import org.springblade.modules.yw.entity.IndParkInfoEntity; import org.springblade.modules.yw.vo.IndParkInfoVO; import com.baomidou.mybatisplus.core.mapper.BaseMapper; @@ -21,6 +22,12 @@ * @param indParkInfo * @return */ List<IndParkInfoVO> selectIndParkInfoPage(IPage page, IndParkInfoVO indParkInfo); List<IndParkInfoVO> selectIndParkInfoPage(IPage page,@Param("indParkInfo") IndParkInfoVO indParkInfo); /** * 园区基本信息查询 * @param indParkInfo * @return */ IndParkInfoVO getDetail(@Param("indParkInfo") IndParkInfoEntity indParkInfo); } src/main/java/org/springblade/modules/yw/mapper/IndParkInfoMapper.xml
@@ -28,4 +28,9 @@ 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> </mapper> src/main/java/org/springblade/modules/yw/service/IIndParkInfoService.java
@@ -31,4 +31,11 @@ * @return */ String importIndParkInfo(List<IndParkInfoExcel> data, boolean isCovered); /** * 园区基本信息查询(包含企业统计信息) * @param indParkInfo * @return */ IndParkInfoVO getDetail(IndParkInfoEntity indParkInfo); } src/main/java/org/springblade/modules/yw/service/impl/IndParkInfoServiceImpl.java
@@ -8,15 +8,13 @@ import org.springblade.modules.system.service.IRegionService; import org.springblade.modules.yw.entity.IndParkInfoEntity; import org.springblade.modules.yw.excel.IndParkInfoExcel; import org.springblade.modules.yw.service.IFirmInfoService; import org.springblade.modules.yw.vo.IndParkInfoVO; import org.springblade.modules.yw.mapper.IndParkInfoMapper; import org.springblade.modules.yw.service.IIndParkInfoService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.core.metadata.IPage; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; import java.util.Objects; @@ -31,6 +29,9 @@ @Autowired private IRegionService regionService; @Autowired private IFirmInfoService firmInfoService; /** * 自定义分页查询 @@ -109,4 +110,21 @@ } return ""; } /** * 园区基本信息查询(包含企业统计信息) * @param indParkInfo * @return */ @Override public IndParkInfoVO getDetail(IndParkInfoEntity indParkInfo) { // 查询详情信息 IndParkInfoVO indParkInfoVO = baseMapper.getDetail(indParkInfo); // 查询企业的数量 long count = firmInfoService.count(); // 设置企业数量 indParkInfoVO.setFirmNum((int) count); // 返回 return indParkInfoVO; } } src/main/java/org/springblade/modules/yw/vo/IndParkInfoVO.java
@@ -1,23 +1,7 @@ /* * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * Neither the name of the dreamlu.net developer nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * Author: Chill 庄骞 (smallchill@163.com) */ package org.springblade.modules.yw.vo; import io.swagger.annotations.ApiModelProperty; import org.springblade.modules.yw.entity.IndParkInfoEntity; import org.springblade.core.tool.node.INode; import lombok.Data; import lombok.EqualsAndHashCode; @@ -32,4 +16,9 @@ public class IndParkInfoVO extends IndParkInfoEntity { private static final long serialVersionUID = 1L; /** * 企业数量 */ @ApiModelProperty(value = "企业数量", example = "") private Integer firmNum; }