|
|
@@ -0,0 +1,259 @@
|
|
|
+// ==========================================================================
|
|
|
+// This is auto-generated by gf cli tool. You may not really want to edit it.
|
|
|
+// ==========================================================================
|
|
|
+
|
|
|
+package neo
|
|
|
+
|
|
|
+import (
|
|
|
+ "database/sql"
|
|
|
+ "github.com/gogf/gf/database/gdb"
|
|
|
+ "github.com/gogf/gf/frame/g"
|
|
|
+ "github.com/gogf/gf/os/gtime"
|
|
|
+ "time"
|
|
|
+)
|
|
|
+
|
|
|
+// Entity is the golang structure for table neo_test.
|
|
|
+type BaseNeo struct {
|
|
|
+ Id int `orm:"id,primary" json:"id"` //
|
|
|
+ Cid int `orm:"cid" json:"cid"` //
|
|
|
+ Name string `orm:"name" json:"name"` //
|
|
|
+ Description string `orm:"description" json:"description"` //
|
|
|
+ CreateTime int `orm:"create_time" json:"create_time"` //
|
|
|
+ CeshiDesc int `orm:"ceshi_desc" json:"ceshi_desc"` //
|
|
|
+ CreateOn string `orm:"create_on" json:"create_on"` //
|
|
|
+}
|
|
|
+type BaseNeoClass struct {
|
|
|
+ BaseNeo
|
|
|
+ Stclass string `orm:"st_class" json:"st_class"` //
|
|
|
+}
|
|
|
+
|
|
|
+type BaseTable struct {
|
|
|
+ Id int `orm:"id,primary" json:"id"`
|
|
|
+ K string `orm:"k" json:"k"`
|
|
|
+ K1 string `orm:"k1" json:"k1"`
|
|
|
+ K2 string `orm:"k2" json:"k2"`
|
|
|
+ K3 string `orm:"k3" json:"k3"`
|
|
|
+ K4 string `orm:"k4" json:"k4"`
|
|
|
+ K5 string `orm:"k5" json:"k5"`
|
|
|
+ K6 string `orm:"k6" json:"k6"`
|
|
|
+ K7 string `orm:"k7" json:"k7"`
|
|
|
+ K8 string `orm:"k8" json:"k8"`
|
|
|
+ K9 string `orm:"k9" json:"k9"`
|
|
|
+ K10 string `orm:"k10" json:"k10"`
|
|
|
+ K11 string `orm:"k11" json:"k11"`
|
|
|
+ K12 string `orm:"k12" json:"k12"`
|
|
|
+}
|
|
|
+
|
|
|
+type GeneBoardTable struct {
|
|
|
+ Id int `orm:"Id,primary" json:"id"` //
|
|
|
+ BoardNum string `orm:"BoardNum" json:"board_num"` // 板号
|
|
|
+ BoardDay string `orm:"BoardDay" json:"board_day"` // 年月日
|
|
|
+ LNum int `orm:"LNum" json:"l_num"` // 剩余孔
|
|
|
+ BoardTestType string `orm:"BoardTestType" json:"board_test_type"` // 测序类型
|
|
|
+ CreateOn *gtime.Time `orm:"CreateOn" json:"create_on"` //
|
|
|
+ IsNew string `orm:"IsNew" json:"is_new"` //
|
|
|
+}
|
|
|
+
|
|
|
+type GeneBoardTableInfo struct {
|
|
|
+ Id int `orm:"id,primary" json:"id"`
|
|
|
+ K string `orm:"k" json:"k"`
|
|
|
+ K1 string `orm:"k1" json:"k1"`
|
|
|
+ K2 string `orm:"k2" json:"k2"`
|
|
|
+ K3 string `orm:"k3" json:"k3"`
|
|
|
+ K4 string `orm:"k4" json:"k4"`
|
|
|
+ K5 string `orm:"k5" json:"k5"`
|
|
|
+ K6 string `orm:"k6" json:"k6"`
|
|
|
+ K7 string `orm:"k7" json:"k7"`
|
|
|
+ K8 string `orm:"k8" json:"k8"`
|
|
|
+ K9 string `orm:"k9" json:"k9"`
|
|
|
+ K10 string `orm:"k10" json:"k10"`
|
|
|
+ K11 string `orm:"k11" json:"k11"`
|
|
|
+ K12 string `orm:"k12" json:"k12"`
|
|
|
+ BoardId int `orm:"BoardId" json:"board_id"`
|
|
|
+}
|
|
|
+
|
|
|
+type Instrument struct {
|
|
|
+ Id int `xorm:"not null pk autoincr INT(10)"`
|
|
|
+ Code string `xorm:"VARCHAR(50)"` //设备编码
|
|
|
+ Name string `xorm:"VARCHAR(255)"` //设备名称
|
|
|
+ SupplierId int `xorm:"INT(10)"` //供应商Id
|
|
|
+ Supplier string `xorm:"VARCHAR(255)"` //供应商
|
|
|
+ FactoryNum string `xorm:"VARCHAR(255)"` //出厂编号
|
|
|
+ Model string `xorm:"VARCHAR(255)"` //型号
|
|
|
+ Brand string `xorm:"VARCHAR(255)"` //设备品牌
|
|
|
+ Classification string `xorm:"VARCHAR(255)"` //设备大类
|
|
|
+ Location string `xorm:"VARCHAR(50)"` //设备所在位置
|
|
|
+ Remarks string `xorm:"VARCHAR(255)"` //备注
|
|
|
+ State int `xorm:"INT(10)"` //设备状态 1正常 2异常
|
|
|
+ CalibrationTime time.Time `xorm:"DATETIME"` //校准时间
|
|
|
+ CalibrationDeadline int `xorm:"INT(10)"` //校准使用期限
|
|
|
+ CalibrationDeadlineType int `xorm:"INT(10)"` //期限类型:1:天 2:周 3:月 4:年
|
|
|
+ MaintenCycle int `xorm:"INT(10)"` //维护周期数
|
|
|
+ CycleType int `xorm:"INT(10)"` //维护周期类型
|
|
|
+ FileUrl string `xorm:"VARCHAR(50)"` //操作规程文件路径
|
|
|
+ FileName string `xorm:"VARCHAR(50)"` //操作规程文件名称
|
|
|
+ HeartbeatTime time.Time `xorm:"DATETIME created"` //心跳时间 对应服务器时间
|
|
|
+ IsFixedPoint int `xorm:"INT(2)"`
|
|
|
+ CreateOn time.Time `xorm:"DATETIME created"`
|
|
|
+ CreateUserId int `xorm:"INT(10)"`
|
|
|
+ CreateBy string `xorm:"VARCHAR(50)"`
|
|
|
+ ModifiedOn time.Time `xorm:"DATETIME updated"`
|
|
|
+ ModifiedUserId int `xorm:"INT(10)"`
|
|
|
+ ModifiedBy string `xorm:"VARCHAR(50)"`
|
|
|
+ Remark string `xorm:"VARCHAR(50)"`
|
|
|
+ TimeNotification int `xorm:"INT(10)"`
|
|
|
+ Sharable int `xorm:"TINYINT"`
|
|
|
+ Responsible string `xorm:"VARCHAR(50)"` //责任人
|
|
|
+ EndTime time.Time `xorm:"DATETIME"` //截止日期
|
|
|
+ Purchasedate time.Time `xorm:"DATETIME"` //采购日期
|
|
|
+ MaintenTime time.Time `xorm:"DATE"` //维护日期
|
|
|
+ JoinPlan bool `xorm:"TINYINT"` //是否参与点检计划
|
|
|
+}
|
|
|
+//入库表
|
|
|
+type Bank_Apply_Main struct {
|
|
|
+ Id int `xorm:"not null pk autoincr INT(10)"`
|
|
|
+ EntryNo string `xorm:"VARCHAR(50)"`
|
|
|
+ ApplyType int `xorm:"int(10)"`
|
|
|
+ ApplyStatus int `xorm:"int(10)"`
|
|
|
+ OperationBy string `xorm:"VARCHAR(50)"`
|
|
|
+ Section string `xorm:"VARCHAR(50)"`
|
|
|
+ EntryTime time.Time `xorm:"DATETIME"`
|
|
|
+ ConUserId int `xorm:"int(10)"`
|
|
|
+ ConUserBy string `xorm:"VARCHAR(50)"`
|
|
|
+ ConTime time.Time `xorm:"DATETIME"`
|
|
|
+ Remark string `xorm:"VARCHAR(255)"`
|
|
|
+ Exception string `xorm:"VARCHAR(512)"`
|
|
|
+ AuditorRemark string `xorm:"VARCHAR(255)"`
|
|
|
+ CreateOn time.Time `xorm:"DATETIME created"` //创建时间
|
|
|
+ CreateUserId int `xorm:"INT(10)"`
|
|
|
+ CreateBy string `xorm:"VARCHAR(50)"` //创建人
|
|
|
+ ModifiedOn time.Time `xorm:"DATETIME updated"`
|
|
|
+ ModifiedUserId int `xorm:"INT(10)"`
|
|
|
+ ModifiedBy string `xorm:"VARCHAR(50)"`
|
|
|
+ TaskStatus int `xorm:"INT(10)"`
|
|
|
+ Reason int `xorm:"INT(10)"`
|
|
|
+ ApplyCount string `xorm:"VARCHAR(50)"`
|
|
|
+}
|
|
|
+//入库子表
|
|
|
+type Bank_Apply_Detail struct {
|
|
|
+ Id int `xorm:"not null pk autoincr INT(10)"`
|
|
|
+ ParentId int `xorm:"int(10)"` //父类id
|
|
|
+ BarCode string `xorm:"VARCHAR(50)"`
|
|
|
+ SampleCode string `xorm:"VARCHAR(50)"`
|
|
|
+ SampleType int `xorm:"INT(10)"`
|
|
|
+ SampleTypeName string `xorm:"VARCHAR(50)"` //样本类型
|
|
|
+ InitCapacity float32 `xorm:"FLOAT"`
|
|
|
+ Capacity float32 `xorm:"FLOAT"`
|
|
|
+ TaskStatus int `xorm:"INT(4)"`
|
|
|
+ Unit string `xorm:"VARCHAR(50)"`
|
|
|
+ GroupID string `xorm:"VARCHAR(50)"`
|
|
|
+ EquipmentId int `xorm:"INT(10)"`
|
|
|
+ ShelfId int `xorm:"INT(10)"`
|
|
|
+ BoxId int `xorm:"INT(10)"`
|
|
|
+ Position string `xorm:"VARCHAR(50)"` //位置 冻存盒的 X代表第几列 Y代表第几行 X;
|
|
|
+ PositionInfo string `xorm:"VARCHAR(100)"` //列表中显示的位置信息(容器+层+盒+position)
|
|
|
+ CHUserId int `xorm:"INT(10)"`
|
|
|
+ CHUserBy string `xorm:"VARCHAR(50)"`
|
|
|
+ CancelId int `xorm:"INT(10)"`
|
|
|
+ CancelBy string `xorm:"VARCHAR(50)"`
|
|
|
+ DetailStatus int `xorm:"int(10)"`
|
|
|
+ CreateOn time.Time `xorm:"DATETIME created"` //创建时间
|
|
|
+ CreateUserId int `xorm:"INT(10)"`
|
|
|
+ CreateBy string `xorm:"VARCHAR(50)"` //创建人
|
|
|
+ ModifiedOn time.Time `xorm:"DATETIME updated"`
|
|
|
+ ModifiedUserId int `xorm:"INT(10)"`
|
|
|
+ ModifiedBy string `xorm:"VARCHAR(50)"`
|
|
|
+ RecoveryId int `xorm:INT(10)`
|
|
|
+ DetailId int `xorm:INT(10)`
|
|
|
+ IsLocked int `xorm:INT(10)`
|
|
|
+ Reason int `xorm:INT(10)`
|
|
|
+
|
|
|
+}
|
|
|
+//维修保养
|
|
|
+type InstrumenMaintainLog struct {
|
|
|
+ Id int `xorm:"not null pk autoincr INT(10)"`
|
|
|
+ InstrumenId int `xorm:"INT(10)"` //设备id
|
|
|
+ InstrumenName string `xorm:"VARCHAR(50)"` //设备名称
|
|
|
+ InstrumenCode string `xorm:"VARCHAR(50)"` //设备编号
|
|
|
+ OperaRemark string `xorm:"VARCHAR(500)"` //操作说明
|
|
|
+ OperaTpye string `xorm:"VARCHAR(50)"` //操作类型
|
|
|
+ TypeCode int `xorm:"INT(2)"` //操作类型编号
|
|
|
+ OperaUser string `xorm:"VARCHAR(50)"` //操作人
|
|
|
+ OperaOn time.Time `xorm:"DATETIME"` //操作日期
|
|
|
+ CreateOn time.Time `xorm:"DATETIME created"`
|
|
|
+ CreateUserId int `xorm:"INT(10)"`
|
|
|
+ CreateBy string `xorm:"VARCHAR(50)"`
|
|
|
+ ModifiedOn time.Time `xorm:"DATETIME updated"`
|
|
|
+ ModifiedUserId int `xorm:"INT(10)"`
|
|
|
+ ModifiedBy string `xorm:"VARCHAR(50)"`
|
|
|
+}
|
|
|
+//曲线报表
|
|
|
+type AutoGenerated struct {
|
|
|
+ Results []Results `json:"results"`
|
|
|
+}
|
|
|
+type Series struct {
|
|
|
+ Name string `json:"name"`
|
|
|
+ Columns []string `json:"columns"`
|
|
|
+ Values []interface{} `json:"values"`
|
|
|
+}
|
|
|
+type Results struct {
|
|
|
+ Series []Series `json:"series"`
|
|
|
+}
|
|
|
+
|
|
|
+type GeneBoardTableEmpty struct {
|
|
|
+ Id int `orm:"id,primary" json:"id"`
|
|
|
+ K string `orm:"k" json:"k"`
|
|
|
+ K1 string `orm:"k1" json:"k1"`
|
|
|
+ K2 string `orm:"k2" json:"k2"`
|
|
|
+ K3 string `orm:"k3" json:"k3"`
|
|
|
+ K4 string `orm:"k4" json:"k4"`
|
|
|
+ K5 string `orm:"k5" json:"k5"`
|
|
|
+ K6 string `orm:"k6" json:"k6"`
|
|
|
+ K7 string `orm:"k7" json:"k7"`
|
|
|
+ K8 string `orm:"k8" json:"k8"`
|
|
|
+ K9 string `orm:"k9" json:"k9"`
|
|
|
+ K10 string `orm:"k10" json:"k10"`
|
|
|
+ K11 string `orm:"k11" json:"k11"`
|
|
|
+ K12 string `orm:"k12" json:"k12"`
|
|
|
+}
|
|
|
+
|
|
|
+var (
|
|
|
+ TableBaseNeo = "neo_test"
|
|
|
+ ModelBaseNeo = g.DB("default").Table(TableBaseNeo).Safe()
|
|
|
+)
|
|
|
+
|
|
|
+var (
|
|
|
+ Tablebank_apply_detail = "bank_apply_detail"
|
|
|
+ Modelbank_apply = g.DB("default").Table(Tablebank_apply_detail).Safe()
|
|
|
+)
|
|
|
+
|
|
|
+// Inserts does "INSERT...INTO..." statement for inserting current object into table.
|
|
|
+func (r *BaseNeo) Insert() (result sql.Result, err error) {
|
|
|
+ return ModelBaseNeo.Data(r).Insert()
|
|
|
+}
|
|
|
+
|
|
|
+// Replace does "REPLACE...INTO..." statement for inserting current object into table.
|
|
|
+// If there's already another same record in the table (it checks using primary key or unique index),
|
|
|
+// it deletes it and insert this one.
|
|
|
+func (r *BaseNeo) Replace() (result sql.Result, err error) {
|
|
|
+ return ModelBaseNeo.Data(r).Replace()
|
|
|
+}
|
|
|
+
|
|
|
+// Save does "INSERT...INTO..." statement for inserting/updating current object into table.
|
|
|
+// It updates the record if there's already another same record in the table
|
|
|
+// (it checks using primary key or unique index).
|
|
|
+func (r *BaseNeo) Save() (result sql.Result, err error) {
|
|
|
+ return ModelBaseNeo.Data(r).Save()
|
|
|
+}
|
|
|
+
|
|
|
+// Update does "UPDATE...WHERE..." statement for updating current object from table.
|
|
|
+// It updates the record if there's already another same record in the table
|
|
|
+// (it checks using primary key or unique index).
|
|
|
+func (r *BaseNeo) Update() (result sql.Result, err error) {
|
|
|
+ return ModelBaseNeo.Data(r).Where(gdb.GetWhereConditionOfStruct(r)).Update()
|
|
|
+}
|
|
|
+
|
|
|
+// Delete does "DELETE FROM...WHERE..." statement for deleting current object from table.
|
|
|
+func (r *BaseNeo) Delete() (result sql.Result, err error) {
|
|
|
+ return ModelBaseNeo.Where(gdb.GetWhereConditionOfStruct(r)).Delete()
|
|
|
+}
|