コード例 #1
0
ファイル: ChargeApply.cs プロジェクト: jjg0519/OA
 public List <V_ChargeApplyReport> ExportChargeApplyMasterReports(string strOwnerID, string strDateStart, string strDateEnd, string strCheckState, string strFilter, List <object> objArgs, string strSortKey)
 {
     using (ChargeApplyMasterBLL chargeBLL = new ChargeApplyMasterBLL())
     {
         return(chargeBLL.ChargeApplyMasterRdListByMultSearchReports(strOwnerID, strDateStart, strDateEnd, strCheckState, strFilter, objArgs, strSortKey));
     }
 }
コード例 #2
0
ファイル: ChargeApply.cs プロジェクト: jjg0519/OA
        public List <T_FB_CHARGEAPPLYMASTER> GetChargeApplyMasterListByMultSearch(string userID, string strDateStart, string strDateEnd,
                                                                                  string checkState, string strFilter, List <object> objArgs, string strSortKey, int pageIndex, int pageSize, ref int pageCount)
        {
            IQueryable <T_FB_CHARGEAPPLYMASTER> entIq;
            IList <T_FB_CHARGEAPPLYMASTER>      entList = new List <T_FB_CHARGEAPPLYMASTER>();

            using (ChargeApplyMasterBLL bllChargeApplyMaster = new ChargeApplyMasterBLL())
            {
                entIq = bllChargeApplyMaster.GetChargeApplyMasterRdListByMultSearch(userID, strDateStart, strDateEnd,
                                                                                    checkState, strFilter, objArgs, strSortKey, pageIndex, pageSize, ref pageCount);
                if (entIq == null)
                {
                    return(null);
                }
                //add zl 2012.1.4
                //foreach (T_FB_CHARGEAPPLYMASTER obj in entIq)
                //{
                //    if (obj.PAYTYPE == 2)
                //    {
                //        if (obj.REPAYMENT != null)
                //        {
                //            obj.TOTALMONEY = obj.TOTALMONEY - obj.REPAYMENT.Value;
                //        }
                //    }
                //    entList.Add(obj);
                //}
                //add end
                entList = entIq.ToList();
                return(entList.Count() > 0 ? entList.ToList() : null);
            }
        }
コード例 #3
0
ファイル: ChargeApply.cs プロジェクト: jjg0519/OA
 public int UptChargeApplyIsPayed(List <V_ChargeApplyReport> vChargeApplys)
 {
     using (ChargeApplyMasterBLL chargeBLL = new ChargeApplyMasterBLL())
     {
         return(chargeBLL.UptChargeApplyIsPayed(vChargeApplys));
     }
 }
コード例 #4
0
        /// <summary>
        /// 修改实体审核状态
        /// </summary>
        /// <param name="strEntityName">实体名</param>
        /// <param name="EntityKeyName">主键名</param>
        /// <param name="EntityKeyValue">主键值</param>
        /// <param name="CheckState">审核状态</param>
        public int UpdateCheckState(string strEntityName, string EntityKeyName, string EntityKeyValue, string CheckState)
        {
            using (CommDal <TEntity> dal = new CommDal <TEntity>())
            {
                int intResult = 0;
                Tracer.Debug("进入了COMMONBLL,实体名:" + strEntityName + ",DateTime:" + System.DateTime.Now.ToString());
                Tracer.Debug("实体ID名:" + EntityKeyName + "实体主键值:" + EntityKeyValue);
                Tracer.Debug("审核的状态:" + CheckState);
                switch (strEntityName)
                {
                case "T_FB_BORROWAPPLYMASTER":    //借款申请
                    BorrowApplyMasterBLL bll = new BorrowApplyMasterBLL();
                    intResult = bll.GetBorrowApplyForMobile(EntityKeyValue, CheckState);
                    break;

                case "T_FB_CHARGEAPPLYMASTER":
                    ChargeApplyMasterBLL Chargebll = new ChargeApplyMasterBLL();
                    intResult = Chargebll.GetChargeApplyForMobile(EntityKeyValue, CheckState);
                    break;

                case "T_FB_REPAYAPPLYMASTER":
                    RepayApplyMasterBLL Repaybll = new RepayApplyMasterBLL();
                    intResult = Repaybll.GetRepayApplyForMobile(EntityKeyValue, CheckState);
                    break;

                default:
                    intResult = dal.UpdateCheckState(strEntityName, EntityKeyName, EntityKeyValue, CheckState);
                    break;
                }


                return(intResult);
            }
        }
コード例 #5
0
ファイル: ChargeApply.cs プロジェクト: jjg0519/OA
 public bool GetVersionIsHuNan()
 {
     using (ChargeApplyMasterBLL chargeBLL = new ChargeApplyMasterBLL())
     {
         bool isReturn = chargeBLL.GetVersionIsHuNan();
         return(isReturn);
     }
 }
コード例 #6
0
ファイル: ChargeApply.cs プロジェクト: jjg0519/OA
 public void UptChargeApplyMasterAndDetailToMobile(string strActionType, T_FB_CHARGEAPPLYMASTER chargeMaster,
                                                   List <T_FB_CHARGEAPPLYDETAIL> chargeDetail, List <T_FB_CHARGEAPPLYREPAYDETAIL> chargeRepDetail, ref string strMsg)
 {
     using (ChargeApplyMasterBLL chargeBLL = new ChargeApplyMasterBLL())
     {
         chargeBLL.UptChargeApplyMasterAndDetailForMobile(strActionType, chargeMaster, chargeDetail, chargeRepDetail, ref strMsg);
     }
 }
