diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/PartnerOwnController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/PartnerOwnController.java index 43d8e8a9..44812240 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/PartnerOwnController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/PartnerOwnController.java @@ -96,6 +96,14 @@ public class PartnerOwnController extends BaseController { { return success(partnerList.chartInfoAmount(partnerId, unit)); } + /** + * 新检测线图 + */ + @GetMapping("/newChartInfoAmount") + public CommonResult newChartInfoAmount(String unit) + { + return success(partnerList.newChartInfoAmount(unit)); + } /**staticsTable1 * 检测数量折线图 */ @@ -104,6 +112,14 @@ public class PartnerOwnController extends BaseController { { return success(partnerList.chartLineInspectionNum(partnerId, unit)); } + /**staticsTable1 + * 新检测数量折线图 + */ + @GetMapping("/newChartLineInspectionNum") + public CommonResult newChartLineInspectionNum(String unit) + { + return success(partnerList.newChartLineInspectionNum(unit)); + } /** * 检测金额折线图 */ @@ -113,6 +129,15 @@ public class PartnerOwnController extends BaseController { return success(partnerList.chartLineInspectionAmount(partnerId, unit)); } + /** + * 新检测金额折线图 + */ + @GetMapping("/newChartLineInspectionAmount") + public CommonResult newChartLineInspectionAmount(String unit) + { + return success(partnerList.newChartLineInspectionAmount(unit)); + } + /** * 检测线图 */ @@ -121,6 +146,14 @@ public class PartnerOwnController extends BaseController { { return success(partnerList.chartInfoNum(partnerId, unit)); } + /** + * 新检测线图 + */ + @GetMapping("/newChartInfoNum") + public CommonResult newChartInfoNum(String unit) + { + return success(partnerList.newChartInfoNum( unit)); + } /** * 检测线图 @@ -130,6 +163,14 @@ public class PartnerOwnController extends BaseController { { return success(partnerList.chartInfoRatio(partnerId, unit)); } + /** + * 新检测线图 + */ + @GetMapping("/newChartInfoRatio") + public CommonResult newChartInfoRatio(String unit) + { + return success(partnerList.newChartInfoRatio(unit)); + } /** * 首页 订单信息 */ @@ -637,6 +678,11 @@ public class PartnerOwnController extends BaseController { ShopMallPartners partners = partnerList.shopInfo(); return success(partnerList.staticsTable1(partners.getPartnerId(),startTime,endTime)); } + //统计表格1 + @GetMapping("/newStaticsTable1") + public CommonResult newStaticsTable1(String startTime,String endTime) throws Exception { + return success(partnerList.newStaticsTable1(startTime,endTime)); + } //统计表格2 @GetMapping("/staticsTable2") @@ -644,12 +690,22 @@ public class PartnerOwnController extends BaseController { ShopMallPartners partners = partnerList.shopInfo(); return success(partnerList.staticsTable2(partners.getPartnerId(),startTime,endTime)); } + //新统计表格2 + @GetMapping("/newStaticsTable2") + public CommonResult newStaticsTable2(String startTime,String endTime) throws Exception { + return success(partnerList.newStaticsTable2(startTime,endTime)); + } //统计表格3 @GetMapping("/staticsTable3") public CommonResult staticsTable3(String startTime,String endTime) throws Exception { ShopMallPartners partners = partnerList.shopInfo(); return success(partnerList.staticsTable3(partners.getPartnerId(),startTime,endTime)); } + //新统计表格3 + @GetMapping("/newStaticsTable3") + public CommonResult newStaticsTable3(String startTime,String endTime) throws Exception { + return success(partnerList.newStaticsTable3(startTime,endTime)); + } //统计表格3 @GetMapping("/staticsTable3Detail") public CommonResult staticsTable3Detail(String startTime,String endTime,String remark) throws Exception { diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/AppInspectionPartnerMapper.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/AppInspectionPartnerMapper.java index a6b4266e..d3ecb3e2 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/AppInspectionPartnerMapper.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/AppInspectionPartnerMapper.java @@ -43,13 +43,20 @@ public interface AppInspectionPartnerMapper extends BaseMapper IPage getPickCarListOfWorker(Page page,@Param("workerId") Long workerId, @Param("phoneNum") String phoneNum); List chartInfoAmount(@Param("startTime") String startTime,@Param("endTime")String endTime,@Param("partnerId")Long partnerId); + List newChartInfoAmount(@Param("startTime") String startTime,@Param("endTime")String endTime); List chartInfoNum(@Param("startTime") String startTime,@Param("endTime")String endTime,@Param("partnerId")Long partnerId); + List newChartInfoNum(@Param("startTime") String startTime,@Param("endTime")String endTime); List> chartInfoRatio(@Param("startTime") String startTime, @Param("endTime")String endTime, @Param("partnerId")Long partnerId); + List> newChartInfoRatio(@Param("startTime") String startTime, @Param("endTime")String endTime); List partnerCategoryList(@Param("partnerId") Long partnerId); OrderInfo chartLineInspectionAmount(@Param("partnerId") Long partnerId,@Param("dateStr") String dateStr); + OrderInfo newChartLineInspectionAmount(@Param("dateStr") String dateStr); Map staticsTable1(@Param("partnerId") Long partnerId,@Param("startTime") String startTime,@Param("endTime") String endTime); + Map newStaticsTable1(@Param("startTime") String startTime,@Param("endTime") String endTime); Map staticsTable2(@Param("partnerId") Long partnerId,@Param("startTime") String startTime,@Param("endTime") String endTime); + Map newStaticsTable2(@Param("startTime") String startTime,@Param("endTime") String endTime); List> staticsTable3(@Param("partnerId") Long partnerId,@Param("startTime") String startTime,@Param("endTime") String endTime); + List> newStaticsTable3(@Param("startTime") String startTime,@Param("endTime") String endTime); List> staticsTable3Detail(@Param("partnerId") Long partnerId,@Param("startTime") String startTime,@Param("endTime") String endTime,@Param("remark") String remark); List> staticsTable4(@Param("partnerId") Long partnerId,@Param("startTime") String startTime,@Param("endTime") String endTime); List> staticsTable5(@Param("partnerId") Long partnerId,@Param("startTime") String startTime,@Param("endTime") String endTime); diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/AppInspectionPartnerService.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/AppInspectionPartnerService.java index af262fe6..b8877b1a 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/AppInspectionPartnerService.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/AppInspectionPartnerService.java @@ -38,11 +38,15 @@ public interface AppInspectionPartnerService extends IService void startOrEnd(Long partnerId); StatisticsInfo statisticsInfo(Long partnerId); JSONObject chartInfoAmount(Long partnerId,String unit); + JSONObject newChartInfoAmount(String unit); JSONObject chartLineInspectionNum(Long partnerId,String unit); + JSONObject newChartLineInspectionNum(String unit); JSONObject chartLineInspectionAmount(Long partnerId,String unit); JSONObject chartInfoNum(Long partnerId,String unit); + JSONObject newChartInfoNum(String unit); JSONObject chartInfoRatio(Long partnerId, String unit); + JSONObject newChartInfoRatio(String unit); List orderInfo(Long partnerId); List hotGoodsList(Long partnerId); void addGoods(ShopInspectionGoods goods) throws Exception; @@ -90,14 +94,17 @@ public interface AppInspectionPartnerService extends IService String workOrderView(Long inspectionId); List inspectionPostInfo(); Map staticsTable1(Long partnerId, String startTime, String endTime); + Map newStaticsTable1(String startTime, String endTime); Map staticsTable2(Long partnerId, String startTime, String endTime); + Map newStaticsTable2(String startTime, String endTime); List> staticsTable3(Long partnerId, String startTime, String endTime); + List> newStaticsTable3(String startTime, String endTime); List> staticsTable3Detail(Long partnerId, String startTime, String endTime,String remark); List> staticsTable4(Long partnerId, String startTime, String endTime); List> staticsTable5(Long partnerId, String startTime, String endTime); - - + //新检测金额折线图 + JSONObject newChartLineInspectionAmount(String unit); } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java index 965bdadf..02e8e5e6 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java @@ -336,6 +336,94 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl categories =new ArrayList<>(); + List series =new ArrayList<>(); + JSONObject seriesObject=new JSONObject(); + seriesObject.put("name","金额"); + List seriesObjectData =new ArrayList<>(); + //按照单位日期查询数据 + //横坐标获取当前商品上架的商品 + String startTime = null; + String endTime = null; + if (unit.equals("day")){ + String format = DateUtil.format(new Date(), "yyyy-MM-dd"); + startTime = format+" 00:00:00"; + endTime = format+" 23:59:59"; + } else if (unit.equals("week")){ + // 获取当前日期 + LocalDate currentDate = LocalDate.now(); + + // 获取当前周的开始日期 + LocalDate startOfWeek = currentDate.with(TemporalAdjusters.previousOrSame(java.time.DayOfWeek.MONDAY)); + + // 创建日期时间格式化器 + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); + + // 将日期格式化为字符串 + startTime = startOfWeek.atStartOfDay().format(formatter); + endTime = DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss"); + } else if (unit.equals("month")){ + // 获取当前日期 + LocalDate currentDate = LocalDate.now(); + + // 获取当前月的第一天 + LocalDate firstDayOfMonth = currentDate.with(TemporalAdjusters.firstDayOfMonth()); + // 创建日期时间格式化器 + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); + startTime = firstDayOfMonth.atStartOfDay().format(formatter); + endTime = DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss"); + } else if (unit.equals("year")){ + // 获取当前日期 + LocalDate currentDate = LocalDate.now(); + + // 获取当前年的第一天 + LocalDate firstDayOfYear = currentDate.withDayOfYear(1).withMonth(1); + // 创建日期时间格式化器 + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); + startTime = firstDayOfYear.atStartOfDay().format(formatter); + endTime = DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss"); + }else { + // 获取当前日期 + LocalDate currentDate = LocalDate.now(); + + // 获取当前周的开始日期 + LocalDate startOfWeek = currentDate.with(TemporalAdjusters.previousOrSame(java.time.DayOfWeek.MONDAY)); + + // 创建日期时间格式化器 + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); + + // 将日期格式化为字符串 + startTime = startOfWeek.atStartOfDay().format(formatter); + endTime = DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss"); + } + //获取商家现有商品 + LambdaQueryWrapper queryWrapper1 =new LambdaQueryWrapper<>(); +// queryWrapper1.eq(ShopInspectionGoods::getPartnerId,partnerId); + List list1 = goodsService.list(queryWrapper1); + List list = baseMapper.newChartInfoAmount(startTime,endTime); + //统计各个车型的价格 从高到低 + for (OrderInfo orderInfo : list) { + categories.add(orderInfo.getGoodsTitle().indexOf("(")>0?orderInfo.getGoodsTitle().substring(0,orderInfo.getGoodsTitle().indexOf("(")):orderInfo.getGoodsTitle()); + list1.removeIf(it->{ + return it.getTitle().equals(orderInfo.getGoodsTitle()); + }); + seriesObjectData.add(Double.valueOf(orderInfo.getRealPayMoney())/100); + } + categories.addAll(list1.stream().map(it->{ + return it.getTitle().indexOf("(")>0?it.getTitle().substring(0,it.getTitle().indexOf("(")):it.getTitle(); + }).collect(Collectors.toList())); + seriesObjectData.addAll(list1.stream().map(it->{ + return 0d; + }).collect(Collectors.toList())); + seriesObject.put("data",seriesObjectData); + series.add(seriesObject); + res.put("categories",categories); + res.put("series",series); + return res; + } @Override public JSONObject chartLineInspectionNum(Long partnerId, String unit) { @@ -388,6 +476,52 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl categories =new ArrayList<>(); + List series =new ArrayList<>(); + JSONObject seriesData1 =new JSONObject(); + seriesData1.put("name","总数量"); + List seriesData1List =new ArrayList<>(); + JSONObject seriesData2 =new JSONObject(); + List seriesData2List =new ArrayList<>(); + seriesData2.put("name","合格数"); +// JSONObject seriesData3 =new JSONObject(); +// List seriesData3List =new ArrayList<>(); +// seriesData3.put("name","环检次数"); + List dateList = new ArrayList<>(); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + for (int i = 0; i < 7; i++) { + //先获取最近七天的日期 + Date date = DateUtils.addDays(new Date(), -i); + String formatDate = sdf.format(date); + dateList.add(formatDate); + } + for (String date : dateList) { + categories.add(date); + LambdaQueryWrapper queryWrapper1 =new LambdaQueryWrapper<>(); + queryWrapper1.like(InspectionInfo::getStartTime,date); + Long sum = inspectionInfoService.count(queryWrapper1); + LambdaQueryWrapper queryWrapper2 =new LambdaQueryWrapper<>(); + queryWrapper2.like(InspectionInfo::getStartTime,date).eq(InspectionInfo::getIsPass,"1"); + Long passNum = inspectionInfoService.count(queryWrapper2); + + // Long noPassNum = baseMapper.dhjNum(partnerId,date); + seriesData1List.add(sum); + seriesData2List.add(passNum); +// seriesData3List.add(noPassNum); + } + seriesData1.put("data",seriesData1List); + seriesData2.put("data",seriesData2List); + // seriesData3.put("data",seriesData3List); + series.add(seriesData1); + series.add(seriesData2); + //series.add(seriesData3); + res.put("categories",categories); + res.put("series",series); + return res; + } @Override public JSONObject chartLineInspectionAmount(Long partnerId, String unit) { @@ -423,6 +557,36 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl categories =new ArrayList<>(); + List series =new ArrayList<>(); + JSONObject seriesData1 =new JSONObject(); + seriesData1.put("name","成交金额"); + List seriesData1List =new ArrayList<>(); + List dateList = new ArrayList<>(); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + for (int i = 0; i < 7; i++) { + //先获取最近七天的日期 + Date date = DateUtils.addDays(new Date(), -i); + String formatDate = sdf.format(date); + dateList.add(formatDate); + } + for (String date : dateList) { + categories.add(date); + OrderInfo one = baseMapper.newChartLineInspectionAmount(date); + Integer amount = Optional.ofNullable(one.getRealPayMoney()).orElse(0); + seriesData1List.add(amount/100L); + } + seriesData1.put("data",seriesData1List); + series.add(seriesData1); + res.put("categories",categories); + res.put("series",series); + return res; + } + @Override public JSONObject chartInfoNum(Long partnerId,String unit) { @@ -517,6 +681,93 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl categories =new ArrayList<>(); + List series =new ArrayList<>(); + JSONObject seriesObject=new JSONObject(); + seriesObject.put("name","数量"); + List seriesObjectData =new ArrayList<>(); + //按照单位日期查询数据 + //横坐标获取当前商品上架的商品 + String startTime ; + String endTime ; + if (unit.equals("day")){ + String format = DateUtil.format(new Date(), "yyyy-MM-dd"); + startTime = format+" 00:00:00"; + endTime = format+" 23:59:59"; + } else if (unit.equals("week")){ + // 获取当前日期 + LocalDate currentDate = LocalDate.now(); + + // 获取当前周的开始日期 + LocalDate startOfWeek = currentDate.with(TemporalAdjusters.previousOrSame(java.time.DayOfWeek.MONDAY)); + + // 创建日期时间格式化器 + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); + + // 将日期格式化为字符串 + startTime = startOfWeek.atStartOfDay().format(formatter); + endTime = DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss"); + } else if (unit.equals("month")){ + // 获取当前日期 + LocalDate currentDate = LocalDate.now(); + + // 获取当前月的第一天 + LocalDate firstDayOfMonth = currentDate.with(TemporalAdjusters.firstDayOfMonth()); + // 创建日期时间格式化器 + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); + startTime = firstDayOfMonth.atStartOfDay().format(formatter); + endTime = DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss"); + } else if (unit.equals("year")){ + // 获取当前日期 + LocalDate currentDate = LocalDate.now(); + + // 获取当前年的第一天 + LocalDate firstDayOfYear = currentDate.withDayOfYear(1).withMonth(1); + // 创建日期时间格式化器 + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); + startTime = firstDayOfYear.atStartOfDay().format(formatter); + endTime = DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss"); + }else { + // 获取当前日期 + LocalDate currentDate = LocalDate.now(); + + // 获取当前周的开始日期 + LocalDate startOfWeek = currentDate.with(TemporalAdjusters.previousOrSame(java.time.DayOfWeek.MONDAY)); + + // 创建日期时间格式化器 + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); + + // 将日期格式化为字符串 + startTime = startOfWeek.atStartOfDay().format(formatter); + endTime = DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss"); + } + //获取商家现有商品 + LambdaQueryWrapper queryWrapper1 =new LambdaQueryWrapper<>(); + List list1 = goodsService.list(queryWrapper1); + List list = baseMapper.newChartInfoNum(startTime,endTime); + //统计各个车型的价格 从高到低 + for (OrderInfo orderInfo : list) { + categories.add(orderInfo.getGoodsTitle().indexOf("(")>0?orderInfo.getGoodsTitle().substring(0,orderInfo.getGoodsTitle().indexOf("(")):orderInfo.getGoodsTitle()); + list1.removeIf(it->{ + return it.getTitle().equals(orderInfo.getGoodsTitle()); + }); + seriesObjectData.add(orderInfo.getRealPayNum()); + } + categories.addAll(list1.stream().map(it->{ + return it.getTitle().indexOf("(")>0?it.getTitle().substring(0,it.getTitle().indexOf("(")):it.getTitle(); + }).collect(Collectors.toList())); + seriesObjectData.addAll(list1.stream().map(it->{ + return 0; + }).collect(Collectors.toList())); + seriesObject.put("data",seriesObjectData); + series.add(seriesObject); + res.put("categories",categories); + res.put("series",series); + return res; + } @Override public JSONObject chartInfoRatio(Long partnerId, String unit) { @@ -616,6 +867,98 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl categories =new ArrayList<>(); + List series =new ArrayList<>(); + JSONObject seriesObject=new JSONObject(); + seriesObject.put("name","合格率"); + List seriesObjectData =new ArrayList<>(); + //按照单位日期查询数据 + //横坐标获取当前商品上架的商品 + String startTime ; + String endTime ; + if (unit.equals("day")){ + String format = DateUtil.format(new Date(), "yyyy-MM-dd"); + startTime = format+" 00:00:00"; + endTime = format+" 23:59:59"; + } else if (unit.equals("week")){ + // 获取当前日期 + LocalDate currentDate = LocalDate.now(); + + // 获取当前周的开始日期 + LocalDate startOfWeek = currentDate.with(TemporalAdjusters.previousOrSame(java.time.DayOfWeek.MONDAY)); + + // 创建日期时间格式化器 + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); + + // 将日期格式化为字符串 + startTime = startOfWeek.atStartOfDay().format(formatter); + endTime = DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss"); + } else if (unit.equals("month")){ + // 获取当前日期 + LocalDate currentDate = LocalDate.now(); + + // 获取当前月的第一天 + LocalDate firstDayOfMonth = currentDate.with(TemporalAdjusters.firstDayOfMonth()); + // 创建日期时间格式化器 + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); + startTime = firstDayOfMonth.atStartOfDay().format(formatter); + endTime = DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss"); + } else if (unit.equals("year")){ + // 获取当前日期 + LocalDate currentDate = LocalDate.now(); + + // 获取当前年的第一天 + LocalDate firstDayOfYear = currentDate.withDayOfYear(1).withMonth(1); + // 创建日期时间格式化器 + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); + startTime = firstDayOfYear.atStartOfDay().format(formatter); + endTime = DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss"); + }else { + // 获取当前日期 + LocalDate currentDate = LocalDate.now(); + + // 获取当前周的开始日期 + LocalDate startOfWeek = currentDate.with(TemporalAdjusters.previousOrSame(java.time.DayOfWeek.MONDAY)); + + // 创建日期时间格式化器 + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); + + // 将日期格式化为字符串 + startTime = startOfWeek.atStartOfDay().format(formatter); + endTime = DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss"); + } + //获取商家现有商品 + LambdaQueryWrapper queryWrapper1 =new LambdaQueryWrapper<>(); + List list1 = goodsService.list(queryWrapper1); + List> list = baseMapper.newChartInfoRatio(startTime,endTime); + //统计各个车型的价格 从高到低 + for (Map orderInfo : list) { + categories.add(orderInfo.get("goodsTitle").indexOf("(")>0?orderInfo.get("goodsTitle").substring(0,orderInfo.get("goodsTitle").indexOf("(")):orderInfo.get("goodsTitle")); + list1.removeIf(it->{ + return it.getTitle().equals(orderInfo.get("goodsTitle")); + }); + if (ObjectUtil.isEmpty(orderInfo.get("passRatio"))){ + seriesObjectData.add(0d); + }else { + seriesObjectData.add(Double.valueOf(String.valueOf(orderInfo.get("passRatio")))); + } + + } + categories.addAll(list1.stream().map(it->{ + return it.getTitle().indexOf("(")>0?it.getTitle().substring(0,it.getTitle().indexOf("(")):it.getTitle(); + }).collect(Collectors.toList())); + seriesObjectData.addAll(list1.stream().map(it->{ + return 0d; + }).collect(Collectors.toList())); + seriesObject.put("data",seriesObjectData); + series.add(seriesObject); + res.put("categories",categories); + res.put("series",series); + return res; + } @Override public List orderInfo(Long partnerId) { @@ -1436,6 +1779,17 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl map = baseMapper.staticsTable1(partnerId, startTime, endTime); return map; } + @Override + public Map newStaticsTable1(String startTime,String endTime) { + if (StringUtils.isEmpty(startTime)){ + startTime = DateUtil.format(new Date(), "yyyy-MM-dd"); + endTime = DateUtil.format(new Date(), "yyyy-MM-dd"); + } + startTime = startTime + " 00:00:00"; + endTime = endTime + " 23:59:59"; + Map map = baseMapper.newStaticsTable1(startTime, endTime); + return map; + } @Override public Map staticsTable2(Long partnerId, String startTime, String endTime) { @@ -1448,6 +1802,17 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl map = baseMapper.staticsTable2(partnerId, startTime, endTime); return map; } + @Override + public Map newStaticsTable2(String startTime, String endTime) { + if (StringUtils.isEmpty(startTime)){ + startTime = DateUtil.format(new Date(), "yyyy-MM-dd"); + endTime = DateUtil.format(new Date(), "yyyy-MM-dd"); + } + startTime = startTime + " 00:00:00"; + endTime = endTime + " 23:59:59"; + Map map = baseMapper.newStaticsTable2( startTime, endTime); + return map; + } @Override public List> staticsTable3(Long partnerId, String startTime, String endTime) { @@ -1460,6 +1825,17 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl> res = baseMapper.staticsTable3(partnerId, startTime, endTime); return res; } + @Override + public List> newStaticsTable3(String startTime, String endTime) { + if (StringUtils.isEmpty(startTime)){ + startTime = DateUtil.format(new Date(), "yyyy-MM-dd"); + endTime = DateUtil.format(new Date(), "yyyy-MM-dd"); + } + startTime = startTime + " 00:00:00"; + endTime = endTime + " 23:59:59"; + List> res = baseMapper.newStaticsTable3(startTime, endTime); + return res; + } @Override public List> staticsTable3Detail(Long partnerId, String startTime, String endTime, String remark) { diff --git a/dl-module-inspection/src/main/resources/mapper/inspection/AppInspectionPartnerMapper.xml b/dl-module-inspection/src/main/resources/mapper/inspection/AppInspectionPartnerMapper.xml index cf88c4c2..bfaedf75 100644 --- a/dl-module-inspection/src/main/resources/mapper/inspection/AppInspectionPartnerMapper.xml +++ b/dl-module-inspection/src/main/resources/mapper/inspection/AppInspectionPartnerMapper.xml @@ -277,6 +277,13 @@ FROM group by goods_id order by realPayMoney desc + + + + + + + +