1、新增部门校验问题修复;2、自定义板编号跨单导入问题修复;

This commit is contained in:
gaoqr
2024-12-02 17:44:23 +08:00
parent 73d31dbf8c
commit 0effec4479
7 changed files with 33 additions and 17 deletions
@@ -38,10 +38,10 @@ public interface DeptApi {
@Parameter(name = "ids", description = "部门编号数组", example = "1,2", required = true)
CommonResult<Boolean> validateDeptList(@RequestParam("ids") Collection<Long> ids);
@GetMapping(PREFIX + "/valid/{deptId}")
@GetMapping(PREFIX + "/legitimacy/{deptId}")
@Operation(summary = "校验部门是否合法")
@Parameter(name = "id", description = "部门编号", example = "1024", required = true)
CommonResult<Boolean> validateDept(@PathVariable("id") Long deptId);
CommonResult<Boolean> validateDept(@PathVariable("deptId") Long deptId);
/**
* 获得指定编号的部门 Map
@@ -7,6 +7,7 @@ import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
/**
@@ -26,5 +27,5 @@ public interface SystemConfigApi {
@GetMapping(PREFIX + "/organ/custom-plateno-config/{id}")
@Operation(summary = "获取组织下自定义版编号配置")
CommonResult<SystemConfigRespDTO> getById(Long id);
CommonResult<SystemConfigRespDTO> getById(@PathVariable("id") Long id);
}
@@ -247,7 +247,7 @@ public class CustomPlateNoServiceHandler extends AbstractSystemConfigServiceHand
// 查询机构下的现有自定义板编号配置最大版本号
Integer maxCustomPlateNoSystemConfigVersion = systemConfigMapper.selectOrgMaxCustomPlateNoSystemConfigVersion(OrganContextHolder.getOrganId());
// 版本号 + 1
reqVO.setVersion(maxCustomPlateNoSystemConfigVersion + 1);
reqVO.setVersion((ObjectUtil.isNotNull(maxCustomPlateNoSystemConfigVersion) ? maxCustomPlateNoSystemConfigVersion : 0) + 1);
// 自定义板编号每次保存都创建新版本
reqVO.setId(null);
}
@@ -534,8 +534,11 @@ public class AdminUserServiceImpl implements AdminUserService {
AdminUserDO adminUserDO = validateUserExists(id);
// 校验用户名唯一
validateUsernameUnique(id, username, organId);
// 校验部门处于开启状态
deptService.validDept(deptId);
// 组织管理员不归属部门
if (ObjectUtil.isNotNull(deptId)) {
// 校验部门处于开启状态
deptService.validDept(deptId);
}
// 校验岗位处于开启状态
postService.validatePostList(postIds);
return adminUserDO;