|
@ -307,8 +307,10 @@ public class SignPatientLabelInfoService extends BaseService {
|
|
|
" t1.doctor = ? " +
|
|
|
" OR t1.doctor_health = ? " +
|
|
|
" ) " +
|
|
|
" AND t1. STATUS > 0 " +
|
|
|
" AND t1.admin_team_code = ?" ;
|
|
|
" AND t1. STATUS > 0 AND t1.admin_team_code = ?";
|
|
|
if(isSlowDisease){
|
|
|
sql = sql + " AND p.diease >0 " ;
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(diseaseCondition)){
|
|
|
sql = sql + " AND p.disease_condition ="+diseaseCondition;
|
|
|
}
|
|
@ -536,11 +538,11 @@ public class SignPatientLabelInfoService extends BaseService {
|
|
|
//判断微信绑定情况
|
|
|
re = openid1.compareTo(openid2);
|
|
|
}else{
|
|
|
re = diseaseCondition1 - diseaseCondition2;
|
|
|
re = diseaseCondition2 - diseaseCondition1;
|
|
|
}
|
|
|
|
|
|
}else{
|
|
|
re = disease1 - disease2;
|
|
|
re = disease2 - disease1;
|
|
|
}
|
|
|
|
|
|
}else{
|
|
@ -3582,7 +3584,7 @@ public class SignPatientLabelInfoService extends BaseService {
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public JSONArray getPatientByTeamCodeExitDoctor(long teamCode, String labelCode, String labelType, int page, int pagesize, boolean sortByStandardStatus, String diseaseCondition) throws Exception {
|
|
|
public JSONArray getPatientByTeamCodeExitDoctor(long teamCode, String labelCode, String labelType, int page, int pagesize, boolean isSlowDisease, String diseaseCondition) throws Exception {
|
|
|
|
|
|
Map<String, JSONObject> result = new TreeMap<>();
|
|
|
List<Map<String, Object>> signList = new ArrayList<>();
|
|
@ -3642,6 +3644,9 @@ public class SignPatientLabelInfoService extends BaseService {
|
|
|
}else{
|
|
|
args = new Object[]{teamCode};
|
|
|
}
|
|
|
if(isSlowDisease){
|
|
|
sql = sql + " AND p.disease >0 ";
|
|
|
}
|
|
|
sql = sql +
|
|
|
" ) f " +
|
|
|
"WHERE " +
|
|
@ -3880,11 +3885,11 @@ public class SignPatientLabelInfoService extends BaseService {
|
|
|
//判断微信绑定情况
|
|
|
re = openid1.compareTo(openid2);
|
|
|
}else{
|
|
|
re = diseaseCondition1 - diseaseCondition2;
|
|
|
re = diseaseCondition2 - diseaseCondition1;
|
|
|
}
|
|
|
|
|
|
}else{
|
|
|
re = disease1 - disease2;
|
|
|
re = disease2 - disease1;
|
|
|
}
|
|
|
|
|
|
}else{
|
|
@ -4092,10 +4097,11 @@ public class SignPatientLabelInfoService extends BaseService {
|
|
|
" (t1.doctor = ? or t1.doctor_health = ?) " +
|
|
|
" AND t1.status > 0 " +
|
|
|
" AND t2.status = 1) " +
|
|
|
(StringUtils.isNotEmpty(labelCode) ? " AND t2.label = ? " : " AND (t2.label = 4 or t2.label = 5 )") +
|
|
|
(StringUtils.isNotEmpty(labelCode) ? " AND t2.label = ? " : "") +
|
|
|
(StringUtils.isNotEmpty(labelType) ? " AND t2.label_type = ? " : "") +
|
|
|
(teamCode > 0 ? (" AND admin_team_code = " + teamCode) : "")+
|
|
|
(StringUtils.isNotEmpty(diseaseCondition) ? " AND t3.diseaseCondition = ? " : "");
|
|
|
sql = sql + " AND t3.disease > 0 AND t3.status > 0 ";
|
|
|
|
|
|
if (matcher.find()) {
|
|
|
sql = sql + " AND (t1.idcard like ?) ";
|
|
@ -4344,7 +4350,7 @@ public class SignPatientLabelInfoService extends BaseService {
|
|
|
" AND" +
|
|
|
(isIdcard ? " p.idcard like ? " : " t1.name like ? ");
|
|
|
|
|
|
sqlTemp = sqlTemp + " AND p.disease_condition = "+diseaseCondition;
|
|
|
sqlTemp = sqlTemp + " AND p.disease_condition = "+diseaseCondition+" AND p.diease >0 AND p.status >0 ";
|
|
|
|
|
|
String sql = sqlTemp + " order by t2.diseaseCondition,t2.disease,t2,diseaseCondition,t2.openid desc limit " + page + "," + pagesize;
|
|
|
signList = jdbcTemplate.queryForList(sql, args);
|