Compare commits
No commits in common. "37f28fc2e30152fa653d3339a7b184227e69e606" and "e6cb2ba2767de71ee0aeebe1f26e4a067d0c8d89" have entirely different histories.
37f28fc2e3
...
e6cb2ba276
@ -96,14 +96,6 @@ public class PartnerOwnController extends BaseController {
|
|||||||
{
|
{
|
||||||
return success(partnerList.chartInfoAmount(partnerId, unit));
|
return success(partnerList.chartInfoAmount(partnerId, unit));
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 新检测线图
|
|
||||||
*/
|
|
||||||
@GetMapping("/newChartInfoAmount")
|
|
||||||
public CommonResult newChartInfoAmount(String unit)
|
|
||||||
{
|
|
||||||
return success(partnerList.newChartInfoAmount(unit));
|
|
||||||
}
|
|
||||||
/**staticsTable1
|
/**staticsTable1
|
||||||
* 检测数量折线图
|
* 检测数量折线图
|
||||||
*/
|
*/
|
||||||
@ -112,14 +104,6 @@ public class PartnerOwnController extends BaseController {
|
|||||||
{
|
{
|
||||||
return success(partnerList.chartLineInspectionNum(partnerId, unit));
|
return success(partnerList.chartLineInspectionNum(partnerId, unit));
|
||||||
}
|
}
|
||||||
/**staticsTable1
|
|
||||||
* 新检测数量折线图
|
|
||||||
*/
|
|
||||||
@GetMapping("/newChartLineInspectionNum")
|
|
||||||
public CommonResult newChartLineInspectionNum(String unit)
|
|
||||||
{
|
|
||||||
return success(partnerList.newChartLineInspectionNum(unit));
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* 检测金额折线图
|
* 检测金额折线图
|
||||||
*/
|
*/
|
||||||
@ -129,15 +113,6 @@ public class PartnerOwnController extends BaseController {
|
|||||||
return success(partnerList.chartLineInspectionAmount(partnerId, unit));
|
return success(partnerList.chartLineInspectionAmount(partnerId, unit));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 新检测金额折线图
|
|
||||||
*/
|
|
||||||
@GetMapping("/newChartLineInspectionAmount")
|
|
||||||
public CommonResult newChartLineInspectionAmount(String unit)
|
|
||||||
{
|
|
||||||
return success(partnerList.newChartLineInspectionAmount(unit));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检测线图
|
* 检测线图
|
||||||
*/
|
*/
|
||||||
@ -146,14 +121,6 @@ public class PartnerOwnController extends BaseController {
|
|||||||
{
|
{
|
||||||
return success(partnerList.chartInfoNum(partnerId, unit));
|
return success(partnerList.chartInfoNum(partnerId, unit));
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 新检测线图
|
|
||||||
*/
|
|
||||||
@GetMapping("/newChartInfoNum")
|
|
||||||
public CommonResult newChartInfoNum(String unit)
|
|
||||||
{
|
|
||||||
return success(partnerList.newChartInfoNum( unit));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检测线图
|
* 检测线图
|
||||||
@ -163,14 +130,6 @@ public class PartnerOwnController extends BaseController {
|
|||||||
{
|
{
|
||||||
return success(partnerList.chartInfoRatio(partnerId, unit));
|
return success(partnerList.chartInfoRatio(partnerId, unit));
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 新检测线图
|
|
||||||
*/
|
|
||||||
@GetMapping("/newChartInfoRatio")
|
|
||||||
public CommonResult newChartInfoRatio(String unit)
|
|
||||||
{
|
|
||||||
return success(partnerList.newChartInfoRatio(unit));
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* 首页 订单信息
|
* 首页 订单信息
|
||||||
*/
|
*/
|
||||||
@ -678,11 +637,6 @@ public class PartnerOwnController extends BaseController {
|
|||||||
ShopMallPartners partners = partnerList.shopInfo();
|
ShopMallPartners partners = partnerList.shopInfo();
|
||||||
return success(partnerList.staticsTable1(partners.getPartnerId(),startTime,endTime));
|
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
|
//统计表格2
|
||||||
@GetMapping("/staticsTable2")
|
@GetMapping("/staticsTable2")
|
||||||
@ -690,22 +644,12 @@ public class PartnerOwnController extends BaseController {
|
|||||||
ShopMallPartners partners = partnerList.shopInfo();
|
ShopMallPartners partners = partnerList.shopInfo();
|
||||||
return success(partnerList.staticsTable2(partners.getPartnerId(),startTime,endTime));
|
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
|
//统计表格3
|
||||||
@GetMapping("/staticsTable3")
|
@GetMapping("/staticsTable3")
|
||||||
public CommonResult staticsTable3(String startTime,String endTime) throws Exception {
|
public CommonResult staticsTable3(String startTime,String endTime) throws Exception {
|
||||||
ShopMallPartners partners = partnerList.shopInfo();
|
ShopMallPartners partners = partnerList.shopInfo();
|
||||||
return success(partnerList.staticsTable3(partners.getPartnerId(),startTime,endTime));
|
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
|
//统计表格3
|
||||||
@GetMapping("/staticsTable3Detail")
|
@GetMapping("/staticsTable3Detail")
|
||||||
public CommonResult staticsTable3Detail(String startTime,String endTime,String remark) throws Exception {
|
public CommonResult staticsTable3Detail(String startTime,String endTime,String remark) throws Exception {
|
||||||
|
|||||||
@ -43,20 +43,13 @@ public interface AppInspectionPartnerMapper extends BaseMapper<ShopMallPartners>
|
|||||||
IPage<InspectionPickCar> getPickCarListOfWorker(Page<InspectionPickCar> page,@Param("workerId") Long workerId, @Param("phoneNum") String phoneNum);
|
IPage<InspectionPickCar> getPickCarListOfWorker(Page<InspectionPickCar> page,@Param("workerId") Long workerId, @Param("phoneNum") String phoneNum);
|
||||||
|
|
||||||
List<OrderInfo> chartInfoAmount(@Param("startTime") String startTime,@Param("endTime")String endTime,@Param("partnerId")Long partnerId);
|
List<OrderInfo> chartInfoAmount(@Param("startTime") String startTime,@Param("endTime")String endTime,@Param("partnerId")Long partnerId);
|
||||||
List<OrderInfo> newChartInfoAmount(@Param("startTime") String startTime,@Param("endTime")String endTime);
|
|
||||||
List<OrderInfo> chartInfoNum(@Param("startTime") String startTime,@Param("endTime")String endTime,@Param("partnerId")Long partnerId);
|
List<OrderInfo> chartInfoNum(@Param("startTime") String startTime,@Param("endTime")String endTime,@Param("partnerId")Long partnerId);
|
||||||
List<OrderInfo> newChartInfoNum(@Param("startTime") String startTime,@Param("endTime")String endTime);
|
|
||||||
List<Map<String,String>> chartInfoRatio(@Param("startTime") String startTime, @Param("endTime")String endTime, @Param("partnerId")Long partnerId);
|
List<Map<String,String>> chartInfoRatio(@Param("startTime") String startTime, @Param("endTime")String endTime, @Param("partnerId")Long partnerId);
|
||||||
List<Map<String,String>> newChartInfoRatio(@Param("startTime") String startTime, @Param("endTime")String endTime);
|
|
||||||
List<ShopInspectionCategory> partnerCategoryList(@Param("partnerId") Long partnerId);
|
List<ShopInspectionCategory> partnerCategoryList(@Param("partnerId") Long partnerId);
|
||||||
OrderInfo chartLineInspectionAmount(@Param("partnerId") Long partnerId,@Param("dateStr") String dateStr);
|
OrderInfo chartLineInspectionAmount(@Param("partnerId") Long partnerId,@Param("dateStr") String dateStr);
|
||||||
OrderInfo newChartLineInspectionAmount(@Param("dateStr") String dateStr);
|
|
||||||
Map<String,Double> staticsTable1(@Param("partnerId") Long partnerId,@Param("startTime") String startTime,@Param("endTime") String endTime);
|
Map<String,Double> staticsTable1(@Param("partnerId") Long partnerId,@Param("startTime") String startTime,@Param("endTime") String endTime);
|
||||||
Map<String,Double> newStaticsTable1(@Param("startTime") String startTime,@Param("endTime") String endTime);
|
|
||||||
Map<String,Integer> staticsTable2(@Param("partnerId") Long partnerId,@Param("startTime") String startTime,@Param("endTime") String endTime);
|
Map<String,Integer> staticsTable2(@Param("partnerId") Long partnerId,@Param("startTime") String startTime,@Param("endTime") String endTime);
|
||||||
Map<String,Integer> newStaticsTable2(@Param("startTime") String startTime,@Param("endTime") String endTime);
|
|
||||||
List<Map<String,Object>> staticsTable3(@Param("partnerId") Long partnerId,@Param("startTime") String startTime,@Param("endTime") String endTime);
|
List<Map<String,Object>> staticsTable3(@Param("partnerId") Long partnerId,@Param("startTime") String startTime,@Param("endTime") String endTime);
|
||||||
List<Map<String,Object>> newStaticsTable3(@Param("startTime") String startTime,@Param("endTime") String endTime);
|
|
||||||
List<Map<String,Object>> staticsTable3Detail(@Param("partnerId") Long partnerId,@Param("startTime") String startTime,@Param("endTime") String endTime,@Param("remark") String remark);
|
List<Map<String,Object>> staticsTable3Detail(@Param("partnerId") Long partnerId,@Param("startTime") String startTime,@Param("endTime") String endTime,@Param("remark") String remark);
|
||||||
List<Map<String,Object>> staticsTable4(@Param("partnerId") Long partnerId,@Param("startTime") String startTime,@Param("endTime") String endTime);
|
List<Map<String,Object>> staticsTable4(@Param("partnerId") Long partnerId,@Param("startTime") String startTime,@Param("endTime") String endTime);
|
||||||
List<Map<String,Object>> staticsTable5(@Param("partnerId") Long partnerId,@Param("startTime") String startTime,@Param("endTime") String endTime);
|
List<Map<String,Object>> staticsTable5(@Param("partnerId") Long partnerId,@Param("startTime") String startTime,@Param("endTime") String endTime);
|
||||||
|
|||||||
@ -38,15 +38,11 @@ public interface AppInspectionPartnerService extends IService<ShopMallPartners>
|
|||||||
void startOrEnd(Long partnerId);
|
void startOrEnd(Long partnerId);
|
||||||
StatisticsInfo statisticsInfo(Long partnerId);
|
StatisticsInfo statisticsInfo(Long partnerId);
|
||||||
JSONObject chartInfoAmount(Long partnerId,String unit);
|
JSONObject chartInfoAmount(Long partnerId,String unit);
|
||||||
JSONObject newChartInfoAmount(String unit);
|
|
||||||
JSONObject chartLineInspectionNum(Long partnerId,String unit);
|
JSONObject chartLineInspectionNum(Long partnerId,String unit);
|
||||||
JSONObject newChartLineInspectionNum(String unit);
|
|
||||||
JSONObject chartLineInspectionAmount(Long partnerId,String unit);
|
JSONObject chartLineInspectionAmount(Long partnerId,String unit);
|
||||||
|
|
||||||
JSONObject chartInfoNum(Long partnerId,String unit);
|
JSONObject chartInfoNum(Long partnerId,String unit);
|
||||||
JSONObject newChartInfoNum(String unit);
|
|
||||||
JSONObject chartInfoRatio(Long partnerId, String unit);
|
JSONObject chartInfoRatio(Long partnerId, String unit);
|
||||||
JSONObject newChartInfoRatio(String unit);
|
|
||||||
List<OrderInfo> orderInfo(Long partnerId);
|
List<OrderInfo> orderInfo(Long partnerId);
|
||||||
List<HotGoodsVo> hotGoodsList(Long partnerId);
|
List<HotGoodsVo> hotGoodsList(Long partnerId);
|
||||||
void addGoods(ShopInspectionGoods goods) throws Exception;
|
void addGoods(ShopInspectionGoods goods) throws Exception;
|
||||||
@ -94,17 +90,14 @@ public interface AppInspectionPartnerService extends IService<ShopMallPartners>
|
|||||||
String workOrderView(Long inspectionId);
|
String workOrderView(Long inspectionId);
|
||||||
List<PostDO> inspectionPostInfo();
|
List<PostDO> inspectionPostInfo();
|
||||||
Map<String,Double> staticsTable1(Long partnerId, String startTime, String endTime);
|
Map<String,Double> staticsTable1(Long partnerId, String startTime, String endTime);
|
||||||
Map<String,Double> newStaticsTable1(String startTime, String endTime);
|
|
||||||
Map<String,Integer> staticsTable2(Long partnerId, String startTime, String endTime);
|
Map<String,Integer> staticsTable2(Long partnerId, String startTime, String endTime);
|
||||||
Map<String,Integer> newStaticsTable2(String startTime, String endTime);
|
|
||||||
List<Map<String,Object>> staticsTable3(Long partnerId, String startTime, String endTime);
|
List<Map<String,Object>> staticsTable3(Long partnerId, String startTime, String endTime);
|
||||||
List<Map<String,Object>> newStaticsTable3(String startTime, String endTime);
|
|
||||||
List<Map<String,Object>> staticsTable3Detail(Long partnerId, String startTime, String endTime,String remark);
|
List<Map<String,Object>> staticsTable3Detail(Long partnerId, String startTime, String endTime,String remark);
|
||||||
|
|
||||||
List<Map<String,Object>> staticsTable4(Long partnerId, String startTime, String endTime);
|
List<Map<String,Object>> staticsTable4(Long partnerId, String startTime, String endTime);
|
||||||
List<Map<String,Object>> staticsTable5(Long partnerId, String startTime, String endTime);
|
List<Map<String,Object>> staticsTable5(Long partnerId, String startTime, String endTime);
|
||||||
|
|
||||||
|
|
||||||
//新检测金额折线图
|
|
||||||
JSONObject newChartLineInspectionAmount(String unit);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -336,94 +336,6 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
|||||||
res.put("series",series);
|
res.put("series",series);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@Override
|
|
||||||
public JSONObject newChartInfoAmount(String unit) {
|
|
||||||
JSONObject res =new JSONObject();
|
|
||||||
List<String> categories =new ArrayList<>();
|
|
||||||
List<JSONObject> series =new ArrayList<>();
|
|
||||||
JSONObject seriesObject=new JSONObject();
|
|
||||||
seriesObject.put("name","金额");
|
|
||||||
List<Double> 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<ShopInspectionGoods> queryWrapper1 =new LambdaQueryWrapper<>();
|
|
||||||
// queryWrapper1.eq(ShopInspectionGoods::getPartnerId,partnerId);
|
|
||||||
List<ShopInspectionGoods> list1 = goodsService.list(queryWrapper1);
|
|
||||||
List<OrderInfo> 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
|
@Override
|
||||||
public JSONObject chartLineInspectionNum(Long partnerId, String unit) {
|
public JSONObject chartLineInspectionNum(Long partnerId, String unit) {
|
||||||
@ -476,52 +388,6 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
|||||||
res.put("series",series);
|
res.put("series",series);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@Override
|
|
||||||
public JSONObject newChartLineInspectionNum(String unit) {
|
|
||||||
JSONObject res = new JSONObject();
|
|
||||||
List<String> categories =new ArrayList<>();
|
|
||||||
List<JSONObject> series =new ArrayList<>();
|
|
||||||
JSONObject seriesData1 =new JSONObject();
|
|
||||||
seriesData1.put("name","总数量");
|
|
||||||
List<Long> seriesData1List =new ArrayList<>();
|
|
||||||
JSONObject seriesData2 =new JSONObject();
|
|
||||||
List<Long> seriesData2List =new ArrayList<>();
|
|
||||||
seriesData2.put("name","合格数");
|
|
||||||
// JSONObject seriesData3 =new JSONObject();
|
|
||||||
// List<Long> seriesData3List =new ArrayList<>();
|
|
||||||
// seriesData3.put("name","环检次数");
|
|
||||||
List<String> 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<InspectionInfo> queryWrapper1 =new LambdaQueryWrapper<>();
|
|
||||||
queryWrapper1.like(InspectionInfo::getStartTime,date);
|
|
||||||
Long sum = inspectionInfoService.count(queryWrapper1);
|
|
||||||
LambdaQueryWrapper<InspectionInfo> 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
|
@Override
|
||||||
public JSONObject chartLineInspectionAmount(Long partnerId, String unit) {
|
public JSONObject chartLineInspectionAmount(Long partnerId, String unit) {
|
||||||
@ -557,36 +423,6 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public JSONObject newChartLineInspectionAmount(String unit) {
|
|
||||||
// LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
|
||||||
JSONObject res = new JSONObject();
|
|
||||||
List<String> categories =new ArrayList<>();
|
|
||||||
List<JSONObject> series =new ArrayList<>();
|
|
||||||
JSONObject seriesData1 =new JSONObject();
|
|
||||||
seriesData1.put("name","成交金额");
|
|
||||||
List<Long> seriesData1List =new ArrayList<>();
|
|
||||||
List<String> 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
|
@Override
|
||||||
public JSONObject chartInfoNum(Long partnerId,String unit) {
|
public JSONObject chartInfoNum(Long partnerId,String unit) {
|
||||||
@ -681,93 +517,6 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
|||||||
res.put("series",series);
|
res.put("series",series);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@Override
|
|
||||||
public JSONObject newChartInfoNum(String unit) {
|
|
||||||
JSONObject res =new JSONObject();
|
|
||||||
List<String> categories =new ArrayList<>();
|
|
||||||
List<JSONObject> series =new ArrayList<>();
|
|
||||||
JSONObject seriesObject=new JSONObject();
|
|
||||||
seriesObject.put("name","数量");
|
|
||||||
List<Integer> 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<ShopInspectionGoods> queryWrapper1 =new LambdaQueryWrapper<>();
|
|
||||||
List<ShopInspectionGoods> list1 = goodsService.list(queryWrapper1);
|
|
||||||
List<OrderInfo> 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
|
@Override
|
||||||
public JSONObject chartInfoRatio(Long partnerId, String unit) {
|
public JSONObject chartInfoRatio(Long partnerId, String unit) {
|
||||||
@ -867,98 +616,6 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
|||||||
res.put("series",series);
|
res.put("series",series);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@Override
|
|
||||||
public JSONObject newChartInfoRatio(String unit) {
|
|
||||||
JSONObject res =new JSONObject();
|
|
||||||
List<String> categories =new ArrayList<>();
|
|
||||||
List<JSONObject> series =new ArrayList<>();
|
|
||||||
JSONObject seriesObject=new JSONObject();
|
|
||||||
seriesObject.put("name","合格率");
|
|
||||||
List<Double> 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<ShopInspectionGoods> queryWrapper1 =new LambdaQueryWrapper<>();
|
|
||||||
List<ShopInspectionGoods> list1 = goodsService.list(queryWrapper1);
|
|
||||||
List<Map<String,String>> list = baseMapper.newChartInfoRatio(startTime,endTime);
|
|
||||||
//统计各个车型的价格 从高到低
|
|
||||||
for (Map<String,String> 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
|
@Override
|
||||||
public List<OrderInfo> orderInfo(Long partnerId) {
|
public List<OrderInfo> orderInfo(Long partnerId) {
|
||||||
@ -1779,17 +1436,6 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
|||||||
Map<String, Double> map = baseMapper.staticsTable1(partnerId, startTime, endTime);
|
Map<String, Double> map = baseMapper.staticsTable1(partnerId, startTime, endTime);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
@Override
|
|
||||||
public Map<String,Double> 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<String, Double> map = baseMapper.newStaticsTable1(startTime, endTime);
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Integer> staticsTable2(Long partnerId, String startTime, String endTime) {
|
public Map<String, Integer> staticsTable2(Long partnerId, String startTime, String endTime) {
|
||||||
@ -1802,17 +1448,6 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
|||||||
Map<String, Integer> map = baseMapper.staticsTable2(partnerId, startTime, endTime);
|
Map<String, Integer> map = baseMapper.staticsTable2(partnerId, startTime, endTime);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
@Override
|
|
||||||
public Map<String, Integer> 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<String, Integer> map = baseMapper.newStaticsTable2( startTime, endTime);
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Map<String, Object>> staticsTable3(Long partnerId, String startTime, String endTime) {
|
public List<Map<String, Object>> staticsTable3(Long partnerId, String startTime, String endTime) {
|
||||||
@ -1825,17 +1460,6 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
|||||||
List<Map<String, Object>> res = baseMapper.staticsTable3(partnerId, startTime, endTime);
|
List<Map<String, Object>> res = baseMapper.staticsTable3(partnerId, startTime, endTime);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@Override
|
|
||||||
public List<Map<String, Object>> 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<Map<String, Object>> res = baseMapper.newStaticsTable3(startTime, endTime);
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Map<String, Object>> staticsTable3Detail(Long partnerId, String startTime, String endTime, String remark) {
|
public List<Map<String, Object>> staticsTable3Detail(Long partnerId, String startTime, String endTime, String remark) {
|
||||||
|
|||||||
@ -277,13 +277,6 @@ FROM
|
|||||||
group by goods_id
|
group by goods_id
|
||||||
order by realPayMoney desc
|
order by realPayMoney desc
|
||||||
</select>
|
</select>
|
||||||
<select id="newChartInfoAmount" resultType="cn.iocoder.yudao.module.payment.entity.OrderInfo">
|
|
||||||
select sum(pay_money) as realPayMoney,goods_title as goodsTitle from
|
|
||||||
order_info
|
|
||||||
where validation_time is not null and validation_time between #{startTime} and #{endTime}
|
|
||||||
group by goods_id
|
|
||||||
order by realPayMoney desc
|
|
||||||
</select>
|
|
||||||
<select id="chartInfoNum" resultType="cn.iocoder.yudao.module.payment.entity.OrderInfo">
|
<select id="chartInfoNum" resultType="cn.iocoder.yudao.module.payment.entity.OrderInfo">
|
||||||
select count(1) as realPayNum,goods_title as goodsTitle from
|
select count(1) as realPayNum,goods_title as goodsTitle from
|
||||||
order_info
|
order_info
|
||||||
@ -292,13 +285,6 @@ FROM
|
|||||||
group by goods_id
|
group by goods_id
|
||||||
order by realPayNum desc
|
order by realPayNum desc
|
||||||
</select>
|
</select>
|
||||||
<select id="newChartInfoNum" resultType="cn.iocoder.yudao.module.payment.entity.OrderInfo">
|
|
||||||
select count(1) as realPayNum,goods_title as goodsTitle from
|
|
||||||
order_info
|
|
||||||
where validation_time is not null and validation_time between #{startTime} and #{endTime}
|
|
||||||
group by goods_id
|
|
||||||
order by realPayNum desc
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="chartInfoRatio" resultType="java.util.Map">
|
<select id="chartInfoRatio" resultType="java.util.Map">
|
||||||
SELECT
|
SELECT
|
||||||
@ -311,17 +297,6 @@ FROM
|
|||||||
GROUP BY oi.goods_title
|
GROUP BY oi.goods_title
|
||||||
order by passRatio desc
|
order by passRatio desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="newChartInfoRatio" resultType="java.util.Map">
|
|
||||||
SELECT
|
|
||||||
ROUND((SUM(ins.is_pass='1')/SUM(1))*100,2) as passRatio,oi.goods_title as goodsTitle
|
|
||||||
FROM
|
|
||||||
inspection_info ins
|
|
||||||
inner join order_info oi on oi.id = ins.inspection_order_id
|
|
||||||
WHERE ins.create_time between #{startTime} and #{endTime}
|
|
||||||
GROUP BY oi.goods_title
|
|
||||||
order by passRatio desc
|
|
||||||
</select>
|
|
||||||
<select id="partnerCategoryList" resultType="cn.iocoder.yudao.module.inspection.entity.ShopInspectionCategory">
|
<select id="partnerCategoryList" resultType="cn.iocoder.yudao.module.inspection.entity.ShopInspectionCategory">
|
||||||
SELECT
|
SELECT
|
||||||
cate.*
|
cate.*
|
||||||
@ -342,14 +317,6 @@ FROM
|
|||||||
INNER JOIN inspection_info ii on oi.id = ii.inspection_order_id
|
INNER JOIN inspection_info ii on oi.id = ii.inspection_order_id
|
||||||
WHERE oi.partner_id = #{partnerId} and ii.create_time like concat(#{dateStr},'%') and ii.`status`='1' and ii.is_pass = '1' and oi.validation_time is not null
|
WHERE oi.partner_id = #{partnerId} and ii.create_time like concat(#{dateStr},'%') and ii.`status`='1' and ii.is_pass = '1' and oi.validation_time is not null
|
||||||
</select>
|
</select>
|
||||||
<select id="newChartLineInspectionAmount" resultType="cn.iocoder.yudao.module.payment.entity.OrderInfo">
|
|
||||||
SELECT
|
|
||||||
IFNULL(SUM(oi.pay_money),0)as realPayMoney
|
|
||||||
FROM
|
|
||||||
order_info oi
|
|
||||||
INNER JOIN inspection_info ii on oi.id = ii.inspection_order_id
|
|
||||||
WHERE ii.create_time like concat(#{dateStr},'%') and ii.`status`='1' and ii.is_pass = '1' and oi.validation_time is not null
|
|
||||||
</select>
|
|
||||||
<select id="staticsTable1" resultType="java.util.Map">
|
<select id="staticsTable1" resultType="java.util.Map">
|
||||||
SELECT
|
SELECT
|
||||||
ROUND(IFNULL(SUM(oi.goods_price),0)/100) gsAmount,
|
ROUND(IFNULL(SUM(oi.goods_price),0)/100) gsAmount,
|
||||||
@ -362,17 +329,6 @@ FROM
|
|||||||
and (ii.`status`='1' and ii.is_pass = '1' or ii.`status`='0')
|
and (ii.`status`='1' and ii.is_pass = '1' or ii.`status`='0')
|
||||||
and ii.create_time BETWEEN #{startTime} and #{endTime}
|
and ii.create_time BETWEEN #{startTime} and #{endTime}
|
||||||
</select>
|
</select>
|
||||||
<select id="newStaticsTable1" resultType="java.util.Map">
|
|
||||||
SELECT
|
|
||||||
ROUND(IFNULL(SUM(oi.goods_price),0)/100) gsAmount,
|
|
||||||
ROUND(IFNULL(SUM(case when ii.`status`='1' and ii.is_pass = '1' then oi.pay_money else 0 end)/100,0)) ysAmount,
|
|
||||||
ROUND(IFNULL(SUM(case when ii.`status`='1' and ii.is_pass = '1' and oi.validation_time is not null then oi.pay_money else 0 end)/100,0)) yjsAmount
|
|
||||||
FROM
|
|
||||||
order_info oi
|
|
||||||
INNER JOIN inspection_info ii on oi.id = ii.inspection_order_id
|
|
||||||
WHERE (ii.`status`='1' and ii.is_pass = '1' or ii.`status`='0')
|
|
||||||
and ii.create_time BETWEEN #{startTime} and #{endTime}
|
|
||||||
</select>
|
|
||||||
<select id="staticsTable2" resultType="java.util.Map">
|
<select id="staticsTable2" resultType="java.util.Map">
|
||||||
SELECT
|
SELECT
|
||||||
count(1) allNum,
|
count(1) allNum,
|
||||||
@ -383,15 +339,6 @@ FROM
|
|||||||
WHERE ii.partner_id =#{partnerId}
|
WHERE ii.partner_id =#{partnerId}
|
||||||
and ii.create_time BETWEEN #{startTime} and #{endTime}
|
and ii.create_time BETWEEN #{startTime} and #{endTime}
|
||||||
</select>
|
</select>
|
||||||
<select id="newStaticsTable2" resultType="java.util.Map">
|
|
||||||
SELECT
|
|
||||||
count(1) allNum,
|
|
||||||
IFNULL(SUM(ii.status='0'),0) jxzNum,
|
|
||||||
IFNULL(SUM(ii.status='1'),0) ywcNum
|
|
||||||
FROM
|
|
||||||
inspection_info ii
|
|
||||||
WHERE ii.create_time BETWEEN #{startTime} and #{endTime}
|
|
||||||
</select>
|
|
||||||
<select id="staticsTable3" resultType="java.util.Map">
|
<select id="staticsTable3" resultType="java.util.Map">
|
||||||
SELECT
|
SELECT
|
||||||
ii.customer_source customerSource,IFNULL(sdd.remark,'未知类别') remark,count(1) theNum, ROUND(IFNULL(SUM(oi.goods_price),0)/100) theAmount
|
ii.customer_source customerSource,IFNULL(sdd.remark,'未知类别') remark,count(1) theNum, ROUND(IFNULL(SUM(oi.goods_price),0)/100) theAmount
|
||||||
@ -405,18 +352,6 @@ FROM
|
|||||||
having count(1)>0
|
having count(1)>0
|
||||||
order by theNum desc
|
order by theNum desc
|
||||||
</select>
|
</select>
|
||||||
<select id="newStaticsTable3" resultType="java.util.Map">
|
|
||||||
SELECT
|
|
||||||
ii.customer_source customerSource,IFNULL(sdd.remark,'未知类别') remark,count(1) theNum, ROUND(IFNULL(SUM(oi.goods_price),0)/100) theAmount
|
|
||||||
FROM
|
|
||||||
order_info oi
|
|
||||||
INNER JOIN inspection_info ii on oi.id = ii.inspection_order_id
|
|
||||||
left join system_dict_data sdd on sdd.value = ii.customer_source and sdd.dict_type = concat('customer_source-',#{partnerId})
|
|
||||||
WHERE ii.create_time BETWEEN #{startTime} and #{endTime}
|
|
||||||
GROUP BY sdd.remark
|
|
||||||
having count(1)>0
|
|
||||||
order by theNum desc
|
|
||||||
</select>
|
|
||||||
<select id="staticsTable3Detail" resultType="java.util.Map">
|
<select id="staticsTable3Detail" resultType="java.util.Map">
|
||||||
SELECT
|
SELECT
|
||||||
ii.customer_source customerSource,oi.goods_title as goodsTitle,IFNULL(sdd.remark,'未知类别') remark,count(1) theNum, ROUND(IFNULL(SUM(oi.goods_price),0)/100) theAmount
|
ii.customer_source customerSource,oi.goods_title as goodsTitle,IFNULL(sdd.remark,'未知类别') remark,count(1) theNum, ROUND(IFNULL(SUM(oi.goods_price),0)/100) theAmount
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user