コード例 #7
0
ファイル: ChargeApply.cs プロジェクト: jjg0519/OA
        public T_FB_CHARGEAPPLYMASTER GetChargeApplyMasterByID(string strChargeApplyMasterId)
        {
            T_FB_CHARGEAPPLYMASTER entRd = new T_FB_CHARGEAPPLYMASTER();

            using (ChargeApplyMasterBLL bllChargeApplyMaster = new ChargeApplyMasterBLL())
            {
                entRd = bllChargeApplyMaster.GetChargeApplyMasterByID(strChargeApplyMasterId);
                return(entRd);
            }
        }
コード例 #8
0
ファイル: ChargeApplyDetailBLL.cs プロジェクト: jjg0519/OA
        public bool UpdateChargeApplyDetail(string strChargeMasterID, List <T_FB_CHARGEAPPLYDETAIL> detailList)
        {
            bool bRes = false;

            try
            {
                if (string.IsNullOrWhiteSpace(strChargeMasterID))
                {
                    return(bRes);
                }


                ChargeApplyMasterBLL   masterBLL = new ChargeApplyMasterBLL();
                T_FB_CHARGEAPPLYMASTER entMaster = masterBLL.GetChargeApplyMasterByID(strChargeMasterID);

                bRes = DelChargeApplyDetail(strChargeMasterID);

                foreach (T_FB_CHARGEAPPLYDETAIL item in detailList)
                {
                    if (item.EntityKey != null)
                    {
                        item.EntityKey = null;
                    }

                    item.CHARGEAPPLYDETAILID = System.Guid.NewGuid().ToString();
                    if (item.T_FB_CHARGEAPPLYMASTER == null)
                    {
                        item.T_FB_CHARGEAPPLYMASTER = entMaster;
                    }

                    item.T_FB_CHARGEAPPLYMASTER.EntityKey = new System.Data.EntityKey("TM_SaaS_OA_EFModelContext.T_FB_CHARGEAPPLYMASTER", "CHARGEAPPLYMASTERID", entMaster.CHARGEAPPLYMASTERID);


                    if (item.T_FB_SUBJECT != null)
                    {
                        item.T_FB_SUBJECT.EntityKey = new System.Data.EntityKey("TM_SaaS_OA_EFModelContext.T_FB_SUBJECT", "SUBJECTID", item.T_FB_SUBJECT.SUBJECTID);
                    }

                    if (item.T_FB_BORROWAPPLYDETAIL != null)
                    {
                        item.T_FB_BORROWAPPLYDETAIL.EntityKey = new System.Data.EntityKey("TM_SaaS_OA_EFModelContext.T_FB_BORROWAPPLYDETAIL", "BORROWAPPLYDETAILID", item.T_FB_BORROWAPPLYDETAIL.BORROWAPPLYDETAILID);
                    }

                    Add(item);
                }
                bRes = true;
            }
            catch (Exception ex)
            {
                Tracer.Debug(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "调用函数 UpdateChargeApplyDetail 出现异常,异常信息为:" + ex.ToString());
                bRes = false;
            }

            return(bRes);
        }
コード例 #9
0
ファイル: ChargeApply.cs プロジェクト: jjg0519/OA
 public bool AddChargeApplyMasterAndDetailMobile(T_FB_CHARGEAPPLYMASTER chargeMaster, List <T_FB_CHARGEAPPLYDETAIL> chargeDetail,
                                                 List <T_FB_CHARGEAPPLYREPAYDETAIL> chargeRepDetail, ref string strMsg)
 {
     using (ChargeApplyMasterBLL chargeBLL = new ChargeApplyMasterBLL())
     {
         bool re;
         re = chargeBLL.AddChargeApplyMasterAndDetailMobile(chargeMaster, chargeDetail, chargeRepDetail, ref strMsg);
         //re = chargeBLL.AddChargeApplyMasterAndDetail(chargeMaster, chargeDetail, chargeRepDetail);
         return(re);
     }
 }
コード例 #10
0
ファイル: ChargeApply.cs プロジェクト: jjg0519/OA
        public List <V_ChargeApplyReport> ImportAttendMonthlyBalanceFromCSV(UploadFileModel UploadFile, string strCreateUserID, ref string strMsg)
        {
            string strPath = string.Empty;

            SaveFile(UploadFile, out strPath);
            string strPhysicalPath = HttpContext.Current.Server.MapPath(strPath);

            using (ChargeApplyMasterBLL chargeBLL = new ChargeApplyMasterBLL())
            {
                return(chargeBLL.ImportChargeApplyByImportExcel(strCreateUserID, strPhysicalPath, ref strMsg));
            }
        }
コード例 #11
0
ファイル: ChargeApply.cs プロジェクト: jjg0519/OA
 public bool DelChargeApplyMasterAndDetail(List <string> chargeMasterID)
 {
     using (ChargeApplyMasterBLL chargeBLL = new ChargeApplyMasterBLL())
     {
         foreach (string obj in chargeMasterID)
         {
             if (!chargeBLL.DelChargeApplyMasterAndDetail(obj))
             {
                 return(false);
             }
         }
         return(true);
     }
 }
コード例 #12
0
ファイル: ChargeApply.cs プロジェクト: jjg0519/OA
        public bool UptChargeApplyCheckState(T_FB_CHARGEAPPLYMASTER entity, List <T_FB_CHARGEAPPLYDETAIL> chargeDetail,
                                             List <T_FB_CHARGEAPPLYREPAYDETAIL> chargeRepDetail)
        {
            using (ChargeApplyMasterBLL chargeBLL = new ChargeApplyMasterBLL())
            {
                string strMsg = string.Empty;
                chargeBLL.UptChargeApplyCheckState(entity, chargeDetail, chargeRepDetail, ref strMsg);

                if (!string.IsNullOrWhiteSpace(strMsg))
                {
                    return(false);
                }

                return(true);
            }
        }
