| | |
| | | public AjaxResult add(@RequestBody ServiceFund serviceFund) { |
| | | boolean b = serviceFundService.save(serviceFund); |
| | | Long id = serviceFund.getId(); |
| | | if (b) { |
| | | addReiSharedDatd(serviceFund, 1); |
| | | } |
| | | // if (b) { |
| | | // addReiSharedDatd(serviceFund, 1); |
| | | // } |
| | | return AjaxResult.success(id); |
| | | } |
| | | |
| | |
| | | public AjaxResult addnew(@RequestBody ServiceFundVO serviceFundVO) { |
| | | boolean b = serviceFundService.save(serviceFundVO); |
| | | Long id = serviceFundVO.getId(); |
| | | if (b) { |
| | | addReiSharedDatd(serviceFundVO, 1); |
| | | } |
| | | // if (b) { |
| | | // addReiSharedDatd(serviceFundVO, 1); |
| | | // } |
| | | List<ServiceFunddetail> serviceFunddetails = serviceFundVO.getServiceFunddetails(); |
| | | serviceFunddetails.forEach(item -> item.setFundid(id)); |
| | | serviceFunddetailService.saveBatch(serviceFunddetails); |
| | |
| | | @Log(title = "审核费用", businessType = BusinessType.OTHER) |
| | | @PostMapping("/checkfund") |
| | | public AjaxResult checkFund(@RequestBody CheckFundVO checkFundVO) { |
| | | logger.info("serviceFundController---checkFund的入参值checkFundVO :{}",checkFundVO); |
| | | ServiceFund serviceFund = serviceFundService.getById(checkFundVO.getFundid()); |
| | | if (serviceFund != null) { |
| | | Integer TotalLevel = 0; |
| | |
| | | serviceFundflowrule.setFundtype(2); |
| | | serviceFundflowrule.setApplytype(serviceFund.getApplytype()); |
| | | serviceFundflowrule.setCheckuserno(loginUser.getUsername()); |
| | | logger.info("serviceFundController---checkFund---queryList的入参值serviceFundflowrule:{}",serviceFundflowrule); |
| | | |
| | | List<ServiceFundflowrule> serviceFundflowrules = serviceFundflowruleService.queryList(serviceFundflowrule); |
| | | |
| | | if (serviceFundflowrules == null || serviceFundflowrules.stream().count() == 0) { |
| | |
| | | columnMap.put("fundID", checkFundVO.getFundid()); |
| | | //获取详情数据 |
| | | List<ServiceFunddetail> serviceFunddetails = serviceFunddetailMapper.selectByMap(columnMap); |
| | | logger.info("serviceFundController---checkFund的返回值serviceFunddetails :{}",serviceFunddetails); |
| | | List<ServiceFunddetailShared> serviceFunddetailShareds = DtoConversionUtils.sourceToTarget(serviceFunddetails, ServiceFunddetailShared.class); |
| | | for (int i = 0; i < serviceFunddetails.size(); i++) { |
| | | serviceFunddetailShareds.get(i).setFundid(serviceFundShared.getId()); |
| | |
| | | @RepeatSubmit |
| | | public AjaxResult edit(@RequestBody ServiceFund serviceFund) { |
| | | boolean bret = serviceFundService.updateById(serviceFund); |
| | | if (bret) { |
| | | addReiSharedDatd(serviceFund, 2); |
| | | } |
| | | // if (bret) { |
| | | // addReiSharedDatd(serviceFund, 2); |
| | | // } |
| | | return toAjax(bret); |
| | | } |
| | | |