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

new
JiilingLee 1 year ago
parent 2b3506f455
commit 1c8fb4e740

@ -148,6 +148,8 @@ public class VoucherController {
List<VoucherDO> list = pageResult.getList(); List<VoucherDO> list = pageResult.getList();
for (VoucherDO voucherDO:list for (VoucherDO voucherDO:list
) { ) {
//如果未归档才检查完整性
if(!voucherDO.getFileStatus().equals(AccountingStatusEnum.LOGFILE.getValue())) {
String remark = " "; String remark = " ";
Long id = voucherDO.getId(); Long id = voucherDO.getId();
AttachmentExportReqVO attachmentExportReqVO = new AttachmentExportReqVO(); AttachmentExportReqVO attachmentExportReqVO = new AttachmentExportReqVO();
@ -182,15 +184,22 @@ public class VoucherController {
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