Bläddra i källkod

服务商首页修改

anderx 7 år sedan
förälder
incheckning
e312ef31b0

+ 0 - 1
src/main/java/com/goafanti/common/controller/BaseApiController.java

@@ -3,7 +3,6 @@ package com.goafanti.common.controller;
 import java.io.File;
 import java.io.File;
 import java.io.FileOutputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.IOException;
-import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.OutputStream;
 import java.util.ArrayList;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.Iterator;

+ 3 - 0
src/main/java/com/goafanti/common/controller/PortalController.java

@@ -213,4 +213,7 @@ public class PortalController extends BaseController {
 		
 		
 		return modelAndView;
 		return modelAndView;
 	}
 	}
+	
+	
+	
 }
 }

+ 64 - 0
src/main/java/com/goafanti/common/controller/PublicController.java

@@ -6,7 +6,9 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.OutputStream;
 import java.util.Date;
 import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
 import java.util.List;
+import java.util.Map;
 import java.util.UUID;
 import java.util.UUID;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;
@@ -21,6 +23,7 @@ import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 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 com.goafanti.achievement.service.AchievementService;
 import com.goafanti.achievement.service.AchievementService;
 import com.goafanti.business.bo.JtBusinessProjectResult;
 import com.goafanti.business.bo.JtBusinessProjectResult;
@@ -32,6 +35,7 @@ import com.goafanti.comment.service.CommentService;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.enums.UserType;
 import com.goafanti.common.enums.UserType;
+import com.goafanti.common.model.JtBusinessProject;
 import com.goafanti.common.model.JtVoucherDetail;
 import com.goafanti.common.model.JtVoucherDetail;
 import com.goafanti.common.model.User;
 import com.goafanti.common.model.User;
 import com.goafanti.common.service.DistrictGlossoryService;
 import com.goafanti.common.service.DistrictGlossoryService;
@@ -829,4 +833,64 @@ public class PublicController extends BaseController {
 		res.setData(userService.selectOrganizationList(user, pageNo, pageSize));
 		res.setData(userService.selectOrganizationList(user, pageNo, pageSize));
 		return res;
 		return res;
 	}
 	}
+	
+	@SuppressWarnings("unchecked")
+	@RequestMapping(value="/invRegister",method = RequestMethod.GET)
+	@ResponseBody
+	public Result portalActivityDetails(){
+		Result res = new Result();
+		Map<String, Object> map =new HashMap<>();
+		//获得项目抵用券
+		List<JtVoucherListBo> vlist=voucherService.selectActivityVoucher();
+		for (JtVoucherListBo j : vlist) {
+			if (j!=null&&j.getName().length()>12) {
+				j.setName(j.getName().substring(0, 11)+"…");
+			}
+		}
+		map.put("vouchers",vlist);
+		//高企服务
+		List<JtBusinessProject> glist=jtBusinessService.getKJListByIds(2, 0, 2);
+		for (JtBusinessProject j : glist) {
+			if (j.getName().length()>5) {
+				j.setName(j.getName().substring(0, 4)+"…");
+			}
+		}
+		map.put( "gqfw",glist);
+		//随机热门项目
+		Pagination<JtBusinessProjectResult> p=jtBusinessService.getProjects(null,null,null,null, 3,1,null,2,null,1,null,null,null);
+		List<JtBusinessProjectResult> plist=(List<JtBusinessProjectResult>) p.getList();
+		for (JtBusinessProjectResult j : plist) {
+			if (j.getName().length()>8) {
+				j.setName(j.getName().substring(0, 7)+"…");
+			}
+		}
+		map.put("hotProject",plist);
+		//军民融合
+		List<JtBusinessProject> jlist=jtBusinessService.getKJListByIds(3, 0, 3);
+		for (JtBusinessProject j : jlist) {
+			if (j.getName().length()>12) {
+				j.setName(j.getName().substring(0, 11)+"…");
+			}
+		}
+		map.put( "jmrh",jlist);
+		//知识产权
+		List<JtBusinessProject> zlist=jtBusinessService.getKJListByIds(1, 0, 3);
+		for (JtBusinessProject j : zlist) {
+			if (j.getName().length()>8) {
+				j.setName(j.getName().substring(0, 7)+"…");
+			}
+		}
+		map.put( "zscq",zlist);
+		//政府扶持
+		List<JtBusinessProject> zfList=jtBusinessService.getProjectByTag("政府扶持", 4);
+		for (JtBusinessProject j : zlist) {
+			if (j.getName().length()>11) {
+				j.setName(j.getName().substring(0, 10)+"…");
+			}
+		}
+		map.put( "zffc",zfList);
+		
+		
+		return res.data(map);
+	}
 }
 }

+ 1 - 1
src/main/webapp/WEB-INF/views/portal/facilitator.html

@@ -25,8 +25,8 @@
     		</div>
     		</div>
     	</div>
     	</div>
     	<div class="facTab">
     	<div class="facTab">
-    		<span>所有项目</span>
     		<span>主页</span>
     		<span>主页</span>
+    		<span>所有项目</span>
     		<span>点我领币</span>
     		<span>点我领币</span>
     	</div>
     	</div>
     	<div class="facJuan">
     	<div class="facJuan">