| 
						
						
							
								
							
						
						
					 | 
					@ -81,6 +81,13 @@ public class IcPartyMemberPointServiceImpl extends BaseServiceImpl<IcPartyMember | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Transactional(rollbackFor = Exception.class) | 
					 | 
					 | 
					    @Transactional(rollbackFor = Exception.class) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public void save(IcPartyMemberPointDTO dto) { | 
					 | 
					 | 
					    public void save(IcPartyMemberPointDTO dto) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        IcPartyMemberPointEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyMemberPointEntity.class); | 
					 | 
					 | 
					        IcPartyMemberPointEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyMemberPointEntity.class); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        dto.setTotalScore(dto.getBasePoint() + dto.getInspirePoint() + dto.getReviewPoint()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        if (dto.getWarnPoint() > 0) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            dto.setTotalScore(dto.getTotalScore() - dto.getWarnPoint()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } else { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            dto.setTotalScore(dto.getTotalScore() + dto.getWarnPoint()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        baseDao.updateMember(dto.getPartyMemberId(), dto.getTotalScore()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        insert(entity); | 
					 | 
					 | 
					        insert(entity); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -111,36 +118,9 @@ public class IcPartyMemberPointServiceImpl extends BaseServiceImpl<IcPartyMember | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public List<PartyMemberPointListResultDTO> getList(PartyMemberPointListFormDTO form, TokenDto tokenDto) { | 
					 | 
					 | 
					    public List<PartyMemberPointListResultDTO> getList(PartyMemberPointListFormDTO form, TokenDto tokenDto) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        List<PartyMemberPointListResultDTO> dto = baseDao.getList(form.getIdCard(), form.getMobile(), form.getName(), | 
					 | 
					 | 
					        List<PartyMemberPointListResultDTO> dto = baseDao.getList(form.getIdCard(), form.getMobile(), form.getName(), | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                form.getOrgId(), form.getYear(), tokenDto.getCustomerId()); | 
					 | 
					 | 
					                form.getOrgId(), form.getYear(), tokenDto.getCustomerId()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        List<PartyMemberPointListCountDTO> count = baseDao.getListCount(form.getYear(), tokenDto.getCustomerId()); | 
					 | 
					 | 
					        dto.forEach(item -> { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        // 处理统计的平均值
 | 
					 | 
					 | 
					            item.setTotalScore(item.getTotalScore() / item.getQuarter()); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        for (int i = 0; i < dto.size(); i++) { | 
					 | 
					 | 
					        }); | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					            // 基础积分分值平均值
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            if (dto.get(i).getBasePoint() != null && count.get(i).getBasePointCount() != NumConstant.ZERO) { | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                dto.get(i).setBasePoint(dto.get(i).getBasePoint() / count.get(i).getBasePointCount()); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } else { | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                dto.get(i).setBasePoint(NumConstant.ZERO); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            // 民主评议积分分值
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            if (dto.get(i).getInspirePoint() != null && count.get(i).getInspirePointCount() != NumConstant.ZERO) { | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                dto.get(i).setInspirePoint(dto.get(i).getInspirePoint() / count.get(i).getInspirePointCount()); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } else { | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                dto.get(i).setInspirePoint(NumConstant.ZERO); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            // 激励积分分值
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            if (dto.get(i).getReviewPoint() != null && count.get(i).getReviewPointCount() != NumConstant.ZERO) { | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                dto.get(i).setReviewPoint(dto.get(i).getReviewPoint() / count.get(i).getReviewPointCount()); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } else { | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                dto.get(i).setReviewPoint(NumConstant.ZERO); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            // 警示扣分分值
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            if (dto.get(i).getWarnPoint() != null && count.get(i).getWarnPointCount() != NumConstant.ZERO) { | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                dto.get(i).setWarnPoint(dto.get(i).getWarnPoint() / count.get(i).getWarnPointCount()); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } else { | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                dto.get(i).setWarnPoint(NumConstant.ZERO); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            // 总分
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            dto.get(i).setTotalScore(dto.get(i).getBasePoint() + dto.get(i).getInspirePoint() + dto.get(i).getReviewPoint() + dto.get(i).getWarnPoint()); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        return dto; | 
					 | 
					 | 
					        return dto; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -167,11 +147,15 @@ public class IcPartyMemberPointServiceImpl extends BaseServiceImpl<IcPartyMember | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @date 2022/5/24 14:26 | 
					 | 
					 | 
					     * @date 2022/5/24 14:26 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     */ | 
					 | 
					 | 
					     */ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					    public PageData<PartyMemberPointExportResultDTO> getExport(PartyMemberExportFormDTO form,String customerId) { | 
					 | 
					 | 
					    public PageData<PartyMemberPointListResultDTO> getExport(PartyMemberPointListFormDTO form, TokenDto tokenDto) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        PageHelper.startPage(form.getPageNo(), form.getPageSize(), form.getIsPage()); | 
					 | 
					 | 
					        PageHelper.startPage(form.getPageNo(), form.getPageSize(), form.getIsPage()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        List<PartyMemberPointExportResultDTO> dto = baseDao.getExport(form,customerId); | 
					 | 
					 | 
					        List<PartyMemberPointListResultDTO> dto = baseDao.getList(form.getIdCard(), form.getMobile(), form.getName(), | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					
 | 
					 | 
					 | 
					                form.getOrgId(), form.getYear(), tokenDto.getCustomerId()); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        PageInfo<PartyMemberPointExportResultDTO> pageInfo = new PageInfo<>(dto); | 
					 | 
					 | 
					        // 算总分
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        dto.forEach(item -> { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            item.setTotalScore(item.getTotalScore() / item.getQuarter()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        }); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        PageInfo<PartyMemberPointListResultDTO> pageInfo = new PageInfo<>(dto); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        return new PageData<>(dto, pageInfo.getTotal()); | 
					 | 
					 | 
					        return new PageData<>(dto, pageInfo.getTotal()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |