修改企业和部门接口

main
zhaokai 2025-11-05 17:55:20 +08:00
parent b22abc889e
commit aea60a4e65
3 changed files with 10 additions and 5 deletions

View File

@ -37,9 +37,13 @@ public class DepartmentAddExe {
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public boolean execute(DepartmentAddCmd cmd) { public boolean execute(DepartmentAddCmd cmd) {
DepartmentE examTypeE = new DepartmentE(); DepartmentE examTypeE = new DepartmentE();
/* if(examTypeE.getParentId()==null){ //TODO 父id的值待定
examTypeE.setParentId(AuthContext.getTenantId()); // if(examTypeE.getParentId()==null){
}*/ // examTypeE.setParentId(AuthContext.getTenantId());
// }
if(cmd.getCorpinfoId() == null){
cmd.setCorpinfoId(AuthContext.getTenantId());
}
BeanUtils.copyProperties(cmd, examTypeE); BeanUtils.copyProperties(cmd, examTypeE);
Long id = null; Long id = null;
try { try {

View File

@ -60,7 +60,8 @@ public class DepartmentQueryExe {
return Collections.emptyList(); return Collections.emptyList();
} }
List<DepartmentTreeInfoCO> examCenterCOS = departmentCoConvertor.converDOsToInfoCOs(pageResponse); List<DepartmentTreeInfoCO> examCenterCOS = departmentCoConvertor.converDOsToInfoCOs(pageResponse);
return Tools.buildEntityTree(examCenterCOS, "id", "parentId", "childrenList"); //GBS部门第一次是1
return Tools.buildEntityTree(examCenterCOS, "id", "parentId", "childrenList",1);
} }

View File

@ -29,7 +29,7 @@ public class DepartmentAddCmd extends Command {
@NotEmpty(message = "名称不能为空") @NotEmpty(message = "名称不能为空")
private String name; private String name;
@ApiModelProperty(value = "父部门id", name = "parentId", required = true) @ApiModelProperty(value = "父部门id", name = "parentId", required = true)
@NotNull(message = "父部门id不能为空") // @NotNull(message = "父部门id不能为空")
private Long parentId; private Long parentId;
@ApiModelProperty(value = "所属企业", name = "corpinfoId", required = true) @ApiModelProperty(value = "所属企业", name = "corpinfoId", required = true)