服务器-Android这样的JSON数据应该怎么解析。

问题描述

Android这样的JSON数据应该怎么解析。

这是一个选择添加疾病的页面。
第一行是疾病类型
第二行是疾病名称
要求上面的疾病类型和疾病名称都要从服务器获取。
每种疾病类型下面的疾病名称数量不确定

还有可以点击选择添加日期,不过这个问题我已经解决了。
我采用的是ListView展示的。但是解析过后有问题,只能解析到疾病类型,解析不到疾病名称。

每个疾病类型和疾病名称都有ID。
这是用网页访问JSP网址的返回值。
{"code":200,"message":"调用成功","data":{"mem_message_records":[{"message_disease_typeid":"1","message_disease_type":"心血管系统"},{"message_disease_typeid":"2","message_disease_type":"外围血管疾病"},{"message_disease_typeid":"3","message_disease_type":"脑血管疾病"},{"message_disease_typeid":"4","message_disease_type":"肺部疾病"},{"message_disease_typeid":"5","message_disease_type":"代谢疾病"},{"message_disease_typeid":"6","message_disease_type":"周围神经疾病"},{"message_disease_typeid":"7","message_disease_type":"其他疾病"}],"mem_message_recordss":[[{"message_diseaseid":"1","message_disease":"冠状动脉疾病"},{"message_diseaseid":"2","message_disease":"心绞痛"},{"message_diseaseid":"3","message_disease":"心肌梗死"},{"message_diseaseid":"4","message_disease":"冠状动脉血运重建"},{"message_diseaseid":"5","message_disease":"充血性心力衰竭"}],[{"message_diseaseid":"6","message_disease":"闭塞性周围动脉粥样硬化"},{"message_diseaseid":"7","message_disease":"血栓行静脉炎"}],[{"message_diseaseid":"8","message_disease":"脑血栓"},{"message_diseaseid":"9","message_disease":"短暂性脑供血不足"},{"message_diseaseid":"10","message_disease":"脑出血"}],[{"message_diseaseid":"11","message_disease":"慢性支气管炎"},{"message_diseaseid":"12","message_disease":"慢性阻塞性肺病"},{"message_diseaseid":"13","message_disease":"支气管哮喘"},{"message_diseaseid":"14","message_disease":"间质性肺病"},{"message_diseaseid":"15","message_disease":"囊性肺纤维化"}],[{"message_diseaseid":"16","message_disease":"1型糖尿病"},{"message_diseaseid":"17","message_disease":"2型糖尿病"},{"message_diseaseid":"18","message_disease":"糖尿病肾病"}],[{"message_diseaseid":"19","message_disease":"糖尿病性周围精神病"},{"message_diseaseid":"20","message_disease":"自主神经性病变"}],[{"message_diseaseid":"21","message_disease":"高血压"},{"message_diseaseid":"22","message_disease":"视网膜病变"},{"message_diseaseid":"23","message_disease":"恶性肿瘤"},{"message_diseaseid":"24","message_disease":"脑卒中"},{"message_diseaseid":"25","message_disease":"重性精神疾病"},{"message_diseaseid":"26","message_disease":"结核病"},{"message_diseaseid":"27","message_disease":"肝炎"},{"message_diseaseid":"28","message_disease":"先天畸形"},{"message_diseaseid":"29","message_disease":"其它"}]]}}

解决方案

写一个类,结构和json格式对应,用gson直接转为对象,对于不定数量的用List就行了

解决方案二:

楼主做出来了吗? 我试着解析了下 结果出来了 不知道是不是你想要的效果

解决方案三:

三行代码就解决的事,有必要搞的那么复杂吗?

解决方案四:

java.lang.reflect.Type type = new TypeToken() {
}.getType();
Bean msg = gson.fromJson(jsonStr, type);

package com.example.itps.myapplication;

import java.util.List;

