|
@@ -92,6 +92,8 @@ public class PublicServiceImpl implements PublicService {
|
|
|
LbsAmapService lbsAmapService;
|
|
|
@Autowired
|
|
|
AdminWebsitService adminWebsitService;
|
|
|
+ @Resource
|
|
|
+ BelongcompanyService belongcompanyService;
|
|
|
|
|
|
|
|
|
private static String ALISMS_RESERVE = "尊敬的客户,您好!师傅上门时间为%s,服务网点电话:%s,如本次上门时间与您的安排有冲突,请拨打服务网点电话联系,我们将竭诚为您服务!";
|
|
@@ -1205,13 +1207,40 @@ public class PublicServiceImpl implements PublicService {
|
|
|
return resultData;
|
|
|
}
|
|
|
|
|
|
+ // 多网点里找下级网点
|
|
|
+ LinkedHashSet<String> websitNumbers = new LinkedHashSet<>();
|
|
|
+ aws.forEach(o->{
|
|
|
+ websitNumbers.add(o.getWebsitNumber());
|
|
|
+ });
|
|
|
+ List<AdminWebsit> awst = adminWebsitService.lambdaQuery()
|
|
|
+ .in(AdminWebsit::getParentId,websitNumbers)
|
|
|
+ .list();
|
|
|
+
|
|
|
// 多网点时用大类过滤
|
|
|
- AdminWebsit adminWebsit = websitCategoryZX(aws, order.getMainId(), tid,order.getOrderType());
|
|
|
+ AdminWebsit adminWebsit = websitCategoryZX(awst, order.getMainId(), tid,order.getOrderType());
|
|
|
resultData.setWebsitId(adminWebsit.getWebsitNumber());
|
|
|
resultData.setWdmc(adminWebsit.getName());
|
|
|
return resultData;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Belongcompany getBelongCompany(String bcp) {
|
|
|
+ Belongcompany bcs = null;
|
|
|
+
|
|
|
+ if (redis.hasKey(RedisConstant.CENTER_CODE + bcp)) {
|
|
|
+ bcs = (Belongcompany) redis.get(RedisConstant.CENTER_CODE + bcp);
|
|
|
+ } else {
|
|
|
+ bcs = belongcompanyService.lambdaQuery()
|
|
|
+ .eq(Belongcompany::getBelongCompanyProfession,bcp).one();
|
|
|
+
|
|
|
+ if (bcs != null){
|
|
|
+ redis.set(RedisConstant.CENTER_CODE + bcp, bcs,RedisConstant.CENTER_CODE_TIME_LENGTH);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return bcs;
|
|
|
+ }
|
|
|
+
|
|
|
private void setLocationByAddress(OrderBase orderBase) {
|
|
|
if (StringUtils.isEmpty(orderBase.getLng()) || StringUtils.isEmpty(orderBase.getLat())) {
|
|
|
String add = "";
|
|
@@ -1580,8 +1609,7 @@ public class PublicServiceImpl implements PublicService {
|
|
|
}
|
|
|
|
|
|
// 平台网点服务的大类信息
|
|
|
- private AdminWebsit websitCategoryZX(List<AdminWebsit> aws,
|
|
|
- String categoryId,long tid,String type){
|
|
|
+ private AdminWebsit websitCategoryZX(List<AdminWebsit> aws,String categoryId,long tid,String type){
|
|
|
String wd="";
|
|
|
String wdh="";
|
|
|
List<AdminWebsit> wosn = new ArrayList<>();
|