|  | @@ -20,8 +20,6 @@ import (
 | 
	
		
			
				|  |  |  // @Produce  json
 | 
	
		
			
				|  |  |  // @Security ApiKeyAuth
 | 
	
		
			
				|  |  |  // @Param   id     body    string     true        "项目节ID"
 | 
	
		
			
				|  |  | -// @Param   bidsectionId     body    string     true        "标段ID"
 | 
	
		
			
				|  |  | -// @Param   treeType     body    string     true        "项目节类型(0收入1支出) 不传为0" default(0)
 | 
	
		
			
				|  |  |  // @Param   operation     body    string     true        "操作名称"  default(upDepth)
 | 
	
		
			
				|  |  |  // @Success 200 {string} string	"{code:0成功,-1参数类错误,-2服务端内部错误,msg:错误信息}"
 | 
	
		
			
				|  |  |  // @Router /api/contract/section/depth [post]
 | 
	
	
		
			
				|  | @@ -74,8 +72,6 @@ func (c *ContractApi) PostSectionDepth() {
 | 
	
		
			
				|  |  |  // @Produce  json
 | 
	
		
			
				|  |  |  // @Security ApiKeyAuth
 | 
	
		
			
				|  |  |  // @Param   id     body    string     true        "项目节ID"
 | 
	
		
			
				|  |  | -// @Param   bidsectionId     body    string     true        "标段ID"
 | 
	
		
			
				|  |  | -// @Param   treeType     body    string     true        "项目节类型(0收入1支出) 不传为0" default(0)
 | 
	
		
			
				|  |  |  // @Param   operation     body    string     true        "操作名称"  default(upSerial)
 | 
	
		
			
				|  |  |  // @Success 200 {string} string	"{code:0成功,-1参数类错误,-2服务端内部错误,msg:错误信息}"
 | 
	
		
			
				|  |  |  // @Router /api/contract/section/serial [post]
 | 
	
	
		
			
				|  | @@ -129,8 +125,6 @@ func (c *ContractApi) PostSectionSerial() {
 | 
	
		
			
				|  |  |  // @Produce  json
 | 
	
		
			
				|  |  |  // @Security ApiKeyAuth
 | 
	
		
			
				|  |  |  // @Param   id     body    string     true        "项目节ID"
 | 
	
		
			
				|  |  | -// @Param   bidsectionId     body    string     true        "标段ID"
 | 
	
		
			
				|  |  | -// @Param   treeType     body    string     true        "项目节类型(0收入1支出) 不传为0" default(0)
 | 
	
		
			
				|  |  |  // @Param   serial     body    int     true        "操作名称"
 | 
	
		
			
				|  |  |  // @Success 200 {string} string	"{code:0成功,-1参数类错误,-2服务端内部错误,msg:错误信息}"
 | 
	
		
			
				|  |  |  // @Router /api/contract/section/serial/update [post]
 | 
	
	
		
			
				|  | @@ -189,11 +183,11 @@ func (c *ContractApi) PostSectionSerialUpdate() {
 | 
	
		
			
				|  |  |  func (c *ContractApi) PostSectionTemplate() {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	// 获得模板号
 | 
	
		
			
				|  |  | -	sectionData, err := c.ServiceContract.ValidRuleTemplate(c.Ctx)
 | 
	
		
			
				|  |  | -	if err != nil {
 | 
	
		
			
				|  |  | -		c.Ctx.JSON(iris.Map{"code": -1, "msg": "解析参数出错"})
 | 
	
		
			
				|  |  | -		return
 | 
	
		
			
				|  |  | -	}
 | 
	
		
			
				|  |  | +	// sectionData, err := c.ServiceContract.ValidRuleTemplate(c.Ctx)
 | 
	
		
			
				|  |  | +	// if err != nil {
 | 
	
		
			
				|  |  | +	// 	c.Ctx.JSON(iris.Map{"code": -1, "msg": "解析参数出错"})
 | 
	
		
			
				|  |  | +	// 	return
 | 
	
		
			
				|  |  | +	// }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	// 项目ID
 | 
	
		
			
				|  |  |  	// projectIdInt, err := utils.GetProjectId(c.Ctx)
 | 
	
	
		
			
				|  | @@ -216,7 +210,7 @@ func (c *ContractApi) PostSectionTemplate() {
 | 
	
		
			
				|  |  |  	//获得合同项目节
 | 
	
		
			
				|  |  |  	// sectionTree := c.ServiceContract.GetSecionTree(bidsectionId, projectIdInt, sectionData.TreeType)
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -	err = c.ServiceContract.SetSection(sectionData.TemplateNumber)
 | 
	
		
			
				|  |  | +	err := c.ServiceContract.SetSection()
 | 
	
		
			
				|  |  |  	if err != nil {
 | 
	
		
			
				|  |  |  		c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
 | 
	
		
			
				|  |  |  		return
 | 
	
	
		
			
				|  | @@ -350,24 +344,24 @@ func (c *ContractApi) PostSectionCode() {
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	// 项目ID
 | 
	
		
			
				|  |  | -	projectIdInt, err := utils.GetProjectId(c.Ctx)
 | 
	
		
			
				|  |  | -	if err != nil {
 | 
	
		
			
				|  |  | -		c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
 | 
	
		
			
				|  |  | -		return
 | 
	
		
			
				|  |  | -	}
 | 
	
		
			
				|  |  | +	// projectIdInt, err := utils.GetProjectId(c.Ctx)
 | 
	
		
			
				|  |  | +	// if err != nil {
 | 
	
		
			
				|  |  | +	// 	c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
 | 
	
		
			
				|  |  | +	// 	return
 | 
	
		
			
				|  |  | +	// }
 | 
	
		
			
				|  |  |  	// 标段ID
 | 
	
		
			
				|  |  | -	bidsectionId, err := utils.GetDecryptId(sectionData.BidsectionId)
 | 
	
		
			
				|  |  | -	if err != nil {
 | 
	
		
			
				|  |  | -		c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
 | 
	
		
			
				|  |  | -		return
 | 
	
		
			
				|  |  | -	}
 | 
	
		
			
				|  |  | +	// bidsectionId, err := utils.GetDecryptId(sectionData.BidsectionId)
 | 
	
		
			
				|  |  | +	// if err != nil {
 | 
	
		
			
				|  |  | +	// 	c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
 | 
	
		
			
				|  |  | +	// 	return
 | 
	
		
			
				|  |  | +	// }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -	if !(sectionData.TreeType == 0 || sectionData.TreeType == 1) {
 | 
	
		
			
				|  |  | -		c.Ctx.JSON(iris.Map{"code": -1, "msg": "合同项目节类型只能是0或者1"})
 | 
	
		
			
				|  |  | -		return
 | 
	
		
			
				|  |  | -	}
 | 
	
		
			
				|  |  | +	// if !(sectionData.TreeType == 0 || sectionData.TreeType == 1) {
 | 
	
		
			
				|  |  | +	// 	c.Ctx.JSON(iris.Map{"code": -1, "msg": "合同项目节类型只能是0或者1"})
 | 
	
		
			
				|  |  | +	// 	return
 | 
	
		
			
				|  |  | +	// }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -	err = c.ServiceContract.SectionSave(sectionData, bidsectionId, projectIdInt, sectionData.TreeType)
 | 
	
		
			
				|  |  | +	err = c.ServiceContract.SectionSave(sectionData)
 | 
	
		
			
				|  |  |  	if err != nil {
 | 
	
		
			
				|  |  |  		c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
 | 
	
		
			
				|  |  |  		return
 | 
	
	
		
			
				|  | @@ -375,10 +369,10 @@ func (c *ContractApi) PostSectionCode() {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	//2.请求当前项目信息
 | 
	
		
			
				|  |  |  	// 1.验证项目节ID
 | 
	
		
			
				|  |  | -	treeId, _ := utils.GetDecryptId(sectionData.Id)
 | 
	
		
			
				|  |  | -	sectionDetail := c.ServiceContract.Get(treeId, bidsectionId, projectIdInt, sectionData.TreeType)
 | 
	
		
			
				|  |  | +	// treeId, _ := utils.GetDecryptId(sectionData.Id)
 | 
	
		
			
				|  |  | +	// sectionDetail := c.ServiceContract.Get(treeId)
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -	c.Ctx.JSON(iris.Map{"code": 0, "msg": "修改成功", "section": sectionDetail})
 | 
	
		
			
				|  |  | +	c.Ctx.JSON(iris.Map{"code": 0, "msg": "修改成功"})
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  // @Summary 删除 合同项目节
 |