|
@@ -40,6 +40,11 @@ func HisManagerApiRegistRouters() {
|
40
|
40
|
beego.Router("/api/register/get", &HisApiController{}, "get:GetRegisterInfo")
|
41
|
41
|
beego.Router("/api/diag/upload", &HisApiController{}, "get:GetUploadDiag")
|
42
|
42
|
beego.Router("/api/upload/get", &HisApiController{}, "get:GetUploadInfo")
|
|
43
|
+
|
|
44
|
+ //beego.Router("/api/settle/get", &HisApiController{}, "get:GetSettleInfo")
|
|
45
|
+
|
|
46
|
+ beego.Router("/api/upload/get", &HisApiController{}, "get:Sel")
|
|
47
|
+
|
43
|
48
|
beego.Router("/api/settle/query", &HisApiController{}, "get:GetSettleAccounts")
|
44
|
49
|
beego.Router("/api/checkaccount/get", &HisApiController{}, "get:GetCheckAccount")
|
45
|
50
|
beego.Router("/api/checkdetailaccount/get", &HisApiController{}, "get:GetCheckDetailAccount")
|
|
@@ -153,173 +158,83 @@ func (c *HisApiController) Sscard() {
|
153
|
158
|
adminUser := c.GetAdminUserInfo()
|
154
|
159
|
miConfig, _ := service.FindMedicalInsuranceInfo(adminUser.CurrentOrgId)
|
155
|
160
|
|
156
|
|
- r := CardInit()
|
157
|
|
- if r == 0 {
|
158
|
|
- switch id_card_type {
|
159
|
|
- case 1:
|
160
|
|
- basStr, err := GetBasBaseInfo()
|
161
|
|
-
|
162
|
|
- if err != nil {
|
163
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeReadCardException)
|
164
|
|
- return
|
165
|
|
-
|
166
|
|
- } else {
|
167
|
|
- fmt.Println(basStr)
|
|
161
|
+ //r := CardInit()
|
|
162
|
+ //if r == 0 {
|
|
163
|
+ switch id_card_type {
|
|
164
|
+ case 1:
|
|
165
|
+ basStr, err := GetBasBaseInfo()
|
168
|
166
|
|
169
|
|
- bas := strings.Split(basStr, "|")
|
|
167
|
+ if err != nil {
|
|
168
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeReadCardException)
|
|
169
|
+ return
|
170
|
170
|
|
171
|
|
- basNumber := bas[1]
|
|
171
|
+ } else {
|
|
172
|
+ fmt.Println(basStr)
|
172
|
173
|
|
173
|
|
- //basNumber := bas[2]
|
174
|
|
- card_sn := bas[3]
|
|
174
|
+ bas := strings.Split(basStr, "|")
|
175
|
175
|
|
176
|
|
- appRole, _ := service.GetAppRole(adminUser.CurrentOrgId)
|
|
176
|
+ basNumber := bas[1]
|
177
|
177
|
|
178
|
|
- api := "http://127.0.0.1:9532/" + "gdyb/one?cert_no=" + basNumber + "&org_name=" + miConfig.OrgName + "&doctor=" + appRole.UserName + "&fixmedins_code=" + miConfig.Code + "&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(int64(id_card_type), 10) + "&card_sn=" + card_sn
|
179
|
|
- resp, requestErr := http.Get(api)
|
180
|
|
- if requestErr != nil {
|
181
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
182
|
|
- return
|
183
|
|
- }
|
184
|
|
- defer resp.Body.Close()
|
185
|
|
- body, ioErr := ioutil.ReadAll(resp.Body)
|
186
|
|
- if ioErr != nil {
|
187
|
|
- utils.ErrorLog("接口返回数据读取失败: %v", ioErr)
|
188
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
189
|
|
- return
|
190
|
|
- }
|
191
|
|
- var respJSON map[string]interface{}
|
|
178
|
+ //basNumber := bas[2]
|
|
179
|
+ card_sn := bas[3]
|
192
|
180
|
|
193
|
|
- if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
|
194
|
|
- utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
|
195
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
196
|
|
- return
|
197
|
|
- }
|
|
181
|
+ appRole, _ := service.GetAppRole(adminUser.CurrentOrgId)
|
198
|
182
|
|
199
|
|
- userJSON := respJSON["data"].(map[string]interface{})["pre"].(map[string]interface{})
|
200
|
|
- userJSONBytes, _ := json.Marshal(userJSON)
|
201
|
|
- var res ResultTwo
|
202
|
|
- if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
203
|
|
- utils.ErrorLog("解析失败:%v", err)
|
204
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
205
|
|
- return
|
206
|
|
- }
|
207
|
|
- Iinfos, _ := json.Marshal(res.Output.Iinfo)
|
208
|
|
- Idetinfos, _ := json.Marshal(res.Output.Idetinfo)
|
209
|
|
- infoStr := string(Iinfos)
|
210
|
|
- idetinfoStr := string(Idetinfos)
|
211
|
|
-
|
212
|
|
- if res.Infcode == 0 {
|
213
|
|
- his := models.VMHisPatient{
|
214
|
|
- Status: 1,
|
215
|
|
- Ctime: time.Now().Unix(),
|
216
|
|
- Mtime: time.Now().Unix(),
|
217
|
|
- PsnNo: res.Output.Baseinfo.PsnNo,
|
218
|
|
- PsnCertType: res.Output.Baseinfo.PsnCertType,
|
219
|
|
- Certno: res.Output.Baseinfo.Certno,
|
220
|
|
- PsnName: res.Output.Baseinfo.PsnName,
|
221
|
|
- Gend: res.Output.Baseinfo.Gend,
|
222
|
|
- Naty: res.Output.Baseinfo.Naty,
|
223
|
|
- Brdy: res.Output.Baseinfo.Brdy,
|
224
|
|
- Age: res.Output.Baseinfo.Age,
|
225
|
|
- Iinfo: infoStr,
|
226
|
|
- Idetinfo: idetinfoStr,
|
227
|
|
- UserOrgId: adminUser.CurrentOrgId,
|
228
|
|
- IsReturn: 1,
|
229
|
|
- IdCardType: id_card_type,
|
230
|
|
- }
|
231
|
|
-
|
232
|
|
- patient, err := service.GetPatientByNumber(basNumber, adminUser.CurrentOrgId)
|
233
|
|
- if err == gorm.ErrRecordNotFound {
|
234
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeNoPateintException)
|
235
|
|
- return
|
236
|
|
-
|
237
|
|
- } else if err != nil {
|
238
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
239
|
|
- return
|
240
|
|
-
|
241
|
|
- } else {
|
242
|
|
- c.ServeSuccessJSON(map[string]interface{}{
|
243
|
|
- "patient": patient,
|
244
|
|
- "his": his,
|
245
|
|
- "number": basNumber,
|
246
|
|
- })
|
247
|
|
- }
|
248
|
|
- } else {
|
249
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeHisFailedException)
|
250
|
|
- return
|
251
|
|
- }
|
|
183
|
+ api := "http://127.0.0.1:9532/" + "gdyb/one?cert_no=" + basNumber + "&org_name=" + miConfig.OrgName + "&doctor=" + appRole.UserName + "&fixmedins_code=" + miConfig.Code + "&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(int64(id_card_type), 10) + "&card_sn=" + card_sn
|
|
184
|
+ resp, requestErr := http.Get(api)
|
|
185
|
+ if requestErr != nil {
|
|
186
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
187
|
+ return
|
|
188
|
+ }
|
|
189
|
+ defer resp.Body.Close()
|
|
190
|
+ body, ioErr := ioutil.ReadAll(resp.Body)
|
|
191
|
+ if ioErr != nil {
|
|
192
|
+ utils.ErrorLog("接口返回数据读取失败: %v", ioErr)
|
|
193
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
194
|
+ return
|
|
195
|
+ }
|
|
196
|
+ var respJSON map[string]interface{}
|
252
|
197
|
|
|
198
|
+ if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
|
|
199
|
+ utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
|
|
200
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
201
|
+ return
|
253
|
202
|
}
|
254
|
203
|
|
255
|
|
- break
|
256
|
|
- case 2:
|
257
|
|
- SFZStr, err := GetSFZBaseInfo()
|
258
|
|
- if err != nil {
|
259
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeReadCardException)
|
|
204
|
+ userJSON := respJSON["data"].(map[string]interface{})["pre"].(map[string]interface{})
|
|
205
|
+ userJSONBytes, _ := json.Marshal(userJSON)
|
|
206
|
+ var res ResultTwo
|
|
207
|
+ if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
|
208
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
209
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
260
|
210
|
return
|
|
211
|
+ }
|
|
212
|
+ Iinfos, _ := json.Marshal(res.Output.Iinfo)
|
|
213
|
+ Idetinfos, _ := json.Marshal(res.Output.Idetinfo)
|
|
214
|
+ infoStr := string(Iinfos)
|
|
215
|
+ idetinfoStr := string(Idetinfos)
|
261
|
216
|
|
262
|
|
- } else {
|
|
217
|
+ if res.Infcode == 0 {
|
|
218
|
+ his := models.VMHisPatient{
|
|
219
|
+ Status: 1,
|
|
220
|
+ Ctime: time.Now().Unix(),
|
|
221
|
+ Mtime: time.Now().Unix(),
|
|
222
|
+ PsnNo: res.Output.Baseinfo.PsnNo,
|
|
223
|
+ PsnCertType: res.Output.Baseinfo.PsnCertType,
|
|
224
|
+ Certno: res.Output.Baseinfo.Certno,
|
|
225
|
+ PsnName: res.Output.Baseinfo.PsnName,
|
|
226
|
+ Gend: res.Output.Baseinfo.Gend,
|
|
227
|
+ Naty: res.Output.Baseinfo.Naty,
|
|
228
|
+ Brdy: res.Output.Baseinfo.Brdy,
|
|
229
|
+ Age: res.Output.Baseinfo.Age,
|
|
230
|
+ Iinfo: infoStr,
|
|
231
|
+ Idetinfo: idetinfoStr,
|
|
232
|
+ UserOrgId: adminUser.CurrentOrgId,
|
|
233
|
+ IsReturn: 1,
|
|
234
|
+ IdCardType: id_card_type,
|
|
235
|
+ }
|
263
|
236
|
|
264
|
|
- id_card_str := strings.Split(SFZStr, "^")
|
265
|
|
- id_card_number := id_card_str[0]
|
266
|
|
- //appRole, _ := service.GetAppRole(adminUser.CurrentOrgId)
|
267
|
|
- //
|
268
|
|
- //api := "http://127.0.0.1:9532/" + "gdyb/one?cert_no=" + id_card_number + "&org_name=" + miConfig.OrgName + "&doctor=" + appRole.UserName + "&fixmedins_code=" + miConfig.Code + "&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(int64(id_card_type), 10)
|
269
|
|
- //resp, requestErr := http.Get(api)
|
270
|
|
- //if requestErr != nil {
|
271
|
|
- // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
272
|
|
- // return
|
273
|
|
- //}
|
274
|
|
- //defer resp.Body.Close()
|
275
|
|
- //body, ioErr := ioutil.ReadAll(resp.Body)
|
276
|
|
- //if ioErr != nil {
|
277
|
|
- // utils.ErrorLog("接口返回数据读取失败: %v", ioErr)
|
278
|
|
- // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
279
|
|
- // return
|
280
|
|
- //}
|
281
|
|
- //var respJSON map[string]interface{}
|
282
|
|
- //
|
283
|
|
- //if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
|
284
|
|
- // utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
|
285
|
|
- // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
286
|
|
- // return
|
287
|
|
- //}
|
288
|
|
- //
|
289
|
|
- //userJSON := respJSON["data"].(map[string]interface{})["pre"].(map[string]interface{})
|
290
|
|
- //userJSONBytes, _ := json.Marshal(userJSON)
|
291
|
|
- //var res ResultTwo
|
292
|
|
- //if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
293
|
|
- // utils.ErrorLog("解析失败:%v", err)
|
294
|
|
- // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
295
|
|
- // return
|
296
|
|
- //}
|
297
|
|
- //Iinfos, _ := json.Marshal(res.Output.Iinfo)
|
298
|
|
- //Idetinfos, _ := json.Marshal(res.Output.Idetinfo)
|
299
|
|
- //infoStr := string(Iinfos)
|
300
|
|
- //idetinfoStr := string(Idetinfos)
|
301
|
|
- //
|
302
|
|
- //if res.Infcode == 0 {
|
303
|
|
- // his := models.VMHisPatient{
|
304
|
|
- // Status: 1,
|
305
|
|
- // Ctime: time.Now().Unix(),
|
306
|
|
- // Mtime: time.Now().Unix(),
|
307
|
|
- // PsnNo: res.Output.Baseinfo.PsnNo,
|
308
|
|
- // PsnCertType: res.Output.Baseinfo.PsnCertType,
|
309
|
|
- // Certno: res.Output.Baseinfo.Certno,
|
310
|
|
- // PsnName: res.Output.Baseinfo.PsnName,
|
311
|
|
- // Gend: res.Output.Baseinfo.Gend,
|
312
|
|
- // Naty: res.Output.Baseinfo.Naty,
|
313
|
|
- // Brdy: res.Output.Baseinfo.Brdy,
|
314
|
|
- // Age: res.Output.Baseinfo.Age,
|
315
|
|
- // Iinfo: infoStr,
|
316
|
|
- // Idetinfo: idetinfoStr,
|
317
|
|
- // UserOrgId: adminUser.CurrentOrgId,
|
318
|
|
- // IsReturn: 1,
|
319
|
|
- // IdCardType: id_card_type,
|
320
|
|
- // }
|
321
|
|
-
|
322
|
|
- patient, err := service.GetPatientByNumber(id_card_number, adminUser.CurrentOrgId)
|
|
237
|
+ patient, err := service.GetPatientByNumber(basNumber, adminUser.CurrentOrgId)
|
323
|
238
|
if err == gorm.ErrRecordNotFound {
|
324
|
239
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeNoPateintException)
|
325
|
240
|
return
|
|
@@ -331,18 +246,108 @@ func (c *HisApiController) Sscard() {
|
331
|
246
|
} else {
|
332
|
247
|
c.ServeSuccessJSON(map[string]interface{}{
|
333
|
248
|
"patient": patient,
|
334
|
|
- "number": id_card_number,
|
|
249
|
+ "his": his,
|
|
250
|
+ "number": basNumber,
|
335
|
251
|
})
|
336
|
252
|
}
|
|
253
|
+ } else {
|
|
254
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeHisFailedException)
|
|
255
|
+ return
|
337
|
256
|
}
|
338
|
|
- break
|
339
|
|
- case 3:
|
340
|
257
|
|
341
|
|
- break
|
|
258
|
+ }
|
|
259
|
+
|
|
260
|
+ break
|
|
261
|
+ case 2:
|
|
262
|
+ SFZStr, err := GetSFZBaseInfo()
|
|
263
|
+ if err != nil {
|
|
264
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeReadCardException)
|
|
265
|
+ return
|
|
266
|
+
|
|
267
|
+ } else {
|
|
268
|
+
|
|
269
|
+ id_card_str := strings.Split(SFZStr, "^")
|
|
270
|
+ id_card_number := id_card_str[0]
|
|
271
|
+ //appRole, _ := service.GetAppRole(adminUser.CurrentOrgId)
|
|
272
|
+ //
|
|
273
|
+ //api := "http://127.0.0.1:9532/" + "gdyb/one?cert_no=" + id_card_number + "&org_name=" + miConfig.OrgName + "&doctor=" + appRole.UserName + "&fixmedins_code=" + miConfig.Code + "&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(int64(id_card_type), 10)
|
|
274
|
+ //resp, requestErr := http.Get(api)
|
|
275
|
+ //if requestErr != nil {
|
|
276
|
+ // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
277
|
+ // return
|
|
278
|
+ //}
|
|
279
|
+ //defer resp.Body.Close()
|
|
280
|
+ //body, ioErr := ioutil.ReadAll(resp.Body)
|
|
281
|
+ //if ioErr != nil {
|
|
282
|
+ // utils.ErrorLog("接口返回数据读取失败: %v", ioErr)
|
|
283
|
+ // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
284
|
+ // return
|
|
285
|
+ //}
|
|
286
|
+ //var respJSON map[string]interface{}
|
|
287
|
+ //
|
|
288
|
+ //if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
|
|
289
|
+ // utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
|
|
290
|
+ // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
291
|
+ // return
|
|
292
|
+ //}
|
|
293
|
+ //
|
|
294
|
+ //userJSON := respJSON["data"].(map[string]interface{})["pre"].(map[string]interface{})
|
|
295
|
+ //userJSONBytes, _ := json.Marshal(userJSON)
|
|
296
|
+ //var res ResultTwo
|
|
297
|
+ //if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
|
298
|
+ // utils.ErrorLog("解析失败:%v", err)
|
|
299
|
+ // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
300
|
+ // return
|
|
301
|
+ //}
|
|
302
|
+ //Iinfos, _ := json.Marshal(res.Output.Iinfo)
|
|
303
|
+ //Idetinfos, _ := json.Marshal(res.Output.Idetinfo)
|
|
304
|
+ //infoStr := string(Iinfos)
|
|
305
|
+ //idetinfoStr := string(Idetinfos)
|
|
306
|
+ //
|
|
307
|
+ //if res.Infcode == 0 {
|
|
308
|
+ // his := models.VMHisPatient{
|
|
309
|
+ // Status: 1,
|
|
310
|
+ // Ctime: time.Now().Unix(),
|
|
311
|
+ // Mtime: time.Now().Unix(),
|
|
312
|
+ // PsnNo: res.Output.Baseinfo.PsnNo,
|
|
313
|
+ // PsnCertType: res.Output.Baseinfo.PsnCertType,
|
|
314
|
+ // Certno: res.Output.Baseinfo.Certno,
|
|
315
|
+ // PsnName: res.Output.Baseinfo.PsnName,
|
|
316
|
+ // Gend: res.Output.Baseinfo.Gend,
|
|
317
|
+ // Naty: res.Output.Baseinfo.Naty,
|
|
318
|
+ // Brdy: res.Output.Baseinfo.Brdy,
|
|
319
|
+ // Age: res.Output.Baseinfo.Age,
|
|
320
|
+ // Iinfo: infoStr,
|
|
321
|
+ // Idetinfo: idetinfoStr,
|
|
322
|
+ // UserOrgId: adminUser.CurrentOrgId,
|
|
323
|
+ // IsReturn: 1,
|
|
324
|
+ // IdCardType: id_card_type,
|
|
325
|
+ // }
|
|
326
|
+
|
|
327
|
+ patient, err := service.GetPatientByNumber(id_card_number, adminUser.CurrentOrgId)
|
|
328
|
+ if err == gorm.ErrRecordNotFound {
|
|
329
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeNoPateintException)
|
|
330
|
+ return
|
|
331
|
+
|
|
332
|
+ } else if err != nil {
|
|
333
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
334
|
+ return
|
342
|
335
|
|
|
336
|
+ } else {
|
|
337
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
338
|
+ "patient": patient,
|
|
339
|
+ "number": id_card_number,
|
|
340
|
+ })
|
|
341
|
+ }
|
343
|
342
|
}
|
|
343
|
+ break
|
|
344
|
+ case 3:
|
|
345
|
+
|
|
346
|
+ break
|
|
347
|
+
|
344
|
348
|
}
|
345
|
349
|
}
|
|
350
|
+
|
346
|
351
|
func StrPtr2(s string) uintptr {
|
347
|
352
|
return uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(s)))
|
348
|
353
|
}
|
|
@@ -1261,7 +1266,7 @@ func (c *HisApiController) GetUploadInfo() {
|
1261
|
1266
|
|
1262
|
1267
|
}
|
1263
|
1268
|
|
1264
|
|
- api := "http://127.0.0.1:9532/" + "gdyb/eight?cert_no=" + cert_no + "&insutype=" +
|
|
1269
|
+ api := "http://127.0.0.1:9532/" + "gdyb/seven?cert_no=" + cert_no + "&insutype=" +
|
1265
|
1270
|
insutype + "&psn_no=" + psn_no + "&chrg_bchno=" + chrg_bchno + "&mdtrt_id=" + mdtrt_id +
|
1266
|
1271
|
"&total=" + allTotal + "&org_name=" + miConfig.OrgName + "&doctor=" + roles.UserName + "&fixmedins_code=" + miConfig.Code + "&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" +
|
1267
|
1272
|
miConfig.SecretKey + "&med_type=" + strconv.FormatInt(patientPrescription.RegisterType, 10) + "&id_card_type=" + strconv.FormatInt(int64(his.IdCardType), 10)
|
|
@@ -1562,6 +1567,390 @@ func (c *HisApiController) GetUploadInfo() {
|
1562
|
1567
|
}
|
1563
|
1568
|
}
|
1564
|
1569
|
|
|
1570
|
+//func (c *HisApiController) GetSettleInfo() {
|
|
1571
|
+// id, _ := c.GetInt64("id")
|
|
1572
|
+// record_time := c.GetString("record_time")
|
|
1573
|
+// pay_way, _ := c.GetInt64("pay_way")
|
|
1574
|
+// pay_price, _ := c.GetFloat("pay_price")
|
|
1575
|
+// pay_card_no := c.GetString("pay_card_no")
|
|
1576
|
+// discount_price, _ := c.GetFloat("discount_price")
|
|
1577
|
+// preferential_price, _ := c.GetFloat("preferential_price")
|
|
1578
|
+// reality_price, _ := c.GetFloat("reality_price")
|
|
1579
|
+// found_price, _ := c.GetFloat("found_price")
|
|
1580
|
+// medical_insurance_price, _ := c.GetFloat("medical_insurance_price")
|
|
1581
|
+// private_price, _ := c.GetFloat("private_price")
|
|
1582
|
+// settle_accounts_type, _ := c.GetInt64("settle_accounts_type")
|
|
1583
|
+// admin_user_id, _ := c.GetInt64("admin_user_id")
|
|
1584
|
+// order_id, _ := c.GetInt64("order_id")
|
|
1585
|
+//
|
|
1586
|
+// //fulamt_ownpay_amt, _ := c.GetFloat("fulamt_ownpay_amt")
|
|
1587
|
+// //overlmt_selfpay, _ := c.GetFloat("overlmt_selfpay")
|
|
1588
|
+// //preselfpay_amt, _ := c.GetFloat("preselfpay_amt")
|
|
1589
|
+// //inscp_scp_amt, _ := c.GetFloat("inscp_scp_amt")
|
|
1590
|
+//
|
|
1591
|
+// timeLayout := "2006-01-02"
|
|
1592
|
+// loc, _ := time.LoadLocation("Local")
|
|
1593
|
+// theTime, err := time.ParseInLocation(timeLayout+" 15:04:05", record_time+" 00:00:00", loc)
|
|
1594
|
+// if err != nil {
|
|
1595
|
+// c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
|
1596
|
+// return
|
|
1597
|
+// }
|
|
1598
|
+// recordDateTime := theTime.Unix()
|
|
1599
|
+// adminUser := c.GetAdminUserInfo()
|
|
1600
|
+//
|
|
1601
|
+// var prescriptions []*models.HisPrescription
|
|
1602
|
+//
|
|
1603
|
+// data := make(map[string]interface{})
|
|
1604
|
+// if settle_accounts_type == 1 { //日结
|
|
1605
|
+// prescriptions, _ = service.GetHisPrescription(adminUser.CurrentOrgId, id, recordDateTime)
|
|
1606
|
+//
|
|
1607
|
+// } else { //月结
|
|
1608
|
+// start_time_str := c.GetString("start_time")
|
|
1609
|
+// end_time_str := c.GetString("end_time")
|
|
1610
|
+// timeLayout := "2006-01-02"
|
|
1611
|
+// loc, _ := time.LoadLocation("Local")
|
|
1612
|
+// theStartTime, err := time.ParseInLocation(timeLayout+" 15:04:05", start_time_str+" 00:00:00", loc)
|
|
1613
|
+// if err != nil {
|
|
1614
|
+// c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
|
1615
|
+// return
|
|
1616
|
+// }
|
|
1617
|
+// recordStartTime := theStartTime.Unix()
|
|
1618
|
+// theEndTime, err := time.ParseInLocation(timeLayout+" 15:04:05", end_time_str+" 00:00:00", loc)
|
|
1619
|
+// if err != nil {
|
|
1620
|
+// c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
|
1621
|
+// return
|
|
1622
|
+// }
|
|
1623
|
+// recordEndTime := theEndTime.Unix()
|
|
1624
|
+// prescriptions, _ = service.GetMonthHisPrescription(adminUser.CurrentOrgId, id, recordStartTime, recordEndTime)
|
|
1625
|
+//
|
|
1626
|
+// }
|
|
1627
|
+//
|
|
1628
|
+// roles, _ := service.GetAdminUserInfoByID(adminUser.CurrentOrgId, admin_user_id)
|
|
1629
|
+//
|
|
1630
|
+// his, _ := service.GetVMHisPatientInfo(adminUser.CurrentOrgId, id, recordDateTime)
|
|
1631
|
+// miConfig, _ := service.FindMedicalInsuranceInfo(adminUser.CurrentOrgId)
|
|
1632
|
+// patientPrescription, _ := service.FindPatientPrescriptionInfo(adminUser.CurrentOrgId, id, recordDateTime)
|
|
1633
|
+// //department, _ := service.GetDepartMentDetail(patientPrescription.Departments)
|
|
1634
|
+// order, err := service.GetHisOrderByID(order_id)
|
|
1635
|
+//
|
|
1636
|
+// if err != nil {
|
|
1637
|
+// c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeHisOrderNoExistParamWrong)
|
|
1638
|
+// return
|
|
1639
|
+// }
|
|
1640
|
+//
|
|
1641
|
+// strconv.FormatInt(his.PatientId, 10)
|
|
1642
|
+//
|
|
1643
|
+// var ids []int64
|
|
1644
|
+// for _, item := range prescriptions {
|
|
1645
|
+// ids = append(ids, item.ID)
|
|
1646
|
+// }
|
|
1647
|
+// config, _ := service.GetMedicalInsuranceConfig(adminUser.CurrentOrgId)
|
|
1648
|
+// if config.IsOpen == 1 { //对接了医保,走医保流程
|
|
1649
|
+// var total float64
|
|
1650
|
+// for _, item := range prescriptions {
|
|
1651
|
+// if item.Type == 1 { //药品
|
|
1652
|
+// for _, subItem := range item.HisDoctorAdviceInfo {
|
|
1653
|
+// total = total + (subItem.Price * subItem.PrescribingNumber)
|
|
1654
|
+// }
|
|
1655
|
+// }
|
|
1656
|
+// if item.Type == 2 { //项目
|
|
1657
|
+// for _, subItem := range item.HisPrescriptionProject {
|
|
1658
|
+// total = total + (subItem.Price * float64(subItem.Count))
|
|
1659
|
+// }
|
|
1660
|
+// }
|
|
1661
|
+// }
|
|
1662
|
+//
|
|
1663
|
+// for _, item := range prescriptions {
|
|
1664
|
+// for _, subItem := range item.HisAdditionalCharge {
|
|
1665
|
+// total = total + (subItem.Price * float64(subItem.Count))
|
|
1666
|
+// }
|
|
1667
|
+// }
|
|
1668
|
+//
|
|
1669
|
+// allTotal := fmt.Sprintf("%.2f", total)
|
|
1670
|
+// var rf []*ResultFive
|
|
1671
|
+// json.Unmarshal([]byte(his.Iinfo), &rf)
|
|
1672
|
+// psn_no := his.PsnNo
|
|
1673
|
+// mdtrt_id := his.Number
|
|
1674
|
+// chrg_bchno := order.Number
|
|
1675
|
+// cert_no := his.Certno
|
|
1676
|
+// insutype := rf[0].Insutype
|
|
1677
|
+//
|
|
1678
|
+// if his.IdCardType == 1 {
|
|
1679
|
+// cert_no = his.MedicalInsuranceNumber
|
|
1680
|
+//
|
|
1681
|
+// } else {
|
|
1682
|
+// cert_no = his.Certno
|
|
1683
|
+// }
|
|
1684
|
+//
|
|
1685
|
+// api := "http://127.0.0.1:9532/" + "gdyb/eigth?cert_no=" + cert_no + "&insutype=" +
|
|
1686
|
+// insutype + "&psn_no=" + psn_no + "&chrg_bchno=" + chrg_bchno + "&mdtrt_id=" + mdtrt_id +
|
|
1687
|
+// "&total=" + allTotal + "&org_name=" + miConfig.OrgName + "&doctor=" + roles.UserName + "&fixmedins_code=" + miConfig.Code + "&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" +
|
|
1688
|
+// miConfig.SecretKey + "&med_type=" + strconv.FormatInt(patientPrescription.RegisterType, 10) + "&id_card_type=" + strconv.FormatInt(int64(his.IdCardType), 10)
|
|
1689
|
+//
|
|
1690
|
+// resp, requestErr := http.Get(api)
|
|
1691
|
+// if requestErr != nil {
|
|
1692
|
+// c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
1693
|
+// return
|
|
1694
|
+// }
|
|
1695
|
+// defer resp.Body.Close()
|
|
1696
|
+// body, ioErr := ioutil.ReadAll(resp.Body)
|
|
1697
|
+// if ioErr != nil {
|
|
1698
|
+// utils.ErrorLog("接口返回数据读取失败: %v", ioErr)
|
|
1699
|
+// c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
1700
|
+// return
|
|
1701
|
+// }
|
|
1702
|
+// var respJSON map[string]interface{}
|
|
1703
|
+// if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
|
|
1704
|
+// utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
|
|
1705
|
+// c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
1706
|
+// return
|
|
1707
|
+// }
|
|
1708
|
+// fmt.Println(respJSON)
|
|
1709
|
+// respJSON = respJSON["data"].(map[string]interface{})["pre"].(map[string]interface{})
|
|
1710
|
+// userJSONBytes, _ := json.Marshal(respJSON)
|
|
1711
|
+// var res ResultSeven
|
|
1712
|
+// if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
|
1713
|
+// utils.ErrorLog("解析失败:%v", err)
|
|
1714
|
+// c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
1715
|
+// return
|
|
1716
|
+// }
|
|
1717
|
+// if res.Infcode == -1 {
|
|
1718
|
+// errlog := &models.HisOrderError{
|
|
1719
|
+// UserOrgId: adminUser.CurrentOrgId,
|
|
1720
|
+// Ctime: time.Now().Unix(),
|
|
1721
|
+// Mtime: time.Now().Unix(),
|
|
1722
|
+// Number: chrg_bchno,
|
|
1723
|
+// ErrMsg: res.ErrMsg,
|
|
1724
|
+// Status: 1,
|
|
1725
|
+// PatientId: id,
|
|
1726
|
+// RecordTime: recordDateTime,
|
|
1727
|
+// Stage: 6,
|
|
1728
|
+// }
|
|
1729
|
+// service.CreateErrMsgLog(errlog)
|
|
1730
|
+// c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeRegisterRepeatException)
|
|
1731
|
+// return
|
|
1732
|
+// } else {
|
|
1733
|
+// order, _ := service.GetHisOrderTwo(adminUser.CurrentOrgId, chrg_bchno, id)
|
|
1734
|
+// order.OrderStatus = 2
|
|
1735
|
+// order.MdtrtId = res.Output.Setlinfo.MdtrtID
|
|
1736
|
+// order.SetlId = res.Output.Setlinfo.SetlID
|
|
1737
|
+// order.PsnNo = res.Output.Setlinfo.PsnNo
|
|
1738
|
+// order.PsnName = res.Output.Setlinfo.PsnName
|
|
1739
|
+// order.PsnCertType = res.Output.Setlinfo.PsnCertType
|
|
1740
|
+// order.Certno = res.Output.Setlinfo.Certno
|
|
1741
|
+// order.Gend = res.Output.Setlinfo.Gend
|
|
1742
|
+// order.Naty = res.Output.Setlinfo.Naty
|
|
1743
|
+// order.Age = res.Output.Setlinfo.Age
|
|
1744
|
+// order.Insutype = res.Output.Setlinfo.Insutype
|
|
1745
|
+// order.PsnType = res.Output.Setlinfo.PsnType
|
|
1746
|
+// order.CvlservFlag = res.Output.Setlinfo.CvlservFlag
|
|
1747
|
+// order.SetlTime = res.Output.Setlinfo.SetlTime
|
|
1748
|
+// order.MdtrtCertType = res.Output.Setlinfo.MdtrtCertType
|
|
1749
|
+// order.MedType = res.Output.Setlinfo.MedType
|
|
1750
|
+// order.MedfeeSumamt = res.Output.Setlinfo.MedfeeSumamt
|
|
1751
|
+// order.FulamtOwnpayAmt = res.Output.Setlinfo.FulamtOwnpayAmt
|
|
1752
|
+// order.OverlmtSelfPay = res.Output.Setlinfo.OverlmtSelfpay
|
|
1753
|
+// order.PreselfpayAmt = res.Output.Setlinfo.PreselfpayAmt
|
|
1754
|
+// order.InscpScpAmt = res.Output.Setlinfo.InscpScpAmt
|
|
1755
|
+// order.ActPayDedc = res.Output.Setlinfo.ActPayDedc
|
|
1756
|
+// order.HifpPay = res.Output.Setlinfo.HifpPay
|
|
1757
|
+// order.CvlservPay = res.Output.Setlinfo.CvlservPay
|
|
1758
|
+// order.PoolPropSelfpay = res.Output.Setlinfo.PoolPropSelfpay
|
|
1759
|
+// order.HifesPay = res.Output.Setlinfo.HifesPay
|
|
1760
|
+// order.HifobPay = res.Output.Setlinfo.HifobPay
|
|
1761
|
+// order.MafPay = res.Output.Setlinfo.MafPay
|
|
1762
|
+// order.OthPay = res.Output.Setlinfo.OthPay
|
|
1763
|
+// order.FundPaySumamt = res.Output.Setlinfo.FundPaySumamt
|
|
1764
|
+// order.PsnPartAmt = res.Output.Setlinfo.PsnPartAmt
|
|
1765
|
+// order.AcctPay = res.Output.Setlinfo.AcctPay
|
|
1766
|
+// order.PsnCashPay = res.Output.Setlinfo.PsnCashPay
|
|
1767
|
+// order.HospPartAmt = res.Output.Setlinfo.HospPartAmt
|
|
1768
|
+// order.Balc = res.Output.Setlinfo.Balc
|
|
1769
|
+// order.AcctMulaidPay = res.Output.Setlinfo.AcctMulaidPay
|
|
1770
|
+// order.MedinsSetlId = res.Output.Setlinfo.MedinsSetlID
|
|
1771
|
+// order.ClrOptins = res.Output.Setlinfo.ClrOptins
|
|
1772
|
+// order.ClrWay = res.Output.Setlinfo.ClrWay
|
|
1773
|
+// order.Creator = order.Creator
|
|
1774
|
+// order.Modify = roles.ID
|
|
1775
|
+// setlDetail, _ := json.Marshal(res.Output.Setldetail)
|
|
1776
|
+// detailStr := string(setlDetail)
|
|
1777
|
+// order.SetlDetail = detailStr
|
|
1778
|
+// err := service.UpdataOrderStatusTwo(chrg_bchno, adminUser.CurrentOrgId)
|
|
1779
|
+// err = service.UpDateOrder(order)
|
|
1780
|
+// if err == nil {
|
|
1781
|
+// c.ServeSuccessJSON(map[string]interface{}{
|
|
1782
|
+// "msg": "结算成功",
|
|
1783
|
+// })
|
|
1784
|
+// } else {
|
|
1785
|
+// c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeAmountAccountException)
|
|
1786
|
+// return
|
|
1787
|
+// }
|
|
1788
|
+// }
|
|
1789
|
+//
|
|
1790
|
+// } else {
|
|
1791
|
+// var total float64
|
|
1792
|
+// for _, item := range prescriptions {
|
|
1793
|
+// if item.Type == 1 { //药品
|
|
1794
|
+// for _, subItem := range item.HisDoctorAdviceInfo {
|
|
1795
|
+// total = total + (subItem.Price * subItem.PrescribingNumber)
|
|
1796
|
+// }
|
|
1797
|
+// }
|
|
1798
|
+// if item.Type == 2 { //项目
|
|
1799
|
+// for _, subItem := range item.HisPrescriptionProject {
|
|
1800
|
+// total = total + (subItem.Price * float64(subItem.Count))
|
|
1801
|
+// }
|
|
1802
|
+// }
|
|
1803
|
+//
|
|
1804
|
+// for _, subItem := range item.HisAdditionalCharge {
|
|
1805
|
+// total = total + (subItem.Price * float64(subItem.Count))
|
|
1806
|
+// }
|
|
1807
|
+// }
|
|
1808
|
+//
|
|
1809
|
+// allTotal := fmt.Sprintf("%.2f", total)
|
|
1810
|
+// totals, _ := strconv.ParseFloat(allTotal, 64)
|
|
1811
|
+// order := &models.HisOrder{
|
|
1812
|
+// UserOrgId: adminUser.CurrentOrgId,
|
|
1813
|
+// HisPatientId: his.ID,
|
|
1814
|
+// PatientId: id,
|
|
1815
|
+// SettleAccountsDate: recordDateTime,
|
|
1816
|
+// Ctime: time.Now().Unix(),
|
|
1817
|
+// Mtime: time.Now().Unix(),
|
|
1818
|
+// Status: 1,
|
|
1819
|
+// OrderStatus: 2,
|
|
1820
|
+// Number: chrg_bchno,
|
|
1821
|
+// MedfeeSumamt: totals,
|
|
1822
|
+// PayWay: pay_way,
|
|
1823
|
+// PayPrice: pay_price,
|
|
1824
|
+// PayCardNo: pay_card_no,
|
|
1825
|
+// DiscountPrice: discount_price,
|
|
1826
|
+// PreferentialPrice: preferential_price,
|
|
1827
|
+// RealityPrice: reality_price,
|
|
1828
|
+// FoundPrice: found_price,
|
|
1829
|
+// MedicalInsurancePrice: medical_insurance_price,
|
|
1830
|
+// PrivatePrice: private_price,
|
|
1831
|
+// }
|
|
1832
|
+// err = service.CreateOrder(order)
|
|
1833
|
+// if err != nil {
|
|
1834
|
+// c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeCreatePreOrderException)
|
|
1835
|
+// return
|
|
1836
|
+// }
|
|
1837
|
+//
|
|
1838
|
+// var customs []*Custom
|
|
1839
|
+// for _, item := range prescriptions {
|
|
1840
|
+//
|
|
1841
|
+// if item.Type == 1 { //药品
|
|
1842
|
+// for _, subItem := range item.HisDoctorAdviceInfo {
|
|
1843
|
+// cus := &Custom{
|
|
1844
|
+// AdviceId: subItem.ID,
|
|
1845
|
+// ProjectId: 0,
|
|
1846
|
+// DetItemFeeSumamt: fmt.Sprintf("%.2f", subItem.Price*subItem.PrescribingNumber),
|
|
1847
|
+// Cut: fmt.Sprintf("%.2f", subItem.PrescribingNumber),
|
|
1848
|
+// FeedetlSn: subItem.FeedetlSn,
|
|
1849
|
+// Price: fmt.Sprintf("%.2f", subItem.Price),
|
|
1850
|
+// MedListCodg: subItem.MedListCodg,
|
|
1851
|
+// Type: 1,
|
|
1852
|
+// }
|
|
1853
|
+// customs = append(customs, cus)
|
|
1854
|
+// }
|
|
1855
|
+// }
|
|
1856
|
+//
|
|
1857
|
+// if item.Type == 2 { //项目
|
|
1858
|
+// for _, subItem := range item.HisPrescriptionProject {
|
|
1859
|
+//
|
|
1860
|
+// cus := &Custom{
|
|
1861
|
+// AdviceId: 0,
|
|
1862
|
+// ProjectId: subItem.ID,
|
|
1863
|
+// DetItemFeeSumamt: fmt.Sprintf("%.2f", subItem.Price*float64(subItem.Count)),
|
|
1864
|
+// Cut: fmt.Sprintf("%.2f", float64(subItem.Count)),
|
|
1865
|
+// FeedetlSn: subItem.FeedetlSn,
|
|
1866
|
+// Price: fmt.Sprintf("%.2f", float64(subItem.Price)),
|
|
1867
|
+// MedListCodg: subItem.MedListCodg,
|
|
1868
|
+// Type: 2,
|
|
1869
|
+// }
|
|
1870
|
+//
|
|
1871
|
+// customs = append(customs, cus)
|
|
1872
|
+// }
|
|
1873
|
+// }
|
|
1874
|
+//
|
|
1875
|
+// for _, item := range item.HisAdditionalCharge {
|
|
1876
|
+// cus := &Custom{
|
|
1877
|
+// ItemId: item.ID,
|
|
1878
|
+// AdviceId: 0,
|
|
1879
|
+// ProjectId: 0,
|
|
1880
|
+// DetItemFeeSumamt: fmt.Sprintf("%.2f", item.Price),
|
|
1881
|
+// Cut: fmt.Sprintf("%.2f", float64(item.Count)),
|
|
1882
|
+// FeedetlSn: item.FeedetlSn,
|
|
1883
|
+// Price: fmt.Sprintf("%.2f", float64(item.Price)),
|
|
1884
|
+// MedListCodg: item.XtHisAddtionConfig.Code,
|
|
1885
|
+// Type: 3,
|
|
1886
|
+// }
|
|
1887
|
+//
|
|
1888
|
+// customs = append(customs, cus)
|
|
1889
|
+// }
|
|
1890
|
+//
|
|
1891
|
+// }
|
|
1892
|
+//
|
|
1893
|
+// for _, item := range customs {
|
|
1894
|
+// var advice_id int64 = 0
|
|
1895
|
+// var project_id int64 = 0
|
|
1896
|
+// var item_id int64 = 0
|
|
1897
|
+//
|
|
1898
|
+// var types int64 = 0
|
|
1899
|
+//
|
|
1900
|
+// if item.Type == 1 {
|
|
1901
|
+// advice_id = item.AdviceId
|
|
1902
|
+// project_id = 0
|
|
1903
|
+// item_id = 0
|
|
1904
|
+// } else if item.Type == 2 {
|
|
1905
|
+// advice_id = 0
|
|
1906
|
+// item_id = 0
|
|
1907
|
+//
|
|
1908
|
+// project_id = item.ProjectId
|
|
1909
|
+// } else if item.Type == 3 {
|
|
1910
|
+// advice_id = 0
|
|
1911
|
+// item_id = item.ItemId
|
|
1912
|
+// project_id = 0
|
|
1913
|
+// }
|
|
1914
|
+//
|
|
1915
|
+// detItemFeeSumamt, _ := strconv.ParseFloat(item.DetItemFeeSumamt, 32)
|
|
1916
|
+// cut, _ := strconv.ParseFloat(item.Cut, 32)
|
|
1917
|
+// pric, _ := strconv.ParseFloat(item.Price, 32)
|
|
1918
|
+//
|
|
1919
|
+// info := &models.HisOrderInfo{
|
|
1920
|
+// OrderNumber: order.Number,
|
|
1921
|
+// UploadDate: time.Now().Unix(),
|
|
1922
|
+// AdviceId: advice_id,
|
|
1923
|
+// DetItemFeeSumamt: detItemFeeSumamt,
|
|
1924
|
+// Cnt: cut,
|
|
1925
|
+// Pric: pric,
|
|
1926
|
+// PatientId: id,
|
|
1927
|
+// Status: 1,
|
|
1928
|
+// Mtime: time.Now().Unix(),
|
|
1929
|
+// Ctime: time.Now().Unix(),
|
|
1930
|
+// UserOrgId: adminUser.CurrentOrgId,
|
|
1931
|
+// HisPatientId: his.ID,
|
|
1932
|
+// OrderId: order.ID,
|
|
1933
|
+// ProjectId: project_id,
|
|
1934
|
+// Type: types,
|
|
1935
|
+// ItemId: item_id,
|
|
1936
|
+// }
|
|
1937
|
+// service.CreateOrderInfo(info)
|
|
1938
|
+// }
|
|
1939
|
+// //err := service.UpDateAddtionNumber(adminUser.CurrentOrgId, ids, chrg_bchno)
|
|
1940
|
+// err = service.UpDatePrescriptionNumber(adminUser.CurrentOrgId, ids, chrg_bchno)
|
|
1941
|
+// err = service.UpDatePrescriptionInfoNumber(adminUser.CurrentOrgId, id, chrg_bchno, recordDateTime)
|
|
1942
|
+// err = service.UpdataOrderStatusTwo(chrg_bchno, adminUser.CurrentOrgId)
|
|
1943
|
+// if err == nil {
|
|
1944
|
+// c.ServeSuccessJSON(map[string]interface{}{
|
|
1945
|
+// "msg": "结算成功",
|
|
1946
|
+// })
|
|
1947
|
+// } else {
|
|
1948
|
+// c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeAmountAccountException)
|
|
1949
|
+// return
|
|
1950
|
+// }
|
|
1951
|
+// }
|
|
1952
|
+//}
|
|
1953
|
+
|
1565
|
1954
|
//退款
|
1566
|
1955
|
func (c *HisApiController) Refund() {
|
1567
|
1956
|
order_id, _ := c.GetInt64("order_id")
|