test_user před 3 týdny
rodič
revize
287aaa1075
2 změnil soubory, kde provedl 27 přidání a 16 odebrání
  1. 19 13
      controllers/sg/his_api_controller.go
  2. 8 3
      service/hn_service.go

+ 19 - 13
controllers/sg/his_api_controller.go Zobrazit soubor

@@ -108,7 +108,7 @@ func HisManagerApiRegistRouters() {
108 108
 
109 109
 	beego.Router("/api/readele", &HisApiController{}, "get:ReadEleToken")
110 110
 
111
-	beego.Router("/api/2505", &HisApiController{}, "get:Get2505")
111
+	//beego.Router("/api/2505", &HisApiController{}, "get:Get2505")
112 112
 
113 113
 	beego.Router("/api/4201A", &HisApiController{}, "get:Get4201A")
114 114
 	beego.Router("/api/4202", &HisApiController{}, "get:Get4202")
@@ -176,7 +176,7 @@ func HisManagerApiRegistRouters() {
176 176
 
177 177
 	beego.Router("/api/2406", &HisApiController{}, "get:Get2406")
178 178
 
179
-	beego.Router("/api/2503", &HisApiController{}, "get:Get2503")
179
+	//beego.Router("/api/2503", &HisApiController{}, "get:Get2503")
180 180
 
181 181
 	beego.Router("/api/1318", &HisApiController{}, "get:Get1318")
182 182
 
@@ -9120,7 +9120,7 @@ func (c *HisApiController) Get3103() {
9120 9120
 	curRoles, _ := service.GetAdminUserInfoByID(c.GetAdminUserInfo().CurrentOrgId, admin_user_id)
9121 9121
 	result, requestLog := service.Gdyb3103(miConfig.OrgName, curRoles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, warm_type, warm_ids, fk_state, desc)
9122 9122
 	saveLog(result, requestLog, "3103", "反馈")
9123
-	var res2 ResultSix
9123
+	var res2 ResultSix3103
9124 9124
 	var respJSON2 map[string]interface{}
9125 9125
 	if err := json.Unmarshal([]byte(string(result)), &respJSON2); err != nil {
9126 9126
 		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
@@ -9148,13 +9148,7 @@ func (c *HisApiController) Get3103() {
9148 9148
 	}
9149 9149
 }
9150 9150
 
9151
-func (c *HisApiController) Get3103() {
9152
-	admin_user_id, _ := c.GetInt64("admin_user_id")
9153
-	miConfig, _ := service.FindMedicalInsuranceInfo(10375)
9154
-	curRoles, _ := service.GetAdminUserInfoByID(c.GetAdminUserInfo().CurrentOrgId, admin_user_id)
9155 9151
 
9156
-	service.Gdyb2505("45000000000008100145868008", curRoles.UserName, miConfig.OrgName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, "2024-01-12 09:00:00", "2026-12-31 23:00:00", admin_user_id)
9157
-}
9158 9152
 
9159 9153
 func (c *HisApiController) Get4201A() {
9160 9154
 	order_id, _ := c.GetInt64("order_id")
@@ -23807,6 +23801,18 @@ type ResultSix struct {
23807 23801
 	WarnMsg     interface{} `json:"warn_msg"`
23808 23802
 }
23809 23803
 
23804
+type ResultSix3103 struct {
23805
+	Cainfo      interface{} `json:"cainfo"`
23806
+	ErrMsg      string      `json:"err_msg"`
23807
+	InfRefmsgid string      `json:"inf_refmsgid"`
23808
+	Infcode     int64       `json:"infcode"`
23809
+
23810
+	RefmsgTime  string      `json:"refmsg_time"`
23811
+	RespondTime string      `json:"respond_time"`
23812
+	Signtype    interface{} `json:"signtype"`
23813
+	WarnMsg     interface{} `json:"warn_msg"`
23814
+}
23815
+
23810 23816
 type FJ3507Result struct {
23811 23817
 	Cainfo      interface{} `json:"cainfo"`
23812 23818
 	ErrMsg      string      `json:"err_msg"`
@@ -27005,7 +27011,7 @@ func (c *HisApiController) GetRegisterInfo() {
27005 27011
 										"failed_code": -10,
27006 27012
 										"failed_type": 100,
27007 27013
 										"warm_type":   1,
27008
-										"msg":         res3101.Output.Result,
27014
+										"msg":         res3101,
27009 27015
 									})
27010 27016
 									return
27011 27017
 								} else {
@@ -30561,7 +30567,7 @@ func (c *HisApiController) GetUploadInfo() {
30561 30567
 									"failed_code": -10,
30562 30568
 									"failed_type": 100,
30563 30569
 									"warm_type":   2,
30564
-									"msg":         result3101.Output.Result,
30570
+									"msg":         result3101,
30565 30571
 								})
30566 30572
 								return
30567 30573
 							}
@@ -32515,7 +32521,7 @@ func (c *HisApiController) GetPreUploadInfo() {
32515 32521
 										"failed_code": -10,
32516 32522
 										"failed_type": 100,
32517 32523
 										"warm_type":   1,
32518
-										"msg":         result3101.Output.Result,
32524
+										"msg":         result3101,
32519 32525
 									})
32520 32526
 									return
32521 32527
 								} else {
@@ -33926,7 +33932,7 @@ func (c *HisApiController) GetPreUploadInfo() {
33926 33932
 											"failed_code": -10,
33927 33933
 											"failed_type": 100,
33928 33934
 											"warm_type":   2,
33929
-											"msg":         result3101.Output.Result,
33935
+											"msg":         result3101,
33930 33936
 										})
33931 33937
 										return
33932 33938
 									} else {

+ 8 - 3
service/hn_service.go Zobrazit soubor

@@ -411,16 +411,17 @@ func Hnyb2204(psnNo string, mdtrtId string, hisPrescription []*models.HisPrescri
411 411
 	//timestamp := time.Now().Unix()
412 412
 	//timestamp := time.Now().Unix()
413 413
 
414
-	timestamp2 := time.Now().Unix()
414
+	//timestamp2 := time.Now().Unix()
415
+
415 416
 
416
-	tempTime := time.Unix(timestamp2, 0)
417
-	timeFormatOne := tempTime.Format("2006-01-02 15:04:05")
418 417
 	var customs []*Custom
419 418
 	for _, item := range hisPrescription {
420 419
 		//tm := time.Unix(item.PreTime, 0)
421 420
 
422 421
 		if item.Type == 1 { //药品
423 422
 			for _, subItem := range item.HisDoctorAdviceInfo {
423
+				tempTime := time.Unix(subItem.StartTime, 0)
424
+				timeFormatOne := tempTime.Format("2006-01-02 15:04:05")
424 425
 				if len(subItem.BaseDrugLib.MedicalInsuranceNumber) > 0 {
425 426
 					//var randNum int
426 427
 					//randNum = rand.Intn(10000) + 1000
@@ -449,6 +450,8 @@ func Hnyb2204(psnNo string, mdtrtId string, hisPrescription []*models.HisPrescri
449 450
 
450 451
 		if item.Type == 2 { //项目
451 452
 			for _, subItem := range item.HisPrescriptionProject {
453
+				tempTime := time.Unix(subItem.StartTime, 0)
454
+				timeFormatOne := tempTime.Format("2006-01-02 15:04:05")
452 455
 				//var randNum int
453 456
 				//randNum = rand.Intn(10000) + 1000
454 457
 				if subItem.Type == 2 {
@@ -471,6 +474,8 @@ func Hnyb2204(psnNo string, mdtrtId string, hisPrescription []*models.HisPrescri
471 474
 					}
472 475
 
473 476
 				} else if subItem.Type == 3 {
477
+					tempTime := time.Unix(subItem.StartTime, 0)
478
+					timeFormatOne := tempTime.Format("2006-01-02 15:04:05")
474 479
 					if len(subItem.GoodInfo.MedicalInsuranceNumber) > 0 {
475 480
 						cnt, _ := strconv.ParseFloat(subItem.Count, 64)
476 481