|
|
@@ -27,9 +27,12 @@ import com.sckw.manage.model.entity.KwmAddress;
|
|
|
import com.sckw.manage.model.vo.req.*;
|
|
|
import com.sckw.manage.model.vo.res.AddressDetailResVo;
|
|
|
import com.sckw.manage.model.vo.res.AddressQueryResVo;
|
|
|
+import com.sckw.system.api.RemoteSystemService;
|
|
|
+import com.sckw.system.api.model.dto.res.EntCacheResDto;
|
|
|
import com.sckw.system.api.model.dto.res.SysDictResDto;
|
|
|
import com.sckw.system.api.model.dto.res.UserCacheResDto;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.dubbo.config.annotation.DubboReference;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
@@ -51,6 +54,9 @@ public class KwmAddressService {
|
|
|
|
|
|
@Autowired
|
|
|
private RemoteManageServiceImpl remoteManageService;
|
|
|
+
|
|
|
+ @DubboReference(version = "1.0.0", group = "design", check = false)
|
|
|
+ private RemoteSystemService remoteSystemService;
|
|
|
/**
|
|
|
* @param reqVo 分页入参
|
|
|
* @return HttpResult
|
|
|
@@ -341,9 +347,17 @@ public class KwmAddressService {
|
|
|
*/
|
|
|
public List<AddressQueryResVo> queryByEnt(QueryByEntReqVo reqVo) {
|
|
|
LambdaQueryWrapper<KwmAddress> wrapper = new LambdaQueryWrapper<>();
|
|
|
- wrapper.eq(KwmAddress::getEntId, reqVo.getId());
|
|
|
+ //wrapper.eq(KwmAddress::getEntId, reqVo.getId());
|
|
|
wrapper.eq(KwmAddress::getDelFlag, Global.NO);
|
|
|
-
|
|
|
+ List<Long> ids = new ArrayList<>();
|
|
|
+ ids.add(reqVo.getId());
|
|
|
+ Map<Long, EntCacheResDto> entCacheResDtos = remoteSystemService.queryEntTreeByIds(ids);
|
|
|
+ EntCacheResDto id = entCacheResDtos.get(reqVo.getId());
|
|
|
+ wrapper.eq(KwmAddress::getEntId, id.getId());
|
|
|
+ //entCacheResDtos.get();
|
|
|
+ if (StringUtils.isNotBlank(reqVo.getCityTrueName())) {
|
|
|
+ wrapper.and(wp -> wp.eq(KwmAddress::getName, reqVo.getCityTrueName()));
|
|
|
+ }
|
|
|
if (StringUtils.isNotBlank(reqVo.getCityName())) {
|
|
|
wrapper.and(wp -> wp.like(KwmAddress::getCityName, reqVo.getCityName()).or().
|
|
|
like(KwmAddress::getDetailAddress, reqVo.getCityName()));
|