public override object Execute()
        {
            string CapitalFlowId = this._context.strBOID;
            IEnumerable <IncomeView>             capitalFlow         = cfBll.GetCFEntity(CapitalFlowId);
            IEnumerable <CapitalFlow_CFNodeView> CapitalFlowNodeList = cfnbll.GetEntityList(CapitalFlowId);
            List <T_AttachmentEntity>            attaclist           = tabll.GetFormList(CapitalFlowId, "default");
            IncomeView         income = new IncomeView();
            List <Node>        its    = new List <Node>();
            List <ATTACHMENT1> attcs  = new List <ATTACHMENT1>();

            income.Year              = capitalFlow.First().Year;
            income.Month             = capitalFlow.First().Month;
            income.OrgName           = capitalFlow.First().OrgName;
            income.OrgCode           = capitalFlow.First().OrgCode;
            income.CapitalFlow_Title = capitalFlow.First().CapitalFlow_Title;
            StringBuilder ProjectCodeList = new StringBuilder();

            foreach (var item in CapitalFlowNodeList)
            {
                Node node = new Node();
                node.CapitalPoolAdd         = item.CapitalPoolAdd;
                node.ProjCode               = item.ProjectID;
                node.ClearingAmount         = item.ClearingAmount;
                node.EcommerceGroupName     = item.EcommerceGroupName;
                node.ProjectName            = item.ProjectName;
                node.Proportion             = item.Proportion;
                node.PlatformExpensesAmount = item.PlatformExpensesAmount;
                node.IncomeAmount           = item.IncomeAmount;
                if (!its.Contains(node))
                {
                    its.Add(node);
                }
                ProjectCodeList.Append(item.ProjectID + ",");
            }
            string s             = ProjectCodeList.ToString();
            string projeCodeList = s.Substring(0, s.Length - 1);

            income.ProjectCodeList    = projeCodeList;
            income.AccountDetail      = new AccountDetail();
            income.AccountDetail.item = its.ToArray();
            var    geturl  = dataItemCache.GetDataItemByCodeAndName("SysConfig", "BPMAttacPath");
            string urlname = geturl.ItemValue;

            foreach (var item in attaclist)
            {
                ATTACHMENT1 attc = new ATTACHMENT1();
                attc.FILENAME = item.AttachmentName;
                attc.URL      = string.Format("{0}/{1}", urlname, item.Path);
                if (!attcs.Contains(attc))
                {
                    attcs.Add(attc);
                }
            }
            //income.Remark = capitalFlow.First().Remark;
            income.ATTACHMENT            = new ATTACHMENT();
            income.ATTACHMENT.attachment = attcs.ToArray();
            var d = Movit.Util.XmlHelper.Serializer(typeof(IncomeView), income);

            return(d);
        }
Exemple #2
0
        public ActionResult GetPageListJson(Pagination pagination, string queryJson)
        {
            var    watch    = CommonHelper.TimerStart();
            var    geturl   = dataItemCache.GetDataItemByCodeAndName("SysConfig", "BPMApplicateRoad");
            string urlname  = geturl.ItemValue;
            var    data     = ecommerceprojectrelationbll.GetPageList(pagination, queryJson, urlname);
            var    jsonData = new
            {
                rows     = data,
                total    = pagination.total,
                page     = pagination.page,
                records  = pagination.records,
                costtime = CommonHelper.TimerEnd(watch)
            };

            return(ToJsonResult(jsonData));
        }
Exemple #3
0
        public ActionResult GetPageListJson(Pagination pagination, string queryJson)
        {
            var watch  = CommonHelper.TimerStart();
            var data   = pay_infobll.GetPageList(pagination, queryJson);
            var geturl = dataItemCache.GetDataItemByCodeAndName("SysConfig", "BPMApplicateRoad");


            foreach (var item in data)
            {
                item.Url = string.Format("{0}?procInstId={1}&userid={2}&key={3}", geturl.ItemValue, item.Procinstid, item.CreateUserId, BpmMD5Helper.GetEnCodeStr(item.Procinstid));
            }

            var JsonData = new
            {
                rows     = data,
                total    = pagination.total,
                page     = pagination.page,
                records  = pagination.records,
                costtime = CommonHelper.TimerEnd(watch),
            };

            return(Content(JsonData.ToJson()));
        }
        public ActionResult GetDataItemByCodeAndName(string EnCode, string ItemName)
        {
            var data = dataItemCache.GetDataItemByCodeAndName(EnCode, ItemName);

            return(Content(data.ToJson()));
        }
