|
|
@@ -17,6 +17,7 @@ import org.springframework.web.servlet.ModelAndView;
|
|
|
import org.springframework.web.servlet.view.RedirectView;
|
|
|
|
|
|
import com.goafanti.achievement.bo.AchievementListBo;
|
|
|
+import com.goafanti.achievement.service.AchievementInterestService;
|
|
|
import com.goafanti.achievement.service.AchievementService;
|
|
|
import com.goafanti.common.enums.AchievementBargainingMode;
|
|
|
import com.goafanti.common.enums.AchievementMaturity;
|
|
|
@@ -26,6 +27,7 @@ import com.goafanti.common.enums.UserType;
|
|
|
import com.goafanti.common.service.FieldGlossoryService;
|
|
|
import com.goafanti.core.shiro.token.TokenManager;
|
|
|
import com.goafanti.demand.bo.DemandListBo;
|
|
|
+import com.goafanti.demand.service.DemandInterestService;
|
|
|
import com.goafanti.demand.service.DemandService;
|
|
|
import com.goafanti.portal.bo.AchievementPortalDetailBo;
|
|
|
import com.goafanti.portal.bo.AchievementPortalSimilarListBo;
|
|
|
@@ -42,6 +44,8 @@ public class PortalController extends BaseController {
|
|
|
private DemandService demandService;
|
|
|
@Resource
|
|
|
private FieldGlossoryService fieldGlossoryService;
|
|
|
+ @Resource
|
|
|
+ private DemandInterestService demandInterestService;
|
|
|
|
|
|
private static final String UNIT = "万元";
|
|
|
|
|
|
@@ -74,6 +78,12 @@ public class PortalController extends BaseController {
|
|
|
public ModelAndView portalDemandDetail(String id, Integer type) {
|
|
|
ModelAndView mv = new ModelAndView();
|
|
|
DemandPortalDetailBo demand = null;
|
|
|
+ int countDemandInterest = demandInterestService.countDemandInterest(id);
|
|
|
+ if(demandInterestService.selectDemandInterestByUidAndDemandId(TokenManager.getUserId(),id) != null) {
|
|
|
+ mv.addObject("isInterester", 0);
|
|
|
+ }else{
|
|
|
+ mv.addObject("isInterester", 1);
|
|
|
+ };
|
|
|
if (UserType.PERSONAL.getCode().equals(type)) {
|
|
|
demand = demandService.findUserPortalDemandDetail(id);
|
|
|
} else if (UserType.ORGANIZATION.getCode().equals(type)) {
|
|
|
@@ -92,6 +102,7 @@ public class PortalController extends BaseController {
|
|
|
demand.setEmployerName(" ");
|
|
|
}
|
|
|
}
|
|
|
+ demand.setCountDemandInterest(countDemandInterest);
|
|
|
Integer industryCategoryA = demand.getIndustryCategoryA();
|
|
|
boolean hasCategoryA = false;
|
|
|
boolean hasCategoryB = false;
|
|
|
@@ -215,9 +226,7 @@ public class PortalController extends BaseController {
|
|
|
redemandlist.get(i).setPictureUrl(picurl[0]);
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- ;
|
|
|
-
|
|
|
+ };
|
|
|
mv.setViewName("/portal/technologyTrading/demandDetail");
|
|
|
mv.addObject("demand", demand);
|
|
|
mv.addObject("reboutiquedemand", reboutiquedemand);
|
|
|
@@ -241,7 +250,6 @@ public class PortalController extends BaseController {
|
|
|
if (null != achievementdetail) {
|
|
|
achievementdetail.setId(id);
|
|
|
achievementdetail.setOwnerType(String.valueOf(type));
|
|
|
- System.out.println(achievementdetail.getOwnerType());
|
|
|
Integer category = achievementdetail.getCategory();
|
|
|
if (null != category) {
|
|
|
if (category == 0) {
|
|
|
@@ -535,7 +543,6 @@ public class PortalController extends BaseController {
|
|
|
if (null != achievementdetail) {
|
|
|
achievementdetail.setId(id);
|
|
|
achievementdetail.setOwnerType(String.valueOf(type));
|
|
|
- System.out.println(achievementdetail.getOwnerType());
|
|
|
Integer category = achievementdetail.getCategory();
|
|
|
if (null != category) {
|
|
|
if (category == 0) {
|
|
|
@@ -711,6 +718,8 @@ public class PortalController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
mv.setViewName("/portal/technologyTrading/achievementOrder");
|
|
|
mv.addObject("achievementdetail", achievementdetail);
|
|
|
mv.addObject("reachievementlist", reachievementlist);
|
|
|
@@ -780,7 +789,7 @@ public class PortalController extends BaseController {
|
|
|
demand.setPictureUrl(picurl[0]);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/*--------------查询精品需求---------------*/
|
|
|
List<DemandListBo> boutiquedemand = demandService.selectDemandList(1);
|
|
|
List<DemandListBo> reboutiquedemand = new ArrayList<DemandListBo>();
|
|
|
@@ -862,14 +871,11 @@ public class PortalController extends BaseController {
|
|
|
redemandlist.get(i).setPictureUrl(picurl[0]);
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- ;
|
|
|
-
|
|
|
+ };
|
|
|
mv.setViewName("/portal/technologyTrading/demandOrder");
|
|
|
mv.addObject("demand", demand);
|
|
|
mv.addObject("reboutiquedemand", reboutiquedemand);
|
|
|
mv.addObject("redemandlist", redemandlist);
|
|
|
-
|
|
|
return mv;
|
|
|
}
|
|
|
}
|