diff --git a/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/invoices/InvoicesController.java b/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/invoices/InvoicesController.java index 687a9b7c..5b13573a 100644 --- a/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/invoices/InvoicesController.java +++ b/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/invoices/InvoicesController.java @@ -75,6 +75,10 @@ public class InvoicesController { @Operation(summary = "更新发票") @PreAuthorize("@ss.hasPermission('accounting:invoices:update')") public CommonResult updateInvoices(@Valid @RequestBody InvoicesUpdateReqVO updateReqVO) { + InvoicesDO invoices = invoicesService.getInvoices(updateReqVO.getId()); + if (invoices.getVoucherId() !=null){ + return error("该发票已被关联"); + } invoicesService.updateInvoices(updateReqVO); return success(true); } diff --git a/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/voucher/VoucherController.java b/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/voucher/VoucherController.java index b2b1027d..3a01ccfc 100644 --- a/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/voucher/VoucherController.java +++ b/yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/voucher/VoucherController.java @@ -14,6 +14,7 @@ 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.flow.FlowDO; import cn.iocoder.yudao.module.accounting.dal.dataobject.invoices.InvoicesDO; +import cn.iocoder.yudao.module.accounting.enums.AccountingStatusEnum; 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.flow.FlowService; @@ -97,6 +98,10 @@ public class VoucherController { @Parameter(name = "id", description = "编号", required = true) @PreAuthorize("@ss.hasPermission('accounting:voucher:delete')") public CommonResult deleteVoucher(@RequestParam("id") Long id) { + VoucherDO voucher = voucherService.getVoucher(id); + if (voucher.getFileStatus().equals(AccountingStatusEnum.LOGFILE.getValue())){ + return error("该凭证已归档,请勿删除!"); + } voucherService.deleteVoucher(id); return success(true); } diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/service/coderule/CodeRuleServiceImpl.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/service/coderule/CodeRuleServiceImpl.java index 0af4df44..df189b5f 100644 --- a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/service/coderule/CodeRuleServiceImpl.java +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/service/coderule/CodeRuleServiceImpl.java @@ -116,6 +116,9 @@ public class CodeRuleServiceImpl implements CodeRuleService { int year = calendar.get(Calendar.YEAR); //保管期限 String timeLimit = authenticateDO.getTimeLimit(); + if (timeLimit.equals("永久保存")){ + timeLimit="30"; + } int year2 = year + Integer.valueOf(timeLimit); //只有延长保存的 synchronized (this) { diff --git a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/depotcabinet/vo/DepotCabinetCreateReqVO.java b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/depotcabinet/vo/DepotCabinetCreateReqVO.java index b039c1d5..8a83dce8 100644 --- a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/depotcabinet/vo/DepotCabinetCreateReqVO.java +++ b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/depotcabinet/vo/DepotCabinetCreateReqVO.java @@ -14,7 +14,7 @@ public class DepotCabinetCreateReqVO extends DepotCabinetBaseVO { @NotNull(message = "所属库房不能为空") private Long depotId; - @NotNull(message = "档案柜名称不能为空") + @NotNull(message = "档案柜类型不能为空") private String name; }