信息统计
This commit is contained in:
parent
68c0ab29e7
commit
e09841a85a
@ -5,49 +5,70 @@
|
||||
<el-radio-button label="literCard">升数卡记录</el-radio-button>
|
||||
</el-radio-group>
|
||||
<div v-if="tabPosition=='giftCard'">
|
||||
<el-table ref="tables" v-loading="loading" :data="list">
|
||||
<el-table-column prop="date" label="所属油站"/>
|
||||
<el-table-column prop="date" label="变动账户"/>
|
||||
<el-table-column prop="date" label="类型"/>
|
||||
<el-table-column label="详细信息">
|
||||
<el-table-column prop="name" label="变动金额"/>
|
||||
<el-table-column prop="address" label="变动前余额"/>
|
||||
<el-table-column prop="address" label="变动后余额"/>
|
||||
<el-table ref="tables" v-loading="loading" :data="cardList">
|
||||
<el-table-column align="center" prop="storeName" label="所属油站"/>
|
||||
<!-- <el-table-column prop="date" label="变动账户"/> -->
|
||||
<el-table-column align="center" prop="changeType" label="类型">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.changeType == 0">减少</el-tag>
|
||||
<el-tag type="success" v-else>增加</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="date" label="订单号"/>
|
||||
<el-table-column prop="date" label="描述"/>
|
||||
<el-table-column prop="date" label="变动时间"/>
|
||||
<el-table-column align="center" label="详细信息">
|
||||
<el-table-column align="center" prop="balance" label="变动金额"/>
|
||||
<el-table-column align="center" prop="address" label="变动前余额">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.afterTheChange?scope.row.afterTheChange + scope.row.balance : '/'}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="afterTheChange" label="变动后余额">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.afterTheChange?scope.row.afterTheChange : '/'}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="orderNo" label="订单号"/>
|
||||
<el-table-column align="center" prop="fromType" label="描述"/>
|
||||
<el-table-column align="center" prop="createTime" label="变动时间"/>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
:total="total"
|
||||
:page.sync="queryParams.page"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
:total="cardTotal"
|
||||
:page.sync="queryCardParams.page"
|
||||
:limit.sync="queryCardParams.pageSize"
|
||||
@pagination="getCardList"
|
||||
/>
|
||||
</div>
|
||||
<div v-else>
|
||||
<el-table ref="tables" v-loading="loading" :data="list">
|
||||
<el-table-column label="所属油站" prop="id" align="center"/>
|
||||
<el-table-column label="变动账户" align="center"/>
|
||||
<el-table-column label="类型" align="center" prop="userNo"/>
|
||||
<el-table-column label="变动升数" align="center" prop="name" />
|
||||
<el-table-column label="订单号" align="center" prop="balance"/>
|
||||
<el-table-column label="描述" align="center" prop="balance"/>
|
||||
<el-table-column label="变动时间" align="center" prop="point"/>
|
||||
<el-table ref="tables2" v-loading="loading" :data="fuelList">
|
||||
<el-table-column align="center" label="所属油站" prop="storeName"/>
|
||||
<el-table-column align="center" label="变动账户" prop="oilType" />
|
||||
<el-table-column label="类型" align="center" prop="changeType">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.changeType == 0">减少</el-tag>
|
||||
<el-tag type="success" v-else>增加</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="变动升数" align="center" prop="balance"/>
|
||||
<el-table-column label="订单号" align="center" prop="orderNo"/>
|
||||
<el-table-column label="描述" align="center" prop="fromType"/>
|
||||
<el-table-column label="变动时间" align="center" prop="createTime"/>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
:total="total"
|
||||
:page.sync="queryParams.page"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
:total="fuelTotal"
|
||||
:page.sync="queryFuelParams.page"
|
||||
:limit.sync="queryFuelParams.pageSize"
|
||||
@pagination="getFuelList"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCardRecordList, getFuelRecordList } from "@/api/userInfoOrder.js";
|
||||
|
||||
export default {
|
||||
props:["pUserId"],
|
||||
data(){
|
||||
@ -56,19 +77,50 @@ export default {
|
||||
userId:"",
|
||||
loading:false,
|
||||
list:[],
|
||||
total:0,
|
||||
queryParams:{
|
||||
cardList:[],
|
||||
fuelList:[],
|
||||
cardTotal:0,
|
||||
fuelTotal:0,
|
||||
queryCardParams:{
|
||||
page:1,
|
||||
pageSize:10,
|
||||
},
|
||||
queryFuelParams:{
|
||||
page:1,
|
||||
pageSize:10,
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.userId = this.pUserId;
|
||||
// this.userId = this.pUserId;
|
||||
this.userId = this.$route.query.id;
|
||||
|
||||
this.getCardList()
|
||||
this.getFuelList()
|
||||
},
|
||||
methods:{
|
||||
getList(){
|
||||
getCardList() {
|
||||
this.loading = true
|
||||
this.queryCardParams.userId = this.userId
|
||||
getCardRecordList(this.queryCardParams).then(res=>{
|
||||
if (res.code == 200) {
|
||||
this.cardList = res.data.records
|
||||
this.cardTotal = res.data.total
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getFuelList() {
|
||||
this.loading = true
|
||||
this.queryFuelParams.userId = this.userId
|
||||
getFuelRecordList(this.queryFuelParams).then(res=>{
|
||||
if (res.code == 200) {
|
||||
this.fuelList = res.data.records
|
||||
this.fuelTotal = res.data.total
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-radio-group v-model="cardList" size="mini" style="margin-bottom: 30px;">
|
||||
<el-radio-group v-model="cardList" size="mini" style="margin-bottom: 30px;" @change="changeStatus()">
|
||||
<el-radio-button label="notUse">未使用</el-radio-button>
|
||||
<el-radio-button label="used">已使用</el-radio-button>
|
||||
<el-radio-button label="expired">已过期</el-radio-button>
|
||||
@ -8,19 +8,36 @@
|
||||
</el-radio-group>
|
||||
<div>
|
||||
<el-table ref="tables" v-loading="loading" :data="list">
|
||||
<el-table-column prop="date" label="所属油站"/>
|
||||
<el-table-column prop="date" label="优惠券名称"/>
|
||||
<el-table-column prop="date" label="卡券类型"/>
|
||||
<el-table-column prop="date" label="满减金额"/>
|
||||
<el-table-column prop="date" label="券面额"/>
|
||||
<el-table-column prop="date" label="适用油品"/>
|
||||
<el-table-column prop="date" label="状态"/>
|
||||
<el-table-column label="卡券可用规则">
|
||||
<el-table-column prop="name" label="有效期"/>
|
||||
<el-table-column prop="address" label="周期与时段"/>
|
||||
<el-table-column align="center" prop="storeName" label="所属油站"/>
|
||||
<el-table-column align="center" prop="cardFavorableName" label="优惠券名称"/>
|
||||
<el-table-column align="center" prop="type" label="卡券类型">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.type == 0">油品券</el-tag>
|
||||
<el-tag v-if="scope.row.type == 1" type="success">商品券</el-tag>
|
||||
<el-tag v-if="scope.row.type == 2" type="warning">通用券</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="date" label="领取时间"/>
|
||||
<el-table-column prop="date" label="描述"/>
|
||||
<el-table-column align="center" prop="fullDeduction" label="满减金额"/>
|
||||
<el-table-column align="center" prop="discountAmount" label="券面额"/>
|
||||
<el-table-column align="center" prop="oilType" label="适用油品"/>
|
||||
<el-table-column align="center" prop="status" label="状态">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.status == 0">未使用</el-tag>
|
||||
<el-tag v-if="scope.row.status == 1" type="success">已使用</el-tag>
|
||||
<el-tag v-if="scope.row.status == 2" type="warning">已过期</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="卡券可用规则">
|
||||
<el-table-column align="center" prop="name" label="有效期">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.startTime }}至{{ scope.row.endTime }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" prop="availablePeriod" label="周期与时段"/>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="createTime" label="领取时间"/>
|
||||
<el-table-column align="center" prop="exchangeFrom" label="描述"/>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
@ -34,6 +51,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCardFavorableList } from "@/api/userInfoOrder.js";
|
||||
|
||||
export default {
|
||||
props:["pUserId"],
|
||||
data(){
|
||||
@ -44,17 +63,45 @@ export default {
|
||||
list:[],
|
||||
total:0,
|
||||
queryParams:{
|
||||
status: 0,
|
||||
page:1,
|
||||
pageSize:10,
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.userId = this.pUserId;
|
||||
// this.userId = this.pUserId;
|
||||
this.userId = this.$route.query.id;
|
||||
|
||||
this.getList()
|
||||
},
|
||||
methods:{
|
||||
getList(){
|
||||
|
||||
getList(){
|
||||
this.loading = true
|
||||
|
||||
this.queryParams.userId = this.userId
|
||||
getCardFavorableList(this.queryParams).then(res=>{
|
||||
if (res.code == 200) {
|
||||
this.list = res.data.records
|
||||
this.total = res.data.total
|
||||
this.loading = false
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
changeStatus() {
|
||||
console.log("12312312312312312",this.cardList)
|
||||
if (this.cardList == 'notUse') {
|
||||
this.queryParams.status = 0
|
||||
} else if (this.cardList == 'used') {
|
||||
this.queryParams.status = 1
|
||||
} else if (this.cardList == 'expired') {
|
||||
this.queryParams.status = 2
|
||||
} else {
|
||||
this.queryParams.status = ''
|
||||
}
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,15 +1,23 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table ref="tables" v-loading="loading" :data="list">
|
||||
<el-table-column label="所属油站" prop="id" align="center"/>
|
||||
<el-table-column label="订单时间" align="center"/>
|
||||
<el-table-column label="订单金额" align="center" prop="userNo"/>
|
||||
<el-table-column label="商品数量" align="center" prop="name" />
|
||||
<el-table-column label="储值卡" align="center" prop="mobile"/>
|
||||
<el-table-column label="实付金额" align="center" prop="balance"/>
|
||||
<el-table-column label="付款类型" align="center" prop="balance"/>
|
||||
<el-table-column label="订单号" align="center" prop="balance"/>
|
||||
<el-table-column label="订单类型" align="center" prop="point"/>
|
||||
<el-table-column label="所属油站" prop="storeName" align="center"/>
|
||||
<el-table-column label="订单时间" prop="createTime" align="center"/>
|
||||
<el-table-column label="订单金额" align="center" prop="amount"/>
|
||||
<el-table-column label="商品数量" align="center" prop="goodsNum" />
|
||||
<!-- <el-table-column label="储值卡" align="center" prop="mobile"/> -->
|
||||
<el-table-column label="实付金额" align="center" prop="payAmount"/>
|
||||
<el-table-column label="付款类型" align="center" prop="payType">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.payType == 'CASH'">现金支付</span>
|
||||
<span v-else-if="scope.row.payType == 'WECHAT'">微信支付</span>
|
||||
<span v-else-if="scope.row.payType == 'ALIPAY'">支付宝支付</span>
|
||||
<span v-else>{{ scope.row.payType }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="订单号" align="center" prop="orderNo"/>
|
||||
<!-- <el-table-column label="订单类型" align="center" prop="point"/> -->
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
@ -22,6 +30,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getMtOrderList } from "@/api/userInfoOrder.js";
|
||||
|
||||
export default {
|
||||
props:["pUserId"],
|
||||
data(){
|
||||
@ -37,11 +47,22 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.userId = this.pUserId;
|
||||
// this.userId = this.pUserId;
|
||||
this.userId = this.$route.query.id;
|
||||
|
||||
this.getList()
|
||||
},
|
||||
methods:{
|
||||
getList(){
|
||||
|
||||
this.loading = true
|
||||
this.queryParams.userId = this.userId
|
||||
getMtOrderList(this.queryParams).then(res=>{
|
||||
if (res.code == 200) {
|
||||
this.list = res.data.records
|
||||
this.total = res.data.total
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,16 +1,35 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table ref="tables" v-loading="loading" :data="list">
|
||||
<el-table-column label="所属油站" prop="id" align="center"/>
|
||||
<el-table-column label="订单时间" align="center"/>
|
||||
<el-table-column label="交易终端" align="center" prop="userNo"/>
|
||||
<el-table-column label="油品/油枪" align="center" prop="name" />
|
||||
<el-table-column label="订单金额" align="center" prop="mobile"/>
|
||||
<el-table-column label="优惠金额" align="center" prop="gradeId"/>
|
||||
<el-table-column label="实付金额" align="center" prop="balance"/>
|
||||
<el-table-column label="付款类型" align="center" prop="balance"/>
|
||||
<el-table-column label="订单号" align="center" prop="balance"/>
|
||||
<el-table-column label="订单类型" align="center" prop="point"/>
|
||||
<el-table-column label="所属油站" prop="storeName" align="center"/>
|
||||
<el-table-column label="订单时间" align="center" prop="createTime"/>
|
||||
<el-table-column label="交易终端" align="center" prop="payType">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.terminal == 'applet'">小程序</span>
|
||||
<span v-else>{{ scope.row.terminal }}</span>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="油品/油枪" align="center" prop="name" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.oilGunNum }}/{{ scope.row.oilName }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="订单金额" align="center" prop="orderAmount"/>
|
||||
<el-table-column label="优惠金额" align="center" prop="discountAmount"/>
|
||||
<el-table-column label="实付金额" align="center" prop="payAmount"/>
|
||||
<el-table-column label="付款类型" align="center" prop="payType">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.payType == 'CASH'">现金支付</span>
|
||||
<span v-else-if="scope.row.payType == 'WECHAT'">微信支付</span>
|
||||
<span v-else-if="scope.row.payType == 'ALIPAY'">支付宝支付</span>
|
||||
<span v-else>{{ scope.row.payType }}</span>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单号" align="center" prop="orderNo" width="220px"/>
|
||||
<el-table-column label="订单类型" align="center" prop="orderType"/>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
@ -23,6 +42,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getOilOrderList } from "@/api/userInfoOrder.js";
|
||||
|
||||
export default {
|
||||
props:["pUserId"],
|
||||
data(){
|
||||
@ -38,11 +59,22 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.userId = this.pUserId;
|
||||
// this.userId = this.pUserId;
|
||||
this.userId = this.$route.query.id;
|
||||
|
||||
this.getList()
|
||||
},
|
||||
methods:{
|
||||
getList(){
|
||||
|
||||
this.loading = true
|
||||
this.queryParams.userId = this.userId
|
||||
getOilOrderList(this.queryParams).then(res=>{
|
||||
if (res.code == 200) {
|
||||
this.list = res.data.records
|
||||
this.total = res.data.total
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,19 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table ref="tables" v-loading="loading" :data="list">
|
||||
<el-table-column label="所属油站" prop="id" align="center"/>
|
||||
<el-table-column label="变动时间" align="center"/>
|
||||
<el-table-column label="类型" align="center" prop="userNo"/>
|
||||
<el-table-column label="变动积分" align="center" prop="name" />
|
||||
<el-table-column label="描述" align="center" prop="balance"/>
|
||||
<el-table-column label="所属油站" prop="storeName" align="center"/>
|
||||
<el-table-column label="变动时间" prop="createTime" align="center"/>
|
||||
<el-table-column label="类型" align="center" prop="changeType">
|
||||
<template slot-scope="scope">
|
||||
|
||||
<el-tag v-if="scope.row.changeType == 0">减少</el-tag>
|
||||
<el-tag type="success" v-else>增加</el-tag>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="变动积分" align="center" prop="pointsChange" />
|
||||
<el-table-column label="变动后积分" align="center" prop="currentPoints" />
|
||||
<el-table-column label="描述" align="center" prop="changeReason"/>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
@ -18,6 +26,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getIntegralDetailList } from "@/api/userInfoOrder.js";
|
||||
|
||||
export default {
|
||||
props:["pUserId"],
|
||||
data(){
|
||||
@ -33,11 +43,22 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.userId = this.pUserId;
|
||||
// this.userId = this.pUserId;
|
||||
this.userId = this.$route.query.id;
|
||||
|
||||
this.getList()
|
||||
},
|
||||
methods:{
|
||||
getList(){
|
||||
|
||||
this.loading = true
|
||||
this.queryParams.userId = this.userId
|
||||
getIntegralDetailList(this.queryParams).then(res=>{
|
||||
if (res.code == 200) {
|
||||
this.list = res.data.records
|
||||
this.total = res.data.total
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -52,6 +52,15 @@ public class IntegralDetailController extends BaseController {
|
||||
return getSuccessResult(iPageList);
|
||||
}
|
||||
|
||||
@GetMapping("queryByPageUni2")
|
||||
public ResponseObject queryByPageUni2(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
|
||||
@Param("integralDetail") IntegralDetail integralDetail) {
|
||||
Page page = new Page(pageNo, pageSize);
|
||||
IPage< IntegralDetail> iPageList = this.integralDetailService.queryByPageUni2(page, integralDetail);
|
||||
return getSuccessResult(iPageList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -91,6 +91,11 @@ public class IntegralOrdersController extends BaseController {
|
||||
return getSuccessResult(this.integralOrdersService.update(integralOrders));
|
||||
}
|
||||
|
||||
@PutMapping("editUni")
|
||||
public ResponseObject editUni(@RequestBody IntegralOrders integralOrders) {
|
||||
return getSuccessResult(this.integralOrdersService.updateUni(integralOrders));
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 处理发货 修改该快递单号
|
||||
// * @param integralOrders
|
||||
|
@ -39,6 +39,8 @@ public class IntegralDetail extends BaseEntity {
|
||||
private String changeReason;
|
||||
|
||||
private String changeType;
|
||||
|
||||
private String storeName;
|
||||
/**
|
||||
* 店铺ID
|
||||
*/
|
||||
|
@ -28,19 +28,20 @@
|
||||
<!--查询指定行数据-->
|
||||
<select id="queryAllByLimit" resultMap="IntegralDetailMap">
|
||||
select
|
||||
id, user_id, points_change, current_points, type, change_reason, store_id, create_time, update_time, create_by, update_by,change_type
|
||||
from integral_detail
|
||||
ms.name storeName, id.id, id.user_id, id.points_change, id.current_points, id.type, id.change_reason, id.store_id, id.create_time, id.update_time, id.create_by, id.update_by,id.change_type
|
||||
from integral_detail id
|
||||
left join mt_store ms on ms.id = id.store_id
|
||||
|
||||
<where>
|
||||
<if test="integralDetail.chainStoreId != null">
|
||||
and chain_store_id = #{integralDetail.chainStoreId}
|
||||
and id.chain_store_id = #{integralDetail.chainStoreId}
|
||||
</if>
|
||||
<if test="integralDetail.storeId != null">
|
||||
and store_id = #{integralDetail.storeId}
|
||||
and id.store_id = #{integralDetail.storeId}
|
||||
</if>
|
||||
<if test="integralDetail.userId != null">
|
||||
and user_id = #{integralDetail.userId}
|
||||
and id.user_id = #{integralDetail.userId}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
|
||||
order by create_time desc
|
||||
|
@ -193,10 +193,10 @@
|
||||
<if test="integralOrders.params.endTime != null and integralOrders.params.endTime != ''">
|
||||
and date_format(io.create_time,'%y%m%d') <= date_format(#{integralOrders.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="integralOrders.orderStatus != null and integralOrders.orderStatus != '' and integralOrders.orderStatus != 0 ">
|
||||
<if test="integralOrders.orderStatus != null and integralOrders.orderStatus != '' ">
|
||||
and (
|
||||
(#{integralOrders.orderStatus} = 1 and (io.order_status = '待处理' or io.order_status = '待发货' or io.order_status = '已发货')) or
|
||||
(#{integralOrders.orderStatus} = 2 and (io.order_status = '已完成')) or
|
||||
(#{integralOrders.orderStatus} = 2 and (io.order_status = '已完成' )) or
|
||||
(#{integralOrders.orderStatus} = 3 and (io.order_status = '已退款' or io.order_status = '已拒绝')) or
|
||||
(#{integralOrders.orderStatus} = 4 and io.order_status = '未支付')
|
||||
)
|
||||
|
@ -32,6 +32,14 @@ public interface IntegralDetailService {
|
||||
IPage<IntegralDetail> queryByPage(@Param("page") Page page, IntegralDetail integralDetail);
|
||||
IPage<IntegralDetail> queryByPageUni(@Param("page") Page page, IntegralDetail integralDetail);
|
||||
|
||||
/**
|
||||
* 后台段 个人统计使用 和上面的区别是获取token的storeId
|
||||
* @param page
|
||||
* @param integralDetail
|
||||
* @return
|
||||
*/
|
||||
IPage<IntegralDetail> queryByPageUni2(@Param("page") Page page, IntegralDetail integralDetail);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
|
@ -55,6 +55,7 @@ public interface IntegralOrdersService {
|
||||
* @return 实例对象
|
||||
*/
|
||||
IntegralOrders update(IntegralOrders integralOrders);
|
||||
IntegralOrders updateUni(IntegralOrders integralOrders);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
|
@ -57,6 +57,13 @@ public class IntegralDetailServiceImpl implements IntegralDetailService {
|
||||
return this.integralDetailMapper.queryAllByLimit(page, integralDetail);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<IntegralDetail> queryByPageUni2(@Param("page") Page page, IntegralDetail integralDetail) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
integralDetail.setStoreId(nowAccountInfo.getStoreId());
|
||||
return this.integralDetailMapper.queryAllByLimit(page, integralDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
|
@ -86,7 +86,7 @@ public class IntegralOrdersServiceImpl implements IntegralOrdersService {
|
||||
public IPage<IntegralOrdersVO> queryByPageUni(@Param("page") Page page, @Param("integralOrders") IntegralOrdersDTO integralOrders) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
integralOrders.setUserId(nowAccountInfo.getId());
|
||||
return integralOrdersDao.queryAllByLimit(page, integralOrders);
|
||||
return integralOrdersDao.queryByPageUni(page, integralOrders);
|
||||
}
|
||||
/**
|
||||
* 新增数据
|
||||
@ -116,6 +116,12 @@ public class IntegralOrdersServiceImpl implements IntegralOrdersService {
|
||||
return this.queryById(integralOrders.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public IntegralOrders updateUni(IntegralOrders integralOrders) {
|
||||
this.integralOrdersDao.update(integralOrders);
|
||||
return this.queryById(integralOrders.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
|
@ -44,6 +44,23 @@ public class CardFavorableRecordController extends BaseController {
|
||||
return getSuccessResult(this.cardFavorableRecordService.select(page,cardFavorableRecord));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询所有数据( 根据用户id查询)
|
||||
*
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param cardFavorableRecord
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("getCardFavorableList")
|
||||
public ResponseObject getCardFavorableList(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
|
||||
@Param("cardFuelDiesel") CardFavorableRecord cardFavorableRecord) {
|
||||
Page page = new Page(pageNo, pageSize);
|
||||
return getSuccessResult(this.cardFavorableRecordService.getCardFavorableList(page,cardFavorableRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
|
@ -1,7 +1,10 @@
|
||||
package com.fuint.business.marketingActivity.cardFavorable.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableRecordVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import java.util.HashMap;
|
||||
|
||||
@ -18,5 +21,8 @@ public interface CardFavorableRecordMapper extends BaseMapper<CardFavorableRecor
|
||||
*/
|
||||
HashMap<String,Integer> selectTotal(@Param("storeId")Integer storeId,@Param("id")Integer id);
|
||||
|
||||
|
||||
IPage<CardFavorableRecordVO> getCardFavorableList(@Param("page")Page page,@Param("cardFavorableRecord") CardFavorableRecord cardFavorableRecord);
|
||||
|
||||
}
|
||||
|
||||
|
@ -22,5 +22,37 @@
|
||||
where store_id = #{storeId}
|
||||
and card_favorable_id = #{id}
|
||||
</select>
|
||||
<select id="getCardFavorableList"
|
||||
resultType="com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableRecordVO">
|
||||
select
|
||||
ms.`name` storeName,
|
||||
cf.name cardFavorableName,
|
||||
cf.type type,
|
||||
cf.full_deduction fullDeduction,
|
||||
cf.discount_amount discountAmount,
|
||||
cf.oil_type oilType,
|
||||
cf.available_period availablePeriod,
|
||||
cfr.status status,
|
||||
cfr.start_time startTime,
|
||||
cfr.end_time endTime,
|
||||
cfr.create_time createTime,
|
||||
cfr.exchange_from exchangeFrom
|
||||
FROM
|
||||
card_favorable_record cfr
|
||||
left join card_favorable cf ON cfr.card_favorable_id = cf.id
|
||||
left join mt_store ms on ms.id = cfr.store_id
|
||||
<where>
|
||||
<if test="cardFavorableRecord.storeId != null">
|
||||
and cfr.store_id = #{cardFavorableRecord.storeId}
|
||||
</if>
|
||||
<if test="cardFavorableRecord.mtUserId != null">
|
||||
and cfr.mt_user_id = #{cardFavorableRecord.mtUserId}
|
||||
</if>
|
||||
<if test="cardFavorableRecord.status != null">
|
||||
and cfr.status = #{cardFavorableRecord.status}
|
||||
</if>
|
||||
</where>
|
||||
order by cfr.create_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableRecordVO;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
@ -24,6 +25,9 @@ public interface CardFavorableRecordService extends IService<CardFavorableRecord
|
||||
*/
|
||||
IPage select(Page page, CardFavorableRecord cardFavorableRecord);
|
||||
|
||||
|
||||
IPage<CardFavorableRecordVO> getCardFavorableList(Page page, CardFavorableRecord cardFavorableRecord);
|
||||
|
||||
/**
|
||||
* 统计优惠券数量
|
||||
* @return
|
||||
|
@ -8,6 +8,7 @@ import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorable;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.mapper.CardFavorableRecordMapper;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableRecordService;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableRecordVO;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -66,9 +67,16 @@ public class CardFavorableRecordServiceImpl extends ServiceImpl<CardFavorableRec
|
||||
return page1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计优惠券使用数量
|
||||
*/
|
||||
|
||||
@Override
|
||||
public IPage<CardFavorableRecordVO> getCardFavorableList(Page page, CardFavorableRecord cardFavorableRecord) {
|
||||
return cardFavorableRecordMapper.getCardFavorableList(page,cardFavorableRecord);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 统计优惠券使用数量
|
||||
*/
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
|
@ -0,0 +1,35 @@
|
||||
package com.fuint.business.marketingActivity.cardFavorable.vo;
|
||||
|
||||
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CardFavorableRecordVO extends CardFavorableRecord {
|
||||
private String storeName;
|
||||
/**
|
||||
* 优惠券名称
|
||||
*/
|
||||
private String cardFavorableName;
|
||||
/**
|
||||
* 优惠券类型
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* 满减金额
|
||||
*/
|
||||
private String fullDeduction;
|
||||
/**
|
||||
* 优惠金额
|
||||
*/
|
||||
private String discountAmount;
|
||||
/**
|
||||
* 可用时段
|
||||
*
|
||||
*/
|
||||
private String availablePeriod;
|
||||
/**
|
||||
* 可用油品
|
||||
*/
|
||||
private String oilType;
|
||||
private String oilName;
|
||||
}
|
@ -4,6 +4,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.marketingActivity.cardFule.entity.CardFuelChange;
|
||||
import com.fuint.business.marketingActivity.cardFule.service.CardFuelChangeService;
|
||||
import com.fuint.business.marketingActivity.cardFule.vo.CardFuelChangeVo;
|
||||
import com.fuint.business.order.entity.CardBalanceChange;
|
||||
import com.fuint.business.order.vo.CardBalanceChangeVo;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@ -43,7 +46,14 @@ public class CardFuelChangeController extends BaseController {
|
||||
return getSuccessResult(iPageList);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("getFuelRecordList")
|
||||
public ResponseObject getFuelRecordList(CardFuelChange cardFuelChange,
|
||||
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
|
||||
Page page =new Page(pageNo,pageSize);
|
||||
IPage<CardFuelChangeVo> list = cardFuelChangeService.getFuelRecordList(page,cardFuelChange);
|
||||
return getSuccessResult(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
|
@ -41,10 +41,10 @@ public class CardFuelChange extends BaseEntity {
|
||||
* 油量变化值
|
||||
*/
|
||||
private Double balance;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
// /**
|
||||
// * 创建时间
|
||||
// */
|
||||
// private Date createTime;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@ -70,6 +70,16 @@ public class CardFuelChange extends BaseEntity {
|
||||
*/
|
||||
private String unit;
|
||||
|
||||
/**
|
||||
* 余额变化之后的值
|
||||
*/
|
||||
private Double afterTheChange;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderNo;
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -3,6 +3,7 @@ package com.fuint.business.marketingActivity.cardFule.mapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.marketingActivity.cardFule.entity.CardFuelChange;
|
||||
import com.fuint.business.marketingActivity.cardFule.vo.CardFuelChangeVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import java.util.List;
|
||||
@ -31,6 +32,7 @@ public interface CardFuelChangeMapper {
|
||||
* @return 对象列表
|
||||
*/
|
||||
IPage<CardFuelChange> queryAllByLimit(@Param("page") Page page, CardFuelChange cardFuelChange);
|
||||
IPage<CardFuelChangeVo> getFuelRecordList(@Param("page") Page page,@Param("cardFuelChange") CardFuelChange cardFuelChange);
|
||||
|
||||
/**
|
||||
* 统计总行数
|
||||
|
@ -127,6 +127,27 @@
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="getFuelRecordList"
|
||||
resultType="com.fuint.business.marketingActivity.cardFule.vo.CardFuelChangeVo">
|
||||
select
|
||||
ms.name storeName,
|
||||
cfc.oil_type oilType,
|
||||
cfc.change_type changeType,
|
||||
cfc.balance balance,
|
||||
cfc.order_no orderNo,
|
||||
cfc.from_type from_type,
|
||||
cfc.create_time createTime
|
||||
from card_fuel_change cfc
|
||||
left join mt_store ms on ms.id = cfc.store_id
|
||||
<where>
|
||||
<if test="cardFuelChange.userId != null">
|
||||
and cfc.user_id = #{cardFuelChange.userId}
|
||||
</if>
|
||||
<if test="cardFuelChange.storeId != null">
|
||||
and cfc.store_id = #{cardFuelChange.storeId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
||||
|
@ -3,6 +3,7 @@ package com.fuint.business.marketingActivity.cardFule.service;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.marketingActivity.cardFule.entity.CardFuelChange;
|
||||
import com.fuint.business.marketingActivity.cardFule.vo.CardFuelChangeVo;
|
||||
import io.lettuce.core.dynamic.annotation.Param;
|
||||
|
||||
|
||||
@ -31,6 +32,9 @@ public interface CardFuelChangeService {
|
||||
*/
|
||||
IPage<CardFuelChange> queryByPage(@Param("page") Page page, CardFuelChange cardFuelChange);
|
||||
|
||||
|
||||
IPage<CardFuelChangeVo> getFuelRecordList(@Param("page") Page page, CardFuelChange cardFuelChange);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.marketingActivity.cardFule.entity.CardFuelChange;
|
||||
import com.fuint.business.marketingActivity.cardFule.mapper.CardFuelChangeMapper;
|
||||
import com.fuint.business.marketingActivity.cardFule.service.CardFuelChangeService;
|
||||
import com.fuint.business.marketingActivity.cardFule.vo.CardFuelChangeVo;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import io.lettuce.core.dynamic.annotation.Param;
|
||||
@ -50,6 +51,14 @@ public class CardFuelChangeServiceImpl implements CardFuelChangeService {
|
||||
return this.cardFuelChangeMapper.queryAllByLimit(page, cardFuelChange);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<CardFuelChangeVo> getFuelRecordList(@Param("page") Page page, CardFuelChange cardFuelChange) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
cardFuelChange.setStoreId(nowAccountInfo.getStoreId());
|
||||
return this.cardFuelChangeMapper.getFuelRecordList(page, cardFuelChange);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
|
@ -0,0 +1,9 @@
|
||||
package com.fuint.business.marketingActivity.cardFule.vo;
|
||||
|
||||
import com.fuint.business.marketingActivity.cardFule.entity.CardFuelChange;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CardFuelChangeVo extends CardFuelChange {
|
||||
private String storeName;
|
||||
}
|
@ -16,6 +16,7 @@ import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@ -49,6 +50,16 @@ public class CardValueRecordController extends BaseController {
|
||||
return getSuccessResult(this.cardValueRecordService.page(page, new QueryWrapper<>(cardValueRecord)));
|
||||
}
|
||||
|
||||
/**
|
||||
*导出订单
|
||||
*@paramresponse
|
||||
*/
|
||||
@PostMapping("exportExcel")
|
||||
public void exportExcel(HttpServletResponse response,@RequestBody CardValueRecord cardValueRecord) {
|
||||
this.cardValueRecordService.export(response, cardValueRecord);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
|
@ -6,8 +6,11 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.integral.entity.IntegralDetail;
|
||||
import com.fuint.business.marketingActivity.cardValue.dto.CardValueRecordDTO;
|
||||
import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord;
|
||||
import com.fuint.business.marketingActivity.cardValue.vo.Excel.CardValueRecordExcel;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 储值充值表(CardValueRecord)表数据库访问层
|
||||
*
|
||||
@ -20,6 +23,8 @@ public interface CardValueRecordMapper extends BaseMapper<CardValueRecord> {
|
||||
|
||||
IPage<CardValueRecordDTO> selectAllRecord(@Param("page") Page page, @Param("cardValueRecord") CardValueRecordDTO cardValueRecord);
|
||||
|
||||
List<CardValueRecordExcel> selectListExport(@Param("cardValueRecord") CardValueRecord cardValueRecord);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,26 @@
|
||||
|
||||
<select id="selectCardRecord"
|
||||
resultType="com.fuint.business.marketingActivity.cardValue.dto.CardValueRecordDTO">
|
||||
|
||||
SELECT
|
||||
mt_user_id mtUserId,
|
||||
recharge_balance rechargeBalance,
|
||||
gift_balance giftBalance,
|
||||
create_time createTime,
|
||||
chain_store_id chainStoreId,
|
||||
store_id storeId
|
||||
FROM card_value_record
|
||||
<where>
|
||||
<if test="cardValueRecord.mtUserId != null">
|
||||
and mt_user_id = #{cardValueRecord.mtUserId}
|
||||
</if>
|
||||
<if test="cardValueRecord.storeId != null">
|
||||
and store_id = #{cardValueRecord.storeId}
|
||||
</if>
|
||||
<if test="cardValueRecord.recordName != null">
|
||||
and record_name = #{cardValueRecord.recordName}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY createTime
|
||||
</select>
|
||||
|
||||
|
||||
@ -36,6 +55,46 @@
|
||||
</where>
|
||||
ORDER BY combined_result.createTime
|
||||
</select>
|
||||
<select id="selectListExport"
|
||||
resultType="com.fuint.business.marketingActivity.cardValue.vo.Excel.CardValueRecordExcel">
|
||||
select
|
||||
name name,
|
||||
mobile mobile,
|
||||
real_name realName,
|
||||
staff_mobile staffMobile,
|
||||
bid_balance bidBalance,
|
||||
recharge_balance rechargeBalance,
|
||||
gift_balance giftBalance,
|
||||
payment_type paymentType,
|
||||
CASE
|
||||
WHEN pay_status = 'paid' THEN '已支付'
|
||||
WHEN pay_status = 'payFail' THEN '支付失败'
|
||||
WHEN pay_status = 'unpaid' THEN '未支付'
|
||||
ELSE '未知'
|
||||
END AS payStatus,
|
||||
remark remark,
|
||||
fringe_benefit fringeBenefit,
|
||||
create_time createTime
|
||||
FROM card_value_record
|
||||
<where>
|
||||
<if test="cardValueRecord.mtUserId != null">
|
||||
and mt_user_id = #{cardValueRecord.mtUserId}
|
||||
</if>
|
||||
<if test="cardValueRecord.storeId != null">
|
||||
and store_id = #{cardValueRecord.storeId}
|
||||
</if>
|
||||
<if test="cardValueRecord.mtStaffId != null">
|
||||
and mt_staff_id = #{cardValueRecord.mtStaffId}
|
||||
</if>
|
||||
<if test="cardValueRecord.mobile != null">
|
||||
and mobile = #{cardValueRecord.mobile}
|
||||
</if>
|
||||
<if test="cardValueRecord.paymentType != null">
|
||||
and payment_type = #{cardValueRecord.paymentType}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
|
||||
|
@ -9,6 +9,8 @@ import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilGun;
|
||||
import io.lettuce.core.dynamic.annotation.Param;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* 储值充值表(CardValueRecord)表服务接口
|
||||
*
|
||||
@ -43,5 +45,5 @@ public interface CardValueRecordService extends IService<CardValueRecord> {
|
||||
|
||||
IPage<CardValueRecordDTO> selectAllRecord(@Param("page") Page page, CardValueRecordDTO cardValueRecord);
|
||||
|
||||
|
||||
void export(HttpServletResponse response, CardValueRecord cardValueRecord);
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.fuint.business.marketingActivity.cardValue.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@ -16,6 +17,7 @@ import com.fuint.business.marketingActivity.cardValue.dto.CardValueRecordDTO;
|
||||
import com.fuint.business.marketingActivity.cardValue.mapper.CardValueRecordMapper;
|
||||
import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord;
|
||||
import com.fuint.business.marketingActivity.cardValue.service.CardValueRecordService;
|
||||
import com.fuint.business.marketingActivity.cardValue.vo.Excel.CardValueRecordExcel;
|
||||
import com.fuint.business.order.entity.CardBalanceChange;
|
||||
import com.fuint.business.order.service.CardBalanceChangeService;
|
||||
import com.fuint.business.userManager.entity.LJUser;
|
||||
@ -33,6 +35,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
@ -288,6 +291,8 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
|
||||
|
||||
@Override
|
||||
public IPage<CardValueRecordDTO> selectCardRecord(@Param("page") Page page, CardValueRecordDTO cardValueRecord) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
cardValueRecord.setStoreId(nowAccountInfo.getStoreId());
|
||||
return this.cardValueRecordMapper.selectCardRecord(page, cardValueRecord);
|
||||
}
|
||||
|
||||
@ -296,6 +301,31 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
|
||||
return this.cardValueRecordMapper.selectAllRecord(page, cardValueRecord);
|
||||
}
|
||||
|
||||
public void export(HttpServletResponse response, CardValueRecord cardValueRecord) {
|
||||
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
Integer storeId = nowAccountInfo.getStoreId();
|
||||
cardValueRecord.setStoreId(storeId);
|
||||
List<CardValueRecordExcel> cashierOrderExcels = baseMapper.selectListExport(cardValueRecord);
|
||||
|
||||
// 设置文件名字
|
||||
String fileName = "订单"+System.currentTimeMillis() + ".xlsx";
|
||||
|
||||
// 设置响应头信息
|
||||
response.setContentType("application/vnd.ms-excel");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
response.setHeader("Content-disposition", "attachment;filename=demo.xlsx");
|
||||
|
||||
|
||||
try{
|
||||
// 写入文件数据
|
||||
EasyExcel.write(response.getOutputStream(), CardValueRecordExcel.class).sheet("download").doWrite(cashierOrderExcels);
|
||||
}catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,59 @@
|
||||
package com.fuint.business.marketingActivity.cardValue.vo.Excel;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CardValueRecordExcel {
|
||||
|
||||
@ExcelProperty("会员名称")
|
||||
@ColumnWidth(15)
|
||||
private String name;
|
||||
|
||||
@ExcelProperty("会员手机号")
|
||||
@ColumnWidth(15)
|
||||
private String mobile;
|
||||
|
||||
@ExcelProperty("操作人")
|
||||
@ColumnWidth(15)
|
||||
private String realName;
|
||||
|
||||
@ExcelProperty("操作人手机号")
|
||||
@ColumnWidth(15)
|
||||
private String staffMobile;
|
||||
|
||||
@ExcelProperty("储值卡面值")
|
||||
@ColumnWidth(15)
|
||||
private String bidBalance;
|
||||
|
||||
@ExcelProperty("储值卡实售金额")
|
||||
@ColumnWidth(15)
|
||||
private String rechargeBalance;
|
||||
|
||||
@ExcelProperty("储值卡赠送金额")
|
||||
@ColumnWidth(15)
|
||||
private String giftBalance;
|
||||
|
||||
@ExcelProperty("支付方式")
|
||||
@ColumnWidth(15)
|
||||
private String paymentType;
|
||||
|
||||
@ExcelProperty("支付状态")
|
||||
@ColumnWidth(15)
|
||||
private String payStatus;
|
||||
|
||||
@ExcelProperty("充值备注")
|
||||
@ColumnWidth(15)
|
||||
private String remark;
|
||||
|
||||
@ExcelProperty("附加福利")
|
||||
@ColumnWidth(15)
|
||||
private String fringeBenefit;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
@ColumnWidth(15)
|
||||
private String createTime;
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.fuint.business.order.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.order.entity.CardBalanceChange;
|
||||
import com.fuint.business.order.entity.CashierOrder;
|
||||
import com.fuint.business.order.service.CardBalanceChangeService;
|
||||
import com.fuint.business.order.service.CashierOrderService;
|
||||
import com.fuint.business.order.vo.CardBalanceChangeVo;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/business/CardBalanceChange")
|
||||
public class CardBalanceChangeController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private CardBalanceChangeService cardBalanceChangeService;
|
||||
|
||||
|
||||
@GetMapping("getCardRecordList")
|
||||
public ResponseObject getCardRecordList(CardBalanceChange cardBalanceChange,
|
||||
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
|
||||
Page page =new Page(pageNo,pageSize);
|
||||
IPage<CardBalanceChangeVo> list = cardBalanceChangeService.getCardRecordList(page,cardBalanceChange);
|
||||
return getSuccessResult(list);
|
||||
}
|
||||
}
|
@ -9,6 +9,8 @@ import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* 收银员订单信息 controller层
|
||||
*/
|
||||
@ -34,6 +36,15 @@ public class CashierOrderController extends BaseController {
|
||||
return getSuccessResult(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出订单
|
||||
* @param response
|
||||
*/
|
||||
@PostMapping("exportExcel")
|
||||
public void exportExcel(HttpServletResponse response,@RequestBody CashierOrder order) {
|
||||
this.cashierOrderService.export(response, order);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询收银台订单详情
|
||||
* @param id
|
||||
|
@ -4,12 +4,14 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.order.entity.LJOrder;
|
||||
import com.fuint.business.order.service.LJOrderService;
|
||||
import com.fuint.business.order.vo.LJOrderVo;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@ -37,6 +39,31 @@ public class LJOrderController extends BaseController {
|
||||
return getSuccessResult(list);
|
||||
}
|
||||
|
||||
/**
|
||||
*导出订单
|
||||
*@paramresponse
|
||||
*/
|
||||
@PostMapping("exportExcel")
|
||||
public void exportExcel(HttpServletResponse response,@RequestBody LJOrder order) {
|
||||
this.orderService.export(response, order);
|
||||
}
|
||||
|
||||
/**
|
||||
* 个人订单查询
|
||||
* @param order
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getMtOrderList")
|
||||
public ResponseObject getMtOrderList(LJOrder order,
|
||||
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
|
||||
Page page =new Page(pageNo,pageSize);
|
||||
IPage<LJOrderVo> list = orderService.getMtOrderList(page,order);
|
||||
return getSuccessResult(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据订单号查询订单信息
|
||||
* @param map
|
||||
|
@ -12,6 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -37,6 +38,15 @@ public class OilOrderController extends BaseController {
|
||||
return getSuccessResult(list);
|
||||
}
|
||||
|
||||
/**
|
||||
*导出订单
|
||||
*@paramresponse
|
||||
*/
|
||||
@PostMapping("exportExcel")
|
||||
public void exportExcel(HttpServletResponse response, @RequestBody OilOrder order) {
|
||||
this.orderService.export(response, order);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据userId查询会员订单信息
|
||||
* @param order
|
||||
@ -53,6 +63,23 @@ public class OilOrderController extends BaseController {
|
||||
return getSuccessResult(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据userId查询会员订单信息 (传参)
|
||||
* @param order
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/userOrders2")
|
||||
public ResponseObject oilOrderList2(OilOrder order,
|
||||
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
|
||||
Page page =new Page(pageNo,pageSize);
|
||||
IPage<OilOrderVo> list = orderService.selectOilOrderByUserId2(page,order);
|
||||
return getSuccessResult(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询油品订单信息
|
||||
* @param id
|
||||
|
@ -51,5 +51,16 @@ public class CardBalanceChange extends BaseEntity implements Serializable {
|
||||
*/
|
||||
private Double balance;
|
||||
|
||||
/**
|
||||
* 余额变化之后的值
|
||||
*/
|
||||
private Double afterTheChange;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderNo;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,15 @@
|
||||
package com.fuint.business.order.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.order.entity.CardBalanceChange;
|
||||
import com.fuint.business.order.entity.CashierOrder;
|
||||
import com.fuint.business.order.vo.CardBalanceChangeVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface CardBalanceChangeMapper extends BaseMapper<CardBalanceChange> {
|
||||
|
||||
IPage<CardBalanceChangeVo> getCardRecordList(@Param("page")Page page, @Param("cardBalanceChange") CardBalanceChange cardBalanceChange);
|
||||
|
||||
}
|
||||
|
@ -5,8 +5,11 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.order.entity.CashierOrder;
|
||||
import com.fuint.business.order.vo.CashierOrderVo;
|
||||
import com.fuint.business.order.vo.Excel.CashierOrderExcel;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public interface CashierOrderMapper extends BaseMapper<CashierOrder> {
|
||||
/**
|
||||
@ -17,6 +20,9 @@ public interface CashierOrderMapper extends BaseMapper<CashierOrder> {
|
||||
*/
|
||||
public IPage<CashierOrder> selectCashierOrderList(Page page, @Param("order") CashierOrder order);
|
||||
|
||||
|
||||
List<CashierOrderExcel> selectCashierOrderListExport(@Param("order") CashierOrder order);
|
||||
|
||||
/**
|
||||
* 根据id查询收银台订单详情
|
||||
* @param id
|
||||
|
@ -4,8 +4,12 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.order.entity.LJOrder;
|
||||
import com.fuint.business.order.vo.Excel.LJOrderExcel;
|
||||
import com.fuint.business.order.vo.LJOrderVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单信息 Mapper层
|
||||
*/
|
||||
@ -17,4 +21,9 @@ public interface LJOrderMapper extends BaseMapper<LJOrder> {
|
||||
* @return
|
||||
*/
|
||||
public IPage<LJOrder> selectOrderList(Page page, @Param("order") LJOrder order);
|
||||
|
||||
List<LJOrderExcel> selectOrderListExcel(@Param("order") LJOrder order);
|
||||
|
||||
|
||||
IPage<LJOrderVo> getMtOrderList(Page page, @Param("order") LJOrder order);
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.order.entity.OilOrder;
|
||||
import com.fuint.business.order.vo.Excel.OilOrderExcel;
|
||||
import com.fuint.business.order.vo.OilOrderVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@ -22,6 +23,8 @@ public interface OilOrderMapper extends BaseMapper<OilOrder> {
|
||||
*/
|
||||
public IPage<OilOrder> selectOilOrderList(Page page, @Param("order") OilOrder order);
|
||||
|
||||
List<OilOrderExcel> selectOilOrderListExcel(@Param("order") OilOrder order);
|
||||
|
||||
/**
|
||||
* 根据userid查询油品订单信息
|
||||
* @param page
|
||||
@ -30,6 +33,8 @@ public interface OilOrderMapper extends BaseMapper<OilOrder> {
|
||||
*/
|
||||
public IPage<OilOrder> selectOilOrderByUserId(Page page, @Param("order") OilOrder order);
|
||||
|
||||
public IPage<OilOrderVo> selectOilOrderByUserId2(Page page, @Param("order") OilOrder order);
|
||||
|
||||
/**
|
||||
* 根据订单号模糊查询油品订单信息
|
||||
* @param orderNo
|
||||
|
@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.fuint.business.order.mapper.CardBalanceChangeMapper">
|
||||
|
||||
<select id="getCardRecordList" resultType="com.fuint.business.order.vo.CardBalanceChangeVo">
|
||||
select
|
||||
ms.name storeName,
|
||||
|
||||
cbc.change_type changeType,
|
||||
cbc.from_type fromType,
|
||||
cbc.after_the_change afterTheChange,
|
||||
cbc.order_no orderNo,
|
||||
cbc.from_type fromType,
|
||||
cbc.create_time createTime,
|
||||
cbc.balance balance
|
||||
from
|
||||
card_balance_change cbc
|
||||
left join mt_store ms on ms.id = cbc.store_id
|
||||
<where>
|
||||
<if test="cardBalanceChange.userId != null">
|
||||
and cbc.user_id = #{cardBalanceChange.userId}
|
||||
</if>
|
||||
<if test="cardBalanceChange.storeId != null">
|
||||
and cbc.store_id = #{cardBalanceChange.storeId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
@ -33,4 +33,46 @@
|
||||
where co.id = #{id};
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="selectCashierOrderListExport" resultType="com.fuint.business.order.vo.Excel.CashierOrderExcel">
|
||||
select
|
||||
st.real_name realName,
|
||||
st.mobile,
|
||||
co.order_no orderNo,
|
||||
co.amount amount,
|
||||
co.pay_amount payAmount,
|
||||
co.oil_order_amount oilOrderAmount,
|
||||
co.goods_order_amount goodsOrderAmount,
|
||||
co.pay_user payUser,
|
||||
CASE
|
||||
WHEN co.status = 'paid' THEN '已支付'
|
||||
WHEN co.status = 'payFail' THEN '支付失败'
|
||||
WHEN co.status = 'unpaid' THEN '未支付'
|
||||
ELSE '未知'
|
||||
END AS status,
|
||||
co.pay_time payTime
|
||||
from cashier_order co
|
||||
left join mt_staff st on co.staff_id = st.id
|
||||
<where>
|
||||
co.store_id = #{order.storeId}
|
||||
<if test="order.staffId != null and order.staffId != ''">
|
||||
and co.staff_id = #{order.staffId}
|
||||
</if>
|
||||
<if test="order.orderNo != null and order.orderNo != ''">
|
||||
and order_no like concat('%', #{order.orderNo}, '%')
|
||||
</if>
|
||||
<if test="order.terminal != null and order.terminal != ''">
|
||||
and terminal like concat('%', #{order.terminal}, '%')
|
||||
</if>
|
||||
<if test="order.params.beginTime != null and order.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(pay_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(pay_time,'%y%m%d') <= date_format(#{order.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -29,4 +29,70 @@
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="getMtOrderList" resultType="com.fuint.business.order.vo.LJOrderVo">
|
||||
|
||||
select
|
||||
ms.name storeName,
|
||||
oo.create_time createTime,
|
||||
oo.amount amount,
|
||||
oo.pay_amount payAmount,
|
||||
oo.goods_num goodsNum,
|
||||
oo.pay_type payType,
|
||||
oo.order_no orderNo
|
||||
from mt_order oo
|
||||
left join mt_store ms on ms.id = oo.store_id
|
||||
<where>
|
||||
<if test="order.userId != null">
|
||||
and oo.user_id = #{order.userId}
|
||||
</if>
|
||||
<if test="order.storeId != null">
|
||||
and oo.store_id = #{order.storeId}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
<select id="selectOrderListExcel" resultType="com.fuint.business.order.vo.Excel.LJOrderExcel">
|
||||
select
|
||||
st.real_name realName,
|
||||
st.mobile,
|
||||
oo.terminal terminal,
|
||||
oo.order_no orderNo,
|
||||
oo.amount amount,
|
||||
oo.discount discount,
|
||||
oo.goods_num goodsNum,
|
||||
oo.pay_amount payAmount,
|
||||
oo.pay_user payUser,
|
||||
oo.pay_type payType,
|
||||
oo.pay_time payTime,
|
||||
CASE
|
||||
WHEN oo.status = 'paid' THEN '已支付'
|
||||
WHEN oo.status = 'payFail' THEN '支付失败'
|
||||
WHEN oo.status = 'unpaid' THEN '未支付'
|
||||
ELSE '未知'
|
||||
END AS status
|
||||
from mt_order oo
|
||||
left join mt_staff st on oo.staff_id = st.id
|
||||
<where>
|
||||
oo.store_id = #{order.storeId}
|
||||
<if test="order.staffId != null and order.staffId != ''">
|
||||
and staff_id = #{order.staffId}
|
||||
</if>
|
||||
<if test="order.payType != null and order.payType != ''">
|
||||
and pay_type = #{order.payType}
|
||||
</if>
|
||||
<if test="order.orderNo != null and order.orderNo != ''">
|
||||
and order_no like concat('%', #{order.orderNo}, '%')
|
||||
</if>
|
||||
<if test="order.payUser != null and order.payUser != ''">
|
||||
and pay_user like concat('%', #{order.payUser}, '%')
|
||||
</if>
|
||||
<if test="order.params.beginTime != null and order.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(oo.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(oo.create_time,'%y%m%d') <= date_format(#{order.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
|
@ -76,4 +76,91 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="selectOilOrderByUserId2" resultType="com.fuint.business.order.vo.OilOrderVo">
|
||||
select
|
||||
ms.name storeName,
|
||||
onu.oil_name oilName,
|
||||
oo.create_time createTime,
|
||||
oo.pay_type payType,
|
||||
oo.terminal terminal,
|
||||
oo.oil_gun_num oilGunNum,
|
||||
oo.order_amount orderAmount,
|
||||
oo.discount_amount discountAmount,
|
||||
oo.pay_amount payAmount,
|
||||
oo.pay_type payType,
|
||||
oo.order_no orderNo,
|
||||
oo.order_type orderType
|
||||
from oil_order oo
|
||||
left join oil_name onu on oo.oils = onu.id
|
||||
left join mt_store ms on ms.id = oo.store_id
|
||||
<where>
|
||||
<if test="order.userId != null">
|
||||
and user_id = #{order.userId}
|
||||
</if>
|
||||
<if test="order.storeId != null">
|
||||
and store_id = #{order.storeId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOilOrderListExcel" resultType="com.fuint.business.order.vo.Excel.OilOrderExcel">
|
||||
select
|
||||
st.real_name realName,
|
||||
st.mobile,
|
||||
co.terminal terminal,
|
||||
onu.oil_name oilName,
|
||||
co.order_no orderNo,
|
||||
CONCAT(onu.oil_name ,'/', co.oil_gun_num) oilGunNum,
|
||||
co.order_amount orderAmount,
|
||||
co.discount_amount discountAmount,
|
||||
co.pay_amount payAmount,
|
||||
co.pay_user payUser,
|
||||
CASE
|
||||
WHEN co.order_status = 'paid' THEN '已支付'
|
||||
WHEN co.order_status = 'payFail' THEN '支付失败'
|
||||
WHEN co.order_status = 'unpaid' THEN '未支付'
|
||||
ELSE '未知'
|
||||
END AS orderStatus,
|
||||
co.invoicing invoicing,
|
||||
co.pay_time payTime
|
||||
from oil_order co
|
||||
left join oil_name onu on co.oils = onu.id
|
||||
left join mt_staff st on co.staff_id = st.id
|
||||
<where>
|
||||
co.store_id = #{order.storeId}
|
||||
<if test="order.userId != null and order.userId != ''">
|
||||
and user_id = #{order.userId}
|
||||
</if>
|
||||
<if test="order.staffId != null and order.staffId != ''">
|
||||
and staff_id = #{order.staffId}
|
||||
</if>
|
||||
<if test="order.terminal != null and order.terminal != ''">
|
||||
and terminal = #{order.terminal}
|
||||
</if>
|
||||
<if test="order.oilGunNum != null and order.oilGunNum != ''">
|
||||
and oil_gun_num = #{order.oilGunNum}
|
||||
</if>
|
||||
<if test="order.payType != null and order.payType != ''">
|
||||
and pay_type = #{order.payType}
|
||||
</if>
|
||||
<if test="order.orderStatus != null and order.orderStatus != ''">
|
||||
and order_status != #{order.orderStatus}
|
||||
</if>
|
||||
<if test="order.orderNo != null and order.orderNo != ''">
|
||||
and order_no like concat('%', #{order.orderNo}, '%')
|
||||
</if>
|
||||
<if test="order.payUser != null and order.payUser != ''">
|
||||
and pay_user like concat('%', #{order.payUser}, '%')
|
||||
</if>
|
||||
<if test="order.params.beginTime != null and order.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(pay_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(pay_time,'%y%m%d') <= date_format(#{order.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -1,7 +1,11 @@
|
||||
package com.fuint.business.order.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.fuint.business.order.entity.CardBalanceChange;
|
||||
import com.fuint.business.order.entity.CashierOrder;
|
||||
import com.fuint.business.order.vo.CardBalanceChangeVo;
|
||||
|
||||
public interface CardBalanceChangeService extends IService<CardBalanceChange> {
|
||||
/**
|
||||
@ -10,4 +14,8 @@ public interface CardBalanceChangeService extends IService<CardBalanceChange> {
|
||||
* @return
|
||||
*/
|
||||
public int insertCardBalance(CardBalanceChange cardBalanceChange);
|
||||
|
||||
|
||||
IPage<CardBalanceChangeVo> getCardRecordList(Page page, CardBalanceChange cardBalanceChange);
|
||||
|
||||
}
|
||||
|
@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.fuint.business.order.entity.CashierOrder;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* 收银员订单信息 业务层
|
||||
*/
|
||||
@ -17,6 +19,8 @@ public interface CashierOrderService extends IService<CashierOrder> {
|
||||
*/
|
||||
public IPage<CashierOrder> selectCashierOrderList(Page page, CashierOrder order);
|
||||
|
||||
void export(HttpServletResponse response, CashierOrder order);
|
||||
|
||||
/**
|
||||
* 根据id查询商品订单信息
|
||||
* @param id
|
||||
|
@ -4,6 +4,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.fuint.business.order.entity.LJOrder;
|
||||
import com.fuint.business.order.vo.LJOrderVo;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* 订单信息 业务层
|
||||
@ -17,6 +20,12 @@ public interface LJOrderService extends IService<LJOrder> {
|
||||
*/
|
||||
public IPage<LJOrder> selectOrderList(Page page, LJOrder order);
|
||||
|
||||
void export(HttpServletResponse response, LJOrder order);
|
||||
|
||||
|
||||
|
||||
public IPage<LJOrderVo> getMtOrderList(Page page, LJOrder order);
|
||||
|
||||
/**
|
||||
* 根据订单号查询商品订单信息
|
||||
* @param orderNo
|
||||
|
@ -4,9 +4,11 @@ import com.alibaba.fastjson2.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.fuint.business.order.entity.CashierOrder;
|
||||
import com.fuint.business.order.entity.OilOrder;
|
||||
import com.fuint.business.order.vo.OilOrderVo;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -22,6 +24,9 @@ public interface OilOrderService extends IService<OilOrder> {
|
||||
*/
|
||||
public IPage<OilOrder> selectOilOrderList(Page page, OilOrder order);
|
||||
|
||||
void export(HttpServletResponse response, OilOrder order);
|
||||
|
||||
|
||||
/**
|
||||
* 根据条件分页查询油品订单信息
|
||||
* @param page
|
||||
@ -29,6 +34,7 @@ public interface OilOrderService extends IService<OilOrder> {
|
||||
* @return
|
||||
*/
|
||||
public IPage<OilOrder> selectOilOrderByUserId(Page page, OilOrder order);
|
||||
public IPage<OilOrderVo> selectOilOrderByUserId2(Page page, OilOrder order);
|
||||
|
||||
/**
|
||||
* 根据订单号查询油品订单信息
|
||||
|
@ -1,9 +1,13 @@
|
||||
package com.fuint.business.order.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.order.entity.CardBalanceChange;
|
||||
import com.fuint.business.order.entity.CashierOrder;
|
||||
import com.fuint.business.order.mapper.CardBalanceChangeMapper;
|
||||
import com.fuint.business.order.service.CardBalanceChangeService;
|
||||
import com.fuint.business.order.vo.CardBalanceChangeVo;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -18,4 +22,13 @@ public class CardBalanceChangeServiceImpl extends ServiceImpl<CardBalanceChangeM
|
||||
int row = baseMapper.insert(cardBalanceChange);
|
||||
return row;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<CardBalanceChangeVo> getCardRecordList(Page page, CardBalanceChange cardBalanceChange) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
Integer storeId = nowAccountInfo.getStoreId();
|
||||
cardBalanceChange.setStoreId(storeId);
|
||||
IPage<CardBalanceChangeVo> cardBalanceChangeVoIPage = baseMapper.getCardRecordList(page, cardBalanceChange);
|
||||
return cardBalanceChangeVoIPage;
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.fuint.business.order.service.impl;
|
||||
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@ -8,10 +9,16 @@ import com.fuint.business.order.entity.CashierOrder;
|
||||
import com.fuint.business.order.mapper.CashierOrderMapper;
|
||||
import com.fuint.business.order.service.CashierOrderService;
|
||||
import com.fuint.business.order.vo.CashierOrderVo;
|
||||
import com.fuint.business.order.vo.Excel.CashierOrderExcel;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilTank;
|
||||
import com.fuint.business.petrolStationManagement.vo.OilTankExcel;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class CashierOrderServiceImpl extends ServiceImpl<CashierOrderMapper, CashierOrder> implements CashierOrderService {
|
||||
@Override
|
||||
@ -23,6 +30,32 @@ public class CashierOrderServiceImpl extends ServiceImpl<CashierOrderMapper, Cas
|
||||
return cashierOrderIPage;
|
||||
}
|
||||
|
||||
public void export(HttpServletResponse response, CashierOrder order) {
|
||||
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
Integer storeId = nowAccountInfo.getStoreId();
|
||||
order.setStoreId(storeId);
|
||||
List<CashierOrderExcel> cashierOrderExcels = baseMapper.selectCashierOrderListExport(order);
|
||||
|
||||
// 设置文件名字
|
||||
String fileName = "订单"+System.currentTimeMillis() + ".xlsx";
|
||||
|
||||
// 设置响应头信息
|
||||
response.setContentType("application/vnd.ms-excel");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
response.setHeader("Content-disposition", "attachment;filename=demo.xlsx");
|
||||
|
||||
|
||||
try{
|
||||
// 写入文件数据
|
||||
EasyExcel.write(response.getOutputStream(), CashierOrderExcel.class).sheet("download").doWrite(cashierOrderExcels);
|
||||
}catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public CashierOrder queryCashierOrder(int id) {
|
||||
CashierOrderVo cashierOrderVo = baseMapper.selectCashierOrderById(id);
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.fuint.business.order.service.impl;
|
||||
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@ -11,11 +12,16 @@ import com.fuint.business.convenienceSore.service.StockTrackService;
|
||||
import com.fuint.business.order.entity.LJOrder;
|
||||
import com.fuint.business.order.mapper.LJOrderMapper;
|
||||
import com.fuint.business.order.service.LJOrderService;
|
||||
import com.fuint.business.order.vo.Excel.LJOrderExcel;
|
||||
import com.fuint.business.order.vo.LJOrderVo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class LJOrderServiceImpl extends ServiceImpl<LJOrderMapper, LJOrder> implements LJOrderService {
|
||||
@Override
|
||||
@ -27,6 +33,41 @@ public class LJOrderServiceImpl extends ServiceImpl<LJOrderMapper, LJOrder> impl
|
||||
return ljOrderIPage;
|
||||
}
|
||||
|
||||
public void export(HttpServletResponse response, LJOrder order) {
|
||||
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
Integer storeId = nowAccountInfo.getStoreId();
|
||||
order.setStoreId(storeId);
|
||||
List<LJOrderExcel> lJOrderExcels = baseMapper.selectOrderListExcel(order);
|
||||
|
||||
// 设置文件名字
|
||||
String fileName = "订单"+System.currentTimeMillis() + ".xlsx";
|
||||
|
||||
// 设置响应头信息
|
||||
response.setContentType("application/vnd.ms-excel");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
response.setHeader("Content-disposition", "attachment;filename=demo.xlsx");
|
||||
|
||||
|
||||
try{
|
||||
// 写入文件数据
|
||||
EasyExcel.write(response.getOutputStream(), LJOrderExcel.class).sheet("download").doWrite(lJOrderExcels);
|
||||
}catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IPage<LJOrderVo> getMtOrderList(Page page, LJOrder order) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
Integer storeId = nowAccountInfo.getStoreId();
|
||||
order.setStoreId(storeId);
|
||||
IPage<LJOrderVo> ljOrderIPage = baseMapper.getMtOrderList(page, order);
|
||||
return ljOrderIPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LJOrder selectGoodsOrder(String orderNo) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.fuint.business.order.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
@ -16,6 +17,7 @@ import com.fuint.business.convenienceSore.service.LJGoodsService;
|
||||
import com.fuint.business.order.entity.*;
|
||||
import com.fuint.business.order.mapper.OilOrderMapper;
|
||||
import com.fuint.business.order.service.*;
|
||||
import com.fuint.business.order.vo.Excel.OilOrderExcel;
|
||||
import com.fuint.business.order.vo.OilOrderVo;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilName;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilNumber;
|
||||
@ -40,6 +42,7 @@ import com.fuint.system.config.service.SysConfigService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
@ -75,6 +78,31 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
return oilOrderIPage;
|
||||
}
|
||||
|
||||
public void export(HttpServletResponse response, OilOrder order) {
|
||||
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
Integer storeId = nowAccountInfo.getStoreId();
|
||||
order.setStoreId(storeId);
|
||||
List<OilOrderExcel> cashierOrderExcels = baseMapper.selectOilOrderListExcel(order);
|
||||
|
||||
// 设置文件名字
|
||||
// String fileName = "订单"+System.currentTimeMillis() + ".xlsx";
|
||||
|
||||
// 设置响应头信息
|
||||
response.setContentType("application/vnd.ms-excel");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
response.setHeader("Content-disposition", "attachment;filename=demo.xlsx");
|
||||
|
||||
|
||||
try{
|
||||
// 写入文件数据
|
||||
EasyExcel.write(response.getOutputStream(), OilOrderExcel.class).sheet("download").doWrite(cashierOrderExcels);
|
||||
}catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<OilOrder> selectOilOrderByUserId(Page page, OilOrder order) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
@ -83,6 +111,14 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
return iPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<OilOrderVo> selectOilOrderByUserId2(Page page, OilOrder order) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
order.setStoreId(nowAccountInfo.getStoreId());
|
||||
IPage<OilOrderVo> iPage = baseMapper.selectOilOrderByUserId2(page,order);
|
||||
return iPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OilOrder selectOilOrderByOrderNo(String orderNo) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
|
@ -0,0 +1,9 @@
|
||||
package com.fuint.business.order.vo;
|
||||
|
||||
import com.fuint.business.order.entity.CardBalanceChange;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CardBalanceChangeVo extends CardBalanceChange {
|
||||
private String storeName;
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.fuint.business.order.vo.Excel;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CashierOrderExcel {
|
||||
// 员工姓名
|
||||
@ExcelProperty("员工姓名")
|
||||
private String realName;
|
||||
// 员工手机号
|
||||
@ExcelProperty("员工手机号")
|
||||
@ColumnWidth(15)
|
||||
private String mobile;
|
||||
/**
|
||||
* 订单号
|
||||
*/
|
||||
@ExcelProperty("订单号")
|
||||
@ColumnWidth(15)
|
||||
private String orderNo;
|
||||
/**
|
||||
*订单金额
|
||||
*/
|
||||
@ExcelProperty("订单金额")
|
||||
@ColumnWidth(15)
|
||||
private String amount;
|
||||
/**
|
||||
*实付金额
|
||||
*/
|
||||
@ExcelProperty("实付金额")
|
||||
@ColumnWidth(15)
|
||||
private String payAmount;
|
||||
/**
|
||||
* 油品金额
|
||||
*/
|
||||
@ExcelProperty("油品金额")
|
||||
@ColumnWidth(15)
|
||||
private String oilOrderAmount;
|
||||
/**
|
||||
* 商品金额
|
||||
*/
|
||||
@ExcelProperty("商品金额")
|
||||
@ColumnWidth(15)
|
||||
private String goodsOrderAmount;
|
||||
/**
|
||||
* 付款用户
|
||||
*/
|
||||
@ExcelProperty("付款用户")
|
||||
@ColumnWidth(15)
|
||||
private String payUser;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@ExcelProperty("状态")
|
||||
private String status;
|
||||
/**
|
||||
* 交易时间
|
||||
*/
|
||||
@ExcelProperty("交易时间")
|
||||
@ColumnWidth(20)
|
||||
private String payTime;
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
package com.fuint.business.order.vo.Excel;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class LJOrderExcel {
|
||||
|
||||
@ExcelProperty("员工姓名")
|
||||
@ColumnWidth(15)
|
||||
private String realName;
|
||||
|
||||
@ExcelProperty("员工手机号")
|
||||
@ColumnWidth(15)
|
||||
private String mobile;
|
||||
|
||||
@ExcelProperty("终端")
|
||||
@ColumnWidth(15)
|
||||
private String terminal;
|
||||
|
||||
@ExcelProperty("订单号")
|
||||
@ColumnWidth(20)
|
||||
private String orderNo;
|
||||
|
||||
@ExcelProperty("订单金额")
|
||||
@ColumnWidth(15)
|
||||
private String amount;
|
||||
|
||||
@ExcelProperty("优惠金额")
|
||||
@ColumnWidth(15)
|
||||
private String discount;
|
||||
|
||||
@ExcelProperty("商品数量")
|
||||
@ColumnWidth(15)
|
||||
private String goodsNum;
|
||||
|
||||
@ExcelProperty("实付金额")
|
||||
@ColumnWidth(15)
|
||||
private String payAmount;
|
||||
|
||||
@ExcelProperty("付款用户")
|
||||
@ColumnWidth(15)
|
||||
private String payUser;
|
||||
|
||||
@ExcelProperty("付款类型")
|
||||
@ColumnWidth(15)
|
||||
private String payType;
|
||||
|
||||
@ExcelProperty("交易时间")
|
||||
@ColumnWidth(20)
|
||||
private String payTime;
|
||||
|
||||
@ExcelProperty("支付状态")
|
||||
@ColumnWidth(15)
|
||||
private String status;
|
||||
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package com.fuint.business.order.vo.Excel;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class OilOrderExcel {
|
||||
// 员工姓名
|
||||
@ExcelProperty("员工姓名")
|
||||
@ColumnWidth(15)
|
||||
private String realName;
|
||||
// 员工手机号
|
||||
@ExcelProperty("员工手机号")
|
||||
@ColumnWidth(15)
|
||||
private String mobile;
|
||||
|
||||
@ExcelProperty("终端")
|
||||
@ColumnWidth(15)
|
||||
private String terminal;
|
||||
@ExcelProperty("订单号")
|
||||
@ColumnWidth(25)
|
||||
private String orderNo;
|
||||
|
||||
|
||||
@ExcelProperty(value = {"订单信息", "油品"})
|
||||
@ColumnWidth(15)
|
||||
private String oilGunNum;
|
||||
@ExcelProperty(value = {"订单信息", "订单金额"})
|
||||
@ColumnWidth(15)
|
||||
private String orderAmount;
|
||||
@ExcelProperty(value = {"订单信息", "优惠金额"})
|
||||
@ColumnWidth(15)
|
||||
private String discountAmount;
|
||||
|
||||
|
||||
@ExcelProperty(value = {"付款信息", "实付金额"})
|
||||
@ColumnWidth(15)
|
||||
private String payAmount;
|
||||
@ExcelProperty(value = {"付款信息", "付款用户"})
|
||||
@ColumnWidth(15)
|
||||
private String payUser;
|
||||
@ExcelProperty(value = {"付款信息", "付款状态"})
|
||||
@ColumnWidth(15)
|
||||
private String orderStatus;
|
||||
|
||||
|
||||
@ExcelProperty("开票标识")
|
||||
@ColumnWidth(15)
|
||||
private String invoicing ;
|
||||
@ExcelProperty("交易时间")
|
||||
@ColumnWidth(20)
|
||||
private String payTime;
|
||||
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package com.fuint.business.order.vo;
|
||||
|
||||
import com.fuint.business.order.entity.LJOrder;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class LJOrderVo extends LJOrder {
|
||||
private String storeName;
|
||||
}
|
@ -7,4 +7,7 @@ import lombok.Data;
|
||||
public class OilOrderVo extends OilOrder {
|
||||
// 油品单价
|
||||
private Double oilPrice;
|
||||
//
|
||||
private String storeName;
|
||||
private String oilName;
|
||||
}
|
||||
|
@ -30,6 +30,7 @@ public class AccountInfo implements Serializable {
|
||||
private Integer merchantId;
|
||||
private String merchantName;
|
||||
private Integer storeId;
|
||||
private Integer chainStoreId;
|
||||
private String storeName;
|
||||
private Integer staffId;
|
||||
//部门主键
|
||||
|
@ -160,10 +160,11 @@ public class AccountServiceImpl extends ServiceImpl<TAccountMapper, TAccount> im
|
||||
accountInfo.setMerchantName(mtMerchant.getName());
|
||||
}
|
||||
}
|
||||
if (account.getStoreId() != null && account.getStoreId() > 0) {
|
||||
if (account.getStoreId() != null && account.getStoreId() >= 0) {
|
||||
MtStore mtStore = mtStoreMapper.selectById(account.getStoreId());
|
||||
if (mtStore != null) {
|
||||
accountInfo.setStoreName(mtStore.getName());
|
||||
accountInfo.setChainStoreId(mtStore.getChainStoreId());
|
||||
}
|
||||
}
|
||||
return accountInfo;
|
||||
|
@ -33,17 +33,17 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-bottom" v-if="actinput == 1 ">
|
||||
<view class="sh-anniu">
|
||||
<view class="sh-anniu" @click="confirmTheReceipt(item.id)">
|
||||
<text>确认收货</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-bottom" v-if="actinput == 2 ">
|
||||
<view class="sh-anniu">
|
||||
<view class="sh-anniu" @click="refund()">
|
||||
<text>点击退款</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-bottom" v-if="actinput == 3 ">
|
||||
<view class="sh-anniu">
|
||||
<view class="sh-anniu" @click="payment()">
|
||||
<text>去付款</text>
|
||||
</view>
|
||||
</view>
|
||||
@ -103,9 +103,15 @@
|
||||
methods: {
|
||||
getindex(index) {
|
||||
this.actinput = index
|
||||
console.log("index", index)
|
||||
if (index != 0) {
|
||||
this.query.orderStatus = index
|
||||
// if (index == 1) {
|
||||
// this.query.orderStatus = '已发货'
|
||||
|
||||
// }else {
|
||||
// this.query.orderStatus = this.taplist[index].title
|
||||
|
||||
// }
|
||||
} else {
|
||||
this.query.orderStatus = ''
|
||||
}
|
||||
@ -129,6 +135,28 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
confirmTheReceipt(data) {
|
||||
let params = {
|
||||
id: data,
|
||||
orderStatus: '已完成'
|
||||
}
|
||||
request({
|
||||
url: 'business/integral/integralOrders/editUni',
|
||||
method: 'put',
|
||||
data: params
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.orderList = res.data.records
|
||||
this.getIntegralOrderList()
|
||||
}
|
||||
})
|
||||
},
|
||||
refund(data) {
|
||||
|
||||
},
|
||||
payment(data) {
|
||||
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -157,6 +157,8 @@
|
||||
}
|
||||
})
|
||||
uni.$emit('un')
|
||||
// 根据storeId查询店铺信息
|
||||
this.getInfoByStoreId()
|
||||
},
|
||||
|
||||
onShow() {
|
||||
@ -199,7 +201,9 @@
|
||||
// remaining_inventory
|
||||
console.log('当前值为: ' + e.value)
|
||||
console.log('当前值为123: ' + this.goodsInfo.remainingInventory)
|
||||
if (e.value >= this.goodsInfo.remainingInventory) {
|
||||
|
||||
//判断库存
|
||||
if (e.value >= this.goodsInfo.remainingInventory && this.goodsInfo.remainingInventory != -1) { // -1为无限库存
|
||||
e.value = this.goodsInfo.remainingInventory
|
||||
this.value = this.goodsInfo.remainingInventory
|
||||
this.flag = true
|
||||
@ -345,6 +349,7 @@
|
||||
},
|
||||
// 根据storeId查询店铺信息
|
||||
getInfoByStoreId() {
|
||||
console.log("helllllllllllllllllllllllllo")
|
||||
request({
|
||||
url: '/business/storeInformation/store/storeInfoUni',
|
||||
method: 'get',
|
||||
|
Loading…
Reference in New Issue
Block a user