Esempio n. 1
0
        private void GetABCD( List<T_FB_COMPANYBUDGETAPPLYMASTER> T_FB_COMPANYBUDGETAPPLYMASTERList,
       
            List<T_FB_COMPANYBUDGETAPPLYDETAIL> T_FB_COMPANYBUDGETAPPLYDETAILList,
             List<T_FB_COMPANYBUDGETMODMASTER> T_FB_COMPANYBUDGETMODMASTERList ,
            List<T_FB_COMPANYBUDGETMODDETAIL> T_FB_COMPANYBUDGETMODDETAILList,
            List<T_FB_DEPTBUDGETAPPLYMASTER> T_FB_DEPTBUDGETAPPLYMASTERList,

            List<T_FB_DEPTBUDGETAPPLYDETAIL> T_FB_DEPTBUDGETAPPLYDETAILList ,
             List<T_FB_DEPTBUDGETADDMASTER> T_FB_DEPTBUDGETADDMASTERList,
            List<T_FB_DEPTBUDGETADDDETAIL> T_FB_DEPTBUDGETADDDETAILList,
             List<T_FB_CHARGEAPPLYMASTER> T_FB_CHARGEAPPLYMASTERList,

            List<T_FB_CHARGEAPPLYDETAIL> T_FB_CHARGEAPPLYDETAILList,

            List<T_FB_PERSONBUDGETAPPLYDETAIL> T_FB_PERSONBUDGETAPPLYDETAILList,
            List<T_FB_PERSONBUDGETADDDETAIL> T_FB_PERSONBUDGETADDDETAILList,

            T_FB_BUDGETACCOUNT item,
            ref decimal A,ref decimal B,
            ref decimal C, 
            ref decimal C1, ref decimal D1,
            ref decimal C2, ref decimal D2, 
            ref decimal D, ref decimal E, 
            ref decimal F, ref decimal H, 
            ref decimal G)
        {
            
            #region//年度预算A
            var YearMoney = from a in T_FB_COMPANYBUDGETAPPLYMASTERList
                            join b in T_FB_COMPANYBUDGETAPPLYDETAILList
                         on a.COMPANYBUDGETAPPLYMASTERID equals b.T_FB_COMPANYBUDGETAPPLYMASTER.COMPANYBUDGETAPPLYMASTERID
                         where a.OWNERCOMPANYID == item.OWNERCOMPANYID
                         && b.T_FB_SUBJECT.SUBJECTID == item.T_FB_SUBJECT.SUBJECTID
                         && a.OWNERDEPARTMENTID == item.OWNERDEPARTMENTID
                         && a.BUDGETYEAR == item.BUDGETYEAR
                         && a.CHECKSTATES==2
                         select b.BUDGETMONEY;
                if (YearMoney.Count() > 0)
                {
                    foreach (var va in YearMoney)
                    {
                        A = A + va;
                    }
                }
            #endregion

                #region//年度增补B
                var YearAddMoney = from a in T_FB_COMPANYBUDGETMODMASTERList
                                   join b in T_FB_COMPANYBUDGETMODDETAILList
                         on a.COMPANYBUDGETMODMASTERID equals b.T_FB_COMPANYBUDGETMODMASTER.COMPANYBUDGETMODMASTERID
                         where a.OWNERCOMPANYID == item.OWNERCOMPANYID
                         && b.T_FB_SUBJECT.SUBJECTID == item.T_FB_SUBJECT.SUBJECTID
                         && a.OWNERDEPARTMENTID == item.OWNERDEPARTMENTID
                         && a.BUDGETYEAR == item.BUDGETYEAR
                         && a.CHECKSTATES == 2
                         select b.BUDGETMONEY;
                if (YearAddMoney.Count() > 0)
                {
                    foreach (var va in YearAddMoney)
                    {
                        B = B + va;
                    }
                }
                #endregion

                #region//月度预算部门C
                var MonthMoeny = from a in T_FB_DEPTBUDGETAPPLYMASTERList
                                 join b in T_FB_DEPTBUDGETAPPLYDETAILList
                         on a.DEPTBUDGETAPPLYMASTERID equals b.T_FB_DEPTBUDGETAPPLYMASTER.DEPTBUDGETAPPLYMASTERID
                         where a.OWNERCOMPANYID == item.OWNERCOMPANYID
                         && b.T_FB_SUBJECT.SUBJECTID == item.T_FB_SUBJECT.SUBJECTID
                         && a.OWNERDEPARTMENTID == item.OWNERDEPARTMENTID
                         && a.BUDGETARYMONTH.Year == item.BUDGETYEAR
                         && a.CHECKSTATES == 2
                         select b.TOTALBUDGETMONEY;
                if (MonthMoeny.Count() > 0)
                {
                    foreach (var va in MonthMoeny)
                    {
                        C = C + va.Value;
                    }
                }
                #endregion

                #region//月度预算增补部门D
                var MonthAddMoeny = from a in T_FB_DEPTBUDGETADDMASTERList
                                    join b in T_FB_DEPTBUDGETADDDETAILList
                         on a.DEPTBUDGETADDMASTERID equals b.T_FB_DEPTBUDGETADDMASTER.DEPTBUDGETADDMASTERID
                         where a.OWNERCOMPANYID == item.OWNERCOMPANYID
                         && b.T_FB_SUBJECT.SUBJECTID == item.T_FB_SUBJECT.SUBJECTID
                         && a.OWNERDEPARTMENTID == item.OWNERDEPARTMENTID
                         && a.BUDGETARYMONTH.Year == item.BUDGETYEAR
                         && a.CHECKSTATES == 2
                         select b.TOTALBUDGETMONEY;
                if (MonthAddMoeny.Count() > 0)
                {
                    foreach (var va in MonthAddMoeny)
                    {
                        D = D + va.Value;
                    }
                }
                #endregion

                #region//月度预算-部门公共C1
                var DepartmentCommonMonthMoeny = from a in T_FB_DEPTBUDGETAPPLYMASTERList
                                                 join b in T_FB_DEPTBUDGETAPPLYDETAILList
                                 on a.DEPTBUDGETAPPLYMASTERID equals b.T_FB_DEPTBUDGETAPPLYMASTER.DEPTBUDGETAPPLYMASTERID
                                 where a.OWNERCOMPANYID == item.OWNERCOMPANYID
                                 && b.T_FB_SUBJECT.SUBJECTID == item.T_FB_SUBJECT.SUBJECTID
                                 && a.OWNERDEPARTMENTID == item.OWNERDEPARTMENTID
                                 && a.BUDGETARYMONTH.Year == item.BUDGETYEAR
                                 && a.CHECKSTATES == 2
                                 select b.BUDGETMONEY;
                if (DepartmentCommonMonthMoeny.Count() > 0)
                {
                    foreach (var va in DepartmentCommonMonthMoeny)
                    {
                        C1 = C1 + va;
                    }
                }
                #endregion

                #region//月度预算增补-部门公共D1
                var DepartmentMonthAddMoeny = from a in T_FB_DEPTBUDGETADDMASTERList
                                              join b in T_FB_DEPTBUDGETADDDETAILList
                                    on a.DEPTBUDGETADDMASTERID equals b.T_FB_DEPTBUDGETADDMASTER.DEPTBUDGETADDMASTERID
                                    where a.OWNERCOMPANYID == item.OWNERCOMPANYID
                                    && b.T_FB_SUBJECT.SUBJECTID == item.T_FB_SUBJECT.SUBJECTID
                                    && a.OWNERDEPARTMENTID == item.OWNERDEPARTMENTID
                                    && a.BUDGETARYMONTH.Year == item.BUDGETYEAR
                                    && a.CHECKSTATES == 2
                                    select b.BUDGETMONEY;
                if (DepartmentMonthAddMoeny.Count() > 0)
                {
                    foreach (var va in DepartmentMonthAddMoeny)
                    {
                        D1 = D1 + va;
                    }
                }
                #endregion

                #region//月度预算-个人C2
                var PersonCommonMonthMoeny = from a in T_FB_DEPTBUDGETAPPLYMASTERList
                                             join b in T_FB_DEPTBUDGETAPPLYDETAILList
                                                 on a.DEPTBUDGETAPPLYMASTERID equals b.T_FB_DEPTBUDGETAPPLYMASTER.DEPTBUDGETAPPLYMASTERID
                                             join c in T_FB_PERSONBUDGETAPPLYDETAILList
                                                 on b.DEPTBUDGETAPPLYDETAILID equals c.T_FB_DEPTBUDGETAPPLYDETAIL.DEPTBUDGETAPPLYDETAILID
                                                 where a.OWNERCOMPANYID == item.OWNERCOMPANYID
                                                 && b.T_FB_SUBJECT.SUBJECTID == item.T_FB_SUBJECT.SUBJECTID
                                                 && c.OWNERPOSTID == item.OWNERPOSTID
                                                 && c.OWNERID == item.OWNERID
                                                 && a.BUDGETARYMONTH.Year == item.BUDGETYEAR
                                                 && a.CHECKSTATES == 2
                                                 select c.BUDGETMONEY;
                if (PersonCommonMonthMoeny.Count() > 0)
                {
                    foreach (var va in PersonCommonMonthMoeny)
                    {
                        C2 = C2 + va.Value;
                    }
                }
                #endregion

                #region//月度预算增补-个人D2
                var PersonMonthAddMoeny = from a in T_FB_DEPTBUDGETADDMASTERList
                                          join b in T_FB_DEPTBUDGETADDDETAILList
                                              on a.DEPTBUDGETADDMASTERID equals b.T_FB_DEPTBUDGETADDMASTER.DEPTBUDGETADDMASTERID
                                          join c in T_FB_PERSONBUDGETADDDETAILList
                                              on b.DEPTBUDGETADDDETAILID equals c.T_FB_DEPTBUDGETADDDETAIL.DEPTBUDGETADDDETAILID
                                              where a.OWNERCOMPANYID == item.OWNERCOMPANYID
                                              && b.T_FB_SUBJECT.SUBJECTID == item.T_FB_SUBJECT.SUBJECTID
                                              && c.OWNERPOSTID == item.OWNERPOSTID
                                              && c.OWNERID == item.OWNERID
                                              && a.BUDGETARYMONTH.Year == item.BUDGETYEAR
                                              && a.CHECKSTATES == 2
                                              select c.BUDGETMONEY;
                if (PersonMonthAddMoeny.Count() > 0)
                {
                    foreach (var va in PersonMonthAddMoeny)
                    {
                        D2 = D2 + va.Value;
                    }
                }
                #endregion

                #region//个人费用部门科目报销已终审E
                if(T_FB_CHARGEAPPLYDETAILList!=null)
                { 
                    var ChargeMoenyChecked = from a in T_FB_CHARGEAPPLYMASTERList
                                             join b in T_FB_CHARGEAPPLYDETAILList
                                        on a.CHARGEAPPLYMASTERID equals b.T_FB_CHARGEAPPLYMASTER.CHARGEAPPLYMASTERID
                                        where a.OWNERCOMPANYID == item.OWNERCOMPANYID
                                        && b.T_FB_SUBJECT.SUBJECTID == item.T_FB_SUBJECT.SUBJECTID
                                        && a.OWNERDEPARTMENTID == item.OWNERDEPARTMENTID
                                        && a.BUDGETARYMONTH.Year == item.BUDGETYEAR
                                        && a.CHECKSTATES == 2
                                        && b.CHARGETYPE==2//部门
                                        select b.CHARGEMONEY;
                    if (ChargeMoenyChecked.Count() > 0)
                    {
                        foreach (var va in ChargeMoenyChecked)
                        {
                            E = E + va;
                        }
                    }
                }
                #endregion

                #region//个人费用部门科目报销终审中F
                if (T_FB_CHARGEAPPLYDETAILList != null)
                {
                    var ChargeingMoeny = from a in T_FB_CHARGEAPPLYMASTERList
                                         join b in T_FB_CHARGEAPPLYDETAILList
                                      on a.CHARGEAPPLYMASTERID equals b.T_FB_CHARGEAPPLYMASTER.CHARGEAPPLYMASTERID
                                         where a.OWNERCOMPANYID == item.OWNERCOMPANYID
                                         && b.T_FB_SUBJECT.SUBJECTID == item.T_FB_SUBJECT.SUBJECTID
                                         && a.OWNERDEPARTMENTID == item.OWNERDEPARTMENTID
                                         && a.BUDGETARYMONTH.Year == item.BUDGETYEAR
                                         && a.CHECKSTATES == 1
                                         && b.CHARGETYPE == 2//部门
                                         select b.CHARGEMONEY;
                    if (ChargeingMoeny.Count() > 0)
                    {
                        foreach (var va in ChargeingMoeny)
                        {
                            F = F + va;
                        }
                    }
                }
                #endregion

                #region//个人费用个人科目报销已终审G
                if (T_FB_CHARGEAPPLYDETAILList != null)
                {
                    var ChargeMoenyPersonChecked = from a in T_FB_CHARGEAPPLYMASTERList
                                                   join b in T_FB_CHARGEAPPLYDETAILList
                                             on a.CHARGEAPPLYMASTERID equals b.T_FB_CHARGEAPPLYMASTER.CHARGEAPPLYMASTERID
                                                   where a.OWNERCOMPANYID == item.OWNERCOMPANYID
                                                   && b.T_FB_SUBJECT.SUBJECTID == item.T_FB_SUBJECT.SUBJECTID
                                                   && a.OWNERPOSTID == item.OWNERPOSTID
                                                   && a.BUDGETARYMONTH.Year == item.BUDGETYEAR
                                                   && a.CHECKSTATES == 2
                                                   && b.CHARGETYPE == 1//个人
                                                   select b.CHARGEMONEY;
                    if (ChargeMoenyPersonChecked.Count() > 0)
                    {
                        foreach (var va in ChargeMoenyPersonChecked)
                        {
                            G = G + va;
                        }
                    }
                }
                #endregion

                #region//个人费用个人科目报销终审中H
                if (T_FB_CHARGEAPPLYDETAILList != null)
                {
                    var ChargeingPersonMoeny = from a in T_FB_CHARGEAPPLYMASTERList
                                               join b in T_FB_CHARGEAPPLYDETAILList
                                         on a.CHARGEAPPLYMASTERID equals b.T_FB_CHARGEAPPLYMASTER.CHARGEAPPLYMASTERID
                                               where a.OWNERCOMPANYID == item.OWNERCOMPANYID
                                               && b.T_FB_SUBJECT.SUBJECTID == item.T_FB_SUBJECT.SUBJECTID
                                               && a.OWNERPOSTID == item.OWNERPOSTID
                                               && a.BUDGETARYMONTH.Year == item.BUDGETYEAR
                                               && a.CHECKSTATES == 1
                                               && b.CHARGETYPE == 1//个人
                                               select b.CHARGEMONEY;
                    if (ChargeingPersonMoeny.Count() > 0)
                    {
                        foreach (var va in ChargeingPersonMoeny)
                        {
                            H = H + va;
                        }
                    }
                }
                #endregion
        }
