| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.enums.ProcessCategoryEnum; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.DictUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | |
| | | } |
| | | dto.setChangeRent(dto.getMonthRent()); |
| | | dto.setChangeTime(null); |
| | | //查询房产信息,获取所属营业部 |
| | | THouse house = houseService.getById(dto.getHouseId()); |
| | | if (Objects.isNull(house)) { |
| | | throw new ServiceException("房产信息不存在"); |
| | | } |
| | | dto.setBusinessDeptId(house.getBusinessDeptId()); |
| | | contractService.save(dto); |
| | | if (dto.getStatus().equals("2")){ |
| | | //发起合同新增审批 |
| | |
| | | @PreAuthorize("@ss.hasPermi('contract:list:edit')") |
| | | public R<Boolean> updateContract(@Validated @RequestBody TContractDTO dto) { |
| | | dto.setChangeTime(null); |
| | | //查询房产信息,获取所属营业部 |
| | | THouse house = houseService.getById(dto.getHouseId()); |
| | | if (Objects.isNull(house)) { |
| | | throw new ServiceException("房产信息不存在"); |
| | | } |
| | | dto.setBusinessDeptId(house.getBusinessDeptId()); |
| | | contractService.updateById(dto); |
| | | contractRentTypeService.remove(new LambdaQueryWrapper<TContractRentType>() |
| | | .eq(TContractRentType::getContractId,dto.getId())); |