This commit is contained in:
2023-07-19 15:20:29 +08:00
parent 33ccda7214
commit a487054e79
3 changed files with 41 additions and 14 deletions

View File

@@ -113,4 +113,12 @@ public interface SysDeptService {
* @return 结果
*/
public int deleteDeptById(Long deptId);
/**
* 创建站点对应的组织部门
* @param parentDeptId 运营商对应的deptId
* @param stationAdminName 站点负责人姓名,用作组织部门负责人姓名
* @param stationTel 站点联系电话, 用作联系电话
*/
SysDept createStationDept(Long parentDeptId, String stationName, String stationAdminName, String stationTel);
}

View File

@@ -1,6 +1,7 @@
package com.jsowell.system.service.impl;
import com.jsowell.common.annotation.DataScope;
import com.jsowell.common.constant.Constants;
import com.jsowell.common.constant.UserConstants;
import com.jsowell.common.core.domain.TreeSelect;
import com.jsowell.common.core.domain.entity.SysDept;
@@ -292,4 +293,25 @@ public class SysDeptServiceImpl implements SysDeptService {
private boolean hasChild(List<SysDept> list, SysDept t) {
return getChildList(list, t).size() > 0;
}
/**
* 创建站点对应的组织部门
* @param parentDeptId 运营商对应的deptId
* @param stationAdminName 站点负责人姓名,用作组织部门负责人姓名
* @param stationTel 站点联系电话, 用作联系电话
*/
@Override
public SysDept createStationDept(Long parentDeptId, String stationName, String stationAdminName, String stationTel) {
// 新增sys_dept
SysDept dept = new SysDept();
// 根据运营商Id查询到对应的部门id
dept.setParentId(parentDeptId);
dept.setOrderNum(Constants.zero);
dept.setDeptName(StringUtils.trim(stationName));
dept.setLeader(StringUtils.trim(stationAdminName));
dept.setPhone(StringUtils.trim(stationTel));
dept.setStatus(Constants.ZERO);
insertDept(dept);
return dept;
}
}