Antiloveg 8 years ago
parent
commit
c2b0f69f25

+ 5 - 0
src/main/java/com/goafanti/achievement/service/AchievementService.java

@@ -12,6 +12,7 @@ import com.goafanti.common.model.Achievement;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.demand.bo.DemandAchievementListBo;
 import com.goafanti.portal.bo.AchievementDetailBo;
+import com.goafanti.portal.bo.AchievementPortalDetailBo;
 import com.goafanti.portal.bo.AchievementSearchListBo;
 
 public interface AchievementService {
@@ -58,5 +59,9 @@ public interface AchievementService {
 
 	Pagination<AchievementPartnerListBo> listPartnerAchievement(String ownerId, Integer pNo, Integer pSize);
 
+	AchievementPortalDetailBo findUserPortalAchievementDetail(String id);
+
+	AchievementPortalDetailBo findOrgPortalAchievementDetail(String id);
+
 
 }

+ 12 - 0
src/main/java/com/goafanti/achievement/service/impl/AchievementServiceImpl.java

@@ -47,6 +47,7 @@ import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.demand.bo.DemandAchievementListBo;
 import com.goafanti.portal.bo.AchievementDetailBo;
+import com.goafanti.portal.bo.AchievementPortalDetailBo;
 import com.goafanti.portal.bo.AchievementSearchListBo;
 
 @Service
@@ -477,4 +478,15 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 				params, pNo, pSize);
 	}
 
+
+	@Override
+	public AchievementPortalDetailBo findUserPortalAchievementDetail(String id) {
+		return achievementMapper.findUserPortalAchievementDetail(id);
+	}
+
+	@Override
+	public AchievementPortalDetailBo findOrgPortalAchievementDetail(String id) {
+		return achievementMapper.findOrgPortalAchievementDetail(id);
+	}
+
 }

+ 131 - 61
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -1,177 +1,247 @@
 package com.goafanti.common.controller;
 
+import java.util.Arrays;
+import java.util.List;
+
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.servlet.ModelAndView;
 import org.springframework.web.servlet.view.RedirectView;
 
+import com.goafanti.achievement.service.AchievementService;
 import com.goafanti.admin.service.AdminService;
+import com.goafanti.common.enums.UserType;
 import com.goafanti.common.model.Admin;
 import com.goafanti.common.model.User;
 import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.demand.service.DemandService;
+import com.goafanti.portal.bo.AchievementPortalDetailBo;
+import com.goafanti.portal.bo.DemandPortalDetailBo;
+import com.goafanti.portal.bo.DemandPortalSimilarListBo;
 import com.goafanti.user.service.UserService;
 
