feat:优化项目信息,待测试修改

This commit is contained in:
henry
2022-02-06 18:01:32 +08:00
parent c8578940bf
commit a25464289f
25 changed files with 404 additions and 483 deletions

View File

@ -174,9 +174,9 @@ func (c *Index) static() (*InstanceStaticInfo, error) {
return nil, err
}
// 专利信息
mSysPatent := model.NewSysPatent()
mTechnologyPatent := model.NewTechnologyPatent()
if err = model2.Count(mSysPatent.SysPatent, &out.PatentCount, model2.NewWhere("shelf_status", model2.ShelfStatusForUp)); err != nil {
if err = model2.Count(mTechnologyPatent.TechnologyPatent, &out.PatentCount, model2.NewWhere("shelf_status", model2.ShelfStatusForUp)); err != nil {
return nil, err
}
//成果信息
@ -250,8 +250,8 @@ func (c *Index) DistributionDemand(province, city string) (map[string]*InstanceD
// DistributionPatent 专利信息
func (c *Index) DistributionPatent(province, city string) (map[string]*InstanceDistributionDetailInfo, error) {
mSysPatent := model.NewSysPatent()
out, err := mSysPatent.Distribution()
mTechnologyPatent := model.NewTechnologyPatent()
out, err := mTechnologyPatent.Distribution()
if err != nil {
return nil, err
@ -281,9 +281,9 @@ func (c *Index) DistributionAchievementAndPatent(province, city string) (map[str
var err error
mSysPatent := model.NewSysPatent()
mTechnologyPatent := model.NewTechnologyPatent()
// 专利信息
if patent, err = mSysPatent.Distribution(); err != nil {
if patent, err = mTechnologyPatent.Distribution(); err != nil {
return nil, err
}
mTechnologyAchievement := model.NewTechnologyAchievement()
@ -329,8 +329,6 @@ func (c *Index) Instance() (*InstanceInfo, error) {
func NewIndex() IndexHandle {
return func(session *session.Enterprise) *Index {
return &Index{
session,
}
return &Index{session}
}
}