Commit 9db64cc0 authored by lixinglin's avatar lixinglin

detail.html

parent e2168ae9
package com.ruoyi.system.VO;
import com.ruoyi.system.domain.*;
import lombok.Data;
import java.util.List;
@Data
public class DevelopmentInfoDetailVO {
DevelopmentInfo developmentInfo;
List<DevelopmentTrafficInfo> trafficInfos;
List<DevelopmentPrimaryEnterpriseInfo> developmentPrimaryEnterpriseInfos;
List<DevelopmentPeripheryInfo> developmentPeripheryInfos;
List<DevelopmentInvestmentDirectionInfo> developmentInvestmentDirectionInfos;
List<DevelopmentIndustryPolicyInfo> developmentIndustryPolicyInfos;
List<DevelopmentIndustryFundInfo> developmentIndustryFundInfos;
}
...@@ -3,16 +3,13 @@ package com.ruoyi.system.controller; ...@@ -3,16 +3,13 @@ package com.ruoyi.system.controller;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import com.ruoyi.system.VO.DevelopmentInfoDetailVO;
import com.ruoyi.system.enums.DevelopmentStatusEnum; import com.ruoyi.system.enums.DevelopmentStatusEnum;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log; import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.DevelopmentInfo; import com.ruoyi.system.domain.DevelopmentInfo;
...@@ -21,6 +18,7 @@ import com.ruoyi.common.core.controller.BaseController; ...@@ -21,6 +18,7 @@ import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.web.method.support.ModelAndViewContainer;
/** /**
* 开发区信息Controller * 开发区信息Controller
...@@ -116,6 +114,15 @@ public class DevelopmentInfoController extends BaseController { ...@@ -116,6 +114,15 @@ public class DevelopmentInfoController extends BaseController {
return toAjax(developmentInfoService.updateDevelopmentInfo(developmentInfo)); return toAjax(developmentInfoService.updateDevelopmentInfo(developmentInfo));
} }
@GetMapping("/detail/{developmentInfoId}")
public String detail(@PathVariable("developmentInfoId") Long developmentInfoId, ModelMap mmap) {
DevelopmentInfoDetailVO developmentInfoDetailVO = developmentInfoService.detail(developmentInfoId);
mmap.put("developmentInfoDetailVO", developmentInfoDetailVO);
return prefix + "/detail";
}
/** /**
* 删除开发区信息 * 删除开发区信息
*/ */
......
package com.ruoyi.system.service; package com.ruoyi.system.service;
import java.util.List; import java.util.List;
import com.ruoyi.system.VO.DevelopmentInfoDetailVO;
import com.ruoyi.system.domain.DevelopmentInfo; import com.ruoyi.system.domain.DevelopmentInfo;
/** /**
* 开发区Service接口 * 开发区Service接口
* *
* @author ruoyi * @author ruoyi
* @date 2023-11-10 * @date 2023-11-10
*/ */
public interface IDevelopmentInfoService public interface IDevelopmentInfoService {
{
/** /**
* 查询开发区 * 查询开发区
* *
* @param id 开发区主键 * @param id 开发区主键
* @return 开发区 * @return 开发区
*/ */
...@@ -21,7 +22,7 @@ public interface IDevelopmentInfoService ...@@ -21,7 +22,7 @@ public interface IDevelopmentInfoService
/** /**
* 查询开发区列表 * 查询开发区列表
* *
* @param developmentInfo 开发区 * @param developmentInfo 开发区
* @return 开发区集合 * @return 开发区集合
*/ */
...@@ -29,7 +30,7 @@ public interface IDevelopmentInfoService ...@@ -29,7 +30,7 @@ public interface IDevelopmentInfoService
/** /**
* 新增开发区 * 新增开发区
* *
* @param developmentInfo 开发区 * @param developmentInfo 开发区
* @return 结果 * @return 结果
*/ */
...@@ -37,7 +38,7 @@ public interface IDevelopmentInfoService ...@@ -37,7 +38,7 @@ public interface IDevelopmentInfoService
/** /**
* 修改开发区 * 修改开发区
* *
* @param developmentInfo 开发区 * @param developmentInfo 开发区
* @return 结果 * @return 结果
*/ */
...@@ -45,7 +46,7 @@ public interface IDevelopmentInfoService ...@@ -45,7 +46,7 @@ public interface IDevelopmentInfoService
/** /**
* 批量删除开发区 * 批量删除开发区
* *
* @param ids 需要删除的开发区主键集合 * @param ids 需要删除的开发区主键集合
* @return 结果 * @return 结果
*/ */
...@@ -53,11 +54,13 @@ public interface IDevelopmentInfoService ...@@ -53,11 +54,13 @@ public interface IDevelopmentInfoService
/** /**
* 删除开发区信息 * 删除开发区信息
* *
* @param id 开发区主键 * @param id 开发区主键
* @return 结果 * @return 结果
*/ */
public int deleteDevelopmentInfoById(Long id); public int deleteDevelopmentInfoById(Long id);
List<DevelopmentInfo> selectExcludeByStatus(DevelopmentInfo developmentInfo); List<DevelopmentInfo> selectExcludeByStatus(DevelopmentInfo developmentInfo);
DevelopmentInfoDetailVO detail(Long developmentInfoId);
} }
...@@ -4,6 +4,7 @@ import java.util.List; ...@@ -4,6 +4,7 @@ import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.VO.DevelopmentInfoDetailVO;
import com.ruoyi.system.domain.*; import com.ruoyi.system.domain.*;
import com.ruoyi.system.enums.*; import com.ruoyi.system.enums.*;
import com.ruoyi.system.mapper.*; import com.ruoyi.system.mapper.*;
...@@ -90,10 +91,10 @@ public class DevelopmentInfoServiceImpl implements IDevelopmentInfoService { ...@@ -90,10 +91,10 @@ public class DevelopmentInfoServiceImpl implements IDevelopmentInfoService {
developmentInfos = developmentInfos.stream().filter(e -> !e.getStatus().equals(DevelopmentStatusEnum.DRAFT.getCode())).collect(Collectors.toList()); developmentInfos = developmentInfos.stream().filter(e -> !e.getStatus().equals(DevelopmentStatusEnum.DRAFT.getCode())).collect(Collectors.toList());
for (DevelopmentInfo info : developmentInfos) { for (DevelopmentInfo info : developmentInfos) {
//自己的置为通过,其他的置为废弃 //自己的置为通过,其他的置为废弃
if(info.getId().equals(id)){ if (info.getId().equals(id)) {
info.setStatus(DevelopmentStatusEnum.AUTHED.getCode()); info.setStatus(DevelopmentStatusEnum.AUTHED.getCode());
developmentInfoMapper.updateDevelopmentInfo(info); developmentInfoMapper.updateDevelopmentInfo(info);
}else{ } else {
info.setStatus(DevelopmentStatusEnum.USELESS.getCode()); info.setStatus(DevelopmentStatusEnum.USELESS.getCode());
info.setReason(DevelopmentStatusEnum.USELESS_REASON.getDescription()); info.setReason(DevelopmentStatusEnum.USELESS_REASON.getDescription());
developmentInfoMapper.updateDevelopmentInfo(info); developmentInfoMapper.updateDevelopmentInfo(info);
...@@ -107,8 +108,7 @@ public class DevelopmentInfoServiceImpl implements IDevelopmentInfoService { ...@@ -107,8 +108,7 @@ public class DevelopmentInfoServiceImpl implements IDevelopmentInfoService {
collection.setCollectId(id); collection.setCollectId(id);
sysCollectionMapper.updateSysCollection(collection); sysCollectionMapper.updateSysCollection(collection);
} }
} } else {
else {
developmentInfoMapper.updateDevelopmentInfo(developmentInfo); developmentInfoMapper.updateDevelopmentInfo(developmentInfo);
} }
} else { } else {
...@@ -143,4 +143,66 @@ public class DevelopmentInfoServiceImpl implements IDevelopmentInfoService { ...@@ -143,4 +143,66 @@ public class DevelopmentInfoServiceImpl implements IDevelopmentInfoService {
public List<DevelopmentInfo> selectExcludeByStatus(DevelopmentInfo developmentInfo) { public List<DevelopmentInfo> selectExcludeByStatus(DevelopmentInfo developmentInfo) {
return developmentInfoMapper.selectExcludeByStatus(developmentInfo); return developmentInfoMapper.selectExcludeByStatus(developmentInfo);
} }
@Autowired
DevelopmentTrafficInfoServiceImpl developmentTrafficInfoService;
@Autowired
DevelopmentPrimaryEnterpriseInfoServiceImpl developmentPrimaryEnterpriseInfoService;
@Autowired
DevelopmentPeripheryInfoServiceImpl peripheryInfoService;
@Autowired
DevelopmentInvestmentDirectionInfoServiceImpl investmentDirectionInfoService;
@Autowired
DevelopmentIndustryPolicyInfoServiceImpl policyInfoService;
@Autowired
DevelopmentIndustryFundInfoServiceImpl fundInfoService;
@Override
public DevelopmentInfoDetailVO detail(Long developmentInfoId) {
DevelopmentInfo developmentInfo = this.selectDevelopmentInfoById(developmentInfoId);
DevelopmentInfoDetailVO developmentInfoDetailVO = new DevelopmentInfoDetailVO();
developmentInfoDetailVO.setDevelopmentInfo(developmentInfo);
DevelopmentTrafficInfo developmentTrafficInfo = new DevelopmentTrafficInfo();
developmentTrafficInfo.setDevelopmentId(developmentInfoId);
List<DevelopmentTrafficInfo> trafficInfos = developmentTrafficInfoService.selectDevelopmentTrafficInfoList(developmentTrafficInfo);
developmentInfoDetailVO.setTrafficInfos(trafficInfos);
DevelopmentPrimaryEnterpriseInfo enterpriseInfo = new DevelopmentPrimaryEnterpriseInfo();
enterpriseInfo.setDevelopmentId(developmentInfoId);
List<DevelopmentPrimaryEnterpriseInfo> developmentPrimaryEnterpriseInfos = developmentPrimaryEnterpriseInfoService.selectDevelopmentPrimaryEnterpriseInfoList(enterpriseInfo);
developmentInfoDetailVO.setDevelopmentPrimaryEnterpriseInfos(developmentPrimaryEnterpriseInfos);
DevelopmentPeripheryInfo developmentPeripheryInfo = new DevelopmentPeripheryInfo();
developmentPeripheryInfo.setDevelopmentId(developmentInfoId);
List<DevelopmentPeripheryInfo> developmentPeripheryInfos = peripheryInfoService.selectDevelopmentPeripheryInfoList(developmentPeripheryInfo);
developmentInfoDetailVO.setDevelopmentPeripheryInfos(developmentPeripheryInfos);
DevelopmentInvestmentDirectionInfo developmentInvestmentDirectionInfo = new DevelopmentInvestmentDirectionInfo();
developmentInvestmentDirectionInfo.setDevelopmentId(developmentInfoId);
List<DevelopmentInvestmentDirectionInfo> developmentInvestmentDirectionInfos = investmentDirectionInfoService.selectDevelopmentInvestmentDirectionInfoList(developmentInvestmentDirectionInfo);
developmentInfoDetailVO.setDevelopmentInvestmentDirectionInfos(developmentInvestmentDirectionInfos);
DevelopmentIndustryPolicyInfo developmentIndustryPolicyInfo = new DevelopmentIndustryPolicyInfo();
developmentIndustryPolicyInfo.setDevelopmentId(developmentInfoId);
List<DevelopmentIndustryPolicyInfo> developmentIndustryPolicyInfos = policyInfoService.selectDevelopmentIndustryPolicyInfoList(developmentIndustryPolicyInfo);
developmentInfoDetailVO.setDevelopmentIndustryPolicyInfos(developmentIndustryPolicyInfos);
DevelopmentIndustryFundInfo developmentIndustryFundInfo = new DevelopmentIndustryFundInfo();
developmentIndustryFundInfo.setDevelopmentId(developmentInfoId);
List<DevelopmentIndustryFundInfo> developmentIndustryFundInfos = fundInfoService.selectDevelopmentIndustryFundInfoList(developmentIndustryFundInfo);
developmentInfoDetailVO.setDevelopmentIndustryFundInfos(developmentIndustryFundInfos);
return developmentInfoDetailVO;
}
} }
...@@ -571,6 +571,7 @@ ...@@ -571,6 +571,7 @@
align: 'center', align: 'center',
formatter: function (value, row, index) { formatter: function (value, row, index) {
var actions = []; var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.modal.openTab(\'详情\',\'/developmentInfo/info/detail/' + row.id + '\')"><i class="fa fa-edit"></i>详情</a> ');
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑开发区信息</a> '); actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑开发区信息</a> ');
actions.push('<a class="btn btn-primary btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.modal.openTab(\'区位交通信息\',\'/developmentInfo/traffic?developmentId=' + row.id + '\')"><i class="fa fa-edit"></i>编辑区位交通信息</a> '); actions.push('<a class="btn btn-primary btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.modal.openTab(\'区位交通信息\',\'/developmentInfo/traffic?developmentId=' + row.id + '\')"><i class="fa fa-edit"></i>编辑区位交通信息</a> ');
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.modal.openTab(\'重点企业信息\',\'/developmentInfo/primaryEnterprise?developmentId=' + row.id + '\')"><i class="fa fa-edit"></i>编辑重点企业信息</a> <br>'); actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.modal.openTab(\'重点企业信息\',\'/developmentInfo/primaryEnterprise?developmentId=' + row.id + '\')"><i class="fa fa-edit"></i>编辑重点企业信息</a> <br>');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment