瀏覽代碼

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

csx 4 年之前
父節點
當前提交
9617affa66

+ 3 - 3
conf/app.conf 查看文件

@@ -1,6 +1,6 @@
1 1
 appname = 血透
2 2
 httpport = 9531
3
-runmode = prod
3
+runmode = dev
4 4
 
5 5
 
6 6
 copyrequestbody = true
@@ -163,14 +163,14 @@ readuserport = 3306
163 163
 readuseruser = root
164 164
 readuserpass = 1Q2W3e4r!@#$
165 165
 readusername = test_users
166
-//readusername = sgj_users
166
+//readusername = test_users
167 167
 
168 168
 writeuserhost = rm-wz9rg531npf61q03tro.mysql.rds.aliyuncs.com
169 169
 writeuserport = 3306
170 170
 writeuseruser = root
171 171
 writeuserpass = 1Q2W3e4r!@#$
172 172
 writeusername = test_users
173
-//writeusername = sgj_users
173
+//writeusername = test_users
174 174
 
175 175
 
176 176
 readmiddlehost = rm-wz9rg531npf61q03tro.mysql.rds.aliyuncs.com

+ 60 - 60
controllers/base_api_controller.go 查看文件

@@ -2,7 +2,7 @@ package controllers
2 2
 
3 3
 import (
4 4
 	"XT_New/enums"
5
-	//"XT_New/models"
5
+	"XT_New/models"
6 6
 	"XT_New/service"
7 7
 	"fmt"
8 8
 	"strconv"
@@ -65,36 +65,36 @@ type BaseAuthAPIController struct {
65 65
 func (this *BaseAuthAPIController) Prepare() {
66 66
 	this.BaseAPIController.Prepare()
67 67
 	if this.GetAdminUserInfo() == nil {
68
-		//var userAdmin models.AdminUser
69
-		//userAdmin.Id = 400
70
-		//userAdmin.Mobile = "13535547901"
71
-		//
72
-		////userAdmin.Id = 597
73
-		////userAdmin.Mobile = "19874122664"
74
-		//userAdmin.IsSuperAdmin = false
75
-		//userAdmin.Status = 1
76
-		//userAdmin.CreateTime = 1530786071
77
-		//userAdmin.ModifyTime = 1530786071
78
-		//var subscibe models.ServeSubscibe
79
-		//subscibe.ID = 1
80
-		//subscibe.OrgId = 12
81
-		//subscibe.PeriodStart = 1538035409
82
-		//subscibe.PeriodEnd = 1569571409
83
-		//subscibe.State = 1
84
-		//subscibe.Status = 1
85
-		//subscibe.CreatedTime = 1538035409
86
-		//subscibe.UpdatedTime = 1538035409
87
-		//subscibes := make(map[int64]*models.ServeSubscibe, 0)
88
-		//subscibes[4] = &subscibe
89
-		//var adminUserInfo service.AdminUserInfo
90
-		//adminUserInfo.CurrentOrgId = 12
91
-		//adminUserInfo.CurrentAppId = 18
92
-		//adminUserInfo.AdminUser = &userAdmin
93
-		//adminUserInfo.Subscibes = subscibes
94
-		//this.SetSession("admin_user_info", &adminUserInfo)
95
-
96
-		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeNotLogin)
97
-		this.StopRun()
68
+		var userAdmin models.AdminUser
69
+		userAdmin.Id = 400
70
+		userAdmin.Mobile = "13535547901"
71
+
72
+		//userAdmin.Id = 597
73
+		//userAdmin.Mobile = "19874122664"
74
+		userAdmin.IsSuperAdmin = false
75
+		userAdmin.Status = 1
76
+		userAdmin.CreateTime = 1530786071
77
+		userAdmin.ModifyTime = 1530786071
78
+		var subscibe models.ServeSubscibe
79
+		subscibe.ID = 1
80
+		subscibe.OrgId = 12
81
+		subscibe.PeriodStart = 1538035409
82
+		subscibe.PeriodEnd = 1569571409
83
+		subscibe.State = 1
84
+		subscibe.Status = 1
85
+		subscibe.CreatedTime = 1538035409
86
+		subscibe.UpdatedTime = 1538035409
87
+		subscibes := make(map[int64]*models.ServeSubscibe, 0)
88
+		subscibes[4] = &subscibe
89
+		var adminUserInfo service.AdminUserInfo
90
+		adminUserInfo.CurrentOrgId = 12
91
+		adminUserInfo.CurrentAppId = 18
92
+		adminUserInfo.AdminUser = &userAdmin
93
+		adminUserInfo.Subscibes = subscibes
94
+		this.SetSession("admin_user_info", &adminUserInfo)
95
+
96
+		//this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeNotLogin)
97
+		//this.StopRun()
98 98
 	}
99 99
 
100 100
 	adminUserInfo := this.GetAdminUserInfo()
@@ -316,35 +316,35 @@ type BaseServeAPIController struct {
316 316
 func (this *BaseServeAPIController) Prepare() {
317 317
 	this.BaseAPIController.Prepare()
318 318
 	if this.GetAdminUserInfo() == nil {
319
-		//var userAdmin models.AdminUser
320
-		//userAdmin.Id = 400
321
-		//userAdmin.Mobile = "13535547901"
322
-		////userAdmin.Id = 597
323
-		////userAdmin.Mobile = "19874122664"
324
-		//userAdmin.IsSuperAdmin = false
325
-		//userAdmin.Status = 1
326
-		//userAdmin.CreateTime = 1530786071
327
-		//userAdmin.ModifyTime = 1530786071
328
-		//var subscibe models.ServeSubscibe
329
-		//subscibe.ID = 1
330
-		//subscibe.OrgId = 12
331
-		//subscibe.PeriodStart = 1538035409
332
-		//subscibe.PeriodEnd = 1569571409
333
-		//subscibe.State = 1
334
-		//subscibe.Status = 1
335
-		//subscibe.CreatedTime = 1538035409
336
-		//subscibe.UpdatedTime = 1538035409
337
-		//subscibes := make(map[int64]*models.ServeSubscibe, 0)
338
-		//subscibes[4] = &subscibe
339
-		//var adminUserInfo service.AdminUserInfo
340
-		//adminUserInfo.CurrentOrgId = 12
341
-		//adminUserInfo.CurrentAppId = 18
342
-		//adminUserInfo.AdminUser = &userAdmin
343
-		//adminUserInfo.Subscibes = subscibes
344
-		//this.SetSession("admin_user_info", &adminUserInfo)
345
-
346
-		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeNotLogin)
347
-		this.StopRun()
319
+		var userAdmin models.AdminUser
320
+		userAdmin.Id = 400
321
+		userAdmin.Mobile = "13535547901"
322
+		//userAdmin.Id = 597
323
+		//userAdmin.Mobile = "19874122664"
324
+		userAdmin.IsSuperAdmin = false
325
+		userAdmin.Status = 1
326
+		userAdmin.CreateTime = 1530786071
327
+		userAdmin.ModifyTime = 1530786071
328
+		var subscibe models.ServeSubscibe
329
+		subscibe.ID = 1
330
+		subscibe.OrgId = 12
331
+		subscibe.PeriodStart = 1538035409
332
+		subscibe.PeriodEnd = 1569571409
333
+		subscibe.State = 1
334
+		subscibe.Status = 1
335
+		subscibe.CreatedTime = 1538035409
336
+		subscibe.UpdatedTime = 1538035409
337
+		subscibes := make(map[int64]*models.ServeSubscibe, 0)
338
+		subscibes[4] = &subscibe
339
+		var adminUserInfo service.AdminUserInfo
340
+		adminUserInfo.CurrentOrgId = 12
341
+		adminUserInfo.CurrentAppId = 18
342
+		adminUserInfo.AdminUser = &userAdmin
343
+		adminUserInfo.Subscibes = subscibes
344
+		this.SetSession("admin_user_info", &adminUserInfo)
345
+
346
+		//this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeNotLogin)
347
+		//this.StopRun()
348 348
 	}
349 349
 
350 350
 	//if adminUserInfo.AppRole != nil {

+ 18 - 32
controllers/dialysis_api_controller.go 查看文件

@@ -3070,31 +3070,17 @@ func (c *DialysisApiController) PostAssessmentAfterDislysis() {
3070 3070
 	}
3071 3071
 
3072 3072
 	if assessment.ID > 0 {
3073
-		//if appRole.UserType == 3 {
3074
-		//	if assessment.Creater != adminUserInfo.AdminUser.Id && assessment.Creater != 0 {
3075
-		//		headNursePermission, getPermissionErr := service.GetAdminUserSpecialPermission(adminUserInfo.CurrentOrgId, adminUserInfo.CurrentAppId, adminUserInfo.AdminUser.Id, models.SpecialPermissionTypeHeadNurse)
3076
-		//		if getPermissionErr != nil {
3077
-		//			c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
3078
-		//			return
3079
-		//		} else if headNursePermission == nil {
3080
-		//			c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDialysisPermissionDeniedModify)
3081
-		//			return
3082
-		//		}
3083
-		//	}
3084
-		//}
3073
+
3085 3074
 		if appRole.UserType == 2 || appRole.UserType == 1 {
3086 3075
 			assessment.AssessmentDoctor = adminUserInfo.AdminUser.Id
3087 3076
 			assessment.AssessmentTime = time.Now().Unix()
3088
-
3089
-		}
3090
-		if assessment.Creater == 0 {
3091
-			assessment.Modifier = adminUserInfo.AdminUser.Id
3092
-			assessment.Creater = adminUserInfo.AdminUser.Id
3093
-
3094 3077
 		} else {
3095
-			assessment.Modifier = adminUserInfo.AdminUser.Id
3096
-			assessment.Creater = assessment.Creater
3097
-
3078
+			if assessment.Creater == 0 {
3079
+				assessment.Modifier = adminUserInfo.AdminUser.Id
3080
+				assessment.Creater = adminUserInfo.AdminUser.Id
3081
+			} else {
3082
+				assessment.Modifier = adminUserInfo.AdminUser.Id
3083
+			}
3098 3084
 		}
3099 3085
 
3100 3086
 		assessment.UpdatedTime = time.Now().Unix()
@@ -3103,9 +3089,9 @@ func (c *DialysisApiController) PostAssessmentAfterDislysis() {
3103 3089
 		if appRole.UserType == 2 || appRole.UserType == 1 {
3104 3090
 			assessment.AssessmentDoctor = adminUserInfo.AdminUser.Id
3105 3091
 			assessment.AssessmentTime = time.Now().Unix()
3106
-
3092
+		} else {
3093
+			assessment.Creater = adminUserInfo.AdminUser.Id
3107 3094
 		}
3108
-		assessment.Creater = adminUserInfo.AdminUser.Id
3109 3095
 		assessment.CreatedTime = time.Now().Unix()
3110 3096
 		assessment.UpdatedTime = time.Now().Unix()
3111 3097
 		assessment.UserOrgId = adminUserInfo.CurrentOrgId
@@ -3253,9 +3239,10 @@ func (c *DialysisApiController) PostAssessmentBeforeDislysis() {
3253 3239
 		if appRole.UserType == 2 || appRole.UserType == 1 {
3254 3240
 			assessmentBeforeDislysis.AssessmentDoctor = adminUserInfo.AdminUser.Id
3255 3241
 			assessmentBeforeDislysis.AssessmentTime = time.Now().Unix()
3256
-		}
3242
+		} else {
3243
+			assessmentBeforeDislysis.Creater = adminUserInfo.AdminUser.Id
3257 3244
 
3258
-		assessmentBeforeDislysis.Creater = adminUserInfo.AdminUser.Id
3245
+		}
3259 3246
 
3260 3247
 		err := service.AddSigleAssessmentBeforeDislysisRecord(&assessmentBeforeDislysis)
3261 3248
 		if err == nil {
@@ -3284,14 +3271,13 @@ func (c *DialysisApiController) PostAssessmentBeforeDislysis() {
3284 3271
 		if appRole.UserType == 2 || appRole.UserType == 1 {
3285 3272
 			assessmentBeforeDislysis.AssessmentDoctor = adminUserInfo.AdminUser.Id
3286 3273
 			assessmentBeforeDislysis.AssessmentTime = time.Now().Unix()
3287
-		}
3288
-
3289
-		if evaluation.Creater == 0 {
3290
-			assessmentBeforeDislysis.Modifier = adminUserInfo.AdminUser.Id
3291
-			assessmentBeforeDislysis.Creater = adminUserInfo.AdminUser.Id
3292 3274
 		} else {
3293
-			assessmentBeforeDislysis.Modifier = adminUserInfo.AdminUser.Id
3294
-			assessmentBeforeDislysis.Creater = evaluation.Creater
3275
+			if evaluation.Creater == 0 {
3276
+				assessmentBeforeDislysis.Modifier = adminUserInfo.AdminUser.Id
3277
+				assessmentBeforeDislysis.Creater = adminUserInfo.AdminUser.Id
3278
+			} else {
3279
+				assessmentBeforeDislysis.Modifier = adminUserInfo.AdminUser.Id
3280
+			}
3295 3281
 		}
3296 3282
 
3297 3283
 		assessmentBeforeDislysis.UpdatedTime = time.Now().Unix()

+ 16 - 29
controllers/mobile_api_controllers/dialysis_api_controller.go 查看文件

@@ -872,18 +872,18 @@ func (c *DialysisAPIController) PostAssessmentAfterDislysis() {
872 872
 		IsEat:                        is_eat,
873 873
 	}
874 874
 
875
-	//appRole, _ := service.FindAdminRoleTypeById(adminUserInfo.Org.Id, adminUserInfo.AdminUser.Id, adminUserInfo.App.Id)
875
+	appRole, _ := service.FindAdminRoleTypeById(adminUserInfo.Org.Id, adminUserInfo.AdminUser.Id, adminUserInfo.App.Id)
876 876
 
877 877
 	_, assessmentAfter := service.FindAssessmentAfterDislysisByReordDate(id, recordDate.Unix(), adminUserInfo.Org.Id)
878 878
 	if assessmentAfter.ID == 0 { //新增
879
-		//if appRole.UserType == 2 || appRole.UserType == 1 {
880
-		assessmentAfterDislysis.AssessmentDoctor = adminUserInfo.AdminUser.Id
881
-		assessmentAfterDislysis.AssessmentTime = time.Now().Unix()
879
+		if appRole.UserType == 2 || appRole.UserType == 1 {
880
+			assessmentAfterDislysis.AssessmentDoctor = adminUserInfo.AdminUser.Id
881
+			assessmentAfterDislysis.AssessmentTime = time.Now().Unix()
882 882
 
883
-		//} else {
884
-		assessmentAfterDislysis.Creater = adminUserInfo.AdminUser.Id
883
+		} else {
884
+			assessmentAfterDislysis.Creater = adminUserInfo.AdminUser.Id
885 885
 
886
-		//}
886
+		}
887 887
 
888 888
 		err := service.AddSigleAssessmentAfterDislysisRecord(&assessmentAfterDislysis)
889 889
 		if err == nil {
@@ -892,29 +892,16 @@ func (c *DialysisAPIController) PostAssessmentAfterDislysis() {
892 892
 			})
893 893
 		}
894 894
 	} else { //修改
895
-		//if appRole.UserType == 3 {
896
-		//	if assessmentAfter.Creater != adminUserInfo.AdminUser.Id && assessmentAfter.Creater != 0 {
897
-		//		headNursePermission, getPermissionErr := service.GetAdminUserSpecialPermission(adminUserInfo.Org.Id, adminUserInfo.App.Id, adminUserInfo.AdminUser.Id, models.SpecialPermissionTypeHeadNurse)
898
-		//		if getPermissionErr != nil {
899
-		//			c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
900
-		//			return
901
-		//		} else if headNursePermission == nil {
902
-		//			c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDialysisPermissionDeniedModify)
903
-		//			return
904
-		//		}
905
-		//	}
906
-		//}
907 895
 
908
-		//TODO 根据角色判断
909
-		//if appRole.UserType == 2 || appRole.UserType == 1 {
910
-		assessmentAfterDislysis.AssessmentDoctor = adminUserInfo.AdminUser.Id
911
-		assessmentAfterDislysis.AssessmentTime = time.Now().Unix()
912
-		//} else {
913
-		assessmentAfterDislysis.Modifier = adminUserInfo.AdminUser.Id
914
-		if assessmentAfterDislysis.Creater == 0 {
915
-			assessmentAfterDislysis.Creater = adminUserInfo.AdminUser.Id
896
+		if appRole.UserType == 2 || appRole.UserType == 1 {
897
+			assessmentAfterDislysis.AssessmentDoctor = adminUserInfo.AdminUser.Id
898
+			assessmentAfterDislysis.AssessmentTime = time.Now().Unix()
899
+		} else {
900
+			assessmentAfterDislysis.Modifier = adminUserInfo.AdminUser.Id
901
+			if assessmentAfterDislysis.Creater == 0 {
902
+				assessmentAfterDislysis.Creater = adminUserInfo.AdminUser.Id
903
+			}
916 904
 		}
917
-		//}
918 905
 
919 906
 		assessmentAfterDislysis.CreatedTime = assessmentAfter.CreatedTime
920 907
 		assessmentAfterDislysis.ID = assessmentAfter.ID
@@ -2248,7 +2235,7 @@ func (c *DialysisAPIController) PostDialysisPrescription() {
2248 2235
 
2249 2236
 		prescription.CreatedTime = dialysisPrescription.CreatedTime
2250 2237
 		prescription.Modifier = adminUserInfo.AdminUser.Id
2251
-		prescription.Creater = dialysisPrescription.Creater
2238
+		prescription.Creater = adminUserInfo.AdminUser.Id
2252 2239
 
2253 2240
 		prescription.PrescriptionDoctor = adminUserInfo.AdminUser.Id
2254 2241
 		prescription.ID = dialysisPrescription.ID

+ 15 - 32
controllers/mobile_api_controllers/patient_api_controller.go 查看文件

@@ -843,27 +843,10 @@ func (c *PatientApiController) EditAssessmentBeforeDislysis() {
843 843
 		return
844 844
 	}
845 845
 	//templateInfo,_ := service.GetOrgInfoTemplate(adminUserInfo.Org.Id)
846
-	//appRole, _ := service.FindAdminRoleTypeById(adminUserInfo.Org.Id, adminUserInfo.AdminUser.Id, adminUserInfo.App.Id)
846
+	appRole, _ := service.FindAdminRoleTypeById(adminUserInfo.Org.Id, adminUserInfo.AdminUser.Id, adminUserInfo.App.Id)
847 847
 	var evaluation models.PredialysisEvaluation
848 848
 	if theEvaluation != nil {
849
-		//if appRole.UserType == 2 || appRole.UserType == 1 {
850
-
851 849
 		evaluation = *theEvaluation
852
-
853
-		//} else {
854
-		//	if theEvaluation.Creater != adminUserInfo.AdminUser.Id && theEvaluation.Creater != 0 {
855
-		//		headNursePermission, getPermissionErr := service.GetAdminUserSpecialPermission(adminUserInfo.Org.Id, adminUserInfo.App.Id, adminUserInfo.AdminUser.Id, models.SpecialPermissionTypeHeadNurse)
856
-		//		if getPermissionErr != nil {
857
-		//			c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
858
-		//			return
859
-		//		} else if headNursePermission == nil {
860
-		//			c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDialysisPermissionDeniedModify)
861
-		//			return
862
-		//		}
863
-		//	} else {
864
-		//		evaluation = *theEvaluation
865
-		//	}
866
-		//}
867 850
 	}
868 851
 
869 852
 	code := predialysisEvaluationFormData(&evaluation, c.Ctx.Input.RequestBody)
@@ -879,24 +862,24 @@ func (c *PatientApiController) EditAssessmentBeforeDislysis() {
879 862
 		evaluation.AssessmentDate = theAssessmentDateTime
880 863
 		evaluation.PatientId = id
881 864
 		evaluation.UserOrgId = adminUserInfo.Org.Id
882
-		//if appRole.UserType == 2 || appRole.UserType == 1 {
883
-		//	evaluation.AssessmentDoctor = adminUserInfo.AdminUser.Id
884
-		//	evaluation.AssessmentTime = time.Now().Unix()
885
-		//} else {
886
-		evaluation.Creater = adminUserInfo.AdminUser.Id
887
-		//}
865
+		if appRole.UserType == 2 || appRole.UserType == 1 {
866
+			evaluation.AssessmentDoctor = adminUserInfo.AdminUser.Id
867
+			evaluation.AssessmentTime = time.Now().Unix()
868
+		} else {
869
+			evaluation.Creater = adminUserInfo.AdminUser.Id
870
+		}
888 871
 	} else {
889 872
 		evaluation.UpdatedTime = time.Now().Unix()
890 873
 		evaluation.Evaluator = adminUserInfo.AdminUser.Id
891
-		//if appRole.UserType == 2 || appRole.UserType == 1 {
892
-		//	evaluation.AssessmentDoctor = adminUserInfo.AdminUser.Id
893
-		//	evaluation.AssessmentTime = time.Now().Unix()
894
-		//} else {
895
-		evaluation.Modifier = adminUserInfo.AdminUser.Id
896
-		if evaluation.Creater == 0 {
897
-			evaluation.Creater = adminUserInfo.AdminUser.Id
874
+		if appRole.UserType == 2 || appRole.UserType == 1 {
875
+			evaluation.AssessmentDoctor = adminUserInfo.AdminUser.Id
876
+			evaluation.AssessmentTime = time.Now().Unix()
877
+		} else {
878
+			evaluation.Modifier = adminUserInfo.AdminUser.Id
879
+			if evaluation.Creater == 0 {
880
+				evaluation.Creater = adminUserInfo.AdminUser.Id
881
+			}
898 882
 		}
899
-		//}
900 883
 	}
901 884
 
902 885
 	//新增逻辑

+ 1 - 9
controllers/new_mobile_api_controllers/home_api_controller.go 查看文件

@@ -283,14 +283,6 @@ func (this *HomeController) CreateOrg() {
283 283
 	}
284 284
 	orgPhone := this.GetString("telephone")
285 285
 
286
-	if len(orgPhone) > 0 {
287
-		if utils.PhoneRegexp().MatchString(orgPhone) == false {
288
-			this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
289
-			this.ServeJSON()
290
-			return
291
-		}
292
-	}
293
-
294 286
 	provinceID := 0
295 287
 	cityID := 0
296 288
 	districtID := 0
@@ -377,8 +369,8 @@ func (this *HomeController) CreateOrg() {
377 369
 		InitRoleAndPurviews(org)
378 370
 		//初始化设备管理
379 371
 		InitEquitMentInformation(org)
380
-
381 372
 		//初始化显示配置
373
+		//InitShowConfig(org)
382 374
 
383 375
 		if len(orgs) == 0 {
384 376
 			ip := utils.GetIP(this.Ctx.Request)

+ 0 - 2
controllers/new_mobile_api_controllers/mobile_regist_controller.go 查看文件

@@ -235,8 +235,6 @@ func (this *MobileRegistController) CreateOrg() {
235 235
 		InitPatientAndSchedule(org)
236 236
 		//初始化透析方案
237 237
 		InitSystemPrescrption(org)
238
-		//初始化医嘱模版
239
-		//InitAdviceTemplate(org)
240 238
 		//初始化角色和权限
241 239
 		InitRoleAndPurviews(org)
242 240
 		//初始化设备管理org

+ 1 - 1
controllers/new_mobile_api_controllers/role.json 查看文件

@@ -30,7 +30,7 @@
30 30
       "is_system": 3,
31 31
       "number": 9997,
32 32
       "purview_ids": "71,72,70,74,75,73,127,128,48,49,52,110,111,112,113,114,115,116,117,118,119,129,84,77,78,79,80,197,76",
33
-      "func_ids": "20007,20008,20009,20010,20011,20051,20053,20013,20014,20016,20017,20019,20021,20022,20024,20025,20026,20027,20028,20029,20055,20056,20052"
33
+      "func_ids": "20007,20008,20009,20010,20011,20051,20053,20013,20014,20016,20017,20019,20021,20022,20024,20025,20026,20027,20028,20029,20055,20056,20052,20012"
34 34
     },
35 35
     {
36 36
       "role_name": "库存",

+ 48 - 1
controllers/role.json 查看文件

@@ -30,7 +30,54 @@
30 30
       "is_system": 3,
31 31
       "number": 9997,
32 32
       "purview_ids": "71,72,70,74,75,73,127,128,48,49,52,110,111,112,113,114,115,116,117,118,119,129,84,77,78,79,80,197,76",
33
-      "func_ids": "20007,20008,20009,20010,20011,20051,20053,20013,20014,20016,20017,20019,20021,20022,20024,20025,20026,20027,20028,20029,20055,20056,20052"
33
+      "func_ids": "20007,20008,20009,20010,20011,20051,20053,20013,20014,20016,20017,20019,20021,20022,20024,20025,20026,20027,20028,20029,20055,20056,20052,20012"
34
+    },{
35
+      "role_name": "库存",
36
+      "role_introduction": "库存角色负责透析耗材的日常管理,对耗材的入库、出库、退库的登记操作",
37
+      "is_super_admin": false,
38
+      "status": 1,
39
+      "is_system": 0,
40
+      "number": 9996,
41
+      "purview_ids": "111,112,113,114,115,116,117,118,119,129,84",
42
+      "func_ids": ""
43
+
44
+
45
+
46
+    },{
47
+      "role_name": "运营",
48
+      "role_introduction": "运营角色能够在SCRM中管理微网站、使用营销工具、做会员管理和分销商品经营的操作",
49
+      "is_super_admin": false,
50
+      "status": 1,
51
+      "is_system": 0,
52
+      "number": 9995,
53
+      "purview_ids": "48,110,158,157,159,160,161,162,167,166,168,169,170,171,174,173,175,178,177,179,201",
54
+      "func_ids": ""
55
+
56
+
57
+
58
+    },{
59
+      "role_name": "技师",
60
+      "role_introduction": "技师角色能够进行设备的管理,日常维护维修记录等",
61
+      "is_super_admin": false,
62
+      "status": 1,
63
+      "is_system": 0,
64
+      "number": 9994,
65
+      "purview_ids": "77,78,79,80,197,76",
66
+      "func_ids": ""
67
+
68
+
69
+    },
70
+    {
71
+      "role_name": "院长",
72
+      "role_introduction": "院长角色了解血透患者血液透析质量和相关的大数据,以及掌握透析中心整体运营情况",
73
+      "is_super_admin": false,
74
+      "status": 1,
75
+      "is_system": 0,
76
+      "number": 9993,
77
+      "purview_ids": "71,72,70,74,75,73,48,49,52,110,111,112,113,114,115,116,117,118,119,129,84,93,121,122,124,125,120,77,78,79,80,197,76,101,100,102,127,128,158,157,159,160,161,162,167,166,168,169,170,171,174,173,175,178,177,179,201",
78
+      "func_ids": ""
79
+
80
+
34 81
     }
35 82
   ]
36 83
 }

+ 1 - 1
service/gobal_config_service.go 查看文件

@@ -81,7 +81,7 @@ func UpdateFiledConfig(org_id int64) (err error) {
81 81
 }
82 82
 
83 83
 func FindAllHideFiledConfig(template_id int64) (err error, config []*models.FiledConfig) {
84
-	err = readDb.Model(&models.FiledConfig{}).Where("sys_module = 0  AND is_show = 2", template_id).Find(&config).Error
84
+	err = readDb.Model(&models.FiledConfig{}).Where("sys_module = ?  AND is_show = 2", template_id).Find(&config).Error
85 85
 	return
86 86
 }
87 87