Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
83b1ce776d
@ -9,6 +9,15 @@ export function getOrderListApi(query) {
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
export function getOrderListApis(query) {
|
||||
return request({
|
||||
url: 'business/allOrderInfo/getPageLists',
|
||||
method: 'get',
|
||||
params: query
|
||||
|
||||
})
|
||||
}
|
||||
// 分页查询所有的订单信息
|
||||
export function getSumPayMoneyApi(query) {
|
||||
return request({
|
||||
|
@ -13,51 +13,42 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="type">
|
||||
<el-select
|
||||
v-model="queryParams.type"
|
||||
placeholder="请选择订单类型"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in typeList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="payChannel">
|
||||
<el-select
|
||||
v-model="queryParams.payChannel"
|
||||
placeholder="请选择支付渠道"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
placeholder="请选择订单状态"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in payChannelList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
<el-option label="小程序" value="applet"/>
|
||||
<el-option label="收银台" value="cashier"/>
|
||||
<el-option label="POS端" value="POS"/>
|
||||
<el-option label="平台" value="PC"/>
|
||||
</el-select>
|
||||
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="paymentChannel">
|
||||
<el-select
|
||||
v-model="queryParams.paymentChannel"
|
||||
clearable
|
||||
placeholder="请选择订单类型"
|
||||
>
|
||||
<el-option label="全部" value=""/>
|
||||
<el-option label="拉卡拉" value="cashier"/>
|
||||
<el-option label="富友" value="POS"/>
|
||||
</el-select>
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="payType">
|
||||
<el-form-item label="" prop="status">
|
||||
<el-select
|
||||
v-model="queryParams.payType"
|
||||
placeholder="状态"
|
||||
v-model="queryParams.status"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
placeholder="支付通道"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.payment_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
<el-option label="已支付" value="paid"/>
|
||||
<el-option label="未支付" value="unpaid"/>
|
||||
<el-option label="已退款" value="refund"/>
|
||||
<el-option label="支付失败" value="payFail"/>
|
||||
<el-option label="退款中" value="refunding"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
@ -86,44 +77,23 @@
|
||||
<el-table ref="tables" border v-loading="loading" :data="list" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
|
||||
<el-table-column label="序号" align="center" type="index" />
|
||||
<el-table-column label="订单号" align="center" prop="orderNo" width="220"/>
|
||||
<el-table-column label="所属机构" align="center" prop="type" width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ getType(scope.row.type) }}
|
||||
</template>
|
||||
<el-table-column label="所属机构" align="center" prop="deptName" width="200">
|
||||
</el-table-column>
|
||||
<el-table-column :label="sumPayMoney" align="center" prop="payMoney" >
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="订单类型" align="center" prop="createTime">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.payChannel==='applet'">小程序</span>
|
||||
<span v-else-if="scope.row.payChannel==='POS'">收银台</span>
|
||||
<span v-else>收银台</span>
|
||||
</template>
|
||||
<el-table-column label="订单类型" align="center" prop="type">
|
||||
</el-table-column>
|
||||
<el-table-column label="支付方式" align="center" prop="payType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.payment_type" :value="scope.row.payType"/>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="订单状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.pay_status" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="付款用户/手机号" align="center" prop="userMobile" width="150">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.userMobile?scope.row.userMobile: '散户'}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="支付通道" align="center" prop="paymentChannel" width="150">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.paymentChannel?scope.row.paymentChannel: '--'}}</span>
|
||||
</template>
|
||||
<el-table-column label="支付通道" align="center" prop="payChannel" width="150">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="商户号编号" align="center" prop="mchntCd" width="150">
|
||||
@ -140,9 +110,9 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="订单完成时间" align="center" prop="payTime">
|
||||
<el-table-column label="订单完成时间" align="center" prop="updateTime">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.payTime) || '--'}}</span>
|
||||
<span>{{ parseTime(scope.row.updateTime) || '--'}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@ -165,7 +135,7 @@
|
||||
import {getName} from "../../../utils/fuint";
|
||||
import {addStaff, delStaff, getStaff, listStaff, updateStaff} from "../../../api/staff/staff";
|
||||
// import {getDuty, listDuty} from "@/api/staff/duty";
|
||||
import { getOrderListApi,getSumPayMoneyApi } from "../../../api/allOrder";
|
||||
import { getOrderListApis,getSumPayMoneyApi } from "../../../api/allOrder";
|
||||
export default {
|
||||
name: "asdf",
|
||||
dicts: ['transaction','handover','handover_quit','payment_type','pay_status',
|
||||
@ -251,7 +221,7 @@
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.storeId = this.id
|
||||
getOrderListApi(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||
getOrderListApis(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||
this.list = response.data.records;
|
||||
this.total = response.data.total;
|
||||
this.getSumPayMoney()
|
||||
|
@ -198,7 +198,7 @@ export default {
|
||||
start.setMinutes(0)
|
||||
start.setSeconds(0)
|
||||
start.setMilliseconds(0)
|
||||
this.value2 = [start, new Date()];
|
||||
this.value2 = [parseTime(start),parseTime(new Date())];
|
||||
} else if (this.timeList[index] == '近一周') {
|
||||
let nowDate = new Date();
|
||||
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
|
||||
|
@ -7,20 +7,20 @@
|
||||
<el-select
|
||||
v-model="queryParams.deptId"
|
||||
clearable
|
||||
placeholder="所属机构"
|
||||
placeholder="请选择所属机构"
|
||||
>
|
||||
<el-option v-for="item in deptList" :key="item.id" :label="item.deptName" :value="item.deptId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="" style="width: 180px">-->
|
||||
<!-- <el-input placeholder="请输入商品名称" v-model="queryParams.orderNo"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="" style="width: 180px">
|
||||
<el-input placeholder="请输入商品名称" v-model="queryParams.giftName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="payChannel" style="width: 180px">
|
||||
<el-select
|
||||
v-model="queryParams.orderType"
|
||||
clearable
|
||||
placeholder="订单类型"
|
||||
placeholder="请选择订单类型"
|
||||
>
|
||||
<el-option label="商城兑换" value="0"/>
|
||||
<el-option label="收银台兑换" value="1"/>
|
||||
@ -30,7 +30,7 @@
|
||||
<el-select
|
||||
v-model="queryParams.paymentType"
|
||||
clearable
|
||||
placeholder="支付方式"
|
||||
placeholder="请选择支付方式"
|
||||
>
|
||||
<el-option label="现金" value="CASH"/>
|
||||
<el-option label="微信" value="WECHAT"/>
|
||||
@ -42,11 +42,11 @@
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
clearable
|
||||
placeholder="订单状态"
|
||||
placeholder="请选择订单状态"
|
||||
>
|
||||
<el-option label="已支付" value="paid"/>
|
||||
<el-option label="未支付" value="unpaid"/>
|
||||
<el-option label="已退款" value="refund"/>
|
||||
<el-option label="支付支付" value="paid"/>
|
||||
<el-option label="支付失败" value="unpaid"/>
|
||||
<el-option label="退款成功" value="refund"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="">
|
||||
@ -82,12 +82,12 @@
|
||||
<el-table-column type="index" width="50" align="center" label="序号"/>
|
||||
<el-table-column prop="storeName" align="center" label="机构名称"> </el-table-column>
|
||||
<el-table-column prop="orderNumber" align="center" label="订单号" > </el-table-column>
|
||||
<el-table-column prop="amount" align="center" label="订单金额(元)">
|
||||
<!-- <el-table-column prop="amount" align="center" label="订单金额(元)">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.amount">{{scope.row.amount}}</span>
|
||||
<span v-else>--</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
<el-table-column prop="payChannel" align="center" label="订单类型">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.orderType=='1'">收银台兑换</span>
|
||||
@ -112,20 +112,20 @@
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="消费信息">
|
||||
<el-table-column prop="giftName" align="center" label="商品名称" > </el-table-column>
|
||||
<el-table-column prop="integral" align="center" label="消耗积分" > </el-table-column>
|
||||
<el-table-column prop="exchangeQuantity" align="center" label="数量" > </el-table-column>
|
||||
<el-table-column prop="integral" align="center" label="消耗积分" > </el-table-column>
|
||||
<el-table-column prop="amount" align="center" label="实付金额(元)">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.amount">{{scope.row.amount}}</span>
|
||||
<span v-else>0</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column prop="mchntCd" align="center" label="支付通道">
|
||||
</el-table-column>
|
||||
<el-table-column prop="paymentChannel" align="center" label="商户号编码" width="150"> </el-table-column>
|
||||
<el-table-column prop="paymentChannel" align="center" label="商户号编号" width="150"> </el-table-column>
|
||||
<el-table-column prop="createTime" align="center" label="订单创建时间" > </el-table-column>
|
||||
<!-- <el-table-column prop="payTime" align="center" label="订单完成时间" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span v-if="scope.row.payTime">{{scope.row.payTime}}</span>-->
|
||||
<!-- <span v-else>--</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
<el-table-column prop="updateTime" align="center" label="订单完成时间" ></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<pagination
|
||||
@ -175,6 +175,7 @@ import {getDuiZhangIntegralListApi} from "@/api/financialStatement/jiaoyiduizhan
|
||||
queryParams: {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
giftName: '',
|
||||
beginTime:"",
|
||||
endTime:"",
|
||||
orderNo:"",
|
||||
|
@ -196,7 +196,7 @@ export default {
|
||||
start.setMinutes(0)
|
||||
start.setSeconds(0)
|
||||
start.setMilliseconds(0)
|
||||
this.value2 = [start,new Date()];
|
||||
this.value2 = [parseTime(start),parseTime(new Date())];
|
||||
} else if (this.timeList[index]=='近一周'){
|
||||
let nowDate = new Date();
|
||||
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
|
||||
|
@ -233,7 +233,7 @@ import {parseTime} from "@/utils/fuint";
|
||||
start.setMinutes(0)
|
||||
start.setSeconds(0)
|
||||
start.setMilliseconds(0)
|
||||
this.value2 = [start,new Date()];
|
||||
this.value2 = [parseTime(start),parseTime(new Date())];
|
||||
} else if (this.timeList[index]=='近一周'){
|
||||
let nowDate = new Date();
|
||||
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
|
||||
|
@ -74,7 +74,7 @@
|
||||
<el-table-column prop="counts" label="累计交易笔数" align="center"></el-table-column>
|
||||
<el-table-column prop="goodsNums" label="累计销售商品数量" align="center"></el-table-column>
|
||||
<el-table-column label="商品信息" align="center">
|
||||
<el-table-column prop="cvgNum" label="品类数量" width="100" align="center"></el-table-column>
|
||||
<el-table-column prop="cvsNum" label="品类数量" width="100" align="center"></el-table-column>
|
||||
<el-table-column prop="goodsNum" label="商品数量" width="100" align="center"></el-table-column>
|
||||
<el-table-column prop="payAmounts" label="累计交易金额 (元)" width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
@ -86,18 +86,20 @@
|
||||
<el-table-column label="热销品类信息" align="center">
|
||||
|
||||
<el-table-column prop="cvgName" label="品类名称" width="100" align="center"></el-table-column>
|
||||
<el-table-column prop="cvgNum" label="销售数量 (件)" width="100" align="center"></el-table-column>
|
||||
<el-table-column prop="cvgAmount" label="销售金额 (元)" width="150" align="center"></el-table-column>
|
||||
<el-table-column prop="cvgNumber" label="销售数量 (件)" width="100" align="center"></el-table-column>
|
||||
<el-table-column prop="cvsAmount" label="销售金额 (元)" width="150" align="center"></el-table-column>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="热销商品信息" align="center">
|
||||
<el-table-column prop="goodsName" label="商品名称" width="100" align="center"></el-table-column>
|
||||
<el-table-column prop="goodsNum" label="销售数量" width="100" align="center"></el-table-column>
|
||||
<el-table-column prop="goodsNumber" label="销售数量" width="100" align="center"></el-table-column>
|
||||
<el-table-column prop="goodsAmount" label="销售金额 (元)" width="100" align="center"></el-table-column>
|
||||
<!-- <el-table-column prop="supplierName" label="供应商名称" width="100" align="center"></el-table-column>-->
|
||||
</el-table-column>
|
||||
<el-table-column prop="statDate" label="统计日期" width="200" align="center">
|
||||
|
||||
<template>
|
||||
{{this.value2[0]}} 至 {{this.value2[1]}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
@ -210,7 +212,7 @@ import {parseTime} from "@/utils/fuint";
|
||||
start.setMinutes(0)
|
||||
start.setSeconds(0)
|
||||
start.setMilliseconds(0)
|
||||
this.value2 = [start,new Date()];
|
||||
this.value2 = [parseTime(start),parseTime(new Date())];
|
||||
} else if (this.timeList[index]=='近一周'){
|
||||
let nowDate = new Date();
|
||||
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
|
||||
|
@ -47,6 +47,22 @@ public class AllOrderInfoController extends BaseController {
|
||||
IPage<AllOrderInfoVo> list = allOrderInfoService.getPageList(page, allOrderInfo);
|
||||
return getSuccessResult(list);
|
||||
}
|
||||
/**
|
||||
* 分页查询全部订单信息
|
||||
* @param allOrderInfo
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("getPageLists")
|
||||
public ResponseObject getPageLists(AllOrderInfo allOrderInfo,
|
||||
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
|
||||
Page page =new Page(pageNo,pageSize);
|
||||
IPage<AllOrderInfoVo> list = allOrderInfoService.getPageLists(page, allOrderInfo);
|
||||
return getSuccessResult(list);
|
||||
}
|
||||
|
||||
@GetMapping("/findOrderStatistics")
|
||||
public ResponseObject findOrderStatistics(AllOrderInfoRes allOrderInfoRes){
|
||||
Map<String, Object> map = allOrderInfoService.findOrderStatistics(allOrderInfoRes);
|
||||
|
@ -29,6 +29,7 @@ import java.util.Map;
|
||||
public interface AllOrderInfoMapper extends BaseMapper<AllOrderInfo> {
|
||||
|
||||
IPage<AllOrderInfoVo> getPageList(@Param("page") Page page, @Param("allOrderInfo") AllOrderInfo allOrderInfo);
|
||||
IPage<AllOrderInfoVo> getPageLists(@Param("page") Page page, @Param("allOrderInfo") AllOrderInfo allOrderInfo);
|
||||
Map<String, Object> findOrderStatistics(@Param("allOrderInfo") AllOrderInfoRes allOrderInfoRes,@Param("beginTime") String startTime, @Param("endTime") String endTime);
|
||||
List getAllOrderInfo(@Param("obj") AllOrderInfoRes allOrderInfoRes,
|
||||
@Param("beginTime") String beginTime, @Param("endTime") String endTime);
|
||||
|
@ -38,12 +38,16 @@ public interface OrderGoodsMapper extends BaseMapper<OrderGoods> {
|
||||
List<OrderGoodsVO> selectGoodsSalesRankYestoday(int i);
|
||||
|
||||
OrderGoodsVO selectInfoByStoreId(LJOrderVo record);
|
||||
OrderGoodsVO selectInfoByStoreId1(LJOrderVo record);
|
||||
OrderGoodsVO selectInfoByStoreId2(LJOrderVo record);
|
||||
// OrderGoodsVO selectInfoByStoreId1(LJOrderVo record);
|
||||
OrderGoodsVO selectInfoByStoreId1(@Param("record") LJOrderVo record, @Param("order")LJOrderVo order);
|
||||
// OrderGoodsVO selectInfoByStoreId2(LJOrderVo record);
|
||||
OrderGoodsVO selectInfoByStoreId2(@Param("record") LJOrderVo record, @Param("order")LJOrderVo order);
|
||||
// 热销品类
|
||||
OrderGoodsVO selectInfoByStoreIdType(LJOrderVo record);
|
||||
// OrderGoodsVO selectInfoByStoreIdType(LJOrderVo record);
|
||||
OrderGoodsVO selectInfoByStoreIdType(@Param("record") LJOrderVo record, @Param("order")LJOrderVo order);
|
||||
// 热销商品
|
||||
OrderGoodsVO selectInfoByStoreIdGoods(LJOrderVo record);
|
||||
// OrderGoodsVO selectInfoByStoreIdGoods(LJOrderVo record);
|
||||
OrderGoodsVO selectInfoByStoreIdGoods(@Param("record") LJOrderVo record, @Param("order")LJOrderVo order);
|
||||
|
||||
Map<Object,Object> selectOrderByBuySum( @Param("order") LJOrderVo order);
|
||||
|
||||
|
@ -2019,4 +2019,87 @@
|
||||
LEFT JOIN mt_goods mt on ig.goods_id=mt.id
|
||||
where ig.store_id=#{obj.storeId}
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="getPageLists" resultType="com.fuint.business.order.vo.AllOrderInfoVo">
|
||||
select
|
||||
aoi.id AS id,
|
||||
aoi.order_no AS orderNo,
|
||||
CASE WHEN aoi.type = '1' THEN '油品'
|
||||
WHEN aoi.type = '2' THEN '商品'
|
||||
WHEN aoi.type = '3' THEN '储值卡'
|
||||
WHEN aoi.type = '4' THEN '积分'
|
||||
WHEN aoi.type = '5' THEN '囤油卡'
|
||||
WHEN aoi.type = '6' THEN '收银台订单'
|
||||
WHEN aoi.type = '7' THEN '挂账订单'
|
||||
WHEN aoi.type = '8' THEN 'pos'
|
||||
END as type,
|
||||
CASE WHEN aoi.pay_type = 'ALIPAY' THEN '支付宝'
|
||||
WHEN aoi.pay_type = 'WECHAT' THEN '微信'
|
||||
WHEN aoi.pay_type = 'UNIONPAY' THEN '银联二维码'
|
||||
WHEN aoi.pay_type = 'CASH' THEN '现金'
|
||||
WHEN aoi.pay_type = 'APPLET_CODE' THEN '小程序码'
|
||||
WHEN aoi.pay_type = 'card_value' THEN '储值卡'
|
||||
WHEN aoi.pay_type = 'fule_card' THEN '囤油卡'
|
||||
WHEN aoi.pay_type = 'car_card_value' THEN '车队卡'
|
||||
WHEN aoi.pay_type = 'after_pay' THEN '挂账'
|
||||
END as payType,
|
||||
CASE WHEN aoi.status = 'paid' THEN '已支付'
|
||||
WHEN aoi.status = 'unpaid' THEN '未支付'
|
||||
WHEN aoi.status = 'refund' THEN '已退款'
|
||||
WHEN aoi.status = 'payFail' THEN '支付失败'
|
||||
WHEN aoi.status = 'refunding' THEN '退款中'
|
||||
END as status,
|
||||
aoi.transaction_id AS transactionId,
|
||||
aoi.store_id AS storeId,
|
||||
aoi.goods_money AS goodsMoney,
|
||||
aoi.pay_money AS payMoney,
|
||||
aoi.pay_time AS payTime,
|
||||
aoi.user_id AS userId,
|
||||
CASE WHEN aoi.pay_channel = 'cashier' THEN '收银台'
|
||||
WHEN aoi.pay_channel = 'POS' THEN 'POS机'
|
||||
WHEN aoi.pay_channel = 'PC' THEN '平台'
|
||||
WHEN aoi.pay_channel = 'applet' THEN '小程序'
|
||||
END as payChannel,
|
||||
aoi.status AS orderStatus,
|
||||
aoi.content AS orderContent,
|
||||
aoi.create_time AS createTime,
|
||||
aoi.create_by AS createBy,
|
||||
aoi.update_time AS updateTime,
|
||||
aoi.update_by AS updateBy,
|
||||
aoi.content AS content,
|
||||
mt.name as deptName,
|
||||
if(aoi.pay_type = 'CASH','散客',concat(mu.mobile,'/',mu.name)) userMobile
|
||||
from all_order_info aoi
|
||||
left join mt_store mt on aoi.store_id=mt.id
|
||||
left join mt_user mu ON aoi.user_id = mu.id
|
||||
where aoi.store_id = #{allOrderInfo.storeId}
|
||||
<if test="allOrderInfo.type != null and allOrderInfo.type != ''">
|
||||
and aoi.type = #{allOrderInfo.type}
|
||||
</if>
|
||||
<if test="allOrderInfo.orderNo != null and allOrderInfo.orderNo != ''">
|
||||
and aoi.order_no like concat('%', #{allOrderInfo.orderNo}, '%')
|
||||
</if>
|
||||
<if test="allOrderInfo.status != null and allOrderInfo.status != ''">
|
||||
and aoi.status = #{allOrderInfo.status}
|
||||
</if>
|
||||
<if test="allOrderInfo.payChannel != null and allOrderInfo.payChannel != ''">
|
||||
and aoi.pay_channel = #{allOrderInfo.payChannel}
|
||||
</if>
|
||||
<if test="allOrderInfo.payType != null and allOrderInfo.payType != ''">
|
||||
and aoi.pay_type = #{allOrderInfo.payType}
|
||||
</if>
|
||||
<if test="allOrderInfo.paymentChannel != null and allOrderInfo.paymentChannel != ''">
|
||||
and aoi.payment_channel = #{allOrderInfo.paymentChannel}
|
||||
</if>
|
||||
<if test="allOrderInfo.params.beginTime != null and allOrderInfo.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(pay_time,'%y%m%d') >= date_format(#{allOrderInfo.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="allOrderInfo.params.endTime != null and allOrderInfo.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(pay_time,'%y%m%d') <= date_format(#{allOrderInfo.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
|
||||
order by aoi.create_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
|
@ -302,8 +302,9 @@
|
||||
sum(goods_num) goodsNums
|
||||
from mt_order
|
||||
<where>
|
||||
status = 'paid'
|
||||
<if test="order.storeIds != null">
|
||||
store_id in
|
||||
and store_id in
|
||||
<foreach collection="order.storeIds" item="item" index="index" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
@ -325,8 +326,9 @@
|
||||
sum(goods_num) goodsNum
|
||||
from mt_order
|
||||
<where>
|
||||
status = 'paid'
|
||||
<if test="order.storeIds != null">
|
||||
store_id in
|
||||
and store_id in
|
||||
<foreach collection="order.storeIds" item="item" index="index" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
@ -344,11 +346,12 @@
|
||||
select
|
||||
count(distinct mg.cvs_good_id) cvg
|
||||
from mt_order mo
|
||||
left join mt_order_goods mog on mog.goods_id = mo.id
|
||||
left join mt_goods mg on mog.goods_id = mg.id
|
||||
left join mt_order_goods mog on mog.order_id = mo.id
|
||||
left join mt_goods mg on mg.id = mog.goods_id
|
||||
<where>
|
||||
mo.status = 'paid'
|
||||
<if test="order.storeIds != null">
|
||||
mo.store_id in
|
||||
and mo.store_id in
|
||||
<foreach collection="order.storeIds" item="item" index="index" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
|
@ -44,15 +44,34 @@
|
||||
|
||||
</select>
|
||||
<select id="selectInfoByStoreId1" resultType="com.fuint.business.largeSscreen.vo.OrderGoodsVO">
|
||||
|
||||
select count(*) cvsNum
|
||||
from cvs_goods where store_id = #{storeId}
|
||||
select count(distinct mg.cvs_good_id) cvsNum
|
||||
from mt_order_goods mog
|
||||
left join mt_order mo on mo.id = mog.order_id
|
||||
left join mt_goods mg on mg.id = mog.goods_id
|
||||
<where>
|
||||
mo.store_id = #{record.storeId}
|
||||
<if test="order.params.beginTime != null and order.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(mog.create_time,'%y%m%d') >= date_format(#{order.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="order.params.endTime != null and order.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(mog.create_time,'%y%m%d') <= date_format(#{order.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectInfoByStoreId2" resultType="com.fuint.business.largeSscreen.vo.OrderGoodsVO">
|
||||
|
||||
select count(*) goodsNum
|
||||
from cvs_goods where store_id = #{storeId}
|
||||
|
||||
select count(distinct mog.goods_id) goodsNum
|
||||
from mt_order_goods mog
|
||||
left join mt_order mo on mo.id = mog.order_id
|
||||
<where>
|
||||
mo.store_id = #{record.storeId}
|
||||
<if test="order.params.beginTime != null and order.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(mog.create_time,'%y%m%d') >= date_format(#{order.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="order.params.endTime != null and order.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(mog.create_time,'%y%m%d') <= date_format(#{order.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectInfoByStoreIdType" resultType="com.fuint.business.largeSscreen.vo.OrderGoodsVO">
|
||||
SELECT cg.name cvgName, SUM(mog.num) cvgNumber,sum(mog.pay_amount) cvsAmount
|
||||
@ -60,7 +79,15 @@ from cvs_goods where store_id = #{storeId}
|
||||
left join mt_order mo on mo.id = mog.order_id
|
||||
left join mt_goods mg on mog.goods_id = mg.id
|
||||
left join cvs_goods cg on mg.cvs_good_id = cg.id
|
||||
where mo.store_id = #{storeId}
|
||||
<where>
|
||||
mo.store_id = #{record.storeId}
|
||||
<if test="order.params.beginTime != null and order.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(mog.create_time,'%y%m%d') >= date_format(#{order.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="order.params.endTime != null and order.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(mog.create_time,'%y%m%d') <= date_format(#{order.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
group by cg.id
|
||||
ORDER BY cvgNumber desc
|
||||
limit 1
|
||||
@ -71,7 +98,15 @@ from cvs_goods where store_id = #{storeId}
|
||||
from mt_order_goods mog
|
||||
left join mt_order mo on mo.id = mog.order_id
|
||||
left join mt_goods mg on mog.goods_id = mg.id
|
||||
where mo.store_id = #{storeId}
|
||||
<where>
|
||||
mo.store_id = #{record.storeId}
|
||||
<if test="order.params.beginTime != null and order.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(mog.create_time,'%y%m%d') >= date_format(#{order.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="order.params.endTime != null and order.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(mog.create_time,'%y%m%d') <= date_format(#{order.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
group by mg.id
|
||||
ORDER BY goodsNumber desc
|
||||
limit 1
|
||||
|
@ -30,6 +30,7 @@ public interface AllOrderInfoService {
|
||||
* @return
|
||||
*/
|
||||
IPage<AllOrderInfoVo> getPageList(Page page, AllOrderInfo allOrderInfo);
|
||||
IPage<AllOrderInfoVo> getPageLists(Page page, AllOrderInfo allOrderInfo);
|
||||
Map<String, Object> findOrderStatistics(AllOrderInfoRes allOrderInfoRes);
|
||||
void exportExcelHandoverOrder(HttpServletResponse response, AllOrderInfoRes allOrderInfoRes);
|
||||
AllOrderInfoVo getOrderInfoById(Integer id);
|
||||
|
@ -155,7 +155,11 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
||||
IPage<AllOrderInfoVo> pageList = allOrderInfoMapper.getPageList(page, allOrderInfo);
|
||||
return pageList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<AllOrderInfoVo> getPageLists(Page page, AllOrderInfo allOrderInfo) {
|
||||
IPage<AllOrderInfoVo> pageList = allOrderInfoMapper.getPageLists(page, allOrderInfo);
|
||||
return pageList;
|
||||
}
|
||||
@Override
|
||||
public Map<String, Object> findOrderStatistics(AllOrderInfoRes allOrderInfoRes) {
|
||||
String startTime = allOrderInfoRes.getDataRange() == null ? "" : allOrderInfoRes.getDataRange()[0];
|
||||
|
@ -115,10 +115,10 @@ public class LJOrderServiceImpl extends ServiceImpl<LJOrderMapper, LJOrder> impl
|
||||
record.setStoreName(mtStore.getName());
|
||||
}
|
||||
// 商品信息
|
||||
OrderGoodsVO orderGoodsVO = orderGoodsMapper.selectInfoByStoreId1(record);
|
||||
OrderGoodsVO orderGoodsVO1 = orderGoodsMapper.selectInfoByStoreId2(record);
|
||||
OrderGoodsVO orderGoodsVO2 = orderGoodsMapper.selectInfoByStoreIdType(record);// 热销品类信息
|
||||
OrderGoodsVO orderGoodsVO3 = orderGoodsMapper.selectInfoByStoreIdGoods(record);// 热销商品信息
|
||||
OrderGoodsVO orderGoodsVO = orderGoodsMapper.selectInfoByStoreId1(record,order);
|
||||
OrderGoodsVO orderGoodsVO1 = orderGoodsMapper.selectInfoByStoreId2(record,order);
|
||||
OrderGoodsVO orderGoodsVO2 = orderGoodsMapper.selectInfoByStoreIdType(record,order);// 热销品类信息
|
||||
OrderGoodsVO orderGoodsVO3 = orderGoodsMapper.selectInfoByStoreIdGoods(record,order);// 热销商品信息
|
||||
|
||||
if (ObjectUtil.isNotEmpty(orderGoodsVO)) {
|
||||
record.setCvsNum(orderGoodsVO.getCvsNum());
|
||||
|
@ -497,6 +497,14 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
|
||||
Map<String, Object> orders = new HashMap<>();
|
||||
|
||||
// 当订单中包含商品时,若使用支付方式储值卡、囤油卡、车队卡时,提示:该订单含有商品,无法使用储值卡/囤油卡/车队卡支付;
|
||||
if (!goodsOrder.equals("[]")) {
|
||||
if((payType.equals("card_value") || payType.equals("fule_card") || payType.equals("car_card_value"))){
|
||||
orders.put("error", "该订单含有商品,无法使用储值卡/囤油卡/车队卡支付");
|
||||
return orders;
|
||||
}
|
||||
}
|
||||
|
||||
String transactionType = null;
|
||||
if (oilAmount > 0 && goodsAmount > 0) {
|
||||
transactionType = "5";
|
||||
|
@ -27,6 +27,7 @@ import com.fuint.business.sys.mapper.SysNotifyMapper;
|
||||
import com.fuint.business.sys.service.SysNotificationlogService;
|
||||
import com.fuint.business.sys.service.SysNotifyService;
|
||||
import com.fuint.common.service.AccountService;
|
||||
import com.fuint.repository.mapper.MtStaffMapper;
|
||||
import com.fuint.repository.mapper.TAccountMapper;
|
||||
import com.fuint.repository.model.TAccount;
|
||||
import com.fuint.system.role.entity.TDuty;
|
||||
@ -310,6 +311,8 @@ public class SysNotifyServiceImpl extends ServiceImpl<SysNotifyMapper, SysNotif
|
||||
AccountService accountService;
|
||||
@Resource
|
||||
private TAccountMapper tAccountMapper;
|
||||
@Resource
|
||||
private MtStaffMapper mtStaffMapper;
|
||||
public boolean sendNotifyOne(Integer id) {
|
||||
SysNotify sysNotify = baseMapper.queryById(id);
|
||||
// String recipientRoles = sysNotify.getRecipientRoles();
|
||||
@ -321,11 +324,16 @@ public class SysNotifyServiceImpl extends ServiceImpl<SysNotifyMapper, SysNotif
|
||||
for (int i = 0; i < jsonArray.size(); i++) {
|
||||
String mm= jsonArray.get(i).toString();
|
||||
JSONObject userObject = jsonArray.getJSONObject(i);
|
||||
//Integer userId = userObject.getInteger("id");
|
||||
Integer userId=Integer.valueOf(mm);
|
||||
Integer userId=null;
|
||||
//Integer userId = userObject.getInteger("id")
|
||||
if(userObject.get("id")==null){
|
||||
userId=Integer.valueOf(userObject.get("staffId").toString());
|
||||
}else {
|
||||
userId=Integer.valueOf(userObject.get("id").toString());
|
||||
}
|
||||
|
||||
// 根据 userId 查询员工信息
|
||||
TAccount account = tAccountMapper.selectById(userId);
|
||||
TAccount account = tAccountMapper.selectOnes(userId);
|
||||
if (account != null) {
|
||||
// 发送通知
|
||||
SysNotificationlog sysNotificationlog = new SysNotificationlog();
|
||||
|
@ -435,15 +435,29 @@
|
||||
</select>
|
||||
|
||||
<select id="selectAmountStatistics" resultType="com.fuint.business.userManager.dto.LJUserStaticesDto">
|
||||
select (SELECT count(id) from mt_user_balance where user_status = 0) as userNum,
|
||||
sum(CASE WHEN mub.user_status = 1 THEN 1 ELSE 0 END) as logOffUserNum,
|
||||
sum(mub.points) as allPoints,
|
||||
sum(mub.used_points) as consumePoints,
|
||||
sum(CASE WHEN cbc.change_type = 1 THEN cbc.balance ELSE 0 END) as accumulateRecharge,
|
||||
sum(mub.card_balance) as allBalance
|
||||
FROM mt_user mu
|
||||
LEFT JOIN mt_user_balance mub ON mu.id = mub.mt_user_id
|
||||
left join card_balance_change cbc on cbc.user_id=mu.id
|
||||
SELECT
|
||||
sum(CASE WHEN cbc.from_type='余额充值' or cbc.from_type='余额充值赠送' THEN cbc.balance ELSE 0 END) rechargeAmount,
|
||||
sum(CASE WHEN cbc.from_type='余额充值' THEN cbc.balance ELSE 0 END) rechargePrincipal,
|
||||
sum(CASE WHEN cbc.from_type='余额充值赠送' THEN cbc.balance ELSE 0 END) rechargeGive,
|
||||
sum(CASE WHEN cbc.from_type='油品订单消费' THEN cbc.balance ELSE 0 END) consumeAmount,
|
||||
(SELECT sum(balance_gift_amount) from oil_order where store_id=#{storeId} and order_status='paid') consumePrincipal,
|
||||
(SELECT sum(pay_amount)-sum(balance_gift_amount) from oil_order where store_id=#{storeId} and order_status='paid') consumeGive,
|
||||
(SELECT sum(pay_amount) from oil_order where store_id=#{storeId} and order_status='refund') refundAmount,
|
||||
(SELECT sum(balance_gift_amount) from oil_order where store_id=#{storeId} and order_status='refund') refundPrincipal,
|
||||
(SELECT sum(pay_amount)-sum(balance_gift_amount) from oil_order where store_id=#{storeId} and order_status='refund')
|
||||
refundGive0,
|
||||
sum(CASE WHEN mub.user_status='1' THEN mub.card_balance ELSE 0 END) logOffAmount,
|
||||
sum(CASE WHEN mub.user_status='1' THEN mub.give_amount ELSE 0 END) logOffPrincipal,
|
||||
sum(CASE WHEN mub.user_status='1' THEN mub.card_balance ELSE 0 END)-sum(CASE WHEN mub.user_status='1' THEN mub.give_amount ELSE 0 END) logOffGive,
|
||||
sum(mub.card_balance) userBalance,
|
||||
sum(mub.give_amount) residuePrincipal,
|
||||
sum(mub.card_balance)-
|
||||
sum(mub.give_amount) residueGive
|
||||
from card_balance_change cbc
|
||||
LEFT JOIN mt_user_balance mub on cbc.user_id=mub.mt_user_id
|
||||
where cbc.store_id=#{storeId}
|
||||
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
|
@ -975,9 +975,11 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
|
||||
if (pointsChange.getFromType().equals("营销赠送")){
|
||||
marketingGivePoint += pointsChange.getPoints();
|
||||
}
|
||||
if (pointsChange.getFromType().equals("会员升级赠送")){
|
||||
if (pointsChange.getFromType().equals("会员升级赠送") || pointsChange.getFromType().equals("新增会员") ){
|
||||
if(pointsChange.getPoints()!=null){
|
||||
upgradationPoint += pointsChange.getPoints();
|
||||
}
|
||||
}
|
||||
if (pointsChange.getFromType().equals("消费赠送")){
|
||||
consumePoint += pointsChange.getPoints();
|
||||
}
|
||||
|
@ -30,4 +30,6 @@ public interface TAccountMapper extends BaseMapper<TAccount> {
|
||||
|
||||
|
||||
List<TAccount> getByRoleId(List<Long> roleIds);
|
||||
|
||||
TAccount selectOnes(@Param("staffId") Integer staffId);
|
||||
}
|
||||
|
@ -114,4 +114,12 @@
|
||||
</foreach>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOnes" resultType="com.fuint.repository.model.TAccount">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
`t_account`
|
||||
where staff_id=#{staffId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
Loading…
Reference in New Issue
Block a user