Procházet zdrojové kódy

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

张保健 před 5 roky
rodič
revize
f5013687b3

+ 8 - 4
conf/app.conf Zobrazit soubor

148
 readmysqlport = 3306
148
 readmysqlport = 3306
149
 readmysqluser = root
149
 readmysqluser = root
150
 readmysqlpass = 1Q2W3e4r!@#$
150
 readmysqlpass = 1Q2W3e4r!@#$
151
-readmysqlname = test_xt
151
+//readmysqlname = test_xt
152
+readmysqlname = sgj_xt
152
 
153
 
153
 writemysqlhost = rm-wz9rg531npf61q03tro.mysql.rds.aliyuncs.com
154
 writemysqlhost = rm-wz9rg531npf61q03tro.mysql.rds.aliyuncs.com
154
 writemysqlport = 3306
155
 writemysqlport = 3306
155
 writemysqluser = root
156
 writemysqluser = root
156
 writemysqlpass = 1Q2W3e4r!@#$
157
 writemysqlpass = 1Q2W3e4r!@#$
157
-writemysqlname = test_xt
158
+//writemysqlname = test_xt
159
+writemysqlname = sgj_xt
158
 
160
 
159
 readuserhost = rm-wz9rg531npf61q03tro.mysql.rds.aliyuncs.com
161
 readuserhost = rm-wz9rg531npf61q03tro.mysql.rds.aliyuncs.com
160
 readuserport = 3306
162
 readuserport = 3306
161
 readuseruser = root
163
 readuseruser = root
162
 readuserpass = 1Q2W3e4r!@#$
164
 readuserpass = 1Q2W3e4r!@#$
163
-readusername = test_users
165
+//readusername = test_users
166
+readusername = sgj_users
164
 
167
 
165
 writeuserhost = rm-wz9rg531npf61q03tro.mysql.rds.aliyuncs.com
168
 writeuserhost = rm-wz9rg531npf61q03tro.mysql.rds.aliyuncs.com
166
 writeuserport = 3306
169
 writeuserport = 3306
167
 writeuseruser = root
170
 writeuseruser = root
168
 writeuserpass = 1Q2W3e4r!@#$
171
 writeuserpass = 1Q2W3e4r!@#$
169
-writeusername = test_users
172
+//writeusername = test_users
173
+writeusername = sgj_users
170
 
174
 
171
 
175
 
172
 readmiddlehost = rm-wz9rg531npf61q03tro.mysql.rds.aliyuncs.com
176
 readmiddlehost = rm-wz9rg531npf61q03tro.mysql.rds.aliyuncs.com

+ 2 - 1
controllers/dialysis_api_controller.go Zobrazit soubor

3283
 			assessmentBeforeDislysis.AssessmentDoctor = adminUserInfo.AdminUser.Id
3283
 			assessmentBeforeDislysis.AssessmentDoctor = adminUserInfo.AdminUser.Id
3284
 			assessmentBeforeDislysis.AssessmentTime = time.Now().Unix()
3284
 			assessmentBeforeDislysis.AssessmentTime = time.Now().Unix()
3285
 		}
3285
 		}
