|
@ -367,44 +367,46 @@ public class HealthEducationArticleService extends BaseService{
|
|
|
// return null;
|
|
|
// }
|
|
|
|
|
|
// public JSONArray labelWithPushPatients(String labelType){
|
|
|
//
|
|
|
// String sql = "";
|
|
|
// List<DictModel> returnList = null;
|
|
|
// switch (labelType) {
|
|
|
// case "1": {
|
|
|
// sql = "select s.code code,s.name name from wlyy_sign_dict s where s.year='2017' order by s.sort asc";
|
|
|
// returnList = jdbcTemplate.query(sql, new BeanPropertyRowMapper(DictModel.class));
|
|
|
// sql = "select count(DISTINCT(w.patient)) as num from wlyy_sign_family w "+
|
|
|
// " left join wlyy_sign_family_server s on w.code= s.sign_code "+
|
|
|
// " left join wlyy_patient p on p.code=w.patient "+
|
|
|
// " where w.status>0 and p.town='350211' ";
|
|
|
// for(DictModel one:returnList){
|
|
|
// sql +=" s.server_type='"+one.getCode()+"'";
|
|
|
// Map<String, Object> map = jdbcTemplate.queryForMap(sql);
|
|
|
// JSONObject obj = new JSONObject();
|
|
|
// obj.put("code",one.getCode());
|
|
|
// obj.put("name",one.getName());
|
|
|
// obj.put("num",(Long)map.get("num"));
|
|
|
// }
|
|
|
// break;
|
|
|
// }
|
|
|
// case "2": {
|
|
|
// sql = "select label_code code, label_name name from wlyy_sign_patient_label where label_type=2 and status=1";
|
|
|
// break;
|
|
|
// }
|
|
|
// case "3": {
|
|
|
// sql = "select label_code code, label_name name from wlyy_sign_patient_label where label_type=3 and status=1";
|
|
|
// break;
|
|
|
// }
|
|
|
// case "4": {
|
|
|
// sql = "select label_code code, label_name name from wlyy_sign_patient_label where label_type=4 and status=1";
|
|
|
// break;
|
|
|
// }
|
|
|
//
|
|
|
// }
|
|
|
// return null;
|
|
|
// }
|
|
|
public JSONArray labelWithPushPatients(String labelType){
|
|
|
|
|
|
String sql = "";
|
|
|
List<DictModel> returnList = null;
|
|
|
JSONArray re = new JSONArray();
|
|
|
switch (labelType) {
|
|
|
case "1": {
|
|
|
sql = "select s.code code,s.name name from wlyy_sign_dict s where s.year='2017' order by s.sort asc";
|
|
|
returnList = jdbcTemplate.query(sql, new BeanPropertyRowMapper(DictModel.class));
|
|
|
sql = "select count(DISTINCT(w.patient)) as num from wlyy_sign_family w "+
|
|
|
" left join wlyy_sign_family_server s on w.code= s.sign_code "+
|
|
|
" left join wlyy_patient p on p.code=w.patient "+
|
|
|
" where w.status>0 and p.town='350211' ";
|
|
|
for(DictModel one:returnList){
|
|
|
sql +=" s.server_type='"+one.getCode()+"'";
|
|
|
Map<String, Object> map = jdbcTemplate.queryForMap(sql);
|
|
|
JSONObject obj = new JSONObject();
|
|
|
obj.put("code",one.getCode());
|
|
|
obj.put("name",one.getName());
|
|
|
obj.put("num",(Long)map.get("num"));
|
|
|
re.add(obj);
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
case "2": {
|
|
|
sql = "select label_code code, label_name name from wlyy_sign_patient_label where label_type=2 and status=1";
|
|
|
break;
|
|
|
}
|
|
|
case "3": {
|
|
|
sql = "select label_code code, label_name name from wlyy_sign_patient_label where label_type=3 and status=1";
|
|
|
break;
|
|
|
}
|
|
|
case "4": {
|
|
|
sql = "select label_code code, label_name name from wlyy_sign_patient_label where label_type=4 and status=1";
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
}
|
|
|
return re;
|
|
|
}
|
|
|
|
|
|
public JSONArray pushArticleLogs(int page, int pagesize,String patientCode)throws Exception{
|
|
|
|