Selaa lähdekoodia

知识产权赚钱页面数据的修改

limin 7 vuotta sitten
vanhempi
commit
ed21b414db

+ 6 - 0
src/main/java/com/goafanti/business/service/JtBusinessService.java

@@ -33,5 +33,11 @@ public interface JtBusinessService {
 	Pagination<MyCollection> myCollectionProject(Integer pageNo, Integer pageSize);
 	List<makeMoneyCategoryListBo> makeMoneyCategoryList();
 	Pagination<MyCollection> recommendedApplication( Integer type,Integer pageNo, Integer pageSize);
+	/**
+	 * 获得某模块的所有业务数据
+	 * @param module
+	 * @return
+	 */
+	List<JtBusinessCategory> getCategoryByModule(Integer module);
 	
 }

+ 5 - 0
src/main/java/com/goafanti/business/service/impl/JtBusinessServiceImpl.java

@@ -427,6 +427,11 @@ public class JtBusinessServiceImpl  extends BaseMybatisDao<JtBusinessProjectMapp
 		if (null!=type)params.put("type", type); 
 		return (Pagination<MyCollection>) findPage("recommendedApplicationList", "recommendedApplicationCount", params, pageNo, pageSize);
 	}
+
+	@Override
+	public List<JtBusinessCategory> getCategoryByModule(Integer module) {
+		return jtBusinessCategoryMapper.getCategoryByModule(module);
+	}
 	
 	
 	

+ 64 - 10
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -1,19 +1,20 @@
 package com.goafanti.common.controller;
 
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Date;
 import java.util.List;
-
+
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
-
+
 import org.apache.commons.lang3.time.DateFormatUtils;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.servlet.ModelAndView;
-
+
 import com.goafanti.achievement.service.AchievementInterestService;
 import com.goafanti.achievement.service.AchievementService;
 import com.goafanti.banners.enums.BannersType;
@@ -315,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");
@@ -328,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);
@@ -354,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);
@@ -363,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);
@@ -379,7 +380,60 @@ 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);
+			}
+			/*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(2, "企业资质认定");
+		if (qiyerenzheng != null) {
+			List<JtBusinessProject> qyrzCategories = jtBusinessService.getBusinessProjectByCategoryId(qiyerenzheng.getId(), 16,null);
+			modelview.addObject("qyrzCategories", qyrzCategories);
+			modelview.addObject("qyrzc1", qiyerenzheng);
+		}
+		//管理体系认证
+		JtBusinessCategory manageSys2 = jtBusinessService.getBusinessCategoryByLayerAndName(2, "管理体系认证");
+		if (manageSys2 != null) {
+			List<JtBusinessProject> manageSysPro = jtBusinessService.getBusinessProjectByCategoryId(manageSys2.getId(),
+					18, null);
+			modelview.addObject("manageSystemList", manageSysPro);
+			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(), 18, null);
+			manageSysPro.addAll(list);
+		}
+		if(null != manageSysPro){
+			modelview.addObject("scienceProjectList", manageSysPro);
+			modelview.addObject("spc1", scienceProject1);
+		}
+		/****************************以上是新修改的部分********************************************/
 		// 咨询师
 		List<UserIdentityBo> userIdentityBos = userIdentityService.getExperts(8);
 		// List<consultantListBo>userIdentityBos=userIdentityService.getConsultantList(8);

+ 2 - 0
src/main/java/com/goafanti/common/dao/JtBusinessCategoryMapper.java

@@ -95,4 +95,6 @@ public interface JtBusinessCategoryMapper {
     
     Integer updateNumberPrefix(JtBusinessCategory jtBusinessCategory);
     
+    List<JtBusinessCategory> getCategoryByModule(Integer module);
+    
 }

+ 6 - 0
src/main/java/com/goafanti/common/mapper/JtBusinessCategoryMapper.xml

@@ -512,4 +512,10 @@ and layer=#{0}
 		module = #{module,jdbcType=INTEGER}
 		where `number` like #{number, jdbcType=VARCHAR}
     </update>
+    
+    <!-- 获得所有指定模块的业务 -->
+    <select id="getCategoryByModule" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    select id, name, summary, number, create_time, super_id, img_url, layer, sort, module
+    from jt_business_category where module = #{module,jdbcType=INTEGER} order by layer,sort
+    </select>
 </mapper>

+ 8 - 8
src/main/webapp/WEB-INF/views/common.html

@@ -83,23 +83,23 @@
 						<img th:src="${portalHost+'/img/index/index_webkit2.png'}" alt="">
 					</span>
 					<p>
-						<a th:href="@{/portal/service/serviceIndex#serviceHigh}">高企服务</a>
-						<a th:href="@{/portal/service/serviceIndex#serviceProject}">科技项目</a>
+						<a th:href="@{/portal/service/serviceIndex#serviceHigh}">高新技术企业服务</a>
 					</p>
 					<p>
-						<a th:href="@{/portal/service/serviceIndex#serviceProperty}">知识产权</a>
-						<a th:href="@{/portal/service/serviceIndex#serviceCustomer}">合作客户</a>
+						<a th:href="@{/portal/service/serviceIndex#serviceAuthentication}">企业资质认定</a>
 					</p>
 					<p>
-						<a th:href="@{/portal/service/serviceIndex#serviceAuthentication}">企业认证</a>
-						<a th:href="@{/portal/service/serviceIndex#serviceAbility}">服务能力</a>
+						<!-- <a th:href="@{/portal/service/serviceIndex#serviceProperty}">知识产权</a> -->
+						<a th:href="@{/portal/service/serviceIndex#serviceProject}">科技项目</a>
+						<a th:href="@{/portal/service/serviceIndex#serviceCustomer}">合作客户</a>
 					</p>
 					<p>
 						<a th:href="@{/portal/service/serviceIndex#serviceAdministration}">管理体系</a>
-						<a th:href="@{/portal/service/serviceIndex#serviceProcess}">服务流程</a>
+						<a th:href="@{/portal/service/serviceIndex#serviceAbility}">服务能力</a>
 					</p>
 					<p>
-						<a th:href="@{/portal/service/serviceIndex#serviceBrand}">品牌通</a>
+						<a th:href="@{/portal/service/serviceIndex#serviceProcess}">服务流程</a>
+						<a th:href="@{/portal/service/serviceIndex#serviceBrand}">品牌通   </a>
 					</p>
 				</li>
 				<li>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/service/serviceIndex.html