|
@@ -60,7 +60,97 @@ func DialysisApiRegistRouters() {
|
60
|
60
|
|
61
|
61
|
beego.Router("/api/dialysisgoods/get", &DialysisApiController{}, "Get:GetDialysisGoods")
|
62
|
62
|
beego.Router("/api/goodstatistics/get", &DialysisApiController{}, "Get:GetDialysisGoodsStatistics")
|
|
63
|
+ beego.Router("/api/queue/get", &DialysisApiController{}, "Get:GetQueueCall")
|
|
64
|
+ beego.Router("/api/queue/update", &DialysisApiController{}, "Get:UpdateQueueCall")
|
|
65
|
+}
|
|
66
|
+
|
|
67
|
+func (c *DialysisApiController) GetQueueCall() {
|
|
68
|
+ adminUserInfo := c.GetAdminUserInfo()
|
|
69
|
+ queueConfig, _ := service.FindQueueCallInfo(adminUserInfo.CurrentOrgId)
|
|
70
|
+
|
|
71
|
+ if queueConfig.ID <= 0 {
|
|
72
|
+ queueConfig.OrgId = adminUserInfo.CurrentOrgId
|
|
73
|
+ queueConfig.Qhsj = 10
|
|
74
|
+ queueConfig.Jzdcbbcs = 3
|
|
75
|
+ queueConfig.Jzbbsy = 1
|
|
76
|
+ queueConfig.Jzjhyc = 0
|
|
77
|
+ queueConfig.Sjdcbbcs = 3
|
|
78
|
+ queueConfig.Sjbbsy = 0
|
|
79
|
+ queueConfig.Sjjhyc = 0
|
|
80
|
+ queueConfig.Txxqyxs = 0
|
|
81
|
+ queueConfig.Txglsyxs = 0
|
|
82
|
+ }
|
|
83
|
+
|
|
84
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
85
|
+ "queue_config": queueConfig,
|
|
86
|
+ })
|
|
87
|
+}
|
|
88
|
+
|
|
89
|
+func (c *DialysisApiController) UpdateQueueCall() {
|
|
90
|
+ adminUserInfo := c.GetAdminUserInfo()
|
|
91
|
+ queueConfig, _ := service.FindQueueCallInfo(adminUserInfo.CurrentOrgId)
|
|
92
|
+
|
|
93
|
+ if queueConfig.ID <= 0 {
|
|
94
|
+ queueConfig.OrgId = adminUserInfo.CurrentOrgId
|
|
95
|
+ queueConfig.Qhsj = 10
|
|
96
|
+ queueConfig.Jzdcbbcs = 3
|
|
97
|
+ queueConfig.Jzbbsy = 1
|
|
98
|
+ queueConfig.Jzjhyc = 0
|
|
99
|
+ queueConfig.Sjdcbbcs = 3
|
|
100
|
+ queueConfig.Sjbbsy = 0
|
|
101
|
+ queueConfig.Sjjhyc = 0
|
|
102
|
+ queueConfig.Txxqyxs = 0
|
|
103
|
+ queueConfig.Txglsyxs = 0
|
|
104
|
+ queueConfig.CreateTime = time.Now().Unix()
|
|
105
|
+ queueConfig.UpdateTime = time.Now().Unix()
|
|
106
|
+ }
|
|
107
|
+
|
|
108
|
+ qhsj, _ := c.GetInt64("qhsj", 0)
|
|
109
|
+ if qhsj > 0 {
|
|
110
|
+ queueConfig.Qhsj = qhsj
|
|
111
|
+ }
|
|
112
|
+
|
|
113
|
+ jzdcbbcs, _ := c.GetInt64("jzdcbbcs", 0)
|
|
114
|
+ if jzdcbbcs > 0 {
|
|
115
|
+ queueConfig.Jzdcbbcs = jzdcbbcs
|
|
116
|
+ }
|
|
117
|
+
|
|
118
|
+ jzbbsy, _ := c.GetInt64("jzbbsy", 0)
|
|
119
|
+ if jzbbsy > 0 {
|
|
120
|
+ queueConfig.Jzbbsy = jzbbsy
|
|
121
|
+ }
|
|
122
|
+
|
|
123
|
+ jzjhyc, _ := c.GetInt64("jzjhyc", 0)
|
|
124
|
+ queueConfig.Jzjhyc = jzjhyc
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+ sjdcbbcs, _ := c.GetInt64("sjdcbbcs", 0)
|
|
128
|
+ if sjdcbbcs > 0 {
|
|
129
|
+ queueConfig.Sjdcbbcs = sjdcbbcs
|
|
130
|
+ }
|
|
131
|
+
|
|
132
|
+ sjbbsy, _ := c.GetInt64("sjbbsy", 0)
|
|
133
|
+ if sjbbsy > 0 {
|
|
134
|
+ queueConfig.Sjbbsy = sjbbsy
|
|
135
|
+ }
|
63
|
136
|
|
|
137
|
+ sjjhyc, _ := c.GetInt64("sjjhyc", 0)
|
|
138
|
+ queueConfig.Sjjhyc = sjjhyc
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+ txxqyxs, _ := c.GetInt64("txxqyxs", 0)
|
|
142
|
+ queueConfig.Txxqyxs = txxqyxs
|
|
143
|
+
|
|
144
|
+ txglsyxs, _ := c.GetInt64("txglsyxs", 0)
|
|
145
|
+ queueConfig.Txglsyxs = txglsyxs
|
|
146
|
+
|
|
147
|
+ queueConfig.UpdateTime = time.Now().Unix()
|
|
148
|
+
|
|
149
|
+ service.UpDateQueueCallInfo(queueConfig)
|
|
150
|
+
|
|
151
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
152
|
+ "queue_config": queueConfig,
|
|
153
|
+ })
|
64
|
154
|
}
|
65
|
155
|
|
66
|
156
|
func (c *DialysisApiController) PostPrescription() {
|