anderx пре 7 година
родитељ
комит
a96cc1f2f5

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

@@ -106,7 +106,6 @@ public class JtBusinessServiceImpl  extends BaseMybatisDao<JtBusinessProjectMapp
 			Integer pageNo,Integer privateProject,Integer auditStatus,Integer module,Integer isHot,Integer orderType,Integer orderSort,String ownerId) {
 		if(orderType==null)orderType=0;
 		if(orderSort==null)orderSort=0;
-		// TODO Auto-generated method stub
 		if (pageNo == null || pageNo < 0) {
 			pageNo = 1;
 		}

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

@@ -9,11 +9,14 @@ import javax.servlet.http.HttpServletRequest;
 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 org.springframework.web.servlet.view.RedirectView;
 
 import com.goafanti.achievement.bo.AchievementPartnerListBo;
 import com.goafanti.achievement.service.AchievementService;
+import com.goafanti.business.service.JtBusinessService;
+import com.goafanti.common.bo.Result;
 import com.goafanti.common.enums.AchievementMaturity;
 import com.goafanti.common.model.UserInterest;
 import com.goafanti.common.service.DistrictGlossoryService;
@@ -50,6 +53,8 @@ public class PortalController extends BaseController {
 	OrderService	orderService;
 	@Resource
 	UserInterestService userInterestService;
+	@Resource
+	JtBusinessService	jtBusinessService;
 
 	@RequestMapping(value = "/index", method = RequestMethod.GET)
 	public ModelAndView index(HttpServletRequest request, ModelAndView modelview) {
@@ -146,4 +151,6 @@ public class PortalController extends BaseController {
 		return mv;
 
 	}
+	
+	
 	}

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

@@ -5,6 +5,7 @@ import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.util.List;
 import java.util.UUID;
 
 import javax.annotation.Resource;
@@ -21,6 +22,8 @@ import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.ResponseBody;
 
 import com.goafanti.achievement.service.AchievementService;
+import com.goafanti.business.bo.JtBusinessProjectResult;
+import com.goafanti.business.service.JtBusinessService;
 import com.goafanti.comment.bo.CommentInput;
 import com.goafanti.comment.bo.CommentResult;
 import com.goafanti.comment.controller.UserCommentController;
@@ -38,6 +41,7 @@ import com.goafanti.common.utils.PasswordUtil;
 import com.goafanti.common.utils.PictureUtils;
 import com.goafanti.common.utils.TimeUtils;
 import com.goafanti.common.utils.VerifyCodeUtils;
+import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.demand.bo.DemandListBo;
 import com.goafanti.demand.service.DemandService;
@@ -91,6 +95,9 @@ public class PublicController extends BaseController {
 	@Autowired
 	private DemandService demandService;
 	
+	@Autowired
+	private JtBusinessService jtBusinessService;
+	
 	@Value(value = "${patentTemplate}")
 	private String					patentTemplate		= null;
 
@@ -742,5 +749,21 @@ public class PublicController extends BaseController {
 		return result;
 		
 	}
+	/**
+	 * 服务商项目列表
+	 */
+	@SuppressWarnings("unchecked")
+	@RequestMapping(value = "/user/projectList", method = RequestMethod.GET)
+	@ResponseBody
+	public Result userProjectList(String uid, Integer pageSize, Integer pageNo) {
+		Result res = new Result();
+		Pagination<JtBusinessProjectResult> pagination=jtBusinessService.getProjects(null,null, null, null, pageSize, pageNo, 0, 2, null, null, 0, 0, uid);
+		List<JtBusinessProjectResult> list=(List<JtBusinessProjectResult>) pagination.getList();
+		for (JtBusinessProjectResult j : list) {
+			j.setIntroduce(j.getIntroduce().replaceAll("\\<.*?>", ""));
+		}
+		res.setData(pagination);
+		return res;
+	}
 	
 }

+ 4 - 3
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -1208,13 +1208,13 @@ public class WebpageController extends BaseController {
 		return modelAndView;
 	}
 
-	@SuppressWarnings("unchecked")
+	
 	@RequestMapping(value = "/portal/companyProfile")
 	public ModelAndView companyProfile(HttpServletRequest request, ModelAndView modelAndView, String uid) {
 		modelAndView.setViewName("/portal/companyProfile");
 		OrgIdentityBo org = organizationIdentityService.selectOrgIdentityBoByUserId(uid);
 		modelAndView.addObject("org", org);
-		List<JtBusinessProjectResult> projectResults = (List<JtBusinessProjectResult>) jtBusinessService
+		/*List<JtBusinessProjectResult> projectResults = (List<JtBusinessProjectResult>) jtBusinessService
 				.getProjects(null,null, null, null, 12, 1, 0, 2, null, null, 0, 0, uid).getList();
 		modelAndView.addObject("jtProjects", projectResults);
 		String honor = org.getHonorPicture();
@@ -1222,7 +1222,7 @@ public class WebpageController extends BaseController {
 			List<String> honorPictures = Arrays.asList(honor.split(","));
 			if (honorPictures.size() > 0)
 				modelAndView.addObject("honors", honorPictures);
-		}
+		}*/
 		return modelAndView;
 	}
 
@@ -1478,4 +1478,5 @@ public class WebpageController extends BaseController {
 		return res;
 	} 
 	
+	
 }

+ 54 - 10
src/main/java/com/goafanti/user/controller/UserApiController.java

@@ -14,8 +14,10 @@ import org.springframework.util.Assert;
 import org.springframework.validation.BindingResult;
 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.bind.annotation.RestController;
 
+import com.goafanti.business.service.JtBusinessService;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.BaseApiController;
@@ -85,6 +87,9 @@ public class UserApiController extends BaseApiController {
 	private UserContactService 				userContactService;
 	@Autowired
 	private EasemobUtils					easemobUtils;
+	
+	@Resource
+	private JtBusinessService	jtBusinessService;
 
 	private static final Integer			STEP_ONE			= 1;
 
@@ -515,18 +520,11 @@ public class UserApiController extends BaseApiController {
 					UserIdentityFields.getFieldDesc(bindingResult.getFieldError().getField())));
 			return res;
 		}
