|
|
@@ -125,7 +125,7 @@ func (this *OrganizesController) Listbandparentname() {
|
|
|
depids := svc.GetAllChildById(topid)
|
|
|
where := "1=1 "
|
|
|
if IsInnerOrganize == "1" {
|
|
|
- where = " and ( a.Createuserid=" + this.User.Id + " or a.id in (" + depids + "))"
|
|
|
+ where = where + " and ( a.Createuserid=" + this.User.Id + " or a.id in (" + depids + "))"
|
|
|
}
|
|
|
keyword := this.GetString("keyword")
|
|
|
parentid := this.GetString("parentid")
|
|
|
@@ -287,6 +287,13 @@ func (this *OrganizesController) Delete() {
|
|
|
this.ServeJSON()
|
|
|
return
|
|
|
}
|
|
|
+ if svc.IsPositionCheck(id) {
|
|
|
+ errinfo.Message = "操作失败!此组织下有检测地点,请先删除检测地点"
|
|
|
+ errinfo.Code = -4
|
|
|
+ this.Data["json"] = &errinfo
|
|
|
+ this.ServeJSON()
|
|
|
+ return
|
|
|
+ }
|
|
|
var entity organize.Base_Organize
|
|
|
var entityempty organize.Base_Organize
|
|
|
err := svc.DeleteEntityAndBackup(id, &entity, &entityempty, utils.ToStr(this.User.Id), this.User.Username)
|