kobe6258 пре 1 месец
родитељ
комит
4f763f2a3a

+ 71 - 0
models/data_manage/lz_data.go

@@ -1,6 +1,7 @@
 package data_manage
 
 import (
+	"eta/eta_api/utils"
 	"github.com/beego/beego/v2/client/orm"
 	"time"
 )
@@ -28,6 +29,7 @@ func GetLzFrequencyByClassifyId(breedId int) (items []*LzFrequency, err error) {
 	return
 }
 
+// [2025-zsh-时间类型修复-chenhan]
 type LongzhongSurveyProduct struct {
 	SurveyProductId      int `orm:"column(survey_product_id);pk"`
 	ProjectQuotaId       int64
@@ -58,7 +60,76 @@ type LongzhongSurveyProduct struct {
 	ModifyTime           time.Time
 	LzCode               string
 }
+type LongzhongSurveyProductOrm struct {
+	SurveyProductId      int `orm:"column(survey_product_id);pk"`
+	ProjectQuotaId       int64
+	BreedId              string
+	BreedName            string
+	QuotaId              string
+	QuotaName            string
+	UnitId               string
+	UnitName             string
+	SampleType           int64
+	SampleId             string
+	SampleName           string
+	DeviceId             string
+	Device               string
+	ProductCraftId       string
+	ProductCraft         string
+	ProductLine          string
+	InputMode            int64
+	Frequency            int64
+	InputValue           string
+	TaskShouldFinishTime int
+	CustomId             string
+	CustomType           int64
+	Custom               string
+	QuotaSampleId        int64
+	StartDate            time.Time
+	EndDate              time.Time
+	ModifyTime           time.Time
+	LzCode               string
+}
 
+func (obj *LongzhongSurveyProductOrm) toView() *LongzhongSurveyProduct {
+	return &LongzhongSurveyProduct{
+		SurveyProductId:      obj.SurveyProductId,
+		ProjectQuotaId:       obj.ProjectQuotaId,
+		BreedId:              obj.BreedId,
+		BreedName:            obj.BreedName,
+		QuotaId:              obj.QuotaId,
+		QuotaName:            obj.QuotaName,
+		UnitId:               obj.UnitId,
+		UnitName:             obj.UnitName,
+		SampleType:           obj.SampleType,
+		SampleId:             obj.SampleId,
+		SampleName:           obj.SampleName,
+		DeviceId:             obj.DeviceId,
+		Device:               obj.Device,
+		ProductCraftId:       obj.ProductCraftId,
+		ProductCraft:         obj.ProductCraft,
+		ProductLine:          obj.ProductLine,
+		InputMode:            obj.InputMode,
+		Frequency:            obj.Frequency,
+		InputValue:           obj.InputValue,
+		TaskShouldFinishTime: obj.TaskShouldFinishTime,
+		CustomId:             obj.CustomId,
+		CustomType:           obj.CustomType,
+		Custom:               obj.Custom,
+		QuotaSampleId:        obj.QuotaSampleId,
+		StartDate:            obj.StartDate.Format(utils.FormatDate),
+		EndDate:              obj.EndDate.Format(utils.FormatDate),
+		ModifyTime:           obj.ModifyTime,
+		LzCode:               obj.LzCode,
+	}
+}
+
+func ToLongzhongSurveyProductList(items []*LongzhongSurveyProductOrm) (itemsOrm []*LongzhongSurveyProduct) {
+	for _, item := range items {
+		itemsOrm = append(itemsOrm, item.toView())
+	}
+	return
+}
 func GetLongzhongSurveyProduct(breedId, frequency int) (items []*LongzhongSurveyProduct, err error) {
 	sql := ` SELECT *  FROM longzhong_survey_product WHERE breed_id=? AND frequency=? ORDER BY survey_product_id ASC `
 	o := orm.NewOrmUsingDB("edb")

+ 66 - 4
models/data_source/base_from_sci99.go

@@ -1,6 +1,7 @@
 package data_source
 
 import (
+	"eta/eta_api/utils"
 	"github.com/beego/beego/v2/client/orm"
 	"github.com/rdlucklib/rdluck_tools/paging"
 	"time"
@@ -27,7 +28,7 @@ type BaseFromSci99Data struct {
 	BaseFromSciDataId  int       `orm:"column(base_from_sci_data_id);pk"` // 主键,自动递增
 	BaseFromSciIndexId int       // 指标id
 	IndexCode          string    // 指标编码
-	DataTime           string    // 数据日期
+	DataTime           time.Time // 数据日期
 	Value              float64   // 数据值
 	CreateTime         time.Time // 创建时间
 	ModifyTime         time.Time // 修改时间
@@ -52,6 +53,25 @@ type BaseFromSci99DataItem struct {
 	ModifyTime         string  // 修改时间
 }
 
+// [2025-zsh-时间类型修复-chenhan]
+func (obj *BaseFromSci99Data) toView() (item *BaseFromSci99DataItem) {
+	return &BaseFromSci99DataItem{
+		BaseFromSciDataId:  obj.BaseFromSciDataId,
+		BaseFromSciIndexId: obj.BaseFromSciIndexId,
+		IndexCode:          obj.IndexCode,
+		DataTime:           obj.DataTime.Format(utils.FormatDate),
+		Value:              obj.Value,
+		CreateTime:         obj.CreateTime.Format(utils.FormatDateTime),
+		ModifyTime:         obj.ModifyTime.Format(utils.FormatDateTime),
+	}
+}
+func sci99DataToList(items []*BaseFromSci99Data) (itemList []*BaseFromSci99DataItem) {
+	for _, item := range items {
+		itemList = append(itemList, item.toView())
+	}
+	return
+}
+
 type BaseFromSci99IndexList struct {
 	BaseFromSciIndexId int    `orm:"column(base_from_sci_index_id);pk"` // 主键,自动递增
 	IndexCode          string // 指标编码
@@ -66,6 +86,29 @@ type BaseFromSci99IndexList struct {
 	Paging             *paging.PagingItem `description:"分页数据"`
 }
 
+// [2025-zsh-时间类型修复-chenhan]
+func (obj *BaseFromSci99Index) toView() (item *BaseFromSci99IndexList) {
+	return &BaseFromSci99IndexList{
+		BaseFromSciIndexId: obj.BaseFromSciIndexId,
+		IndexCode:          obj.IndexCode,
+		IndexName:          obj.IndexName,
+		ClassifyId:         obj.ClassifyId,
+		Unit:               obj.Unit,
+		Frequency:          obj.Frequency,
+		Describe:           obj.Describe,
+		ModifyTime:         obj.ModifyTime.Format(utils.FormatDateTime),
+		CreateTime:         obj.CreateTime.Format(utils.FormatDateTime),
+	}
+}
+
+// [2025-zsh-时间类型修复-chenhan]
+func sci99IndexToList(items []*BaseFromSci99Index) (itemList []*BaseFromSci99IndexList) {
+	for _, item := range items {
+		itemList = append(itemList, item.toView())
+	}
+	return
+}
+
 // 添加数据
 func AddBaseFromSci99Index(item *BaseFromSci99Index) (lastId int64, err error) {
 	o := orm.NewOrmUsingDB("data")
@@ -99,7 +142,13 @@ func GetSci99Index(condition string, pars interface{}) (items []*BaseFromSci99In
 		sql += condition
 	}
 	sql += `ORDER BY base_from_sci_index_id ASC `
-	_, err = o.Raw(sql, pars).QueryRows(&items)
+	// [2025-zsh-时间类型修复-chenhan]
+	var ormItems []*BaseFromSci99Index
+	_, err = o.Raw(sql, pars).QueryRows(&ormItems)
+	if err != nil {
+		return
+	}
+	items = sci99IndexToList(ormItems)
 	return
 }
 
@@ -113,7 +162,13 @@ func GetSci99IndexDataCount(indexCode string) (count int, err error) {
 func GetSci99IndexData(indexCode string, startSize, pageSize int) (items []*BaseFromSci99DataItem, err error) {
 	o := orm.NewOrmUsingDB("data")
 	sql := ` SELECT *  FROM base_from_sci99_data WHERE index_code=? ORDER BY data_time DESC LIMIT ?,? `
-	_, err = o.Raw(sql, indexCode, startSize, pageSize).QueryRows(&items)
+	// [2025-zsh-时间类型修复-chenhan]
+	var ormItems []*BaseFromSci99Data
+	_, err = o.Raw(sql, indexCode, startSize, pageSize).QueryRows(&ormItems)
+	if err != nil {
+		return
+	}
+	items = sci99DataToList(ormItems)
 	return
 }
 
@@ -132,7 +187,14 @@ func GetSci99DataMaxCount(classifyId int) (count int, err error) {
 func GetSci99IndexDataByCode(indexCode string) (items []*BaseFromSci99DataItem, err error) {
 	o := orm.NewOrmUsingDB("data")
 	sql := ` SELECT *  FROM base_from_sci99_data WHERE index_code=? ORDER BY data_time DESC  `
-	_, err = o.Raw(sql, indexCode).QueryRows(&items)
+
+	// [2025-zsh-时间类型修复-chenhan]
+	var ormItems []*BaseFromSci99Data
+	_, err = o.Raw(sql, indexCode).QueryRows(&ormItems)
+	if err != nil {
+		return
+	}
+	items = sci99DataToList(ormItems)
 	return
 }
 

+ 59 - 7
models/data_source/guagnzhouqihuo.go

@@ -1,6 +1,7 @@
 package data_source
 
 import (
+	"eta/eta_api/utils"
 	"github.com/beego/beego/v2/client/orm"
 	"time"
 )
@@ -21,17 +22,29 @@ type BaseFromTradeGuangzhouIndex struct {
 	IndexName                        string    `description:"指标名称"`
 	Frequency                        string    `description:"频率"`
 	Unit                             string    `description:"单位"`
-	StartDate                        string    `description:"开始日期"`
-	EndDate                          string    `description:"结束日期"`
+	StartDate                        time.Time `description:"开始日期"`
+	EndDate                          time.Time `description:"结束日期"`
+	CreateTime                       time.Time `description:"创建日期"`
+	ModifyTime                       time.Time `description:"修改日期"`
+}
+type BaseFromTradeGuangzhouIndexWithData struct {
+	BaseFromTradeGuangzhouIndexId    int       `orm:"column(base_from_trade_guangzhou_index_id);pk"`
+	BaseFromTradeGuangzhouClassifyId int       `description:"分类id"`
+	IndexCode                        string    `description:"指标编码"`
+	IndexName                        string    `description:"指标名称"`
+	Frequency                        string    `description:"频率"`
+	Unit                             string    `description:"单位"`
+	StartDate                        time.Time `description:"开始日期"`
+	EndDate                          time.Time `description:"结束日期"`
+	Value                            float64   `description:"数据值"`
 	CreateTime                       time.Time `description:"创建日期"`
 	ModifyTime                       time.Time `description:"修改日期"`
 }
-
 type BaseFromTradeGuangzhouData struct {
 	BaseFromTradeGuangzhouDataId  int       `orm:"column(base_from_trade_guangzhou_data_id);pk"`
 	BaseFromTradeGuangzhouIndexId int       `description:"指标id"`
 	IndexCode                     string    `description:"指标编码"`
-	DataTime                      string    `description:"数据日期"`
+	DataTime                      time.Time `description:"数据日期"`
 	Value                         float64   `description:"数据值"`
 	QtySub                        float64   `description:"增减"`
 	CreateTime                    time.Time `description:"创建日期"`
@@ -87,6 +100,27 @@ type BaseFromTradeGuangzhouIndexView struct {
 	Value                            float64 `description:"数据"`
 }
 
+// [2025-zsh-时间类型修复-chenhan]
+func (obj *BaseFromTradeGuangzhouIndexWithData) toView() *BaseFromTradeGuangzhouIndexView {
+	return &BaseFromTradeGuangzhouIndexView{
+		BaseFromTradeGuangzhouIndexId:    obj.BaseFromTradeGuangzhouIndexId,
+		BaseFromTradeGuangzhouClassifyId: obj.BaseFromTradeGuangzhouClassifyId,
+		IndexCode:                        obj.IndexCode,
+		IndexName:                        obj.IndexName,
+		Frequency:                        obj.Frequency,
+		Unit:                             obj.Unit,
+		StartDate:                        obj.StartDate.Format(utils.FormatDate),
+		EndDate:                          obj.EndDate.Format(utils.FormatDate),
+		Value:                            obj.Value,
+	}
+}
+func toIndexViewList(list []*BaseFromTradeGuangzhouIndexWithData) (itemList []*BaseFromTradeGuangzhouIndexView) {
+	for _, item := range list {
+		itemList = append(itemList, item.toView())
+	}
+	return
+}
+
 func (obj *BaseFromTradeGuangzhouIndex) GetBaseFromTradeGuangzhouIndex(condition string, pars []interface{}, baseFromTradeGuangzhouContractId int) (list []*BaseFromTradeGuangzhouIndexView, err error) {
 	o := orm.NewOrmUsingDB("data")
 	if baseFromTradeGuangzhouContractId <= 0 {
@@ -99,7 +133,13 @@ WHERE `
 			sql += condition
 		}
 		sql += ` ORDER BY a.index_code ASC `
-		_, err = o.Raw(sql, pars).QueryRows(&list)
+		// [2025-zsh-时间类型修复-chenhan]
+		var ormList []*BaseFromTradeGuangzhouIndexWithData
+		_, err = o.Raw(sql, pars).QueryRows(&ormList)
+		if err != nil {
+			return
+		}
+		list = toIndexViewList(ormList)
 		return
 	} else {
 		condition += ` AND a.base_from_trade_guangzhou_contract_id=? `
@@ -114,7 +154,13 @@ WHERE `
 			sql += condition
 		}
 		sql += ` ORDER BY a.index_code ASC `
-		_, err = o.Raw(sql, pars).QueryRows(&list)
+		// [2025-zsh-时间类型修复-chenhan]
+		var ormList []*BaseFromTradeGuangzhouIndexWithData
+		_, err = o.Raw(sql, pars).QueryRows(&ormList)
+		if err != nil {
+			return
+		}
+		list = toIndexViewList(ormList)
 		return
 	}
 }
@@ -129,6 +175,12 @@ WHERE `
 		sql += condition
 	}
 	sql += ` ORDER BY a.index_code ASC `
-	_, err = o.Raw(sql, pars).QueryRows(&list)
+	// [2025-zsh-时间类型修复-chenhan]
+	var ormList []*BaseFromTradeGuangzhouIndexWithData
+	_, err = o.Raw(sql, pars).QueryRows(&ormList)
+	if err != nil {
+		return
+	}
+	list = toIndexViewList(ormList)
 	return
 }

+ 98 - 4
models/data_source/icpi.go

@@ -1,6 +1,7 @@
 package data_source
 
 import (
+	"eta/eta_api/utils"
 	"github.com/beego/beego/v2/client/orm"
 	"github.com/rdlucklib/rdluck_tools/paging"
 	"time"
@@ -20,11 +21,26 @@ type BaseFromIcpiIndex struct {
 	LatestValue            float64   `description:"最新值"`
 }
 
+func (obj *BaseFromIcpiIndex) toView() *BaseFromIcpiIndexView {
+	return &BaseFromIcpiIndexView{
+		BaseFromIcpiIndexId:    obj.BaseFromIcpiIndexId,
+		BaseFromIcpiClassifyId: obj.BaseFromIcpiClassifyId,
+		IndexCode:              obj.IndexCode,
+		IndexName:              obj.IndexName,
+		Frequency:              obj.Frequency,
+		Unit:                   obj.Unit,
+		StartDate:              obj.StartDate.Format(utils.FormatDate),
+		EndDate:                obj.EndDate.Format(utils.FormatDate),
+		CreateTime:             obj.CreateTime.Format(utils.FormatDateTime),
+		ModifyTime:             obj.ModifyTime.Format(utils.FormatDateTime),
+	}
+}
+
 type BaseFromIcpiData struct {
 	BaseFromIcpiDataId  int       `orm:"column(base_from_icpi_data_id);pk"`
 	BaseFromIcpiIndexId int       `description:"指标id"`
 	IndexCode           string    `description:"指标编码"`
-	DataTime            string    `description:"日期"`
+	DataTime            time.Time `description:"日期"`
 	Value               string    `description:"值"`
 	CreateTime          time.Time `description:"创建时间"`
 	ModifyTime          time.Time `description:"修改时间"`
@@ -39,10 +55,43 @@ type BaseFromIcpiClassify struct {
 	ModifyTime             string `description:"修改时间"`
 }
 
+// [2025-zsh-时间类型修复-chenhan]
+type BaseFromIcpiClassifyOrm struct {
+	BaseFromIcpiClassifyId int       `orm:"column(base_from_icpi_classify_id);pk"`
+	ClassifyName           string    `description:"分类名称"`
+	ClassifyNameEn         string    `description:"英文名称"`
+	ParentId               int       `description:"上级id"`
+	CreateTime             time.Time `description:"创建时间"`
+	ModifyTime             time.Time `description:"修改时间"`
+}
+
+// [2025-zsh-时间类型修复-chenhan]
+func (obj *BaseFromIcpiClassifyOrm) toView() *BaseFromIcpiClassify {
+	return &BaseFromIcpiClassify{
+		BaseFromIcpiClassifyId: obj.BaseFromIcpiClassifyId,
+		ClassifyName:           obj.ClassifyName,
+		ClassifyNameEn:         obj.ClassifyNameEn,
+		ParentId:               obj.ParentId,
+		CreateTime:             obj.CreateTime.Format(utils.FormatDateTime),
+		ModifyTime:             obj.ModifyTime.Format(utils.FormatDateTime),
+	}
+}
+
+func toClassifyList(list []*BaseFromIcpiClassifyOrm) (itemList []*BaseFromIcpiClassify) {
+	for _, item := range list {
+		itemList = append(itemList, item.toView())
+	}
+	return
+}
 func (obj *BaseFromIcpiIndex) GetBaseFromIcpiClassifyAll() (list []*BaseFromIcpiClassify, err error) {
 	o := orm.NewOrmUsingDB("data")
 	sql := `SELECT * FROM base_from_icpi_classify `
-	_, err = o.Raw(sql).QueryRows(&list)
+	var ormList []*BaseFromIcpiClassifyOrm
+	_, err = o.Raw(sql).QueryRows(&ormList)
+	if err != nil {
+		return
+	}
+	list = toClassifyList(ormList)
 	return
 }
 
@@ -56,6 +105,18 @@ type BaseFromIcpiDataView struct {
 	ModifyTime          time.Time `description:"修改时间"`
 }
 
+func (obj *BaseFromIcpiData) toView() *BaseFromIcpiDataView {
+	return &BaseFromIcpiDataView{
+		BaseFromIcpiDataId:  obj.BaseFromIcpiDataId,
+		BaseFromIcpiIndexId: obj.BaseFromIcpiIndexId,
+		IndexCode:           obj.IndexCode,
+		DataTime:            obj.DataTime.Format(utils.FormatDate),
+		Value:               obj.Value,
+		CreateTime:          obj.CreateTime,
+		ModifyTime:          obj.ModifyTime,
+	}
+}
+
 type BaseFromIcpiIndexView struct {
 	BaseFromIcpiIndexId    int    `description:"指标id"`
 	BaseFromIcpiClassifyId int    `description:"分类id"`
@@ -71,6 +132,20 @@ type BaseFromIcpiIndexView struct {
 	Paging                 *paging.PagingItem `description:"分页数据"`
 }
 
+func toIcpiIndexViewList(list []*BaseFromIcpiIndex) (itemList []*BaseFromIcpiIndexView) {
+	for _, item := range list {
+		itemList = append(itemList, item.toView())
+	}
+	return
+}
+
+// [2025-zsh-时间类型修复-chenhan]
+func toIndexDataViewList(list []*BaseFromIcpiData) (itemList []*BaseFromIcpiDataView) {
+	for _, item := range list {
+		itemList = append(itemList, item.toView())
+	}
+	return
+}
 func (obj *BaseFromIcpiIndex) GetIcpiIndex(condition string, pars interface{}) (items []*BaseFromIcpiIndexView, err error) {
 	o := orm.NewOrmUsingDB("data")
 	sql := ` SELECT * FROM base_from_icpi_index WHERE 1=1  `
@@ -78,7 +153,13 @@ func (obj *BaseFromIcpiIndex) GetIcpiIndex(condition string, pars interface{}) (
 		sql += condition
 	}
 	sql += `ORDER BY base_from_icpi_index_id ASC `
+	// [2025-zsh-时间类型修复-chenhan]
+	var ormList []*BaseFromIcpiIndex
 	_, err = o.Raw(sql, pars).QueryRows(&items)
+	if err != nil {
+		return
+	}
+	items = toIcpiIndexViewList(ormList)
 	return
 }
 
@@ -92,7 +173,13 @@ func (obj *BaseFromIcpiIndex) GetIcpiIndexDataCount(indexCode string) (count int
 func (obj *BaseFromIcpiIndex) GetIcpiIndexData(indexCode string, startSize, pageSize int) (items []*BaseFromIcpiDataView, err error) {
 	o := orm.NewOrmUsingDB("data")
 	sql := ` SELECT *  FROM base_from_icpi_data WHERE index_code=? ORDER BY data_time DESC LIMIT ?,? `
-	_, err = o.Raw(sql, indexCode, startSize, pageSize).QueryRows(&items)
+	// [2025-zsh-时间类型修复-chenhan]
+	var ormList []*BaseFromIcpiData
+	_, err = o.Raw(sql, indexCode, startSize, pageSize).QueryRows(&ormList)
+	if err != nil {
+		return
+	}
+	items = toIndexDataViewList(ormList)
 	return
 }
 
@@ -111,6 +198,13 @@ func (obj *BaseFromIcpiIndex) GetIcpiDataMaxCount(classifyId int) (count int, er
 func (obj *BaseFromIcpiIndex) GetIcpiIndexDataByCode(indexCode string) (items []*BaseFromIcpiDataView, err error) {
 	o := orm.NewOrmUsingDB("data")
 	sql := ` SELECT *  FROM base_from_icpi_data WHERE index_code=? ORDER BY data_time DESC  `
-	_, err = o.Raw(sql, indexCode).QueryRows(&items)
+	// [2025-zsh-时间类型修复-chenhan]
+	var ormList []*BaseFromIcpiData
+	// [2025-zsh-时间类型修复-chenhan]
+	_, err = o.Raw(sql, indexCode).QueryRows(&ormList)
+	if err != nil {
+		return
+	}
+	items = toIndexDataViewList(ormList)
 	return
 }

+ 115 - 4
models/data_source/longzhong.go

@@ -156,19 +156,107 @@ type LongzhongSurveyData struct {
 	DataTime             string
 }
 
+// [2025-zsh-时间类型修复-chenhan]
+type LongzhongSurveyDataOrm struct {
+	SurveyDataId         int `orm:"column(survey_data_id);pk"`
+	SurveyProductId      int
+	ProjectQuotaId       int64
+	BreedId              string
+	BreedName            string
+	QuotaId              string
+	QuotaName            string
+	UnitId               string
+	UnitName             string
+	SampleType           int64
+	SampleId             string
+	SampleName           string
+	DeviceId             string
+	Device               string
+	ProductCraftId       string
+	ProductCraft         string
+	ProductLine          string
+	InputMode            int64
+	Frequency            int64
+	InputValue           float64
+	TaskShouldFinishTime int64
+	CustomId             string
+	CustomType           int64
+	Custom               string
+	QuotaSampleId        int64
+	TaskActualFinishTime int64
+	AreaName             string
+	ProvinceName         string
+	ResearchStartData    int64
+	ResearchStopData     int64
+	DataTime             time.Time
+}
+
+// [2025-zsh-时间类型修复-chenhan]
+func (obj *LongzhongSurveyDataOrm) toView() *LongzhongSurveyData {
+	return &LongzhongSurveyData{
+		SurveyDataId:         obj.SurveyDataId,
+		SurveyProductId:      obj.SurveyProductId,
+		ProjectQuotaId:       obj.ProjectQuotaId,
+		BreedId:              obj.BreedId,
+		BreedName:            obj.BreedName,
+		QuotaId:              obj.QuotaId,
+		QuotaName:            obj.QuotaName,
+		UnitId:               obj.UnitId,
+		UnitName:             obj.UnitName,
+		SampleType:           obj.SampleType,
+		SampleId:             obj.SampleId,
+		SampleName:           obj.SampleName,
+		DeviceId:             obj.DeviceId,
+		Device:               obj.Device,
+		ProductCraftId:       obj.ProductCraftId,
+		ProductCraft:         obj.ProductCraft,
+		ProductLine:          obj.ProductLine,
+		InputMode:            obj.InputMode,
+		Frequency:            obj.Frequency,
+		InputValue:           obj.InputValue,
+		TaskShouldFinishTime: obj.TaskShouldFinishTime,
+		CustomId:             obj.CustomId,
+		CustomType:           obj.CustomType,
+		Custom:               obj.Custom,
+		QuotaSampleId:        obj.QuotaSampleId,
+		TaskActualFinishTime: obj.TaskActualFinishTime,
+		AreaName:             obj.AreaName,
+		ProvinceName:         obj.ProvinceName,
+		ResearchStartData:    obj.ResearchStartData,
+		ResearchStopData:     obj.ResearchStopData,
+		DataTime:             obj.DataTime.Format(utils.FormatDate),
+	}
+}
+func toLongzhongSurveyDataList(list []*LongzhongSurveyDataOrm) (itemList []*LongzhongSurveyData) {
+	for _, item := range list {
+		itemList = append(itemList, item.toView())
+	}
+	return
+}
 func GetLongzhongSurveyDataById(lzInfoId int) (items []*LongzhongSurveyData, err error) {
 	o := orm.NewOrmUsingDB("edb")
 	sql := `SELECT * FROM longzhong_survey_data WHERE survey_product_id=? ORDER BY data_time DESC `
-	_, err = o.Raw(sql, lzInfoId).QueryRows(&items)
+	// [2025-zsh-时间类型修复-chenhan]
+	var ormList []*LongzhongSurveyDataOrm
+	_, err = o.Raw(sql, lzInfoId).QueryRows(&ormList)
+	if err != nil {
+		return
+	}
+	items = toLongzhongSurveyDataList(ormList)
 	return
 }
 
 // GetLzItemList 模糊查询隆众数据库指标列表
 func GetLzItemList(keyword string) (items []*data_manage.LongzhongSurveyProduct, err error) {
 	o := orm.NewOrmUsingDB("edb")
-
 	sql := "SELECT * FROM longzhong_survey_product WHERE CONCAT(sample_name,breed_name,custom,quota_name,lz_code) LIKE ? "
-	_, err = o.Raw(sql, utils.GetLikeKeyword(keyword)).QueryRows(&items)
+	// [2025-zsh-时间类型修复-chenhan]
+	var ormList []*data_manage.LongzhongSurveyProductOrm
+	_, err = o.Raw(sql, utils.GetLikeKeyword(keyword)).QueryRows(&ormList)
+	if err != nil {
+		return
+	}
+	items = data_manage.ToLongzhongSurveyProductList(ormList)
 	return
 
 }
@@ -177,13 +265,36 @@ type lzSurveyData struct {
 	DataTime   string `orm:"column(data_time)" description:"日期"`
 	InputValue string `orm:"column(input_value)" description:"值"`
 }
+type lzSurveyDataOrm struct {
+	DataTime   time.Time `orm:"column(data_time)" description:"日期"`
+	InputValue string    `orm:"column(input_value)" description:"值"`
+}
+
+func (obj *lzSurveyDataOrm) toView() *lzSurveyData {
+	return &lzSurveyData{
+		DataTime:   obj.DataTime.Format(utils.FormatDate),
+		InputValue: obj.InputValue,
+	}
+}
+func toLzSurveyDataList(list []*lzSurveyDataOrm) (itemList []*lzSurveyData) {
+	for _, item := range list {
+		itemList = append(itemList, item.toView())
+	}
+	return
+}
 
 // GetLzItemListByCode 根据code查询隆众数据列表
 func GetLzItemListByCode(lzCode string) (items []*lzSurveyData, err error) {
 	o := orm.NewOrmUsingDB("edb")
 
 	sql := "SELECT * FROM longzhong_survey_data WHERE survey_product_id=? GROUP BY data_time DESC"
-	_, err = o.Raw(sql, lzCode).QueryRows(&items)
+	// [2025-zsh-时间类型修复-chenhan]
+	var ormList []*lzSurveyDataOrm
+	_, err = o.Raw(sql, lzCode).QueryRows(&ormList)
+	if err != nil {
+		return
+	}
+	items = toLzSurveyDataList(ormList)
 	return
 }