80 lines
3.0 KiB
Go
80 lines
3.0 KiB
Go
// ==========================================================================
|
||
// GFast自动生成controller操作代码。
|
||
// 生成日期:2023-07-31 11:31:49
|
||
// 生成路径: internal/app/system/controller/qianqi_guangfuban.go
|
||
// 生成人:gfast
|
||
// desc:光伏板模型
|
||
// company:云南奇讯科技有限公司
|
||
// ==========================================================================
|
||
|
||
package controller
|
||
|
||
import (
|
||
"context"
|
||
"github.com/tiger1103/gfast/v3/api/v1/system"
|
||
"github.com/tiger1103/gfast/v3/internal/app/system/service"
|
||
)
|
||
|
||
type qianqiGuangfubanController struct {
|
||
BaseController
|
||
}
|
||
|
||
var QianqiGuangfuban = new(qianqiGuangfubanController)
|
||
|
||
// List 列表
|
||
func (c *qianqiGuangfubanController) List(ctx context.Context, req *system.QianqiGuangfubanSearchReq) (res *system.QianqiGuangfubanSearchRes, err error) {
|
||
res, err = service.QianqiGuangfuban().List(ctx, req)
|
||
return
|
||
}
|
||
|
||
// Get 获取光伏板模型
|
||
func (c *qianqiGuangfubanController) Get(ctx context.Context, req *system.QianqiGuangfubanGetReq) (res *system.QianqiGuangfubanGetRes, err error) {
|
||
res = new(system.QianqiGuangfubanGetRes)
|
||
res.QianqiGuangfubanInfoRes, err = service.QianqiGuangfuban().GetById(ctx, req.Id)
|
||
return
|
||
}
|
||
|
||
// Add 添加光伏板模型
|
||
func (c *qianqiGuangfubanController) Add(ctx context.Context, req *system.QianqiGuangfubanAddReq) (res *system.QianqiGuangfubanAddRes, err error) {
|
||
err = service.QianqiGuangfuban().Add(ctx, req)
|
||
return
|
||
}
|
||
|
||
// Edit 修改光伏板模型
|
||
func (c *qianqiGuangfubanController) Edit(ctx context.Context, req *system.QianqiGuangfubanEditReq) (res *system.QianqiGuangfubanEditRes, err error) {
|
||
err = service.QianqiGuangfuban().Edit(ctx, req)
|
||
return
|
||
}
|
||
|
||
// Delete 删除光伏板模型
|
||
func (c *qianqiGuangfubanController) Delete(ctx context.Context, req *system.QianqiGuangfubanDeleteReq) (res *system.QianqiGuangfubanDeleteRes, err error) {
|
||
err = service.QianqiGuangfuban().Delete(ctx, req.SourceIDs)
|
||
return
|
||
}
|
||
|
||
// QianqiGuangfubanImportZuchuan
|
||
func (c *qianqiGuangfubanController) QianqiGuangfubanImportZuchuan(ctx context.Context, req *system.QianqiGuangfubanImportZuchuanReq) (res *system.QianqiGuangfubanImportZuchuanRes, err error) {
|
||
err = service.QianqiGuangfuban().ImportZuchuan(ctx, req)
|
||
return
|
||
}
|
||
|
||
// QianqiGuangfubanCalZuchuan
|
||
func (c *qianqiGuangfubanController) QianqiGuangfubanCalZuchuan(ctx context.Context, req *system.QianqiGuangfubanCalZuchuanReq) (res *system.QianqiGuangfubanCalZuchuanRes, err error) {
|
||
err = service.QianqiGuangfuban().CaculateZuchuan(ctx, req)
|
||
return
|
||
}
|
||
|
||
// CorrectFunc 光伏板数据纠正
|
||
func (c *qianqiGuangfubanController) CorrectFunc(ctx context.Context, req *system.CorrectFuncReq) (res *system.CorrectFuncRes, err error) {
|
||
err = service.QianqiGuangfuban().CorrectFunc(ctx, req)
|
||
return
|
||
}
|
||
|
||
// CorrectQueryFunc 光伏板数据纠正查询
|
||
func (c *qianqiGuangfubanController) CorrectQueryFunc(ctx context.Context, req *system.CorrectQueryFuncReq) (res *system.CorrectQueryFuncRes, err error) {
|
||
res = new(system.CorrectQueryFuncRes)
|
||
queryFunc, err := service.QianqiGuangfuban().CorrectQueryFunc(ctx, req)
|
||
res = queryFunc
|
||
return
|
||
}
|