修改了自动派单bug
This commit is contained in:
@@ -48,6 +48,10 @@ public class ServiceWorkOrdersTypeVo implements Serializable {
|
||||
*部门id
|
||||
*/
|
||||
private Long deptId;
|
||||
/**
|
||||
*部门名称
|
||||
*/
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 运作模式
|
||||
|
@@ -3,6 +3,7 @@ package org.dromara.property.service.impl;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
@@ -18,6 +19,8 @@ import org.dromara.property.domain.bo.ServiceWorkOrdersTypeBo;
|
||||
import org.dromara.property.domain.vo.ServiceWorkOrdersTypeVo;
|
||||
import org.dromara.property.mapper.ServiceWorkOrdersTypeMapper;
|
||||
import org.dromara.property.service.IServiceWorkOrdersTypeService;
|
||||
import org.dromara.system.api.RemoteDeptService;
|
||||
import org.dromara.system.api.domain.vo.RemoteDeptVo;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@@ -39,6 +42,8 @@ public class ServiceWorkOrdersTypeServiceImpl implements IServiceWorkOrdersTypeS
|
||||
|
||||
private final ServiceWorkOrdersTypeMapper baseMapper;
|
||||
|
||||
@DubboReference
|
||||
private RemoteDeptService remoteDeptService;
|
||||
/**
|
||||
* 查询【工单类型】
|
||||
*
|
||||
@@ -47,7 +52,11 @@ public class ServiceWorkOrdersTypeServiceImpl implements IServiceWorkOrdersTypeS
|
||||
*/
|
||||
@Override
|
||||
public ServiceWorkOrdersTypeVo queryById(Long id) {
|
||||
return baseMapper.selectVoById(id);
|
||||
ServiceWorkOrdersTypeVo serviceWorkOrdersTypeVo= baseMapper.selectVoById(id);
|
||||
Long deptId = serviceWorkOrdersTypeVo.getDeptId();
|
||||
RemoteDeptVo remoteDeptVo = remoteDeptService.selectDeptVoById(deptId);
|
||||
serviceWorkOrdersTypeVo.setDeptName(remoteDeptVo.getDeptName());
|
||||
return serviceWorkOrdersTypeVo;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -61,6 +70,11 @@ public class ServiceWorkOrdersTypeServiceImpl implements IServiceWorkOrdersTypeS
|
||||
public TableDataInfo<ServiceWorkOrdersTypeVo> queryPageList(ServiceWorkOrdersTypeBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<ServiceWorkOrdersType> lqw = buildQueryWrapper(bo);
|
||||
Page<ServiceWorkOrdersTypeVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
result.getRecords().stream().forEach(vo -> {
|
||||
Long deptId = vo.getDeptId();
|
||||
RemoteDeptVo remoteDeptVo = remoteDeptService.selectDeptVoById(deptId);
|
||||
vo.setDeptName(remoteDeptVo.getDeptName());
|
||||
});
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
@@ -73,7 +87,13 @@ public class ServiceWorkOrdersTypeServiceImpl implements IServiceWorkOrdersTypeS
|
||||
@Override
|
||||
public List<ServiceWorkOrdersTypeVo> queryList(ServiceWorkOrdersTypeBo bo) {
|
||||
LambdaQueryWrapper<ServiceWorkOrdersType> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
List<ServiceWorkOrdersTypeVo> serviceWorkOrdersTypeVoList= baseMapper.selectVoList(lqw);
|
||||
serviceWorkOrdersTypeVoList.stream().forEach(vo -> {
|
||||
Long deptId = vo.getDeptId();
|
||||
RemoteDeptVo remoteDeptVo = remoteDeptService.selectDeptVoById(deptId);
|
||||
vo.setDeptName(remoteDeptVo.getDeptName());
|
||||
});
|
||||
return serviceWorkOrdersTypeVoList;
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<ServiceWorkOrdersType> buildQueryWrapper(ServiceWorkOrdersTypeBo bo) {
|
||||
|
Reference in New Issue
Block a user