Beispiel #1
0
        public List <BaseInfoModel> ShowBaseInfo()
        {
            SqlDataReader dr = SqlHelp.ExecuteReader("prc_ShowBaseInfo", CommandType.StoredProcedure);

            dr.Read();
            List <BaseInfoModel> list = new List <BaseInfoModel>();

            if (dr.HasRows)
            {
                BaseInfoModel baseInfo = new BaseInfoModel();
                baseInfo.ID          = Convert.ToInt32(dr[0]);
                baseInfo.HomeName    = dr[1].ToString();
                baseInfo.MainHead    = dr[2].ToString();
                baseInfo.BuildDate   = Convert.ToDateTime(dr[3]);
                baseInfo.BuildArea   = Convert.ToDouble(dr[4]);
                baseInfo.Amount      = Convert.ToInt32(dr[5]);
                baseInfo.Address     = dr[6].ToString();
                baseInfo.GreenArea   = Convert.ToDouble(dr[7]);
                baseInfo.RoadArea    = Convert.ToDouble(dr[8]);
                baseInfo.Tel         = dr[9].ToString();
                baseInfo.ParkingArea = Convert.ToDouble(dr[10]);
                baseInfo.Memo        = dr[11].ToString();
                list.Add(baseInfo);
            }
            dr.Close();
            return(list);
        }
Beispiel #2
0
        protected void Add_Click(object sender, EventArgs e)
        {
            BaseInfoModel baseinfo = new BaseInfoModel();

            baseinfo.HomeName    = txtBaseName.Text.Trim();
            baseinfo.MainHead    = txtMainHead.Text.Trim();
            baseinfo.BuildDate   = DateTime.Parse(txtBuildDate.Value.Trim().ToString());
            baseinfo.BuildArea   = Double.Parse(txtBuildArea.Text.Trim());
            baseinfo.RoadArea    = Double.Parse(txtRoadArea.Text.Trim());
            baseinfo.GreenArea   = Double.Parse(txtGreenArea.Text.Trim());
            baseinfo.ParkingArea = Double.Parse(txtParkArea.Text.Trim());
            baseinfo.Amount      = int.Parse(txtAmount.Text.Trim());
            baseinfo.Tel         = txtTelphone.Text.Trim();
            baseinfo.Address     = txtAddress.Text.Trim();
            baseinfo.Memo        = txtMemo.Text.Trim();
            bool flag = bll.InsertBaseInfo(baseinfo);

            if (flag)
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "OnSubmit", "<script>alert('添加成功');location.href='BaseInfo.aspx';</script>");
            }
            else
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "OnSubmit", "<script>alert('添加失败');</script>");
            }
        }
Beispiel #3
0
        public void LoadLDKZ(string MineCode, string rows, string page)
        {
            BaseInfoModel model = new BaseInfoModel();

            Response.Write(model.LDKZData(MineCode, page, rows));
            Response.End();
        }
Beispiel #4
0
        public ActionResult PosterBaseInfo()
        {
            List <BaseInfoModel> listbase = AdminBaseInfo.GetBaseInfoList(4);
            BaseInfoModel        baseinfo = listbase[0];

            return(View(baseinfo));
        }
Beispiel #5
0
        /// <summary>
        /// 客服回复
        /// </summary>
        /// <param name="outid"></param>
        /// <returns></returns>
        public ActionResult getkefuinfo(string outid = "-1")
        {
            outid = !string.IsNullOrEmpty(outid) ? outid : "-1";
            BaseInfoModel info = new BaseInfoModel()
            {
                Outid   = -1,
                Addtime = DateTime.Now,
                BaseId  = 0,
                Content = "",
                Title   = "异常报错"
            };

            try
            {
                List <BaseInfoModel> infolist = AdminBaseInfo.GetBaseInfoList(-1, " and outid='" + outid + "' ");
                if (infolist.Count > 0)
                {
                    info = infolist[0];
                }
            }
            catch (Exception ex)
            {
                Console.Write(ex.ToString());
            }
            StringBuilder strb = new StringBuilder();

            strb.Append("callback({\"Outid\":\"" + info.Outid + "\",\"Title\":\"" + info.Title + "\",\"Content\":\"" + info.Content + "\"})");
            return(Content(strb.ToString()));
        }
Beispiel #6
0
        public object GetRollBackInfo([FromUri] BaseInfoModel paramters)
        {
            string jsonStr = string.Empty;

            //List<DataTable> rollBackInfoDtList = new List<DataTable>();
            try
            {
                DataTable nextNodes = new DataTable("rollBackNodes");
                nextNodes.Columns.Add("nodeid");
                nextNodes.Columns.Add("nodetext");
                nextNodes.Columns.Add("designate_actor", typeof(int));
                nextNodes.Columns.Add("designate_anyactor", typeof(int));

                JArray ja = service.GetRollBackNode(paramters.taskid, paramters.userid, string.Empty);
                foreach (JObject o in ja)
                {
                    DataRow dr = nextNodes.NewRow();
                    dr["nodeid"]             = o["id"].Value <string>();
                    dr["nodetext"]           = o["name"].Value <string>();
                    dr["designate_actor"]    = 0;
                    dr["designate_anyactor"] = 0;
                    nextNodes.Rows.Add(dr);
                }
                return(AppJsonHelper.ConvertDtToJson(nextNodes, "rollBackNodes"));
            }
            catch (System.Exception ex)
            {
                return(DCHelper.ErrorMessage(ex.Message));
            }
        }
Beispiel #7
0
 public string PostUpdate([FromBody] BaseInfoModel <PaymentMstAndXmModel> paramters)
 {
     try
     {
         var paymentMstXm = paramters.infoData;
         if (paymentMstXm != null && paymentMstXm.PaymentMst != null)
         {
             byte flam = paymentMstXm.PaymentMst.FApproval;
             if (flam == (byte)ApprovalType.not || flam == (byte)ApprovalType.no)
             {
                 var flam2 = paymentMstXm.PaymentMst.FDelete;
                 if (flam2 == (byte)DeleteType.Yes)
                 {
                     return(DCHelper.ErrorMessage("作废的单据不允许进行修改!"));
                 }
                 var result = this.PaymentMstService.UpdateSignle(paymentMstXm);
                 return(DataConverterHelper.SerializeObject(result));
             }
             else
             {
                 return(DCHelper.ErrorMessage("所选申请单不能进行修改操作!"));
             }
         }
         else
         {
             return(DCHelper.ErrorMessage("所选申请单不存在!"));
         }
     }
     catch (Exception ex)
     {
         return(DCHelper.ErrorMessage(ex.Message));
     }
 }
Beispiel #8
0
        public ActionResult ChangeAvatar()
        {
            ViewData["AdditionHeader"] = "我的设置";
            BaseInfoModel model = new BaseInfoModel();

            model.CurUser = CurrentUser;
            return(View(model));
        }
Beispiel #9
0
        /// <summary>
        /// 加载煤矿树形列表数据
        /// </summary>
        public void GetMineTreeListData(string mineCode)
        {
            BaseInfoModel model = new BaseInfoModel();
            string        json  = model.GetMineTreeList(mineCode);

            Response.Write(json);
            Response.End();
        }
Beispiel #10
0
        public ActionResult Notice()
        {
            ViewData["AdditionHeader"] = "我的设置";
            BaseInfoModel model = new BaseInfoModel();

            model.CurUser       = CurrentUser;
            model.CurUserConfig = CurrentUserConfig;
            return(View(model));
        }
Beispiel #11
0
        public string GetDept([FromUri] BaseInfoModel <CorrespondenceSettingsModel> parameters)
        {
            /*infoData: {
             *      Dwdm: '9999',
             *      Dydm: '101'
             *  }*/
            //SELECT dydm FROM Z_QTDYGX WHERE Z_QTDYGX.dwdm='9999'  and Z_QTDYGX.dylx = '97' AND Z_QTDYGX.dydm like '101%'
            IList <OrganizeModel> organizes = CorrespondenceSettingsService.GetDept(parameters.infoData.Dwdm, parameters.infoData.Dydm);

            return(DCHelper.ModelListToJson <OrganizeModel>(organizes, organizes.Count));
        }
Beispiel #12
0
        public ActionResult EditBaseInfo(int baseid = -1)
        {
            List <BaseInfoModel> listbase = AdminBaseInfo.GetBaseInfoList(baseid);

            ViewData["referer"] = ShopUtils.GetAdminRefererCookie();
            if (listbase.Count == 0)
            {
                return(View(new BaseInfoModel()));
            }
            BaseInfoModel baseinfo = listbase[0];

            return(View(baseinfo));
        }
        public void ReturnMineList(string Type)
        {
            Response.Buffer          = true;
            Response.ExpiresAbsolute = DateTime.Now.AddDays(-1);
            Response.Expires         = 0;
            Response.CacheControl    = "no-cache";
            Response.AddHeader("Pragma", "No-Cache");

            BaseInfoModel model = new BaseInfoModel();

            Response.Write(model.ReturnTreeMine(Type));
            Response.End();
        }
