| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -190,7 +190,10 @@ public class PrUserProjectServiceImpl extends BaseServiceImpl<PrUserProjectDao, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                orgIds = joint(pids,agencyId,gridList); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            }else { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                String selfOrg = pids + ":" + agencyId; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                String selfOrg = agencyId; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                if (StringUtils.isNotBlank(pids)){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    selfOrg = pids + ":" + agencyId; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                orgIds.add(selfOrg); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        }else { | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -251,6 +254,13 @@ public class PrUserProjectServiceImpl extends BaseServiceImpl<PrUserProjectDao, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            r.setOrgName(orgName); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        PrVistRecordDTO param = new PrVistRecordDTO(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        param.setCustomerId(formDTO.getCustomerId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        param.setUserId(formDTO.getUserId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        param.setUserType(formDTO.getClient()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        param.setCustomerId(formDTO.getCustomerId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        prVistRecordService.insertOrUpdate(param); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return result; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -580,8 +590,8 @@ public class PrUserProjectServiceImpl extends BaseServiceImpl<PrUserProjectDao, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                //按照星星大小升序排列
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                this.sortMap(starMap, true); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                //2、平均分
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                detail.put("avgStarNum", new BigDecimal((float)totalStarNum / validTotal).setScale(0, BigDecimal.ROUND_HALF_UP)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                //2、平均分 (09.30,产品需求:直接显示平均星数,保留小数点后两位,无需四舍五入)
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                detail.put("avgStarNum", new BigDecimal((float)totalStarNum / validTotal).setScale(2, BigDecimal.ROUND_DOWN)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                //3、几条有效记录
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                detail.put("validTotal", validTotal); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                //4、得分列表
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -794,7 +804,7 @@ public class PrUserProjectServiceImpl extends BaseServiceImpl<PrUserProjectDao, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            result.setRedPoint(NumConstant.ONE_STR); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            return result; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (list.get(0).getCreatedTime().compareTo(visitRecord.getCreatedTime()) > 0) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (list.get(0).getCreatedTime().compareTo(visitRecord.getUpdatedTime()) > 0) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            result.setRedPoint(NumConstant.ONE_STR); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } else { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            result.setRedPoint(NumConstant.ZERO_STR); | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -808,4 +818,4 @@ public class PrUserProjectServiceImpl extends BaseServiceImpl<PrUserProjectDao, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        query.eq(PrUserProjectEntity::getKey, key); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return baseDao.selectOne(query); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					} | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
					 | 
				
				 | 
				
					
  |