public class Bean {

private int code;
private String message;
private DataEntity data;

public void setCode(int code) {
this.code = code;
}

public void setMessage(String message) {
this.message = message;
}

public void setData(DataEntity data) {
this.data = data;
}

public int getCode() {
return code;
}

public String getMessage() {
return message;
}

public DataEntity getData() {
return data;
}

public static class DataEntity {
/**
* message_disease_typeid : 1
* message_disease_type : 心血管系统
*/

private List<MemMessageRecordsEntity> mem_message_records;
/**
 * message_diseaseid : 1
 * message_disease : 冠状动脉疾病
 */

private List<List<MemMessageRecordssEntity>> mem_message_recordss;

public void setMem_message_records(List<MemMessageRecordsEntity> mem_message_records) {
    this.mem_message_records = mem_message_records;
}

public void setMem_message_recordss(List<List<MemMessageRecordssEntity>> mem_message_recordss) {
    this.mem_message_recordss = mem_message_recordss;
}

public List<MemMessageRecordsEntity> getMem_message_records() {
    return mem_message_records;
}

public List<List<MemMessageRecordssEntity>> getMem_message_recordss() {
    return mem_message_recordss;
}

public static class MemMessageRecordsEntity {
    private String message_disease_typeid;
    private String message_disease_type;

    public void setMessage_disease_typeid(String message_disease_typeid) {
        this.message_disease_typeid = message_disease_typeid;
    }

    public void setMessage_disease_type(String message_disease_type) {
        this.message_disease_type = message_disease_type;
    }

    public String getMessage_disease_typeid() {
        return message_disease_typeid;
    }

    public String getMessage_disease_type() {
        return message_disease_type;
    }
}

public static class MemMessageRecordssEntity {
    private String message_diseaseid;
    private String message_disease;

    public void setMessage_diseaseid(String message_diseaseid) {
        this.message_diseaseid = message_diseaseid;
    }

    public void setMessage_disease(String message_disease) {
        this.message_disease = message_disease;
    }

    public String getMessage_diseaseid() {
        return message_diseaseid;
    }

    public String getMessage_disease() {
        return message_disease;
    }
}

}

}

解决方案五:

这是我自己目前解析得到的数据

解决方案六:

具体看你的代码,你地下那些都是空。建议调试看看。

解决方案七:

  1. package sy;package sy;

import android.app.Activity;

import android.app.DatePickerDialog;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;

import android.text.format.DateFormat;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.BaseAdapter;

import android.widget.DatePicker;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;

import com.google.gson.Gson;
import com.xiaheng.bswk.HttpInfo;
import com.xiaheng.bswk.HttpUtils;
import com.xiaheng.bswk.R;
import com.xiaheng.gsonBean.JiBingbean;
import com.xiaheng.gsonBean.JiBingdata;

import org.w3c.dom.Text;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;

