会计凭证xml

new
JiilingLee 1 year ago
parent 74425edd15
commit 326fd1c488

@ -3,8 +3,13 @@ package cn.iocoder.yudao.module.accounting.controller.admin.voucher;
import cn.iocoder.yudao.module.accounting.controller.admin.attachment.vo.AttachmentCreateReqVO; import cn.iocoder.yudao.module.accounting.controller.admin.attachment.vo.AttachmentCreateReqVO;
import cn.iocoder.yudao.module.accounting.controller.admin.attachment.vo.AttachmentExportReqVO; import cn.iocoder.yudao.module.accounting.controller.admin.attachment.vo.AttachmentExportReqVO;
import cn.iocoder.yudao.module.accounting.controller.admin.bankslip.vo.BankSlipExportReqVO; import cn.iocoder.yudao.module.accounting.controller.admin.bankslip.vo.BankSlipExportReqVO;
import cn.iocoder.yudao.module.accounting.controller.admin.bankslip.vo.BankSlipPageReqVO;
import cn.iocoder.yudao.module.accounting.controller.admin.bankslip.vo.BankSlipRespVO;
import cn.iocoder.yudao.module.accounting.controller.admin.flow.vo.FlowExportReqVO; import cn.iocoder.yudao.module.accounting.controller.admin.flow.vo.FlowExportReqVO;
import cn.iocoder.yudao.module.accounting.controller.admin.invoices.vo.InvoicesExportReqVO; import cn.iocoder.yudao.module.accounting.controller.admin.invoices.vo.InvoicesExportReqVO;
import cn.iocoder.yudao.module.accounting.controller.admin.invoices.vo.InvoicesRespVO;
import cn.iocoder.yudao.module.accounting.convert.bankslip.BankSlipConvert;
import cn.iocoder.yudao.module.accounting.convert.invoices.InvoicesConvert;
import cn.iocoder.yudao.module.accounting.dal.dataobject.attachment.AttachmentDO; import cn.iocoder.yudao.module.accounting.dal.dataobject.attachment.AttachmentDO;
import cn.iocoder.yudao.module.accounting.dal.dataobject.bankslip.BankSlipDO; import cn.iocoder.yudao.module.accounting.dal.dataobject.bankslip.BankSlipDO;
import cn.iocoder.yudao.module.accounting.dal.dataobject.flow.FlowDO; import cn.iocoder.yudao.module.accounting.dal.dataobject.flow.FlowDO;
@ -13,6 +18,8 @@ import cn.iocoder.yudao.module.accounting.service.attachment.AttachmentService;
import cn.iocoder.yudao.module.accounting.service.bankslip.BankSlipService; import cn.iocoder.yudao.module.accounting.service.bankslip.BankSlipService;
import cn.iocoder.yudao.module.accounting.service.flow.FlowService; import cn.iocoder.yudao.module.accounting.service.flow.FlowService;
import cn.iocoder.yudao.module.accounting.service.invoices.InvoicesService; import cn.iocoder.yudao.module.accounting.service.invoices.InvoicesService;
import cn.iocoder.yudao.module.setting.service.passwords.PasswordsService;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
@ -60,6 +67,9 @@ public class VoucherController {
@Resource @Resource
private FlowService flowService; private FlowService flowService;
@Resource
private PasswordsService passwordsService;
@PostMapping("/create") @PostMapping("/create")
@Operation(summary = "创建会计凭证") @Operation(summary = "创建会计凭证")
@ -109,6 +119,16 @@ public class VoucherController {
return success(VoucherConvert.INSTANCE.convertList(list)); return success(VoucherConvert.INSTANCE.convertList(list));
} }
@GetMapping("/downloadXml")
@Operation(summary = "获得会计凭证分页Xml")
@PreAuthorize("@ss.hasPermission('accounting:voucher:query')")
public void downloadXml(@Valid VoucherPageReqVO pageVO, HttpServletResponse response) throws IOException {
PageResult<VoucherDO> pageResult = voucherService.getVoucherPage(pageVO);
PageResult<VoucherRespVO> voucherRespVOPageResult = VoucherConvert.INSTANCE.convertPage(pageResult);
String jsonString = JSONObject.toJSONString(voucherRespVOPageResult);
passwordsService.jsonToXmlConverter(response,pageVO.getInputPassword(),jsonString);
}
@GetMapping("/page") @GetMapping("/page")
@Operation(summary = "获得会计凭证分页") @Operation(summary = "获得会计凭证分页")
@PreAuthorize("@ss.hasPermission('accounting:voucher:query')") @PreAuthorize("@ss.hasPermission('accounting:voucher:query')")

@ -108,4 +108,7 @@ public class VoucherPageReqVO extends PageParam {
@Schema(description = "档案柜ID", example = "1586") @Schema(description = "档案柜ID", example = "1586")
private Long cabinetId; private Long cabinetId;
@Schema(description = "密码", example = "1586")
private String inputPassword;
} }

Loading…
Cancel
Save