コード例 #13
0
ファイル: ExtensionalOrderBLL.cs プロジェクト: jjg0519/OA
        /// <summary>
        /// 根据扩展单据ID,查找与其关联的老单据,更新其状态为
        /// </summary>
        /// <param name="strExtenOrderID"></param>
        private void CancelOldChargeRdByExtenOrder(string strExtenOrderID)
        {
            try
            {
                if (string.IsNullOrWhiteSpace(strExtenOrderID))
                {
                    return;
                }

                ChargeApplyMasterBLL bllCharge = new ChargeApplyMasterBLL();

                var ents = bllCharge.GetChargeApplyMasterRdListByExtenOrderID(strExtenOrderID);
                if (ents == null)
                {
                    return;
                }

                decimal dCheckState = 0, dEditState = 0;
                dCheckState = Convert.ToDecimal(FBAEnums.CheckStates.UnApproved);
                dEditState  = Convert.ToDecimal(FBAEnums.EditStates.UnActived);
                BudgetAccountBLL bllAccount = new BudgetAccountBLL();
                foreach (T_FB_CHARGEAPPLYMASTER item in ents)
                {
                    item.CHECKSTATES = Convert.ToInt32(dCheckState);
                    item.EDITSTATES  = Convert.ToInt32(dEditState);
                    item.UPDATEDATE  = DateTime.Now;

                    bllCharge.Update(item);
                    bllAccount.UpdateAccount(item, dCheckState);
                }
            }
            catch (Exception ex)
            {
                Utility.SaveLog(ex.ToString());
            }
        }
コード例 #14
0
ファイル: ChargeApply.cs プロジェクト: JuRogn/OA
 public bool AddChargeApplyMasterAndDetailMobile(T_FB_CHARGEAPPLYMASTER chargeMaster, List<T_FB_CHARGEAPPLYDETAIL> chargeDetail,
     List<T_FB_CHARGEAPPLYREPAYDETAIL> chargeRepDetail,ref string strMsg)
 {
     using (ChargeApplyMasterBLL chargeBLL = new ChargeApplyMasterBLL())
     {
         bool re;
         re = chargeBLL.AddChargeApplyMasterAndDetailMobile(chargeMaster, chargeDetail, chargeRepDetail,ref strMsg);
         //re = chargeBLL.AddChargeApplyMasterAndDetail(chargeMaster, chargeDetail, chargeRepDetail);
         return re;
     }
 }
コード例 #15
0
ファイル: ChargeApply.cs プロジェクト: JuRogn/OA
 public List<T_FB_CHARGEAPPLYMASTER> GetChargeApplyMasterListByMultSearch(string userID, string strDateStart, string strDateEnd,
     string checkState, string strFilter, List<object> objArgs, string strSortKey, int pageIndex, int pageSize, ref int pageCount)
 {
     IQueryable<T_FB_CHARGEAPPLYMASTER> entIq;
     IList<T_FB_CHARGEAPPLYMASTER> entList = new List<T_FB_CHARGEAPPLYMASTER>();
     using (ChargeApplyMasterBLL bllChargeApplyMaster = new ChargeApplyMasterBLL())
     {
         entIq = bllChargeApplyMaster.GetChargeApplyMasterRdListByMultSearch(userID, strDateStart, strDateEnd,
                 checkState, strFilter, objArgs, strSortKey, pageIndex, pageSize, ref pageCount);
         if (entIq == null)
         {
             return null;
         }
         //add zl 2012.1.4
         //foreach (T_FB_CHARGEAPPLYMASTER obj in entIq)
         //{
         //    if (obj.PAYTYPE == 2)
         //    {
         //        if (obj.REPAYMENT != null)
         //        {
         //            obj.TOTALMONEY = obj.TOTALMONEY - obj.REPAYMENT.Value;
         //        }
         //    }
         //    entList.Add(obj);
         //}
         //add end
         entList = entIq.ToList();
         return entList.Count() > 0 ? entList.ToList() : null;
     }
 }