/**

  • Created by Administrator on 2016/2/18.
    */
    public class Getjzsdisease extends Activity {

    private TextView tv;
    private ListView jzsdisease_list;
    private LayoutInflater inflater;
    private TextView baocun;
    private static int currentPosition = -1;
    private JiBingbean jiBingbean;
    private Handler myHandler = null;
    private ArrayList jibingdata = new ArrayList<>();
    private JbAdapter adapter;
    private String date_time;
    private boolean dui1 = false;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.get_jzsdisease_list);
    myHandler = new Handler() {
    @Override
    public void handleMessage(Message msg) {
    if (101 == msg.what) {
    for (int i = 0; i < jiBingbean.getData().getMem_message_records().size(); i++) {
    JiBingdata data1 = new JiBingdata();

                    //获得数据
                    String message_disease = jiBingbean.getData().getMem_message_records().get(i).getMessage_disease();
                    System.out.println("message_disease" + message_disease);
                    String message_disease_type = jiBingbean.getData().getMem_message_records().get(i).getMessage_disease_type();
    
                    data1.setMessage_disease(message_disease);
                    data1.setMessage_disease_type(message_disease_type);
    
                    jibingdata.add(data1);
                }
            }
            adapter = new JbAdapter();
            jzsdisease_list.setAdapter(adapter);
            adapter.notifyDataSetChanged();
        }
    };
    new Thread(new Mythread()).start();
    setview();
    

    }
    private void setview() {
    //保存按钮
    baocun = (TextView) findViewById(R.id.textView71);
    baocun.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {

        }
    });
    //listView监听
    jzsdisease_list = (ListView) findViewById(R.id.mylist_disease);
    jzsdisease_list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
        @Override
        public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
    
            currentPosition = position;
            adapter.notifyDataSetChanged();
        }
    });
    

    }
    //解析JSON数据
    private class Mythread extends Thread {
    @Override
    public void run() {
    System.out.println("....启动线程");
    //网络请求路径
    String path = HttpInfo.PATH + HttpInfo.GET_JIBINGLIST + HttpInfo.ID;
    String jsonString = HttpUtils.getJsonContent(path);
    Gson gson = new Gson();
    System.out.println("------------------------"+path);
    //解析json数据
    jiBingbean = gson.fromJson(jsonString, JiBingbean.class);

        System.out.println("....启动线程" + jiBingbean);
    

    //解析成功后发送msg给UI主线程
    Message msg = new Message();
    msg.what = 101;
    myHandler.sendMessage(msg);
    }
    }
    //自定义adapter
    class JbAdapter extends BaseAdapter {

    public JbAdapter() {
        super();
        inflater = LayoutInflater.from(Getjzsdisease.this);
    }
    @Override
    public int getCount() {
        return jibingdata.size();
    }
    
    @Override
    public Object getItem(int position) {
        return position;
    }
    
    @Override
    public long getItemId(int position) {
        return position;
    }
    
    @Override
    public View getView(final int position, View convertView, ViewGroup parent) {
        ViewHolder view = null;
        TextView date=null;
        if (convertView == null) {
            view = new ViewHolder();
            convertView = inflater.inflate(R.layout.get_jzsdisease, parent, false);
            view.jibing_type = (TextView) convertView
                    .findViewById(R.id.xinxueguanxitong_text);
    
            view.jibing_name = (TextView) convertView
                    .findViewById(R.id.jzs_jibingmingcheng);
            view.tang= (ImageView) convertView.findViewById(R.id.tang);
            view.relativeLayout= (RelativeLayout)
                    convertView.findViewById(R.id.addjiazushi_date1);
            convertView.setTag(view);
        } else {
            view = (ViewHolder) convertView.getTag();
        }
    

    //日期事件

        final ViewHolder finalView = view;
        final ViewHolder finalView1 = view;
        //点击图片是是否变色
        view.tang.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (!dui1) {
                    finalView.tang.setImageResource(R.drawable.dui_hover);
                    dui1 = true;
                } else {
                    finalView1.tang.setImageResource(R.drawable.dui);
                    dui1 = false;
                }
            }
        });
        //日期点击事件
        view.relativeLayout.setTag(position);
        view.relativeLayout.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                final TextView textView = (TextView) v.findViewById(R.id.jzs_adddate);//展示日期的textView
                final Calendar calendar = Calendar.getInstance();
                DatePickerDialog dialog = new DatePickerDialog(Getjzsdisease.this, new DatePickerDialog.OnDateSetListener() {
                    @Override
                    public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {
                        calendar.set(year, monthOfYear, dayOfMonth);
                        System.out.println("-----------------date---------------" + DateFormat.format("yyyy-MM-dd", calendar));
                        textView.setText(DateFormat.format("yyyy-MM-dd", calendar));
                        date_time = textView.getText().toString();
                        System.out.println("------------------date--------------" + date_time);
                    }
                }, calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH));
                dialog.show();
            }
        });
        view.jibing_type.setText(jibingdata.get(position).getMessage_disease_type());
        view.jibing_name.setText(jibingdata.get(position).getMessage_disease());
        return convertView;
    }
    private class ViewHolder {
        private TextView jibing_type;
        private TextView jibing_name;
        private ImageView tang;
        private RelativeLayout relativeLayout;
    }
    

    }
    }

