Bladeren bron

代码修改

yeshijie 7 jaren geleden
bovenliggende
commit
a3d13a0540

+ 14 - 9
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/scheduling/DoctorWorkTimeService.java

@ -757,29 +757,34 @@ public class DoctorWorkTimeService extends BaseService {
            //健管师推荐开启,只判断健管师的时间
            if ("1".equals(re.getString("familyTopicSwitch"))){
                json = doctorWork(doctorHealth,week,calendar);
                if("0".equals(json.getString("status"))){
                    json.put("status","2");
                    json.put("msg","全科医生和健管师当前都不在工作时间");
                }
            }else {//健管师推荐关闭,则两个都要判断
                JSONObject doctorJson = doctorWork(doctor,week,calendar);
                JSONObject doctorHealthJson = doctorWork(doctorHealth,week,calendar);
                String doctorStatus = doctorJson.getString("status");
                String doctorHealthStatus = doctorHealthJson.getString("status");
                //两个都不接受咨询时,无法咨询
                if ("0".equals(doctorStatus) && "0".equals(doctorHealthStatus)){
                    json.put("status", "0");
                    json.put("msg", "医生不接受咨询");
                }else if ("1".equals(doctorStatus) || "1".equals(doctorHealthStatus)){
//                if ("0".equals(doctorStatus) && "0".equals(doctorHealthStatus)){
//                    json.put("status", "0");
//                    json.put("msg", "医生不接受咨询");
//                }else
                if ("1".equals(doctorStatus) && "1".equals(doctorHealthStatus)){
                    //两个其中有一个可以咨询时都可以咨询
                    json.put("status", "1");
                    json.put("msg", "医生当前接受咨询");
                }else if ("2".equals(doctorStatus) && "1".equals(doctorHealthStatus)){
                    //健管师在工作时间,全科不在
                }else if (!"1".equals(doctorStatus) && "1".equals(doctorHealthStatus)){
                    //健管师在工作时间,全科不在 21 01
                    json.put("status","3");
                    json.put("msg","全科医生当前不在工作时间");
                }else if ("1".equals(doctorStatus) && "2".equals(doctorHealthStatus)){
                    //全科在工作时间,健管师不在
                }else if ("1".equals(doctorStatus) && !"1".equals(doctorHealthStatus)){
                    //全科在工作时间,健管师不在 10 12
                    json.put("status","4");
                    json.put("msg","健管师当前不在工作时间");
                }else{
                    //如果全科和健管师都不在时间范围 22,02,20
                    //如果全科和健管师都不在时间范围 22,02,20,00
                    json.put("status","2");
                    json.put("msg","全科医生和健管师当前都不在工作时间");
                }