Beispiel #14
0
        public ActionResult EditBaseInfo(BaseInfoModel model)
        {
            ViewData["referer"] = ShopUtils.GetAdminRefererCookie();
            bool result = AdminBaseInfo.UpdateBaseInfo(model.BaseId, model.Title, model.Content);

            if (result)
            {
                return(PromptView("保存成功"));
            }
            else
            {
                return(PromptView("保存失败"));
            }
        }
 public string PostUpdateTableList([FromBody] BaseInfoModel <List <QtTableCustomizeModel> > param)
 {
     if (string.IsNullOrEmpty(param.uid) || string.IsNullOrEmpty(param.uCode))
     {
         return(DCHelper.ErrorMessage("用户信息不能为空!"));
     }
     if (string.IsNullOrEmpty(param.TableCode) || string.IsNullOrEmpty(param.TableName))
     {
         return(DCHelper.ErrorMessage("列表信息不能为空!"));
     }
     if (param.infoData == null || param.infoData.Count < 1)
     {
         return(DCHelper.ErrorMessage("传递的数据不能为空!"));
     }
     try
     {
         List <QtTableCustomizeModel> qtTableCustomizes = new List <QtTableCustomizeModel>();
         qtTableCustomizes = param.infoData;
         SavedResult <long> savedResult = new SavedResult <long>();
         if (qtTableCustomizes != null && qtTableCustomizes.Count > 0)
         {
             foreach (var table in qtTableCustomizes)
             {
                 table.UserId    = long.Parse(param.uid);
                 table.UserCode  = param.uCode;
                 table.TableCode = param.TableCode;
                 table.TableName = param.TableName;
                 if (table.PhId == 0)
                 {
                     table.PersistentState = PersistentState.Added;
                 }
                 else
                 {
                     if (table.PersistentState != PersistentState.Deleted)
                     {
                         table.PersistentState = PersistentState.Modified;
                     }
                 }
             }
             savedResult = this.QtTableCustomizeService.UpdateQtTableCustomizes(qtTableCustomizes);
         }
         return(DataConverterHelper.SerializeObject(savedResult));
     }
     catch (Exception ex)
     {
         return(DCHelper.ErrorMessage(ex.Message));
     }
 }
Beispiel #16
0
        public object GetTaskInstanceInfo([FromUri] BaseInfoModel paramters)
        {
            string jsonStr = string.Empty;

            try
            {
                var data = service.GetTaskExecInfo4App(paramters.piid, paramters.taskid, paramters.userid);
                data.Add("Status", "success");

                return(JsonConvert.SerializeObject(data));
            }
            catch (Exception ex)
            {
                return(DCHelper.ErrorMessage(ex.Message));
            }
        }
        public string PostExportMiddleYear([FromBody] BaseInfoModel <YsAccountMstModel> param)
        {
            if (param.uid == 0)
            {
                return(DCHelper.ErrorMessage("用户id不能为空!"));
            }
            if (param.orgid == 0)
            {
                return(DCHelper.ErrorMessage("组织id不能为空!"));
            }
            if (param.infoData == null)
            {
                return(DCHelper.ErrorMessage("参数传递有误!"));
            }
            try
            {
                if (param.infoData.YsAccounts != null && param.infoData.YsAccounts.Count > 0)
                {
                    IList <YsAccountModel> ysAccounts = new List <YsAccountModel>();
                    foreach (var acc in param.infoData.YsAccounts)
                    {
                        ysAccounts.Add(acc);
                        GetYsAccountsChilds(acc, ysAccounts);
                    }
                    param.infoData.YsAccounts = ysAccounts;
                }
                else
                {
                    return(DCHelper.ErrorMessage("导出参数传递有误!"));
                }
                //获取组织和用户信息
                User2Model    userModel     = new User2Model();
                OrganizeModel organizeModel = new OrganizeModel();
                userModel     = this.BudgetMstService.GetUser(param.uid);
                organizeModel = this.BudgetMstService.GetOrganize(param.orgid);

                //string result = "";
                // ysAccountMst = new YsAccountMstModel();
                //ysAccountMst = this.YsAccountMstService.GetMiddleAccounts(488181024000002,"101", "2019");
                string result = this.YsAccountMstService.GetMiddleExcel(param.infoData.YsAccounts.ToArray(), null, userModel, organizeModel);
                return(result);
            }
            catch (Exception e)
            {
                return(DCHelper.ErrorMessage(e.Message));
            }
        }
