Exemple #1
0
        public void HealthAnswerSubmit()
        {
            BaoxianDataBLL  baoxianDataBLL = new BaoxianDataBLL();
            HealthNotifyReq model          = new HealthNotifyReq();

            model.transNo = UtilityHelper.CommonHelper.OrderNoOne();
            //model.customkey = "bowangjishi";
            model.answer = string.Empty;
            var res = baoxianDataBLL.HealthAnswerSubmit(model);
        }
Exemple #2
0
        public void GetHealth(HttpRequest Request, HttpResponse Response)
        {
            string          TransNo  = UtilityHelper.BWJSCommonHelper.SafeString(Request["transNo"], "");
            string          Answer   = UtilityHelper.BWJSCommonHelper.SafeString(Request["answer"], "");
            HealthNotifyReq trialReq = new HealthNotifyReq();

            trialReq.transNo = TransNo;
            string s = UtilityHelper.Utils.MD5(SerializerHelper.SerializeObject(Answer));

            trialReq.answer = s;
            HealthNotifyResp resp = new HealthNotifyResp();

            resp = baoxianBLL.HealthAnswerSubmit(trialReq);
            string strJson = SerializerHelper.SerializeObject(resp);

            Response.Write(strJson);
        }
Exemple #3
0
 /// <summary>
 /// 健康告知提交
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public HealthNotifyResp HealthAnswerSubmit(HealthNotifyReq model)
 {
     try
     {
         string methodName = "healthAnswerSubmit";
         model.customkey = Customkey;
         string           strJson   = SerializerHelper.ToJson(model);
         string           sign      = UtilityHelper.Utils.MD5(VI + strJson);
         string           url       = URLBaseMoFang + methodName + ".html?sign=" + sign;
         string           retrunStr = UtilityHelper.HttpService.GetHttpWebResponseByRestSharp(url, strJson);
         HealthNotifyResp outModel  = new HealthNotifyResp();
         outModel = SerializerHelper.FromJsonTo <HealthNotifyResp>(retrunStr);
         if (outModel.respstat != "0000")
         {
             ReceivedLog(model.transNo, "HealthAnswerSubmit", outModel.respmsg);
         }
         return(outModel);
     }
     catch (Exception ex)
     {
         ExceptionLogBLL.WriteExceptionLogToDB(ex.ToString());
         return(null);
     }
 }