public override object Execute() { var data = eprBll.GetEntity(this._context.strBOID); var projectid = data.ProjectID; var ecommerceid = data.EcommerceID; var istrunk = 1; //查询是否存在电商和项目是否存在istrunk=1 int conunt = eprBll.GetIsTrunkCount(projectid, ecommerceid, istrunk); if (conunt > 0) { istrunk = 0; } EcommerceProjectRelationEntity model = new EcommerceProjectRelationEntity() { IsTrunk = istrunk, EcommerceProjectRelationID = this._context.strBOID, ApprovalState = this._context.ApproveStatus, LatestApprover = this._context.strApproverId, LatestApprovetime = this._context.dtTime, LatestComment = this._context.strComment, Procinstid = this._context.iProcInstID.ToString() }; eprBll.ApprovalUpdateState(this._context.strBOID, model); return(true); }
public ActionResult GetFormJson(string keyValue) { var data = ecommerceprojectrelationbll.GetEntity(keyValue); var ecomentity = ecombll.GetEntity(data.EcommerceID); var ecomgroupentity = ecomgroupbll.GetEntity(data.EcommerceGroupID); data.EcommerceName = ecomentity.EcommerceName; data.EcommerceGroupName = ecomgroupentity.EcommerceGroupName; return(ToJsonResult(data)); }
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); }