From b93a0b2565a82984b4843fa31c2c764fcdd43aef Mon Sep 17 00:00:00 2001
From: yupeng <roc__yu@163.com>
Date: 星期四, 27 二月 2025 11:45:48 +0800
Subject: [PATCH] feat: 完善后台批量发送邮件接口
---
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TContractController.java | 23 +++++++++++------------
1 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TContractController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TContractController.java
index c0e4618..bb120fb 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TContractController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TContractController.java
@@ -190,16 +190,7 @@
public R<Boolean> addContract(@Validated @RequestBody TContractDTO dto) {
dto.setChangeRent(dto.getMonthRent());
contractService.save(dto);
- if (dto.getIsIncreasing()){
- TContractRentType tContractRentType = new TContractRentType();
- tContractRentType.setContractId(dto.getId());
- tContractRentType.setIncreasingDecreasing(dto.getIncreasingDecreasing());
- tContractRentType.setIncreasingDecreasingType(dto.getIncreasingDecreasingType());
- tContractRentType.setNumericalValue(dto.getNumericalValue());
- tContractRentType.setChangeTime(dto.getChangeTime());
- tContractRentType.setCycleTime(dto.getCycleTime());
- contractRentTypeService.save(tContractRentType);
-
+ if (dto.getStatus().equals("2")){
//发起合同新增审批
ProcessStartBO processStartBO = new ProcessStartBO();
processStartBO.setCategory(ProcessCategoryEnum.CATEGORY1.getValue().toString());
@@ -215,13 +206,22 @@
//开启工作流程
stateProcessTemplateService.start(processStartBO);
}
+ if (dto.getIsIncreasing()){
+ TContractRentType tContractRentType = new TContractRentType();
+ tContractRentType.setContractId(dto.getId());
+ tContractRentType.setIncreasingDecreasing(dto.getIncreasingDecreasing());
+ tContractRentType.setIncreasingDecreasingType(dto.getIncreasingDecreasingType());
+ tContractRentType.setNumericalValue(dto.getNumericalValue());
+ tContractRentType.setChangeTime(dto.getChangeTime());
+ tContractRentType.setCycleTime(dto.getCycleTime());
+ contractRentTypeService.save(tContractRentType);
+ }
return R.ok();
}
@Log(title = "合同管理-编辑合同", businessType = BusinessType.UPDATE)
@ApiOperation(value = "编辑合同")
@PostMapping(value = "/updateContract")
@PreAuthorize("@ss.hasPermi('system:contract:update')")
-
public R<Boolean> updateContract(@Validated @RequestBody TContractDTO dto) {
contractService.updateById(dto);
contractRentTypeService.remove(new LambdaQueryWrapper<TContractRentType>()
@@ -253,7 +253,6 @@
@ApiOperation(value = "查询合同信息信息")
@GetMapping(value = "/getContractById")
@PreAuthorize("@ss.hasPermi('system:contract:detail')")
-
public R<TContractVO> getContractById(@RequestParam String id) {
TContractVO res = new TContractVO();
TContract contract = contractService.getById(id);
--
Gitblit v1.7.1