广汽安道拓Acura项目MES后台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

459 lines
16 KiB

// Copyright (c) Shenyang Leading Edge Intelligent Technology Co., Ltd. All rights reserved.
package pln
import (
"LAPP_ACURA_MOM_BACKEND/global"
"LAPP_ACURA_MOM_BACKEND/grmi"
model "LAPP_ACURA_MOM_BACKEND/models/pln"
"LAPP_ACURA_MOM_BACKEND/services/pln/implments"
)
/******************************************************************************
*
* @Interface Name : CustOrderService
*-----------------------------------------------------------------------------
*
* @Description : CustOrder的服务接口
*
* @Author : 代码生成器创建
*
* @Date : 2021-10-22 13:50:40
*
******************************************************************************/
type CustOrderService interface {
/******************************************************************************
*
* @Function Name : InsertOne
*-----------------------------------------------------------------------------
*
* @Description : 插入一条CustOrder
*
* @Function Parameters : 当前访问人员信息
*
* @Function Parameters : 需要插入的CustOrder
*
* @Return Value : 执行时发生的错误
*
* @Author : 代码生成器创建
*
* @Date : 2021-10-22 13:50:40
*
******************************************************************************/
InsertOne(*global.User, *model.CustOrder) error
/******************************************************************************
*
* @Function Name : DeleteOne
*-----------------------------------------------------------------------------
*
* @Description : 删除指定键的CustOrder
*
* @Function Parameters : 主键
*
* @Return Value : 执行时发生的错误
*
* @Author : 代码生成器创建
*
* @Date : 2021-10-22 13:50:40
*
******************************************************************************/
DeleteOne(*global.User, string) error
/******************************************************************************
*
* @Function Name : Cancel
*-----------------------------------------------------------------------------
*
* @Description : 删除指定键的CustOrder
*
* @Function Parameters : 主键
*
* @Return Value : 执行时发生的错误
*
* @Author : 代码生成器创建
*
* @Date : 2021-10-22 13:50:40
*
******************************************************************************/
Cancel(*global.User, string) error
/******************************************************************************
*
* @Function Name : SelectOne
*-----------------------------------------------------------------------------
*
* @Description : 查找指定键的CustOrder
*
* @Function Parameters : 主键
*
* @Return Value : 查找到的CustOrder
*
* @Return Value : 执行时发生的错误
*
* @Author : 代码生成器创建
*
* @Date : 2021-10-22 13:50:40
*
******************************************************************************/
SelectOne(*global.User, string) (*model.CustOrder, error)
/******************************************************************************
*
* @Function Name : UpdateOne
*-----------------------------------------------------------------------------
*
* @Description : 修改一条CustOrder
*
* @Function Parameters : 当前访问人员信息
*
* @Function Parameters : 需要修改的CustOrder
*
* @Return Value : 执行时发生的错误
*
* @Author : 代码生成器创建
*
* @Date : 2021-10-22 13:50:40
*
******************************************************************************/
UpdateOne(*global.User, *model.CustOrder) error
/******************************************************************************
*
* @Function Name : Insert
*-----------------------------------------------------------------------------
*
* @Description : 插入多条CustOrder
*
* @Function Parameters : 当前访问人员信息
*
* @Function Parameters : 需要插入的CustOrder列表
*
* @Return Value : 执行时发生的错误
*
* @Author : 代码生成器创建
*
* @Date : 2021-10-22 13:50:40
*
******************************************************************************/
Insert(*global.User, *[]model.CustOrder) error
/******************************************************************************
*
* @Function Name : Delete
*-----------------------------------------------------------------------------
*
* @Description : 删除多条CustOrder
*
* @Function Parameters : 当前访问人员信息
*
* @Function Parameters : 需要删除的CustOrder列表
*
* @Return Value : 执行时发生的错误
*
* @Author : 代码生成器创建
*
* @Date : 2021-10-22 13:50:40
*
******************************************************************************/
Delete(*global.User, *[]model.CustOrder) error
/******************************************************************************
*
* @Function Name : Select
*-----------------------------------------------------------------------------
*
* @Description : 查询CustOrder
*
* @Function Parameters : 当前访问人员信息
*
* @Function Parameters : 查询参数
*
* @Return Value : 查询结果
*
* @Return Value : 执行时发生的错误
*
* @Author : 代码生成器创建
*
* @Date : 2021-10-22 13:50:40
*
******************************************************************************/
Select(*global.User, map[string]string) ([]model.CustOrder, error)
/******************************************************************************
*
* @Function Name : SelectAndPaging
*-----------------------------------------------------------------------------
*
* @Description : 查询CustOrder
*
* @Function Parameters : 当前访问人员信息
*
* @Function Parameters : 查询参数
*
* @Return Value : 查询结果
*
* @Return Value : 执行时发生的错误
*
* @Author : 代码生成器创建
*
* @Date : 2021-10-22 13:50:40
*
******************************************************************************/
SelectAndPaging(*global.User, map[string]string) (grmi.PagingResult, error)
/******************************************************************************
*
* @Function Name : Update
*-----------------------------------------------------------------------------
*
* @Description : 修改多条CustOrder
*
* @Function Parameters : 当前访问人员信息
*
* @Function Parameters : 需要修改的CustOrder列表
*
* @Return Value : 执行时发生的错误
*
* @Author : 代码生成器创建
*
* @Date : 2021-10-22 13:50:40
*
******************************************************************************/
Update(*global.User, *[]model.CustOrder) error
/******************************************************************************
*
* @Function Name : PlanCustOrder
*-----------------------------------------------------------------------------
*
* @Description : 将客户订单修改为已计划
*
* @Function Parameters : 当前访问人员信息
*
* @Function Parameters : 需要计划的CustOrder
*
* @Return Value : 执行时发生的错误
*
* @Author : zhangxin
*
* @Date : 2021-10-29
*
******************************************************************************/
PlanCustOrder(user *global.User, entity *model.CustOrder) error
/******************************************************************************
*
* @Function Name : LockCustOrder
*-----------------------------------------------------------------------------
*
* @Description : 将客户订单锁定
*
* @Function Parameters : 当前访问人员信息
*
* @Function Parameters : custOrderIdLi
*
* @Return Value : 执行时发生的错误
*
* @Author : zhangxin
*
* @Date : 2021-10-29
*
******************************************************************************/
LockCustOrder(user *global.User, custOrderIdLi []string) error
/******************************************************************************
*
* @Function Name : ReleaseCustOrder
*-----------------------------------------------------------------------------
*
* @Description : 对客户订单进行派工
*
* @Function Parameters : 当前访问人员信息
*
* @Function Parameters : custOrder
*
* @Return Value : 执行时发生的错误
*
* @Author : zhangxin
*
* @Date : 2021-10-29
*
******************************************************************************/
//ReleaseCustOrder(session *xorm.Session, releaseQty int, custOrder *model.CustOrder) (*model.CustOrder, error)
/******************************************************************************
*
* @Function Name : ReportWort
*-----------------------------------------------------------------------------
*
* @Description : ReportWork处理MES的报工数据
*
* @Function Parameters : 当前访问人员信息
*
* @Return Value : 执行时发生的错误
*
* @Author : zhangxin
*
* @Date : 2021-12-10
*
******************************************************************************/
ReportWort(user *global.User)
/******************************************************************************
*
* @Function Name : CancelCustOrderQty
*-----------------------------------------------------------------------------
*
* @Description : 取消客户订单数量
*
* @Function Parameters : 当前访问人员信息
*
* @Function Parameters : 客户订单ID
*
* @Function Parameters : 取消数量
*
* @Return Value : 执行时发生的错误
*
* @Author : zhangxin
*
* @Date : 2021-12-10
*
******************************************************************************/
CancelCustOrderQty(user *global.User, custOrderId string, cancelQty int) error
/******************************************************************************
*
* @Function Name : PageSelect
*-----------------------------------------------------------------------------
*
* @Description : 查询CustOrder
*
* @Function Parameters : 当前访问人员信息
*
* @Function Parameters : 查询参数
*
* @Return Value : 查询结果
*
* @Return Value : 执行时发生的错误
*
* @Author : 代码生成器创建
*
* @Date : 2021-10-22 13:50:40
*
******************************************************************************/
PageSelect(user *global.User, urlParameters map[string]string) (grmi.PagingResult, error)
/******************************************************************************
*
* @Function Name : WithdrawCustOrder
*-----------------------------------------------------------------------------
*
* @Description : 撤回已计划客户订单的状态
*
* @Function Parameters : 当前访问人员信息
*
* @Function Parameters : 客户订单ID
*
* @Return Value : 执行时发生的错误
*
* @Author : zhangxin
*
* @Date : 2021-12-14
*
******************************************************************************/
WithdrawCustOrder(user *global.User, custOrderId string) error
/******************************************************************************
*
* @Function Name : Dashboard
*-----------------------------------------------------------------------------
*
* @Description : 撤回已计划客户订单的状态
*
* @Function Parameters : 当前访问人员信息
*
* @Function Parameters : 客户订单ID
*
* @Return Value : 执行时发生的错误
*
* @Author : zhangxin
*
* @Date : 2021-12-14
*
******************************************************************************/
Dashboard(user *global.User, workLineId string) (interface{}, error)
/******************************************************************************
*
* @Function Name : SelectCanCancelQty
*-----------------------------------------------------------------------------
*
* @Description : 查询客户订单可取消台套数量
*
* @Function Parameters : 当前访问人员信息
*
* @Function Parameters : 客户订单ID
*
* @Return Value : 可取消台套数量
*
* @Return Value : 执行时发生的错误
*
* @Author : zhangxin
*
* @Date : 2022-02-08
*
******************************************************************************/
SelectCanCancelQty(user *global.User, custOrderId string) (int, error)
/******************************************************************************
*
* @Function Name : SplitOrderQty
*-----------------------------------------------------------------------------
*
* @Description : 拆分客户订单
*
* @Function Parameters : 当前访问人员信息
*
* @Function Parameters : 客户订单ID
*
* @Return Value : 执行时发生的错误
*
* @Author : zhangxin
*
* @Date : 2022-02-08
*
******************************************************************************/
SplitOrderQty(user *global.User, custOrderId string, qty int) error
/******************************************************************************
*
* @Function Name : AnalysisPlanFromExcel
*-----------------------------------------------------------------------------
*
* @Description : 解析Excel生成客户订单
*
* @Function Parameters : 当前访问人员信息
*
* @Function Parameters : 文件路径
*
* @Return Value : 执行时发生的错误
*
* @Author : zhangxin
*
* @Date : 2022-03-08
*
******************************************************************************/
AnalysisPlanFromExcel(user *global.User, filepath string) error
// 派工
ReleaseTask() error
// 查询所有派工未完成和失败的任务
SelectReleaseTask(user *global.User) ([]model.CustOrder, error)
// 修复派工失败
RepairReleaseFailedTask(user *global.User) (err error)
// CrossPlantTask 跨工厂任务
CrossPlantTask() error
// ManualReleaseCustOrder 手动派工
ManualReleaseCustOrder(user *global.User, custOrderId string) error
// PutTaskToChannel 根据配置定时向channel中导入派工任务
PutTaskToChannel() (err error)
}
/******************************************************************************
*
* @Function Name : NewCustOrderService
*-----------------------------------------------------------------------------
*
* @Description : 创建一个CustOrderService
*
* @Return Value : CustOrderService实例
*
* @Author : 代码生成器创建
*
* @Date : 2021-10-22 13:50:40
*
******************************************************************************/
func NewCustOrderService() CustOrderService {
return implments.NewCustOrderServiceImplement()
}