Revert "添加部门保存接口-用于人力资源部门保存"

This reverts commit 4fc90fa653.
dev_xgfuseridcard
zhaolei 2026-06-10 08:59:33 +08:00
parent 4dd7a1a39d
commit b5efa87f30
4 changed files with 0 additions and 38 deletions

View File

@ -100,12 +100,4 @@ public class ZcloudDepartmentFacadeImpl implements ZcloudDepartmentFacade {
} }
return map; return map;
} }
@Override
public SingleResponse<Long> addHumanUserDept(ZcloudDepartmentAddCmd zcloudDepartmentAddCmd) {
DepartmentAddCmd addCmd = new DepartmentAddCmd();
BeanUtils.copyProperties(zcloudDepartmentAddCmd, addCmd);
Long deptId = departmentService.addHumanUserDept(addCmd);
return SingleResponse.of(deptId);
}
} }

View File

@ -16,7 +16,6 @@ import com.zcloud.basic.info.dto.DepartmentAddCmd;
import com.zcloud.basic.info.dto.DepartmentTreeQry; import com.zcloud.basic.info.dto.DepartmentTreeQry;
import com.zcloud.basic.info.dto.clientobject.DepartmentTreeInfoCO; import com.zcloud.basic.info.dto.clientobject.DepartmentTreeInfoCO;
import com.zcloud.basic.info.persistence.repository.DepartmentRepository; import com.zcloud.basic.info.persistence.repository.DepartmentRepository;
import com.zcloud.gbscommon.utils.Tools;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference; import org.apache.dubbo.config.annotation.DubboReference;
@ -74,27 +73,5 @@ public class DepartmentAddExe {
} }
return id; return id;
} }
@Transactional(rollbackFor = Exception.class)
public Long executeHumanUserDept(DepartmentAddCmd cmd) {
DepartmentE examTypeE = new DepartmentE();
BeanUtils.copyProperties(cmd, examTypeE);
cmd.setDepartmentId(Tools.get32UUID());
Long id = null;
try {
id = departmentGateway.add(examTypeE);
} catch (Exception e) {
throw new RuntimeException(e);
}
if (id ==null) {
throw new BizException("保存失败");
}
if(CollUtil.isNotEmpty(cmd.getDepartmentIdsList())&& CommonFlagEnum.YES.getCode().equals(cmd.getSuperviseFlag())){
List<DepartmentSuperviseE> departmentSuperviseEList =examTypeE.initAdd(cmd.getDepartmentIdsList(), id);
departmentSuperviseGateway.addbatch(departmentSuperviseEList);
}
return id;
}
} }

View File

@ -101,10 +101,5 @@ public class DepartmentServiceImpl implements DepartmentServiceI {
String name = Tools.getTreeFullName(list,"id", "parentId", "name", deptId); String name = Tools.getTreeFullName(list,"id", "parentId", "name", deptId);
return name; return name;
} }
@Override
public Long addHumanUserDept(DepartmentAddCmd cmd) {
return departmentAddExe.executeHumanUserDept(cmd);
}
} }

View File

@ -44,7 +44,5 @@ public interface DepartmentServiceI {
Collection<DepartmentTreeInfoCO> listAllTreeByCorpType(DepartmentTreeQry qry); Collection<DepartmentTreeInfoCO> listAllTreeByCorpType(DepartmentTreeQry qry);
Long addHumanUserDept(DepartmentAddCmd cmd);
} }