3286
-		if assessmentBeforeDislysis.Creater == 0 {
3286
+
3287
+		if evaluation.Creater == 0 {
3287
 			assessmentBeforeDislysis.Modifier = adminUserInfo.AdminUser.Id
3288
 			assessmentBeforeDislysis.Modifier = adminUserInfo.AdminUser.Id
3288
 			assessmentBeforeDislysis.Creater = adminUserInfo.AdminUser.Id
3289
 			assessmentBeforeDislysis.Creater = adminUserInfo.AdminUser.Id
3289
 		} else {
3290
 		} else {

+ 1 - 1
controllers/gobal_config_api_controller.go Zobrazit soubor

187
 //		//	updateErr := service.UpdateFiledConfig(adminUserInfo.CurrentOrgId)
187
 //		//	updateErr := service.UpdateFiledConfig(adminUserInfo.CurrentOrgId)
188
 //		//	if updateErr == nil {
188
 //		//	if updateErr == nil {
189
 //		//		//查出该模版对应显示配置字段中所有隐藏的字段
189
 //		//		//查出该模版对应显示配置字段中所有隐藏的字段
190
-//		//		_, config := service.FindAllHideFiledConfig(template_id)
190
+//				_, config := service.FindAllHideFiledConfig(template_id)
191
 //		//
191
 //		//
192
 //		//		var fileds []string
192
 //		//		var fileds []string
193
 //		//		for _, item := range config {
193
 //		//		for _, item := range config {

+ 6 - 8
controllers/mobile_api_controllers/dialysis_api_controller.go Zobrazit soubor

1013
 	safe_package, _ := c.GetInt64("package", 0)
1013
 	safe_package, _ := c.GetInt64("package", 0)
1014
 	a_liquid, _ := c.GetInt64("a_liquid", 0)
1014
 	a_liquid, _ := c.GetInt64("a_liquid", 0)
1015
 
1015
 
1016
-	//appRole, _ := service.FindAdminRoleTypeById(adminUserInfo.Org.Id, adminUserInfo.AdminUser.Id, adminUserInfo.App.Id)
1016
+	appRole, _ := service.FindAdminRoleTypeById(adminUserInfo.Org.Id, adminUserInfo.AdminUser.Id, adminUserInfo.App.Id)
1017
 	//template, _ := service.GetOrgInfoTemplate(adminUserInfo.Org.Id)
1017
 	//template, _ := service.GetOrgInfoTemplate(adminUserInfo.Org.Id)
1018
 	//
1018
 	//
1019
 	//if template.TemplateId == 2 || template.TemplateId == 6 {
1019
 	//if template.TemplateId == 2 || template.TemplateId == 6 {
1030
 	//}
1030
 	//}
1031
 
1031
 
1032
 	//TODO 需要根据角色去判断
1032
 	//TODO 需要根据角色去判断
1033
-	//if appRole.UserType == 2 || appRole.UserType == 1 {
1034
-	//	prescription_doctor = appRole.AdminUserId
1035
-	//} else {
1036
-	//	prescription_doctor = 0
1037
-	//}
1033
+	if appRole.UserType == 2 || appRole.UserType == 1 {
1034
+		prescription_doctor = appRole.AdminUserId
1035
+	} else {
1036
+		prescription_doctor = 0
1037
+	}
1038
 
1038
 
1039
 	prescription := models.DialysisPrescription{
1039
 	prescription := models.DialysisPrescription{
1040
 
1040
 
2248
 
2248
 
2249
 		prescription.CreatedTime = dialysisPrescription.CreatedTime
2249
 		prescription.CreatedTime = dialysisPrescription.CreatedTime
2250
 		prescription.Modifier = adminUserInfo.AdminUser.Id
2250
 		prescription.Modifier = adminUserInfo.AdminUser.Id
2251
-		prescription.Creater = adminUserInfo.AdminUser.Id
2252
 		prescription.PrescriptionDoctor = adminUserInfo.AdminUser.Id
2251
 		prescription.PrescriptionDoctor = adminUserInfo.AdminUser.Id
2253
-
2254
 		prescription.ID = dialysisPrescription.ID
2252
 		prescription.ID = dialysisPrescription.ID
2255
 		err := service.UpDateDialysisPrescription(&prescription)
2253
 		err := service.UpDateDialysisPrescription(&prescription)
2256
 		if err == nil {
2254
 		if err == nil {

+ 3 - 0
controllers/mobile_api_controllers/mobile_api_base_controller.go Zobrazit soubor

47
 
47
 
48
 func (this *MobileBaseAPIAuthController) Prepare() {
48
 func (this *MobileBaseAPIAuthController) Prepare() {
49
 	token := this.Ctx.GetCookie("token_cookie")
49
 	token := this.Ctx.GetCookie("token_cookie")
50
+	//logout_cookie := this.Ctx.GetCookie("logout_cookie")
51
+
50
 	//if len(token) == 0{
52
 	//if len(token) == 0{
51
 	//	this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeNotLogin)
53
 	//	this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeNotLogin)
52
 	//	this.StopRun()
54
 	//	this.StopRun()
61
 	}
63
 	}
62
 
64
 
63
 	if len(token) == 0 {
65
 	if len(token) == 0 {
66
+
64
 		this.DelSession("mobile_admin_user_info")
67
 		this.DelSession("mobile_admin_user_info")
65
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeLoginTimeout)
68
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeLoginTimeout)
66
 		this.StopRun()
69
 		this.StopRun()

+ 18 - 9
controllers/new_mobile_api_controllers/mobile_regist_controller.go Zobrazit soubor

160
 		return
160
 		return
161
 	}
161
 	}
162
 	orgPhone := this.GetString("telephone")
162
 	orgPhone := this.GetString("telephone")
163
-
164
-	if len(orgPhone) > 0 {
165
-		if utils.PhoneRegexp().MatchString(orgPhone) == false {
166
-			this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
167
-			this.ServeJSON()
168
-			return
169
-		}
170
-	}
163
+	//
164
+	//if len(orgPhone) > 0 {
165
+	//	if utils.PhoneRegexp().MatchString(orgPhone) == false {
166
+	//		this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodePhone)
167
+	//		this.ServeJSON()
168
+	//		return
169
+	//	}
170
+	//}
171
 
171
 
172
 	provinceID := 0
172
 	provinceID := 0
173
 	cityID := 0
173
 	cityID := 0
221
 		ModifyTime:   time.Now().Unix(),
221
 		ModifyTime:   time.Now().Unix(),
222
 	}
222
 	}
223
 
223
 
224
-	createErr := service.CreateOrg(org, adminUser.Mobile, openXT, openCDM, openSCRM, openMall) // 创建机构以及所有类型的 app,如果有新类型的平台,则需要在这个方法里面把创建这一新类型的 app 的代码加上
224
+	adminUsers, _ := service.GetAdminUserByUserID(adminUser.Id)
225
+
226
+	createErr := service.CreateOrg(org, adminUsers.Name, openXT, openCDM, openSCRM, openMall) // 创建机构以及所有类型的 app,如果有新类型的平台,则需要在这个方法里面把创建这一新类型的 app 的代码加上
225
 
227
 
226
 	if createErr != nil {
228
 	if createErr != nil {
227
 		utils.ErrorLog("mobile=%v的超级管理员创建机构失败:%v", adminUser.Mobile, createErr)
229
 		utils.ErrorLog("mobile=%v的超级管理员创建机构失败:%v", adminUser.Mobile, createErr)
240
 		//初始化设备管理org
242
 		//初始化设备管理org
241
 		InitEquitMentInformation(org)
243
 		InitEquitMentInformation(org)
242
 		//初始化显示配置
244
 		//初始化显示配置
245
+		//InitShowConfig(org)
243
 
246
 
244
 		//创建完机构后进行登录验证操作
247
 		//创建完机构后进行登录验证操作
245
 		ip := utils.GetIP(this.Ctx.Request)
248
 		ip := utils.GetIP(this.Ctx.Request)
555
 			TellPhone:               it.TellPhone,
558
 			TellPhone:               it.TellPhone,
556
 			FirstTreatmentDate:      it.FirstTreatmentDate,
559
 			FirstTreatmentDate:      it.FirstTreatmentDate,
557
 			ContactName:             it.ContactName,
560
 			ContactName:             it.ContactName,
561
+			IsInfectious:            it.IsInfectious,
558
 		}
562
 		}
563
+
559
 		service.CreateVMOrgNewPatient(&patientsNew)
564
 		service.CreateVMOrgNewPatient(&patientsNew)
560
 	}
565
 	}
