From 8b0f4cd6157bf627e9bfd618c2349bf6ab41e926 Mon Sep 17 00:00:00 2001 From: "LAPTOP-0SF788NU\\admin" <3306174053@qq.com> Date: Sat, 7 Oct 2023 16:11:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=83=E6=95=B0=E6=8D=AE=E4=B8=8B=E8=BD=BD(?= =?UTF-8?q?=E4=BC=9A=E8=AE=A1=E8=B4=A6=E7=B0=BF,=E4=BC=9A=E8=AE=A1?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AccountingBookController.java | 19 +++++++++++++++++++ .../vo/AccountingBookBaseVO.java | 3 +++ .../vo/AccountingBookExcelVO.java | 3 +++ .../vo/AccountingBookPageReqVO.java | 3 +++ .../AccountingReportController.java | 19 +++++++++++++++++++ .../vo/AccountingReportBaseVO.java | 3 +++ .../vo/AccountingReportExcelVO.java | 3 +++ .../vo/AccountingReportPageReqVO.java | 3 +++ .../accountingbook/AccountingBookDO.java | 6 ++++++ .../accountingreport/AccountingReportDO.java | 6 ++++++ 10 files changed, 68 insertions(+) diff --git a/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/accountingbook/AccountingBookController.java b/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/accountingbook/AccountingBookController.java index 4b74d3f0..ea9cb912 100644 --- a/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/accountingbook/AccountingBookController.java +++ b/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/accountingbook/AccountingBookController.java @@ -6,10 +6,16 @@ import cn.iocoder.yudao.framework.common.util.validation.ValidationUtils; import cn.iocoder.yudao.framework.file.core.client.s3.S3FileClient; import cn.iocoder.yudao.framework.file.core.client.s3.S3FileClientConfig; import cn.iocoder.yudao.module.accounting.controller.admin.accountingbook.vo.*; +import cn.iocoder.yudao.module.accounting.controller.admin.invoices.vo.InvoicesPageReqVO; +import cn.iocoder.yudao.module.accounting.controller.admin.invoices.vo.InvoicesRespVO; import cn.iocoder.yudao.module.accounting.convert.accountingbook.AccountingBookConvert; +import cn.iocoder.yudao.module.accounting.convert.invoices.InvoicesConvert; import cn.iocoder.yudao.module.accounting.dal.dataobject.accountingbook.AccountingBookDO; +import cn.iocoder.yudao.module.accounting.dal.dataobject.invoices.InvoicesDO; import cn.iocoder.yudao.module.accounting.service.accountingbook.AccountingBookService; import cn.iocoder.yudao.module.infra.service.file.FileService; +import cn.iocoder.yudao.module.setting.service.passwords.PasswordsService; +import com.alibaba.fastjson.JSONObject; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; @@ -52,6 +58,9 @@ public class AccountingBookController { @Resource private RedisTemplate redisTemplate; + @Resource + private PasswordsService passwordsService; + @PostMapping("/create") @Operation(summary = "创建会计账簿") @@ -106,6 +115,16 @@ public class AccountingBookController { } + @PutMapping("/downloadXml") + @Operation(summary = "获得分页Xml") + @PreAuthorize("@ss.hasPermission('archives:accounting-book:query')") + public void downloadXml(@Valid AccountingBookPageReqVO pageVO, HttpServletResponse response) throws IOException { + PageResult pageResult = accountingBookService.getAccountingBookPage(pageVO); + PageResult voPageResult = AccountingBookConvert.INSTANCE.convertPage(pageResult); + String jsonString = JSONObject.toJSONString(voPageResult); + passwordsService.jsonToXmlConverter(response,pageVO.getInputPassword(),jsonString); + } + @PutMapping("/update") @Operation(summary = "更新会计账簿") @PreAuthorize("@ss.hasPermission('archives:accounting-book:update')") diff --git a/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/accountingbook/vo/AccountingBookBaseVO.java b/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/accountingbook/vo/AccountingBookBaseVO.java index bebc2308..c1d45367 100644 --- a/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/accountingbook/vo/AccountingBookBaseVO.java +++ b/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/accountingbook/vo/AccountingBookBaseVO.java @@ -50,4 +50,7 @@ public class AccountingBookBaseVO { @Schema(description = "所属部门", example = "张三") private String deptName; + + @Schema(description = "密码区") + private String password; } diff --git a/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/accountingbook/vo/AccountingBookExcelVO.java b/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/accountingbook/vo/AccountingBookExcelVO.java index bd755ed3..e27c5d1f 100644 --- a/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/accountingbook/vo/AccountingBookExcelVO.java +++ b/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/accountingbook/vo/AccountingBookExcelVO.java @@ -59,4 +59,7 @@ public class AccountingBookExcelVO { @ExcelProperty("所属部门") private String deptName; + @Schema(description = "密码区") + private String password; + } diff --git a/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/accountingbook/vo/AccountingBookPageReqVO.java b/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/accountingbook/vo/AccountingBookPageReqVO.java index db842916..003c79e7 100644 --- a/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/accountingbook/vo/AccountingBookPageReqVO.java +++ b/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/accountingbook/vo/AccountingBookPageReqVO.java @@ -61,4 +61,7 @@ public class AccountingBookPageReqVO extends PageParam { @Schema(description = "所属部门", example = "张三") private String deptName; + @Schema(description = "密码") + String inputPassword; + } diff --git a/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/accountingreport/AccountingReportController.java b/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/accountingreport/AccountingReportController.java index 452c4dd6..35f83c7c 100644 --- a/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/accountingreport/AccountingReportController.java +++ b/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/accountingreport/AccountingReportController.java @@ -4,10 +4,16 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.validation.ValidationUtils; import cn.iocoder.yudao.framework.file.core.client.s3.S3FileClient; import cn.iocoder.yudao.framework.file.core.client.s3.S3FileClientConfig; +import cn.iocoder.yudao.module.accounting.controller.admin.accountingbook.vo.AccountingBookPageReqVO; +import cn.iocoder.yudao.module.accounting.controller.admin.accountingbook.vo.AccountingBookRespVO; import cn.iocoder.yudao.module.accounting.controller.admin.accountingreport.vo.*; +import cn.iocoder.yudao.module.accounting.convert.accountingbook.AccountingBookConvert; import cn.iocoder.yudao.module.accounting.convert.accountingreport.AccountingReportConvert; +import cn.iocoder.yudao.module.accounting.dal.dataobject.accountingbook.AccountingBookDO; import cn.iocoder.yudao.module.accounting.dal.dataobject.accountingreport.AccountingReportDO; import cn.iocoder.yudao.module.accounting.service.accountingreport.AccountingReportService; +import cn.iocoder.yudao.module.setting.service.passwords.PasswordsService; +import com.alibaba.fastjson.JSONObject; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; @@ -43,6 +49,9 @@ public class AccountingReportController { @Resource private RedisTemplate redisTemplate; + @Resource + private PasswordsService passwordsService; + @PostMapping("/create") @Operation(summary = "创建会计报表") @PreAuthorize("@ss.hasPermission('archives:accounting-report:create')") @@ -138,6 +147,16 @@ public class AccountingReportController { return success(AccountingReportConvert.INSTANCE.convertPage(pageResult)); } + @GetMapping("/downloadXml") + @Operation(summary = "获得会计报表分页") + @PreAuthorize("@ss.hasPermission('archives:accounting-report:query')") + public void getAccountingReportPage(@Valid AccountingReportPageReqVO pageVO, HttpServletResponse response) throws IOException { + PageResult pageResult = accountingReportService.getAccountingReportPage(pageVO); + PageResult voPageResult = AccountingReportConvert.INSTANCE.convertPage(pageResult); + String jsonString = JSONObject.toJSONString(voPageResult); + passwordsService.jsonToXmlConverter(response,pageVO.getInputPassword(),jsonString); + } + @GetMapping("/export-excel") @Operation(summary = "导出会计报表 Excel") @PreAuthorize("@ss.hasPermission('archives:accounting-report:export')") diff --git a/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/accountingreport/vo/AccountingReportBaseVO.java b/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/accountingreport/vo/AccountingReportBaseVO.java index a9d0bc6f..372b774c 100644 --- a/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/accountingreport/vo/AccountingReportBaseVO.java +++ b/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/accountingreport/vo/AccountingReportBaseVO.java @@ -54,4 +54,7 @@ public class AccountingReportBaseVO { @Schema(description = "所属部门", example = "赵六") private String deptName; + @Schema(description = "密码") + private String password; + } diff --git a/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/accountingreport/vo/AccountingReportExcelVO.java b/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/accountingreport/vo/AccountingReportExcelVO.java index 5eed0dd3..c0dd846d 100644 --- a/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/accountingreport/vo/AccountingReportExcelVO.java +++ b/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/accountingreport/vo/AccountingReportExcelVO.java @@ -62,4 +62,7 @@ public class AccountingReportExcelVO { @ExcelProperty("所属部门") private String deptName; + @ExcelProperty("密码") + private String password; + } diff --git a/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/accountingreport/vo/AccountingReportPageReqVO.java b/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/accountingreport/vo/AccountingReportPageReqVO.java index 3a8c31e8..df6fedc4 100644 --- a/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/accountingreport/vo/AccountingReportPageReqVO.java +++ b/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/accountingreport/vo/AccountingReportPageReqVO.java @@ -58,4 +58,7 @@ public class AccountingReportPageReqVO extends PageParam { @Schema(description = "所属部门", example = "赵六") private String deptName; + @Schema(description = "密码") + String inputPassword; + } diff --git a/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/dal/dataobject/accountingbook/AccountingBookDO.java b/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/dal/dataobject/accountingbook/AccountingBookDO.java index 8e9af16c..980242e4 100644 --- a/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/dal/dataobject/accountingbook/AccountingBookDO.java +++ b/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/dal/dataobject/accountingbook/AccountingBookDO.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.accounting.dal.dataobject.accountingbook; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import java.util.*; import java.time.LocalDateTime; @@ -88,4 +89,9 @@ public class AccountingBookDO extends BaseDO { */ private String deptName; + /** + * 密码 + */ + private String password; + } diff --git a/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/dal/dataobject/accountingreport/AccountingReportDO.java b/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/dal/dataobject/accountingreport/AccountingReportDO.java index 27734a8c..e1facfae 100644 --- a/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/dal/dataobject/accountingreport/AccountingReportDO.java +++ b/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/dal/dataobject/accountingreport/AccountingReportDO.java @@ -81,4 +81,10 @@ public class AccountingReportDO extends BaseDO { */ private String deptName; + /** + * 密码 + */ + private String password; + + }