-
-
 @Controller
 public class WebpageController extends BaseController {
 	@Resource
-	private UserService userService;
-	
+	private UserService			userService;
+
+	@Resource
+	private AdminService		adminService;
+
+	@Resource
+	private DemandService		demandService;
+
 	@Resource
-	private AdminService adminService;
-	
-	@RequestMapping(value = "user/account/index", method = RequestMethod.GET)
+	private AchievementService	achievementService;
+
+	@RequestMapping(value = "/user/account/index", method = RequestMethod.GET)
 	public ModelAndView index(HttpServletRequest request, ModelAndView modelview) {
-		return userLogin(request,modelview,"/user/account/index");
+		return userLogin(request, modelview, "/user/account/index");
 	}
-	
+
 	@RequestMapping(value = "/user/account/set", method = RequestMethod.GET)
 	public ModelAndView userSet(HttpServletRequest request, ModelAndView modelview) {
-		return userLogin(request,modelview,"/user/account/set");
+		return userLogin(request, modelview, "/user/account/set");
 	}
-	
+
 	@RequestMapping(value = "/user/account/achievement", method = RequestMethod.GET)
 	public ModelAndView userAchievement(HttpServletRequest request, ModelAndView modelview) {
-		return userLogin(request,modelview,"/user/account/achievement");
+		return userLogin(request, modelview, "/user/account/achievement");
 	}
-	
+
 	@RequestMapping(value = "/user/account/demand", method = RequestMethod.GET)
 	public ModelAndView userDemand(HttpServletRequest request, ModelAndView modelview) {
-		return userLogin(request,modelview,"/user/account/demand");
+		return userLogin(request, modelview, "/user/account/demand");
 	}
-	
+
 	@RequestMapping(value = "/user/login", method = RequestMethod.GET)
 	public String userLogin(HttpServletRequest request, ModelAndView modelview) {
 		return "/user/login";
 	}
-	
+
 	@RequestMapping(value = "/user/logout", method = RequestMethod.GET)
 	public String userLogout(HttpServletRequest request, ModelAndView modelview) {
 		TokenManager.logout();
 		return userLogin(request, modelview);
 	}
-	
+
 	@RequestMapping(value = "/user/signIn", method = RequestMethod.GET)
 	public String userSignin(HttpServletRequest request, ModelAndView modelview) {
 		return "/user/signIn";
 	}
-	
+
 	@RequestMapping(value = "/user/certify", method = RequestMethod.GET)
 	public ModelAndView userCertify(HttpServletRequest request, ModelAndView modelview) {
-		return userLogin(request,modelview,"/user/certify");
+		return userLogin(request, modelview, "/user/certify");
 	}
-	
+
 	@RequestMapping(value = "/user/groupCertify", method = RequestMethod.GET)
 	public ModelAndView userGroupCertify(HttpServletRequest request, ModelAndView modelview) {
-		return userLogin(request,modelview,"/user/groupCertify");
+		return userLogin(request, modelview, "/user/groupCertify");
 	}
-	
+
 	@RequestMapping(value = "/user/index", method = RequestMethod.GET)
 	public ModelAndView userIndex(HttpServletRequest request, ModelAndView modelview) {
-		return userLogin(request,modelview,"/user/index");
+		return userLogin(request, modelview, "/user/index");
 	}
-	
+
 	@RequestMapping(value = "/user/subscriberDetail", method = RequestMethod.GET)
 	public ModelAndView userSubscriberDetail(HttpServletRequest request, ModelAndView modelview) {
-		return userLogin(request,modelview,"/user/subscriberDetail");
+		return userLogin(request, modelview, "/user/subscriberDetail");
 	}
-	
+
 	@RequestMapping(value = "/user/account/services", method = RequestMethod.GET)
 	public ModelAndView userServices(HttpServletRequest request, ModelAndView modelview) {
-		return userLogin(request,modelview,"/user/account/services");
-	}
-	
-	/*@RequestMapping(value = "/admin/index", method = RequestMethod.GET)
-	public String adminIndex(HttpServletRequest request, ModelAndView modelview) {
-		return "/admin/index";
-	}*/
-	
+		return userLogin(request, modelview, "/user/account/services");
+	}
+
+	/*
+	 * @RequestMapping(value = "/admin/index", method = RequestMethod.GET)
+	 * public String adminIndex(HttpServletRequest request, ModelAndView
+	 * modelview) { return "/admin/index"; }
+	 */
+
 	@RequestMapping(value = "/admin/login", method = RequestMethod.GET)
 	public String adminLogin(HttpServletRequest request, ModelAndView modelview) {
 		return "/admin/login";
 	}
-	
+
 	@RequestMapping(value = "/admin/demand", method = RequestMethod.GET)
 	public String adminDemand(HttpServletRequest request, ModelAndView modelview) {
 		return "/admin/demand";
 	}
-	
+
 	@RequestMapping(value = "/admin/achievement", method = RequestMethod.GET)
 	public String adminAchievement(HttpServletRequest request, ModelAndView modelview) {
 		return "/admin/achievement";
 	}
-	
+
 	@RequestMapping(value = "/admin/set", method = RequestMethod.GET)
 	public String adminSet(HttpServletRequest request, ModelAndView modelview) {
 		return "/admin/set";
 	}
-	
+
 	@RequestMapping(value = "/admin/userManage", method = RequestMethod.GET)
 	public ModelAndView adminUserManage(HttpServletRequest request, ModelAndView modelview) {
-		return adminToLogin(request,modelview,"/admin/userManage");
+		return adminToLogin(request, modelview, "/admin/userManage");
 	}
-	
+
 	@RequestMapping(value = "/admin/servicesManage/technology", method = RequestMethod.GET)
 	public ModelAndView adminServicesManageTechnology(HttpServletRequest request, ModelAndView modelview) {
-		return adminToLogin(request,modelview,"/admin/servicesManage/technology");
+		return adminToLogin(request, modelview, "/admin/servicesManage/technology");
 	}