解决方案八:

  1. package sy;package sy;

import android.app.Activity;

import android.app.DatePickerDialog;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;

import android.text.format.DateFormat;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.BaseAdapter;

import android.widget.DatePicker;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;

import com.google.gson.Gson;
import com.xiaheng.bswk.HttpInfo;
import com.xiaheng.bswk.HttpUtils;
import com.xiaheng.bswk.R;
import com.xiaheng.gsonBean.JiBingbean;
import com.xiaheng.gsonBean.JiBingdata;

import org.w3c.dom.Text;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;

/**

  • Created by Administrator on 2016/2/18.
    */
    public class Getjzsdisease extends Activity {

    private TextView tv;
    private ListView jzsdisease_list;
    private LayoutInflater inflater;
    private TextView baocun;
    private static int currentPosition = -1;
    private JiBingbean jiBingbean;
    private Handler myHandler = null;
    private ArrayList jibingdata = new ArrayList<>();
    private JbAdapter adapter;
    private String date_time;
    private boolean dui1 = false;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.get_jzsdisease_list);
    myHandler = new Handler() {
    @Override
    public void handleMessage(Message msg) {
    if (101 == msg.what) {
    for (int i = 0; i < jiBingbean.getData().getMem_message_records().size(); i++) {
    JiBingdata data1 = new JiBingdata();

                    //获得数据
                    String message_disease = jiBingbean.getData().getMem_message_records().get(i).getMessage_disease();
                    System.out.println("message_disease" + message_disease);
                    String message_disease_type = jiBingbean.getData().getMem_message_records().get(i).getMessage_disease_type();
    
                    data1.setMessage_disease(message_disease);
                    data1.setMessage_disease_type(message_disease_type);
    
                    jibingdata.add(data1);
                }
            }
            adapter = new JbAdapter();
            jzsdisease_list.setAdapter(adapter);
            adapter.notifyDataSetChanged();
        }
    };
    new Thread(new Mythread()).start();
    setview();
    

    }
    private void setview() {
    //保存按钮
    baocun = (TextView) findViewById(R.id.textView71);
    baocun.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {

        }
    });
    //listView监听
    jzsdisease_list = (ListView) findViewById(R.id.mylist_disease);
    jzsdisease_list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
        @Override
        public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
    
            currentPosition = position;
            adapter.notifyDataSetChanged();
        }
    });
    

    }
    //解析JSON数据
    private class Mythread extends Thread {
    @Override
    public void run() {
    System.out.println("....启动线程");
    //网络请求路径
    String path = HttpInfo.PATH + HttpInfo.GET_JIBINGLIST + HttpInfo.ID;
    String jsonString = HttpUtils.getJsonContent(path);
    Gson gson = new Gson();
    System.out.println("------------------------"+path);
    //解析json数据
    jiBingbean = gson.fromJson(jsonString, JiBingbean.class);

        System.out.println("....启动线程" + jiBingbean);
    

    //解析成功后发送msg给UI主线程
    Message msg = new Message();
    msg.what = 101;
    myHandler.sendMessage(msg);
    }
    }
    //自定义adapter
    class JbAdapter extends BaseAdapter {

    public JbAdapter() {
        super();
        inflater = LayoutInflater.from(Getjzsdisease.this);
    }
    @Override
    public int getCount() {
        return jibingdata.size();
    }
    
    @Override
    public Object getItem(int position) {
        return position;
    }
    
    @Override
    public long getItemId(int position) {
        return position;
    }
    
    @Override
    public View getView(final int position, View convertView, ViewGroup parent) {
        ViewHolder view = null;
        TextView date=null;
        if (convertView == null) {
            view = new ViewHolder();
            convertView = inflater.inflate(R.layout.get_jzsdisease, parent, false);
            view.jibing_type = (TextView) convertView
                    .findViewById(R.id.xinxueguanxitong_text);
    
            view.jibing_name = (TextView) convertView
                    .findViewById(R.id.jzs_jibingmingcheng);
            view.tang= (ImageView) convertView.findViewById(R.id.tang);
            view.relativeLayout= (RelativeLayout)
                    convertView.findViewById(R.id.addjiazushi_date1);
            convertView.setTag(view);
        } else {
            view = (ViewHolder) convertView.getTag();
        }
    

    //日期事件

        final ViewHolder finalView = view;
        final ViewHolder finalView1 = view;
        //点击图片是是否变色
        view.tang.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (!dui1) {
                    finalView.tang.setImageResource(R.drawable.dui_hover);
                    dui1 = true;
                } else {
                    finalView1.tang.setImageResource(R.drawable.dui);
                    dui1 = false;
                }
            }
        });
        //日期点击事件
        view.relativeLayout.setTag(position);
        view.relativeLayout.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                final TextView textView = (TextView) v.findViewById(R.id.jzs_adddate);//展示日期的textView
                final Calendar calendar = Calendar.getInstance();
                DatePickerDialog dialog = new DatePickerDialog(Getjzsdisease.this, new DatePickerDialog.OnDateSetListener() {
                    @Override
                    public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {
                        calendar.set(year, monthOfYear, dayOfMonth);
                        System.out.println("-----------------date---------------" + DateFormat.format("yyyy-MM-dd", calendar));
                        textView.setText(DateFormat.format("yyyy-MM-dd", calendar));
                        date_time = textView.getText().toString();
                        System.out.println("------------------date--------------" + date_time);
                    }
                }, calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH));
                dialog.show();
            }
        });
        view.jibing_type.setText(jibingdata.get(position).getMessage_disease_type());
        view.jibing_name.setText(jibingdata.get(position).getMessage_disease());
        return convertView;
    }
    private class ViewHolder {
        private TextView jibing_type;
        private TextView jibing_name;
        private ImageView tang;
        private RelativeLayout relativeLayout;
    }
    

    }
    }

