元数据下载(会计账簿,会计报表)

new
parent 2ce89c9653
commit 8b0f4cd615

@ -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<AccountingBookDO> pageResult = accountingBookService.getAccountingBookPage(pageVO);
PageResult<AccountingBookRespVO> 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')")

@ -50,4 +50,7 @@ public class AccountingBookBaseVO {
@Schema(description = "所属部门", example = "张三")
private String deptName;
@Schema(description = "密码区")
private String password;
}

@ -59,4 +59,7 @@ public class AccountingBookExcelVO {
@ExcelProperty("所属部门")
private String deptName;
@Schema(description = "密码区")
private String password;
}

@ -61,4 +61,7 @@ public class AccountingBookPageReqVO extends PageParam {
@Schema(description = "所属部门", example = "张三")
private String deptName;
@Schema(description = "密码")
String inputPassword;
}

@ -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<AccountingReportDO> pageResult = accountingReportService.getAccountingReportPage(pageVO);
PageResult<AccountingReportRespVO> 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')")

@ -54,4 +54,7 @@ public class AccountingReportBaseVO {
@Schema(description = "所属部门", example = "赵六")
private String deptName;
@Schema(description = "密码")
private String password;
}

@ -62,4 +62,7 @@ public class AccountingReportExcelVO {
@ExcelProperty("所属部门")
private String deptName;
@ExcelProperty("密码")
private String password;
}

@ -58,4 +58,7 @@ public class AccountingReportPageReqVO extends PageParam {
@Schema(description = "所属部门", example = "赵六")
private String deptName;
@Schema(description = "密码")
String inputPassword;
}

@ -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;
}

@ -81,4 +81,10 @@ public class AccountingReportDO extends BaseDO {
*/
private String deptName;
/**
*
*/
private String password;
}

Loading…
Cancel
Save