561
 	//创建1个分组
566
 	//创建1个分组
1168
 	}
1173
 	}
1169
 	service.CreatedTreateMode(&treatmentmodefive)
1174
 	service.CreatedTreateMode(&treatmentmodefive)
1170
 }
1175
 }
1176
+
1177
+func InitShowConfig(org *models.Org) {
1178
+	service.BatchInsertFiledSystemConfig(org.Id)
1179
+}

+ 19 - 4
controllers/new_mobile_api_controllers/new_dialysis_api_controller.go Zobrazit soubor

1989
 func (this *NewDialysisApiController) LoginOut() {
1989
 func (this *NewDialysisApiController) LoginOut() {
1990
 
1990
 
1991
 	this.DelSession("mobile_admin_user_info")
1991
 	this.DelSession("mobile_admin_user_info")
1992
-	this.Ctx.SetCookie("token_cookie", "")
1993
 	this.Ctx.SetCookie("logout_cookie", "1")
1992
 	this.Ctx.SetCookie("logout_cookie", "1")
1993
+	this.Ctx.SetCookie("token_cookie", "")
1994
 	id, _ := this.GetInt64("id")
1994
 	id, _ := this.GetInt64("id")
1995
 	fmt.Println("id------------------------------------------", id)
1995
 	fmt.Println("id------------------------------------------", id)
1996
 	loginLog := models.SgjUserAdminLoginLog{
1996
 	loginLog := models.SgjUserAdminLoginLog{
2161
 			cityID = int(city.ID)
2161
 			cityID = int(city.ID)
2162
 			district, getDistrictErr := service.GetDistrictWithName(city.ID, districtName)
2162
 			district, getDistrictErr := service.GetDistrictWithName(city.ID, districtName)
2163
 			if getDistrictErr != nil {
2163
 			if getDistrictErr != nil {
2164
-				utils.ErrorLog("查询区县名失:%v", getDistrictErr)
2164
+				utils.ErrorLog("查询区县名失:%v", getDistrictErr)
2165
 				this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeDataException)
2165
 				this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeDataException)
2166
 				this.ServeJSON()
2166
 				this.ServeJSON()
2167
 				return
2167
 				return
2197
 }
2197
 }
2198
 
2198
 
2199
 func (this *NewDialysisApiController) GetMyInforName() {
2199
 func (this *NewDialysisApiController) GetMyInforName() {
2200
-
2201
 	id, _ := this.GetInt64("id")
2200
 	id, _ := this.GetInt64("id")
2202
-	//Rolename, err := service.GetMyInfoName(id)
2203
 	Username, err := service.GetAdminName(id)
2201
 	Username, err := service.GetAdminName(id)
2204
 	if err != nil {
2202
 	if err != nil {
2205
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
2203
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
2210
 	})
2208
 	})
2211
 }
2209
 }
