|
@ -440,7 +440,7 @@ public class BaseComplaintService {
|
|
|
|
|
|
//查询投诉列表
|
|
|
public MixEnvelop findComplaintList(String role, String doctor, String status, String patientName, String patientId, String keyWord, String complaintId,
|
|
|
String startTime, String endTime, Integer page, Integer pageSize,String pcAdmin) {
|
|
|
String startTime, String endTime, Integer page, Integer pageSize, String pcAdmin) {
|
|
|
MixEnvelop mixEnvelop = new MixEnvelop();
|
|
|
Boolean queryAll = false;
|
|
|
if ("admin".equalsIgnoreCase(role)) {
|
|
@ -481,10 +481,10 @@ public class BaseComplaintService {
|
|
|
" left join base_patient b on t.patient=b.id ";
|
|
|
sql += " left join base_complaint_operate_log g on t.id=g.relation_code where t.is_del='1' ";
|
|
|
|
|
|
if (StringUtils.isBlank(pcAdmin)){
|
|
|
if (StringUtils.isBlank(pcAdmin)) {
|
|
|
//排除撤销的
|
|
|
sql += " and t.status<>'-1' ";
|
|
|
}else {
|
|
|
} else {
|
|
|
System.out.println("pc管理员不用排除撤销的");
|
|
|
}
|
|
|
|
|
@ -734,7 +734,7 @@ public class BaseComplaintService {
|
|
|
|
|
|
/*
|
|
|
* 查询投诉数量*/
|
|
|
public Map<String, Object> findComplaintCount(String doctor, String role) {
|
|
|
public Map<String, Object> findComplaintCount(String doctor, String role, String pcAdmin) {
|
|
|
// BaseComplaintDoctorDO baseComplaintDoctorDO = baseComplaintDoctorDao.findbyDoctorAndDel(doctor);
|
|
|
|
|
|
String sql = " SELECT t.complaint_id from base_complaint_doctor t where t.is_del='1' and t.doctor='" + doctor + "'";
|
|
@ -760,19 +760,34 @@ public class BaseComplaintService {
|
|
|
}
|
|
|
if (!queryAll) {
|
|
|
// if ("808080eb7a194099017a1943fa820004".equalsIgnoreCase(baseComplaintDoctorDO.getComplaintId())) {
|
|
|
|
|
|
if (flag) {
|
|
|
complaints = getCountByStatus(doctor, "0", role);
|
|
|
recieve = getCountByStatus(doctor, "1", role);
|
|
|
deal = getCountByStatus(doctor, "2", role);
|
|
|
passto = getCountByPassto(doctor);
|
|
|
total = getCountByStatus(doctor, "", role);
|
|
|
//撤销
|
|
|
cacel = getCountByStatus(doctor, "-1", role);
|
|
|
if (StringUtils.isNotBlank(pcAdmin)) {
|
|
|
System.out.println("是pc管理员");
|
|
|
} else {
|
|
|
total = total - cacel;
|
|
|
}
|
|
|
} else {
|
|
|
complaints = getCountByStatus(doctor, "0", role);
|
|
|
recieve = getCountByStatus(doctor, "1", role);
|
|
|
deal = getCountByStatus(doctor, "2", role);
|
|
|
passto = getCountByPassto(doctor);
|
|
|
total = getCountByStatus(doctor, "", role);
|
|
|
|
|
|
//撤销
|
|
|
cacel = getCountByStatus(doctor, "-1", role);
|
|
|
if (StringUtils.isNotBlank(pcAdmin)) {
|
|
|
System.out.println("是pc管理员");
|
|
|
} else {
|
|
|
total = total - cacel;
|
|
|
}
|
|
|
|
|
|
}
|
|
|
//cacel=baseComplaintDao.getCountByStatusAndComplaintId("-1",baseComplaintDoctorDO.getComplaintId());
|
|
|
} else {
|
|
@ -780,9 +795,12 @@ public class BaseComplaintService {
|
|
|
recieve = baseComplaintDao.getCountByStatus("1");
|
|
|
deal = baseComplaintDao.getCountByStatus("2");
|
|
|
cacel = baseComplaintDao.getCountByStatus("-1");
|
|
|
total = complaints + recieve + deal + cacel;
|
|
|
total = complaints + recieve + deal;
|
|
|
if (StringUtils.isNotBlank(pcAdmin)) {
|
|
|
//是管理员加上撤销的
|
|
|
total = +cacel;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
Map map = new HashMap();
|
|
|
map.put("complaints", complaints);
|