Beispiel #18
0
        public IActionResult AddBaseInfo()
        {
            BaseInfoModel model = new BaseInfoModel
            {
                DisplayTags = Codebase_service.GetByCondition((object)"Tags").ToList()
            };

            if (model.DisplayTags == null)
            {
                model.DisplayTags.Add(new CodeBase
                {
                    Remark = "无数据",
                    Type   = ""
                });
            }
            return(View(model));
        }
Beispiel #19
0
        public ActionResult PosterBaseInfo(BaseInfoModel baseinfo)
        {
            List <BaseInfoModel> listbase = AdminBaseInfo.GetBaseInfoList(4);

            BaseInfoModel hbinfo = listbase[0];

            hbinfo.Content = baseinfo.Content;
            bool result = AdminBaseInfo.UpdateBaseInfo(hbinfo.BaseId, hbinfo.Title, hbinfo.Content);

            if (result)
            {
                return(PromptView("保存成功"));
            }
            else
            {
                return(PromptView("保存失败"));
            }
        }
Beispiel #20
0
 public object GetAllSignature([FromUri] BaseInfoModel paramters)
 {
     try
     {
         string jsonStr = string.Empty;
         DbHelper.Open();
         DataTable dt = SignatureDac.Instance.GetSignatureInsureFile(paramters.userid);
         return(AppJsonHelper.ConvertDtToJson(dt));
     }
     catch (Exception ex)
     {
         return(DCHelper.ErrorMessage(ex.Message));
     }
     finally
     {
         DbHelper.Close();
     }
 }
Beispiel #21
0
        ///// <summary>
        ///// 提现条件
        ///// </summary>
        ///// <returns></returns>
        //public ActionResult DrawSet()
        //{

        //}
        #endregion

        #region 海报下载
        public ActionResult hbdownload()
        {
            try
            {
                List <BaseInfoModel> infolist = AdminBaseInfo.GetBaseInfoList(4);
                if (infolist.Count == 0)
                {
                    return(APIResult("error", "没有海报信息"));
                }
                BaseInfoModel binfo   = AdminBaseInfo.GetBaseInfoList(4)[0];
                string        content = binfo.Content;
                string[]      list    = CommonHelper.GetHtmlImageUrlList(content);
                string        img     = list[0];
                return(APIResult("success", BSPConfig.ShopConfig.SiteUrl + img));
            }
            catch (Exception ex)
            {
                return(APIResult("error", "获取海报信息失败"));
            }
        }
Beispiel #22
0
 public string PostAdd([FromBody] BaseInfoModel <PaymentMstAndXmModel> paramters)
 {
     try
     {
         if (paramters.infoData != null)
         {
             PaymentMstAndXmModel paymentMstAndXm = paramters.infoData;
             var result = this.PaymentMstService.AddSignle(paymentMstAndXm);
             return(DataConverterHelper.SerializeObject(result));
         }
         else
         {
             throw new Exception("参数传递有误!");
         }
     }
     catch (Exception ex)
     {
         return(DCHelper.ErrorMessage(ex.Message));
     }
 }
Beispiel #23
0
 public string PostSaveHX([FromBody] BaseInfoModel <List <ExpenseHxModel> > param)
 {
     if (param.infoData == null)
     {
         return(DCHelper.ErrorMessage("保存的数据不能为空!"));
     }
     try
     {
         var addinfo    = new List <ExpenseHxModel>();
         var updateinfo = new List <ExpenseHxModel>();
         var deleteinfo = new List <string>();
         foreach (ExpenseHxModel a in param.infoData)
         {
             if (a.PhId == 0)
             {
                 a.PersistentState = PersistentState.Added;
                 addinfo.Add(a);
             }
             else
             {
                 if (a.PersistentState == PersistentState.Deleted)
                 {
                     deleteinfo.Add(a.PhId.ToString());
                 }
                 else
                 {
                     a.PersistentState = PersistentState.Modified;
                     updateinfo.Add(a);
                 }
             }
         }
         CommonResult savedresult = new CommonResult();
         savedresult = ExpenseMstService.SaveHX(addinfo, updateinfo, deleteinfo);
         return(DataConverterHelper.SerializeObject(savedresult));
     }
     catch (Exception ex)
     {
         return(DCHelper.ErrorMessage(ex.Message));
     }
 }
Beispiel #24
0
        public int InsertBaseInfo(BaseInfoModel baseinfo)
        {
            SqlParameter[] param = { new SqlParameter("@HomeName",  SqlDbType.VarChar,                           20), new SqlParameter("@MainHead",    SqlDbType.VarChar,  20),
                                     new SqlParameter("@BuildDate", SqlDbType.DateTime,                          10), new SqlParameter("@BuildArea",   SqlDbType.Float),
                                     new SqlParameter("@Amount",    SqlDbType.Int,                                4), new SqlParameter("@Address",     SqlDbType.VarChar, 255),
                                     new SqlParameter("@GreenArea", SqlDbType.Float),   new SqlParameter("@RoadArea", SqlDbType.Float),
                                     new SqlParameter("@Tel",       SqlDbType.VarChar,                           18), new SqlParameter("@ParkingArea", SqlDbType.Float),
                                     new SqlParameter("@Memo",      SqlDbType.Text) };
            param[0].Value  = baseinfo.HomeName;
            param[1].Value  = baseinfo.MainHead;
            param[2].Value  = baseinfo.BuildDate;
            param[3].Value  = baseinfo.BuildArea;
            param[4].Value  = baseinfo.Amount;
            param[5].Value  = baseinfo.Address;
            param[6].Value  = baseinfo.GreenArea;
            param[7].Value  = baseinfo.RoadArea;
            param[8].Value  = baseinfo.Tel;
            param[9].Value  = baseinfo.ParkingArea;
            param[10].Value = baseinfo.Memo;
            int result = SqlHelp.ExecuteNonQuery("prc_InsertBaseInfo", CommandType.StoredProcedure, param);

            return(result);
        }
 public string PostUpdateAccountMst([FromBody] BaseInfoModel <YsAccountMstModel> param)
 {
     if (param.infoData == null)
     {
         return(DCHelper.ErrorMessage("参数传递不能修改!"));
     }
     try
     {
         SavedResult <Int64> savedResult = this.YsAccountMstService.UpdateAccountMst(param.infoData);
         if (savedResult != null && savedResult.SaveRows > 0)
         {
             return(DCHelper.SuccessMessage("保存成功!"));
         }
         else
         {
             return(DCHelper.ErrorMessage("保存失败!"));
         }
     }
     catch (Exception ex)
     {
         return(DCHelper.ErrorMessage(ex.Message));
     }
 }
 public string PostUpdateCoverUpList([FromBody] BaseInfoModel <List <AllCoverUpModel> > param)
 {
     if (string.IsNullOrEmpty(param.uCode))
     {
         return(DCHelper.ErrorMessage("用户编码不能为空!"));
     }
     if (param.infoData == null && param.infoData.Count <= 0)
     {
         return(DCHelper.ErrorMessage("参数传递不能为空!"));
     }
     try
     {
         if (param.uCode != "Admin")
         {
             return(DCHelper.ErrorMessage("非Admin用户无权限访问此功能!"));
         }
         var result = this.QtCoverUpForOrgService.UpdateCoverUpList(param.infoData);
         return(DataConverterHelper.SerializeObject(result));
     }
     catch (Exception ex)
     {
         return(DCHelper.ErrorMessage(ex.Message));
     }
 }
