|
|
@@ -166,22 +166,54 @@ public class PortalController extends BaseController {
|
|
|
public ModelAndView portalActivityDetails(ModelAndView modelAndView){
|
|
|
modelAndView.setViewName("/portal/invRegister");
|
|
|
//随机项目抵用券
|
|
|
- List<JtVoucherListBo> list=voucherService.selectVoucherByClassify( null,null, 4);
|
|
|
- for (JtVoucherListBo j : list) {
|
|
|
- System.out.println(j.getMoney());
|
|
|
+ List<JtVoucherListBo> vlist=voucherService.selectVoucherByClassify( null,null, 4);
|
|
|
+ for (JtVoucherListBo j : vlist) {
|
|
|
+ if (j.getName().length()>12) {
|
|
|
+ j.setName(j.getName().substring(0, 11)+"…");
|
|
|
+ }
|
|
|
}
|
|
|
- modelAndView.addObject("vouchers",list);
|
|
|
+ modelAndView.addObject("vouchers",vlist);
|
|
|
//高企服务
|
|
|
- modelAndView.addObject( "gqfw",jtBusinessService.getKJListByIds(2, 0, 2));
|
|
|
+ List<JtBusinessProject> glist=jtBusinessService.getKJListByIds(2, 0, 2);
|
|
|
+ for (JtBusinessProject j : glist) {
|
|
|
+ if (j.getName().length()>5) {
|
|
|
+ j.setName(j.getName().substring(0, 4)+"…");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ modelAndView.addObject( "gqfw",glist);
|
|
|
//随机热门项目
|
|
|
Pagination<JtBusinessProjectResult> p=jtBusinessService.getProjects(null,null,null,null, 3,1,null,2,null,1,null,null,null);
|
|
|
- modelAndView.addObject("hotProject", (List<JtBusinessProjectResult>) p.getList());
|
|
|
+ List<JtBusinessProjectResult> plist=(List<JtBusinessProjectResult>) p.getList();
|
|
|
+ for (JtBusinessProjectResult j : plist) {
|
|
|
+ if (j.getName().length()>8) {
|
|
|
+ j.setName(j.getName().substring(0, 7)+"…");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ modelAndView.addObject("hotProject",plist);
|
|
|
//军民融合
|
|
|
- modelAndView.addObject( "jmrh",jtBusinessService.getKJListByIds(3, 0, 3));
|
|
|
+ List<JtBusinessProject> jlist=jtBusinessService.getKJListByIds(3, 0, 3);
|
|
|
+ for (JtBusinessProject j : jlist) {
|
|
|
+ if (j.getName().length()>12) {
|
|
|
+ j.setName(j.getName().substring(0, 11)+"…");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ modelAndView.addObject( "jmrh",jlist);
|
|
|
//知识产权
|
|
|
- modelAndView.addObject( "zscq",jtBusinessService.getKJListByIds(1, 0, 3));
|
|
|
+ List<JtBusinessProject> zlist=jtBusinessService.getKJListByIds(1, 0, 3);
|
|
|
+ for (JtBusinessProject j : zlist) {
|
|
|
+ if (j.getName().length()>8) {
|
|
|
+ j.setName(j.getName().substring(0, 7)+"…");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ modelAndView.addObject( "zscq",zlist);
|
|
|
//政府扶持
|
|
|
- modelAndView.addObject( "zffc",jtBusinessService.getProjectByTag("政府扶持", 4));
|
|
|
+ List<JtBusinessProject> zfList=jtBusinessService.getProjectByTag("政府扶持", 4);
|
|
|
+ for (JtBusinessProject j : zlist) {
|
|
|
+ if (j.getName().length()>11) {
|
|
|
+ j.setName(j.getName().substring(0, 10)+"…");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ modelAndView.addObject( "zffc",zfList);
|
|
|
|
|
|
|
|
|
return modelAndView;
|