|  | @@ -27,6 +27,7 @@ type ContractService interface {
 | 
	
		
			
				|  |  |  	ValidRuleSectionDelete(ctx iris.Context) (*viewmodels.TreeSectionContract, error)
 | 
	
		
			
				|  |  |  	ValidRuleSectionNot(ctx iris.Context) (*viewmodels.TreeSectionContract, error)
 | 
	
		
			
				|  |  |  	ValidRuleGet(ctx iris.Context) (*viewmodels.TreeSectionContract, error)
 | 
	
		
			
				|  |  | +	ValidRuleUpdateFile(ctx iris.Context) (*viewmodels.TreeSectionContract, error)
 | 
	
		
			
				|  |  |  	ValidRuleSerial(ctx iris.Context) (*viewmodels.TreeSectionContract, error)
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	// 项目节
 | 
	
	
		
			
				|  | @@ -39,6 +40,7 @@ type ContractService interface {
 | 
	
		
			
				|  |  |  	SectionDelete(treeId int) error
 | 
	
		
			
				|  |  |  	MoveDepth(sectionData *viewmodels.TreeSectionContract) error
 | 
	
		
			
				|  |  |  	MoveSerial(sectionData *viewmodels.TreeSectionContract) error
 | 
	
		
			
				|  |  | +	UpdateContractId(id int, contractId int) error
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	SaveUpload(Location string, Filename string, id int, ext string) error
 | 
	
		
			
				|  |  |  }
 | 
	
	
		
			
				|  | @@ -187,6 +189,23 @@ func (s *contractService) ValidRuleSerial(ctx iris.Context) (*viewmodels.TreeSec
 | 
	
		
			
				|  |  |  	return treeSectionVaild, nil
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +// 验证更新附件相关
 | 
	
		
			
				|  |  | +func (s *contractService) ValidRuleUpdateFile(ctx iris.Context) (*viewmodels.TreeSectionContract, error) {
 | 
	
		
			
				|  |  | +	treeSectionVaild := &viewmodels.TreeSectionContract{}
 | 
	
		
			
				|  |  | +	err := ctx.ReadJSON(treeSectionVaild)
 | 
	
		
			
				|  |  | +	if err != nil {
 | 
	
		
			
				|  |  | +		log.Println("folder-ValidRule-ReadForm转换异常, error=", err)
 | 
	
		
			
				|  |  | +		return treeSectionVaild, err
 | 
	
		
			
				|  |  | +	}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	err = treeSectionVaild.ValidateFile()
 | 
	
		
			
				|  |  | +	if err != nil {
 | 
	
		
			
				|  |  | +		log.Println("参数验证错误, error=", err)
 | 
	
		
			
				|  |  | +		return treeSectionVaild, err
 | 
	
		
			
				|  |  | +	}
 | 
	
		
			
				|  |  | +	return treeSectionVaild, nil
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  // 新增合同参数验证
 | 
	
		
			
				|  |  |  func (s *contractService) ValidRuleContractAdd(ctx iris.Context) (*viewmodels.Contracts, error) {
 | 
	
		
			
				|  |  |  	// 创建一个存放前端传过来参数
 |