private void TransdisciplinaryOperation(WordDocument doc, ReportRequest request)
        {
            IDC_TransdisciplinaryPlan    service = IOCContainer.Instance.Resolve <IDC_TransdisciplinaryPlan>();
            DC_MultiteamCarePlanRecModel model   = service.QueryMultiCarePlanRec(request.seqNo).Data;
            var basic = reportManageService.GetBasicInfoById(model.FEENO);
            var org   = organizationManageService.GetOrg(SecurityHelper.CurrentPrincipal.OrgId);

            if (basic != null)
            {
                doc.ReplaceText("OrgName", org.Data.OrgName);
                doc.ReplaceText("RegName", basic.Data.RegName);
                if (!string.IsNullOrEmpty(basic.Data.NurseAidesName))
                {
                    doc.ReplaceText("NurseAidesName", basic.Data.NurseAidesName);
                }
                else
                {
                    doc.ReplaceText("NurseAidesName", "");
                }
            }
            BindData(model.PlanEval, doc);

            string imgPath = model.PlanEval.ECOLOGICALMAP;

            if (!string.IsNullOrEmpty(imgPath))
            {
                string mapPath = Server.MapPath(VirtualPathUtility.GetDirectory("~")) + imgPath.Substring(1);
                try
                {
                    doc.InsertImage("InsertImage", mapPath, 300, 200);
                }
                catch (Exception ex)
                { doc.ReplaceText("InsertImage", ""); }
            }
            else
            {
                doc.ReplaceText("InsertImage", "");
            }

            if (model.CarePlan.Count > 0)
            {
                DataTable dt = new DataTable();
                dt.Columns.Add("MAJORTYPE");
                dt.Columns.Add("QUESTIONTYPE");
                dt.Columns.Add("ACTIVITY");
                dt.Columns.Add("TRACEDESC");
                foreach (DC_MultiteamCarePlanModel carePlan in model.CarePlan)
                {
                    var dr = dt.NewRow();
                    dr["MAJORTYPE"]    = carePlan.MAJORTYPE;
                    dr["QUESTIONTYPE"] = carePlan.QUESTIONTYPE;
                    dr["ACTIVITY"]     = carePlan.ACTIVITY;
                    dr["TRACEDESC"]    = carePlan.TRACEDESC;
                    dt.Rows.Add(dr);
                }
                doc.FillTable(1, dt, "", "", 1);//因调整打印模板,做对应修改
            }
        }
示例#2
0
        public IHttpActionResult Get(long seqNo, long feeNo)
        {
            var response = service.QueryMultiCarePlanRec(seqNo);

            return(Ok(response));
        }