using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PTMedicalInsurance.Helper
{
    public class IrisDataHelper
    {

        public string GetToFileData(string dclaRtn = "")
        {
            System.Text.StringBuilder json = new System.Text.StringBuilder("{", 1000);
            json.AppendFormat("\"code\":\"02030003\",");
            json.AppendFormat("\"params\":[{0}\"CardID\":\"\",","{");
            json.AppendFormat("\"TransCode\":\"\",");
            json.AppendFormat("\"CreateDate\":\"\"");
            json.AppendFormat("{0}],","}");
            //json.AppendFormat("\"session\":[{");
            //json.AppendFormat("\"userID\":\"1011\",");
            //json.AppendFormat("\"userCode\":\"070008\",");
            //json.AppendFormat("\"userName\":\"熊燕\",");
            //json.AppendFormat("\"locID\":\"425\",");
            //json.AppendFormat("\"locDesc\":\"门诊收费处\",");
            //json.AppendFormat("\"groupID\":\"357\",");
            //json.AppendFormat("\"groupDesc\":\"门诊结算\",");
            json.AppendFormat("\"session\":[{0}\"userID\":\"1011\",\"userCode\":\"070008\"," +
                "\"userName\":\"熊燕\",\"locID\":\"425\",\"locDesc\":\"门诊收费处\",\"groupID\":\"357\"," +
                "\"groupDesc\":\"门诊结算\",\"hospID\":\"50\",\"hospCode\":\"H07\",\"hospDesc\":\"南昌普瑞眼科医院\"," +
                "\"langID\":\"1\",\"langDesc\":\"简体中文\",\"changeFlag\":\"N\",\"changeDesc\":\"\",\"lastLoginDate\":\"2022-08-30\"," +
                "\"lastLoginTime\":\"08:02:13\",\"directorAuth\":\"N\",\"defaultMenuType\":\"1\",\"titleDesc\":\"\",\"userYBCode\":\"\"," +
                "\"hospYBCode\":\"\",\"path\":\"/05100061\",\"sessionID\":\"uue1GJWSCf\",\"errorMessageTime\":\"\",\"language\":\"CN\"," +
                "\"messageTime\":1{1}]{1}", "{", "}");
            //json.AppendFormat("\"hosp_agre_refl_flag\":\"{0}\"", "1");
            //json.Append("}]}");
            return json.ToString();
        }

        /// <summary>
        /// IRIS用户验证信息
        /// </summary>
        /// <returns></returns>
        public JObject AddUserJson()
        {
            dynamic userData = new JObject();
            userData.userID = "1011";
            userData.userCode = "070008";
            userData.userName = "熊燕";
            userData.locID = "425";
            userData.locDesc = "门诊收费处";
            userData.groupID = "357";
            userData.groupDesc = "门诊结算";
            userData.hospID = "50";
            userData.hospCode = "H07";
            userData.hospDesc = "南昌普瑞眼科医院";
            userData.langID = "1";
            userData.langDesc = "简体中文";
            userData.changeFlag = "N";
            userData.changeDesc = "";
            userData.lastLoginDate = "2022-08-30";
            userData.lastLoginTime = "08:02:13";
            userData.directorAuth = "N";
            userData.defaultMenuType = "1";
            userData.titleDesc = "";
            userData.userYBCode = "";
            userData.hospYBCode = "";
            userData.path = "/05100061";
            userData.sessionID = "uue1GJWSCf";
            userData.errorMessageTime = "";
            userData.language = "CN";
            userData.messageTime = 1;
            return userData;
        }
    }
}
