| | |
| | | BeanUtils.copyProperties(ticketRegistrationDto, ticketRegistration); |
| | | ticketRegistration.setPurchaseContractNumber(purchaseLedger.getPurchaseContractNumber()); |
| | | ticketRegistration.setTenantId(purchaseLedger.getTenantId()); |
| | | ticketRegistration.setIssueDate(ticketRegistrationDto.getIssueDate()); |
| | | ticketRegistration.setIssueDate(ticketRegistrationDto.getEntryDate()); |
| | | ticketRegistration.setContractAmount(purchaseLedger.getContractAmount()); |
| | | ticketRegistration.setSalesLedgerId(purchaseLedger.getSalesLedgerId()); |
| | | ticketRegistration.setEnterDate(ticketRegistrationDto.getEnterDate()); |
| | |
| | | Path formalFilePath = formalDirPath.resolve(formalFilename); |
| | | |
| | | try { |
| | | // 执行文件迁移(使用原子操作确保安全性) |
| | | // Files.move( |
| | | // Paths.get(tempFile.getTempPath()), |
| | | // formalFilePath, |
| | | // StandardCopyOption.REPLACE_EXISTING, |
| | | // StandardCopyOption.ATOMIC_MOVE |
| | | // ); |
| | | |
| | | // 原子移动失败,使用复制+删除 |
| | | Files.copy(Paths.get(tempFile.getTempPath()), formalFilePath, StandardCopyOption.REPLACE_EXISTING); |
| | | Files.deleteIfExists(Paths.get(tempFile.getTempPath())); |