-	
+
 	@RequestMapping(value = "/admin/servicesManage/patent", method = RequestMethod.GET)
 	public ModelAndView adminServicesManagePatent(HttpServletRequest request, ModelAndView modelview) {
-		return adminToLogin(request,modelview,"/admin/servicesManage/patent");
+		return adminToLogin(request, modelview, "/admin/servicesManage/patent");
 	}
-	
+
 	@RequestMapping(value = "/admin/servicesManage/contract", method = RequestMethod.GET)
 	public ModelAndView adminServicesManageContract(HttpServletRequest request, ModelAndView modelview) {
-		return adminToLogin(request,modelview,"/admin/servicesManage/contract");
+		return adminToLogin(request, modelview, "/admin/servicesManage/contract");
 	}
-	
+
 	@RequestMapping(value = "/admin/servicesManage/highTech", method = RequestMethod.GET)
 	public ModelAndView adminServicesManageHighTech(HttpServletRequest request, ModelAndView modelview) {
-		return adminToLogin(request,modelview,"/admin/servicesManage/highTech");
+		return adminToLogin(request, modelview, "/admin/servicesManage/highTech");
 	}
-	
+
 	@RequestMapping(value = "/admin/servicesManage/highTechInfo", method = RequestMethod.GET)
 	public ModelAndView adminServicesManageHighTechInfo(HttpServletRequest request, ModelAndView modelview) {
-		return adminToLogin(request,modelview,"/admin/servicesManage/highTechInfo");
+		return adminToLogin(request, modelview, "/admin/servicesManage/highTechInfo");
 	}
-	
+
 	@RequestMapping(value = "/admin/servicesManage/copyright", method = RequestMethod.GET)
 	public ModelAndView adminServicesManageCopyright(HttpServletRequest request, ModelAndView modelview) {
-		return adminToLogin(request,modelview,"/admin/servicesManage/copyright");
+		return adminToLogin(request, modelview, "/admin/servicesManage/copyright");
 	}
-	
+
 	@RequestMapping(value = "/admin/index", method = RequestMethod.GET)
 	public ModelAndView adminHome(HttpServletRequest request, ModelAndView modelview) {
-		return adminToLogin(request,modelview,"/admin/index");
+		return adminToLogin(request, modelview, "/admin/index");
 	}
-	
+
 	@RequestMapping(value = "/portal/search/achievement", method = RequestMethod.GET)
 	public ModelAndView portalSearchAchievement(HttpServletRequest request, ModelAndView modelview) {
 		modelview.setViewName("/portal/search/achievement");
 		return modelview;
 	}
-	
+
 	@RequestMapping(value = "/portal/search/demand", method = RequestMethod.GET)
 	public ModelAndView portalSearchDemand(HttpServletRequest request, ModelAndView modelview) {
 		modelview.setViewName("/portal/search/demand");
 		return modelview;
 	}
-	
+
 	@RequestMapping(value = "/portal/search/subscriber", method = RequestMethod.GET)
 	public ModelAndView portalSearchSubscriber(HttpServletRequest request, ModelAndView modelview) {
 		modelview.setViewName("/portal/search/subscriber");
 		return modelview;
 	}
