コード例 #1
0
 public RemindResponseData RemindThroughDll(Content content)
 {
     var exception = new Exception();
     RemindResponseData remindResponseData = new RemindResponseData();
     try
     {
         var postContent = new StringBuilder(JSON.Serialize(Mapping(content), option));
         Dlink(new StringBuilder(authToken), new StringBuilder(PublicType.Remind), postContent, new StringBuilder(baseUrl), Int32.Parse(timeOut) * 1000);
         remindResponseData = JSON.Deserialize<RemindResponseData>(postContent.ToString(), option);
     }
     catch (Win32Exception ex)
     {
         //exception = ex;
         remindResponseData.Success = "F";
         remindResponseData.ErrorCode = "";
         remindResponseData.ErrorMsg = ex.Message;
     }
     return remindResponseData;
 }
コード例 #2
0
        public Content Mapping(Content content)
        {
            //单位代码
            string unitCode = "";
            //外部代码
            string externalCode = "";

            string sql = "Select dwdm,wbbh from cw_khxx where brbh ='" + content.CardNo + "'";
            using (OracleConnection con = new OracleConnection(connectionString))
            {
                con.Open();
                OracleCommand command = new OracleCommand(sql, con);
                var reader = command.ExecuteReader();
                while (reader.Read())
                {
                    unitCode = reader.GetValue(0).ToString();
                    externalCode = reader.GetValue(1).ToString();
                }
            }
            //把本地医生编号转换为社保医生编号
            content.DoctorCode = GetDoctorCode(content.DoctorCode, unitCode, externalCode);
            //将科室转换为社保科室代码
            var deptNOs = GetMapping("deptNOs", "SELECT distinct ZKID,SBKSDM FROM CW_YB_KSDZ");
            if (deptNOs.ContainsKey(content.MedicalDeptCode))
            {
                content.MedicalDeptCode = deptNOs[content.MedicalDeptCode];
            }
            return content;
        }