ISAP/Assets/Scripts/Data/DataParse.cs

643 lines
12 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UIElements;
public class DataParse : SingleTon<DataParse>
{
public void ParsePeopleInfo(string str)
{
Root6 root = JsonUtility.FromJson<Root6>(str);
if (root != null)
{
if (root.code == 200)
{
DataManager.Instance.rowitems2 = root.data.rows;
EventCenter.dispatcher.SendMessage(MsgType.OnGetPeopleInfo2, null);
}
else
{
Debug.LogError("root.code = " + root.code);
}
}
}
public void ParsePeopleHistory(string str)
{
Root5 root = JsonUtility.FromJson<Root5>(str);
if (root != null)
{
if (root.code == 200)
{
//DataManager.Instance.currentTalk = root.data;
//EventCenter.dispatcher.SendMessage(MsgType.OnGetTalkMsg, null);
}
else
{
Debug.LogError("root.code = " + root.code);
}
}
}
public void ParsePeopleTalk(string str)
{
Root4 root = JsonUtility.FromJson<Root4>(str);
if (root != null)
{
if (root.code == 200)
{
DataManager.Instance.currentTalk = root.data;
EventCenter.dispatcher.SendMessage(MsgType.OnGetTalkMsg, null);
}
else
{
Debug.LogError("root.code = " + root.code);
}
}
}
public void ParsePeopleQuestion(string str)
{
Root3 root = JsonUtility.FromJson<Root3>(str);
if (root != null)
{
if (root.code == 200)
{
DataManager.Instance.currentPeoplesQuestion = root.data;
EventCenter.dispatcher.SendMessage(MsgType.OnGetPeopleQuetionList, null);
}
else
{
Debug.LogError("root.code = " + root.code);
}
}
}
public void ParsePeopleList(string str)
{
Root2 root = JsonUtility.FromJson<Root2>(str);
if (root != null)
{
if (root.code == 200)
{
DataManager.Instance.currentPeoplesProgress = root.data;
EventCenter.dispatcher.SendMessage(MsgType.OnGetCurrentPeopleProgress, null);
}
else
{
Debug.LogError("root.code = " + root.code);
}
}
}
public void ParsePeople(string str)
{
Root root = JsonUtility.FromJson<Root>(str);
if (root != null)
{
if (root.code == 200)
{
DataManager.Instance.peoples = root.data.rows;
EventCenter.dispatcher.SendMessage(MsgType.OnGetPeopleInfo, null);
}
else
{
Debug.LogError("root.code = " + root.code);
}
}
}
}
/// <summary>
/// <20><><EFBFBD>˵ĸ<CBB5><C4B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
[Serializable]
public class RowsItem2
{
/// <summary>
///
/// </summary>
public int createBy;
/// <summary>
///
/// </summary>
public string createTime;
/// <summary>
///
/// </summary>
public int updateBy;
/// <summary>
///
/// </summary>
public string updateTime;
/// <summary>
///
/// </summary>
public int id;
/// <summary>
///
/// </summary>
public int sex;
/// <summary>
///
/// </summary>
public int age;
/// <summary>
///
/// </summary>
public int weight;
/// <summary>
///
/// </summary>
public int height;
/// <summary>
/// <20><>
/// </summary>
public string familyName;
/// <summary>
/// <20><>
/// </summary>
public string name;
/// <summary>
///
/// </summary>
public int matrimony;
/// <summary>
///
/// </summary>
public int childrenNum;
/// <summary>
/// java<76><61><EFBFBD><EFBFBD>ʦ
/// </summary>
public string occupation;
/// <summary>
///
/// </summary>
public int weightExponent;
/// <summary>
///
/// </summary>
public string type;
/// <summary>
///
/// </summary>
public string abdominalCircumference;
/// <summary>
///
/// </summary>
public string diagnosisId;
}
/// <summary>
/// <20><><EFBFBD>˵ĸ<CBB5><C4B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
[Serializable]
public class Data2
{
/// <summary>
///
/// </summary>
public int total;
/// <summary>
///
/// </summary>
public List<RowsItem2> rows;
}
/// <summary>
/// <20><><EFBFBD>˵ĸ<CBB5><C4B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
[Serializable]
public class Root6
{
/// <summary>
///
/// </summary>
public int code;
/// <summary>
/// <20><>ѯ<EFBFBD>ɹ<EFBFBD>
/// </summary>
public string msg;
/// <summary>
///
/// </summary>
public Data2 data;
}
[Serializable]
public class DataItem4
{
/// <summary>
///
/// </summary>
public int createBy;
/// <summary>
///
/// </summary>
public string createTime;
/// <summary>
///
/// </summary>
public string updateBy;
/// <summary>
///
/// </summary>
public string updateTime;
/// <summary>
///
/// </summary>
public int id;
/// <summary>
/// {"drugAllergy":null,"allergens":"<22><>Ī<EFBFBD><C4AA><EFBFBD><EFBFBD>"}
/// </summary>
public string detailInfo;
/// <summary>
///
/// </summary>
public string type;
/// <summary>
/// <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
public string peculiarity;
/// <summary>
///
/// </summary>
public int diagnosisId;
}
[Serializable]
public class Root5
{
/// <summary>
///
/// </summary>
public int code { get; set; }
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD>
/// </summary>
public string msg { get; set; }
/// <summary>
///
/// </summary>
public List<DataItem4> data { get; set; }
}
[Serializable]
public class DataItem3
{
/// <summary>
///
/// </summary>
public string createBy;
/// <summary>
///
/// </summary>
public string createTime;
/// <summary>
///
/// </summary>
public string updateBy;
/// <summary>
///
/// </summary>
public string updateTime;
/// <summary>
///
/// </summary>
public int id;
/// <summary>
///
/// </summary>
public int senderCode;
/// <summary>
///
/// </summary>
public int backgroundType;
/// <summary>
///
/// </summary>
public int relationId;
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʲô<CAB2><C3B4><EFBFBD>԰<EFBFBD><D4B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?
/// </summary>
public string msg;
}
[Serializable]
public class Root4
{
/// <summary>
///
/// </summary>
public int code;
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD>
/// </summary>
public string msg;
/// <summary>
///
/// </summary>
public List<DataItem3> data;
}
[Serializable]
public class ProblemAnswerRespListItem
{
/// <summary>
///
/// </summary>
public int id;
/// <summary>
///
/// </summary>
public int problemId;
/// <summary>
/// û<><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E2B2BB>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ơ<EFBFBD>
/// </summary>
public string replyText;
/// <summary>
///
/// </summary>
public int replyEvaluate;
/// <summary>
///
/// </summary>
public string extra;
}
[Serializable]
public class DataItem2
{
/// <summary>
///
/// </summary>
public int id;
/// <summary>
///
/// </summary>
public int diagnosisId;
/// <summary>
///
/// </summary>
public int backgroundType;
/// <summary>
///
/// </summary>
public int type;
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
public string introduce;
/// <summary>
/// ûɶ<C3BB><C9B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
public string title;
/// <summary>
/// <20><><EFBFBD><EFBFBD><E2B2BB>
/// </summary>
public string feedback;
/// <summary>
///
/// </summary>
public string titleFileIds;
/// <summary>
///
/// </summary>
public string feedbackFileIds;
/// <summary>
///
/// </summary>
public List<ProblemAnswerRespListItem> problemAnswerRespList;
/// <summary>
///
/// </summary>
public string linkRedirectRespList;
}
[Serializable]
public class Root3
{
/// <summary>
///
/// </summary>
public int code;
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD>
/// </summary>
public string msg;
/// <summary>
///
/// </summary>
public List<DataItem2> data;
}
[Serializable]
public class DataItem
{
/// <summary>
///
/// </summary>
public int createBy;
/// <summary>
///
/// </summary>
public string createTime;
/// <summary>
///
/// </summary>
public int updateBy;
/// <summary>
///
/// </summary>
public string updateTime;
/// <summary>
///
/// </summary>
public int id;
/// <summary>
///
/// </summary>
public string bodyTemperature;
/// <summary>
///
/// </summary>
public string pulse;
/// <summary>
///
/// </summary>
public string respiratoryRate;
/// <summary>
///
/// </summary>
public int bloodPressure;
/// <summary>
///
/// </summary>
public int casesId;
/// <summary>
///
/// </summary>
public string diagnosisBackgroundId;
/// <summary>
///
/// </summary>
public string reason;
/// <summary>
///
/// </summary>
public string illustrate;
/// <summary>
///
/// </summary>
public int sort;
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
public string title;
/// <summary>
///
/// </summary>
public string dateTime;
/// <summary>
/// <20><><EFBFBD>ϱ<EFBFBD><CFB1><EFBFBD>
/// </summary>
public string background;
/// <summary>
///
/// </summary>
public int patientDiagnosis;
/// <summary>
///
/// </summary>
public string haveProjectId;
}
[Serializable]
public class Root2
{
/// <summary>
///
/// </summary>
public int code;
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD>
/// </summary>
public string msg;
/// <summary>
///
/// </summary>
public List<DataItem> data;
}
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
[Serializable]
public class RowsItem
{
/// <summary>
///
/// </summary>
public int createBy;
/// <summary>
///
/// </summary>
public string createTime;
/// <summary>
///
/// </summary>
public int updateBy;
/// <summary>
///
/// </summary>
public string updateTime;
/// <summary>
/// <20><><EFBFBD><EFBFBD>ID
/// </summary>
public int id;
/// <summary>
/// <20><><EFBFBD>Բ<EFBFBD><D4B2><EFBFBD>
/// </summary>
public string name;
/// <summary>
/// <20><><EFBFBD><EFBFBD>
/// </summary>
public string languageType;
/// <summary>
/// <20><><EFBFBD><EFBFBD>
/// </summary>
public string specialty;
/// <summary>
///
/// </summary>
public List<string> assessmentPoints;
/// <summary>
///
/// </summary>
public List<string> field;
/// <summary>
///
/// </summary>
public List<string> difficulty;
/// <summary>
///
/// </summary>
public string patientId;
/// <summary>
///
/// </summary>
public string image;
/// <summary>
///
/// </summary>
public string sex;
/// <summary>
///
/// </summary>
public string age;
/// <summary>
///
/// </summary>
public string weight;
/// <summary>
///
/// </summary>
public string feature;
/// <summary>
///
/// </summary>
public int haveClothing;
/// <summary>
///
/// </summary>
public string order;
}
[Serializable]
public class Data
{
/// <summary>
///
/// </summary>
public int total;
/// <summary>
///
/// </summary>
public List<RowsItem> rows;
}
[Serializable]
public class Root
{
/// <summary>
///
/// </summary>
public int code;
/// <summary>
/// <20><>ѯ<EFBFBD>ɹ<EFBFBD>
/// </summary>
public string msg;
/// <summary>
///
/// </summary>
public Data data;
}