test_user 1 år sedan
förälder
incheckning
a280ae4497
5 ändrade filer med 42 tillägg och 41 borttagningar
  1. 1 1
      controllers/sg/his_api_controller.go
  2. 1 1
      main.go
  3. 11 10
      service/dianzichufang.go
  4. 1 1
      service/his_service.go
  5. 28 28
      service/jx_service.go

+ 1 - 1
controllers/sg/his_api_controller.go Visa fil

@@ -205,7 +205,7 @@ func (c *HisApiController) GetCFYLJG001() {
205 205
 			drug.MedcBegntime = timeFormatTwo
206 206
 			if subItem.Day > 0 {
207 207
 				ts := time.Unix(subItem.StartTime, 0)
208
-				record_time = ts.AddDate(0, 0, int(subItem.Day)).Unix()
208
+				record_time := ts.AddDate(0, 0, int(subItem.Day)).Unix()
209 209
 				tempTime3 := time.Unix(record_time, 0)
210 210
 				timeFormat3 := tempTime3.Format("2006-01-02") + " 23:59:00"
211 211
 				drug.MedcEndtime = timeFormat3

+ 1 - 1
main.go Visa fil

@@ -43,7 +43,7 @@ func main() {
43 43
 	//service.AutoUploadData
44 44
 
45 45
 	//台山百伦清单上传方法
46
-	//GetBatchSettleList()
46
+	GetBatchSettleList()
47 47
 
48 48
 	//深圳百霖
49 49
 	//GetblBatchSettleList()

+ 11 - 10
service/dianzichufang.go Visa fil

@@ -5,6 +5,7 @@ import (
5 5
 	"encoding/json"
6 6
 	"fmt"
7 7
 	"gdyb/models"
8
+	"github.com/astaxie/beego"
8 9
 	"io/ioutil"
9 10
 	"net/http"
10 11
 	"strconv"
@@ -290,8 +291,8 @@ func GetCFYLJG003(org_name string, doctor string, fixmedins_code string, insuplc
290 291
 	signature := setSignature(timestamp, nonce, secret_key)
291 292
 	//生成输入报文
292 293
 	inputMessage := SetInputMessage(nonce, timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs)
293
-	input := make(map[string]interface{})
294
-	inputDatas := make([]map[string]interface{}, 0)
294
+	//input := make(map[string]interface{})
295
+	inputData := make(map[string]interface{})
295 296
 
296 297
 	inputMessage["infno"] = "CFYLJG003"
297 298
 
@@ -375,8 +376,8 @@ func GetCFYLJG004(org_name string, doctor string, fixmedins_code string, insuplc
375 376
 	signature := setSignature(timestamp, nonce, secret_key)
376 377
 	//生成输入报文
377 378
 	inputMessage := SetInputMessage(nonce, timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs)
378
-	input := make(map[string]interface{})
379
-	inputDatas := make([]map[string]interface{}, 0)
379
+	inputData := make(map[string]interface{})
380
+	//inputDatas := make([]map[string]interface{}, 0)
380 381
 
381 382
 	inputMessage["infno"] = "CFYLJG004"
382 383
 
@@ -446,8 +447,8 @@ func GetCFYLJG005(org_name string, doctor string, fixmedins_code string, insuplc
446 447
 	signature := setSignature(timestamp, nonce, secret_key)
447 448
 	//生成输入报文
448 449
 	inputMessage := SetInputMessage(nonce, timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs)
449
-	input := make(map[string]interface{})
450
-	inputDatas := make([]map[string]interface{}, 0)
450
+	inputData := make(map[string]interface{})
451
+	//inputDatas := make([]map[string]interface{}, 0)
451 452
 
452 453
 	inputMessage["infno"] = "CFYLJG005"
453 454
 
@@ -517,8 +518,8 @@ func GetCFYLJG006(org_name string, doctor string, fixmedins_code string, insuplc
517 518
 	signature := setSignature(timestamp, nonce, secret_key)
518 519
 	//生成输入报文
519 520
 	inputMessage := SetInputMessage(nonce, timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs)
520
-	input := make(map[string]interface{})
521
-	inputDatas := make([]map[string]interface{}, 0)
521
+	inputData := make(map[string]interface{})
522
+	//inputDatas := make([]map[string]interface{}, 0)
522 523
 
523 524
 	inputMessage["infno"] = "CFYLJG006"
524 525
 
@@ -585,8 +586,8 @@ func GetCFYLJG007(org_name string, doctor string, fixmedins_code string, insuplc
585 586
 	signature := setSignature(timestamp, nonce, secret_key)
586 587
 	//生成输入报文
587 588
 	inputMessage := SetInputMessage(nonce, timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs)
588
-	input := make(map[string]interface{})
589
-	inputDatas := make([]map[string]interface{}, 0)
589
+	inputData := make(map[string]interface{})
590
+	//inputDatas := make([]map[string]interface{}, 0)
590 591
 
591 592
 	inputMessage["infno"] = "CFYLJG007"
592 593
 

+ 1 - 1
service/his_service.go Visa fil

@@ -1485,7 +1485,7 @@ func GetAllHisOrderTwo(org_id int64) (his []*models.HisOrder, err error) {
1485 1485
 }
1486 1486
 
1487 1487
 func GetAllHisOrder10106(org_id int64) (his []*models.HisOrder, err error) {
1488
-	err = readDb.Model(&models.HisOrder{}).Where("user_org_id = 10106  AND status = 1  AND  order_status = 2 AND setl_id <> ''  AND med_type = '14' AND setl_time >= '2023-05-01 00:00:00' AND setl_time <= '2023-05-31 00:00:00'").Order("setl_time asc").Find(&his).Error
1488
+	err = readDb.Model(&models.HisOrder{}).Where("user_org_id = 10106  AND status = 1  AND  order_status = 2 AND setl_id <> ''  AND med_type = '14' AND setl_time >= '2023-06-01 00:00:00' AND setl_time <= '2023-06-30 23:59:00'").Order("setl_time asc").Find(&his).Error
1489 1489
 	fmt.Println(err)
1490 1490
 	return
1491 1491
 }

+ 28 - 28
service/jx_service.go Visa fil

@@ -2590,34 +2590,34 @@ func Jxyb3261(stmt_mon string, setl_optins string, org_name string, doctor strin
2590 2590
 	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3261"), string(bytesData)
2591 2591
 }
2592 2592
 
2593
-func Jxyb3262(stmt_mon string, setl_optins string, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, request_url string, access_key string, secret_key string, cainfo string) (string, string) {
2594
-	// 生成签名
2595
-	timestamp := time.Now().Unix()
2596
-	// 生成输入报文
2597
-	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2598
-	input := make(map[string]interface{})
2599
-	inputData := make(map[string]interface{})
2600
-	inputMessage["infno"] = "3262" // 交易编码
2601
-	inputData["fixmedins_code"] = fixmedins_code
2602
-	inputData["fixmedins_name"] = org_name
2603
-	inputData["fix_fill_dept"] = fix_fill_dept
2604
-	inputData["fix_fill_psn_id"] = fix_fill_psn_id
2605
-	inputData["fix_fill_psn"] = fix_fill_psn
2606
-	inputData["fix_fill_date"] = fix_fill_date
2607
-	inputData["stmt_loc"] = stmt_loc
2608
-	inputData["upld_btch"] = upld_btch
2609
-
2610
-	input["data"] = inputData
2611
-	inputMessage["input"] = input //交易输入
2612
-	bytesData, err := json.Marshal(inputMessage)
2613
-	fmt.Println(string(bytesData))
2614
-	if err != nil {
2615
-		fmt.Println(err.Error())
2616
-		return err.Error(), ""
2617
-	}
2618
-	request_url = request_url + "3261"
2619
-	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3261"), string(bytesData)
2620
-}
2593
+//func Jxyb3262(stmt_mon string, setl_optins string, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, request_url string, access_key string, secret_key string, cainfo string) (string, string) {
2594
+//	// 生成签名
2595
+//	timestamp := time.Now().Unix()
2596
+//	// 生成输入报文
2597
+//	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2598
+//	input := make(map[string]interface{})
2599
+//	inputData := make(map[string]interface{})
2600
+//	inputMessage["infno"] = "3262" // 交易编码
2601
+//	inputData["fixmedins_code"] = fixmedins_code
2602
+//	inputData["fixmedins_name"] = org_name
2603
+//	inputData["fix_fill_dept"] = fix_fill_dept
2604
+//	inputData["fix_fill_psn_id"] = fix_fill_psn_id
2605
+//	inputData["fix_fill_psn"] = fix_fill_psn
2606
+//	inputData["fix_fill_date"] = fix_fill_date
2607
+//	inputData["stmt_loc"] = stmt_loc
2608
+//	inputData["upld_btch"] = upld_btch
2609
+//
2610
+//	input["data"] = inputData
2611
+//	inputMessage["input"] = input //交易输入
2612
+//	bytesData, err := json.Marshal(inputMessage)
2613
+//	fmt.Println(string(bytesData))
2614
+//	if err != nil {
2615
+//		fmt.Println(err.Error())
2616
+//		return err.Error(), ""
2617
+//	}
2618
+//	request_url = request_url + "3261"
2619
+//	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3261"), string(bytesData)
2620
+//}
2621 2621
 
2622 2622
 func Jxyb3263(fixmedins_setl_cnt int64, acct_pay float64, fund_pay_sumamt float64, medfee_sumamt float64, stmt_begndate string, stmt_enddate string, setl_optins string, clr_type string, insutype string, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, request_url string, access_key string, secret_key string, cainfo string) (string, string) {
2623 2623
 	// 生成签名