2212
 
2210
 
2211
+func (this *NewDialysisApiController) GetMyInformationFour() {
2212
+	adminUserInfo := this.GetMobileAdminUserInfo()
2213
+	creatId := adminUserInfo.AdminUser.Id
2214
+	fmt.Println("创建者ID", creatId)
2215
+	orgid := adminUserInfo.Org.Id
2216
+	fmt.Println("orgid", orgid)
2217
+	Username, err := service.GetMyOrgInformationFour(creatId, orgid)
2218
+	if err != nil {
2219
+		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
2220
+		return
2221
+	}
2222
+	this.ServeSuccessJSON(map[string]interface{}{
2223
+		"Username": Username,
2224
+	})
2225
+}
2226
+
2213
 func (this *NewDialysisApiController) GetPartionDetail() {
2227
 func (this *NewDialysisApiController) GetPartionDetail() {
2214
 	id, _ := this.GetInt64("id")
2228
 	id, _ := this.GetInt64("id")
2215
 	partionDetail, err := service.GetPartionDetail(id)
2229
 	partionDetail, err := service.GetPartionDetail(id)
2315
 	fmt.Println("cretor", creator)
2329
 	fmt.Println("cretor", creator)
2316
 	adminInfo := this.GetMobileAdminUserInfo()
2330
 	adminInfo := this.GetMobileAdminUserInfo()
2317
 	appId := adminInfo.App.Id
2331
 	appId := adminInfo.App.Id
2332
+	//fmt.Println("appid------------------------------------",appId)
2318
 	information, err := service.GetMyOrgInformation(creator, appId)
2333
 	information, err := service.GetMyOrgInformation(creator, appId)
2319
 	if err != nil {
2334
 	if err != nil {
2320
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
2335
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)

+ 1 - 0
controllers/new_mobile_api_controllers/new_mobile_api_router_register.go Zobrazit soubor

147
 	beego.Router("/m/api/patient/getmyorginformation", &NewDialysisApiController{}, "Get:GetMyOrgInformation")
147
 	beego.Router("/m/api/patient/getmyorginformation", &NewDialysisApiController{}, "Get:GetMyOrgInformation")
148
 	beego.Router("/m/api/patient/savenametwo", &NewDialysisApiController{}, "Get:SaveNameTwo")
148
 	beego.Router("/m/api/patient/savenametwo", &NewDialysisApiController{}, "Get:SaveNameTwo")
149
 	beego.Router("/m/api/patient/getcurrentorg", &NewDialysisApiController{}, "Get:GetCurrentOrg")
149
 	beego.Router("/m/api/patient/getcurrentorg", &NewDialysisApiController{}, "Get:GetCurrentOrg")
150
+	beego.Router("/m/api/patient/getmyinformationfour", &NewDialysisApiController{}, "Get:GetMyInformationFour")
150
 }
151
 }

+ 7 - 4
controllers/new_mobile_api_controllers/patient.json Zobrazit soubor

45
       "hospital_first_dialysis_date": 1511366400,
45
       "hospital_first_dialysis_date": 1511366400,
46
       "induction_period": 0,
46
       "induction_period": 0,
47
       "initial_dialysis": 0,
47
       "initial_dialysis": 0,
48
-      "total_dialysis": 14,
48
+      "total_dialysis": 0,
49
       "attending_doctor_id": 0,
49
       "attending_doctor_id": 0,
50
       "head_nurse_id": 0,
50
       "head_nurse_id": 0,
51
       "evaluate": "",
51
       "evaluate": "",
77
       "expense_kind": 3,
77
       "expense_kind": 3,
78
       "tell_phone": "21212",
78
       "tell_phone": "21212",
79
       "first_treatment_date": 1582560000,
79
       "first_treatment_date": 1582560000,
80
-      "contact_name": "21221"
80
+      "contact_name": "21221",
81
+      "is_infectious":1
81
     },
