11.14
This commit is contained in:
parent
499c40f13b
commit
b24bb99f21
@ -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()
|
||||
|
@ -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);
|
||||
|
@ -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>
|
||||
|
@ -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];
|
||||
|
@ -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