报到门
commit
029bed0da2
@ -0,0 +1,741 @@
|
||||
package Common
|
||||
|
||||
const (
|
||||
OK = 200 // Success
|
||||
ERROR = 500 // Error
|
||||
NOFOUD = 404 // NOFOUD
|
||||
NotLoggedIn = 1000 // 未登录
|
||||
ParameterIllegal = 1001 // 参数不合法
|
||||
UnauthorizedUserId = 1002 // 非法的用户Id
|
||||
Unauthorized = 1003 // 未授权
|
||||
ServerError = 1004 // 系统错误
|
||||
NotData = 1005 // 没有数据
|
||||
ModelAddError = 1006 // 添加错误
|
||||
ModelDeleteError = 1007 // 删除错误
|
||||
ModelStoreError = 1008 // 存储错误
|
||||
OperationFailure = 1009 // 操作失败
|
||||
RoutingNotExist = 1010 // 路由不存在
|
||||
WebSocketBroadCast = "broadcast" // websocket广播消息类型
|
||||
WebSocketHeartBeat = "HeartBeat" // websocket心跳消息类型
|
||||
WebSocketOpen = "open" // websocket打开连接消息类型
|
||||
WebSocketChat = "chat" // websocket聊天消息消息类型
|
||||
WebSocketOnline = "online" // websocket会议上线消息类型
|
||||
WebSocketRefresh = "refresh" // websocket刷新在线人员消息类型
|
||||
WebSocketClose = "close" // websocket关闭连接消息类型
|
||||
WebSocketSSJK = "ssjk" // websocket实时监控消息类型
|
||||
WebSocketStartAgenda = "StartAgenda" // websocket报到界面类型
|
||||
WebSocketJumpView = "JumpView" // websocket报到界面类型
|
||||
WebSocketSoftViewStatus = "SoftViewStatus" // websocket软表决状态
|
||||
WebSocketReport = "Report" // websocket报到界面类型
|
||||
WebSocketCheckIn = "CheckIn" // websocket补报消报类型
|
||||
WebSocketSeat = "Seat" // websocket坐席图类型
|
||||
WebSocketSeats = "Seats" // websocket坐席图类型
|
||||
WebSocketConfence = "Confence" // websocket会务机
|
||||
WebSocketSpeak = "Speak" // websocket发言类型
|
||||
WebSocketAsk = "Ask" // websocket专题询问类型
|
||||
WebSocketVote = "Vote" // websocket表决类型
|
||||
WebSocketTerminal = "Terminal" // websocket终端管理类型
|
||||
WebSocketCall = "Call" // websocket呼叫类型
|
||||
WebSocketAnswerCall = "AnswerCall" // websocket响应呼叫类型
|
||||
WebSocketNotice = "Notice" // websocket通知公告类型
|
||||
WebSocketMeeting = "Meeting" // websocket正在会议中类型
|
||||
WebSocketAgendaForCheckDoor = "AgendaForCheckDoor" //websocket签到门会标
|
||||
WebSocketScreen = "Screen" // websocket大屏类型
|
||||
WebSocketScreenOpen = "ScreenOpen" // websocket大屏打开
|
||||
WebSocketScreenClose = "ScreenClose" // websocket大屏关闭
|
||||
WebSocketTopicView = "TopicView" // websocket议题信息
|
||||
WebSocketTopicFile = "TopicFile" // websocket议题文件信息
|
||||
WebSocketAgendaView = "AgendaView" // websocket议程信息
|
||||
WebSocketTopicViewOpen = "TopicViewOpen" // websocket议题预览
|
||||
WebSocketTopicViewClose = "TopicViewClose" // websocket议题预览关闭
|
||||
WebSocketScreenViewOpen = "ScreenViewOpen" // websocket窗体预览
|
||||
WebSocketScreenViewClose = "ScreenViewClose" // websocket窗体预览关闭
|
||||
WebSocketDeviceNum = "DeviceNum" // websocket地址号
|
||||
WebSocketLineStatus = "LineStatus" //在线状态
|
||||
WebSocketSendFilePer = "SendFilePer" //文件下载百分比
|
||||
WebSocketSendFileStatus = "SendFileStatus" //文件状态
|
||||
WebSocketChangeSeat = "ChangeSeat" // 会中换位置
|
||||
WebSocketChangeScreen = "ChangeScreen" // 会中修改权限页面更新
|
||||
|
||||
WebSocketAskProcessTime = "AskProcessTime" // 专题询问进度时间
|
||||
|
||||
WebSocketdownloadOK = "DownloadOK" // 下载成功
|
||||
WebSocketMeetingPerSon = "MeetingPerSon" //会中人员变动
|
||||
|
||||
WebSocketReportView = "ReportView" //报到人数
|
||||
WebSocketOneSeatView = "OneSeatView" //人员坐席信息
|
||||
WebSocketTopicData = "TopicData" //议题信息
|
||||
WebSocketSpeakColorRing = "SpeakColorRing" //发言闪烁
|
||||
WebSocketMobileScreen = "MobileScreen" // websocket移动屏类型
|
||||
WebSocketCheckInDoor = "CheckInDoor" //报到门消息
|
||||
WebSocketCloseExe = "CloseEXE" // 关闭exe
|
||||
WebSocketCloseElectron = "closeElectron" // 关闭exe
|
||||
WebSocketChangeHostTip = "ShowTip" // 切换主机提示
|
||||
WebSocketStartShareScreen = "StartShareScreen" //开始同屏
|
||||
WebSocketEndShareScreen = "EndShareScreen" //结束同屏
|
||||
WebSocketStartShareDraw = "StartShareDraw" //开始电子白板协同
|
||||
WebSocketEndShareDraw = "EndShareDraw" //结束电子白板协同
|
||||
WebSocketOpenFile = "OpenFile" //打开文件
|
||||
WebSocketCloseFile = "CloseFile" //关闭文件
|
||||
WebSocketClearFile = "ClearFile" //清理文件
|
||||
WebSocketShowStaffInfo = "ShowStaffInfo" //显示个人信息
|
||||
WebSocketSendMessage = "SendMessage" //下发消息
|
||||
WebSocketHideStaffInfo = "HideStaffInfo" //隐藏个人信息
|
||||
|
||||
WebSocketTerminalOff = "TerminalOff" //终端关机
|
||||
WebSocketFileRate = "FileRate" //文件下载进度
|
||||
WebSocketTestVote = "TestVote" // websocket正在测试表决
|
||||
WebSocketEndAgenda = "EndAgenda"
|
||||
WebSocketAgendaMessage = "AgendaMessage"
|
||||
WebSocketDeleteFile = "DeleteFile"
|
||||
WebSocketScreenEvent = "ScreenEvent" // websocket大屏类型
|
||||
WebSocketICCardNum = "ICCardNum" // websocketIC卡刷卡类型
|
||||
SUCCESSFLAG = true
|
||||
ERRORFLAG = false
|
||||
DBRESULT = "dbresult"
|
||||
DATATABLEDRAW = "draw"
|
||||
DATATABLETOTAL = "recordsTotal"
|
||||
DATATABLEFILTER = "recordsFiltered"
|
||||
KEYID = "id"
|
||||
DATALIST = "list"
|
||||
PAGESIZE = "pageSize"
|
||||
PAGESTART = "pageStart"
|
||||
DATATOTAL = "total"
|
||||
DATACURRENT = "currentPage"
|
||||
DATARESULT = "result"
|
||||
PAGESIZE_NUM = 6 //每页显示多少条
|
||||
PAGESTART_NUM = 0 //mysql表示第一页
|
||||
DATATOTAL_NUM = 0 //总数
|
||||
DATACURRENT_NUM = 0 //mysql表示第一页
|
||||
PAGINATION = "pagination"
|
||||
DATARECORD = "datarecord"
|
||||
DATASTATUS = "status"
|
||||
DATASUCCESS = "success"
|
||||
DATAMESSAGE = "message"
|
||||
SAVEOBJ = "saveobj"
|
||||
UPDATEOBJ = "updateobj"
|
||||
DELETEOBJ = "deleteobj"
|
||||
INSERTBATCHOBJ = "insertbatchobj"
|
||||
IDSOBJ = "idsobj"
|
||||
UPDATEBATCHOBJ = "updatebatchobj"
|
||||
DELETE_SUCCESS_MSG = "数据删除成功!"
|
||||
DELETE_FAIL_MSG = "数据删除失败!"
|
||||
INSERT_SUCCESS_MSG = "数据插入成功!"
|
||||
INSERT_FAIL_MSG = "数据插入失败!"
|
||||
UPDATE_SUCCESS_MSG = "数据更新成功!"
|
||||
UPDATE_FAIL_MSG = "数据更新失败!"
|
||||
UpLow_FAIL_MSG = "不能上移或下移!"
|
||||
QUERY_SUCCESS_MSG = "数据查询成功!"
|
||||
QUERY_FAIL_MSG = "数据查询失败!"
|
||||
UPLOAD_SUCCESS_MSG = "上传成功!"
|
||||
UPLOAD_FAIL_MSG = "上传失败!"
|
||||
DOWNLOAD_SUCCESS_MSG = "下载成功!"
|
||||
DOWNLOAD_FAIL_MSG = "下载失败!"
|
||||
IMPORT_SUCCESS_MSG = "导入成功!"
|
||||
IMPORT_FAIL_MSG = "导入失败!"
|
||||
EXPORT_SUCCESS_MSG = "导出成功!"
|
||||
EXPORT_FAIL_MSG = "导出失败!"
|
||||
CONNECT_FAIL_MSG = "设备连接失败!"
|
||||
CONNECT_SUCCESS_MSG = "设备连接成功!"
|
||||
AGENDASTART_FAIL_MSG = "当前会议正在召开!"
|
||||
UPLOAD_ROUTE = "public/upload/"
|
||||
UPLOADSETTING_ROUTE = "public/upload/setting/" //配置文件
|
||||
SEATTHEME_ROUTE = "public/upload/seattheme/"
|
||||
CONGRESS_BULLETIN = "public/upload/congressbulletin/" //会议简报路径
|
||||
CONGRESS_FILES = "public/upload/congressfiles/" //议题文件路径
|
||||
CONGRESS_EXCELFILES = "public/upload/congressexcelfiles/" //导出excel路径
|
||||
CONGRESS_VERSION = "public/upload/congressversion/" //版本文件路径
|
||||
MEETINGNEWS_IMG = "public/upload/meetingnewsimg/" //会议新闻图片
|
||||
UPLOAD_ROUTE2 = "public/upload"
|
||||
IMG_ROUTE = "public/upload/img/"
|
||||
PIC_ROUTE = "public/upload/pic/"
|
||||
SCREEN_XML = "public/upload/screenxml/"
|
||||
SOUND_RECORD_ROUTE = "public/upload/soundrecord/"
|
||||
JPG_ROUTE = "public/upload/jpgthum/"
|
||||
UPLOAD_STAFFROUTE = "public/upload/staff/"
|
||||
MEETINGAGENDA_ROUTE = "public/upload/meetingagenda/" //会议议程文件夹 MeetingAgenda
|
||||
MEETINGNEWS_ROUTE = "public/upload/meetingnews/" //会议新闻文件夹 Meetingnews
|
||||
MEETINGSCHEDULE_ROUTE = "public/upload/meetingschedule/" //会议日程文件夹 t_meetingschedule
|
||||
MEETINGHUIFENG_ROUTE = "public/upload/meetinghuifeng/" //会风会纪文件 t_meetinghuifeng
|
||||
UPLOAD_ROUTESeattheme = "public/upload/seatthemeimage/"
|
||||
PERSONCONGRESS_FILES = "public/upload/personcongressfiles/" //个人批注议题文件路径
|
||||
TIMETEMPLATE = "2006-01-02 15:04:05" //常规类型
|
||||
DBTYPE_MYSQL = "mysql"
|
||||
DBTYPE_DM = "dm"
|
||||
DBTYPE_KINGBASE = "kingbase"
|
||||
DBTYPE_KINGBASE_NEW = "postgres"
|
||||
LIBREOFFICE_ROUTE = "C:\\Program Files\\LibreOffice\\program\\swriter.exe"
|
||||
|
||||
// LIBREOFFICE_ROUTE = "plug\\lib\\swriter.exe"
|
||||
// LIBREOFFICE_ROUTE = "C:\\LibreOffice\\program\\swriter.exe"
|
||||
)
|
||||
|
||||
// 根据错误码 获取错误信息
|
||||
func GetErrorMessage(code uint32, message string) string {
|
||||
var codeMessage string
|
||||
codeMap := map[uint32]string{
|
||||
OK: "Success",
|
||||
NotLoggedIn: "未登录",
|
||||
ParameterIllegal: "参数不合法",
|
||||
UnauthorizedUserId: "非法的用户Id",
|
||||
Unauthorized: "未授权",
|
||||
NotData: "没有数据",
|
||||
ServerError: "系统错误",
|
||||
ModelAddError: "添加错误",
|
||||
ModelDeleteError: "删除错误",
|
||||
ModelStoreError: "存储错误",
|
||||
OperationFailure: "操作失败",
|
||||
RoutingNotExist: "路由不存在",
|
||||
}
|
||||
|
||||
if message == "" {
|
||||
if value, ok := codeMap[code]; ok {
|
||||
// 存在
|
||||
codeMessage = value
|
||||
} else {
|
||||
codeMessage = "未定义错误类型!"
|
||||
}
|
||||
} else {
|
||||
codeMessage = message
|
||||
}
|
||||
|
||||
return codeMessage
|
||||
}
|
||||
|
||||
type SessionStatus int
|
||||
|
||||
const (
|
||||
//默认屏
|
||||
SessionStatus_UnStart SessionStatus = -1
|
||||
//开始会议
|
||||
SessionStatus_StartSession SessionStatus = 0
|
||||
//开始报到
|
||||
SessionStatus_StartReport SessionStatus = 1
|
||||
//正在报到
|
||||
SessionStatus_Reporting SessionStatus = 2
|
||||
//结束报到
|
||||
SessionStatus_StopReport SessionStatus = 3
|
||||
//开始议题
|
||||
SessionStatus_StartTopic SessionStatus = 4
|
||||
//开始发言
|
||||
SessionStatus_StartSpeak SessionStatus = 5
|
||||
//正在发言
|
||||
SessionStatus_Speaking SessionStatus = 6
|
||||
//结束发言
|
||||
SessionStatus_StopSpeak SessionStatus = 7
|
||||
//开始表决
|
||||
SessionStatus_StartVote SessionStatus = 8
|
||||
//正在表决
|
||||
SessionStatus_Voting SessionStatus = 9
|
||||
//结束表决
|
||||
SessionStatus_StopVote SessionStatus = 10
|
||||
//开始测评
|
||||
SessionStatus_StartAppraise SessionStatus = 11
|
||||
//正在测评
|
||||
SessionStatus_Appraising SessionStatus = 12
|
||||
//结束测评
|
||||
SessionStatus_StopAppraise SessionStatus = 13
|
||||
//开始定制表决
|
||||
SessionStatus_StartMuchVote SessionStatus = 14
|
||||
//正在定制表决
|
||||
SessionStatus_MuchVoting SessionStatus = 15
|
||||
//结束定制表决
|
||||
SessionStatus_StopMuchVote SessionStatus = 16
|
||||
//开始多项测评
|
||||
SessionStatus_StartMuchAppraise SessionStatus = 17
|
||||
//正在多项测评
|
||||
SessionStatus_MuchAppraising SessionStatus = 18
|
||||
//结束多项测评
|
||||
SessionStatus_StopMuchAppraise SessionStatus = 19
|
||||
//开始专题询问
|
||||
SessionStatus_StartAsk SessionStatus = 20
|
||||
//询问
|
||||
SessionStatus_AskOneing SessionStatus = 21
|
||||
//回答
|
||||
SessionStatus_AskTwoing SessionStatus = 22
|
||||
//追问
|
||||
SessionStatus_AskThreeing SessionStatus = 23
|
||||
//总结
|
||||
SessionStatus_AskFouring SessionStatus = 24
|
||||
//结束专题询问
|
||||
SessionStatus_StopAsking SessionStatus = 25
|
||||
//结束议题
|
||||
SessionStatus_StopTopic SessionStatus = 26
|
||||
//结束会议
|
||||
SessionStatus_StopSession SessionStatus = 27 //
|
||||
/// 开始宣誓
|
||||
SessionStatus_StartPledge SessionStatus = 28
|
||||
//国歌
|
||||
SessionStatus_StartSing SessionStatus = 29
|
||||
//开始打分
|
||||
SessionStatus_StartScoring SessionStatus = 30
|
||||
//正在打分
|
||||
SessionStatus_Scoring SessionStatus = 31
|
||||
//结束打分
|
||||
SessionStatus_EndScoring SessionStatus = 32
|
||||
//开始多项打分
|
||||
SessionStatus_StartMuchScoring SessionStatus = 33
|
||||
//正在多项打分
|
||||
SessionStatus_MuchScoring SessionStatus = 34
|
||||
//结束多项打分
|
||||
SessionStatus_EndMuchScoring SessionStatus = 35
|
||||
//宪法宣誓仪式
|
||||
SessionStatus_BeforPledge SessionStatus = 36
|
||||
//模式1
|
||||
SessionStatus_TypeOne SessionStatus = 37
|
||||
//模式2
|
||||
SessionStatus_TypeTwo SessionStatus = 38
|
||||
//模式3
|
||||
SessionStatus_TypeThree SessionStatus = 39
|
||||
//模式4
|
||||
SessionStatus_TypeFore SessionStatus = 40
|
||||
//模式5
|
||||
SessionStatus_TypeFive SessionStatus = 41
|
||||
//模式6
|
||||
SessionStatus_TypeSix SessionStatus = 42
|
||||
//模式7
|
||||
SessionStatus_TypeSeven SessionStatus = 43
|
||||
//模式8
|
||||
SessionStatus_TypeEight SessionStatus = 44
|
||||
//模式9
|
||||
SessionStatus_TypeNine SessionStatus = 45
|
||||
//模式10
|
||||
SessionStatus_TypeTen SessionStatus = 46
|
||||
)
|
||||
|
||||
type ScreenBindingID int
|
||||
|
||||
const (
|
||||
//-- 标签系统变量 --
|
||||
|
||||
//没有绑定字段
|
||||
None_ScreenBindingID string = "-1"
|
||||
|
||||
//屏幕最后刷新时间(测试用)
|
||||
Time_ScreenBindingID string = "0x01"
|
||||
//当前日期
|
||||
Date_ScreenBindingID string = "0x02"
|
||||
//软件研发单位
|
||||
CompanyName_ScreenBindingID string = "0x03"
|
||||
//会议主办单位
|
||||
SponsorName_ScreenBindingID string = "0x04"
|
||||
//主持人
|
||||
ExcChairmanName_ScreenBindingID string = "0x1014"
|
||||
|
||||
//-- 会议信息 --
|
||||
|
||||
//议程名称
|
||||
SessionMajorTitle_ScreenBindingID string = "0x1001"
|
||||
//议程内容
|
||||
SessionMinorTitle_ScreenBindingID string = "0x1002"
|
||||
//会议名称+日程名称
|
||||
SessionLongName_ScreenBindingID string = "0x100G"
|
||||
//会标
|
||||
SessionTitleFormat_ScreenBindingID string = "0x1000"
|
||||
|
||||
//会议类型
|
||||
CongressType_ScreenBindingID string = "0x100A"
|
||||
|
||||
//-- 报到 --
|
||||
//应到人数
|
||||
PeoplesDueCount_ScreenBindingID string = "0x1003"
|
||||
//实到人数
|
||||
PeoplesInCount_ScreenBindingID string = "0x1004"
|
||||
//未到人数
|
||||
PeoplesAbsentCount_ScreenBindingID string = "0x1005"
|
||||
//请假人数
|
||||
PeoplesRequestedForAbsentCount_ScreenBindingID string = "0x1006"
|
||||
//请假和未到人数
|
||||
PeolesUncheckedInCount_ScreenBindingID string = "0x1007"
|
||||
|
||||
//当前报到人员姓名
|
||||
CurrentCheckingPeoplesName_ScreenBindingID string = "0x1008"
|
||||
//当前报到人员单位名称
|
||||
CurrentCheckingPeoplesUnit_ScreenBindingID string = "0x1009"
|
||||
//"实到人数(有表决权的)出席率"
|
||||
PeolesBiaoJuecheckedInPercent_ScreenBindingID string = "0x100B"
|
||||
//实到人数出席率
|
||||
PeolescheckedInPercent_ScreenBindingID string = "0x100C"
|
||||
|
||||
//"应到人数(可修改)"
|
||||
PeoplesCanDueCount_ScreenBindingID string = "0x100D"
|
||||
//实到人数(可修改)
|
||||
PeoplesInCanCount_ScreenBindingID string = "0x100E"
|
||||
//未到人数(可修改)
|
||||
PeoplesAbsentCanCount_ScreenBindingID string = "0x100F"
|
||||
//当前报到人员党派
|
||||
CurrentCheckingPeoplesDangPai_ScreenBindingID string = "0x1010"
|
||||
//当前报到人员职位
|
||||
CurrentCheckingPeoplesLevel_ScreenBindingID string = "0x1011"
|
||||
//当前报到人员民族
|
||||
CurrentCheckingPeoplesMinzu_ScreenBindingID string = "0x1012"
|
||||
//当前报到人员代表团
|
||||
CurrentCheckingPeoplesGroup_ScreenBindingID string = "0x1013"
|
||||
|
||||
//当前刷卡状态
|
||||
CurrentRefrushCardStatePrompt_ScreenBindingID string = "0x1068"
|
||||
//本机报到人数
|
||||
ThisClientPCInCountOfPerson_ScreenBindingID string = "0x1069"
|
||||
//本机报到列席人数
|
||||
ThisClientPCInCountOfSpectator_ScreenBindingID string = "0x1092"
|
||||
//本机报到代表人数
|
||||
ThisClientPCInCountOfOfDelegate_ScreenBindingID string = "0x1093"
|
||||
//本机当前报到提示 报到前 请您按报到键报到 报道后 您已报到
|
||||
ThisClientPCCurrentPeopleTip_ScreenBindingID string = "0x107A"
|
||||
//本机当前表决提示 表决前 请按表决键 表决后 您已表决
|
||||
ThisClientPCCurrentPeopleVoteTip_ScreenBindingID string = "0x107B"
|
||||
//本机当前表决提示 发言前 请按发言键申请发言
|
||||
ThisClientPCCurrentPeopleSpeakTip_ScreenBindingID string = "0x107C"
|
||||
//本机当前报到人
|
||||
ThisClientPCCurrentPeopleName_ScreenBindingID string = "0x1070"
|
||||
|
||||
//本机当前报到人单位
|
||||
/// 这个怎么跟照片列表的代码一样了呢?严重的问题啊
|
||||
ThisClientPCCurrentPeopleUnit_ScreenBindingID string = "0x1071"
|
||||
|
||||
//本机当前报到人职务
|
||||
ThisClientPCCurrentPeopleLevel_ScreenBindingID string = "0x1072"
|
||||
|
||||
//本机当前报到人照片
|
||||
ThisClientPCCurrentPeoplePhoto_ScreenBindingID string = "0x1073"
|
||||
|
||||
//本机当前报到人民族
|
||||
ThisClientPCCurrentPeopleMinzu_ScreenBindingID string = "0x1074"
|
||||
|
||||
//本机当前报到人党派
|
||||
ThisClientPCCurrentPeopleDangPai_ScreenBindingID string = "0x1075"
|
||||
|
||||
//本机当前报到人分组
|
||||
ThisClientPCCurrentPeopleGroup_ScreenBindingID string = "0x1076"
|
||||
|
||||
//本机当前报到人座排号
|
||||
ThisClientPCCurrentPeopleSeatRow_ScreenBindingID string = "0x1077"
|
||||
|
||||
//本机当前报到人座列号
|
||||
ThisClientPCCurrentPeopleSeatColumn_ScreenBindingID string = "0x1078"
|
||||
//本机当前报到人席位行号列号"X排X座",性能要优于单独取排、座值
|
||||
ThisClientPCCurrentPeopleSeatInfo_ScreenBindingID string = "0x1079"
|
||||
|
||||
//本机当前报到人席位分区
|
||||
ThisClientPCCurrentPeopleSeatArea_ScreenBindingID string = "0x1080"
|
||||
|
||||
//本机当前报到人所在会场
|
||||
ThisClientPCCurrentPeopleMeetingPlace_ScreenBindingID string = "0x1081"
|
||||
//本机当前报到人籍贯
|
||||
ThisClientPCCurrentPeopleJiGuan_ScreenBindingID string = "0x1086"
|
||||
//本机当前报到人身份证编号
|
||||
ThisClientPCCurrentPeopleShenFenZheng_ScreenBindingID string = "0x1087"
|
||||
//本机当前报到人人员类型
|
||||
ThisClientPCCurrentPeopleRenYuanLeiXing_ScreenBindingID string = "0x1088"
|
||||
//当前报到人员籍贯
|
||||
CurrentCheckingPeoplesJiGuan_ScreenBindingID string = "0x1089"
|
||||
//当前报到人员身份证编号
|
||||
CurrentCheckingPeoplesShenFenZheng_ScreenBindingID string = "0x1090"
|
||||
//当前报到人人员类型
|
||||
CurrentCheckingRenYuanLeiXing_ScreenBindingID string = "0x1091"
|
||||
|
||||
//本机当前报到人证件类型
|
||||
ThisClientPCCurrentPeopleZhengJianLeiXing_ScreenBindingID string = "0x1094"
|
||||
//当前当前报到人证件类型
|
||||
CurrentCheckingPeopleZhengJianLeiXing_ScreenBindingID string = "0x1095"
|
||||
//
|
||||
/// 本机当前报到人员席位
|
||||
///
|
||||
ThisClientPCCurrentPeopleXiWei_ScreenBindingID string = "0x1092"
|
||||
//按人员类型获取
|
||||
//
|
||||
/// 按人员类型获取本地报到人员数
|
||||
///
|
||||
LocalPeopleTypeCount_ScreenBindingID string = "0x1097"
|
||||
//
|
||||
/// 按人员类型获取会议报到人员数-实到
|
||||
///
|
||||
PeopleTypeCount_ScreenBindingID string = "0x1098"
|
||||
//
|
||||
/// 按类型获取应到人员
|
||||
///
|
||||
YindaoPeople_ScreenBindingID string = "0x1099"
|
||||
//
|
||||
/// 按类型绑定未到人员
|
||||
///
|
||||
WeidaoPeople_ScreenBindingID string = "0x1100"
|
||||
//
|
||||
/// 按人员类型获取本地报到人员数--有表决权限的
|
||||
///
|
||||
LocalQuanxianPeopleTypeCount_ScreenBindingID string = "0x110E"
|
||||
//
|
||||
/// 按类型获取应到人员-有表决权的
|
||||
///
|
||||
YindaoBiaojuePeople_ScreenBindingID string = "0x1101"
|
||||
//
|
||||
/// 有表决权的实到人数会议
|
||||
///
|
||||
PeopleBiaojueType_ScreenBindingID string = "0x1102"
|
||||
//
|
||||
/// 按类型绑定未到有表决权的人员
|
||||
///
|
||||
WeidaobiaojuePeple_ScreenBindingID string = "0x1103"
|
||||
|
||||
//
|
||||
/// 标签(新)RenYuan、HuiYiRenYuan扩展1。
|
||||
///
|
||||
KuoZhan1_ScreenBindingID string = "0x1104"
|
||||
|
||||
//
|
||||
/// 标签(新)RenYuan、HuiYiRenYuan扩展2。
|
||||
///
|
||||
KuoZhan2_ScreenBindingID string = "0x1105"
|
||||
|
||||
//
|
||||
/// 标签(新)RenYuan、HuiYiRenYuan扩展3。
|
||||
///
|
||||
KuoZhan3_ScreenBindingID string = "0x1106"
|
||||
|
||||
//
|
||||
/// 无表决权的应到人数
|
||||
///
|
||||
YindaoWUBiaojuePeople_ScreenBindingID string = "0x110A"
|
||||
//
|
||||
/// 无表决权的实到人数
|
||||
///
|
||||
PeopleWUBiaojueType_ScreenBindingID string = "0x110B"
|
||||
//
|
||||
/// 无表决权的未到人数
|
||||
///
|
||||
WeidaoWUbiaojuePeple_ScreenBindingID string = "0x110C"
|
||||
|
||||
//-- 按键 --
|
||||
//按键1名称
|
||||
AnJian1Mingcheng_ScreenBindingID string = "0x1015"
|
||||
//按按键1的人数
|
||||
AnJian1Value_ScreenBindingID string = "0x1016"
|
||||
//按键2名称
|
||||
AnJian2Mingcheng_ScreenBindingID string = "0x1017"
|
||||
//按按键2的人数
|
||||
AnJian2Value_ScreenBindingID string = "0x1018"
|
||||
//按键3名称
|
||||
AnJian3Mingcheng_ScreenBindingID string = "0x1019"
|
||||
//按按键3的人数
|
||||
AnJian3Value_ScreenBindingID string = "0x1020"
|
||||
//按键4名称
|
||||
AnJian4Mingcheng_ScreenBindingID string = "0x1021"
|
||||
//按按键4的人数
|
||||
AnJian4Value_ScreenBindingID string = "0x1022"
|
||||
//按键5名称
|
||||
AnJian5Mingcheng_ScreenBindingID string = "0x1023"
|
||||
//按按键5的人数
|
||||
AnJian5Value_ScreenBindingID string = "0x1024"
|
||||
//已按键人数
|
||||
AnJianValue_ScreenBindingID string = "0x101G"
|
||||
//未按键人数
|
||||
VoteUndeclareCount_ScreenBindingID string = "0x1025"
|
||||
//未按表决提示
|
||||
UnvoteInformation_ScreenBindingID string = "0x102D"
|
||||
//赞成或满意票过比例提示
|
||||
FavourInformation_ScreenBindingID string = "0x1066"
|
||||
|
||||
//测评平均分数
|
||||
AvgAppraise_ScreenBindingID string = "0x1109"
|
||||
|
||||
//子议题按键1名称
|
||||
ChildTopicAnJian1Mingcheng_ScreenBindingID string = "0x101A"
|
||||
//子议题按按键1的人数
|
||||
ChildTopicAnJian1Value_ScreenBindingID string = "0x101B"
|
||||
//子议题按键2名称
|
||||
ChildTopicAnJian2Mingcheng_ScreenBindingID string = "0x101C"
|
||||
//子议题按按键2的人数
|
||||
ChildTopicAnJian2Value_ScreenBindingID string = "0x101D"
|
||||
//子议题按键3名称
|
||||
ChildTopicAnJian3Mingcheng_ScreenBindingID string = "0x101E"
|
||||
//子议题按键4名称
|
||||
ChildTopicAnJian4Mingcheng_ScreenBindingID string = "0x103A"
|
||||
//子议题按键5名称
|
||||
ChildTopicAnJian5Mingcheng_ScreenBindingID string = "0x103B"
|
||||
//子议题按按键3的人数
|
||||
ChildTopicAnJian3Value_ScreenBindingID string = "0x101F"
|
||||
//子议题按按键4的人数
|
||||
ChildTopicAnJian4Value_ScreenBindingID string = "0x102E"
|
||||
//子议题按按键5的人数
|
||||
ChildTopicAnJian5Value_ScreenBindingID string = "0x102F"
|
||||
//子议题未按键人数
|
||||
ChildTopicVoteUndeclareCount_ScreenBindingID string = "0x102A"
|
||||
//子议题表决结果
|
||||
ChildTopicVoteResultText_ScreenBindingID string = "0x102B"
|
||||
//子议题表决结果
|
||||
ChildTopicAvgAppraise_ScreenBindingID string = "0x102C"
|
||||
|
||||
//多项议题全部按键人数
|
||||
MuchTopicAllPressNum_ScreenBindingID string = "0x103C"
|
||||
//多项议题部分按键人数
|
||||
MuchTopicPartPressNum_ScreenBindingID string = "0x103D"
|
||||
//多项议题未按键人数
|
||||
MuchTopicNoPressNum_ScreenBindingID string = "0x103E"
|
||||
//-- 议题 --
|
||||
//议题标题
|
||||
TopicMajorTitle_ScreenBindingID string = "0x1067"
|
||||
//议题备注
|
||||
TopicMajorRemark_ScreenBindingID string = "0x106A"
|
||||
//子议题
|
||||
TopicChild_ScreenBindingID string = "0x106B"
|
||||
//议题内容//todo:不知与CurrentSubjectContent的区别
|
||||
TopicContent_ScreenBindingID string = "0x1026"
|
||||
//当前议题内容
|
||||
CurrentSubjectContent_ScreenBindingID string = "0x1030"
|
||||
//表决结果
|
||||
VoteResultText_ScreenBindingID string = "0x1027"
|
||||
//表决限时
|
||||
VoteRestrictTime_ScreenBindingID string = "0x1028"
|
||||
|
||||
//-- 发言 --
|
||||
//当前发言人姓名
|
||||
CurrentSpeakingPeoplesName_ScreenBindingID string = "0x1031"
|
||||
//当前发言人单位名称
|
||||
CurrentSpeakingPeoplesUnit_ScreenBindingID string = "0x1032"
|
||||
//当前发言人党派
|
||||
CurrentSpeakingPeoplesDangPai_ScreenBindingID string = "0x1033"
|
||||
//当前发言人职位
|
||||
CurrentSpeakingPeoplesLevel_ScreenBindingID string = "0x1034"
|
||||
//当前发言人民族
|
||||
CurrentSpeakingPeoplesMinzu_ScreenBindingID string = "0x1035"
|
||||
//当前发言人代表团
|
||||
CurrentSpeakingPeoplesGroup_ScreenBindingID string = "0x1036"
|
||||
//当前申请发言人姓名
|
||||
CurrentApplySpeakingPeoplesName_ScreenBindingID string = "0x1037"
|
||||
//当前申请发言人单位名称
|
||||
CurrentApplySpeakingPeoplesUnit_ScreenBindingID string = "0x1038"
|
||||
//当前申请发言人党派
|
||||
CurrentApplySpeakingPeoplesDangPai_ScreenBindingID string = "0x1039"
|
||||
//当前申请发言人职位
|
||||
CurrentApplySpeakingPeoplesLevel_ScreenBindingID string = "0x1040"
|
||||
//当前申请发言人民族
|
||||
CurrentApplySpeakingPeoplesMinzu_ScreenBindingID string = "0x1041"
|
||||
//当前申请发言人代表团
|
||||
CurrentApplySpeakingPeoplesGroup_ScreenBindingID string = "0x1042"
|
||||
//发言限时
|
||||
SpeakingRestrictTime_ScreenBindingID string = "0x1043"
|
||||
|
||||
//-- 百分比 --
|
||||
//按键1百分比
|
||||
AnJian1Percent_ScreenBindingID string = "0x1044"
|
||||
//按键2百分比
|
||||
AnJian2Percent_ScreenBindingID string = "0x1045"
|
||||
//按键3百分比
|
||||
AnJian3Percent_ScreenBindingID string = "0x1046"
|
||||
//按键4百分比
|
||||
AnJian4Percent_ScreenBindingID string = "0x1047"
|
||||
//按键5百分比
|
||||
AnJian5Percent_ScreenBindingID string = "0x1048"
|
||||
//未按百分比
|
||||
UnPushDownPercent_ScreenBindingID string = "0x1049"
|
||||
//已按百分比
|
||||
PushDownPercent_ScreenBindingID string = "0x1050"
|
||||
//弃权含未按百分比
|
||||
WaiverOrUnPushDownPercent_ScreenBindingID string = "0x1051"
|
||||
|
||||
//按键1百分比
|
||||
ChildTopicAnJian1Percent_ScreenBindingID string = "0x105A"
|
||||
//按键2百分比
|
||||
ChildTopicAnJian2Percent_ScreenBindingID string = "0x105B"
|
||||
//按键3百分比
|
||||
ChildTopicAnJian3Percent_ScreenBindingID string = "0x105C"
|
||||
//未按百分比
|
||||
ChildTopicUnPushDownPercent_ScreenBindingID string = "0x105D"
|
||||
|
||||
//-- 人数 --
|
||||
//表决应到人数
|
||||
VotePeoplesDueCount_ScreenBindingID string = "0x1052"
|
||||
//表决实到人数
|
||||
VotePeoplesInCount_ScreenBindingID string = "0x1053"
|
||||
//表决未到人数
|
||||
VotePeoplesAbsentCount_ScreenBindingID string = "0x1054"
|
||||
//列席应到人数
|
||||
DueCountOfSpectator_ScreenBindingID string = "0x1055"
|
||||
//列席实到人数
|
||||
InCountOfSpectator_ScreenBindingID string = "0x1056"
|
||||
//列席未到人数
|
||||
AbsentCountOfSpectator_ScreenBindingID string = "0x1057"
|
||||
//弃权含未按人数
|
||||
WaiverOrUnPushDownCount_ScreenBindingID string = "0x1058"
|
||||
//应到代表人数
|
||||
DueCountOfDelegate_ScreenBindingID string = "0x1083"
|
||||
//实到代表人数
|
||||
InCountOfDelegate_ScreenBindingID string = "0x1084"
|
||||
//未到代表不含列席人数
|
||||
AbsentCountOfDelegate_ScreenBindingID string = "0x1085"
|
||||
|
||||
//会议报到状态
|
||||
ReportState_ScreenBindingID string = "0x2015"
|
||||
|
||||
//-- 图片系统变量 --
|
||||
|
||||
//当前报到人照片
|
||||
CurrentCheckingPeoplesPhoto_ScreenBindingID string = "0x1029"
|
||||
//当前发言人照片
|
||||
CurrentSpeakingPeoplesPhoto_ScreenBindingID string = "0x1059"
|
||||
//当前申请发言人照片
|
||||
CurrentApplySpeakingPeoplesPhoto_ScreenBindingID string = "0x1060"
|
||||
//预设图片会标
|
||||
HasedPhoto_ScreenBindingID string = "0x2134"
|
||||
|
||||
//静态图片(可用于会标)
|
||||
StaticPhoto_ScreenBindingID string = "0x2111"
|
||||
|
||||
//-- 动态列表变量 --
|
||||
|
||||
//人员报到人列表
|
||||
PeoplesCheckingList_ScreenBindingID string = "0x1061"
|
||||
//人员发言人列表
|
||||
PeoplesSpeakingList_ScreenBindingID string = "0x1062"
|
||||
//人员申请发言人列表
|
||||
PeoplesApplySpeakingList_ScreenBindingID string = "0x1063"
|
||||
//人员已发言人列表
|
||||
PeoplesAlreadySpeakingList_ScreenBindingID string = "0x1064"
|
||||
|
||||
//照片列表
|
||||
PeoplesImageList_ScreenBindingID string = "0x1271"
|
||||
//代表团列表
|
||||
PeoplesGroupList_ScreenBindingID string = "0x1096"
|
||||
|
||||
//子议题列表
|
||||
TTopic_ScreenBindingID string = "0x106C"
|
||||
|
||||
//本机报到人员列表
|
||||
ThisClientPCCheckInArray_ScreenBindingID string = "0x1082"
|
||||
//按预报到人员姓名拼音
|
||||
CheckInOrderByName_ScreenBindingID string = "0x1107"
|
||||
//按预报到人员证件卡号
|
||||
CheckInOrderByCard_ScreenBindingID string = "0x1108"
|
||||
//按预报到人员的座列号
|
||||
CheckInOrderBySeat_ScreenBindingID string = "0x1110"
|
||||
|
||||
//-- 滚动文本变量 --
|
||||
//滚动文本
|
||||
RollText_ScreenBindingID string = "0x1065"
|
||||
|
||||
//--告警抓拍
|
||||
/// 告警抓拍控件
|
||||
MonitorVideo_ScreenBindingID string = "0x1201"
|
||||
/// 抓拍图片列表///
|
||||
MonitorCapture_ScreenBindingID string = "0x1202"
|
||||
|
||||
//--席位图控件
|
||||
/// 席位图///
|
||||
Seat_ScreenBindingID string = "0x1203"
|
||||
|
||||
//报到按钮
|
||||
Checkin_ScreenBindingID string = "0x2021"
|
||||
//申请发言按钮
|
||||
StartSpeak_ScreenBindingID string = "0x2022"
|
||||
//结束发言按钮
|
||||
EndSpeak_ScreenBindingID string = "0x2023"
|
||||
//按键1按钮
|
||||
ButtonOne_ScreenBindingID string = "0x2024"
|
||||
//按键2按钮
|
||||
ButtonTwo_ScreenBindingID string = "0x2025"
|
||||
//按键3按钮
|
||||
ButtonThree_ScreenBindingID string = "0x2026"
|
||||
//按键4按钮
|
||||
ButtonFour_ScreenBindingID string = "0x2027"
|
||||
//按键5按钮
|
||||
ButtonFive_ScreenBindingID string = "0x2028"
|
||||
)
|
@ -0,0 +1,439 @@
|
||||
package Common
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/md5"
|
||||
"crypto/rand"
|
||||
"encoding/binary"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"fyne.io/fyne/v2"
|
||||
"fyne.io/fyne/v2/widget"
|
||||
"github.com/jlaffaye/ftp"
|
||||
gcfg "gopkg.in/gcfg.v1"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
type FLXConfig struct {
|
||||
Kingbase struct {
|
||||
IP string //IP
|
||||
Name string //数据库名
|
||||
Username string //用户名
|
||||
Password string //密码
|
||||
}
|
||||
CheckInDoor struct {
|
||||
PortName string
|
||||
DoorName string
|
||||
BaudRate int
|
||||
DataBits int
|
||||
StopBits int
|
||||
ParityMode int
|
||||
FtpServerIP string
|
||||
FtpServerPort string
|
||||
FtpUsername string
|
||||
FTPtpPassword string
|
||||
FtpPath string
|
||||
FtplocalDir string
|
||||
Windowsize string
|
||||
Windowposition string
|
||||
IconType string
|
||||
ChromePath string
|
||||
BigPara float32
|
||||
}
|
||||
SeverData struct {
|
||||
ServerIP string
|
||||
BackUpServerIP string
|
||||
FTPServiceIP string
|
||||
FTPServiceName string
|
||||
FTPServicePassWord string
|
||||
HttpFileUrl string
|
||||
}
|
||||
Other struct {
|
||||
DShow bool
|
||||
CongressNameWrap bool
|
||||
Dtype int
|
||||
ISServer bool
|
||||
}
|
||||
}
|
||||
|
||||
func LoadConfig() FLXConfig {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("LoadConfig:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
var FLXCfig FLXConfig
|
||||
err := gcfg.ReadFileInto(&FLXCfig, "Config.ini")
|
||||
|
||||
if err != nil {
|
||||
fmt.Println("Failed to parse config file: %s", err)
|
||||
}
|
||||
return FLXCfig
|
||||
}
|
||||
|
||||
var objectIdCounter uint32 = 0
|
||||
|
||||
var machineId = readMachineId()
|
||||
|
||||
type ObjectId string
|
||||
|
||||
func readMachineId() []byte {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("readMachineId:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
var sum [3]byte
|
||||
id := sum[:]
|
||||
hostname, err1 := os.Hostname()
|
||||
if err1 != nil {
|
||||
_, err2 := io.ReadFull(rand.Reader, id)
|
||||
if err2 != nil {
|
||||
panic(fmt.Errorf("cannot get hostname: %v; %v", err1, err2))
|
||||
}
|
||||
return id
|
||||
}
|
||||
hw := md5.New()
|
||||
hw.Write([]byte(hostname))
|
||||
copy(id, hw.Sum(nil))
|
||||
fmt.Println("readMachineId:" + string(id))
|
||||
return id
|
||||
}
|
||||
|
||||
// GUID returns a new unique ObjectId.
|
||||
// 4byte 时间,
|
||||
// 3byte 机器ID
|
||||
// 2byte pid
|
||||
// 3byte 自增ID
|
||||
func GetGUID() ObjectId {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("GetGUID:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
var b [12]byte
|
||||
// Timestamp, 4 bytes, big endian
|
||||
binary.BigEndian.PutUint32(b[:], uint32(time.Now().Unix()))
|
||||
// Machine, first 3 bytes of md5(hostname)
|
||||
b[4] = machineId[0]
|
||||
b[5] = machineId[1]
|
||||
b[6] = machineId[2]
|
||||
// Pid, 2 bytes, specs don't specify endianness, but we use big endian.
|
||||
pid := os.Getpid()
|
||||
b[7] = byte(pid >> 8)
|
||||
b[8] = byte(pid)
|
||||
// Increment, 3 bytes, big endian
|
||||
i := atomic.AddUint32(&objectIdCounter, 1)
|
||||
b[9] = byte(i >> 16)
|
||||
b[10] = byte(i >> 8)
|
||||
b[11] = byte(i)
|
||||
return ObjectId(b[:])
|
||||
}
|
||||
|
||||
// Hex returns a hex representation of the ObjectId.
|
||||
// 返回16进制对应的字符串
|
||||
func (id ObjectId) Hex() string {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("Hex:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
return hex.EncodeToString([]byte(id))
|
||||
}
|
||||
|
||||
func NewTreeWithDatas(data map[string][]string) (t *widget.Tree) {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("NewTreeWithDatas:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
t = &widget.Tree{
|
||||
ChildUIDs: func(uid string) (c []string) {
|
||||
c = data[uid]
|
||||
return
|
||||
},
|
||||
IsBranch: func(uid string) (b bool) {
|
||||
_, b = data[uid]
|
||||
return
|
||||
},
|
||||
CreateNode: func(branch bool) fyne.CanvasObject {
|
||||
return widget.NewLabel("Template Object")
|
||||
},
|
||||
UpdateNode: func(uid string, branch bool, node fyne.CanvasObject) {
|
||||
|
||||
node.(*widget.Label).SetText(strings.Split(uid, "|")[1])
|
||||
},
|
||||
}
|
||||
t.ExtendBaseWidget(t)
|
||||
return
|
||||
}
|
||||
|
||||
func ExternalIP() (net.IP, error) {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("ExternalIP:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
ifaces, err := net.Interfaces()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
for _, iface := range ifaces {
|
||||
if iface.Flags&net.FlagUp == 0 {
|
||||
continue // interface down
|
||||
}
|
||||
if iface.Flags&net.FlagLoopback != 0 {
|
||||
continue // loopback interface
|
||||
}
|
||||
addrs, err := iface.Addrs()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
for _, addr := range addrs {
|
||||
ip := getIpFromAddr(addr)
|
||||
if ip == nil {
|
||||
continue
|
||||
}
|
||||
return ip, nil
|
||||
}
|
||||
}
|
||||
return nil, errors.New("connected to the network?")
|
||||
}
|
||||
|
||||
func getIpFromAddr(addr net.Addr) net.IP {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("getIpFromAddr:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
var ip net.IP
|
||||
switch v := addr.(type) {
|
||||
case *net.IPNet:
|
||||
ip = v.IP
|
||||
case *net.IPAddr:
|
||||
ip = v.IP
|
||||
}
|
||||
if ip == nil || ip.IsLoopback() {
|
||||
return nil
|
||||
}
|
||||
ip = ip.To4()
|
||||
if ip == nil {
|
||||
return nil // not an ipv4 address
|
||||
}
|
||||
|
||||
return ip
|
||||
}
|
||||
|
||||
func IsContain(items []string, item string) bool {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("IsContain:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
for _, eachItem := range items {
|
||||
if eachItem == item {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func Remove(items []string, item string) []string {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("Remove:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
var IndexN int
|
||||
for id, eachItem := range items {
|
||||
if eachItem == item {
|
||||
IndexN = id
|
||||
}
|
||||
}
|
||||
items = append(items[:IndexN], items[IndexN+1:]...)
|
||||
return items
|
||||
}
|
||||
|
||||
func DownloadDir(c *ftp.ServerConn, remoteDir, localDir string) error {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("DownloadDir:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
// 列出远程目录中的所有文件和子目录
|
||||
entries, err := c.List(remoteDir)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// 确保本地目录存在
|
||||
err = os.MkdirAll(localDir, os.ModePerm)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// 遍历目录内容
|
||||
for _, entry := range entries {
|
||||
remotePath := remoteDir + "/" + entry.Name
|
||||
localPath := filepath.Join(localDir, entry.Name)
|
||||
|
||||
if entry.Type == ftp.EntryTypeFile {
|
||||
// 如果是文件,下载它
|
||||
err := downloadFile(c, remotePath, localPath)
|
||||
if err != nil {
|
||||
log.Printf("下载文件失败: %v\n", err)
|
||||
}
|
||||
} else if entry.Type == ftp.EntryTypeFolder {
|
||||
// 如果是文件夹,递归下载该文件夹
|
||||
err := DownloadDir(c, remotePath, localPath)
|
||||
if err != nil {
|
||||
log.Printf("下载文件夹失败: %v\n", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func downloadFile(c *ftp.ServerConn, remotePath, localPath string) error {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("downloadFile:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
// 打开本地文件用于写入
|
||||
file, err := os.Create(localPath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer file.Close()
|
||||
|
||||
// 从 FTP 服务器读取文件
|
||||
reader, err := c.Retr(remotePath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer reader.Close()
|
||||
|
||||
// 将 FTP 文件内容复制到本地文件
|
||||
_, err = io.Copy(file, reader)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
fmt.Printf("已下载文件: %s\n", remotePath)
|
||||
return nil
|
||||
}
|
||||
|
||||
func SendPostRequest(sendurl string, data interface{}, contentType string) (string, int, error) {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("SendPostRequest:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
var reqBody *bytes.Buffer
|
||||
|
||||
// 根据 contentType 类型处理请求体
|
||||
if contentType == "application/json" {
|
||||
switch v := data.(type) {
|
||||
case []byte:
|
||||
reqBody = bytes.NewBuffer(v)
|
||||
case string:
|
||||
reqBody = bytes.NewBuffer([]byte(v))
|
||||
default:
|
||||
return "", 0, fmt.Errorf("传入的 data 既不是字符串也不是字节切片")
|
||||
}
|
||||
// 如果是 JSON 数据,假设 data 是一个字符串类型
|
||||
// reqBody = bytes.NewBuffer([]byte(data.(string)))
|
||||
} else if contentType == "application/x-www-form-urlencoded" {
|
||||
// 如果是表单数据
|
||||
formData := url.Values{}
|
||||
for key, value := range data.(map[string]string) {
|
||||
formData.Add(key, value)
|
||||
}
|
||||
reqBody = bytes.NewBuffer([]byte(formData.Encode()))
|
||||
} else {
|
||||
return "", 0, fmt.Errorf("不支持的 Content-Type: %s", contentType)
|
||||
}
|
||||
|
||||
// 发送 POST 请求
|
||||
resp, err := http.Post(sendurl, contentType, reqBody)
|
||||
if err != nil {
|
||||
return "", 0, fmt.Errorf("请求失败: %v", err)
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
// 读取响应体
|
||||
body, err := ioutil.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return "", 0, fmt.Errorf("读取响应体失败: %v", err)
|
||||
}
|
||||
|
||||
// 返回响应体和状态码
|
||||
return string(body), resp.StatusCode, nil
|
||||
}
|
||||
|
||||
type Response struct {
|
||||
List map[string]interface{} `json:"list"`
|
||||
Message string `json:"message"`
|
||||
Success bool `json:"success"`
|
||||
}
|
||||
|
||||
func ParseResponseData(body string) map[string]interface{} {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("ParseResponseData:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
// 创建一个 Response 变量来存储解码后的数据
|
||||
var response Response
|
||||
|
||||
// 解码 JSON 数据
|
||||
err := json.Unmarshal([]byte(body), &response)
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
// 返回所需的字段值
|
||||
return response.List
|
||||
}
|
@ -0,0 +1,137 @@
|
||||
package Common
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// 日志自定义格式
|
||||
type LogFormatter struct{}
|
||||
|
||||
// 格式详情
|
||||
func (s *LogFormatter) Format(entry *log.Entry) ([]byte, error) {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("Format:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
timestamp := time.Now().Local().Format("2006-01-02 15:04:05")
|
||||
var file string
|
||||
var len int
|
||||
if entry.Caller != nil {
|
||||
file = filepath.Base(entry.Caller.File)
|
||||
len = entry.Caller.Line
|
||||
}
|
||||
//fmt.Println(entry.Data)
|
||||
msg := fmt.Sprintf("[-%s-] [-%s-] [-%s:%d-][-GOID:%d-][-%s-] [-%s-] \n", timestamp, "--", file, len, getGID(), strings.ToUpper(entry.Level.String()), entry.Message)
|
||||
return []byte(msg), nil
|
||||
}
|
||||
|
||||
func getGID() uint64 {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("getGID:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
b := make([]byte, 64)
|
||||
b = b[:runtime.Stack(b, false)]
|
||||
b = bytes.TrimPrefix(b, []byte("goroutine "))
|
||||
b = b[:bytes.IndexByte(b, ' ')]
|
||||
n, _ := strconv.ParseUint(string(b), 10, 64)
|
||||
return n
|
||||
}
|
||||
|
||||
type logFileWriter struct {
|
||||
file *os.File
|
||||
logPath string
|
||||
fileDate string //判断日期切换目录
|
||||
appName string
|
||||
encoding string
|
||||
}
|
||||
|
||||
func (p *logFileWriter) Write(data []byte) (n int, err error) {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("Write:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
if p == nil {
|
||||
return 0, errors.New("logFileWriter is nil")
|
||||
}
|
||||
if p.file == nil {
|
||||
return 0, errors.New("file not opened")
|
||||
}
|
||||
|
||||
//判断是否需要切换日期
|
||||
fileDate := time.Now().Format("20060102")
|
||||
if p.fileDate != fileDate {
|
||||
p.file.Close()
|
||||
err = os.MkdirAll(fmt.Sprintf("%s/%s", p.logPath, fileDate), os.ModePerm)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
filename := fmt.Sprintf("%s/%s/%s-%s.log", p.logPath, fileDate, p.appName, fileDate)
|
||||
|
||||
p.file, err = os.OpenFile(filename, os.O_WRONLY|os.O_APPEND|os.O_CREATE|os.O_SYNC, 0600)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
}
|
||||
if p.encoding != "" {
|
||||
dataToEncode := []byte(string(data))
|
||||
// ConvertStringToByte(string(data), p.encoding)
|
||||
n, e := p.file.Write(dataToEncode)
|
||||
return n, e
|
||||
}
|
||||
|
||||
n, e := p.file.Write(data)
|
||||
return n, e
|
||||
|
||||
}
|
||||
|
||||
// 初始化日志
|
||||
func InitLog(logPath string, appName string, encoding string) {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("InitLog:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
fileDate := time.Now().Format("20060102")
|
||||
//创建目录
|
||||
err := os.MkdirAll(fmt.Sprintf("%s/%s", logPath, fileDate), os.ModePerm)
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
return
|
||||
}
|
||||
|
||||
filename := fmt.Sprintf("%s/%s/%s-%s.log", logPath, fileDate, appName, fileDate)
|
||||
file, err := os.OpenFile(filename, os.O_WRONLY|os.O_APPEND|os.O_CREATE|os.O_SYNC, 0600)
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
return
|
||||
}
|
||||
|
||||
fileWriter := logFileWriter{file, logPath, fileDate, appName, encoding}
|
||||
log.SetOutput(&fileWriter)
|
||||
|
||||
log.SetReportCaller(true)
|
||||
log.SetFormatter(new(LogFormatter))
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1 @@
|
||||
package congressui
|
@ -0,0 +1,31 @@
|
||||
package congressui
|
||||
|
||||
import (
|
||||
"fyne.io/fyne/v2"
|
||||
"fyne.io/fyne/v2/canvas"
|
||||
"fyne.io/fyne/v2/cmd/fyne_demo/data"
|
||||
"fyne.io/fyne/v2/container"
|
||||
"fyne.io/fyne/v2/widget"
|
||||
)
|
||||
|
||||
func CardManageView(_ fyne.Window) fyne.CanvasObject {
|
||||
logo := canvas.NewImageFromResource(data.FyneScene)
|
||||
logo.FillMode = canvas.ImageFillContain
|
||||
if fyne.CurrentDevice().IsMobile() {
|
||||
logo.SetMinSize(fyne.NewSize(171, 125))
|
||||
} else {
|
||||
logo.SetMinSize(fyne.NewSize(228, 167))
|
||||
}
|
||||
|
||||
return container.NewCenter(container.NewVBox(
|
||||
widget.NewLabelWithStyle("Welcome to the Fyne toolkit demo app", fyne.TextAlignCenter, fyne.TextStyle{Bold: true}),
|
||||
logo,
|
||||
container.NewHBox(
|
||||
widget.NewHyperlink("fyne.io", parseURL("https://fyne.io/")),
|
||||
widget.NewLabel("-"),
|
||||
widget.NewHyperlink("documentation", parseURL("https://developer.fyne.io/")),
|
||||
widget.NewLabel("-"),
|
||||
widget.NewHyperlink("sponsor", parseURL("https://fyne.io/sponsor/")),
|
||||
),
|
||||
))
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package congressui
|
||||
|
||||
import (
|
||||
"fyne.io/fyne/v2"
|
||||
"fyne.io/fyne/v2/canvas"
|
||||
"fyne.io/fyne/v2/cmd/fyne_demo/data"
|
||||
"fyne.io/fyne/v2/container"
|
||||
"fyne.io/fyne/v2/widget"
|
||||
)
|
||||
|
||||
func CheckDoorManageView(_ fyne.Window) fyne.CanvasObject {
|
||||
logo := canvas.NewImageFromResource(data.FyneScene)
|
||||
logo.FillMode = canvas.ImageFillContain
|
||||
if fyne.CurrentDevice().IsMobile() {
|
||||
logo.SetMinSize(fyne.NewSize(171, 125))
|
||||
} else {
|
||||
logo.SetMinSize(fyne.NewSize(228, 167))
|
||||
}
|
||||
|
||||
return container.NewCenter(container.NewVBox(
|
||||
widget.NewLabelWithStyle("Welcome to the Fyne toolkit demo app", fyne.TextAlignCenter, fyne.TextStyle{Bold: true}),
|
||||
logo,
|
||||
container.NewHBox(
|
||||
widget.NewHyperlink("fyne.io", parseURL("https://fyne.io/")),
|
||||
widget.NewLabel("-"),
|
||||
widget.NewHyperlink("documentation", parseURL("https://developer.fyne.io/")),
|
||||
widget.NewLabel("-"),
|
||||
widget.NewHyperlink("sponsor", parseURL("https://fyne.io/sponsor/")),
|
||||
),
|
||||
))
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package congressui
|
||||
|
||||
import (
|
||||
"fyne.io/fyne/v2"
|
||||
)
|
||||
|
||||
// Tutorial defines the data structure for a tutorial
|
||||
type CommonPerpareView struct {
|
||||
Title, Intro string
|
||||
View func(w fyne.Window) fyne.CanvasObject
|
||||
}
|
||||
|
||||
var (
|
||||
// Tutorials defines the metadata for each tutorial
|
||||
CommonPerpareViews = map[string]CommonPerpareView{
|
||||
"EquipmentManage": {"设备管理", "各种设备的管理", EquipmentManageView},
|
||||
"PersonManage": {"基础人员",
|
||||
"人员基础信息管理",
|
||||
PersonManageView,
|
||||
},
|
||||
"CongressRoomManage": {"会议室管理",
|
||||
"会议室信息管理",
|
||||
CongressRoomManageView,
|
||||
},
|
||||
"ScreenManage": {"屏幕管理",
|
||||
"屏幕信息管理",
|
||||
ScreenManageScreen,
|
||||
},
|
||||
"CardManage": {"证卡管理",
|
||||
"出入卡信息管理",
|
||||
CardManageView,
|
||||
},
|
||||
"CheckDoorManage": {"报道门管理",
|
||||
"报道门信息管理",
|
||||
CheckDoorManageView,
|
||||
},
|
||||
}
|
||||
|
||||
// TutorialIndex defines how our tutorials should be laid out in the index tree
|
||||
Menubuttons = map[string][]string{
|
||||
"": {"EquipmentManage", "PersonManage", "CongressRoomManage", "ScreenManage", "CardManage", "CheckDoorManage"},
|
||||
}
|
||||
)
|
@ -0,0 +1,31 @@
|
||||
package congressui
|
||||
|
||||
import (
|
||||
"fyne.io/fyne/v2"
|
||||
"fyne.io/fyne/v2/canvas"
|
||||
"fyne.io/fyne/v2/cmd/fyne_demo/data"
|
||||
"fyne.io/fyne/v2/container"
|
||||
"fyne.io/fyne/v2/widget"
|
||||
)
|
||||
|
||||
func CongressRoomManageView(_ fyne.Window) fyne.CanvasObject {
|
||||
logo := canvas.NewImageFromResource(data.FyneScene)
|
||||
logo.FillMode = canvas.ImageFillContain
|
||||
if fyne.CurrentDevice().IsMobile() {
|
||||
logo.SetMinSize(fyne.NewSize(171, 125))
|
||||
} else {
|
||||
logo.SetMinSize(fyne.NewSize(228, 167))
|
||||
}
|
||||
|
||||
return container.NewCenter(container.NewVBox(
|
||||
widget.NewLabelWithStyle("Welcome to the Fyne toolkit demo app", fyne.TextAlignCenter, fyne.TextStyle{Bold: true}),
|
||||
logo,
|
||||
container.NewHBox(
|
||||
widget.NewHyperlink("fyne.io", parseURL("https://fyne.io/")),
|
||||
widget.NewLabel("-"),
|
||||
widget.NewHyperlink("documentation", parseURL("https://developer.fyne.io/")),
|
||||
widget.NewLabel("-"),
|
||||
widget.NewHyperlink("sponsor", parseURL("https://fyne.io/sponsor/")),
|
||||
),
|
||||
))
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package congressui
|
||||
|
||||
import (
|
||||
"fyne.io/fyne/v2"
|
||||
"fyne.io/fyne/v2/canvas"
|
||||
"fyne.io/fyne/v2/cmd/fyne_demo/data"
|
||||
"fyne.io/fyne/v2/container"
|
||||
"fyne.io/fyne/v2/widget"
|
||||
)
|
||||
|
||||
func EquipmentManageView(_ fyne.Window) fyne.CanvasObject {
|
||||
logo := canvas.NewImageFromResource(data.FyneScene)
|
||||
logo.FillMode = canvas.ImageFillContain
|
||||
if fyne.CurrentDevice().IsMobile() {
|
||||
logo.SetMinSize(fyne.NewSize(171, 125))
|
||||
} else {
|
||||
logo.SetMinSize(fyne.NewSize(228, 167))
|
||||
}
|
||||
|
||||
return container.NewCenter(container.NewVBox(
|
||||
widget.NewLabelWithStyle("Welcome to the Fyne toolkit demo app", fyne.TextAlignCenter, fyne.TextStyle{Bold: true}),
|
||||
logo,
|
||||
container.NewHBox(
|
||||
widget.NewHyperlink("fyne.io", parseURL("https://fyne.io/")),
|
||||
widget.NewLabel("-"),
|
||||
widget.NewHyperlink("documentation", parseURL("https://developer.fyne.io/")),
|
||||
widget.NewLabel("-"),
|
||||
widget.NewHyperlink("sponsor", parseURL("https://fyne.io/sponsor/")),
|
||||
),
|
||||
))
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package congressui
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/url"
|
||||
|
||||
"fyne.io/fyne/v2"
|
||||
"fyne.io/fyne/v2/canvas"
|
||||
"fyne.io/fyne/v2/cmd/fyne_demo/data"
|
||||
"fyne.io/fyne/v2/container"
|
||||
"fyne.io/fyne/v2/layout"
|
||||
"fyne.io/fyne/v2/widget"
|
||||
)
|
||||
|
||||
func parseURL(urlStr string) *url.URL {
|
||||
link, err := url.Parse(urlStr)
|
||||
if err != nil {
|
||||
fyne.LogError("Could not parse URL", err)
|
||||
}
|
||||
|
||||
return link
|
||||
}
|
||||
|
||||
func PersonManageView(_ fyne.Window) fyne.CanvasObject {
|
||||
logo := canvas.NewImageFromResource(data.FyneScene)
|
||||
logo.FillMode = canvas.ImageFillContain
|
||||
if fyne.CurrentDevice().IsMobile() {
|
||||
logo.SetMinSize(fyne.NewSize(171, 125))
|
||||
} else {
|
||||
logo.SetMinSize(fyne.NewSize(228, 167))
|
||||
}
|
||||
persontype := widget.NewLabel("人员类型:")
|
||||
persontypeselect := widget.NewSelect([]string{"主任", "委员", "代表"}, func(s string) { fmt.Println("selected", s) })
|
||||
persontypeselect.Resize(fyne.NewSize(100, 40))
|
||||
personCateage := widget.NewLabel("人员分组:")
|
||||
personCateageselect := widget.NewSelect([]string{"分组1", "分组2"}, func(s string) { fmt.Println("selected", s) })
|
||||
personCateageselect.Resize(fyne.NewSize(100, 40))
|
||||
grid := fyne.NewContainerWithLayout(layout.NewGridWrapLayout(fyne.NewSize(200, 500)), persontype, persontypeselect, personCateage, personCateageselect)
|
||||
// grid.Resize(fyne.NewSize(200, 600))
|
||||
|
||||
return container.NewMax(
|
||||
grid,
|
||||
)
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package congressui
|
||||
|
||||
import (
|
||||
"fyne.io/fyne/v2"
|
||||
"fyne.io/fyne/v2/canvas"
|
||||
"fyne.io/fyne/v2/cmd/fyne_demo/data"
|
||||
"fyne.io/fyne/v2/container"
|
||||
"fyne.io/fyne/v2/widget"
|
||||
)
|
||||
|
||||
func ScreenManageScreen(_ fyne.Window) fyne.CanvasObject {
|
||||
logo := canvas.NewImageFromResource(data.FyneScene)
|
||||
logo.FillMode = canvas.ImageFillContain
|
||||
if fyne.CurrentDevice().IsMobile() {
|
||||
logo.SetMinSize(fyne.NewSize(171, 125))
|
||||
} else {
|
||||
logo.SetMinSize(fyne.NewSize(228, 167))
|
||||
}
|
||||
|
||||
return container.NewCenter(container.NewVBox(
|
||||
widget.NewLabelWithStyle("Welcome to the Fyne toolkit demo app", fyne.TextAlignCenter, fyne.TextStyle{Bold: true}),
|
||||
logo,
|
||||
container.NewHBox(
|
||||
widget.NewHyperlink("fyne.io", parseURL("https://fyne.io/")),
|
||||
widget.NewLabel("-"),
|
||||
widget.NewHyperlink("documentation", parseURL("https://developer.fyne.io/")),
|
||||
widget.NewLabel("-"),
|
||||
widget.NewHyperlink("sponsor", parseURL("https://fyne.io/sponsor/")),
|
||||
),
|
||||
))
|
||||
}
|
@ -0,0 +1,205 @@
|
||||
package DAL
|
||||
|
||||
import (
|
||||
"flx/Model"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func GeAlltAgenda() []Model.T_Agenda {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("GeAlltAgenda:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
rows, err := ConntectDB().Query("SELECT * FROM dbcongress.T_Agenda")
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
defer rows.Close()
|
||||
|
||||
var AllAgenda []Model.T_Agenda
|
||||
for rows.Next() {
|
||||
var CAgenda Model.SQLT_Agenda
|
||||
err := rows.Scan(&CAgenda.Ag_ID, &CAgenda.Ag_CongressID, &CAgenda.Ag_Name, &CAgenda.Ag_RoomID, &CAgenda.Ag_Content, &CAgenda.Ag_StartTime, &CAgenda.Ag_EndTime, &CAgenda.Ag_Type, &CAgenda.Ag_CheckInTime, &CAgenda.Ag_CheckOverTime, &CAgenda.Ag_Serial, &CAgenda.Ag_SeatGraph, &CAgenda.Ag_CheckInType, &CAgenda.Ag_SeatType, &CAgenda.Ag_CreateTime, &CAgenda.Ag_UpdateTime, &CAgenda.Ag_Status, &CAgenda.Ag_Remark)
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
// break
|
||||
}
|
||||
var CCAgenda Model.T_Agenda
|
||||
CCAgenda.ID = ChangeT(CAgenda.Ag_ID.Valid, CAgenda.Ag_ID).(string)
|
||||
CCAgenda.Ag_CongressID = ChangeT(CAgenda.Ag_CongressID.Valid, CAgenda.Ag_CongressID).(string)
|
||||
CCAgenda.Ag_Name = ChangeT(CAgenda.Ag_Name.Valid, CAgenda.Ag_Name).(string)
|
||||
CCAgenda.Ag_RoomID = ChangeT(CAgenda.Ag_RoomID.Valid, CAgenda.Ag_RoomID).(string)
|
||||
CCAgenda.Ag_Content = ChangeT(CAgenda.Ag_Content.Valid, CAgenda.Ag_Content).(string)
|
||||
CCAgenda.Ag_StartTime = ChangeT(CAgenda.Ag_StartTime.Valid, CAgenda.Ag_StartTime).(time.Time)
|
||||
CCAgenda.Ag_EndTime = ChangeT(CAgenda.Ag_EndTime.Valid, CAgenda.Ag_EndTime).(time.Time)
|
||||
CCAgenda.Ag_Type = ChangeT(CAgenda.Ag_Type.Valid, CAgenda.Ag_Type).(string)
|
||||
CCAgenda.Ag_CheckInTime = ChangeT(CAgenda.Ag_CheckInTime.Valid, CAgenda.Ag_CheckInTime).(time.Time)
|
||||
CCAgenda.Ag_CheckOverTime = ChangeT(CAgenda.Ag_CheckOverTime.Valid, CAgenda.Ag_CheckOverTime).(time.Time)
|
||||
CCAgenda.Ag_Serial = int(ChangeT(CAgenda.Ag_Serial.Valid, CAgenda.Ag_Serial).(int32))
|
||||
CCAgenda.Ag_SeatGraph = ChangeT(CAgenda.Ag_SeatGraph.Valid, CAgenda.Ag_SeatGraph).(string)
|
||||
CCAgenda.Ag_CheckInType = ChangeT(CAgenda.Ag_CheckInType.Valid, CAgenda.Ag_CheckInType).(string)
|
||||
CCAgenda.Ag_SeatType = ChangeT(CAgenda.Ag_SeatType.Valid, CAgenda.Ag_SeatType).(string)
|
||||
CCAgenda.Ag_CreateTime = ChangeT(CAgenda.Ag_CreateTime.Valid, CAgenda.Ag_CreateTime).(time.Time)
|
||||
CCAgenda.Ag_UpdateTime = ChangeT(CAgenda.Ag_UpdateTime.Valid, CAgenda.Ag_UpdateTime).(time.Time)
|
||||
CCAgenda.Ag_Status = ChangeT(CAgenda.Ag_Status.Valid, CAgenda.Ag_Status).(string)
|
||||
CCAgenda.Ag_Remark = ChangeT(CAgenda.Ag_Remark.Valid, CAgenda.Ag_Remark).(string)
|
||||
AllAgenda = append(AllAgenda, CCAgenda)
|
||||
}
|
||||
return AllAgenda
|
||||
|
||||
}
|
||||
|
||||
func GeAlltAgendaByCingressID(Ag_CongressID string) []Model.T_Agenda {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("GeAlltAgendaByCingressID:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
rows, err := ConntectDB().Query("SELECT * FROM dbcongress.T_Agenda where \"Ag_CongressID\"='" + Ag_CongressID + "' order by \"Ag_Serial\"")
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
defer rows.Close()
|
||||
|
||||
var AllAgenda []Model.T_Agenda
|
||||
for rows.Next() {
|
||||
var CAgenda Model.SQLT_Agenda
|
||||
err := rows.Scan(&CAgenda.Ag_ID, &CAgenda.Ag_CongressID, &CAgenda.Ag_Name, &CAgenda.Ag_RoomID, &CAgenda.Ag_Content, &CAgenda.Ag_StartTime, &CAgenda.Ag_EndTime, &CAgenda.Ag_Type, &CAgenda.Ag_CheckInTime, &CAgenda.Ag_CheckOverTime, &CAgenda.Ag_Serial, &CAgenda.Ag_SeatGraph, &CAgenda.Ag_CheckInType, &CAgenda.Ag_SeatType, &CAgenda.Ag_CreateTime, &CAgenda.Ag_UpdateTime, &CAgenda.Ag_Status, &CAgenda.Ag_Remark)
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
// break
|
||||
}
|
||||
var CCAgenda Model.T_Agenda
|
||||
CCAgenda.ID = ChangeT(CAgenda.Ag_ID.Valid, CAgenda.Ag_ID.String).(string)
|
||||
CCAgenda.Ag_CongressID = ChangeT(CAgenda.Ag_CongressID.Valid, CAgenda.Ag_CongressID.String).(string)
|
||||
CCAgenda.Ag_Name = ChangeT(CAgenda.Ag_Name.Valid, CAgenda.Ag_Name.String).(string)
|
||||
CCAgenda.Ag_RoomID = ChangeT(CAgenda.Ag_RoomID.Valid, CAgenda.Ag_RoomID.String).(string)
|
||||
CCAgenda.Ag_Content = ChangeT(CAgenda.Ag_Content.Valid, CAgenda.Ag_Content.String).(string)
|
||||
CCAgenda.Ag_StartTime = ChangeT(CAgenda.Ag_StartTime.Valid, CAgenda.Ag_StartTime.Time).(time.Time)
|
||||
CCAgenda.Ag_EndTime = ChangeT(CAgenda.Ag_EndTime.Valid, CAgenda.Ag_EndTime.Time).(time.Time)
|
||||
CCAgenda.Ag_Type = ChangeT(CAgenda.Ag_Type.Valid, CAgenda.Ag_Type.String).(string)
|
||||
CCAgenda.Ag_CheckInTime = ChangeT(CAgenda.Ag_CheckInTime.Valid, CAgenda.Ag_CheckInTime.Time).(time.Time)
|
||||
CCAgenda.Ag_CheckOverTime = ChangeT(CAgenda.Ag_CheckOverTime.Valid, CAgenda.Ag_CheckOverTime.Time).(time.Time)
|
||||
CCAgenda.Ag_Serial = int(ChangeT(CAgenda.Ag_Serial.Valid, CAgenda.Ag_Serial.Int32).(int32))
|
||||
CCAgenda.Ag_SeatGraph = ChangeT(CAgenda.Ag_SeatGraph.Valid, CAgenda.Ag_SeatGraph.String).(string)
|
||||
CCAgenda.Ag_CheckInType = ChangeT(CAgenda.Ag_CheckInType.Valid, CAgenda.Ag_CheckInType.String).(string)
|
||||
CCAgenda.Ag_SeatType = ChangeT(CAgenda.Ag_SeatType.Valid, CAgenda.Ag_SeatType.String).(string)
|
||||
CCAgenda.Ag_CreateTime = ChangeT(CAgenda.Ag_CreateTime.Valid, CAgenda.Ag_CreateTime.Time).(time.Time)
|
||||
CCAgenda.Ag_UpdateTime = ChangeT(CAgenda.Ag_UpdateTime.Valid, CAgenda.Ag_UpdateTime.Time).(time.Time)
|
||||
CCAgenda.Ag_Status = ChangeT(CAgenda.Ag_Status.Valid, CAgenda.Ag_Status.String).(string)
|
||||
CCAgenda.Ag_Remark = ChangeT(CAgenda.Ag_Remark.Valid, CAgenda.Ag_Remark.String).(string)
|
||||
AllAgenda = append(AllAgenda, CCAgenda)
|
||||
}
|
||||
return AllAgenda
|
||||
|
||||
}
|
||||
|
||||
func GetAgenda(Ag_ID string) Model.T_Agenda {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("GetAgenda:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
rows, err := ConntectDB().Query("SELECT * FROM dbcongress.T_Agenda WHERE \"Ag_ID\"='" + Ag_ID + "'")
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
defer rows.Close()
|
||||
|
||||
var CAgenda Model.SQLT_Agenda
|
||||
for rows.Next() {
|
||||
err := rows.Scan(&CAgenda.Ag_ID, &CAgenda.Ag_CongressID, &CAgenda.Ag_Name, &CAgenda.Ag_RoomID, &CAgenda.Ag_Content, &CAgenda.Ag_StartTime, &CAgenda.Ag_EndTime, &CAgenda.Ag_Type, &CAgenda.Ag_CheckInTime, &CAgenda.Ag_CheckOverTime, &CAgenda.Ag_Serial, &CAgenda.Ag_SeatGraph, &CAgenda.Ag_CheckInType, &CAgenda.Ag_SeatType, &CAgenda.Ag_CreateTime, &CAgenda.Ag_UpdateTime, &CAgenda.Ag_Status, &CAgenda.Ag_Remark)
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
// break
|
||||
}
|
||||
}
|
||||
var CCAgenda Model.T_Agenda
|
||||
CCAgenda.ID = ChangeT(CAgenda.Ag_ID.Valid, CAgenda.Ag_ID.String).(string)
|
||||
CCAgenda.Ag_CongressID = ChangeT(CAgenda.Ag_CongressID.Valid, CAgenda.Ag_CongressID.String).(string)
|
||||
CCAgenda.Ag_Name = ChangeT(CAgenda.Ag_Name.Valid, CAgenda.Ag_Name.String).(string)
|
||||
CCAgenda.Ag_RoomID = ChangeT(CAgenda.Ag_RoomID.Valid, CAgenda.Ag_RoomID.String).(string)
|
||||
CCAgenda.Ag_Content = ChangeT(CAgenda.Ag_Content.Valid, CAgenda.Ag_Content.String).(string)
|
||||
CCAgenda.Ag_StartTime = ChangeT(CAgenda.Ag_StartTime.Valid, CAgenda.Ag_StartTime.Time).(time.Time)
|
||||
CCAgenda.Ag_EndTime = ChangeT(CAgenda.Ag_EndTime.Valid, CAgenda.Ag_EndTime.Time).(time.Time)
|
||||
CCAgenda.Ag_Type = ChangeT(CAgenda.Ag_Type.Valid, CAgenda.Ag_Type.String).(string)
|
||||
CCAgenda.Ag_CheckInTime = ChangeT(CAgenda.Ag_CheckInTime.Valid, CAgenda.Ag_CheckInTime.Time).(time.Time)
|
||||
CCAgenda.Ag_CheckOverTime = ChangeT(CAgenda.Ag_CheckOverTime.Valid, CAgenda.Ag_CheckOverTime.Time).(time.Time)
|
||||
CCAgenda.Ag_Serial = int(ChangeT(CAgenda.Ag_Serial.Valid, CAgenda.Ag_Serial.Int32).(int32))
|
||||
CCAgenda.Ag_SeatGraph = ChangeT(CAgenda.Ag_SeatGraph.Valid, CAgenda.Ag_SeatGraph.String).(string)
|
||||
CCAgenda.Ag_CheckInType = ChangeT(CAgenda.Ag_CheckInType.Valid, CAgenda.Ag_CheckInType.String).(string)
|
||||
CCAgenda.Ag_SeatType = ChangeT(CAgenda.Ag_SeatType.Valid, CAgenda.Ag_SeatType.String).(string)
|
||||
CCAgenda.Ag_CreateTime = ChangeT(CAgenda.Ag_CreateTime.Valid, CAgenda.Ag_CreateTime.Time).(time.Time)
|
||||
CCAgenda.Ag_UpdateTime = ChangeT(CAgenda.Ag_UpdateTime.Valid, CAgenda.Ag_UpdateTime.Time).(time.Time)
|
||||
CCAgenda.Ag_Status = ChangeT(CAgenda.Ag_Status.Valid, CAgenda.Ag_Status.String).(string)
|
||||
CCAgenda.Ag_Remark = ChangeT(CAgenda.Ag_Remark.Valid, CAgenda.Ag_Remark.String).(string)
|
||||
return CCAgenda
|
||||
|
||||
}
|
||||
|
||||
func InsertAgenda(para *Model.T_Agenda) bool {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("InsertAgenda:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
_, err := ConntectDB().Exec("INSERT INTO dbcongress.T_Agenda (\"Ag_ID\",\"Ag_CongressID\",\"Ag_Name\",\"Ag_RoomID\",\"Ag_Content\",\"Ag_StartTime\",\"Ag_EndTime\",\"Ag_Type\",\"Ag_CheckInTime\",\"Ag_CheckOverTime\",\"Ag_Serial\",\"Ag_SeatGraph\",\"Ag_CheckInType\",\"Ag_SeatType\",\"Ag_CreateTime\",\"Ag_UpdateTime\",\"Ag_Status\",\"Ag_Remark\") VALUES ('" + para.ID + "','" + para.Ag_CongressID + "','" + para.Ag_Name + "','" + para.Ag_RoomID + "','" + para.Ag_Content + "','" + para.Ag_StartTime.String() + "','" + para.Ag_EndTime.String() + "','" + para.Ag_Type + "','" + para.Ag_CheckInTime.String() + "','" + para.Ag_CheckOverTime.String() + "','" + strconv.Itoa(para.Ag_Serial) + "','" + para.Ag_SeatGraph + "','" + para.Ag_CheckInType + "','" + para.Ag_SeatType + "','" + para.Ag_CreateTime.String() + "','" + para.Ag_UpdateTime.String() + "','" + para.Ag_Status + "','" + para.Ag_Remark + "')")
|
||||
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
}
|
||||
|
||||
func UpdateAgenda(para *Model.T_Agenda) bool {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("UpdateAgenda:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
_, err := ConntectDB().Exec("UPDATE dbcongress.T_Agenda SET \"Ag_ID\" = '" + para.ID + "',\"Ag_CongressID\" = '" + para.Ag_CongressID + "',\"Ag_Name\" = '" + para.Ag_Name + "',\"Ag_RoomID\" = '" + para.Ag_RoomID + "',\"Ag_Content\" = '" + para.Ag_Content + "',\"Ag_StartTime\" = '" + para.Ag_StartTime.String() + "',\"Ag_EndTime\" = '" + para.Ag_EndTime.String() + "',\"Ag_Type\" = '" + para.Ag_Type + "',\"Ag_CheckInTime\" = '" + para.Ag_CheckInTime.String() + "',\"Ag_CheckOverTime\" = '" + para.Ag_CheckOverTime.String() + "',\"Ag_Serial\" = '" + strconv.Itoa(para.Ag_Serial) + "',\"Ag_SeatGraph\" = '" + para.Ag_SeatGraph + "',\"Ag_CheckInType\" = '" + para.Ag_CheckInType + "',\"Ag_SeatType\" = '" + para.Ag_SeatType + "',\"Ag_CreateTime\" = '" + para.Ag_CreateTime.String() + "',\"Ag_UpdateTime\" = '" + para.Ag_UpdateTime.String() + "',\"Ag_Status\" = '" + para.Ag_Status + "',\"Ag_Remark\" = '" + para.Ag_Remark + "' WHERE \"Ag_ID\"='" + para.ID + "';")
|
||||
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
}
|
||||
|
||||
func DeleteAgenda(para *Model.T_Agenda) bool {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("DeleteAgenda:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
_, err := ConntectDB().Exec("DELETE FROM dbcongress.T_Agenda WHERE \"Ag_ID\"='" + para.ID + "'")
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
}
|
@ -0,0 +1,193 @@
|
||||
package DAL
|
||||
|
||||
import (
|
||||
"flx/Model"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func GetAllAgendaPersonWithAll(AgID string) []*Model.T_AgendaPerson {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("GetAllAgendaPersonWithAll:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
rows, err := ConntectDB().Query("SELECT * FROM dbcongress.T_AgendaPerson left join dbcongress.t_staffinfo on dbcongress.t_agendaperson.\"AP_StaffID\"=dbcongress.t_staffinfo.\"St_ID\" left join dbcongress.t_staffcategory on dbcongress.t_staffinfo.\"St_CategoryID\"=dbcongress.t_staffcategory.\"Ca_ID\" left join dbcongress.t_staffgroup on dbcongress.t_staffinfo.\"St_GroupID\"=dbcongress.t_staffgroup.\"Gr_ID\" where \"AP_AgendaID\"='" + AgID + "'")
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
defer rows.Close()
|
||||
|
||||
var AllAgendaPerson []*Model.T_AgendaPerson
|
||||
for rows.Next() {
|
||||
var CAgendaPerson Model.SQLT_AgendaPerson
|
||||
err := rows.Scan(&CAgendaPerson.AP_ID, &CAgendaPerson.AP_AgendaID, &CAgendaPerson.AP_StaffID, &CAgendaPerson.AP_CardType, &CAgendaPerson.AP_CodeNum, &CAgendaPerson.AP_ReportPower, &CAgendaPerson.AP_VotePower, &CAgendaPerson.AP_SpeakPower, &CAgendaPerson.AP_FirstSpeakPower, &CAgendaPerson.AP_CallPower, &CAgendaPerson.AP_SearchPower, &CAgendaPerson.AP_Remark, &CAgendaPerson.AP_Xpoint, &CAgendaPerson.AP_Ypoint, &CAgendaPerson.AP_SeatArea, &CAgendaPerson.AP_CheckState, &CAgendaPerson.AP_SeatID, &CAgendaPerson.AP_CheckInTime, &CAgendaPerson.AP_CheckOutTime, &CAgendaPerson.AP_Status, &CAgendaPerson.AP_Moderator,
|
||||
&CAgendaPerson.AP_StaffInfo.St_ID, &CAgendaPerson.AP_StaffInfo.St_Name, &CAgendaPerson.AP_StaffInfo.St_Num, &CAgendaPerson.AP_StaffInfo.St_CategoryID, &CAgendaPerson.AP_StaffInfo.St_GroupID, &CAgendaPerson.AP_StaffInfo.St_Image, &CAgendaPerson.AP_StaffInfo.St_WorkUnit, &CAgendaPerson.AP_StaffInfo.St_Sex,
|
||||
&CAgendaPerson.AP_StaffInfo.St_Phone, &CAgendaPerson.AP_StaffInfo.St_CardNum, &CAgendaPerson.AP_StaffInfo.St_ViceCardNum, &CAgendaPerson.AP_StaffInfo.St_ViceCardNumA, &CAgendaPerson.AP_StaffInfo.St_ViceCardNumB,
|
||||
&CAgendaPerson.AP_StaffInfo.St_NationID, &CAgendaPerson.AP_StaffInfo.St_PartyID, &CAgendaPerson.AP_StaffInfo.St_Job, &CAgendaPerson.AP_StaffInfo.St_Enabled, &CAgendaPerson.AP_StaffInfo.St_Remarks, &CAgendaPerson.AP_StaffInfo.St_CreateTime,
|
||||
&CAgendaPerson.AP_StaffInfo.St_Updatetime, &CAgendaPerson.AP_StaffInfo.St_Account, &CAgendaPerson.AP_StaffInfo.St_PWD, &CAgendaPerson.AP_StaffInfo.St_SpareA, &CAgendaPerson.AP_StaffInfo.St_SpareB,
|
||||
&CAgendaPerson.AP_StaffInfo.StaffCategory.Ca_ID, &CAgendaPerson.AP_StaffInfo.StaffCategory.Ca_Name, &CAgendaPerson.AP_StaffInfo.StaffCategory.Ca_Num, &CAgendaPerson.AP_StaffInfo.StaffCategory.Ca_ReportPower, &CAgendaPerson.AP_StaffInfo.StaffCategory.Ca_VotePower, &CAgendaPerson.AP_StaffInfo.StaffCategory.Ca_SpeakPower, &CAgendaPerson.AP_StaffInfo.StaffCategory.Ca_FirstSpeakPower, &CAgendaPerson.AP_StaffInfo.StaffCategory.Ca_CallPower, &CAgendaPerson.AP_StaffInfo.StaffCategory.Ca_SearchPower, &CAgendaPerson.AP_StaffInfo.StaffCategory.Ca_Remarks,
|
||||
&CAgendaPerson.AP_StaffInfo.StaffGroup.Gr_ID, &CAgendaPerson.AP_StaffInfo.StaffGroup.Gr_Name, &CAgendaPerson.AP_StaffInfo.StaffGroup.Gr_Num, &CAgendaPerson.AP_StaffInfo.StaffGroup.Gr_Remarks,
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
// break
|
||||
}
|
||||
var CCAgendaPerson Model.T_AgendaPerson
|
||||
CCAgendaPerson.AP_ID = ChangeT(CAgendaPerson.AP_ID.Valid, CAgendaPerson.AP_ID.String).(string)
|
||||
CCAgendaPerson.AP_AgendaID = ChangeT(CAgendaPerson.AP_AgendaID.Valid, CAgendaPerson.AP_AgendaID.String).(string)
|
||||
CCAgendaPerson.AP_StaffID = ChangeT(CAgendaPerson.AP_StaffID.Valid, CAgendaPerson.AP_StaffID.String).(string)
|
||||
CCAgendaPerson.AP_CardType = int(ChangeT(CAgendaPerson.AP_CardType.Valid, CAgendaPerson.AP_CardType.Int32).(int32))
|
||||
CCAgendaPerson.AP_CodeNum = ChangeT(CAgendaPerson.AP_CodeNum.Valid, CAgendaPerson.AP_CodeNum.String).(string)
|
||||
CCAgendaPerson.AP_ReportPower = int(ChangeT(CAgendaPerson.AP_ReportPower.Valid, CAgendaPerson.AP_ReportPower.Int32).(int32))
|
||||
CCAgendaPerson.AP_VotePower = int(ChangeT(CAgendaPerson.AP_VotePower.Valid, CAgendaPerson.AP_VotePower.Int32).(int32))
|
||||
CCAgendaPerson.AP_SpeakPower = int(ChangeT(CAgendaPerson.AP_SpeakPower.Valid, CAgendaPerson.AP_SpeakPower.Int32).(int32))
|
||||
CCAgendaPerson.AP_FirstSpeakPower = int(ChangeT(CAgendaPerson.AP_FirstSpeakPower.Valid, CAgendaPerson.AP_FirstSpeakPower.Int32).(int32))
|
||||
CCAgendaPerson.AP_CallPower = int(ChangeT(CAgendaPerson.AP_CallPower.Valid, CAgendaPerson.AP_CallPower.Int32).(int32))
|
||||
CCAgendaPerson.AP_SearchPower = int(ChangeT(CAgendaPerson.AP_SearchPower.Valid, CAgendaPerson.AP_SearchPower.Int32).(int32))
|
||||
CCAgendaPerson.AP_Remark = ChangeT(CAgendaPerson.AP_Remark.Valid, CAgendaPerson.AP_Remark.String).(string)
|
||||
CCAgendaPerson.AP_Xpoint = int(ChangeT(CAgendaPerson.AP_Xpoint.Valid, CAgendaPerson.AP_Xpoint.Int32).(int32))
|
||||
CCAgendaPerson.AP_Ypoint = int(ChangeT(CAgendaPerson.AP_Ypoint.Valid, CAgendaPerson.AP_Ypoint.Int32).(int32))
|
||||
CCAgendaPerson.AP_SeatArea = ChangeT(CAgendaPerson.AP_SeatArea.Valid, CAgendaPerson.AP_SeatArea.String).(string)
|
||||
CCAgendaPerson.AP_CheckState = int(ChangeT(CAgendaPerson.AP_CheckState.Valid, CAgendaPerson.AP_CheckState.Int32).(int32))
|
||||
CCAgendaPerson.AP_SeatID = ChangeT(CAgendaPerson.AP_SeatID.Valid, CAgendaPerson.AP_SeatID.String).(string)
|
||||
CCAgendaPerson.AP_CheckInTime = ChangeT(CAgendaPerson.AP_CheckInTime.Valid, CAgendaPerson.AP_CheckInTime.Time).(time.Time)
|
||||
CCAgendaPerson.AP_CheckOutTime = ChangeT(CAgendaPerson.AP_CheckOutTime.Valid, CAgendaPerson.AP_CheckOutTime.Time).(time.Time)
|
||||
CCAgendaPerson.AP_Status = ChangeT(CAgendaPerson.AP_Status.Valid, CAgendaPerson.AP_Status.String).(string)
|
||||
CCAgendaPerson.AP_Moderator = int(ChangeT(CAgendaPerson.AP_Moderator.Valid, CAgendaPerson.AP_Moderator.Int32).(int32))
|
||||
|
||||
CCAgendaPerson.AP_StaffInfo.St_ID = ChangeT(CAgendaPerson.AP_StaffInfo.St_ID.Valid, CAgendaPerson.AP_StaffInfo.St_ID.String).(string)
|
||||
CCAgendaPerson.AP_StaffInfo.St_Name = ChangeT(CAgendaPerson.AP_StaffInfo.St_Name.Valid, CAgendaPerson.AP_StaffInfo.St_Name.String).(string)
|
||||
CCAgendaPerson.AP_StaffInfo.St_Num = ChangeT(CAgendaPerson.AP_StaffInfo.St_Num.Valid, CAgendaPerson.AP_StaffInfo.St_Num.String).(string)
|
||||
CCAgendaPerson.AP_StaffInfo.St_CategoryID = ChangeT(CAgendaPerson.AP_StaffInfo.St_CategoryID.Valid, CAgendaPerson.AP_StaffInfo.St_CategoryID.String).(string)
|
||||
CCAgendaPerson.AP_StaffInfo.St_GroupID = ChangeT(CAgendaPerson.AP_StaffInfo.St_GroupID.Valid, CAgendaPerson.AP_StaffInfo.St_GroupID.String).(string)
|
||||
CCAgendaPerson.AP_StaffInfo.St_Image = ChangeT(CAgendaPerson.AP_StaffInfo.St_Image.Valid, CAgendaPerson.AP_StaffInfo.St_Image.String).(string)
|
||||
CCAgendaPerson.AP_StaffInfo.St_WorkUnit = ChangeT(CAgendaPerson.AP_StaffInfo.St_WorkUnit.Valid, CAgendaPerson.AP_StaffInfo.St_WorkUnit.String).(string)
|
||||
CCAgendaPerson.AP_StaffInfo.St_Sex = int(ChangeT(CAgendaPerson.AP_StaffInfo.St_Sex.Valid, CAgendaPerson.AP_StaffInfo.St_Sex.Int32).(int32))
|
||||
CCAgendaPerson.AP_StaffInfo.St_Phone = ChangeT(CAgendaPerson.AP_StaffInfo.St_Phone.Valid, CAgendaPerson.AP_StaffInfo.St_Phone.String).(string)
|
||||
CCAgendaPerson.AP_StaffInfo.St_CardNum = ChangeT(CAgendaPerson.AP_StaffInfo.St_CardNum.Valid, CAgendaPerson.AP_StaffInfo.St_CardNum.String).(string)
|
||||
CCAgendaPerson.AP_StaffInfo.St_ViceCardNum = ChangeT(CAgendaPerson.AP_StaffInfo.St_ViceCardNum.Valid, CAgendaPerson.AP_StaffInfo.St_ViceCardNum.String).(string)
|
||||
CCAgendaPerson.AP_StaffInfo.St_ViceCardNumA = ChangeT(CAgendaPerson.AP_StaffInfo.St_ViceCardNumA.Valid, CAgendaPerson.AP_StaffInfo.St_ViceCardNumA.String).(string)
|
||||
CCAgendaPerson.AP_StaffInfo.St_ViceCardNumB = ChangeT(CAgendaPerson.AP_StaffInfo.St_ViceCardNumB.Valid, CAgendaPerson.AP_StaffInfo.St_ViceCardNumB.String).(string)
|
||||
CCAgendaPerson.AP_StaffInfo.St_NationID = ChangeT(CAgendaPerson.AP_StaffInfo.St_NationID.Valid, CAgendaPerson.AP_StaffInfo.St_NationID.String).(string)
|
||||
CCAgendaPerson.AP_StaffInfo.St_PartyID = ChangeT(CAgendaPerson.AP_StaffInfo.St_PartyID.Valid, CAgendaPerson.AP_StaffInfo.St_PartyID.String).(string)
|
||||
CCAgendaPerson.AP_StaffInfo.St_Job = ChangeT(CAgendaPerson.AP_StaffInfo.St_Job.Valid, CAgendaPerson.AP_StaffInfo.St_Job.String).(string)
|
||||
CCAgendaPerson.AP_StaffInfo.St_Enabled = int(ChangeT(CAgendaPerson.AP_StaffInfo.St_Enabled.Valid, CAgendaPerson.AP_StaffInfo.St_Enabled.Int32).(int32))
|
||||
CCAgendaPerson.AP_StaffInfo.St_Remarks = ChangeT(CAgendaPerson.AP_StaffInfo.St_Remarks.Valid, CAgendaPerson.AP_StaffInfo.St_Remarks.String).(string)
|
||||
CCAgendaPerson.AP_StaffInfo.St_CreateTime = ChangeT(CAgendaPerson.AP_StaffInfo.St_CreateTime.Valid, CAgendaPerson.AP_StaffInfo.St_CreateTime.Time).(time.Time)
|
||||
CCAgendaPerson.AP_StaffInfo.St_Updatetime = ChangeT(CAgendaPerson.AP_StaffInfo.St_Updatetime.Valid, CAgendaPerson.AP_StaffInfo.St_Updatetime.Time).(time.Time)
|
||||
CCAgendaPerson.AP_StaffInfo.St_Account = ChangeT(CAgendaPerson.AP_StaffInfo.St_Account.Valid, CAgendaPerson.AP_StaffInfo.St_Account.String).(string)
|
||||
CCAgendaPerson.AP_StaffInfo.St_PWD = ChangeT(CAgendaPerson.AP_StaffInfo.St_PWD.Valid, CAgendaPerson.AP_StaffInfo.St_PWD.String).(string)
|
||||
CCAgendaPerson.AP_StaffInfo.St_SpareA = ChangeT(CAgendaPerson.AP_StaffInfo.St_SpareA.Valid, CAgendaPerson.AP_StaffInfo.St_SpareA.String).(string)
|
||||
CCAgendaPerson.AP_StaffInfo.St_SpareB = ChangeT(CAgendaPerson.AP_StaffInfo.St_SpareB.Valid, CAgendaPerson.AP_StaffInfo.St_SpareB.String).(string)
|
||||
CCAgendaPerson.AP_StaffInfo.StaffCategory.Ca_ID = ChangeT(CAgendaPerson.AP_StaffInfo.StaffCategory.Ca_ID.Valid, CAgendaPerson.AP_StaffInfo.StaffCategory.Ca_ID.String).(string)
|
||||
CCAgendaPerson.AP_StaffInfo.StaffCategory.Ca_Name = ChangeT(CAgendaPerson.AP_StaffInfo.StaffCategory.Ca_Name.Valid, CAgendaPerson.AP_StaffInfo.StaffCategory.Ca_Name.String).(string)
|
||||
CCAgendaPerson.AP_StaffInfo.StaffCategory.Ca_Num = ChangeT(CAgendaPerson.AP_StaffInfo.StaffCategory.Ca_Num.Valid, CAgendaPerson.AP_StaffInfo.StaffCategory.Ca_Num.String).(string)
|
||||
CCAgendaPerson.AP_StaffInfo.StaffCategory.Ca_ReportPower = int(ChangeT(CAgendaPerson.AP_StaffInfo.StaffCategory.Ca_ReportPower.Valid, CAgendaPerson.AP_StaffInfo.StaffCategory.Ca_ReportPower.Int32).(int32))
|
||||
CCAgendaPerson.AP_StaffInfo.StaffCategory.Ca_VotePower = int(ChangeT(CAgendaPerson.AP_StaffInfo.StaffCategory.Ca_VotePower.Valid, CAgendaPerson.AP_StaffInfo.StaffCategory.Ca_VotePower.Int32).(int32))
|
||||
CCAgendaPerson.AP_StaffInfo.StaffCategory.Ca_SpeakPower = int(ChangeT(CAgendaPerson.AP_StaffInfo.StaffCategory.Ca_SpeakPower.Valid, CAgendaPerson.AP_StaffInfo.StaffCategory.Ca_SpeakPower.Int32).(int32))
|
||||
CCAgendaPerson.AP_StaffInfo.StaffCategory.Ca_FirstSpeakPower = int(ChangeT(CAgendaPerson.AP_StaffInfo.StaffCategory.Ca_FirstSpeakPower.Valid, CAgendaPerson.AP_StaffInfo.StaffCategory.Ca_FirstSpeakPower.Int32).(int32))
|
||||
CCAgendaPerson.AP_StaffInfo.StaffCategory.Ca_CallPower = int(ChangeT(CAgendaPerson.AP_StaffInfo.StaffCategory.Ca_CallPower.Valid, CAgendaPerson.AP_StaffInfo.StaffCategory.Ca_CallPower.Int32).(int32))
|
||||
CCAgendaPerson.AP_StaffInfo.StaffCategory.Ca_SearchPower = int(ChangeT(CAgendaPerson.AP_StaffInfo.StaffCategory.Ca_SearchPower.Valid, CAgendaPerson.AP_StaffInfo.StaffCategory.Ca_SearchPower.Int32).(int32))
|
||||
CCAgendaPerson.AP_StaffInfo.StaffCategory.Ca_Remarks = ChangeT(CAgendaPerson.AP_StaffInfo.StaffCategory.Ca_Remarks.Valid, CAgendaPerson.AP_StaffInfo.StaffCategory.Ca_Remarks.String).(string)
|
||||
CCAgendaPerson.AP_StaffInfo.StaffGroup.Gr_ID = ChangeT(CAgendaPerson.AP_StaffInfo.StaffGroup.Gr_ID.Valid, CAgendaPerson.AP_StaffInfo.StaffGroup.Gr_ID.String).(string)
|
||||
CCAgendaPerson.AP_StaffInfo.StaffGroup.Gr_Name = ChangeT(CAgendaPerson.AP_StaffInfo.StaffGroup.Gr_Name.Valid, CAgendaPerson.AP_StaffInfo.StaffGroup.Gr_Name.String).(string)
|
||||
CCAgendaPerson.AP_StaffInfo.StaffGroup.Gr_Num = ChangeT(CAgendaPerson.AP_StaffInfo.StaffGroup.Gr_Num.Valid, CAgendaPerson.AP_StaffInfo.StaffGroup.Gr_Num.String).(string)
|
||||
CCAgendaPerson.AP_StaffInfo.StaffGroup.Gr_Remarks = ChangeT(CAgendaPerson.AP_StaffInfo.StaffGroup.Gr_Remarks.Valid, CAgendaPerson.AP_StaffInfo.StaffGroup.Gr_Remarks.String).(string)
|
||||
|
||||
AllAgendaPerson = append(AllAgendaPerson, &CCAgendaPerson)
|
||||
}
|
||||
return AllAgendaPerson
|
||||
|
||||
}
|
||||
|
||||
func GetAllAgendaPerson(AgID string) []*Model.T_AgendaPerson {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("GetAllAgendaPerson:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
rows, err := ConntectDB().Query("SELECT * FROM dbcongress.T_AgendaPerson \"AP_AgendaID\"='" + AgID + "'")
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
defer rows.Close()
|
||||
|
||||
var AllAgendaPerson []*Model.T_AgendaPerson
|
||||
for rows.Next() {
|
||||
var CAgendaPerson Model.T_AgendaPerson
|
||||
err := rows.Scan(&CAgendaPerson.AP_ID, &CAgendaPerson.AP_AgendaID, &CAgendaPerson.AP_StaffID, &CAgendaPerson.AP_CardType, &CAgendaPerson.AP_CodeNum, &CAgendaPerson.AP_ReportPower, &CAgendaPerson.AP_VotePower, &CAgendaPerson.AP_SpeakPower, &CAgendaPerson.AP_FirstSpeakPower, &CAgendaPerson.AP_CallPower, &CAgendaPerson.AP_SearchPower, &CAgendaPerson.AP_Remark, &CAgendaPerson.AP_Xpoint, &CAgendaPerson.AP_Ypoint, &CAgendaPerson.AP_SeatArea, &CAgendaPerson.AP_CheckState, &CAgendaPerson.AP_SeatID, &CAgendaPerson.AP_CheckInTime, &CAgendaPerson.AP_CheckOutTime, &CAgendaPerson.AP_Status, &CAgendaPerson.AP_Moderator)
|
||||
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
// break
|
||||
}
|
||||
AllAgendaPerson = append(AllAgendaPerson, &CAgendaPerson)
|
||||
}
|
||||
return AllAgendaPerson
|
||||
|
||||
}
|
||||
|
||||
func InsertAgendaPerson(para *Model.T_AgendaPerson) bool {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("InsertAgendaPerson:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
_, err := ConntectDB().Exec("INSERT INTO dbcongress.T_AgendaPerson (\"AP_ID\",\"AP_AgendaID\",\"AP_StaffID\",\"AP_CardType\",\"AP_CodeNum\",\"AP_ReportPower\",\"AP_VotePower\",\"AP_SpeakPower\",\"AP_FirstSpeakPower\",\"AP_CallPower\",\"AP_SearchPower\",\"AP_Remark\",\"AP_Xpoint\",\"AP_Ypoint\",\"AP_SeatArea\",\"AP_CheckState\",\"AP_SeatID\",\"AP_CheckInTime\",\"AP_CheckOutTime\",\"AP_Status\",\"AP_Moderator\") VALUES('" + para.AP_ID + "','" + para.AP_AgendaID + "','" + para.AP_StaffID + "','" + strconv.Itoa(para.AP_CardType) + "','" + para.AP_CodeNum + "','" + strconv.Itoa(para.AP_ReportPower) + "','" + strconv.Itoa(para.AP_VotePower) + "','" + strconv.Itoa(para.AP_SpeakPower) + "','" + strconv.Itoa(para.AP_FirstSpeakPower) + "','" + strconv.Itoa(para.AP_CallPower) + "','" + strconv.Itoa(para.AP_SearchPower) + "','" + para.AP_Remark + "','" + strconv.Itoa(para.AP_Xpoint) + "','" + strconv.Itoa(para.AP_Ypoint) + "','" + para.AP_SeatArea + "','" + strconv.Itoa(para.AP_CheckState) + "','" + para.AP_SeatID + "','" + para.AP_CheckInTime.String() + "','" + para.AP_CheckOutTime.String() + "','" + para.AP_Status + "','" + strconv.Itoa(para.AP_Moderator) + "')")
|
||||
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
}
|
||||
|
||||
func UpdateAgendaPerson(para *Model.T_AgendaPerson) bool {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("UpdateAgendaPerson:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
_, err := ConntectDB().Exec("UPDATE dbcongress.T_AgendaPerson SET \"AP_AgendaID\" = '" + para.AP_AgendaID + "',\"AP_StaffID\" = '" + para.AP_StaffID + "',\"AP_CardType\" = '" + strconv.Itoa(para.AP_CardType) + "',\"AP_CodeNum\" = '" + para.AP_CodeNum + "',\"AP_ReportPower\" = '" + strconv.Itoa(para.AP_ReportPower) + "',\"AP_VotePower\" = '" + strconv.Itoa(para.AP_VotePower) + "',\"AP_SpeakPower\" = '" + strconv.Itoa(para.AP_SpeakPower) + "',\"AP_FirstSpeakPower\" = '" + strconv.Itoa(para.AP_FirstSpeakPower) + "',\"AP_CallPower\" = '" + strconv.Itoa(para.AP_CallPower) + "',\"AP_SearchPower\" = '" + strconv.Itoa(para.AP_SearchPower) + "',\"AP_Remark\" = '" + para.AP_Remark + "',\"AP_Xpoint\" = '" + strconv.Itoa(para.AP_Xpoint) + "',\"AP_Ypoint\" = '" + strconv.Itoa(para.AP_Ypoint) + "',\"AP_SeatArea\" = '" + para.AP_SeatArea + "',\"AP_CheckState\" = '" + strconv.Itoa(para.AP_CheckState) + "',\"AP_SeatID\" = '" + para.AP_SeatID + "',\"AP_CheckInTime\" = '" + para.AP_CheckInTime.Format("2006-01-02 15:04:05") + "',\"AP_CheckOutTime\" = '" + para.AP_CheckOutTime.Format("2006-01-02 15:04:05") + "',\"AP_Status\" = '" + para.AP_Status + "',\"AP_Moderator\" = '" + strconv.Itoa(para.AP_Moderator) + "' WHERE \"AP_ID\"='" + para.AP_ID + "';")
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
}
|
||||
|
||||
func DeleteAgendaPerson(para *Model.T_AgendaPerson) bool {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("DeleteAgendaPerson:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
_, err := ConntectDB().Exec("DELETE FROM dbcongress.T_AgendaPerson WHERE \"AP_ID\"='" + para.AP_ID + "'")
|
||||
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
}
|
@ -0,0 +1,161 @@
|
||||
package DAL
|
||||
|
||||
import (
|
||||
"flx/Model"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func GetCongress(Co_ID string) Model.T_Congress {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("GetCongress:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
rows, err := ConntectDB().Query("SELECT * FROM dbcongress.T_Congress WHERE \"Co_ID\"='" + Co_ID + "'")
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
defer rows.Close()
|
||||
var CCongress Model.SQLT_Congress
|
||||
for rows.Next() {
|
||||
|
||||
err := rows.Scan(&CCongress.Co_ID, &CCongress.Co_TypeID, &CCongress.Co_Name, &CCongress.Co_Subject, &CCongress.Co_RoomID, &CCongress.Co_Status, &CCongress.Co_StartTime, &CCongress.Co_EndTime, &CCongress.Co_AheadTime, &CCongress.Co_CheckInStartTime, &CCongress.Co_CheckInEndTime, &CCongress.Co_CheckInType, &CCongress.Co_SeatMode, &CCongress.Co_AutoRun, &CCongress.Co_AutoClose, &CCongress.Co_UpdateTime, &CCongress.Co_CreateTime, &CCongress.Co_CreatorID, &CCongress.Co_HostUnit, &CCongress.Co_IsFile)
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
// break
|
||||
}
|
||||
}
|
||||
var CCCongress Model.T_Congress
|
||||
CCCongress.ID = ChangeT(CCongress.Co_ID.Valid, CCongress.Co_ID.String).(string)
|
||||
CCCongress.Co_TypeID = ChangeT(CCongress.Co_TypeID.Valid, CCongress.Co_TypeID.String).(string)
|
||||
CCCongress.Co_Name = ChangeT(CCongress.Co_Name.Valid, CCongress.Co_Name.String).(string)
|
||||
CCCongress.Co_Subject = ChangeT(CCongress.Co_Subject.Valid, CCongress.Co_Subject.String).(string)
|
||||
CCCongress.Co_RoomID = ChangeT(CCongress.Co_RoomID.Valid, CCongress.Co_RoomID.String).(string)
|
||||
CCCongress.Co_Status = ChangeT(CCongress.Co_Status.Valid, CCongress.Co_Status.String).(string)
|
||||
CCCongress.Co_StartTime = ChangeT(CCongress.Co_StartTime.Valid, CCongress.Co_StartTime.Time).(time.Time)
|
||||
CCCongress.Co_EndTime = ChangeT(CCongress.Co_EndTime.Valid, CCongress.Co_EndTime.Time).(time.Time)
|
||||
CCCongress.Co_AheadTime = int(ChangeT(CCongress.Co_AheadTime.Valid, CCongress.Co_AheadTime.Int32).(int32))
|
||||
CCCongress.Co_CheckInStartTime = ChangeT(CCongress.Co_CheckInStartTime.Valid, CCongress.Co_CheckInStartTime.Time).(time.Time)
|
||||
CCCongress.Co_CheckInEndTime = ChangeT(CCongress.Co_CheckInEndTime.Valid, CCongress.Co_CheckInEndTime.Time).(time.Time)
|
||||
CCCongress.Co_CheckInType = ChangeT(CCongress.Co_CheckInType.Valid, CCongress.Co_CheckInType.String).(string)
|
||||
CCCongress.Co_SeatMode = ChangeT(CCongress.Co_SeatMode.Valid, CCongress.Co_SeatMode.String).(string)
|
||||
CCCongress.Co_AutoRun = int(ChangeT(CCongress.Co_AutoRun.Valid, CCongress.Co_AutoRun.Int32).(int32))
|
||||
CCCongress.Co_AutoClose = int(ChangeT(CCongress.Co_AutoClose.Valid, CCongress.Co_AutoClose.Int32).(int32))
|
||||
CCCongress.Co_UpdateTime = ChangeT(CCongress.Co_UpdateTime.Valid, CCongress.Co_UpdateTime.Time).(time.Time)
|
||||
CCCongress.Co_CreateTime = ChangeT(CCongress.Co_CreateTime.Valid, CCongress.Co_CreateTime.Time).(time.Time)
|
||||
CCCongress.Co_CreatorID = ChangeT(CCongress.Co_CreatorID.Valid, CCongress.Co_CreatorID.String).(string)
|
||||
CCCongress.Co_HostUnit = ChangeT(CCongress.Co_HostUnit.Valid, CCongress.Co_HostUnit.String).(string)
|
||||
CCCongress.Co_IsFile = int(ChangeT(CCongress.Co_IsFile.Valid, CCongress.Co_IsFile.Int32).(int32))
|
||||
return CCCongress
|
||||
}
|
||||
|
||||
func GetAllCongress() []Model.T_Congress {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("GetAllCongress:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
rows, err := ConntectDB().Query("SELECT * FROM dbcongress.T_Congress")
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
defer rows.Close()
|
||||
|
||||
var AllCongress []Model.T_Congress
|
||||
for rows.Next() {
|
||||
var CCongress Model.SQLT_Congress
|
||||
err := rows.Scan(&CCongress.Co_ID, &CCongress.Co_TypeID, &CCongress.Co_Name, &CCongress.Co_Subject, &CCongress.Co_RoomID, &CCongress.Co_Status, &CCongress.Co_StartTime, &CCongress.Co_EndTime, &CCongress.Co_AheadTime, &CCongress.Co_CheckInStartTime, &CCongress.Co_CheckInEndTime, &CCongress.Co_CheckInType, &CCongress.Co_SeatMode, &CCongress.Co_AutoRun, &CCongress.Co_AutoClose, &CCongress.Co_UpdateTime, &CCongress.Co_CreateTime, &CCongress.Co_CreatorID, &CCongress.Co_HostUnit, &CCongress.Co_Serial, &CCongress.Co_IsFile)
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
break
|
||||
}
|
||||
var CCCongress Model.T_Congress
|
||||
CCCongress.ID = ChangeT(CCongress.Co_ID.Valid, CCongress.Co_ID.String).(string)
|
||||
CCCongress.Co_TypeID = ChangeT(CCongress.Co_TypeID.Valid, CCongress.Co_TypeID.String).(string)
|
||||
CCCongress.Co_Name = ChangeT(CCongress.Co_Name.Valid, CCongress.Co_Name.String).(string)
|
||||
CCCongress.Co_Subject = ChangeT(CCongress.Co_Subject.Valid, CCongress.Co_Subject.String).(string)
|
||||
CCCongress.Co_RoomID = ChangeT(CCongress.Co_RoomID.Valid, CCongress.Co_RoomID.String).(string)
|
||||
CCCongress.Co_Status = ChangeT(CCongress.Co_Status.Valid, CCongress.Co_Status.String).(string)
|
||||
CCCongress.Co_StartTime = ChangeT(CCongress.Co_StartTime.Valid, CCongress.Co_StartTime.Time).(time.Time)
|
||||
CCCongress.Co_EndTime = ChangeT(CCongress.Co_EndTime.Valid, CCongress.Co_EndTime.Time).(time.Time)
|
||||
CCCongress.Co_AheadTime = int(ChangeT(CCongress.Co_AheadTime.Valid, CCongress.Co_AheadTime.Int32).(int32))
|
||||
CCCongress.Co_CheckInStartTime = ChangeT(CCongress.Co_CheckInStartTime.Valid, CCongress.Co_CheckInStartTime.Time).(time.Time)
|
||||
CCCongress.Co_CheckInEndTime = ChangeT(CCongress.Co_CheckInEndTime.Valid, CCongress.Co_CheckInEndTime.Time).(time.Time)
|
||||
CCCongress.Co_CheckInType = ChangeT(CCongress.Co_CheckInType.Valid, CCongress.Co_CheckInType.String).(string)
|
||||
CCCongress.Co_SeatMode = ChangeT(CCongress.Co_SeatMode.Valid, CCongress.Co_SeatMode.String).(string)
|
||||
CCCongress.Co_AutoRun = int(ChangeT(CCongress.Co_AutoRun.Valid, CCongress.Co_AutoRun.Int32).(int32))
|
||||
CCCongress.Co_AutoClose = int(ChangeT(CCongress.Co_AutoClose.Valid, CCongress.Co_AutoClose.Int32).(int32))
|
||||
CCCongress.Co_UpdateTime = ChangeT(CCongress.Co_UpdateTime.Valid, CCongress.Co_UpdateTime.Time).(time.Time)
|
||||
CCCongress.Co_CreateTime = ChangeT(CCongress.Co_CreateTime.Valid, CCongress.Co_CreateTime.Time).(time.Time)
|
||||
CCCongress.Co_CreatorID = ChangeT(CCongress.Co_CreatorID.Valid, CCongress.Co_CreatorID.String).(string)
|
||||
CCCongress.Co_HostUnit = ChangeT(CCongress.Co_HostUnit.Valid, CCongress.Co_HostUnit.String).(string)
|
||||
CCCongress.Co_IsFile = int(ChangeT(CCongress.Co_IsFile.Valid, CCongress.Co_IsFile.Int32).(int32))
|
||||
AllCongress = append(AllCongress, CCCongress)
|
||||
}
|
||||
return AllCongress
|
||||
|
||||
}
|
||||
|
||||
func InsertCongress(para *Model.T_Congress) bool {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("InsertCongress:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
_, err := ConntectDB().Exec("INSERT INTO dbcongress.T_Congress (\"Co_ID\",\"Co_TypeID\",\"Co_Name\",\"Co_Subject\",\"Co_RoomID\",\"Co_Status\",\"Co_StartTime\",\"Co_EndTime\",\"Co_AheadTime\",\"Co_CheckInStartTime\",\"Co_CheckInEndTime\",\"Co_CheckInType\",\"Co_SeatMode\",\"Co_AutoRun\",\"Co_AutoClose\",\"Co_UpdateTime\",\"Co_CreateTime\",\"Co_CreatorID\",\"Co_HostUnit\",\"Co_IsFile\") VALUES ('" + para.ID + "','" + para.Co_TypeID + "','" + para.Co_Name + "','" + para.Co_Subject + "','" + para.Co_RoomID + "','" + para.Co_Status + "','" + para.Co_StartTime.String() + "','" + para.Co_EndTime.String() + "','" + strconv.Itoa(para.Co_AheadTime) + "','" + para.Co_CheckInStartTime.String() + "','" + para.Co_CheckInEndTime.String() + "','" + para.Co_CheckInType + "','" + para.Co_SeatMode + "','" + strconv.Itoa(para.Co_AutoRun) + "','" + strconv.Itoa(para.Co_AutoClose) + "','" + para.Co_UpdateTime.String() + "','" + para.Co_CreateTime.String() + "','" + para.Co_CreatorID + "','" + para.Co_HostUnit + "','" + strconv.Itoa(para.Co_IsFile) + "') ")
|
||||
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
}
|
||||
|
||||
func UpdateCongress(para *Model.T_Congress) bool {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("UpdateCongress:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
_, err := ConntectDB().Exec("UPDATE dbcongress.T_Congress SET \"Co_ID\" = '" + para.ID + "',\"Co_TypeID\" = '" + para.Co_TypeID + "',\"Co_Name\" = '" + para.Co_Name + "',\"Co_Subject\" = '" + para.Co_Subject + "',\"Co_RoomID\" = '" + para.Co_RoomID + "',\"Co_Status\" = '" + para.Co_Status + "',\"Co_StartTime\" = '" + para.Co_StartTime.String() + "',\"Co_EndTime\" = '" + para.Co_EndTime.String() + "',\"Co_AheadTime\" = '" + strconv.Itoa(para.Co_AheadTime) + "',\"Co_CheckInStartTime\" = '" + para.Co_CheckInStartTime.String() + "',\"Co_CheckInEndTime\" = '" + para.Co_CheckInEndTime.String() + "',\"Co_CheckInType\" = '" + para.Co_CheckInType + "',\"Co_SeatMode\" = '" + para.Co_SeatMode + "',\"Co_AutoRun\" = '" + strconv.Itoa(para.Co_AutoRun) + "',\"Co_AutoClose\" = '" + strconv.Itoa(para.Co_AutoClose) + "',\"Co_UpdateTime\" = '" + para.Co_UpdateTime.String() + "',\"Co_CreateTime\" = '" + para.Co_CreateTime.String() + "',\"Co_CreatorID\" = '" + para.Co_CreatorID + "',\"Co_HostUnit\" = '" + para.Co_HostUnit + "',\"Co_IsFile\" = '" + strconv.Itoa(para.Co_IsFile) + "' WHERE \"Co_ID\"='" + para.ID + "';")
|
||||
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
}
|
||||
|
||||
func DeleteCongress(para *Model.T_Congress) bool {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("DeleteCongress:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
_, err := ConntectDB().Exec("DELETE FROM dbcongress.T_Congress WHERE \"Co_ID\"='" + para.ID + "'")
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
}
|
@ -0,0 +1,91 @@
|
||||
package DAL
|
||||
|
||||
import (
|
||||
"flx/Model"
|
||||
"fmt"
|
||||
"strconv"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func GetAllDic_Nation() []Model.T_Dic_Nation {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("GetAllDic_Nation:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
rows, err := ConntectDB().Query("SELECT * FROM dbcongress.T_Dic_Nation")
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
defer rows.Close()
|
||||
|
||||
var AllDic_Nation []Model.T_Dic_Nation
|
||||
for rows.Next() {
|
||||
var CDic_Nation Model.T_Dic_Nation
|
||||
err := rows.Scan(&CDic_Nation.DN_NationID, &CDic_Nation.DN_NationName, &CDic_Nation.DN_NationName)
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
// break
|
||||
}
|
||||
AllDic_Nation = append(AllDic_Nation, CDic_Nation)
|
||||
}
|
||||
return AllDic_Nation
|
||||
|
||||
}
|
||||
|
||||
func InsertDic_Nation(para *Model.T_Dic_Nation) bool {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("InsertDic_Nation:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
_, err := ConntectDB().Exec("INSERT INTO dbcongress.T_Dic_Nation (\"DN_NationID\", \"DN_NationName\", \"DN_NationValue\") VALUES('" + para.DN_NationID + "', '" + para.DN_NationName + "', '" + strconv.Itoa(para.DN_NationValue) + "')")
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
}
|
||||
|
||||
func UpdateDic_Nation(para *Model.T_Dic_Nation) bool {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("UpdateDic_Nation:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
_, err := ConntectDB().Exec("UPDATE dbcongress.T_Dic_Nation SET \"DN_NationName\"='" + para.DN_NationName + "', \"DN_NationValue\"='" + strconv.Itoa(para.DN_NationValue) + "' WHERE \"Ca_ID\"='" + para.DN_NationID + "';")
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
}
|
||||
|
||||
func DeleteDic_Nation(para *Model.T_Dic_Nation) bool {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("DeleteDic_Nation:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
_, err := ConntectDB().Exec("DELETE FROM dbcongress.T_Dic_Nation WHERE \"DN_NationID\"='" + para.DN_NationID + "'")
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
}
|
@ -0,0 +1,91 @@
|
||||
package DAL
|
||||
|
||||
import (
|
||||
"flx/Model"
|
||||
"fmt"
|
||||
"strconv"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func GetAllDictionary() []Model.T_Dictionary {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("GetAllDictionary:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
rows, err := ConntectDB().Query("SELECT * FROM dbcongress.T_Dictionary")
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
defer rows.Close()
|
||||
|
||||
var AllDictionary []Model.T_Dictionary
|
||||
for rows.Next() {
|
||||
var CDictionary Model.T_Dictionary
|
||||
err := rows.Scan(&CDictionary.Dic_ID, &CDictionary.Dic_Sort, &CDictionary.Dic_Name, &CDictionary.Dic_ParentID, &CDictionary.Dic_Serial, &CDictionary.Dic_Describe)
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
// break
|
||||
}
|
||||
AllDictionary = append(AllDictionary, CDictionary)
|
||||
}
|
||||
return AllDictionary
|
||||
|
||||
}
|
||||
|
||||
func InsertDictionary(para *Model.T_Dictionary) bool {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("InsertDictionary:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
_, err := ConntectDB().Exec("INSERT INTO dbcongress.T_Dictionary (\"Dic_ID\", \"Dic_Sort\", \"Dic_Name\", \"Dic_ParentID\", \"Dic_Serial\", \"Dic_Describe\") VALUES('" + para.Dic_ID + "', '" + para.Dic_Sort + "', '" + para.Dic_Name + "', '" + para.Dic_ParentID + "', " + strconv.Itoa(para.Dic_Serial) + ", '" + para.Dic_Describe + "')")
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
}
|
||||
|
||||
func UpdateDictionary(para *Model.T_Dictionary) bool {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("UpdateDictionary:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
_, err := ConntectDB().Exec("UPDATE dbcongress.T_Dictionary SET \"Dic_Sort\"='" + para.Dic_Sort + "', \"Dic_Name\"='" + para.Dic_Name + "', \"Dic_ParentID\"='" + para.Dic_ParentID + "', \"Dic_Serial\"=" + strconv.Itoa(para.Dic_Serial) + ", \"Dic_Describe\"='" + para.Dic_Describe + "' WHERE \"Dic_ID\"='" + para.Dic_ID + "';")
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
}
|
||||
|
||||
func DeleteDictionary(para *Model.T_Dictionary) bool {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("DeleteDictionary:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
_, err := ConntectDB().Exec("DELETE FROM dbcongress.T_Dictionary WHERE \"Dic_ID\"='" + para.Dic_ID + "'")
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
}
|
@ -0,0 +1,84 @@
|
||||
package DAL
|
||||
|
||||
import (
|
||||
"flx/Model"
|
||||
"fmt"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func GetAllScreenFormEvent() []Model.T_ScreenFormEvent {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("GetAllScreenFormEvent:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
rows, err := ConntectDB().Query("SELECT * FROM dbcongress.t_screenformevent")
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
defer rows.Close()
|
||||
|
||||
var AllCScreenFormEvent []Model.T_ScreenFormEvent
|
||||
for rows.Next() {
|
||||
var CScreenFormEvent Model.SQLT_ScreenFormEvent
|
||||
err := rows.Scan(&CScreenFormEvent.SFE_ID, &CScreenFormEvent.SFE_ScreenID, &CScreenFormEvent.SFE_SF_ID, &CScreenFormEvent.SFE_Name, &CScreenFormEvent.SFE_TypeName, &CScreenFormEvent.SFE_Describe, &CScreenFormEvent.SFE_StopTime, &CScreenFormEvent.SFE_NextFormID, &CScreenFormEvent.SFE_CreateTime, &CScreenFormEvent.SFE_UpdateTime)
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
// break
|
||||
}
|
||||
var CCScreenFormEvent Model.T_ScreenFormEvent
|
||||
CCScreenFormEvent.SFE_ID = CScreenFormEvent.SFE_ID.String
|
||||
CCScreenFormEvent.SFE_ScreenID = CScreenFormEvent.SFE_ScreenID.String
|
||||
CCScreenFormEvent.SFE_SF_ID = CScreenFormEvent.SFE_SF_ID.String
|
||||
CCScreenFormEvent.SFE_Name = CScreenFormEvent.SFE_Name.String
|
||||
CCScreenFormEvent.SFE_TypeName = CScreenFormEvent.SFE_TypeName.String
|
||||
CCScreenFormEvent.SFE_Describe = CScreenFormEvent.SFE_Describe.String
|
||||
CCScreenFormEvent.SFE_StopTime = CScreenFormEvent.SFE_StopTime.Int64
|
||||
CCScreenFormEvent.SFE_NextFormID = CScreenFormEvent.SFE_NextFormID.String
|
||||
CCScreenFormEvent.SFE_CreateTime = CScreenFormEvent.SFE_CreateTime.Time
|
||||
CCScreenFormEvent.SFE_UpdateTime = CScreenFormEvent.SFE_UpdateTime.Time
|
||||
|
||||
AllCScreenFormEvent = append(AllCScreenFormEvent, CCScreenFormEvent)
|
||||
}
|
||||
return AllCScreenFormEvent
|
||||
|
||||
}
|
||||
|
||||
// func InsertStaffGroup(para *Model.T_StaffGroup) bool {
|
||||
|
||||
// _, err := ConntectDB().Exec("INSERT INTO dbcongress.t_staffgroup (\"Gr_ID\", \"Gr_Name\", \"Gr_Num\", \"Gr_Remarks\") VALUES('" + para.Gr_ID + "', '" + para.Gr_Name + "', '" + strconv.Itoa(para.Gr_Num) + "', '" + para.Gr_Remarks + "')")
|
||||
// if err != nil {
|
||||
// fmt.Println(err.Error())
|
||||
// return false
|
||||
// }
|
||||
|
||||
// return true
|
||||
|
||||
// }
|
||||
|
||||
// func UpdateStaffGroup(para *Model.T_StaffGroup) bool {
|
||||
|
||||
// _, err := ConntectDB().Exec("UPDATE dbcongress.t_staffgroup SET \"Gr_Name\"='" + para.Gr_Name + "', \"Gr_Num\"='" + strconv.Itoa(para.Gr_Num) + "', \"Gr_Remarks\"='" + para.Gr_Remarks + "' WHERE \"Gr_ID\"='" + para.Gr_ID + "';")
|
||||
// if err != nil {
|
||||
// fmt.Println(err.Error())
|
||||
// return false
|
||||
// }
|
||||
|
||||
// return true
|
||||
|
||||
// }
|
||||
|
||||
// func DeleteStaffGroup(para *Model.T_StaffGroup) bool {
|
||||
|
||||
// _, err := ConntectDB().Exec("DELETE FROM dbcongress.t_staffgroup WHERE \"Gr_ID\"='" + para.Gr_ID + "'")
|
||||
// if err != nil {
|
||||
// fmt.Println(err.Error())
|
||||
// return false
|
||||
// }
|
||||
|
||||
// return true
|
||||
|
||||
// }
|
@ -0,0 +1,51 @@
|
||||
package DAL
|
||||
|
||||
import (
|
||||
"flx/Model"
|
||||
"fmt"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func GetAllScreenForm() []Model.T_ScreenForm {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("GetAllScreenForm:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
rows, err := ConntectDB().Query("SELECT * FROM dbcongress.t_screenform")
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
defer rows.Close()
|
||||
|
||||
var AllCScreenForm []Model.T_ScreenForm
|
||||
for rows.Next() {
|
||||
var CSreenform Model.SQLT_ScreenForm
|
||||
err := rows.Scan(&CSreenform.SF_ID, &CSreenform.SF_ScreenID, &CSreenform.SF_TypeID, &CSreenform.SF_Name, &CSreenform.SF_Describe, &CSreenform.SF_Content, &CSreenform.SF_Width, &CSreenform.SF_Bgcolor, &CSreenform.SF_ScreenPath, &CSreenform.SF_Height, &CSreenform.SF_CreateTime, &CSreenform.SF_UpdateTime, &CSreenform.SF_Z)
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
// break
|
||||
}
|
||||
var CCScreenform Model.T_ScreenForm
|
||||
CCScreenform.SF_ID = CSreenform.SF_ID.String
|
||||
CCScreenform.SF_ScreenID = CSreenform.SF_ScreenID.String
|
||||
CCScreenform.SF_TypeID = CSreenform.SF_TypeID.Int64
|
||||
CCScreenform.SF_Name = CSreenform.SF_Name.String
|
||||
CCScreenform.SF_Describe = CSreenform.SF_Describe.String
|
||||
CCScreenform.SF_Content = CSreenform.SF_Content.String
|
||||
CCScreenform.SF_Width = CSreenform.SF_Width.Int64
|
||||
CCScreenform.SF_Bgcolor = CSreenform.SF_Bgcolor.String
|
||||
CCScreenform.SF_ScreenPath = CSreenform.SF_ScreenPath.String
|
||||
CCScreenform.SF_Height = CSreenform.SF_Height.Int64
|
||||
CCScreenform.SF_CreateTime = CSreenform.SF_CreateTime.Time
|
||||
CCScreenform.SF_UpdateTime = CSreenform.SF_UpdateTime.Time
|
||||
CCScreenform.SF_Z = CSreenform.SF_Z.Float64
|
||||
|
||||
AllCScreenForm = append(AllCScreenForm, CCScreenform)
|
||||
}
|
||||
return AllCScreenForm
|
||||
|
||||
}
|
@ -0,0 +1,86 @@
|
||||
package DAL
|
||||
|
||||
import (
|
||||
"flx/Model"
|
||||
"fmt"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func GetAllScreen() []Model.T_Screen {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("GetAllScreen:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
rows, err := ConntectDB().Query("SELECT * FROM dbcongress.t_screen where \"Scr_SortID\"='2' ")
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
defer rows.Close()
|
||||
|
||||
var AllCScreen []Model.T_Screen
|
||||
for rows.Next() {
|
||||
var CScreen Model.SQLT_Screen
|
||||
err := rows.Scan(&CScreen.Scr_ID, &CScreen.Scr_SortID, &CScreen.Scr_Name, &CScreen.Scr_Describe, &CScreen.Scr_Width, &CScreen.Scr_Height, &CScreen.Scr_Xpoint, &CScreen.Scr_Ypoint, &CScreen.Scr_IsEnabled, &CScreen.Scr_Serial, &CScreen.Scr_CreateTime, &CScreen.Scr_UpdateTime, &CScreen.Scr_Bgcolor)
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
// break
|
||||
}
|
||||
var CCScreen Model.T_Screen
|
||||
CCScreen.Scr_ID = CScreen.Scr_ID.String
|
||||
CCScreen.Scr_SortID = CScreen.Scr_SortID.Int64
|
||||
CCScreen.Scr_Name = CScreen.Scr_Name.String
|
||||
CCScreen.Scr_Describe = CScreen.Scr_Describe.String
|
||||
CCScreen.Scr_Width = CScreen.Scr_Width.Int64
|
||||
CCScreen.Scr_Height = CScreen.Scr_Height.Int64
|
||||
CCScreen.Scr_Xpoint = CScreen.Scr_Xpoint.Int64
|
||||
CCScreen.Scr_Ypoint = CScreen.Scr_Ypoint.Int64
|
||||
CCScreen.Scr_IsEnabled = CScreen.Scr_IsEnabled.Int64
|
||||
CCScreen.Scr_Serial = CScreen.Scr_Serial.Int64
|
||||
CCScreen.Scr_CreateTime = CScreen.Scr_CreateTime.Time
|
||||
CCScreen.Scr_UpdateTime = CScreen.Scr_UpdateTime.Time
|
||||
CCScreen.Scr_Bgcolor = CScreen.Scr_Bgcolor.String
|
||||
AllCScreen = append(AllCScreen, CCScreen)
|
||||
}
|
||||
return AllCScreen
|
||||
|
||||
}
|
||||
|
||||
// func InsertStaffGroup(para *Model.T_StaffGroup) bool {
|
||||
|
||||
// _, err := ConntectDB().Exec("INSERT INTO dbcongress.t_staffgroup (\"Gr_ID\", \"Gr_Name\", \"Gr_Num\", \"Gr_Remarks\") VALUES('" + para.Gr_ID + "', '" + para.Gr_Name + "', '" + strconv.Itoa(para.Gr_Num) + "', '" + para.Gr_Remarks + "')")
|
||||
// if err != nil {
|
||||
// fmt.Println(err.Error())
|
||||
// return false
|
||||
// }
|
||||
|
||||
// return true
|
||||
|
||||
// }
|
||||
|
||||
// func UpdateStaffGroup(para *Model.T_StaffGroup) bool {
|
||||
|
||||
// _, err := ConntectDB().Exec("UPDATE dbcongress.t_staffgroup SET \"Gr_Name\"='" + para.Gr_Name + "', \"Gr_Num\"='" + strconv.Itoa(para.Gr_Num) + "', \"Gr_Remarks\"='" + para.Gr_Remarks + "' WHERE \"Gr_ID\"='" + para.Gr_ID + "';")
|
||||
// if err != nil {
|
||||
// fmt.Println(err.Error())
|
||||
// return false
|
||||
// }
|
||||
|
||||
// return true
|
||||
|
||||
// }
|
||||
|
||||
// func DeleteStaffGroup(para *Model.T_StaffGroup) bool {
|
||||
|
||||
// _, err := ConntectDB().Exec("DELETE FROM dbcongress.t_staffgroup WHERE \"Gr_ID\"='" + para.Gr_ID + "'")
|
||||
// if err != nil {
|
||||
// fmt.Println(err.Error())
|
||||
// return false
|
||||
// }
|
||||
|
||||
// return true
|
||||
|
||||
// }
|
@ -0,0 +1,103 @@
|
||||
package DAL
|
||||
|
||||
import (
|
||||
"flx/Model"
|
||||
"fmt"
|
||||
"strconv"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func GetAllStaffCategory() []Model.T_StaffCategory {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("GetAllStaffCategory:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
rows, err := ConntectDB().Query("SELECT * FROM dbcongress.t_staffcategory")
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
defer rows.Close()
|
||||
|
||||
var AllStaffCategory []Model.T_StaffCategory
|
||||
for rows.Next() {
|
||||
var CStaffCategory Model.SQLT_StaffCategory
|
||||
err := rows.Scan(&CStaffCategory.Ca_ID, &CStaffCategory.Ca_Name, &CStaffCategory.Ca_Num, &CStaffCategory.Ca_ReportPower, &CStaffCategory.Ca_VotePower, &CStaffCategory.Ca_SpeakPower, &CStaffCategory.Ca_FirstSpeakPower, &CStaffCategory.Ca_CallPower, &CStaffCategory.Ca_SearchPower, &CStaffCategory.Ca_Remarks)
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
// break
|
||||
}
|
||||
var CCStaffCategory Model.T_StaffCategory
|
||||
CCStaffCategory.Ca_ID = ChangeT(CStaffCategory.Ca_ID.Valid, CStaffCategory.Ca_ID.String).(string)
|
||||
CCStaffCategory.Ca_Name = ChangeT(CStaffCategory.Ca_Name.Valid, CStaffCategory.Ca_Name.String).(string)
|
||||
CCStaffCategory.Ca_Num = ChangeT(CStaffCategory.Ca_Num.Valid, CStaffCategory.Ca_Num.String).(string)
|
||||
CCStaffCategory.Ca_ReportPower = int(ChangeT(CStaffCategory.Ca_ReportPower.Valid, CStaffCategory.Ca_ReportPower.Int32).(int32))
|
||||
CCStaffCategory.Ca_VotePower = int(ChangeT(CStaffCategory.Ca_VotePower.Valid, CStaffCategory.Ca_VotePower.Int32).(int32))
|
||||
CCStaffCategory.Ca_SpeakPower = int(ChangeT(CStaffCategory.Ca_SpeakPower.Valid, CStaffCategory.Ca_SpeakPower.Int32).(int32))
|
||||
CCStaffCategory.Ca_FirstSpeakPower = int(ChangeT(CStaffCategory.Ca_FirstSpeakPower.Valid, CStaffCategory.Ca_FirstSpeakPower.Int32).(int32))
|
||||
CCStaffCategory.Ca_CallPower = int(ChangeT(CStaffCategory.Ca_CallPower.Valid, CStaffCategory.Ca_CallPower.Int32).(int32))
|
||||
CCStaffCategory.Ca_SearchPower = int(ChangeT(CStaffCategory.Ca_SearchPower.Valid, CStaffCategory.Ca_SearchPower.Int32).(int32))
|
||||
CCStaffCategory.Ca_Remarks = ChangeT(CStaffCategory.Ca_Remarks.Valid, CStaffCategory.Ca_Remarks.String).(string)
|
||||
|
||||
AllStaffCategory = append(AllStaffCategory, CCStaffCategory)
|
||||
}
|
||||
return AllStaffCategory
|
||||
|
||||
}
|
||||
|
||||
func InsertStaffCategory(para *Model.T_StaffCategory) bool {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("InsertStaffCategory:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
_, err := ConntectDB().Exec("INSERT INTO dbcongress.t_staffcategory (\"Ca_ID\", \"Ca_Name\", \"Ca_Num\", \"Ca_ReportPower\", \"Ca_VotePower\", \"Ca_SpeakPower\", \"Ca_FirstSpeakPower\", \"Ca_CallPower\", \"Ca_SearchPower\", \"Ca_Remarks\") VALUES('" + para.Ca_ID + "', '" + para.Ca_Name + "', '" + para.Ca_Num + "', " + strconv.Itoa(para.Ca_ReportPower) + ", " + strconv.Itoa(para.Ca_VotePower) + ", " + strconv.Itoa(para.Ca_SpeakPower) + ", " + strconv.Itoa(para.Ca_FirstSpeakPower) + ", " + strconv.Itoa(para.Ca_CallPower) + ", " + strconv.Itoa(para.Ca_SearchPower) + ", '" + para.Ca_Remarks + "')")
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
}
|
||||
|
||||
func UpdateStaffCategory(para *Model.T_StaffCategory) bool {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("UpdateStaffCategory:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
_, err := ConntectDB().Exec("UPDATE dbcongress.t_staffcategory SET \"Ca_Name\"='" + para.Ca_Name + "', \"Ca_Num\"='" + para.Ca_Num + "', \"Ca_ReportPower\"=" + strconv.Itoa(para.Ca_ReportPower) + ", \"Ca_VotePower\"=" + strconv.Itoa(para.Ca_VotePower) + ", \"Ca_SpeakPower\"=" + strconv.Itoa(para.Ca_VotePower) + ", \"Ca_FirstSpeakPower\"=" + strconv.Itoa(para.Ca_FirstSpeakPower) + ", \"Ca_CallPower\"=" + strconv.Itoa(para.Ca_CallPower) + ", \"Ca_SearchPower\"=" + strconv.Itoa(para.Ca_SearchPower) + ", \"Ca_Remarks\"='" + para.Ca_Remarks + "' WHERE \"Ca_ID\"='" + para.Ca_ID + "';")
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
}
|
||||
|
||||
func DeleteStaffCategory(para *Model.T_StaffCategory) bool {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("DeleteStaffCategory:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
_, err := ConntectDB().Exec("DELETE FROM dbcongress.t_staffcategory WHERE \"Ca_ID\"='" + para.Ca_ID + "'")
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package DAL
|
||||
|
||||
import (
|
||||
"flx/Model"
|
||||
"fmt"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func GetAllStaffGroup() []Model.T_StaffGroup {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("GetAllStaffGroup:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
rows, err := ConntectDB().Query("SELECT \"Gr_ID\",\"Gr_Name\",\"Gr_Num\",\"Gr_Remarks\" FROM dbcongress.t_staffgroup")
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
defer rows.Close()
|
||||
|
||||
var AllStaffGroup []Model.T_StaffGroup
|
||||
for rows.Next() {
|
||||
var CStaffGroup Model.SQLT_StaffGroup
|
||||
err := rows.Scan(&CStaffGroup.Gr_ID, &CStaffGroup.Gr_Name, &CStaffGroup.Gr_Num, &CStaffGroup.Gr_Remarks)
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
// break
|
||||
}
|
||||
var CCStaffGroup Model.T_StaffGroup
|
||||
CCStaffGroup.Gr_ID = ChangeT(CStaffGroup.Gr_ID.Valid, CStaffGroup.Gr_ID.String).(string)
|
||||
CCStaffGroup.Gr_Name = ChangeT(CStaffGroup.Gr_Name.Valid, CStaffGroup.Gr_Name.String).(string)
|
||||
CCStaffGroup.Gr_Num = ChangeT(CStaffGroup.Gr_Num.Valid, CStaffGroup.Gr_Num.String).(string)
|
||||
CCStaffGroup.Gr_Remarks = ChangeT(CStaffGroup.Gr_Remarks.Valid, CStaffGroup.Gr_Remarks.String).(string)
|
||||
|
||||
AllStaffGroup = append(AllStaffGroup, CCStaffGroup)
|
||||
}
|
||||
return AllStaffGroup
|
||||
|
||||
}
|
||||
|
||||
func InsertStaffGroup(para *Model.T_StaffGroup) bool {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("InsertStaffGroup:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
_, err := ConntectDB().Exec("INSERT INTO dbcongress.t_staffgroup (\"Gr_ID\", \"Gr_Name\", \"Gr_Num\", \"Gr_Remarks\") VALUES('" + para.Gr_ID + "', '" + para.Gr_Name + "', '" + para.Gr_Num + "', '" + para.Gr_Remarks + "')")
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
}
|
||||
|
||||
func UpdateStaffGroup(para *Model.T_StaffGroup) bool {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("UpdateStaffGroup:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
_, err := ConntectDB().Exec("UPDATE dbcongress.t_staffgroup SET \"Gr_Name\"='" + para.Gr_Name + "', \"Gr_Num\"='" + para.Gr_Num + "', \"Gr_Remarks\"='" + para.Gr_Remarks + "' WHERE \"Gr_ID\"='" + para.Gr_ID + "';")
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
}
|
||||
|
||||
func DeleteStaffGroup(para *Model.T_StaffGroup) bool {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("DeleteStaffGroup:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
_, err := ConntectDB().Exec("DELETE FROM dbcongress.t_staffgroup WHERE \"Gr_ID\"='" + para.Gr_ID + "'")
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
}
|
@ -0,0 +1,249 @@
|
||||
package DAL
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"flx/Common"
|
||||
"flx/Model"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// &CStaffInfo.StaffCategory
|
||||
// &CStaffInfo.StaffGroup
|
||||
func GetAllStaffInfoAll() []Model.T_StaffInfo {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("GetAllStaffInfoAll:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
rows, err := ConntectDB().Query("SELECT * FROM dbcongress.t_StaffInfo left join dbcongress.t_staffcategory on dbcongress.t_StaffInfo.St_CategoryID=dbcongress.t_staffcategory.ID left join dbcongress.t_staffgroup on dbcongress.t_StaffInfo.St_GroupID=dbcongress.t_staffgroup.ID order by dbcongress.t_StaffInfo.st_num ")
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
defer rows.Close()
|
||||
|
||||
var AllStaffInfo []Model.T_StaffInfo
|
||||
for rows.Next() {
|
||||
var CStaffInfo Model.SQLT_StaffInfo
|
||||
var namec string
|
||||
err := rows.Scan(&CStaffInfo.St_ID, &CStaffInfo.St_Name, &CStaffInfo.St_Num, &CStaffInfo.St_CategoryID, &CStaffInfo.St_GroupID, &CStaffInfo.St_Image, &CStaffInfo.St_WorkUnit, &CStaffInfo.St_Sex,
|
||||
&CStaffInfo.St_Phone, &CStaffInfo.St_CardNum, &CStaffInfo.St_ViceCardNum, &CStaffInfo.St_ViceCardNumA, &CStaffInfo.St_ViceCardNumB,
|
||||
&CStaffInfo.St_NationID, &CStaffInfo.St_PartyID,
|
||||
&CStaffInfo.St_Job, &CStaffInfo.St_Enabled, &CStaffInfo.St_Remarks, &CStaffInfo.St_CreateTime,
|
||||
&CStaffInfo.St_Updatetime,
|
||||
&CStaffInfo.St_Account,
|
||||
&CStaffInfo.St_PWD,
|
||||
&CStaffInfo.St_Wynum,
|
||||
&CStaffInfo.St_Serial,
|
||||
&CStaffInfo.St_SpareA,
|
||||
&CStaffInfo.St_SpareB,
|
||||
&CStaffInfo.StaffCategory.Ca_ID, &namec, &CStaffInfo.StaffCategory.Ca_Num, &CStaffInfo.StaffCategory.Ca_ReportPower, &CStaffInfo.StaffCategory.Ca_VotePower, &CStaffInfo.StaffCategory.Ca_SpeakPower, &CStaffInfo.StaffCategory.Ca_FirstSpeakPower, &CStaffInfo.StaffCategory.Ca_CallPower, &CStaffInfo.StaffCategory.Ca_SearchPower, &CStaffInfo.StaffCategory.Ca_Remarks, &CStaffInfo.StaffCategory.Ca_Serial,
|
||||
&CStaffInfo.StaffGroup.Gr_ID, &CStaffInfo.StaffGroup.Gr_Name, &CStaffInfo.StaffGroup.Gr_Num, &CStaffInfo.StaffGroup.Gr_Remarks, &CStaffInfo.StaffGroup.Gr_Serial)
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
// break
|
||||
}
|
||||
var CCStaffInfo Model.T_StaffInfo
|
||||
CCStaffInfo.St_ID = ChangeT(CStaffInfo.St_ID.Valid, CStaffInfo.St_ID.String).(string)
|
||||
CCStaffInfo.St_Name = ChangeT(CStaffInfo.St_Name.Valid, CStaffInfo.St_Name.String).(string)
|
||||
CCStaffInfo.St_Num = ChangeT(CStaffInfo.St_Num.Valid, CStaffInfo.St_Num.String).(string)
|
||||
CCStaffInfo.St_CategoryID = ChangeT(CStaffInfo.St_CategoryID.Valid, CStaffInfo.St_CategoryID.String).(string)
|
||||
CCStaffInfo.St_GroupID = ChangeT(CStaffInfo.St_GroupID.Valid, CStaffInfo.St_GroupID.String).(string)
|
||||
CCStaffInfo.St_Image = ChangeT(CStaffInfo.St_Image.Valid, CStaffInfo.St_Image.String).(string)
|
||||
CCStaffInfo.St_WorkUnit = ChangeT(CStaffInfo.St_WorkUnit.Valid, CStaffInfo.St_WorkUnit.String).(string)
|
||||
CCStaffInfo.St_Sex = int(ChangeT(CStaffInfo.St_Sex.Valid, CStaffInfo.St_Sex.Int32).(int32))
|
||||
CCStaffInfo.St_Phone = ChangeT(CStaffInfo.St_Phone.Valid, CStaffInfo.St_Phone.String).(string)
|
||||
CCStaffInfo.St_CardNum = ChangeT(CStaffInfo.St_CardNum.Valid, CStaffInfo.St_CardNum.String).(string)
|
||||
CCStaffInfo.St_ViceCardNum = ChangeT(CStaffInfo.St_ViceCardNum.Valid, CStaffInfo.St_ViceCardNum.String).(string)
|
||||
CCStaffInfo.St_ViceCardNumA = ChangeT(CStaffInfo.St_ViceCardNumA.Valid, CStaffInfo.St_ViceCardNumA.String).(string)
|
||||
CCStaffInfo.St_ViceCardNumB = ChangeT(CStaffInfo.St_ViceCardNumB.Valid, CStaffInfo.St_ViceCardNumB.String).(string)
|
||||
CCStaffInfo.St_NationID = ChangeT(CStaffInfo.St_NationID.Valid, CStaffInfo.St_NationID.String).(string)
|
||||
CCStaffInfo.St_PartyID = ChangeT(CStaffInfo.St_PartyID.Valid, CStaffInfo.St_PartyID.String).(string)
|
||||
CCStaffInfo.St_Job = ChangeT(CStaffInfo.St_Job.Valid, CStaffInfo.St_Job.String).(string)
|
||||
CCStaffInfo.St_Enabled = int(ChangeT(CStaffInfo.St_Enabled.Valid, CStaffInfo.St_Enabled.Int32).(int32))
|
||||
CCStaffInfo.St_Remarks = ChangeT(CStaffInfo.St_Remarks.Valid, CStaffInfo.St_Remarks.String).(string)
|
||||
CCStaffInfo.St_CreateTime = ChangeT(CStaffInfo.St_CreateTime.Valid, CStaffInfo.St_CreateTime.Time).(time.Time)
|
||||
CCStaffInfo.St_Updatetime = ChangeT(CStaffInfo.St_Updatetime.Valid, CStaffInfo.St_Updatetime.Time).(time.Time)
|
||||
CCStaffInfo.St_Account = ChangeT(CStaffInfo.St_Account.Valid, CStaffInfo.St_Account.String).(string)
|
||||
CCStaffInfo.St_PWD = ChangeT(CStaffInfo.St_PWD.Valid, CStaffInfo.St_PWD.String).(string)
|
||||
CCStaffInfo.St_SpareA = ChangeT(CStaffInfo.St_SpareA.Valid, CStaffInfo.St_SpareA.String).(string)
|
||||
CCStaffInfo.St_SpareB = ChangeT(CStaffInfo.St_SpareB.Valid, CStaffInfo.St_SpareB.String).(string)
|
||||
// CCStaffInfo.StaffCategory = ChangeT(CStaffInfo.StaffCategory.Valid, CStaffInfo.StaffCategory.String).(string)
|
||||
// CCStaffInfo.StaffGroup = ChangeT(CStaffInfo.StaffGroup.Valid, CStaffInfo.StaffGroup.String).(string)
|
||||
CCStaffInfo.StaffCategory.Ca_ID = ChangeT(CStaffInfo.StaffCategory.Ca_ID.Valid, CStaffInfo.StaffCategory.Ca_ID.String).(string)
|
||||
CCStaffInfo.StaffCategory.Ca_Name = ChangeT(CStaffInfo.StaffCategory.Ca_Name.Valid, CStaffInfo.StaffCategory.Ca_Name.String).(string)
|
||||
CCStaffInfo.StaffCategory.Ca_Num = ChangeT(CStaffInfo.StaffCategory.Ca_Num.Valid, CStaffInfo.StaffCategory.Ca_Num.String).(string)
|
||||
CCStaffInfo.StaffCategory.Ca_ReportPower = int(ChangeT(CStaffInfo.StaffCategory.Ca_ReportPower.Valid, CStaffInfo.StaffCategory.Ca_ReportPower.Int32).(int32))
|
||||
CCStaffInfo.StaffCategory.Ca_VotePower = int(ChangeT(CStaffInfo.StaffCategory.Ca_VotePower.Valid, CStaffInfo.StaffCategory.Ca_VotePower.Int32).(int32))
|
||||
CCStaffInfo.StaffCategory.Ca_SpeakPower = int(ChangeT(CStaffInfo.StaffCategory.Ca_SpeakPower.Valid, CStaffInfo.StaffCategory.Ca_SpeakPower.Int32).(int32))
|
||||
CCStaffInfo.StaffCategory.Ca_FirstSpeakPower = int(ChangeT(CStaffInfo.StaffCategory.Ca_FirstSpeakPower.Valid, CStaffInfo.StaffCategory.Ca_FirstSpeakPower.Int32).(int32))
|
||||
CCStaffInfo.StaffCategory.Ca_CallPower = int(ChangeT(CStaffInfo.StaffCategory.Ca_CallPower.Valid, CStaffInfo.StaffCategory.Ca_CallPower.Int32).(int32))
|
||||
CCStaffInfo.StaffCategory.Ca_SearchPower = int(ChangeT(CStaffInfo.StaffCategory.Ca_SearchPower.Valid, CStaffInfo.StaffCategory.Ca_SearchPower.Int32).(int32))
|
||||
CCStaffInfo.StaffCategory.Ca_Remarks = ChangeT(CStaffInfo.StaffCategory.Ca_Remarks.Valid, CStaffInfo.StaffCategory.Ca_Remarks.String).(string)
|
||||
CCStaffInfo.StaffGroup.Gr_ID = ChangeT(CStaffInfo.StaffGroup.Gr_ID.Valid, CStaffInfo.StaffGroup.Gr_ID.String).(string)
|
||||
CCStaffInfo.StaffGroup.Gr_Name = ChangeT(CStaffInfo.StaffGroup.Gr_Name.Valid, CStaffInfo.StaffGroup.Gr_Name.String).(string)
|
||||
CCStaffInfo.StaffGroup.Gr_Num = ChangeT(CStaffInfo.StaffGroup.Gr_Num.Valid, CStaffInfo.StaffGroup.Gr_Num.String).(string)
|
||||
CCStaffInfo.StaffGroup.Gr_Remarks = ChangeT(CStaffInfo.StaffGroup.Gr_Remarks.Valid, CStaffInfo.StaffGroup.Gr_Remarks.String).(string)
|
||||
|
||||
AllStaffInfo = append(AllStaffInfo, CCStaffInfo)
|
||||
}
|
||||
return AllStaffInfo
|
||||
|
||||
}
|
||||
|
||||
func GetAllStaffInfoAllCPCS() []Model.T_Staff {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("GetAllStaffInfoAllCPCS:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
// 示例:发送 JSON 数据
|
||||
url := "http://" + Common.LoadConfig().SeverData.ServerIP + ":9800/vhwcapi/v1/web/api/service/tstaffinfo/getStaffViewNoPage"
|
||||
jsonData := `{}`
|
||||
body, statusCode, err := Common.SendPostRequest(url, jsonData, "application/json")
|
||||
if err != nil {
|
||||
log.Fatalf("请求错误: %v", err)
|
||||
}
|
||||
fmt.Printf("响应状态码: %d\n响应体: %s\n", statusCode, body)
|
||||
|
||||
var responses map[string]interface{}
|
||||
err = json.Unmarshal([]byte(body), &responses)
|
||||
if err != nil {
|
||||
log.Fatalf("JSON 解析失败: %v", err)
|
||||
}
|
||||
|
||||
listBytes, err := json.Marshal(responses["list"])
|
||||
if err != nil {
|
||||
log.Fatalf("List字段序列化失败: %v", err)
|
||||
}
|
||||
|
||||
var response []Model.T_Staff
|
||||
err = json.Unmarshal(listBytes, &response)
|
||||
if err != nil {
|
||||
log.Fatalf("JSON 解析失败: %v", err)
|
||||
}
|
||||
|
||||
return response
|
||||
|
||||
}
|
||||
|
||||
func ChangeT(IsOK bool, out interface{}) interface{} {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("ChangeT:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
return out
|
||||
|
||||
}
|
||||
|
||||
func GetAllStaffInfo() []Model.T_StaffInfo {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("GetAllStaffInfo:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
rows, err := ConntectDB().Query("SELECT * FROM dbcongress.t_StaffInfo")
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
defer rows.Close()
|
||||
|
||||
var AllStaffInfo []Model.T_StaffInfo
|
||||
for rows.Next() {
|
||||
var CStaffInfo Model.T_StaffInfo
|
||||
err := rows.Scan(&CStaffInfo.St_ID, &CStaffInfo.St_Name, &CStaffInfo.St_Num, &CStaffInfo.St_CategoryID, &CStaffInfo.St_GroupID, &CStaffInfo.St_Image, &CStaffInfo.St_WorkUnit, &CStaffInfo.St_Sex,
|
||||
&CStaffInfo.St_Phone, &CStaffInfo.St_CardNum, &CStaffInfo.St_ViceCardNum, &CStaffInfo.St_ViceCardNumA, &CStaffInfo.St_ViceCardNumB,
|
||||
&CStaffInfo.St_NationID, &CStaffInfo.St_PartyID,
|
||||
&CStaffInfo.St_Job, &CStaffInfo.St_Enabled, &CStaffInfo.St_Remarks, &CStaffInfo.St_CreateTime,
|
||||
&CStaffInfo.St_Updatetime,
|
||||
&CStaffInfo.St_Account,
|
||||
&CStaffInfo.St_PWD,
|
||||
&CStaffInfo.St_SpareA,
|
||||
&CStaffInfo.St_SpareB)
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
// break
|
||||
}
|
||||
AllStaffInfo = append(AllStaffInfo, CStaffInfo)
|
||||
}
|
||||
return AllStaffInfo
|
||||
|
||||
}
|
||||
|
||||
func InsertStaffInfo(para *Model.T_StaffInfo) bool {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("InsertStaffInfo:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
_, err := ConntectDB().Exec("INSERT INTO dbcongress.T_StaffInfo (\"St_ID\",\"St_Name\",\"St_Num\",\"St_CategoryID\",\"St_GroupID\",\"St_Image\",\"St_WorkUnit\",\"St_Sex\",\"St_Phone\",\"St_CardNum\",\"St_ViceCardNum\",\"St_ViceCardNumA\",\"St_ViceCardNumB\",\"St_NationID\",\"St_PartyID\",\"St_Job\",\"St_Enabled\",\"St_Remarks\",\"St_CreateTime\",\"St_Updatetime\",\"St_Account\",\"St_PWD\",\"St_SpareA\",\"St_SpareB\") VALUES('" + para.St_ID + "','" + para.St_Name + "','" + para.St_Num + "','" + para.St_CategoryID + "','" + para.St_GroupID + "','" + para.St_Image + "','" + para.St_WorkUnit + "','" + strconv.Itoa(para.St_Sex) + "','" + para.St_Phone + "','" + para.St_CardNum + "','" + para.St_ViceCardNum + "','" + para.St_ViceCardNumA + "','" + para.St_ViceCardNumB + "','" + para.St_NationID + "','" + para.St_PartyID + "','" + para.St_Job + "','" + strconv.Itoa(para.St_Enabled) + "','" + para.St_Remarks + "','" + para.St_CreateTime.String() + "','" + para.St_Updatetime.String() + "','" + para.St_Account + "','" + para.St_PWD + "','" + para.St_SpareA + "','" + para.St_SpareB + "')")
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
}
|
||||
|
||||
func UpdateStaffInfo(para *Model.T_Staff) bool {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("UpdateStaffInfo:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
url := "http://" + Common.LoadConfig().SeverData.ServerIP + ":9800/vhwcapi/v1/web/api/service/tstaffinfo/clearCardNum"
|
||||
data := map[string]interface{}{
|
||||
"id": para.ID,
|
||||
"st_vicecardnum": para.St_ViceCardNum,
|
||||
"st_vicecardnuma": para.St_ViceCardNumA,
|
||||
"st_vicecardnumb": para.St_ViceCardNumB,
|
||||
}
|
||||
// 将map转换为JSON格式
|
||||
jsonData, err := json.Marshal(data)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
body, statusCode, err := Common.SendPostRequest(url, jsonData, "application/json")
|
||||
if err != nil {
|
||||
log.Fatalf("请求错误: %v", err)
|
||||
}
|
||||
fmt.Printf("响应状态码: %d\n响应体: %s\n", statusCode, body)
|
||||
|
||||
// _, err := ConntectDB().Exec("UPDATE dbcongress.t_StaffInfo SET \"St_Name\" = '" + para.St_Name + "',\"St_Num\" = '" + para.St_Num + "',\"St_CategoryID\" = '" + para.St_CategoryID + "',\"St_GroupID\" = '" + para.St_GroupID + "',\"St_Image\" = '" + para.St_Image + "',\"St_WorkUnit\" = '" + para.St_WorkUnit + "',\"St_Sex\" = '" + strconv.Itoa(para.St_Sex) + "',\"St_Phone\" = '" + para.St_Phone + "',\"St_CardNum\" = '" + para.St_CardNum + "',\"St_ViceCardNum\" = '" + para.St_ViceCardNum + "',\"St_ViceCardNumA\" = '" + para.St_ViceCardNumA + "',\"St_ViceCardNumB\" = '" + para.St_ViceCardNumB + "',\"St_NationID\" = '" + para.St_NationID + "',\"St_PartyID\" = '" + para.St_PartyID + "',\"St_Job\" = '" + para.St_Job + "',\"St_Enabled\" = '" + strconv.Itoa(para.St_Enabled) + "',\"St_Remarks\" = '" + para.St_Remarks + "',\"St_CreateTime\" = '" + para.St_CreateTime.Format("2006-01-02 15:04:05") + "',\"St_Updatetime\" = '" + para.St_Updatetime.Format("2006-01-02 15:04:05") + "',\"St_Account\" = '" + para.St_Account + "',\"St_PWD\" = '" + para.St_PWD + "',\"St_SpareA\" = '" + para.St_SpareA + "',\"St_SpareB\" = '" + para.St_SpareB + "' WHERE \"St_ID\" = '" + para.St_ID + "'")
|
||||
// if err != nil {
|
||||
// fmt.Println(err.Error())
|
||||
// return false
|
||||
// }
|
||||
|
||||
return true
|
||||
|
||||
}
|
||||
|
||||
// func DeleteStaffInfo(para *Model.T_Staff) bool {
|
||||
|
||||
// _, err := ConntectDB().Exec("DELETE FROM dbcongress.t_StaffInfo WHERE \"St_ID\"='" + para.St_ID + "'")
|
||||
// if err != nil {
|
||||
// fmt.Println(err.Error())
|
||||
// return false
|
||||
// }
|
||||
|
||||
// return true
|
||||
|
||||
// }
|
@ -0,0 +1,341 @@
|
||||
package FLXCheckInController
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"reflect"
|
||||
"time"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
type FlxCheckInCmdReader struct {
|
||||
BufferMaxLength int
|
||||
SerialPort *io.ReadWriteCloser
|
||||
tmpRecDataBuffer []byte
|
||||
IsRunning bool
|
||||
//记录最后一次接收数据时间
|
||||
dtLastRecivedDateTime time.Time
|
||||
InvokeOnBusinessDataReviceData func([]byte)
|
||||
|
||||
OnConnectStatusHandler func(time.Time)
|
||||
}
|
||||
|
||||
func (para *FlxCheckInCmdReader) InitPara(serialPortt *io.ReadWriteCloser) {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("InitPara:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
fmt.Println("初始化串口驱动参数 ")
|
||||
para.SerialPort = serialPortt
|
||||
|
||||
// Make sure to close it later.
|
||||
// defer port.Close()
|
||||
|
||||
// // Write 4 bytes to the port.
|
||||
// b := []byte{0x00, 0x01, 0x02, 0x03}
|
||||
// n, err := port.Write(b)
|
||||
// port.Read()
|
||||
// if err != nil {
|
||||
// fmt.Println("port.Write: %v", err)
|
||||
// }
|
||||
|
||||
// fmt.Println("Wrote", n, "bytes.")
|
||||
}
|
||||
|
||||
// /// <summary>接收到业务数据后触发事件</summary>
|
||||
// public event BusinessDataReciveEventHandler OnBusinessDataReciveEventHandler;
|
||||
|
||||
// /// <summary>读串口数据时发生的日志信息</summary>
|
||||
// public event DataReciveLogHandler OnDataReciveLogHandler;
|
||||
|
||||
// /// <summary>
|
||||
// /// 判断串口设备的连接状态事件
|
||||
// /// </summary>
|
||||
// public event DataReciveHandler OnConnectStatusHandler;
|
||||
|
||||
func (para *FlxCheckInCmdReader) InvokeOnDataReciveLogHandler(logMessage string) {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("InvokeOnDataReciveLogHandler:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
// if OnDataReciveLogHandler != nil {
|
||||
// OnDataReciveLogHandler(logMessage)
|
||||
// }
|
||||
fmt.Println("串口消息:" + logMessage)
|
||||
}
|
||||
|
||||
func (para *FlxCheckInCmdReader) InvokeOnConnectStatusHandler(dtLastRecived time.Time) {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("InvokeOnConnectStatusHandler:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
para.OnConnectStatusHandler(dtLastRecived)
|
||||
|
||||
}
|
||||
|
||||
func (para *FlxCheckInCmdReader) ProcessRecvBuff(RecvBuffer []byte) {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("ProcessRecvBuff:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
var PackLen int = 0
|
||||
var PackBuff []byte
|
||||
var startIndex int = 0
|
||||
var curIndex int = 0
|
||||
for curIndex < len(RecvBuffer) {
|
||||
//应该判断7E 06 或02
|
||||
if RecvBuffer[curIndex] == CMD_HEAD {
|
||||
if startIndex != curIndex && (curIndex-startIndex) >= 5 {
|
||||
PackLen = curIndex + 1 - startIndex
|
||||
PackBuff = make([]byte, PackLen)
|
||||
|
||||
PackBuff = RecvBuffer[startIndex : startIndex+PackLen]
|
||||
|
||||
para.InvokeOnBusinessDataReviceData(PackBuff) //外发事件。
|
||||
|
||||
startIndex = curIndex + 1
|
||||
}
|
||||
}
|
||||
curIndex++
|
||||
}
|
||||
if startIndex != curIndex {
|
||||
para.tmpRecDataBuffer = append(para.tmpRecDataBuffer, RecvBuffer[curIndex:]...)
|
||||
}
|
||||
}
|
||||
|
||||
func (para *FlxCheckInCmdReader) TimerCallbackHandler() {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("TimerCallbackHandler:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
var waitReadPackLen int = 0 //待读的字节长度
|
||||
// var length int = 0 //放入缓冲区的长度。
|
||||
for para.IsRunning {
|
||||
reciveData := make([]byte, 51200)
|
||||
clen, err := (*(para.SerialPort)).Read(reciveData)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
if err == io.EOF {
|
||||
// time.Sleep(2000)
|
||||
// para.IsRunning = false
|
||||
// go para.CloseDevice()
|
||||
// go para.TimerCallbackHandler()
|
||||
return
|
||||
}
|
||||
continue
|
||||
}
|
||||
if clen >= DataPacketMinLength {
|
||||
waitReadPackLen = clen
|
||||
if waitReadPackLen == 0 {
|
||||
fmt.Println(err)
|
||||
}
|
||||
data := make([]byte, waitReadPackLen)
|
||||
|
||||
data = reciveData[:waitReadPackLen]
|
||||
//当前包接收长度 加上 上次接收半包的长度
|
||||
recvBuffer := make([]byte, len(para.tmpRecDataBuffer)+waitReadPackLen) //从端口读取数据的缓冲区
|
||||
|
||||
//上次如果为半包
|
||||
if len(para.tmpRecDataBuffer) > 0 {
|
||||
recvBuffer = insertToSlice(0, para.tmpRecDataBuffer, recvBuffer)
|
||||
// id = PersonIDs[j]
|
||||
}
|
||||
recvBuffer = insertToSlice(len(para.tmpRecDataBuffer), data, recvBuffer)
|
||||
para.tmpRecDataBuffer = para.tmpRecDataBuffer[0:0]
|
||||
// recvBuffer = append(para.tmpRecDataBuffer, data...)
|
||||
//读取当前包的数据
|
||||
//Array.Copy(data, 0, recvBuffer, index, waitReadPackLen) //读来的数据先零时放入这个缓冲区
|
||||
|
||||
para.ProcessRecvBuff(recvBuffer)
|
||||
para.dtLastRecivedDateTime = time.Now()
|
||||
|
||||
} else {
|
||||
para.tmpRecDataBuffer = append(para.tmpRecDataBuffer, reciveData[:clen]...)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (para *FlxCheckInCmdReader) Start() bool {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("Start:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
// id = PersonIDs[j]
|
||||
//此处 para.IsRunning 如不设置,则程序无法接收签到门信息
|
||||
para.IsRunning = true
|
||||
fmt.Println("中控机接收开启")
|
||||
go para.TimerCallbackHandler()
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
func (para *FlxCheckInCmdReader) Stop() bool {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("Stop:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
para.IsRunning = false
|
||||
return true
|
||||
|
||||
}
|
||||
|
||||
func (para *FlxCheckInCmdReader) ReadResponseData() []byte {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("ReadResponseData:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
if para.SerialPort == nil {
|
||||
return nil
|
||||
}
|
||||
reciveData := make([]byte, 51200)
|
||||
clen, err := (*(para.SerialPort)).Read(reciveData)
|
||||
if err != nil {
|
||||
fmt.Println("串口报错消息:" + err.Error())
|
||||
return nil
|
||||
}
|
||||
if clen <= 0 {
|
||||
return nil
|
||||
}
|
||||
// data := make([]byte, clen)
|
||||
|
||||
data := reciveData[:clen]
|
||||
|
||||
return data
|
||||
|
||||
}
|
||||
|
||||
// 截取字符串 start 起点下标 length 需要截取的长度
|
||||
func Substr(str string, start int, length int) string {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("Substr:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
rs := []rune(str)
|
||||
rl := len(rs)
|
||||
end := 0
|
||||
|
||||
if start < 0 {
|
||||
start = rl - 1 + start
|
||||
}
|
||||
end = start + length
|
||||
|
||||
if start > end {
|
||||
start, end = end, start
|
||||
}
|
||||
|
||||
if start < 0 {
|
||||
start = 0
|
||||
}
|
||||
if start > rl {
|
||||
start = rl
|
||||
}
|
||||
if end < 0 {
|
||||
end = 0
|
||||
}
|
||||
if end > rl {
|
||||
end = rl
|
||||
}
|
||||
|
||||
return string(rs[start:end])
|
||||
}
|
||||
|
||||
// insertSlice 插入
|
||||
func insertSlice(index int, newstr []byte, src []byte) (ns []byte) {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("insertSlice:", r)
|
||||
}
|
||||
}()
|
||||
ns = append(ns, src[:index]...) // 切片后加..., 相当于拆包成单个元素
|
||||
ns = append(ns, newstr...)
|
||||
ns = append(ns, src[index+len(newstr):]...)
|
||||
return
|
||||
}
|
||||
|
||||
func insertToSlice(index int, newstr []byte, src []byte) (ns []byte) {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("insertToSlice:", r)
|
||||
}
|
||||
}()
|
||||
ns = append(ns, src[:index]...) // 切片后加..., 相当于拆包成单个元素
|
||||
ns = append(ns, newstr...)
|
||||
ns = append(ns, src[index:]...)
|
||||
return
|
||||
}
|
||||
|
||||
func Contain(obj interface{}, target interface{}) bool {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("Contain:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
targetValue := reflect.ValueOf(target)
|
||||
switch reflect.TypeOf(target).Kind() {
|
||||
case reflect.Slice, reflect.Array:
|
||||
for i := 0; i < targetValue.Len(); i++ {
|
||||
if targetValue.Index(i).Interface() == obj {
|
||||
return true
|
||||
}
|
||||
}
|
||||
case reflect.Map:
|
||||
if targetValue.MapIndex(reflect.ValueOf(obj)).IsValid() {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// RemoveElementToint32 移除数组内的指定元素
|
||||
func RemoveElementStrings(list []string, value string) []string {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Error("RemoveElementStrings:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
var result = make([]string, 0)
|
||||
index := 0
|
||||
endIndex := len(list) - 1
|
||||
for i, s := range list {
|
||||
if s == value {
|
||||
result = append(result, list[index:i]...)
|
||||
index = i + 1
|
||||
} else if i == endIndex {
|
||||
result = append(result, list[index:endIndex+1]...)
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package FLXCheckInController
|
||||
|
||||
const CloseSerialPort_Error string = "关闭设备{0}时出现错误!错误信息:{1}"
|
||||
const CloseSerialPort_Faild string = "关闭设备失败!{0}"
|
||||
const CloseSerialPort_Success string = "关闭设备成功!{0}"
|
||||
|
||||
const CRC_CHECK_ERROR string = "CRC 校验错误!"
|
||||
const OpenSerialPort_Error string = "打开设备({0})时出现错误!错误信息:{1}"
|
||||
const OpenSerialPort_Faild string = "打开设备失败!{0}"
|
||||
const OpenSerialPort_Success string = "成功打开设备!{0}"
|
||||
|
||||
const OpenBeep_Error string = "打开蜂鸣时发生异常!{0}"
|
||||
|
||||
const WritePortBuffer_Error string = "向串口({0})发送指令出现错误!指令:{1}。错误信息:{2}"
|
||||
|
||||
const ReciveDataFromCOM_Error string = "从串口{0}接收数据出现错误!错误信息:{1}"
|
||||
const ReciveDataFromCOM_Success string = "成功从串口{0}接收到长度为{1}的数据!内容:{2}"
|
||||
|
||||
const InvokeCaredNo_Processed string = "返回卡号:{0}"
|
||||
const InvokeCaredNo_None string = "无卡:{0}"
|
||||
const CreateThread string = "创建读卡线程!"
|
||||
const ClosedThread string = "关闭读卡线程"
|
@ -0,0 +1,69 @@
|
||||
package FLXNetworkController
|
||||
|
||||
import "strconv"
|
||||
|
||||
type Compacket struct {
|
||||
|
||||
/// <summary>命令类型01表示命令包、02表示语音包、03表示同传包</summary>
|
||||
CmdType byte
|
||||
|
||||
/// <summary>通道ID</summary>
|
||||
ChnlID byte
|
||||
|
||||
/// <summary>单元地址</summary>
|
||||
Addr byte
|
||||
|
||||
/// <summary>命令字</summary>
|
||||
Cmd byte
|
||||
|
||||
/// <summary>命令字扩展</summary>
|
||||
Const byte
|
||||
|
||||
/// <summary>命令数据1</summary>
|
||||
ACmdData1 byte
|
||||
|
||||
/// <summary>命令数据2</summary>
|
||||
ACmdData2 byte
|
||||
|
||||
/// <summary>命令数据3</summary>
|
||||
ACmdData3 byte
|
||||
|
||||
/// <summary>命令数据4</summary>
|
||||
ACmdData4 byte
|
||||
|
||||
/// <summary>包长高字节</summary>
|
||||
LenH byte
|
||||
|
||||
/// <summary>包长低字节</summary>
|
||||
LenL byte
|
||||
|
||||
//dataLength = aLenH*256 + aLenL;
|
||||
|
||||
/// <summary>数据长度</summary>
|
||||
DataLength int
|
||||
|
||||
/// <summary>数据部分</summary>
|
||||
Data []byte
|
||||
|
||||
/// <summary>ipAddress</summary>
|
||||
IPAddress string
|
||||
|
||||
SocketID string
|
||||
}
|
||||
|
||||
func (o *Compacket) ToString() string {
|
||||
var stringBuilder string
|
||||
stringBuilder += ("7E ")
|
||||
//stringBuilder.AppendFormat("{0:X2} ", CmdType);
|
||||
//stringBuilder.AppendFormat("{0:X2} ", ChnlID);
|
||||
//stringBuilder.AppendFormat("{0:X2} ", Addr);
|
||||
stringBuilder += strconv.FormatInt(int64(o.Cmd), 16) + " "
|
||||
stringBuilder += strconv.FormatInt(int64(o.Const), 16) + " "
|
||||
stringBuilder += strconv.FormatInt(int64(o.LenH), 16) + " "
|
||||
stringBuilder += strconv.FormatInt(int64(o.LenL), 16) + " "
|
||||
for _, vlue := range o.Data {
|
||||
stringBuilder += strconv.FormatInt(int64(vlue), 16) + " "
|
||||
}
|
||||
return stringBuilder
|
||||
|
||||
}
|
@ -0,0 +1,755 @@
|
||||
package FLXNetworkController
|
||||
|
||||
type FlxNetworkComPara byte
|
||||
|
||||
const FlxNetworkComPara_CMD_HEAD byte = 0x7E
|
||||
|
||||
//默认零号指令
|
||||
const FlxNetworkComPara_Command_Zero byte = 0x00
|
||||
|
||||
const FlxNetworkComPara_TeminalConfig_Main byte = 0x1C
|
||||
const FlxNetworkComPara_TeminalConfig_Windows byte = 0x01
|
||||
|
||||
/// <summary>向智能终端发送文件</summary>
|
||||
const FlxNetworkComPara_Main_Send_File byte = 0x81
|
||||
|
||||
/// <summary>系统配置文件</summary>
|
||||
const FlxNetworkComPara_Child_Send_File_System byte = 0x01
|
||||
|
||||
/// <summary>终端更新文件</summary>
|
||||
const FlxNetworkComPara_Child_Send_File_Update byte = 0x02
|
||||
|
||||
/// <summary>Office文件</summary>
|
||||
const FlxNetworkComPara_Child_Send_File_Office byte = 0x03
|
||||
|
||||
/// <summary>照片图片</summary>
|
||||
const FlxNetworkComPara_Child_Send_File_Picture byte = 0x04
|
||||
|
||||
/// <summary>文本文件</summary>
|
||||
const FlxNetworkComPara_Child_Send_File_Text byte = 0x05
|
||||
|
||||
/// <summary>视频文件</summary>
|
||||
const FlxNetworkComPara_Child_Send_File_Video byte = 0x06
|
||||
|
||||
/// <summary>音频文件</summary>
|
||||
const FlxNetworkComPara_Child_Send_File_Audio byte = 0x07
|
||||
|
||||
/// <summary>其他文件</summary>
|
||||
const FlxNetworkComPara_Child_Send_File_Other byte = 0x08
|
||||
|
||||
/// <summary> 资料库 </summary>
|
||||
const FlxNetworkComPara_Child_Send_File_DocsStore byte = 0x09
|
||||
|
||||
/// <summary> 表示这是议题的附件 </summary>
|
||||
const FlxNetworkComPara_Child_Send_File_Topic byte = 0x0A
|
||||
|
||||
/// <summary> 便签文件 </summary>
|
||||
const FlxNetworkComPara_Child_Send_File_Note byte = 0x0B
|
||||
|
||||
/// <summary> 批注文件 </summary>
|
||||
const FlxNetworkComPara_Child_Send_File_Revise byte = 0x0C
|
||||
|
||||
/// <summary>向智能终端发送读取文件指令</summary>
|
||||
const FlxNetworkComPara_Main_UpDown_File byte = 0x82
|
||||
|
||||
/// <summary>智能终端向上位机请求上传文件指令</summary>
|
||||
const FlxNetworkComPara_Main_RequestUp_File byte = 0x83
|
||||
|
||||
/// <summary>向智能终端发送同意上传文件指令</summary>
|
||||
const FlxNetworkComPara_Main_AgreeUp_File byte = 0x83
|
||||
|
||||
/// <summary>向智能终端发送同意上传文件指令</summary>
|
||||
const FlxNetworkComPara_Child_Send_AgreeUp_File byte = 0x04
|
||||
|
||||
//报到类指令
|
||||
/// <summary>开始报到</summary>
|
||||
const FlxNetworkComPara_Main_Start_Register byte = 0x30
|
||||
|
||||
/// <summary>暂停报到</summary>
|
||||
const FlxNetworkComPara_Main_Pause_Register byte = 0x38
|
||||
|
||||
/// <summary>继续报到</summary>
|
||||
const FlxNetworkComPara_Main_Resume_Register byte = 0x39
|
||||
|
||||
/// <summary>结束报到</summary>
|
||||
const FlxNetworkComPara_Main_Stop_Register byte = 0x33
|
||||
|
||||
/// <summary>发布报到结果</summary>
|
||||
const FlxNetworkComPara_Main_PublishResult_Register byte = 0x3A
|
||||
|
||||
/// <summary>自由就坐刷新坐席</summary>
|
||||
const FlxNetworkComPara_Main_RefreshSeatInfoWhenFree_Register byte = 0x37
|
||||
|
||||
/// <summary>重新开始报到</summary>
|
||||
const FlxNetworkComPara_Main_ReStart_Register byte = 0x3B
|
||||
|
||||
/// <summary>IC卡自由就坐</summary>
|
||||
const FlxNetworkComPara_Child_Type_IC_Free byte = 0x00
|
||||
|
||||
/// <summary>按键报到自由就坐</summary>
|
||||
const FlxNetworkComPara_Child_Type_PressKey_Free byte = 0x01
|
||||
|
||||
/// <summary>门口刷卡报到自由就坐</summary>
|
||||
const FlxNetworkComPara_Child_Type_Door_Free byte = 0x02
|
||||
|
||||
/// <summary>发言键报到自由就坐</summary>
|
||||
const FlxNetworkComPara_Child_Type_SpeakKey_Free byte = 0x03
|
||||
|
||||
/// <summary>唤醒即报到自由就坐</summary>
|
||||
const FlxNetworkComPara_Child_Type_Active_Free byte = 0x04
|
||||
|
||||
/// <summary>IC卡指定就坐</summary>
|
||||
const FlxNetworkComPara_Child_Type_IC_Specify byte = 0x10
|
||||
|
||||
/// <summary>按键报到指定就坐</summary>
|
||||
const FlxNetworkComPara_Child_Type_PressKey_Specify byte = 0x11
|
||||
|
||||
/// <summary>门口刷卡报到指定就坐</summary>
|
||||
const FlxNetworkComPara_Child_Type_Door_Specify byte = 0x12
|
||||
|
||||
/// <summary>发言键报到指定就坐</summary>
|
||||
const FlxNetworkComPara_Child_Type_SpeakKey_Specify byte = 0x13
|
||||
|
||||
/// <summary>唤醒即报到指定就坐</summary>
|
||||
const FlxNetworkComPara_Child_Type_Active_Specify byte = 0x14
|
||||
|
||||
/// <summary>终端返回请求报到指令</summary>
|
||||
const FlxNetworkComPara_Client_Request_Register byte = 0x31
|
||||
|
||||
/// <summary> 补报指令 </summary>
|
||||
const FlxNetworkComPara_CheckIn_Sub byte = 0x00
|
||||
|
||||
/// <summary> 销报指令 </summary>
|
||||
const FlxNetworkComPara_CheckOut_Sub byte = 0x01
|
||||
|
||||
/// <summary> 报到门报到指令 </summary>
|
||||
const FlxNetworkComPara_DoorCheckIn_Sub byte = 0x02
|
||||
|
||||
/// <summary> 报到门销报指令 </summary>
|
||||
const FlxNetworkComPara_DoorCheckOut_Sub byte = 0x03
|
||||
|
||||
/// <summary>回复终端报到成功指令</summary>
|
||||
const FlxNetworkComPara_Reply_Register_Succeed byte = 0x32
|
||||
|
||||
/// <summary> 补报、销报指令 </summary>
|
||||
const FlxNetworkComPara_Un_Register byte = 0x34
|
||||
|
||||
/// <summary> 补报子指令 </summary>
|
||||
const FlxNetworkComPara_CheckIn_Sub_Signed byte = 0x00
|
||||
|
||||
/// <summary> 销报子指令 </summary>
|
||||
const FlxNetworkComPara_CheckIn_Sub_Cancel byte = 0x01
|
||||
|
||||
/// <summary> 终端反馈补报成功子指令 </summary>
|
||||
const FlxNetworkComPara_CheckIn_Suc_Signed byte = 0x02
|
||||
|
||||
/// <summary> 终端反馈销报成功子指令 </summary>
|
||||
const FlxNetworkComPara_CheckIn_Suc_Cancel byte = 0x03
|
||||
|
||||
/// <summary> 报到门终端反馈补报成功子指令 </summary>
|
||||
const FlxNetworkComPara_DoorCheckIn_Suc_Signed byte = 0x04
|
||||
|
||||
/// <summary> 报到门终端反馈销报成功子指令 </summary>
|
||||
const FlxNetworkComPara_DoorCheckIn_Suc_Cancel byte = 0x05
|
||||
|
||||
/// <summary> 报到门终端反馈销报成功子指令 </summary>
|
||||
const FlxNetworkComPara_CheckIn_Count_Change byte = 0x06
|
||||
|
||||
/// <summary> 报到结束后提示信息 </summary>
|
||||
const FlxNetworkComPara_CheckIn_AfterReport_Tip byte = 0x07
|
||||
|
||||
/// <summary>会议状态</summary>
|
||||
const FlxNetworkComPara_Server_Congress_Status byte = 0x35
|
||||
|
||||
/// <summary> 终端获取会议状态 </summary>
|
||||
const FlxNetworkComPara_Client_ReqStatus byte = 0x00
|
||||
|
||||
/// <summary> 上位机返回会议状态 </summary>
|
||||
const FlxNetworkComPara_Server_RetStatus byte = 0x01
|
||||
|
||||
/// <summary> 上位机返回会议ID </summary>
|
||||
const FlxNetworkComPara_Server_AgendaMsg byte = 0x02
|
||||
|
||||
/// <summary> 获取终端软报到软表决状态 </summary>
|
||||
const FlxNetworkComPara_Client_SoftStatus byte = 0x03
|
||||
|
||||
/// <summary> 返回终端软报到软表决状态 </summary>
|
||||
const FlxNetworkComPara_Server_RetSoftStatus byte = 0x04
|
||||
|
||||
/// <summary>终端发言界面切换控制0x60</summary>
|
||||
const FlxNetworkComPara_Cmd_Speech_UIControl byte = 0x60 //终端发言界面控制
|
||||
const FlxNetworkComPara_Cmd_Speech_UIControl_Show byte = 0x00 //终端发言界面控制--开启
|
||||
const FlxNetworkComPara_Cmd_Speech_UIControl_Close byte = 0x01 //终端发言界面控制--关闭--显示发言结果
|
||||
/// <summary>更新发言人列表0x61</summary>
|
||||
const FlxNetworkComPara_Cmd_Speech_UpdateList byte = 0x61 //更新发言人列表
|
||||
/// <summary>发言倒计时0x62</summary>
|
||||
const FlxNetworkComPara_Cmd_SpeechCountDown byte = 0x62
|
||||
const FlxNetworkComPara_Cmd_SpeechCountDown_Start byte = 0x00
|
||||
const FlxNetworkComPara_Cmd_SpeechCountDown_Pause byte = 0x01
|
||||
const FlxNetworkComPara_Cmd_SpeechCountDown_Continue byte = 0x02
|
||||
const FlxNetworkComPara_Cmd_SpeechCountDown_Stop byte = 0x03
|
||||
|
||||
/// <summary>申请发言0x63</summary>
|
||||
const FlxNetworkComPara_Cmd_Speech_Apply byte = 0x63
|
||||
const FlxNetworkComPara_Cmd_Speech_Apply_Request byte = 0x00 //申请发言--申请
|
||||
const FlxNetworkComPara_Cmd_Speech_Apply_Cancel byte = 0x01 //申请发言--取消
|
||||
const FlxNetworkComPara_Cmd_Speech_Apply_Allow byte = 0x02 //申请发言--许可
|
||||
const FlxNetworkComPara_Cmd_Speech_Apply_Reject byte = 0x03 //申请发言--关闭
|
||||
const FlxNetworkComPara_Cmd_Speech_Apply_List byte = 0x04 //发言人列表
|
||||
const FlxNetworkComPara_Cmd_Speech_Apply_SpeakStart byte = 0x05 //打开话筒
|
||||
const FlxNetworkComPara_Cmd_Speech_Apply_SpeakEnd byte = 0x06 //关闭话筒
|
||||
const FlxNetworkComPara_Cmd_Speech_Close_Mic byte = 0x07 //取消发言按键
|
||||
const FlxNetworkComPara_Cmd_Speech_Open_Mic byte = 0x08 //打开话筒
|
||||
const FlxNetworkComPara_Cmd_Speech_Open_Mic_Sucssed byte = 0x09 //打开话筒成功反馈
|
||||
const FlxNetworkComPara_Cmd_Speech_TurnOff_Mic byte = 0x0A //关闭话筒
|
||||
const FlxNetworkComPara_Cmd_Speech_TurnOff_Mic_Sucssed byte = 0x0B //关闭话筒成功反馈
|
||||
/// <summary> 专题询问</summary>
|
||||
const FlxNetworkComPara_Cmd_Moderator_Ask byte = 0x64
|
||||
const FlxNetworkComPara_Cmd_Moderator_Ask_List byte = 0x00 //专题询问列表
|
||||
const FlxNetworkComPara_Cmd_Moderator_Ask_End byte = 0x01 //结束专题询问
|
||||
const FlxNetworkComPara_Cmd_Moderator_Ask_Type byte = 0x02 //专题询问所处阶段
|
||||
|
||||
/// <summary>客户端在线信息指令</summary>
|
||||
const FlxNetworkComPara_Client_State byte = 0x72
|
||||
|
||||
/// <summary>客户端上线指令</summary>
|
||||
const FlxNetworkComPara_Client_State_Online byte = 0x00
|
||||
|
||||
/// <summary>客户端下线指令</summary>
|
||||
const FlxNetworkComPara_Client_State_Outline byte = 0x01
|
||||
|
||||
/// <summary>
|
||||
/// 获取发言列表
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_Request_Speak_List byte = 0x02
|
||||
|
||||
/// <summary>
|
||||
/// 返回发言列表
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_Return_Speak_List byte = 0x03
|
||||
|
||||
/// <summary>
|
||||
/// 获取申请客户端申请发言列表
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_Request_ApplySpeak_List byte = 0x04
|
||||
|
||||
/// <summary>
|
||||
/// 返回申请发言列表
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_Return_ApplySpeak_List byte = 0x05
|
||||
|
||||
/// <summary>
|
||||
/// 获取申请客户端在线列表
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_Request_Online_List byte = 0x06
|
||||
|
||||
/// <summary>
|
||||
/// 回复在线列表
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_Return_Online_List byte = 0x07
|
||||
|
||||
/// <summary>
|
||||
/// 开启软表决
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_SoftVote_TrunOn byte = 0x08
|
||||
|
||||
/// <summary>
|
||||
/// 关闭软表决
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_SoftVote_TrunOff byte = 0x09
|
||||
|
||||
/// <summary>
|
||||
/// 刷新人员信息
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_ClientData_Refrush byte = 0x0A
|
||||
|
||||
/// <summary>
|
||||
/// 刷新坐席图信息
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_ClientSeat_Refrush byte = 0x0B
|
||||
|
||||
/// <summary>
|
||||
/// 刷新会务机信息
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_Confrence_Refrush byte = 0x0C
|
||||
|
||||
/// <summary>
|
||||
/// 开启软报道
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_SoftRegister_TrunOn byte = 0x0D
|
||||
|
||||
/// <summary>
|
||||
/// 关闭软报道
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_SoftRegister_TrunOff byte = 0x0E
|
||||
|
||||
/// <summary>
|
||||
/// 刷新会务机信息
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_CheckInDoor_Refrush byte = 0x0F
|
||||
|
||||
/// <summary>
|
||||
/// 开启席媒
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_XiMei_TrunOn byte = 0x11
|
||||
|
||||
/// <summary>
|
||||
/// 关闭席媒
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_XiMei_TrunOff byte = 0x12
|
||||
|
||||
/// <summary>
|
||||
/// 最小化
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_Client_Min byte = 0x13
|
||||
|
||||
/// <summary>
|
||||
/// 最大化
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_Client_Max byte = 0x14
|
||||
|
||||
/// <summary>
|
||||
/// 关闭浏览器
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_Client_EdgeClose byte = 0x15
|
||||
|
||||
/// <summary>
|
||||
/// 下发会议
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_Meeting byte = 0x71
|
||||
|
||||
/// <summary>开始会议</summary>
|
||||
const FlxNetworkComPara_Meeting_Start byte = 0x00
|
||||
|
||||
/// <summary>结束会议</summary>
|
||||
const FlxNetworkComPara_Meeting_Close byte = 0x01
|
||||
|
||||
/// <summary>终端回执</summary>
|
||||
const FlxNetworkComPara_Meeting_Start_ClientFeedback byte = 0x02
|
||||
|
||||
/// <summary>电子桌牌回执</summary>
|
||||
const FlxNetworkComPara_Meeting_Start_ClientDeskCard byte = 0x03
|
||||
|
||||
/// <summary>会务机回执</summary>
|
||||
const FlxNetworkComPara_Meeting_Start_ServiceFeedback byte = 0x04
|
||||
|
||||
/// <summary>备份机获取会议状态</summary>
|
||||
const FlxNetworkComPara_Meeting_Start_BackUpFeedback byte = 0x05
|
||||
|
||||
/// <summary>备份机回执</summary>
|
||||
const FlxNetworkComPara_Meeting_Start_BackUpReturn byte = 0x06
|
||||
|
||||
/// <summary>报道门回执</summary>
|
||||
const FlxNetworkComPara_Meeting_Start_CheckInDoorReturn byte = 0x07
|
||||
|
||||
/// <summary>用户名ID</summary>
|
||||
const FlxNetworkComPara_Meeting_Start_StaffIDReturn byte = 0x08
|
||||
|
||||
/// <summary>终端回执</summary>
|
||||
const FlxNetworkComPara_Meeting_Start_ClientOnline byte = 0x09
|
||||
|
||||
/// <summary>请求验证码</summary>
|
||||
const FlxNetworkComPara_Meeting_Start_AskCode byte = 0x0A
|
||||
|
||||
/// <summary>请求验证码</summary>
|
||||
const FlxNetworkComPara_Meeting_Start_AskCodeBack byte = 0x0B
|
||||
|
||||
/// <summary>请求验证码</summary>
|
||||
const FlxNetworkComPara_Meeting_BackUp_Restart byte = 0x0C
|
||||
|
||||
/// <summary>请求验证码</summary>
|
||||
const FlxNetworkComPara_Meeting_BackUp_Close byte = 0x0D
|
||||
|
||||
/// <summary>修改人员请假状态</summary>
|
||||
const FlxNetworkComPara_Meeting_PersonChange_Status byte = 0x0E
|
||||
|
||||
/// <summary>大屏切换</summary>
|
||||
const FlxNetworkComPara_Cmd_ScreenChange byte = 0xA6
|
||||
|
||||
/// <summary>大屏切换</summary>
|
||||
const FlxNetworkComPara_Cmd_Screen_Main byte = 0x00
|
||||
|
||||
/// <summary>同屏</summary>
|
||||
const FlxNetworkComPara_ShareScreen_Main byte = 0xA7 //同屏
|
||||
/// <summary>申请同屏(大屏和终端)</summary>
|
||||
const FlxNetworkComPara_ShareScreen_Start byte = 0x00 //申请同屏(大屏和终端)
|
||||
/// <summary>申请同屏回执 同意</summary>
|
||||
const FlxNetworkComPara_ShareScreen_Start_Response_Yes byte = 0x01 //申请同屏回执 同意
|
||||
/// <summary>申请同屏回执 不同意(已有其他终端正在同屏)</summary>
|
||||
const FlxNetworkComPara_ShareScreen_Start_Response_No byte = 0x02 //申请同屏回执 不同意(已有其他终端正在同屏)
|
||||
/// <summary>通知开始同屏</summary>
|
||||
const FlxNetworkComPara_ShareScreen_Change_Start byte = 0x03 //通知开始同屏
|
||||
/// <summary>通知停止同屏</summary>
|
||||
const FlxNetworkComPara_ShareScreen_Change_Stop byte = 0x04 //通知停止同屏
|
||||
/// <summary>申请结束同屏</summary>
|
||||
const FlxNetworkComPara_ShareScreen_Stop byte = 0x05 //申请结束同屏
|
||||
/// <summary>申请同屏(大屏)</summary>
|
||||
const FlxNetworkComPara_ShareScreen_Start_Screen byte = 0x06 //申请同屏(大屏)
|
||||
/// <summary>申请同屏(终端)</summary>
|
||||
const FlxNetworkComPara_ShareScreen_Start_Client byte = 0x07 //申请同屏(终端)
|
||||
|
||||
/// <summary>议题</summary>
|
||||
const FlxNetworkComPara_Main_Topic byte = 0x52
|
||||
|
||||
/// <summary>开始议题</summary>
|
||||
const FlxNetworkComPara_Main_Topic_Start byte = 0x00
|
||||
|
||||
/// <summary> 刷新客户端议题 </summary>
|
||||
const FlxNetworkComPara_Main_Topic_Refresh byte = 0x01
|
||||
|
||||
/// <summary> 发送议题是否召开信息 </summary>
|
||||
const FlxNetworkComPara_Main_Topic_Convene byte = 0x02
|
||||
|
||||
/// <summary>结束当前议题</summary>
|
||||
const FlxNetworkComPara_Main_Topic_End byte = 0x5A
|
||||
|
||||
/// <summary>
|
||||
/// 主持人模式指令
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_Main_Moderator byte = 0x56
|
||||
|
||||
/// <summary>
|
||||
/// 开始议题
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_Main_Moderator_Topic_Start byte = 0x00
|
||||
|
||||
/// <summary>
|
||||
/// 结束议题
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_Main_Moderator_Topic_End byte = 0x01
|
||||
|
||||
/// <summary>
|
||||
/// 开始表决
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_Main_Moderator_Vote_Start byte = 0x02
|
||||
|
||||
/// <summary>
|
||||
/// 结束表决
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_Main_Moderator_Vote_End byte = 0x03
|
||||
|
||||
/// <summary>
|
||||
/// 开始发言
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_Main_Moderator_Speak_Start byte = 0x04
|
||||
|
||||
/// <summary>
|
||||
/// 结束发言
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_Main_Moderator_Speak_End byte = 0x05
|
||||
|
||||
/// <summary>
|
||||
/// 开始报告
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_Main_Moderator_Report_Start byte = 0x06
|
||||
|
||||
/// <summary>
|
||||
/// 结束报告
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_Main_Moderator_Report_End byte = 0x07
|
||||
|
||||
/// <summary>
|
||||
/// 开始选举
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_Main_Moderator_Election_Start byte = 0x08
|
||||
|
||||
/// <summary>
|
||||
/// 结束选举
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_Main_Moderator_Election_End byte = 0x09
|
||||
|
||||
/// <summary>
|
||||
/// 开始测评
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_Main_Moderator_Evaluation_Start byte = 0x0A
|
||||
|
||||
/// <summary>
|
||||
/// 结束测评
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_Main_Moderator_Evaluation_End byte = 0x0B
|
||||
|
||||
/// <summary>
|
||||
/// 开始专题询问
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_Main_Moderator_Asked_Start byte = 0x0C
|
||||
|
||||
/// <summary>
|
||||
/// 结束专题询问
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_Main_Moderator_Asked_End byte = 0x0D
|
||||
|
||||
//议题附件相关
|
||||
const FlxNetworkComPara_Congress_File byte = 0x73 //会议附件
|
||||
const FlxNetworkComPara_Congress_File_Down_Success byte = 0x00 //下载成功
|
||||
const FlxNetworkComPara_Congress_File_Down_Cancle byte = 0x01 //下载失败
|
||||
|
||||
//清除会议文件
|
||||
const FlxNetworkComPara_Meeting_File_Clear byte = 0x84 //删除文件指令
|
||||
const FlxNetworkComPara_Meeting_File_Sub_ClearAll byte = 0x06 //删除所有文件子指令
|
||||
|
||||
/// <summary>开始表决</summary>
|
||||
const FlxNetworkComPara_Main_Start_Vote byte = 0x53
|
||||
|
||||
/// <summary>停止表决</summary>
|
||||
const FlxNetworkComPara_Main_Stop_Vote byte = 0x55
|
||||
|
||||
/// <summary>表决</summary>
|
||||
const FlxNetworkComPara_Return_Vote byte = 0x54
|
||||
|
||||
/// <summary>表决1</summary>
|
||||
const FlxNetworkComPara_Return_VoteA byte = 0x01
|
||||
|
||||
/// <summary>表决2</summary>
|
||||
const FlxNetworkComPara_Return_VoteB byte = 0x02
|
||||
|
||||
/// <summary>表决3</summary>
|
||||
const FlxNetworkComPara_Return_VoteC byte = 0x03
|
||||
|
||||
/// <summary>表决4</summary>
|
||||
const FlxNetworkComPara_Return_VoteD byte = 0x04
|
||||
|
||||
/// <summary>表决5</summary>
|
||||
const FlxNetworkComPara_Return_VoteE byte = 0x05
|
||||
|
||||
/// <summary>表决结果</summary>
|
||||
const FlxNetworkComPara_Main_Vote_Result byte = 0x59
|
||||
|
||||
/// <summary>
|
||||
/// 发送表决按键结果
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_Vote_Result_Num byte = 0x00
|
||||
|
||||
/// <summary>
|
||||
/// 发送未按键人名
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_Vote_Result_Per byte = 0x01
|
||||
|
||||
/// <summary>
|
||||
/// 多项表决切换子议题
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_Vote_ChildTopic_Num byte = 0x02
|
||||
|
||||
/// <summary>
|
||||
/// 多项表决子议题数据
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_Vote_ChildTopic_DataPercent byte = 0x03
|
||||
|
||||
/// <summary>表决结果</summary>
|
||||
const FlxNetworkComPara_Main_Vote_End byte = 0x65
|
||||
|
||||
/// 呼叫服务指令
|
||||
const FlxNetworkComPara_CMD_CallService_Main byte = 0x27
|
||||
|
||||
/// 呼叫服务请求子指令
|
||||
const FlxNetworkComPara_CMD_CallService_Sub_Request byte = 0x00
|
||||
|
||||
///呼叫服务客户端取消子指令
|
||||
const FlxNetworkComPara_CMD_CallService_Sub_ClientCancel byte = 0x01
|
||||
|
||||
/// 呼叫服务取消子指令
|
||||
const FlxNetworkComPara_CMD_CallService_Sub_ServerCancel byte = 0x02
|
||||
|
||||
/// 呼叫服务响应子指令
|
||||
const FlxNetworkComPara_CMD_CallService_Sub_Correspond byte = 0x03
|
||||
|
||||
/// 呼叫服务禁止子指令(无用)
|
||||
const FlxNetworkComPara_CMD_CallService_Sub_NoService byte = 0x04
|
||||
|
||||
/// 呼叫服务允许子指令(无用)
|
||||
const FlxNetworkComPara_CMD_CallService_Sub_Enabled byte = 0x05
|
||||
|
||||
/// 刷新呼叫服务状态(无用)
|
||||
const FlxNetworkComPara_CMD_CallService_Sub_Refresh byte = 0x06
|
||||
|
||||
/// 呼叫服务启动
|
||||
const FlxNetworkComPara_CMD_CallService_Sub_Start byte = 0x07
|
||||
|
||||
/// 呼叫服务结束
|
||||
const FlxNetworkComPara_CMD_CallService_Sub_Stop byte = 0x08
|
||||
|
||||
///会务机呼叫服务链接指令
|
||||
const FlxNetworkComPara_CMD_CallService_Sub_ConferenceCon byte = 0x09
|
||||
|
||||
///会务及在线指令
|
||||
const FlxNetworkComPara_CMD_CallService_Sub_ConferenceOnLine byte = 0x10
|
||||
|
||||
/// 呼叫服务取消子指令
|
||||
const FlxNetworkComPara_CMD_CallService_Sub_Conference_ServerCancel byte = 0x11
|
||||
|
||||
/// 呼叫服务响应子指令
|
||||
const FlxNetworkComPara_CMD_CallService_Sub_Conference_Correspond byte = 0x12
|
||||
|
||||
/// 显示无纸化议程
|
||||
const FlxNetworkComPara_CMD_CallService_Sub_Agenda_Show byte = 0x13
|
||||
|
||||
/// 隐藏无纸化议程
|
||||
const FlxNetworkComPara_CMD_CallService_Sub_Agenda_Hide byte = 0x14
|
||||
|
||||
///会务机更新参会人员状态
|
||||
const FlxNetworkComPara_CMD_CallService_Sub_AgendaPerson byte = 0x15
|
||||
|
||||
/// <summary>短消息</summary>
|
||||
const FlxNetworkComPara_CMD_ShortMessage_Main byte = 0x80
|
||||
|
||||
const FlxNetworkComPara_CMD_ShortMessage_Sub_Show byte = 0x00 //上位机命令终端显示子指令
|
||||
const FlxNetworkComPara_CMD_ShortMessage_Sub_Close byte = 0x01 //上位机命令终端关闭显示子指令
|
||||
/// <summary>短消息子指令: 终端发送短消息/上位机收到短消息</summary>
|
||||
const FlxNetworkComPara_CMD_ShortMessage_Sub_Return_Message byte = 0x02
|
||||
|
||||
const FlxNetworkComPara_CMD_ShortMessage_Sub_RequestStuff byte = 0x03 //终端请求在线人员列表
|
||||
const FlxNetworkComPara_CMD_ShortMessage_Sub_ResponseStuff byte = 0x04 //控制端下发在线人员列表
|
||||
const FlxNetworkComPara_CMD_ShortMessage_Sub_Message byte = 0x05 //发送消息
|
||||
|
||||
const FlxNetworkComPara_CMD_ShortMessage_Sub_SendMsg byte = 0x06 //发送即时消息
|
||||
const FlxNetworkComPara_CMD_ShortMessage_Sub_ReceiveMsg byte = 0x07 //接收即时消息
|
||||
const FlxNetworkComPara_CMD_ShortMessage_Sub_NotifyMsg byte = 0x08 //无纸化发送通知
|
||||
|
||||
const FlxNetworkComPara_CMD_ShortMessage_Sub_SendConferenceMsg byte = 0x09 //发送给会务机的消息
|
||||
const FlxNetworkComPara_CMD_ShortMessage_Sub_ReceiveConferenceMsg byte = 0x0A //会务机回复的消息
|
||||
|
||||
const FlxNetworkComPara_CMD_SynchOperation_Main byte = 0x90 //同步操作指令
|
||||
|
||||
const FlxNetworkComPara_CMD_WhiteBoardSynch_Sub_UnlockScreen byte = 0x00 //开始同步不锁屏
|
||||
const FlxNetworkComPara_CMD_WhiteBoardSynch_Sub_LockScreen byte = 0x01 //开始同步并锁屏
|
||||
const FlxNetworkComPara_CMD_WhiteBoardSynch_Sub_Handwriting byte = 0x02 //同步笔迹
|
||||
const FlxNetworkComPara_CMD_WhiteBoardSynch_Sub_Remove byte = 0x03 //撤销
|
||||
const FlxNetworkComPara_CMD_WhiteBoardSynch_Sub_Unremove byte = 0x04 //恢复
|
||||
const FlxNetworkComPara_CMD_WhiteBoardSynch_Sub_Clear byte = 0x05 //清空
|
||||
const FlxNetworkComPara_CMD_WhiteBoardSynch_Sub_TurnPage byte = 0x06 //翻页
|
||||
|
||||
const FlxNetworkComPara_CMD_FileSynch_Sub_Start byte = 0x10 //开始文件同步
|
||||
const FlxNetworkComPara_CMD_FileSynch_Sub_ReviseStart byte = 0x11 //开始同步批注
|
||||
const FlxNetworkComPara_CMD_FileSynch_Sub_Revise byte = 0x12 //同步批注笔迹
|
||||
const FlxNetworkComPara_CMD_FileSynch_Sub_ReviseRemove byte = 0x13 //同步删除批注笔迹
|
||||
const FlxNetworkComPara_CMD_FileSynch_Sub_ReviseStop byte = 0x14 //停止同步批注
|
||||
const FlxNetworkComPara_CMD_FileSynch_Sub_TurnPage byte = 0x15 //翻页同步
|
||||
const FlxNetworkComPara_CMD_FileSynch_Sub_Play byte = 0x16 //播放(适用于视频)
|
||||
const FlxNetworkComPara_CMD_FileSynch_Sub_Pause byte = 0x17 //暂停(适用于视频)
|
||||
const FlxNetworkComPara_CMD_FileSynch_Sub_Progress byte = 0x18 //进度条拖动同步
|
||||
const FlxNetworkComPara_CMD_FileSynch_Sub_FollowRequest byte = 0x19 //文件同步跟随请求
|
||||
|
||||
const FlxNetworkComPara_CMD_SynchOperation_Sub_Stop byte = 0x29 //停止同步
|
||||
|
||||
/// <summary>设备连接状态字指令</summary>
|
||||
const FlxNetworkComPara_Dev_Link byte = 0x26
|
||||
const FlxNetworkComPara_Dev_Link_ON byte = 0x01
|
||||
const FlxNetworkComPara_Dev_Link_OFF byte = 0x02
|
||||
|
||||
/// <summary>自由就座报到人员状态</summary>
|
||||
const FlxNetworkComPara_Main_State_FreeSeat byte = 0x37
|
||||
|
||||
/// <summary>
|
||||
/// 终端IP管理
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_CMD_TerminalIP_Main byte = 0x16
|
||||
|
||||
/// <summary>
|
||||
/// 终端显示IP地址
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_CMD_TerminalIP_Sub_Show byte = 0x00
|
||||
|
||||
/// <summary>
|
||||
/// 终端询问自身IP地址
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_CMD_TerminalIP_Sub_Request byte = 0x01
|
||||
|
||||
/// <summary>
|
||||
/// 服务器下发终端IP地址
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_CMD_TerminalIP_Sub_Anwser byte = 0x02
|
||||
|
||||
/// <summary>
|
||||
/// 热备控制管理
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_CMD_HostControl byte = 0x95
|
||||
|
||||
/// <summary>
|
||||
/// 切换到主机
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_CMD_ChangeToHost byte = 0x00 /// <summary>
|
||||
/// 切换到备机
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_CMD_ChangeToBack byte = 0x01
|
||||
|
||||
const FlxNetworkComPara_CMD_Role_Main byte = 0x2A //角色设置
|
||||
const FlxNetworkComPara_CMD_Role_Sub_Reset byte = 0x00 //重置会议角色
|
||||
const FlxNetworkComPara_CMD_Role_Sub_Scan byte = 0x01 //扫描会议角色
|
||||
const FlxNetworkComPara_CMD_Role_Sub_Set byte = 0x02 //设置会议角色
|
||||
const FlxNetworkComPara_CMD_Role_Sub_Cancel byte = 0x03 //取消会议角色
|
||||
|
||||
/// <summary>
|
||||
/// 投影
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_CMD_ProjectionControl_Main byte = 0x92
|
||||
const FlxNetworkComPara_CMD_ProjectionControl_Sub_Valid byte = 0x00 //投影准备状态
|
||||
const FlxNetworkComPara_CMD_ProjectionControl_Sub_Error byte = 0x01 //投影异常
|
||||
const FlxNetworkComPara_CMD_ProjectionControl_Sub_Start byte = 0x02 //开始投影
|
||||
const FlxNetworkComPara_CMD_ProjectionControl_Sub_TurnPage byte = 0x03 //翻页
|
||||
const FlxNetworkComPara_CMD_ProjectionControl_Sub_Stop byte = 0x04 //停止
|
||||
const FlxNetworkComPara_CMD_ProjectionControl_Sub_ForceStop byte = 0x05 //强制停止
|
||||
const FlxNetworkComPara_CMD_ProjectionControl_Sub_ClipDone byte = 0x06 //切片完成
|
||||
const FlxNetworkComPara_CMD_ProjectionControl_Sub_ClipData byte = 0x07 //lqh
|
||||
|
||||
/// <summary>
|
||||
/// 视频
|
||||
/// </summary>
|
||||
const FlxNetworkComPara_CMD_MediaControl_Main byte = 0x91
|
||||
const FlxNetworkComPara_CMD_MediaControl_Sub_Valid byte = 0x00 //视频准备状态
|
||||
const FlxNetworkComPara_CMD_MediaControl_Sub_Error byte = 0x01 //视频异常
|
||||
const FlxNetworkComPara_CMD_MediaControl_Sub_Start byte = 0x02 //视频投影
|
||||
const FlxNetworkComPara_CMD_MediaControl_Sub_Play byte = 0x03 //播放
|
||||
const FlxNetworkComPara_CMD_MediaControl_Sub_Stop byte = 0x04 //停止
|
||||
|
||||
/// <summary>终端同步图片</summary>
|
||||
const FlxNetworkComPara_State_Synchro byte = 0x36
|
||||
|
||||
/// <summary>同步图片子指令</summary>
|
||||
const FlxNetworkComPara_SynchroImage_01 byte = 0x01
|
||||
|
||||
/// <summary>表决,第一键值</summary>
|
||||
const FlxNetworkComPara_VOTEKey_1Value byte = 0x01
|
||||
|
||||
/// <summary>表决,第二键值</summary>
|
||||
const FlxNetworkComPara_VOTEKey_2Value byte = 0x02
|
||||
|
||||
/// <summary>表决,第三键值</summary>
|
||||
const FlxNetworkComPara_VOTEKey_3Value byte = 0x03
|
||||
|
||||
/// <summary>表决,第四键值</summary>
|
||||
const FlxNetworkComPara_VOTEKey_4Value byte = 0x04
|
||||
|
||||
/// <summary>表决,第五键值</summary>
|
||||
const FlxNetworkComPara_VOTEKey_5Value byte = 0x05
|
||||
|
||||
/// <summary>暂停表决</summary>
|
||||
const FlxNetworkComPara_Data_Pause_Vote byte = 0x02
|
||||
|
||||
/// <summary>继续表决</summary>
|
||||
const FlxNetworkComPara_Data_Resume_Vote byte = 0x03
|
||||
|
||||
/// <summary>PC机控制</summary>
|
||||
const FlxNetworkComPara_Data_Down_Control byte = 0x24
|
||||
|
||||
/// <summary>开关机子指令——关机</summary>
|
||||
const FlxNetworkComPara_Data_Down_ControlShutDown byte = 0x00
|
||||
|
||||
/// <summary>开关机子指令——重启</summary>
|
||||
const FlxNetworkComPara_Data_Down_ControlRestart byte = 0x01
|
||||
|
||||
//底部工具栏状态
|
||||
const FlxNetworkComPara_Data_Down_BarSub_Hide byte = 0x04 //隐藏
|
||||
const FlxNetworkComPara_Data_Down_BarSub_Show byte = 0x05 //显示
|
||||
//终端软件控制
|
||||
const FlxNetworkComPara_CMD_Control_RestartProgram byte = 0x06 //重启软件指令
|
||||
const FlxNetworkComPara_CMD_Control_ExitProgram byte = 0x07 //退出软件指令
|
||||
//终端文件
|
||||
const FlxNetworkComPara_CMD_Control_ClearClientFile byte = 0x08 //清理终端文件
|
||||
|
||||
/// <summary>PC机控制开关机</summary>
|
||||
const FlxNetworkComPara_Data_Terminal_Control byte = 0x1C
|
||||
|
||||
/// <summary>配置 </summary>
|
||||
const FlxNetworkComPara_Data_SubTerminal byte = 0x01
|
||||
|
||||
/// <summary>系统配置</summary>
|
||||
const FlxNetworkComPara_Data_SubTerminalSystem byte = 0x02
|
@ -0,0 +1,23 @@
|
||||
package Model
|
||||
|
||||
import "github.com/spf13/viper"
|
||||
|
||||
const (
|
||||
TDicNation_Id = "id" //民族id
|
||||
TDicNation_Nationname = "nationname" //民族名称
|
||||
TDicNation_Nationvalue = "nationvalue" //民族key
|
||||
)
|
||||
|
||||
type TDicNation struct {
|
||||
Id string `gorm:"column:id;primary_key" json:"id"` //民族id
|
||||
Nationname string `gorm:"column:nationname" json:"nationname"` //民族名称
|
||||
Nationvalue int64 `gorm:"column:nationvalue" json:"nationvalue"` //民族key
|
||||
}
|
||||
|
||||
func (TDicNation) TableName() string {
|
||||
tableName := "t_dic_nation"
|
||||
if viper.GetString("database.dbtype") == "kingbase" || viper.GetString("database.dbtype") == "postgres" {
|
||||
return viper.GetString("database.dbnames") + "." + tableName
|
||||
}
|
||||
return tableName
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package Model
|
||||
|
||||
import "github.com/spf13/viper"
|
||||
|
||||
const (
|
||||
TDictionary_Id = "id" //字典id
|
||||
TDictionary_Dic_sort = "dic_sort" //字典分类
|
||||
TDictionary_Dic_name = "dic_name" //字典名称
|
||||
TDictionary_Dic_parentid = "dic_parentid" //字典父级id
|
||||
TDictionary_Dic_serial = "dic_serial" //排序
|
||||
TDictionary_Dic_describe = "dic_describe" //基础描述
|
||||
)
|
||||
|
||||
type TDictionary struct {
|
||||
Id string `gorm:"column:id;primary_key" json:"id"` //字典id
|
||||
Dic_sort string `gorm:"column:dic_sort" json:"dic_sort"` //字典分类
|
||||
Dic_name string `gorm:"column:dic_name" json:"dic_name"` //字典名称
|
||||
Dic_parentid string `gorm:"column:dic_parentid" json:"dic_parentid"` //字典父级id
|
||||
Dic_serial int64 `gorm:"column:dic_serial" json:"dic_serial"` //排序
|
||||
Dic_describe string `gorm:"column:dic_describe" json:"dic_describe"` //基础描述
|
||||
}
|
||||
|
||||
func (TDictionary) TableName() string {
|
||||
tableName := "t_dictionary"
|
||||
if viper.GetString("database.dbtype") == "kingbase" || viper.GetString("database.dbtype") == "postgres" {
|
||||
return viper.GetString("database.dbnames") + "." + tableName
|
||||
}
|
||||
return tableName
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package Model
|
||||
|
||||
/**
|
||||
|
||||
* 屏幕信息类的描述
|
||||
|
||||
* @author miSter
|
||||
|
||||
* @email hdfs010@163.com
|
||||
|
||||
* @date no data
|
||||
|
||||
* @link <a href=http://www.philisense.com>北京飞利信电子技术有限公司</a>
|
||||
|
||||
*/
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
const (
|
||||
TScreen_Id = "id" //屏幕id
|
||||
TScreen_Scr_sortid = "scr_sortid" //屏幕分类id 和屏幕窗体分类相同
|
||||
TScreen_Scr_name = "scr_name" //屏幕名称
|
||||
TScreen_Scr_describe = "scr_describe" //屏幕描述
|
||||
TScreen_Scr_width = "scr_width" //屏幕宽
|
||||
TScreen_Scr_height = "scr_height" //屏幕高
|
||||
TScreen_Scr_xpoint = "scr_xpoint" //屏幕x坐标
|
||||
TScreen_Scr_ypoint = "scr_ypoint" //屏幕y坐标
|
||||
TScreen_Scr_isenabled = "scr_isenabled" //是否显示 0不显示 1显示
|
||||
TScreen_Scr_serial = "scr_serial" //排序编号
|
||||
TScreen_Scr_createtime = "scr_createtime" //创建时间
|
||||
TScreen_Scr_updatetime = "scr_updatetime" //修改时间
|
||||
TScreen_Scr_bgcolor = "scr_bgcolor" //scr_bgcolor
|
||||
)
|
||||
|
||||
type TScreen struct {
|
||||
Id string `gorm:"column:id;primary_key" json:"id"` //屏幕id
|
||||
Scr_sortid int64 `gorm:"column:scr_sortid" json:"scr_sortid"` //屏幕分类id 和屏幕窗体分类相同(1111大屏 2222委员屏 3333列席屏 4444主持人 5555报到门)
|
||||
Scr_name string `gorm:"column:scr_name" json:"scr_name"` //屏幕名称
|
||||
Scr_describe string `gorm:"column:scr_describe" json:"scr_describe"` //屏幕描述
|
||||
Scr_width int64 `gorm:"column:scr_width" json:"scr_width"` //屏幕宽
|
||||
Scr_height int64 `gorm:"column:scr_height" json:"scr_height"` //屏幕高
|
||||
Scr_xpoint int64 `gorm:"column:scr_xpoint" json:"scr_xpoint"` //屏幕x坐标
|
||||
Scr_ypoint int64 `gorm:"column:scr_ypoint" json:"scr_ypoint"` //屏幕y坐标
|
||||
Scr_isenabled int64 `gorm:"column:scr_isenabled" json:"scr_isenabled"` //是否显示 0不显示 1显示
|
||||
Scr_serial int64 `gorm:"column:scr_serial" json:"scr_serial"` //排序编号
|
||||
Scr_createtime time.Time `gorm:"column:scr_createtime" json:"scr_createtime"` //创建时间
|
||||
Scr_updatetime time.Time `gorm:"column:scr_updatetime" json:"scr_updatetime"` //修改时间
|
||||
Scr_bgcolor string `gorm:"column:scr_bgcolor" json:"scr_bgcolor"` //scr_bgcolor
|
||||
}
|
||||
|
||||
func (TScreen) TableName() string {
|
||||
tableName := "t_screen"
|
||||
if viper.GetString("database.dbtype") == "kingbase" || viper.GetString("database.dbtype") == "postgres" {
|
||||
return viper.GetString("database.dbnames") + "." + tableName
|
||||
}
|
||||
return tableName
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package Model
|
||||
|
||||
/**
|
||||
|
||||
* 大屏窗体信息类的描述
|
||||
|
||||
* @author miSter
|
||||
|
||||
* @email hdfs010@163.com
|
||||
|
||||
* @date no data
|
||||
|
||||
* @link <a href=http://www.philisense.com>北京飞利信电子技术有限公司</a>
|
||||
|
||||
*/
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
const (
|
||||
TScreenform_Id = "id" //窗体id
|
||||
TScreenform_Sf_screenid = "sf_screenid" //大屏 系统窗体id
|
||||
TScreenform_Sf_typeid = "sf_typeid" //投屏窗体类型id
|
||||
TScreenform_Sf_name = "sf_name" //投屏窗体名称
|
||||
TScreenform_Sf_describe = "sf_describe" //投屏窗体描述
|
||||
TScreenform_Sf_content = "sf_content" //投屏窗体内容
|
||||
TScreenform_Sf_width = "sf_width" //宽
|
||||
TScreenform_Sf_bgcolor = "sf_bgcolor" //窗体的背景色
|
||||
TScreenform_Sf_screenpath = "sf_screenpath" //窗体背景路径
|
||||
TScreenform_Sf_height = "sf_height" //高
|
||||
TScreenform_Sf_createtime = "sf_createtime" //创建时间
|
||||
TScreenform_Sf_updatetime = "sf_updatetime" //修改时间
|
||||
TScreenform_Sf_z = "sf_z" //缩放比
|
||||
TScreenform_Sf_serial = "sf_serial" //排序
|
||||
)
|
||||
|
||||
type TScreenform struct {
|
||||
Id string `gorm:"column:id;primary_key" json:"id"` //窗体id
|
||||
Sf_screenid string `gorm:"column:sf_screenid" json:"sf_screenid"` //大屏 系统窗体id
|
||||
Sf_typeid int64 `gorm:"column:sf_typeid" json:"sf_typeid"` //投屏窗体类型id 0大屏 1移动屏
|
||||
Sf_name string `gorm:"column:sf_name" json:"sf_name"` //投屏窗体名称
|
||||
Sf_describe string `gorm:"column:sf_describe" json:"sf_describe"` //投屏窗体描述
|
||||
Sf_content string `gorm:"column:sf_content" json:"sf_content"` //投屏窗体内容
|
||||
Sf_width int64 `gorm:"column:sf_width" json:"sf_width"` //宽
|
||||
Sf_bgcolor string `gorm:"column:sf_bgcolor" json:"sf_bgcolor"` //窗体的背景色
|
||||
Sf_screenpath string `gorm:"column:sf_screenpath" json:"sf_screenpath"` //窗体背景路径
|
||||
Sf_height int64 `gorm:"column:sf_height" json:"sf_height"` //高
|
||||
Sf_createtime time.Time `gorm:"column:sf_createtime" json:"sf_createtime"` //创建时间
|
||||
Sf_updatetime time.Time `gorm:"column:sf_updatetime" json:"sf_updatetime"` //修改时间
|
||||
Sf_z float64 `gorm:"column:sf_z" json:"sf_z"` //缩放比
|
||||
Sf_serial int64 `gorm:"column:sf_serial" json:"sf_serial"` //排序
|
||||
}
|
||||
|
||||
func (TScreenform) TableName() string {
|
||||
tableName := "t_screenform"
|
||||
if viper.GetString("database.dbtype") == "kingbase" || viper.GetString("database.dbtype") == "postgres" {
|
||||
return viper.GetString("database.dbnames") + "." + tableName
|
||||
}
|
||||
return tableName
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package Model
|
||||
|
||||
/**
|
||||
|
||||
* 大屏窗体事件类的描述
|
||||
|
||||
* @author miSter
|
||||
|
||||
* @email hdfs010@163.com
|
||||
|
||||
* @date no data
|
||||
|
||||
* @link <a href=http://www.philisense.com>北京飞利信电子技术有限公司</a>
|
||||
|
||||
*/
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
const (
|
||||
TScreenformevent_Id = "id" //事件id
|
||||
TScreenformevent_Sfe_screenid = "sfe_screenid" //屏幕id
|
||||
TScreenformevent_Sfe_sf_id = "sfe_sf_id" //大屏窗体id
|
||||
TScreenformevent_Sfe_name = "sfe_name" //事件名称
|
||||
TScreenformevent_Sfe_typename = "sfe_typename" //sfe_typename
|
||||
TScreenformevent_Sfe_describe = "sfe_describe" //事件描述
|
||||
TScreenformevent_Sfe_stoptime = "sfe_stoptime" //停留时间 单位 秒
|
||||
TScreenformevent_Sfe_nextformid = "sfe_nextformid" //跳转事件
|
||||
TScreenformevent_Sfe_createtime = "sfe_createtime" //创建时间
|
||||
TScreenformevent_Sfe_updatetime = "sfe_updatetime" //修改时间
|
||||
TScreenformevent_Sfe_backshow = "sfe_backshow" //返回按钮是否显示
|
||||
TScreenformevent_Sfe_jumpshow = "sfe_jumpshow" //是否强制跳转到界面
|
||||
TScreenformevent_Sfe_serial = "sfe_serial" //排序
|
||||
)
|
||||
|
||||
type TScreenformevent struct {
|
||||
Id string `gorm:"column:id;primary_key" json:"id"` //事件id
|
||||
Sfe_screenid string `gorm:"column:sfe_screenid" json:"sfe_screenid"` //屏幕id
|
||||
Sfe_sf_id string `gorm:"column:sfe_sf_id" json:"sfe_sf_id"` //大屏窗体id
|
||||
Sfe_name string `gorm:"column:sfe_name" json:"sfe_name"` //事件名称
|
||||
Sfe_typename string `gorm:"column:sfe_typename" json:"sfe_typename"` //sfe_typename
|
||||
Sfe_describe string `gorm:"column:sfe_describe" json:"sfe_describe"` //事件描述
|
||||
Sfe_stoptime int64 `gorm:"column:sfe_stoptime" json:"sfe_stoptime"` //停留时间 单位 秒
|
||||
Sfe_nextformid string `gorm:"column:sfe_nextformid" json:"sfe_nextformid"` //跳转事件
|
||||
Sfe_createtime time.Time `gorm:"column:sfe_createtime" json:"sfe_createtime"` //创建时间
|
||||
Sfe_updatetime time.Time `gorm:"column:sfe_updatetime" json:"sfe_updatetime"` //修改时间
|
||||
Sfe_backshow string `gorm:"column:sfe_backshow" json:"sfe_backshow"` //返回按钮是否显示
|
||||
Sfe_jumpshow string `gorm:"column:sfe_jumpshow" json:"sfe_jumpshow"` //是否强制跳转到界面
|
||||
Sfe_serial int64 `gorm:"column:sfe_serial" json:"sfe_serial"` //排序
|
||||
}
|
||||
|
||||
func (TScreenformevent) TableName() string {
|
||||
tableName := "t_screenformevent"
|
||||
if viper.GetString("database.dbtype") == "kingbase" || viper.GetString("database.dbtype") == "postgres" {
|
||||
return viper.GetString("database.dbnames") + "." + tableName
|
||||
}
|
||||
return tableName
|
||||
}
|
@ -0,0 +1,98 @@
|
||||
package Model
|
||||
|
||||
/**
|
||||
|
||||
* 发言记录类的描述
|
||||
|
||||
* @author miSter
|
||||
|
||||
* @email hdfs010@163.com
|
||||
|
||||
* @date no data
|
||||
|
||||
* @link <a href=http://www.philisense.com>北京飞利信电子技术有限公司</a>
|
||||
|
||||
*/
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
const (
|
||||
TSpeakrecord_Id = "id" //记录id
|
||||
TSpeakrecord_Sr_agendaid = "sr_agendaid" //议程id
|
||||
TSpeakrecord_Sr_agendastaffid = "sr_agendastaffid" //会议人员id
|
||||
TSpeakrecord_Sr_topicid = "sr_topicid" //议题id
|
||||
TSpeakrecord_Sr_applytime = "sr_applytime" //开始申请时间
|
||||
TSpeakrecord_Sr_starttime = "sr_starttime" //开始发言时间
|
||||
TSpeakrecord_Sr_endtime = "sr_endtime" //结束发言时间
|
||||
TSpeakrecord_Sr_aginspeak = "sr_aginspeak" //是否二次发言
|
||||
TSpeakrecord_Sr_createtime = "sr_createtime" //创建时间
|
||||
TSpeakrecord_Sr_remark = "sr_remark" //备注信息
|
||||
TSpeakrecord_Sr_seatid = "sr_seatid" //坐席id
|
||||
)
|
||||
|
||||
type TSpeakrecord struct {
|
||||
Id string `gorm:"column:id;primary_key" json:"id"` //记录id
|
||||
Sr_agendaid string `gorm:"column:sr_agendaid" json:"sr_agendaid"` //议程id
|
||||
Sr_agendastaffid string `gorm:"column:sr_agendastaffid" json:"sr_agendastaffid"` //会议人员id
|
||||
Sr_topicid string `gorm:"column:sr_topicid" json:"sr_topicid"` //议题id
|
||||
Sr_applytime time.Time `gorm:"column:sr_applytime" json:"sr_applytime"` //开始申请时间
|
||||
Sr_starttime time.Time `gorm:"column:sr_starttime" json:"sr_starttime"` //开始发言时间
|
||||
Sr_endtime time.Time `gorm:"column:sr_endtime" json:"sr_endtime"` //结束发言时间
|
||||
Sr_aginspeak int64 `gorm:"column:sr_aginspeak" json:"sr_aginspeak"` //是否二次发言
|
||||
Sr_createtime time.Time `gorm:"column:sr_createtime" json:"sr_createtime"` //创建时间
|
||||
Sr_remark string `gorm:"column:sr_remark" json:"sr_remark"` //备注信息
|
||||
Sr_seatid string `gorm:"column:sr_seatid" json:"sr_seatid"` //坐席id
|
||||
}
|
||||
|
||||
type AskPerson struct {
|
||||
//人员信息
|
||||
AgPerson *T_AgendaPerson
|
||||
|
||||
//是否是申请发言,显示打开话筒
|
||||
IsApplySpeak bool
|
||||
}
|
||||
|
||||
type SpeakingPerson struct {
|
||||
//人员信息
|
||||
AgPerson *T_AgendaPerson
|
||||
//人员姓名
|
||||
AgPName string
|
||||
//剩余发言时间
|
||||
AllowSpeakTime string
|
||||
//
|
||||
LimitSecend int
|
||||
//允许发言秒数
|
||||
SpeakSecond int
|
||||
//超时秒数
|
||||
OverTimeSecond int
|
||||
//是否限时
|
||||
ISLimit bool
|
||||
//是否在大屏上
|
||||
ShowOnScreen bool
|
||||
//发言次数
|
||||
SpeakTimes int
|
||||
//申请发言时间
|
||||
ApplyTime time.Time
|
||||
//开始发言时间
|
||||
SpeakStartTime time.Time
|
||||
//结束发言时间
|
||||
EndSpeakTime time.Time
|
||||
|
||||
OverTime time.Time
|
||||
|
||||
IsAllowStop bool
|
||||
IsOverStop bool
|
||||
|
||||
OnStopSpeaking func(SPerson *SpeakingPerson)
|
||||
}
|
||||
|
||||
func (TSpeakrecord) TableName() string {
|
||||
tableName := "t_speakrecord"
|
||||
if viper.GetString("database.dbtype") == "kingbase" || viper.GetString("database.dbtype") == "postgres" {
|
||||
return viper.GetString("database.dbnames") + "." + tableName
|
||||
}
|
||||
return tableName
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package Model
|
||||
|
||||
import "github.com/spf13/viper"
|
||||
|
||||
const (
|
||||
TStaffcategory_Id = "id" //id
|
||||
TStaffcategory_Ca_name = "ca_name" //类别名称
|
||||
TStaffcategory_Ca_num = "ca_num" //类别编号
|
||||
TStaffcategory_Ca_reportpower = "ca_reportpower" //报到权
|
||||
TStaffcategory_Ca_votepower = "ca_votepower" //表决权
|
||||
TStaffcategory_Ca_speakpower = "ca_speakpower" //发言权
|
||||
TStaffcategory_Ca_firstspeakpower = "ca_firstspeakpower" //优先发言权
|
||||
TStaffcategory_Ca_callpower = "ca_callpower" //呼叫权
|
||||
TStaffcategory_Ca_searchpower = "ca_searchpower" //查询权
|
||||
TStaffcategory_Ca_remarks = "ca_remarks" //备注
|
||||
TStaffcategory_Ca_serial = "ca_serial" //排序
|
||||
)
|
||||
|
||||
type TStaffcategory struct {
|
||||
Id string `gorm:"column:id;primary_key" json:"id"` //id
|
||||
Ca_name string `gorm:"column:ca_name" json:"ca_name"` //类别名称
|
||||
Ca_num string `gorm:"column:ca_num" json:"ca_num"` //类别编号
|
||||
Ca_reportpower int64 `gorm:"column:ca_reportpower" json:"ca_reportpower"` //报到权
|
||||
Ca_votepower int64 `gorm:"column:ca_votepower" json:"ca_votepower"` //表决权
|
||||
Ca_speakpower int64 `gorm:"column:ca_speakpower" json:"ca_speakpower"` //发言权
|
||||
Ca_firstspeakpower int64 `gorm:"column:ca_firstspeakpower" json:"ca_firstspeakpower"` //优先发言权
|
||||
Ca_callpower int64 `gorm:"column:ca_callpower" json:"ca_callpower"` //呼叫权
|
||||
Ca_searchpower int64 `gorm:"column:ca_searchpower" json:"ca_searchpower"` //查询权
|
||||
Ca_remarks string `gorm:"column:ca_remarks" json:"ca_remarks"` //备注
|
||||
Ca_serial int64 `gorm:"column:ca_serial" json:"ca_serial"` //排序
|
||||
}
|
||||
|
||||
func (TStaffcategory) TableName() string {
|
||||
tableName := "t_staffcategory"
|
||||
if viper.GetString("database.dbtype") == "kingbase" || viper.GetString("database.dbtype") == "postgres" {
|
||||
return viper.GetString("database.dbnames") + "." + tableName
|
||||
}
|
||||
return tableName
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package Model
|
||||
|
||||
import (
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
const (
|
||||
TStaffgroup_Id = "id" //主键
|
||||
TStaffgroup_Gr_name = "gr_name" //团组名称
|
||||
TStaffgroup_Gr_num = "gr_num" //团组编号
|
||||
TStaffgroup_Gr_remarks = "gr_remarks" //备注
|
||||
TStaffgroup_Gr_serial = "gr_serial" //排序
|
||||
)
|
||||
|
||||
type TStaffgroup struct {
|
||||
Id string `gorm:"column:id;primary_key" json:"id"` //主键
|
||||
Gr_name string `gorm:"column:gr_name" json:"gr_name"` //团组名称
|
||||
Gr_num string `gorm:"column:gr_num" json:"gr_num"` //团组编号
|
||||
Gr_remarks string `gorm:"column:gr_remarks" json:"gr_remarks"` //备注
|
||||
Gr_serial int64 `gorm:"column:gr_serial" json:"gr_serial"` //排序
|
||||
}
|
||||
|
||||
func (TStaffgroup) TableName() string {
|
||||
tableName := "t_staffgroup"
|
||||
if viper.GetString("database.dbtype") == "kingbase" || viper.GetString("database.dbtype") == "postgres" {
|
||||
return viper.GetString("database.dbnames") + "." + tableName
|
||||
}
|
||||
return tableName
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
package Model
|
||||
|
||||
/**
|
||||
|
||||
* t_sysset类的描述
|
||||
|
||||
* @author miSter
|
||||
|
||||
* @email hdfs010@163.com
|
||||
|
||||
* @date no data
|
||||
|
||||
* @link <a href=http://www.philisense.com>北京飞利信电子技术有限公司</a>
|
||||
|
||||
*/
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
const (
|
||||
TSysset_Id = "id" //id
|
||||
TSysset_Sys_key = "sys_key" //sys_key
|
||||
TSysset_Sys_title = "sys_title" //sys_title
|
||||
TSysset_Sys_type = "sys_type" //sys_type
|
||||
TSysset_Sys_value = "sys_value" //sys_value
|
||||
TSysset_Sys_pid = "sys_pid" //sys_pid
|
||||
TSysset_Sys_order = "sys_order" //sys_order
|
||||
TSysset_Sys_memo = "sys_memo" //sys_memo
|
||||
TSysset_Sys_creattime = "sys_creattime" //sys_creattime
|
||||
)
|
||||
|
||||
type TSysset struct {
|
||||
Id string `gorm:"column:id;primary_key" json:"id"` //id
|
||||
Sys_key string `gorm:"column:sys_key" json:"sys_key"` //sys_key
|
||||
Sys_title string `gorm:"column:sys_title" json:"sys_title"` //sys_title
|
||||
Sys_type string `gorm:"column:sys_type" json:"sys_type"` //sys_type
|
||||
Sys_value string `gorm:"column:sys_value" json:"sys_value"` //sys_value
|
||||
Sys_pid string `gorm:"column:sys_pid" json:"sys_pid"` //sys_pid
|
||||
Sys_order int64 `gorm:"column:sys_order" json:"sys_order"` //sys_order
|
||||
Sys_memo string `gorm:"column:sys_memo" json:"sys_memo"` //sys_memo
|
||||
Sys_creattime time.Time `gorm:"column:sys_creattime" json:"sys_creattime"` //sys_creattime
|
||||
}
|
||||
|
||||
func (TSysset) TableName() string {
|
||||
tableName := "t_sysset"
|
||||
if viper.GetString("database.dbtype") == "kingbase" || viper.GetString("database.dbtype") == "postgres" {
|
||||
return viper.GetString("database.dbnames") + "." + tableName
|
||||
}
|
||||
return tableName
|
||||
}
|
@ -0,0 +1,134 @@
|
||||
package Model
|
||||
|
||||
/**
|
||||
|
||||
* 议题及子议题类的描述
|
||||
|
||||
* @author miSter
|
||||
|
||||
* @email hdfs010@163.com
|
||||
|
||||
* @date no data
|
||||
|
||||
* @link <a href=http://www.philisense.com>北京飞利信电子技术有限公司</a>
|
||||
|
||||
*/
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
const (
|
||||
TTopic_Id = "id" //议题id
|
||||
TTopic_To_congressid = "to_congressid" //会议id
|
||||
TTopic_To_agendaid = "to_agendaid" //议程id
|
||||
TTopic_To_name = "to_name" //议题名称
|
||||
TTopic_To_content = "to_content" //议题内容
|
||||
TTopic_To_reporter = "to_reporter" //报告人
|
||||
TTopic_To_type = "to_type" //议题类型
|
||||
TTopic_To_votemethod = "to_votemethod" //表决方式 0 最后一次键盘有效的不公开表决1 第一次按键有效的不公开表决2最后一次键盘有效的公开表决3第一次按键有效的公开表决
|
||||
TTopic_To_votebasenum = "to_votebasenum" //表决基数
|
||||
TTopic_To_buttontype = "to_buttontype" //表决按键类型
|
||||
TTopic_To_votespecies = "to_votespecies" //表决种类
|
||||
TTopic_To_voteresult = "to_voteresult" //表决结果
|
||||
TTopic_To_passrate = "to_passrate" //通过比例标准
|
||||
TTopic_To_passbutton = "to_passbutton" //通过按键
|
||||
TTopic_To_speakmode = "to_speakmode" //发言模式
|
||||
TTopic_To_showmode = "to_showmode" //显示方式
|
||||
TTopic_To_image = "to_image" //幻灯片文件
|
||||
TTopic_To_shouldnum = "to_shouldnum" //应到人数
|
||||
TTopic_To_actualnum = "to_actualnum" //实到人数
|
||||
TTopic_To_buttononenum = "to_buttononenum" //按键1人数
|
||||
TTopic_To_buttononename = "to_buttononename" //按键1名称
|
||||
TTopic_To_buttontwonum = "to_buttontwonum" //按键2人数
|
||||
TTopic_To_buttontwoname = "to_buttontwoname" //按键2名称
|
||||
TTopic_To_buttonthreenum = "to_buttonthreenum" //按键3人数
|
||||
TTopic_To_buttonthreename = "to_buttonthreename" //按键3名称
|
||||
TTopic_To_buttonfournum = "to_buttonfournum" //按键4人数
|
||||
TTopic_To_buttonfourname = "to_buttonfourname" //按键4名称
|
||||
TTopic_To_buttonfivenum = "to_buttonfivenum" //按键5人数
|
||||
TTopic_To_buttonfivename = "to_buttonfivename" //按键5名称
|
||||
TTopic_To_buttonnotnum = "to_buttonnotnum" //未按人数
|
||||
TTopic_To_topicstarttime = "to_topicstarttime" //议题计划开始时间
|
||||
TTopic_To_topicendtime = "to_topicendtime" //议题计划结束时间
|
||||
TTopic_To_votestarttime = "to_votestarttime" //表决开始时间
|
||||
TTopic_To_voteendtime = "to_voteendtime" //表决结束时间
|
||||
TTopic_To_speakstarttime = "to_speakstarttime" //发言开始时间
|
||||
TTopic_To_speakendtime = "to_speakendtime" //发言结束时间
|
||||
TTopic_To_reportstarttime = "to_reportstarttime" //报到开始时间
|
||||
TTopic_To_reportendtime = "to_reportendtime" //报到结束时间
|
||||
TTopic_To_num = "to_num" //序号
|
||||
TTopic_To_createtime = "to_createtime" //创建时间
|
||||
TTopic_To_updatetime = "to_updatetime" //修改时间
|
||||
TTopic_To_remark = "to_remark" //备注
|
||||
TTopic_To_parentguid = "to_parentguid" //父级id
|
||||
TTopic_To_agendabgcolor = "to_agendabgcolor" //背景色
|
||||
TTopic_To_agendahtml = "to_agendahtml" //议程html
|
||||
TTopic_To_topiclower = "to_topiclower" //子议题
|
||||
TTopic_To_status = "to_status" //议题的状态
|
||||
TTopic_To_starttime = "to_starttime" //议题真正开始时间
|
||||
TTopic_To_endtime = "to_endtime" //议题真正结束时间
|
||||
)
|
||||
|
||||
type TTopic struct {
|
||||
Id string `gorm:"column:id;primary_key" json:"id"` //议题id
|
||||
To_congressid string `gorm:"column:to_congressid" json:"to_congressid"` //会议id
|
||||
To_agendaid string `gorm:"column:to_agendaid" json:"to_agendaid"` //议程id
|
||||
To_name string `gorm:"column:to_name" json:"to_name"` //议题名称
|
||||
To_content string `gorm:"column:to_content" json:"to_content"` //议题内容
|
||||
To_reporter string `gorm:"column:to_reporter" json:"to_reporter"` //报告人
|
||||
To_type int64 `gorm:"column:to_type" json:"to_type"` //议题类型
|
||||
To_votemethod int64 `gorm:"column:to_votemethod" json:"to_votemethod"` //表决方式 0 最后一次键盘有效的不公开表决1 第一次按键有效的不公开表决2最后一次键盘有效的公开表决3第一次按键有效的公开表决
|
||||
To_votebasenum int64 `gorm:"column:to_votebasenum" json:"to_votebasenum"` //表决基数
|
||||
To_buttontype int64 `gorm:"column:to_buttontype" json:"to_buttontype"` //表决按键类型
|
||||
To_votespecies int64 `gorm:"column:to_votespecies" json:"to_votespecies"` //表决种类
|
||||
To_voteresult int64 `gorm:"column:to_voteresult" json:"to_voteresult"` //表决结果
|
||||
To_passrate int64 `gorm:"column:to_passrate" json:"to_passrate"` //通过比例标准
|
||||
To_passbutton int64 `gorm:"column:to_passbutton" json:"to_passbutton"` //通过按键
|
||||
To_speakmode int64 `gorm:"column:to_speakmode" json:"to_speakmode"` //发言模式
|
||||
To_showmode int64 `gorm:"column:to_showmode" json:"to_showmode"` //显示方式
|
||||
To_image string `gorm:"column:to_image" json:"to_image"` //幻灯片文件
|
||||
To_shouldnum int64 `gorm:"column:to_shouldnum" json:"to_shouldnum"` //应到人数
|
||||
To_actualnum int64 `gorm:"column:to_actualnum" json:"to_actualnum"` //实到人数
|
||||
To_buttononenum int64 `gorm:"column:to_buttononenum" json:"to_buttononenum"` //按键1人数
|
||||
To_buttononename string `gorm:"column:to_buttononename" json:"to_buttononename"` //按键1名称
|
||||
To_buttontwonum int64 `gorm:"column:to_buttontwonum" json:"to_buttontwonum"` //按键2人数
|
||||
To_buttontwoname string `gorm:"column:to_buttontwoname" json:"to_buttontwoname"` //按键2名称
|
||||
To_buttonthreenum int64 `gorm:"column:to_buttonthreenum" json:"to_buttonthreenum"` //按键3人数
|
||||
To_buttonthreename string `gorm:"column:to_buttonthreename" json:"to_buttonthreename"` //按键3名称
|
||||
To_buttonfournum int64 `gorm:"column:to_buttonfournum" json:"to_buttonfournum"` //按键4人数
|
||||
To_buttonfourname string `gorm:"column:to_buttonfourname" json:"to_buttonfourname"` //按键4名称
|
||||
To_buttonfivenum int64 `gorm:"column:to_buttonfivenum" json:"to_buttonfivenum"` //按键5人数
|
||||
To_buttonfivename string `gorm:"column:to_buttonfivename" json:"to_buttonfivename"` //按键5名称
|
||||
To_buttonnotnum int64 `gorm:"column:to_buttonnotnum" json:"to_buttonnotnum"` //未按人数
|
||||
To_topicstarttime time.Time `gorm:"column:to_topicstarttime" json:"to_topicstarttime"` //议题计划开始时间
|
||||
To_topicendtime time.Time `gorm:"column:to_topicendtime" json:"to_topicendtime"` //议题计划结束时间
|
||||
To_votestarttime time.Time `gorm:"column:to_votestarttime" json:"to_votestarttime"` //表决开始时间
|
||||
To_voteendtime time.Time `gorm:"column:to_voteendtime" json:"to_voteendtime"` //表决结束时间
|
||||
To_speakstarttime time.Time `gorm:"column:to_speakstarttime" json:"to_speakstarttime"` //发言开始时间
|
||||
To_speakendtime time.Time `gorm:"column:to_speakendtime" json:"to_speakendtime"` //发言结束时间
|
||||
To_reportstarttime time.Time `gorm:"column:to_reportstarttime" json:"to_reportstarttime"` //报到开始时间
|
||||
To_reportendtime time.Time `gorm:"column:to_reportendtime" json:"to_reportendtime"` //报到结束时间
|
||||
To_num int64 `gorm:"column:to_num" json:"to_num"` //序号
|
||||
To_createtime time.Time `gorm:"column:to_createtime" json:"to_createtime"` //创建时间
|
||||
To_updatetime time.Time `gorm:"column:to_updatetime" json:"to_updatetime"` //修改时间
|
||||
To_remark string `gorm:"column:to_remark" json:"to_remark"` //备注
|
||||
To_parentguid string `gorm:"column:to_parentguid" json:"to_parentguid"` //父级id
|
||||
To_agendabgcolor string `gorm:"column:to_agendabgcolor" json:"to_agendabgcolor"` //背景色
|
||||
To_agendahtml string `gorm:"column:to_agendahtml" json:"to_agendahtml"` //议程html
|
||||
To_topiclower int64 `gorm:"column:to_topiclower" json:"to_topiclower"` //子议题
|
||||
To_status int64 `gorm:"column:to_status" json:"to_status"`
|
||||
To_voteresult_CH string `gorm:"column:to_voteresult_ch" json:"to_voteresult_ch"`
|
||||
To_starttime time.Time `gorm:"column:to_starttime" json:"to_starttime"` //议题真正开始时间
|
||||
To_endtime time.Time `gorm:"column:to_endtime" json:"to_endtime"` //议题真正结束时间
|
||||
// AllTopicFile []TCongressfile
|
||||
}
|
||||
|
||||
func (TTopic) TableName() string {
|
||||
tableName := "t_topic"
|
||||
if viper.GetString("database.dbtype") == "kingbase" || viper.GetString("database.dbtype") == "postgres" {
|
||||
return viper.GetString("database.dbnames") + "." + tableName
|
||||
}
|
||||
return tableName
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package Model
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"time"
|
||||
)
|
||||
|
||||
type T_Agenda struct {
|
||||
ID string
|
||||
Ag_CongressID string
|
||||
Ag_Name string
|
||||
Ag_RoomID string
|
||||
Ag_Content string
|
||||
Ag_StartTime time.Time
|
||||
Ag_EndTime time.Time
|
||||
Ag_Type string
|
||||
Ag_CheckInTime time.Time
|
||||
Ag_CheckOverTime time.Time
|
||||
Ag_Serial int
|
||||
Ag_SeatGraph string
|
||||
Ag_CheckInType string
|
||||
Ag_SeatType string
|
||||
Ag_CreateTime time.Time
|
||||
Ag_UpdateTime time.Time
|
||||
Ag_Status string
|
||||
Ag_Remark string
|
||||
AllTopic []string
|
||||
AllAgFile []string
|
||||
AllAgPerson []string
|
||||
}
|
||||
|
||||
type SQLT_Agenda struct {
|
||||
Ag_ID sql.NullString
|
||||
Ag_CongressID sql.NullString
|
||||
Ag_Name sql.NullString
|
||||
Ag_RoomID sql.NullString
|
||||
Ag_Content sql.NullString
|
||||
Ag_StartTime sql.NullTime
|
||||
Ag_EndTime sql.NullTime
|
||||
Ag_Type sql.NullString
|
||||
Ag_CheckInTime sql.NullTime
|
||||
Ag_CheckOverTime sql.NullTime
|
||||
Ag_Serial sql.NullInt32
|
||||
Ag_SeatGraph sql.NullString
|
||||
Ag_CheckInType sql.NullString
|
||||
Ag_SeatType sql.NullString
|
||||
Ag_CreateTime sql.NullTime
|
||||
Ag_UpdateTime sql.NullTime
|
||||
Ag_Status sql.NullString
|
||||
Ag_Remark sql.NullString
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package Model
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"time"
|
||||
)
|
||||
|
||||
type T_AgendaPerson struct {
|
||||
AP_ID string
|
||||
AP_AgendaID string
|
||||
AP_StaffID string
|
||||
AP_CardType int
|
||||
AP_CodeNum string
|
||||
AP_ReportPower int
|
||||
AP_VotePower int
|
||||
AP_SpeakPower int
|
||||
AP_FirstSpeakPower int
|
||||
AP_CallPower int
|
||||
AP_SearchPower int
|
||||
AP_Remark string
|
||||
AP_Xpoint int
|
||||
AP_Ypoint int
|
||||
AP_SeatArea string
|
||||
AP_CheckState int
|
||||
AP_SeatID string
|
||||
AP_CheckInTime time.Time
|
||||
AP_CheckOutTime time.Time
|
||||
AP_Status string
|
||||
AP_Moderator int
|
||||
AP_StaffInfo T_StaffInfo
|
||||
}
|
||||
|
||||
type SQLT_AgendaPerson struct {
|
||||
AP_ID sql.NullString
|
||||
AP_AgendaID sql.NullString
|
||||
AP_StaffID sql.NullString
|
||||
AP_CardType sql.NullInt32
|
||||
AP_CodeNum sql.NullString
|
||||
AP_ReportPower sql.NullInt32
|
||||
AP_VotePower sql.NullInt32
|
||||
AP_SpeakPower sql.NullInt32
|
||||
AP_FirstSpeakPower sql.NullInt32
|
||||
AP_CallPower sql.NullInt32
|
||||
AP_SearchPower sql.NullInt32
|
||||
AP_Remark sql.NullString
|
||||
AP_Xpoint sql.NullInt32
|
||||
AP_Ypoint sql.NullInt32
|
||||
AP_SeatArea sql.NullString
|
||||
AP_CheckState sql.NullInt32
|
||||
AP_SeatID sql.NullString
|
||||
AP_CheckInTime sql.NullTime
|
||||
AP_CheckOutTime sql.NullTime
|
||||
AP_Status sql.NullString
|
||||
AP_Moderator sql.NullInt32
|
||||
AP_StaffInfo SQLT_StaffInfo
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package Model
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"time"
|
||||
)
|
||||
|
||||
type T_Congress struct {
|
||||
ID string
|
||||
Co_TypeID string
|
||||
Co_Name string
|
||||
Co_Subject string
|
||||
Co_RoomID string
|
||||
Co_Status string
|
||||
Co_StartTime time.Time
|
||||
Co_EndTime time.Time
|
||||
Co_AheadTime int
|
||||
Co_CheckInStartTime time.Time
|
||||
Co_CheckInEndTime time.Time
|
||||
Co_CheckInType string
|
||||
Co_SeatMode string
|
||||
Co_AutoRun int
|
||||
Co_AutoClose int
|
||||
Co_UpdateTime time.Time
|
||||
Co_CreateTime time.Time
|
||||
Co_CreatorID string
|
||||
Co_HostUnit string
|
||||
Co_serial int
|
||||
Co_IsFile int
|
||||
}
|
||||
|
||||
type SQLT_Congress struct {
|
||||
Co_ID sql.NullString
|
||||
Co_TypeID sql.NullString
|
||||
Co_Name sql.NullString
|
||||
Co_Subject sql.NullString
|
||||
Co_RoomID sql.NullString
|
||||
Co_Status sql.NullString
|
||||
Co_StartTime sql.NullTime
|
||||
Co_EndTime sql.NullTime
|
||||
Co_AheadTime sql.NullInt32
|
||||
Co_CheckInStartTime sql.NullTime
|
||||
Co_CheckInEndTime sql.NullTime
|
||||
Co_CheckInType sql.NullString
|
||||
Co_SeatMode sql.NullString
|
||||
Co_AutoRun sql.NullInt32
|
||||
Co_AutoClose sql.NullInt32
|
||||
Co_UpdateTime sql.NullTime
|
||||
Co_CreateTime sql.NullTime
|
||||
Co_CreatorID sql.NullString
|
||||
Co_HostUnit sql.NullString
|
||||
Co_Serial sql.NullInt32
|
||||
Co_IsFile sql.NullInt32
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
package Model
|
||||
|
||||
type T_Dic_Nation struct {
|
||||
DN_NationID string
|
||||
DN_NationName string
|
||||
DN_NationValue int
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package Model
|
||||
|
||||
//字典表
|
||||
type T_Dictionary struct {
|
||||
Dic_ID string
|
||||
Dic_Sort string
|
||||
Dic_Name string
|
||||
Dic_ParentID string
|
||||
Dic_Serial int
|
||||
Dic_Describe string
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package Model
|
||||
import (
|
||||
"database/sql"
|
||||
// "time"
|
||||
)
|
||||
type T_Room struct {
|
||||
Rm_ID string
|
||||
Rm_Name string
|
||||
}
|
||||
|
||||
type SQLT_Room struct {
|
||||
Rm_ID sql.NullString
|
||||
Rm_Name sql.NullString
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package Model
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"time"
|
||||
// "time"
|
||||
)
|
||||
|
||||
type T_Screen struct {
|
||||
Scr_ID string `gorm:"column:id;primary_key" json:"id"` //屏幕ID
|
||||
Scr_SortID int64 `gorm:"column:scr_sortid" json:"scr_sortid"` //屏幕分类ID 和屏幕窗体分类相同
|
||||
Scr_Name string `gorm:"column:scr_name" json:"scr_name"` //屏幕名称
|
||||
Scr_Describe string `gorm:"column:scr_describe" json:"scr_describe"` //屏幕描述
|
||||
Scr_Width int64 `gorm:"column:scr_width" json:"scr_width"` //屏幕宽
|
||||
Scr_Height int64 `gorm:"column:scr_height" json:"scr_height"` //屏幕高
|
||||
Scr_Xpoint int64 `gorm:"column:scr_xpoint" json:"scr_xpoint"` //屏幕X坐标
|
||||
Scr_Ypoint int64 `gorm:"column:scr_ypoint" json:"scr_ypoint"` //屏幕Y坐标
|
||||
Scr_IsEnabled int64 `gorm:"column:scr_isenabled" json:"scr_isenabled"` //是否显示 0不显示 1显示
|
||||
Scr_Serial int64 `gorm:"column:scr_serial" json:"scr_serial"` //排序编号
|
||||
Scr_CreateTime time.Time `gorm:"column:scr_createtime" json:"scr_createtime"` //创建时间
|
||||
Scr_UpdateTime time.Time `gorm:"column:scr_updatetime" json:"scr_updatetime"` //修改时间
|
||||
Scr_Bgcolor string `gorm:"column:scr_bgcolor" json:"scr_bgcolor"` //Scr_Bgcolor
|
||||
}
|
||||
|
||||
type SQLT_Screen struct {
|
||||
Scr_ID sql.NullString `gorm:"column:id;primary_key" json:"id"` //屏幕ID
|
||||
Scr_SortID sql.NullInt64 `gorm:"column:scr_sortid" json:"scr_sortid"` //屏幕分类ID 和屏幕窗体分类相同
|
||||
Scr_Name sql.NullString `gorm:"column:scr_name" json:"scr_name"` //屏幕名称
|
||||
Scr_Describe sql.NullString `gorm:"column:scr_describe" json:"scr_describe"` //屏幕描述
|
||||
Scr_Width sql.NullInt64 `gorm:"column:scr_width" json:"scr_width"` //屏幕宽
|
||||
Scr_Height sql.NullInt64 `gorm:"column:scr_height" json:"scr_height"` //屏幕高
|
||||
Scr_Xpoint sql.NullInt64 `gorm:"column:scr_xpoint" json:"scr_xpoint"` //屏幕X坐标
|
||||
Scr_Ypoint sql.NullInt64 `gorm:"column:scr_ypoint" json:"scr_ypoint"` //屏幕Y坐标
|
||||
Scr_IsEnabled sql.NullInt64 `gorm:"column:scr_isenabled" json:"scr_isenabled"` //是否显示 0不显示 1显示
|
||||
Scr_Serial sql.NullInt64 `gorm:"column:scr_serial" json:"scr_serial"` //排序编号
|
||||
Scr_CreateTime sql.NullTime `gorm:"column:scr_createtime" json:"scr_createtime"` //创建时间
|
||||
Scr_UpdateTime sql.NullTime `gorm:"column:scr_updatetime" json:"scr_updatetime"` //修改时间
|
||||
Scr_Bgcolor sql.NullString `gorm:"column:scr_bgcolor" json:"scr_bgcolor"` //Scr_Bgcolor
|
||||
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package Model
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"time"
|
||||
)
|
||||
|
||||
type T_ScreenForm struct {
|
||||
SF_ID string `gorm:"column:id;primary_key" json:"id"` //窗体ID
|
||||
SF_ScreenID string `gorm:"column:sf_screenid" json:"sf_screenid"` //大屏 系统窗体ID
|
||||
SF_TypeID int64 `gorm:"column:sf_typeid" json:"sf_typeid"` //投屏窗体类型ID
|
||||
SF_Name string `gorm:"column:sf_name" json:"sf_name"` //投屏窗体名称
|
||||
SF_Describe string `gorm:"column:sf_describe" json:"sf_describe"` //投屏窗体描述
|
||||
SF_Content string `gorm:"column:sf_content" json:"sf_content"` //投屏窗体内容
|
||||
SF_Width int64 `gorm:"column:sf_width" json:"sf_width"` //宽
|
||||
SF_Bgcolor string `gorm:"column:sf_bgcolor" json:"sf_bgcolor"` //窗体的背景色
|
||||
SF_ScreenPath string `gorm:"column:sf_screenpath" json:"sf_screenpath"` //窗体背景路径
|
||||
SF_Height int64 `gorm:"column:sf_height" json:"sf_height"` //高
|
||||
SF_CreateTime time.Time `gorm:"column:sf_createtime" json:"sf_createtime"` //创建时间
|
||||
SF_UpdateTime time.Time `gorm:"column:sf_updatetime" json:"sf_updatetime"` //修改时间
|
||||
SF_Z float64 `gorm:"column:sf_z" json:"sf_z"`
|
||||
}
|
||||
|
||||
type SQLT_ScreenForm struct {
|
||||
SF_ID sql.NullString `gorm:"column:id;primary_key" json:"id"` //窗体ID
|
||||
SF_ScreenID sql.NullString `gorm:"column:sf_screenid" json:"sf_screenid"` //大屏 系统窗体ID
|
||||
SF_TypeID sql.NullInt64 `gorm:"column:sf_typeid" json:"sf_typeid"` //投屏窗体类型ID
|
||||
SF_Name sql.NullString `gorm:"column:sf_name" json:"sf_name"` //投屏窗体名称
|
||||
SF_Describe sql.NullString `gorm:"column:sf_describe" json:"sf_describe"` //投屏窗体描述
|
||||
SF_Content sql.NullString `gorm:"column:sf_content" json:"sf_content"` //投屏窗体内容
|
||||
SF_Width sql.NullInt64 `gorm:"column:sf_width" json:"sf_width"` //宽
|
||||
SF_Bgcolor sql.NullString `gorm:"column:sf_bgcolor" json:"sf_bgcolor"` //窗体的背景色
|
||||
SF_ScreenPath sql.NullString `gorm:"column:sf_screenpath" json:"sf_screenpath"` //窗体背景路径
|
||||
SF_Height sql.NullInt64 `gorm:"column:sf_height" json:"sf_height"` //高
|
||||
SF_CreateTime sql.NullTime `gorm:"column:sf_createtime" json:"sf_createtime"` //创建时间
|
||||
SF_UpdateTime sql.NullTime `gorm:"column:sf_updatetime" json:"sf_updatetime"` //修改时间
|
||||
SF_Z sql.NullFloat64 `gorm:"column:sf_z" json:"sf_z"`
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package Model
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"time"
|
||||
)
|
||||
|
||||
type T_ScreenFormEvent struct {
|
||||
SFE_ID string `gorm:"column:id;primary_key" json:"id"` //事件ID
|
||||
SFE_ScreenID string `gorm:"column:sfe_screenid" json:"sfe_screenid"` //屏幕ID
|
||||
SFE_SF_ID string `gorm:"column:sfe_sf_id" json:"sfe_sf_id"` //大屏窗体ID
|
||||
SFE_Name string `gorm:"column:sfe_name" json:"sfe_name"` //事件名称
|
||||
SFE_TypeName string `gorm:"column:sfe_typename" json:"sfe_typename"` //SFE_TypeName
|
||||
SFE_Describe string `gorm:"column:sfe_describe" json:"sfe_describe"` //事件描述
|
||||
SFE_StopTime int64 `gorm:"column:sfe_stoptime" json:"sfe_stoptime"` //停留时间 单位 秒
|
||||
SFE_NextFormID string `gorm:"column:sfe_nextformid" json:"sfe_nextformid"` //跳转事件
|
||||
SFE_CreateTime time.Time `gorm:"column:sfe_createtime" json:"sfe_createtime"` //创建时间
|
||||
SFE_UpdateTime time.Time `gorm:"column:sfe_updatetime" json:"sfe_updatetime"` //修改时间
|
||||
}
|
||||
|
||||
type SQLT_ScreenFormEvent struct {
|
||||
SFE_ID sql.NullString `gorm:"column:id;primary_key" json:"id"` //事件ID
|
||||
SFE_ScreenID sql.NullString `gorm:"column:sfe_screenid" json:"sfe_screenid"` //屏幕ID
|
||||
SFE_SF_ID sql.NullString `gorm:"column:sfe_sf_id" json:"sfe_sf_id"` //大屏窗体ID
|
||||
SFE_Name sql.NullString `gorm:"column:sfe_name" json:"sfe_name"` //事件名称
|
||||
SFE_TypeName sql.NullString `gorm:"column:sfe_typename" json:"sfe_typename"` //SFE_TypeName
|
||||
SFE_Describe sql.NullString `gorm:"column:sfe_describe" json:"sfe_describe"` //事件描述
|
||||
SFE_StopTime sql.NullInt64 `gorm:"column:sfe_stoptime" json:"sfe_stoptime"` //停留时间 单位 秒
|
||||
SFE_NextFormID sql.NullString `gorm:"column:sfe_nextformid" json:"sfe_nextformid"` //跳转事件
|
||||
SFE_CreateTime sql.NullTime `gorm:"column:sfe_createtime" json:"sfe_createtime"` //创建时间
|
||||
SFE_UpdateTime sql.NullTime `gorm:"column:sfe_updatetime" json:"sfe_updatetime"` //修改时间
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package Model
|
||||
|
||||
import "database/sql"
|
||||
|
||||
type T_StaffCategory struct {
|
||||
Ca_ID string
|
||||
Ca_Name string
|
||||
Ca_Num string
|
||||
Ca_ReportPower int
|
||||
Ca_VotePower int
|
||||
Ca_SpeakPower int
|
||||
Ca_FirstSpeakPower int
|
||||
Ca_CallPower int
|
||||
Ca_SearchPower int
|
||||
Ca_Remarks string
|
||||
Ca_Serial int
|
||||
}
|
||||
|
||||
type SQLT_StaffCategory struct {
|
||||
Ca_ID sql.NullString
|
||||
Ca_Name sql.NullString
|
||||
Ca_Num sql.NullString
|
||||
Ca_ReportPower sql.NullInt32
|
||||
Ca_VotePower sql.NullInt32
|
||||
Ca_SpeakPower sql.NullInt32
|
||||
Ca_FirstSpeakPower sql.NullInt32
|
||||
Ca_CallPower sql.NullInt32
|
||||
Ca_SearchPower sql.NullInt32
|
||||
Ca_Remarks sql.NullString
|
||||
Ca_Serial sql.NullInt32
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package Model
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"time"
|
||||
)
|
||||
|
||||
type T_StaffInfo struct {
|
||||
St_ID string
|
||||
St_Name string
|
||||
St_Num string
|
||||
St_CategoryID string
|
||||
St_GroupID string
|
||||
St_Image string
|
||||
St_WorkUnit string
|
||||
St_Sex int
|
||||
St_Phone string
|
||||
St_CardNum string
|
||||
St_ViceCardNum string
|
||||
St_ViceCardNumA string
|
||||
St_ViceCardNumB string
|
||||
St_NationID string
|
||||
St_PartyID string
|
||||
St_Job string
|
||||
St_Enabled int
|
||||
St_Remarks string
|
||||
St_CreateTime time.Time
|
||||
St_Updatetime time.Time
|
||||
St_Account string
|
||||
St_PWD string
|
||||
St_Wynum string
|
||||
St_Serial int
|
||||
St_SpareA string
|
||||
St_SpareB string
|
||||
StaffCategory T_StaffCategory
|
||||
StaffGroup T_StaffGroup
|
||||
}
|
||||
|
||||
type T_Staff struct {
|
||||
ID string
|
||||
St_Num string
|
||||
St_Name string
|
||||
St_Sex int
|
||||
St_SexName string
|
||||
St_ViceCardNum string
|
||||
St_ViceCardNumA string
|
||||
St_ViceCardNumB string
|
||||
St_CategoryID string
|
||||
Ca_Name string
|
||||
St_GroupID string
|
||||
Gr_Name string
|
||||
St_WorkUnit string
|
||||
St_Phone string
|
||||
St_NationID string
|
||||
NationName string
|
||||
St_PartyID string
|
||||
Dic_Name string
|
||||
St_Image string
|
||||
St_Job string
|
||||
St_CardNum string
|
||||
St_Wynum string
|
||||
St_Remarks string
|
||||
St_Account string
|
||||
St_PWD string
|
||||
St_Enabled int
|
||||
}
|
||||
|
||||
type SQLT_StaffInfo struct {
|
||||
St_ID sql.NullString
|
||||
St_Name sql.NullString
|
||||
St_Num sql.NullString
|
||||
St_CategoryID sql.NullString
|
||||
St_GroupID sql.NullString
|
||||
St_Image sql.NullString
|
||||
St_WorkUnit sql.NullString
|
||||
St_Sex sql.NullInt32
|
||||
St_Phone sql.NullString
|
||||
St_CardNum sql.NullString
|
||||
St_ViceCardNum sql.NullString
|
||||
St_ViceCardNumA sql.NullString
|
||||
St_ViceCardNumB sql.NullString
|
||||
St_NationID sql.NullString
|
||||
St_PartyID sql.NullString
|
||||
St_Job sql.NullString
|
||||
St_Enabled sql.NullInt32
|
||||
St_Remarks sql.NullString
|
||||
St_CreateTime sql.NullTime
|
||||
St_Updatetime sql.NullTime
|
||||
St_Account sql.NullString
|
||||
St_PWD sql.NullString
|
||||
St_Wynum sql.NullString
|
||||
St_Serial sql.NullInt32
|
||||
St_SpareA sql.NullString
|
||||
St_SpareB sql.NullString
|
||||
StaffCategory SQLT_StaffCategory
|
||||
StaffGroup SQLT_StaffGroup
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package Model
|
||||
|
||||
import "database/sql"
|
||||
|
||||
type T_StaffGroup struct {
|
||||
Gr_ID string
|
||||
Gr_Name string
|
||||
Gr_Num string
|
||||
Gr_Remarks string
|
||||
Gr_Serial int
|
||||
}
|
||||
|
||||
type SQLT_StaffGroup struct {
|
||||
Gr_ID sql.NullString
|
||||
Gr_Name sql.NullString
|
||||
Gr_Num sql.NullString
|
||||
Gr_Remarks sql.NullString
|
||||
Gr_Serial sql.NullInt32
|
||||
}
|
Binary file not shown.
Can't render this file because it contains an unexpected character in line 1 and column 824.
|
Binary file not shown.
Can't render this file because it contains an unexpected character in line 1 and column 824.
|
Binary file not shown.
Can't render this file because it contains an unexpected character in line 1 and column 824.
|
Binary file not shown.
Can't render this file because it contains an unexpected character in line 1 and column 824.
|
Binary file not shown.
Can't render this file because it contains an unexpected character in line 1 and column 824.
|
Binary file not shown.
After Width: | Height: | Size: 171 KiB |
Binary file not shown.
After Width: | Height: | Size: 34 KiB |
Binary file not shown.
After Width: | Height: | Size: 82 KiB |
Binary file not shown.
After Width: | Height: | Size: 113 KiB |
Binary file not shown.
After Width: | Height: | Size: 279 KiB |
Binary file not shown.
After Width: | Height: | Size: 42 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Can't render this file because it contains an unexpected character in line 1 and column 325.
|
Binary file not shown.
Can't render this file because it contains an unexpected character in line 1 and column 84.
|
Binary file not shown.
Can't render this file because it contains an unexpected character in line 1 and column 84.
|
Binary file not shown.
Can't render this file because it contains an unexpected character in line 1 and column 199.
|
Binary file not shown.
Can't render this file because it contains an unexpected character in line 1 and column 199.
|
Binary file not shown.
Can't render this file because it contains an unexpected character in line 1 and column 83.
|
Binary file not shown.
Can't render this file because it has a wrong number of fields in line 2.
|
Binary file not shown.
Can't render this file because it contains an unexpected character in line 1 and column 325.
|
Binary file not shown.
Can't render this file because it contains an unexpected character in line 4 and column 146.
|
Binary file not shown.
Can't render this file because it contains an unexpected character in line 1 and column 637.
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue