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