yupeng
2025-02-27 b93a0b2565a82984b4843fa31c2c764fcdd43aef
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());
@@ -214,6 +205,16 @@
            processStartBO.setVariable(variable);
            //开启工作流程
            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();
    }
@@ -252,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);