コード例 #16
0
ファイル: ChargeApply.cs プロジェクト: JuRogn/OA
        public void PersonmoneyAssignSendTask(string strMasterID)
        {
            StringBuilder sb = new StringBuilder();
            sb.AppendLine("【个人活动经费下拨审核通过 所有人发起待办】【MasterID:" + strMasterID + "】");
            try
            {
                PersonmoneyAssignDetailBLL bll = new PersonmoneyAssignDetailBLL();
                ChargeApplyMasterBLL chargeApplyBLL = new ChargeApplyMasterBLL();
                EngineWcfGlobalFunctionClient engineClient = new EngineWcfGlobalFunctionClient();
                var vResult = bll.GetPersonmoneyAssignDetailByMasterID(strMasterID);
                if (vResult != null && vResult.Count() > 0)
                {
                  
                    //需要发送待办的下拨子表数据
                    List<T_FB_PERSONMONEYASSIGNDETAIL> listNeedSend = new List<T_FB_PERSONMONEYASSIGNDETAIL>();
                    //业务数据成功保存后 发待办的数据
                    Dictionary<string,T_FB_PERSONMONEYASSIGNDETAIL> savedListNeedSend = new Dictionary<string,T_FB_PERSONMONEYASSIGNDETAIL>();
                   List<string> listString = new List<string>();
                  
                    foreach(var v in vResult)
                    {
                        listString.Add(v.OWNERID);
                        sb.AppendLine("【活动经费个人】【" + v.OWNERID + "】【" + v.OWNERNAME + "】");
                    }
                    string[] listhaveTask = engineClient.GetPersonFromDoTaskByTitle(listString.ToArray(), "您的个人活动经费已下拨,费用报销单还未提交,请及时处理!");

                    #region 循环保存业务数据

                    foreach (var ent in vResult)
                    {
                        //只给未存在下拨待办的人,发送待办
                        if (listhaveTask.Where(c => c.Contains(ent.OWNERID)).FirstOrDefault() == null)
                        {
                            //sb.AppendLine("【需要发送待办的个人】【" + ent.OWNERID + "】【" + ent.OWNERNAME + "】");
                            T_FB_CHARGEAPPLYMASTER chargeApplyMaster = new T_FB_CHARGEAPPLYMASTER();
                            chargeApplyMaster.CREATECOMPANYID = ent.OWNERCOMPANYID;
                            chargeApplyMaster.CREATECOMPANYNAME = ent.OWNERCOMPANYNAME;
                            chargeApplyMaster.CREATEDEPARTMENTID = ent.OWNERDEPARTMENTID;
                            chargeApplyMaster.CREATEDEPARTMENTNAME = ent.OWNERDEPARTMENTNAME;
                            chargeApplyMaster.CREATEPOSTID = ent.OWNERPOSTID;
                            chargeApplyMaster.CREATEPOSTNAME = ent.OWNERPOSTNAME;
                            chargeApplyMaster.CREATEUSERID = ent.OWNERID;
                            chargeApplyMaster.CREATEUSERNAME = ent.OWNERNAME;
                            chargeApplyMaster.OWNERCOMPANYID = ent.OWNERCOMPANYID;
                            chargeApplyMaster.OWNERCOMPANYNAME = ent.OWNERCOMPANYNAME;
                            chargeApplyMaster.OWNERDEPARTMENTID = ent.OWNERDEPARTMENTID;
                            chargeApplyMaster.OWNERDEPARTMENTNAME = ent.OWNERDEPARTMENTNAME;
                            chargeApplyMaster.OWNERID = ent.OWNERID;
                            chargeApplyMaster.OWNERNAME = ent.OWNERNAME;
                            chargeApplyMaster.OWNERPOSTID = ent.OWNERPOSTID;
                            chargeApplyMaster.OWNERPOSTNAME = ent.OWNERPOSTNAME;
                            chargeApplyMaster.CHARGEAPPLYMASTERID = string.Empty;
                            chargeApplyMaster.CHARGEAPPLYMASTERID = Guid.NewGuid().ToString();
                            chargeApplyMaster.CHARGEAPPLYMASTERCODE = " ";
                            chargeApplyMaster.BUDGETARYMONTH = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM") + "-1");
                            chargeApplyMaster.PAYTYPE = 1;
                            chargeApplyMaster.TOTALMONEY = 0;
                            chargeApplyMaster.REPAYMENT = 0;
                            chargeApplyMaster.EDITSTATES = 0;
                            chargeApplyMaster.CHECKSTATES = 0;
                            chargeApplyMaster.PAYTARGET = 1;
                            chargeApplyMaster.UPDATEUSERID = ent.OWNERID;
                            chargeApplyMaster.UPDATEUSERNAME = ent.OWNERNAME;
                            chargeApplyMaster.CREATEDATE = DateTime.Now;
                            chargeApplyMaster.UPDATEDATE = DateTime.Now;
                            bool saveResult = chargeApplyBLL.Add(chargeApplyMaster);
                            if (saveResult)
                            {
                                savedListNeedSend.Add(chargeApplyMaster.CHARGEAPPLYMASTERID, ent);
                            }
                            else
                            {
                                sb.AppendLine("【保存费用报销主数据失败】");
                            }
                        }
                    }
                    #endregion
                    #region  发送待办
                  
                    List<SMT.SaaS.BLLCommonServices.EngineConfigWS.T_WF_DOTASK> tasks = new List<SMT.SaaS.BLLCommonServices.EngineConfigWS.T_WF_DOTASK>();
                      
                    foreach (var v in savedListNeedSend)
                    {
                         SMT.SaaS.BLLCommonServices.EngineConfigWS.T_WF_DOTASK task = new SMT.SaaS.BLLCommonServices.EngineConfigWS.T_WF_DOTASK();
                        task.DOTASKID = Guid.NewGuid().ToString();
                        task.COMPANYID = v.Value.OWNERCOMPANYID;
                        task.ORDERID = v.Key;
                        task.ORDERUSERID = v.Value.OWNERID;
                        task.ORDERUSERNAME = v.Value.OWNERNAME;
                        task.ORDERSTATUS = 0;
                        task.MESSAGEBODY = "您的个人活动经费已下拨,费用报销单还未提交,请及时处理!";
                        string strUrl = "<?xml version=\"1.0\" encoding=\"utf-8\"?><System>" +
                                            "<AssemblyName>SMT.FBAnalysis.UI</AssemblyName>" +
                                            "<PublicClass>SMT.FBAnalysis.UI.Common.Utility</PublicClass>" +
                                            "<ProcessName>CreateFormFromEngine</ProcessName>" +
                                            "<PageParameter>SMT.FBAnalysis.UI.Form.ChargeApplyForm</PageParameter>" +
                                            "<ApplicationOrder>{0}</ApplicationOrder>" +
                                         "<FormTypes>Edit</FormTypes></System>";
                        task.APPLICATIONURL = string.Format(strUrl, task.ORDERID);
                        task.RECEIVEUSERID = v.Value.OWNERID;
                        task.BEFOREPROCESSDATE = DateTime.Now.AddDays(3);
                        task.DOTASKTYPE = 4;
                        task.DOTASKSTATUS = 0;
                        task.MAILSTATUS = 0;
                        task.RTXSTATUS = 0;
                        task.SYSTEMCODE = "FB";
                        task.MODELCODE = "T_FB_CHARGEAPPLYMASTER";
                        task.CREATEDATETIME = DateTime.Now;
                        task.REMARK = "未提交单据";
                        tasks.Add(task);
                        sb.AppendLine("【发送待办】【待办接收者:" + v.Value.OWNERNAME + "】【报销单号:" + task.ORDERID + "】");
                    }
                    if (tasks.Count > 0)
                    {
                        var sendResult = engineClient.AddDoTaskEntity(tasks.ToArray());
                        sb.AppendLine("【调用Engine[AddDoTaskEntity]】【结果:" + sendResult + "】");
                    }
                    else
                    {
                        sb.AppendLine("【不需要发送待办】");
                    }
                    #endregion
                }

            }
            catch (Exception ex)
            {
                sb.AppendLine("【异常】【" + ex.Message + "】");
            }
            SMT.Foundation.Log.Tracer.Debug(sb.ToString());

        }
コード例 #17
0
ファイル: ChargeApply.cs プロジェクト: JuRogn/OA
 public T_FB_CHARGEAPPLYMASTER GetChargeApplyMasterByID(string strChargeApplyMasterId)
 {
     T_FB_CHARGEAPPLYMASTER entRd = new T_FB_CHARGEAPPLYMASTER();
     using (ChargeApplyMasterBLL bllChargeApplyMaster = new ChargeApplyMasterBLL())
     {
         entRd = bllChargeApplyMaster.GetChargeApplyMasterByID(strChargeApplyMasterId);
         return entRd;
     }
 }
コード例 #18
0
ファイル: ChargeApply.cs プロジェクト: JuRogn/OA
        public List<V_ChargeApplyReport> ImportAttendMonthlyBalanceFromCSV(UploadFileModel UploadFile, string strCreateUserID, ref string strMsg)
        {
            string strPath = string.Empty;
            SaveFile(UploadFile, out strPath);
            string strPhysicalPath = HttpContext.Current.Server.MapPath(strPath);

            using (ChargeApplyMasterBLL chargeBLL = new ChargeApplyMasterBLL())
            {
                return chargeBLL.ImportChargeApplyByImportExcel(strCreateUserID, strPhysicalPath, ref strMsg);
            }
        }
コード例 #19
0
ファイル: ChargeApply.cs プロジェクト: JuRogn/OA
        public bool UptChargeApplyCheckState(T_FB_CHARGEAPPLYMASTER entity, List<T_FB_CHARGEAPPLYDETAIL> chargeDetail,
            List<T_FB_CHARGEAPPLYREPAYDETAIL> chargeRepDetail)
        {
            using (ChargeApplyMasterBLL chargeBLL = new ChargeApplyMasterBLL())
            {
                string strMsg = string.Empty;
                chargeBLL.UptChargeApplyCheckState(entity, chargeDetail, chargeRepDetail, ref strMsg);

                if (!string.IsNullOrWhiteSpace(strMsg))
                {
                    return false;
                }

                return true;
            }

        }
コード例 #20
0
ファイル: ChargeApply.cs プロジェクト: JuRogn/OA
 public void UptChargeApplyMasterAndDetailToMobile(string strActionType, T_FB_CHARGEAPPLYMASTER chargeMaster,
     List<T_FB_CHARGEAPPLYDETAIL> chargeDetail, List<T_FB_CHARGEAPPLYREPAYDETAIL> chargeRepDetail, ref string strMsg)
 {
     using (ChargeApplyMasterBLL chargeBLL = new ChargeApplyMasterBLL())
     {
         chargeBLL.UptChargeApplyMasterAndDetailForMobile(strActionType, chargeMaster, chargeDetail, chargeRepDetail, ref strMsg);
     }
 }
コード例 #21
0
ファイル: ChargeApply.cs プロジェクト: JuRogn/OA
 public bool DelChargeApplyMasterAndDetail(List<string> chargeMasterID)
 {
     using (ChargeApplyMasterBLL chargeBLL = new ChargeApplyMasterBLL())
     {
         foreach (string obj in chargeMasterID)
         {
             if (!chargeBLL.DelChargeApplyMasterAndDetail(obj))
             {
                 return false;
             }
         }
         return true;
     }
 }
コード例 #22
0
ファイル: ChargeApply.cs プロジェクト: JuRogn/OA
 public bool GetVersionIsHuNan()
 {
     using (ChargeApplyMasterBLL chargeBLL = new ChargeApplyMasterBLL())
     {                
         bool isReturn = chargeBLL.GetVersionIsHuNan();
         return isReturn;
     }
 }
コード例 #23
0
ファイル: ChargeApply.cs プロジェクト: JuRogn/OA
 public List<V_ChargeApplyReport> ExportChargeApplyMasterReports(string strOwnerID, string strDateStart, string strDateEnd, string strCheckState, string strFilter, List<object> objArgs, string strSortKey)
 {
     using (ChargeApplyMasterBLL chargeBLL = new ChargeApplyMasterBLL())
     {
         return chargeBLL.ChargeApplyMasterRdListByMultSearchReports(strOwnerID, strDateStart, strDateEnd, strCheckState, strFilter, objArgs, strSortKey);
     }
 }
