| 
					
				 | 
			
			
				@ -1,6 +1,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				package com.yihu.wlyy.web.common.util; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.wlyy.job.QuartzHelper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.wlyy.job.SignEndJob; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.wlyy.job.consult.FamousConsultTimesJob; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.wlyy.service.app.disease.PatientDiseaseService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.wlyy.service.app.scheduling.DoctorWorkTimeService; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -245,45 +246,23 @@ public class ManagerUtilController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @RequestMapping(value = "/patient") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public String getPatientInfo() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            OutputStream out = new FileOutputStream("D:\\city.properties"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String sql = "select code, name from dm_city"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                List<Map<String, Object>> patients = jdbcTemplate.queryForList(sql); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                for (Map<String, Object> map : patients) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    writer.write(map.get("code").toString() + "=" + map.get("name").toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    writer.newLine(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                JSONObject log = new JSONObject(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				// 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                log.put("time", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS").format(new Date())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                log.put("logType", 2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                log.put("caller", ""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				// 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                JSONObject data = new JSONObject(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				// 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                data.put("businessType", 6); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                data.put("patient", map.get("code")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                data.put("data", new JSONObject(map)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				// 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                log.put("data", data); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                writer.flush(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } catch (Exception e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                throw new Exception(e.getMessage()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } finally { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                writer.close(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                out.close(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * 开始名医咨询剩余次数统计任务 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @RequestMapping(value = "/start_sign_end_job") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public String startSignEndJob() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (!quartzHelper.isExistJob("sign_end_job")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                quartzHelper.addJob(SignEndJob.class, "0 45 10 * * ?", "sign_end_job", new HashMap<String, Object>()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                return write(200, "启动成功"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                return write(200, "任务已存在"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return write(200, "成功"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } catch (Exception e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            e.printStackTrace(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return error(-1, "失败"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return error(-1, "启动失败"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				} 
			 |