82
     },
82
     {
83
     {
83
       "avatar": "https://images.shengws.com/201809182128111.png",
84
       "avatar": "https://images.shengws.com/201809182128111.png",
124
       "hospital_first_dialysis_date": 1511366400,
125
       "hospital_first_dialysis_date": 1511366400,
125
       "induction_period": 0,
126
       "induction_period": 0,
126
       "initial_dialysis": 0,
127
       "initial_dialysis": 0,
127
-      "total_dialysis": 14,
128
+      "total_dialysis": 0,
128
       "attending_doctor_id": 0,
129
       "attending_doctor_id": 0,
129
       "head_nurse_id": 0,
130
       "head_nurse_id": 0,
130
       "evaluate": "",
131
       "evaluate": "",
156
       "expense_kind": 3,
157
       "expense_kind": 3,
157
       "tell_phone": "21212",
158
       "tell_phone": "21212",
158
       "first_treatment_date": 1582560000,
159
       "first_treatment_date": 1582560000,
159
-      "contact_name": "21221"
160
+      "contact_name": "21221",
161
+      "is_infectious":2
162
+
160
     }
163
     }
161
   ]
164
   ]
162
 }
165
 }

+ 2 - 5
controllers/new_mobile_api_controllers/role.json Zobrazit soubor