コード例 #24
0
ファイル: ExtensionalOrderBLL.cs プロジェクト: JuRogn/OA
        /// <summary>
        /// 根据扩展单据ID,查找与其关联的老单据,更新其状态为
        /// </summary>
        /// <param name="strExtenOrderID"></param>
        private void CancelOldChargeRdByExtenOrder(string strExtenOrderID)
        {
            try
            {
                if (string.IsNullOrWhiteSpace(strExtenOrderID))
                {
                    return;
                }

                ChargeApplyMasterBLL bllCharge  = new ChargeApplyMasterBLL();

                var ents = bllCharge.GetChargeApplyMasterRdListByExtenOrderID(strExtenOrderID);
                if (ents == null)
                {
                    return;
                }

                decimal dCheckState = 0, dEditState = 0;
                dCheckState = Convert.ToDecimal(FBAEnums.CheckStates.UnApproved);
                dEditState = Convert.ToDecimal(FBAEnums.EditStates.UnActived);
                BudgetAccountBLL bllAccount = new BudgetAccountBLL();
                foreach (T_FB_CHARGEAPPLYMASTER item in ents)
                {
                    item.CHECKSTATES = Convert.ToInt32(dCheckState);
                    item.EDITSTATES = Convert.ToInt32(dEditState);
                    item.UPDATEDATE = DateTime.Now;

                    bllCharge.Update(item);
                    bllAccount.UpdateAccount(item, dCheckState);
                }
            }
            catch (Exception ex)
            {
                Utility.SaveLog(ex.ToString());
            }
        }
コード例 #25
0
ファイル: ChargeApply.cs プロジェクト: JuRogn/OA
 public int UptChargeApplyIsPayed(List<V_ChargeApplyReport> vChargeApplys)
 {
     using (ChargeApplyMasterBLL chargeBLL = new ChargeApplyMasterBLL())
     {
         return chargeBLL.UptChargeApplyIsPayed(vChargeApplys);
     }
 }
コード例 #26
0
ファイル: ChargeApply.cs プロジェクト: jjg0519/OA
        public void PersonmoneyAssignSendTask(string strMasterID)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine("【个人活动经费下拨审核通过 所有人发起待办】【MasterID:" + strMasterID + "】");
            try
            {
                PersonmoneyAssignDetailBLL    bll            = new PersonmoneyAssignDetailBLL();
                ChargeApplyMasterBLL          chargeApplyBLL = new ChargeApplyMasterBLL();
                EngineWcfGlobalFunctionClient engineClient   = new EngineWcfGlobalFunctionClient();
                var vResult = bll.GetPersonmoneyAssignDetailByMasterID(strMasterID);
                if (vResult != null && vResult.Count() > 0)
                {
                    //需要发送待办的下拨子表数据
                    List <T_FB_PERSONMONEYASSIGNDETAIL> listNeedSend = new List <T_FB_PERSONMONEYASSIGNDETAIL>();
                    //业务数据成功保存后 发待办的数据
                    Dictionary <string, T_FB_PERSONMONEYASSIGNDETAIL> savedListNeedSend = new Dictionary <string, T_FB_PERSONMONEYASSIGNDETAIL>();
                    List <string> listString = new List <string>();

                    foreach (var v in vResult)
                    {
                        listString.Add(v.OWNERID);
                        sb.AppendLine("【活动经费个人】【" + v.OWNERID + "】【" + v.OWNERNAME + "】");
                    }
                    string[] listhaveTask = engineClient.GetPersonFromDoTaskByTitle(listString.ToArray(), "您的个人活动经费已下拨,费用报销单还未提交,请及时处理!");

                    #region 循环保存业务数据

                    foreach (var ent in vResult)
                    {
                        //只给未存在下拨待办的人,发送待办
                        if (listhaveTask.Where(c => c.Contains(ent.OWNERID)).FirstOrDefault() == null)
                        {
                            //sb.AppendLine("【需要发送待办的个人】【" + ent.OWNERID + "】【" + ent.OWNERNAME + "】");
                            T_FB_CHARGEAPPLYMASTER chargeApplyMaster = new T_FB_CHARGEAPPLYMASTER();
                            chargeApplyMaster.CREATECOMPANYID      = ent.OWNERCOMPANYID;
                            chargeApplyMaster.CREATECOMPANYNAME    = ent.OWNERCOMPANYNAME;
                            chargeApplyMaster.CREATEDEPARTMENTID   = ent.OWNERDEPARTMENTID;
                            chargeApplyMaster.CREATEDEPARTMENTNAME = ent.OWNERDEPARTMENTNAME;
                            chargeApplyMaster.CREATEPOSTID         = ent.OWNERPOSTID;
                            chargeApplyMaster.CREATEPOSTNAME       = ent.OWNERPOSTNAME;
                            chargeApplyMaster.CREATEUSERID         = ent.OWNERID;
                            chargeApplyMaster.CREATEUSERNAME       = ent.OWNERNAME;
                            chargeApplyMaster.OWNERCOMPANYID       = ent.OWNERCOMPANYID;
                            chargeApplyMaster.OWNERCOMPANYNAME     = ent.OWNERCOMPANYNAME;
                            chargeApplyMaster.OWNERDEPARTMENTID    = ent.OWNERDEPARTMENTID;
                            chargeApplyMaster.OWNERDEPARTMENTNAME  = ent.OWNERDEPARTMENTNAME;
                            chargeApplyMaster.OWNERID               = ent.OWNERID;
                            chargeApplyMaster.OWNERNAME             = ent.OWNERNAME;
                            chargeApplyMaster.OWNERPOSTID           = ent.OWNERPOSTID;
                            chargeApplyMaster.OWNERPOSTNAME         = ent.OWNERPOSTNAME;
                            chargeApplyMaster.CHARGEAPPLYMASTERID   = string.Empty;
                            chargeApplyMaster.CHARGEAPPLYMASTERID   = Guid.NewGuid().ToString();
                            chargeApplyMaster.CHARGEAPPLYMASTERCODE = " ";
                            chargeApplyMaster.BUDGETARYMONTH        = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM") + "-1");
                            chargeApplyMaster.PAYTYPE               = 1;
                            chargeApplyMaster.TOTALMONEY            = 0;
                            chargeApplyMaster.REPAYMENT             = 0;
                            chargeApplyMaster.EDITSTATES            = 0;
                            chargeApplyMaster.CHECKSTATES           = 0;
                            chargeApplyMaster.PAYTARGET             = 1;
                            chargeApplyMaster.UPDATEUSERID          = ent.OWNERID;
                            chargeApplyMaster.UPDATEUSERNAME        = ent.OWNERNAME;
                            chargeApplyMaster.CREATEDATE            = DateTime.Now;
                            chargeApplyMaster.UPDATEDATE            = DateTime.Now;
                            bool saveResult = chargeApplyBLL.Add(chargeApplyMaster);
                            if (saveResult)
                            {
                                savedListNeedSend.Add(chargeApplyMaster.CHARGEAPPLYMASTERID, ent);
                            }
                            else
                            {
                                sb.AppendLine("【保存费用报销主数据失败】");
                            }
                        }
                    }
                    #endregion
                    #region  发送待办

                    List <SMT.SaaS.BLLCommonServices.EngineConfigWS.T_WF_DOTASK> tasks = new List <SMT.SaaS.BLLCommonServices.EngineConfigWS.T_WF_DOTASK>();

                    foreach (var v in savedListNeedSend)
                    {
                        SMT.SaaS.BLLCommonServices.EngineConfigWS.T_WF_DOTASK task = new SMT.SaaS.BLLCommonServices.EngineConfigWS.T_WF_DOTASK();
                        task.DOTASKID      = Guid.NewGuid().ToString();
                        task.COMPANYID     = v.Value.OWNERCOMPANYID;
                        task.ORDERID       = v.Key;
                        task.ORDERUSERID   = v.Value.OWNERID;
                        task.ORDERUSERNAME = v.Value.OWNERNAME;
                        task.ORDERSTATUS   = 0;
                        task.MESSAGEBODY   = "您的个人活动经费已下拨,费用报销单还未提交,请及时处理!";
                        string strUrl = "<?xml version=\"1.0\" encoding=\"utf-8\"?><System>" +
                                        "<AssemblyName>SMT.FBAnalysis.UI</AssemblyName>" +
                                        "<PublicClass>SMT.FBAnalysis.UI.Common.Utility</PublicClass>" +
                                        "<ProcessName>CreateFormFromEngine</ProcessName>" +
                                        "<PageParameter>SMT.FBAnalysis.UI.Form.ChargeApplyForm</PageParameter>" +
                                        "<ApplicationOrder>{0}</ApplicationOrder>" +
                                        "<FormTypes>Edit</FormTypes></System>";
                        task.APPLICATIONURL    = string.Format(strUrl, task.ORDERID);
                        task.RECEIVEUSERID     = v.Value.OWNERID;
                        task.BEFOREPROCESSDATE = DateTime.Now.AddDays(3);
                        task.DOTASKTYPE        = 4;
                        task.DOTASKSTATUS      = 0;
                        task.MAILSTATUS        = 0;
                        task.RTXSTATUS         = 0;
                        task.SYSTEMCODE        = "FB";
                        task.MODELCODE         = "T_FB_CHARGEAPPLYMASTER";
                        task.CREATEDATETIME    = DateTime.Now;
                        task.REMARK            = "未提交单据";
                        tasks.Add(task);
                        sb.AppendLine("【发送待办】【待办接收者:" + v.Value.OWNERNAME + "】【报销单号:" + task.ORDERID + "】");
                    }
                    if (tasks.Count > 0)
                    {
                        var sendResult = engineClient.AddDoTaskEntity(tasks.ToArray());
                        sb.AppendLine("【调用Engine[AddDoTaskEntity]】【结果:" + sendResult + "】");
                    }
                    else
                    {
                        sb.AppendLine("【不需要发送待办】");
                    }
                    #endregion
                }
            }
            catch (Exception ex)
            {
                sb.AppendLine("【异常】【" + ex.Message + "】");
            }
            SMT.Foundation.Log.Tracer.Debug(sb.ToString());
        }