解决方案九:

.启动线程JiBingbean{code='200', message='调用成功', data=JiBinglist{mem_uid='null', mem_message_records=[JiBingdata{message_diseaseid='null', message_disease_typeid='1', message_disease='null', message_disease_type='心血管系统'}, JiBingdata{message_diseaseid='null', message_disease_typeid='2', message_disease='null', message_disease_type='外围血管疾病'}, JiBingdata{message_diseaseid='null', message_disease_typeid='3', message_disease='null', message_disease_type='脑血管疾病'}, JiBingdata{message_diseaseid='null', message_disease_typeid='4', message_disease='null', message_disease_type='肺部疾病'}, JiBingdata{message_diseaseid='null', message_disease_typeid='5', message_disease='null', message_disease_type='代谢疾病'}, JiBingdata{message_diseaseid='null', message_disease_typeid='6', message_disease='null', message_disease_type='周围神经疾病'}, JiBingdata{message_diseaseid='null', message_disease_typeid='7', message_disease='null', message_disease_type='其他疾病'}]}}

这是我自己解析得到的返回值。

解决方案十:

大哥,代码太多,建议还是debug调试看看

时间: 2024-12-24 03:02:08

服务器-Android这样的JSON数据应该怎么解析。的相关文章

json 数据解析-android 这样的json 数据该怎么解析

问题描述 android 这样的json 数据该怎么解析 {requestStatus"": ""success""errorCode"": ""0""errorTip"": ""操作完成""activityMemberArray"": [ {editTribe"": [ {tribeId

缓存-android中请求json数据出现更新不及时的问题

问题描述 android中请求json数据出现更新不及时的问题 我向服务器请求json数据,返回的数据中有个请求次数,发现短时间内请求次数不变(服务器那边的数据已经变了),要过一段时间,或者重启一下应用返回的请求次数才会改变,请问这是缓存的原因吗?如何解决 解决方案 不是,应该是数据接收有问题. 解决方案二: 你是说服务器端数据不变,还是android返回的数据不变, 觉得你要检查一下你的API接口,是否真的调用,数据库是否真的更新了,这个肯定会变的 解决方案三: 你这个 会缓存吗? 不是没一次

Android 中对JSON数据解析实例代码

Android 中对JSON数据解析 在Android的网络编程中,JSON是比XML使用更为广泛的数据传输机制.在许多的http网络请求或接口调用中,返回的很多都是JSON.所以学会解析JSON是学会Android的基本技能. 简单介绍下JSON,JSON是轻量级的文本数据交换格式,独立于语言和平台.比XML更小,更快,更易解析.JSON是用键值对来保存数据的.JSON保存的值可以是数字.字符串.布尔值.数组和对象. 废话少说,直接上代码.下面对以下JOSN进行解析: { "language&

Android实现读写JSON数据的方法_Android

本文实例讲述了Android实现读写JSON数据的方法.分享给大家供大家参考.具体如下: 1. 解析JSON: package de.vogella.android.twitter.json; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import org.apache.http.HttpEntit

Android实现读写JSON数据的方法

本文实例讲述了Android实现读写JSON数据的方法.分享给大家供大家参考.具体如下: 1. 解析JSON: package de.vogella.android.twitter.json; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import org.apache.http.HttpEntit

android移动终端网络数据包的解析,要交给PC服务器端解析并传回来

问题描述 android移动终端网络数据包的解析,要交给PC服务器端解析并传回来 主要内容 :网络数据包的解析,主要包括在移动终端生成网络数据包,然后将网络数据包发送给服务器端进行解析并进行资源文件(图片.文本.视频等)统计,最后将结果返回移动终端并在界面上显示. 目标:在pc端完成网络数据包解析并将资源文件统计结果返回给移动终端, 分别从移动终端系统与服务器端系统两个方面对其进行设计与实现:移动终端基于Android系统实现良好的用户界面设计,服务器端采用MVC三层架构,构建相关数据库来存储网

android移动终端网络数据包的解析

问题描述 android移动终端网络数据包的解析 Android移动终端网络数据监控系统的设计与实现:网络数据包的解析,主要包括在移动终端生成网络数据包,然后将网络数据包发送给服务器端进行解析并进行资源文件(图片.文本.视频等)统计,最后将结果返回移动终端并在界面上显示. 请问该怎样实现? 解决方案 http://blog.csdn.net/carterjin/article/details/7571915

gson-像这种json数据用Gson解析是否合适,如果不合适的话,用什么比较合适。

问题描述 像这种json数据用Gson解析是否合适,如果不合适的话,用什么比较合适. { "resultcode": "200", "reason": "查询成功!", "result": { "sk": { /*当前实况天气*/ "temp": "21", /*当前温度*/ "wind_direction": "西风

《项目经验》--通过js获取前台数据向一般处理程序传递Json数据,并解析Json数据,将前台传来的Json数据写入数据库表中

问题描述 此帖子内容是我做项目时用到,自己琢磨出来的,可能还有很多纰漏之处,在此分享!互相交流,互相学习,有不对的地方,欢迎大家指正!具体内容见博客<<项目经验>--通过js获取前台数据向一般处理程序传递Json数据,并解析Json数据,将前台传来的Json数据写入数据库表中>:http://blog.csdn.net/mazhaojuan/article/details/8592015先看一下我要实现的功能界面:这个界面的功能在图中已有展现,课程分配(教师教授哪门课程)在之前的页