更新10.12
This commit is contained in:
parent
e38565cb38
commit
2e641eb0b3
@ -65,28 +65,28 @@
|
||||
<div class="sian"></div>
|
||||
<div>油品销售金额(元)/交易笔数</div>
|
||||
</div>
|
||||
<div class="num-size">{{ storeAmount.storeTotal || 0 }}/{{ storeAmount.refundTotal || 0 }}</div>
|
||||
<div class="num-size">{{ storeAmount.oilAmount || 0 }}/{{ storeAmount.oilNum || 0 }}</div>
|
||||
</div>
|
||||
<div class="k-box">
|
||||
<div class="d-s" style="font-size: 12px;color: #999999;">
|
||||
<div class="sian"></div>
|
||||
<div>会员充值金额(元)/充值笔数</div>
|
||||
</div>
|
||||
<div class="num-size">{{ storeAmount.tradeAmount || 0 }}/{{ storeAmount.tradeTotal || 0 }}</div>
|
||||
<div class="num-size">{{ storeAmount.userRechargeAmount || 0 }}/{{ storeAmount.userRechargeNum || 0 }}</div>
|
||||
</div>
|
||||
<div class="k-box">
|
||||
<div class="d-s" style="font-size: 12px;color: #999999;">
|
||||
<div class="sian"></div>
|
||||
<div>便利店销售金额(元)/交易笔数</div>
|
||||
</div>
|
||||
<div class="num-size">{{ storeAmount.refundAmount || 0 }}/{{ storeAmount.refundTotal || 0 }}</div>
|
||||
<div class="num-size">{{ storeAmount.minimartAmount || 0 }}/{{ storeAmount.minimartNum || 0 }}</div>
|
||||
</div>
|
||||
<div class="k-box">
|
||||
<div class="d-s" style="font-size: 12px;color: #999999;">
|
||||
<div class="sian"></div>
|
||||
<div>积分商城销售金额(元)/兑换笔数</div>
|
||||
</div>
|
||||
<div class="num-size">{{ storeAmount.averagePrice || 0 }}/{{ storeAmount.refundTotal || 0 }}</div>
|
||||
<div class="num-size">{{ storeAmount.pointMallAmount || 0 }}/{{ storeAmount.pointMallNum || 0 }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hui-hang"></div>
|
||||
|
@ -138,4 +138,6 @@ public interface OilOrderMapper extends BaseMapper<OilOrder> {
|
||||
List<OilOrderVo> selectOilsCount(@Param("oilOrderVo") OilOrderVo oilOrderVo,@Param("storeIds") List<Integer> storeIds);
|
||||
|
||||
OilOrderVo getInfoByOrderNo(String orderNo);
|
||||
|
||||
Double selectSumMoeny(@Param("orderNos") List<String> orderNos);
|
||||
}
|
||||
|
@ -797,4 +797,11 @@
|
||||
</where>
|
||||
limit 1
|
||||
</select>
|
||||
<select id="selectSumMoeny" resultType="java.lang.Double">
|
||||
select sum(pay_amount) from oil_order
|
||||
where order_no in
|
||||
<foreach collection="orderNos" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
</mapper>
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.fuint.business.order.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
@ -1642,8 +1643,54 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
||||
oilAmount = Double.valueOf(sumAndNum.get("payMoney").toString());
|
||||
oilNum = Integer.valueOf(sumAndNum.get("allNum").toString());
|
||||
|
||||
//查询会员充值信息
|
||||
String startTime = map.get("startTime");
|
||||
String endTime = map.get("endTime");
|
||||
|
||||
|
||||
//查询会员充值信息
|
||||
List<AllOrderInfo> allOrderInfos = baseMapper.selectList(new LambdaQueryWrapper<AllOrderInfo>()
|
||||
.eq(AllOrderInfo::getStatus, "paid")
|
||||
.eq(AllOrderInfo::getStoreId, TokenUtil.getNowAccountInfo().getStoreId())
|
||||
.like(AllOrderInfo::getContent, "充值")
|
||||
.between(AllOrderInfo::getCreateTime, startTime, endTime));
|
||||
//会员充值笔数
|
||||
userRechargeNum = allOrderInfos.size();
|
||||
//会员充值金额
|
||||
userRechargeAmount = allOrderInfos.stream().mapToDouble(AllOrderInfo::getPayMoney).sum();
|
||||
|
||||
|
||||
//查询便利店信息
|
||||
allOrderInfos = baseMapper.selectList(new LambdaQueryWrapper<AllOrderInfo>()
|
||||
.eq(AllOrderInfo::getStatus, "paid")
|
||||
.eq(AllOrderInfo::getStoreId, TokenUtil.getNowAccountInfo().getStoreId())
|
||||
.in(AllOrderInfo::getType, "2", "6")
|
||||
.between(AllOrderInfo::getCreateTime, startTime, endTime));
|
||||
//便利店笔数
|
||||
minimartNum = allOrderInfos.size();
|
||||
List<String> orderNos = allOrderInfos.stream()
|
||||
.filter(order -> "6".equals(order.getType()))
|
||||
.map(AllOrderInfo::getOrderNo).collect(Collectors.toList());
|
||||
//总金额
|
||||
minimartAmount = allOrderInfos.stream().mapToDouble(AllOrderInfo::getPayMoney).sum();
|
||||
if (CollectionUtil.isNotEmpty(orderNos)) {
|
||||
//根据订单号集合查询油品总金额
|
||||
Double oilMoney = oilOrderMapper.selectSumMoeny(orderNos);
|
||||
//便利店金额
|
||||
minimartAmount = minimartAmount - oilMoney;
|
||||
DecimalFormat df = new DecimalFormat("#.00");
|
||||
String formattedResult = df.format(minimartAmount);
|
||||
minimartAmount = Double.parseDouble(formattedResult);
|
||||
}
|
||||
|
||||
|
||||
//查询积分商城信息
|
||||
allOrderInfos = baseMapper.selectList(new LambdaQueryWrapper<AllOrderInfo>()
|
||||
.eq(AllOrderInfo::getStatus, "paid")
|
||||
.eq(AllOrderInfo::getStoreId, TokenUtil.getNowAccountInfo().getStoreId())
|
||||
.eq(AllOrderInfo::getType, "4")
|
||||
.between(AllOrderInfo::getCreateTime, startTime, endTime));
|
||||
pointMallNum = allOrderInfos.size();
|
||||
pointMallAmount = allOrderInfos.stream().mapToDouble(order -> order.getPayMoney() == null ? 0 : order.getPayMoney()).sum();
|
||||
map1.put("oilAmount", oilAmount);
|
||||
map1.put("oilNum", oilNum);
|
||||
map1.put("userRechargeAmount", userRechargeAmount);
|
||||
|
Loading…
Reference in New Issue
Block a user