| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -24,12 +24,11 @@ import com.epmet.commons.tools.constant.NumConstant; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.page.PageData; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.utils.ConvertUtils; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.constant.FieldConstant; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.modules.group.dao.ResiGroupMilestoneStatsDao; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.modules.group.entity.ResiGroupMilestoneStatsEntity; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.modules.group.service.ResiGroupMilestoneStatsService; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.resi.group.dto.group.ResiGroupMilestoneStatsDTO; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.modules.group.dao.ResiGroupAchievementStatsDao; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.modules.group.entity.ResiGroupAchievementStatsEntity; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.modules.group.service.ResiGroupAchievementStatsService; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.resi.group.dto.group.ResiGroupAchievementStatsDTO; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import org.apache.commons.lang3.StringUtils; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import org.springframework.beans.factory.annotation.Autowired; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import org.springframework.stereotype.Service; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import org.springframework.transaction.annotation.Transactional; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -44,51 +43,51 @@ import java.util.Map; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					 * @since v1.0.0 2021-04-19 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					 */ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					@Service | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					public class ResiGroupMilestoneStatsServiceImpl extends BaseServiceImpl<ResiGroupMilestoneStatsDao, ResiGroupMilestoneStatsEntity> implements ResiGroupMilestoneStatsService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					public class ResiGroupAchievementStatsServiceImpl extends BaseServiceImpl<ResiGroupAchievementStatsDao, ResiGroupAchievementStatsEntity> implements ResiGroupAchievementStatsService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Override | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public PageData<ResiGroupMilestoneStatsDTO> page(Map<String, Object> params) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        IPage<ResiGroupMilestoneStatsEntity> page = baseDao.selectPage( | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public PageData<ResiGroupAchievementStatsDTO> page(Map<String, Object> params) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        IPage<ResiGroupAchievementStatsEntity> page = baseDao.selectPage( | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                getPage(params, FieldConstant.CREATED_TIME, false), | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                getWrapper(params) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        ); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return getPageData(page, ResiGroupMilestoneStatsDTO.class); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return getPageData(page, ResiGroupAchievementStatsDTO.class); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Override | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public List<ResiGroupMilestoneStatsDTO> list(Map<String, Object> params) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<ResiGroupMilestoneStatsEntity> entityList = baseDao.selectList(getWrapper(params)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public List<ResiGroupAchievementStatsDTO> list(Map<String, Object> params) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<ResiGroupAchievementStatsEntity> entityList = baseDao.selectList(getWrapper(params)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return ConvertUtils.sourceToTarget(entityList, ResiGroupMilestoneStatsDTO.class); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return ConvertUtils.sourceToTarget(entityList, ResiGroupAchievementStatsDTO.class); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    private QueryWrapper<ResiGroupMilestoneStatsEntity> getWrapper(Map<String, Object> params){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    private QueryWrapper<ResiGroupAchievementStatsEntity> getWrapper(Map<String, Object> params){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        String id = (String)params.get(FieldConstant.ID_HUMP); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        QueryWrapper<ResiGroupMilestoneStatsEntity> wrapper = new QueryWrapper<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        QueryWrapper<ResiGroupAchievementStatsEntity> wrapper = new QueryWrapper<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return wrapper; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Override | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public ResiGroupMilestoneStatsDTO get(String id) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        ResiGroupMilestoneStatsEntity entity = baseDao.selectById(id); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return ConvertUtils.sourceToTarget(entity, ResiGroupMilestoneStatsDTO.class); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public ResiGroupAchievementStatsDTO get(String id) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        ResiGroupAchievementStatsEntity entity = baseDao.selectById(id); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return ConvertUtils.sourceToTarget(entity, ResiGroupAchievementStatsDTO.class); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Override | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Transactional(rollbackFor = Exception.class) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public void save(ResiGroupMilestoneStatsDTO dto) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        ResiGroupMilestoneStatsEntity entity = ConvertUtils.sourceToTarget(dto, ResiGroupMilestoneStatsEntity.class); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public void save(ResiGroupAchievementStatsDTO dto) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        ResiGroupAchievementStatsEntity entity = ConvertUtils.sourceToTarget(dto, ResiGroupAchievementStatsEntity.class); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        insert(entity); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Override | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Transactional(rollbackFor = Exception.class) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public void update(ResiGroupMilestoneStatsDTO dto) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        ResiGroupMilestoneStatsEntity entity = ConvertUtils.sourceToTarget(dto, ResiGroupMilestoneStatsEntity.class); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public void update(ResiGroupAchievementStatsDTO dto) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        ResiGroupAchievementStatsEntity entity = ConvertUtils.sourceToTarget(dto, ResiGroupAchievementStatsEntity.class); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        updateById(entity); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -108,14 +107,14 @@ public class ResiGroupMilestoneStatsServiceImpl extends BaseServiceImpl<ResiGrou | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     * @date 2021/4/19 15:15 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     */ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Override | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public List<ResiGroupMilestoneStatsDTO> getAchieved(String groupId) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        QueryWrapper<ResiGroupMilestoneStatsEntity> wrapper = new QueryWrapper<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public List<ResiGroupAchievementStatsDTO> getAchieved(String groupId) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        QueryWrapper<ResiGroupAchievementStatsEntity> wrapper = new QueryWrapper<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        wrapper.eq("GROUP_ID", groupId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        wrapper.eq("IS_ARRIVE", NumConstant.ONE); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        wrapper.eq("DEL_FLAG", NumConstant.ZERO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        wrapper.orderByDesc("ARRIVE_TIME"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<ResiGroupMilestoneStatsEntity> list = baseDao.selectList(wrapper); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return ConvertUtils.sourceToTarget(list, ResiGroupMilestoneStatsDTO.class); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<ResiGroupAchievementStatsEntity> list = baseDao.selectList(wrapper); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return ConvertUtils.sourceToTarget(list, ResiGroupAchievementStatsDTO.class); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    /** | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -127,7 +126,7 @@ public class ResiGroupMilestoneStatsServiceImpl extends BaseServiceImpl<ResiGrou | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     * @date 2021/4/19 15:15 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     */ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Override | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public List<ResiGroupMilestoneStatsDTO> getUnAchieved(String groupId) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public List<ResiGroupAchievementStatsDTO> getUnAchieved(String groupId) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return baseDao.selectUnAchieved(groupId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 |