Browse Source

代码修改

LAPTOP-KB9HII50\70708 2 weeks ago
parent
commit
48f974b459

+ 11 - 3
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/rehabilitation/RehabilitationManageService.java

@ -90,9 +90,10 @@ public class RehabilitationManageService {
     */
    public MixEnvelop<Map<String, Object>, Map<String, Object>> findRehabilitationPlan(Integer doctorType, String doctorCode, String diseaseCode, Integer planType, Integer todaybacklog, String patientCondition, Integer page, Integer pageSize) throws Exception {
        String sql = " select DISTINCT p.* " +
                " from wlyy_specialist.wlyy_rehabilitation_plan_detail a INNER JOIN wlyy_specialist.wlyy_patient_rehabilitation_plan p " +
                " on a.plan_id = p.id  ";
        String sql = " select DISTINCT p.*,pr.is_manage " +
                " from wlyy_specialist.wlyy_rehabilitation_plan_detail a " +
                " INNER JOIN wlyy_specialist.wlyy_patient_rehabilitation_plan p on a.plan_id = p.id  "+
                " INNER JOIN wlyy_specialist.`wlyy_specialist_patient_relation` pr on p.patient = pr.patient  ";
        if (doctorType == 2) {//家医是根据签约关系过滤
            sql += " INNER JOIN wlyy.wlyy_sign_family f ON f.patient = p.patient \n" +
                    "\tand f.expenses_status=1\n" +
@ -183,6 +184,13 @@ public class RehabilitationManageService {
                resultMap.put("allCount", allCount);//总数
                resultMap.put("allFinishCount", allFinishCount);//全部已完成数
                resultMap.put("createTime", one.get("create_time"));
                String relationManageState = one.get("is_manage") == null ? "0" : one.get("is_manage").toString();//管理状态
                if (StringUtils.isBlank(relationManageState) || !relationManageState.equals("1")) {//未进行管理
                    resultMap.put("turnDownState", 1);//已下转
                } else {
                    resultMap.put("turnDownState", 2);//已管理
                }
                resultList.add(resultMap);
            }