|
|
|
@ -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')")
|
|
|
|
|