parent
4dd7a1a39d
commit
b5efa87f30
|
|
@ -100,12 +100,4 @@ public class ZcloudDepartmentFacadeImpl implements ZcloudDepartmentFacade {
|
|||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ import com.zcloud.basic.info.dto.DepartmentAddCmd;
|
|||
import com.zcloud.basic.info.dto.DepartmentTreeQry;
|
||||
import com.zcloud.basic.info.dto.clientobject.DepartmentTreeInfoCO;
|
||||
import com.zcloud.basic.info.persistence.repository.DepartmentRepository;
|
||||
import com.zcloud.gbscommon.utils.Tools;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
|
|
@ -74,27 +73,5 @@ public class DepartmentAddExe {
|
|||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -101,10 +101,5 @@ public class DepartmentServiceImpl implements DepartmentServiceI {
|
|||
String name = Tools.getTreeFullName(list,"id", "parentId", "name", deptId);
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long addHumanUserDept(DepartmentAddCmd cmd) {
|
||||
return departmentAddExe.executeHumanUserDept(cmd);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,5 @@ public interface DepartmentServiceI {
|
|||
|
||||
|
||||
Collection<DepartmentTreeInfoCO> listAllTreeByCorpType(DepartmentTreeQry qry);
|
||||
|
||||
Long addHumanUserDept(DepartmentAddCmd cmd);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue