Merge branch 'dev' into updateMenu
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,6 +35,11 @@ public class XzdProject extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String shzt;
|
private String shzt;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统项目 ID
|
||||||
|
*/
|
||||||
|
private Long sysProjectId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 区域码
|
* 区域码
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -40,6 +40,11 @@ public class XzdProjectVo implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String shzt;
|
private String shzt;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统项目 ID
|
||||||
|
*/
|
||||||
|
private Long sysProjectId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 父级项目
|
* 父级项目
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -756,7 +756,8 @@ public class XzdProjectServiceImpl extends ServiceImpl<XzdProjectMapper, XzdProj
|
|||||||
.one();
|
.one();
|
||||||
project.setProjectGeneralize(projectProfile.getProjectProfile());
|
project.setProjectGeneralize(projectProfile.getProjectProfile());
|
||||||
project.setProvince(projectProfile.getProvince());
|
project.setProvince(projectProfile.getProvince());
|
||||||
projectService.insertByBo(project);
|
Long sysProjectId = projectService.insertByBo(project);
|
||||||
|
byId.setSysProjectId(sysProjectId);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("自动创建系统项目失败:{} - {}", byId.getId(), byId.getProjectName(), e);
|
log.error("自动创建系统项目失败:{} - {}", byId.getId(), byId.getProjectName(), e);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user