|
@ -1926,7 +1926,7 @@ public class FamilyContractService extends BaseService {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
public JSONObject findByParamsWithDoctor(String doctorCode, String teamCode, String params) throws Exception {
|
|
|
public JSONObject findByParamsWithDoctor(String doctorCode, String teamCode, String params,int level) throws Exception {
|
|
|
JSONObject returnMap = new JSONObject();
|
|
|
String addressSql = "select a.signcode,a.name,a.address,a.code,a.hasopenid,a.idcard,a.photo from( SELECT " +
|
|
|
" sf.CODE signcode, " +
|
|
@ -1944,11 +1944,11 @@ public class FamilyContractService extends BaseService {
|
|
|
" AND sf. STATUS > 0 " +
|
|
|
// " and sf.doctor = ? " +
|
|
|
" and sf.admin_team_code = ? " +
|
|
|
" AND ( sf.doctor_health =? or sf.doctor =? ) ) a where 1=1";
|
|
|
" AND ( "+(level==2?"sf.doctor =?":"sf.doctor_health =? ")+") ) a where 1=1";
|
|
|
if (!org.springframework.util.StringUtils.isEmpty(params)) {
|
|
|
addressSql += " AND a.address like '%" + params + "%'";
|
|
|
}
|
|
|
List<Map<String, Object>> datas = jdbcTemplate.queryForList(addressSql, teamCode,doctorCode,doctorCode);
|
|
|
List<Map<String, Object>> datas = jdbcTemplate.queryForList(addressSql, teamCode,doctorCode);
|
|
|
if (datas != null && datas.size() > 0) {
|
|
|
JSONArray jsonArray = new JSONArray();
|
|
|
for (Map<String, Object> map : datas) {
|
|
@ -1981,12 +1981,12 @@ public class FamilyContractService extends BaseService {
|
|
|
" AND sf. STATUS > 0 " +
|
|
|
//" and sf.doctor = ? " +
|
|
|
" and sf.admin_team_code = ? " +
|
|
|
" AND ( sf.doctor_health = ? or sf.doctor =? ) ) a where 1=1";
|
|
|
" AND ( "+(level==2?"sf.doctor =?":"sf.doctor_health =? ")+") ) a where 1=1";
|
|
|
|
|
|
if (!org.springframework.util.StringUtils.isEmpty(params)) {
|
|
|
patientNameSql += " AND a.name like '%" + params + "%'";
|
|
|
}
|
|
|
datas = jdbcTemplate.queryForList(patientNameSql, teamCode,doctorCode,doctorCode);
|
|
|
datas = jdbcTemplate.queryForList(patientNameSql, teamCode,doctorCode);
|
|
|
if (datas != null && datas.size() > 0) {
|
|
|
JSONArray jsonArray = new JSONArray();
|
|
|
for (Map<String, Object> map : datas) {
|