新增公司

This commit is contained in:
sxu 2025-01-04 22:00:45 +08:00
parent 4ce1078a1b
commit 8494438c24
8 changed files with 47 additions and 5 deletions

View File

@ -113,6 +113,8 @@ public class SysDept extends BaseEntity {
*/ */
private String roleName; private String roleName;
private String keyWord;
public void setCity(String city) { public void setCity(String city) {
this.city = city; this.city = city;
} }
@ -190,6 +192,14 @@ public class SysDept extends BaseEntity {
this.roleName = roleName; this.roleName = roleName;
} }
public String getKeyWord() {
return keyWord;
}
public void setKeyWord(String keyWord) {
this.keyWord = keyWord;
}
/** /**
* 子部门 * 子部门
*/ */

View File

@ -63,9 +63,9 @@ public class SafeUtil {
* @return 如果包含特殊脚本字符返回true否则返回false * @return 如果包含特殊脚本字符返回true否则返回false
*/ */
public static boolean checkScript(String mark) { public static boolean checkScript(String mark) {
if (mark != null && !"".equals(mark)) { // if (mark != null && !"".equals(mark)) {
return match(SAFE_SCRIPT_PATTERN, mark.toLowerCase().trim()); // return match(SAFE_SCRIPT_PATTERN, mark.toLowerCase().trim());
} // }
return false; return false;
} }

View File

@ -28,7 +28,7 @@ public class MimeTypeUtils
public static final String[] DEFAULT_ALLOWED_EXTENSION = { public static final String[] DEFAULT_ALLOWED_EXTENSION = {
// 图片 // 图片
"bmp", "gif", "jpg", "jpeg", "png", "bmp", "gif", "jpg", "jpeg", "png", "svg",
// word excel powerpoint // word excel powerpoint
"doc", "docx", "xls", "xlsx","csv", "ppt", "pptx", "html", "htm", "txt", "doc", "docx", "xls", "xlsx","csv", "ppt", "pptx", "html", "htm", "txt",
// 压缩文件 // 压缩文件

View File

@ -1,7 +1,9 @@
package com.bonus.system.controller; package com.bonus.system.controller;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import com.bonus.common.core.web.page.TableDataInfo;
import com.bonus.common.log.annotation.SysLog; import com.bonus.common.log.annotation.SysLog;
import com.bonus.common.log.enums.OperaType; import com.bonus.common.log.enums.OperaType;
import com.bonus.common.security.annotation.InnerAuth; import com.bonus.common.security.annotation.InnerAuth;
@ -58,6 +60,20 @@ public class SysDeptController extends BaseController
return error("系统异常"); return error("系统异常");
} }
@GetMapping("/deptList")
@SysLog(title = "运营人员获取公司列表", businessType = OperaType.QUERY,logType = 0,module = "系统管理->部门管理")
public TableDataInfo deptList(SysDept dept) {
List<SysDept> deptList = new ArrayList<>();
try{
startPage();
deptList = deptService.getDeptList(dept);
return getDataTable(deptList);
}catch (Exception e){
log.error(e.toString(),e);
}
return getDataTableError(deptList);
}
/** /**
* 查询部门列表排除节点 * 查询部门列表排除节点
*/ */

View File

@ -21,6 +21,8 @@ public interface SysDeptMapper
*/ */
public List<SysDept> selectDeptList(SysDept dept); public List<SysDept> selectDeptList(SysDept dept);
List<SysDept> getDeptList(SysDept dept);
/** /**
* 查询部门人员树列表 * 查询部门人员树列表
* *

View File

@ -20,6 +20,8 @@ public interface ISysDeptService
*/ */
public List<SysDept> selectDeptList(SysDept dept); public List<SysDept> selectDeptList(SysDept dept);
public List<SysDept> getDeptList(SysDept dept);
/** /**
* 查询部门树结构信息 * 查询部门树结构信息
* *

View File

@ -87,6 +87,11 @@ public class SysDeptServiceImpl implements ISysDeptService
return deptMapper.selectDeptList(dept); return deptMapper.selectDeptList(dept);
} }
@Override
public List<SysDept> getDeptList(SysDept dept) {
return deptMapper.getDeptList(dept);
}
/** /**
* 查询部门树结构信息 * 查询部门树结构信息
* *

View File

@ -72,6 +72,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by d.parent_id, d.order_num order by d.parent_id, d.order_num
</select> </select>
<select id="getDeptList" resultType="com.bonus.system.api.domain.SysDept">
select * from sys_dept sd where parent_id='0'
<if test="keyWord != null and keyWord != ''">
and sd.dept_name like concat('%', #{keyWord}, '%')
</if>
</select>
<select id="selectDeptUserList" resultType="com.bonus.system.api.domain.SysDept"> <select id="selectDeptUserList" resultType="com.bonus.system.api.domain.SysDept">
SELECT SELECT
d.dept_id AS deptId, d.dept_id AS deptId,
@ -146,7 +153,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1 where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1
</select> </select>
<insert id="insertDept" parameterType="com.bonus.system.api.domain.SysDept"> <insert id="insertDept" parameterType="com.bonus.system.api.domain.SysDept" useGeneratedKeys="true" keyProperty="deptId">
insert into sys_dept( insert into sys_dept(
<if test="deptId != null and deptId != 0">dept_id,</if> <if test="deptId != null and deptId != 0">dept_id,</if>
<if test="parentId != null and parentId != 0">parent_id,</if> <if test="parentId != null and parentId != 0">parent_id,</if>