| | |
| | | // @Param id path int true "id" |
| | | // @Success 200 {object} util.Response "成功" |
| | | // @Router /api-wms/v1/operation/outputOperation/{id} [put] |
| | | func (slf OperationController) InputSelfmade(c *gin.Context) { |
| | | func (slf OperationController) OutputOperation(c *gin.Context) { |
| | | id, err := strconv.Atoi(c.Param("id")) |
| | | if err != nil { |
| | | util.ResponseFormat(c, code.RequestParamError, "错误的id值") |
| | |
| | | } |
| | | |
| | | func ExportInputSelfmade(category constvar.FileTemplateCategory, operation *models.Operation) (string, error) { |
| | | template, err := models.NewFileTemplateAttachmentSearch().SetCategory(category).First() |
| | | template, err := models.NewFileTemplateAttachmentSearch().SetPreload(true).SetCategory(category).First() |
| | | if err != nil { |
| | | return "", errors.New("获取模版记录失败:" + err.Error()) |
| | | } |
| | |
| | | } |
| | | |
| | | func ExportOutputOperation(category constvar.FileTemplateCategory, operation *models.Operation) (string, error) { |
| | | template, err := models.NewFileTemplateAttachmentSearch().SetCategory(category).First() |
| | | template, err := models.NewFileTemplateAttachmentSearch().SetPreload(true).SetCategory(category).First() |
| | | if err != nil { |
| | | return "", errors.New("获取模版记录失败:" + err.Error()) |
| | | } |