18
       "is_system": 2,
18
       "is_system": 2,
19
       "number": 9998,
19
       "number": 9998,
20
       "purview_ids": "49,71,72,70,74,75,73,127,128,48,52,110,93,121,122,124,125,120,101,100,102,156,157,158,159,15571,72,70,74,75,73,127,128,48,52,110,93,121,122,124,125,120,101,100,102,156,157,158,159,155",
20
       "purview_ids": "49,71,72,70,74,75,73,127,128,48,52,110,93,121,122,124,125,120,101,100,102,156,157,158,159,15571,72,70,74,75,73,127,128,48,52,110,93,121,122,124,125,120,101,100,102,156,157,158,159,155",
21
-      "func_ids": "20001,20002,20003,20004,20005,20006,20007,20008,20009,20010,20011,20012,20024,20025,20026,20027,20028,20029,20030,20031,20032,20033"
21
+      "func_ids": "20001,20002,20004,20005,20007,20008,20010,20011,20012,20034,20035,20040,20041,20043,20044,20046,20047,20049,20024,20025,20026,20027,20028"
22
 
22
 
23
 
23
 
24
     },
24
     },
30
       "is_system": 3,
30
       "is_system": 3,
31
       "number": 9997,
31
       "number": 9997,
32
       "purview_ids": "49,74,75,73,48,52,110,93,121,122,124,125,120",
32
       "purview_ids": "49,74,75,73,48,52,110,93,121,122,124,125,120",
33
-      "func_ids": "20007,20008,20010,20011,20012,20013,20014,20016,20017,20019,20021,20022,20024,20025,20027,20028"
34
-
35
-
36
-
33
+      "func_ids": "20007,20008,20010,20011,20012,20055,20056,20013,20014,20016,20017,20019,20021,20022,20024,20025,20026,20027,20028"
37
     },
34
     },
38
     {
35
     {
39
       "role_name": "库存",
36
       "role_name": "库存",

+ 2 - 2
controllers/role.json Zobrazit soubor

18
       "is_system": 2,
18
       "is_system": 2,
19
       "number": 9998,
19
       "number": 9998,
20
       "purview_ids": "49,71,72,70,74,75,73,127,128,48,52,110,93,121,122,124,125,120,101,100,102,156,157,158,159,15571,72,70,74,75,73,127,128,48,52,110,93,121,122,124,125,120,101,100,102,156,157,158,159,155",
20
       "purview_ids": "49,71,72,70,74,75,73,127,128,48,52,110,93,121,122,124,125,120,101,100,102,156,157,158,159,15571,72,70,74,75,73,127,128,48,52,110,93,121,122,124,125,120,101,100,102,156,157,158,159,155",
21
-      "func_ids": "20001,20002,20003,20004,20005,20006,20007,20008,20009,20010,20011,20012,20024,20025,20026,20027,20028,20029,20030,20031,20032,20033"
21
+      "func_ids": "20001,20002,20004,20005,20007,20008,20010,20011,20012,20034,20035,20040,20041,20043,20044,20046,20047,20049,20024,20025,20026,20027,20028"
22
 
22
 
23
 
23
 
24
     },
24
     },
30
       "is_system": 3,
30
       "is_system": 3,
31
       "number": 9997,
31
       "number": 9997,
32
       "purview_ids": "49,74,75,73,48,52,110,93,121,122,124,125,120",
32
       "purview_ids": "49,74,75,73,48,52,110,93,121,122,124,125,120",
33
-      "func_ids": "20007,20008,20010,20011,20012,20013,20014,20016,20017,20019,20021,20022,20024,20025,20027,20028"
33
+      "func_ids": "20007,20008,20010,20011,20012,20055,20056,20013,20014,20016,20017,20019,20021,20022,20024,20025,20026,20027,20028"
34
     }
34
     }
35
   ]
35
   ]
36
 }
36
 }

+ 7 - 0
enums/error_code.go Zobrazit soubor

