Esempio n. 1
0
 public ActionResult recoommendprocess(string guid)
 {
     dynamic data = new System.Dynamic.ExpandoObject();
     CustomerDiaglosisList one = new CustomerDiaglosisList();
     CustomerDiaglosisConfirm confirm = new CustomerDiaglosisConfirm();
     ReturnValue r;
     string person = "";
     string date = "";
     int stepno = 0;
     if (guid != null && guid.ToString() != "")
     {
         Guid g;
         try
         {
             g = Guid.Parse(guid);
             one = diagnosticService.GetOneCustomerDiaglosisList(g);
             if (one == null)
             {
                 LogHelper.Info(Masterpage.CurrUser.alias, "501013:客户," + Masterpage.CurrUser.client_code + ",查看诊断建议流程页面失败,申请不存在");
                 r = new ReturnValue { message = "申请不存在", status = "error" };
             }
             else
             {
                 stepno = one.CustomerDiaglosisStepNo.Value;
                 confirm = diagnosticService.GetCustomerDiaglosisConfirm(one.CustomerDiaglosisGuid);
                 if (confirm != null)
                 {
                     person = confirm.CustomerDiaglosisConfirmPerson;
                     date = confirm.CustomerDiaglosisConfirmTime.Value.ToString("yyyy-MM-dd");
                 }
                 else
                 {
                     person = Masterpage.CurrUser.alias;
                     date = DateTime.Now.ToString("yyyy-MM-dd");
                 }
                 LogHelper.Info(Masterpage.CurrUser.alias, "501013:客户," + Masterpage.CurrUser.client_code + ",查看诊断建议流程页面,单号为:" + one.CustomerDiaglosisNumber);
                 r = new ReturnValue { message = "", status = "ok" };
             }
         }
         catch
         {
             LogHelper.Info(Masterpage.CurrUser.alias, "501013:客户," + Masterpage.CurrUser.client_code + ",查看诊断建议流程页面失败,参数有误");
             r = new ReturnValue { message = "参数有误", status = "error" };
         }
     }
     else
     {
         LogHelper.Info(Masterpage.CurrUser.alias, "501013:客户," + Masterpage.CurrUser.client_code + ",查看诊断建议流程页面失败,缺少参数");
         r = new ReturnValue { message = "缺少参数", status = "error" };
     }
     data.stepno = stepno;
     data.person = person;
     data.date = date;
     data.one = one;
     data.r = r;
     data.confirm = confirm;
     return View(data);
 }
Esempio n. 2
0
 public ActionResult recoommendpage(string guid, string t)
 {
     dynamic data = new System.Dynamic.ExpandoObject();
     CustomerDiaglosisList one = new CustomerDiaglosisList();
     string person = Masterpage.CurrUser.alias;
     string type = t;
     string number = "";
     //string units="";
     if (guid != null && guid.ToString() != "")
     {
         Guid g;
         try { g = Guid.Parse(guid); }
         catch { return RedirectToAction("recoommend"); }
         one = diagnosticService.GetOneCustomerDiaglosisList(g);
         data.hv = 1;
         person = one.CustomerDiaglosisApplicant;
         number = one.CustomerDiaglosisNumber.Replace(Masterpage.CurrUser.client_code + "-", "");
         LogHelper.Info(Masterpage.CurrUser.alias, "501012:客户," + Masterpage.CurrUser.client_code + ",查看诊断建议填写的信息,单号为:" + number);
         //units=one.un;
     }
     else
     {
         one = new CustomerDiaglosisList();
         number = diagnosticService.GetNewDiaglosisNumber(Masterpage.CurrUser.client_code).Replace(Masterpage.CurrUser.client_code + "-", "");
         LogHelper.Info(Masterpage.CurrUser.alias, "501012:客户," + Masterpage.CurrUser.client_code + ",打开新增诊断建议弹出页,生成诊断单号为:" + number);
     }
     //data.ddlh = diagnosticService.StandardUnitAerobic(Masterpage.CurrUser.client_code);
     //data.ddly = diagnosticService.StandardUnitAnaerobic(Masterpage.CurrUser.client_code);
     data.one = one;
     data.person = person;
     //data.units = units;
     data.number = number;
     data.type = t;
     return View(data);
 }