Quellcode durchsuchen

Merge branch 'master' of http://git.shengws.com/csx/gdyb

csx vor 3 Jahren
Ursprung
Commit
e5229e6ab3
4 geänderte Dateien mit 17 neuen und 31 gelöschten Zeilen
  1. 3 3
      conf/app.conf
  2. 6 6
      controllers/sg/gdyb_controller.go
  3. 1 8
      controllers/sg/his_api_controller.go
  4. 7 14
      service/his_service.go

+ 3 - 3
conf/app.conf Datei anzeigen

45
 
45
 
46
 
46
 
47
 [prod]
47
 [prod]
48
-org_id = 10188
48
+org_id = 9919
49
 mobile_token_expiration_second = 86400
49
 mobile_token_expiration_second = 86400
50
 httpdomain = https://api.xt.kuyicloud.com
50
 httpdomain = https://api.xt.kuyicloud.com
51
 sso_domain = https://sso.kuyicloud.com
51
 sso_domain = https://sso.kuyicloud.com
57
 # gdyb_url="http://igb.hsa.gdgov.cn/ebus/sz_prd/hsa/hgs/"
57
 # gdyb_url="http://igb.hsa.gdgov.cn/ebus/sz_prd/hsa/hgs/"
58
 #内蒙古
58
 #内蒙古
59
 # gdyb_url = "http://10.38.23.105:8090/uif-hsaf-med-api/api/medical/service/"
59
 # gdyb_url = "http://10.38.23.105:8090/uif-hsaf-med-api/api/medical/service/"
60
-# gdyb_paasid = "sg03_prd"
60
+gdyb_paasid = "sg03_prd"
61
 # gdyb_paasid = "jm_sc_yjyy"
61
 # gdyb_paasid = "jm_sc_yjyy"
62
 # gdyb_paasid="zh_prd_yrojyy"
62
 # gdyb_paasid="zh_prd_yrojyy"
63
 #gdyb_paasid = "sz_prd_yjyy"
63
 #gdyb_paasid = "sz_prd_yjyy"
64
-gdyb_paasid = "zq_prd_yjyy"
64
+# gdyb_paasid = "zq_prd_yjyy"
65
 
65
 
66
 
66
 
67
 
67
 

+ 6 - 6
controllers/sg/gdyb_controller.go Datei anzeigen

403
 	fmt.Println(stmtBegndate)
403
 	fmt.Println(stmtBegndate)
404
 	fmt.Println(stmtEnddate)
404
 	fmt.Println(stmtEnddate)
405
 	fmt.Println(medfeeSumamt)
405
 	fmt.Println(medfeeSumamt)
406
-	clrType = "11"
407
-	//if len(clrType) == 0 {
408
-	//	clrType = "11"
409
-	//} else {
410
-	//	clrType = "9903"
411
-	//}
406
+	//clrType = "11"
407
+	if len(clrType) == 0 {
408
+		clrType = "11"
409
+	} else {
410
+		clrType = "9903"
411
+	}
412
 	baseParams := models.BaseParams{
412
 	baseParams := models.BaseParams{
413
 		SecretKey:      secret_key,
413
 		SecretKey:      secret_key,
414
 		FixmedinsCode:  fixmedins_code,
414
 		FixmedinsCode:  fixmedins_code,

+ 1 - 8
controllers/sg/his_api_controller.go Datei anzeigen

4303
 							order.AcctMulaidPay = res.Output.Setlinfo.AcctMulaidPay
4303
 							order.AcctMulaidPay = res.Output.Setlinfo.AcctMulaidPay
4304
 							order.MedinsSetlId = res.Output.Setlinfo.MedinsSetlID
4304
 							order.MedinsSetlId = res.Output.Setlinfo.MedinsSetlID
4305
 							order.ClrOptins = res.Output.Setlinfo.ClrOptins
4305
 							order.ClrOptins = res.Output.Setlinfo.ClrOptins
4306
+							order.ClrType = res.Output.Setlinfo.ClrType
4306
 							order.ClrWay = res.Output.Setlinfo.ClrWay
4307
 							order.ClrWay = res.Output.Setlinfo.ClrWay
4307
 							order.Creator = order.Creator
4308
 							order.Creator = order.Creator
4308
 							order.Modify = roles.AdminUserId
4309
 							order.Modify = roles.AdminUserId
6964
 	startime, _ := time.ParseInLocation(timeLayout+" 15:04:05", start_time+" 00:00:00", loc)
6965
 	startime, _ := time.ParseInLocation(timeLayout+" 15:04:05", start_time+" 00:00:00", loc)
6965
 	endtime, _ := time.ParseInLocation(timeLayout+" 15:04:05", end_time+" 23:59:59", loc)
6966
 	endtime, _ := time.ParseInLocation(timeLayout+" 15:04:05", end_time+" 23:59:59", loc)
6966
 	orders, _ := service.GetOrderByTime(startime.Unix(), endtime.Unix(), adminUser.CurrentOrgId, insutype, clr_org, clr_type)
6967
 	orders, _ := service.GetOrderByTime(startime.Unix(), endtime.Unix(), adminUser.CurrentOrgId, insutype, clr_org, clr_type)
6967
-	//orders_two, _ := service.GetOrderByTimeThree(startime.Unix(), endtime.Unix(), adminUser.CurrentOrgId, insutype, clr_type)
6968
 	fixmedins_setl_cnt := int64(len(orders))
6968
 	fixmedins_setl_cnt := int64(len(orders))
6969
-	//
6970
-	////撤销的算2条数据为一笔
6971
-	//for _, item := range orders_two {
6972
-	//	if item.OrderStatus == 3 {
6973
-	//		fixmedins_setl_cnt = fixmedins_setl_cnt + 1
6974
-	//	}
6975
-	//}
6976
 	var medfee_sumamt float64
6969
 	var medfee_sumamt float64
6977
 	var acct_pay float64
6970
 	var acct_pay float64
6978
 	var fund_pay_sumamt float64
6971
 	var fund_pay_sumamt float64

+ 7 - 14
service/his_service.go Datei anzeigen

965
 }
965
 }
