1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- package data_manage
- //type lzSurveyData struct {
- // DataTime string `orm:"column(data_time)" description:"日期"`
- // InputValue string `orm:"column(input_value)" description:"值"`
- //}
- //type LongzhongSurveyData struct {
- // SurveyDataId int `orm:"column(survey_data_id);pk" gorm:"primaryKey"`
- // 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 string
- // TaskShouldFinishTime int64
- // CustomId string
- // CustomType int64
- // Custom string
- // QuotaSampleId int64
- // TaskActualFinishTime int64
- // AreaName string
- // ProvinceName string
- // ResearchStartData int64
- // ResearchStopData int64
- // DataTime string
- //}
- //func GetLzSurveyDataByTradeCode(condition string, pars []interface{}) (item []*lzSurveyData, err error) {
- // sql := ` SELECT a.* FROM longzhong_survey_data AS a
- // INNER JOIN longzhong_survey_product AS b ON a.survey_product_id=b.survey_product_id
- // WHERE 1=1 `
- // o := global.DbMap[utils.DbNameIndex]
- // if condition != "" {
- // sql += condition
- // }
- // sql += ` ORDER BY a.data_time DESC `
- // err = o.Raw(sql, pars).Find(&item).Error
- // return
- //}
- //func GetLzSurveyDataExistByTradeCode(surveyProductId int) (items []*LongzhongSurveyData, err error) {
- // sql := ` SELECT * FROM longzhong_survey_data WHERE 1=1 AND survey_product_id=? `
- // o := global.DbMap[utils.DbNameIndex]
- // err = o.Raw(sql, surveyProductId).Find(&items).Error
- // return
- //}
- //func GetEdbDataLzByCodeAndDate(edbCode string, startDate string) (count int, err error) {
- // o := global.DbMap[utils.DbNameIndex]
- // sql := ` SELECT COUNT(1) AS count FROM edb_data_lz WHERE edb_code=? AND data_time=? `
- // err = o.Raw(sql, edbCode, startDate).Scan(&count).Error
- // return
- //}
- //func ModifyEdbDataLz(edbInfoId int64, dataTime, value string) (err error) {
- // o := global.DbMap[utils.DbNameIndex]
- // sql := ` UPDATE edb_data_lz SET value=?,modify_time=NOW() WHERE edb_info_id=? AND data_time=? `
- // err = o.Exec(sql, value, edbInfoId, dataTime).Error
- // return
- //}
|