Merge branch 'dev' into updateMenu

This commit is contained in:
lcj
2025-12-10 18:49:14 +08:00
7 changed files with 26 additions and 3 deletions

View File

@ -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);

View File

@ -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;

View File

@ -319,4 +319,5 @@ public interface ISysUserService {
List<SysUser> selectUserListByContractorId(Long contractorId);
void deleteContractorIdByUserId(Long userId);
}

View File

@ -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);
}
}

View File

@ -35,6 +35,11 @@ public class XzdProject extends BaseEntity {
*/
private String shzt;
/**
* 系统项目 ID
*/
private Long sysProjectId;
/**
* 区域码
*/

View File

@ -40,6 +40,11 @@ public class XzdProjectVo implements Serializable {
*/
private String shzt;
/**
* 系统项目 ID
*/
private Long sysProjectId;
/**
* 父级项目
*/

View File

@ -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);
}