Merge branch 'insp'
This commit is contained in:
commit
2f485a9152
@ -106,8 +106,8 @@ public class PartnerOwnController extends BaseController {
|
|||||||
* 检测线图
|
* 检测线图
|
||||||
*/
|
*/
|
||||||
@GetMapping("/chartInfoAmount")
|
@GetMapping("/chartInfoAmount")
|
||||||
public CommonResult chartInfoAmount(Long partnerId, String unit) {
|
public CommonResult chartInfoAmount(String startTime, String endTime) {
|
||||||
return success(partnerList.chartInfoAmount(partnerId, unit));
|
return success(partnerList.chartInfoAmount(startTime, endTime));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -47,6 +47,7 @@ public interface AppInspectionPartnerService extends IService<ShopMallPartners>
|
|||||||
StatisticsInfo statisticsInfo(Long partnerId);
|
StatisticsInfo statisticsInfo(Long partnerId);
|
||||||
|
|
||||||
JSONObject chartInfoAmount(Long partnerId, String unit);
|
JSONObject chartInfoAmount(Long partnerId, String unit);
|
||||||
|
JSONObject chartInfoAmount(String startTime, String endTime);
|
||||||
|
|
||||||
JSONObject newChartInfoAmount(String unit);
|
JSONObject newChartInfoAmount(String unit);
|
||||||
|
|
||||||
|
|||||||
@ -375,6 +375,48 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
|||||||
res.put("series", series);
|
res.put("series", series);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public JSONObject chartInfoAmount(String startTime, String endTime) {
|
||||||
|
startTime = startTime + " 00:00:00";
|
||||||
|
endTime = endTime + " 23:59:59";
|
||||||
|
// LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
||||||
|
// ShopMallPartners partners = baseMapper.selectById(partnerId);
|
||||||
|
// if (!partners.getUserId().equals(user.getId())){
|
||||||
|
// return null;
|
||||||
|
// }
|
||||||
|
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<>();
|
||||||
|
//按照单位日期查询数据
|
||||||
|
//横坐标获取当前商品上架的商品
|
||||||
|
//获取商家现有商品
|
||||||
|
List<ShopInspectionGoods> list1 = goodsService.list();
|
||||||
|
List<OrderInfo> list = baseMapper.chartInfoAmount(startTime, endTime, null);
|
||||||
|
//统计各个车型的价格 从高到低
|
||||||
|
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());
|
||||||
|
});
|
||||||
|
if (orderInfo.getRealPayMoney() != null) {
|
||||||
|
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 newChartInfoAmount(String unit) {
|
public JSONObject newChartInfoAmount(String unit) {
|
||||||
|
|||||||
@ -170,7 +170,7 @@ public class OrderController extends BaseController {
|
|||||||
// return success(new ArrayList<>());
|
// return success(new ArrayList<>());
|
||||||
// }
|
// }
|
||||||
Page<commentVo> page = new Page<>(pageNum, pageSize);
|
Page<commentVo> page = new Page<>(pageNum, pageSize);
|
||||||
IPage<commentVo> commentOrderList = orderInfoService.getCommentOrderList(page,tenantId);
|
IPage<commentVo> commentOrderList = orderInfoService.getCommentOrderList(page,null);
|
||||||
return success(commentOrderList);
|
return success(commentOrderList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -378,8 +378,7 @@ FROM
|
|||||||
<select id="chartInfoAmount" resultType="cn.iocoder.yudao.module.payment.entity.OrderInfo">
|
<select id="chartInfoAmount" resultType="cn.iocoder.yudao.module.payment.entity.OrderInfo">
|
||||||
select sum(pay_money) as realPayMoney,goods_title as goodsTitle from
|
select sum(pay_money) as realPayMoney,goods_title as goodsTitle from
|
||||||
order_info
|
order_info
|
||||||
where validation_time is not null and validation_time between #{startTime} and #{endTime}
|
where validation_time is not null and validation_time between #{startTime} and #{endTime} and deleted = 0
|
||||||
and partner_id = #{partnerId}
|
|
||||||
group by goods_id
|
group by goods_id
|
||||||
order by realPayMoney desc
|
order by realPayMoney desc
|
||||||
</select>
|
</select>
|
||||||
@ -587,14 +586,14 @@ FROM
|
|||||||
</select>
|
</select>
|
||||||
<select id="staticsTable5" resultType="java.util.Map">
|
<select id="staticsTable5" resultType="java.util.Map">
|
||||||
SELECT
|
SELECT
|
||||||
|
-- ROUND(IFNULL(SUM(CASE WHEN pay_type = 'sz' OR cashier_confirm != '1' OR pay_money IS NULL THEN goods_price ELSE 0 END),0)/ 100) AS theAmount
|
||||||
ROUND(IFNULL(SUM(oi.goods_price),0)/100) theAmount,su.nickname theName
|
ROUND(IFNULL(SUM(oi.goods_price),0)/100) theAmount,su.nickname theName
|
||||||
FROM
|
FROM
|
||||||
order_info oi
|
order_info oi
|
||||||
INNER JOIN inspection_info ii on oi.id = ii.inspection_order_id
|
INNER JOIN inspection_info ii on oi.id = ii.inspection_order_id
|
||||||
inner join system_users su on su.id = oi.user_id
|
inner join system_users su on su.id = oi.user_id
|
||||||
WHERE oi.partner_id ='19'
|
WHERE ii.create_time BETWEEN #{startTime} and #{endTime}
|
||||||
and ii.create_time BETWEEN #{startTime} and #{endTime}
|
and ( pay_type = 'sz' OR cashier_confirm != '1' OR pay_money IS NULL)
|
||||||
and oi.validation_time is null and ii.`status`='1' and ii.is_pass = '1'
|
|
||||||
GROUP BY su.id
|
GROUP BY su.id
|
||||||
order by theAmount desc
|
order by theAmount desc
|
||||||
</select>
|
</select>
|
||||||
@ -753,6 +752,12 @@ FROM
|
|||||||
AND ii.start_time IS NOT NULL AND ii.end_time IS NOT NULL
|
AND ii.start_time IS NOT NULL AND ii.end_time IS NOT NULL
|
||||||
AND TIMESTAMPDIFF(MINUTE, ii.start_time, ii.end_time) >= #{query.inspectionTime[0]}
|
AND TIMESTAMPDIFF(MINUTE, ii.start_time, ii.end_time) >= #{query.inspectionTime[0]}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="query.payStatus == 0">
|
||||||
|
and (oi.pay_money is null OR oi.pay_type = 'sz')
|
||||||
|
</if>
|
||||||
|
<if test="query.payStatus == 1">
|
||||||
|
and oi.pay_time is not null AND oi.pay_type != 'sz'
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
AND oi.deleted = '0'
|
AND oi.deleted = '0'
|
||||||
) t
|
) t
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user