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