| | |
| | | */ |
| | | @RequestMapping("/areaDetail") |
| | | public String areaDetail(String area,String areaId,Model model) { |
| | | // String[] split1 = areaId.split("/"); |
| | | // List<TRegion> tRegions = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", 0)); |
| | | // model.addAttribute("provinceList",tRegions); |
| | | //// List<Integer> provinceIds = tRegions.stream().map(TRegion::getId).collect(Collectors.toList()); |
| | | //// // 查询市 |
| | | //// List<TRegion> tRegions1 = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", split1[0])); |
| | | //// model.addAttribute("cityList",tRegions1); |
| | | //// |
| | | //// // 查询区 |
| | | //// List<Integer> cityIds = tRegions1.stream().map(TRegion::getId).collect(Collectors.toList()); |
| | | //// List<TRegion> tRegions2 = tRegionService.selectList(new EntityWrapper<TRegion>().in("parent_id", cityIds)); |
| | | //// model.addAttribute("districtList",tRegions2); |
| | | // |
| | | // if(StringUtils.hasLength(area) && StringUtils.hasLength(areaId)){ |
| | | // String[] split = area.split("/"); |
| | | // model.addAttribute("provinceName",split[0]); |
| | | // model.addAttribute("cityName",split[1]); |
| | | // if(split.length>2){ |
| | | // model.addAttribute("districtName",split[2]); |
| | | // }else { |
| | | // model.addAttribute("districtName",""); |
| | | // } |
| | | // |
| | | // model.addAttribute("provinceId",split1[0]); |
| | | // model.addAttribute("cityId",split1[1]); |
| | | // if(split1.length>2) { |
| | | // model.addAttribute("districtId", split1[2]); |
| | | // }else { |
| | | // model.addAttribute("districtId", ""); |
| | | // } |
| | | // |
| | | // List<TRegion> tRegions1 = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", split1[0])); |
| | | // model.addAttribute("cityList",tRegions1); |
| | | // |
| | | // // 查询区 |
| | | // List<TRegion> tRegions2 = tRegionService.selectList(new EntityWrapper<TRegion>().in("parent_id", split1[1])); |
| | | // model.addAttribute("districtList",tRegions2); |
| | | // }else { |
| | | // model.addAttribute("cityList",new ArrayList<>()); |
| | | // model.addAttribute("districtList",new ArrayList<>()); |
| | | // |
| | | // model.addAttribute("provinceName",""); |
| | | // model.addAttribute("cityName",""); |
| | | // model.addAttribute("districtName",""); |
| | | // |
| | | // model.addAttribute("provinceId",""); |
| | | // model.addAttribute("cityId",""); |
| | | // model.addAttribute("districtId", ""); |
| | | // } |
| | | String[] split1 = areaId.split("/"); |
| | | List<TRegion> tRegions = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", 0)); |
| | | model.addAttribute("province",tRegions); |
| | | List<Integer> provinceIds = tRegions.stream().map(TRegion::getId).collect(Collectors.toList()); |
| | | model.addAttribute("provinceList",tRegions); |
| | | // List<Integer> provinceIds = tRegions.stream().map(TRegion::getId).collect(Collectors.toList()); |
| | | // 查询市 |
| | | List<TRegion> tRegions1 = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", split1[0])); |
| | | model.addAttribute("cityList",tRegions1); |
| | |
| | | |
| | | String[] split1 = tAgent.getArea().split("/"); |
| | | |
| | | int count = tAgentService.selectCount(new EntityWrapper<TAgent>().eq("provinceName", split1[0]).eq("cityName",split1[1])); |
| | | // int count = tAgentService.selectCount(new EntityWrapper<TAgent>() |
| | | // .eq("provinceName", split1[0]) |
| | | // .eq("cityName",split1[1]) |
| | | // .eq("districtName",sp)); |
| | | int count = tAgentService.selectCount(new EntityWrapper<TAgent>() |
| | | .eq("merchantName", tAgent.getMerchantName())); |
| | | if(count>0){ |
| | | return new SuccessTip(500,"该代理商已存在!"); |
| | | } |
| | |
| | | model.addAttribute("roleType", roleType); |
| | | model.addAttribute("item", tAgent); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | model.addAttribute("socialCreditCodeExpires", roleType == 1 ? "" : sdf.format(tAgent.getSocialCreditCodeExpires())); |
| | | model.addAttribute("socialCreditCodeExpires", roleType == 1 ? "" :Objects.isNull(tAgent.getSocialCreditCodeExpires())?"": sdf.format(tAgent.getSocialCreditCodeExpires())); |
| | | model.addAttribute("certIdExpires", roleType == 1 ? "" : sdf.format(tAgent.getCertIdExpires())); |
| | | Wrapper<SettlementRecord> settlementRecordWrapper = new EntityWrapper<SettlementRecord>().eq("type", roleType == 1 ? 1 : 2); |
| | | if(roleType == 2){ |