Commit 75ecc39d by jiang'yun

修改

parent 58a69b50

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

......@@ -3,14 +3,14 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi</artifactId>
<groupId>com.zjsgfa</groupId>
<artifactId>zjsgfa</artifactId>
<version>3.9.0</version>
<packaging>jar</packaging>
<name>ruoyi</name>
<url>http://www.ruoyi.vip</url>
<description>若依管理系统</description>
<name>zjsgfa</name>
<description>钻井施工方案系统</description>
<parent>
<groupId>org.springframework.boot</groupId>
......
package com.ruoyi.project.system.domain.vo;
import com.ruoyi.common.utils.StringUtils;
/**
* 路由显示信息
*
* @author ruoyi
*/
public class MetaVo
{
/**
* 设置该路由在侧边栏和面包屑中展示的名字
*/
private String title;
/**
* 设置该路由的图标,对应路径src/assets/icons/svg
*/
private String icon;
/**
* 设置为true,则不会被 <keep-alive>缓存
*/
private boolean noCache;
/**
* 内链地址(http(s)://开头)
*/
private String link;
public MetaVo()
{
}
public MetaVo(String title, String icon)
{
this.title = title;
this.icon = icon;
}
public MetaVo(String title, String icon, boolean noCache)
{
this.title = title;
this.icon = icon;
this.noCache = noCache;
}
public MetaVo(String title, String icon, String link)
{
this.title = title;
this.icon = icon;
this.link = link;
}
public MetaVo(String title, String icon, boolean noCache, String link)
{
this.title = title;
this.icon = icon;
this.noCache = noCache;
if (StringUtils.ishttp(link))
{
this.link = link;
}
}
public boolean isNoCache()
{
return noCache;
}
public void setNoCache(boolean noCache)
{
this.noCache = noCache;
}
public String getTitle()
{
return title;
}
public void setTitle(String title)
{
this.title = title;
}
public String getIcon()
{
return icon;
}
public void setIcon(String icon)
{
this.icon = icon;
}
public String getLink()
{
return link;
}
public void setLink(String link)
{
this.link = link;
}
}
package com.ruoyi.project.system.domain.vo;
import com.fasterxml.jackson.annotation.JsonInclude;
import java.util.List;
/**
* 路由配置信息
*
* @author ruoyi
*/
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class RouterVo
{
/**
* 路由名字
*/
private String name;
/**
* 路由地址
*/
private String path;
/**
* 是否隐藏路由,当设置 true 的时候该路由不会再侧边栏出现
*/
private boolean hidden;
/**
* 重定向地址,当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
*/
private String redirect;
/**
* 组件地址
*/
private String component;
/**
* 路由参数:如 {"id": 1, "name": "ry"}
*/
private String query;
/**
* 当你一个路由下面的 children 声明的路由大于1个时,自动会变成嵌套的模式--如组件页面
*/
private Boolean alwaysShow;
/**
* 其他元素
*/
private MetaVo meta;
/**
* 子路由
*/
private List<RouterVo> children;
public String getName()
{
return name;
}
public void setName(String name)
{
this.name = name;
}
public String getPath()
{
return path;
}
public void setPath(String path)
{
this.path = path;
}
public boolean getHidden()
{
return hidden;
}
public void setHidden(boolean hidden)
{
this.hidden = hidden;
}
public String getRedirect()
{
return redirect;
}
public void setRedirect(String redirect)
{
this.redirect = redirect;
}
public String getComponent()
{
return component;
}
public void setComponent(String component)
{
this.component = component;
}
public String getQuery()
{
return query;
}
public void setQuery(String query)
{
this.query = query;
}
public Boolean getAlwaysShow()
{
return alwaysShow;
}
public void setAlwaysShow(Boolean alwaysShow)
{
this.alwaysShow = alwaysShow;
}
public MetaVo getMeta()
{
return meta;
}
public void setMeta(MetaVo meta)
{
this.meta = meta;
}
public List<RouterVo> getChildren()
{
return children;
}
public void setChildren(List<RouterVo> children)
{
this.children = children;
}
}
package com.ruoyi.project.system.mapper;
import java.util.List;
import com.ruoyi.project.system.domain.SysConfig;
/**
* 参数配置 数据层
*
* @author ruoyi
*/
public interface SysConfigMapper
{
/**
* 查询参数配置信息
*
* @param config 参数配置信息
* @return 参数配置信息
*/
public SysConfig selectConfig(SysConfig config);
/**
* 通过ID查询配置
*
* @param configId 参数ID
* @return 参数配置信息
*/
public SysConfig selectConfigById(Long configId);
/**
* 查询参数配置列表
*
* @param config 参数配置信息
* @return 参数配置集合
*/
public List<SysConfig> selectConfigList(SysConfig config);
/**
* 根据键名查询参数配置信息
*
* @param configKey 参数键名
* @return 参数配置信息
*/
public SysConfig checkConfigKeyUnique(String configKey);
/**
* 新增参数配置
*
* @param config 参数配置信息
* @return 结果
*/
public int insertConfig(SysConfig config);
/**
* 修改参数配置
*
* @param config 参数配置信息
* @return 结果
*/
public int updateConfig(SysConfig config);
/**
* 删除参数配置
*
* @param configId 参数ID
* @return 结果
*/
public int deleteConfigById(Long configId);
/**
* 批量删除参数信息
*
* @param configIds 需要删除的参数ID
* @return 结果
*/
public int deleteConfigByIds(Long[] configIds);
}
\ No newline at end of file
package com.ruoyi.project.system.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.project.system.domain.SysDept;
/**
* 部门管理 数据层
*
* @author ruoyi
*/
public interface SysDeptMapper
{
/**
* 查询部门管理数据
*
* @param dept 部门信息
* @return 部门信息集合
*/
public List<SysDept> selectDeptList(SysDept dept);
/**
* 根据角色ID查询部门树信息
*
* @param roleId 角色ID
* @param deptCheckStrictly 部门树选择项是否关联显示
* @return 选中部门列表
*/
public List<Long> selectDeptListByRoleId(@Param("roleId") Long roleId, @Param("deptCheckStrictly") boolean deptCheckStrictly);
/**
* 根据部门ID查询信息
*
* @param deptId 部门ID
* @return 部门信息
*/
public SysDept selectDeptById(Long deptId);
/**
* 根据ID查询所有子部门
*
* @param deptId 部门ID
* @return 部门列表
*/
public List<SysDept> selectChildrenDeptById(Long deptId);
/**
* 根据ID查询所有子部门(正常状态)
*
* @param deptId 部门ID
* @return 子部门数
*/
public int selectNormalChildrenDeptById(Long deptId);
/**
* 是否存在子节点
*
* @param deptId 部门ID
* @return 结果
*/
public int hasChildByDeptId(Long deptId);
/**
* 查询部门是否存在用户
*
* @param deptId 部门ID
* @return 结果
*/
public int checkDeptExistUser(Long deptId);
/**
* 校验部门名称是否唯一
*
* @param deptName 部门名称
* @param parentId 父部门ID
* @return 结果
*/
public SysDept checkDeptNameUnique(@Param("deptName") String deptName, @Param("parentId") Long parentId);
/**
* 新增部门信息
*
* @param dept 部门信息
* @return 结果
*/
public int insertDept(SysDept dept);
/**
* 修改部门信息
*
* @param dept 部门信息
* @return 结果
*/
public int updateDept(SysDept dept);
/**
* 修改所在部门正常状态
*
* @param deptIds 部门ID组
*/
public void updateDeptStatusNormal(Long[] deptIds);
/**
* 修改子元素关系
*
* @param depts 子元素
* @return 结果
*/
public int updateDeptChildren(@Param("depts") List<SysDept> depts);
/**
* 删除部门管理信息
*
* @param deptId 部门ID
* @return 结果
*/
public int deleteDeptById(Long deptId);
}
package com.ruoyi.project.system.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.project.system.domain.SysDictData;
/**
* 字典表 数据层
*
* @author ruoyi
*/
public interface SysDictDataMapper
{
/**
* 根据条件分页查询字典数据
*
* @param dictData 字典数据信息
* @return 字典数据集合信息
*/
public List<SysDictData> selectDictDataList(SysDictData dictData);
/**
* 根据字典类型查询字典数据
*
* @param dictType 字典类型
* @return 字典数据集合信息
*/
public List<SysDictData> selectDictDataByType(String dictType);
/**
* 根据字典类型和字典键值查询字典数据信息
*
* @param dictType 字典类型
* @param dictValue 字典键值
* @return 字典标签
*/
public String selectDictLabel(@Param("dictType") String dictType, @Param("dictValue") String dictValue);
/**
* 根据字典数据ID查询信息
*
* @param dictCode 字典数据ID
* @return 字典数据
*/
public SysDictData selectDictDataById(Long dictCode);
/**
* 查询字典数据
*
* @param dictType 字典类型
* @return 字典数据
*/
public int countDictDataByType(String dictType);
/**
* 通过字典ID删除字典数据信息
*
* @param dictCode 字典数据ID
* @return 结果
*/
public int deleteDictDataById(Long dictCode);
/**
* 批量删除字典数据信息
*
* @param dictCodes 需要删除的字典数据ID
* @return 结果
*/
public int deleteDictDataByIds(Long[] dictCodes);
/**
* 新增字典数据信息
*
* @param dictData 字典数据信息
* @return 结果
*/
public int insertDictData(SysDictData dictData);
/**
* 修改字典数据信息
*
* @param dictData 字典数据信息
* @return 结果
*/
public int updateDictData(SysDictData dictData);
/**
* 同步修改字典类型
*
* @param oldDictType 旧字典类型
* @param newDictType 新旧字典类型
* @return 结果
*/
public int updateDictDataType(@Param("oldDictType") String oldDictType, @Param("newDictType") String newDictType);
}
package com.ruoyi.project.system.mapper;
import java.util.List;
import com.ruoyi.project.system.domain.SysDictType;
/**
* 字典表 数据层
*
* @author ruoyi
*/
public interface SysDictTypeMapper
{
/**
* 根据条件分页查询字典类型
*
* @param dictType 字典类型信息
* @return 字典类型集合信息
*/
public List<SysDictType> selectDictTypeList(SysDictType dictType);
/**
* 根据所有字典类型
*
* @return 字典类型集合信息
*/
public List<SysDictType> selectDictTypeAll();
/**
* 根据字典类型ID查询信息
*
* @param dictId 字典类型ID
* @return 字典类型
*/
public SysDictType selectDictTypeById(Long dictId);
/**
* 根据字典类型查询信息
*
* @param dictType 字典类型
* @return 字典类型
*/
public SysDictType selectDictTypeByType(String dictType);
/**
* 通过字典ID删除字典信息
*
* @param dictId 字典ID
* @return 结果
*/
public int deleteDictTypeById(Long dictId);
/**
* 批量删除字典类型信息
*
* @param dictIds 需要删除的字典ID
* @return 结果
*/
public int deleteDictTypeByIds(Long[] dictIds);
/**
* 新增字典类型信息
*
* @param dictType 字典类型信息
* @return 结果
*/
public int insertDictType(SysDictType dictType);
/**
* 修改字典类型信息
*
* @param dictType 字典类型信息
* @return 结果
*/
public int updateDictType(SysDictType dictType);
/**
* 校验字典类型称是否唯一
*
* @param dictType 字典类型
* @return 结果
*/
public SysDictType checkDictTypeUnique(String dictType);
}
package com.ruoyi.project.system.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.project.system.domain.SysMenu;
/**
* 菜单表 数据层
*
* @author ruoyi
*/
public interface SysMenuMapper
{
/**
* 查询系统菜单列表
*
* @param menu 菜单信息
* @return 菜单列表
*/
public List<SysMenu> selectMenuList(SysMenu menu);
/**
* 根据用户所有权限
*
* @return 权限列表
*/
public List<String> selectMenuPerms();
/**
* 根据用户查询系统菜单列表
*
* @param menu 菜单信息
* @return 菜单列表
*/
public List<SysMenu> selectMenuListByUserId(SysMenu menu);
/**
* 根据用户ID查询权限
*
* @param userId 用户ID
* @return 权限列表
*/
public List<String> selectMenuPermsByUserId(Long userId);
/**
* 根据角色ID查询权限
*
* @param roleId 角色ID
* @return 权限列表
*/
public List<String> selectMenuPermsByRoleId(Long roleId);
/**
* 根据用户ID查询菜单
*
* @return 菜单列表
*/
public List<SysMenu> selectMenuTreeAll();
/**
* 根据用户ID查询菜单
*
* @param username 用户ID
* @return 菜单列表
*/
public List<SysMenu> selectMenuTreeByUserId(Long userId);
/**
* 根据角色ID查询菜单树信息
*
* @param roleId 角色ID
* @param menuCheckStrictly 菜单树选择项是否关联显示
* @return 选中菜单列表
*/
public List<Long> selectMenuListByRoleId(@Param("roleId") Long roleId, @Param("menuCheckStrictly") boolean menuCheckStrictly);
/**
* 根据菜单ID查询信息
*
* @param menuId 菜单ID
* @return 菜单信息
*/
public SysMenu selectMenuById(Long menuId);
/**
* 是否存在菜单子节点
*
* @param menuId 菜单ID
* @return 结果
*/
public int hasChildByMenuId(Long menuId);
/**
* 新增菜单信息
*
* @param menu 菜单信息
* @return 结果
*/
public int insertMenu(SysMenu menu);
/**
* 修改菜单信息
*
* @param menu 菜单信息
* @return 结果
*/
public int updateMenu(SysMenu menu);
/**
* 删除菜单管理信息
*
* @param menuId 菜单ID
* @return 结果
*/
public int deleteMenuById(Long menuId);
/**
* 校验菜单名称是否唯一
*
* @param menuName 菜单名称
* @param parentId 父菜单ID
* @return 结果
*/
public SysMenu checkMenuNameUnique(@Param("menuName") String menuName, @Param("parentId") Long parentId);
}
package com.ruoyi.project.system.mapper;
import java.util.List;
import com.ruoyi.project.system.domain.SysNotice;
/**
* 通知公告表 数据层
*
* @author ruoyi
*/
public interface SysNoticeMapper
{
/**
* 查询公告信息
*
* @param noticeId 公告ID
* @return 公告信息
*/
public SysNotice selectNoticeById(Long noticeId);
/**
* 查询公告列表
*
* @param notice 公告信息
* @return 公告集合
*/
public List<SysNotice> selectNoticeList(SysNotice notice);
/**
* 新增公告
*
* @param notice 公告信息
* @return 结果
*/
public int insertNotice(SysNotice notice);
/**
* 修改公告
*
* @param notice 公告信息
* @return 结果
*/
public int updateNotice(SysNotice notice);
/**
* 批量删除公告
*
* @param noticeId 公告ID
* @return 结果
*/
public int deleteNoticeById(Long noticeId);
/**
* 批量删除公告信息
*
* @param noticeIds 需要删除的公告ID
* @return 结果
*/
public int deleteNoticeByIds(Long[] noticeIds);
}
\ No newline at end of file
package com.ruoyi.project.system.mapper;
import java.util.List;
import com.ruoyi.project.system.domain.SysPost;
/**
* 岗位信息 数据层
*
* @author ruoyi
*/
public interface SysPostMapper
{
/**
* 查询岗位数据集合
*
* @param post 岗位信息
* @return 岗位数据集合
*/
public List<SysPost> selectPostList(SysPost post);
/**
* 查询所有岗位
*
* @return 岗位列表
*/
public List<SysPost> selectPostAll();
/**
* 通过岗位ID查询岗位信息
*
* @param postId 岗位ID
* @return 角色对象信息
*/
public SysPost selectPostById(Long postId);
/**
* 根据用户ID获取岗位选择框列表
*
* @param userId 用户ID
* @return 选中岗位ID列表
*/
public List<Long> selectPostListByUserId(Long userId);
/**
* 查询用户所属岗位组
*
* @param userName 用户名
* @return 结果
*/
public List<SysPost> selectPostsByUserName(String userName);
/**
* 删除岗位信息
*
* @param postId 岗位ID
* @return 结果
*/
public int deletePostById(Long postId);
/**
* 批量删除岗位信息
*
* @param postIds 需要删除的岗位ID
* @return 结果
*/
public int deletePostByIds(Long[] postIds);
/**
* 修改岗位信息
*
* @param post 岗位信息
* @return 结果
*/
public int updatePost(SysPost post);
/**
* 新增岗位信息
*
* @param post 岗位信息
* @return 结果
*/
public int insertPost(SysPost post);
/**
* 校验岗位名称
*
* @param postName 岗位名称
* @return 结果
*/
public SysPost checkPostNameUnique(String postName);
/**
* 校验岗位编码
*
* @param postCode 岗位编码
* @return 结果
*/
public SysPost checkPostCodeUnique(String postCode);
}
package com.ruoyi.project.system.mapper;
import java.util.List;
import com.ruoyi.project.system.domain.SysRoleDept;
/**
* 角色与部门关联表 数据层
*
* @author ruoyi
*/
public interface SysRoleDeptMapper
{
/**
* 通过角色ID删除角色和部门关联
*
* @param roleId 角色ID
* @return 结果
*/
public int deleteRoleDeptByRoleId(Long roleId);
/**
* 批量删除角色部门关联信息
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteRoleDept(Long[] ids);
/**
* 查询部门使用数量
*
* @param deptId 部门ID
* @return 结果
*/
public int selectCountRoleDeptByDeptId(Long deptId);
/**
* 批量新增角色部门信息
*
* @param roleDeptList 角色部门列表
* @return 结果
*/
public int batchRoleDept(List<SysRoleDept> roleDeptList);
}
package com.ruoyi.project.system.mapper;
import java.util.List;
import com.ruoyi.project.system.domain.SysRole;
/**
* 角色表 数据层
*
* @author ruoyi
*/
public interface SysRoleMapper
{
/**
* 根据条件分页查询角色数据
*
* @param role 角色信息
* @return 角色数据集合信息
*/
public List<SysRole> selectRoleList(SysRole role);
/**
* 根据用户ID查询角色
*
* @param userId 用户ID
* @return 角色列表
*/
public List<SysRole> selectRolePermissionByUserId(Long userId);
/**
* 查询所有角色
*
* @return 角色列表
*/
public List<SysRole> selectRoleAll();
/**
* 根据用户ID获取角色选择框列表
*
* @param userId 用户ID
* @return 选中角色ID列表
*/
public List<Long> selectRoleListByUserId(Long userId);
/**
* 通过角色ID查询角色
*
* @param roleId 角色ID
* @return 角色对象信息
*/
public SysRole selectRoleById(Long roleId);
/**
* 根据用户ID查询角色
*
* @param userName 用户名
* @return 角色列表
*/
public List<SysRole> selectRolesByUserName(String userName);
/**
* 校验角色名称是否唯一
*
* @param roleName 角色名称
* @return 角色信息
*/
public SysRole checkRoleNameUnique(String roleName);
/**
* 校验角色权限是否唯一
*
* @param roleKey 角色权限
* @return 角色信息
*/
public SysRole checkRoleKeyUnique(String roleKey);
/**
* 修改角色信息
*
* @param role 角色信息
* @return 结果
*/
public int updateRole(SysRole role);
/**
* 新增角色信息
*
* @param role 角色信息
* @return 结果
*/
public int insertRole(SysRole role);
/**
* 通过角色ID删除角色
*
* @param roleId 角色ID
* @return 结果
*/
public int deleteRoleById(Long roleId);
/**
* 批量删除角色信息
*
* @param roleIds 需要删除的角色ID
* @return 结果
*/
public int deleteRoleByIds(Long[] roleIds);
}
package com.ruoyi.project.system.mapper;
import java.util.List;
import com.ruoyi.project.system.domain.SysRoleMenu;
/**
* 角色与菜单关联表 数据层
*
* @author ruoyi
*/
public interface SysRoleMenuMapper
{
/**
* 查询菜单使用数量
*
* @param menuId 菜单ID
* @return 结果
*/
public int checkMenuExistRole(Long menuId);
/**
* 通过角色ID删除角色和菜单关联
*
* @param roleId 角色ID
* @return 结果
*/
public int deleteRoleMenuByRoleId(Long roleId);
/**
* 批量删除角色菜单关联信息
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteRoleMenu(Long[] ids);
/**
* 批量新增角色菜单信息
*
* @param roleMenuList 角色菜单列表
* @return 结果
*/
public int batchRoleMenu(List<SysRoleMenu> roleMenuList);
}
package com.ruoyi.project.system.mapper;
import java.util.List;
import com.ruoyi.project.system.domain.SysUserPost;
/**
* 用户与岗位关联表 数据层
*
* @author ruoyi
*/
public interface SysUserPostMapper
{
/**
* 通过用户ID删除用户和岗位关联
*
* @param userId 用户ID
* @return 结果
*/
public int deleteUserPostByUserId(Long userId);
/**
* 通过岗位ID查询岗位使用数量
*
* @param postId 岗位ID
* @return 结果
*/
public int countUserPostById(Long postId);
/**
* 批量删除用户和岗位关联
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteUserPost(Long[] ids);
/**
* 批量新增用户岗位信息
*
* @param userPostList 用户岗位列表
* @return 结果
*/
public int batchUserPost(List<SysUserPost> userPostList);
}
package com.ruoyi.project.system.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.project.system.domain.SysUserRole;
/**
* 用户与角色关联表 数据层
*
* @author ruoyi
*/
public interface SysUserRoleMapper
{
/**
* 通过用户ID删除用户和角色关联
*
* @param userId 用户ID
* @return 结果
*/
public int deleteUserRoleByUserId(Long userId);
/**
* 批量删除用户和角色关联
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteUserRole(Long[] ids);
/**
* 通过角色ID查询角色使用数量
*
* @param roleId 角色ID
* @return 结果
*/
public int countUserRoleByRoleId(Long roleId);
/**
* 批量新增用户角色信息
*
* @param userRoleList 用户角色列表
* @return 结果
*/
public int batchUserRole(List<SysUserRole> userRoleList);
/**
* 删除用户和角色关联信息
*
* @param userRole 用户和角色关联信息
* @return 结果
*/
public int deleteUserRoleInfo(SysUserRole userRole);
/**
* 批量取消授权用户角色
*
* @param roleId 角色ID
* @param userIds 需要删除的用户数据ID
* @return 结果
*/
public int deleteUserRoleInfos(@Param("roleId") Long roleId, @Param("userIds") Long[] userIds);
}
package com.ruoyi.project.system.service;
import java.util.List;
import com.ruoyi.project.system.domain.SysConfig;
/**
* 参数配置 服务层
*
* @author ruoyi
*/
public interface ISysConfigService
{
/**
* 查询参数配置信息
*
* @param configId 参数配置ID
* @return 参数配置信息
*/
public SysConfig selectConfigById(Long configId);
/**
* 根据键名查询参数配置信息
*
* @param configKey 参数键名
* @return 参数键值
*/
public String selectConfigByKey(String configKey);
/**
* 获取验证码开关
*
* @return true开启,false关闭
*/
public boolean selectCaptchaEnabled();
/**
* 查询参数配置列表
*
* @param config 参数配置信息
* @return 参数配置集合
*/
public List<SysConfig> selectConfigList(SysConfig config);
/**
* 新增参数配置
*
* @param config 参数配置信息
* @return 结果
*/
public int insertConfig(SysConfig config);
/**
* 修改参数配置
*
* @param config 参数配置信息
* @return 结果
*/
public int updateConfig(SysConfig config);
/**
* 批量删除参数信息
*
* @param configIds 需要删除的参数ID
*/
public void deleteConfigByIds(Long[] configIds);
/**
* 加载参数缓存数据
*/
public void loadingConfigCache();
/**
* 清空参数缓存数据
*/
public void clearConfigCache();
/**
* 重置参数缓存数据
*/
public void resetConfigCache();
/**
* 校验参数键名是否唯一
*
* @param config 参数信息
* @return 结果
*/
public boolean checkConfigKeyUnique(SysConfig config);
}
package com.ruoyi.project.system.service;
import java.util.List;
import com.ruoyi.framework.web.domain.TreeSelect;
import com.ruoyi.project.system.domain.SysDept;
/**
* 部门管理 服务层
*
* @author ruoyi
*/
public interface ISysDeptService
{
/**
* 查询部门管理数据
*
* @param dept 部门信息
* @return 部门信息集合
*/
public List<SysDept> selectDeptList(SysDept dept);
/**
* 查询部门树结构信息
*
* @param dept 部门信息
* @return 部门树信息集合
*/
public List<TreeSelect> selectDeptTreeList(SysDept dept);
/**
* 构建前端所需要树结构
*
* @param depts 部门列表
* @return 树结构列表
*/
public List<SysDept> buildDeptTree(List<SysDept> depts);
/**
* 构建前端所需要下拉树结构
*
* @param depts 部门列表
* @return 下拉树结构列表
*/
public List<TreeSelect> buildDeptTreeSelect(List<SysDept> depts);
/**
* 根据角色ID查询部门树信息
*
* @param roleId 角色ID
* @return 选中部门列表
*/
public List<Long> selectDeptListByRoleId(Long roleId);
/**
* 根据部门ID查询信息
*
* @param deptId 部门ID
* @return 部门信息
*/
public SysDept selectDeptById(Long deptId);
/**
* 根据ID查询所有子部门(正常状态)
*
* @param deptId 部门ID
* @return 子部门数
*/
public int selectNormalChildrenDeptById(Long deptId);
/**
* 是否存在部门子节点
*
* @param deptId 部门ID
* @return 结果
*/
public boolean hasChildByDeptId(Long deptId);
/**
* 查询部门是否存在用户
*
* @param deptId 部门ID
* @return 结果 true 存在 false 不存在
*/
public boolean checkDeptExistUser(Long deptId);
/**
* 校验部门名称是否唯一
*
* @param dept 部门信息
* @return 结果
*/
public boolean checkDeptNameUnique(SysDept dept);
/**
* 校验部门是否有数据权限
*
* @param deptId 部门id
*/
public void checkDeptDataScope(Long deptId);
/**
* 新增保存部门信息
*
* @param dept 部门信息
* @return 结果
*/
public int insertDept(SysDept dept);
/**
* 修改保存部门信息
*
* @param dept 部门信息
* @return 结果
*/
public int updateDept(SysDept dept);
/**
* 删除部门管理信息
*
* @param deptId 部门ID
* @return 结果
*/
public int deleteDeptById(Long deptId);
}
package com.ruoyi.project.system.service;
import java.util.List;
import com.ruoyi.project.system.domain.SysDictData;
/**
* 字典 业务层
*
* @author ruoyi
*/
public interface ISysDictDataService
{
/**
* 根据条件分页查询字典数据
*
* @param dictData 字典数据信息
* @return 字典数据集合信息
*/
public List<SysDictData> selectDictDataList(SysDictData dictData);
/**
* 根据字典类型和字典键值查询字典数据信息
*
* @param dictType 字典类型
* @param dictValue 字典键值
* @return 字典标签
*/
public String selectDictLabel(String dictType, String dictValue);
/**
* 根据字典数据ID查询信息
*
* @param dictCode 字典数据ID
* @return 字典数据
*/
public SysDictData selectDictDataById(Long dictCode);
/**
* 批量删除字典数据信息
*
* @param dictCodes 需要删除的字典数据ID
*/
public void deleteDictDataByIds(Long[] dictCodes);
/**
* 新增保存字典数据信息
*
* @param dictData 字典数据信息
* @return 结果
*/
public int insertDictData(SysDictData dictData);
/**
* 修改保存字典数据信息
*
* @param dictData 字典数据信息
* @return 结果
*/
public int updateDictData(SysDictData dictData);
}
package com.ruoyi.project.system.service;
import java.util.List;
import com.ruoyi.project.system.domain.SysDictData;
import com.ruoyi.project.system.domain.SysDictType;
/**
* 字典 业务层
*
* @author ruoyi
*/
public interface ISysDictTypeService
{
/**
* 根据条件分页查询字典类型
*
* @param dictType 字典类型信息
* @return 字典类型集合信息
*/
public List<SysDictType> selectDictTypeList(SysDictType dictType);
/**
* 根据所有字典类型
*
* @return 字典类型集合信息
*/
public List<SysDictType> selectDictTypeAll();
/**
* 根据字典类型查询字典数据
*
* @param dictType 字典类型
* @return 字典数据集合信息
*/
public List<SysDictData> selectDictDataByType(String dictType);
/**
* 根据字典类型ID查询信息
*
* @param dictId 字典类型ID
* @return 字典类型
*/
public SysDictType selectDictTypeById(Long dictId);
/**
* 根据字典类型查询信息
*
* @param dictType 字典类型
* @return 字典类型
*/
public SysDictType selectDictTypeByType(String dictType);
/**
* 批量删除字典信息
*
* @param dictIds 需要删除的字典ID
*/
public void deleteDictTypeByIds(Long[] dictIds);
/**
* 加载字典缓存数据
*/
public void loadingDictCache();
/**
* 清空字典缓存数据
*/
public void clearDictCache();
/**
* 重置字典缓存数据
*/
public void resetDictCache();
/**
* 新增保存字典类型信息
*
* @param dictType 字典类型信息
* @return 结果
*/
public int insertDictType(SysDictType dictType);
/**
* 修改保存字典类型信息
*
* @param dictType 字典类型信息
* @return 结果
*/
public int updateDictType(SysDictType dictType);
/**
* 校验字典类型称是否唯一
*
* @param dictType 字典类型
* @return 结果
*/
public boolean checkDictTypeUnique(SysDictType dictType);
}
package com.ruoyi.project.system.service;
import java.util.List;
import java.util.Set;
import com.ruoyi.framework.web.domain.TreeSelect;
import com.ruoyi.project.system.domain.SysMenu;
import com.ruoyi.project.system.domain.vo.RouterVo;
/**
* 菜单 业务层
*
* @author ruoyi
*/
public interface ISysMenuService
{
/**
* 根据用户查询系统菜单列表
*
* @param userId 用户ID
* @return 菜单列表
*/
public List<SysMenu> selectMenuList(Long userId);
/**
* 根据用户查询系统菜单列表
*
* @param menu 菜单信息
* @param userId 用户ID
* @return 菜单列表
*/
public List<SysMenu> selectMenuList(SysMenu menu, Long userId);
/**
* 根据用户ID查询权限
*
* @param userId 用户ID
* @return 权限列表
*/
public Set<String> selectMenuPermsByUserId(Long userId);
/**
* 根据角色ID查询权限
*
* @param roleId 角色ID
* @return 权限列表
*/
public Set<String> selectMenuPermsByRoleId(Long roleId);
/**
* 根据用户ID查询菜单树信息
*
* @param userId 用户ID
* @return 菜单列表
*/
public List<SysMenu> selectMenuTreeByUserId(Long userId);
/**
* 根据角色ID查询菜单树信息
*
* @param roleId 角色ID
* @return 选中菜单列表
*/
public List<Long> selectMenuListByRoleId(Long roleId);
/**
* 构建前端路由所需要的菜单
*
* @param menus 菜单列表
* @return 路由列表
*/
public List<RouterVo> buildMenus(List<SysMenu> menus);
/**
* 构建前端所需要树结构
*
* @param menus 菜单列表
* @return 树结构列表
*/
public List<SysMenu> buildMenuTree(List<SysMenu> menus);
/**
* 构建前端所需要下拉树结构
*
* @param menus 菜单列表
* @return 下拉树结构列表
*/
public List<TreeSelect> buildMenuTreeSelect(List<SysMenu> menus);
/**
* 根据菜单ID查询信息
*
* @param menuId 菜单ID
* @return 菜单信息
*/
public SysMenu selectMenuById(Long menuId);
/**
* 是否存在菜单子节点
*
* @param menuId 菜单ID
* @return 结果 true 存在 false 不存在
*/
public boolean hasChildByMenuId(Long menuId);
/**
* 查询菜单是否存在角色
*
* @param menuId 菜单ID
* @return 结果 true 存在 false 不存在
*/
public boolean checkMenuExistRole(Long menuId);
/**
* 新增保存菜单信息
*
* @param menu 菜单信息
* @return 结果
*/
public int insertMenu(SysMenu menu);
/**
* 修改保存菜单信息
*
* @param menu 菜单信息
* @return 结果
*/
public int updateMenu(SysMenu menu);
/**
* 删除菜单管理信息
*
* @param menuId 菜单ID
* @return 结果
*/
public int deleteMenuById(Long menuId);
/**
* 校验菜单名称是否唯一
*
* @param menu 菜单信息
* @return 结果
*/
public boolean checkMenuNameUnique(SysMenu menu);
}
package com.ruoyi.project.system.service;
import java.util.List;
import com.ruoyi.project.system.domain.SysNotice;
/**
* 公告 服务层
*
* @author ruoyi
*/
public interface ISysNoticeService
{
/**
* 查询公告信息
*
* @param noticeId 公告ID
* @return 公告信息
*/
public SysNotice selectNoticeById(Long noticeId);
/**
* 查询公告列表
*
* @param notice 公告信息
* @return 公告集合
*/
public List<SysNotice> selectNoticeList(SysNotice notice);
/**
* 新增公告
*
* @param notice 公告信息
* @return 结果
*/
public int insertNotice(SysNotice notice);
/**
* 修改公告
*
* @param notice 公告信息
* @return 结果
*/
public int updateNotice(SysNotice notice);
/**
* 删除公告信息
*
* @param noticeId 公告ID
* @return 结果
*/
public int deleteNoticeById(Long noticeId);
/**
* 批量删除公告信息
*
* @param noticeIds 需要删除的公告ID
* @return 结果
*/
public int deleteNoticeByIds(Long[] noticeIds);
}
package com.ruoyi.project.system.service;
import java.util.List;
import com.ruoyi.project.system.domain.SysPost;
/**
* 岗位信息 服务层
*
* @author ruoyi
*/
public interface ISysPostService
{
/**
* 查询岗位信息集合
*
* @param post 岗位信息
* @return 岗位列表
*/
public List<SysPost> selectPostList(SysPost post);
/**
* 查询所有岗位
*
* @return 岗位列表
*/
public List<SysPost> selectPostAll();
/**
* 通过岗位ID查询岗位信息
*
* @param postId 岗位ID
* @return 角色对象信息
*/
public SysPost selectPostById(Long postId);
/**
* 根据用户ID获取岗位选择框列表
*
* @param userId 用户ID
* @return 选中岗位ID列表
*/
public List<Long> selectPostListByUserId(Long userId);
/**
* 校验岗位名称
*
* @param post 岗位信息
* @return 结果
*/
public boolean checkPostNameUnique(SysPost post);
/**
* 校验岗位编码
*
* @param post 岗位信息
* @return 结果
*/
public boolean checkPostCodeUnique(SysPost post);
/**
* 通过岗位ID查询岗位使用数量
*
* @param postId 岗位ID
* @return 结果
*/
public int countUserPostById(Long postId);
/**
* 删除岗位信息
*
* @param postId 岗位ID
* @return 结果
*/
public int deletePostById(Long postId);
/**
* 批量删除岗位信息
*
* @param postIds 需要删除的岗位ID
* @return 结果
*/
public int deletePostByIds(Long[] postIds);
/**
* 新增保存岗位信息
*
* @param post 岗位信息
* @return 结果
*/
public int insertPost(SysPost post);
/**
* 修改保存岗位信息
*
* @param post 岗位信息
* @return 结果
*/
public int updatePost(SysPost post);
}
package com.ruoyi.project.system.service;
import java.util.List;
import java.util.Set;
import com.ruoyi.project.system.domain.SysRole;
import com.ruoyi.project.system.domain.SysUserRole;
/**
* 角色业务层
*
* @author ruoyi
*/
public interface ISysRoleService
{
/**
* 根据条件分页查询角色数据
*
* @param role 角色信息
* @return 角色数据集合信息
*/
public List<SysRole> selectRoleList(SysRole role);
/**
* 根据用户ID查询角色列表
*
* @param userId 用户ID
* @return 角色列表
*/
public List<SysRole> selectRolesByUserId(Long userId);
/**
* 根据用户ID查询角色权限
*
* @param userId 用户ID
* @return 权限列表
*/
public Set<String> selectRolePermissionByUserId(Long userId);
/**
* 查询所有角色
*
* @return 角色列表
*/
public List<SysRole> selectRoleAll();
/**
* 根据用户ID获取角色选择框列表
*
* @param userId 用户ID
* @return 选中角色ID列表
*/
public List<Long> selectRoleListByUserId(Long userId);
/**
* 通过角色ID查询角色
*
* @param roleId 角色ID
* @return 角色对象信息
*/
public SysRole selectRoleById(Long roleId);
/**
* 校验角色名称是否唯一
*
* @param role 角色信息
* @return 结果
*/
public boolean checkRoleNameUnique(SysRole role);
/**
* 校验角色权限是否唯一
*
* @param role 角色信息
* @return 结果
*/
public boolean checkRoleKeyUnique(SysRole role);
/**
* 校验角色是否允许操作
*
* @param role 角色信息
*/
public void checkRoleAllowed(SysRole role);
/**
* 校验角色是否有数据权限
*
* @param roleIds 角色id
*/
public void checkRoleDataScope(Long... roleIds);
/**
* 通过角色ID查询角色使用数量
*
* @param roleId 角色ID
* @return 结果
*/
public int countUserRoleByRoleId(Long roleId);
/**
* 新增保存角色信息
*
* @param role 角色信息
* @return 结果
*/
public int insertRole(SysRole role);
/**
* 修改保存角色信息
*
* @param role 角色信息
* @return 结果
*/
public int updateRole(SysRole role);
/**
* 修改角色状态
*
* @param role 角色信息
* @return 结果
*/
public int updateRoleStatus(SysRole role);
/**
* 修改数据权限信息
*
* @param role 角色信息
* @return 结果
*/
public int authDataScope(SysRole role);
/**
* 通过角色ID删除角色
*
* @param roleId 角色ID
* @return 结果
*/
public int deleteRoleById(Long roleId);
/**
* 批量删除角色信息
*
* @param roleIds 需要删除的角色ID
* @return 结果
*/
public int deleteRoleByIds(Long[] roleIds);
/**
* 取消授权用户角色
*
* @param userRole 用户和角色关联信息
* @return 结果
*/
public int deleteAuthUser(SysUserRole userRole);
/**
* 批量取消授权用户角色
*
* @param roleId 角色ID
* @param userIds 需要取消授权的用户数据ID
* @return 结果
*/
public int deleteAuthUsers(Long roleId, Long[] userIds);
/**
* 批量选择授权用户角色
*
* @param roleId 角色ID
* @param userIds 需要删除的用户数据ID
* @return 结果
*/
public int insertAuthUsers(Long roleId, Long[] userIds);
}
package com.ruoyi.project.system.service;
import com.ruoyi.framework.security.LoginUser;
import com.ruoyi.project.monitor.domain.SysUserOnline;
/**
* 在线用户 服务层
*
* @author ruoyi
*/
public interface ISysUserOnlineService
{
/**
* 通过登录地址查询信息
*
* @param ipaddr 登录地址
* @param user 用户信息
* @return 在线用户信息
*/
public SysUserOnline selectOnlineByIpaddr(String ipaddr, LoginUser user);
/**
* 通过用户名称查询信息
*
* @param userName 用户名称
* @param user 用户信息
* @return 在线用户信息
*/
public SysUserOnline selectOnlineByUserName(String userName, LoginUser user);
/**
* 通过登录地址/用户名称查询信息
*
* @param ipaddr 登录地址
* @param userName 用户名称
* @param user 用户信息
* @return 在线用户信息
*/
public SysUserOnline selectOnlineByInfo(String ipaddr, String userName, LoginUser user);
/**
* 设置在线用户信息
*
* @param user 用户信息
* @return 在线用户
*/
public SysUserOnline loginUserToUserOnline(LoginUser user);
}
package com.ruoyi.project.system.service;
import java.util.List;
import com.ruoyi.project.system.domain.SysUser;
/**
* 用户 业务层
*
* @author ruoyi
*/
public interface ISysUserService
{
/**
* 根据条件分页查询用户列表
*
* @param user 用户信息
* @return 用户信息集合信息
*/
public List<SysUser> selectUserList(SysUser user);
/**
* 根据条件分页查询已分配用户角色列表
*
* @param user 用户信息
* @return 用户信息集合信息
*/
public List<SysUser> selectAllocatedList(SysUser user);
/**
* 根据条件分页查询未分配用户角色列表
*
* @param user 用户信息
* @return 用户信息集合信息
*/
public List<SysUser> selectUnallocatedList(SysUser user);
/**
* 通过用户名查询用户
*
* @param userName 用户名
* @return 用户对象信息
*/
public SysUser selectUserByUserName(String userName);
/**
* 通过用户ID查询用户
*
* @param userId 用户ID
* @return 用户对象信息
*/
public SysUser selectUserById(Long userId);
/**
* 根据用户ID查询用户所属角色组
*
* @param userName 用户名
* @return 结果
*/
public String selectUserRoleGroup(String userName);
/**
* 根据用户ID查询用户所属岗位组
*
* @param userName 用户名
* @return 结果
*/
public String selectUserPostGroup(String userName);
/**
* 校验用户名称是否唯一
*
* @param user 用户信息
* @return 结果
*/
public boolean checkUserNameUnique(SysUser user);
/**
* 校验手机号码是否唯一
*
* @param user 用户信息
* @return 结果
*/
public boolean checkPhoneUnique(SysUser user);
/**
* 校验email是否唯一
*
* @param user 用户信息
* @return 结果
*/
public boolean checkEmailUnique(SysUser user);
/**
* 校验用户是否允许操作
*
* @param user 用户信息
*/
public void checkUserAllowed(SysUser user);
/**
* 校验用户是否有数据权限
*
* @param userId 用户id
*/
public void checkUserDataScope(Long userId);
/**
* 新增用户信息
*
* @param user 用户信息
* @return 结果
*/
public int insertUser(SysUser user);
/**
* 注册用户信息
*
* @param user 用户信息
* @return 结果
*/
public boolean registerUser(SysUser user);
/**
* 修改用户信息
*
* @param user 用户信息
* @return 结果
*/
public int updateUser(SysUser user);
/**
* 用户授权角色
*
* @param userId 用户ID
* @param roleIds 角色组
*/
public void insertUserAuth(Long userId, Long[] roleIds);
/**
* 修改用户状态
*
* @param user 用户信息
* @return 结果
*/
public int updateUserStatus(SysUser user);
/**
* 修改用户基本信息
*
* @param user 用户信息
* @return 结果
*/
public int updateUserProfile(SysUser user);
/**
* 修改用户头像
*
* @param userId 用户ID
* @param avatar 头像地址
* @return 结果
*/
public boolean updateUserAvatar(Long userId, String avatar);
/**
* 重置用户密码
*
* @param user 用户信息
* @return 结果
*/
public int resetPwd(SysUser user);
/**
* 重置用户密码
*
* @param userId 用户ID
* @param password 密码
* @return 结果
*/
public int resetUserPwd(Long userId, String password);
/**
* 通过用户ID删除用户
*
* @param userId 用户ID
* @return 结果
*/
public int deleteUserById(Long userId);
/**
* 批量删除用户信息
*
* @param userIds 需要删除的用户ID
* @return 结果
*/
public int deleteUserByIds(Long[] userIds);
/**
* 导入用户数据
*
* @param userList 用户数据列表
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据
* @param operName 操作用户
* @return 结果
*/
public String importUser(List<SysUser> userList, Boolean isUpdateSupport, String operName);
}
package com.ruoyi.project.system.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.utils.DictUtils;
import com.ruoyi.project.system.domain.SysDictData;
import com.ruoyi.project.system.mapper.SysDictDataMapper;
import com.ruoyi.project.system.service.ISysDictDataService;
/**
* 字典 业务层处理
*
* @author ruoyi
*/
@Service
public class SysDictDataServiceImpl implements ISysDictDataService
{
@Autowired
private SysDictDataMapper dictDataMapper;
/**
* 根据条件分页查询字典数据
*
* @param dictData 字典数据信息
* @return 字典数据集合信息
*/
@Override
public List<SysDictData> selectDictDataList(SysDictData dictData)
{
return dictDataMapper.selectDictDataList(dictData);
}
/**
* 根据字典类型和字典键值查询字典数据信息
*
* @param dictType 字典类型
* @param dictValue 字典键值
* @return 字典标签
*/
@Override
public String selectDictLabel(String dictType, String dictValue)
{
return dictDataMapper.selectDictLabel(dictType, dictValue);
}
/**
* 根据字典数据ID查询信息
*
* @param dictCode 字典数据ID
* @return 字典数据
*/
@Override
public SysDictData selectDictDataById(Long dictCode)
{
return dictDataMapper.selectDictDataById(dictCode);
}
/**
* 批量删除字典数据信息
*
* @param dictCodes 需要删除的字典数据ID
*/
@Override
public void deleteDictDataByIds(Long[] dictCodes)
{
for (Long dictCode : dictCodes)
{
SysDictData data = selectDictDataById(dictCode);
dictDataMapper.deleteDictDataById(dictCode);
List<SysDictData> dictDatas = dictDataMapper.selectDictDataByType(data.getDictType());
DictUtils.setDictCache(data.getDictType(), dictDatas);
}
}
/**
* 新增保存字典数据信息
*
* @param data 字典数据信息
* @return 结果
*/
@Override
public int insertDictData(SysDictData data)
{
int row = dictDataMapper.insertDictData(data);
if (row > 0)
{
List<SysDictData> dictDatas = dictDataMapper.selectDictDataByType(data.getDictType());
DictUtils.setDictCache(data.getDictType(), dictDatas);
}
return row;
}
/**
* 修改保存字典数据信息
*
* @param data 字典数据信息
* @return 结果
*/
@Override
public int updateDictData(SysDictData data)
{
int row = dictDataMapper.updateDictData(data);
if (row > 0)
{
List<SysDictData> dictDatas = dictDataMapper.selectDictDataByType(data.getDictType());
DictUtils.setDictCache(data.getDictType(), dictDatas);
}
return row;
}
}
package com.ruoyi.project.system.service.impl;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import javax.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.DictUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.project.system.domain.SysDictData;
import com.ruoyi.project.system.domain.SysDictType;
import com.ruoyi.project.system.mapper.SysDictDataMapper;
import com.ruoyi.project.system.mapper.SysDictTypeMapper;
import com.ruoyi.project.system.service.ISysDictTypeService;
/**
* 字典 业务层处理
*
* @author ruoyi
*/
@Service
public class SysDictTypeServiceImpl implements ISysDictTypeService
{
@Autowired
private SysDictTypeMapper dictTypeMapper;
@Autowired
private SysDictDataMapper dictDataMapper;
/**
* 项目启动时,初始化字典到缓存
*/
@PostConstruct
public void init()
{
loadingDictCache();
}
/**
* 根据条件分页查询字典类型
*
* @param dictType 字典类型信息
* @return 字典类型集合信息
*/
@Override
public List<SysDictType> selectDictTypeList(SysDictType dictType)
{
return dictTypeMapper.selectDictTypeList(dictType);
}
/**
* 根据所有字典类型
*
* @return 字典类型集合信息
*/
@Override
public List<SysDictType> selectDictTypeAll()
{
return dictTypeMapper.selectDictTypeAll();
}
/**
* 根据字典类型查询字典数据
*
* @param dictType 字典类型
* @return 字典数据集合信息
*/
@Override
public List<SysDictData> selectDictDataByType(String dictType)
{
List<SysDictData> dictDatas = DictUtils.getDictCache(dictType);
if (StringUtils.isNotEmpty(dictDatas))
{
return dictDatas;
}
dictDatas = dictDataMapper.selectDictDataByType(dictType);
if (StringUtils.isNotEmpty(dictDatas))
{
DictUtils.setDictCache(dictType, dictDatas);
return dictDatas;
}
return null;
}
/**
* 根据字典类型ID查询信息
*
* @param dictId 字典类型ID
* @return 字典类型
*/
@Override
public SysDictType selectDictTypeById(Long dictId)
{
return dictTypeMapper.selectDictTypeById(dictId);
}
/**
* 根据字典类型查询信息
*
* @param dictType 字典类型
* @return 字典类型
*/
@Override
public SysDictType selectDictTypeByType(String dictType)
{
return dictTypeMapper.selectDictTypeByType(dictType);
}
/**
* 批量删除字典类型信息
*
* @param dictIds 需要删除的字典ID
*/
@Override
public void deleteDictTypeByIds(Long[] dictIds)
{
for (Long dictId : dictIds)
{
SysDictType dictType = selectDictTypeById(dictId);
if (dictDataMapper.countDictDataByType(dictType.getDictType()) > 0)
{
throw new ServiceException(String.format("%1$s已分配,不能删除", dictType.getDictName()));
}
dictTypeMapper.deleteDictTypeById(dictId);
DictUtils.removeDictCache(dictType.getDictType());
}
}
/**
* 加载字典缓存数据
*/
@Override
public void loadingDictCache()
{
SysDictData dictData = new SysDictData();
dictData.setStatus("0");
Map<String, List<SysDictData>> dictDataMap = dictDataMapper.selectDictDataList(dictData).stream().collect(Collectors.groupingBy(SysDictData::getDictType));
for (Map.Entry<String, List<SysDictData>> entry : dictDataMap.entrySet())
{
DictUtils.setDictCache(entry.getKey(), entry.getValue().stream().sorted(Comparator.comparing(SysDictData::getDictSort)).collect(Collectors.toList()));
}
}
/**
* 清空字典缓存数据
*/
@Override
public void clearDictCache()
{
DictUtils.clearDictCache();
}
/**
* 重置字典缓存数据
*/
@Override
public void resetDictCache()
{
clearDictCache();
loadingDictCache();
}
/**
* 新增保存字典类型信息
*
* @param dict 字典类型信息
* @return 结果
*/
@Override
public int insertDictType(SysDictType dict)
{
int row = dictTypeMapper.insertDictType(dict);
if (row > 0)
{
DictUtils.setDictCache(dict.getDictType(), null);
}
return row;
}
/**
* 修改保存字典类型信息
*
* @param dict 字典类型信息
* @return 结果
*/
@Override
@Transactional
public int updateDictType(SysDictType dict)
{
SysDictType oldDict = dictTypeMapper.selectDictTypeById(dict.getDictId());
dictDataMapper.updateDictDataType(oldDict.getDictType(), dict.getDictType());
int row = dictTypeMapper.updateDictType(dict);
if (row > 0)
{
List<SysDictData> dictDatas = dictDataMapper.selectDictDataByType(dict.getDictType());
DictUtils.setDictCache(dict.getDictType(), dictDatas);
}
return row;
}
/**
* 校验字典类型称是否唯一
*
* @param dict 字典类型
* @return 结果
*/
@Override
public boolean checkDictTypeUnique(SysDictType dict)
{
Long dictId = StringUtils.isNull(dict.getDictId()) ? -1L : dict.getDictId();
SysDictType dictType = dictTypeMapper.checkDictTypeUnique(dict.getDictType());
if (StringUtils.isNotNull(dictType) && dictType.getDictId().longValue() != dictId.longValue())
{
return UserConstants.NOT_UNIQUE;
}
return UserConstants.UNIQUE;
}
}
package com.ruoyi.project.system.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.domain.SysNotice;
import com.ruoyi.project.system.mapper.SysNoticeMapper;
import com.ruoyi.project.system.service.ISysNoticeService;
/**
* 公告 服务层实现
*
* @author ruoyi
*/
@Service
public class SysNoticeServiceImpl implements ISysNoticeService
{
@Autowired
private SysNoticeMapper noticeMapper;
/**
* 查询公告信息
*
* @param noticeId 公告ID
* @return 公告信息
*/
@Override
public SysNotice selectNoticeById(Long noticeId)
{
return noticeMapper.selectNoticeById(noticeId);
}
/**
* 查询公告列表
*
* @param notice 公告信息
* @return 公告集合
*/
@Override
public List<SysNotice> selectNoticeList(SysNotice notice)
{
return noticeMapper.selectNoticeList(notice);
}
/**
* 新增公告
*
* @param notice 公告信息
* @return 结果
*/
@Override
public int insertNotice(SysNotice notice)
{
return noticeMapper.insertNotice(notice);
}
/**
* 修改公告
*
* @param notice 公告信息
* @return 结果
*/
@Override
public int updateNotice(SysNotice notice)
{
return noticeMapper.updateNotice(notice);
}
/**
* 删除公告对象
*
* @param noticeId 公告ID
* @return 结果
*/
@Override
public int deleteNoticeById(Long noticeId)
{
return noticeMapper.deleteNoticeById(noticeId);
}
/**
* 批量删除公告信息
*
* @param noticeIds 需要删除的公告ID
* @return 结果
*/
@Override
public int deleteNoticeByIds(Long[] noticeIds)
{
return noticeMapper.deleteNoticeByIds(noticeIds);
}
}
package com.ruoyi.project.system.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.project.system.domain.SysPost;
import com.ruoyi.project.system.mapper.SysPostMapper;
import com.ruoyi.project.system.mapper.SysUserPostMapper;
import com.ruoyi.project.system.service.ISysPostService;
/**
* 岗位信息 服务层处理
*
* @author ruoyi
*/
@Service
public class SysPostServiceImpl implements ISysPostService
{
@Autowired
private SysPostMapper postMapper;
@Autowired
private SysUserPostMapper userPostMapper;
/**
* 查询岗位信息集合
*
* @param post 岗位信息
* @return 岗位信息集合
*/
@Override
public List<SysPost> selectPostList(SysPost post)
{
return postMapper.selectPostList(post);
}
/**
* 查询所有岗位
*
* @return 岗位列表
*/
@Override
public List<SysPost> selectPostAll()
{
return postMapper.selectPostAll();
}
/**
* 通过岗位ID查询岗位信息
*
* @param postId 岗位ID
* @return 角色对象信息
*/
@Override
public SysPost selectPostById(Long postId)
{
return postMapper.selectPostById(postId);
}
/**
* 根据用户ID获取岗位选择框列表
*
* @param userId 用户ID
* @return 选中岗位ID列表
*/
@Override
public List<Long> selectPostListByUserId(Long userId)
{
return postMapper.selectPostListByUserId(userId);
}
/**
* 校验岗位名称是否唯一
*
* @param post 岗位信息
* @return 结果
*/
@Override
public boolean checkPostNameUnique(SysPost post)
{
Long postId = StringUtils.isNull(post.getPostId()) ? -1L : post.getPostId();
SysPost info = postMapper.checkPostNameUnique(post.getPostName());
if (StringUtils.isNotNull(info) && info.getPostId().longValue() != postId.longValue())
{
return UserConstants.NOT_UNIQUE;
}
return UserConstants.UNIQUE;
}
/**
* 校验岗位编码是否唯一
*
* @param post 岗位信息
* @return 结果
*/
@Override
public boolean checkPostCodeUnique(SysPost post)
{
Long postId = StringUtils.isNull(post.getPostId()) ? -1L : post.getPostId();
SysPost info = postMapper.checkPostCodeUnique(post.getPostCode());
if (StringUtils.isNotNull(info) && info.getPostId().longValue() != postId.longValue())
{
return UserConstants.NOT_UNIQUE;
}
return UserConstants.UNIQUE;
}
/**
* 通过岗位ID查询岗位使用数量
*
* @param postId 岗位ID
* @return 结果
*/
@Override
public int countUserPostById(Long postId)
{
return userPostMapper.countUserPostById(postId);
}
/**
* 删除岗位信息
*
* @param postId 岗位ID
* @return 结果
*/
@Override
public int deletePostById(Long postId)
{
return postMapper.deletePostById(postId);
}
/**
* 批量删除岗位信息
*
* @param postIds 需要删除的岗位ID
* @return 结果
*/
@Override
public int deletePostByIds(Long[] postIds)
{
for (Long postId : postIds)
{
SysPost post = selectPostById(postId);
if (countUserPostById(postId) > 0)
{
throw new ServiceException(String.format("%1$s已分配,不能删除", post.getPostName()));
}
}
return postMapper.deletePostByIds(postIds);
}
/**
* 新增保存岗位信息
*
* @param post 岗位信息
* @return 结果
*/
@Override
public int insertPost(SysPost post)
{
return postMapper.insertPost(post);
}
/**
* 修改保存岗位信息
*
* @param post 岗位信息
* @return 结果
*/
@Override
public int updatePost(SysPost post)
{
return postMapper.updatePost(post);
}
}
package com.ruoyi.project.system.service.impl;
import org.springframework.stereotype.Service;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.framework.security.LoginUser;
import com.ruoyi.project.monitor.domain.SysUserOnline;
import com.ruoyi.project.system.service.ISysUserOnlineService;
/**
* 在线用户 服务层处理
*
* @author ruoyi
*/
@Service
public class SysUserOnlineServiceImpl implements ISysUserOnlineService
{
/**
* 通过登录地址查询信息
*
* @param ipaddr 登录地址
* @param user 用户信息
* @return 在线用户信息
*/
@Override
public SysUserOnline selectOnlineByIpaddr(String ipaddr, LoginUser user)
{
if (StringUtils.equals(ipaddr, user.getIpaddr()))
{
return loginUserToUserOnline(user);
}
return null;
}
/**
* 通过用户名称查询信息
*
* @param userName 用户名称
* @param user 用户信息
* @return 在线用户信息
*/
@Override
public SysUserOnline selectOnlineByUserName(String userName, LoginUser user)
{
if (StringUtils.equals(userName, user.getUsername()))
{
return loginUserToUserOnline(user);
}
return null;
}
/**
* 通过登录地址/用户名称查询信息
*
* @param ipaddr 登录地址
* @param userName 用户名称
* @param user 用户信息
* @return 在线用户信息
*/
@Override
public SysUserOnline selectOnlineByInfo(String ipaddr, String userName, LoginUser user)
{
if (StringUtils.equals(ipaddr, user.getIpaddr()) && StringUtils.equals(userName, user.getUsername()))
{
return loginUserToUserOnline(user);
}
return null;
}
/**
* 设置在线用户信息
*
* @param user 用户信息
* @return 在线用户
*/
@Override
public SysUserOnline loginUserToUserOnline(LoginUser user)
{
if (StringUtils.isNull(user) || StringUtils.isNull(user.getUser()))
{
return null;
}
SysUserOnline sysUserOnline = new SysUserOnline();
sysUserOnline.setTokenId(user.getToken());
sysUserOnline.setUserName(user.getUsername());
sysUserOnline.setIpaddr(user.getIpaddr());
sysUserOnline.setLoginLocation(user.getLoginLocation());
sysUserOnline.setBrowser(user.getBrowser());
sysUserOnline.setOs(user.getOs());
sysUserOnline.setLoginTime(user.getLoginTime());
if (StringUtils.isNotNull(user.getUser().getDept()))
{
sysUserOnline.setDeptName(user.getUser().getDept().getDeptName());
}
return sysUserOnline;
}
}
package com.ruoyi.project.tool.gen.mapper;
import java.util.List;
import com.ruoyi.project.tool.gen.domain.GenTableColumn;
/**
* 业务字段 数据层
*
* @author ruoyi
*/
public interface GenTableColumnMapper
{
/**
* 根据表名称查询列信息
*
* @param tableName 表名称
* @return 列信息
*/
public List<GenTableColumn> selectDbTableColumnsByName(String tableName);
/**
* 查询业务字段列表
*
* @param tableId 业务字段编号
* @return 业务字段集合
*/
public List<GenTableColumn> selectGenTableColumnListByTableId(Long tableId);
/**
* 新增业务字段
*
* @param genTableColumn 业务字段信息
* @return 结果
*/
public int insertGenTableColumn(GenTableColumn genTableColumn);
/**
* 修改业务字段
*
* @param genTableColumn 业务字段信息
* @return 结果
*/
public int updateGenTableColumn(GenTableColumn genTableColumn);
/**
* 删除业务字段
*
* @param genTableColumns 列数据
* @return 结果
*/
public int deleteGenTableColumns(List<GenTableColumn> genTableColumns);
/**
* 批量删除业务字段
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteGenTableColumnByIds(Long[] ids);
}
\ No newline at end of file
package com.ruoyi.project.tool.gen.mapper;
import java.util.List;
import com.ruoyi.project.tool.gen.domain.GenTable;
/**
* 业务 数据层
*
* @author ruoyi
*/
public interface GenTableMapper
{
/**
* 查询业务列表
*
* @param genTable 业务信息
* @return 业务集合
*/
public List<GenTable> selectGenTableList(GenTable genTable);
/**
* 查询据库列表
*
* @param genTable 业务信息
* @return 数据库表集合
*/
public List<GenTable> selectDbTableList(GenTable genTable);
/**
* 查询据库列表
*
* @param tableNames 表名称组
* @return 数据库表集合
*/
public List<GenTable> selectDbTableListByNames(String[] tableNames);
/**
* 查询所有表信息
*
* @return 表信息集合
*/
public List<GenTable> selectGenTableAll();
/**
* 查询表ID业务信息
*
* @param id 业务ID
* @return 业务信息
*/
public GenTable selectGenTableById(Long id);
/**
* 查询表名称业务信息
*
* @param tableName 表名称
* @return 业务信息
*/
public GenTable selectGenTableByName(String tableName);
/**
* 新增业务
*
* @param genTable 业务信息
* @return 结果
*/
public int insertGenTable(GenTable genTable);
/**
* 修改业务
*
* @param genTable 业务信息
* @return 结果
*/
public int updateGenTable(GenTable genTable);
/**
* 批量删除业务
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteGenTableByIds(Long[] ids);
/**
* 创建表
*
* @param sql 表结构
* @return 结果
*/
public int createTable(String sql);
}
\ No newline at end of file
package com.ruoyi.project.tool.gen.service;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.project.tool.gen.domain.GenTableColumn;
import com.ruoyi.project.tool.gen.mapper.GenTableColumnMapper;
/**
* 业务字段 服务层实现
*
* @author ruoyi
*/
@Service
public class GenTableColumnServiceImpl implements IGenTableColumnService
{
@Autowired
private GenTableColumnMapper genTableColumnMapper;
/**
* 查询业务字段列表
*
* @param tableId 业务字段编号
* @return 业务字段集合
*/
@Override
public List<GenTableColumn> selectGenTableColumnListByTableId(Long tableId)
{
return genTableColumnMapper.selectGenTableColumnListByTableId(tableId);
}
/**
* 新增业务字段
*
* @param genTableColumn 业务字段信息
* @return 结果
*/
@Override
public int insertGenTableColumn(GenTableColumn genTableColumn)
{
return genTableColumnMapper.insertGenTableColumn(genTableColumn);
}
/**
* 修改业务字段
*
* @param genTableColumn 业务字段信息
* @return 结果
*/
@Override
public int updateGenTableColumn(GenTableColumn genTableColumn)
{
return genTableColumnMapper.updateGenTableColumn(genTableColumn);
}
/**
* 删除业务字段对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deleteGenTableColumnByIds(String ids)
{
return genTableColumnMapper.deleteGenTableColumnByIds(Convert.toLongArray(ids));
}
}
\ No newline at end of file
package com.ruoyi.project.tool.gen.service;
import java.util.List;
import com.ruoyi.project.tool.gen.domain.GenTableColumn;
/**
* 业务字段 服务层
*
* @author ruoyi
*/
public interface IGenTableColumnService
{
/**
* 查询业务字段列表
*
* @param tableId 业务字段编号
* @return 业务字段集合
*/
public List<GenTableColumn> selectGenTableColumnListByTableId(Long tableId);
/**
* 新增业务字段
*
* @param genTableColumn 业务字段信息
* @return 结果
*/
public int insertGenTableColumn(GenTableColumn genTableColumn);
/**
* 修改业务字段
*
* @param genTableColumn 业务字段信息
* @return 结果
*/
public int updateGenTableColumn(GenTableColumn genTableColumn);
/**
* 删除业务字段信息
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteGenTableColumnByIds(String ids);
}
package com.ruoyi.project.tool.gen.service;
import java.util.List;
import java.util.Map;
import com.ruoyi.project.tool.gen.domain.GenTable;
/**
* 业务 服务层
*
* @author ruoyi
*/
public interface IGenTableService
{
/**
* 查询业务列表
*
* @param genTable 业务信息
* @return 业务集合
*/
public List<GenTable> selectGenTableList(GenTable genTable);
/**
* 查询据库列表
*
* @param genTable 业务信息
* @return 数据库表集合
*/
public List<GenTable> selectDbTableList(GenTable genTable);
/**
* 查询据库列表
*
* @param tableNames 表名称组
* @return 数据库表集合
*/
public List<GenTable> selectDbTableListByNames(String[] tableNames);
/**
* 查询所有表信息
*
* @return 表信息集合
*/
public List<GenTable> selectGenTableAll();
/**
* 查询业务信息
*
* @param id 业务ID
* @return 业务信息
*/
public GenTable selectGenTableById(Long id);
/**
* 修改业务
*
* @param genTable 业务信息
* @return 结果
*/
public void updateGenTable(GenTable genTable);
/**
* 删除业务信息
*
* @param tableIds 需要删除的表数据ID
* @return 结果
*/
public void deleteGenTableByIds(Long[] tableIds);
/**
* 创建表
*
* @param sql 创建表语句
* @return 结果
*/
public boolean createTable(String sql);
/**
* 导入表结构
*
* @param tableList 导入表列表
* @param operName 操作人员
*/
public void importGenTable(List<GenTable> tableList, String operName);
/**
* 预览代码
*
* @param tableId 表编号
* @return 预览数据列表
*/
public Map<String, String> previewCode(Long tableId);
/**
* 生成代码(下载方式)
*
* @param tableName 表名称
* @return 数据
*/
public byte[] downloadCode(String tableName);
/**
* 生成代码(自定义路径)
*
* @param tableName 表名称
* @return 数据
*/
public void generatorCode(String tableName);
/**
* 同步数据库
*
* @param tableName 表名称
*/
public void synchDb(String tableName);
/**
* 批量生成代码(下载方式)
*
* @param tableNames 表数组
* @return 数据
*/
public byte[] downloadCode(String[] tableNames);
/**
* 修改保存参数校验
*
* @param genTable 业务信息
*/
public void validateEdit(GenTable genTable);
}
package com.ruoyi.project.tool.gen.util;
import java.util.Properties;
import org.apache.velocity.app.Velocity;
import com.ruoyi.common.constant.Constants;
/**
* VelocityEngine工厂
*
* @author ruoyi
*/
public class VelocityInitializer
{
/**
* 初始化vm方法
*/
public static void initVelocity()
{
Properties p = new Properties();
try
{
// 加载classpath目录下的vm文件
p.setProperty("resource.loader.file.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader");
// 定义字符集
p.setProperty(Velocity.INPUT_ENCODING, Constants.UTF8);
// 初始化Velocity引擎,指定配置Properties
Velocity.init(p);
}
catch (Exception e)
{
throw new RuntimeException(e);
}
}
}
package com.ruoyi.project.tool.swagger;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
/**
* swagger 用户测试方法
*
* @author ruoyi
*/
@Api("用户信息管理")
@RestController
@RequestMapping("/test/user")
public class TestController extends BaseController
{
private final static Map<Integer, UserEntity> users = new LinkedHashMap<Integer, UserEntity>();
{
users.put(1, new UserEntity(1, "admin", "admin123", "15888888888"));
users.put(2, new UserEntity(2, "ry", "admin123", "15666666666"));
}
@ApiOperation("获取用户列表")
@GetMapping("/list")
public R<List<UserEntity>> userList()
{
List<UserEntity> userList = new ArrayList<UserEntity>(users.values());
return R.ok(userList);
}
@ApiOperation("获取用户详细")
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
@GetMapping("/{userId}")
public R<UserEntity> getUser(@PathVariable Integer userId)
{
if (!users.isEmpty() && users.containsKey(userId))
{
return R.ok(users.get(userId));
}
else
{
return R.fail("用户不存在");
}
}
@ApiOperation("新增用户")
@ApiImplicitParams({
@ApiImplicitParam(name = "userId", value = "用户id", dataType = "Integer", dataTypeClass = Integer.class),
@ApiImplicitParam(name = "username", value = "用户名称", dataType = "String", dataTypeClass = String.class),
@ApiImplicitParam(name = "password", value = "用户密码", dataType = "String", dataTypeClass = String.class),
@ApiImplicitParam(name = "mobile", value = "用户手机", dataType = "String", dataTypeClass = String.class)
})
@PostMapping("/save")
public R<String> save(UserEntity user)
{
if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId()))
{
return R.fail("用户ID不能为空");
}
users.put(user.getUserId(), user);
return R.ok();
}
@ApiOperation("更新用户")
@PutMapping("/update")
public R<String> update(@RequestBody UserEntity user)
{
if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId()))
{
return R.fail("用户ID不能为空");
}
if (users.isEmpty() || !users.containsKey(user.getUserId()))
{
return R.fail("用户不存在");
}
users.remove(user.getUserId());
users.put(user.getUserId(), user);
return R.ok();
}
@ApiOperation("删除用户信息")
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
@DeleteMapping("/{userId}")
public R<String> delete(@PathVariable Integer userId)
{
if (!users.isEmpty() && users.containsKey(userId))
{
users.remove(userId);
return R.ok();
}
else
{
return R.fail("用户不存在");
}
}
}
@ApiModel(value = "UserEntity", description = "用户实体")
class UserEntity
{
@ApiModelProperty("用户ID")
private Integer userId;
@ApiModelProperty("用户名称")
private String username;
@ApiModelProperty("用户密码")
private String password;
@ApiModelProperty("用户手机")
private String mobile;
public UserEntity()
{
}
public UserEntity(Integer userId, String username, String password, String mobile)
{
this.userId = userId;
this.username = username;
this.password = password;
this.mobile = mobile;
}
public Integer getUserId()
{
return userId;
}
public void setUserId(Integer userId)
{
this.userId = userId;
}
public String getUsername()
{
return username;
}
public void setUsername(String username)
{
this.username = username;
}
public String getPassword()
{
return password;
}
public void setPassword(String password)
{
this.password = password;
}
public String getMobile()
{
return mobile;
}
public void setMobile(String mobile)
{
this.mobile = mobile;
}
}
package com.ruoyi.project.zjsgfa.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.project.zjsgfa.domain.Dzgzzb;
import com.ruoyi.project.zjsgfa.service.IDzgzzbService;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.web.page.TableDataInfo;
/**
* 地质构造总Controller
*
* @author ruoyi
* @date 2025-07-08
*/
@RestController
@RequestMapping("/system/dzgzzb")
public class DzgzzbController extends BaseController
{
@Autowired
private IDzgzzbService dzgzzbService;
/**
* 查询地质构造总列表
*/
@PreAuthorize("@ss.hasPermi('system:dzgzzb:list')")
@GetMapping("/list")
public TableDataInfo list(Dzgzzb dzgzzb)
{
startPage();
List<Dzgzzb> list = dzgzzbService.selectDzgzzbList(dzgzzb);
return getDataTable(list);
}
/**
* 导出地质构造总列表
*/
@PreAuthorize("@ss.hasPermi('system:dzgzzb:export')")
@Log(title = "地质构造总", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, Dzgzzb dzgzzb)
{
List<Dzgzzb> list = dzgzzbService.selectDzgzzbList(dzgzzb);
ExcelUtil<Dzgzzb> util = new ExcelUtil<Dzgzzb>(Dzgzzb.class);
util.exportExcel(response, list, "地质构造总数据");
}
/**
* 获取地质构造总详细信息
*/
@PreAuthorize("@ss.hasPermi('system:dzgzzb:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(dzgzzbService.selectDzgzzbById(id));
}
/**
* 新增地质构造总
*/
@PreAuthorize("@ss.hasPermi('system:dzgzzb:add')")
@Log(title = "地质构造总", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody Dzgzzb dzgzzb)
{
return toAjax(dzgzzbService.insertDzgzzb(dzgzzb));
}
/**
* 修改地质构造总
*/
@PreAuthorize("@ss.hasPermi('system:dzgzzb:edit')")
@Log(title = "地质构造总", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody Dzgzzb dzgzzb)
{
return toAjax(dzgzzbService.updateDzgzzb(dzgzzb));
}
/**
* 删除地质构造总
*/
@PreAuthorize("@ss.hasPermi('system:dzgzzb:remove')")
@Log(title = "地质构造总", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(dzgzzbService.deleteDzgzzbByIds(ids));
}
}
package com.ruoyi.project.zjsgfa.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.project.zjsgfa.domain.JcxxHse;
import com.ruoyi.project.zjsgfa.service.IJcxxHseService;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.web.page.TableDataInfo;
/**
* 基础信息-HSE专篇Controller
*
* @author ruoyi
* @date 2025-07-24
*/
@RestController
@RequestMapping("/system/jcxxHse")
public class JcxxHseController extends BaseController
{
@Autowired
private IJcxxHseService jcxxHseService;
/**
* 查询基础信息-HSE专篇列表
*/
@PreAuthorize("@ss.hasPermi('system:jcxxHse:list')")
@GetMapping("/list")
public TableDataInfo list(JcxxHse jcxxHse)
{
startPage();
List<JcxxHse> list = jcxxHseService.selectJcxxHseList(jcxxHse);
return getDataTable(list);
}
/**
* 导出基础信息-HSE专篇列表
*/
@PreAuthorize("@ss.hasPermi('system:jcxxHse:export')")
@Log(title = "基础信息-HSE专篇", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, JcxxHse jcxxHse)
{
List<JcxxHse> list = jcxxHseService.selectJcxxHseList(jcxxHse);
ExcelUtil<JcxxHse> util = new ExcelUtil<JcxxHse>(JcxxHse.class);
util.exportExcel(response, list, "基础信息-HSE专篇数据");
}
/**
* 获取基础信息-HSE专篇详细信息
*/
@PreAuthorize("@ss.hasPermi('system:jcxxHse:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(jcxxHseService.selectJcxxHseById(id));
}
/**
* 新增基础信息-HSE专篇
*/
@PreAuthorize("@ss.hasPermi('system:jcxxHse:add')")
@Log(title = "基础信息-HSE专篇", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody JcxxHse jcxxHse)
{
return toAjax(jcxxHseService.insertJcxxHse(jcxxHse));
}
/**
* 修改基础信息-HSE专篇
*/
@PreAuthorize("@ss.hasPermi('system:jcxxHse:edit')")
@Log(title = "基础信息-HSE专篇", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody JcxxHse jcxxHse)
{
return toAjax(jcxxHseService.updateJcxxHse(jcxxHse));
}
/**
* 删除基础信息-HSE专篇
*/
@PreAuthorize("@ss.hasPermi('system:jcxxHse:remove')")
@Log(title = "基础信息-HSE专篇", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(jcxxHseService.deleteJcxxHseByIds(ids));
}
}
package com.ruoyi.project.zjsgfa.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.project.zjsgfa.domain.JcxxJkzp;
import com.ruoyi.project.zjsgfa.service.IJcxxJkzpService;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.web.page.TableDataInfo;
/**
* 基础信息-井控专篇Controller
*
* @author ruoyi
* @date 2025-07-24
*/
@RestController
@RequestMapping("/system/jcxxJkzp")
public class JcxxJkzpController extends BaseController
{
@Autowired
private IJcxxJkzpService jcxxJkzpService;
/**
* 查询基础信息-井控专篇列表
*/
@PreAuthorize("@ss.hasPermi('system:jcxxJkzp:list')")
@GetMapping("/list")
public TableDataInfo list(JcxxJkzp jcxxJkzp)
{
startPage();
List<JcxxJkzp> list = jcxxJkzpService.selectJcxxJkzpList(jcxxJkzp);
return getDataTable(list);
}
/**
* 导出基础信息-井控专篇列表
*/
@PreAuthorize("@ss.hasPermi('system:jcxxJkzp:export')")
@Log(title = "基础信息-井控专篇", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, JcxxJkzp jcxxJkzp)
{
List<JcxxJkzp> list = jcxxJkzpService.selectJcxxJkzpList(jcxxJkzp);
ExcelUtil<JcxxJkzp> util = new ExcelUtil<JcxxJkzp>(JcxxJkzp.class);
util.exportExcel(response, list, "基础信息-井控专篇数据");
}
/**
* 获取基础信息-井控专篇详细信息
*/
@PreAuthorize("@ss.hasPermi('system:jcxxJkzp:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(jcxxJkzpService.selectJcxxJkzpById(id));
}
/**
* 新增基础信息-井控专篇
*/
@PreAuthorize("@ss.hasPermi('system:jcxxJkzp:add')")
@Log(title = "基础信息-井控专篇", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody JcxxJkzp jcxxJkzp)
{
return toAjax(jcxxJkzpService.insertJcxxJkzp(jcxxJkzp));
}
/**
* 修改基础信息-井控专篇
*/
@PreAuthorize("@ss.hasPermi('system:jcxxJkzp:edit')")
@Log(title = "基础信息-井控专篇", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody JcxxJkzp jcxxJkzp)
{
return toAjax(jcxxJkzpService.updateJcxxJkzp(jcxxJkzp));
}
/**
* 删除基础信息-井控专篇
*/
@PreAuthorize("@ss.hasPermi('system:jcxxJkzp:remove')")
@Log(title = "基础信息-井控专篇", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(jcxxJkzpService.deleteJcxxJkzpByIds(ids));
}
}
package com.ruoyi.project.zjsgfa.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.project.zjsgfa.domain.JcxxTsgj;
import com.ruoyi.project.zjsgfa.service.IJcxxTsgjService;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.web.page.TableDataInfo;
/**
* 基础信息_特殊工具Controller
*
* @author ruoyi
* @date 2025-08-06
*/
@RestController
@RequestMapping("/system/jcxxTsgj")
public class JcxxTsgjController extends BaseController
{
@Autowired
private IJcxxTsgjService jcxxTsgjService;
/**
* 查询基础信息_特殊工具列表
*/
@PreAuthorize("@ss.hasPermi('system:jcxxTsgj:list')")
@GetMapping("/list")
public TableDataInfo list(JcxxTsgj jcxxTsgj)
{
// startPage();
List<JcxxTsgj> list = jcxxTsgjService.selectJcxxTsgjList(jcxxTsgj);
return getDataTable(list);
}
/**
* 导出基础信息_特殊工具列表
*/
@PreAuthorize("@ss.hasPermi('system:jcxxTsgj:export')")
@Log(title = "基础信息_特殊工具", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, JcxxTsgj jcxxTsgj)
{
List<JcxxTsgj> list = jcxxTsgjService.selectJcxxTsgjList(jcxxTsgj);
ExcelUtil<JcxxTsgj> util = new ExcelUtil<JcxxTsgj>(JcxxTsgj.class);
util.exportExcel(response, list, "基础信息_特殊工具数据");
}
/**
* 获取基础信息_特殊工具详细信息
*/
@PreAuthorize("@ss.hasPermi('system:jcxxTsgj:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(jcxxTsgjService.selectJcxxTsgjById(id));
}
/**
* 新增基础信息_特殊工具
*/
@PreAuthorize("@ss.hasPermi('system:jcxxTsgj:add')")
@Log(title = "基础信息_特殊工具", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody JcxxTsgj jcxxTsgj)
{
return toAjax(jcxxTsgjService.insertJcxxTsgj(jcxxTsgj));
}
/**
* 修改基础信息_特殊工具
*/
@PreAuthorize("@ss.hasPermi('system:jcxxTsgj:edit')")
@Log(title = "基础信息_特殊工具", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody JcxxTsgj jcxxTsgj)
{
return toAjax(jcxxTsgjService.updateJcxxTsgj(jcxxTsgj));
}
/**
* 删除基础信息_特殊工具
*/
@PreAuthorize("@ss.hasPermi('system:jcxxTsgj:remove')")
@Log(title = "基础信息_特殊工具", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(jcxxTsgjService.deleteJcxxTsgjByIds(ids));
}
}
package com.ruoyi.project.zjsgfa.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.project.zjsgfa.domain.SjDcfxDzfc;
import com.ruoyi.project.zjsgfa.service.ISjDcfxDzfcService;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.web.page.TableDataInfo;
/**
* 设计-地层分析—地质分层Controller
*
* @author ruoyi
* @date 2025-07-28
*/
@RestController
@RequestMapping("/system/sjDcfxDzfc")
public class SjDcfxDzfcController extends BaseController
{
@Autowired
private ISjDcfxDzfcService sjDcfxDzfcService;
/**
* 查询设计-地层分析—地质分层列表
*/
//@PreAuthorize("@ss.hasPermi('system:sjDcfxDzfc:list')")
@GetMapping("/list")
public TableDataInfo list(SjDcfxDzfc sjDcfxDzfc)
{
// startPage();
List<SjDcfxDzfc> list = sjDcfxDzfcService.selectSjDcfxDzfcList(sjDcfxDzfc);
return getDataTable(list);
}
/**
* 导出设计-地层分析—地质分层列表
*/
//@PreAuthorize("@ss.hasPermi('system:sjDcfxDzfc:export')")
@Log(title = "设计-地层分析—地质分层", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SjDcfxDzfc sjDcfxDzfc)
{
List<SjDcfxDzfc> list = sjDcfxDzfcService.selectSjDcfxDzfcList(sjDcfxDzfc);
ExcelUtil<SjDcfxDzfc> util = new ExcelUtil<SjDcfxDzfc>(SjDcfxDzfc.class);
util.exportExcel(response, list, "设计-地层分析—地质分层数据");
}
/**
* 获取设计-地层分析—地质分层详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:sjDcfxDzfc:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(sjDcfxDzfcService.selectSjDcfxDzfcById(id));
}
/**
* 新增设计-地层分析—地质分层
*/
//@PreAuthorize("@ss.hasPermi('system:sjDcfxDzfc:add')")
@Log(title = "设计-地层分析—地质分层", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SjDcfxDzfc sjDcfxDzfc)
{
return toAjax(sjDcfxDzfcService.insertSjDcfxDzfc(sjDcfxDzfc));
}
/**
* 修改设计-地层分析—地质分层
*/
//@PreAuthorize("@ss.hasPermi('system:sjDcfxDzfc:edit')")
@Log(title = "设计-地层分析—地质分层", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SjDcfxDzfc sjDcfxDzfc)
{
return toAjax(sjDcfxDzfcService.updateSjDcfxDzfc(sjDcfxDzfc));
}
/**
* 删除设计-地层分析—地质分层
*/
//@PreAuthorize("@ss.hasPermi('system:sjDcfxDzfc:remove')")
@Log(title = "设计-地层分析—地质分层", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(sjDcfxDzfcService.deleteSjDcfxDzfcByIds(ids));
}
}
package com.ruoyi.project.zjsgfa.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.project.zjsgfa.domain.SjDcfxTsyx;
import com.ruoyi.project.zjsgfa.service.ISjDcfxTsyxService;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.web.page.TableDataInfo;
/**
* 设计-地层分析-特殊岩性提示Controller
*
* @author ruoyi
* @date 2025-08-08
*/
@RestController
@RequestMapping("/system/sjDcfxTsyx")
public class SjDcfxTsyxController extends BaseController
{
@Autowired
private ISjDcfxTsyxService sjDcfxTsyxService;
/**
* 查询设计-地层分析-特殊岩性提示列表
*/
//@PreAuthorize("@ss.hasPermi('system:sjDcfxTsyx:list')")
@GetMapping("/list")
public TableDataInfo list(SjDcfxTsyx sjDcfxTsyx)
{
// startPage();
List<SjDcfxTsyx> list = sjDcfxTsyxService.selectSjDcfxTsyxList(sjDcfxTsyx);
return getDataTable(list);
}
/**
* 导出设计-地层分析-特殊岩性提示列表
*/
//@PreAuthorize("@ss.hasPermi('system:sjDcfxTsyx:export')")
@Log(title = "设计-地层分析-特殊岩性提示", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SjDcfxTsyx sjDcfxTsyx)
{
List<SjDcfxTsyx> list = sjDcfxTsyxService.selectSjDcfxTsyxList(sjDcfxTsyx);
ExcelUtil<SjDcfxTsyx> util = new ExcelUtil<SjDcfxTsyx>(SjDcfxTsyx.class);
util.exportExcel(response, list, "设计-地层分析-特殊岩性提示数据");
}
/**
* 获取设计-地层分析-特殊岩性提示详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:sjDcfxTsyx:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(sjDcfxTsyxService.selectSjDcfxTsyxById(id));
}
/**
* 新增设计-地层分析-特殊岩性提示
*/
//@PreAuthorize("@ss.hasPermi('system:sjDcfxTsyx:add')")
@Log(title = "设计-地层分析-特殊岩性提示", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SjDcfxTsyx sjDcfxTsyx)
{
return toAjax(sjDcfxTsyxService.insertSjDcfxTsyx(sjDcfxTsyx));
}
/**
* 修改设计-地层分析-特殊岩性提示
*/
//@PreAuthorize("@ss.hasPermi('system:sjDcfxTsyx:edit')")
@Log(title = "设计-地层分析-特殊岩性提示", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SjDcfxTsyx sjDcfxTsyx)
{
return toAjax(sjDcfxTsyxService.updateSjDcfxTsyx(sjDcfxTsyx));
}
/**
* 删除设计-地层分析-特殊岩性提示
*/
//@PreAuthorize("@ss.hasPermi('system:sjDcfxTsyx:remove')")
@Log(title = "设计-地层分析-特殊岩性提示", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(sjDcfxTsyxService.deleteSjDcfxTsyxByIds(ids));
}
}
package com.ruoyi.project.zjsgfa.controller;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.project.zjsgfa.domain.SjDjjc;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.project.zjsgfa.domain.SjDzfc;
import com.ruoyi.project.zjsgfa.service.ISjDzfcService;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.web.page.TableDataInfo;
/**
* 地质分层Controller
*
* @author ruoyi
* @date 2025-07-07
*/
@RestController
@RequestMapping("/system/sjDzfc")
public class SjDzfcController extends BaseController
{
@Autowired
private ISjDzfcService sjDzfcService;
/**
* 查询地质分层列表
*/
//@PreAuthorize("@ss.hasPermi('system:sjDzfc:list')")
@GetMapping("/list")
public TableDataInfo list(SjDzfc sjDzfc)
{
// startPage();
List<SjDzfc> list = sjDzfcService.selectSjDzfcList(sjDzfc);
return getDataTable(list);
}
@GetMapping("/getList")
public AjaxResult apiList(SjDzfc sjDzfc)
{
Map<String,Object> map=new HashMap<>();
List<SjDzfc> list = sjDzfcService.selectSjDzfcList(sjDzfc);
map.put("dcJ", "界");
map.put("dcX", "系");
map.put("dcT", "统");
map.put("dcZ", "组");
map.put("dcD", "段");
map.put("sjjh", "设计井号");
map.put("sjdcs", "底垂深");
map.put("sjjcgx", "接触关系");
map.put("sjhd", "厚度");
map.put("sjddsd", "断点深度");
map.put("yjjh1", "依据井号1");
map.put("yjdcs1", "依据底深1");
map.put("yjjcgx1", "接触关系1");
map.put("yjhyjd1", "含油井段1");
map.put("yjddsd1", "断点深度1");
map.put("sjyxts", "设计井岩性提示");
map.put("yjjh2", "依据井号2");
map.put("yjdcs2", "依据底深2");
map.put("yjjcgx2", "接触关系2");
map.put("yjhyjd2", "含油井段2");
map.put("yjddsd2", "断点深度2");
return AjaxResult.success(list,map);
}
/**
* 导出地质分层列表
*/
//@PreAuthorize("@ss.hasPermi('system:sjDzfc:export')")
@Log(title = "地质分层", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SjDzfc sjDzfc)
{
List<SjDzfc> list = sjDzfcService.selectSjDzfcList(sjDzfc);
ExcelUtil<SjDzfc> util = new ExcelUtil<SjDzfc>(SjDzfc.class);
util.exportExcel(response, list, "地质分层数据");
}
/**
* 获取地质分层详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:sjDzfc:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(sjDzfcService.selectSjDzfcById(id));
}
/**
* 新增地质分层
*/
//@PreAuthorize("@ss.hasPermi('system:sjDzfc:add')")
@Log(title = "地质分层", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SjDzfc sjDzfc)
{
return toAjax(sjDzfcService.insertSjDzfc(sjDzfc));
}
/**
* 修改地质分层
*/
//@PreAuthorize("@ss.hasPermi('system:sjDzfc:edit')")
@Log(title = "地质分层", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SjDzfc sjDzfc)
{
return toAjax(sjDzfcService.updateSjDzfc(sjDzfc));
}
/**
* 删除地质分层
*/
//@PreAuthorize("@ss.hasPermi('system:sjDzfc:remove')")
@Log(title = "地质分层", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(sjDzfcService.deleteSjDzfcByIds(ids));
}
}
package com.ruoyi.project.zjsgfa.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.project.zjsgfa.domain.SjFdsgcs;
import com.ruoyi.project.zjsgfa.service.ISjFdsgcsService;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.web.page.TableDataInfo;
/**
* 设计-分段施工措施Controller
*
* @author ruoyi
* @date 2025-08-06
*/
@RestController
@RequestMapping("/system/sjFdsgcs")
public class SjFdsgcsController extends BaseController
{
@Autowired
private ISjFdsgcsService sjFdsgcsService;
/**
* 查询设计-分段施工措施列表
*/
//@PreAuthorize("@ss.hasPermi('system:sjFdsgcs:list')")
@GetMapping("/list")
public TableDataInfo list(SjFdsgcs sjFdsgcs)
{
// startPage();
List<SjFdsgcs> list = sjFdsgcsService.selectSjFdsgcsList(sjFdsgcs);
return getDataTable(list);
}
@GetMapping("/getInfo")
public AjaxResult getInfo(SjFdsgcs sjFdsgcs)
{
// startPage();
List<SjFdsgcs> list = sjFdsgcsService.selectSjFdsgcsList(sjFdsgcs);
if(list.size()>0){
SjFdsgcs sjFdsgcs1 = list.get(0);
return AjaxResult.success(sjFdsgcs1);
}else {
return AjaxResult.success(new SjFdsgcs());
}
}
/**
* 导出设计-分段施工措施列表
*/
//@PreAuthorize("@ss.hasPermi('system:sjFdsgcs:export')")
@Log(title = "设计-分段施工措施", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SjFdsgcs sjFdsgcs)
{
List<SjFdsgcs> list = sjFdsgcsService.selectSjFdsgcsList(sjFdsgcs);
ExcelUtil<SjFdsgcs> util = new ExcelUtil<SjFdsgcs>(SjFdsgcs.class);
util.exportExcel(response, list, "设计-分段施工措施数据");
}
/**
* 获取设计-分段施工措施详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:sjFdsgcs:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(sjFdsgcsService.selectSjFdsgcsById(id));
}
/**
* 新增设计-分段施工措施
*/
//@PreAuthorize("@ss.hasPermi('system:sjFdsgcs:add')")
@Log(title = "设计-分段施工措施", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SjFdsgcs sjFdsgcs)
{
return toAjax(sjFdsgcsService.insertSjFdsgcs(sjFdsgcs));
}
/**
* 修改设计-分段施工措施
*/
//@PreAuthorize("@ss.hasPermi('system:sjFdsgcs:edit')")
@Log(title = "设计-分段施工措施", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SjFdsgcs sjFdsgcs)
{
return toAjax(sjFdsgcsService.updateSjFdsgcs(sjFdsgcs));
}
/**
* 删除设计-分段施工措施
*/
//@PreAuthorize("@ss.hasPermi('system:sjFdsgcs:remove')")
@Log(title = "设计-分段施工措施", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(sjFdsgcsService.deleteSjFdsgcsByIds(ids));
}
@GetMapping("/jsfdsgcs")
public void jsfdsgcs(SjFdsgcs sjFdsgcs)
{
sjFdsgcsService.jsfdsgcs(sjFdsgcs);
}
}
package com.ruoyi.project.zjsgfa.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.project.zjsgfa.domain.SjFdsgcsDcyx;
import com.ruoyi.project.zjsgfa.service.ISjFdsgcsDcyxService;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.web.page.TableDataInfo;
/**
* 设计-分段施工措施-地层岩性Controller
*
* @author ruoyi
* @date 2025-08-06
*/
@RestController
@RequestMapping("/system/sjFdsgcsDcyx")
public class SjFdsgcsDcyxController extends BaseController
{
@Autowired
private ISjFdsgcsDcyxService sjFdsgcsDcyxService;
/**
* 查询设计-分段施工措施-地层岩性列表
*/
//@PreAuthorize("@ss.hasPermi('system:sjFdsgcsDcyx:list')")
@GetMapping("/list")
public TableDataInfo list(SjFdsgcsDcyx sjFdsgcsDcyx)
{
// startPage();
List<SjFdsgcsDcyx> list = sjFdsgcsDcyxService.selectSjFdsgcsDcyxList(sjFdsgcsDcyx);
return getDataTable(list);
}
/**
* 导出设计-分段施工措施-地层岩性列表
*/
//@PreAuthorize("@ss.hasPermi('system:sjFdsgcsDcyx:export')")
@Log(title = "设计-分段施工措施-地层岩性", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SjFdsgcsDcyx sjFdsgcsDcyx)
{
List<SjFdsgcsDcyx> list = sjFdsgcsDcyxService.selectSjFdsgcsDcyxList(sjFdsgcsDcyx);
ExcelUtil<SjFdsgcsDcyx> util = new ExcelUtil<SjFdsgcsDcyx>(SjFdsgcsDcyx.class);
util.exportExcel(response, list, "设计-分段施工措施-地层岩性数据");
}
/**
* 获取设计-分段施工措施-地层岩性详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:sjFdsgcsDcyx:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(sjFdsgcsDcyxService.selectSjFdsgcsDcyxById(id));
}
/**
* 新增设计-分段施工措施-地层岩性
*/
//@PreAuthorize("@ss.hasPermi('system:sjFdsgcsDcyx:add')")
@Log(title = "设计-分段施工措施-地层岩性", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SjFdsgcsDcyx sjFdsgcsDcyx)
{
return toAjax(sjFdsgcsDcyxService.insertSjFdsgcsDcyx(sjFdsgcsDcyx));
}
/**
* 修改设计-分段施工措施-地层岩性
*/
//@PreAuthorize("@ss.hasPermi('system:sjFdsgcsDcyx:edit')")
@Log(title = "设计-分段施工措施-地层岩性", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SjFdsgcsDcyx sjFdsgcsDcyx)
{
return toAjax(sjFdsgcsDcyxService.updateSjFdsgcsDcyx(sjFdsgcsDcyx));
}
/**
* 删除设计-分段施工措施-地层岩性
*/
//@PreAuthorize("@ss.hasPermi('system:sjFdsgcsDcyx:remove')")
@Log(title = "设计-分段施工措施-地层岩性", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(sjFdsgcsDcyxService.deleteSjFdsgcsDcyxByIds(ids));
}
}
package com.ruoyi.project.zjsgfa.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.project.zjsgfa.domain.SjFdsgcsTsgj;
import com.ruoyi.project.zjsgfa.service.ISjFdsgcsTsgjService;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.web.page.TableDataInfo;
/**
* 设计-分段施工措施_特殊工具Controller
*
* @author ruoyi
* @date 2025-08-06
*/
@RestController
@RequestMapping("/system/sjFdsgcsTsgj")
public class SjFdsgcsTsgjController extends BaseController
{
@Autowired
private ISjFdsgcsTsgjService sjFdsgcsTsgjService;
/**
* 查询设计-分段施工措施_特殊工具列表
*/
//@PreAuthorize("@ss.hasPermi('system:sjFdsgcsTsgj:list')")
@GetMapping("/list")
public TableDataInfo list(SjFdsgcsTsgj sjFdsgcsTsgj)
{
startPage();
List<SjFdsgcsTsgj> list = sjFdsgcsTsgjService.selectSjFdsgcsTsgjList(sjFdsgcsTsgj);
return getDataTable(list);
}
/**
* 导出设计-分段施工措施_特殊工具列表
*/
//@PreAuthorize("@ss.hasPermi('system:sjFdsgcsTsgj:export')")
@Log(title = "设计-分段施工措施_特殊工具", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SjFdsgcsTsgj sjFdsgcsTsgj)
{
List<SjFdsgcsTsgj> list = sjFdsgcsTsgjService.selectSjFdsgcsTsgjList(sjFdsgcsTsgj);
ExcelUtil<SjFdsgcsTsgj> util = new ExcelUtil<SjFdsgcsTsgj>(SjFdsgcsTsgj.class);
util.exportExcel(response, list, "设计-分段施工措施_特殊工具数据");
}
/**
* 获取设计-分段施工措施_特殊工具详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:sjFdsgcsTsgj:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(sjFdsgcsTsgjService.selectSjFdsgcsTsgjById(id));
}
/**
* 新增设计-分段施工措施_特殊工具
*/
//@PreAuthorize("@ss.hasPermi('system:sjFdsgcsTsgj:add')")
@Log(title = "设计-分段施工措施_特殊工具", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SjFdsgcsTsgj sjFdsgcsTsgj)
{
return toAjax(sjFdsgcsTsgjService.insertSjFdsgcsTsgj(sjFdsgcsTsgj));
}
/**
* 修改设计-分段施工措施_特殊工具
*/
//@PreAuthorize("@ss.hasPermi('system:sjFdsgcsTsgj:edit')")
@Log(title = "设计-分段施工措施_特殊工具", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SjFdsgcsTsgj sjFdsgcsTsgj)
{
return toAjax(sjFdsgcsTsgjService.updateSjFdsgcsTsgj(sjFdsgcsTsgj));
}
/**
* 删除设计-分段施工措施_特殊工具
*/
//@PreAuthorize("@ss.hasPermi('system:sjFdsgcsTsgj:remove')")
@Log(title = "设计-分段施工措施_特殊工具", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(sjFdsgcsTsgjService.deleteSjFdsgcsTsgjByIds(ids));
}
}
package com.ruoyi.project.zjsgfa.controller;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.project.zjsgfa.domain.SjFdsgcsZjyFdxnb;
import com.ruoyi.project.zjsgfa.service.ISjFdsgcsZjyFdxnbService;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.web.page.TableDataInfo;
/**
* 设计信息-分段施工措施-分段钻井液性能设计Controller
*
* @author ruoyi
* @date 2025-08-20
*/
@RestController
@RequestMapping("/system/sjFdsgcsZjyFdxnb")
public class SjFdsgcsZjyFdxnbController extends BaseController
{
@Autowired
private ISjFdsgcsZjyFdxnbService sjFdsgcsZjyFdxnbService;
/**
* 查询设计信息-分段施工措施-分段钻井液性能设计列表
*/
//@PreAuthorize("@ss.hasPermi('system:sjFdsgcsZjyFdxnb:list')")
@GetMapping("/list")
public AjaxResult list(SjFdsgcsZjyFdxnb sjFdsgcsZjyFdxnb)
{
Map<String, Object> list = sjFdsgcsZjyFdxnbService.selectSjFdsgcsZjyFdxnbList(sjFdsgcsZjyFdxnb);
return AjaxResult.success(list);
}
/**
* 导出设计信息-分段施工措施-分段钻井液性能设计列表
*/
//@PreAuthorize("@ss.hasPermi('system:sjFdsgcsZjyFdxnb:export')")
@Log(title = "设计信息-分段施工措施-分段钻井液性能设计", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SjFdsgcsZjyFdxnb sjFdsgcsZjyFdxnb)
{
// List<SjFdsgcsZjyFdxnb> list = sjFdsgcsZjyFdxnbService.selectSjFdsgcsZjyFdxnbList(sjFdsgcsZjyFdxnb);
// ExcelUtil<SjFdsgcsZjyFdxnb> util = new ExcelUtil<SjFdsgcsZjyFdxnb>(SjFdsgcsZjyFdxnb.class);
// util.exportExcel(response, list, "设计信息-分段施工措施-分段钻井液性能设计数据");
}
/**
* 获取设计信息-分段施工措施-分段钻井液性能设计详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:sjFdsgcsZjyFdxnb:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(sjFdsgcsZjyFdxnbService.selectSjFdsgcsZjyFdxnbById(id));
}
/**
* 新增设计信息-分段施工措施-分段钻井液性能设计
*/
//@PreAuthorize("@ss.hasPermi('system:sjFdsgcsZjyFdxnb:add')")
@Log(title = "设计信息-分段施工措施-分段钻井液性能设计", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SjFdsgcsZjyFdxnb sjFdsgcsZjyFdxnb)
{
return toAjax(sjFdsgcsZjyFdxnbService.insertSjFdsgcsZjyFdxnb(sjFdsgcsZjyFdxnb));
}
/**
* 修改设计信息-分段施工措施-分段钻井液性能设计
*/
//@PreAuthorize("@ss.hasPermi('system:sjFdsgcsZjyFdxnb:edit')")
@Log(title = "设计信息-分段施工措施-分段钻井液性能设计", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SjFdsgcsZjyFdxnb sjFdsgcsZjyFdxnb)
{
return toAjax(sjFdsgcsZjyFdxnbService.updateSjFdsgcsZjyFdxnb(sjFdsgcsZjyFdxnb));
}
@PostMapping("/pledit")
public AjaxResult pledit(@RequestBody SjFdsgcsZjyFdxnb sjFdsgcsZjyFdxnb)
{
return toAjax(sjFdsgcsZjyFdxnbService.pledit(sjFdsgcsZjyFdxnb.getList()));
}
/**
* 删除设计信息-分段施工措施-分段钻井液性能设计
*/
//@PreAuthorize("@ss.hasPermi('system:sjFdsgcsZjyFdxnb:remove')")
@Log(title = "设计信息-分段施工措施-分段钻井液性能设计", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(sjFdsgcsZjyFdxnbService.deleteSjFdsgcsZjyFdxnbByIds(ids));
}
}
package com.ruoyi.project.zjsgfa.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.project.zjsgfa.domain.SjFl;
import com.ruoyi.project.zjsgfa.service.ISjFlService;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.web.page.TableDataInfo;
/**
* 设计-附录Controller
*
* @author ruoyi
* @date 2025-07-25
*/
@RestController
@RequestMapping("/system/sjFl")
public class SjFlController extends BaseController
{
@Autowired
private ISjFlService sjFlService;
/**
* 查询设计-附录列表
*/
//@PreAuthorize("@ss.hasPermi('system:sjFl:list')")
@GetMapping("/list")
public TableDataInfo list(SjFl sjFl)
{
startPage();
List<SjFl> list = sjFlService.selectSjFlList(sjFl);
return getDataTable(list);
}
@GetMapping("/getInfoByJh")
public AjaxResult getInfoByJh(SjFl sjFl)
{
// startPage();
List<SjFl> list = sjFlService.selectSjFlList(sjFl);
SjFl sjFl1=new SjFl();
if(list.size()>0){
sjFl1=list.get(0);
}
return AjaxResult.success(sjFl1);
}
/**
* 导出设计-附录列表
*/
//@PreAuthorize("@ss.hasPermi('system:sjFl:export')")
@Log(title = "设计-附录", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SjFl sjFl)
{
List<SjFl> list = sjFlService.selectSjFlList(sjFl);
ExcelUtil<SjFl> util = new ExcelUtil<SjFl>(SjFl.class);
util.exportExcel(response, list, "设计-附录数据");
}
/**
* 获取设计-附录详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:sjFl:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(sjFlService.selectSjFlById(id));
}
/**
* 新增设计-附录
*/
//@PreAuthorize("@ss.hasPermi('system:sjFl:add')")
@Log(title = "设计-附录", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SjFl sjFl)
{
return toAjax(sjFlService.insertSjFl(sjFl));
}
/**
* 修改设计-附录
*/
//@PreAuthorize("@ss.hasPermi('system:sjFl:edit')")
@Log(title = "设计-附录", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SjFl sjFl)
{
return toAjax(sjFlService.updateSjFl(sjFl));
}
/**
* 删除设计-附录
*/
//@PreAuthorize("@ss.hasPermi('system:sjFl:remove')")
@Log(title = "设计-附录", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(sjFlService.deleteSjFlByIds(ids));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment