|
|
@ -11,27 +11,42 @@ import ( |
|
|
|
) |
|
|
|
|
|
|
|
type CSurveysheetResult struct { |
|
|
|
Cid int `json:"cid" xorm:"not null pk comment('公司ID') INT(11)"` |
|
|
|
Cnr int `json:"cnr" xorm:"not null pk comment('小区编号') INT(11)"` |
|
|
|
Surveysheetid string `json:"surveysheetid" xorm:"not null pk VARCHAR(40)"` |
|
|
|
Surveynr int `json:"surveynr" xorm:"not null pk comment('调研问卷流水号') INT(11)"` |
|
|
|
Surveyperson string `json:"surveyperson" xorm:"default 'NULL' comment('指定调研人') VARCHAR(40)"` |
|
|
|
Surveysamplecount int `json:"surveysamplecount" xorm:"not null comment('调研取样数') INT(11)"` |
|
|
|
Surveyfinishedcount int `json:"surveyfinishedcount" xorm:"not null comment('调研问卷实际已完成数') INT(11)"` |
|
|
|
Buildingid string `json:"buildingid" xorm:"VARCHAR(100)"` |
|
|
|
Unit string `json:"unit" xorm:"VARCHAR(40)"` |
|
|
|
Room string `json:"room" xorm:"VARCHAR(40)"` |
|
|
|
Planstartdate string `json:"planstartdate" xorm:"default 'NULL' VARCHAR(8)"` |
|
|
|
Planendate string `json:"planendate" xorm:"default 'NULL' VARCHAR(8)"` |
|
|
|
Actstartdate string `json:"actstartdate" xorm:"default 'NULL' VARCHAR(8)"` |
|
|
|
Actenddate string `json:"actenddate" xorm:"default 'NULL' VARCHAR(8)"` |
|
|
|
Status int `json:"status" xorm:"not null comment('状态') INT(11)"` |
|
|
|
Remark string `json:"remark" xorm:"default 'NULL' comment('备注') VARCHAR(255)"` |
|
|
|
Signature string `json:"signature" xorm:"default 'NULL' comment('电子签名') VARCHAR(255)"` |
|
|
|
Createtime string `json:"createtime" xorm:"default 'NULL' comment('创建时间') VARCHAR(40)"` |
|
|
|
Lastmodifytime string `json:"lastmodifytime" xorm:"default 'NULL' comment('最近更新时间') VARCHAR(40)"` |
|
|
|
Lastmodifyby string `json:"lastmodifyby" xorm:"default 'NULL' comment('修改人员') VARCHAR(40)"` |
|
|
|
Valst []CSurveysheetResultlst `json:"valst" xorm:"-"` |
|
|
|
Cid int `json:"cid" xorm:"not null pk comment('公司ID') INT(11)"` |
|
|
|
Cnr int `json:"cnr" xorm:"not null pk comment('小区编号') INT(11)"` |
|
|
|
Surveysheetid string `json:"surveysheetid" xorm:"not null pk VARCHAR(40)"` |
|
|
|
Surveynr int `json:"surveynr" xorm:"not null pk comment('调研问卷流水号') INT(11)"` |
|
|
|
Surveyperson string `json:"surveyperson" xorm:"default 'NULL' comment('指定调研人') VARCHAR(40)"` |
|
|
|
Surveysamplecount int `json:"surveysamplecount" xorm:"not null comment('调研取样数') INT(11)"` |
|
|
|
Surveyfinishedcount int `json:"surveyfinishedcount" xorm:"not null comment('调研问卷实际已完成数') INT(11)"` |
|
|
|
Buildingid string `json:"buildingid" xorm:"VARCHAR(100)"` |
|
|
|
Unit string `json:"unit" xorm:"VARCHAR(40)"` |
|
|
|
Room string `json:"room" xorm:"VARCHAR(40)"` |
|
|
|
Planstartdate string `json:"planstartdate" xorm:"default 'NULL' VARCHAR(8)"` |
|
|
|
Planendate string `json:"planendate" xorm:"default 'NULL' VARCHAR(8)"` |
|
|
|
Actstartdate string `json:"actstartdate" xorm:"default 'NULL' VARCHAR(8)"` |
|
|
|
Actenddate string `json:"actenddate" xorm:"default 'NULL' VARCHAR(8)"` |
|
|
|
Status int `json:"status" xorm:"not null comment('状态') INT(11)"` |
|
|
|
Remark string `json:"remark" xorm:"default 'NULL' comment('备注') VARCHAR(255)"` |
|
|
|
// 被访问者性别 male 和female
|
|
|
|
Sex string `json:"sex" xorm:"VARCHAR(10)"` |
|
|
|
// 被访问者类型 业主1 租户2
|
|
|
|
PersonType int `json:"persontype" xorm:"'persontype' INT(1)"` |
|
|
|
// 被访问者年龄 1-22岁以下 2-22到59岁 3-60岁以上
|
|
|
|
Age int `json:"age" xorm:"INT(1)"` |
|
|
|
// 被访问者居住时间 1-1年以内 2-1到3年 2-3到5年 3-5年以上
|
|
|
|
LiveTime int `json:"livetime" xorm:"'livetime' INT(1)"` |
|
|
|
// 被访问者姓名
|
|
|
|
PersonName string `json:"personname" xorm:"'personname' VARCHAR(40)"` |
|
|
|
//// 调查日期
|
|
|
|
//SurveyDate string `json:"surveydate" xorm:"'surveydate' VARCHAR(20)"`
|
|
|
|
//// 调查时间 小时
|
|
|
|
//SurveyHour int `json:"surveyhour" xorm:"'surveyhour' INT(2)"`
|
|
|
|
|
|
|
|
Signature string `json:"signature" xorm:"default 'NULL' comment('电子签名') VARCHAR(255)"` |
|
|
|
Createtime string `json:"createtime" xorm:"default 'NULL' comment('创建时间') VARCHAR(40)"` |
|
|
|
Lastmodifytime string `json:"lastmodifytime" xorm:"default 'NULL' comment('最近更新时间') VARCHAR(40)"` |
|
|
|
Lastmodifyby string `json:"lastmodifyby" xorm:"default 'NULL' comment('修改人员') VARCHAR(40)"` |
|
|
|
Valst []CSurveysheetResultlst `json:"valst" xorm:"-"` |
|
|
|
} |
|
|
|
|
|
|
|
func (t *CSurveysheetResult) TableName() string { |
|
|
@ -108,6 +123,13 @@ func (t *CSurveysheetResult) Add() error { |
|
|
|
Survey.Lastmodifyby = t.Lastmodifyby |
|
|
|
Survey.Createtime = t.Createtime |
|
|
|
Survey.Lastmodifytime = t.Lastmodifytime |
|
|
|
Survey.Sex = t.Sex |
|
|
|
Survey.PersonType = t.PersonType |
|
|
|
Survey.Age = t.Age |
|
|
|
Survey.LiveTime = t.LiveTime |
|
|
|
Survey.PersonName = t.PersonName |
|
|
|
//Survey.SurveyDate = t.SurveyDate
|
|
|
|
//Survey.SurveyHour = t.SurveyHour
|
|
|
|
_, err = session.Table("c_surveysheet_result").Insert(Survey) |
|
|
|
if err != nil { |
|
|
|
glog.InfoExt("问题调研", "添加题目 err1 is :", err) |
|
|
|