feat:完善信息

This commit is contained in:
henry
2022-01-26 16:14:16 +08:00
parent 180f63de42
commit 0368be6f11
8 changed files with 57 additions and 21 deletions

View File

@ -184,7 +184,9 @@ func (c *Examine) Launch(id uint64, identity, status int, remark string, params
return err
}
return orm.GetDB().Transaction(func(tx *gorm.DB) error {
values := map[string]interface{}{"examine_status": status, "examine_remark": remark, "updated_at": time.Now()}
values := map[string]interface{}{
//"examine_status": status,
"examine_remark": remark, "updated_at": time.Now()}
if identity == config.TenantUserIdentityForCompany {
for k, v := range params {

View File

@ -9,6 +9,7 @@ import (
config2 "SciencesServer/config"
"SciencesServer/utils"
"errors"
"fmt"
"time"
)
@ -35,8 +36,10 @@ type (
}
// ExpertDetail 专家详细信息
ExpertDetail struct {
ID string `json:"id"`
TenantID string `json:"tenant_id"`
ID string `json:"id"`
TenantID string `json:"tenant_id"`
ResearchID string `json:"research_id"`
LaboratoryID string `json:"laboratory_id"`
*model2.ManageExpert
Industrys []*config.Industry `json:"industrys"`
Keywords []string `json:"keywords"`
@ -112,6 +115,8 @@ func (c *Expert) Detail(id uint64) (*ExpertDetail, error) {
return &ExpertDetail{
ID: out.GetEncodeID(),
TenantID: out.GetEncodeTenantID(),
ResearchID: (&model2.Model{ID: out.ResearchID}).GetEncodeID(),
LaboratoryID: (&model2.Model{ID: out.LaboratoryID}).GetEncodeID(),
ManageExpert: out.ManageExpert,
Industrys: _industrys,
Keywords: out.GetKeywordAttribute(),
@ -148,6 +153,7 @@ func (c *Expert) Form(params *BasicParams, other *config.IdentityForExpert) erro
}
}
}
fmt.Println(utils.AnyToJSON(other))
mManageExpert.TenantID = c.TenantID
mManageExpert.ResearchID = other.ConvertResearch()
mManageExpert.LaboratoryID = other.ConvertLaboratory()

View File

@ -91,15 +91,13 @@ func (c *Laboratory) Select(tenantID, researchID uint64) ([]*LaboratorySelect, e
out := make([]*model2.ManageResearch, 0)
where := []*model2.ModelWhereOrder{
&model2.ModelWhereOrder{
Where: model2.NewWhere("tenant_id", tenantID)},
&model2.ModelWhereOrder{
Where: model2.NewWhere("examine_status", model2.ExamineStatusForAgree)},
}
if researchID > 0 {
where = append(where, &model2.ModelWhereOrder{
Where: model2.NewWhere("research_id", tenantID)})
Where: model2.NewWhere("research_id", researchID)})
}
if err := model2.ScanFields(mManageResearch.ManageResearch, &out, []string{"id", "name"}, where...); err != nil {
return nil, err