| | |
| | | @ApiOperation("新增费用申请主") |
| | | //@PreAuthorize("@ss.hasPermi('project:fund:add')") |
| | | @Log(title = "费用申请主", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | @PostMapping("/add") |
| | | @RepeatSubmit |
| | | @Options(useGeneratedKeys = true, keyProperty = "id") |
| | | public AjaxResult add(@RequestBody ServiceFund serviceFund) { |
| | |
| | | serviceFundflowrule.setApplytype(serviceFund.getApplytype()); |
| | | serviceFundflowrule.setCheckuserno(loginUser.getUsername()); |
| | | log.info("serviceFundController---checkFund---queryList的入参值serviceFundflowrule:{}", serviceFundflowrule); |
| | | |
| | | List<ServiceFundflowrule> serviceFundflowrules = serviceFundflowruleService.queryList(serviceFundflowrule); |
| | | |
| | | if (serviceFundflowrules == null || serviceFundflowrules.stream().count() == 0) { |
| | |
| | | if (serviceFund.getFlowlevel() == 1 && serviceFund.getBackflowlevel() == 100) { |
| | | log.info("财务退回再提交,出纳再次审批,之后提交到财务"); |
| | | //说明是财务退回再提交的.需要出纳再看一遍,没问题之后,往分享表里新增 |
| | | serviceFundService.addFundSharedInfo(serviceFund.getId()); |
| | | // serviceFundService.addFundSharedInfo(serviceFund.getId()); |
| | | serviceFund.setFlowlevel(3L); |
| | | serviceFund.setFlowlevel(100L); |
| | | serviceFund.setRecordstatus(99); |
| | | serviceFundService.updateById(serviceFund); |
| | |
| | | //通过 |
| | | serviceSystemmessage.setMessagetitle("" + (OriginalFlowLevel + 1) + "级审核通过"); |
| | | serviceSystemmessage.setMessagecontent("您" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(serviceFund.getCreateTime()) + "提交的关于捐献案例【" + serviceFund.getDonorname() + "】的费用申请已通过" + (OriginalFlowLevel + 1) + "级审核"); |
| | | if (TotalLevel == OriginalFlowLevel + 1) { |
| | | serviceFundService.addFundSharedInfo(checkFundVO.getFundid()); |
| | | } |
| | | // if (TotalLevel == OriginalFlowLevel + 1) { |
| | | // serviceFundService.addFundSharedInfo(checkFundVO.getFundid()); |
| | | // } |
| | | |
| | | } else { |
| | | //驳回 |
| | |
| | | return toAjax(false); |
| | | } |
| | | for (ServiceFund sf : infoByInfoIdList) { |
| | | sf.setApplyTime(new Date()); |
| | | //如果等于100,说明已经走到医院财务那边了;财务那边取数据是从分享表取,所以,这里直接往分享表里添加数据就行了 |
| | | if (sf.getBackflowlevel() != null && sf.getBackflowlevel() == 199) { |
| | | //将fund表的审核状态改成100 |
| | |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("downloadUrl", "/profile/download/wordtemplate/" + name + ".doc"); |
| | | map.put("downloadName", name + ".doc"); |
| | | return map; |
| | | } |
| | | |
| | |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("downloadUrl", "/profile/download/wordtemplate/" + name + ".doc"); |
| | | map.put("downloadName", name + ".doc"); |
| | | return map; |
| | | } |
| | | |
| | | private void getDataSS(Map dataMap, Long id) { |
| | | ServiceFund serviceFund = serviceFundService.getById(id); |
| | | log.info("通过id查询数据的结果:{}", serviceFund); |
| | | if (serviceFund == null) { |
| | | throw new ServiceException("下载失败,用户信息出错", HttpStatus.NO_CONTENT); |
| | | } |
| | |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("downloadUrl", "/profile/download/wordtemplate/" + name + ".doc"); |
| | | map.put("downloadName", name + ".doc"); |
| | | return map; |
| | | } |
| | | |
| | | private String getDataYX(Map dataMap, Long id) { |
| | | ServiceFund serviceFund = serviceFundService.getById(id); |
| | | log.info("通过id获取医学、办公、绩效成本的fund信息为:{}", serviceFund); |
| | | if (serviceFund == null) { |
| | | throw new ServiceException("下载失败,用户信息出错", HttpStatus.NO_CONTENT); |
| | | } |
| | |
| | | throw new ServiceException("下载失败,没有对应信息", HttpStatus.NO_CONTENT); |
| | | } |
| | | |
| | | Date dt = serviceFund.getCreateTime(); |
| | | // Date dt = serviceFund.getCreateTime(); |
| | | Date dt = serviceFund.getApplyTime(); |
| | | SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | String date = formatter.format(dt); |
| | | String time = date.substring(0, 10); |
| | |
| | | dataMap.put("YWZ", serviceFund.getDeptmentname() == null ? "" : serviceFund.getDeptmentname()); |
| | | dataMap.put("ZHUZANG", serviceFund.getManagername() == null ? "" : serviceFund.getManagername()); |
| | | |
| | | dataMap.put("FYMC", LocalDate.now().getYear() + "年" + LocalDate.now().getMonthValue() + "月人体器官获取服务管理中心工作人员绩效"); |
| | | |
| | | if (StringUtils.isEmpty(serviceFund.getRemark())) { |
| | | dataMap.put("FYMC", LocalDate.now().getYear() + "年" + LocalDate.now().getMonthValue() + "月人体器官获取服务管理中心工作人员绩效"); |
| | | } else { |
| | | dataMap.put("FYMC", serviceFund.getRemark().substring(0, serviceFund.getRemark().length() - 2) + "人体器官获取服务管理中心工作人员绩效"); |
| | | } |
| | | String bz = ""; |
| | | int i = 0; |
| | | if (!serviceFund.getApplytype().equals("5")) { |
| | |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | map.put("seqno", 1); |
| | | String fyxm = ""; |
| | | fyxm += LocalDate.now().getYear() + "年" + LocalDate.now().getMonthValue() + "月人体器官获取服务管理中心工作人员绩效,共计"; |
| | | if (StringUtils.isEmpty(serviceFund.getRemark())) { |
| | | fyxm += LocalDate.now().getYear() + "年" + LocalDate.now().getMonthValue() + "月人体器官获取服务管理中心工作人员绩效,共计"; |
| | | } else { |
| | | fyxm += serviceFund.getRemark().substring(0, serviceFund.getRemark().length() - 2) + "人体器官获取服务管理中心工作人员绩效,共计"; |
| | | } |
| | | fyxm += serviceFund.getPretaxcost() + "元"; |
| | | if (serviceFund.getPretaxcost() == null && serviceFund.getPretaxcost() == 0.0) { |
| | | fyxm = ""; |
| | |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("downloadUrl", "/profile/download/wordtemplate/" + name + ".doc"); |
| | | map.put("downloadName", name + ".doc"); |
| | | return map; |
| | | } |
| | | |
| | |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("downloadUrl", "/profile/download/wordtemplate/" + name + ".doc"); |
| | | map.put("downloadName", name + ".doc"); |
| | | return map; |
| | | } |
| | | |
| | |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("downloadUrl", "/profile/download/wordtemplate/" + name + ".doc"); |
| | | map.put("downloadName", name + ".doc"); |
| | | return map; |
| | | } |
| | | |
| | |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("downloadUrl", "/profile/download/wordtemplate/" + name + ".doc"); |
| | | map.put("downloadName", name + ".doc"); |
| | | return map; |
| | | } |
| | | |
| | |
| | | |
| | | Map dataMap = new HashMap(); |
| | | dataMap.put("downloadUrl", "/profile/download/" + msg); |
| | | dataMap.put("downloadName", msg); |
| | | |
| | | return AjaxResult.success(dataMap); |
| | | |