-		if(StringUtils.isBlank(organizationIdentity.getUid())) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "用户ID"));
+		res=validation(organizationIdentity, res);
+		if (!res.getError().isEmpty()) {
 			return res;
 		}
-		if(organizationIdentity.getAuthentication() == UserAuthentication.AUTHENTICATION.getCode()
-				&& organizationIdentity.getType() == UserType.PERSONAL.getCode()){
-			res.getError().add(buildError(null, "", "用户已经个人认证"));
-			return res;
-		}else if(organizationIdentity.getAuthentication() == UserAuthentication.UN_AUTHENTICATION.getCode()){
-			organizationIdentity.setType(UserType.ORGANIZATION.getCode());
-			organizationIdentity.setAuthentication(UserAuthentication.AUTHENTICATION.getCode());
-		}
+		
 		if (res.getError().isEmpty()) {
 			OrganizationIdentity oi = new OrganizationIdentity();
 			User user = new User();
@@ -547,6 +545,50 @@ public class UserApiController extends BaseApiController {
 		res.setData(organizationIdentity);
 		return res;
 	}
+
+	private Result validation(InputOrganizationIdentity organizationIdentity, Result res) {
+		if(StringUtils.isBlank(organizationIdentity.getUid())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "用户ID"));
+			return res;
+		}
+		if(StringUtils.isBlank(organizationIdentity.getQq())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "QQ"));
+			return res;
+		}
+		if(StringUtils.isBlank(organizationIdentity.getIdentifyName())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "单位名称"));			
+			return res;
+		}
+		if(StringUtils.isBlank(organizationIdentity.getCompanyLogoUrl())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "LOGO"));			
+			return res;
+		}
+		if(StringUtils.isBlank(organizationIdentity.getBusinessScope())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "业务范围"));			
+			return res;
+		}
+		if(StringUtils.isBlank(organizationIdentity.getIntroduction())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "单位简介"));			
+			return res;
+		}
+		if(StringUtils.isBlank(organizationIdentity.getHonorPicture())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "荣誉资质"));			
+			return res;
+		}
+		if(null==organizationIdentity.getLicenceProvince()||null==organizationIdentity.getLicenceCity()) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "地区"));
+			return res;
+		}
+		if(organizationIdentity.getAuthentication() == UserAuthentication.AUTHENTICATION.getCode()
+				&& organizationIdentity.getType() == UserType.PERSONAL.getCode()){
+			res.getError().add(buildError(null, "", "用户已经个人认证"));
+			return res;
+		}else if(organizationIdentity.getAuthentication() == UserAuthentication.UN_AUTHENTICATION.getCode()){
+			organizationIdentity.setType(UserType.ORGANIZATION.getCode());
+			organizationIdentity.setAuthentication(UserAuthentication.AUTHENTICATION.getCode());
+		}
+		return res;
+	}
 	
 	/**
 	 * 个人资料/团体会员资料
@@ -914,4 +956,6 @@ public class UserApiController extends BaseApiController {
 		return res;
 	}
 	
+	
+
 }

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

@@ -85,7 +85,7 @@
                     </div>
                 </li>
                 <li>
-                    <p>软件著作权</p>
+                    <p>软著申请</p>
                     <div>
                         <img th:src="${portalHost+'/img/advertisement/practicalPatent_33.png'}" alt="">
                         <p><a th:href="${gqc3}==null?@{/portal/service/patentList}:@{/portal/service/patentList(secondId=${gqc3.id})}">了解详情</a></p>