| | |
| | | } |
| | | util.ResponseFormat(c, code.Success, register) |
| | | } |
| | | |
| | | // DeleteYieldRegister |
| | | // |
| | | // @Tags 生产管理/产量登记表 |
| | | // @Summary 删除产量登记表记录 |
| | | // @Produce application/json |
| | | // @Param number path string true "number" |
| | | // @Success 200 {object} util.Response "成功" |
| | | // @Router /api-jl/v1/system/deleteYieldRegister/{number} [delete] |
| | | func (slf YieldRegisterController) DeleteYieldRegister(c *gin.Context) { |
| | | number := c.Param("number") |
| | | if number == "" { |
| | | util.ResponseFormat(c, code.RequestParamError, "无效的编码") |
| | | return |
| | | } |
| | | err := models.NewYieldRegisterSearch().SetNumber(number).Delete() |
| | | if err != nil { |
| | | util.ResponseFormat(c, code.RequestParamError, "删除失败") |
| | | return |
| | | } |
| | | util.ResponseFormat(c, code.Success, "删除成功") |
| | | } |