コード例 #27
0
ファイル: ExtensionalOrderBLL.cs プロジェクト: jjg0519/OA
        /// <summary>
        /// 根据扩展单据,生成其关联的费用报销单据(仅仅是保存,不冻结/扣除预算额度)
        /// </summary>
        /// <param name="entAdd"></param>
        private void SaveChargeRdByExtenOrder(string strFormType, T_FB_EXTENSIONALORDER entTemp)
        {
            //1.判定当前是否进行了月结
            bool bIsChecked = false;

            IsCheckedAccount(ref bIsChecked);
            if (!bIsChecked)
            {
                throw new Exception("本月尚未结算,无法提交!");
            }

            if (strFormType == Convert.ToInt32(FBAEnums.FormTypes.Resubmit).ToString())
            {
                CancelOldChargeRdByExtenOrder(entTemp.EXTENSIONALORDERID);
            }

            ChargeApplyMasterBLL   bllCharge = new ChargeApplyMasterBLL();
            T_FB_CHARGEAPPLYMASTER entCharge = bllCharge.GetChargeApplyMasterByID(entTemp.INNERORDERID);

            if (entCharge == null)
            {
                entCharge = new T_FB_CHARGEAPPLYMASTER();
                entCharge.CHARGEAPPLYMASTERID   = entTemp.INNERORDERID;
                entCharge.CHARGEAPPLYMASTERCODE = "自动生成";
                entCharge.BUDGETARYMONTH        = System.DateTime.Now.Date;
                entCharge.PAYTYPE = 1;
            }

            entCharge.EDITSTATES  = 1;
            entCharge.CHECKSTATES = entTemp.CHECKSTATES;

            entCharge.T_FB_EXTENSIONALORDER = entTemp;
            entCharge.BANKACCOUT            = entTemp.BANKACCOUT;
            entCharge.BANK       = entTemp.BANK;
            entCharge.RECEIVER   = entTemp.RECEIVER;
            entCharge.PAYTARGET  = entTemp.PAYTARGET;
            entCharge.TOTALMONEY = entTemp.TOTALMONEY.Value;
            entCharge.REMARK     = entTemp.REMARK;

            entCharge.CREATECOMPANYID    = entTemp.CREATECOMPANYID;
            entCharge.CREATEDEPARTMENTID = entTemp.CREATEDEPARTMENTID;
            entCharge.CREATEPOSTID       = entTemp.CREATEPOSTID;
            entCharge.CREATEUSERID       = entTemp.CREATEUSERID;
            entCharge.CREATEDATE         = entTemp.CREATEDATE;

            entCharge.OWNERCOMPANYID    = entTemp.OWNERCOMPANYID;
            entCharge.OWNERDEPARTMENTID = entTemp.OWNERDEPARTMENTID;
            entCharge.OWNERID           = entTemp.OWNERID;
            entCharge.OWNERPOSTID       = entTemp.OWNERPOSTID;

            entCharge.CREATECOMPANYNAME    = entTemp.CREATECOMPANYNAME;
            entCharge.CREATEDEPARTMENTNAME = entTemp.CREATEDEPARTMENTNAME;
            entCharge.CREATEPOSTNAME       = entTemp.CREATEPOSTNAME;
            entCharge.CREATEUSERNAME       = entTemp.CREATEUSERNAME;

            entCharge.OWNERCOMPANYNAME    = entTemp.OWNERCOMPANYNAME;
            entCharge.OWNERDEPARTMENTNAME = entTemp.OWNERDEPARTMENTNAME;
            entCharge.OWNERNAME           = entTemp.OWNERNAME;
            entCharge.OWNERPOSTNAME       = entTemp.OWNERPOSTNAME;

            entCharge.UPDATEUSERID = entTemp.UPDATEUSERID;
            entCharge.UPDATEDATE   = entTemp.UPDATEDATE;
        }