966
 
966
 
967
 func GetOrderByTime(start_time int64, end_time int64, org_id int64, insutype string, clr_org string, clr_type string) (orders []*models.HisOrder, err error) {
967
 func GetOrderByTime(start_time int64, end_time int64, org_id int64, insutype string, clr_org string, clr_type string) (orders []*models.HisOrder, err error) {
968
-
968
+	db := readDb.Model(&models.HisOrder{})
969
+	db = db.Where("user_org_id = ? AND status = 1 AND order_status = 2 AND is_medicine_insurance = 1 AND UNIX_TIMESTAMP(setl_time)  <= ? AND UNIX_TIMESTAMP(setl_time) >= ? AND insutype = ?", org_id, end_time, start_time, insutype)
969
 	if len(clr_org) > 0 {
970
 	if len(clr_org) > 0 {
970
-		if len(clr_type) > 0 {
971
-			err = readDb.Model(&models.HisOrder{}).Where("user_org_id = ? AND status = 1 AND order_status = 2 AND is_medicine_insurance = 1 AND UNIX_TIMESTAMP(setl_time)  <= ? AND UNIX_TIMESTAMP(setl_time) >= ? AND insutype = ? AND clr_type = ? AND clr_optins = ?", org_id, end_time, start_time, insutype, clr_type, clr_org).Find(&orders).Error
972
-		} else {
973
-			err = readDb.Model(&models.HisOrder{}).Where("user_org_id = ? AND status = 1 AND order_status = 2 AND is_medicine_insurance = 1 AND UNIX_TIMESTAMP(setl_time)  <= ? AND UNIX_TIMESTAMP(setl_time) >= ? AND insutype = ? AND clr_optins = ?", org_id, end_time, start_time, insutype, clr_org).Find(&orders).Error
974
-			//err = readDb.Model(&models.HisOrder{}).Where("user_org_id = ? AND status = 1 AND order_status = 2 AND is_medicine_insurance = 1 AND UNIX_TIMESTAMP(setl_time)  <= ? AND UNIX_TIMESTAMP(setl_time) >= ? AND insutype = ? ", org_id, end_time, start_time, insutype).Find(&orders).Error
975
-		}
976
-	} else {
977
-		if len(clr_type) > 0 {
978
-			err = readDb.Model(&models.HisOrder{}).Where("user_org_id = ? AND status = 1 AND order_status = 2 AND is_medicine_insurance = 1 AND UNIX_TIMESTAMP(setl_time)  <= ? AND UNIX_TIMESTAMP(setl_time) >= ? AND insutype = ? AND clr_type = ?", org_id, end_time, start_time, insutype, clr_type).Find(&orders).Error
979
-		} else {
980
-			err = readDb.Model(&models.HisOrder{}).Where("user_org_id = ? AND status = 1 AND order_status = 2 AND is_medicine_insurance = 1 AND UNIX_TIMESTAMP(setl_time)  <= ? AND UNIX_TIMESTAMP(setl_time) >= ? AND insutype = ? ", org_id, end_time, start_time, insutype).Find(&orders).Error
981
-
982
-		}
971
+		db = db.Where("clr_optins = ?", clr_org)
972
+	}
973
+	if len(clr_type) > 0 {
974
+		db = db.Where("clr_type = ?", clr_type)
983
 	}
975
 	}
976
+	err = db.Find(&orders).Error
984
 	return
977
 	return
985
 }
978
 }
986
 
979