Merge branch 'dev' into updateMenu
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
package org.dromara.contractor.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
@ -38,9 +39,9 @@ public class SubSubcontractController extends BaseController {
|
||||
private ISubSubcontractService subcontractService;
|
||||
|
||||
/**
|
||||
* 查询分包合同列表
|
||||
* 查询分包合同列表 project:projectTeam:addTeam
|
||||
*/
|
||||
@SaCheckPermission("contractor:subcontract:list")
|
||||
@SaCheckPermission(value = {"contractor:subcontract:list", "project:projectTeam:addTeam"}, mode = SaMode.OR)
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<SubSubcontractVo> list(SubSubcontractQueryReq req, PageQuery pageQuery) {
|
||||
return subcontractService.queryPageList(req, pageQuery);
|
||||
|
||||
@ -388,8 +388,11 @@ public class BusProjectTeamMemberServiceImpl extends ServiceImpl<BusProjectTeamM
|
||||
.set(SubConstructionUser::getExitStatus, exitStatus)
|
||||
.set(SubConstructionUser::getTeamId, null)
|
||||
.set(SubConstructionUser::getStatus, "1")
|
||||
.set(SubConstructionUser::getContractorId, null)
|
||||
.set(SubConstructionUser::getTypeOfWork, null)
|
||||
.set(SubConstructionUser::getLeaveDate, new Date());
|
||||
constructionUserService.update(constructionUserLuw);
|
||||
userService.deleteContractorIdByUserId(constructionUser.getSysUserId());
|
||||
|
||||
asyncUtil.deletePersonnel(constructionUser);
|
||||
return true;
|
||||
|
||||
@ -319,4 +319,5 @@ public interface ISysUserService {
|
||||
|
||||
List<SysUser> selectUserListByContractorId(Long contractorId);
|
||||
|
||||
void deleteContractorIdByUserId(Long userId);
|
||||
}
|
||||
|
||||
@ -1563,4 +1563,11 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
|
||||
.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;
|
||||
|
||||
/**
|
||||
* 系统项目 ID
|
||||
*/
|
||||
private Long sysProjectId;
|
||||
|
||||
/**
|
||||
* 区域码
|
||||
*/
|
||||
|
||||
@ -40,6 +40,11 @@ public class XzdProjectVo implements Serializable {
|
||||
*/
|
||||
private String shzt;
|
||||
|
||||
/**
|
||||
* 系统项目 ID
|
||||
*/
|
||||
private Long sysProjectId;
|
||||
|
||||
/**
|
||||
* 父级项目
|
||||
*/
|
||||
|
||||
@ -756,7 +756,8 @@ public class XzdProjectServiceImpl extends ServiceImpl<XzdProjectMapper, XzdProj
|
||||
.one();
|
||||
project.setProjectGeneralize(projectProfile.getProjectProfile());
|
||||
project.setProvince(projectProfile.getProvince());
|
||||
projectService.insertByBo(project);
|
||||
Long sysProjectId = projectService.insertByBo(project);
|
||||
byId.setSysProjectId(sysProjectId);
|
||||
} catch (Exception e) {
|
||||
log.error("自动创建系统项目失败:{} - {}", byId.getId(), byId.getProjectName(), e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user