|
|
@@ -1,5 +1,7 @@
|
|
|
package com.goafanti.common.controller;
|
|
|
|
|
|
+
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
@@ -314,7 +316,7 @@ public class WebpageController extends BaseController {
|
|
|
/**
|
|
|
* 服务汇
|
|
|
*/
|
|
|
- @SuppressWarnings("unchecked")
|
|
|
+ @SuppressWarnings("unchecked")
|
|
|
@RequestMapping(value = "/portal/service/serviceIndex", method = RequestMethod.GET)
|
|
|
public ModelAndView portalServiceServiceIndex(HttpServletRequest request, ModelAndView modelview) {
|
|
|
modelview.setViewName("/portal/service/serviceIndex");
|
|
|
@@ -327,8 +329,8 @@ public class WebpageController extends BaseController {
|
|
|
List<News> news = (List<News>) newsService.portalNewsList(5, 1, null, null, null, null, 2).getList();
|
|
|
modelview.addObject("newsList", news);
|
|
|
// 高企服务
|
|
|
- JtBusinessCategory gaoqi = jtBusinessService.getBusinessCategoryByLayerAndName(1, "高企服务");
|
|
|
- JtBusinessCategory gaoqi2 = jtBusinessService.getBusinessCategoryByLayerAndName(2, "高企服务");
|
|
|
+ /*JtBusinessCategory gaoqi = jtBusinessService.getBusinessCategoryByLayerAndName(1, "高新技术企业服务");
|
|
|
+ JtBusinessCategory gaoqi2 = jtBusinessService.getBusinessCategoryByLayerAndName(2, "高新技术企业服务");
|
|
|
if (gaoqi2 != null) {
|
|
|
List<JtBusinessProject> gaoqiList = jtBusinessService.getBusinessProjectByCategoryId(gaoqi2.getId(), 6,
|
|
|
null);
|
|
|
@@ -353,7 +355,7 @@ public class WebpageController extends BaseController {
|
|
|
modelview.addObject("zscqc1", zscqgb);
|
|
|
}
|
|
|
// 企业认证
|
|
|
- JtBusinessCategory qiyerenzheng = jtBusinessService.getBusinessCategoryByLayerAndName(1, "企业认证");
|
|
|
+ JtBusinessCategory qiyerenzheng = jtBusinessService.getBusinessCategoryByLayerAndName(1, "企业资质认定");
|
|
|
if (qiyerenzheng != null) {
|
|
|
List<JtBusinessCategory> qyrzCategories = jtBusinessService
|
|
|
.getBusinessCategoryBySuperId(qiyerenzheng.getId(), 2);
|
|
|
@@ -362,8 +364,8 @@ public class WebpageController extends BaseController {
|
|
|
modelview.addObject("qyrzc1", qiyerenzheng);
|
|
|
}
|
|
|
// 管理体系
|
|
|
- JtBusinessCategory manageSys = jtBusinessService.getBusinessCategoryByLayerAndName(1, "管理体系");
|
|
|
- JtBusinessCategory manageSys2 = jtBusinessService.getBusinessCategoryByLayerAndName(2, "管理体系");
|
|
|
+ JtBusinessCategory manageSys = jtBusinessService.getBusinessCategoryByLayerAndName(1, "管理体系认证");
|
|
|
+ JtBusinessCategory manageSys2 = jtBusinessService.getBusinessCategoryByLayerAndName(2, "管理体系认证");
|
|
|
if (manageSys2 != null) {
|
|
|
List<JtBusinessProject> manageSysPro = jtBusinessService.getBusinessProjectByCategoryId(manageSys2.getId(),
|
|
|
18, null);
|
|
|
@@ -378,7 +380,85 @@ public class WebpageController extends BaseController {
|
|
|
.getBusinessProjectByCategoryId(scienceProject2.getId(), 12, AFTConstants.YES);
|
|
|
modelview.addObject("scienceProjectList", scienceProjects);
|
|
|
modelview.addObject("spc1", scienceProject);
|
|
|
- }
|
|
|
+ }
|
|
|
+ */
|
|
|
+ /*************以下是重新查询的数据********************************/
|
|
|
+ //高企服务
|
|
|
+ JtBusinessCategory gaoqi = jtBusinessService.getBusinessCategoryByLayerAndName(1, "高新技术企业服务");
|
|
|
+ if (gaoqi != null) {
|
|
|
+ List<JtBusinessCategory> scienceProject = jtBusinessService.getCategoryByModule(2);
|
|
|
+ List<JtBusinessProject> gaoqiList = new ArrayList<JtBusinessProject>();
|
|
|
+ for (JtBusinessCategory jtBusinessCategory : scienceProject) {
|
|
|
+ List<JtBusinessProject> list = jtBusinessService.getBusinessProjectByCategoryId(jtBusinessCategory.getId(), 6, null);
|
|
|
+ gaoqiList.addAll(list);
|
|
|
+ }
|
|
|
+ if(gaoqiList.size()>6){
|
|
|
+ gaoqiList.subList(0, 6);
|
|
|
+ }
|
|
|
+ /*List<JtBusinessProject> gaoqiList = jtBusinessService.getBusinessProjectByCategoryId(gaoqi2.getId(), 6, null);*/
|
|
|
+ for (JtBusinessProject project : gaoqiList) {
|
|
|
+ if (project.getMinImgUrl() != null && project.getMinImgUrl().length() <= 0)
|
|
|
+ project.setMinImgUrl(null);
|
|
|
+ //去除数据中的标签
|
|
|
+ if(StringUtils.isNotBlank(project.getIntroduce())){
|
|
|
+ project.setIntroduce(project.getIntroduce().replaceAll("\\<.*?>", ""));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ modelview.addObject("gaoqiList", gaoqiList);
|
|
|
+ modelview.addObject("gqc1", gaoqi);
|
|
|
+ }
|
|
|
+ //企业资质认证
|
|
|
+ JtBusinessCategory qiyerenzheng = jtBusinessService.getBusinessCategoryByLayerAndName(1, "企业资质认定");
|
|
|
+ if (qiyerenzheng != null) {
|
|
|
+ //获得所有下级id
|
|
|
+ List<JtBusinessCategory> xaiji = jtBusinessService.getBusinessCategoryBySuperId(qiyerenzheng.getId(), 10);
|
|
|
+ List<JtBusinessProject> qyrzCategories = new ArrayList<JtBusinessProject>();
|
|
|
+ for (int i = 0; i < xaiji.size(); i++) {
|
|
|
+ List<JtBusinessProject> list = jtBusinessService.getBusinessProjectByCategoryId(xaiji.get(i).getId(), 10, null);
|
|
|
+ qyrzCategories.addAll(list);
|
|
|
+ }
|
|
|
+ if(qyrzCategories.size()>10){
|
|
|
+ qyrzCategories.subList(0, 10);
|
|
|
+ }
|
|
|
+ modelview.addObject("qyrzCategories", qyrzCategories);
|
|
|
+ modelview.addObject("qyrzc1", qiyerenzheng);
|
|
|
+ }
|
|
|
+ //管理体系认证
|
|
|
+ JtBusinessCategory manageSys2 = jtBusinessService.getBusinessCategoryByLayerAndName(1, "管理体系认证");
|
|
|
+ if (manageSys2 != null) {
|
|
|
+ //获得所有下级id
|
|
|
+ List<JtBusinessCategory> xaiji = jtBusinessService.getBusinessCategoryBySuperId(manageSys2.getId(), 10);
|
|
|
+ List<JtBusinessProject> qyrzCategories = new ArrayList<JtBusinessProject>();
|
|
|
+ for (int i = 0; i < xaiji.size(); i++) {
|
|
|
+ List<JtBusinessProject> list = jtBusinessService.getBusinessProjectByCategoryId(xaiji.get(i).getId(), 18, null);
|
|
|
+ qyrzCategories.addAll(list);
|
|
|
+ }
|
|
|
+ if(qyrzCategories.size()>18){
|
|
|
+ qyrzCategories.subList(0, 18);
|
|
|
+ }
|
|
|
+ //List<JtBusinessProject> manageSysPro = jtBusinessService.getBusinessProjectByCategoryId(manageSys2.getId(),18, null);
|
|
|
+ modelview.addObject("manageSystemList", qyrzCategories);
|
|
|
+ modelview.addObject("managerSysc1", manageSys2);
|
|
|
+ }
|
|
|
+
|
|
|
+ //科技项目
|
|
|
+ //获得所有模块为5的科技项目id
|
|
|
+ JtBusinessCategory scienceProject1 = jtBusinessService.getBusinessCategoryByLayerAndName(1, "科技项目");
|
|
|
+ List<JtBusinessCategory> scienceProject = jtBusinessService.getCategoryByModule(5);
|
|
|
+ List<JtBusinessProject> manageSysPro = new ArrayList<JtBusinessProject>();
|
|
|
+ for (JtBusinessCategory jtBusinessCategory : scienceProject) {
|
|
|
+ List<JtBusinessProject> list = jtBusinessService.getBusinessProjectByCategoryId(jtBusinessCategory.getId(), 12, 1);
|
|
|
+ manageSysPro.addAll(list);
|
|
|
+ }
|
|
|
+ if(null != manageSysPro){
|
|
|
+ if(manageSysPro.size()>12){
|
|
|
+ manageSysPro.subList(0, 12);
|
|
|
+ }
|
|
|
+ modelview.addObject("scienceProjectList", manageSysPro);
|
|
|
+ modelview.addObject("spc1", scienceProject1);
|
|
|
+ }
|
|
|
+ /****************************以上是新修改的部分********************************************/
|
|
|
// 咨询师
|
|
|
List<UserIdentityBo> userIdentityBos = userIdentityService.getExperts(8);
|
|
|
// List<consultantListBo>userIdentityBos=userIdentityService.getConsultantList(8);
|
|
|
@@ -400,7 +480,7 @@ public class WebpageController extends BaseController {
|
|
|
public ModelAndView portalServiceServiceDetail(HttpServletRequest request, ModelAndView modelview, String id) {
|
|
|
modelview.setViewName("/portal/service/serviceDetails");
|
|
|
JtBusinessProject jtBusinessProject = jtBusinessService.getBusinessProjectDetail(id);
|
|
|
- if (jtBusinessProject != null) {
|
|
|
+ if (null != jtBusinessProject) {
|
|
|
if (jtBusinessProject.getMaxImgUrl() != null && jtBusinessProject.getMaxImgUrl().length() <= 0)
|
|
|
jtBusinessProject.setMaxImgUrl(null);
|
|
|
}
|