forked from kidgrow-microservices-platform

zhaoxiaohao
2020-07-02 edcc7ddbc34a15319f680d63656884657236a346
kidgrow-business/kidgrow-opration-center/kidgrow-opration-center-biz/src/main/java/com/kidgrow/oprationcenter/service/impl/SysFeedbackServiceImpl.java
@@ -83,19 +83,19 @@
        if (sysFeedback.getId()==null) {
            List<SysOrganization> organizations = sysUser.getOrganizations();
            if (organizations.size() > 0) {
                sysFeedback.setDepartmentId(organizations.get(1).getId());
                sysFeedback.setDepartmentName(organizations.get(1).getOrgName());
                sysFeedback.setHospitalId(organizations.get(0).getId());
                sysFeedback.setHospitalName(organizations.get(0).getOrgName());
                Map map = new HashMap();
                map.put("user_id", sysUser.getId());
                ResultBody listByMap = sysDoctorService.getListByMap(map);
                List<SysDoctor> sysDoctors = JSON.parseArray(JSON.toJSONString(listByMap.getData()), SysDoctor.class);
                if (sysDoctors.size() > 0) {
                    sysFeedback.setDoctorId(sysDoctors.get(0).getId());
                    sysFeedback.setDoctorName(sysDoctors.get(0).getDoctorName());
                    sysFeedback.setDoctorTel(sysDoctors.get(0).getDoctorTel());
                }
//                sysFeedback.setDepartmentId(organizations.get(1).getId());
//                sysFeedback.setDepartmentName(organizations.get(1).getOrgName());
//                sysFeedback.setHospitalId(organizations.get(0).getId());
//                sysFeedback.setHospitalName(organizations.get(0).getOrgName());
//                Map map = new HashMap();
//                map.put("user_id", sysUser.getId());
//                ResultBody listByMap = sysDoctorService.getListByMap(map);
//                List<SysDoctor> sysDoctors = JSON.parseArray(JSON.toJSONString(listByMap.getData()), SysDoctor.class);
//                if (sysDoctors.size() > 0) {
//                    sysFeedback.setDoctorId(sysDoctors.get(0).getId());
//                    sysFeedback.setDoctorName(sysDoctors.get(0).getDoctorName());
//                    sysFeedback.setDoctorTel(sysDoctors.get(0).getDoctorTel());
//                }
                int insert = baseMapper.insert(sysFeedback);
                if (insert > 0) {
                    return true;