123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- package roadshow
- import (
- "github.com/beego/beego/v2/client/orm"
- "time"
- )
- type RsCalendarResearcher struct {
- RsCalendarResearcherId int `orm:"column(rs_calendar_researcher_id);pk"`
- RsCalendarId int `description:"日历活动id"`
- ResearcherId int `description:"研究员id"`
- ResearcherName string `description:"研究员名称"`
- StartDate string `description:"开始日期"`
- EndDate string `description:"结束日期"`
- StartTime string `description:"开始时间"`
- EndTime string `description:"结束时间"`
- StartWeek string `description:"开始日期对应周"`
- EndWeek string `description:"结束日期对应周"`
- CreateTime time.Time
- ModifyTime time.Time
- Status int `description:"状态:1:待接受,2:已接受,3:已拒绝,4:已删除,5:已撤回,6:已结束"`
- RefuseReason string `description:"拒绝理由"`
- RefuseTime time.Time `description:"拒绝时间"`
- DeleteReason string `description:"删除理由"`
- UnionCode string `description:"公开会议联合编码"`
- }
- func GetRsCalendarResearcher(endDate, endTime string) (list []*RsCalendarResearcher, err error) {
- sql := `SELECT * FROM rs_calendar_researcher WHERE status=1 AND status<>6 AND end_date=? AND end_time<=? `
- o := orm.NewOrm()
- _, err = o.Raw(sql, endDate, endTime).QueryRows(&list)
- return
- }
- func ModifyRsCalendarResearcherStatus(rsCalendarResearcherId int) (err error) {
- sql := ` UPDATE rs_calendar_researcher SET status=6,modify_time=NOW() WHERE rs_calendar_researcher_id=? `
- o := orm.NewOrm()
- _, err = o.Raw(sql, rsCalendarResearcherId).Exec()
- return
- }
- type RsMatters struct {
- RsMattersId int `orm:"column(rs_matters_id);pk"`
- SysUserId int `description:"添加事项人id"`
- SysUserRealName string `description:"创建人姓名"`
- StartDate string `description:"开始日期"`
- EndDate string `description:"结束日期"`
- StartTime string `description:"开始时间"`
- EndTime string `description:"结束时间"`
- StartWeek string `description:"开始日期周"`
- EndWeek string `description:"结束日期周"`
- MatterContent string `description:"事项内容"`
- Status int8 `description:"状态:1:进行中,6:已结束"`
- CreateTime time.Time `description:"创建时间"`
- ModifyTime time.Time `description:"修改时间"`
- IsSynced int `description:"是否与上海同步 0:未同步 1:已同步"`
- }
- func GetRsMatters(endDate, endTime string) (list []*RsMatters, err error) {
- sql := `SELECT * FROM rs_matters WHERE status<>6 AND end_date=? AND end_time<=? `
- o := orm.NewOrm()
- _, err = o.Raw(sql, endDate, endTime).QueryRows(&list)
- return
- }
- func ModifyRsMattersStatus(rsMattersId int) (err error) {
- sql := ` UPDATE rs_matters SET status=6,modify_time=NOW() WHERE rs_matters_id=? `
- o := orm.NewOrm()
- _, err = o.Raw(sql, rsMattersId).Exec()
- return
- }
- type RsCalendar struct {
- RsCalendarId int `orm:"column(rs_calendar_id);pk"`
- SysUserId int `description:"创建人id"`
- SysUserRealName string `description:"创建人名称"`
- ActivityType string `description:"活动类型"`
- RoadshowType string `description:"路演形式"`
- RoadshowPlatform string `description:"路演平台"`
- CompanyId int `description:"客户id"`
- CompanyName string `description:"客户名称"`
- Province string `description:"省"`
- ProvinceCode string `description:"省编码"`
- City string `description:"市"`
- CityCode string `description:"市编码"`
- Theme string `description:"会议主题"`
- CooperationName string `description:"合作方名称"`
- Title string `description:"展示在日历的标题"`
- Source int8 `description:"来源,0:自系统,1:上海方的"`
- CreateTime time.Time
- ModifyTime time.Time
- ActivityCategory string `description:"活动类别"`
- IsSynced int `description:"是否与上海同步 0:未同步 1:已同步"`
- UnionCode string `description:"公开会议联合编码"`
- }
- func GetRsCalendarById(rsCalendarId int) (item *RsCalendar, err error) {
- o := orm.NewOrm()
- sql := `SELECT * FROM rs_calendar WHERE rs_calendar_id=? `
- err = o.Raw(sql, rsCalendarId).QueryRow(&item)
- return
- }
- func GetRsCalendarResearcherById(rsCalendarId int) (item *RsCalendarResearcher, err error) {
- sql := `SELECT * FROM rs_calendar_researcher WHERE rs_calendar_researcher_id=? `
- o := orm.NewOrm()
- err = o.Raw(sql, rsCalendarId).QueryRow(&item)
- return
- }
|