归档会计凭证同时改变完整性

new
JiilingLee 1 year ago
parent 2b3506f455
commit 1c8fb4e740

@ -148,49 +148,58 @@ public class VoucherController {
List<VoucherDO> list = pageResult.getList(); List<VoucherDO> list = pageResult.getList();
for (VoucherDO voucherDO:list for (VoucherDO voucherDO:list
) { ) {
String remark=" "; //如果未归档才检查完整性
if(!voucherDO.getFileStatus().equals(AccountingStatusEnum.LOGFILE.getValue())) {
String remark = " ";
Long id = voucherDO.getId(); Long id = voucherDO.getId();
AttachmentExportReqVO attachmentExportReqVO = new AttachmentExportReqVO(); AttachmentExportReqVO attachmentExportReqVO = new AttachmentExportReqVO();
attachmentExportReqVO.setVoucherId(id); attachmentExportReqVO.setVoucherId(id);
List<AttachmentDO> attachmentList = attachmentService.getAttachmentList(attachmentExportReqVO); List<AttachmentDO> attachmentList = attachmentService.getAttachmentList(attachmentExportReqVO);
if (attachmentList.size()<1){ if (attachmentList.size() < 1) {
remark=remark+"缺少附件"; remark = remark + "缺少附件";
}else { } else {
i++; i++;
} }
FlowExportReqVO flowExportReqVO = new FlowExportReqVO(); FlowExportReqVO flowExportReqVO = new FlowExportReqVO();
flowExportReqVO.setVoucherId(id); flowExportReqVO.setVoucherId(id);
List<FlowDO> flowList = flowService.getFlowList(flowExportReqVO); List<FlowDO> flowList = flowService.getFlowList(flowExportReqVO);
if (flowList.size()<1){ if (flowList.size() < 1) {
remark=remark+";缺少审批流程"; remark = remark + ";缺少审批流程";
}else { } else {
i++; i++;
} }
InvoicesExportReqVO invoicesExportReqVO = new InvoicesExportReqVO().setVoucherId(id); InvoicesExportReqVO invoicesExportReqVO = new InvoicesExportReqVO().setVoucherId(id);
List<InvoicesDO> invoicesList = invoicesService.getInvoicesList(invoicesExportReqVO); List<InvoicesDO> invoicesList = invoicesService.getInvoicesList(invoicesExportReqVO);
if (invoicesList.size()<1){ if (invoicesList.size() < 1) {
remark=remark+";缺少电子发票"; remark = remark + ";缺少电子发票";
}else { } else {
i++; i++;
} }
BankSlipExportReqVO bankSlipExportReqVO = new BankSlipExportReqVO(); BankSlipExportReqVO bankSlipExportReqVO = new BankSlipExportReqVO();
bankSlipExportReqVO.setVoucherId(id); bankSlipExportReqVO.setVoucherId(id);
List<BankSlipDO> bankSlipList = bankSlipService.getBankSlipList(bankSlipExportReqVO); List<BankSlipDO> bankSlipList = bankSlipService.getBankSlipList(bankSlipExportReqVO);
if (bankSlipList.size()<1){ if (bankSlipList.size() < 1) {
remark=remark+";缺少银行回单"; remark = remark + ";缺少银行回单";
}else { } else {
i++; i++;
} }
if(i!=4){ if (i != 4) {
voucherDO.setCherks(0); voucherDO.setCherks(Integer.valueOf(AccountingStatusEnum.INCOMPLETE.getValue()));
}else { } else {
voucherDO.setCherks(1); voucherDO.setCherks(Integer.valueOf(AccountingStatusEnum.COMPLETE.getValue()));
} }
VoucherUpdateReqVO voucherUpdateReqVO = new VoucherUpdateReqVO(); VoucherUpdateReqVO voucherUpdateReqVO = new VoucherUpdateReqVO();
voucherUpdateReqVO.setId(id); voucherUpdateReqVO.setId(id);
voucherUpdateReqVO.setCherks(voucherDO.getCherks()); voucherUpdateReqVO.setCherks(voucherDO.getCherks());
voucherUpdateReqVO.setRemark(remark); voucherUpdateReqVO.setRemark(remark);
voucherService.updateVoucher(voucherUpdateReqVO); voucherService.updateVoucher(voucherUpdateReqVO);
}else {
VoucherUpdateReqVO voucherUpdateReqVO = new VoucherUpdateReqVO();
voucherUpdateReqVO.setId(voucherDO.getId());
voucherUpdateReqVO.setCherks(Integer.valueOf(AccountingStatusEnum.COMPLETE.getValue()));
voucherUpdateReqVO.setRemark("");
voucherService.updateVoucher(voucherUpdateReqVO);
}
} }

@ -223,7 +223,8 @@ public class RecordServiceImpl implements RecordService {
VoucherDO voucherDO = new VoucherDO(); VoucherDO voucherDO = new VoucherDO();
voucherDO.setId(id); voucherDO.setId(id);
voucherDO.setRecordId(recordId); voucherDO.setRecordId(recordId);
voucherDO.setFileStatus(AccountingStatusEnum.LOGFILE.getValue()); voucherDO.setFileStatus(AccountingStatusEnum.COMPLETE.getValue());
voucherDO.setCherks(Integer.valueOf(AccountingStatusEnum.LOGFILE.getValue()));
voucherMapper.updateById(voucherDO); voucherMapper.updateById(voucherDO);
} }
} }

Loading…
Cancel
Save