suqinyi 1 vuosi sitten
vanhempi
commit
f4fe50cb97

+ 25 - 7
business/base-service/src/main/java/com/yihu/jw/complaint/BaseComplaintService.java

@ -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);

+ 5 - 2
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/complaint/BaseComplaintEndPoint.java

@ -346,9 +346,12 @@ public class BaseComplaintEndPoint extends EnvelopRestEndpoint {
    @ApiOperation(value = "查询投诉建议数量", notes = "查询投诉建议单挑")
    public Envelop findComplaintCount(
            @ApiParam(name = "doctor", value = "doctor", required = false) @RequestParam(value = "doctor", required = false) String doctor,
            @ApiParam(name = "role", value = "role", required = false) @RequestParam(value = "role", required = false) String role) throws Exception {
            @ApiParam(name = "role", value = "role", required = false) @RequestParam(value = "role", required = false) String role,
            @ApiParam(name = "pcAdmin", value = "pc管理员传值", required = false) @RequestParam(value = "pcAdmin", required = false) String pcAdmin
    ) throws Exception {
        try {
            return success(baseComplaintService.findComplaintCount(doctor, role));
            return success(baseComplaintService.findComplaintCount(doctor, role,pcAdmin));
        } catch (Exception e) {
            return failedException(e);
        }