// Copyright (c) Shenyang Leading Edge Intelligent Technology Co., Ltd. All rights reserved.
|
|
|
|
package base
|
|
|
|
import (
|
|
"LAPP_ACURA_MOM_BACKEND/global"
|
|
"LAPP_ACURA_MOM_BACKEND/grmi"
|
|
model "LAPP_ACURA_MOM_BACKEND/models/base"
|
|
"LAPP_ACURA_MOM_BACKEND/services/base/implments"
|
|
)
|
|
|
|
/******************************************************************************
|
|
*
|
|
* @Interface Name : PlantService
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : Plant的服务接口
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-08-20 11:11:05
|
|
*
|
|
******************************************************************************/
|
|
type PlantService interface {
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : InsertOne
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 插入一条Plant
|
|
*
|
|
* @Function Parameters : 当前访问人员信息
|
|
*
|
|
* @Function Parameters : 需要插入的Plant
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-08-16 16:11:14
|
|
*
|
|
******************************************************************************/
|
|
InsertOne(*global.User, *model.Plant) error
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : DeleteOne
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 删除指定键的Plant
|
|
*
|
|
* @Function Parameters : 主键
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-08-16 16:11:14
|
|
*
|
|
******************************************************************************/
|
|
DeleteOne(*global.User, int) error
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : SelectOne
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 查找指定键的Plant
|
|
*
|
|
* @Function Parameters : 主键
|
|
*
|
|
* @Return Value : 查找到的Plant
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-08-16 16:11:14
|
|
*
|
|
******************************************************************************/
|
|
SelectOne(*global.User, int) (*model.Plant, error)
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : UpdateOne
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 修改一条Plant
|
|
*
|
|
* @Function Parameters : 当前访问人员信息
|
|
*
|
|
* @Function Parameters : 需要修改的Plant
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-08-16 16:11:14
|
|
*
|
|
******************************************************************************/
|
|
UpdateOne(*global.User, *model.Plant) error
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : Insert
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 插入多条Plant
|
|
*
|
|
* @Function Parameters : 当前访问人员信息
|
|
*
|
|
* @Function Parameters : 需要插入的Plant列表
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-08-16 16:11:14
|
|
*
|
|
******************************************************************************/
|
|
Insert(*global.User, *[]model.Plant) error
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : Delete
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 删除多条Plant
|
|
*
|
|
* @Function Parameters : 当前访问人员信息
|
|
*
|
|
* @Function Parameters : 需要删除的Plant列表
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-08-16 16:11:14
|
|
*
|
|
******************************************************************************/
|
|
Delete(*global.User, *[]model.Plant) error
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : Select
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 查询Plant
|
|
*
|
|
* @Function Parameters : 当前访问人员信息
|
|
*
|
|
* @Function Parameters : 查询参数
|
|
*
|
|
* @Return Value : 查询结果
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-08-20 11:11:05
|
|
*
|
|
******************************************************************************/
|
|
Select(*global.User, map[string]string) ([]model.Plant, error)
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : SelectAndPaging
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 查询Plant
|
|
*
|
|
* @Function Parameters : 当前访问人员信息
|
|
*
|
|
* @Function Parameters : 查询参数
|
|
*
|
|
* @Return Value : 查询结果
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-08-20 11:11:05
|
|
*
|
|
******************************************************************************/
|
|
SelectAndPaging(*global.User, map[string]string) (grmi.PagingResult, error)
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : Update
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 修改多条Plant
|
|
*
|
|
* @Function Parameters : 当前访问人员信息
|
|
*
|
|
* @Function Parameters : 需要修改的Plant列表
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-08-16 16:11:14
|
|
*
|
|
******************************************************************************/
|
|
Update(*global.User, *[]model.Plant) error
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : GetPlants
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 项目组
|
|
*
|
|
* @Function Parameters : 当前访问人员信息
|
|
*
|
|
* @Function Parameters : 需要修改的Plant列表
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-08-16 16:11:14
|
|
*
|
|
******************************************************************************/
|
|
GetPlants() ([]model.Plant, error)
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : GetAllProjectsOfPlant
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 获取所有工厂及工厂所属产品的数据
|
|
*
|
|
* @Function Parameters : 当前访问人员信息
|
|
*
|
|
* @Function Parameters : []model.PlantProductTree
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : zhangxin
|
|
*
|
|
* @Date : 2021-10-14
|
|
*
|
|
******************************************************************************/
|
|
GetAllProjectsOfPlant(user *global.User) ([]model.PlantDataTree, error)
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : GetAllWorkLineOfPlant
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 获取所有工厂及工厂所属产线的数据
|
|
*
|
|
* @Function Parameters : 当前访问人员信息
|
|
*
|
|
* Return Value : []model.WorkLineOfPlant
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : zhangxin
|
|
*
|
|
* @Date : 2021-10-14
|
|
*
|
|
******************************************************************************/
|
|
GetAllWorkLineOfPlant(user *global.User) ([]model.WorkLineOfPlant, error)
|
|
}
|
|
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : NewPlantService
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 创建一个PlantService
|
|
*
|
|
* @Return Value : PlantService实例
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-08-16 16:11:14
|
|
*
|
|
******************************************************************************/
|
|
func NewPlantService() PlantService {
|
|
return implments.NewPlantServiceImplement()
|
|
}
|