| | |
| | | private readonly IIntentionCustomerService _intentionCustomerService; |
| | | private readonly IHrPositionService _hrPositionService; |
| | | private readonly IAdmGoodsRecordService _admGoodsRecordService; |
| | | private readonly IFiSubjectService _ifiSubjectService; |
| | | private readonly IFiAccountService _fiAccountService; |
| | | |
| | | private readonly IFiAccountRecordService _iFiAccountRecordService; |
| | | |
| | | public AdmAskController(ILogger<AdmAskController> logger, IAskService askService, IHrDeptService hrDeptService, IWfRunProcessService wfRunProcessService |
| | | , IWfHistoryService wfHistoryService, IWfNeeddeelService wfNeeddeelService |
| | |
| | | , ICooperatecustomCustomerService cooperatecustomCustomerService |
| | | , IIntentionCustomerService intentionCustomerService |
| | | , IHrPositionService hrPositionService |
| | | , IAdmGoodsRecordService admGoodsRecordService) |
| | | , IAdmGoodsRecordService admGoodsRecordService |
| | | , IFiSubjectService ifiSubjectService |
| | | , IFiAccountService fiAccountService |
| | | , IFiAccountRecordService iFiAccountRecordService) |
| | | { |
| | | _logger = logger; |
| | | _hrDeptService = hrDeptService; |
| | |
| | | _intentionCustomerService = intentionCustomerService; |
| | | _hrPositionService = hrPositionService; |
| | | _admGoodsRecordService = admGoodsRecordService; |
| | | _ifiSubjectService = ifiSubjectService; |
| | | _fiAccountService = fiAccountService; |
| | | _iFiAccountRecordService = iFiAccountRecordService; |
| | | } |
| | | |
| | | public IActionResult Askcost(string id = "") |
| | |
| | | |
| | | //ViewBag.CooperatecustomCustomerDTOs = |
| | | |
| | | if (dangqianbuzhou == "财务审批") |
| | | { |
| | | ViewBag.accounttype = _liaotianService.GetSYScode("fi_account", "accounttype"); |
| | | ViewBag.FiSubject = _ifiSubjectService.GetList().Where(x => x.Subjecttype == "02").ToList(); |
| | | } |
| | | |
| | | ViewData.Model = dto; |
| | | return View(); |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | if(data.Step == "财务审批") |
| | | { |
| | | WfRunProcessDTO wfRunProcessDTO = _wfRunProcessService.GetList(data.Id, "20").FirstOrDefault(); |
| | | |
| | | FiAccountRecordDTO datafi = new FiAccountRecordDTO(); |
| | | datafi.Creater = curentuser.Id; |
| | | datafi.Createtime = DateTime.Now; |
| | | datafi.Modifier = curentuser.Id; |
| | | datafi.Modifytime = DateTime.Now; |
| | | datafi.AccountId = data.AccountId; |
| | | datafi.Accounttype = data.Accounttype; |
| | | datafi.SubjectId = data.SubjectId; |
| | | datafi.Money = data.Jine; |
| | | if(wfRunProcessDTO!=null) |
| | | datafi.OperationalMatters = data.Tittle + wfRunProcessDTO.Applyno; |
| | | datafi.PaymentUnit = data.Username; |
| | | FiAccountDTO firmAccount = _fiAccountService.Get(data.AccountId); |
| | | |
| | | |
| | | datafi.RecordTypeId = "2";//支出 |
| | | //data.Department = ""; |
| | | |
| | | //resultEntity = _iFiAccountRecordService.save(data); |
| | | |
| | | firmAccount.AllExpenses = (firmAccount.AllExpenses ?? 0) + datafi.Money; |
| | | firmAccount.Balance = (firmAccount.Balance ?? 0) - datafi.Money; |
| | | |
| | | datafi.AccountMoney = firmAccount.Balance; |
| | | |
| | | resultEntity = _iFiAccountRecordService.save(datafi); |
| | | |
| | | resultEntity = _fiAccountService.save(firmAccount); |
| | | } |
| | | |
| | | |
| | | //发起流程相关 |