private IDictionary<string, decimal> GetPaymentDictionary(N_Order_QuoteInfo ContractInfo, N_Order_QuoteEx OwnerInfo, decimal ProCost, string stringFormat = @"f2")
 {
     List<Payment> PaymentList = base.GetPaymentList(ContractInfo, OwnerInfo, decimal.Parse(this.ProCost));
     IDictionary<string, decimal> dictionary = base.GetPaymentDictionary(PaymentList);
     return dictionary;
 }
Exemplo n.º 2
0
        /// <summary>
        /// 获取工程款列表
        /// </summary>
        protected List<Payment> GetPaymentList(N_Order_QuoteInfo ContractInfo, N_Order_QuoteEx OwnerInfo, decimal ProCost)
        {
            List<Payment> PaymentList = new List<Payment>();

            string sqlWhere = " and SRCTAB.IsDel=0 and psd.IsDel=0 and SRCTAB.SchemeCategory=1 and SRCTAB.status=1 and psi.IsDel=0  ";
            if (ContractInfo.SuitID == 0)
            {
                sqlWhere += " and SRCTAB.SchemeType=1";
            }
            if (ContractInfo.SuitID > 0)
            {
                sqlWhere += " and SRCTAB.SchemeType=0";
            }

            List<ORM.Base.QueryResult> qres = new List<ORM.Base.QueryResult>();
            EBS.Interface.Model.N_Payment_SchemeInfo psi = new Interface.Model.N_Payment_SchemeInfo();
            qres = psi.LEFT_JOIN(EBS.Interface.Model.N_Payment_SchemeDetail.TableInfo, "psd", "SRCTAB.id = psd.SchemeId").LEFT_JOIN(EBS.Interface.Model.N_Payment_SchemeItem.TableInfo, "psi", "psd.ID = psi.DetailId").Where("SRCTAB.CityID=@cityid " + sqlWhere, new object[] { OwnerInfo.CityID }).List("psi.OrderStateCode,psi.sort asc");
            //若无该城市收款配置,则使用全国收款配置  cityid=0
            if (qres.Count <= 0)
            {
                psi = new Interface.Model.N_Payment_SchemeInfo();
                qres = new List<ORM.Base.QueryResult>();
                qres = psi.LEFT_JOIN(EBS.Interface.Model.N_Payment_SchemeDetail.TableInfo, "psd", "SRCTAB.id = psd.SchemeId ").LEFT_JOIN(EBS.Interface.Model.N_Payment_SchemeItem.TableInfo, "psi", "psd.ID = psi.DetailId").Where("SRCTAB.CityID=@cityid " + sqlWhere, new object[] { 0 }).List("psi.OrderStateCode,psi.sort asc");
            }
            foreach (var item in qres)
            {
                var psiinfo = item.Get<EBS.Interface.Model.N_Payment_SchemeItem>();
                PaymentList.Add(new Payment()
                {
                    StateCode = psiinfo.OrderStateCode,
                    StateName = psiinfo.OrderStateName,
                    Rate = psiinfo.Rate,
                    Money = ProCost * psiinfo.Rate
                });
            }
            return PaymentList;
        }
 /// <summary>
 /// 合同预览,取数据表时间
 /// </summary>
 /// <param name="ContractInfo">The contract information.</param>
 public void SetPreviewConstructionContractDate(N_Order_QuoteInfo ContractInfo)
 {
     if (ContractInfo != null && !ContractInfo.ConstructionContractingTime.Equals(DateTime.Parse("1900/1/1")))
     {
         this.SetConstructionContractDate(ContractInfo.ConstructionContractingTime);
     }
 }
Exemplo n.º 4
0
 protected string GetContractValidity(N_Order_QuoteInfo ContractInfo)
 {
     DateTime endDate = ContractInfo.DesignContractingTime.Year == 1900 ? DateTime.Parse("1900-01-01") : ContractInfo.DesignContractingTime.AddMonths(2);
     StringBuilder ContractValidity = new StringBuilder();
     ContractValidity.Append(ContractInfo.DesignContractingTime.ToLongDateString());
     ContractValidity.Append("至");
     ContractValidity.Append(endDate.ToLongDateString());
     return ContractValidity.ToString();
 }