退出班组
This commit is contained in:
@ -1,6 +1,7 @@
|
|||||||
package org.dromara.contractor.controller;
|
package org.dromara.contractor.controller;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.dev33.satoken.annotation.SaMode;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import jakarta.validation.constraints.NotEmpty;
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
@ -38,9 +39,9 @@ public class SubSubcontractController extends BaseController {
|
|||||||
private ISubSubcontractService subcontractService;
|
private ISubSubcontractService subcontractService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询分包合同列表
|
* 查询分包合同列表 project:projectTeam:addTeam
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("contractor:subcontract:list")
|
@SaCheckPermission(value = {"contractor:subcontract:list", "project:projectTeam:addTeam"}, mode = SaMode.OR)
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo<SubSubcontractVo> list(SubSubcontractQueryReq req, PageQuery pageQuery) {
|
public TableDataInfo<SubSubcontractVo> list(SubSubcontractQueryReq req, PageQuery pageQuery) {
|
||||||
return subcontractService.queryPageList(req, pageQuery);
|
return subcontractService.queryPageList(req, pageQuery);
|
||||||
|
|||||||
@ -388,8 +388,11 @@ public class BusProjectTeamMemberServiceImpl extends ServiceImpl<BusProjectTeamM
|
|||||||
.set(SubConstructionUser::getExitStatus, exitStatus)
|
.set(SubConstructionUser::getExitStatus, exitStatus)
|
||||||
.set(SubConstructionUser::getTeamId, null)
|
.set(SubConstructionUser::getTeamId, null)
|
||||||
.set(SubConstructionUser::getStatus, "1")
|
.set(SubConstructionUser::getStatus, "1")
|
||||||
|
.set(SubConstructionUser::getContractorId, null)
|
||||||
|
.set(SubConstructionUser::getTypeOfWork, null)
|
||||||
.set(SubConstructionUser::getLeaveDate, new Date());
|
.set(SubConstructionUser::getLeaveDate, new Date());
|
||||||
constructionUserService.update(constructionUserLuw);
|
constructionUserService.update(constructionUserLuw);
|
||||||
|
userService.deleteContractorIdByUserId(constructionUser.getSysUserId());
|
||||||
|
|
||||||
asyncUtil.deletePersonnel(constructionUser);
|
asyncUtil.deletePersonnel(constructionUser);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@ -319,4 +319,5 @@ public interface ISysUserService {
|
|||||||
|
|
||||||
List<SysUser> selectUserListByContractorId(Long contractorId);
|
List<SysUser> selectUserListByContractorId(Long contractorId);
|
||||||
|
|
||||||
|
void deleteContractorIdByUserId(Long userId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1563,4 +1563,11 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
|
|||||||
.eq(SysUser::getAppUserType, "2")
|
.eq(SysUser::getAppUserType, "2")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteContractorIdByUserId(Long userId) {
|
||||||
|
LambdaUpdateWrapper<SysUser> wrapper = new LambdaUpdateWrapper<>();
|
||||||
|
wrapper.eq(SysUser::getUserId, userId).set(SysUser::getContractorId, null);
|
||||||
|
baseMapper.update(null, wrapper);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user