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;
import java.util.ArrayList;
import java.util.List;
import com.ruoyi.system.VO.DevelopmentInfoDetailVO;
import com.ruoyi.system.enums.DevelopmentStatusEnum;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
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 org.springframework.web.bind.annotation.*;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.DevelopmentInfo;
......@@ -21,6 +18,7 @@ import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.web.method.support.ModelAndViewContainer;
/**
* 开发区信息Controller
......@@ -116,6 +114,15 @@ public class DevelopmentInfoController extends BaseController {
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;
import java.util.List;
import com.ruoyi.system.VO.DevelopmentInfoDetailVO;
import com.ruoyi.system.domain.DevelopmentInfo;
/**
......@@ -9,8 +11,7 @@ import com.ruoyi.system.domain.DevelopmentInfo;
* @author ruoyi
* @date 2023-11-10
*/
public interface IDevelopmentInfoService
{
public interface IDevelopmentInfoService {
/**
* 查询开发区
*
......@@ -60,4 +61,6 @@ public interface IDevelopmentInfoService
public int deleteDevelopmentInfoById(Long id);
List<DevelopmentInfo> selectExcludeByStatus(DevelopmentInfo developmentInfo);
DevelopmentInfoDetailVO detail(Long developmentInfoId);
}
......@@ -4,6 +4,7 @@ import java.util.List;
import java.util.stream.Collectors;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.VO.DevelopmentInfoDetailVO;
import com.ruoyi.system.domain.*;
import com.ruoyi.system.enums.*;
import com.ruoyi.system.mapper.*;
......@@ -90,10 +91,10 @@ public class DevelopmentInfoServiceImpl implements IDevelopmentInfoService {
developmentInfos = developmentInfos.stream().filter(e -> !e.getStatus().equals(DevelopmentStatusEnum.DRAFT.getCode())).collect(Collectors.toList());
for (DevelopmentInfo info : developmentInfos) {
//自己的置为通过,其他的置为废弃
if(info.getId().equals(id)){
if (info.getId().equals(id)) {
info.setStatus(DevelopmentStatusEnum.AUTHED.getCode());
developmentInfoMapper.updateDevelopmentInfo(info);
}else{
} else {
info.setStatus(DevelopmentStatusEnum.USELESS.getCode());
info.setReason(DevelopmentStatusEnum.USELESS_REASON.getDescription());
developmentInfoMapper.updateDevelopmentInfo(info);
......@@ -107,8 +108,7 @@ public class DevelopmentInfoServiceImpl implements IDevelopmentInfoService {
collection.setCollectId(id);
sysCollectionMapper.updateSysCollection(collection);
}
}
else {
} else {
developmentInfoMapper.updateDevelopmentInfo(developmentInfo);
}
} else {
......@@ -143,4 +143,66 @@ public class DevelopmentInfoServiceImpl implements IDevelopmentInfoService {
public List<DevelopmentInfo> selectExcludeByStatus(DevelopmentInfo 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 @@
align: 'center',
formatter: function (value, row, index) {
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-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>');
......
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