|
@@ -81,7 +81,7 @@ func HisManagerApiRegistRouters() {
|
81
|
81
|
beego.Router("/90990", &HisApiController{}, "get:CheckCardPWDTwo")
|
82
|
82
|
beego.Router("/9001", &HisApiController{}, "get:Get9001")
|
83
|
83
|
|
84
|
|
- beego.Router("/api/readelecard", &HisApiController{}, "get:ReadEleCard")
|
|
84
|
+
|
85
|
85
|
|
86
|
86
|
beego.Router("/api/3202", &HisApiController{}, "get:Post3202")
|
87
|
87
|
|
|
@@ -2293,66 +2293,65 @@ func (c *HisApiController) ReadCard() {
|
2293
|
2293
|
return
|
2294
|
2294
|
}
|
2295
|
2295
|
} else if miConfig.MdtrtareaAdmvs == "440300" || miConfig.MdtrtareaAdmvs == "440305" {
|
2296
|
|
- c.GetEleBaseInfo()
|
2297
|
|
-
|
2298
|
|
-
|
2299
|
|
-
|
2300
|
|
-
|
2301
|
|
-
|
2302
|
|
-
|
2303
|
|
-
|
2304
|
|
-
|
2305
|
|
-
|
2306
|
|
-
|
2307
|
|
-
|
2308
|
|
-
|
2309
|
|
-
|
2310
|
|
-
|
2311
|
|
-
|
2312
|
|
-
|
2313
|
|
-
|
2314
|
|
-
|
2315
|
|
-
|
2316
|
|
-
|
2317
|
|
-
|
2318
|
|
-
|
2319
|
|
-
|
2320
|
|
-
|
2321
|
|
-
|
2322
|
|
-
|
2323
|
|
-
|
2324
|
|
-
|
2325
|
|
-
|
2326
|
|
-
|
2327
|
|
-
|
2328
|
|
-
|
2329
|
|
-
|
2330
|
|
-
|
2331
|
|
-
|
2332
|
|
-
|
2333
|
|
-
|
2334
|
|
-
|
2335
|
|
-
|
2336
|
|
-
|
2337
|
|
-
|
2338
|
|
-
|
2339
|
|
-
|
2340
|
|
-
|
2341
|
|
-
|
2342
|
|
-
|
2343
|
|
-
|
2344
|
|
-
|
2345
|
|
-
|
|
2296
|
+
|
|
2297
|
+ if initFlag == 0 {
|
|
2298
|
+ c.TestGetBasBaseInit()
|
|
2299
|
+ }
|
|
2300
|
+ token := c.GetEleBaseInfo()
|
|
2301
|
+
|
|
2302
|
+ token = Remove0000(token)
|
|
2303
|
+
|
|
2304
|
+ result2, requestLog2 := service.Gdyb1101ForEleCert(miConfig.OrgName, roles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, token)
|
|
2305
|
+ saveLog(result2, requestLog2, "1101", "获取人员信息")
|
2346
|
2306
|
|
2347
|
|
-
|
2348
|
|
-
|
2349
|
|
-
|
2350
|
|
-
|
2351
|
|
-
|
2352
|
|
-
|
2353
|
|
-
|
2354
|
|
-
|
2355
|
|
-
|
|
2307
|
+ var res ResultTwo
|
|
2308
|
+ if err := json.Unmarshal([]byte(result2), &res); err != nil {
|
|
2309
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
2310
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
2311
|
+ return
|
|
2312
|
+ }
|
|
2313
|
+
|
|
2314
|
+ if res.Infcode == 0 {
|
|
2315
|
+ patient, err := service.GetPatientByNumber(res.Output.Baseinfo.Certno, c.GetAdminUserInfo().CurrentOrgId)
|
|
2316
|
+ if err == gorm.ErrRecordNotFound {
|
|
2317
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeNoPateintException)
|
|
2318
|
+ return
|
|
2319
|
+ } else if err != nil {
|
|
2320
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
2321
|
+ return
|
|
2322
|
+
|
|
2323
|
+ } else {
|
|
2324
|
+ Iinfos, _ := json.Marshal(res.Output.Iinfo)
|
|
2325
|
+ Idetinfos, _ := json.Marshal(res.Output.Idetinfo)
|
|
2326
|
+ infoStr := string(Iinfos)
|
|
2327
|
+ idetinfoStr := string(Idetinfos)
|
|
2328
|
+ psn := &models.HisPsn{
|
|
2329
|
+ PsnNo: res.Output.Baseinfo.PsnNo,
|
|
2330
|
+ Age: res.Output.Baseinfo.Age,
|
|
2331
|
+ PatientId: patient.ID,
|
|
2332
|
+ Certno: res.Output.Baseinfo.Certno,
|
|
2333
|
+ Brdy: res.Output.Baseinfo.Brdy,
|
|
2334
|
+ Gend: res.Output.Baseinfo.Gend,
|
|
2335
|
+ Naty: res.Output.Baseinfo.Naty,
|
|
2336
|
+ PsnCertType: res.Output.Baseinfo.PsnCertType,
|
|
2337
|
+ PsnName: res.Output.Baseinfo.PsnName,
|
|
2338
|
+ Idetinfo: idetinfoStr,
|
|
2339
|
+ Insuinfo: infoStr,
|
|
2340
|
+ UserOrgId: c.GetAdminUserInfo().CurrentOrgId,
|
|
2341
|
+ CardInfo: "",
|
|
2342
|
+ VerifyNumber: token,
|
|
2343
|
+ }
|
|
2344
|
+ service.CreateHisPsn(psn)
|
|
2345
|
+
|
|
2346
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
2347
|
+ "patient": patient,
|
|
2348
|
+ "number": token,
|
|
2349
|
+ })
|
|
2350
|
+ }
|
|
2351
|
+ } else {
|
|
2352
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeHisFailedException)
|
|
2353
|
+ return
|
|
2354
|
+ }
|
2356
|
2355
|
|
2357
|
2356
|
} else if miConfig.MdtrtareaAdmvs == "350500" {
|
2358
|
2357
|
type ELeData struct {
|
|
@@ -2537,6 +2536,8 @@ func (c *HisApiController) GetSFZBaseInfo() string {
|
2537
|
2536
|
func (c *HisApiController) GetEleBaseInfo() string {
|
2538
|
2537
|
DllDef := syscall.MustLoadDLL("SSCard.dll")
|
2539
|
2538
|
readCard := DllDef.MustFindProc("GetQRBase")
|
|
2539
|
+ fmt.Println(readCard)
|
|
2540
|
+
|
2540
|
2541
|
if readCard == nil {
|
2541
|
2542
|
fmt.Println("readcard is nil")
|
2542
|
2543
|
readCard = DllDef.MustFindProc("GetQRBase")
|
|
@@ -2544,6 +2545,7 @@ func (c *HisApiController) GetEleBaseInfo() string {
|
2544
|
2545
|
str := make([]byte, 1024)
|
2545
|
2546
|
str1 := make([]byte, 1024)
|
2546
|
2547
|
ret2, _, _ := readCard.Call(uintptr(180), (uintptr)(unsafe.Pointer(&str[0])), uintptr(1024), (uintptr)(unsafe.Pointer(&str1[0])), uintptr(1024))
|
|
2548
|
+ fmt.Println(ret2)
|
2547
|
2549
|
fmt.Println(string(str1))
|
2548
|
2550
|
fmt.Println(string(str))
|
2549
|
2551
|
fmt.Println(":", ConvertToString(string(str1), "gbk", "utf-8"))
|
|
@@ -2551,7 +2553,7 @@ func (c *HisApiController) GetEleBaseInfo() string {
|
2551
|
2553
|
if ret2 != 0 {
|
2552
|
2554
|
return ""
|
2553
|
2555
|
}
|
2554
|
|
- return string(str1)
|
|
2556
|
+ return string(str)
|
2555
|
2557
|
}
|
2556
|
2558
|
|
2557
|
2559
|
func (c *HisApiController) GetBasBaseInfo() string {
|
|
@@ -3261,8 +3263,8 @@ func (c *HisApiController) GetSettleListHospital() {
|
3261
|
3263
|
HiType: order.Insutype,
|
3262
|
3264
|
Insuplc: miConfig.InsuplcAdmdvs,
|
3263
|
3265
|
MaindiagFlag: "1",
|
3264
|
|
- BillCode: order.FaPiaoCode,
|
3265
|
|
- BillNo: order.FaPiaoCode,
|
|
3266
|
+ BillCode: order.FaPiaoNumber,
|
|
3267
|
+ BillNo: order.FaPiaoNumber,
|
3266
|
3268
|
BizSn: order.Number,
|
3267
|
3269
|
PsnSelfPay: order.PsnPartAmt,
|
3268
|
3270
|
PsnOwnPay: order.PsnPartAmt,
|
|
@@ -3826,8 +3828,8 @@ func (c *HisApiController) GetBatchSettleList() {
|
3826
|
3828
|
HiType: order.Insutype,
|
3827
|
3829
|
Insuplc: his.InsuplcAdmdvs,
|
3828
|
3830
|
MaindiagFlag: "1",
|
3829
|
|
- BillCode: order.FaPiaoCode,
|
3830
|
|
- BillNo: order.FaPiaoNumber,
|
|
3831
|
+ BillCode: order.SetlId,
|
|
3832
|
+ BillNo: order.SetlId,
|
3831
|
3833
|
BizSn: order.Number,
|
3832
|
3834
|
PsnSelfPay: order.PsnPartAmt,
|
3833
|
3835
|
PsnOwnPay: order.PsnPartAmt,
|
|
@@ -5844,52 +5846,70 @@ func (c *HisApiController) GetRegisterInfo() {
|
5844
|
5846
|
var result string
|
5845
|
5847
|
var requestLog string
|
5846
|
5848
|
if miConfig.UserOrgId == 10138 {
|
5847
|
|
- if id_card_type == 4 {
|
5848
|
|
- psn_info, _ := service.GetPsnByPatientId(id)
|
5849
|
|
- result, requestLog = service.Gdyb1101ForEleCert(miConfig.OrgName, roles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, psn_info.VerifyNumber)
|
5850
|
|
- } else {
|
|
5849
|
+ if id_card_type != 4 {
|
|
5850
|
+
|
|
5851
|
+
|
5851
|
5852
|
result, requestLog = service.Gdyb1101D(patient.IdCardNo, miConfig.OrgName, roles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, id_card_type, "", strconv.FormatInt(certificates, 10), name, record_time)
|
5852
|
5853
|
}
|
5853
|
5854
|
} else {
|
5854
|
5855
|
result, requestLog = service.Gdyb1101(patient.IdCardNo, miConfig.OrgName, roles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, id_card_type, "", strconv.FormatInt(certificates, 10), name)
|
5855
|
5856
|
}
|
5856
|
|
- saveLog(result, requestLog, "1101", "人员基本信息获取")
|
5857
|
|
- if miConfig.Code == "H15049901371" {
|
5858
|
5857
|
|
5859
|
|
- if err := json.Unmarshal([]byte(result), &res10265); err != nil {
|
5860
|
|
- utils.ErrorLog("解析失败:%v", err)
|
5861
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
5862
|
|
- return
|
5863
|
|
- }
|
5864
|
|
- res.ErrMsg = res10265.ErrMsg
|
5865
|
|
- res.Output = res10265.Output
|
5866
|
|
- res.InfRefmsgid = res10265.InfRefmsgid
|
|
5858
|
+ if id_card_type == 4 {
|
|
5859
|
+ psn_info, _ := service.GetPsnByPatientId(id)
|
|
5860
|
+ PsnNo = psn_info.PsnNo
|
|
5861
|
+ PsnCertType = psn_info.PsnCertType
|
|
5862
|
+ Certno = psn_info.Certno
|
|
5863
|
+ PsnName = psn_info.PsnName
|
|
5864
|
+ Gend = psn_info.Gend
|
|
5865
|
+ Naty = psn_info.Naty
|
|
5866
|
+ Brdy = psn_info.Brdy
|
|
5867
|
+ Age = psn_info.Age
|
|
5868
|
+ infoStr = psn_info.Insuinfo
|
|
5869
|
+ idetinfoStr = psn_info.Idetinfo
|
|
5870
|
+ infocode = 0
|
|
5871
|
+ verify_number = psn_info.VerifyNumber
|
5867
|
5872
|
|
5868
|
5873
|
} else {
|
5869
|
|
- if err := json.Unmarshal([]byte(result), &res); err != nil {
|
5870
|
|
- utils.ErrorLog("解析失败:%v", err)
|
5871
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
5872
|
|
- return
|
|
5874
|
+ saveLog(result, requestLog, "1101", "人员基本信息获取")
|
|
5875
|
+ if miConfig.Code == "H15049901371" {
|
|
5876
|
+
|
|
5877
|
+ if err := json.Unmarshal([]byte(result), &res10265); err != nil {
|
|
5878
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
5879
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
5880
|
+ return
|
|
5881
|
+ }
|
|
5882
|
+ res.ErrMsg = res10265.ErrMsg
|
|
5883
|
+ res.Output = res10265.Output
|
|
5884
|
+ res.InfRefmsgid = res10265.InfRefmsgid
|
|
5885
|
+
|
|
5886
|
+ } else {
|
|
5887
|
+ if err := json.Unmarshal([]byte(result), &res); err != nil {
|
|
5888
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
5889
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
5890
|
+ return
|
|
5891
|
+ }
|
|
5892
|
+ }
|
|
5893
|
+ PsnNo = res.Output.Baseinfo.PsnNo
|
|
5894
|
+ PsnCertType = res.Output.Baseinfo.PsnCertType
|
|
5895
|
+ Certno = res.Output.Baseinfo.Certno
|
|
5896
|
+ PsnName = res.Output.Baseinfo.PsnName
|
|
5897
|
+ Gend = res.Output.Baseinfo.Gend
|
|
5898
|
+ Naty = res.Output.Baseinfo.Naty
|
|
5899
|
+ Brdy = res.Output.Baseinfo.Brdy
|
|
5900
|
+ Age = res.Output.Baseinfo.Age
|
|
5901
|
+ Iinfos, _ := json.Marshal(res.Output.Iinfo)
|
|
5902
|
+ Idetinfos, _ := json.Marshal(res.Output.Idetinfo)
|
|
5903
|
+ infoStr = string(Iinfos)
|
|
5904
|
+ idetinfoStr = string(Idetinfos)
|
|
5905
|
+ if miConfig.Code == "H15049901371" {
|
|
5906
|
+ infocode, _ = strconv.ParseInt(res10265.Infcode, 10, 64)
|
|
5907
|
+ } else {
|
|
5908
|
+ infocode = res.Infcode
|
5873
|
5909
|
}
|
5874
|
|
- }
|
5875
|
5910
|
|
5876
|
|
- PsnNo = res.Output.Baseinfo.PsnNo
|
5877
|
|
- PsnCertType = res.Output.Baseinfo.PsnCertType
|
5878
|
|
- Certno = res.Output.Baseinfo.Certno
|
5879
|
|
- PsnName = res.Output.Baseinfo.PsnName
|
5880
|
|
- Gend = res.Output.Baseinfo.Gend
|
5881
|
|
- Naty = res.Output.Baseinfo.Naty
|
5882
|
|
- Brdy = res.Output.Baseinfo.Brdy
|
5883
|
|
- Age = res.Output.Baseinfo.Age
|
5884
|
|
- Iinfos, _ := json.Marshal(res.Output.Iinfo)
|
5885
|
|
- Idetinfos, _ := json.Marshal(res.Output.Idetinfo)
|
5886
|
|
- infoStr = string(Iinfos)
|
5887
|
|
- idetinfoStr = string(Idetinfos)
|
5888
|
|
- if miConfig.Code == "H15049901371" {
|
5889
|
|
- infocode, _ = strconv.ParseInt(res10265.Infcode, 10, 64)
|
5890
|
|
- } else {
|
5891
|
|
- infocode = res.Infcode
|
5892
|
5911
|
}
|
|
5912
|
+
|
5893
|
5913
|
}
|
5894
|
5914
|
if infocode == 0 {
|
5895
|
5915
|
his := models.VMHisPatient{
|
|
@@ -6190,7 +6210,7 @@ func (c *HisApiController) GetRegisterInfo() {
|
6190
|
6210
|
infocode, _ = strconv.ParseInt(resThree10265.Infcode, 10, 64)
|
6191
|
6211
|
} else {
|
6192
|
6212
|
psn_info, _ := service.GetPsnByPatientId(id)
|
6193
|
|
- result, requestLog := service.Gdyb2201A(res.Output.Baseinfo.PsnNo, insutype, IdCardNo, miConfig.OrgName, roles.UserName, ipt_otp_no, department.Name, miConfig.Code, department.Number, doctor_info.DoctorNumber, insuplc_admdvs_temp, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, id_card_type, doctor_info.UserName, record_time, psn_info.VerifyNumber)
|
|
6213
|
+ result, requestLog := service.Gdyb2201A(PsnNo, insutype, IdCardNo, miConfig.OrgName, roles.UserName, ipt_otp_no, department.Name, miConfig.Code, department.Number, doctor_info.DoctorNumber, insuplc_admdvs_temp, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, id_card_type, doctor_info.UserName, record_time, psn_info.VerifyNumber)
|
6194
|
6214
|
saveLog(result, requestLog, "2201A", "挂号")
|
6195
|
6215
|
if miConfig.Code == "H15049901371" {
|
6196
|
6216
|
|
|
@@ -7273,9 +7293,19 @@ func (c *HisApiController) GetUploadInfo() {
|
7273
|
7293
|
med_type = "11"
|
7274
|
7294
|
}
|
7275
|
7295
|
}
|
7276
|
|
- result2, src_resquest = service.Gdyb2207(his.PsnNo, his.Number, chrg_bchno, cert_no, insutype, allTotal, miConfig.OrgName, roles.UserName, miConfig.Code, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, med_type, his.IdCardType, tempOrder.FulamtOwnpayAmt, tempOrder.OverlmtSelfPay, tempOrder.PreselfpayAmt, tempOrder.InscpScpAmt, his.IdType, acct_used_flag)
|
|
7296
|
+ result2, src_resquest = service.Gdyb2207(his.PsnNo, his.Number, chrg_bchno, cert_no, insutype, allTotal, miConfig.OrgName, roles.UserName, miConfig.Code, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, med_type, his.IdCardType, tempOrder.FulamtOwnpayAmt, tempOrder.OverlmtSelfPay, tempOrder.PreselfpayAmt, tempOrder.InscpScpAmt, his.IdType, acct_used_flag, "")
|
7277
|
7297
|
} else {
|
7278
|
|
- result2, src_resquest = service.Gdyb2207(his.PsnNo, his.Number, chrg_bchno, cert_no, insutype, allTotal, miConfig.OrgName, roles.UserName, miConfig.Code, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, strconv.FormatInt(reg_type, 10), his.IdCardType, tempOrder.FulamtOwnpayAmt, tempOrder.OverlmtSelfPay, tempOrder.PreselfpayAmt, tempOrder.InscpScpAmt, his.IdType, acct_used_flag)
|
|
7298
|
+ if his.IdCardType == 4 {
|
|
7299
|
+ psn_info, _ := service.GetPsnByPatientId(his.PatientId)
|
|
7300
|
+ var token string
|
|
7301
|
+ token = psn_info.VerifyNumber
|
|
7302
|
+ result2, src_resquest = service.Gdyb2207(his.PsnNo, his.Number, chrg_bchno, cert_no, insutype, allTotal, miConfig.OrgName, roles.UserName, miConfig.Code, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, strconv.FormatInt(reg_type, 10), his.IdCardType, tempOrder.FulamtOwnpayAmt, tempOrder.OverlmtSelfPay, tempOrder.PreselfpayAmt, tempOrder.InscpScpAmt, his.IdType, acct_used_flag, token)
|
|
7303
|
+
|
|
7304
|
+ } else {
|
|
7305
|
+ result2, src_resquest = service.Gdyb2207(his.PsnNo, his.Number, chrg_bchno, cert_no, insutype, allTotal, miConfig.OrgName, roles.UserName, miConfig.Code, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, strconv.FormatInt(reg_type, 10), his.IdCardType, tempOrder.FulamtOwnpayAmt, tempOrder.OverlmtSelfPay, tempOrder.PreselfpayAmt, tempOrder.InscpScpAmt, his.IdType, acct_used_flag, "")
|
|
7306
|
+
|
|
7307
|
+ }
|
|
7308
|
+
|
7279
|
7309
|
}
|
7280
|
7310
|
|
7281
|
7311
|
|
|
@@ -7726,9 +7756,18 @@ func (c *HisApiController) GetUploadInfo() {
|
7726
|
7756
|
med_type = "11"
|
7727
|
7757
|
}
|
7728
|
7758
|
}
|
7729
|
|
- result2, src_resquest = service.Gdyb2207(his.PsnNo, his.Number, chrg_bchno, cert_no, insutype, allTotal, miConfig.OrgName, roles.UserName, miConfig.Code, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, med_type, his.IdCardType, tempOrder.FulamtOwnpayAmt, tempOrder.OverlmtSelfPay, tempOrder.PreselfpayAmt, tempOrder.InscpScpAmt, his.IdType, acct_used_flag)
|
|
7759
|
+ result2, src_resquest = service.Gdyb2207(his.PsnNo, his.Number, chrg_bchno, cert_no, insutype, allTotal, miConfig.OrgName, roles.UserName, miConfig.Code, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, med_type, his.IdCardType, tempOrder.FulamtOwnpayAmt, tempOrder.OverlmtSelfPay, tempOrder.PreselfpayAmt, tempOrder.InscpScpAmt, his.IdType, acct_used_flag, "")
|
7730
|
7760
|
} else {
|
7731
|
|
- result2, src_resquest = service.Gdyb2207(his.PsnNo, his.Number, chrg_bchno, cert_no, insutype, allTotal, miConfig.OrgName, roles.UserName, miConfig.Code, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, strconv.FormatInt(reg_type, 10), his.IdCardType, tempOrder.FulamtOwnpayAmt, tempOrder.OverlmtSelfPay, tempOrder.PreselfpayAmt, tempOrder.InscpScpAmt, his.IdType, acct_used_flag)
|
|
7761
|
+ if his.IdCardType == 4 {
|
|
7762
|
+ psn_info, _ := service.GetPsnByPatientId(his.PatientId)
|
|
7763
|
+ token := psn_info.VerifyNumber
|
|
7764
|
+ result2, src_resquest = service.Gdyb2207(his.PsnNo, his.Number, chrg_bchno, cert_no, insutype, allTotal, miConfig.OrgName, roles.UserName, miConfig.Code, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, strconv.FormatInt(reg_type, 10), his.IdCardType, tempOrder.FulamtOwnpayAmt, tempOrder.OverlmtSelfPay, tempOrder.PreselfpayAmt, tempOrder.InscpScpAmt, his.IdType, acct_used_flag, token)
|
|
7765
|
+
|
|
7766
|
+ } else {
|
|
7767
|
+
|
|
7768
|
+ result2, src_resquest = service.Gdyb2207(his.PsnNo, his.Number, chrg_bchno, cert_no, insutype, allTotal, miConfig.OrgName, roles.UserName, miConfig.Code, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, strconv.FormatInt(reg_type, 10), his.IdCardType, tempOrder.FulamtOwnpayAmt, tempOrder.OverlmtSelfPay, tempOrder.PreselfpayAmt, tempOrder.InscpScpAmt, his.IdType, acct_used_flag, "")
|
|
7769
|
+
|
|
7770
|
+ }
|
7732
|
7771
|
}
|
7733
|
7772
|
|
7734
|
7773
|
var dat map[string]interface{}
|
|
@@ -10282,6 +10321,8 @@ func (c *HisApiController) GetCheckAccount() {
|
10282
|
10321
|
startime, _ := time.ParseInLocation(timeLayout+" 15:04:05", start_time+" 00:00:00", loc)
|
10283
|
10322
|
endtime, _ := time.ParseInLocation(timeLayout+" 15:04:05", end_time+" 23:59:59", loc)
|
10284
|
10323
|
orders, _ := service.GetOrderByTime(startime.Unix(), endtime.Unix(), adminUser.CurrentOrgId, insutype, "", clr_type)
|
|
10324
|
+ orders_two, _ := service.GetOrderByTimeFive(startime.Unix(), endtime.Unix(), adminUser.CurrentOrgId, insutype, "", clr_type)
|
|
10325
|
+
|
10285
|
10326
|
fixmedins_setl_cnt := int64(len(orders))
|
10286
|
10327
|
var medfee_sumamt float64
|
10287
|
10328
|
var acct_pay float64
|
|
@@ -10311,7 +10352,7 @@ func (c *HisApiController) GetCheckAccount() {
|
10311
|
10352
|
"&medfee_sumamt=" + fmt.Sprintf("%.4f", medfee_sumamt) +
|
10312
|
10353
|
"&fund_pay_sumamt=" + fmt.Sprintf("%.4f", fund_pay_sumamt) +
|
10313
|
10354
|
"&acct_pay=" + fmt.Sprintf("%.4f", acct_pay) +
|
10314
|
|
- "&fixmedins_setl_cnt=" + strconv.FormatInt(fixmedins_setl_cnt, 10) +
|
|
10355
|
+ "&fixmedins_setl_cnt=" + strconv.FormatInt(fixmedins_setl_cnt+int64(len(orders_two)*2), 10) +
|
10315
|
10356
|
"&fixmedins_code=" + miConfig.Code +
|
10316
|
10357
|
"&insuplc_admdvs=" + miConfig.InsuplcAdmdvs +
|
10317
|
10358
|
"&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs +
|
|
@@ -10359,14 +10400,14 @@ func (c *HisApiController) GetCheckAccount() {
|
10359
|
10400
|
|
10360
|
10401
|
api := "http://172.16.13.254:9532/" + "nmyb/3201?" +
|
10361
|
10402
|
"insutype=" + insutype +
|
10362
|
|
- "&clr_type=" + clr_type +
|
|
10403
|
+ "&clr_type=" + "21" +
|
10363
|
10404
|
"&setl_optins=" + clr_org +
|
10364
|
10405
|
"&stmt_begndate=" + start_time +
|
10365
|
10406
|
"&stm_enddate=" + end_time +
|
10366
|
10407
|
"&medfee_sumamt=" + fmt.Sprintf("%.4f", medfee_sumamt) +
|
10367
|
10408
|
"&fund_pay_sumamt=" + fmt.Sprintf("%.4f", fund_pay_sumamt) +
|
10368
|
10409
|
"&acct_pay=" + fmt.Sprintf("%.4f", acct_pay) +
|
10369
|
|
- "&fixmedins_setl_cnt=" + strconv.FormatInt(fixmedins_setl_cnt, 10) +
|
|
10410
|
+ "&fixmedins_setl_cnt=" + strconv.FormatInt(fixmedins_setl_cnt+int64(len(orders_two)*2), 10) +
|
10370
|
10411
|
"&fixmedins_code=" + miConfig.Code +
|
10371
|
10412
|
"&insuplc_admdvs=" + miConfig.InsuplcAdmdvs +
|
10372
|
10413
|
"&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs +
|
|
@@ -10432,7 +10473,7 @@ func (c *HisApiController) GetCheckAccount() {
|
10432
|
10473
|
MedfeeSumamt: medfee_sumamt,
|
10433
|
10474
|
FundPaySumamt: fund_pay_sumamt,
|
10434
|
10475
|
AcctPay: acct_pay,
|
10435
|
|
- FixmedinsSetlCnt: fixmedins_setl_cnt,
|
|
10476
|
+ FixmedinsSetlCnt: fixmedins_setl_cnt + int64(len(orders_two)*2),
|
10436
|
10477
|
}
|
10437
|
10478
|
result, requestLog, err_msg := service.FJyb3201(baseParams, businessParams)
|
10438
|
10479
|
fmt.Println(requestLog)
|
|
@@ -13128,7 +13169,7 @@ func ConvertToString(src string, srcCode string, tagCode string) string {
|
13128
|
13169
|
func ReadEleCard(admin_user_id int64, org_id int64, c *HisApiController) string {
|
13129
|
13170
|
roles, _ := service.GetAdminUserInfoByID(org_id, admin_user_id)
|
13130
|
13171
|
miConfig, _ := service.FindMedicalInsuranceInfo(org_id)
|
13131
|
|
-
|
|
13172
|
+ var token string
|
13132
|
13173
|
if miConfig.MdtrtareaAdmvs == "320921" || miConfig.MdtrtareaAdmvs == "320982" {
|
13133
|
13174
|
var api string
|
13134
|
13175
|
if miConfig.MdtrtareaAdmvs == "320921" {
|
|
@@ -13162,7 +13203,7 @@ func ReadEleCard(admin_user_id int64, org_id int64, c *HisApiController) string
|
13162
|
13203
|
var status string
|
13163
|
13204
|
status = respJSON["data"].(map[string]interface{})["status"].(string)
|
13164
|
13205
|
|
13165
|
|
- var token string
|
|
13206
|
+
|
13166
|
13207
|
var res ResultTwo
|
13167
|
13208
|
var res10265 ResultTwo10265
|
13168
|
13209
|
if status == "0" {
|
|
@@ -13229,6 +13270,7 @@ func ReadEleCard(admin_user_id int64, org_id int64, c *HisApiController) string
|
13229
|
13270
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeHisFailedException)
|
13230
|
13271
|
return ""
|
13231
|
13272
|
}
|
|
13273
|
+ return token
|
13232
|
13274
|
}
|
13233
|
13275
|
|
13234
|
13276
|
func DeleteExtraSpaceTwo(s string) string {
|
|
@@ -13327,36 +13369,30 @@ func (c *HisApiController) Post3202() {
|
13327
|
13369
|
loc, _ := time.LoadLocation("Local")
|
13328
|
13370
|
startime, _ := time.ParseInLocation(timeLayout+" 15:04:05", start_time+" 00:00:00", loc)
|
13329
|
13371
|
endtime, _ := time.ParseInLocation(timeLayout+" 15:04:05", end_time+" 23:59:59", loc)
|
13330
|
|
- orders, _ := service.GetOrderByTimeFour(startime.Unix(), endtime.Unix(), adminUser.CurrentOrgId, "390", "", clr_type)
|
13331
|
|
- orders_two, _ := service.GetOrderByTimeFour(startime.Unix(), endtime.Unix(), adminUser.CurrentOrgId, "310", "", clr_type)
|
|
13372
|
+ orders, _ := service.GetOrderByTimeFour(startime.Unix(), endtime.Unix(), adminUser.CurrentOrgId)
|
|
13373
|
+
|
13332
|
13374
|
|
13333
|
13375
|
|
13334
|
13376
|
var medfee_sumamt float64
|
13335
|
13377
|
var acct_pay float64
|
13336
|
13378
|
var fund_pay_sumamt float64
|
13337
|
13379
|
|
13338
|
|
- var medfee_sumamt_str string
|
13339
|
|
- var acct_pay_str string
|
13340
|
|
- var fund_pay_sumamt_str string
|
13341
|
13380
|
for _, item := range orders {
|
13342
|
|
- medfee_sumamt_str = fmt.Sprintf("%.4f", medfee_sumamt+item.MedfeeSumamt)
|
13343
|
|
- acct_pay_str = fmt.Sprintf("%.4f", acct_pay+item.AcctPay)
|
13344
|
|
- fund_pay_sumamt_str = fmt.Sprintf("%.4f", fund_pay_sumamt+item.FundPaySumamt)
|
|
13381
|
+ medfee_sumamt = medfee_sumamt + item.MedfeeSumamt
|
|
13382
|
+ acct_pay = acct_pay + item.AcctPay
|
|
13383
|
+ fund_pay_sumamt = fund_pay_sumamt + item.FundPaySumamt
|
13345
|
13384
|
|
13346
|
13385
|
}
|
13347
|
13386
|
|
13348
|
|
- var medfee_sumamt_two float64
|
13349
|
|
- var acct_pay_two float64
|
13350
|
|
- var fund_pay_sumamt_two float64
|
|
13387
|
+
|
|
13388
|
+
|
|
13389
|
+
|
13351
|
13390
|
|
13352
|
|
- var medfee_sumamt_two_str string
|
13353
|
|
- var acct_pay_two_str string
|
13354
|
|
- var fund_pay_sumamt_two_str string
|
13355
|
|
- for _, item := range orders_two {
|
13356
|
|
- medfee_sumamt_two_str = fmt.Sprintf("%.4f", medfee_sumamt_two+item.MedfeeSumamt)
|
13357
|
|
- acct_pay_two_str = fmt.Sprintf("%.4f", acct_pay_two+item.AcctPay)
|
13358
|
|
- fund_pay_sumamt_two_str = fmt.Sprintf("%.4f", fund_pay_sumamt_two+item.FundPaySumamt)
|
13359
|
|
- }
|
|
13391
|
+
|
|
13392
|
+
|
|
13393
|
+
|
|
13394
|
+
|
|
13395
|
+
|
13360
|
13396
|
|
13361
|
13397
|
|
13362
|
13398
|
role, _ := service.GetAdminUserInfoByID(adminUser.CurrentOrgId, admin_user_id)
|
|
@@ -13367,36 +13403,21 @@ func (c *HisApiController) Post3202() {
|
13367
|
13403
|
|
13368
|
13404
|
var res ResultSix
|
13369
|
13405
|
if config.IsOpen == 1 {
|
13370
|
|
- var bps []models.BusinessParams
|
13371
|
|
- var bp models.BusinessParams
|
13372
|
|
- ms, _ := strconv.ParseFloat(medfee_sumamt_str, 64)
|
13373
|
|
- ap, _ := strconv.ParseFloat(acct_pay_str, 64)
|
13374
|
|
- fp, _ := strconv.ParseFloat(fund_pay_sumamt_str, 64)
|
13375
|
|
-
|
13376
|
|
- bp.MedfeeSumamt = ms
|
13377
|
|
- bp.AcctPay = ap
|
13378
|
|
- bp.FundPaySumamt = fp
|
|
13406
|
+ var bps []*models.BusinessParamsTwo
|
|
13407
|
+ var bp models.BusinessParamsTwo
|
|
13408
|
+ medfee_sumamt_str := fmt.Sprintf("%.2f", medfee_sumamt)
|
|
13409
|
+ acct_pay_str := fmt.Sprintf("%.2f", acct_pay)
|
|
13410
|
+ fund_pay_sumamt_str := fmt.Sprintf("%.2f", fund_pay_sumamt)
|
|
13411
|
+
|
|
13412
|
+ bp.MedfeeSumamt = medfee_sumamt_str
|
|
13413
|
+ bp.AcctPay = acct_pay_str
|
|
13414
|
+ bp.FundPaySumamt = fund_pay_sumamt_str
|
13379
|
13415
|
bp.Insutype = "390"
|
13380
|
13416
|
bp.StmtBegndate = start_time
|
13381
|
13417
|
bp.ClrType = clr_type
|
13382
|
13418
|
bp.SetlOptins = clr_org
|
13383
|
13419
|
bp.StmtEnddate = end_time
|
13384
|
|
- bps = append(bps, bp)
|
13385
|
|
-
|
13386
|
|
- mst, _ := strconv.ParseFloat(medfee_sumamt_two_str, 64)
|
13387
|
|
- apt, _ := strconv.ParseFloat(acct_pay_two_str, 64)
|
13388
|
|
- fpt, _ := strconv.ParseFloat(fund_pay_sumamt_two_str, 64)
|
13389
|
|
-
|
13390
|
|
- var bp2 models.BusinessParams
|
13391
|
|
- bp2.MedfeeSumamt = mst
|
13392
|
|
- bp2.AcctPay = apt
|
13393
|
|
- bp2.FundPaySumamt = fpt
|
13394
|
|
- bp2.Insutype = "310"
|
13395
|
|
- bp2.StmtBegndate = start_time
|
13396
|
|
- bp2.StmtEnddate = end_time
|
13397
|
|
- bp2.ClrType = clr_type
|
13398
|
|
- bp2.SetlOptins = clr_org
|
13399
|
|
- bps = append(bps, bp2)
|
|
13420
|
+ bps = append(bps, &bp)
|
13400
|
13421
|
|
13401
|
13422
|
data := make(map[string]interface{})
|
13402
|
13423
|
data["bps"] = bps
|