private void ActivityReport(WordDocument doc, ReportRequest request)
        {
            ISocialWorkerManageService reportManageService = IOCContainer.Instance.Resolve <ISocialWorkerManageService>();
            var bd             = reportManageService.GetActivityRequEval(request.id).Data;
            var directionsense = GetNameByCodeL00012(bd.Directionsense);

            directionsense += "( ";
            if (bd.Directman == 1)
            {
                directionsense += "人 ";
            }
            if (bd.Directtime == 1)
            {
                directionsense += "时 ";
            }
            if (bd.Directaddress == 1)
            {
                directionsense += "地 ";
            }
            directionsense   += ")";
            bd.Directionsense = directionsense;

            var memory = GetNameByCodeL00013(bd.Memory);

            memory += "( ";
            if (bd.Memoryflag == 1)
            {
                memory += "长期";
            }
            if (bd.Memoryflag == -1)
            {
                memory += "短期";
            }
            memory   += ")";
            bd.Memory = memory;

            if (bd.Talkedwilling != null)
            {
                if (bd.Talkedwilling.Trim().ToUpper() == "TRUE")
                {
                    bd.Talkedwilling = "有意愿及选择参与之活动内容";
                }
            }
            if (bd.Talkednowilling != null)
            {
                if (bd.Talkednowilling.Trim().ToUpper() == "TRUE")
                {
                    bd.Talkedwilling = "无意愿参与活动将安排资源介入或个别辅导";
                }
            }
            if (bd.Nottalked != null)
            {
                if (bd.Nottalked.Trim().ToUpper() == "TRUE")
                {
                    bd.Nottalked = "因生理/心理/认知等障碍由社工预计参与活动";
                }
                else
                {
                    bd.Nottalked = "";
                }
            }

            bd.Vision    = GetNameByCodeL00010(bd.Vision);
            bd.Smell     = GetNameByCodeL00010(bd.Smell);
            bd.Sensation = GetNameByCodeL00010(bd.Sensation);
            bd.Taste     = GetNameByCodeL00010(bd.Taste);
            bd.Hearing   = GetNameByCodeL00010(bd.Hearing);
            bd.Upperlimb = GetNameByCodeL00010(bd.Upperlimb);
            bd.Lowerlimb = GetNameByCodeL00010(bd.Lowerlimb);
            bd.Attention = GetNameByCodeL00011(bd.Attention);

            bd.Comprehension = GetNameByCodeL00013(bd.Comprehension);

            bd.Expression     = GetNameByCodeL00014(bd.Expression);
            bd.Artactivity    = GetWrapData(bd.Artactivity);
            bd.Aidsactivity   = GetWrapData(bd.Aidsactivity);
            bd.Severeactivity = GetWrapData(bd.Severeactivity);
            bd.FeeName        = request.feeName;



            BindData(bd, doc);
        }
