|  | @ -1,6 +1,7 @@ | 
			
		
	
		
		
			
				
					|  |  | package com.epmet.service.impl; |  |  | package com.epmet.service.impl; | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.utils.Result; |  |  | import com.epmet.commons.tools.utils.Result; | 
			
		
	
		
		
			
				
					|  |  |  |  |  | import com.epmet.constant.ReginConstant; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.dao.CustomerHomeDao; |  |  | import com.epmet.dao.CustomerHomeDao; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.dao.CustomerHomeDetailDao; |  |  | import com.epmet.dao.CustomerHomeDetailDao; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.dao.HomeComponentDao; |  |  | import com.epmet.dao.HomeComponentDao; | 
			
		
	
	
		
		
			
				
					|  | @ -42,23 +43,30 @@ public class HomeServiceImpl implements HomeService { | 
			
		
	
		
		
			
				
					|  |  |     @Override |  |  |     @Override | 
			
		
	
		
		
			
				
					|  |  |     public Result<HomeDesignByCustomerResultDTO> getHomeDesignByCustomer(HomeDesignByCustomerFormDTO formDTO) { |  |  |     public Result<HomeDesignByCustomerResultDTO> getHomeDesignByCustomer(HomeDesignByCustomerFormDTO formDTO) { | 
			
		
	
		
		
			
				
					|  |  |         HomeDesignByCustomerResultDTO resultDTO = new HomeDesignByCustomerResultDTO(); |  |  |         HomeDesignByCustomerResultDTO resultDTO = new HomeDesignByCustomerResultDTO(); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         //根据客户id,所属端获取客户首页配置的设计稿
 | 
			
		
	
		
		
			
				
					|  |  |         List<CommonComponentDesignResultDTO> list = customerHomeDetailDao.getCustomerHomeDetailComponent(formDTO); |  |  |         List<CommonComponentDesignResultDTO> list = customerHomeDetailDao.getCustomerHomeDetailComponent(formDTO); | 
			
		
	
		
		
			
				
					
					|  |  |         List<CommonComponentDesignResultDTO> flist=new ArrayList<CommonComponentDesignResultDTO>();//功能组件
 |  |  |         List<CommonComponentDesignResultDTO> titlelist=new ArrayList<CommonComponentDesignResultDTO>(); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |         List<String> usedComponent=new ArrayList<>();//使用的组件集合
 |  |  |         List<CommonComponentDesignResultDTO> toplist=new ArrayList<CommonComponentDesignResultDTO>(); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					|  |  |  |  |  |         List<CommonComponentDesignResultDTO> functionlist=new ArrayList<CommonComponentDesignResultDTO>(); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         List<CommonComponentDesignResultDTO> floatlist=new ArrayList<CommonComponentDesignResultDTO>(); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         List<String> usedComponent=new ArrayList<>();//使用过的组件集合
 | 
			
		
	
		
		
			
				
					|  |  |         for(CommonComponentDesignResultDTO c:list){ |  |  |         for(CommonComponentDesignResultDTO c:list){ | 
			
		
	
		
		
			
				
					|  |  |             usedComponent.add(c.getComponentId()); |  |  |             usedComponent.add(c.getComponentId()); | 
			
		
	
		
		
			
				
					|  |  |             //所属区域:0.标题区、1.置顶区、2.功能区、3.悬浮区
 |  |  |             //所属区域:0.标题区、1.置顶区、2.功能区、3.悬浮区
 | 
			
		
	
		
		
			
				
					
					|  |  |             if("0".equals(c.getRegion())){ |  |  |             if(ReginConstant.titleList.equals(c.getRegion())){ | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |                 resultDTO.setTitleList(c); |  |  |                 titlelist.add(c); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |             }else if("1".equals(c.getRegion())){ |  |  |             }else if(ReginConstant.topList.equals(c.getRegion())){ | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |                 resultDTO.setTopList(c); |  |  |                 toplist.add(c); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |             }else if("2".equals(c.getRegion())){ |  |  |             }else if(ReginConstant.functionList.equals(c.getRegion())){ | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |                 flist.add(c); |  |  |                 functionlist.add(c); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |             }else if("3".equals(c.getRegion())){ |  |  |             }else if(ReginConstant.floatingList.equals(c.getRegion())){ | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |                 resultDTO.setFloatingList(c); |  |  |                 floatlist.add(c); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					|  |  |             } |  |  |             } | 
			
		
	
		
		
			
				
					|  |  |         } |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |         resultDTO.setFunctionList(flist); |  |  |         resultDTO.setTitleList(titlelist); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |  |  |  |         resultDTO.setTopList(toplist); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         resultDTO.setFloatingList(floatlist); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         resultDTO.setFunctionList(functionlist); | 
			
		
	
		
		
			
				
					|  |  |         resultDTO.setUsedComponentIdList(usedComponent); |  |  |         resultDTO.setUsedComponentIdList(usedComponent); | 
			
		
	
		
		
			
				
					|  |  |         return new Result<HomeDesignByCustomerResultDTO>().ok(resultDTO); |  |  |         return new Result<HomeDesignByCustomerResultDTO>().ok(resultDTO); | 
			
		
	
		
		
			
				
					|  |  |     } |  |  |     } | 
			
		
	
	
		
		
			
				
					|  | 
 |