|
@@ -1,6 +1,8 @@
|
|
|
package com.goafanti.portal.controller;
|
|
package com.goafanti.portal.controller;
|
|
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
|
|
|
+import java.util.Iterator;
|
|
|
|
|
+import java.util.List;
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
@@ -13,10 +15,13 @@ import com.goafanti.achievement.service.AchievementService;
|
|
|
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.controller.BaseController;
|
|
import com.goafanti.common.controller.BaseController;
|
|
|
|
|
+import com.goafanti.common.enums.AchievementMaturity;
|
|
|
import com.goafanti.common.enums.DemandPortalSearchSignType;
|
|
import com.goafanti.common.enums.DemandPortalSearchSignType;
|
|
|
import com.goafanti.common.enums.UserLevel;
|
|
import com.goafanti.common.enums.UserLevel;
|
|
|
import com.goafanti.common.enums.UserType;
|
|
import com.goafanti.common.enums.UserType;
|
|
|
|
|
+import com.goafanti.core.mybatis.page.Pagination;
|
|
|
import com.goafanti.demand.service.DemandService;
|
|
import com.goafanti.demand.service.DemandService;
|
|
|
|
|
+import com.goafanti.portal.bo.AchievementSearchListBo;
|
|
|
import com.goafanti.user.service.OrganizationIdentityService;
|
|
import com.goafanti.user.service.OrganizationIdentityService;
|
|
|
import com.goafanti.user.service.UserIdentityService;
|
|
import com.goafanti.user.service.UserIdentityService;
|
|
|
|
|
|
|
@@ -35,6 +40,7 @@ public class PortalSearchController extends BaseController {
|
|
|
/**
|
|
/**
|
|
|
* 项目搜索
|
|
* 项目搜索
|
|
|
*/
|
|
*/
|
|
|
|
|
+ @SuppressWarnings("unchecked")
|
|
|
@RequestMapping(value = "/achievementList", method = RequestMethod.GET)
|
|
@RequestMapping(value = "/achievementList", method = RequestMethod.GET)
|
|
|
public Result achievementSearchList( String keyword,Integer dataCategory,Integer category,
|
|
public Result achievementSearchList( String keyword,Integer dataCategory,Integer category,
|
|
|
Integer fieldA, String pageNo, String pageSize,String transferMode, Integer dateSort,String upperPrice,String lowerPrice) {
|
|
Integer fieldA, String pageNo, String pageSize,String transferMode, Integer dateSort,String upperPrice,String lowerPrice) {
|
|
@@ -57,8 +63,30 @@ public class PortalSearchController extends BaseController {
|
|
|
}catch (Exception e) {
|
|
}catch (Exception e) {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "金额"));
|
|
res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "金额"));
|
|
|
}
|
|
}
|
|
|
- res.setData(achievementService.listAchievementSearchList(
|
|
|
|
|
- keyword, dataCategory,category,fieldA, transferMode, pNo, pSize,dateSort,upperPrice,lowerPrice));
|
|
|
|
|
|
|
+
|
|
|
|
|
+ Pagination<AchievementSearchListBo> achievementSearchList = achievementService.listAchievementSearchList(
|
|
|
|
|
+ keyword, dataCategory,category,fieldA, transferMode, pNo, pSize,dateSort,upperPrice,lowerPrice);
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ List<AchievementSearchListBo> list = (List<AchievementSearchListBo>) achievementSearchList.getList();
|
|
|
|
|
+ for (int i = 0; i < list.size(); i++) {
|
|
|
|
|
+ Integer maturity = list.get(i).getMaturity();
|
|
|
|
|
+ if (null != maturity) {
|
|
|
|
|
+ if (AchievementMaturity.RESEARCH.getCode().equals(maturity)) {
|
|
|
|
|
+ list.get(i).setMaturityS(AchievementMaturity.RESEARCH.getDesc());
|
|
|
|
|
+ } else if (AchievementMaturity.SAMPLE.getCode().equals(maturity)) {
|
|
|
|
|
+ list.get(i).setMaturityS(AchievementMaturity.SAMPLE.getDesc());
|
|
|
|
|
+ } else if (AchievementMaturity.PRIMARYTEST.getCode().equals(maturity)) {
|
|
|
|
|
+ list.get(i).setMaturityS(AchievementMaturity.PRIMARYTEST.getDesc());
|
|
|
|
|
+ } else if (AchievementMaturity.INTERMEDIATETEST.getCode().equals(maturity)) {
|
|
|
|
|
+ list.get(i).setMaturityS(AchievementMaturity.INTERMEDIATETEST.getDesc());
|
|
|
|
|
+ } else if (AchievementMaturity.MASSPRODUCTION.getCode().equals(maturity)) {
|
|
|
|
|
+ list.get(i).setMaturityS(AchievementMaturity.MASSPRODUCTION.getDesc());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ res.setData(achievementSearchList);
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -126,8 +154,7 @@ public class PortalSearchController extends BaseController {
|
|
|
if (UserType.PERSONAL.getCode().equals(type)) {
|
|
if (UserType.PERSONAL.getCode().equals(type)) {
|
|
|
res.setData(userIdentityService.listSubscriber(name, level, field, province, city, area, pNo, pSize));
|
|
res.setData(userIdentityService.listSubscriber(name, level, field, province, city, area, pNo, pSize));
|
|
|
} else {
|
|
} else {
|
|
|
- res.setData(
|
|
|
|
|
- organizationIdentityService.listSubscriber(name, level, field, province, city, area, pNo, pSize));
|
|
|
|
|
|
|
+ res.setData(organizationIdentityService.listSubscriber(name, level, field, province, city, area, pNo, pSize));
|
|
|
}
|
|
}
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|