| | |
| | | package com.fzzy.sys.controller.system; |
| | | |
| | | import com.fzzy.igds.constant.Constant; |
| | | import com.fzzy.igds.domain.Dept; |
| | | import com.fzzy.igds.service.CoreCompanyService; |
| | | import com.fzzy.igds.service.CoreDeptService; |
| | | import com.ruoyi.common.annotation.Log; |
| | |
| | | return deptList; |
| | | } |
| | | |
| | | @PostMapping("/getDeptByUserType") |
| | | @ResponseBody |
| | | public List<Dept> getDeptByUserType(@RequestBody String parentId) { |
| | | List<Dept> deptByUserType = coreDeptService.getDeptByUserType(parentId); |
| | | return deptByUserType; |
| | | } |
| | | |
| | | /** |
| | | * 新增部门 |
| | | */ |
| | |
| | | if(i > 0){ |
| | | if (Constant.DEPT_TYPE_10.equals(dept.getType())) { |
| | | //新增公司信息 |
| | | coreCompanyService.saveOrUpdate(dept); |
| | | coreCompanyService.saveOrUpdate(dept, true); |
| | | } |
| | | if (Constant.DEPT_TYPE_20.equals(dept.getType())) { |
| | | //新增库区信息 |
| | | coreDeptService.saveOrUpdate(dept); |
| | | coreDeptService.saveOrUpdate(dept, true); |
| | | } |
| | | } |
| | | return toAjax(i); |
| | |
| | | if(i > 0){ |
| | | if (Constant.DEPT_TYPE_10.equals(dept.getType())) { |
| | | //新增公司信息 |
| | | coreCompanyService.saveOrUpdate(dept); |
| | | coreCompanyService.saveOrUpdate(dept, false); |
| | | } |
| | | if (Constant.DEPT_TYPE_20.equals(dept.getType())) { |
| | | //新增库区信息 |
| | | coreDeptService.saveOrUpdate(dept); |
| | | coreDeptService.saveOrUpdate(dept, false); |
| | | } |
| | | } |
| | | return toAjax(i); |