diff --git a/dao/me/ProductWorkLineLst.dao.go b/dao/me/ProductWorkLineLst.dao.go new file mode 100644 index 0000000..4b44603 --- /dev/null +++ b/dao/me/ProductWorkLineLst.dao.go @@ -0,0 +1,246 @@ +// Copyright (c) Shenyang Leading Edge Intelligent Technology Co., Ltd. All rights reserved. + +package me + +import ( + "LAPP_ACURA_MOM_BACKEND/dao/me/implments" + "LAPP_ACURA_MOM_BACKEND/grmi" + model "LAPP_ACURA_MOM_BACKEND/models/me" + "github.com/go-xorm/xorm" +) + +/****************************************************************************** + * + * @Interface Name : ProductWorkLineLstDAO + *----------------------------------------------------------------------------- + * + * @Description : ProductWorkLineLst的数据访问对象接口 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ +type ProductWorkLineLstDAO interface { + /****************************************************************************** + * + * @Function Name : InsertOne + *----------------------------------------------------------------------------- + * + * @Description : 插入一条ProductWorkLineLst + * + * @Function Parameters : 需要插入的ProductWorkLineLst + * + * @Return Value : 执行时发生的错误 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ + InsertOne(*model.ProductWorkLineLst) error + /****************************************************************************** + * + * @Function Name : DeleteOne + *----------------------------------------------------------------------------- + * + * @Description : 删除指定键的ProductWorkLineLst + * + * @Function Parameters : 主键 + * + * @Function Parameters : 主键 + * + * @Return Value : 执行时发生的错误 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ + DeleteOne(string, string) error + /****************************************************************************** + * + * @Function Name : SelectOne + *----------------------------------------------------------------------------- + * + * @Description : 查找指定键的ProductWorkLineLst + * + * @Function Parameters : 主键 + * + * @Function Parameters : 主键 + * + * @Return Value : 查找到的ProductWorkLineLst + * + * @Return Value : 执行时发生的错误 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ + SelectOne(string, string) (*model.ProductWorkLineLst, error) + /****************************************************************************** + * + * @Function Name : UpdateOne + *----------------------------------------------------------------------------- + * + * @Description : 修改ProductWorkLineLst + * + * @Function Parameters : 需要修改的ProductWorkLineLst + * + * @Return Value : 执行时发生的错误 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ + UpdateOne(*model.ProductWorkLineLst) error + /****************************************************************************** + * + * @Function Name : Insert + *----------------------------------------------------------------------------- + * + * @Description : 插入多条ProductWorkLineLst + * + * @Function Parameters : 需要插入的ProductWorkLineLst列表 + * + * @Return Value : 执行时发生的错误 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ + Insert(*[]model.ProductWorkLineLst) error + /****************************************************************************** + * + * @Function Name : Delete + *----------------------------------------------------------------------------- + * + * @Description : 删除多条ProductWorkLineLst + * + * @Function Parameters : 需要删除的ProductWorkLineLst列表 + * + * @Return Value : 执行时发生的错误 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ + Delete(*[]model.ProductWorkLineLst) error + /****************************************************************************** + * + * @Function Name : DeleteWhere + *----------------------------------------------------------------------------- + * + * @Description : 按条件删除ProductWorkLineLst + * + * @Return Value : 执行时发生的错误 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ + DeleteWhere([]grmi.Predicate) error + /****************************************************************************** + * + * @Function Name : Select + *----------------------------------------------------------------------------- + * + * @Description : 按条件查询ProductWorkLineLst + * + * @Function Parameters : 查询条件 + * + * @Function Parameters : 排序字段 + * + * @Return Value : 查询结果 + * + * @Return Value : 执行时发生的错误 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ + Select([]grmi.Predicate, []grmi.Field) ([]model.ProductWorkLineLst, error) + /****************************************************************************** + * + * @Function Name : SelectAndPaging + *----------------------------------------------------------------------------- + * + * @Description : 按条件查询ProductWorkLineLst并分页 + * + * @Function Parameters : 分页信息 + * + * @Function Parameters : 查询条件 + * + * @Function Parameters : 排序字段 + * + * @Return Value : 查询结果 + * + * @Return Value : 执行时发生的错误 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ + SelectAndPaging(*grmi.Paging, []grmi.Predicate, []grmi.Field) (grmi.PagingResult, error) + /****************************************************************************** + * + * @Function Name : Update + *----------------------------------------------------------------------------- + * + * @Description : 修改多条ProductWorkLineLst + * + * @Function Parameters : 需要修改的ProductWorkLineLst列表 + * + * @Return Value : 执行时发生的错误 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ + Update(*[]model.ProductWorkLineLst) error + /****************************************************************************** + * + * @Function Name : UpdateWhere + *----------------------------------------------------------------------------- + * + * @Description : 按条件修改ProductWorkLineLst + * + * @Return Value : 执行时发生的错误 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ + UpdateWhere([]grmi.Predicate, *model.ProductWorkLineLst, ...string) error +} + +/****************************************************************************** + * + * @Function Name : NewProductWorkLineLstDAO + *----------------------------------------------------------------------------- + * + * @Description : 创建一个ProductWorkLineLstDAO实例 + * + * @Function Parameters : xorm会话 + * + * @Function Parameters : 基本主键 + * + * @Return Value : ProductWorkLineLstDAO实例 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ +func NewProductWorkLineLstDAO(session *xorm.Session, plantNr int, userid string) ProductWorkLineLstDAO { + return implments.NewProductWorkLineLstDAOImplement(session, plantNr, userid) +} diff --git a/meta/me/ProductWorkLineLst.meta.go b/meta/me/ProductWorkLineLst.meta.go new file mode 100644 index 0000000..74266f1 --- /dev/null +++ b/meta/me/ProductWorkLineLst.meta.go @@ -0,0 +1,49 @@ +// Copyright (c) Shenyang Leading Edge Intelligent Technology Co., Ltd. All rights reserved. + +package me + +import ( + "LAPP_ACURA_MOM_BACKEND/grmi" + model "LAPP_ACURA_MOM_BACKEND/models/me" +) + +/****************************************************************************** + * + * @Description : ProductWorkLineLst的字段元数据 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ +var ProductWorkLineLst_PlantNr = grmi.NewField("PlantNr", "[ME_ProductWorkLineLst].PlantNr", "plantnr", grmi.TypeInt) +var ProductWorkLineLst_ProductId = grmi.NewField("ProductId", "[ME_ProductWorkLineLst].ProductId", "productid", grmi.TypeString) +var ProductWorkLineLst_WorkLineId = grmi.NewField("WorkLineId", "[ME_ProductWorkLineLst].WorkLineId", "worklineid", grmi.TypeString) +var ProductWorkLineLst_WorkLineDescr = grmi.NewField("WorkLineDescr", "[ME_ProductWorkLineLst].WorkLineDescr", "worklinedescr", grmi.TypeString) +var ProductWorkLineLst_LastModify = grmi.NewField("LastModify", "[ME_ProductWorkLineLst].LastModify", "lastmodify", grmi.TypeDateTime) +var ProductWorkLineLst_LastUser = grmi.NewField("LastUser", "[ME_ProductWorkLineLst].LastUser", "lastuser", grmi.TypeString) +var ProductWorkLineLst_CreateTime = grmi.NewField("CreateTime", "[ME_ProductWorkLineLst].CreateTime", "createtime", grmi.TypeDateTime) + +/****************************************************************************** + * + * @Description : ProductWorkLineLst的元数据 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ +var ProductWorkLineLst = grmi.NewEntity( + "ME_ProductWorkLineLst", + func() interface{} { return &model.ProductWorkLineLst{} }, + map[string]grmi.Field{ + ProductWorkLineLst_PlantNr.Name: ProductWorkLineLst_PlantNr, + ProductWorkLineLst_ProductId.Name: ProductWorkLineLst_ProductId, + ProductWorkLineLst_WorkLineId.Name: ProductWorkLineLst_WorkLineId, + ProductWorkLineLst_WorkLineDescr.Name: ProductWorkLineLst_WorkLineDescr, + ProductWorkLineLst_LastModify.Name: ProductWorkLineLst_LastModify, + ProductWorkLineLst_LastUser.Name: ProductWorkLineLst_LastUser, + ProductWorkLineLst_CreateTime.Name: ProductWorkLineLst_CreateTime, + }, + []string{"PlantNr"}, + []string{"WorkLineDescr", "LastUser"}) diff --git a/models/me/ProductWorkLineLst.model.go b/models/me/ProductWorkLineLst.model.go new file mode 100644 index 0000000..f77aea1 --- /dev/null +++ b/models/me/ProductWorkLineLst.model.go @@ -0,0 +1,48 @@ +// Copyright (c) Shenyang Leading Edge Intelligent Technology Co., Ltd. All rights reserved. + +package me + +import ( + "LAPP_ACURA_MOM_BACKEND/grmi" + "xorm.io/core" +) + +/****************************************************************************** + * + * @Struct Name : ProductWorkLineLst + *----------------------------------------------------------------------------- + * + * @Description : ProductWorkLineLst的实体映射 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ +type ProductWorkLineLst struct { + PlantNr int `xorm:"pk int 'PlantNr'" json:"ME_ProductWorkLineLst-PlantNr"` + ProductId string `xorm:"pk nvarchar(40) 'ProductId'" json:"ME_ProductWorkLineLst-ProductId"` + WorkLineId string `xorm:"pk nvarchar(40) 'WorkLineId'" json:"ME_ProductWorkLineLst-WorkLineId"` + WorkLineDescr string `xorm:"nvarchar(100) 'WorkLineDescr' not null" json:"ME_ProductWorkLineLst-WorkLineDescr"` + LastModify grmi.DateTime `xorm:"datetime 'LastModify' not null updated" json:"ME_ProductWorkLineLst-LastModify"` + LastUser string `xorm:"nvarchar(20) 'LastUser' not null" json:"ME_ProductWorkLineLst-LastUser"` + CreateTime grmi.DateTime `xorm:"datetime 'CreateTime' not null created" json:"ME_ProductWorkLineLst-CreateTime"` +} + +/****************************************************************************** + * + * @Function Name : GetKey + *----------------------------------------------------------------------------- + * + * @Description : 获取实体的主键 + * + * @Return Value : 实体的主键 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ +func (self *ProductWorkLineLst) GetKey() core.PK { + return core.PK{self.PlantNr, self.ProductId, self.WorkLineId} +} diff --git a/services/me/ProductWorkLineLst.service.go b/services/me/ProductWorkLineLst.service.go new file mode 100644 index 0000000..6e39a2d --- /dev/null +++ b/services/me/ProductWorkLineLst.service.go @@ -0,0 +1,239 @@ +// Copyright (c) Shenyang Leading Edge Intelligent Technology Co., Ltd. All rights reserved. + +package me + +import ( + "LAPP_ACURA_MOM_BACKEND/global" + "LAPP_ACURA_MOM_BACKEND/grmi" + model "LAPP_ACURA_MOM_BACKEND/models/me" + "LAPP_ACURA_MOM_BACKEND/services/me/implments" +) + +/****************************************************************************** + * + * @Interface Name : ProductWorkLineLstService + *----------------------------------------------------------------------------- + * + * @Description : ProductWorkLineLst的服务接口 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ +type ProductWorkLineLstService interface { + /****************************************************************************** + * + * @Function Name : InsertOne + *----------------------------------------------------------------------------- + * + * @Description : 插入一条ProductWorkLineLst + * + * @Function Parameters : 当前访问人员信息 + * + * @Function Parameters : 需要插入的ProductWorkLineLst + * + * @Return Value : 执行时发生的错误 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ + InsertOne(*global.User, *model.ProductWorkLineLst) error + /****************************************************************************** + * + * @Function Name : DeleteOne + *----------------------------------------------------------------------------- + * + * @Description : 删除指定键的ProductWorkLineLst + * + * @Function Parameters : 主键 + * + * @Function Parameters : 主键 + * + * @Return Value : 执行时发生的错误 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ + DeleteOne(*global.User, string, string) error + /****************************************************************************** + * + * @Function Name : SelectOne + *----------------------------------------------------------------------------- + * + * @Description : 查找指定键的ProductWorkLineLst + * + * @Function Parameters : 主键 + * + * @Function Parameters : 主键 + * + * @Return Value : 查找到的ProductWorkLineLst + * + * @Return Value : 执行时发生的错误 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ + SelectOne(*global.User, string, string) (*model.ProductWorkLineLst, error) + /****************************************************************************** + * + * @Function Name : UpdateOne + *----------------------------------------------------------------------------- + * + * @Description : 修改一条ProductWorkLineLst + * + * @Function Parameters : 当前访问人员信息 + * + * @Function Parameters : 需要修改的ProductWorkLineLst + * + * @Return Value : 执行时发生的错误 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ + UpdateOne(*global.User, *model.ProductWorkLineLst) error + /****************************************************************************** + * + * @Function Name : Insert + *----------------------------------------------------------------------------- + * + * @Description : 插入多条ProductWorkLineLst + * + * @Function Parameters : 当前访问人员信息 + * + * @Function Parameters : 需要插入的ProductWorkLineLst列表 + * + * @Return Value : 执行时发生的错误 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ + Insert(*global.User, *[]model.ProductWorkLineLst) error + /****************************************************************************** + * + * @Function Name : Delete + *----------------------------------------------------------------------------- + * + * @Description : 删除多条ProductWorkLineLst + * + * @Function Parameters : 当前访问人员信息 + * + * @Function Parameters : 需要删除的ProductWorkLineLst列表 + * + * @Return Value : 执行时发生的错误 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ + Delete(*global.User, *[]model.ProductWorkLineLst) error + /****************************************************************************** + * + * @Function Name : Select + *----------------------------------------------------------------------------- + * + * @Description : 查询ProductWorkLineLst + * + * @Function Parameters : 当前访问人员信息 + * + * @Function Parameters : 查询参数 + * + * @Return Value : 查询结果 + * + * @Return Value : 执行时发生的错误 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ + Select(*global.User, map[string]string) ([]model.ProductWorkLineLst, error) + /****************************************************************************** + * + * @Function Name : SelectAndPaging + *----------------------------------------------------------------------------- + * + * @Description : 查询ProductWorkLineLst + * + * @Function Parameters : 当前访问人员信息 + * + * @Function Parameters : 查询参数 + * + * @Return Value : 查询结果 + * + * @Return Value : 执行时发生的错误 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ + SelectAndPaging(*global.User, map[string]string) (grmi.PagingResult, error) + /****************************************************************************** + * + * @Function Name : Update + *----------------------------------------------------------------------------- + * + * @Description : 修改多条ProductWorkLineLst + * + * @Function Parameters : 当前访问人员信息 + * + * @Function Parameters : 需要修改的ProductWorkLineLst列表 + * + * @Return Value : 执行时发生的错误 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ + Update(*global.User, *[]model.ProductWorkLineLst) error + /****************************************************************************** + * + * @Function Name : Save + *----------------------------------------------------------------------------- + * + * @Description : 保存产品和产线关联关系 + * + * @Function Parameters : 当前访问人员信息 + * + * @Function Parameters : 需要修改的ArtWorkLineLst列表 + * + * @Return Value : 执行时发生的错误 + * + * @Author : zhangxin + * + * @Date : 2021-08-23 + * + ******************************************************************************/ + Save(*global.User, *model.ProductWorkLineData) error +} + +/****************************************************************************** + * + * @Function Name : NewProductWorkLineLstService + *----------------------------------------------------------------------------- + * + * @Description : 创建一个ProductWorkLineLstService + * + * @Return Value : ProductWorkLineLstService实例 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ +func NewProductWorkLineLstService() ProductWorkLineLstService { + return implments.NewProductWorkLineLstServiceImplement() +} diff --git a/services/me/implments/ProductWorkLineLst.service.impl.go b/services/me/implments/ProductWorkLineLst.service.impl.go new file mode 100644 index 0000000..294eeda --- /dev/null +++ b/services/me/implments/ProductWorkLineLst.service.impl.go @@ -0,0 +1,388 @@ +// Copyright (c) Shenyang Leading Edge Intelligent Technology Co., Ltd. All rights reserved. + +package implments + +import ( + baseDal "LAPP_ACURA_MOM_BACKEND/dao/base" + dal "LAPP_ACURA_MOM_BACKEND/dao/me" + "LAPP_ACURA_MOM_BACKEND/db" + "LAPP_ACURA_MOM_BACKEND/global" + "LAPP_ACURA_MOM_BACKEND/grmi" + meta "LAPP_ACURA_MOM_BACKEND/meta/me" + baseModel "LAPP_ACURA_MOM_BACKEND/models/base" + model "LAPP_ACURA_MOM_BACKEND/models/me" +) + +/****************************************************************************** + * + * @Description : ProductWorkLineLst的默认查询条件 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ +var DefaultConditionOfProductWorkLineLst = grmi.NewCondition( + map[string]grmi.ConditionItem{ + meta.ProductWorkLineLst_ProductId.UrlParameterName: grmi.NewConditionItem(meta.ProductWorkLineLst_ProductId, grmi.Equal, true), + meta.ProductWorkLineLst_WorkLineId.UrlParameterName: grmi.NewConditionItem(meta.ProductWorkLineLst_WorkLineId, grmi.Equal, true), + meta.ProductWorkLineLst_WorkLineDescr.UrlParameterName: grmi.NewConditionItem(meta.ProductWorkLineLst_WorkLineDescr, grmi.Equal, false), + meta.ProductWorkLineLst_LastModify.UrlParameterName: grmi.NewConditionItem(meta.ProductWorkLineLst_LastModify, grmi.Approximate, false), + meta.ProductWorkLineLst_LastUser.UrlParameterName: grmi.NewConditionItem(meta.ProductWorkLineLst_LastUser, grmi.Equal, false), + meta.ProductWorkLineLst_CreateTime.UrlParameterName: grmi.NewConditionItem(meta.ProductWorkLineLst_CreateTime, grmi.Approximate, false), + }, + nil, +) + +/****************************************************************************** + * + * @Description : ProductWorkLineLst的默认分页查询条件 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ +var DefaultConditionOfProductWorkLineLstAndPaging = grmi.NewCondition( + DefaultConditionOfProductWorkLineLst.Items, + grmi.NewPaging(), +) + +/****************************************************************************** + * + * @Struct Name : ProductWorkLineLstServiceImplement + *----------------------------------------------------------------------------- + * + * @Description : ProductWorkLineLst的服务实现 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ +type ProductWorkLineLstServiceImplement struct { +} + +/****************************************************************************** + * + * @Function Name : NewProductWorkLineLstDAOImplement + *----------------------------------------------------------------------------- + * + * @Description : 创建一个ProductWorkLineLstDAOImplement实例 + * + * @Return Value : ProductWorkLineLstDAOImplement实例 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ +func NewProductWorkLineLstServiceImplement() *ProductWorkLineLstServiceImplement { + return &ProductWorkLineLstServiceImplement{} +} + +/****************************************************************************** + * + * @Reference LAPP_ACURA_MOM_BACKEND/services/me/ProductWorkLineLstService.InsertOne + * + ******************************************************************************/ +func (impl *ProductWorkLineLstServiceImplement) InsertOne(user *global.User, entity *model.ProductWorkLineLst) error { + + grmi.Log(user, "/services/me/implments/ProductWorkLineLst.service.impl.go", "InsertOneProductWorkLineLst", "插入一个ProductWorkLineLst") + + engine := db.Eloquent.Master() + session := engine.NewSession() + defer session.Close() + dao := dal.NewProductWorkLineLstDAO(session, user.PlantNr, user.UserId) + record, err := dao.SelectOne(entity.ProductId, entity.WorkLineId) + if err != nil { + return err + } + if record != nil { + return grmi.NewBusinessError("已经存在相同主键的记录!") + } + err = dao.InsertOne(entity) + if err != nil { + return err + } + return nil +} + +/****************************************************************************** + * + * @Reference LAPP_ACURA_MOM_BACKEND/services/me/ProductWorkLineLstService.DeleteOne + * + ******************************************************************************/ +func (impl *ProductWorkLineLstServiceImplement) DeleteOne(user *global.User, productId string, workLineId string) error { + + grmi.Log(user, "/services/me/implments/ProductWorkLineLst.service.impl.go", "DeleteOneProductWorkLineLst", "删除一个ProductWorkLineLst") + + engine := db.Eloquent.Master() + session := engine.NewSession() + defer session.Close() + dao := dal.NewProductWorkLineLstDAO(session, user.PlantNr, user.UserId) + record, err := dao.SelectOne(productId, workLineId) + if err != nil { + return err + } + if record == nil { + return grmi.NewBusinessError("不存在指定记录!") + } + err = dao.DeleteOne(productId, workLineId) + if err != nil { + return err + } + return nil +} + +/****************************************************************************** + * + * @Reference LAPP_ACURA_MOM_BACKEND/services/me/ProductWorkLineLstService.SelectOne + * + ******************************************************************************/ +func (impl *ProductWorkLineLstServiceImplement) SelectOne(user *global.User, productId string, workLineId string) (*model.ProductWorkLineLst, error) { + + grmi.Log(user, "/services/me/implments/ProductWorkLineLst.service.impl.go", "SelectOneProductWorkLineLst", "查询一个ProductWorkLineLst") + + engine := db.Eloquent.Master() + session := engine.NewSession() + defer session.Close() + dao := dal.NewProductWorkLineLstDAO(session, user.PlantNr, user.UserId) + result, err := dao.SelectOne(productId, workLineId) + if err != nil { + return nil, err + } + return result, nil +} + +/****************************************************************************** + * + * @Reference LAPP_ACURA_MOM_BACKEND/services/me/ProductWorkLineLstService.UpdateOne + * + ******************************************************************************/ +func (impl *ProductWorkLineLstServiceImplement) UpdateOne(user *global.User, entity *model.ProductWorkLineLst) error { + + grmi.Log(user, "/services/me/implments/ProductWorkLineLst.service.impl.go", "UpdateOneProductWorkLineLst", "修改一个ProductWorkLineLst") + + engine := db.Eloquent.Master() + session := engine.NewSession() + defer session.Close() + dao := dal.NewProductWorkLineLstDAO(session, user.PlantNr, user.UserId) + record, err := dao.SelectOne(entity.ProductId, entity.WorkLineId) + if err != nil { + return err + } + if record == nil { + return grmi.NewBusinessError("不存在指定记录!") + } + err = dao.UpdateOne(entity) + if err != nil { + return err + } + return nil +} + +/****************************************************************************** + * + * @Reference LAPP_ACURA_MOM_BACKEND/services/me/ProductWorkLineLstService.Insert + * + ******************************************************************************/ +func (impl *ProductWorkLineLstServiceImplement) Insert(user *global.User, entities *[]model.ProductWorkLineLst) error { + + grmi.Log(user, "/services/me/implments/ProductWorkLineLst.service.impl.go", "InsertProductWorkLineLst", "插入多个ProductWorkLineLst") + + engine := db.Eloquent.Master() + session := engine.NewSession() + defer session.Close() + dao := dal.NewProductWorkLineLstDAO(session, user.PlantNr, user.UserId) + + for _, entity := range *entities { + record, err := dao.SelectOne(entity.ProductId, entity.WorkLineId) + if err != nil { + return err + } + if record != nil { + return grmi.NewBusinessError("已经存在相同主键的记录!") + } + } + + err := dao.Insert(entities) + if err != nil { + return err + } + return nil +} + +/****************************************************************************** + * + * @Reference LAPP_ACURA_MOM_BACKEND/services/me/ProductWorkLineLstService.Delete + * + ******************************************************************************/ +func (impl *ProductWorkLineLstServiceImplement) Delete(user *global.User, entities *[]model.ProductWorkLineLst) error { + + grmi.Log(user, "/services/me/implments/ProductWorkLineLst.service.impl.go", "DeleteProductWorkLineLst", "删除多个ProductWorkLineLst") + + engine := db.Eloquent.Master() + session := engine.NewSession() + defer session.Close() + dao := dal.NewProductWorkLineLstDAO(session, user.PlantNr, user.UserId) + + for _, entity := range *entities { + record, err := dao.SelectOne(entity.ProductId, entity.WorkLineId) + if err != nil { + return err + } + if record == nil { + return grmi.NewBusinessError("不存在指定记录!") + } + } + + err := dao.Delete(entities) + if err != nil { + return err + } + return nil +} + +/****************************************************************************** + * + * @Reference LAPP_ACURA_MOM_BACKEND/services/me/ProductWorkLineLstService.Select + * + ******************************************************************************/ +func (impl *ProductWorkLineLstServiceImplement) Select(user *global.User, urlParameters map[string]string) ([]model.ProductWorkLineLst, error) { + + grmi.Log(user, "/services/me/implments/ProductWorkLineLst.service.impl.go", "SelectProductWorkLineLst", "查询ProductWorkLineLst") + + condition := DefaultConditionOfProductWorkLineLstAndPaging + engine := db.Eloquent.Master() + session := engine.NewSession() + defer session.Close() + predicates, err := condition.BuildPredicates(urlParameters) + if err != nil { + return nil, err + } + dao := dal.NewProductWorkLineLstDAO(session, user.PlantNr, user.UserId) + result, err := dao.Select(predicates, condition.OrderByFields) + if err != nil { + return nil, err + } + return result, nil +} + +/****************************************************************************** + * + * @Reference LAPP_ACURA_MOM_BACKEND/services/me/ProductWorkLineLstService.SelectAndPaging + * + ******************************************************************************/ +func (impl *ProductWorkLineLstServiceImplement) SelectAndPaging(user *global.User, urlParameters map[string]string) (grmi.PagingResult, error) { + + grmi.Log(user, "/services/me/implments/ProductWorkLineLst.service.impl.go", "SelectProductWorkLineLst", "查询ProductWorkLineLst") + + condition := DefaultConditionOfProductWorkLineLstAndPaging + engine := db.Eloquent.Master() + session := engine.NewSession() + defer session.Close() + predicates, err := condition.BuildPredicates(urlParameters) + if err != nil { + return grmi.EmptyPagingResult, err + } + dao := dal.NewProductWorkLineLstDAO(session, user.PlantNr, user.UserId) + condition.Fill(urlParameters) + result, err := dao.SelectAndPaging(condition.Paging, predicates, condition.OrderByFields) + if err != nil { + return grmi.EmptyPagingResult, err + } + return result, nil +} + +/****************************************************************************** + * + * @Reference LAPP_ACURA_MOM_BACKEND/services/me/ProductWorkLineLstService.Update + * + ******************************************************************************/ +func (impl *ProductWorkLineLstServiceImplement) Update(user *global.User, entities *[]model.ProductWorkLineLst) error { + + grmi.Log(user, "/services/me/implments/ProductWorkLineLst.service.impl.go", "UpdateProductWorkLineLst", "修改多个ProductWorkLineLst") + + engine := db.Eloquent.Master() + session := engine.NewSession() + defer session.Close() + dao := dal.NewProductWorkLineLstDAO(session, user.PlantNr, user.UserId) + + for _, entity := range *entities { + record, err := dao.SelectOne(entity.ProductId, entity.WorkLineId) + if err != nil { + return err + } + if record == nil { + return grmi.NewBusinessError("不存在指定记录!") + } + } + + err := dao.Update(entities) + if err != nil { + return err + } + return nil +} + +/****************************************************************************** + * + * @Reference LAPP_ACURA_MOM_BACKEND/services/base/ProductWorkLineLstService.InsertOne + * + ******************************************************************************/ +func (impl *ProductWorkLineLstServiceImplement) Save(user *global.User, entity *model.ProductWorkLineData) error { + + grmi.Log(user, "/services/base/implments/ArtWorkLineLstService.service.impl.go", "Save", "bao ") + + engine := db.Eloquent.Master() + session := engine.NewSession() + defer session.Close() + if err := session.Begin(); err != nil { + return err + } + dao := dal.NewProductWorkLineLstDAO(session, user.PlantNr, user.UserId) + productDao := dal.NewProductDAO(session, user.PlantNr, user.UserId) + workLineDao := baseDal.NewWorkLineDAO(session, user.PlantNr, user.UserId) + productId := entity.ProductId + li := entity.ProductWorkLineLstLi + product, err := productDao.SelectOne(productId) + if err != nil { + _ = session.Rollback() + return grmi.NewBusinessError("查询产品数据失败, error:" + err.Error()) + } + if product == nil { + _ = session.Rollback() + return grmi.NewBusinessError("不存在对应的产品, 产品ID:" + productId) + } + for index, data := range li { + data.ProductId = productId + workLine, err := workLineDao.SelectOne(data.WorkLineId) + if err != nil { + _ = session.Rollback() + return grmi.NewBusinessError("查询产线数据失败, error:" + err.Error()) + } + if workLine == nil { + _ = session.Rollback() + return grmi.NewBusinessError("不存在对应的产线, 产线ID:" + data.WorkLineId) + } + if workLine.LineType != baseModel.WORK_LINE_TYPE_REAL { + _ = session.Rollback() + return grmi.NewBusinessError("关联的产线不是实体产线, 产线ID:" + data.WorkLineId) + } + data.WorkLineDescr = workLine.Descr + li[index] = data + } + err = dao.DeleteWhere([]grmi.Predicate{meta.ProductWorkLineLst_ProductId.NewPredicate(grmi.Equal, productId)}) + if err != nil { + _ = session.Rollback() + return grmi.NewBusinessError("删除原有数据失败, error:" + err.Error()) + } + err = dao.Insert(&li) + if err != nil { + _ = session.Rollback() + return grmi.NewBusinessError("保存失败, error:" + err.Error()) + } + _ = session.Commit() + return nil +} diff --git a/web/controllers/me/ProductWorkLineLst.rest.go b/web/controllers/me/ProductWorkLineLst.rest.go new file mode 100644 index 0000000..446e311 --- /dev/null +++ b/web/controllers/me/ProductWorkLineLst.rest.go @@ -0,0 +1,443 @@ +// Copyright (c) Shenyang Leading Edge Intelligent Technology Co., Ltd. All rights reserved. + +package me + +import ( + "LAPP_ACURA_MOM_BACKEND/global" + "LAPP_ACURA_MOM_BACKEND/grmi" + model "LAPP_ACURA_MOM_BACKEND/models/me" + "LAPP_ACURA_MOM_BACKEND/web/middleware/jwts" + "LAPP_ACURA_MOM_BACKEND/web/supports" + "github.com/kataras/iris/v12" + "github.com/kataras/iris/v12/core/router" +) + +/****************************************************************************** + * + * @Function Name : RegisterOneProductWorkLineLst + *----------------------------------------------------------------------------- + * + * @Description : 为一个处理单条ProductWorkLineLst的方法注册路由 + * + * @Function Parameters : 路由分组 + * + * @Function Parameters : HTTP方法 + * + * @Function Parameters : 路径 + * + * @Function Parameters : 实际处理请求的方法 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ +func RegisterOneProductWorkLineLst(party router.Party, httpMethod string, path string, method func(*global.User, *model.ProductWorkLineLst) error) { + + party.Handle(httpMethod, path, func(ctx iris.Context) { + user, ok := jwts.ParseToken(ctx) + if !ok { + supports.Error(ctx, iris.StatusBadRequest, supports.ParseParamsFailur, nil) + return + } + + var err error = nil + + entity := new(model.ProductWorkLineLst) + if ctx.GetContentLength() > 0 { + err := ctx.ReadJSON(entity) + if err != nil { + supports.Error(ctx, iris.StatusBadRequest, err.Error(), nil) + return + } + } else { + entity = nil + } + + err = method(user, entity) + if err != nil { + supports.Error(ctx, iris.StatusBadRequest, err.Error(), nil) + return + } + supports.Ok(ctx, supports.OptionSuccess, nil) + }) +} + +/****************************************************************************** + * + * @Function Name : RegisterIDOfProductWorkLineLst + *----------------------------------------------------------------------------- + * + * @Description : 为一个通过主键处理单条ProductWorkLineLst的方法注册路由 + * + * @Function Parameters : 路由分组 + * + * @Function Parameters : HTTP方法 + * + * @Function Parameters : 路径 + * + * @Function Parameters : 实际处理请求的方法 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ +func RegisterIDOfProductWorkLineLst(party router.Party, httpMethod string, path string, method func(*global.User, string, string) error) { + + party.Handle(httpMethod, path, func(ctx iris.Context) { + user, ok := jwts.ParseToken(ctx) + if !ok { + supports.Error(ctx, iris.StatusBadRequest, supports.ParseParamsFailur, nil) + return + } + + var err error = nil + productId := ctx.Params().GetString("productId") + workLineId := ctx.Params().GetString("workLineId") + + err = method(user, productId, workLineId) + if err != nil { + supports.Error(ctx, iris.StatusBadRequest, err.Error(), nil) + return + } + supports.Ok(ctx, supports.OptionSuccess, nil) + }) +} + +/****************************************************************************** + * + * @Function Name : RegisterInsertOneProductWorkLineLst + *----------------------------------------------------------------------------- + * + * @Description : 为一个插入单条ProductWorkLineLst的方法注册路由 + * + * @Function Parameters : 路由分组 + * + * @Function Parameters : 路径 + * + * @Function Parameters : 实际处理请求的方法 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ +func RegisterInsertOneProductWorkLineLst(party router.Party, path string, method func(*global.User, *model.ProductWorkLineLst) error) { + + RegisterOneProductWorkLineLst(party, "POST", path, method) +} + +/****************************************************************************** + * + * @Function Name : RegisterDeleteOneProductWorkLineLst + *----------------------------------------------------------------------------- + * + * @Description : 为一个删除单条ProductWorkLineLst的方法注册路由 + * + * @Function Parameters : 路由分组 + * + * @Function Parameters : 路径 + * + * @Function Parameters : 实际处理请求的方法 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ +func RegisterDeleteOneProductWorkLineLst(party router.Party, path string, method func(*global.User, string, string) error) { + + RegisterIDOfProductWorkLineLst(party, "DELETE", path+"/{productId:string}/{workLineId:string}", method) +} + +/****************************************************************************** + * + * @Function Name : RegisterSelectOneProductWorkLineLst + *----------------------------------------------------------------------------- + * + * @Description : 为一个查找单条ProductWorkLineLst的方法注册路由 + * + * @Function Parameters : 路由分组 + * + * @Function Parameters : 路径 + * + * @Function Parameters : 实际处理请求的方法 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ +func RegisterSelectOneProductWorkLineLst(party router.Party, path string, method func(*global.User, string, string) (*model.ProductWorkLineLst, error)) { + + party.Get(path+"/{productId:string}/{workLineId:string}", func(ctx iris.Context) { + user, ok := jwts.ParseToken(ctx) + if !ok { + supports.Error(ctx, iris.StatusBadRequest, supports.ParseParamsFailur, nil) + return + } + + productId := ctx.Params().GetString("productId") + workLineId := ctx.Params().GetString("workLineId") + result, err := method(user, productId, workLineId) + if err != nil { + supports.Error(ctx, iris.StatusBadRequest, err.Error(), nil) + return + } + if result == nil { + supports.Error(ctx, iris.StatusNotFound, supports.NotFound, nil) + return + } + supports.Ok(ctx, supports.OptionSuccess, result) + }) +} + +/****************************************************************************** + * + * @Function Name : RegisterUpdateOneProductWorkLineLst + *----------------------------------------------------------------------------- + * + * @Description : 为一个修改单条ProductWorkLineLst的方法注册路由 + * + * @Function Parameters : 路由分组 + * + * @Function Parameters : 路径 + * + * @Function Parameters : 实际处理请求的方法 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ +func RegisterUpdateOneProductWorkLineLst(party router.Party, path string, method func(*global.User, *model.ProductWorkLineLst) error) { + + RegisterOneProductWorkLineLst(party, "PUT", path, method) +} + +/****************************************************************************** + * + * @Function Name : RegisterMultiProductWorkLineLst + *----------------------------------------------------------------------------- + * + * @Description : 为一个处理多条ProductWorkLineLst的方法注册路由 + * + * @Function Parameters : 路由分组 + * + * @Function Parameters : HTTP方法 + * + * @Function Parameters : 路径 + * + * @Function Parameters : 实际处理请求的方法 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ +func RegisterMultiProductWorkLineLst(party router.Party, httpMethod string, path string, method func(*global.User, *[]model.ProductWorkLineLst) error) { + + party.Handle(httpMethod, path, func(ctx iris.Context) { + user, ok := jwts.ParseToken(ctx) + if !ok { + supports.Error(ctx, iris.StatusBadRequest, supports.ParseParamsFailur, nil) + return + } + + entities := make([]model.ProductWorkLineLst, 0, 10) + err := ctx.ReadJSON(&entities) + if err != nil { + supports.Error(ctx, iris.StatusBadRequest, err.Error(), nil) + return + } + + err = method(user, &entities) + if err != nil { + supports.Error(ctx, iris.StatusBadRequest, err.Error(), nil) + return + } + supports.Ok(ctx, supports.OptionSuccess, nil) + }) +} + +/****************************************************************************** + * + * @Function Name : RegisterInsertProductWorkLineLst + *----------------------------------------------------------------------------- + * + * @Description : 为一个插入多条ProductWorkLineLst的方法注册路由 + * + * @Function Parameters : 路由分组 + * + * @Function Parameters : 路径 + * + * @Function Parameters : 实际处理请求的方法 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ +func RegisterInsertProductWorkLineLst(party router.Party, path string, method func(*global.User, *[]model.ProductWorkLineLst) error) { + + RegisterMultiProductWorkLineLst(party, "POST", path, method) +} + +/****************************************************************************** + * + * @Function Name : RegisterDeleteProductWorkLineLst + *----------------------------------------------------------------------------- + * + * @Description : 为一个删除多条ProductWorkLineLst的方法注册路由 + * + * @Function Parameters : 路由分组 + * + * @Function Parameters : 路径 + * + * @Function Parameters : 实际处理请求的方法 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ +func RegisterDeleteProductWorkLineLst(party router.Party, path string, method func(*global.User, *[]model.ProductWorkLineLst) error) { + + RegisterMultiProductWorkLineLst(party, "DELETE", path, method) +} + +/****************************************************************************** + * + * @Function Name : RegisterSelectProductWorkLineLst + *----------------------------------------------------------------------------- + * + * @Description : 为一个查询ProductWorkLineLst的方法注册路由 + * + * @Function Parameters : 路由分组 + * + * @Function Parameters : 路径 + * + * @Function Parameters : 实际处理请求的方法 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ +func RegisterSelectProductWorkLineLst(party router.Party, path string, method func(*global.User, map[string]string) ([]model.ProductWorkLineLst, error)) { + + party.Get(path, func(ctx iris.Context) { + user, ok := jwts.ParseToken(ctx) + if !ok { + supports.Error(ctx, iris.StatusBadRequest, supports.ParseParamsFailur, nil) + return + } + + result, err := method(user, ctx.URLParams()) + if err != nil { + supports.Error(ctx, iris.StatusBadRequest, err.Error(), nil) + return + } + supports.Ok(ctx, supports.OptionSuccess, result) + }) +} + +/****************************************************************************** + * + * @Function Name : RegisterQueryProductWorkLineLst + *----------------------------------------------------------------------------- + * + * @Description : 为一个查询ProductWorkLineLst并分页的方法注册路由 + * + * @Function Parameters : 路由分组 + * + * @Function Parameters : 路径 + * + * @Function Parameters : 实际处理请求的方法 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ +func RegisterQueryProductWorkLineLst(party router.Party, path string, method func(*global.User, map[string]string) (grmi.PagingResult, error)) { + + party.Get(path, func(ctx iris.Context) { + user, ok := jwts.ParseToken(ctx) + if !ok { + supports.Error(ctx, iris.StatusBadRequest, supports.ParseParamsFailur, nil) + return + } + + result, err := method(user, ctx.URLParams()) + if err != nil { + supports.Error(ctx, iris.StatusBadRequest, err.Error(), nil) + return + } + supports.Ok(ctx, supports.OptionSuccess, result) + }) +} + +/****************************************************************************** + * + * @Function Name : RegisterUpdateProductWorkLineLst + *----------------------------------------------------------------------------- + * + * @Description : 为一个修改多条ProductWorkLineLst的方法注册路由 + * + * @Function Parameters : 路由分组 + * + * @Function Parameters : 路径 + * + * @Function Parameters : 实际处理请求的方法 + * + * @Author : 代码生成器创建 + * + * @Date : 2021-10-28 13:12:09 + * + ******************************************************************************/ +func RegisterUpdateProductWorkLineLst(party router.Party, path string, method func(*global.User, *[]model.ProductWorkLineLst) error) { + + RegisterMultiProductWorkLineLst(party, "PUT", path, method) +} + +/****************************************************************************** + * + * @Function Name : RegisterSaveProductWorkLineLst + *----------------------------------------------------------------------------- + * + * @Description : 为一个保存ProductWorkLineLst的方法注册路由 + * + * @Function Parameters : 路由分组 + * + * @Function Parameters : 路径 + * + * @Function Parameters : 实际处理请求的方法 + * + * @Author : zhangxin + * + * @Date : 2021-10-28 + * + ******************************************************************************/ +func RegisterSaveProductWorkLineLst(party router.Party, path string, method func(*global.User, *model.ProductWorkLineData) error) { + + party.Post(path, func(ctx iris.Context) { + user, ok := jwts.ParseToken(ctx) + if !ok { + return + } + + var entity model.ProductWorkLineData + if err := ctx.ReadJSON(&entity); err != nil { + supports.Error(ctx, iris.StatusBadRequest, supports.ParseParamsFailur, nil) + return + } + err := method(user, &entity) + if err != nil { + supports.Error(ctx, iris.StatusBadRequest, err.Error(), nil) + return + } + supports.Ok(ctx, supports.OptionSuccess, nil) + }) +} diff --git a/web/controllers/me/me.go b/web/controllers/me/me.go index 188c70c..6c88c86 100644 --- a/web/controllers/me/me.go +++ b/web/controllers/me/me.go @@ -24,8 +24,6 @@ func RegisterRoutes() { // 模块me路由分组 grmi.RegisterRouteMapping("/me", func(party router.Party) { - - // Project的路由组 project := party.Party("/project") // Project的服务实例 @@ -156,7 +154,6 @@ func RegisterRoutes() { // BomLst修改多条 // RegisterUpdateBomLst(bomlst, "/update", serviceOfBomLst.Update) - // ProductFamilyRelate的路由组 productfamilyrelate := party.Party("/productfamilyrelate") // ProductFamilyRelate的服务实例 @@ -179,6 +176,32 @@ func RegisterRoutes() { // RegisterUpdateOneProductFamilyRelate(productfamilyrelate, "/updateone", serviceOfProductFamilyRelate.UpdateOne) // ProductFamilyRelate修改多条 // RegisterUpdateProductFamilyRelate(productfamilyrelate, "/update", serviceOfProductFamilyRelate.Update) + + // ProductWorkLineLst的路由组 + productworklinelst := party.Party("/productworklinelst") + // ProductWorkLineLst的服务实例 + var serviceOfProductWorkLineLst = svr.NewProductWorkLineLstService() + // ProductWorkLineLst插入一条 + //RegisterInsertOneProductWorkLineLst(productworklinelst, "/insertone", serviceOfProductWorkLineLst.InsertOne) + // ProductWorkLineLst插入多条 + // RegisterInsertProductWorkLineLst(productworklinelst, "/insert", serviceOfProductWorkLineLst.Insert) + // ProductWorkLineLst删除一条 + //RegisterDeleteOneProductWorkLineLst(productworklinelst, "/deleteone", serviceOfProductWorkLineLst.DeleteOne) + // ProductWorkLineLst删除多条 + // RegisterDeleteProductWorkLineLst(productworklinelst, "/delete", serviceOfProductWorkLineLst.Delete) + // ProductWorkLineLst查询多条 + RegisterSelectProductWorkLineLst(productworklinelst, "/selectlist", serviceOfProductWorkLineLst.Select) + // ProductWorkLineLst查询多条并分页 + RegisterQueryProductWorkLineLst(productworklinelst, "/query", serviceOfProductWorkLineLst.SelectAndPaging) + // ProductWorkLineLst查询一条 + RegisterSelectOneProductWorkLineLst(productworklinelst, "/selectone", serviceOfProductWorkLineLst.SelectOne) + // ProductWorkLineLst修改一条 + //RegisterUpdateOneProductWorkLineLst(productworklinelst, "/updateone", serviceOfProductWorkLineLst.UpdateOne) + // ProductWorkLineLst修改多条 + // RegisterUpdateProductWorkLineLst(productworklinelst, "/update", serviceOfProductWorkLineLst.Update) + // ProductWorkLineLst 保存关联关系 + RegisterSaveProductWorkLineLst(productworklinelst, "/save", serviceOfProductWorkLineLst.Save) + }) }