Merge remote-tracking branch 'origin/main'

new
zk 1 year ago
commit 8fdba8ad61

@ -75,6 +75,10 @@ public class InvoicesController {
@Operation(summary = "更新发票") @Operation(summary = "更新发票")
@PreAuthorize("@ss.hasPermission('accounting:invoices:update')") @PreAuthorize("@ss.hasPermission('accounting:invoices:update')")
public CommonResult<Boolean> updateInvoices(@Valid @RequestBody InvoicesUpdateReqVO updateReqVO) { public CommonResult<Boolean> updateInvoices(@Valid @RequestBody InvoicesUpdateReqVO updateReqVO) {
InvoicesDO invoices = invoicesService.getInvoices(updateReqVO.getId());
if (invoices.getVoucherId() !=null){
return error("该发票已被关联");
}
invoicesService.updateInvoices(updateReqVO); invoicesService.updateInvoices(updateReqVO);
return success(true); return success(true);
} }

@ -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.bankslip.BankSlipDO;
import cn.iocoder.yudao.module.accounting.dal.dataobject.flow.FlowDO; 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.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.attachment.AttachmentService;
import cn.iocoder.yudao.module.accounting.service.bankslip.BankSlipService; import cn.iocoder.yudao.module.accounting.service.bankslip.BankSlipService;
import cn.iocoder.yudao.module.accounting.service.flow.FlowService; import cn.iocoder.yudao.module.accounting.service.flow.FlowService;
@ -97,6 +98,10 @@ public class VoucherController {
@Parameter(name = "id", description = "编号", required = true) @Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('accounting:voucher:delete')") @PreAuthorize("@ss.hasPermission('accounting:voucher:delete')")
public CommonResult<Boolean> deleteVoucher(@RequestParam("id") Long id) { public CommonResult<Boolean> deleteVoucher(@RequestParam("id") Long id) {
VoucherDO voucher = voucherService.getVoucher(id);
if (voucher.getFileStatus().equals(AccountingStatusEnum.LOGFILE.getValue())){
return error("该凭证已归档,请勿删除!");
}
voucherService.deleteVoucher(id); voucherService.deleteVoucher(id);
return success(true); return success(true);
} }

@ -116,6 +116,9 @@ public class CodeRuleServiceImpl implements CodeRuleService {
int year = calendar.get(Calendar.YEAR); int year = calendar.get(Calendar.YEAR);
//保管期限 //保管期限
String timeLimit = authenticateDO.getTimeLimit(); String timeLimit = authenticateDO.getTimeLimit();
if (timeLimit.equals("永久保存")){
timeLimit="30";
}
int year2 = year + Integer.valueOf(timeLimit); int year2 = year + Integer.valueOf(timeLimit);
//只有延长保存的 //只有延长保存的
synchronized (this) { synchronized (this) {

@ -14,7 +14,7 @@ public class DepotCabinetCreateReqVO extends DepotCabinetBaseVO {
@NotNull(message = "所属库房不能为空") @NotNull(message = "所属库房不能为空")
private Long depotId; private Long depotId;
@NotNull(message = "档案柜名称不能为空") @NotNull(message = "档案柜类型不能为空")
private String name; private String name;
} }

Loading…
Cancel
Save