Exemplo n.º 2
0
        public void DowdloadDLN1(string templateName, string startDateStr, string endDateStr, string feeNo, string floorId)
        {
            using (WordDocument doc = new WordDocument())
            {
                //加载模板
                doc.LoadModelDoc(templateName);

                var carelist = GetCarePlanList(startDateStr, endDateStr, feeNo, floorId);
                if (carelist != null && carelist.Count > 0)
                {
                    foreach (var item in carelist)
                    {
                        doc.NewPartDocument();

                        ISocialWorkerManageService reportManageService = IOCContainer.Instance.Resolve <ISocialWorkerManageService>();
                        var bd             = reportManageService.GetActivityRequEval(item.Id).Data;
                        var directionsense = GetNameByCodeL00012(bd.Directionsense);
                        directionsense += "( ";
                        if (bd.Directman == 1)
                        {
                            directionsense += "人 ";
                        }
                        if (bd.Directtime == 1)
                        {
                            directionsense += "时 ";
                        }
                        if (bd.Directaddress == 1)
                        {
                            directionsense += "地 ";
                        }
                        directionsense   += ")";
                        bd.Directionsense = directionsense;

                        var memory = GetNameByCodeL00013(bd.Memory);
                        memory += "( ";
                        if (bd.Memoryflag == 1)
                        {
                            memory += "长期";
                        }
                        if (bd.Memoryflag == -1)
                        {
                            memory += "短期";
                        }
                        memory   += ")";
                        bd.Memory = memory;

                        if (bd.Talkedwilling != null)
                        {
                            if (bd.Talkedwilling.Trim().ToUpper() == "TRUE")
                            {
                                bd.Talkedwilling = "有意愿及选择参与之活动内容";
                            }
                        }
                        if (bd.Talkednowilling != null)
                        {
                            if (bd.Talkednowilling.Trim().ToUpper() == "TRUE")
                            {
                                bd.Talkedwilling = "无意愿参与活动将安排资源介入或个别辅导";
                            }
                        }
                        if (bd.Nottalked != null)
                        {
                            if (bd.Nottalked.Trim().ToUpper() == "TRUE")
                            {
                                bd.Nottalked = "因生理/心理/认知等障碍由社工预计参与活动";
                            }
                            else
                            {
                                bd.Nottalked = "";
                            }
                        }

                        bd.Vision    = GetNameByCodeL00010(bd.Vision);
                        bd.Smell     = GetNameByCodeL00010(bd.Smell);
                        bd.Sensation = GetNameByCodeL00010(bd.Sensation);
                        bd.Taste     = GetNameByCodeL00010(bd.Taste);
                        bd.Hearing   = GetNameByCodeL00010(bd.Hearing);
                        bd.Upperlimb = GetNameByCodeL00010(bd.Upperlimb);
                        bd.Lowerlimb = GetNameByCodeL00010(bd.Lowerlimb);
                        bd.Attention = GetNameByCodeL00011(bd.Attention);

                        bd.Comprehension = GetNameByCodeL00013(bd.Comprehension);

                        bd.Expression     = GetNameByCodeL00014(bd.Expression);
                        bd.Artactivity    = GetWrapData(bd.Artactivity);
                        bd.Aidsactivity   = GetWrapData(bd.Aidsactivity);
                        bd.Severeactivity = GetWrapData(bd.Severeactivity);
                        bd.CarerName      = item.CarerName;
                        bd.FeeName        = item.FeeName;

                        ActivityRequEval ar = new ActivityRequEval();

                        ar.InDate          = bd.InDate.ToString();
                        ar.EvalDate        = bd.EvalDate.ToString();
                        ar.FeeName         = bd.FeeName;
                        ar.Carer           = bd.CarerName;
                        ar.Vision          = bd.Vision;
                        ar.Attention       = bd.Attention;
                        ar.Smell           = bd.Smell;
                        ar.Directionsense  = bd.Directionsense;
                        ar.Sensation       = bd.Sensation;
                        ar.Comprehension   = bd.Comprehension;
                        ar.Taste           = bd.Taste;
                        ar.Memory          = bd.Memory;
                        ar.Hearing         = bd.Hearing;
                        ar.Expression      = bd.Expression;
                        ar.Upperlimb       = bd.Upperlimb;
                        ar.Othernarrative  = bd.Othernarrative;
                        ar.Lowerlimb       = bd.Lowerlimb;
                        ar.Hallucination   = bd.Hallucination;
                        ar.Delusion        = bd.Delusion;
                        ar.Emotion         = bd.Emotion;
                        ar.Self            = bd.Self;
                        ar.Behaviorcontent = bd.Behaviorcontent;
                        ar.Behaviorfreq    = bd.Behaviorfreq;
                        ar.Activity        = bd.Activity;
                        ar.Talkedwilling   = bd.Talkedwilling;
                        ar.Nottalked       = bd.Nottalked;
                        ar.Artactivity     = bd.Artactivity;
                        ar.Aidsactivity    = bd.Aidsactivity;
                        ar.Severeactivity  = bd.Severeactivity;

                        doc.BindReportData(ar);
                        doc.AddPartDocument();
                    }
                }
                if (!doc.IsDocNull())
                {
                    Util.DownloadFile(doc.SaveDoc("个别化活动需求评估及计画"));
                }
            }
        }