| | |
| | | private readonly ILogger<FiAccountController> _logger; |
| | | private readonly IFiAccountService _fiAccountService; |
| | | private readonly ILiaotianService _liaotianService; |
| | | private readonly IFiSubjectService _ifiSubjectService; |
| | | private readonly IFiAccountRecordService _iFiAccountRecordService; |
| | | private readonly IPltPageService _pltPageService; |
| | | |
| | | |
| | | |
| | | |
| | | public FiAccountController(ILogger<FiAccountController> logger, IFiAccountService fiAccountService, ILiaotianService liaotianService) |
| | | public FiAccountController(ILogger<FiAccountController> logger, IFiAccountService fiAccountService, ILiaotianService liaotianService, IFiSubjectService ifiSubjectService |
| | | , IFiAccountRecordService iFiAccountRecordService |
| | | , IPltPageService pltPageService) |
| | | { |
| | | _logger = logger; |
| | | _fiAccountService = fiAccountService; |
| | | _liaotianService = liaotianService; |
| | | _ifiSubjectService = ifiSubjectService; |
| | | _iFiAccountRecordService = iFiAccountRecordService; |
| | | _pltPageService = pltPageService; |
| | | } |
| | | |
| | | public IActionResult Index() |
| | |
| | | actionEntity.PageIco = "fa fa-search"; |
| | | actionEntity.ActionName = "查询"; |
| | | actionlist.Add(actionEntity); |
| | | ActionEntity actionEntity1 = new ActionEntity(); |
| | | actionEntity1.OpenType = 0; |
| | | actionEntity1.ActionUrl = ""; |
| | | actionEntity1.ActionFun = "Add"; |
| | | actionEntity1.PageIco = "fa fa-plus"; |
| | | actionEntity1.ActionName = "新增"; |
| | | actionlist.Add(actionEntity1); |
| | | //ActionEntity actionEntity1 = new ActionEntity(); |
| | | //actionEntity1.OpenType = 0; |
| | | //actionEntity1.ActionUrl = ""; |
| | | //actionEntity1.ActionFun = "Add"; |
| | | //actionEntity1.PageIco = "fa fa-plus"; |
| | | //actionEntity1.ActionName = "新增"; |
| | | //actionlist.Add(actionEntity1); |
| | | var pageEntities = _pltPageService.GetUserPage(curentuser.Id, "/FiAccount/Index/"); |
| | | var pageEntities1 = pageEntities.Where(x => x.PageMethod == "01").ToList(); |
| | | var pageEntities2 = pageEntities.Where(x => x.PageMethod == "02").ToList(); |
| | | |
| | | foreach (var pageEntity in pageEntities1) |
| | | { |
| | | ActionEntity actionEntity1 = new ActionEntity(); |
| | | actionEntity1.OpenType = pageEntity.OpenType; |
| | | actionEntity1.ActionUrl = ""; |
| | | actionEntity1.ActionFun = pageEntity.PageShortcut; |
| | | actionEntity1.PageIco = pageEntity.PageIco; |
| | | actionEntity1.ActionName = pageEntity.PageName; |
| | | actionlist.Add(actionEntity1); |
| | | } |
| | | ViewData["ActionInfo"] = actionlist; |
| | | ViewData["ActionInfo2"] = pageEntities2; |
| | | |
| | | ViewBag.accounttype = _liaotianService.GetSYScode("fi_account", "accounttype").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); |
| | | ViewBag.qiyongstatus = _liaotianService.GetSYScode("system", "shifou").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); |
| | | return View(); |
| | |
| | | var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); |
| | | ViewData["curentuser"] = curentuser; |
| | | List<ActionEntity> actionlist = new List<ActionEntity>(); |
| | | ActionEntity actionEntity = new ActionEntity(); |
| | | actionEntity.OpenType = 0; |
| | | actionEntity.ActionUrl = ""; |
| | | actionEntity.ActionFun = "Save"; |
| | | actionEntity.PageIco = "glyphicon glyphicon-ok"; |
| | | actionEntity.ActionName = "保存"; |
| | | actionlist.Add(actionEntity); |
| | | ActionEntity actionEntity1 = new ActionEntity(); |
| | | actionEntity1.OpenType = 0; |
| | | actionEntity1.ActionUrl = ""; |
| | | actionEntity1.ActionFun = "Nullify"; |
| | | actionEntity1.PageIco = "fa fa-remove"; |
| | | actionEntity1.ActionName = "删除"; |
| | | actionlist.Add(actionEntity1); |
| | | |
| | | var pageEntities = _pltPageService.GetUserPage(curentuser.Id, "/FiAccount/Index/"); |
| | | var pageEntities1 = pageEntities.Where(x => x.PageMethod == "02" && x.PageShortcut != "Liushuizhang").ToList(); |
| | | |
| | | foreach (var pageEntity in pageEntities1) |
| | | { |
| | | ActionEntity actionEntity1 = new ActionEntity(); |
| | | actionEntity1.OpenType = pageEntity.OpenType; |
| | | actionEntity1.ActionUrl = ""; |
| | | actionEntity1.ActionFun = pageEntity.PageShortcut; |
| | | actionEntity1.PageIco = pageEntity.PageIco; |
| | | actionEntity1.ActionName = pageEntity.PageName; |
| | | actionlist.Add(actionEntity1); |
| | | } |
| | | |
| | | //ActionEntity actionEntity = new ActionEntity(); |
| | | //actionEntity.OpenType = 0; |
| | | //actionEntity.ActionUrl = ""; |
| | | //actionEntity.ActionFun = "Save"; |
| | | //actionEntity.PageIco = "glyphicon glyphicon-ok"; |
| | | //actionEntity.ActionName = "保存"; |
| | | //actionlist.Add(actionEntity); |
| | | //ActionEntity actionEntity1 = new ActionEntity(); |
| | | //actionEntity1.OpenType = 0; |
| | | //actionEntity1.ActionUrl = ""; |
| | | //actionEntity1.ActionFun = "Nullify"; |
| | | //actionEntity1.PageIco = "fa fa-remove"; |
| | | //actionEntity1.ActionName = "删除"; |
| | | //actionlist.Add(actionEntity1); |
| | | ViewData["ActionInfo"] = actionlist; |
| | | ViewBag.accounttype = _liaotianService.GetSYScode("fi_account", "accounttype").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); |
| | | ViewBag.qiyongstatus = _liaotianService.GetSYScode("system", "shifou").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); |
| | |
| | | data.RecStatus = "A"; |
| | | if (String.IsNullOrEmpty(data.Id)) |
| | | { |
| | | |
| | | data.Creater = curentuser.Id; |
| | | data.Createtime = DateTime.Now; |
| | | |
| | | |
| | | } |
| | | else |
| | | { |
| | | var sss = _fiAccountService.Get(data.Id); |
| | | data.Balance = sss.Balance; |
| | | |
| | | data.AllIncome = sss.AllIncome; |
| | | data.AllExpenses = sss.AllExpenses; |
| | | } |
| | | data.Modifier = curentuser.Id; |
| | | data.Modifytime = DateTime.Now; |
| | |
| | | ViewData["curentuser"] = curentuser; |
| | | return new JsonResult(_fiAccountService.ModifyStatus(Id, curentuser.Id)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | public IActionResult Liushuizhang(string id) |
| | | { |
| | | var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); |
| | | ViewData["curentuser"] = curentuser; |
| | | List<ActionEntity> actionlist = new List<ActionEntity>(); |
| | | ActionEntity actionEntity = new ActionEntity(); |
| | | actionEntity.OpenType = 0; |
| | | actionEntity.ActionUrl = ""; |
| | | actionEntity.ActionFun = "Search"; |
| | | actionEntity.PageIco = "fa fa-search"; |
| | | actionEntity.ActionName = "查询"; |
| | | actionlist.Add(actionEntity); |
| | | |
| | | ViewData["ActionInfo"] = actionlist; |
| | | ViewBag.FiSubject = _ifiSubjectService.GetList()/*.Where(x => x.Subjecttype == "02")*/.Select(x => new { code = x.Id, label = x.Subjectname }).ToList(); |
| | | ViewBag.id = id; |
| | | return View(); |
| | | } |
| | | |
| | | |
| | | public IActionResult GetListLiushuizhang(FiAccountRecordDTOSearch search) |
| | | { |
| | | var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); |
| | | ViewData["curentuser"] = curentuser; |
| | | //search.RecordTypeId = "2"; |
| | | search.Creater = "1111"; |
| | | return new JsonResult(_iFiAccountRecordService.SearchByPaging(search)); |
| | | } |
| | | } |
| | | } |