192
 	ErrorCodeRole = 20037
192
 	ErrorCodeRole = 20037
193
 
193
 
194
 	ErrorCodeAdminUserIsExit = 20038
194
 	ErrorCodeAdminUserIsExit = 20038
195
+
196
+	ErrorCodePhone = 20039
197
+
198
+	ErrorCodeLogOut = 20049
195
 )
199
 )
196
 
200
 
197
 var ErrCodeMsgs = map[int]string{
201
 var ErrCodeMsgs = map[int]string{
383
 	ErrorCodeRole: "尚未配置角色,无访问权限",
387
 	ErrorCodeRole: "尚未配置角色,无访问权限",
384
 
388
 
385
 	ErrorCodeAdminUserIsExit: "用户不存在",
389
 	ErrorCodeAdminUserIsExit: "用户不存在",
390
+	ErrorCodePhone:           "请填写正确的联系电话",
391
+
392
+	ErrorCodeLogOut: "退出",
386
 }
393
 }
387
 
394
 
388
 type SGJError struct {
395
 type SGJError struct {

+ 6 - 1
service/data.go Zobrazit soubor

172
 }
172
 }
173
 
173
 
174
 func BatchInsertFiledConfig(org_id int64) (err error) {
174
 func BatchInsertFiledConfig(org_id int64) (err error) {
175
-	err = readDb.Exec("INSERT  INTO sgj_xt.xt_filed_config  ( org_id,  module,  filed_name,  filed_name_cn,  is_show ) SELECT ?,  module,  filed_name,  filed_name_cn,  is_show FROM sgj_xt.xt_filed_config  WHERE org_id = 0", org_id).Error
175
+	err = readDb.Exec("INSERT  INTO sgj_xt.xt_filed_config  ( org_id,  module,  filed_name,  filed_name_cn,  is_show ) SELECT ?,  module,  filed_name,  filed_name_cn,  is_show FROM sgj_xt.xt_filed_config  WHERE org_id = 0 AND is_show = 1", org_id).Error
176
 	return
176
 	return
177
 }
177
 }
178
 
178
 
185
 	err = readDb.Model(&models.FiledConfig{}).Where("org_id =? AND id in (11250,11251,11252,11253,11254,11255,11256,11257,11258,11259,11260,11261,11262)", 0).Find(&filedConfig).Error
185
 	err = readDb.Model(&models.FiledConfig{}).Where("org_id =? AND id in (11250,11251,11252,11253,11254,11255,11256,11257,11258,11259,11260,11261,11262)", 0).Find(&filedConfig).Error
186
 	return
186
 	return
187
 }
187
 }
188
+
189
+func BatchInsertFiledSystemConfig(org_id int64) (err error) {
190
+	err = readDb.Exec("INSERT  INTO sgj_xt.xt_filed_config  ( org_id,  module,  filed_name,  filed_name_cn,  is_show ) SELECT ?,  module,  filed_name,  filed_name_cn,  is_show FROM sgj_xt.xt_filed_config  WHERE org_id = 9442  AND sys_module = 2", org_id).Error
191
+	return
192
+}

+ 6 - 0
service/patientmanage_service.go Zobrazit soubor

1261
 	return user, err
1261
 	return user, err
1262
 }
1262
 }
1263
 
1263
 
1264
+func GetMyOrgInformationFour(creator int64, orgid int64) (models.SgjUserAdminRole, error) {
1265
+	role := models.SgjUserAdminRole{}
1266
+	err := UserReadDB().Model(&role).Where("admin_user_id = ? and org_id = ? and status = 1", creator, orgid).Find(&role).Error
1267
+	return role, err
1268
+}
1269
+
1264
 func GetPartionDetail(id int64) (models.DeviceZone, error) {
1270
 func GetPartionDetail(id int64) (models.DeviceZone, error) {
1265
 
1271
 
1266
 	zone := models.DeviceZone{}
1272
 	zone := models.DeviceZone{}