|  | @ -1,6 +1,8 @@
 | 
	
		
			
				|  |  | package com.yihu.wlyy.service.app.statistics;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | import com.yihu.wlyy.entity.address.Town;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.entity.consult.Evaluate;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.entity.consult.EvaluateScore;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.entity.doctor.team.admin.AdminTeam;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.entity.organization.Hospital;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.entity.statistics.PopulationBase;
 | 
	
	
		
			
				|  | @ -8,6 +10,8 @@ import com.yihu.wlyy.entity.statistics.WlyyQuotaResult;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.job.Constant;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.repository.address.CityDao;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.repository.address.TownDao;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.repository.consult.EvaluateDao;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.repository.consult.EvaluateScoreDao;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.repository.doctor.DoctorAdminTeamDao;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.repository.doctor.DoctorDao;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.repository.organization.HospitalDao;
 | 
	
	
		
			
				|  | @ -23,6 +27,7 @@ import org.springframework.data.redis.core.StringRedisTemplate;
 | 
	
		
			
				|  |  | import org.springframework.jdbc.core.BeanPropertyRowMapper;
 | 
	
		
			
				|  |  | import org.springframework.jdbc.core.JdbcTemplate;
 | 
	
		
			
				|  |  | import org.springframework.stereotype.Service;
 | 
	
		
			
				|  |  | import org.springframework.transaction.annotation.Transactional;
 | 
	
		
			
				|  |  | import org.springframework.util.StringUtils;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | import java.text.DecimalFormat;
 | 
	
	
		
			
				|  | @ -55,6 +60,10 @@ public class StatisticsAllService extends BaseService {
 | 
	
		
			
				|  |  |     private WlyyQuotaResultDao wlyyQuotaResultDao;
 | 
	
		
			
				|  |  |     @Autowired
 | 
	
		
			
				|  |  |     private SystemDictService systemDictService;
 | 
	
		
			
				|  |  |     @Autowired
 | 
	
		
			
				|  |  |     private EvaluateDao evaluateDao;
 | 
	
		
			
				|  |  |     @Autowired
 | 
	
		
			
				|  |  |     private EvaluateScoreDao evaluateScoreDao;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 获取时间戳
 | 
	
	
		
			
				|  | @ -2822,4 +2831,22 @@ public class StatisticsAllService extends BaseService {
 | 
	
		
			
				|  |  |         List<PopulationBase> peopleNum = jdbcTemplate.query(sql, new BeanPropertyRowMapper(PopulationBase.class), code, year);
 | 
	
		
			
				|  |  |         return peopleNum.get(0);
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     @Transactional
 | 
	
		
			
				|  |  |     public int cleanDoctorScore(){
 | 
	
		
			
				|  |  |         List<Evaluate> evaluates = evaluateDao.findByScoreZero();
 | 
	
		
			
				|  |  |         if(evaluates!=null&&evaluates.size()>0){
 | 
	
		
			
				|  |  |             for(Evaluate eva : evaluates){
 | 
	
		
			
				|  |  |                 List<EvaluateScore> scores =  evaluateScoreDao.findByConsultAndDoctor(eva.getConsult(),eva.getDoctor());
 | 
	
		
			
				|  |  |                 if(scores!=null&&scores.size()>0){
 | 
	
		
			
				|  |  |                     EvaluateScore score = scores.get(0);
 | 
	
		
			
				|  |  |                     if(score!=null){
 | 
	
		
			
				|  |  |                         eva.setScore(score.getScore().intValue());
 | 
	
		
			
				|  |  |                         evaluateDao.save(eva);
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         return 1;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | }
 |