csx 4 years ago
parent
commit
4f9f1e071e
2 changed files with 16 additions and 9 deletions
  1. 3 2
      conf/app.conf
  2. 13 7
      controllers/his_api_controller.go

+ 3 - 2
conf/app.conf View File

1
 appname = 血透
1
 appname = 血透
2
 httpport = 9532
2
 httpport = 9532
3
-runmode = dev
3
+runmode = prod
4
 
4
 
5
 #
5
 #
6
 copyrequestbody = true
6
 copyrequestbody = true
44
 
44
 
45
 
45
 
46
 [prod]
46
 [prod]
47
+org_id = 9919
47
 mobile_token_expiration_second = 86400
48
 mobile_token_expiration_second = 86400
48
 httpdomain = https://api.xt.kuyicloud.com
49
 httpdomain = https://api.xt.kuyicloud.com
49
 sso_domain = https://sso.kuyicloud.com
50
 sso_domain = https://sso.kuyicloud.com
147
 call_domain = http://hf.szjkhd.com
148
 call_domain = http://hf.szjkhd.com
148
 front_end_domain = "http://xt.test.sgjyun.com/#"
149
 front_end_domain = "http://xt.test.sgjyun.com/#"
149
 
150
 
150
-org_id = 9919
151
+org_id = 4
151
 
152
 
152
 
153
 
153
 readmysqlhost = rm-wz9rg531npf61q03tro.mysql.rds.aliyuncs.com
154
 readmysqlhost = rm-wz9rg531npf61q03tro.mysql.rds.aliyuncs.com

+ 13 - 7
controllers/his_api_controller.go View File

380
 	settlementValue, _ := c.GetInt64("settlement_value")
380
 	settlementValue, _ := c.GetInt64("settlement_value")
381
 	social_type, _ := c.GetInt64("social_type")
381
 	social_type, _ := c.GetInt64("social_type")
382
 	medical_insurance_card := c.GetString("medical_insurance_card")
382
 	medical_insurance_card := c.GetString("medical_insurance_card")
383
+	admin_user_id, _ := c.GetInt64("admin_user_id")
384
+
383
 	timeLayout := "2006-01-02"
385
 	timeLayout := "2006-01-02"
384
 	loc, _ := time.LoadLocation("Local")
386
 	loc, _ := time.LoadLocation("Local")
385
 	birthdays, _ := time.ParseInLocation(timeLayout+" 15:04:05", birthday+" 00:00:00", loc)
387
 	birthdays, _ := time.ParseInLocation(timeLayout+" 15:04:05", birthday+" 00:00:00", loc)
474
 				PatientId:              patient.ID,
476
 				PatientId:              patient.ID,
475
 				RecordDate:             theTime.Unix(),
477
 				RecordDate:             theTime.Unix(),
476
 				UserOrgId:              adminInfo.CurrentOrgId,
478
 				UserOrgId:              adminInfo.CurrentOrgId,
477
-				AdminUserId:            adminInfo.AdminUser.Id,
479
+				AdminUserId:            admin_user_id,
478
 				IsReturn:               1,
480
 				IsReturn:               1,
479
 			}
481
 			}
480
 
482
 
653
 				RegisterType:           register_type,
655
 				RegisterType:           register_type,
654
 				RegisterCost:           registration_fee,
656
 				RegisterCost:           registration_fee,
655
 				TreatmentCost:          medical_expenses,
657
 				TreatmentCost:          medical_expenses,
656
-				AdminUserId:            adminInfo.AdminUser.Id,
658
+				AdminUserId:            admin_user_id,
657
 				UserOrgId:              adminInfo.CurrentOrgId,
659
 				UserOrgId:              adminInfo.CurrentOrgId,
658
 				Status:                 1,
660
 				Status:                 1,
659
 				RecordDate:             recordDateTime,
661
 				RecordDate:             recordDateTime,
687
 	private_price, _ := c.GetFloat("private_price")
689
 	private_price, _ := c.GetFloat("private_price")
688
 
690
 
689
 	settle_accounts_type, _ := c.GetInt64("settle_accounts_type")
691
 	settle_accounts_type, _ := c.GetInt64("settle_accounts_type")
692
+	//admin_user_id, _ := c.GetInt64("admin_user_id")
690
 
693
 
691
 	timeLayout := "2006-01-02"
694
 	timeLayout := "2006-01-02"
692
 	loc, _ := time.LoadLocation("Local")
695
 	loc, _ := time.LoadLocation("Local")
1524
 	end_time := c.GetString("end_time")
1527
 	end_time := c.GetString("end_time")
1525
 	insutype := c.GetString("insutype")
1528
 	insutype := c.GetString("insutype")
1526
 	clr_type := c.GetString("clr_type")
1529
 	clr_type := c.GetString("clr_type")
1530
+	admin_user_id, _ := c.GetInt64("admin_user_id")
1527
 
1531
 
1528
 	adminUser := c.GetAdminUserInfo()
1532
 	adminUser := c.GetAdminUserInfo()
1529
 	miConfig, _ := service.FindMedicalInsuranceInfo(adminUser.CurrentOrgId)
1533
 	miConfig, _ := service.FindMedicalInsuranceInfo(adminUser.CurrentOrgId)
1549
 	}
1553
 	}
1550
 
1554
 
1551
 	var user_name string
1555
 	var user_name string
1552
-	role, _ := service.GetAdminUserInfoByID(adminUser.CurrentOrgId, adminUser.AdminUser.Id)
1556
+	role, _ := service.GetAdminUserInfoByID(adminUser.CurrentOrgId, admin_user_id)
1553
 	if role.ID == 0 {
1557
 	if role.ID == 0 {
1554
 		user_name = "xxx"
1558
 		user_name = "xxx"
1555
 	} else {
1559
 	} else {
1618
 func (c *HisApiController) GetCheckDetailAccount() {
1622
 func (c *HisApiController) GetCheckDetailAccount() {
1619
 	start_time := c.GetString("start_time")
1623
 	start_time := c.GetString("start_time")
1620
 	end_time := c.GetString("end_time")
1624
 	end_time := c.GetString("end_time")
1625
+	admin_user_id, _ := c.GetInt64("admin_user_id")
1621
 
1626
 
1622
 	adminUser := c.GetAdminUserInfo()
1627
 	adminUser := c.GetAdminUserInfo()
1623
 	miConfig, _ := service.FindMedicalInsuranceInfo(adminUser.CurrentOrgId)
1628
 	miConfig, _ := service.FindMedicalInsuranceInfo(adminUser.CurrentOrgId)
1679
 	if config.IsOpen == 1 {
1684
 	if config.IsOpen == 1 {
1680
 
1685
 
1681
 		var user_name string
1686
 		var user_name string
1682
-		role, _ := service.GetAdminUserInfoByID(adminUser.CurrentOrgId, adminUser.AdminUser.Id)
1687
+		role, _ := service.GetAdminUserInfoByID(adminUser.CurrentOrgId, admin_user_id)
1683
 		if role.ID == 0 {
1688
 		if role.ID == 0 {
1684
-			user_name = "xxx"
1689
+			user_name = "管理员"
1685
 		} else {
1690
 		} else {
1686
 			user_name = role.UserName
1691
 			user_name = role.UserName
1687
 		}
1692
 		}
1772
 	//id, _ := c.GetInt64("id")
1777
 	//id, _ := c.GetInt64("id")
1773
 	//record_time := c.GetString("record_time")
1778
 	//record_time := c.GetString("record_time")
1774
 	order_id, _ := c.GetInt64("order_id")
1779
 	order_id, _ := c.GetInt64("order_id")
1780
+	admin_user_id, _ := c.GetInt64("admin_user_id")
1775
 
1781
 
1776
 	//timeLayout := "2006-01-02"
1782
 	//timeLayout := "2006-01-02"
1777
 	//loc, _ := time.LoadLocation("Local")
1783
 	//loc, _ := time.LoadLocation("Local")
1902
 	config, _ := service.GetMedicalInsuranceConfig(adminUser.CurrentOrgId)
1908
 	config, _ := service.GetMedicalInsuranceConfig(adminUser.CurrentOrgId)
1903
 
1909
 
1904
 	var user_name string
1910
 	var user_name string
1905
-	role, _ := service.GetAdminUserInfoByID(adminUser.CurrentOrgId, adminUser.AdminUser.Id)
1911
+	role, _ := service.GetAdminUserInfoByID(adminUser.CurrentOrgId, admin_user_id)
1906
 	if role.ID == 0 {
1912
 	if role.ID == 0 {
1907
-		user_name = "xxx"
1913
+		user_name = "管理员"
1908
 	} else {
1914
 	} else {
1909
 		user_name = role.UserName
1915
 		user_name = role.UserName
1910
 	}
1916
 	}