| 
					
				 | 
			
			
				@ -28,7 +28,10 @@ import com.yihu.jw.wechat.dao.WxTemplateConfigDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.wechat.enterprise.EnterpriseService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.wechat.enterprise.dao.WxEnterpriseUserDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.wechat.service.WxAccessTokenService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.utils.network.HttpResponse; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.utils.network.HttpUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import jxl.write.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.apache.commons.collections.map.HashedMap; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.apache.commons.lang3.StringUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.slf4j.Logger; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.slf4j.LoggerFactory; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -5051,4 +5054,44 @@ public class DailyReportUploadService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        label.setCellFormat(cellFormat); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        ws.addCell(label); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public JSONObject select(String doctorId,String startDate,String endDate,String dept) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sqlCondition = ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (StringUtils.isNoneBlank(dept)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sqlCondition = " SELECT d.zt_id as ztId FROM base_doctor d LEFT JOIN base_doctor_hospital dh ON d.id=dh.doctor_code where dh.dept_code='"+dept+"' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (!StringUtils.isNoneBlank(dept)&&StringUtils.isNoneBlank(doctorId)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sqlCondition = " SELECT d.zt_id as ztId FROM base_doctor d where d.id = '"+doctorId+"' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<Map<String,Object>> mapList = jdbcTemplate.queryForList(sqlCondition); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String str = ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (mapList!=null&&mapList.size()!=0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            for (Map<String,Object> map:mapList){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                str = "'"+map.get("ztId")+"',"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        str = str.substring(0,str.length()-1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sql = "SELECT count(1) as total FROM zt_bug  where resolvedBy in ("+str+") "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String url = "http://172.19.103.134:10023/ykyy/jdbcSQLQuery"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Map<String,Object> params = new HashedMap(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        params.put("sql",sql); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        HttpResponse response = HttpUtils.doGet(url,params); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String content = response.getContent(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        logger.info("response:"+content); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        JSONObject rs = JSON.parseObject(content); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String total = "0";//总bug数; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Integer status = rs.getInteger("status"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(status!=null&&status == 200){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            JSONArray array = rs.getJSONArray("detailModelList"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (array!=null&&array.size()!=0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                JSONObject jsonObject = array.getJSONObject(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                total = jsonObject.getString("total"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String yijiejueSql = "SELECT count(1) as total FROM zt_bug  where resolvedBy in ("+str+") "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				} 
			 |