diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/property/TdPropertyManagerController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/property/TdPropertyManagerController.java index ea5d589..462197c 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/property/TdPropertyManagerController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/property/TdPropertyManagerController.java @@ -4,6 +4,7 @@ import java.util.Collections; import java.util.List; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.ruoyi.common.utils.ShiroUtils; import com.ruoyi.common.utils.uuid.Seq; import com.ruoyi.system.domain.TdPropertyInfo; import com.ruoyi.system.service.ITdPropertyInfoService; @@ -104,6 +105,7 @@ public class TdPropertyManagerController extends BaseController { @ResponseBody public AjaxResult addSave(TdPropertyManager tdPropertyManager) { tdPropertyManager.setUseId("Property_" + Seq.getId(Seq.commSeqType)); + tdPropertyManager.setDeptId(ShiroUtils.getSysUser().getDeptId()); return toAjax(tdPropertyManagerService.insertTdPropertyManager(tdPropertyManager)); } @@ -126,6 +128,7 @@ public class TdPropertyManagerController extends BaseController { @PostMapping("/edit") @ResponseBody public AjaxResult editSave(TdPropertyManager tdPropertyManager) { + tdPropertyManager.setDeptId(ShiroUtils.getSysUser().getDeptId()); return toAjax(tdPropertyManagerService.updateTdPropertyManager(tdPropertyManager)); } diff --git a/ruoyi-admin/src/main/resources/templates/system/property/property/add.html b/ruoyi-admin/src/main/resources/templates/system/property/property/add.html index 8e8fa9f..93684ab 100644 --- a/ruoyi-admin/src/main/resources/templates/system/property/property/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/property/property/add.html @@ -10,7 +10,7 @@