Esempio n. 2
0
 /// <summary>
 /// 用于向 T_FB_BUDGETACCOUNT EntitySet 添加新对象的方法,已弃用。请考虑改用关联的 ObjectSet&lt;T&gt; 属性的 .Add 方法。
 /// </summary>
 public void AddToT_FB_BUDGETACCOUNT(T_FB_BUDGETACCOUNT t_FB_BUDGETACCOUNT)
 {
     base.AddObject("T_FB_BUDGETACCOUNT", t_FB_BUDGETACCOUNT);
 }
Esempio n. 3
0
        private void GetJFABCD(
            List<T_FB_PERSONMONEYASSIGNMASTER> T_FB_PERSONMONEYASSIGNMASTERList,
            List<T_FB_PERSONMONEYASSIGNDETAIL> T_FB_PERSONMONEYASSIGNDETAILList,

            List<T_FB_CHARGEAPPLYMASTER> T_FB_CHARGEAPPLYMASTERList,
           List<T_FB_CHARGEAPPLYDETAIL> T_FB_CHARGEAPPLYDETAILList,

           T_FB_BUDGETACCOUNT item,
           ref decimal A, ref decimal B,
           ref decimal C,
           ref decimal C1, ref decimal D1,
           ref decimal C2, ref decimal D2,
           ref decimal D, ref decimal E,
           ref decimal F, ref decimal H,
           ref decimal G,
            ref string OwnerName)
        {

            #region "活动经费"
            if (item.T_FB_SUBJECT.SUBJECTID == "d5134466-c207-44f2-8a36-cf7b96d5851f")
            {
                var YearMoney = (from a in T_FB_PERSONMONEYASSIGNMASTERList
                                join b in T_FB_PERSONMONEYASSIGNDETAILList
                             on a.PERSONMONEYASSIGNMASTERID equals b.T_FB_PERSONMONEYASSIGNMASTER.PERSONMONEYASSIGNMASTERID
                                where b.T_FB_SUBJECT.SUBJECTID == item.T_FB_SUBJECT.SUBJECTID
                                && b.OWNERID == item.OWNERID
                                && a.CHECKSTATES == 2
                                select new
                                {
                                    b.PERSONBUDGETAPPLYDETAILID,
                                    b.BUDGETMONEY,
                                    OwnerName=b.OWNERCOMPANYNAME+"-"+b.OWNERNAME
                                }).ToList().Distinct();
                if (YearMoney.Count() > 0)
                {
                    foreach (var va in YearMoney)
                    {
                        OwnerName = va.OwnerName;
                        if (OwnerName.Contains("田少林"))
                        {

                        }
                        C2 = C2 + va.BUDGETMONEY.Value;
                    }
                }

            }
            #endregion


            #region//个人费用部门科目报销已终审E
            if (T_FB_CHARGEAPPLYDETAILList != null)
            {
                var ChargeMoenyChecked = (from a in T_FB_CHARGEAPPLYMASTERList
                                         join b in T_FB_CHARGEAPPLYDETAILList
                                    on a.CHARGEAPPLYMASTERID equals b.T_FB_CHARGEAPPLYMASTER.CHARGEAPPLYMASTERID
                                         where b.T_FB_SUBJECT.SUBJECTID == item.T_FB_SUBJECT.SUBJECTID
                                         && a.OWNERID == item.OWNERID
                                         && a.CHECKSTATES == 2
                                         select new { b.CHARGEAPPLYDETAILID, b.CHARGEMONEY }).ToList().Distinct();
                if (ChargeMoenyChecked.Count() > 0)
                {
                    foreach (var va in ChargeMoenyChecked)
                    {
                        E = E + va.CHARGEMONEY;
                    }
                }
            }
            #endregion

            #region//个人费用部门科目报销终审中F
            if (T_FB_CHARGEAPPLYDETAILList != null)
            {
                var ChargeingMoeny = (from a in T_FB_CHARGEAPPLYMASTERList
                                     join b in T_FB_CHARGEAPPLYDETAILList
                                  on a.CHARGEAPPLYMASTERID equals b.T_FB_CHARGEAPPLYMASTER.CHARGEAPPLYMASTERID
                                     where b.T_FB_SUBJECT.SUBJECTID == item.T_FB_SUBJECT.SUBJECTID
                                     && a.OWNERID == item.OWNERID
                                     && a.CHECKSTATES == 1
                                     select  new { b.CHARGEAPPLYDETAILID, b.CHARGEMONEY }).ToList().Distinct();
                if (ChargeingMoeny.Count() > 0)
                {
                    foreach (var va in ChargeingMoeny)
                    {
                        F = F + va.CHARGEMONEY;
                    }
                }
            }
            #endregion
        }
Esempio n. 4
0
 /// <summary>
 /// 创建新的 T_FB_BUDGETACCOUNT 对象。
 /// </summary>
 /// <param name="bUDGETACCOUNTID">BUDGETACCOUNTID 属性的初始值。</param>
 /// <param name="oWNERCOMPANYID">OWNERCOMPANYID 属性的初始值。</param>
 public static T_FB_BUDGETACCOUNT CreateT_FB_BUDGETACCOUNT(global::System.String bUDGETACCOUNTID, global::System.String oWNERCOMPANYID)
 {
     T_FB_BUDGETACCOUNT t_FB_BUDGETACCOUNT = new T_FB_BUDGETACCOUNT();
     t_FB_BUDGETACCOUNT.BUDGETACCOUNTID = bUDGETACCOUNTID;
     t_FB_BUDGETACCOUNT.OWNERCOMPANYID = oWNERCOMPANYID;
     return t_FB_BUDGETACCOUNT;
 }