lining 6 年 前
コミット
fed643f9b1

+ 2 - 2
src/dashoo.cn/backend/api/business/organize/organizeService.go

@@ -180,13 +180,13 @@ func (s *OrganizeService) GetAllThirdChildByTopId(topid, uid string) (entitys []
 }
 
 //获得category为unit的父节点
-func (s *OrganizeService) GetMyUnitThirdDepartmentId(topid string) string {
+func (s *OrganizeService) GetMyThrUnitDepartmentId(topid string) string {
 	var entity Base_Organize
 	ids := s.GetAllParentByTopAccCode(topid, "")
 	if len(ids) <= 0 { //没有父节点
 		return topid
 	}
-	sql := "select * from Base_Organize  where id in (" + ids + ") and Category='unitthird'"
+	sql := "select * from Base_Organize  where id in (" + ids + ") and Category='ThrUnit'"
 	s.DBE.Sql(sql).Get(&entity)
 	if &entity == nil || entity.Id <= 0 { //没有category为unit的父节点
 		return topid

+ 1 - 1
src/dashoo.cn/backend/api/controllers/lims/limscreatereport.go

@@ -366,7 +366,7 @@ func (this *CreateReportController) GetReportEntrustList() {
 	//userIds = strings.Trim(userIds, ",")
 
 	svc := myorganize.GetOrganizeService(utils.DBE)
-	unitThirdId := svc.GetMyUnitThirdDepartmentId(this.User.DepartmentId)
+	unitThirdId := svc.GetMyThrUnitDepartmentId(this.User.DepartmentId)
 
 	var userlist []userRole.Base_User
 	whereuser := "UnitThirdId=" + unitThirdId

+ 1 - 1
src/dashoo.cn/backend/api/controllers/lims/limsdataentry.go

@@ -3265,7 +3265,7 @@ func (this *LimsDataEntryController) JiaoHe() {
 	rsvc := auditsetting.GetOilAuditSettingService(utils.DBE)
 
 	svct := myorganize.GetOrganizeService(utils.DBE)
-	unitThirdId := svct.GetMyUnitThirdDepartmentId(this.User.DepartmentId)
+	unitThirdId := svct.GetMyThrUnitDepartmentId(this.User.DepartmentId)
 	checkStatus := 0
 	if unitThirdId == "100001215" {
 		checkStatus = 4

+ 1 - 1
src/dashoo.cn/backend/api/controllers/lims/testtype.go

@@ -130,7 +130,7 @@ func (this *TestTypeController) TestTypeTreeByOrg() {
 	//where += " AND a.CreateUserId in (" + userIds + ")"
 
 	svc := organize.GetOrganizeService(utils.DBE)
-	unitThirdId := svc.GetMyUnitThirdDepartmentId(this.User.DepartmentId)
+	unitThirdId := svc.GetMyThrUnitDepartmentId(this.User.DepartmentId)
 
 	var userlist []userRole.Base_User
 	whereuser := "UnitThirdId=" + unitThirdId