修改方法,去除庄口获取庄口列表方法;添加产品来源字典类型;添加字典模糊搜索
| | |
| | | TransferType // 调拨类型 |
| | | TakeStockType // 盘点类型 |
| | | DisuseType // 报废类型 |
| | | ProductSource // 产品来源 |
| | | ) |
| | | |
| | | const ( |
| | |
| | | import ( |
| | | "context" |
| | | "errors" |
| | | "fmt" |
| | | "github.com/gin-gonic/gin" |
| | | "gorm.io/gorm" |
| | | "strconv" |
| | | "wms/constvar" |
| | | "wms/extend/code" |
| | | "wms/extend/util" |
| | | "wms/models" |
| | |
| | | return |
| | | } |
| | | |
| | | autoCode, _ := getAutoCode(params.Type) |
| | | record := models.MiniDict{ |
| | | Type: params.Type, |
| | | Code: autoCode, |
| | | Name: params.Name, |
| | | Value: params.Value, |
| | | IsDefault: params.IsDefault, |
| | |
| | | |
| | | record := models.MiniDict{ |
| | | Type: params.Type, |
| | | Code: params.Code, |
| | | Name: params.Name, |
| | | Value: params.Value, |
| | | IsDefault: params.IsDefault, |
| | |
| | | return |
| | | } |
| | | |
| | | //if !params.Type.Valid() { |
| | | // util.ResponseFormat(c, code.RequestParamError, "字典类型错误") |
| | | // return |
| | | //} |
| | | dictSearch := models.NewMiniDictSearch() |
| | | if params.Type.Valid() { |
| | | dictSearch.SetType(params.Type) |
| | | } |
| | | |
| | | list, total, err := dictSearch.Find() |
| | | list, total, err := models.NewMiniDictSearch().SetKeyword(params.Keyword).SetType(params.Type).Find() |
| | | if err != nil { |
| | | util.ResponseFormat(c, code.RequestParamError, "查找失败") |
| | | return |
| | | } |
| | | |
| | | util.ResponseFormatList(c, code.Success, list, int(total)) |
| | | } |
| | | |
| | | // GetSilkDictList |
| | | // |
| | | // @Tags 数据字典 |
| | | // @Summary 获取庄口列表 |
| | | // @Produce application/json |
| | | // @Param Authorization header string true "token" |
| | | // @Param type path string true "字典类型" |
| | | // @Success 200 {object} util.ResponseList{data=[]models.SilkDict} "成功" |
| | | // @Router /api-wms/v1/dict/getSilkDictList/{type} [get] |
| | | func (slf DictController) GetSilkDictList(c *gin.Context) { |
| | | |
| | | dictType, err := strconv.Atoi(c.Param("type")) |
| | | if err != nil { |
| | | util.ResponseFormat(c, code.RequestParamError, "请传入正确的字典类型") |
| | | return |
| | | } |
| | | |
| | | list, err := models.NewSilkDictSearch().SetDictType(models.SilkDictType(dictType)).FindAll() |
| | | if err != nil { |
| | | util.ResponseFormat(c, code.RequestParamError, "查找失败") |
| | | return |
| | | } |
| | | util.ResponseFormat(c, code.Success, list) |
| | | } |
| | | |
| | | // GetUserList |
| | |
| | | } |
| | | util.ResponseFormat(c, code.Success, list.List) |
| | | } |
| | | |
| | | // GetAutoCode 获取字典自动编码 |
| | | func getAutoCode(dictType constvar.MiniDictType) (string, error) { |
| | | |
| | | var prefix string |
| | | switch constvar.MiniDictType(dictType) { |
| | | case constvar.StorageType: |
| | | prefix = "IN0" |
| | | case constvar.StockoutType: |
| | | prefix = "OUT" |
| | | case constvar.TransferType: |
| | | prefix = "TF0" |
| | | case constvar.TakeStockType: |
| | | prefix = "TS0" |
| | | case constvar.DisuseType: |
| | | prefix = "DIS" |
| | | case constvar.ProductSource: |
| | | prefix = "PS0" |
| | | default: |
| | | return "", errors.New("编码规则不存在") |
| | | } |
| | | id, err := models.NewMiniDictSearch().SetType(constvar.MiniDictType(dictType)).MaxAutoIncr() |
| | | if err != nil { |
| | | return "", errors.New("获取最大值失败") |
| | | } |
| | | |
| | | strMaxAutoIncr := strconv.Itoa(id + 1) |
| | | count := 5 - len(strMaxAutoIncr) |
| | | for i := 0; i < count; i++ { |
| | | strMaxAutoIncr = "0" + strMaxAutoIncr |
| | | } |
| | | |
| | | return fmt.Sprintf("%v%v", prefix, strMaxAutoIncr), nil |
| | | } |
| | |
| | | } |
| | | } |
| | | }, |
| | | "/api-wms/v1/dict/getUserList": { |
| | | "get": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "数据字典" |
| | | ], |
| | | "summary": "获取用户列表", |
| | | "parameters": [ |
| | | { |
| | | "type": "string", |
| | | "name": "id", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "string", |
| | | "name": "nickName", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "string", |
| | | "name": "parentId", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "string", |
| | | "name": "pos", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "string", |
| | | "name": "userName", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "integer", |
| | | "name": "userType", |
| | | "in": "query" |
| | | } |
| | | ], |
| | | "responses": { |
| | | "200": { |
| | | "description": "成功", |
| | | "schema": { |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/util.ResponseList" |
| | | }, |
| | | { |
| | | "type": "object", |
| | | "properties": { |
| | | "data": { |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/user.GetUserRequest" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/api-wms/v1/dict/save": { |
| | | "post": { |
| | | "produces": [ |
| | |
| | | "summary": "添加库存盘点信息", |
| | | "parameters": [ |
| | | { |
| | | "type": "string", |
| | | "description": "token", |
| | | "name": "Authorization", |
| | | "in": "header", |
| | | "required": true |
| | | }, |
| | | { |
| | | "description": "入库/出库信息", |
| | | "name": "object", |
| | | "in": "body", |
| | |
| | | ], |
| | | "summary": "应用、验证", |
| | | "parameters": [ |
| | | { |
| | | "type": "string", |
| | | "description": "token", |
| | | "name": "Authorization", |
| | | "in": "header", |
| | | "required": true |
| | | }, |
| | | { |
| | | "description": "入参", |
| | | "name": "object", |
| | |
| | | "summary": "修改库存盘点信息", |
| | | "parameters": [ |
| | | { |
| | | "type": "string", |
| | | "description": "token", |
| | | "name": "Authorization", |
| | | "in": "header", |
| | | "required": true |
| | | }, |
| | | { |
| | | "description": "入库/出库信息", |
| | | "name": "object", |
| | | "in": "body", |
| | |
| | | ], |
| | | "summary": "更改记录状态", |
| | | "parameters": [ |
| | | { |
| | | "type": "string", |
| | | "description": "token", |
| | | "name": "Authorization", |
| | | "in": "header", |
| | | "required": true |
| | | }, |
| | | { |
| | | "type": "integer", |
| | | "description": "id", |
| | |
| | | "summary": "入库/出库列表", |
| | | "parameters": [ |
| | | { |
| | | "type": "string", |
| | | "description": "token", |
| | | "name": "Authorization", |
| | | "in": "header", |
| | | "required": true |
| | | }, |
| | | { |
| | | "description": "查询参数", |
| | | "name": "object", |
| | | "in": "body", |
| | |
| | | "summary": "添加入库/出库", |
| | | "parameters": [ |
| | | { |
| | | "type": "string", |
| | | "description": "token", |
| | | "name": "Authorization", |
| | | "in": "header", |
| | | "required": true |
| | | }, |
| | | { |
| | | "description": "入库/出库信息", |
| | | "name": "object", |
| | | "in": "body", |
| | |
| | | ], |
| | | "summary": "删除入库/出库信息", |
| | | "parameters": [ |
| | | { |
| | | "type": "string", |
| | | "description": "token", |
| | | "name": "Authorization", |
| | | "in": "header", |
| | | "required": true |
| | | }, |
| | | { |
| | | "type": "integer", |
| | | "description": "id", |
| | |
| | | 2, |
| | | 3, |
| | | 4, |
| | | 5 |
| | | 5, |
| | | 6 |
| | | ], |
| | | "x-enum-comments": { |
| | | "DisuseType": "报废类型", |
| | | "ProductSource": "产品来源", |
| | | "StockoutType": "出库类型", |
| | | "StorageType": "入库类型", |
| | | "TakeStockType": "盘点类型", |
| | |
| | | "StockoutType", |
| | | "TransferType", |
| | | "TakeStockType", |
| | | "DisuseType" |
| | | "DisuseType", |
| | | "ProductSource" |
| | | ] |
| | | }, |
| | | "constvar.OperationSource": { |
| | |
| | | "type": "string" |
| | | }, |
| | | "warehouseId": { |
| | | "description": "仓库id", |
| | | "type": "integer" |
| | | } |
| | | } |
| | |
| | | "type": "object", |
| | | "properties": { |
| | | "accountant": { |
| | | "description": "会计名称", |
| | | "type": "string" |
| | | }, |
| | | "accountantId": { |
| | | "description": "会计id", |
| | | "type": "string" |
| | | }, |
| | | "auditDate": { |
| | | "description": "审批时间", |
| | | "type": "string" |
| | | }, |
| | | "baseOperationType": { |
| | |
| | | ] |
| | | }, |
| | | "checkedBy": { |
| | | "description": "验证者UserId", |
| | | "type": "string" |
| | | }, |
| | | "comment": { |
| | | "description": "备注", |
| | | "type": "string" |
| | | }, |
| | | "companyID": { |
| | | "description": "公司ID-客户", |
| | | "type": "string" |
| | | }, |
| | | "companyName": { |
| | | "description": "公司名称-客户", |
| | | "type": "string" |
| | | }, |
| | | "contacterID": { |
| | | "description": "联系人ID", |
| | | "type": "integer" |
| | | }, |
| | | "contacterName": { |
| | | "description": "联系人姓名", |
| | | "type": "string" |
| | | }, |
| | | "createBy": { |
| | | "description": "创建者UserId", |
| | | "type": "string" |
| | | }, |
| | | "createTime": { |
| | | "type": "string" |
| | | }, |
| | | "custodian": { |
| | | "description": "保管员名称", |
| | | "type": "string" |
| | | }, |
| | | "custodianId": { |
| | | "description": "保管员id", |
| | | "type": "string" |
| | | }, |
| | | "dealerType": { |
| | | "description": "调拨出入库类型", |
| | | "type": "string" |
| | | }, |
| | | "details": { |
| | | "description": "操作明细", |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/models.OperationDetails" |
| | |
| | | "type": "integer" |
| | | }, |
| | | "logisticCompany": { |
| | | "$ref": "#/definitions/models.LogisticCompany" |
| | | "description": "物流公司信息", |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/models.LogisticCompany" |
| | | } |
| | | ] |
| | | }, |
| | | "logisticCompanyId": { |
| | | "description": "物流公司id", |
| | | "type": "string" |
| | | }, |
| | | "logisticWeight": { |
| | |
| | | "type": "number" |
| | | }, |
| | | "manager": { |
| | | "description": "主管名称", |
| | | "type": "string" |
| | | }, |
| | | "managerId": { |
| | | "description": "主管id", |
| | | "type": "string" |
| | | }, |
| | | "number": { |
| | |
| | | "type": "string" |
| | | }, |
| | | "operationDate": { |
| | | "description": "安排日期", |
| | | "type": "string" |
| | | }, |
| | | "operationSource": { |
| | |
| | | "type": "string" |
| | | }, |
| | | "receiverAddr": { |
| | | "description": "收货地址", |
| | | "type": "string" |
| | | }, |
| | | "receiverName": { |
| | | "description": "收货人姓名", |
| | | "type": "string" |
| | | }, |
| | | "receiverPhone": { |
| | | "description": "联系电话", |
| | | "type": "string" |
| | | }, |
| | | "remark": { |
| | | "description": "备注", |
| | | "type": "string" |
| | | }, |
| | | "salesDetailsNumber": { |
| | | "description": "销售明细编码", |
| | | "type": "string" |
| | | }, |
| | | "silkMarket": { |
| | | "description": "嘉联仓储添加 SilkMarket", |
| | | "type": "string" |
| | | }, |
| | | "source": { |
| | | "description": "来源系统", |
| | | "type": "string" |
| | | }, |
| | | "sourceNumber": { |
| | |
| | | "type": "string" |
| | | }, |
| | | "warehouse": { |
| | | "$ref": "#/definitions/models.Warehouse" |
| | | "description": "仓库信息", |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/models.Warehouse" |
| | | } |
| | | ] |
| | | }, |
| | | "warehouseId": { |
| | | "description": "仓库id", |
| | | "type": "integer" |
| | | }, |
| | | "waybillNumber": { |
| | |
| | | "type": "number" |
| | | }, |
| | | "auxiliaryAmount": { |
| | | "description": "辅助数量", |
| | | "type": "number" |
| | | }, |
| | | "auxiliaryUnit": { |
| | | "description": "辅助单位", |
| | | "type": "string" |
| | | }, |
| | | "baseOperationType": { |
| | |
| | | "type": "boolean" |
| | | }, |
| | | "operationId": { |
| | | "description": "操作id", |
| | | "description": "操作记录id", |
| | | "type": "integer" |
| | | }, |
| | | "product": { |
| | |
| | | "type": "string" |
| | | }, |
| | | "remark": { |
| | | "description": "备注", |
| | | "type": "string" |
| | | }, |
| | | "salePrice": { |
| | | "description": "销售单价", |
| | | "type": "number" |
| | | }, |
| | | "silkMarket": { |
| | | "description": "嘉联仓储添加 SilkMarket、SilkMarketClose", |
| | | "type": "string" |
| | | }, |
| | | "silkMarketClose": { |
| | | "description": "庄口关闭", |
| | | "type": "string" |
| | | }, |
| | | "stockAmount": { |
| | | "description": "库存数量,盘点时用", |
| | |
| | | "type": "integer" |
| | | }, |
| | | "totalGrossWeight": { |
| | | "description": "总毛重", |
| | | "type": "number" |
| | | }, |
| | | "totalNetWeight": { |
| | | "description": "总净重", |
| | | "type": "number" |
| | | }, |
| | | "updateTime": { |
| | |
| | | "request.AddMiniDict": { |
| | | "type": "object", |
| | | "properties": { |
| | | "code": { |
| | | "description": "编码", |
| | | "type": "string" |
| | | }, |
| | | "isDefault": { |
| | | "description": "是否默认", |
| | | "type": "boolean" |
| | |
| | | "type": "object", |
| | | "properties": { |
| | | "accountant": { |
| | | "description": "会计名称", |
| | | "type": "string" |
| | | }, |
| | | "accountantId": { |
| | | "description": "会计id", |
| | | "type": "string" |
| | | }, |
| | | "baseOperationType": { |
| | | "description": "基础作业类型 5库存盘点", |
| | | "description": "基础作业类型 1 入库 2 出库 3 内部调拨 4 报废 5 库存盘点", |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/constvar.BaseOperationType" |
| | |
| | | "type": "string" |
| | | }, |
| | | "custodian": { |
| | | "description": "保管员名称", |
| | | "type": "string" |
| | | }, |
| | | "custodianId": { |
| | | "description": "保管员id", |
| | | "type": "string" |
| | | }, |
| | | "dealerType": { |
| | | "description": "调拨出入库类型", |
| | | "type": "string" |
| | | }, |
| | | "details": { |
| | | "description": "详情", |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/request.OperationDetails" |
| | |
| | | "type": "integer" |
| | | }, |
| | | "logisticCompanyId": { |
| | | "description": "物流公司id", |
| | | "type": "string" |
| | | }, |
| | | "logisticWeight": { |
| | |
| | | "type": "number" |
| | | }, |
| | | "manager": { |
| | | "description": "主管名称", |
| | | "type": "string" |
| | | }, |
| | | "managerId": { |
| | | "description": "主管id", |
| | | "type": "string" |
| | | }, |
| | | "number": { |
| | |
| | | "type": "string" |
| | | }, |
| | | "operationDate": { |
| | | "description": "FromLocationId int ` + "`" + `json:\"fromLocationId\" gorm:\"type:int;not null;comment:源位置id\"` + "`" + ` //源位置id\nToLocationId int ` + "`" + `json:\"toLocationId\" gorm:\"type:int;not null;comment:目标位置id\"` + "`" + ` //目标位置id", |
| | | "description": "FromLocationId int ` + "`" + `json:\"fromLocationId\" ` + "`" + ` //源位置id\nToLocationId int ` + "`" + `json:\"toLocationId\" ` + "`" + ` //目标位置id", |
| | | "type": "string" |
| | | }, |
| | | "operationTypeId": { |
| | |
| | | "type": "string" |
| | | }, |
| | | "receiverAddr": { |
| | | "description": "收货地址", |
| | | "type": "string" |
| | | }, |
| | | "receiverName": { |
| | | "description": "收货人姓名", |
| | | "type": "string" |
| | | }, |
| | | "receiverPhone": { |
| | | "description": "联系电话", |
| | | "type": "string" |
| | | }, |
| | | "silkMarket": { |
| | | "description": "庄口编码", |
| | | "type": "string" |
| | | }, |
| | | "sourceNumber": { |
| | |
| | | "request.EditMiniDict": { |
| | | "type": "object", |
| | | "properties": { |
| | | "code": { |
| | | "description": "编码", |
| | | "type": "string" |
| | | }, |
| | | "id": { |
| | | "description": "字典类型", |
| | | "type": "integer" |
| | |
| | | }, |
| | | "warehouseCode": { |
| | | "type": "string" |
| | | }, |
| | | "warehouseId": { |
| | | "description": "仓库ID", |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | |
| | | "request.GetMiniDictList": { |
| | | "type": "object", |
| | | "properties": { |
| | | "keyword": { |
| | | "description": "关键字查询", |
| | | "type": "string" |
| | | }, |
| | | "type": { |
| | | "description": "字典类型", |
| | | "allOf": [ |
| | |
| | | "request.MiniDict": { |
| | | "type": "object", |
| | | "properties": { |
| | | "code": { |
| | | "description": "编码", |
| | | "type": "string" |
| | | }, |
| | | "isDefault": { |
| | | "description": "是否默认", |
| | | "type": "boolean" |
| | |
| | | "type": "object", |
| | | "properties": { |
| | | "number": { |
| | | "description": "单号", |
| | | "type": "string" |
| | | }, |
| | | "page": { |
| | |
| | | "type": "integer" |
| | | }, |
| | | "sourceNumber": { |
| | | "description": "源单号", |
| | | "type": "string" |
| | | } |
| | | } |
| | |
| | | "type": "object", |
| | | "properties": { |
| | | "condition": { |
| | | "description": "模糊查询条件", |
| | | "type": "string" |
| | | }, |
| | | "keyword": { |
| | |
| | | "type": "integer" |
| | | }, |
| | | "amount": { |
| | | "description": "ProductName string ` + "`" + `json:\"productName\" gorm:\"type:varchar(255);not null;comment:产品名称\"` + "`" + ` //产品名称", |
| | | "description": "ProductName string ` + "`" + `json:\"productName\" ` + "`" + ` //产品名称", |
| | | "type": "number" |
| | | }, |
| | | "auxiliaryAmount": { |
| | |
| | | "type": "number" |
| | | }, |
| | | "fromLocationId": { |
| | | "description": "Unit string ` + "`" + `json:\"unit\" gorm:\"type:varchar(31);comment:单位\"` + "`" + ` //单位\nProduct models.Material ` + "`" + `json:\"product\" gorm:\"foreignKey:ProductId;references:ID\"` + "`" + `", |
| | | "description": "Unit string ` + "`" + `json:\"unit\"` + "`" + ` //单位\nProduct models.Material ` + "`" + `json:\"product\" ` + "`" + ` // 产品", |
| | | "type": "integer" |
| | | }, |
| | | "productId": { |
| | |
| | | "type": "string" |
| | | }, |
| | | "remark": { |
| | | "description": "备注", |
| | | "type": "string" |
| | | }, |
| | | "salePrice": { |
| | | "description": "销售单价", |
| | | "type": "number" |
| | | }, |
| | | "silkMarket": { |
| | | "description": "庄口编码", |
| | | "type": "string" |
| | | }, |
| | | "silkMarketClose": { |
| | | "description": "庄口关闭", |
| | | "type": "string" |
| | | }, |
| | | "stockAmount": { |
| | | "description": "库存数量,盘点时用", |
| | |
| | | "type": "object", |
| | | "properties": { |
| | | "baseOperationType": { |
| | | "description": "1 入库 2 出库 3 内部调拨 4 报废 5 库存盘点", |
| | | "description": "基础作业类型 1 入库 2 出库 3 内部调拨 4 报废 5 库存盘点", |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/constvar.BaseOperationType" |
| | |
| | | ] |
| | | }, |
| | | "number": { |
| | | "description": "单号", |
| | | "type": "string" |
| | | }, |
| | | "operationTypeId": { |
| | | "description": "作业类型id", |
| | | "type": "integer" |
| | | }, |
| | | "page": { |
| | |
| | | "type": "integer" |
| | | }, |
| | | "status": { |
| | | "$ref": "#/definitions/constvar.OperationStatus" |
| | | "description": "状态", |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/constvar.OperationStatus" |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | |
| | | "type": "object", |
| | | "properties": { |
| | | "accountant": { |
| | | "description": "会计名称", |
| | | "type": "string" |
| | | }, |
| | | "accountantId": { |
| | | "description": "会计id", |
| | | "type": "string" |
| | | }, |
| | | "baseOperationType": { |
| | |
| | | "type": "string" |
| | | }, |
| | | "custodian": { |
| | | "description": "保管员名称", |
| | | "type": "string" |
| | | }, |
| | | "custodianId": { |
| | | "description": "保管员id", |
| | | "type": "string" |
| | | }, |
| | | "details": { |
| | | "description": "详情", |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/request.OperationDetails" |
| | |
| | | "type": "integer" |
| | | }, |
| | | "inventoryDealerType": { |
| | | "description": "调拨出入库分类(对应dict字典表的ID)", |
| | | "type": "integer" |
| | | }, |
| | | "locationId": { |
| | |
| | | "type": "number" |
| | | }, |
| | | "manager": { |
| | | "description": "主管名称", |
| | | "type": "string" |
| | | }, |
| | | "managerId": { |
| | | "description": "主管id", |
| | | "type": "string" |
| | | }, |
| | | "number": { |
| | |
| | | "type": "string" |
| | | }, |
| | | "operationDate": { |
| | | "description": "FromLocationId int ` + "`" + `json:\"fromLocationId\" gorm:\"type:int;not null;comment:源位置id\"` + "`" + ` //源位置id\nToLocationId int ` + "`" + `json:\"toLocationId\" gorm:\"type:int;not null;comment:目标位置id\"` + "`" + ` //目标位置id", |
| | | "description": "FromLocationId int ` + "`" + `json:\"fromLocationId\" ` + "`" + ` //源位置id\nToLocationId int ` + "`" + `json:\"toLocationId\" ` + "`" + ` //目标位置id", |
| | | "type": "string" |
| | | }, |
| | | "operationTypeId": { |
| | |
| | | "type": "string" |
| | | }, |
| | | "receiverAddr": { |
| | | "description": "收货地址", |
| | | "type": "string" |
| | | }, |
| | | "receiverName": { |
| | | "description": "收货人姓名", |
| | | "type": "string" |
| | | }, |
| | | "receiverPhone": { |
| | | "description": "联系电话", |
| | | "type": "string" |
| | | }, |
| | | "silkMarket": { |
| | | "description": "庄口编码", |
| | | "type": "string" |
| | | }, |
| | | "sourceNumber": { |
| | |
| | | "description": "产品id", |
| | | "type": "string" |
| | | }, |
| | | "productCategory": { |
| | | "description": "产品类别", |
| | | "type": "string" |
| | | }, |
| | | "productName": { |
| | | "description": "产品名称", |
| | | "type": "string" |
| | | }, |
| | | "productSpecs": { |
| | | "description": "产品规格", |
| | | "type": "string" |
| | | }, |
| | | "productType": { |
| | |
| | | } |
| | | } |
| | | }, |
| | | "user.GetUserRequest": { |
| | | "type": "object", |
| | | "properties": { |
| | | "id": { |
| | | "type": "string" |
| | | }, |
| | | "nickName": { |
| | | "type": "string" |
| | | }, |
| | | "parentId": { |
| | | "type": "string" |
| | | }, |
| | | "pos": { |
| | | "type": "string" |
| | | }, |
| | | "userName": { |
| | | "type": "string" |
| | | }, |
| | | "userType": { |
| | | "type": "integer" |
| | | } |
| | | } |
| | | }, |
| | | "util.Response": { |
| | | "type": "object", |
| | | "properties": { |
| | |
| | | } |
| | | } |
| | | }, |
| | | "/api-wms/v1/dict/getUserList": { |
| | | "get": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "数据字典" |
| | | ], |
| | | "summary": "获取用户列表", |
| | | "parameters": [ |
| | | { |
| | | "type": "string", |
| | | "name": "id", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "string", |
| | | "name": "nickName", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "string", |
| | | "name": "parentId", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "string", |
| | | "name": "pos", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "string", |
| | | "name": "userName", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "integer", |
| | | "name": "userType", |
| | | "in": "query" |
| | | } |
| | | ], |
| | | "responses": { |
| | | "200": { |
| | | "description": "成功", |
| | | "schema": { |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/util.ResponseList" |
| | | }, |
| | | { |
| | | "type": "object", |
| | | "properties": { |
| | | "data": { |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/user.GetUserRequest" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/api-wms/v1/dict/save": { |
| | | "post": { |
| | | "produces": [ |
| | |
| | | "summary": "添加库存盘点信息", |
| | | "parameters": [ |
| | | { |
| | | "type": "string", |
| | | "description": "token", |
| | | "name": "Authorization", |
| | | "in": "header", |
| | | "required": true |
| | | }, |
| | | { |
| | | "description": "入库/出库信息", |
| | | "name": "object", |
| | | "in": "body", |
| | |
| | | ], |
| | | "summary": "应用、验证", |
| | | "parameters": [ |
| | | { |
| | | "type": "string", |
| | | "description": "token", |
| | | "name": "Authorization", |
| | | "in": "header", |
| | | "required": true |
| | | }, |
| | | { |
| | | "description": "入参", |
| | | "name": "object", |
| | |
| | | "summary": "修改库存盘点信息", |
| | | "parameters": [ |
| | | { |
| | | "type": "string", |
| | | "description": "token", |
| | | "name": "Authorization", |
| | | "in": "header", |
| | | "required": true |
| | | }, |
| | | { |
| | | "description": "入库/出库信息", |
| | | "name": "object", |
| | | "in": "body", |
| | |
| | | ], |
| | | "summary": "更改记录状态", |
| | | "parameters": [ |
| | | { |
| | | "type": "string", |
| | | "description": "token", |
| | | "name": "Authorization", |
| | | "in": "header", |
| | | "required": true |
| | | }, |
| | | { |
| | | "type": "integer", |
| | | "description": "id", |
| | |
| | | "summary": "入库/出库列表", |
| | | "parameters": [ |
| | | { |
| | | "type": "string", |
| | | "description": "token", |
| | | "name": "Authorization", |
| | | "in": "header", |
| | | "required": true |
| | | }, |
| | | { |
| | | "description": "查询参数", |
| | | "name": "object", |
| | | "in": "body", |
| | |
| | | "summary": "添加入库/出库", |
| | | "parameters": [ |
| | | { |
| | | "type": "string", |
| | | "description": "token", |
| | | "name": "Authorization", |
| | | "in": "header", |
| | | "required": true |
| | | }, |
| | | { |
| | | "description": "入库/出库信息", |
| | | "name": "object", |
| | | "in": "body", |
| | |
| | | ], |
| | | "summary": "删除入库/出库信息", |
| | | "parameters": [ |
| | | { |
| | | "type": "string", |
| | | "description": "token", |
| | | "name": "Authorization", |
| | | "in": "header", |
| | | "required": true |
| | | }, |
| | | { |
| | | "type": "integer", |
| | | "description": "id", |
| | |
| | | 2, |
| | | 3, |
| | | 4, |
| | | 5 |
| | | 5, |
| | | 6 |
| | | ], |
| | | "x-enum-comments": { |
| | | "DisuseType": "报废类型", |
| | | "ProductSource": "产品来源", |
| | | "StockoutType": "出库类型", |
| | | "StorageType": "入库类型", |
| | | "TakeStockType": "盘点类型", |
| | |
| | | "StockoutType", |
| | | "TransferType", |
| | | "TakeStockType", |
| | | "DisuseType" |
| | | "DisuseType", |
| | | "ProductSource" |
| | | ] |
| | | }, |
| | | "constvar.OperationSource": { |
| | |
| | | "type": "string" |
| | | }, |
| | | "warehouseId": { |
| | | "description": "仓库id", |
| | | "type": "integer" |
| | | } |
| | | } |
| | |
| | | "type": "object", |
| | | "properties": { |
| | | "accountant": { |
| | | "description": "会计名称", |
| | | "type": "string" |
| | | }, |
| | | "accountantId": { |
| | | "description": "会计id", |
| | | "type": "string" |
| | | }, |
| | | "auditDate": { |
| | | "description": "审批时间", |
| | | "type": "string" |
| | | }, |
| | | "baseOperationType": { |
| | |
| | | ] |
| | | }, |
| | | "checkedBy": { |
| | | "description": "验证者UserId", |
| | | "type": "string" |
| | | }, |
| | | "comment": { |
| | | "description": "备注", |
| | | "type": "string" |
| | | }, |
| | | "companyID": { |
| | | "description": "公司ID-客户", |
| | | "type": "string" |
| | | }, |
| | | "companyName": { |
| | | "description": "公司名称-客户", |
| | | "type": "string" |
| | | }, |
| | | "contacterID": { |
| | | "description": "联系人ID", |
| | | "type": "integer" |
| | | }, |
| | | "contacterName": { |
| | | "description": "联系人姓名", |
| | | "type": "string" |
| | | }, |
| | | "createBy": { |
| | | "description": "创建者UserId", |
| | | "type": "string" |
| | | }, |
| | | "createTime": { |
| | | "type": "string" |
| | | }, |
| | | "custodian": { |
| | | "description": "保管员名称", |
| | | "type": "string" |
| | | }, |
| | | "custodianId": { |
| | | "description": "保管员id", |
| | | "type": "string" |
| | | }, |
| | | "dealerType": { |
| | | "description": "调拨出入库类型", |
| | | "type": "string" |
| | | }, |
| | | "details": { |
| | | "description": "操作明细", |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/models.OperationDetails" |
| | |
| | | "type": "integer" |
| | | }, |
| | | "logisticCompany": { |
| | | "$ref": "#/definitions/models.LogisticCompany" |
| | | "description": "物流公司信息", |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/models.LogisticCompany" |
| | | } |
| | | ] |
| | | }, |
| | | "logisticCompanyId": { |
| | | "description": "物流公司id", |
| | | "type": "string" |
| | | }, |
| | | "logisticWeight": { |
| | |
| | | "type": "number" |
| | | }, |
| | | "manager": { |
| | | "description": "主管名称", |
| | | "type": "string" |
| | | }, |
| | | "managerId": { |
| | | "description": "主管id", |
| | | "type": "string" |
| | | }, |
| | | "number": { |
| | |
| | | "type": "string" |
| | | }, |
| | | "operationDate": { |
| | | "description": "安排日期", |
| | | "type": "string" |
| | | }, |
| | | "operationSource": { |
| | |
| | | "type": "string" |
| | | }, |
| | | "receiverAddr": { |
| | | "description": "收货地址", |
| | | "type": "string" |
| | | }, |
| | | "receiverName": { |
| | | "description": "收货人姓名", |
| | | "type": "string" |
| | | }, |
| | | "receiverPhone": { |
| | | "description": "联系电话", |
| | | "type": "string" |
| | | }, |
| | | "remark": { |
| | | "description": "备注", |
| | | "type": "string" |
| | | }, |
| | | "salesDetailsNumber": { |
| | | "description": "销售明细编码", |
| | | "type": "string" |
| | | }, |
| | | "silkMarket": { |
| | | "description": "嘉联仓储添加 SilkMarket", |
| | | "type": "string" |
| | | }, |
| | | "source": { |
| | | "description": "来源系统", |
| | | "type": "string" |
| | | }, |
| | | "sourceNumber": { |
| | |
| | | "type": "string" |
| | | }, |
| | | "warehouse": { |
| | | "$ref": "#/definitions/models.Warehouse" |
| | | "description": "仓库信息", |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/models.Warehouse" |
| | | } |
| | | ] |
| | | }, |
| | | "warehouseId": { |
| | | "description": "仓库id", |
| | | "type": "integer" |
| | | }, |
| | | "waybillNumber": { |
| | |
| | | "type": "number" |
| | | }, |
| | | "auxiliaryAmount": { |
| | | "description": "辅助数量", |
| | | "type": "number" |
| | | }, |
| | | "auxiliaryUnit": { |
| | | "description": "辅助单位", |
| | | "type": "string" |
| | | }, |
| | | "baseOperationType": { |
| | |
| | | "type": "boolean" |
| | | }, |
| | | "operationId": { |
| | | "description": "操作id", |
| | | "description": "操作记录id", |
| | | "type": "integer" |
| | | }, |
| | | "product": { |
| | |
| | | "type": "string" |
| | | }, |
| | | "remark": { |
| | | "description": "备注", |
| | | "type": "string" |
| | | }, |
| | | "salePrice": { |
| | | "description": "销售单价", |
| | | "type": "number" |
| | | }, |
| | | "silkMarket": { |
| | | "description": "嘉联仓储添加 SilkMarket、SilkMarketClose", |
| | | "type": "string" |
| | | }, |
| | | "silkMarketClose": { |
| | | "description": "庄口关闭", |
| | | "type": "string" |
| | | }, |
| | | "stockAmount": { |
| | | "description": "库存数量,盘点时用", |
| | |
| | | "type": "integer" |
| | | }, |
| | | "totalGrossWeight": { |
| | | "description": "总毛重", |
| | | "type": "number" |
| | | }, |
| | | "totalNetWeight": { |
| | | "description": "总净重", |
| | | "type": "number" |
| | | }, |
| | | "updateTime": { |
| | |
| | | "request.AddMiniDict": { |
| | | "type": "object", |
| | | "properties": { |
| | | "code": { |
| | | "description": "编码", |
| | | "type": "string" |
| | | }, |
| | | "isDefault": { |
| | | "description": "是否默认", |
| | | "type": "boolean" |
| | |
| | | "type": "object", |
| | | "properties": { |
| | | "accountant": { |
| | | "description": "会计名称", |
| | | "type": "string" |
| | | }, |
| | | "accountantId": { |
| | | "description": "会计id", |
| | | "type": "string" |
| | | }, |
| | | "baseOperationType": { |
| | | "description": "基础作业类型 5库存盘点", |
| | | "description": "基础作业类型 1 入库 2 出库 3 内部调拨 4 报废 5 库存盘点", |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/constvar.BaseOperationType" |
| | |
| | | "type": "string" |
| | | }, |
| | | "custodian": { |
| | | "description": "保管员名称", |
| | | "type": "string" |
| | | }, |
| | | "custodianId": { |
| | | "description": "保管员id", |
| | | "type": "string" |
| | | }, |
| | | "dealerType": { |
| | | "description": "调拨出入库类型", |
| | | "type": "string" |
| | | }, |
| | | "details": { |
| | | "description": "详情", |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/request.OperationDetails" |
| | |
| | | "type": "integer" |
| | | }, |
| | | "logisticCompanyId": { |
| | | "description": "物流公司id", |
| | | "type": "string" |
| | | }, |
| | | "logisticWeight": { |
| | |
| | | "type": "number" |
| | | }, |
| | | "manager": { |
| | | "description": "主管名称", |
| | | "type": "string" |
| | | }, |
| | | "managerId": { |
| | | "description": "主管id", |
| | | "type": "string" |
| | | }, |
| | | "number": { |
| | |
| | | "type": "string" |
| | | }, |
| | | "operationDate": { |
| | | "description": "FromLocationId int `json:\"fromLocationId\" gorm:\"type:int;not null;comment:源位置id\"` //源位置id\nToLocationId int `json:\"toLocationId\" gorm:\"type:int;not null;comment:目标位置id\"` //目标位置id", |
| | | "description": "FromLocationId int `json:\"fromLocationId\" ` //源位置id\nToLocationId int `json:\"toLocationId\" ` //目标位置id", |
| | | "type": "string" |
| | | }, |
| | | "operationTypeId": { |
| | |
| | | "type": "string" |
| | | }, |
| | | "receiverAddr": { |
| | | "description": "收货地址", |
| | | "type": "string" |
| | | }, |
| | | "receiverName": { |
| | | "description": "收货人姓名", |
| | | "type": "string" |
| | | }, |
| | | "receiverPhone": { |
| | | "description": "联系电话", |
| | | "type": "string" |
| | | }, |
| | | "silkMarket": { |
| | | "description": "庄口编码", |
| | | "type": "string" |
| | | }, |
| | | "sourceNumber": { |
| | |
| | | "request.EditMiniDict": { |
| | | "type": "object", |
| | | "properties": { |
| | | "code": { |
| | | "description": "编码", |
| | | "type": "string" |
| | | }, |
| | | "id": { |
| | | "description": "字典类型", |
| | | "type": "integer" |
| | |
| | | }, |
| | | "warehouseCode": { |
| | | "type": "string" |
| | | }, |
| | | "warehouseId": { |
| | | "description": "仓库ID", |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | |
| | | "request.GetMiniDictList": { |
| | | "type": "object", |
| | | "properties": { |
| | | "keyword": { |
| | | "description": "关键字查询", |
| | | "type": "string" |
| | | }, |
| | | "type": { |
| | | "description": "字典类型", |
| | | "allOf": [ |
| | |
| | | "request.MiniDict": { |
| | | "type": "object", |
| | | "properties": { |
| | | "code": { |
| | | "description": "编码", |
| | | "type": "string" |
| | | }, |
| | | "isDefault": { |
| | | "description": "是否默认", |
| | | "type": "boolean" |
| | |
| | | "type": "object", |
| | | "properties": { |
| | | "number": { |
| | | "description": "单号", |
| | | "type": "string" |
| | | }, |
| | | "page": { |
| | |
| | | "type": "integer" |
| | | }, |
| | | "sourceNumber": { |
| | | "description": "源单号", |
| | | "type": "string" |
| | | } |
| | | } |
| | |
| | | "type": "object", |
| | | "properties": { |
| | | "condition": { |
| | | "description": "模糊查询条件", |
| | | "type": "string" |
| | | }, |
| | | "keyword": { |
| | |
| | | "type": "integer" |
| | | }, |
| | | "amount": { |
| | | "description": "ProductName string `json:\"productName\" gorm:\"type:varchar(255);not null;comment:产品名称\"` //产品名称", |
| | | "description": "ProductName string `json:\"productName\" ` //产品名称", |
| | | "type": "number" |
| | | }, |
| | | "auxiliaryAmount": { |
| | |
| | | "type": "number" |
| | | }, |
| | | "fromLocationId": { |
| | | "description": "Unit string `json:\"unit\" gorm:\"type:varchar(31);comment:单位\"` //单位\nProduct models.Material `json:\"product\" gorm:\"foreignKey:ProductId;references:ID\"`", |
| | | "description": "Unit string `json:\"unit\"` //单位\nProduct models.Material `json:\"product\" ` // 产品", |
| | | "type": "integer" |
| | | }, |
| | | "productId": { |
| | |
| | | "type": "string" |
| | | }, |
| | | "remark": { |
| | | "description": "备注", |
| | | "type": "string" |
| | | }, |
| | | "salePrice": { |
| | | "description": "销售单价", |
| | | "type": "number" |
| | | }, |
| | | "silkMarket": { |
| | | "description": "庄口编码", |
| | | "type": "string" |
| | | }, |
| | | "silkMarketClose": { |
| | | "description": "庄口关闭", |
| | | "type": "string" |
| | | }, |
| | | "stockAmount": { |
| | | "description": "库存数量,盘点时用", |
| | |
| | | "type": "object", |
| | | "properties": { |
| | | "baseOperationType": { |
| | | "description": "1 入库 2 出库 3 内部调拨 4 报废 5 库存盘点", |
| | | "description": "基础作业类型 1 入库 2 出库 3 内部调拨 4 报废 5 库存盘点", |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/constvar.BaseOperationType" |
| | |
| | | ] |
| | | }, |
| | | "number": { |
| | | "description": "单号", |
| | | "type": "string" |
| | | }, |
| | | "operationTypeId": { |
| | | "description": "作业类型id", |
| | | "type": "integer" |
| | | }, |
| | | "page": { |
| | |
| | | "type": "integer" |
| | | }, |
| | | "status": { |
| | | "$ref": "#/definitions/constvar.OperationStatus" |
| | | "description": "状态", |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/constvar.OperationStatus" |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | |
| | | "type": "object", |
| | | "properties": { |
| | | "accountant": { |
| | | "description": "会计名称", |
| | | "type": "string" |
| | | }, |
| | | "accountantId": { |
| | | "description": "会计id", |
| | | "type": "string" |
| | | }, |
| | | "baseOperationType": { |
| | |
| | | "type": "string" |
| | | }, |
| | | "custodian": { |
| | | "description": "保管员名称", |
| | | "type": "string" |
| | | }, |
| | | "custodianId": { |
| | | "description": "保管员id", |
| | | "type": "string" |
| | | }, |
| | | "details": { |
| | | "description": "详情", |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/request.OperationDetails" |
| | |
| | | "type": "integer" |
| | | }, |
| | | "inventoryDealerType": { |
| | | "description": "调拨出入库分类(对应dict字典表的ID)", |
| | | "type": "integer" |
| | | }, |
| | | "locationId": { |
| | |
| | | "type": "number" |
| | | }, |
| | | "manager": { |
| | | "description": "主管名称", |
| | | "type": "string" |
| | | }, |
| | | "managerId": { |
| | | "description": "主管id", |
| | | "type": "string" |
| | | }, |
| | | "number": { |
| | |
| | | "type": "string" |
| | | }, |
| | | "operationDate": { |
| | | "description": "FromLocationId int `json:\"fromLocationId\" gorm:\"type:int;not null;comment:源位置id\"` //源位置id\nToLocationId int `json:\"toLocationId\" gorm:\"type:int;not null;comment:目标位置id\"` //目标位置id", |
| | | "description": "FromLocationId int `json:\"fromLocationId\" ` //源位置id\nToLocationId int `json:\"toLocationId\" ` //目标位置id", |
| | | "type": "string" |
| | | }, |
| | | "operationTypeId": { |
| | |
| | | "type": "string" |
| | | }, |
| | | "receiverAddr": { |
| | | "description": "收货地址", |
| | | "type": "string" |
| | | }, |
| | | "receiverName": { |
| | | "description": "收货人姓名", |
| | | "type": "string" |
| | | }, |
| | | "receiverPhone": { |
| | | "description": "联系电话", |
| | | "type": "string" |
| | | }, |
| | | "silkMarket": { |
| | | "description": "庄口编码", |
| | | "type": "string" |
| | | }, |
| | | "sourceNumber": { |
| | |
| | | "description": "产品id", |
| | | "type": "string" |
| | | }, |
| | | "productCategory": { |
| | | "description": "产品类别", |
| | | "type": "string" |
| | | }, |
| | | "productName": { |
| | | "description": "产品名称", |
| | | "type": "string" |
| | | }, |
| | | "productSpecs": { |
| | | "description": "产品规格", |
| | | "type": "string" |
| | | }, |
| | | "productType": { |
| | |
| | | } |
| | | } |
| | | }, |
| | | "user.GetUserRequest": { |
| | | "type": "object", |
| | | "properties": { |
| | | "id": { |
| | | "type": "string" |
| | | }, |
| | | "nickName": { |
| | | "type": "string" |
| | | }, |
| | | "parentId": { |
| | | "type": "string" |
| | | }, |
| | | "pos": { |
| | | "type": "string" |
| | | }, |
| | | "userName": { |
| | | "type": "string" |
| | | }, |
| | | "userType": { |
| | | "type": "integer" |
| | | } |
| | | } |
| | | }, |
| | | "util.Response": { |
| | | "type": "object", |
| | | "properties": { |
| | |
| | | - 3 |
| | | - 4 |
| | | - 5 |
| | | - 6 |
| | | type: integer |
| | | x-enum-comments: |
| | | DisuseType: 报废类型 |
| | | ProductSource: 产品来源 |
| | | StockoutType: 出库类型 |
| | | StorageType: 入库类型 |
| | | TakeStockType: 盘点类型 |
| | |
| | | - TransferType |
| | | - TakeStockType |
| | | - DisuseType |
| | | - ProductSource |
| | | constvar.OperationSource: |
| | | enum: |
| | | - 1 |
| | |
| | | updateTime: |
| | | type: string |
| | | warehouseId: |
| | | description: 仓库id |
| | | type: integer |
| | | type: object |
| | | models.LogisticCompany: |
| | |
| | | models.Operation: |
| | | properties: |
| | | accountant: |
| | | description: 会计名称 |
| | | type: string |
| | | accountantId: |
| | | description: 会计id |
| | | type: string |
| | | auditDate: |
| | | description: 审批时间 |
| | | type: string |
| | | baseOperationType: |
| | | allOf: |
| | | - $ref: '#/definitions/constvar.BaseOperationType' |
| | | description: 基础作业类型 |
| | | checkedBy: |
| | | description: 验证者UserId |
| | | type: string |
| | | comment: |
| | | description: 备注 |
| | | type: string |
| | | companyID: |
| | | description: 公司ID-客户 |
| | | type: string |
| | | companyName: |
| | | description: 公司名称-客户 |
| | | type: string |
| | | contacterID: |
| | | description: 联系人ID |
| | | type: integer |
| | | contacterName: |
| | | description: 联系人姓名 |
| | | type: string |
| | | createBy: |
| | | description: 创建者UserId |
| | | type: string |
| | | createTime: |
| | | type: string |
| | | custodian: |
| | | description: 保管员名称 |
| | | type: string |
| | | custodianId: |
| | | description: 保管员id |
| | | type: string |
| | | dealerType: |
| | | description: 调拨出入库类型 |
| | | type: string |
| | | details: |
| | | description: 操作明细 |
| | | items: |
| | | $ref: '#/definitions/models.OperationDetails' |
| | | type: array |
| | |
| | | description: 源位置id |
| | | type: integer |
| | | logisticCompany: |
| | | $ref: '#/definitions/models.LogisticCompany' |
| | | allOf: |
| | | - $ref: '#/definitions/models.LogisticCompany' |
| | | description: 物流公司信息 |
| | | logisticCompanyId: |
| | | description: 物流公司id |
| | | type: string |
| | | logisticWeight: |
| | | description: 物流重量 |
| | | type: number |
| | | manager: |
| | | description: 主管名称 |
| | | type: string |
| | | managerId: |
| | | description: 主管id |
| | | type: string |
| | | number: |
| | | description: 单号 |
| | | type: string |
| | | operationDate: |
| | | description: 安排日期 |
| | | type: string |
| | | operationSource: |
| | | allOf: |
| | |
| | | description: 作业类型名称 |
| | | type: string |
| | | receiverAddr: |
| | | description: 收货地址 |
| | | type: string |
| | | receiverName: |
| | | description: 收货人姓名 |
| | | type: string |
| | | receiverPhone: |
| | | description: 联系电话 |
| | | type: string |
| | | remark: |
| | | description: 备注 |
| | | type: string |
| | | salesDetailsNumber: |
| | | description: 销售明细编码 |
| | | type: string |
| | | silkMarket: |
| | | description: 嘉联仓储添加 SilkMarket |
| | | type: string |
| | | source: |
| | | description: 来源系统 |
| | | type: string |
| | | sourceNumber: |
| | | description: 源单号 |
| | |
| | | updateTime: |
| | | type: string |
| | | warehouse: |
| | | $ref: '#/definitions/models.Warehouse' |
| | | allOf: |
| | | - $ref: '#/definitions/models.Warehouse' |
| | | description: 仓库信息 |
| | | warehouseId: |
| | | description: 仓库id |
| | | type: integer |
| | | waybillNumber: |
| | | description: 运单号 |
| | |
| | | null;comment:产品名称"` //产品名称 |
| | | type: number |
| | | auxiliaryAmount: |
| | | description: 辅助数量 |
| | | type: number |
| | | auxiliaryUnit: |
| | | description: 辅助单位 |
| | | type: string |
| | | baseOperationType: |
| | | allOf: |
| | |
| | | description: 是否调拨产生的出库 |
| | | type: boolean |
| | | operationId: |
| | | description: 操作id |
| | | description: 操作记录id |
| | | type: integer |
| | | product: |
| | | allOf: |
| | |
| | | description: 产品id |
| | | type: string |
| | | remark: |
| | | description: 备注 |
| | | type: string |
| | | salePrice: |
| | | description: 销售单价 |
| | | type: number |
| | | silkMarket: |
| | | description: 嘉联仓储添加 SilkMarket、SilkMarketClose |
| | | type: string |
| | | silkMarketClose: |
| | | description: 庄口关闭 |
| | | type: string |
| | | stockAmount: |
| | | description: 库存数量,盘点时用 |
| | | type: number |
| | |
| | | description: 目标位置id |
| | | type: integer |
| | | totalGrossWeight: |
| | | description: 总毛重 |
| | | type: number |
| | | totalNetWeight: |
| | | description: 总净重 |
| | | type: number |
| | | updateTime: |
| | | type: string |
| | |
| | | type: object |
| | | request.AddMiniDict: |
| | | properties: |
| | | code: |
| | | description: 编码 |
| | | type: string |
| | | isDefault: |
| | | description: 是否默认 |
| | | type: boolean |
| | |
| | | request.AddOperation: |
| | | properties: |
| | | accountant: |
| | | description: 会计名称 |
| | | type: string |
| | | accountantId: |
| | | description: 会计id |
| | | type: string |
| | | baseOperationType: |
| | | allOf: |
| | | - $ref: '#/definitions/constvar.BaseOperationType' |
| | | description: 基础作业类型 5库存盘点 |
| | | description: 基础作业类型 1 入库 2 出库 3 内部调拨 4 报废 5 库存盘点 |
| | | comment: |
| | | description: 备注 |
| | | type: string |
| | |
| | | description: 联系人姓名-非必填 |
| | | type: string |
| | | custodian: |
| | | description: 保管员名称 |
| | | type: string |
| | | custodianId: |
| | | description: 保管员id |
| | | type: string |
| | | dealerType: |
| | | description: 调拨出入库类型 |
| | | type: string |
| | | details: |
| | | description: 详情 |
| | | items: |
| | | $ref: '#/definitions/request.OperationDetails' |
| | | type: array |
| | |
| | | description: 源位置id |
| | | type: integer |
| | | logisticCompanyId: |
| | | description: 物流公司id |
| | | type: string |
| | | logisticWeight: |
| | | description: 物流重量 |
| | | type: number |
| | | manager: |
| | | description: 主管名称 |
| | | type: string |
| | | managerId: |
| | | description: 主管id |
| | | type: string |
| | | number: |
| | | description: 单号 |
| | | type: string |
| | | operationDate: |
| | | description: |- |
| | | FromLocationId int `json:"fromLocationId" gorm:"type:int;not null;comment:源位置id"` //源位置id |
| | | ToLocationId int `json:"toLocationId" gorm:"type:int;not null;comment:目标位置id"` //目标位置id |
| | | FromLocationId int `json:"fromLocationId" ` //源位置id |
| | | ToLocationId int `json:"toLocationId" ` //目标位置id |
| | | type: string |
| | | operationTypeId: |
| | | description: 作业类型id |
| | |
| | | description: 作业类型名称 |
| | | type: string |
| | | receiverAddr: |
| | | description: 收货地址 |
| | | type: string |
| | | receiverName: |
| | | description: 收货人姓名 |
| | | type: string |
| | | receiverPhone: |
| | | description: 联系电话 |
| | | type: string |
| | | silkMarket: |
| | | description: 庄口编码 |
| | | type: string |
| | | sourceNumber: |
| | | description: 源单号 |
| | |
| | | type: object |
| | | request.EditMiniDict: |
| | | properties: |
| | | code: |
| | | description: 编码 |
| | | type: string |
| | | id: |
| | | description: 字典类型 |
| | | type: integer |
| | |
| | | type: string |
| | | warehouseCode: |
| | | type: string |
| | | warehouseId: |
| | | description: 仓库ID |
| | | type: string |
| | | type: object |
| | | request.GetList: |
| | | properties: |
| | |
| | | type: object |
| | | request.GetMiniDictList: |
| | | properties: |
| | | keyword: |
| | | description: 关键字查询 |
| | | type: string |
| | | type: |
| | | allOf: |
| | | - $ref: '#/definitions/constvar.MiniDictType' |
| | |
| | | type: object |
| | | request.MiniDict: |
| | | properties: |
| | | code: |
| | | description: 编码 |
| | | type: string |
| | | isDefault: |
| | | description: 是否默认 |
| | | type: boolean |
| | |
| | | request.OperationAllList: |
| | | properties: |
| | | number: |
| | | description: 单号 |
| | | type: string |
| | | page: |
| | | description: 页码 |
| | |
| | | description: 每页大小 |
| | | type: integer |
| | | sourceNumber: |
| | | description: 源单号 |
| | | type: string |
| | | type: object |
| | | request.OperationCondition: |
| | | properties: |
| | | condition: |
| | | description: 模糊查询条件 |
| | | type: string |
| | | keyword: |
| | | description: 关键字搜索 |
| | |
| | | description: 操作id |
| | | type: integer |
| | | amount: |
| | | description: ProductName string `json:"productName" gorm:"type:varchar(255);not |
| | | null;comment:产品名称"` //产品名称 |
| | | description: ProductName string `json:"productName" ` //产品名称 |
| | | type: number |
| | | auxiliaryAmount: |
| | | description: 辅助数量 |
| | |
| | | type: number |
| | | fromLocationId: |
| | | description: |- |
| | | Unit string `json:"unit" gorm:"type:varchar(31);comment:单位"` //单位 |
| | | Product models.Material `json:"product" gorm:"foreignKey:ProductId;references:ID"` |
| | | Unit string `json:"unit"` //单位 |
| | | Product models.Material `json:"product" ` // 产品 |
| | | type: integer |
| | | productId: |
| | | description: 产品id |
| | | type: string |
| | | remark: |
| | | description: 备注 |
| | | type: string |
| | | salePrice: |
| | | description: 销售单价 |
| | | type: number |
| | | silkMarket: |
| | | description: 庄口编码 |
| | | type: string |
| | | silkMarketClose: |
| | | description: 庄口关闭 |
| | | type: string |
| | | stockAmount: |
| | | description: 库存数量,盘点时用 |
| | | type: number |
| | |
| | | baseOperationType: |
| | | allOf: |
| | | - $ref: '#/definitions/constvar.BaseOperationType' |
| | | description: 1 入库 2 出库 3 内部调拨 4 报废 5 库存盘点 |
| | | description: 基础作业类型 1 入库 2 出库 3 内部调拨 4 报废 5 库存盘点 |
| | | number: |
| | | description: 单号 |
| | | type: string |
| | | operationTypeId: |
| | | description: 作业类型id |
| | | type: integer |
| | | page: |
| | | description: 页码 |
| | |
| | | description: 每页大小 |
| | | type: integer |
| | | status: |
| | | $ref: '#/definitions/constvar.OperationStatus' |
| | | allOf: |
| | | - $ref: '#/definitions/constvar.OperationStatus' |
| | | description: 状态 |
| | | type: object |
| | | request.PageInfo: |
| | | properties: |
| | |
| | | request.UpdateOperation: |
| | | properties: |
| | | accountant: |
| | | description: 会计名称 |
| | | type: string |
| | | accountantId: |
| | | description: 会计id |
| | | type: string |
| | | baseOperationType: |
| | | allOf: |
| | |
| | | description: 联系人姓名-非必填 |
| | | type: string |
| | | custodian: |
| | | description: 保管员名称 |
| | | type: string |
| | | custodianId: |
| | | description: 保管员id |
| | | type: string |
| | | details: |
| | | description: 详情 |
| | | items: |
| | | $ref: '#/definitions/request.OperationDetails' |
| | | type: array |
| | | id: |
| | | type: integer |
| | | inventoryDealerType: |
| | | description: 调拨出入库分类(对应dict字典表的ID) |
| | | type: integer |
| | | locationId: |
| | | description: 源位置id |
| | |
| | | description: 物流重量 |
| | | type: number |
| | | manager: |
| | | description: 主管名称 |
| | | type: string |
| | | managerId: |
| | | description: 主管id |
| | | type: string |
| | | number: |
| | | description: 单号 |
| | | type: string |
| | | operationDate: |
| | | description: |- |
| | | FromLocationId int `json:"fromLocationId" gorm:"type:int;not null;comment:源位置id"` //源位置id |
| | | ToLocationId int `json:"toLocationId" gorm:"type:int;not null;comment:目标位置id"` //目标位置id |
| | | FromLocationId int `json:"fromLocationId" ` //源位置id |
| | | ToLocationId int `json:"toLocationId" ` //目标位置id |
| | | type: string |
| | | operationTypeId: |
| | | description: 作业类型id |
| | |
| | | description: 作业类型名称 |
| | | type: string |
| | | receiverAddr: |
| | | description: 收货地址 |
| | | type: string |
| | | receiverName: |
| | | description: 收货人姓名 |
| | | type: string |
| | | receiverPhone: |
| | | description: 联系电话 |
| | | type: string |
| | | silkMarket: |
| | | description: 庄口编码 |
| | | type: string |
| | | sourceNumber: |
| | | description: 源单号 |
| | |
| | | produceId: |
| | | description: 产品id |
| | | type: string |
| | | productCategory: |
| | | description: 产品类别 |
| | | type: string |
| | | productName: |
| | | description: 产品名称 |
| | | type: string |
| | | productSpecs: |
| | | description: 产品规格 |
| | | type: string |
| | | productType: |
| | | description: 产品类型 |
| | |
| | | items: |
| | | $ref: '#/definitions/models.Material' |
| | | type: array |
| | | type: object |
| | | user.GetUserRequest: |
| | | properties: |
| | | id: |
| | | type: string |
| | | nickName: |
| | | type: string |
| | | parentId: |
| | | type: string |
| | | pos: |
| | | type: string |
| | | userName: |
| | | type: string |
| | | userType: |
| | | type: integer |
| | | type: object |
| | | util.Response: |
| | | properties: |
| | |
| | | type: array |
| | | type: object |
| | | summary: 获取字典信息列表 |
| | | tags: |
| | | - 数据字典 |
| | | /api-wms/v1/dict/getUserList: |
| | | get: |
| | | parameters: |
| | | - in: query |
| | | name: id |
| | | type: string |
| | | - in: query |
| | | name: nickName |
| | | type: string |
| | | - in: query |
| | | name: parentId |
| | | type: string |
| | | - in: query |
| | | name: pos |
| | | type: string |
| | | - in: query |
| | | name: userName |
| | | type: string |
| | | - in: query |
| | | name: userType |
| | | type: integer |
| | | produces: |
| | | - application/json |
| | | responses: |
| | | "200": |
| | | description: 成功 |
| | | schema: |
| | | allOf: |
| | | - $ref: '#/definitions/util.ResponseList' |
| | | - properties: |
| | | data: |
| | | items: |
| | | $ref: '#/definitions/user.GetUserRequest' |
| | | type: array |
| | | type: object |
| | | summary: 获取用户列表 |
| | | tags: |
| | | - 数据字典 |
| | | /api-wms/v1/dict/save: |
| | |
| | | /api-wms/v1/locationProductAmount/add: |
| | | post: |
| | | parameters: |
| | | - description: token |
| | | in: header |
| | | name: Authorization |
| | | required: true |
| | | type: string |
| | | - description: 入库/出库信息 |
| | | in: body |
| | | name: object |
| | |
| | | /api-wms/v1/locationProductAmount/finish: |
| | | post: |
| | | parameters: |
| | | - description: token |
| | | in: header |
| | | name: Authorization |
| | | required: true |
| | | type: string |
| | | - description: 入参 |
| | | in: body |
| | | name: object |
| | |
| | | /api-wms/v1/locationProductAmount/update: |
| | | post: |
| | | parameters: |
| | | - description: token |
| | | in: header |
| | | name: Authorization |
| | | required: true |
| | | type: string |
| | | - description: 入库/出库信息 |
| | | in: body |
| | | name: object |
| | |
| | | /api-wms/v1/operation/finish/{id}: |
| | | put: |
| | | parameters: |
| | | - description: token |
| | | in: header |
| | | name: Authorization |
| | | required: true |
| | | type: string |
| | | - description: id |
| | | in: path |
| | | name: id |
| | |
| | | /api-wms/v1/operation/list: |
| | | post: |
| | | parameters: |
| | | - description: token |
| | | in: header |
| | | name: Authorization |
| | | required: true |
| | | type: string |
| | | - description: 查询参数 |
| | | in: body |
| | | name: object |
| | |
| | | /api-wms/v1/operation/operation: |
| | | post: |
| | | parameters: |
| | | - description: token |
| | | in: header |
| | | name: Authorization |
| | | required: true |
| | | type: string |
| | | - description: 入库/出库信息 |
| | | in: body |
| | | name: object |
| | |
| | | /api-wms/v1/operation/operation/{id}: |
| | | delete: |
| | | parameters: |
| | | - description: token |
| | | in: header |
| | | name: Authorization |
| | | required: true |
| | | type: string |
| | | - description: id |
| | | in: path |
| | | name: id |
| | |
| | | |
| | | MiniDictSearch struct { |
| | | MiniDict |
| | | Keyword string |
| | | Order string |
| | | PageNum int |
| | | PageSize int |
| | |
| | | return slf |
| | | } |
| | | |
| | | func (slf *MiniDictSearch) SetKeyword(keyword string) *MiniDictSearch { |
| | | slf.Keyword = keyword |
| | | return slf |
| | | } |
| | | |
| | | func (slf *MiniDictSearch) build() *gorm.DB { |
| | | var db = slf.Orm.Table(slf.TableName()) |
| | | |
| | |
| | | |
| | | if slf.Value != "" { |
| | | db = db.Where("value = ?", slf.Value) |
| | | } |
| | | |
| | | if slf.Keyword != "" { |
| | | db = db.Where("name like ?", fmt.Sprintf("%%%s%%", slf.Keyword)) |
| | | } |
| | | |
| | | db.Where("1 = 1") |
| | |
| | | return records, nil |
| | | } |
| | | |
| | | func (slf *MiniDictSearch) MaxAutoIncr() (int, error) { |
| | | type Result struct { |
| | | Max int |
| | | } |
| | | |
| | | var ( |
| | | result Result |
| | | db = slf.build() |
| | | ) |
| | | |
| | | err := db.Select("COUNT(id) as max").Scan(&result).Error |
| | | if err != nil { |
| | | return result.Max, fmt.Errorf("max err: %v", err) |
| | | } |
| | | return result.Max, nil |
| | | } |
| | | |
| | | // InitDefaultData 初始化数据 |
| | | func (slf *MiniDictSearch) InitDefaultData() error { |
| | | var ( |
| | |
| | | return nil |
| | | } |
| | | dict := make([]*MiniDict, 0) |
| | | dict = append(dict, &MiniDict{Type: constvar.TransferType, Name: "内部调拨", Value: "1"}) |
| | | dict = append(dict, &MiniDict{Type: constvar.TransferType, Name: "外部调拨", Value: "2"}) |
| | | dict = append(dict, &MiniDict{Type: constvar.StorageType, Name: "采购", Value: "1"}) |
| | | dict = append(dict, &MiniDict{Type: constvar.StorageType, Name: "采购", Value: "1", IsDefault: true}) |
| | | dict = append(dict, &MiniDict{Type: constvar.StorageType, Name: "其他", Value: "99"}) |
| | | dict = append(dict, &MiniDict{Type: constvar.StockoutType, Name: "展厅", Value: "1"}) |
| | | dict = append(dict, &MiniDict{Type: constvar.StockoutType, Name: "经销商", Value: "2"}) |
| | | dict = append(dict, &MiniDict{Type: constvar.StockoutType, Name: "退库", Value: "9"}) |
| | | dict = append(dict, &MiniDict{Type: constvar.StockoutType, Name: "退库", Value: "9", IsDefault: true}) |
| | | dict = append(dict, &MiniDict{Type: constvar.StockoutType, Name: "其他", Value: "99"}) |
| | | dict = append(dict, &MiniDict{Type: constvar.TransferType, Name: "内部调拨", Value: "1", IsDefault: true}) |
| | | dict = append(dict, &MiniDict{Type: constvar.TransferType, Name: "外部调拨", Value: "2"}) |
| | | dict = append(dict, &MiniDict{Type: constvar.TakeStockType, Name: "其他", Value: "99"}) |
| | | dict = append(dict, &MiniDict{Type: constvar.DisuseType, Name: "其他", Value: "99"}) |
| | | err := slf.CreateBatch(dict) |
| | | return err |
| | | } |
| | |
| | | |
| | | type MiniDict struct { |
| | | Name string `json:"name"` // 名称 |
| | | Code string `json:"code"` // 编码 |
| | | Value string `json:"value"` // 值 |
| | | IsDefault bool `json:"isDefault"` // 是否默认 |
| | | } |
| | |
| | | } |
| | | |
| | | type GetMiniDict struct { |
| | | Type constvar.MiniDictType `json:"type"` // 字典类型 |
| | | Name string `json:"name"` // 字典名称 |
| | | Type constvar.MiniDictType `json:"type"` // 字典类型 |
| | | Name string `json:"name"` // 字典名称 |
| | | Keyword string `json:"keyword"` // 关键字查询 |
| | | } |
| | | |
| | | type GetMiniDictList struct { |
| | | Type constvar.MiniDictType `json:"type"` // 字典类型 |
| | | Type constvar.MiniDictType `json:"type"` // 字典类型 |
| | | Keyword string `json:"keyword"` // 关键字查询 |
| | | } |
| | |
| | | dictController := new(controllers.DictController) |
| | | dictApi := r.Group(urlPrefix + "/dict") |
| | | { |
| | | dictApi.POST("add", dictController.AddMiniDict) //添加字典信息 |
| | | dictApi.POST("edit", dictController.EditMiniDict) //修改字典信息 |
| | | dictApi.DELETE("delete/:id", dictController.DeleteMiniDict) //删除字典信息 |
| | | dictApi.POST("save", dictController.SaveMiniDict) //批量保存系统设置 |
| | | dictApi.POST("getDictList", dictController.GetMiniDictList) //获取字典信息列表 |
| | | dictApi.GET("getSilkDictList/:type", dictController.GetSilkDictList) // 获取庄口列表 |
| | | dictApi.GET("getUserList", dictController.GetUserList) // 获取用户列表 |
| | | dictApi.POST("add", dictController.AddMiniDict) //添加字典信息 |
| | | dictApi.POST("edit", dictController.EditMiniDict) //修改字典信息 |
| | | dictApi.DELETE("delete/:id", dictController.DeleteMiniDict) //删除字典信息 |
| | | dictApi.POST("save", dictController.SaveMiniDict) //批量保存系统设置 |
| | | dictApi.POST("getDictList", dictController.GetMiniDictList) //获取字典信息列表 |
| | | dictApi.GET("getUserList", dictController.GetUserList) // 获取用户列表 |
| | | } |
| | | |
| | | //系统配置 |