|
|
@@ -1,7 +1,6 @@
|
|
|
package casbin
|
|
|
|
|
|
import (
|
|
|
- "dashoo.cn/backend/api/business/limsbalance"
|
|
|
"encoding/json"
|
|
|
|
|
|
"dashoo.cn/business2/parameter"
|
|
|
@@ -14,6 +13,7 @@ import (
|
|
|
. "dashoo.cn/backend/api/controllers"
|
|
|
"dashoo.cn/business2/permission"
|
|
|
"dashoo.cn/utils"
|
|
|
+ lims_organize "dashoo.cn/business_lims/organize"
|
|
|
)
|
|
|
|
|
|
// Operations about Users
|
|
|
@@ -474,24 +474,19 @@ func (this *OrganizesController) GetOrgList() {
|
|
|
this.ServeJSON()
|
|
|
}
|
|
|
|
|
|
-// @Title 删除组织
|
|
|
-// @Description 删除组织
|
|
|
-// @Param id path string true "需要删除的用户编号"
|
|
|
-// @Success 200 {object} ErrorInfo
|
|
|
-// @Failure 403 :id 为空
|
|
|
-// @router /delete_tmp [delete]
|
|
|
-func (this *OrganizesController) Delete_tmp() {
|
|
|
|
|
|
- id := "100000000"
|
|
|
+// @Title 二级单位列表
|
|
|
+// @Description 设备列表
|
|
|
+// @Success 200 {object} business.device.DeviceChannels
|
|
|
+// @router /unitlist [get]
|
|
|
+func (this *OrganizesController) UnitList() {
|
|
|
+ var unitorg []lims_organize.Base_Organize
|
|
|
svc := organize.GetOrganizeService(utils.DBE)
|
|
|
- ids := svc.GetAllChildById(id)
|
|
|
- svcl := limsbalance.GetLimsBalanceService(utils.DBE)
|
|
|
- //where := "DepartmentId IN (" + ids + ")"
|
|
|
- //err := svcl.DeleteEntityBytbl(BaseUserName, where)
|
|
|
- whereo := "Id NOT IN (" + ids + ")"
|
|
|
-
|
|
|
- svcl.DeleteEntityBytbl("Base_Organize", whereo)
|
|
|
-
|
|
|
-
|
|
|
+ where := "Category='unit'"
|
|
|
+ svc.GetEntities(&unitorg, where)
|
|
|
|
|
|
+ var datainfo DataInfo
|
|
|
+ datainfo.Items = unitorg
|
|
|
+ this.Data["json"] = &datainfo
|
|
|
+ this.ServeJSON()
|
|
|
}
|