|
@ -45,6 +45,7 @@ var DefaultConditionOfPlant = grmi.NewCondition( |
|
|
meta.Plant_AccountBank.UrlParameterName: grmi.NewConditionItem(meta.Plant_AccountBank, grmi.Equal, false), |
|
|
meta.Plant_AccountBank.UrlParameterName: grmi.NewConditionItem(meta.Plant_AccountBank, grmi.Equal, false), |
|
|
meta.Plant_AccountNr.UrlParameterName: grmi.NewConditionItem(meta.Plant_AccountNr, grmi.Equal, false), |
|
|
meta.Plant_AccountNr.UrlParameterName: grmi.NewConditionItem(meta.Plant_AccountNr, grmi.Equal, false), |
|
|
meta.Plant_Currency.UrlParameterName: grmi.NewConditionItem(meta.Plant_Currency, grmi.Equal, false), |
|
|
meta.Plant_Currency.UrlParameterName: grmi.NewConditionItem(meta.Plant_Currency, grmi.Equal, false), |
|
|
|
|
|
meta.Plant_PlantProject.UrlParameterName: grmi.NewConditionItem(meta.Plant_PlantProject, grmi.Equal, false), |
|
|
meta.Plant_LastModify.UrlParameterName: grmi.NewConditionItem(meta.Plant_LastModify, grmi.Approximate, false), |
|
|
meta.Plant_LastModify.UrlParameterName: grmi.NewConditionItem(meta.Plant_LastModify, grmi.Approximate, false), |
|
|
meta.Plant_LastUser.UrlParameterName: grmi.NewConditionItem(meta.Plant_LastUser, grmi.Equal, false), |
|
|
meta.Plant_LastUser.UrlParameterName: grmi.NewConditionItem(meta.Plant_LastUser, grmi.Equal, false), |
|
|
meta.Plant_CreateTime.UrlParameterName: grmi.NewConditionItem(meta.Plant_CreateTime, grmi.Approximate, false), |
|
|
meta.Plant_CreateTime.UrlParameterName: grmi.NewConditionItem(meta.Plant_CreateTime, grmi.Approximate, false), |
|
@ -396,7 +397,7 @@ func (impl *PlantServiceImplement) GetAllProjectsOfPlant(user *global.User) ([]m |
|
|
projectDataLi := make([]model.PlantDataTree, 0, len(projectLi)) |
|
|
projectDataLi := make([]model.PlantDataTree, 0, len(projectLi)) |
|
|
for _, project := range projectLi { |
|
|
for _, project := range projectLi { |
|
|
projectData := model.PlantDataTree{ |
|
|
projectData := model.PlantDataTree{ |
|
|
ItemId: project.ProjectId, |
|
|
|
|
|
|
|
|
ItemId: project.ProjectId, |
|
|
ItemDesc: project.Descr, |
|
|
ItemDesc: project.Descr, |
|
|
} |
|
|
} |
|
|
productFamilyLi, err := productFamilyDao.Select([]grmi.Predicate{meMeta.ProductFamily_ProjectId.NewPredicate(grmi.Equal, project.ProjectId)}, []grmi.Field{meMeta.ProductFamily_ProductFamilyId}) |
|
|
productFamilyLi, err := productFamilyDao.Select([]grmi.Predicate{meMeta.ProductFamily_ProjectId.NewPredicate(grmi.Equal, project.ProjectId)}, []grmi.Field{meMeta.ProductFamily_ProductFamilyId}) |
|
@ -406,7 +407,7 @@ func (impl *PlantServiceImplement) GetAllProjectsOfPlant(user *global.User) ([]m |
|
|
productFamilyDataLi := make([]model.PlantDataTree, 0, len(productFamilyLi)) |
|
|
productFamilyDataLi := make([]model.PlantDataTree, 0, len(productFamilyLi)) |
|
|
for _, productFamily := range productFamilyLi { |
|
|
for _, productFamily := range productFamilyLi { |
|
|
productFamilyData := model.PlantDataTree{ |
|
|
productFamilyData := model.PlantDataTree{ |
|
|
ItemId: productFamily.ProductFamilyId, |
|
|
|
|
|
|
|
|
ItemId: productFamily.ProductFamilyId, |
|
|
ItemDesc: productFamily.Descr, |
|
|
ItemDesc: productFamily.Descr, |
|
|
} |
|
|
} |
|
|
productLi, err := productFamilyRelateDao.SelectProductByFamilyId(project.ProjectId, productFamily.ProductFamilyId) |
|
|
productLi, err := productFamilyRelateDao.SelectProductByFamilyId(project.ProjectId, productFamily.ProductFamilyId) |
|
@ -416,9 +417,9 @@ func (impl *PlantServiceImplement) GetAllProjectsOfPlant(user *global.User) ([]m |
|
|
productDataLi := make([]model.PlantDataTree, 0, len(productLi)) |
|
|
productDataLi := make([]model.PlantDataTree, 0, len(productLi)) |
|
|
for _, product := range productLi { |
|
|
for _, product := range productLi { |
|
|
productData := model.PlantDataTree{ |
|
|
productData := model.PlantDataTree{ |
|
|
ItemId: product.ProductId, |
|
|
|
|
|
|
|
|
ItemId: product.ProductId, |
|
|
ItemDesc: product.Descr, |
|
|
ItemDesc: product.Descr, |
|
|
IsEnd: true, |
|
|
|
|
|
|
|
|
IsEnd: true, |
|
|
} |
|
|
} |
|
|
productDataLi = append(productDataLi, productData) |
|
|
productDataLi = append(productDataLi, productData) |
|
|
} |
|
|
} |
|
@ -435,7 +436,6 @@ func (impl *PlantServiceImplement) GetAllProjectsOfPlant(user *global.User) ([]m |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/****************************************************************************** |
|
|
/****************************************************************************** |
|
|
* |
|
|
* |
|
|
* @Reference LAPP_ACURA_MOM_BACKEND/services/base/PlantService.GetAllWorkLineOfPlant |
|
|
* @Reference LAPP_ACURA_MOM_BACKEND/services/base/PlantService.GetAllWorkLineOfPlant |
|
@ -454,7 +454,7 @@ func (impl *PlantServiceImplement) GetAllWorkLineOfPlant(user *global.User) ([]m |
|
|
result := make([]model.WorkLineOfPlant, 0, 1) |
|
|
result := make([]model.WorkLineOfPlant, 0, 1) |
|
|
for _, plant := range plantLi { |
|
|
for _, plant := range plantLi { |
|
|
plantData := model.WorkLineOfPlant{ |
|
|
plantData := model.WorkLineOfPlant{ |
|
|
ItemId: plant.PlantNr, |
|
|
|
|
|
|
|
|
ItemId: plant.PlantNr, |
|
|
ItemDesc: plant.Name1, |
|
|
ItemDesc: plant.Name1, |
|
|
Children: make([]model.WorkLineOfPlant, 0), |
|
|
Children: make([]model.WorkLineOfPlant, 0), |
|
|
} |
|
|
} |
|
@ -465,13 +465,13 @@ func (impl *PlantServiceImplement) GetAllWorkLineOfPlant(user *global.User) ([]m |
|
|
} |
|
|
} |
|
|
for _, workLine := range workLineLi { |
|
|
for _, workLine := range workLineLi { |
|
|
data := model.WorkLineOfPlant{ |
|
|
data := model.WorkLineOfPlant{ |
|
|
ItemId: workLine.WorkLineid, |
|
|
|
|
|
|
|
|
ItemId: workLine.WorkLineid, |
|
|
ItemDesc: workLine.Descr, |
|
|
ItemDesc: workLine.Descr, |
|
|
IsEnd: true, |
|
|
|
|
|
|
|
|
IsEnd: true, |
|
|
} |
|
|
} |
|
|
plantData.Children = append(plantData.Children, data) |
|
|
plantData.Children = append(plantData.Children, data) |
|
|
} |
|
|
} |
|
|
result = append(result, plantData) |
|
|
result = append(result, plantData) |
|
|
} |
|
|
} |
|
|
return result, nil |
|
|
return result, nil |
|
|
} |
|
|
|
|
|
|
|
|
} |