Exemple #5
0
        public override object Execute()
        {
            string EProjectRelationId = this._context.strBOID;//合同ID
            EcommerceProjectRelationEntity ecommerceprojectrelationEntity = eprBll.GetEntity(EProjectRelationId);
            OP_ParcelEntity op_parcelEntity = op_parcelbll.GetEntityByproid(ecommerceprojectrelationEntity.ProjectID);
            IEnumerable <EcommerceDiscountProgramEntity> discount = edpbll.GetEntity(EProjectRelationId);
            List <T_AttachmentEntity> attaclist = tabll.GetFormList(EProjectRelationId, "default");
            ContractView       cv    = new ContractView();
            List <ITEM>        its   = new List <ITEM>();
            List <ATTACHMENT1> attcs = new List <ATTACHMENT1>();

            cv.ProjectName        = ecommerceprojectrelationEntity.ProjecName;
            cv.ProjCode           = op_parcelEntity.ParcelCode.Replace("-", ".");
            cv.ProjectType        = EnumHelper.ToDescription((ProjectTypeEnum)ecommerceprojectrelationEntity.ProjectType);
            cv.OrgName            = ecommerceprojectrelationEntity.CompanyName;
            cv.OrgCode            = ecommerceprojectrelationEntity.CompanyId;
            cv.EcommerceGroupName = ecommerceprojectrelationEntity.EcommerceGroupName;
            cv.EcommerceTypeName  = ecommerceprojectrelationEntity.EcommerceTypeName;
            cv.ContractName       = ecommerceprojectrelationEntity.ContractName;
            cv.ContractNature     = EnumHelper.ToDescription((ContractNatureEnum)ecommerceprojectrelationEntity.ContractNature);
            cv.ContractTypeName   = ecommerceprojectrelationEntity.ContractTypeName;
            cv.IsStandard         = ecommerceprojectrelationEntity.IsStandard == 0?"否":"是";
            cv.PartyA             = ecommerceprojectrelationEntity.PartyA;
            cv.PartyB             = ecommerceprojectrelationEntity.PartyB;
            cv.CooperateStartTime = Convert.ToDateTime(ecommerceprojectrelationEntity.CooperateStartTime).ToString("yyyy-MM-dd");
            cv.CooperateEndTime   = Convert.ToDateTime(ecommerceprojectrelationEntity.CooperateEndTime).ToString("yyyy-MM-dd");
            cv.BiddingMethod      = EnumHelper.ToDescription((BiddingMethodEnum)ecommerceprojectrelationEntity.BiddingMethod);
            cv.IsStamp            = ecommerceprojectrelationEntity.IsStamp == 0?"否":"是";
            cv.Agent               = ecommerceprojectrelationEntity.Agent;
            cv.CreateDate          = Convert.ToDateTime(ecommerceprojectrelationEntity.CreateDate).ToString("yyyy-MM-dd");
            cv.ForceContractAmount = ecommerceprojectrelationEntity.ForceContractAmount;
            cv.PlatformRate        = ecommerceprojectrelationEntity.PlatformRate;
            foreach (var item in discount)
            {
                ITEM it = new ITEM();
                it.Format   = item.Format;
                it.Amount   = item.Amount;
                it.Discount = item.Discount;
                if (!its.Contains(it))
                {
                    its.Add(it);
                }
            }
            cv.BDITEM      = new BDITEM();
            cv.BDITEM.item = its.ToArray();

            var    geturl  = dataItemCache.GetDataItemByCodeAndName("SysConfig", "BPMAttacPath");
            string urlname = geturl.ItemValue;

            foreach (var item in attaclist)
            {
                ATTACHMENT1 attc = new ATTACHMENT1();
                attc.FILENAME = item.AttachmentName;
                attc.URL      = string.Format("{0}/{1}", urlname, item.Path);
                if (!attcs.Contains(attc))
                {
                    attcs.Add(attc);
                }
            }
            cv.ATTACHMENT            = new ATTACHMENT();
            cv.ATTACHMENT.attachment = attcs.ToArray();
            var d = Movit.Util.XmlHelper.Serializer(typeof(ContractView), cv);

            return(d);
            //XmlDocument doc = new XmlDocument();
            //XmlDeclaration dec = doc.CreateXmlDeclaration("1.0", "utf-16", null);
            //doc.AppendChild(dec);
            ////创建一个根节点(一级)
            //XmlNode root = doc.CreateElement("DATA");
            //doc.AppendChild(root);
            ////创建节点(二级)
            //XmlElement ITEM = null;
            //XmlElement element = null;
            ////合同编号
            //element = doc.CreateElement("ProjectName");
            //element.SetAttribute("Text", "项目名称");
            //element.InnerText = ecommerceprojectrelationEntity.EcommerceProjectRelationID;
            ////项目名称
            //element = doc.CreateElement("CompanyName");
            //element.SetAttribute("Text", "所属区域");
            //element.InnerText = ecommerceprojectrelationEntity.ProjectName;
            //root.AppendChild(element);

            //ITEM = doc.CreateElement("优化方案Items");
            //ITEM.SetAttribute("ID", "BudgetItem");
            //root.AppendChild(ITEM);
            //foreach (var item in tcollection)
            //{
            //    XmlNode item = doc.CreateElement("item");

            //    //创建节点(三级)
            //    element = null;

            //    //集团/地区公司GUID
            //    element = doc.CreateElement("OrgUnitGUID");
            //    element.SetAttribute("Text", "集团/地区公司");
            //    element.InnerText = "三级节点数据";
            //    item.AppendChild(element);
            //}

            //return XmlHelper.ConvertXmlToString(doc);
        }