From 926b0e68e108d0866d79c1a366e3d14d1cebac4b Mon Sep 17 00:00:00 2001 From: liusheng <337615773@qq.com> Date: 星期一, 04 十二月 2023 10:23:10 +0800 Subject: [PATCH] 代码提交 --- ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundController.java | 31 +++++++++++++++++++++++++------ 1 files changed, 25 insertions(+), 6 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundController.java index c457492..8dfea46 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundController.java @@ -1,8 +1,10 @@ package com.ruoyi.web.controller.project; import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.annotation.NotRepeatCommit; import com.ruoyi.common.annotation.RepeatSubmit; import com.ruoyi.common.config.RuoYiConfig; import com.ruoyi.common.constant.HttpStatus; @@ -13,6 +15,7 @@ import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.exception.ServiceException; +import com.ruoyi.common.exception.base.BaseException; import com.ruoyi.common.tax.TaxtUtils; import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.StringUtils; @@ -479,6 +482,7 @@ * 瀹℃牳璐圭敤 */ @ApiOperation("瀹℃牳璐圭敤") + @RepeatSubmit // @Log(title = "瀹℃牳璐圭敤", businessType = BusinessType.OTHER) @PostMapping("/checkfund") public AjaxResult checkFund(@RequestBody CheckFundVO checkFundVO) { @@ -492,7 +496,6 @@ serviceFundflowrule.setApplytype(serviceFund.getApplytype()); serviceFundflowrule.setCheckuserno(loginUser.getUsername()); log.info("serviceFundController---checkFund---queryList鐨勫叆鍙傚�約erviceFundflowrule:{}", serviceFundflowrule); - List<ServiceFundflowrule> serviceFundflowrules = serviceFundflowruleService.queryList(serviceFundflowrule); if (serviceFundflowrules == null || serviceFundflowrules.stream().count() == 0) { @@ -704,6 +707,7 @@ return toAjax(false); } + /** * 鍒犻櫎璐圭敤鐢宠涓� @@ -2096,6 +2100,7 @@ /** * 璐圭敤绫诲瀷璁℃暟 */ +// @NotRepeatCommit(key = "param:arg[1]", value = 30000) @ApiOperation("璐圭敤绫诲瀷璁℃暟") @GetMapping(value = "/countItem/{infoid}/{itemid}") public AjaxResult countItem(@PathVariable Long infoid, @PathVariable Long itemid) { @@ -2120,17 +2125,31 @@ /** * 鍚堣涓◣ */ + @NotRepeatCommit(key = "param:arg[1]", value = 30000) @ApiOperation("鍚堣涓◣") @Log(title = "鍚堣涓◣", businessType = BusinessType.INSERT) @PostMapping("/totaltax") - @RepeatSubmit public AjaxResult totaltax(@RequestBody TotalTaxVO totalTaxVO) { - Boolean totaltax = serviceFundService.totaltax(totalTaxVO); - if(totaltax){ - return AjaxResult.success("鍚堣涓◣鎴愬姛,璇峰幓E:\\OPO\\WEB\\Upload\\download 涓煡鎵炬枃浠�"); + Map<String, List<ServiceFunddetailExcel>> totaltax = serviceFundService.totaltax(totalTaxVO); + if (ObjectUtils.isEmpty(totaltax)) { + throw new BaseException("鍚堣涓◣澶辫触"); } - return AjaxResult.success("鍚堣澶辫触锛岃绋嶅悗閲嶈瘯"); + Set<String> strings = totaltax.keySet(); + String key2 = null; + for (String key : strings) { + key2 = key; + } + ExcelUtil<ServiceFunddetailExcel> util = new ExcelUtil<ServiceFunddetailExcel>(ServiceFunddetailExcel.class); + AjaxResult ajaxResult = util.exportExcel(totaltax.get(key2), key2); + String msg = (String) ajaxResult.get("msg"); + + Map dataMap = new HashMap(); + dataMap.put("downloadUrl", "/profile/download/" + msg); + + return AjaxResult.success(dataMap); + + } } -- Gitblit v1.9.3