コード例 #28
0
ファイル: ExtensionalOrderBLL.cs プロジェクト: JuRogn/OA
        /// <summary>
        /// 根据扩展单据,生成其关联的费用报销单据(仅仅是保存,不冻结/扣除预算额度)
        /// </summary>
        /// <param name="entAdd"></param>
        private void SaveChargeRdByExtenOrder(string strFormType, T_FB_EXTENSIONALORDER entTemp)
        {
            //1.判定当前是否进行了月结
            bool bIsChecked = false;
            IsCheckedAccount(ref bIsChecked);
            if (!bIsChecked)
            {
                throw new Exception("本月尚未结算,无法提交!");
            }

            if (strFormType == Convert.ToInt32(FBAEnums.FormTypes.Resubmit).ToString())
            {
                CancelOldChargeRdByExtenOrder(entTemp.EXTENSIONALORDERID);
            }

            ChargeApplyMasterBLL bllCharge = new ChargeApplyMasterBLL();
            T_FB_CHARGEAPPLYMASTER entCharge = bllCharge.GetChargeApplyMasterByID(entTemp.INNERORDERID);

            if (entCharge == null)
            {
                entCharge = new T_FB_CHARGEAPPLYMASTER();
                entCharge.CHARGEAPPLYMASTERID = entTemp.INNERORDERID;
                entCharge.CHARGEAPPLYMASTERCODE = "自动生成";
                entCharge.BUDGETARYMONTH = System.DateTime.Now.Date;
                entCharge.PAYTYPE = 1;
            }
            
            entCharge.EDITSTATES = 1;
            entCharge.CHECKSTATES = entTemp.CHECKSTATES;

            entCharge.T_FB_EXTENSIONALORDER = entTemp;
            entCharge.BANKACCOUT = entTemp.BANKACCOUT;
            entCharge.BANK = entTemp.BANK;
            entCharge.RECEIVER = entTemp.RECEIVER;
            entCharge.PAYTARGET = entTemp.PAYTARGET;
            entCharge.TOTALMONEY = entTemp.TOTALMONEY.Value;
            entCharge.REMARK = entTemp.REMARK;

            entCharge.CREATECOMPANYID = entTemp.CREATECOMPANYID;
            entCharge.CREATEDEPARTMENTID = entTemp.CREATEDEPARTMENTID;
            entCharge.CREATEPOSTID = entTemp.CREATEPOSTID;
            entCharge.CREATEUSERID = entTemp.CREATEUSERID;
            entCharge.CREATEDATE = entTemp.CREATEDATE;

            entCharge.OWNERCOMPANYID = entTemp.OWNERCOMPANYID;
            entCharge.OWNERDEPARTMENTID = entTemp.OWNERDEPARTMENTID;
            entCharge.OWNERID = entTemp.OWNERID;
            entCharge.OWNERPOSTID = entTemp.OWNERPOSTID;

            entCharge.CREATECOMPANYNAME = entTemp.CREATECOMPANYNAME;
            entCharge.CREATEDEPARTMENTNAME = entTemp.CREATEDEPARTMENTNAME;
            entCharge.CREATEPOSTNAME = entTemp.CREATEPOSTNAME;
            entCharge.CREATEUSERNAME = entTemp.CREATEUSERNAME;

            entCharge.OWNERCOMPANYNAME = entTemp.OWNERCOMPANYNAME;
            entCharge.OWNERDEPARTMENTNAME = entTemp.OWNERDEPARTMENTNAME;
            entCharge.OWNERNAME = entTemp.OWNERNAME;
            entCharge.OWNERPOSTNAME = entTemp.OWNERPOSTNAME;

            entCharge.UPDATEUSERID = entTemp.UPDATEUSERID;
            entCharge.UPDATEDATE = entTemp.UPDATEDATE;
        }