|
@@ -17,7 +17,9 @@ import com.sckw.core.utils.StringUtils;
|
|
|
import com.sckw.core.web.constant.HttpStatus;
|
|
import com.sckw.core.web.constant.HttpStatus;
|
|
|
import com.sckw.core.web.context.LoginUserHolder;
|
|
import com.sckw.core.web.context.LoginUserHolder;
|
|
|
import com.sckw.order.api.dubbo.TradeOrderInfoService;
|
|
import com.sckw.order.api.dubbo.TradeOrderInfoService;
|
|
|
|
|
+import com.sckw.system.api.model.dto.res.EntTypeResDto;
|
|
|
import com.sckw.system.dao.*;
|
|
import com.sckw.system.dao.*;
|
|
|
|
|
+import com.sckw.system.dubbo.RemoteBaseService;
|
|
|
import com.sckw.system.model.*;
|
|
import com.sckw.system.model.*;
|
|
|
import com.sckw.system.model.pojo.FindEntListPojo;
|
|
import com.sckw.system.model.pojo.FindEntListPojo;
|
|
|
import com.sckw.system.model.pojo.FindMenuTreePojo;
|
|
import com.sckw.system.model.pojo.FindMenuTreePojo;
|
|
@@ -70,6 +72,8 @@ public class KwsMenuService {
|
|
|
@DubboReference(version = "1.0.0", group = "design", check = false, timeout = 8000)
|
|
@DubboReference(version = "1.0.0", group = "design", check = false, timeout = 8000)
|
|
|
private TransportRemoteService transportRemoteService;
|
|
private TransportRemoteService transportRemoteService;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private RemoteBaseService remoteBaseService;
|
|
|
/**
|
|
/**
|
|
|
* @param params 实体
|
|
* @param params 实体
|
|
|
* @desc: 添加新纪录
|
|
* @desc: 添加新纪录
|
|
@@ -593,7 +597,7 @@ public class KwsMenuService {
|
|
|
List<FindEntListPojo> b = collect.get(ApprovalEnum.REFRESH.getCode());
|
|
List<FindEntListPojo> b = collect.get(ApprovalEnum.REFRESH.getCode());
|
|
|
child.setCount((CollUtil.isNotEmpty(a) ? a.size() : 0L) + (CollUtil.isNotEmpty(b) ? b.size() : 0L));
|
|
child.setCount((CollUtil.isNotEmpty(a) ? a.size() : 0L) + (CollUtil.isNotEmpty(b) ? b.size() : 0L));
|
|
|
sum = sum + child.getCount();
|
|
sum = sum + child.getCount();
|
|
|
- total = total+ child.getCount();
|
|
|
|
|
|
|
+ total = total + child.getCount();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
findMenuTreeResVo.setCount(sum);
|
|
findMenuTreeResVo.setCount(sum);
|
|
@@ -609,14 +613,14 @@ public class KwsMenuService {
|
|
|
Long aLong = remoteContractService.queryTradeCount();
|
|
Long aLong = remoteContractService.queryTradeCount();
|
|
|
child.setCount(aLong);
|
|
child.setCount(aLong);
|
|
|
sum = sum + aLong;
|
|
sum = sum + aLong;
|
|
|
- total = total+ aLong;
|
|
|
|
|
|
|
+ total = total + aLong;
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
|
if (StrUtil.equals(child.getName(), "物流合同") && hasPerm(child.getChildren(), "logisticsContract:sign")) {
|
|
if (StrUtil.equals(child.getName(), "物流合同") && hasPerm(child.getChildren(), "logisticsContract:sign")) {
|
|
|
Long aLong = remoteContractService.queryLogisticsCount();
|
|
Long aLong = remoteContractService.queryLogisticsCount();
|
|
|
child.setCount(aLong);
|
|
child.setCount(aLong);
|
|
|
sum = sum + aLong;
|
|
sum = sum + aLong;
|
|
|
- total = total+ aLong;
|
|
|
|
|
|
|
+ total = total + aLong;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -632,21 +636,30 @@ public class KwsMenuService {
|
|
|
Long aLong = tradeOrderInfoService.queryTradeCount();
|
|
Long aLong = tradeOrderInfoService.queryTradeCount();
|
|
|
child.setCount(aLong);
|
|
child.setCount(aLong);
|
|
|
sum = sum + aLong;
|
|
sum = sum + aLong;
|
|
|
- total = total+ aLong;
|
|
|
|
|
|
|
+ total = total + aLong;
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
|
if (StrUtil.equals(child.getName(), "物流订单") && hasPerm(child.getChildren(), "logisticsOrder:add")) {
|
|
if (StrUtil.equals(child.getName(), "物流订单") && hasPerm(child.getChildren(), "logisticsOrder:add")) {
|
|
|
- Long aLong = transportRemoteService.queryLogisticsCount();
|
|
|
|
|
|
|
+ Long entId = LoginUserHolder.getEntId();
|
|
|
|
|
+ Long aLong = 0L;
|
|
|
|
|
+ List<EntTypeResDto> entTypeResDtoList = remoteBaseService.queryEntTypeById(entId);
|
|
|
|
|
+ if (CollectionUtils.isNotEmpty(entTypeResDtoList)) {
|
|
|
|
|
+ EntTypeResDto entTypeResDto = entTypeResDtoList.get(0);
|
|
|
|
|
+ Integer type = entTypeResDto.getType();
|
|
|
|
|
+ if (Objects.nonNull(type) && !Objects.equals(type, 1)) {
|
|
|
|
|
+ aLong = transportRemoteService.queryLogisticsCount(entId, type);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
child.setCount(aLong);
|
|
child.setCount(aLong);
|
|
|
sum = sum + aLong;
|
|
sum = sum + aLong;
|
|
|
- total = total+ aLong;
|
|
|
|
|
|
|
+ total = total + aLong;
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
|
if (StrUtil.equals(child.getName(), "物流运单") && hasPerm(child.getChildren(), "waybillList:verification")) {
|
|
if (StrUtil.equals(child.getName(), "物流运单") && hasPerm(child.getChildren(), "waybillList:verification")) {
|
|
|
Long aLong = transportRemoteService.queryWaybillCount();
|
|
Long aLong = transportRemoteService.queryWaybillCount();
|
|
|
child.setCount(aLong);
|
|
child.setCount(aLong);
|
|
|
sum = sum + aLong;
|
|
sum = sum + aLong;
|
|
|
- total = total+ aLong;
|
|
|
|
|
|
|
+ total = total + aLong;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -655,7 +668,7 @@ public class KwsMenuService {
|
|
|
findMenuTreeResVo.setCount(sum);
|
|
findMenuTreeResVo.setCount(sum);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- return new MenuTreeCountResVo(total,tree);
|
|
|
|
|
|
|
+ return new MenuTreeCountResVo(total, tree);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private boolean hasPerm(List<FindMenuTreeResVo> children, String perm) {
|
|
private boolean hasPerm(List<FindMenuTreeResVo> children, String perm) {
|