|
@ -91,7 +91,7 @@ public class DeviceManageService extends BaseJpaService<BaseDeviceRepairEntity,B
|
|
|
}
|
|
|
|
|
|
/*报修列表*/
|
|
|
public List<Map<String, Object>> getRepairList(String doctor,String categoryCode, String patientName, int page, int pageSize,String status) {
|
|
|
public List<Map<String, Object>> getRepairList(String doctor,String teamId,String categoryCode, String patientName, int page, int pageSize,String status) {
|
|
|
BaseDoctorDO doctorById = baseDoctorDao.findById(doctor);
|
|
|
String repairSql = "";
|
|
|
if (null != doctorById) {
|
|
@ -131,10 +131,24 @@ public class DeviceManageService extends BaseJpaService<BaseDeviceRepairEntity,B
|
|
|
" AND dd.model = wd.device_model" +
|
|
|
" AND p.del = 1" +
|
|
|
" AND pd.device_sn = dr.device_sn" +
|
|
|
" AND dr.type is null " +
|
|
|
" and EXISTS (SELECT sr.patient from base_service_package_sign_record sr,base_service_package_record r,base_team_member m " +
|
|
|
" WHERE sr.patient = p.id and sr.status=1 and m.team_code = r.team_code and sr.id=r.sign_id AND dr.repair_peoper = m.doctor_code" +
|
|
|
" and m.doctor_code = '" + doctor + "' and m.del = '1')";
|
|
|
" AND dr.type is null ";
|
|
|
if(StringUtils.isBlank(teamId)){
|
|
|
repairSql +=" and EXISTS (SELECT sr.patient from base_service_package_sign_record sr,base_service_package_record r,base_team_member m " +
|
|
|
" WHERE sr.patient = p.id and sr.status=1 and m.team_code = r.team_code and sr.id=r.sign_id AND dr.repair_peoper = m.doctor_code" +
|
|
|
" and m.doctor_code = '" + doctor + "' and m.del = '1') ";
|
|
|
}else {
|
|
|
if("1".equals(teamId)){
|
|
|
//查询全部团队
|
|
|
repairSql +=" and EXISTS (SELECT sr.patient from base_service_package_sign_record sr,base_service_package_record r,base_team_member m " +
|
|
|
" WHERE sr.patient = p.id and sr.status=1 and m.team_code = r.team_code and sr.id=r.sign_id AND dr.repair_peoper = m.doctor_code" +
|
|
|
" and m.doctor_code = '" + doctor + "' and m.del = '1') ";
|
|
|
}else {
|
|
|
//查询指定团队
|
|
|
repairSql +=" and EXISTS (SELECT sr.patient from base_service_package_sign_record sr,base_service_package_record r,base_team_member m " +
|
|
|
" WHERE sr.patient = p.id and sr.status=1 and m.team_code = r.team_code and sr.id=r.sign_id AND dr.repair_peoper = m.doctor_code" +
|
|
|
" and m.doctor_code = '" + doctor + "' and m.team_code = '"+teamId+"' and m.del = '1') ";
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|