| | |
| | | } |
| | | util.ResponseFormatListWithPage(c, code.Success, records, int(total), params.Page, params.PageSize) |
| | | } |
| | | |
| | | // GetPersonnelList |
| | | // @Tags 入库/出库 |
| | | // @Summary 获取人员列表 |
| | | // @Produce application/json |
| | | // @Param object body request.OperationCondition true "参数" |
| | | // @Success 200 {object} util.ResponseList{data=[]inventory_order.WorkerInfo} "成功" |
| | | // @Router /api-wms/v1/operation/getPersonnelList [get] |
| | | func (slf OperationController) GetPersonnelList(c *gin.Context) { |
| | | cli := inventory_order.NewInventoryOrderServiceClient(init_client.ApsConn) |
| | | list, err := cli.GetWorkerList(context.Background(), &inventory_order.GetWorkerListRequest{}) |
| | | if err != nil { |
| | | util.ResponseFormat(c, code.RequestParamError, "内部错误") |
| | | logx.Error("grpc调用失败, GetPersonnelList err : " + err.Error()) |
| | | return |
| | | } |
| | | util.ResponseFormat(c, code.Success, list.List) |
| | | } |