| | |
| | | @Autowired |
| | | private ICustomerService iCustomerService; |
| | | |
| | | @Autowired |
| | | private ICustomerReceiveService iCustomerReceiveService; |
| | | |
| | | @Autowired |
| | | private IDuoZhengService iDuoZhengService; |
| | | |
| | | @RequestMapping(value = "/getIndex1", method = RequestMethod.GET) |
| | | @ApiOperation(value = "获取首页数据") |
| | | public Result<Object> getIndex1() { |
| | |
| | | @ApiOperation(value = "获取配送分析详情") |
| | | public Result<Object> getYiHuDuoZheng() { |
| | | |
| | | List<Customer> list = iCustomerService.getYiHuDuoZheng(); |
| | | // List<Customer> list = iCustomerService.getYiHuDuoZheng(); |
| | | // Map<String,Object> map = new HashMap<>(); |
| | | // map.put("name","一户多证"); |
| | | // List<Object> childrens = new ArrayList<>(); |
| | | // for(Customer c:list){ |
| | | // Map<String,Object> map2 = new HashMap<>(); |
| | | // map2.put("name",c.getName()); |
| | | // |
| | | // List<Object> names = new ArrayList<>(); |
| | | // Map<String,Object> map3 = new HashMap<>(); |
| | | // map3.put("name",c.getCode()); |
| | | // names.add(map3); |
| | | // |
| | | // map2.put("children",names); |
| | | // |
| | | // childrens.add(map2); |
| | | // } |
| | | // map.put("children",childrens); |
| | | |
| | | |
| | | List<String> list = iDuoZhengService.getNames(); |
| | | Map<String,Object> map = new HashMap<>(); |
| | | map.put("name","一户多证"); |
| | | List<Object> childrens = new ArrayList<>(); |
| | | for(Customer c:list){ |
| | | for(String c:list){ |
| | | Map<String,Object> map2 = new HashMap<>(); |
| | | map2.put("name",c.getName()); |
| | | map2.put("name",c); |
| | | |
| | | List<Object> names = new ArrayList<>(); |
| | | Map<String,Object> map3 = new HashMap<>(); |
| | | map3.put("name",c.getCode()); |
| | | names.add(map3); |
| | | |
| | | QueryWrapper<DuoZheng> wp = new QueryWrapper<>(); |
| | | wp.eq("name",c); |
| | | List<DuoZheng> list1 = iDuoZhengService.list(wp); |
| | | for(DuoZheng dz:list1){ |
| | | Map<String,Object> map3 = new HashMap<>(); |
| | | map3.put("name",dz.getCustomerName()); |
| | | names.add(map3); |
| | | } |
| | | |
| | | map2.put("children",names); |
| | | |
| | | childrens.add(map2); |
| | | } |
| | | map.put("children",childrens); |
| | | |
| | | return new ResultUtil<Object>().setData(map); |
| | | } |
| | | } |