Beispiel #27
0
        public object GetTaskBizContent([FromUri] BaseInfoModel paramters)
        {
            object obj = null;

            try
            {
                if (paramters.flowType == "af")
                {
                    DllClassService dcs = new DllClassService("NG.AppFlow.Facade");
                    obj = dcs.Invoke("NG.AppFlow.Facade.AppFlowFacade", "GetBizContent4MobileApp", new object[] { paramters.piid });

                    //System.Text.StringBuilder sb = new System.Text.StringBuilder();
                    //sb.Append("{");
                    //sb.Append(string.Format("\"data\":\"{0}\"", obj.ToString())).Append(",");
                    //sb.Append("\"name\":\"\",");
                    //sb.Append("\"type\":\"bytes\",");
                    //sb.Append("\"status\":\"succeed\",");
                    //sb.Append("\"errmsg\":\"\"}");

                    JObject data = new JObject();
                    data.Add("data", obj.ToString());
                    data.Add("name", "");
                    data.Add("type", "bytes");
                    data.Add("status", "succeed");
                    return(data);
                }
                else if (paramters.flowType == "oawf")
                {
                    DllClassService dcs = new DllClassService("NG.WorkFlow.Facade.dll");
                    obj = dcs.Invoke("NG.WorkFlow.Facade.WorkflowFacade", "GetBizContentUrl4MobileApp", new object[] { paramters.piid });

                    string[] ss   = (obj.ToString()).Split(new string[] { "@@**" }, StringSplitOptions.None);
                    string   url  = ss.Length > 0 ? ss[0] : string.Empty;
                    string   name = ss.Length > 1 ? ss[1] : string.Empty;

                    //System.Text.StringBuilder sb = new System.Text.StringBuilder();
                    //sb.Append("{");
                    //sb.Append(string.Format("\"data\":\"{0}\"", url)).Append(",");
                    //sb.Append(string.Format("\"name\":\"{0}\"", name)).Append(",");
                    //sb.Append("\"type\":\"URL\",");
                    //sb.Append("\"status\":\"succeed\",");
                    //sb.Append("\"errmsg\":\"\"}");
                    //jsonStr = sb.ToString();

                    JObject data = new JObject();
                    data.Add("data", url);
                    data.Add("name", name);
                    data.Add("type", "URL");
                    data.Add("status", "succeed");
                    return(data);
                }
                else if (paramters.flowType == "psoftwf")
                {
                    DllClassService dcs = new DllClassService("NG.AppFlow.Facade");
                    obj = dcs.Invoke("NG.AppFlow.Facade.PSoftWorkFlowFacade", "GetBizContent4MobileApp", new object[] { paramters.piid, string.Empty });

                    //System.Text.StringBuilder sb = new System.Text.StringBuilder();
                    //sb.Append("{");
                    //sb.Append(string.Format("\"data\":\"{0}\"", obj.ToString())).Append(",");
                    //sb.Append("\"name\":\"\",");
                    //sb.Append("\"type\":\"bytes\",");
                    //sb.Append("\"status\":\"succeed\",");
                    //sb.Append("\"errmsg\":\"\"}");
                    //jsonStr = sb.ToString();

                    JObject data = new JObject();
                    data.Add("data", obj.ToString());
                    data.Add("name", "");
                    data.Add("type", "bytes");
                    data.Add("status", "succeed");
                    return(data);
                }
                else if (paramters.flowType == "wf")
                {
                    try
                    {
                        DbHelper.Open();
                        string  fileName = string.Empty;
                        string  url      = WorkFlowEngine.Instance.GetBizPdf(paramters.piid, out fileName);
                        JObject data     = new JObject();
                        data.Add("data", url);
                        data.Add("name", fileName);
                        data.Add("type", "URL");
                        data.Add("status", "succeed");
                        return(data);
                    }
                    finally
                    {
                        DbHelper.Close();
                    }
                }
                else
                {
                    throw new Exception("获取正文出错");
                }
            }
            catch (System.Exception ex)
            {
                return(DCHelper.ErrorMessage(ex.Message));
            }
        }
        public string PostSaveAccountList([FromBody] BaseInfoModel <YsAccountMstModel> param)
        {
            if (param.uid == 0)
            {
                return(DCHelper.ErrorMessage("用户id不能为空!"));
            }
            if (param.orgid == 0)
            {
                return(DCHelper.ErrorMessage("组织id不能为空!"));
            }
            if (param.infoData == null)
            {
                return(DCHelper.ErrorMessage("参数传递有误!"));
            }
            try
            {
                if (param.infoData.YsAccounts != null && param.infoData.YsAccounts.Count > 0)
                {
                    IList <YsAccountModel> ysAccounts = new List <YsAccountModel>();
                    foreach (var acc in param.infoData.YsAccounts)
                    {
                        ysAccounts.Add(acc);
                        GetYsAccountsChilds(acc, ysAccounts);
                    }
                    if (ysAccounts != null && ysAccounts.Count > 0)
                    {
                        //后端重新算一遍数据(防止前端传入错误数据)
                        foreach (var ysAcc in ysAccounts)
                        {
                            if (ysAcc.SUBJECTCODE == "4BNHJSR")
                            {
                                ysAcc.FINALACCOUNTSTOTAL  = ysAccounts.ToList().FindAll(t => (t.SUBJECTCODE == null ? "" : t.SUBJECTCODE).StartsWith("4") && (t.SUBJECTCODE == null ? "" : t.SUBJECTCODE).Length == 3) == null ? 0 : ysAccounts.ToList().FindAll(t => (t.SUBJECTCODE == null ? "" : t.SUBJECTCODE).StartsWith("4") && (t.SUBJECTCODE == null ? "" : t.SUBJECTCODE).Length == 3).Sum(t => t.FINALACCOUNTSTOTAL);
                                ysAcc.BUDGETTOTAL         = ysAccounts.ToList().FindAll(t => (t.SUBJECTCODE == null ? "" : t.SUBJECTCODE).StartsWith("4") && (t.SUBJECTCODE == null ? "" : t.SUBJECTCODE).Length == 3) == null ? 0 : ysAccounts.ToList().FindAll(t => (t.SUBJECTCODE == null ? "" : t.SUBJECTCODE).StartsWith("4") && (t.SUBJECTCODE == null ? "" : t.SUBJECTCODE).Length == 3).Sum(t => t.BUDGETTOTAL);
                                ysAcc.ADJUSTMENT          = ysAccounts.ToList().FindAll(t => (t.SUBJECTCODE == null ? "" : t.SUBJECTCODE).StartsWith("4") && (t.SUBJECTCODE == null ? "" : t.SUBJECTCODE).Length == 3) == null ? 0 : ysAccounts.ToList().FindAll(t => (t.SUBJECTCODE == null ? "" : t.SUBJECTCODE).StartsWith("4") && (t.SUBJECTCODE == null ? "" : t.SUBJECTCODE).Length == 3).Sum(t => t.ADJUSTMENT);
                                ysAcc.APPROVEDBUDGETTOTAL = ysAccounts.ToList().FindAll(t => (t.SUBJECTCODE == null ? "" : t.SUBJECTCODE).StartsWith("4") && (t.SUBJECTCODE == null ? "" : t.SUBJECTCODE).Length == 3) == null ? 0 : ysAccounts.ToList().FindAll(t => (t.SUBJECTCODE == null ? "" : t.SUBJECTCODE).StartsWith("4") && (t.SUBJECTCODE == null ? "" : t.SUBJECTCODE).Length == 3).Sum(t => t.APPROVEDBUDGETTOTAL);
                                ysAcc.ThisaccountsTotal   = ysAccounts.ToList().FindAll(t => (t.SUBJECTCODE == null ? "" : t.SUBJECTCODE).StartsWith("4") && (t.SUBJECTCODE == null ? "" : t.SUBJECTCODE).Length == 3) == null ? 0 : ysAccounts.ToList().FindAll(t => (t.SUBJECTCODE == null ? "" : t.SUBJECTCODE).StartsWith("4") && (t.SUBJECTCODE == null ? "" : t.SUBJECTCODE).Length == 3).Sum(t => t.ThisaccountsTotal);
                            }
                            if (ysAcc.SUBJECTCODE == "5QM1")
                            {
                                ysAcc.FINALACCOUNTSTOTAL  = (ysAccounts.ToList().Find(t => t.SUBJECTCODE == "4BNHJSR") == null ? 0 : ysAccounts.ToList().Find(t => t.SUBJECTCODE == "4BNHJSR").FINALACCOUNTSTOTAL) - (ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5BNHJZC") == null ? 0 : ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5BNHJZC").FINALACCOUNTSTOTAL);
                                ysAcc.BUDGETTOTAL         = (ysAccounts.ToList().Find(t => t.SUBJECTCODE == "4BNHJSR") == null ? 0 : ysAccounts.ToList().Find(t => t.SUBJECTCODE == "4BNHJSR").BUDGETTOTAL) - (ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5BNHJZC") == null ? 0 : ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5BNHJZC").BUDGETTOTAL);
                                ysAcc.ADJUSTMENT          = (ysAccounts.ToList().Find(t => t.SUBJECTCODE == "4BNHJSR") == null ? 0 : ysAccounts.ToList().Find(t => t.SUBJECTCODE == "4BNHJSR").ADJUSTMENT) - (ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5BNHJZC") == null ? 0 : ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5BNHJZC").ADJUSTMENT);
                                ysAcc.APPROVEDBUDGETTOTAL = (ysAccounts.ToList().Find(t => t.SUBJECTCODE == "4BNHJSR") == null ? 0 : ysAccounts.ToList().Find(t => t.SUBJECTCODE == "4BNHJSR").APPROVEDBUDGETTOTAL) - (ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5BNHJZC") == null ? 0 : ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5BNHJZC").APPROVEDBUDGETTOTAL);
                                ysAcc.ThisaccountsTotal   = (ysAccounts.ToList().Find(t => t.SUBJECTCODE == "4BNHJSR") == null ? 0 : ysAccounts.ToList().Find(t => t.SUBJECTCODE == "4BNHJSR").ThisaccountsTotal) - (ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5BNHJZC") == null ? 0 : ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5BNHJZC").ThisaccountsTotal);
                            }
                            if (ysAcc.SUBJECTCODE == "5QM6")
                            {
                                ysAcc.FINALACCOUNTSTOTAL = (ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM1") == null ? 0 : ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM1").FINALACCOUNTSTOTAL) + (ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM2") == null ? 0 : ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM2").FINALACCOUNTSTOTAL)
                                                           + (ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM3") == null ? 0 : ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM3").FINALACCOUNTSTOTAL) - (ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM4") == null ? 0 : ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM4").FINALACCOUNTSTOTAL)
                                                           - (ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM5") == null ? 0 : ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM5").FINALACCOUNTSTOTAL);
                                ysAcc.BUDGETTOTAL = (ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM1") == null ? 0 : ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM1").BUDGETTOTAL) + (ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM2") == null ? 0 : ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM2").BUDGETTOTAL)
                                                    + (ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM3") == null ? 0 : ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM3").BUDGETTOTAL) - (ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM4") == null ? 0 : ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM4").BUDGETTOTAL)
                                                    - (ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM5") == null ? 0 : ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM5").BUDGETTOTAL);
                                ysAcc.ADJUSTMENT = (ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM1") == null ? 0 : ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM1").ADJUSTMENT) + (ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM2") == null ? 0 : ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM2").ADJUSTMENT)
                                                   + (ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM3") == null ? 0 : ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM3").ADJUSTMENT) - (ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM4") == null ? 0 : ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM4").ADJUSTMENT)
                                                   - (ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM5") == null ? 0 : ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM5").ADJUSTMENT);
                                ysAcc.APPROVEDBUDGETTOTAL = (ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM1") == null ? 0 : ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM1").APPROVEDBUDGETTOTAL) + (ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM2") == null ? 0 : ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM2").APPROVEDBUDGETTOTAL)
                                                            + (ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM3") == null ? 0 : ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM3").APPROVEDBUDGETTOTAL) - (ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM4") == null ? 0 : ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM4").APPROVEDBUDGETTOTAL)
                                                            - (ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM5") == null ? 0 : ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM5").APPROVEDBUDGETTOTAL);
                                ysAcc.ThisaccountsTotal = (ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM1") == null ? 0 : ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM1").ThisaccountsTotal) + (ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM2") == null ? 0 : ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM2").ThisaccountsTotal)
                                                          + (ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM3") == null ? 0 : ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM3").ThisaccountsTotal) - (ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM4") == null ? 0 : ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM4").ThisaccountsTotal)
                                                          - (ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM5") == null ? 0 : ysAccounts.ToList().Find(t => t.SUBJECTCODE == "5QM5").ThisaccountsTotal);
                            }

                            if (ysAcc.BUDGETTOTAL == 0)
                            {
                                ysAcc.BudgetComplete = 100;
                            }
                            else
                            {
                                ysAcc.BudgetComplete = ysAcc.APPROVEDBUDGETTOTAL / ysAcc.BUDGETTOTAL * 100;
                            }
                            if (ysAcc.APPROVEDBUDGETTOTAL == 0)
                            {
                                ysAcc.COMPLETE = 100;
                            }
                            else
                            {
                                ysAcc.COMPLETE = ysAcc.ThisaccountsTotal / ysAcc.APPROVEDBUDGETTOTAL * 100;
                            }
                        }
                    }
                    param.infoData.YsAccounts = ysAccounts;
                }
                //if ("1".Equals(param.value))
                //{
                //    if(param.infoData.VerifyStart == 1)
                //    {
                //        return DCHelper.ErrorMessage("年初申报数据已上报,不能修改!");
                //    }
                //}
                //else if ("2".Equals(param.value))
                //{
                //    if (param.infoData.VerifyMiddle == 1)
                //    {
                //        return DCHelper.ErrorMessage("年中调整数据已上报,不能修改!");
                //    }
                //}
                //else if ("3".Equals(param.value))
                //{
                //    if (param.infoData.VerifyEnd == 1)
                //    {
                //        return DCHelper.ErrorMessage("年末决算数据已上报,不能修改!");
                //    }
                //}
                SavedResult <long> savedResult = new SavedResult <long>();
                savedResult = this.YsAccountMstService.SaveYsAccount(param.infoData, param.orgid, param.orgCode, param.Year, param.uid, param.value);
                return(DataConverterHelper.SerializeObject(savedResult));
            }
            catch (Exception ex)
            {
                return(DCHelper.ErrorMessage(ex.Message));
            }
        }
Beispiel #29
0
        public bool UpdateBaseInfo(BaseInfoModel baseinfo)
        {
            int result = dal.UpdateBaseInfo(baseinfo);

            return(result == 0 ? false : true);
        }
Beispiel #30
0
        /// <summary>
        /// 获取煤矿下拉列表信息
        /// </summary>
        public void GetMineInfoComboTree()
        {
            BaseInfoModel bim = new BaseInfoModel();

            bim.ReturnComboTreeMineInfo("");
        }