|
@@ -12,14 +12,17 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
|
|
|
|
+import com.goafanti.achievement.service.AchievementService;
|
|
|
import com.goafanti.app.bo.ProjectDetailBo;
|
|
import com.goafanti.app.bo.ProjectDetailBo;
|
|
|
import com.goafanti.banners.enums.BannersType;
|
|
import com.goafanti.banners.enums.BannersType;
|
|
|
import com.goafanti.banners.service.BannersService;
|
|
import com.goafanti.banners.service.BannersService;
|
|
|
import com.goafanti.business.service.BusinessProjectService;
|
|
import com.goafanti.business.service.BusinessProjectService;
|
|
|
|
|
+import com.goafanti.common.bo.PolicyEntity;
|
|
|
import com.goafanti.common.bo.Result;
|
|
import com.goafanti.common.bo.Result;
|
|
|
import com.goafanti.common.constant.AFTConstants;
|
|
import com.goafanti.common.constant.AFTConstants;
|
|
|
import com.goafanti.common.constant.ErrorConstants;
|
|
import com.goafanti.common.constant.ErrorConstants;
|
|
|
import com.goafanti.common.controller.BaseController;
|
|
import com.goafanti.common.controller.BaseController;
|
|
|
|
|
+import com.goafanti.common.dao.AchievementMapper;
|
|
|
import com.goafanti.common.model.Banners;
|
|
import com.goafanti.common.model.Banners;
|
|
|
import com.goafanti.common.model.News;
|
|
import com.goafanti.common.model.News;
|
|
|
import com.goafanti.common.utils.StringUtils;
|
|
import com.goafanti.common.utils.StringUtils;
|
|
@@ -36,6 +39,9 @@ public class PortalNewsController extends BaseController {
|
|
|
private BannersService bannersService;
|
|
private BannersService bannersService;
|
|
|
@Resource
|
|
@Resource
|
|
|
private BusinessProjectService businessProjectService;
|
|
private BusinessProjectService businessProjectService;
|
|
|
|
|
+
|
|
|
|
|
+ @Resource
|
|
|
|
|
+ private AchievementService achievementService;
|
|
|
/**
|
|
/**
|
|
|
* 策源地
|
|
* 策源地
|
|
|
*
|
|
*
|
|
@@ -114,9 +120,15 @@ public class PortalNewsController extends BaseController {
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
|
+ *
|
|
|
|
|
+ * type 0-政策 1-新闻
|
|
|
|
|
+ * */
|
|
|
@RequestMapping(value = "/portal/news/newsDetail", method = RequestMethod.GET)
|
|
@RequestMapping(value = "/portal/news/newsDetail", method = RequestMethod.GET)
|
|
|
- public ModelAndView portalHighTechEvaluateIprInfo(HttpServletRequest request, ModelAndView modelview, Long id) {
|
|
|
|
|
|
|
+ public ModelAndView portalHighTechEvaluateIprInfo(HttpServletRequest request, ModelAndView modelview, Long id,Integer type) {
|
|
|
modelview.setViewName("/portal/news/newsDetail");
|
|
modelview.setViewName("/portal/news/newsDetail");
|
|
|
|
|
+ modelview.addObject("type",type);
|
|
|
|
|
+ if(type ==1) {
|
|
|
Pagination<NewsPortalList> newsList = newsService.portalNewsList(6, 1, 5, null, null, null);
|
|
Pagination<NewsPortalList> newsList = newsService.portalNewsList(6, 1, 5, null, null, null);
|
|
|
News newsDetail = newsService.findNewsDetail(id);
|
|
News newsDetail = newsService.findNewsDetail(id);
|
|
|
Object news = newsList.getList().get(0);
|
|
Object news = newsList.getList().get(0);
|
|
@@ -141,7 +153,30 @@ public class PortalNewsController extends BaseController {
|
|
|
}
|
|
}
|
|
|
modelview.addObject("newsDetail", newsDetail);
|
|
modelview.addObject("newsDetail", newsDetail);
|
|
|
modelview.addObject("newsList", newsList.getList());
|
|
modelview.addObject("newsList", newsList.getList());
|
|
|
- modelview.addObject("news", news);
|
|
|
|
|
|
|
+ modelview.addObject("news", news);}
|
|
|
|
|
+ else {
|
|
|
|
|
+ List<PolicyEntity> newsList = achievementService.getIntellectualProperty(6);
|
|
|
|
|
+ PolicyEntity newsDetail = newsService.getPolicyDetail(id+"");
|
|
|
|
|
+ if (null != newsDetail) {
|
|
|
|
|
+
|
|
|
|
|
+ String summary = newsDetail.getSummary();
|
|
|
|
|
+ modelview.addObject("hasHighTech",
|
|
|
|
|
+ summary != null && (summary.indexOf("高新") > -1 || summary.indexOf("高企") > -1));
|
|
|
|
|
+ modelview.addObject("hasPatent",
|
|
|
|
|
+ summary != null && (summary.indexOf("专利") > -1 || summary.indexOf("知识产权") > -1));
|
|
|
|
|
+ modelview.addObject("hasCopyright",
|
|
|
|
|
+ summary != null && (summary.indexOf("软著") > -1 || summary.indexOf("知识产权") > -1));
|
|
|
|
|
+ modelview.addObject("hasTechProj",
|
|
|
|
|
+ summary != null && (summary.indexOf("科技") > -1 || summary.indexOf("项目") > -1));
|
|
|
|
|
+ }
|
|
|
|
|
+ @SuppressWarnings("unchecked")
|
|
|
|
|
+ List<PolicyEntity> la = (List<PolicyEntity>) newsList;
|
|
|
|
|
+
|
|
|
|
|
+ modelview.addObject("newsDetail", newsDetail);
|
|
|
|
|
+ modelview.addObject("newsList", newsList);
|
|
|
|
|
+ if(newsList!=null && newsList.size()>0)
|
|
|
|
|
+ modelview.addObject("news", newsList.get(0));
|
|
|
|
|
+ }
|
|
|
return modelview;
|
|
return modelview;
|
|
|
}
|
|
}
|
|
|
|
|
|