针对智慧工地对公司框架进行优化
This commit is contained in:
parent
c1e6fbbec7
commit
3245fe6c12
|
|
@ -122,9 +122,16 @@ public class SysDept extends BaseEntity {
|
|||
*角色id
|
||||
*/
|
||||
private Long roleId;
|
||||
|
||||
/**
|
||||
* 用户信息
|
||||
*/
|
||||
private SysUser sysUser;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param city
|
||||
*/
|
||||
private String keyWord;
|
||||
|
||||
public void setCity(String city) {
|
||||
this.city = city;
|
||||
|
|
|
|||
|
|
@ -186,4 +186,22 @@ public class SysDeptController extends BaseController
|
|||
}
|
||||
return getDataTableError(deptList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 公司注销
|
||||
* @param dept
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/deptLogout")
|
||||
@SysLog(title = "运营人员获取公司列表", businessType = OperaType.UPDATE,logType = 0,module = "系统管理->部门管理")
|
||||
public AjaxResult deptLogout(@Validated @RequestBody SysDept dept) {
|
||||
|
||||
try{
|
||||
log.info("公司信息{}",dept.getDeptId());
|
||||
return toAjax(deptService.deptLogout(dept.getDeptId()));
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return error("系统异常");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,4 +139,11 @@ public interface SysDeptMapper
|
|||
* @return
|
||||
*/
|
||||
SysUser selectDeptAndUserById(Long deptId);
|
||||
|
||||
/**
|
||||
* 公司注销
|
||||
* @param deptId
|
||||
* @return
|
||||
*/
|
||||
int deptLogout(Long deptId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -137,4 +137,11 @@ public interface ISysDeptService
|
|||
* @return
|
||||
*/
|
||||
List<SysDept> getDeptList(SysDept dept);
|
||||
|
||||
/**
|
||||
* 公司注销
|
||||
* @param deptId
|
||||
* @return
|
||||
*/
|
||||
int deptLogout(Long deptId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -426,7 +426,7 @@ public class SysDeptServiceImpl implements ISysDeptService
|
|||
updateParentDeptStatusNormal(dept);
|
||||
}
|
||||
//判断是否是修改公司信息并判断是否关联用户信息
|
||||
if (systemConfig.isCreateUserAndRole() && dept.getDeptId()==0L){
|
||||
if (systemConfig.isCreateUserAndRole() && dept.getParentId()==0L){
|
||||
updateUserAndRole(dept);
|
||||
|
||||
}
|
||||
|
|
@ -505,6 +505,10 @@ public class SysDeptServiceImpl implements ISysDeptService
|
|||
return deptMapper.getDeptList(dept);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deptLogout(Long deptId) {
|
||||
return deptMapper.deptLogout(deptId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -146,7 +146,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1
|
||||
</select>
|
||||
<select id="getDeptList" resultType="com.bonus.system.api.domain.SysDept">
|
||||
select * from sys_dept where parent_id='0'
|
||||
select * from sys_dept sd where parent_id='0'
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
and sd.dept_name like concat('%', #{keyWord}, '%')
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectDeptAndUserById" resultType="com.bonus.system.api.domain.SysUser">
|
||||
select su.nick_name as nickName,su.user_name as userName,su.password as password,su.phonenumber as phonenumber,
|
||||
|
|
@ -242,6 +245,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
#{deptId}
|
||||
</foreach>
|
||||
</update>
|
||||
<update id="deptLogout">
|
||||
update sys_dept set status = '2' where dept_id = #{deptId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDeptById" parameterType="Long">
|
||||
update sys_dept set del_flag = '2' where dept_id = #{deptId}
|
||||
|
|
|
|||
Loading…
Reference in New Issue