test_user 2 лет назад
Родитель
Сommit
b30319e3da
6 измененных файлов: 187 добавлений и 204 удалений
  1. 3 3
      conf/app.conf
  2. 174 120
      controllers/sg/his_api_controller.go
  3. 6 7
      main.go
  4. 2 2
      service/fj_service.go
  5. 1 71
      service/gz_gdyb_service.go
  6. 1 1
      service/his_service.go

+ 3 - 3
conf/app.conf Просмотреть файл

@@ -45,7 +45,7 @@ appsecret="61ee2e6268497d5aa9de0b0187c39aea"
45 45
 
46 46
 
47 47
 [prod]
48
-org_id = 10138
48
+org_id = 10217
49 49
 mobile_token_expiration_second = 86400
50 50
 httpdomain = https://api.xt.kuyicloud.com
51 51
 sso_domain = https://sso.kuyicloud.com
@@ -53,7 +53,7 @@ call_domain = https://hf.sgjyun.com
53 53
 front_end_domain = "https://xt.kuyicloud.com/#"
54 54
 #url  = "http://192.168.1.228:17001/szsi-portal/transData"
55 55
 #url = "http://192.168.1.88:6666/szsi-portal/transData"
56
-# gdyb_url = "http://igb.hsa.gdgov.cn/ebus/gdyb_api/prd/hsa/hgs/"
56
+#gdyb_url = "http://igb.hsa.gdgov.cn/ebus/gdyb_api/prd/hsa/hgs/"
57 57
 #test
58 58
 # gdyb_url = http://10.97.240.206/ebus/gdyb_inf/poc/hsa/hgs/
59 59
 gdyb_url="http://igb.hsa.gdgov.cn/ebus/sz_prd/hsa/hgs/"
@@ -66,7 +66,7 @@ gdyb_url="http://igb.hsa.gdgov.cn/ebus/sz_prd/hsa/hgs/"
66 66
 #gdyb_paasid = "sg03_prd"
67 67
 # gdyb_paasid = "test_hosp"
68 68
 #江门
69
-# gdyb_paasid = "jm_sc_yjyy"
69
+#gdyb_paasid = "jm_sc_yjyy"
70 70
 #珠海
71 71
 # gdyb_paasid="zh_prd_yrojyy"
72 72
 #深圳

+ 174 - 120
controllers/sg/his_api_controller.go Просмотреть файл

@@ -137,7 +137,7 @@ func (c *HisApiController) ReadEleToken() {
137 137
 		tokens := ReadEleCard(admin_user_id, c.GetAdminUserInfo().CurrentOrgId, c)
138 138
 		if len(tokens) > 0 {
139 139
 			c.ServeSuccessJSON(map[string]interface{}{
140
-				"msg": "读取成功,请在5分钟内进行结算操作",
140
+				"msg": "读取成功",
141 141
 			})
142 142
 		} else {
143 143
 			c.ServeSuccessJSON(map[string]interface{}{
@@ -153,9 +153,52 @@ func (c *HisApiController) ReadEleToken() {
153 153
 		token := c.GetEleBaseInfo()
154 154
 		token = Remove0000(token)
155 155
 		if len(token) > 0 {
156
-			c.ServeSuccessJSON(map[string]interface{}{
157
-				"msg": "读取成功,请在5分钟内进行结算操作",
158
-			})
156
+			result2, requestLog2 := service.Gdyb1101ForEleCert(miConfig.OrgName, roles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, token)
157
+			saveLog(result2, requestLog2, "1101", "获取人员信息")
158
+			var res ResultTwo
159
+			if err := json.Unmarshal([]byte(result2), &res); err != nil {
160
+				utils.ErrorLog("解析失败:%v", err)
161
+				c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
162
+				return
163
+			}
164
+			if res.Infcode == 0 {
165
+				patient, err := service.GetPatientByNumber(res.Output.Baseinfo.Certno, c.GetAdminUserInfo().CurrentOrgId)
166
+				if err == gorm.ErrRecordNotFound {
167
+					c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeNoPateintException)
168
+					return
169
+				} else if err != nil {
170
+					c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
171
+					return
172
+				} else {
173
+					Iinfos, _ := json.Marshal(res.Output.Iinfo)
174
+					Idetinfos, _ := json.Marshal(res.Output.Idetinfo)
175
+					infoStr := string(Iinfos)
176
+					idetinfoStr := string(Idetinfos)
177
+					psn := &models.HisPsn{
178
+						PsnNo:        res.Output.Baseinfo.PsnNo,
179
+						Age:          res.Output.Baseinfo.Age,
180
+						PatientId:    patient.ID,
181
+						Certno:       res.Output.Baseinfo.Certno,
182
+						Brdy:         res.Output.Baseinfo.Brdy,
183
+						Gend:         res.Output.Baseinfo.Gend,
184
+						Naty:         res.Output.Baseinfo.Naty,
185
+						PsnCertType:  res.Output.Baseinfo.PsnCertType,
186
+						PsnName:      res.Output.Baseinfo.PsnName,
187
+						Idetinfo:     idetinfoStr,
188
+						Insuinfo:     infoStr,
189
+						UserOrgId:    c.GetAdminUserInfo().CurrentOrgId,
190
+						CardInfo:     "",
191
+						VerifyNumber: token,
192
+					}
193
+					service.CreateHisPsn(psn)
194
+					c.ServeSuccessJSON(map[string]interface{}{
195
+						"msg": "读取成功",
196
+					})
197
+				}
198
+			} else {
199
+				c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeHisFailedException)
200
+				return
201
+			}
159 202
 		} else {
160 203
 			c.ServeSuccessJSON(map[string]interface{}{
161 204
 				"failed_code": -10,
@@ -213,7 +256,7 @@ func (c *HisApiController) ReadEleToken() {
213 256
 
214 257
 			if len(token) > 0 {
215 258
 				c.ServeSuccessJSON(map[string]interface{}{
216
-					"msg": "读取成功,请在5分钟内进行结算操作",
259
+					"msg": "读取成功",
217 260
 				})
218 261
 			} else {
219 262
 				c.ServeSuccessJSON(map[string]interface{}{
@@ -2458,27 +2501,42 @@ func (c *HisApiController) ReadCard() {
2458 2501
 			}
2459 2502
 
2460 2503
 		} else if miConfig.MdtrtareaAdmvs == "350500" {
2504
+
2461 2505
 			type ELeData struct {
2506
+				Code string `json:"code"`
2462 2507
 				Data struct {
2463
-					IdNo        string `json:"idNo"`
2464
-					IdType      string `json:"idType"`
2465
-					UserName    string `json:"userName"`
2466
-					EcToken     string `json:"ecToken"`
2467
-					InsuOrg     string `json:"insuOrg"`
2468
-					Gender      string `json:"gender"`
2469
-					Birthday    string `json:"birthday"`
2470
-					Nationality string `json:"nationality"`
2471
-					Email       string `json:"email"`
2472
-					Extra       string `json:"extra"`
2508
+					Aac002        string `json:"aac002"`
2509
+					Aaz500        string `json:"aaz500"`
2510
+					ActCardNo     string `json:"actCardNo"`
2511
+					Bab520        string `json:"bab520"`
2512
+					Bkz543        string `json:"bkz543"`
2513
+					BusinessType  string `json:"businessType"`
2514
+					CertfCodg     string `json:"certfCodg"`
2515
+					EcIndexNo     string `json:"ecIndexNo"`
2516
+					EcToken       string `json:"ecToken"`
2517
+					ID0000        string `json:"id0000"`
2518
+					IDNo          string `json:"idNo"`
2519
+					IDType        string `json:"idType"`
2520
+					Idcode        string `json:"idcode"`
2521
+					IdentityToken string `json:"identity_token"`
2522
+					InsuOrg       string `json:"insuOrg"`
2523
+					OfficeID      string `json:"officeId"`
2524
+					OfficeName    string `json:"officeName"`
2525
+					OperatorID    string `json:"operatorId"`
2526
+					OperatorName  string `json:"operatorName"`
2527
+					OrgID         string `json:"orgId"`
2528
+					UserName      string `json:"userName"`
2473 2529
 				} `json:"data"`
2474
-				Code    int    `json:"code"`
2475
-				Message string `json:"message"`
2530
+				Infno     interface{} `json:"infno"`
2531
+				Message   string      `json:"message"`
2532
+				OrgID     string      `json:"orgId"`
2533
+				TransType string      `json:"transType"`
2476 2534
 			}
2477 2535
 
2478 2536
 			inputInfo, outPutInfo, errMsg := service.ReadEleCard(miConfig.Code)
2479 2537
 			fmt.Println(errMsg)
2480 2538
 
2481
-			if len(errMsg) == 0 {
2539
+			if len(outPutInfo) > 0 {
2482 2540
 				var ele ELeData
2483 2541
 				err := json.Unmarshal([]byte(outPutInfo), &ele)
2484 2542
 				if err != nil {
@@ -2487,113 +2545,106 @@ func (c *HisApiController) ReadCard() {
2487 2545
 				token := ele.Data.EcToken
2488 2546
 				fmt.Println(inputInfo)
2489 2547
 				fmt.Println(outPutInfo)
2490
-				result, requestLog, errMsgLog := service.FJyb1101ForEleToken(ele.Data.IdNo, miConfig.OrgName, roles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, id_card_type, "", certificates, miConfig.Url, miConfig.Cainfo, miConfig.AppSecret, miConfig.SignKey, miConfig.EncKey, token)
2491
-
2548
+				result, requestLog, errMsgLog := service.FJyb1101ForEleToken(ele.Data.IDNo, miConfig.OrgName, roles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, id_card_type, "", certificates, miConfig.Url, miConfig.Cainfo, miConfig.AppSecret, miConfig.SignKey, miConfig.EncKey, token)
2492 2549
 				saveLog(result, requestLog, "1101", "获取人员信息")
2493
-				fmt.Println(errMsgLog)
2494
-
2495
-				if len(errMsgLog) > 0 {
2496
-
2550
+				var dat map[string]interface{}
2551
+				if err := json.Unmarshal([]byte(result), &dat); err == nil {
2552
+					fmt.Println(dat)
2497 2553
 				} else {
2554
+					fmt.Println(err)
2555
+				}
2498 2556
 
2499
-					var dat map[string]interface{}
2500
-					if err := json.Unmarshal([]byte(result), &dat); err == nil {
2501
-						fmt.Println(dat)
2502
-					} else {
2503
-						fmt.Println(err)
2504
-					}
2505
-
2506
-					userJSONBytes, _ := json.Marshal(dat)
2507
-					var res ResultTwo
2508
-					if err := json.Unmarshal(userJSONBytes, &res); err != nil {
2509
-						utils.ErrorLog("解析失败:%v", err)
2510
-						c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
2557
+				userJSONBytes, _ := json.Marshal(dat)
2558
+				var res ResultTwo
2559
+				if err := json.Unmarshal(userJSONBytes, &res); err != nil {
2560
+					utils.ErrorLog("解析失败:%v", err)
2561
+					c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
2562
+					return
2563
+				}
2564
+				res.ErrMsg = errMsgLog
2565
+				if res.Infcode == 0 {
2566
+					patient, err := service.GetPatientByNumber(ele.Data.IDNo, c.GetAdminUserInfo().CurrentOrgId)
2567
+					if err == gorm.ErrRecordNotFound {
2568
+						c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeNoPateintException)
2569
+						return
2570
+					} else if err != nil {
2571
+						c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
2511 2572
 						return
2512
-					}
2513
-					res.ErrMsg = errMsgLog
2514
-					if res.Infcode == 0 {
2515
-						patient, err := service.GetPatientByNumber(id_card_no, c.GetAdminUserInfo().CurrentOrgId)
2516
-						if err == gorm.ErrRecordNotFound {
2517
-							c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeNoPateintException)
2518
-							return
2519
-						} else if err != nil {
2520
-							c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
2521
-							return
2522 2573
 
2523
-						} else {
2524
-							fmt.Println(res)
2525
-							Iinfos, _ := json.Marshal(res.Output.Iinfo)
2526
-							Idetinfos, _ := json.Marshal(res.Output.Idetinfo)
2527
-							infoStr := string(Iinfos)
2528
-							idetinfoStr := string(Idetinfos)
2529
-							psn := &models.HisPsn{
2530
-								PsnNo:        res.Output.Baseinfo.PsnNo,
2531
-								Age:          res.Output.Baseinfo.Age,
2532
-								PatientId:    patient.ID,
2533
-								Certno:       res.Output.Baseinfo.Certno,
2534
-								Brdy:         res.Output.Baseinfo.Brdy,
2535
-								Gend:         res.Output.Baseinfo.Gend,
2536
-								Naty:         res.Output.Baseinfo.Naty,
2537
-								PsnCertType:  res.Output.Baseinfo.PsnCertType,
2538
-								PsnName:      res.Output.Baseinfo.PsnName,
2539
-								Idetinfo:     idetinfoStr,
2540
-								Insuinfo:     infoStr,
2541
-								UserOrgId:    c.GetAdminUserInfo().CurrentOrgId,
2542
-								CardInfo:     outPutInfo,
2543
-								VerifyNumber: token,
2544
-							}
2545
-							service.CreateHisPsn(psn)
2574
+					} else {
2575
+						fmt.Println(res)
2576
+						Iinfos, _ := json.Marshal(res.Output.Iinfo)
2577
+						Idetinfos, _ := json.Marshal(res.Output.Idetinfo)
2578
+						infoStr := string(Iinfos)
2579
+						idetinfoStr := string(Idetinfos)
2580
+						psn := &models.HisPsn{
2581
+							PsnNo:        res.Output.Baseinfo.PsnNo,
2582
+							Age:          res.Output.Baseinfo.Age,
2583
+							PatientId:    patient.ID,
2584
+							Certno:       res.Output.Baseinfo.Certno,
2585
+							Brdy:         res.Output.Baseinfo.Brdy,
2586
+							Gend:         res.Output.Baseinfo.Gend,
2587
+							Naty:         res.Output.Baseinfo.Naty,
2588
+							PsnCertType:  res.Output.Baseinfo.PsnCertType,
2589
+							PsnName:      res.Output.Baseinfo.PsnName,
2590
+							Idetinfo:     idetinfoStr,
2591
+							Insuinfo:     infoStr,
2592
+							UserOrgId:    c.GetAdminUserInfo().CurrentOrgId,
2593
+							CardInfo:     outPutInfo,
2594
+							VerifyNumber: token,
2595
+						}
2596
+						service.CreateHisPsn(psn)
2546 2597
 
2547
-							var rf []*ResultFive
2548
-							json.Unmarshal([]byte(infoStr), &rf)
2598
+						var rf []*ResultFive
2599
+						json.Unmarshal([]byte(infoStr), &rf)
2549 2600
 
2550
-							var insutypes []*ResultFive
2551
-							var insutype string
2552
-							var is390 int = 0
2553
-							var is310 int = 0
2601
+						var insutypes []*ResultFive
2602
+						var insutype string
2603
+						var is390 int = 0
2604
+						var is310 int = 0
2554 2605
 
2555
-							for _, item := range rf {
2556
-								if (item.Insutype == "390" && item.PsnInsuStas == "1") || (item.Insutype == "310" && item.PsnInsuStas == "1") {
2557
-									insutypes = append(insutypes, item)
2558
-								}
2606
+						for _, item := range rf {
2607
+							if (item.Insutype == "390" && item.PsnInsuStas == "1") || (item.Insutype == "310" && item.PsnInsuStas == "1") {
2608
+								insutypes = append(insutypes, item)
2559 2609
 							}
2610
+						}
2560 2611
 
2561
-							if len(insutypes) == 1 {
2562
-								insutype = insutypes[0].Insutype
2563
-								//insuplc_admdvs = insutypes[0].InsuplcAdmdvs
2564
-							} else {
2565
-								for _, i := range insutypes {
2566
-									if i.Insutype == "390" {
2567
-										is390 = 1
2568
-									}
2612
+						if len(insutypes) == 1 {
2613
+							insutype = insutypes[0].Insutype
2614
+							//insuplc_admdvs = insutypes[0].InsuplcAdmdvs
2615
+						} else {
2616
+							for _, i := range insutypes {
2617
+								if i.Insutype == "390" {
2618
+									is390 = 1
2619
+								}
2569 2620
 
2570
-									if i.Insutype == "310" {
2571
-										is310 = 1
2572
-									}
2621
+								if i.Insutype == "310" {
2622
+									is310 = 1
2573 2623
 								}
2574 2624
 							}
2575
-							if is390 == 1 {
2576
-								insutype = "390"
2577
-							}
2625
+						}
2626
+						if is390 == 1 {
2627
+							insutype = "390"
2628
+						}
2578 2629
 
2579
-							if is310 == 1 {
2580
-								insutype = "310"
2581
-							}
2630
+						if is310 == 1 {
2631
+							insutype = "310"
2632
+						}
2582 2633
 
2583
-							if len(insutypes) == 0 {
2584
-								insutype = "310"
2585
-							}
2586
-							c.ServeSuccessJSON(map[string]interface{}{
2587
-								"patient":  patient,
2588
-								"number":   token,
2589
-								"insutype": insutype,
2590
-							})
2634
+						if len(insutypes) == 0 {
2635
+							insutype = "310"
2591 2636
 						}
2592
-					} else {
2593
-						c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeHisFailedException)
2594
-						return
2637
+						c.ServeSuccessJSON(map[string]interface{}{
2638
+							"patient":  patient,
2639
+							"number":   token,
2640
+							"insutype": insutype,
2641
+						})
2595 2642
 					}
2643
+				} else {
2644
+					c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeHisFailedException)
2645
+					return
2596 2646
 				}
2647
+
2597 2648
 			}
2598 2649
 		}
2599 2650
 		break
@@ -3895,9 +3946,9 @@ func (c *HisApiController) GetSettleListHospital() {
3895 3946
 }
3896 3947
 
3897 3948
 func (c *HisApiController) GetBatchSettleList() {
3898
-	orders, _ := service.GetAllHisOrder(10106)
3949
+	orders, _ := service.GetAllHisOrderErr(10106, 101060)
3899 3950
 	for _, item := range orders {
3900
-		order_id := item.ID
3951
+		order_id := item.PatientId
3901 3952
 		order, _ := service.GetHisOrderByIDTwo(order_id)
3902 3953
 		roles, _ := service.GetDoctorListTwo(c.GetAdminUserInfo().CurrentOrgId)
3903 3954
 		his, _ := service.GetHisPatientByNumber(order.MdtrtId)
@@ -7728,14 +7779,15 @@ func (c *HisApiController) GetUploadInfo() {
7728 7779
 					} else {
7729 7780
 						psn_info, _ := service.GetPsnByPatientId(his.PatientId)
7730 7781
 						psn_info.VerifyNumber = strings.Replace(psn_info.VerifyNumber, "+", "%2B", -1)
7731
-
7732
-						//psn_info, _ := service.GetPsnByPatientId(id)
7733 7782
 						bas := strings.Split(psn_info.CardInfo, "|")
7734
-
7735 7783
 						if his.IdCardType == 1 {
7736 7784
 							cert_no = bas[2]
7737
-						} else {
7738
-							cert_no = bas[1]
7785
+						} else if his.IdCardType == 3 {
7786
+							cert_no = his.Certno
7787
+							psn_info.VerifyNumber = his.Certno + "|" + psn_info.VerifyNumber
7788
+						} else if his.IdCardType == 4 {
7789
+							cert_no = his.Certno
7790
+							psn_info.VerifyNumber = psn_info.VerifyNumber
7739 7791
 						}
7740 7792
 
7741 7793
 						//江苏地区国家医保医疗类别
@@ -9286,15 +9338,17 @@ func (c *HisApiController) GetPreUploadInfo() {
9286 9338
 								psn_info, _ := service.GetPsnByPatientId(his.PatientId)
9287 9339
 								if his.IdCardType != 4 {
9288 9340
 									psn_info.VerifyNumber = strings.Replace(psn_info.VerifyNumber, "+", "%2B", -1)
9289
-								}
9290
-
9291
-								bas := strings.Split(psn_info.CardInfo, "|")
9341
+									bas := strings.Split(psn_info.CardInfo, "|")
9342
+									if his.IdCardType == 1 {
9343
+										cert_no = bas[2]
9344
+									} else {
9345
+										cert_no = bas[1]
9346
+									}
9292 9347
 
9293
-								if his.IdCardType == 1 {
9294
-									cert_no = bas[2]
9295 9348
 								} else {
9296
-									cert_no = bas[1]
9349
+									cert_no = his.Certno
9297 9350
 								}
9351
+
9298 9352
 								//江苏地区国家医保医疗类别
9299 9353
 								//职工透析:医疗类别选特殊情况门诊9933
9300 9354
 								//居民血透门慢: 医疗类别选门诊慢病1402

+ 6 - 7
main.go Просмотреть файл

@@ -4,15 +4,14 @@ import (
4 4
 	//"github.com/qiniu/api.v7/auth/qbox"
5 5
 	//"github.com/qiniu/api.v7/storage"
6 6
 
7
-	//"gdyb/models"
8 7
 	_ "gdyb/routers"
8
+	"gdyb/service"
9 9
 	//"github.com/qiniu/api.v7/auth/qbox"
10 10
 	//"github.com/qiniu/api.v7/storage"
11 11
 
12 12
 	//"github.com/qiniu/roapi.v7/auth/qbox"
13 13
 	//"github.com/qiniu/api.v7/storage"
14 14
 
15
-	"gdyb/service"
16 15
 	"github.com/astaxie/beego"
17 16
 	//"strconv"
18 17
 	//"time"
@@ -20,13 +19,13 @@ import (
20 19
 
21 20
 func init() {
22 21
 	service.ConnectDB()
23
-	org_id, _ := beego.AppConfig.Int64("org_id")
24
-	miConfig, _ := service.FindMedicalInsuranceInfo(org_id)
22
+	//org_id, _ := beego.AppConfig.Int64("org_id")
23
+	//miConfig, _ := service.FindMedicalInsuranceInfo(org_id)
25 24
 	//CreateLog(miConfig)
26 25
 	//UploadLog(miConfig)
27
-	if org_id == 10191 {
28
-		service.GetFjAuthorizationInfo(miConfig.Code)
29
-	}
26
+	//if org_id == 10191 {
27
+	//	service.GetFjAuthorizationInfo(miConfig.Code)
28
+	//}
30 29
 }
31 30
 func main() {
32 31
 	beego.Run()

+ 2 - 2
service/fj_service.go Просмотреть файл

@@ -2695,7 +2695,7 @@ func ReadEleCard(code string) (string, string, string) {
2695 2695
 	inputData["operatorId"] = "1"
2696 2696
 	inputData["operatorName"] = "admin"
2697 2697
 	inputData["officeId"] = "001"
2698
-	inputData["officeName"] = "血透科"
2698
+	inputData["officeName"] = "111"
2699 2699
 	data["data"] = inputData
2700 2700
 	data["transType"] = "ec.query"
2701 2701
 	data["orgId"] = code
@@ -2710,7 +2710,7 @@ func ReadEleCard(code string) (string, string, string) {
2710 2710
 	if ret2 != 0 {
2711 2711
 		return "", "", ""
2712 2712
 	}
2713
-	return ConvertByte2String([]byte(DeleteExtraSpace(string(bytesData))), GB18030), ConvertByte2String([]byte(DeleteExtraSpace(string(pBusiCardInfo))), GB18030), ConvertByte2String([]byte(DeleteExtraSpace(string(pErrMsg))), GB18030)
2713
+	return ConvertToString(DeleteExtraSpace(string(bytesData)), "gbk", "utf-8"), ConvertToString(DeleteExtraSpace(string(pBusiCardInfo)), "gbk", "utf-8"), ConvertToString(DeleteExtraSpace(string(pErrMsg)), "gbk", "utf-8")
2714 2714
 
2715 2715
 }
2716 2716
 

+ 1 - 71
service/gz_gdyb_service.go Просмотреть файл

@@ -1,5 +1,6 @@
1 1
 package service
2 2
 
3
+//
3 4
 //
4 5
 //import (
5 6
 //	"bytes"
@@ -10,8 +11,6 @@ package service
10 11
 //	"fmt"
11 12
 //	"gdyb/models"
12 13
 //	"github.com/astaxie/beego"
13
-//	"github.com/go-ole/go-ole"
14
-//	"github.com/go-ole/go-ole/oleutil"
15 14
 //	"io"
16 15
 //	"io/ioutil"
17 16
 //	"log"
@@ -56,77 +55,8 @@ package service
56 55
 //	gdyb_url := beego.AppConfig.String("gdyb_url")
57 56
 //	gdyb_paasid := beego.AppConfig.String("gdyb_paasid")
58 57
 //	url := gdyb_url + "1201"
59
-//	//var str string
60
-//	//str1 := make([]byte, 1024)
61
-//
62
-//	//var x interface{}
63
-//	//s3 := make([]byte, 256)
64
-//	ole.CoInitialize(0)
65
-//	unknown, err := oleutil.CreateObject("yinhai.yh_hb_sctr")
66
-//	if err != nil {
67
-//		log.Fatal("CreateObject: ", err)
68
-//	}
69 58
 //
70
-//	xxxx := unknown.MustQueryInterface(ole.IID_IDispatch)
71 59
 //
72
-//	var str6 map[string]interface{}
73
-//
74
-//	//str6 = ""
75
-//
76
-//	////p := (*string)(unsafe.Pointer(str))
77
-//	////var str6 *string
78
-//	//var str6 *ole.VARIANT
79
-//	////str := make([]*byte, 256)
80
-//	//if err != nil {
81
-//	//	log.Fatal("QueryInterface: ", err)
82
-//	//}
83
-//	//
84
-//	r, err1 := xxxx.CallMethod("yh_hb_call", "1201", string(bytesData), str6)
85
-//	////result := oleutil.MustGetProperty(xxxx, "astr_jysc")
86
-//	//
87
-//	if err1 != nil {
88
-//		log.Fatal("CallMethod: ", err1, " | ", r)
89
-//	}
90
-//	fmt.Println("~~~~~~~")
91
-//	//fmt.Println(str6.ToString())
92
-//	fmt.Println(r.ToString())
93
-//	fmt.Println("~~~~~~~")
94
-//	//
95
-//	//xxxx.Release()
96
-//	//
97
-//	//ole.CoUninitialize()
98
-//	//
99
-//	var json2 string
100
-//	cmd := exec.Command("java", "-jar", "yh_hb_fat.jar", "1101", string(bytesData), json2)
101
-//	out, err := cmd.Output()
102
-//	if err != nil {
103
-//		fmt.Println("error:", err.Error())
104
-//	}
105
-//
106
-//	fmt.Printf("call yh_hb_call %q\n", string(out))
107
-//	fmt.Printf(json2)
108
-//	//
109
-//	//DllDef := syscall.MustLoadDLL("yh_hb_sctrl.dll")
110
-//	//Iinit := DllDef.MustFindProc("DllGetClassObject")
111
-//
112
-//	//ole.CoInitialize(0)
113
-//	//
114
-//	//ole.CLSIDFromProgID("yinhai.yh_hb_sctr")
115
-//	//
116
-//	//
117
-//	//unknown, err := CreateInstance(clsid, IID_IUnknown)
118
-//	//if err != nil {
119
-//	//	return
120
-//	//}
121
-//	//defer unknown.Release()
122
-//	//
123
-//	//dispatch, err := unknown.QueryInterface(IID_IDispatch)
124
-//	//if err != nil {
125
-//	//	return
126
-//	//}
127
-//	//
128
-//	//
129
-//	//
130 60
 //
131 61
 //	request, err := http.NewRequest("POST", url, reader)
132 62
 //	if err != nil {

+ 1 - 1
service/his_service.go Просмотреть файл

@@ -1421,7 +1421,7 @@ func GetAllHisOrder(org_id int64) (his []*models.HisOrder, err error) {
1421 1421
 	return
1422 1422
 }
1423 1423
 func GetAllHisOrderErr(org_id int64, stage int64) (his []*models.HisOrderError, err error) {
1424
-	err = readDb.Model(&models.HisOrderError{}).Where("user_org_id = ? AND status = 1 AND stage = ?", org_id, stage).Find(&his).Error
1424
+	err = readDb.Model(&models.HisOrderError{}).Where("user_org_id = ? AND status = 1 AND stage = 101060", org_id).Find(&his).Error
1425 1425
 	return
1426 1426
 }
1427 1427