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

+ 13 - 7
controllers/his_api_controller.go View File

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