-	
-	
-	
-	
+
+	/**
+	 * 科技需求详情
+	 */
+	@RequestMapping(value = "/portal/detail/demandDetail", method = RequestMethod.GET)
+	public ModelAndView portalDemandDetail(String id, Integer type) {
+		ModelAndView mv = new ModelAndView();
+		DemandPortalDetailBo demand = null;
+		if (UserType.PERSONAL.getCode().equals(type)) {
+			demand = demandService.findUserPortalDemandDetail(id);
+		} else if (UserType.ORGANIZATION.getCode().equals(type)) {
+			demand = demandService.findOrgPortalDemandDetail(id);
+		}
+		if (null != demand) {
+			String keyword = demand.getKeyword();
+			if (StringUtils.isNotBlank(keyword)) {
+				demand.setKeywordList(Arrays.asList(keyword.trim().split(",|,")));
+			}
+			Integer industryCategoryA = demand.getIndustryCategoryA();
+			if (null != industryCategoryA) {
+				List<DemandPortalSimilarListBo> similarList = demandService.findByIndustryCategoryA(industryCategoryA,
+						demand.getId());
+				mv.addObject("similarList", similarList);
+			}
+		}
+		mv.setViewName("/portal/detail/demandDetail");
+		mv.addObject("demand", demand);
+
+		return mv;
+	}
+
+	/**
+	 * 科技成果详情
+	 */
+	@RequestMapping(value = "/portal/detail/achievementDetail", method = RequestMethod.GET)
+	public ModelAndView portalAchievementDetail(String id, Integer type) {
+		ModelAndView mv = new ModelAndView();
+		AchievementPortalDetailBo achievement = null;
+		if (UserType.PERSONAL.getCode().equals(type)) {
+			achievement = achievementService.findUserPortalAchievementDetail(id);
+		} else if (UserType.ORGANIZATION.getCode().equals(type)) {
+			achievement = achievementService.findOrgPortalAchievementDetail(id);
+		}
+		if (null != achievement){
+			String keyword = achievement.getKeyword();
+			if (StringUtils.isNotBlank(keyword)) {
+				achievement.setKeywordList(Arrays.asList(keyword.trim().split(",|,")));
+			}
+			Integer fieldA = achievement.getFieldA();
+			if (null != fieldA){
+				//List<AchievementPortalSimilarListBo>
+			}
+		}
+		mv.setViewName("/portal/detail/achievementDetail");
+		
+		//if 
+		return mv;
+	}
+
 	private ModelAndView userLogin(HttpServletRequest request, ModelAndView modelview, String next) {
 		String key = TokenManager.getUserId();
 		if (!TokenManager.isLogin() || key == null || key == "") {
@@ -186,7 +256,7 @@ public class WebpageController extends BaseController {
 		modelview.setViewName(next);
 		return modelview;
 	}
-	
+
 	private ModelAndView adminToLogin(HttpServletRequest request, ModelAndView modelview, String next) {
 		String key = TokenManager.getAdminId();
 		if (!TokenManager.isLogin() || key == null || key == "") {

+ 5 - 0
src/main/java/com/goafanti/common/dao/AchievementMapper.java

@@ -6,6 +6,7 @@ import com.goafanti.achievement.bo.AchievementOrgOwnerDetailBo;
 import com.goafanti.achievement.bo.AchievementUserOwnerDetailBo;
 import com.goafanti.common.model.Achievement;
 import com.goafanti.portal.bo.AchievementDetailBo;
+import com.goafanti.portal.bo.AchievementPortalDetailBo;
 
 public interface AchievementMapper {
     int deleteByPrimaryKey(String id);
@@ -33,4 +34,8 @@ public interface AchievementMapper {
 	AchievementDetailBo selectAchievementSearchDetail(String uid, String id);
 
 	Integer findAchievementNumByUid(String uid);
+
+	AchievementPortalDetailBo findUserPortalAchievementDetail(String id);
+
+	AchievementPortalDetailBo findOrgPortalAchievementDetail(String id);
 }

+ 17 - 6
src/main/java/com/goafanti/common/dao/DemandMapper.java

@@ -2,22 +2,26 @@ package com.goafanti.common.dao;
 
 import java.util.List;
 
+import org.apache.ibatis.annotations.Param;
+
 import com.goafanti.common.model.Demand;
 import com.goafanti.demand.bo.DemandManageDetailBo;
+import com.goafanti.portal.bo.DemandPortalDetailBo;
+import com.goafanti.portal.bo.DemandPortalSimilarListBo;
 import com.goafanti.portal.bo.DemandSearchDetailBo;
 
 public interface DemandMapper {
-    int deleteByPrimaryKey(String id);
+	int deleteByPrimaryKey(String id);
 
-    int insert(Demand record);
+	int insert(Demand record);
 
-    int insertSelective(Demand record);
+	int insertSelective(Demand record);
 
-    Demand selectByPrimaryKey(String id);
+	Demand selectByPrimaryKey(String id);
 
-    int updateByPrimaryKeySelective(Demand record);
+	int updateByPrimaryKeySelective(Demand record);
 
-    int updateByPrimaryKey(Demand record);
+	int updateByPrimaryKey(Demand record);
 
 	DemandManageDetailBo selectUserDemandDetail(String id);
 
@@ -34,4 +38,11 @@ public interface DemandMapper {
 	DemandSearchDetailBo selectDemandSearchDetail(String uid, String id);
 
 	Integer findDemandNumByUid(String uid);
+
+	DemandPortalDetailBo findOrgPortalDemandDetail(String id);
+
+	DemandPortalDetailBo findUserPortalDemandDetail(String id);
+
+	List<DemandPortalSimilarListBo> findByIndustryCategoryA(@Param("industryCategoryA") Integer industryCategoryA,
+			@Param("id") String id);
 }

+ 49 - 0
src/main/java/com/goafanti/common/mapper/AchievementMapper.xml

@@ -1130,4 +1130,53 @@
 	AND owner_id = #{ownerId,jdbcType=VARCHAR}
   </select>
   
+  <select id="findUserPortalAchievementDetail" parameterType="java.lang.String" resultType="com.goafanti.portal.bo.AchievementPortalDetailBo">
+  	SELECT
+		a.id,
+		a.name,
+		a.keyword,
+		a.introduction,
+		a.maturity,
+		a.transfer_price AS transferPrice,
+		a.patent_case AS patentCase,
+		a.field_a AS fieldA,
+		a.field_b AS fieldB,
+		a.field_c AS fieldC,
+		a.release_date AS releaseDate,
+		dg.name as province,
+		dgg.name as city,
+		a.technical_picture_url AS technicalPictureUrl
+	FROM
+		achievement a
+	LEFT JOIN user_identity ui ON a.owner_id = ui.uid
+	LEFT JOIN district_glossory dg on dg.id = ui.province
+	LEFT JOIN district_glossory dgg on dgg.id = ui.city
+	WHERE
+		a.id = #{id,jdbcType=VARCHAR}
+  </select>
+  
+   <select id="findOrgPortalAchievementDetail" parameterType="java.lang.String" resultType="com.goafanti.portal.bo.AchievementPortalDetailBo">
+  	SELECT
+		a.id,
+		a.name,
+		a.keyword,
+		a.introduction,
+		a.maturity,
+		a.transfer_price AS transferPrice,
+		a.patent_case AS patentCase,
+		a.field_a AS fieldA,
+		a.field_b AS fieldB,
+		a.field_c AS fieldC,
+		a.release_date AS releaseDate,
+		dg.name as province,
+		dgg.name as city,
+		a.technical_picture_url AS technicalPictureUrl
+	FROM
+		achievement a
+	LEFT JOIN organization_identity oi ON a.owner_id = oi.uid
+	LEFT JOIN district_glossory dg on dg.id = oi.licence_province
+	LEFT JOIN district_glossory dgg on dgg.id = oi.licence_city
+	WHERE
+		a.id = #{id,jdbcType=VARCHAR}
+  </select>
 </mapper>

+ 60 - 0
src/main/java/com/goafanti/common/mapper/DemandMapper.xml

@@ -1023,4 +1023,64 @@
 	AND deleted_sign = 0
 	AND employer_id = #{employerId,jdbcType=VARCHAR}
   </select>
+  
+  <select id="findUserPortalDemandDetail" parameterType="java.lang.String" resultType="com.goafanti.portal.bo.DemandPortalDetailBo">
+  	SELECT
+		d.id,
+		d.name,
+		d.keyword,
+		d.industry_category_a AS industryCategoryA,
+		d.industry_category_b AS industryCategoryB,
+		d.industry_category_c AS industryCategoryC,
+		d.budget_cost AS budgetCost,
+		d.problem_des AS problemDes,
+		dg.name AS province,
+		dgg.name AS city
+	FROM
+		demand d
+	LEFT JOIN user_identity ui ON d.employer_id = ui.uid
+	LEFT JOIN district_glossory dg ON dg.id = ui.province
+	LEFT JOIN district_glossory dgg ON dgg.id = ui.city
+	WHERE
+		d.id = #{id,jdbcType=VARCHAR}
+  </select>
+  
+  <select id="findOrgPortalDemandDetail" parameterType="java.lang.String" resultType="com.goafanti.portal.bo.DemandPortalDetailBo">
+  	SELECT
+		d.id,
+		d.name,
+		d.keyword,
+		d.industry_category_a AS industryCategoryA,
+		d.industry_category_b AS industryCategoryB,
+		d.industry_category_c AS industryCategoryC,
+		d.budget_cost AS budgetCost,
+		d.problem_des AS problemDes,
+		dg.name AS province,
+		dgg.name AS city
+	FROM
+		demand d
+	LEFT JOIN organization_identity oi ON d.employer_id = oi.uid
+	LEFT JOIN district_glossory dg ON dg.id = oi.licence_province
+	LEFT JOIN district_glossory dgg ON dgg.id = oi.licence_city
+	WHERE
+		d.id = #{id,jdbcType=VARCHAR}
+  </select>
+  
+  <select id="findByIndustryCategoryA"  resultType="com.goafanti.portal.bo.DemandPortalSimilarListBo">
+  	 select 
+	    d.id,
+	    d.name,
+	    d.industry_category_a as industryCategoryA,
+	    d.industry_category_b as industryCategoryB,
+	    d.problem_des as problemDes,
+	    d.budget_cost as budgetCost,
+	    u.lvl as level
+    from 
+    	demand d
+    left join user u on u.id = d.employer_id
+    where 
+    	d.industry_category_a = #{industryCategoryA,jdbcType=INTEGER}
+    and d.id <![CDATA[ <> ]]> #{id,jdbcType=VARCHAR}
+    limit 5
+  </select>
 </mapper>

+ 2 - 2
src/main/java/com/goafanti/common/mapper/OrganizationIdentityMapper.xml

@@ -1163,7 +1163,7 @@
 				oi.id as identityId, info.logo_url as logoUrl,
 				oi.licence_province as province
 			FROM
-				USER u
+				<![CDATA[ user ]]> u
 			LEFT JOIN organization_identity oi ON oi.uid = u.id
 			LEFT JOIN organization_info info on info.uid = u.id
 			WHERE
@@ -1210,7 +1210,7 @@
 			SELECT
 				u.id as uid
 			FROM
-				USER u
+				<![CDATA[ user ]]> u
 			LEFT JOIN organization_identity oi ON oi.uid = u.id
 			LEFT JOIN organization_info info on info.uid = u.id
 			WHERE

+ 1 - 1
src/main/java/com/goafanti/common/task/PatentTask.java

@@ -69,7 +69,7 @@ public class PatentTask {
 						&& null != p.getPatentApplicationDate()) {
 					try {
 						if (disposeExprire(p, now)) {
-							sendMessage(p);
+							//sendMessage(p);
 						}
 					} catch (ParseException e) {
 					}

+ 9 - 0
src/main/java/com/goafanti/demand/service/DemandService.java

@@ -11,6 +11,8 @@ import com.goafanti.demand.bo.DemandListBo;
 import com.goafanti.demand.bo.DemandManageDetailBo;
 import com.goafanti.demand.bo.DemandManageListBo;
 import com.goafanti.demand.bo.DemandPartnerListBo;
+import com.goafanti.portal.bo.DemandPortalDetailBo;
+import com.goafanti.portal.bo.DemandPortalSimilarListBo;
 import com.goafanti.portal.bo.DemandSearchDetailBo;
 import com.goafanti.portal.bo.DemandSearchListBo;
 
@@ -62,5 +64,12 @@ public interface DemandService {
 
 	Pagination<DemandPartnerListBo> lisePartnerDemand(String employerId, Integer pNo, Integer pSize);
 
+	DemandPortalDetailBo findUserPortalDemandDetail(String id);
+
+	DemandPortalDetailBo findOrgPortalDemandDetail(String id);
+
+	List<DemandPortalSimilarListBo> findByIndustryCategoryA(Integer industryCategoryA, String id);
+
+
 
 }

+ 17 - 0
src/main/java/com/goafanti/demand/service/impl/DemandServiceImpl.java

@@ -47,6 +47,8 @@ import com.goafanti.demand.bo.DemandManageDetailBo;
 import com.goafanti.demand.bo.DemandManageListBo;
 import com.goafanti.demand.bo.DemandPartnerListBo;
 import com.goafanti.demand.service.DemandService;
+import com.goafanti.portal.bo.DemandPortalDetailBo;
+import com.goafanti.portal.bo.DemandPortalSimilarListBo;
 import com.goafanti.portal.bo.DemandSearchDetailBo;
 import com.goafanti.portal.bo.DemandSearchListBo;
 
@@ -592,5 +594,20 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 				params, pNo, pSize);
 	}
 
+	@Override
+	public DemandPortalDetailBo findUserPortalDemandDetail(String id) {
+		return demandMapper.findUserPortalDemandDetail(id);
+	}
+	
+	@Override
+	public DemandPortalDetailBo findOrgPortalDemandDetail(String id) {
+		return demandMapper.findOrgPortalDemandDetail(id);
+	}
+
+	@Override
+	public List<DemandPortalSimilarListBo> findByIndustryCategoryA(Integer industryCategoryA, String id) {
+		return demandMapper.findByIndustryCategoryA(industryCategoryA, id);
+	}
+
 
 }

+ 184 - 0
src/main/java/com/goafanti/portal/bo/AchievementPortalDetailBo.java

@@ -0,0 +1,184 @@
+package com.goafanti.portal.bo;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+import org.apache.commons.lang3.time.DateFormatUtils;
+
+import com.goafanti.common.constant.AFTConstants;
+
+public class AchievementPortalDetailBo {
+
+	private String			id;
+
+	private String			name;
+
+	private String			keyword;
+
+	private String			introduction;
+
+	private Integer			maturity;
+
+	private BigDecimal		transferPrice;
+
+	private String			patentCase;
+
+	private Integer			fieldA;
+
+	private Integer			fieldB;
+
+	private Integer			fieldC;
+
+	private Date			releaseDate;
+
+	private String			province;
+
+	private String			city;
+
+	private String			technicalPictureUrl;
+
+	private List<String>	pictureList;
+
+	private List<String>	keywordList;
+
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getKeyword() {
+		return keyword;
+	}
+
+	public void setKeyword(String keyword) {
+		this.keyword = keyword;
+	}
+
+	public String getIntroduction() {
+		return introduction;
+	}
+
+	public void setIntroduction(String introduction) {
+		this.introduction = introduction;
+	}
+
+	public Integer getMaturity() {
+		return maturity;
+	}
+
+	public void setMaturity(Integer maturity) {
+		this.maturity = maturity;
+	}
+
+	public BigDecimal getTransferPrice() {
+		return transferPrice;
+	}
+
+	public void setTransferPrice(BigDecimal transferPrice) {
+		this.transferPrice = transferPrice;
+	}
+
+	public String getPatentCase() {
+		return patentCase;
+	}
+
+	public void setPatentCase(String patentCase) {
+		this.patentCase = patentCase;
+	}
+
+	public Integer getFieldA() {
+		return fieldA;
+	}
+
+	public void setFieldA(Integer fieldA) {
+		this.fieldA = fieldA;
+	}
+
+	public Integer getFieldB() {
+		return fieldB;
+	}
+
+	public void setFieldB(Integer fieldB) {
+		this.fieldB = fieldB;
+	}
+
+	public Integer getFieldC() {
+		return fieldC;
+	}
+
+	public void setFieldC(Integer fieldC) {
+		this.fieldC = fieldC;
+	}
+
+	public Date getReleaseDate() {
+		return releaseDate;
+	}
+
+	public void setReleaseDate(Date releaseDate) {
+		this.releaseDate = releaseDate;
+	}
+
+	public String getTechnicalPictureUrl() {
+		return technicalPictureUrl;
+	}
+
+	public void setTechnicalPictureUrl(String technicalPictureUrl) {
+		this.technicalPictureUrl = technicalPictureUrl;
+	}
+
+	public List<String> getPictureList() {
+		return pictureList;
+	}
+
+	public void setPictureList(List<String> pictureList) {
+		this.pictureList = pictureList;
+	}
+
+	public List<String> getKeywordList() {
+		return keywordList;
+	}
+
+	public void setKeywordList(List<String> keywordList) {
+		this.keywordList = keywordList;
+	}
+
+	public String getProvince() {
+		return province;
+	}
+
+	public void setProvince(String province) {
+		this.province = province;
+	}
+
+	public String getCity() {
+		return city;
+	}
+
+	public void setCity(String city) {
+		this.city = city;
+	}
+
+	public String getReleaseDateFormattedDate() {
+		if (this.releaseDate == null) {
+			return null;
+		} else {
+			return DateFormatUtils.format(this.getReleaseDate(), AFTConstants.YYYYMMDD);
+		}
+	}
+
+	public void setReleaseDateFormattedDate(String releaseDateFormattedDate) {
+
+	}
+}

+ 6 - 0
src/main/java/com/goafanti/portal/bo/AchievementPortalSimilarListBo.java

@@ -0,0 +1,6 @@
+package com.goafanti.portal.bo;
+
+public class AchievementPortalSimilarListBo {
+	//private 
+
+}

+ 117 - 0
src/main/java/com/goafanti/portal/bo/DemandPortalDetailBo.java

@@ -0,0 +1,117 @@
+package com.goafanti.portal.bo;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+public class DemandPortalDetailBo {
+	private String			id;
+
+	private String			name;
+
+	private String			keyword;
+
+	private Integer			industryCategoryA;
+
+	private Integer			industryCategoryB;
+
+	private Integer			industryCategoryC;
+
+	private BigDecimal		budgetCost;
+
+	private String			province;
+
+	private String			city;
+
+	private String			problemDes;
+
+	private List<String>	keywordList;
+
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getKeyword() {
+		return keyword;
+	}
+
+	public void setKeyword(String keyword) {
+		this.keyword = keyword;
+	}
+
+	public Integer getIndustryCategoryA() {
+		return industryCategoryA;
+	}
+
+	public void setIndustryCategoryA(Integer industryCategoryA) {
+		this.industryCategoryA = industryCategoryA;
+	}
+
+	public Integer getIndustryCategoryB() {
+		return industryCategoryB;
+	}
+
+	public void setIndustryCategoryB(Integer industryCategoryB) {
+		this.industryCategoryB = industryCategoryB;
+	}
+
+	public Integer getIndustryCategoryC() {
+		return industryCategoryC;
+	}
+
+	public void setIndustryCategoryC(Integer industryCategoryC) {
+		this.industryCategoryC = industryCategoryC;
+	}
+
+	public BigDecimal getBudgetCost() {
+		return budgetCost;
+	}
+
+	public void setBudgetCost(BigDecimal budgetCost) {
+		this.budgetCost = budgetCost;
+	}
+
+	public String getProblemDes() {
+		return problemDes;
+	}
+
+	public void setProblemDes(String problemDes) {
+		this.problemDes = problemDes;
+	}
+
+	public String getProvince() {
+		return province;
+	}
+
+	public void setProvince(String province) {
+		this.province = province;
+	}
+
+	public String getCity() {
+		return city;
+	}
+
+	public void setCity(String city) {
+		this.city = city;
+	}
+
+	public List<String> getKeywordList() {
+		return keywordList;
+	}
+
+	public void setKeywordList(List<String> keywordList) {
+		this.keywordList = keywordList;
+	}
+
+}

+ 76 - 0
src/main/java/com/goafanti/portal/bo/DemandPortalSimilarListBo.java

@@ -0,0 +1,76 @@
+package com.goafanti.portal.bo;
+
+import java.math.BigDecimal;
+
+public class DemandPortalSimilarListBo {
+	private String		id;
+
+	private String		name;
+
+	private Integer		industryCategoryA;
+
+	private Integer		industryCategoryB;
+
+	private String		problemDes;
+
+	private BigDecimal	budgetCost;
+
+	private Integer		level;
+
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public Integer getIndustryCategoryA() {
+		return industryCategoryA;
+	}
+
+	public void setIndustryCategoryA(Integer industryCategoryA) {
+		this.industryCategoryA = industryCategoryA;
+	}
+
+	public Integer getIndustryCategoryB() {
+		return industryCategoryB;
+	}
+
+	public void setIndustryCategoryB(Integer industryCategoryB) {
+		this.industryCategoryB = industryCategoryB;
+	}
+
+	public String getProblemDes() {
+		return problemDes;
+	}
+
+	public void setProblemDes(String problemDes) {
+		this.problemDes = problemDes;
+	}
+
+	public BigDecimal getBudgetCost() {
+		return budgetCost;
+	}
+
+	public void setBudgetCost(BigDecimal budgetCost) {
+		this.budgetCost = budgetCost;
+	}
+
+	public Integer getLevel() {
+		return level;
+	}
+
+	public void setLevel(Integer level) {
+		this.level = level;
+	}
+
+}

+ 11 - 0
src/main/java/com/goafanti/portal/controller/PortalDetailApiController.java

@@ -0,0 +1,11 @@
+package com.goafanti.portal.controller;
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.goafanti.common.controller.BaseApiController;
+@RestController
+@RequestMapping(value = "/portal/detail")
+public class PortalDetailApiController extends BaseApiController{
+
+}