|  | @@ -41,12 +41,14 @@ public class TenantContractRecordServiceImpl extends ServiceImpl<TenantContractR
 | 
	
		
			
				|  |  |      @Override
 | 
	
		
			
				|  |  |      @Transactional(rollbackFor = Exception.class)
 | 
	
		
			
				|  |  |      public int insertContractRecord(Integer tenantId, String contractPath, TenantContractRecordEnum en) {
 | 
	
		
			
				|  |  | -        //一个机构只能创建一个开通协议
 | 
	
		
			
				|  |  | -        TenantContractRecord open = this.getOne(new QueryWrapper<>(new TenantContractRecord())
 | 
	
		
			
				|  |  | -                .eq("tenant_id_", tenantId)
 | 
	
		
			
				|  |  | -                .eq("type_", TenantContractRecordEnum.OPEN.getType()));
 | 
	
		
			
				|  |  | -        if (Objects.nonNull(open)) {
 | 
	
		
			
				|  |  | -            return 1;
 | 
	
		
			
				|  |  | +        if(en.equals(TenantContractRecordEnum.OPEN)){
 | 
	
		
			
				|  |  | +            //一个机构只能创建一个开通协议
 | 
	
		
			
				|  |  | +            TenantContractRecord open = this.getOne(new QueryWrapper<>(new TenantContractRecord())
 | 
	
		
			
				|  |  | +                    .eq("tenant_id_", tenantId)
 | 
	
		
			
				|  |  | +                    .eq("type_", TenantContractRecordEnum.OPEN.getType()));
 | 
	
		
			
				|  |  | +            if (Objects.nonNull(open)) {
 | 
	
		
			
				|  |  | +                return 1;
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          Date now = new Date();
 |