trick9191 7 years ago
parent
commit
b4eb2f722f

+ 18 - 4
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/consult/ConsultTeamService.java

@ -1908,9 +1908,16 @@ public class ConsultTeamService extends ConsultService {
                String SQL = "SELECT t.id FROM wlyy_sign_family_renew t " +
                String SQL = "SELECT t.id FROM wlyy_sign_family_renew t " +
                        " WHERE (t.doctor ='"+code+"' OR t.doctor_health ='"+code+"' ) " +
                        " WHERE (t.doctor ='"+code+"' OR t.doctor_health ='"+code+"' ) " +
                        " AND t.sign_year ='"+DateUtil.getSignYear()+"' AND t.patient ='"+uid+"' ";
                        " AND t.sign_year ='"+DateUtil.getSignYear()+"' AND t.patient ='"+uid+"' ";
                String SQL2 ="SELECT t.id FROM wlyy_sign_family t " +
                        " WHERE (t.doctor ='"+code+"' OR t.doctor_health ='"+code+"' ) " +
                        " AND t.sign_year ='"+(DateUtil.getSignYear()-1)+"' AND t.patient ='"+uid+"' AND t.status>0 AND t.expenses_status ='1' ";
                List<Map<String,Object>> isExits = jdbcTemplate.queryForList(SQL);
                List<Map<String,Object>> isExits = jdbcTemplate.queryForList(SQL);
                if(isExits!=null&&isExits.size()>0){
                    indexs.add(i);
                List<Map<String,Object>> isExitsSign = jdbcTemplate.queryForList(SQL2);
                if(isExitsSign==null){
                    if(isExits!=null&&isExits.size()>0){
                        indexs.add(i);
                    }
                }
                }
            }
            }
            if(indexs!=null&&indexs.size()>0){
            if(indexs!=null&&indexs.size()>0){
@ -1930,9 +1937,16 @@ public class ConsultTeamService extends ConsultService {
                String SQL = "SELECT t.id FROM wlyy_sign_family_renew t " +
                String SQL = "SELECT t.id FROM wlyy_sign_family_renew t " +
                        " WHERE (t.doctor ='"+code+"' OR t.doctor_health ='"+code+"' ) " +
                        " WHERE (t.doctor ='"+code+"' OR t.doctor_health ='"+code+"' ) " +
                        " AND t.sign_year ='"+DateUtil.getSignYear()+"' AND t.patient ='"+uid+"' ";
                        " AND t.sign_year ='"+DateUtil.getSignYear()+"' AND t.patient ='"+uid+"' ";
                String SQL2 ="SELECT t.id FROM wlyy_sign_family t " +
                        " WHERE (t.doctor ='"+code+"' OR t.doctor_health ='"+code+"' ) " +
                        " AND t.sign_year ='"+(DateUtil.getSignYear()-1)+"' AND t.patient ='"+uid+"' AND t.status>0 AND t.expenses_status ='1' ";
                List<Map<String,Object>> isExits = jdbcTemplate.queryForList(SQL);
                List<Map<String,Object>> isExits = jdbcTemplate.queryForList(SQL);
                if(isExits!=null&&isExits.size()>0){
                    indexs.add(i);
                List<Map<String,Object>> isExitsSign = jdbcTemplate.queryForList(SQL2);
                if(isExitsSign==null){
                    if(isExits!=null&&isExits.size()>0){
                        indexs.add(i);
                    }
                }
                }
            }
            }
            if(indexs!=null&&indexs.size()>0){
            if(indexs!=null&&indexs.size()>0){

+ 1 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/family/FamilyMemberService.java

@ -872,7 +872,7 @@ public class FamilyMemberService extends BaseService {
        String result = HttpUtil.sendGet(userInfo_url, params);
        String result = HttpUtil.sendGet(userInfo_url, params);
        JSONObject json = new JSONObject(result);
        JSONObject json = new JSONObject(result);
        if (json.has("subscribe")) {
        if (json.has("subscribe")) {
            return json.get("subscribe").toString();
            return json.get(" ").toString();
        } else {
        } else {
            return null;
            return null;
        }
        }

+ 20 - 20
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/FamilyContractService.java

@ -2991,16 +2991,16 @@ public class FamilyContractService extends BaseService {
        }else {
        }else {
            //如果不一致 查看医生团队
            //如果不一致 查看医生团队
            sf.setRenewFlag("2");
            sf.setRenewFlag("2");
            String tcSql = "SELECT t.id FROM wlyy_admin_team t WHERE t.leader_code ='"+doctor+"'";
            List<Map<String ,Object>> ids = jdbcTemplate.queryForList(tcSql);
            if(ids!=null&&ids.size()>0){
                Integer id =  (Integer)ids.get(0).get("id");
                Long lid = id.longValue();
                sf.setAdminTeamId(lid);
            }else{
                //未找到团队信息
                return -5;
            }
//            String tcSql = "SELECT t.id FROM wlyy_admin_team t WHERE t.leader_code ='"+doctor+"'";
//            List<Map<String ,Object>> ids = jdbcTemplate.queryForList(tcSql);
//            if(ids!=null&&ids.size()>0){
//                Integer id =  (Integer)ids.get(0).get("id");
//                Long lid = id.longValue();
//                sf.setAdminTeamId(lid);
//            }else{
//                //未找到团队信息
//                return -5;
//            }
            //新建咨询团队组
            //新建咨询团队组
            DoctorTeam team = new DoctorTeam();
            DoctorTeam team = new DoctorTeam();
            String code = getCode();
            String code = getCode();
@ -3176,16 +3176,16 @@ public class FamilyContractService extends BaseService {
            sf.setAdminTeamId(c.longValue());
            sf.setAdminTeamId(c.longValue());
        }else {
        }else {
            //如果不一致 查看医生团队
            //如果不一致 查看医生团队
            String tcSql = "SELECT t.id FROM wlyy_admin_team t WHERE t.leader_code ='"+doctor+"'";
            List<Map<String ,Object>> ids = jdbcTemplate.queryForList(tcSql);
            if(ids!=null&&ids.size()>0){
                Integer id =  (Integer)ids.get(0).get("id");
                Long lid = id.longValue();
                sf.setAdminTeamId(lid);
            }else{
                //未找到团队信息
                return -5;
            }
//            String tcSql = "SELECT t.id FROM wlyy_admin_team t WHERE t.leader_code ='"+doctor+"'";
//            List<Map<String ,Object>> ids = jdbcTemplate.queryForList(tcSql);
//            if(ids!=null&&ids.size()>0){
//                Integer id =  (Integer)ids.get(0).get("id");
//                Long lid = id.longValue();
//                sf.setAdminTeamId(lid);
//            }else{
//                //未找到团队信息
//                return -5;
//            }
            //新建咨询团队组
            //新建咨询团队组
            DoctorTeam team = new DoctorTeam();
            DoctorTeam team = new DoctorTeam();
            String code = getCode();
            String code = getCode();