瀏覽代碼

顾问详情

limin 7 年之前
父節點
當前提交
5662b69c6a

+ 7 - 0
src/main/java/com/goafanti/app/bo/ExpertsListBo.java

@@ -20,6 +20,7 @@ public class ExpertsListBo {
 	private String favorableRate;
 	private  CommentDetailResult	commentDetailResult;
 	private Integer consultantType;
+	private String consultantTypeName;
 	public String getUid() {
 		return uid;
 	}
@@ -122,6 +123,12 @@ public class ExpertsListBo {
 	public void setConsultantType(Integer consultantType) {
 		this.consultantType = consultantType;
 	}
+	public String getConsultantTypeName() {
+		return consultantTypeName;
+	}
+	public void setConsultantTypeName(String consultantTypeName) {
+		this.consultantTypeName = consultantTypeName;
+	}
 	
 
 }

+ 11 - 1
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -4,16 +4,20 @@ package com.goafanti.common.controller;
 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.app.bo.ExpertsListBo;
 import com.goafanti.banners.service.BannersService;
 import com.goafanti.business.bo.JtBusinessCategoryBo;
 import com.goafanti.business.bo.JtBusinessCategoryTree;
@@ -23,7 +27,10 @@ import com.goafanti.common.bo.PolicyEntity;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.bo.fieldGlossoryBo;
 import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.dao.ProjectInterestMapper;
+import com.goafanti.common.enums.BusinessCategoryModule;
+import com.goafanti.common.enums.ConsultantType;
 import com.goafanti.common.model.AchievementInterest;
 import com.goafanti.common.model.Banners;
 import com.goafanti.common.model.DemandInterest;
@@ -1283,8 +1290,11 @@ public class WebpageController extends BaseController {
 	 * @return
 	 */
 	@RequestMapping(value = "/portal/adviser/adviserDetail", method = RequestMethod.GET)
-	public ModelAndView adviserDetail(ModelAndView modelview){
+	public ModelAndView adviserDetail(ModelAndView modelview,String id){
 		modelview.setViewName("/portal/adviser/adviserDetail");
+		ExpertsListBo adviserDetail = userIdentityService.selectExpertsDetail(id);
+		adviserDetail.setConsultantTypeName(ConsultantType.getDesc(adviserDetail.getConsultantType()));
+		modelview.addObject("adviserDetail", adviserDetail);
 		return modelview;
 	}
 	

+ 78 - 0
src/main/java/com/goafanti/common/enums/ConsultantType.java

@@ -0,0 +1,78 @@
+package com.goafanti.common.enums;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
+
+public enum ConsultantType {
+	
+	DL(0,"专利代理人"), 
+	ZL(1,"专利顾问"),
+	BQ(2,"版权顾问"),
+	SB(3,"商标顾问");
+	
+
+	private ConsultantType(Integer code, String desc) {
+		this.code = code;
+		this.desc = desc;
+	}
+
+	private static Map<Integer, ConsultantType> status = new HashMap<Integer, ConsultantType>();
+
+	static {
+		for (ConsultantType value : ConsultantType.values()) {
+			status.put(value.getCode(), value);
+		}
+	}
+
+	public static ConsultantType getStatus(Integer code) {
+		if (containsType(code)) {
+			return status.get(code);
+		}
+		return DL;
+	}
+
+	public static ConsultantType getStatus(String code) {
+		if (StringUtils.isNumeric(code)) {
+			return getStatus(Integer.parseInt(code));
+		}
+		return DL;
+	}
+
+	public static boolean containsType(Integer code) {
+		return status.containsKey(code);
+	}
+
+	private Integer	code;
+	private String	desc;
+
+	public Integer getCode() {
+		return this.code;
+	}
+
+	public String getDesc() {
+		return this.desc;
+	}
+	
+	public static Integer getValue(Integer value) {  
+		ConsultantType[] businessModeEnums = values();  
+        for (ConsultantType businessModeEnum : businessModeEnums) {  
+            if (businessModeEnum.getCode().equals(value)) {  
+                return businessModeEnum.getCode();  
+            }  
+        }  
+        return null;  
+    }   
+      
+    public static String getDesc(Integer value) {  
+    	ConsultantType[] businessModeEnums = values();  
+        for (ConsultantType businessModeEnum : businessModeEnums) {  
+            if (businessModeEnum.getCode().equals(value)) {  
+                return businessModeEnum.getDesc();  
+            }  
+        }  
+        return null;  
+    }  
+
+}

File diff suppressed because it is too large
+ 3 - 3
src/main/webapp/WEB-INF/views/portal/adviser/adviserDetail.html