test_user 1 year ago
parent
commit
a280ae4497
5 changed files with 42 additions and 41 deletions
  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 View File

205
 			drug.MedcBegntime = timeFormatTwo
205
 			drug.MedcBegntime = timeFormatTwo
206
 			if subItem.Day > 0 {
206
 			if subItem.Day > 0 {
207
 				ts := time.Unix(subItem.StartTime, 0)
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
 				tempTime3 := time.Unix(record_time, 0)
209
 				tempTime3 := time.Unix(record_time, 0)
210
 				timeFormat3 := tempTime3.Format("2006-01-02") + " 23:59:00"
210
 				timeFormat3 := tempTime3.Format("2006-01-02") + " 23:59:00"
211
 				drug.MedcEndtime = timeFormat3
211
 				drug.MedcEndtime = timeFormat3

+ 1 - 1
main.go View File

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

+ 11 - 10
service/dianzichufang.go View File

5
 	"encoding/json"
5
 	"encoding/json"
6
 	"fmt"
6
 	"fmt"
7
 	"gdyb/models"
7
 	"gdyb/models"
8
+	"github.com/astaxie/beego"
8
 	"io/ioutil"
9
 	"io/ioutil"
9
 	"net/http"
10
 	"net/http"
10
 	"strconv"
11
 	"strconv"
290
 	signature := setSignature(timestamp, nonce, secret_key)
291
 	signature := setSignature(timestamp, nonce, secret_key)
291
 	//生成输入报文
292
 	//生成输入报文
292
 	inputMessage := SetInputMessage(nonce, timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs)
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
 	inputMessage["infno"] = "CFYLJG003"
297
 	inputMessage["infno"] = "CFYLJG003"
297
 
298
 
375
 	signature := setSignature(timestamp, nonce, secret_key)
376
 	signature := setSignature(timestamp, nonce, secret_key)
376
 	//生成输入报文
377
 	//生成输入报文
377
 	inputMessage := SetInputMessage(nonce, timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs)
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
 	inputMessage["infno"] = "CFYLJG004"
382
 	inputMessage["infno"] = "CFYLJG004"
382
 
383
 
446
 	signature := setSignature(timestamp, nonce, secret_key)
447
 	signature := setSignature(timestamp, nonce, secret_key)
447
 	//生成输入报文
448
 	//生成输入报文
448
 	inputMessage := SetInputMessage(nonce, timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs)
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
 	inputMessage["infno"] = "CFYLJG005"
453
 	inputMessage["infno"] = "CFYLJG005"
453
 
454
 
517
 	signature := setSignature(timestamp, nonce, secret_key)
518
 	signature := setSignature(timestamp, nonce, secret_key)
518
 	//生成输入报文
519
 	//生成输入报文
519
 	inputMessage := SetInputMessage(nonce, timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs)
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
 	inputMessage["infno"] = "CFYLJG006"
524
 	inputMessage["infno"] = "CFYLJG006"
524
 
525
 
585
 	signature := setSignature(timestamp, nonce, secret_key)
586
 	signature := setSignature(timestamp, nonce, secret_key)
586
 	//生成输入报文
587
 	//生成输入报文
587
 	inputMessage := SetInputMessage(nonce, timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs)
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
 	inputMessage["infno"] = "CFYLJG007"
592
 	inputMessage["infno"] = "CFYLJG007"
592
 
593
 

+ 1 - 1
service/his_service.go View File

1485
 }
1485
 }
1486
 
1486
 
1487
 func GetAllHisOrder10106(org_id int64) (his []*models.HisOrder, err error) {
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
 	fmt.Println(err)
1489
 	fmt.Println(err)
1490
 	return
1490
 	return
1491
 }
1491
 }

+ 28 - 28
service/jx_service.go View File

2590
 	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3261"), string(bytesData)
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
 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) {
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
 	// 生成签名