|
@@ -224,6 +224,7 @@ func (c *ContractApi) PostIncomeCreate() {
|
|
|
c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
c.Ctx.JSON(iris.Map{"code": 0, "msg": "新增成功"})
|
|
|
}
|
|
|
|
|
@@ -233,6 +234,7 @@ func (c *ContractApi) PostIncomeCreate() {
|
|
|
// @Accept json
|
|
|
// @Produce json
|
|
|
// @Security ApiKeyAuth
|
|
|
+// @Param id path string true "合同ID"
|
|
|
// @Param treeId path string true "项目节ID"
|
|
|
// @Param bidsectionId path string true "标段ID"
|
|
|
// @Param content path string true "合同内容"
|
|
@@ -278,7 +280,16 @@ func (c *ContractApi) PostIncomeUpdate() {
|
|
|
c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
|
|
|
return
|
|
|
}
|
|
|
- c.Ctx.JSON(iris.Map{"code": 0, "msg": "编辑成功"})
|
|
|
+
|
|
|
+ //2.请求当前项目信息
|
|
|
+ // 1.验证项目节ID
|
|
|
+ sectionDetail := c.ServiceContract.Get(treeId, bidsectionId, projectIdInt)
|
|
|
+
|
|
|
+ c.Ctx.JSON(iris.Map{
|
|
|
+ "code": 0,
|
|
|
+ "msg": "编辑成功",
|
|
|
+ "section": sectionDetail,
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
// @Summary 删除合同
|
|
@@ -330,7 +341,12 @@ func (c *ContractApi) Delete() {
|
|
|
c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
|
|
|
return
|
|
|
}
|
|
|
- c.Ctx.JSON(iris.Map{"code": 0, "msg": "删除成功"})
|
|
|
+
|
|
|
+ //2.请求当前项目信息
|
|
|
+ // 1.验证项目节ID
|
|
|
+ sectionDetail := c.ServiceContract.Get(treeId, bidsectionId, projectIdInt)
|
|
|
+
|
|
|
+ c.Ctx.JSON(iris.Map{"code": 0, "msg": "删除成功", "section": sectionDetail})
|
|
|
}
|
|
|
|
|
|
// @Summary 关闭合同
|
|
@@ -382,7 +398,9 @@ func (c *ContractApi) PostClose() {
|
|
|
c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
|
|
|
return
|
|
|
}
|
|
|
- c.Ctx.JSON(iris.Map{"code": 0, "msg": "关闭成功"})
|
|
|
+ // 1.项目节信息
|
|
|
+ sectionDetail := c.ServiceContract.Get(treeId, bidsectionId, projectIdInt)
|
|
|
+ c.Ctx.JSON(iris.Map{"code": 0, "msg": "关闭成功", "section": sectionDetail})
|
|
|
}
|
|
|
|
|
|
// @Summary 解锁合同
|
|
@@ -434,5 +452,7 @@ func (c *ContractApi) PostUnlock() {
|
|
|
c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
|
|
|
return
|
|
|
}
|
|
|
- c.Ctx.JSON(iris.Map{"code": 0, "msg": "解锁成功"})
|
|
|
+ // 1.项目节信息
|
|
|
+ sectionDetail := c.ServiceContract.Get(treeId, bidsectionId, projectIdInt)
|
|
|
+ c.Ctx.JSON(iris.Map{"code": 0, "msg": "解锁成功", "section": sectionDetail})
|
|
|
}
|