Compare commits
29 Commits
590ada2db7
...
4d5d426b4d
Author | SHA1 | Date | |
---|---|---|---|
4d5d426b4d | |||
0f8a9058cf | |||
204e353d6a | |||
0ef0c7045d | |||
a793ab76a9 | |||
461965c760 | |||
f806e48df7 | |||
2f894d00c5 | |||
32d774dc27 | |||
28f27d415c | |||
7c9d18eced | |||
9662e2951c | |||
2246eca9ee | |||
2c68d58198 | |||
f9edc8af57 | |||
fa8a8181b8 | |||
1bae1749c7 | |||
1d407ffa3f | |||
4e3d502ae5 | |||
a5fc7fbe9a | |||
daa07fbb4b | |||
5a5ec7c43c | |||
9a9ff1dca2 | |||
980261477e | |||
202399cfbf | |||
3e812bd148 | |||
d479583f49 | |||
2a3f80675e | |||
1db289de63 |
@ -79,4 +79,12 @@ export function cardValueRecordList(data) {
|
|||||||
params: data
|
params: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 订单查询
|
||||||
|
export function cardValueRecordLists(data) {
|
||||||
|
return request({
|
||||||
|
url: 'business/marketingActivity/cardValueRecord/getCardValueByCardValueId',
|
||||||
|
method: 'post',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -36,6 +36,16 @@ export function getTradingPageApi(query) {
|
|||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export function getTradingOnsPageApi(query) {
|
||||||
|
return request({
|
||||||
|
url: 'business/allOrderInfo/tradingList',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
// 油站端 - 财务报表 -交易对账-交易明细 表格数据
|
// 油站端 - 财务报表 -交易对账-交易明细 表格数据
|
||||||
export function transactionList(query) {
|
export function transactionList(query) {
|
||||||
return request({
|
return request({
|
||||||
@ -208,4 +218,53 @@ export function getDataCount(query) {
|
|||||||
params:query
|
params:query
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// 根据字典类型查询字典数据信息
|
||||||
|
export function getDicts(dictType) {
|
||||||
|
return request({
|
||||||
|
url: '/system/dict/data/type/' + dictType,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据字典类型查询字典数据信息
|
||||||
|
export function getStaffByStorId() {
|
||||||
|
return request({
|
||||||
|
url: '/business/allOrderInfo/getStaffByStorId',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//油站交易对账导出
|
||||||
|
export function exportExcelOrderMsgsApi(data) {
|
||||||
|
return request({
|
||||||
|
url: 'business/allOrderInfo/exportExcelOrderMsgApi',
|
||||||
|
method: 'post',
|
||||||
|
responseType: 'blob', // 表明响应类型为二进制流
|
||||||
|
data: data // 通过 data 参数传递需要的数据
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export function exportExcelBackOrderMsgsApi(data) {
|
||||||
|
return request({
|
||||||
|
url: 'business/allOrderInfo/exportExcelBackOrderMsgsApi',
|
||||||
|
method: 'post',
|
||||||
|
responseType: 'blob', // 表明响应类型为二进制流
|
||||||
|
data: data // 通过 data 参数传递需要的数据
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getTradingNewPageApi(query) {
|
||||||
|
return request({
|
||||||
|
url: 'business/allOrderInfo/tradingNewList',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function getTissueByDataNewsApi(query) {
|
||||||
|
return request({
|
||||||
|
url: 'business/allOrderInfo/getTradingNewData',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 19 KiB |
@ -112,7 +112,10 @@
|
|||||||
type="daterange"
|
type="daterange"
|
||||||
range-separator="至"
|
range-separator="至"
|
||||||
start-placeholder="开始日期"
|
start-placeholder="开始日期"
|
||||||
end-placeholder="结束日期">
|
end-placeholder="结束日期"
|
||||||
|
format="yyyy-MM-dd"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</div>
|
</div>
|
||||||
<el-button type="primary" icon="el-icon-search" @click="RecordList()" >搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="RecordList()" >搜索</el-button>
|
||||||
@ -128,7 +131,7 @@
|
|||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="orderNo"
|
prop="paymentNo"
|
||||||
label="订单号"
|
label="订单号"
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -159,7 +162,7 @@
|
|||||||
label="订单状态">
|
label="订单状态">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="payTime"
|
prop="updateTime"
|
||||||
label="订单完成时间">
|
label="订单完成时间">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -174,14 +177,13 @@
|
|||||||
</el-drawer>
|
</el-drawer>
|
||||||
|
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:close-on-click-modal="false"
|
|
||||||
:title="titles"
|
:title="titles"
|
||||||
:visible.sync="dialog"
|
:visible.sync="dialog"
|
||||||
width="50%"
|
width="50%"
|
||||||
ref="drawer"
|
ref="drawer"
|
||||||
>
|
>
|
||||||
<div class="demo-drawer__content">
|
<div class="demo-drawer__content">
|
||||||
<el-form :model="form" :rules="rules" :inline="true" :label-position="labelPosition" label-width="100px" >
|
<el-form :model="form" ref="ruleForm" :rules="rules" :inline="true" :label-position="labelPosition" label-width="100px" >
|
||||||
|
|
||||||
<el-form-item label="活动名称" prop="activeName">
|
<el-form-item label="活动名称" prop="activeName">
|
||||||
<el-input style="width: 300px" v-model="form.activeName"></el-input>
|
<el-input style="width: 300px" v-model="form.activeName"></el-input>
|
||||||
@ -356,7 +358,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 弹窗-->
|
<!-- 弹窗-->
|
||||||
<el-dialog :close-on-click-modal="false" title="优惠券列表" :visible.sync="dialogTableVisible">
|
<el-dialog title="优惠券列表" :visible.sync="dialogTableVisible">
|
||||||
<div style="display: flex;align-items: center; margin-bottom: 20px ">
|
<div style="display: flex;align-items: center; margin-bottom: 20px ">
|
||||||
<el-input v-model="youhuiquan.name" placeholder="优惠券名称"></el-input>
|
<el-input v-model="youhuiquan.name" placeholder="优惠券名称"></el-input>
|
||||||
<el-button type="primary" icon="el-icon-search" @click="getlistFavorable" >搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="getlistFavorable" >搜索</el-button>
|
||||||
@ -418,8 +420,8 @@
|
|||||||
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 规则-->
|
<!-- 规则-->
|
||||||
<el-dialog :close-on-click-modal="false" title="编辑储值卡规则" :visible.sync="Crule">
|
<el-dialog title="编辑储值卡规则" :visible.sync="Crule">
|
||||||
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm" :label-position="labelPosition">
|
<el-form :model="ruleForm" ref="ruleForm1" :rules="rules" label-width="100px" class="demo-ruleForm" :label-position="labelPosition">
|
||||||
<el-form-item label="名称" prop="name">
|
<el-form-item label="名称" prop="name">
|
||||||
<el-input disabled v-model="ruleForm.name"></el-input>
|
<el-input disabled v-model="ruleForm.name"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -471,7 +473,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="submitForms('ruleForm')">保存</el-button>
|
<el-button type="primary" @click="submitForms('ruleForm1')">保存</el-button>
|
||||||
<el-button @click="resetForm('ruleForm')">取消</el-button>
|
<el-button @click="resetForm('ruleForm')">取消</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -492,6 +494,7 @@ import {
|
|||||||
cardValueRule,
|
cardValueRule,
|
||||||
saveOrUpdate,
|
saveOrUpdate,
|
||||||
cardValueRecordList,
|
cardValueRecordList,
|
||||||
|
cardValueRecordLists,
|
||||||
updateStatus
|
updateStatus
|
||||||
} from "@/api/EventMarketing/SaveBlock";
|
} from "@/api/EventMarketing/SaveBlock";
|
||||||
import {oilNumberList1} from "@/api/order/oilnumgun";
|
import {oilNumberList1} from "@/api/order/oilnumgun";
|
||||||
@ -524,7 +527,8 @@ import {delLJGoods, listLJGoods} from "@/api/convenienceStore/ljgoods";
|
|||||||
ordertype:'',
|
ordertype:'',
|
||||||
cardValueId:'',
|
cardValueId:'',
|
||||||
pageNo:1,
|
pageNo:1,
|
||||||
pageSize:10
|
pageSize:10,
|
||||||
|
storeId:''
|
||||||
},
|
},
|
||||||
dataRange:[],
|
dataRange:[],
|
||||||
orderData: [{
|
orderData: [{
|
||||||
@ -561,6 +565,9 @@ import {delLJGoods, listLJGoods} from "@/api/convenienceStore/ljgoods";
|
|||||||
isonline: '0',
|
isonline: '0',
|
||||||
dialog: false,
|
dialog: false,
|
||||||
rules: {
|
rules: {
|
||||||
|
name: [
|
||||||
|
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||||
|
],
|
||||||
startTime: [
|
startTime: [
|
||||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
@ -686,8 +693,8 @@ import {delLJGoods, listLJGoods} from "@/api/convenienceStore/ljgoods";
|
|||||||
this.oilnumList = res.data.records
|
this.oilnumList = res.data.records
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
submitForms(formName) {
|
submitForms(ruleForm1 ) {
|
||||||
this.$refs[formName].validate((valid) => {
|
this.$refs[ruleForm1].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.ruleForm.oilNumber = this.ruleForm.oilNumber.join(',')
|
this.ruleForm.oilNumber = this.ruleForm.oilNumber.join(',')
|
||||||
saveOrUpdate(this.ruleForm).then(res=>{
|
saveOrUpdate(this.ruleForm).then(res=>{
|
||||||
@ -837,9 +844,13 @@ import {delLJGoods, listLJGoods} from "@/api/convenienceStore/ljgoods";
|
|||||||
this.RecordList()
|
this.RecordList()
|
||||||
},
|
},
|
||||||
RecordList(){
|
RecordList(){
|
||||||
|
console.log(this.dataRange)
|
||||||
cardValueRecordList(this.addDateRange(this.order,this.dataRange)).then(res=>{
|
cardValueRecordLists({
|
||||||
this.orderData = res.data.records
|
cardValueId: this.order.cardValueId,
|
||||||
|
dataRange: this.dataRange,
|
||||||
|
orderNo:this.order.orderNo
|
||||||
|
}).then(res=>{
|
||||||
|
this.orderData = res.data
|
||||||
this.order.total = res.data.total
|
this.order.total = res.data.total
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -995,30 +1006,32 @@ import {delLJGoods, listLJGoods} from "@/api/convenienceStore/ljgoods";
|
|||||||
|
|
||||||
// this.form.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '1')
|
// this.form.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '1')
|
||||||
// this.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '2')
|
// this.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '2')
|
||||||
submitForm(){
|
submitForm(ruleForm){
|
||||||
|
this.$refs[ruleForm].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
this.form.cardValueChildList = this.youhuiquanlist.concat(this.duihuanquanlist);
|
this.form.cardValueChildList = this.youhuiquanlist.concat(this.duihuanquanlist);
|
||||||
|
|
||||||
if(this.form.id){
|
if (this.form.id) {
|
||||||
eitList(this.form).then(res=>{
|
eitList(this.form).then(res => {
|
||||||
if (res.code == 200){
|
if (res.code == 200) {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '修改成功',
|
message: '修改成功',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
});
|
});
|
||||||
this.getlist()
|
this.getlist()
|
||||||
}else {
|
} else {
|
||||||
this.$message.error('修改失败');
|
this.$message.error('修改失败');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
addList(this.form).then(res=>{
|
addList(this.form).then(res => {
|
||||||
if (res.code == 200){
|
if (res.code == 200) {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '新增成功',
|
message: '新增成功',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
});
|
});
|
||||||
this.getlist()
|
this.getlist()
|
||||||
}else {
|
} else {
|
||||||
this.$message.error('新增失败');
|
this.$message.error('新增失败');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -1028,6 +1041,11 @@ import {delLJGoods, listLJGoods} from "@/api/convenienceStore/ljgoods";
|
|||||||
|
|
||||||
this.dialog = false
|
this.dialog = false
|
||||||
this.chongzhi()
|
this.chongzhi()
|
||||||
|
}else {
|
||||||
|
console.log('error submit!!');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<el-form-item label="">
|
<el-form-item label="">
|
||||||
<el-input style="width: 215px;" v-model="queryParams.orderNo" placeholder="请输入订单号"></el-input>
|
<el-input style="width: 215px;" v-model="queryParams.orderNo" placeholder="请输入订单号"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="" prop="payChannel">
|
<!-- <el-form-item label="" prop="payChannel">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="queryParams.payChannel"
|
v-model="queryParams.payChannel"
|
||||||
clearable
|
clearable
|
||||||
@ -16,30 +16,34 @@
|
|||||||
<el-option label="收银台" value="cashier"/>
|
<el-option label="收银台" value="cashier"/>
|
||||||
<el-option label="POS端" value="POS"/>
|
<el-option label="POS端" value="POS"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>-->
|
||||||
|
|
||||||
|
|
||||||
<el-form-item label="" prop="payType">
|
<el-form-item label="" prop="payType">
|
||||||
<el-select
|
|
||||||
v-model="queryParams.payType"
|
|
||||||
clearable
|
|
||||||
placeholder="请选择订单类型"
|
|
||||||
>
|
|
||||||
<el-option label="现金" value="CASH"/>
|
|
||||||
<el-option label="微信" value="WECHAT"/>
|
|
||||||
<el-option label="支付宝" value="ALIPAY"/>
|
|
||||||
<el-option label="余额" value="balance"/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="" prop="payChannel">
|
|
||||||
<el-select
|
<el-select
|
||||||
v-model="queryParams.payChannel"
|
v-model="queryParams.payChannel"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请选择订单分类"
|
placeholder="请选择订单类型"
|
||||||
>
|
>
|
||||||
<el-option label="小程序" value="applet"/>
|
<el-option label="小程序" value="applet"/>
|
||||||
<el-option label="收银台" value="cashier"/>
|
<el-option label="收银台" value="cashier"/>
|
||||||
<el-option label="POS端" value="POS"/>
|
<el-option label="POS端" value="POS"/>
|
||||||
|
<el-option label="平台" value="PC"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="" prop="payChannel">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.type"
|
||||||
|
clearable
|
||||||
|
placeholder="请选择订单分类"
|
||||||
|
>
|
||||||
|
<el-option label="油品" value="1"/>
|
||||||
|
<el-option label="商品" value="2"/>
|
||||||
|
<el-option label="储值卡" value="3"/>
|
||||||
|
<el-option label="积分" value="4"/>
|
||||||
|
<el-option label="囤油卡" value="5"/>
|
||||||
|
<el-option label="收银台订单" value="6"/>
|
||||||
|
<el-option label="挂账订单" value="7"/>
|
||||||
|
<el-option label="pos" value="8"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="" prop="status">
|
<el-form-item label="" prop="status">
|
||||||
@ -51,45 +55,33 @@
|
|||||||
<el-option label="已支付" value="paid"/>
|
<el-option label="已支付" value="paid"/>
|
||||||
<el-option label="未支付" value="unpaid"/>
|
<el-option label="未支付" value="unpaid"/>
|
||||||
<el-option label="已退款" value="refund"/>
|
<el-option label="已退款" value="refund"/>
|
||||||
|
<el-option label="支付失败" value="payFail"/>
|
||||||
|
<el-option label="退款中" value="refunding"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="" style="margin-right:22px" prop="status">
|
<el-form-item label="" prop="staffId">
|
||||||
<el-select
|
<el-select v-model="queryParams.staffId" placeholder="请选择员工" clearable>
|
||||||
v-model="queryParams.status"
|
<el-option
|
||||||
clearable
|
v-for="dicts in this.staffList"
|
||||||
placeholder="请选择员工"
|
:key="dicts.acctId"
|
||||||
>
|
:label="dicts.accountName"
|
||||||
<el-option label="已支付" value="paid"/>
|
:value="dicts.acctId"
|
||||||
<el-option label="未支付" value="unpaid"/>
|
/>
|
||||||
<el-option label="已退款" value="refund"/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="" style="margin-right: 0px" prop="status">
|
<el-form-item label="" prop="userName">
|
||||||
<el-select
|
<el-input v-model="queryParams.userName" placeholder="请输入付款用户"></el-input>
|
||||||
v-model="queryParams.status"
|
|
||||||
clearable
|
|
||||||
placeholder="请输入付款用户"
|
|
||||||
>
|
|
||||||
<el-option label="已支付" value="paid"/>
|
|
||||||
<el-option label="未支付" value="unpaid"/>
|
|
||||||
<el-option label="已退款" value="refund"/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="">
|
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="beginTime"
|
v-model="queryParams.dataRange"
|
||||||
style="width: 140px"
|
type="daterange"
|
||||||
type="date"
|
range-separator="至"
|
||||||
placeholder="交易开始日期">
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
format="yyyy-MM-dd"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
至
|
|
||||||
<el-date-picker
|
|
||||||
v-model="endTime"
|
|
||||||
style="width: 140px"
|
|
||||||
type="date"
|
|
||||||
placeholder="交易结束日期">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item style="float: right; margin-right: 0px ">
|
<el-form-item style="float: right; margin-right: 0px ">
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||||
@ -99,8 +91,9 @@
|
|||||||
<div class="wit_box" >
|
<div class="wit_box" >
|
||||||
<div class="box-gang">
|
<div class="box-gang">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<el-tooltip class="item" effect="dark" content="999999/999999999999" placement="top-start">
|
<el-tooltip class="item" effect="dark" content="优惠金额(元)/笔数" placement="top-start">
|
||||||
<div class="size-bole">{{ orderStatistics.wechat?orderStatistics.wechat:0 }}/0</div>
|
<div class="size-bole">{{ orderStatistics.discountMoneyAll?orderStatistics.discountMoneyAll:0 }}/
|
||||||
|
{{ orderStatistics.discountMoneyAllNo?orderStatistics.discountMoneyAllNo:0 }}</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<div class="size-hui">
|
<div class="size-hui">
|
||||||
<div class="dian" style="background: #0DC291"></div>
|
<div class="dian" style="background: #0DC291"></div>
|
||||||
@ -108,8 +101,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<el-tooltip class="item" effect="dark" content="999999/999999999999" placement="top-start">
|
<el-tooltip class="item" effect="dark" content="油品订单优惠金额(元)/笔数" placement="top-start">
|
||||||
<div class="size-bole" style="color:#00CAFF;">{{ orderStatistics.alipay?orderStatistics.alipay:0 }}/0</div>
|
<div class="size-bole" style="color:#00CAFF;">{{ orderStatistics.discountMoneyOil?orderStatistics.discountMoneyOil:0 }}/
|
||||||
|
{{ orderStatistics.discountMoneyOilNo?orderStatistics.discountMoneyOilNo:0 }}</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
<div class="size-hui">
|
<div class="size-hui">
|
||||||
@ -118,8 +112,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<el-tooltip class="item" effect="dark" content="999999/999999999999" placement="top-start">
|
<el-tooltip class="item" effect="dark" content="便利店订单优惠金额(元)/笔数" placement="top-start">
|
||||||
<div class="size-bole" style="color:#F44522;" >{{ orderStatistics.balance?orderStatistics.balance:0 }}/0</div>
|
<div class="size-bole" style="color:#F44522;" >{{ orderStatistics.discountMoneyStore?orderStatistics.discountMoneyStore:0 }}
|
||||||
|
/{{ orderStatistics.discountMoneyStoreNo?orderStatistics.discountMoneyStoreNo:0 }}</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
<div class="size-hui">
|
<div class="size-hui">
|
||||||
@ -128,8 +123,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<el-tooltip class="item" effect="dark" content="999999/999999999999" placement="top-start">
|
<el-tooltip class="item" effect="dark" content="积分商城订单优惠金额(元)/笔数" placement="top-start">
|
||||||
<div class="size-bole" style="color:#FF7E00;" >{{orderStatistics.balanceCount?orderStatistics.balanceCount:0}}/0</div>
|
<div class="size-bole" style="color:#FF7E00;" >{{orderStatistics.discountMoneyIntegral?orderStatistics.discountMoneyIntegral:0}}
|
||||||
|
/{{orderStatistics.discountMoneyIntegralNo?orderStatistics.discountMoneyIntegralNo:0}}</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
<div class="size-hui">
|
<div class="size-hui">
|
||||||
@ -154,15 +150,15 @@
|
|||||||
<span v-else>其他</span>
|
<span v-else>其他</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="payChannel" align="center" label="优惠类型">
|
<!-- <el-table-column prop="payChannel" align="center" label="优惠类型">-->
|
||||||
<template slot-scope="scope">
|
<!-- <template slot-scope="scope">-->
|
||||||
<span v-if="scope.row.payChannel=='cashier'">收银台</span>
|
<!-- <span v-if="scope.row.payChannel=='cashier'">收银台</span>-->
|
||||||
<span v-else-if="scope.row.payChannel=='POS'">POS机</span>
|
<!-- <span v-else-if="scope.row.payChannel=='POS'">POS机</span>-->
|
||||||
<span v-else-if="scope.row.payChannel=='PC'">平台</span>
|
<!-- <span v-else-if="scope.row.payChannel=='PC'">平台</span>-->
|
||||||
<span v-else-if="scope.row.payChannel=='applet'">小程序</span>
|
<!-- <span v-else-if="scope.row.payChannel=='applet'">小程序</span>-->
|
||||||
<span v-else>其他</span>
|
<!-- <span v-else>其他</span>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</el-table-column>
|
<!-- </el-table-column>-->
|
||||||
<el-table-column prop="type" align="center" label="订单分类">
|
<el-table-column prop="type" align="center" label="订单分类">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.type=='1'">油品</span>
|
<span v-if="scope.row.type=='1'">油品</span>
|
||||||
@ -272,8 +268,13 @@ import {
|
|||||||
exportExcelTradingApi, getmyDataApi,
|
exportExcelTradingApi, getmyDataApi,
|
||||||
getRunningWaterByTissueApi,
|
getRunningWaterByTissueApi,
|
||||||
getTissueByDataApi,
|
getTissueByDataApi,
|
||||||
getTradingPageApi
|
getTradingPageApi,
|
||||||
|
getDicts,
|
||||||
|
getStaffByStorId,
|
||||||
|
getTradingNewPageApi,
|
||||||
|
getTissueByDataNewsApi
|
||||||
} from "@/api/allOrder";
|
} from "@/api/allOrder";
|
||||||
|
import {getTissueByDataNewApi} from "../../../../api/allOrder";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "reconciliation-trading",
|
name: "reconciliation-trading",
|
||||||
@ -320,6 +321,14 @@ export default {
|
|||||||
balanceCount:"0",
|
balanceCount:"0",
|
||||||
refBalance:"0",
|
refBalance:"0",
|
||||||
refBalanceCount:"0",
|
refBalanceCount:"0",
|
||||||
|
discountMoneyAll:"0",
|
||||||
|
discountMoneyAllNo:"0",
|
||||||
|
discountMoneyOil:"0",
|
||||||
|
discountMoneyOilNo:"0",
|
||||||
|
discountMoneyStore:"0",
|
||||||
|
discountMoneyStoreNo:"0",
|
||||||
|
discountMoneyIntegral:"0",
|
||||||
|
discountMoneyIntegralNo:"0",
|
||||||
},
|
},
|
||||||
total:0,
|
total:0,
|
||||||
}
|
}
|
||||||
@ -347,7 +356,9 @@ export default {
|
|||||||
await getmyDataApi(this.addDateRange(this.queryParams)).then( response => {
|
await getmyDataApi(this.addDateRange(this.queryParams)).then( response => {
|
||||||
this.queryParams.deptId = response.data.deptId;
|
this.queryParams.deptId = response.data.deptId;
|
||||||
this.getList()
|
this.getList()
|
||||||
|
this.getDicts()
|
||||||
|
this.getStaffByStorId()
|
||||||
|
this.getOrderStatistics()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
exportExcelCashier() {
|
exportExcelCashier() {
|
||||||
@ -362,35 +373,34 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 获取订单统计信息
|
// 获取订单统计信息
|
||||||
|
async getStaffByStorId() {
|
||||||
|
getStaffByStorId().then(response => {
|
||||||
|
this.staffList = response.data;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获取字典
|
||||||
|
async getDicts() {
|
||||||
|
getDicts("payment_channel").then(response => {
|
||||||
|
this.dict = response.data;
|
||||||
|
})
|
||||||
|
getDicts("payment_type").then(response => {
|
||||||
|
this.dictPayType = response.data;
|
||||||
|
})
|
||||||
|
},
|
||||||
async getOrderStatistics() {
|
async getOrderStatistics() {
|
||||||
// await this.getDeptList()
|
|
||||||
|
|
||||||
let dateRange = []
|
getTissueByDataNewsApi(this.queryParams).then(res=>{
|
||||||
if (this.beginTime && this.endTime) {
|
|
||||||
dateRange.push(this.beginTime.toLocaleDateString())
|
|
||||||
dateRange.push(this.endTime.toLocaleDateString())
|
|
||||||
}
|
|
||||||
getTissueByDataApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{
|
|
||||||
this.orderStatistics = res.data
|
this.orderStatistics = res.data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 获取列表信息
|
// 获取列表信息
|
||||||
async getList(val){
|
async getList(val){
|
||||||
// await this.getDeptList()
|
|
||||||
let dateRange = []
|
getTradingNewPageApi(this.queryParams).then( response => {
|
||||||
if (this.beginTime && this.endTime) {
|
|
||||||
dateRange.push(this.beginTime.toLocaleDateString())
|
|
||||||
dateRange.push(this.endTime.toLocaleDateString())
|
|
||||||
}
|
|
||||||
getTradingPageApi(this.addDateRange(this.queryParams,dateRange)).then( response => {
|
|
||||||
this.orderList = response.data.records;
|
this.orderList = response.data.records;
|
||||||
this.total = response.data.total;
|
this.total = response.data.total;
|
||||||
this.isSysDate = false
|
this.isSysDate = false
|
||||||
// this.getDeptList()
|
|
||||||
this.getOrderStatistics()
|
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getOrdersInfo(data) {
|
getOrdersInfo(data) {
|
||||||
|
@ -15,91 +15,80 @@
|
|||||||
<el-option label="小程序" value="applet"/>
|
<el-option label="小程序" value="applet"/>
|
||||||
<el-option label="收银台" value="cashier"/>
|
<el-option label="收银台" value="cashier"/>
|
||||||
<el-option label="POS端" value="POS"/>
|
<el-option label="POS端" value="POS"/>
|
||||||
|
<el-option label="平台" value="PC"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="" prop="payChannel">
|
<el-form-item label="" prop="payChannel">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="queryParams.payChannel"
|
v-model="queryParams.type"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请选择订单分类"
|
placeholder="请选择订单分类"
|
||||||
>
|
>
|
||||||
<el-option label="小程序" value="applet"/>
|
<el-option label="油品" value="1"/>
|
||||||
<el-option label="收银台" value="cashier"/>
|
<el-option label="商品" value="2"/>
|
||||||
<el-option label="POS端" value="POS"/>
|
<el-option label="储值卡" value="3"/>
|
||||||
|
<el-option label="积分" value="4"/>
|
||||||
|
<el-option label="囤油卡" value="5"/>
|
||||||
|
<el-option label="收银台订单" value="6"/>
|
||||||
|
<el-option label="挂账订单" value="7"/>
|
||||||
|
<el-option label="pos" value="8"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="" prop="payType">
|
<el-form-item label="" prop="payType">
|
||||||
<el-select
|
<el-select v-model="queryParams.payType" placeholder="请选择支付方式" clearable>
|
||||||
v-model="queryParams.payType"
|
<el-option
|
||||||
clearable
|
v-for="dicts in this.dictPayType"
|
||||||
placeholder="请选择支付方式"
|
:key="dicts.dictValue"
|
||||||
>
|
:label="dicts.dictLabel"
|
||||||
<el-option label="现金" value="CASH"/>
|
:value="dicts.dictValue"
|
||||||
<el-option label="微信" value="WECHAT"/>
|
/>
|
||||||
<el-option label="支付宝" value="ALIPAY"/>
|
|
||||||
<el-option label="余额" value="balance"/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="" prop="status">
|
<el-form-item label="" prop="paymentChannel">
|
||||||
<el-select
|
<el-select v-model="queryParams.paymentChannel" placeholder="请选择支付通道" clearable>
|
||||||
v-model="queryParams.status"
|
<el-option
|
||||||
clearable
|
v-for="dicts in this.dict"
|
||||||
placeholder="请选择订单状态"
|
:key="dicts.dictValue"
|
||||||
>
|
:label="dicts.dictLabel"
|
||||||
<el-option label="已支付" value="paid"/>
|
:value="dicts.dictValue"
|
||||||
<el-option label="未支付" value="unpaid"/>
|
/>
|
||||||
<el-option label="已退款" value="refund"/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="" style="margin-right:22px" prop="status">
|
<el-form-item label="" prop="staffId">
|
||||||
<el-select
|
<el-select v-model="queryParams.staffId" placeholder="请选择员工" clearable>
|
||||||
v-model="queryParams.status"
|
<el-option
|
||||||
clearable
|
v-for="dicts in this.staffList"
|
||||||
placeholder="请选择员工"
|
:key="dicts.acctId"
|
||||||
>
|
:label="dicts.accountName"
|
||||||
<el-option label="已支付" value="paid"/>
|
:value="dicts.acctId"
|
||||||
<el-option label="未支付" value="unpaid"/>
|
/>
|
||||||
<el-option label="已退款" value="refund"/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="" style="margin-right: 0px" prop="status">
|
<el-form-item label="" prop="userName">
|
||||||
<el-select
|
<el-input v-model="queryParams.userName" placeholder="请输入付款用户"></el-input>
|
||||||
v-model="queryParams.status"
|
|
||||||
clearable
|
|
||||||
placeholder="请输入付款用户"
|
|
||||||
>
|
|
||||||
<el-option label="已支付" value="paid"/>
|
|
||||||
<el-option label="未支付" value="unpaid"/>
|
|
||||||
<el-option label="已退款" value="refund"/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="">
|
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="beginTime"
|
v-model="queryParams.dataRange"
|
||||||
style="width: 140px"
|
type="daterange"
|
||||||
type="date"
|
range-separator="至"
|
||||||
placeholder="交易开始日期">
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
format="yyyy-MM-dd"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
至
|
|
||||||
<el-date-picker
|
|
||||||
v-model="endTime"
|
|
||||||
style="width: 140px"
|
|
||||||
type="date"
|
|
||||||
placeholder="交易结束日期">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item style="float: right; margin-right: 0px ">
|
<el-form-item style="float: right; margin-right: 0px ">
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||||
<el-button type="primary" >导出</el-button>
|
<el-button type="primary" @click="exportExcelCashier">导出</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="wit_box" >
|
<div class="wit_box" >
|
||||||
<div class="box-gang">
|
<div class="box-gang">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<el-tooltip class="item" effect="dark" content="999999/999999999999" placement="top-start">
|
<el-tooltip class="item" effect="dark" content="退款金额(元)/笔数" placement="top-start">
|
||||||
<div class="size-bole">{{ orderStatistics.wechat?orderStatistics.wechat:0 }}/0</div>
|
<div class="size-bole">{{ orderStatistics.refBalance?orderStatistics.refBalance:0 }}/{{ orderStatistics.refBalanceCount?orderStatistics.refBalanceCount:0 }}</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<div class="size-hui">
|
<div class="size-hui">
|
||||||
<div class="dian" style="background: #0DC291"></div>
|
<div class="dian" style="background: #0DC291"></div>
|
||||||
@ -107,8 +96,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<el-tooltip class="item" effect="dark" content="999999/999999999999" placement="top-start">
|
<el-tooltip class="item" effect="dark" content="油品订单退款金额(元)/笔数" placement="top-start">
|
||||||
<div class="size-bole" style="color:#00CAFF;">{{ orderStatistics.alipay?orderStatistics.alipay:0 }}/0</div>
|
<div class="size-bole" style="color:#00CAFF;">{{ orderStatistics.oilOrder?orderStatistics.oilOrder:0 }}/{{ orderStatistics.oilOrderCount?orderStatistics.oilOrderCount:0 }}</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
<div class="size-hui">
|
<div class="size-hui">
|
||||||
@ -117,8 +106,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<el-tooltip class="item" effect="dark" content="999999/999999999999" placement="top-start">
|
<el-tooltip class="item" effect="dark" content="便利店订单退款金额(元)/笔数" placement="top-start">
|
||||||
<div class="size-bole" style="color:#F44522;" >{{ orderStatistics.balance?orderStatistics.balance:0 }}/0</div>
|
<div class="size-bole" style="color:#F44522;" >{{ orderStatistics.convenienceStore?orderStatistics.convenienceStore:0 }}/{{ orderStatistics.convenienceStoreCount?orderStatistics.convenienceStoreCount:0 }}</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
<div class="size-hui">
|
<div class="size-hui">
|
||||||
@ -127,8 +116,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<el-tooltip class="item" effect="dark" content="999999/999999999999" placement="top-start">
|
<el-tooltip class="item" effect="dark" content="积分商城订单退款金额(元)/笔数" placement="top-start">
|
||||||
<div class="size-bole" style="color:#FF7E00;" >{{orderStatistics.balanceCount?orderStatistics.balanceCount:0}}/0</div>
|
<div class="size-bole" style="color:#FF7E00;" >{{orderStatistics.integral?orderStatistics.integral:0}}/{{orderStatistics.integralCount?orderStatistics.integralCount:0}}</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
<div class="size-hui">
|
<div class="size-hui">
|
||||||
@ -145,25 +134,8 @@
|
|||||||
<el-table-column type="index" width="50" align="center" label="序号"/>
|
<el-table-column type="index" width="50" align="center" label="序号"/>
|
||||||
<el-table-column prop="orderNo" align="center" label="订单号" width="220"> </el-table-column>
|
<el-table-column prop="orderNo" align="center" label="订单号" width="220"> </el-table-column>
|
||||||
<el-table-column prop="payChannel" align="center" label="订单类型">
|
<el-table-column prop="payChannel" align="center" label="订单类型">
|
||||||
<template slot-scope="scope">
|
|
||||||
<span v-if="scope.row.payChannel=='cashier'">收银台</span>
|
|
||||||
<span v-else-if="scope.row.payChannel=='POS'">POS机</span>
|
|
||||||
<span v-else-if="scope.row.payChannel=='PC'">平台</span>
|
|
||||||
<span v-else-if="scope.row.payChannel=='applet'">小程序</span>
|
|
||||||
<span v-else>其他</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="type" align="center" label="订单分类">
|
<el-table-column prop="type" align="center" label="订单分类">
|
||||||
<template slot-scope="scope">
|
|
||||||
<span v-if="scope.row.type=='1'">油品</span>
|
|
||||||
<span v-else-if="scope.row.type=='2'">商品</span>
|
|
||||||
<span v-else-if="scope.row.type=='3'">储值卡</span>
|
|
||||||
<span v-else-if="scope.row.type=='4'">积分</span>
|
|
||||||
<span v-else-if="scope.row.type=='5'">囤油卡</span>
|
|
||||||
<span v-else-if="scope.row.type=='6'">油品加商品(收银台订单)</span>
|
|
||||||
<span v-else-if="scope.row.type=='7'">挂账订单</span>
|
|
||||||
<span v-else="">其他</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodsMoney" align="center" label="订单金额(元)">
|
<el-table-column prop="goodsMoney" align="center" label="订单金额(元)">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -192,12 +164,12 @@
|
|||||||
<el-table-column prop="status" align="center" label="支付状态">
|
<el-table-column prop="status" align="center" label="支付状态">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div v-if="scope.row.status == 'unpaid'" style="color: #F44522">未支付</div>
|
<div v-if="scope.row.status == 'unpaid'" style="color: #F44522">未支付</div>
|
||||||
<div v-else-if="scope.row.status == 'paid'" style="color: #0DC291">已支付</div>
|
<div v-else-if="scope.row.status == '退款中'" style="color: #FF7E00">退款中</div>
|
||||||
<div v-else-if="scope.row.status == 'refund'" style="color: #FF7E00">已退款</div>
|
<div v-else-if="scope.row.status == '已退款'" style="color: #FF7E00">已退款</div>
|
||||||
<div v-else style="color: #F44522">支付失败</div>
|
<div v-else style="color: #F44522">支付失败</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="mchntCd" align="center" label="支付渠道"> </el-table-column>
|
<el-table-column prop="paymentChannel" align="center" label="支付渠道"> </el-table-column>
|
||||||
<el-table-column prop="mchntCd" align="center" label="商户号"> </el-table-column>
|
<el-table-column prop="mchntCd" align="center" label="商户号"> </el-table-column>
|
||||||
<el-table-column prop="createBy" align="center" label="关联员工"> </el-table-column>
|
<el-table-column prop="createBy" align="center" label="关联员工"> </el-table-column>
|
||||||
|
|
||||||
@ -276,8 +248,13 @@ import {
|
|||||||
exportExcelTradingApi, getmyDataApi,
|
exportExcelTradingApi, getmyDataApi,
|
||||||
getRunningWaterByTissueApi,
|
getRunningWaterByTissueApi,
|
||||||
getTissueByDataApi,
|
getTissueByDataApi,
|
||||||
getTradingPageApi
|
getTradingPageApi,
|
||||||
|
getDicts,
|
||||||
|
getStaffByStorId,
|
||||||
|
getTradingOnsPageApi,
|
||||||
|
exportExcelBackOrderMsgsApi
|
||||||
} from "@/api/allOrder";
|
} from "@/api/allOrder";
|
||||||
|
import {getTradingOnPageApi} from "../../../../api/allOrder";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "reconciliation-trading",
|
name: "reconciliation-trading",
|
||||||
@ -312,6 +289,9 @@ export default {
|
|||||||
deptType:"3",
|
deptType:"3",
|
||||||
storeId:"",
|
storeId:"",
|
||||||
deptId:"",
|
deptId:"",
|
||||||
|
userName:"",
|
||||||
|
staffId:"",
|
||||||
|
dataRange:[],
|
||||||
},
|
},
|
||||||
orderStatistics:{
|
orderStatistics:{
|
||||||
CASH:"0",
|
CASH:"0",
|
||||||
@ -324,6 +304,12 @@ export default {
|
|||||||
balanceCount:"0",
|
balanceCount:"0",
|
||||||
refBalance:"0",
|
refBalance:"0",
|
||||||
refBalanceCount:"0",
|
refBalanceCount:"0",
|
||||||
|
oilOrder:"0",
|
||||||
|
oilOrderCount:"0",
|
||||||
|
convenienceStore:"0",
|
||||||
|
convenienceStoreCount:"0",
|
||||||
|
integral:"0",
|
||||||
|
integralCount:"0",
|
||||||
},
|
},
|
||||||
total:0,
|
total:0,
|
||||||
}
|
}
|
||||||
@ -351,16 +337,13 @@ export default {
|
|||||||
await getmyDataApi(this.addDateRange(this.queryParams)).then( response => {
|
await getmyDataApi(this.addDateRange(this.queryParams)).then( response => {
|
||||||
this.queryParams.deptId = response.data.deptId;
|
this.queryParams.deptId = response.data.deptId;
|
||||||
this.getList()
|
this.getList()
|
||||||
|
this.getDicts()
|
||||||
|
this.getStaffByStorId()
|
||||||
|
this.getOrderStatistics()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
exportExcelCashier() {
|
exportExcelCashier() {
|
||||||
let dateRange = []
|
exportExcelBackOrderMsgsApi(this.queryParams).then(res=>{
|
||||||
if (this.beginTime && this.endTime) {
|
|
||||||
dateRange.push(this.beginTime.toLocaleDateString())
|
|
||||||
dateRange.push(this.endTime.toLocaleDateString())
|
|
||||||
}
|
|
||||||
exportExcelTradingApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{
|
|
||||||
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
|
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
|
||||||
this.$download.saveAs(blob,'交易明细统计.xLsx')
|
this.$download.saveAs(blob,'交易明细统计.xLsx')
|
||||||
})
|
})
|
||||||
@ -368,33 +351,32 @@ export default {
|
|||||||
// 获取订单统计信息
|
// 获取订单统计信息
|
||||||
|
|
||||||
async getOrderStatistics() {
|
async getOrderStatistics() {
|
||||||
// await this.getDeptList()
|
getTissueByDataApi(this.queryParams).then(res=>{
|
||||||
|
|
||||||
let dateRange = []
|
|
||||||
if (this.beginTime && this.endTime) {
|
|
||||||
dateRange.push(this.beginTime.toLocaleDateString())
|
|
||||||
dateRange.push(this.endTime.toLocaleDateString())
|
|
||||||
}
|
|
||||||
getTissueByDataApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{
|
|
||||||
this.orderStatistics = res.data
|
this.orderStatistics = res.data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 获取列表信息
|
// 获取列表信息
|
||||||
async getList(val){
|
async getList(val){
|
||||||
// await this.getDeptList()
|
getTradingOnsPageApi(this.queryParams).then( response => {
|
||||||
let dateRange = []
|
|
||||||
if (this.beginTime && this.endTime) {
|
|
||||||
dateRange.push(this.beginTime.toLocaleDateString())
|
|
||||||
dateRange.push(this.endTime.toLocaleDateString())
|
|
||||||
}
|
|
||||||
getTradingPageApi(this.addDateRange(this.queryParams,dateRange)).then( response => {
|
|
||||||
this.orderList = response.data.records;
|
this.orderList = response.data.records;
|
||||||
this.total = response.data.total;
|
this.total = response.data.total;
|
||||||
this.isSysDate = false
|
this.isSysDate = false
|
||||||
// this.getDeptList()
|
})
|
||||||
this.getOrderStatistics()
|
},
|
||||||
|
// 获取字典
|
||||||
|
async getStaffByStorId() {
|
||||||
|
getStaffByStorId().then(response => {
|
||||||
|
this.staffList = response.data;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获取字典
|
||||||
|
async getDicts() {
|
||||||
|
getDicts("payment_channel").then(response => {
|
||||||
|
this.dict = response.data;
|
||||||
|
})
|
||||||
|
getDicts("payment_type").then(response => {
|
||||||
|
this.dictPayType = response.data;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getOrdersInfo(data) {
|
getOrdersInfo(data) {
|
||||||
|
@ -15,31 +15,46 @@
|
|||||||
<el-option label="小程序" value="applet"/>
|
<el-option label="小程序" value="applet"/>
|
||||||
<el-option label="收银台" value="cashier"/>
|
<el-option label="收银台" value="cashier"/>
|
||||||
<el-option label="POS端" value="POS"/>
|
<el-option label="POS端" value="POS"/>
|
||||||
|
<el-option label="平台" value="PC"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="" prop="payChannel">
|
<el-form-item label="" prop="payChannel">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="queryParams.payChannel"
|
v-model="queryParams.type"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请选择订单分类"
|
placeholder="请选择订单分类"
|
||||||
>
|
>
|
||||||
<el-option label="小程序" value="applet"/>
|
<el-option label="油品" value="1"/>
|
||||||
<el-option label="收银台" value="cashier"/>
|
<el-option label="商品" value="2"/>
|
||||||
<el-option label="POS端" value="POS"/>
|
<el-option label="储值卡" value="3"/>
|
||||||
|
<el-option label="积分" value="4"/>
|
||||||
|
<el-option label="囤油卡" value="5"/>
|
||||||
|
<el-option label="收银台订单" value="6"/>
|
||||||
|
<el-option label="挂账订单" value="7"/>
|
||||||
|
<el-option label="pos" value="8"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<!-- <el-form-item label="" prop="payType">-->
|
||||||
|
<!-- <el-select-->
|
||||||
|
<!-- v-model="queryParams.payType"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- placeholder="请选择支付方式"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- <el-option label="现金" value="CASH"/>-->
|
||||||
|
<!-- <el-option label="微信" value="WECHAT"/>-->
|
||||||
|
<!-- <el-option label="支付宝" value="ALIPAY"/>-->
|
||||||
|
<!-- <el-option label="余额" value="balance"/>-->
|
||||||
|
<!-- </el-select>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
<el-form-item label="" prop="payType">
|
<el-form-item label="" prop="payType">
|
||||||
<el-select
|
<el-select v-model="queryParams.payType" placeholder="请选择支付方式" clearable>
|
||||||
v-model="queryParams.payType"
|
<el-option
|
||||||
clearable
|
v-for="dicts in this.dictPayType"
|
||||||
placeholder="请选择支付方式"
|
:key="dicts.dictValue"
|
||||||
>
|
:label="dicts.dictLabel"
|
||||||
<el-option label="现金" value="CASH"/>
|
:value="dicts.dictValue"
|
||||||
<el-option label="微信" value="WECHAT"/>
|
/>
|
||||||
<el-option label="支付宝" value="ALIPAY"/>
|
|
||||||
<el-option label="余额" value="balance"/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="" prop="status">
|
<el-form-item label="" prop="status">
|
||||||
@ -51,68 +66,87 @@
|
|||||||
<el-option label="已支付" value="paid"/>
|
<el-option label="已支付" value="paid"/>
|
||||||
<el-option label="未支付" value="unpaid"/>
|
<el-option label="未支付" value="unpaid"/>
|
||||||
<el-option label="已退款" value="refund"/>
|
<el-option label="已退款" value="refund"/>
|
||||||
|
<el-option label="支付失败" value="payFail"/>
|
||||||
|
<el-option label="退款中" value="refunding"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="" prop="payType">
|
<!-- <el-form-item label="" prop="payType">-->
|
||||||
<el-select
|
<!-- <el-select-->
|
||||||
v-model="queryParams.payType"
|
<!-- v-model="queryParams.payChannel"-->
|
||||||
clearable
|
<!-- clearable-->
|
||||||
placeholder="请选择支付渠道"
|
<!-- placeholder="请选择支付渠道"-->
|
||||||
>
|
<!-- >-->
|
||||||
<el-option label="现金" value="CASH"/>
|
<!-- <el-option label="小程序" value="applet"/>-->
|
||||||
<el-option label="微信" value="WECHAT"/>
|
<!-- <el-option label="收银台" value="cashier"/>-->
|
||||||
<el-option label="支付宝" value="ALIPAY"/>
|
<!-- <el-option label="POS端" value="POS"/>-->
|
||||||
<el-option label="余额" value="balance"/>
|
<!-- </el-select>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<el-form-item label="" prop="paymentChannel">
|
||||||
|
<el-select v-model="queryParams.paymentChannel" placeholder="请选择支付通道" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dicts in this.dict"
|
||||||
|
:key="dicts.dictValue"
|
||||||
|
:label="dicts.dictLabel"
|
||||||
|
:value="dicts.dictValue"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="" style="margin-right: 0px" prop="status">
|
<el-form-item label="" prop="staffId">
|
||||||
<el-select
|
<el-select v-model="queryParams.staffId" placeholder="请选择员工" clearable>
|
||||||
v-model="queryParams.status"
|
<el-option
|
||||||
clearable
|
v-for="dicts in this.staffList"
|
||||||
placeholder="请选择员工"
|
:key="dicts.acctId"
|
||||||
>
|
:label="dicts.accountName"
|
||||||
<el-option label="已支付" value="paid"/>
|
:value="dicts.acctId"
|
||||||
<el-option label="未支付" value="unpaid"/>
|
/>
|
||||||
<el-option label="已退款" value="refund"/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="" prop="status">
|
<el-form-item label="" prop="userName">
|
||||||
<el-select
|
<el-input v-model="queryParams.userName" placeholder="请输入付款用户"></el-input>
|
||||||
v-model="queryParams.status"
|
|
||||||
clearable
|
|
||||||
placeholder="请输入付款用户"
|
|
||||||
>
|
|
||||||
<el-option label="已支付" value="paid"/>
|
|
||||||
<el-option label="未支付" value="unpaid"/>
|
|
||||||
<el-option label="已退款" value="refund"/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="">
|
<!-- <el-form-item label="" prop="beginTime">-->
|
||||||
|
<!-- <el-date-picker-->
|
||||||
|
<!-- v-model="beginTime"-->
|
||||||
|
<!-- style="width: 140px"-->
|
||||||
|
<!-- type="date"-->
|
||||||
|
<!-- placeholder="交易开始日期"-->
|
||||||
|
<!-- format="yyyy-MM-DD"-->
|
||||||
|
<!-- value-format="yyyy-MM-DD"-->
|
||||||
|
<!-- ></el-date-picker>-->
|
||||||
|
<!-- 至-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-form-item label="" prop="endTime">-->
|
||||||
|
<!-- <el-date-picker-->
|
||||||
|
<!-- v-model="endTime"-->
|
||||||
|
<!-- style="width: 140px"-->
|
||||||
|
<!-- type="date"-->
|
||||||
|
<!-- placeholder="交易结束日期"-->
|
||||||
|
<!-- format="yyyy-MM-DD"-->
|
||||||
|
<!-- value-format="yyyy-MM-DD"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- </el-date-picker>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="beginTime"
|
v-model="queryParams.dataRange"
|
||||||
style="width: 140px"
|
type="daterange"
|
||||||
type="date"
|
range-separator="至"
|
||||||
placeholder="交易开始日期">
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
format="yyyy-MM-dd"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
至
|
|
||||||
<el-date-picker
|
|
||||||
v-model="endTime"
|
|
||||||
style="width: 140px"
|
|
||||||
type="date"
|
|
||||||
placeholder="交易结束日期">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item style="float: right; margin-right: 0px ">
|
<el-form-item style="float: right; margin-right: 0px ">
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||||
<el-button type="primary">导出</el-button>
|
<el-button type="primary" @click="exportExcelCashier">导出</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="wit_box">
|
<div class="wit_box">
|
||||||
<div class="box-gang">
|
<div class="box-gang">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<el-tooltip class="item" effect="dark" placement="top-start">
|
<el-tooltip class="item" effect="dark" placement="top-start" content="微信收款(元)/笔数">
|
||||||
<div class="size-bole">{{ map.s1 || 0 }}/{{ map.s2 || 0 }}</div>
|
<div class="size-bole">{{ map.s1 || 0 }}/{{ map.s2 || 0 }}</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<div class="size-hui">
|
<div class="size-hui">
|
||||||
@ -121,7 +155,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<el-tooltip class="item" effect="dark" placement="top-start">
|
<el-tooltip class="item" effect="dark" placement="top-start" content="支付宝收款(元)/笔数">
|
||||||
<div class="size-bole" style="color:#00CAFF;">{{ map.s3 || 0 }}/{{ map.s4 || 0 }}</div>
|
<div class="size-bole" style="color:#00CAFF;">{{ map.s3 || 0 }}/{{ map.s4 || 0 }}</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
@ -131,7 +165,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<el-tooltip class="item" effect="dark" placement="top-start">
|
<el-tooltip class="item" effect="dark" placement="top-start" content="银联二维码(元)/笔数">
|
||||||
<div class="size-bole" style="color:#F44522;">{{ map.s5 || 0 }}/{{ map.s6 || 0 }}</div>
|
<div class="size-bole" style="color:#F44522;">{{ map.s5 || 0 }}/{{ map.s6 || 0 }}</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
@ -142,7 +176,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<el-tooltip class="item" effect="dark" content="999999/999999999999" placement="top-start">
|
<el-tooltip class="item" effect="dark" content="现金收款(元)/笔数" placement="top-start">
|
||||||
<div class="size-bole" style="color:#0D2ED8;">{{ map.s7 || 0 }}/{{ map.s8 || 0 }}</div>
|
<div class="size-bole" style="color:#0D2ED8;">{{ map.s7 || 0 }}/{{ map.s8 || 0 }}</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
@ -205,10 +239,27 @@
|
|||||||
<el-table-column prop="goodsMoney" align="center" label="订单金额(元)">
|
<el-table-column prop="goodsMoney" align="center" label="订单金额(元)">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="discountAmount" align="center" label="优惠金额(元)"></el-table-column>
|
<el-table-column prop="discountAmount" align="center" label="优惠金额(元)"></el-table-column>
|
||||||
<el-table-column prop="payMoney" align="center" label="实收金额(元)"></el-table-column>
|
<el-table-column prop="payMoney" align="center" label="实收金额(元)">
|
||||||
<el-table-column prop="payMoney" align="center" label="会员付款金额(元)"></el-table-column>
|
<template slot-scope="scope">
|
||||||
|
<span v-if="scope.row.payType == 'ALIPAY'">{{ scope.row.payMoney}}</span>
|
||||||
|
<span v-else-if="scope.row.payType == 'WECHAT'">{{ scope.row.payMoney}}</span>
|
||||||
|
<span v-else-if="scope.row.payType == 'UNIONPAY'">{{ scope.row.payMoney}}</span>
|
||||||
|
<span v-else-if="scope.row.payType == 'CASH'">{{ scope.row.payMoney}}</span>
|
||||||
|
<span v-else-if="scope.row.payType == 'APPLET_CODE'">{{ scope.row.payMoney}}</span>
|
||||||
|
<span v-else-if="scope.row.payType == 'after_pay'">{{ scope.row.payMoney}}</span>
|
||||||
|
<span v-else> -- </span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="payMoney" align="center" label="归还金额(元)">
|
<el-table-column prop="payMoney" align="center" label="会员付款金额(元)">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-if="scope.row.payType == 'card_value'">{{ scope.row.payMoney}}</span>
|
||||||
|
<span v-else-if="scope.row.payType == 'fule_card'">{{ scope.row.payMoney}}</span>
|
||||||
|
<span v-else-if="scope.row.payType == 'car_card_value'">{{ scope.row.payMoney}}</span>
|
||||||
|
<span v-else> -- </span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="payMoney" align="center" label="挂账/归还金额(元)">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.type == 7">{{ scope.row.goodsMoney}}</span>
|
<span v-if="scope.row.type == 7">{{ scope.row.goodsMoney}}</span>
|
||||||
<span v-else> -- </span>
|
<span v-else> -- </span>
|
||||||
@ -231,7 +282,7 @@
|
|||||||
<div v-else style="color: #F44522">支付失败</div>
|
<div v-else style="color: #F44522">支付失败</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="merchantName" align="center" label="支付渠道"></el-table-column>
|
<el-table-column prop="paymentChannel" align="center" label="支付渠道"></el-table-column>
|
||||||
<el-table-column prop="mchntCd" align="center" label="商户号"></el-table-column>
|
<el-table-column prop="mchntCd" align="center" label="商户号"></el-table-column>
|
||||||
<el-table-column prop="createBy" align="center" label="关联员工"></el-table-column>
|
<el-table-column prop="createBy" align="center" label="关联员工"></el-table-column>
|
||||||
|
|
||||||
@ -300,13 +351,18 @@
|
|||||||
import {
|
import {
|
||||||
exportExcelTradingApi,
|
exportExcelTradingApi,
|
||||||
orderStatistics,
|
orderStatistics,
|
||||||
transactionList
|
transactionList,
|
||||||
|
getDicts,
|
||||||
|
exportExcelOrderMsgsApi
|
||||||
} from "@/api/allOrder";
|
} from "@/api/allOrder";
|
||||||
|
import {exportExcelOrderMsgApi, getStaffByStorId} from "../../../../api/allOrder";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "reconciliation-trading",
|
name: "reconciliation-trading",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
dict:{},
|
||||||
|
dictPayType:{},
|
||||||
map:{},
|
map:{},
|
||||||
radio1: "油号选错",
|
radio1: "油号选错",
|
||||||
loading: false,
|
loading: false,
|
||||||
@ -323,7 +379,7 @@ export default {
|
|||||||
// 收银台订单列表
|
// 收银台订单列表
|
||||||
orderList: [],
|
orderList: [],
|
||||||
deptList: [],
|
deptList: [],
|
||||||
|
dataRange:[],
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
page: 1,
|
page: 1,
|
||||||
@ -337,6 +393,9 @@ export default {
|
|||||||
deptType: "3",
|
deptType: "3",
|
||||||
storeId: "",
|
storeId: "",
|
||||||
deptId: "",
|
deptId: "",
|
||||||
|
userName:"",
|
||||||
|
staffId:"",
|
||||||
|
dataRange:[],
|
||||||
},
|
},
|
||||||
orderStatistics: {
|
orderStatistics: {
|
||||||
CASH: "0",
|
CASH: "0",
|
||||||
@ -369,16 +428,14 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
async getDeptList() {
|
async getDeptList() {
|
||||||
this.getList()
|
this.getList()
|
||||||
|
this.getDicts()
|
||||||
|
this.getStaffByStorId()
|
||||||
},
|
},
|
||||||
exportExcelCashier() {
|
exportExcelCashier() {
|
||||||
let dateRange = []
|
exportExcelOrderMsgsApi(this.queryParams).then(res => {
|
||||||
if (this.beginTime && this.endTime) {
|
|
||||||
dateRange.push(this.beginTime.toLocaleDateString())
|
|
||||||
dateRange.push(this.endTime.toLocaleDateString())
|
|
||||||
}
|
|
||||||
exportExcelTradingApi(this.addDateRange(this.queryParams, dateRange)).then(res => {
|
|
||||||
const blob = new Blob([res], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'});
|
const blob = new Blob([res], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'});
|
||||||
this.$download.saveAs(blob, '交易明细统计.xLsx')
|
this.$download.saveAs(blob, '交易明细统计.xLsx')
|
||||||
})
|
})
|
||||||
@ -400,15 +457,33 @@ export default {
|
|||||||
async getList(val) {
|
async getList(val) {
|
||||||
let dateRange = []
|
let dateRange = []
|
||||||
if (this.beginTime && this.endTime) {
|
if (this.beginTime && this.endTime) {
|
||||||
dateRange.push(this.beginTime.toLocaleDateString())
|
dateRange.push(this.beginTime)
|
||||||
dateRange.push(this.endTime.toLocaleDateString())
|
dateRange.push(this.endTime)
|
||||||
}
|
}
|
||||||
transactionList(this.addDateRange(this.queryParams, dateRange)).then(response => {
|
console.log(this.beginTime)
|
||||||
|
transactionList(this.queryParams).then(response => {
|
||||||
this.orderList = response.data.records;
|
this.orderList = response.data.records;
|
||||||
this.total = response.data.total;
|
this.total = response.data.total;
|
||||||
this.isSysDate = false
|
this.isSysDate = false
|
||||||
this.getOrderStatistics()
|
this.getOrderStatistics()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
// 获取字典
|
||||||
|
async getDicts() {
|
||||||
|
getDicts("payment_channel").then(response => {
|
||||||
|
this.dict = response.data;
|
||||||
|
})
|
||||||
|
getDicts("payment_type").then(response => {
|
||||||
|
this.dictPayType = response.data;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 获取字典
|
||||||
|
async getStaffByStorId() {
|
||||||
|
getStaffByStorId().then(response => {
|
||||||
|
this.staffList = response.data;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getOrdersInfo(data) {
|
getOrdersInfo(data) {
|
||||||
|
@ -5,24 +5,16 @@
|
|||||||
<div class="wgang">
|
<div class="wgang">
|
||||||
<div style="display: flex;align-items: center ">
|
<div style="display: flex;align-items: center ">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="120px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="120px">
|
||||||
<el-form-item label="">
|
|
||||||
|
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="beginTime"
|
v-model="this.dateRange"
|
||||||
style="width: 140px"
|
type="daterange"
|
||||||
type="date"
|
range-separator="至"
|
||||||
@change="getDays()"
|
start-placeholder="开始日期"
|
||||||
placeholder="开始日期">
|
end-placeholder="结束日期"
|
||||||
|
format="yyyy-MM-dd"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
至
|
|
||||||
<el-date-picker
|
|
||||||
v-model="endTime"
|
|
||||||
style="width: 140px"
|
|
||||||
type="date"
|
|
||||||
@change="getDays()"
|
|
||||||
placeholder="结束日期">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@ -33,7 +25,7 @@
|
|||||||
<div class="wit_box">
|
<div class="wit_box">
|
||||||
<div class="box-gang">
|
<div class="box-gang">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<el-tooltip class="item" effect="dark" content="999999/999999999999" placement="top-start">
|
<el-tooltip class="item" effect="dark" content="订单总金额(元)/笔数" placement="top-start">
|
||||||
<div class="size-bole">0/0</div>
|
<div class="size-bole">0/0</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<div class="size-hui">
|
<div class="size-hui">
|
||||||
@ -42,8 +34,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<el-tooltip class="item" effect="dark" content="999999/999999999999" placement="top-start">
|
<el-tooltip class="item" effect="dark" content="实收总金额(元)" placement="top-start">
|
||||||
<div class="size-bole" style="color:#00CAFF;">0/0</div>
|
<div class="size-bole" style="color:#00CAFF;">0</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<div class="size-hui">
|
<div class="size-hui">
|
||||||
<div class="dian" style="background: #00CAFF"></div>
|
<div class="dian" style="background: #00CAFF"></div>
|
||||||
@ -51,7 +43,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<el-tooltip class="item" effect="dark" content="999999/999999999999" placement="top-start">
|
<el-tooltip class="item" effect="dark" content="退款总金额(元)/笔数" placement="top-start">
|
||||||
<div class="size-bole" style="color:#F44522;" >0/0</div>
|
<div class="size-bole" style="color:#F44522;" >0/0</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
@ -61,10 +53,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<el-tooltip class="item" effect="dark" content="999999/999999999999" placement="top-start">
|
<el-tooltip class="item" effect="dark" content="日均订单金额(元)" placement="top-start">
|
||||||
<div class="size-bole" style="color:#FF7E00;" >{{orderStatistics.balanceCount?orderStatistics.balanceCount:0}}/0</div>
|
<div class="size-bole" style="color:#FF7E00;" >{{orderStatistics.balanceCount?orderStatistics.balanceCount:0}}</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
<div class="size-hui">
|
<div class="size-hui">
|
||||||
<div class="dian" style="background: #FF7E00"></div>
|
<div class="dian" style="background: #FF7E00"></div>
|
||||||
<div class="nei">日均订单金额(元)</div>
|
<div class="nei">日均订单金额(元)</div>
|
||||||
@ -211,7 +202,6 @@ import {
|
|||||||
this.$download.saveAs(blob,'油站流水订单统计.xLsx')
|
this.$download.saveAs(blob,'油站流水订单统计.xLsx')
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 获取订单统计信息
|
|
||||||
|
|
||||||
getOrderStatistics() {
|
getOrderStatistics() {
|
||||||
let dateRange = []
|
let dateRange = []
|
||||||
@ -231,17 +221,12 @@ import {
|
|||||||
|
|
||||||
// 获取列表信息
|
// 获取列表信息
|
||||||
getList(val){
|
getList(val){
|
||||||
let dateRange = []
|
getInstituionListApi2(this.queryParams).then( response => {
|
||||||
if (this.beginTime && this.endTime) {
|
|
||||||
dateRange.push(this.beginTime.toLocaleDateString())
|
|
||||||
dateRange.push(this.endTime.toLocaleDateString())
|
|
||||||
}
|
|
||||||
getInstituionListApi2(this.addDateRange(this.queryParams,dateRange)).then( response => {
|
|
||||||
this.orderList = response.data.records;
|
this.orderList = response.data.records;
|
||||||
this.total = response.data.total;
|
this.total = response.data.total;
|
||||||
this.isSysDate = false
|
this.isSysDate = false
|
||||||
})
|
})
|
||||||
this.getOrderStatistics()
|
//this.getOrderStatistics()
|
||||||
},
|
},
|
||||||
|
|
||||||
// 搜索按钮操作
|
// 搜索按钮操作
|
||||||
|
@ -2,13 +2,17 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<!-- <img :src="logo" alt="Logo" style="margin-left: 80px;" class="logo">-->
|
<!-- <img :src="logo" alt="Logo" style="margin-left: 80px;" class="logo">-->
|
||||||
<div class="left-img">
|
<div class="left-img">
|
||||||
<div class="top-p" style="height: 130px" >
|
<div v-if="this.form.logoSet === '0'">
|
||||||
|
<img class="logostat" :src="imagePath + this.form.logeImage" alt="">
|
||||||
|
<hr class="dashed-line">
|
||||||
|
</div>
|
||||||
|
<div class="top-p">
|
||||||
<div v-if="iflogoSet(0)" style="font-size: 16px;font-weight: bold">{{form.storeName}}</div>
|
<div v-if="iflogoSet(0)" style="font-size: 16px;font-weight: bold">{{form.storeName}}</div>
|
||||||
<div v-if="iflogoSet(1)" >{{form.title}}</div>
|
<div v-if="iflogoSet(1)" >{{form.title}}</div>
|
||||||
<div v-if="iflogoSet(2)">注:会员充值、一件加油、收银台消费</div>
|
<div v-if="iflogoSet(2)">注:会员充值、一件加油、收银台消费</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="conten-p" style="height: 150px">
|
<hr class="dashed-line">
|
||||||
|
<div class="conten-p">
|
||||||
<div v-if="ifcentent(0)" >订单编号:xf155666555</div>
|
<div v-if="ifcentent(0)" >订单编号:xf155666555</div>
|
||||||
<div v-if="ifcentent(1)">卡号:15xx858777</div>
|
<div v-if="ifcentent(1)">卡号:15xx858777</div>
|
||||||
<div v-if="ifcentent(2)">车牌号:鲁A7788</div>
|
<div v-if="ifcentent(2)">车牌号:鲁A7788</div>
|
||||||
@ -16,13 +20,15 @@
|
|||||||
<div v-if="ifcentent(4)">手机号:13583017106</div>
|
<div v-if="ifcentent(4)">手机号:13583017106</div>
|
||||||
<div v-if="ifcentent(5)">余额:999</div>
|
<div v-if="ifcentent(5)">余额:999</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="conten-p" style="height: 150px">
|
<hr class="dashed-line">
|
||||||
|
<div class="conten-p" style="height: 30px">
|
||||||
该区域为小票模板的固定排版
|
该区域为小票模板的固定排版
|
||||||
</div>
|
</div>
|
||||||
<div class="conten-p" style="height: 150px">
|
<hr class="dashed-line">
|
||||||
|
<div class="conten-p" style="height: 30px">
|
||||||
该区域为小票模板的固定排版
|
该区域为小票模板的固定排版
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<hr class="dashed-line">
|
||||||
<div class="conten-p">
|
<div class="conten-p">
|
||||||
<div v-if="ifbottoms(0)">操作时间:2019-09-09 12:00:00</div>
|
<div v-if="ifbottoms(0)">操作时间:2019-09-09 12:00:00</div>
|
||||||
<div v-if="ifbottoms(1)">联系方式:13583017776</div>
|
<div v-if="ifbottoms(1)">联系方式:13583017776</div>
|
||||||
@ -31,8 +37,13 @@
|
|||||||
<div v-if="ifbottoms(4)">地址:xx街道</div>
|
<div v-if="ifbottoms(4)">地址:xx街道</div>
|
||||||
<div v-if="ifbottoms(5)">备注:{{form.remarks}}</div>
|
<div v-if="ifbottoms(5)">备注:{{form.remarks}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<hr class="dashed-line">
|
||||||
<img v-if="this.form.logeImage" :src="imagePath + this.form.logeImage" alt="">
|
<div v-if="this.form.codeSet === '1'">
|
||||||
|
<img class="logostat" :src="imagePath + this.form.codeImage" alt="">
|
||||||
|
<hr class="dashed-line">
|
||||||
|
</div>
|
||||||
|
<div class="left-img_down">
|
||||||
|
谢谢惠顾,欢迎下次光临!
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-container">
|
<div class="form-container">
|
||||||
@ -44,23 +55,6 @@
|
|||||||
<el-radio v-model="logoSet" label="1">不打印小票LOGO</el-radio>
|
<el-radio v-model="logoSet" label="1">不打印小票LOGO</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<!-- logo -->
|
<!-- logo -->
|
||||||
<el-upload
|
|
||||||
:action="uploadAction"
|
|
||||||
list-type="picture-card"
|
|
||||||
:class="{hide:hideUpload}"
|
|
||||||
:file-list="uploadFiles"
|
|
||||||
:auto-upload="true"
|
|
||||||
:show-file-list="false"
|
|
||||||
:headers="uploadHeader"
|
|
||||||
:on-success="handleUploadSuccessCover">
|
|
||||||
<img
|
|
||||||
v-if="this.form.logeImage"
|
|
||||||
:src="imagePath + this.form.logeImage"
|
|
||||||
class="list-img"
|
|
||||||
style="width: 100%; height: auto;"
|
|
||||||
/>
|
|
||||||
<i v-if="!this.form.logeImage" class="el-icon-plus"></i>
|
|
||||||
</el-upload>
|
|
||||||
</div>
|
</div>
|
||||||
<p style="font-weight: bold;">抬头、脚注设置</p>
|
<p style="font-weight: bold;">抬头、脚注设置</p>
|
||||||
<el-checkbox-group v-model="form.headfootSets" class="vertical-checkbox-group">
|
<el-checkbox-group v-model="form.headfootSets" class="vertical-checkbox-group">
|
||||||
@ -72,7 +66,7 @@
|
|||||||
|
|
||||||
<div class="checkbox-input-container">
|
<div class="checkbox-input-container">
|
||||||
<el-checkbox :label="2">小票类型</el-checkbox>
|
<el-checkbox :label="2">小票类型</el-checkbox>
|
||||||
<span style="font-size: 10px">注:会员充值、一件加油、收银台消费</span>
|
<span style="font-size: 10px">注:会员充值、一键加油、收银台消费</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="checkbox-input-container">
|
<div class="checkbox-input-container">
|
||||||
@ -108,8 +102,45 @@
|
|||||||
<el-radio v-model="logoSet" label="1">自定义二维码</el-radio>
|
<el-radio v-model="logoSet" label="1">自定义二维码</el-radio>
|
||||||
<el-radio v-model="logoSet" label="2">不打印二维码</el-radio>
|
<el-radio v-model="logoSet" label="2">不打印二维码</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<!-- 二维码 -->
|
<div style="width: 600px; margin-left: auto">
|
||||||
|
<el-input
|
||||||
|
v-if="this.form.codeSet==='1'"
|
||||||
|
v-model="form.codeContent" placeholder="请输入二维码的内容"></el-input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="submitForm3('form')">保存并同步更新小票样式</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<div class="relative">
|
||||||
<el-upload
|
<el-upload
|
||||||
|
:action="uploadAction"
|
||||||
|
v-if="this.form.logoSet === '0'"
|
||||||
|
list-type="picture-card"
|
||||||
|
:class="{hide:hideUpload}"
|
||||||
|
:file-list="uploadFiles"
|
||||||
|
:auto-upload="true"
|
||||||
|
:show-file-list="false"
|
||||||
|
:headers="uploadHeader"
|
||||||
|
:on-success="handleUploadSuccessCover">
|
||||||
|
<img
|
||||||
|
v-if="this.form.logeImage"
|
||||||
|
:src="imagePath + this.form.logeImage"
|
||||||
|
class="list-img"
|
||||||
|
style="width: 100%; height: auto;"
|
||||||
|
/>
|
||||||
|
<i v-if="!this.form.logeImage" class="el-icon-plus"></i>
|
||||||
|
</el-upload>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="relative1">
|
||||||
|
<div>
|
||||||
|
样例
|
||||||
|
</div>
|
||||||
|
<!-- 二维码 -->
|
||||||
|
<el-upload
|
||||||
|
v-if="this.form.codeSet==='1'"
|
||||||
:action="uploadAction"
|
:action="uploadAction"
|
||||||
list-type="picture-card"
|
list-type="picture-card"
|
||||||
:class="{hide:hideUpload}"
|
:class="{hide:hideUpload}"
|
||||||
@ -127,11 +158,6 @@
|
|||||||
<i v-if="!this.form.codeImage" class="el-icon-plus"></i>
|
<i v-if="!this.form.codeImage" class="el-icon-plus"></i>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</div>
|
</div>
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" @click="submitForm3('form')">保存并同步更新小票样式</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -157,6 +183,7 @@ export default {
|
|||||||
codeImage:'',
|
codeImage:'',
|
||||||
title:'',
|
title:'',
|
||||||
foot:'',
|
foot:'',
|
||||||
|
codeContent:'',
|
||||||
},
|
},
|
||||||
form2: {
|
form2: {
|
||||||
id:'',
|
id:'',
|
||||||
@ -170,6 +197,7 @@ export default {
|
|||||||
codeImage:'',
|
codeImage:'',
|
||||||
title:'',
|
title:'',
|
||||||
foot:'',
|
foot:'',
|
||||||
|
codeContent:'',
|
||||||
},
|
},
|
||||||
logoSet: '', // 单选框的值,
|
logoSet: '', // 单选框的值,
|
||||||
ding: '',
|
ding: '',
|
||||||
@ -245,6 +273,7 @@ export default {
|
|||||||
this.form2.codeImage= this.form.codeImage
|
this.form2.codeImage= this.form.codeImage
|
||||||
this.form2.title= this.form.title
|
this.form2.title= this.form.title
|
||||||
this.form2.foot= this.form.foot
|
this.form2.foot= this.form.foot
|
||||||
|
this.form2.codeContent= this.form.codeContent
|
||||||
return this.form2;
|
return this.form2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -253,6 +282,8 @@ export default {
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.left-img{
|
.left-img{
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
width: 300px;
|
width: 300px;
|
||||||
height: 830px;
|
height: 830px;
|
||||||
background: url("../../assets/images/xpiao.png") no-repeat;
|
background: url("../../assets/images/xpiao.png") no-repeat;
|
||||||
@ -311,16 +342,14 @@ export default {
|
|||||||
.top-p{
|
.top-p{
|
||||||
text-align: center;
|
text-align: center;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 15px;
|
padding-top: 10px;
|
||||||
padding-top: 30px;
|
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
|
||||||
}
|
}
|
||||||
.conten-p{
|
.conten-p{
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 15px;
|
|
||||||
padding-left: 30px;
|
padding-left: 30px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
@ -397,7 +426,37 @@ avatar-uploader .el-upload {
|
|||||||
.el-form-item {
|
.el-form-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-top: 20px;
|
margin-top: 70px;
|
||||||
|
}
|
||||||
|
.relative {
|
||||||
|
position: relative;
|
||||||
|
left: 20px; /* 向左偏移20像素 */
|
||||||
|
top: 10px; /* 向上偏移10像素 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.relative1 {
|
||||||
|
position: relative;
|
||||||
|
left: -130px; /* 向左偏移20像素 */
|
||||||
|
top: 600px; /* 向上偏移10像素 */
|
||||||
|
}
|
||||||
|
.logostat{
|
||||||
|
filter: grayscale(100%);
|
||||||
|
width: 100px;
|
||||||
|
height: 100px;
|
||||||
|
margin-left: 30%;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
.dashed-line {
|
||||||
|
border-top: 1px dashed #f2f2f2; /* 虚线的颜色和宽度 */
|
||||||
|
width: 92%; /* 虚线的长度 */
|
||||||
|
margin:11px 10px 0; /* 上下外边距 */
|
||||||
|
clear: both; /* 清除浮动,如果有的话 */
|
||||||
|
}
|
||||||
|
.left-img_down{
|
||||||
|
margin-top: 10px;
|
||||||
|
margin-left: 5%;
|
||||||
|
width: 90%;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -55,10 +55,10 @@ Vue.prototype.handleTree = handleTree
|
|||||||
// Vue.prototype.pcUrl = 'http://47.95.206.185:85/'
|
// Vue.prototype.pcUrl = 'http://47.95.206.185:85/'
|
||||||
// Vue.prototype.pcUrl = 'http://192.168.31.178:81/'
|
// Vue.prototype.pcUrl = 'http://192.168.31.178:81/'
|
||||||
// Vue.prototype.bkUrl = 'http://192.168.31.178:81/' //跳转油站
|
// Vue.prototype.bkUrl = 'http://192.168.31.178:81/' //跳转油站
|
||||||
Vue.prototype.bkUrl = 'https://www.youkerr.com/' //跳转油站
|
Vue.prototype.bkUrl = 'http://127.0.0.1:8080/' //跳转油站
|
||||||
|
|
||||||
|
|
||||||
Vue.prototype.pcUrl = 'https://www.youkerr.com/' // 收银台
|
Vue.prototype.bkUrl = 'http://127.0.0.1:8080/' // 收银台
|
||||||
// 全局组件挂载
|
// 全局组件挂载
|
||||||
Vue.component('DictTag', DictTag)
|
Vue.component('DictTag', DictTag)
|
||||||
Vue.component('Pagination', Pagination)
|
Vue.component('Pagination', Pagination)
|
||||||
|
@ -0,0 +1,20 @@
|
|||||||
|
package com.fuint.business.marketingActivity.cardFule.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class CardValueConditionVo implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
//活动名称
|
||||||
|
private String name;
|
||||||
|
//活动id
|
||||||
|
private String cardValueId;
|
||||||
|
//活动的时间
|
||||||
|
private String[] dataRange;
|
||||||
|
//订单号
|
||||||
|
private String orderNo;
|
||||||
|
}
|
@ -4,6 +4,7 @@ package com.fuint.business.marketingActivity.cardValue.controller;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.fuint.business.marketingActivity.cardFule.vo.CardValueConditionVo;
|
||||||
import com.fuint.business.marketingActivity.cardValue.dto.CardValueRecordDTO;
|
import com.fuint.business.marketingActivity.cardValue.dto.CardValueRecordDTO;
|
||||||
import com.fuint.business.marketingActivity.cardValue.dto.SelectCard;
|
import com.fuint.business.marketingActivity.cardValue.dto.SelectCard;
|
||||||
import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord;
|
import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord;
|
||||||
@ -224,5 +225,11 @@ public class CardValueRecordController extends BaseController {
|
|||||||
public ResponseObject orderStatistics( @Param("cardValueRecord") CardValueRecordDTO cardValueRecord){
|
public ResponseObject orderStatistics( @Param("cardValueRecord") CardValueRecordDTO cardValueRecord){
|
||||||
return getSuccessResult(cardValueRecordService.orderStatistics(cardValueRecord));
|
return getSuccessResult(cardValueRecordService.orderStatistics(cardValueRecord));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 订单统计
|
||||||
|
@PostMapping("/getCardValueByCardValueId")
|
||||||
|
public ResponseObject getCardValueByCardValueId(@Param("cardValueConditionVo") CardValueConditionVo cardValueConditionVo){
|
||||||
|
return getSuccessResult(cardValueRecordService.getCardValueByCardValueId(cardValueConditionVo));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.fuint.business.integral.entity.IntegralDetail;
|
import com.fuint.business.integral.entity.IntegralDetail;
|
||||||
|
import com.fuint.business.marketingActivity.cardFule.vo.CardValueConditionVo;
|
||||||
import com.fuint.business.marketingActivity.cardValue.dto.CardValueRecordDTO;
|
import com.fuint.business.marketingActivity.cardValue.dto.CardValueRecordDTO;
|
||||||
import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord;
|
import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord;
|
||||||
import com.fuint.business.marketingActivity.cardValue.vo.Excel.CardValueRecordExcel;
|
import com.fuint.business.marketingActivity.cardValue.vo.Excel.CardValueRecordExcel;
|
||||||
@ -44,5 +45,8 @@ public interface CardValueRecordMapper extends BaseMapper<CardValueRecord> {
|
|||||||
IPage<CardValueRecord> selectCardValueRecordList(Page page, @Param("cardValueRecord") CardValueRecord cardValueRecord);
|
IPage<CardValueRecord> selectCardValueRecordList(Page page, @Param("cardValueRecord") CardValueRecord cardValueRecord);
|
||||||
|
|
||||||
Map<String, Object> getAmountAndConsume(UserBalanceVo record);
|
Map<String, Object> getAmountAndConsume(UserBalanceVo record);
|
||||||
|
|
||||||
|
List getCardValueByCardValueId(@Param("cardValueConditionVo") CardValueConditionVo cardValueConditionVo,
|
||||||
|
@Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -338,6 +338,21 @@
|
|||||||
<!-- where store_id = #{storeId} and mt_user_id = #{userId}-->
|
<!-- where store_id = #{storeId} and mt_user_id = #{userId}-->
|
||||||
<!-- group by chain_store_id
|
<!-- group by chain_store_id
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
<select id="getCardValueByCardValueId" resultType="com.fuint.business.marketingActivity.cardValue.dto.CardValueRecordDTO">
|
||||||
|
select
|
||||||
|
*
|
||||||
|
from card_value_record
|
||||||
|
where
|
||||||
|
card_value_id = #{cardValueConditionVo.cardValueId}
|
||||||
|
<if test="cardValueConditionVo.orderNo != null and cardValueConditionVo.orderNo != ''">
|
||||||
|
and payment_no like concat('%', #{cardValueConditionVo.orderNo}, '%')
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if test="cardValueConditionVo.dataRange != null and cardValueConditionVo.dataRange != ''">
|
||||||
|
and <![CDATA[update_time>=#{startTime} and pdate_time<=#{endTime}]]>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.fuint.api.fuyou.entity.ReturnParameter;
|
import com.fuint.api.fuyou.entity.ReturnParameter;
|
||||||
import com.fuint.business.integral.entity.IntegralDetail;
|
import com.fuint.business.integral.entity.IntegralDetail;
|
||||||
|
import com.fuint.business.marketingActivity.cardFule.vo.CardValueConditionVo;
|
||||||
import com.fuint.business.marketingActivity.cardValue.dto.CardValueRecordDTO;
|
import com.fuint.business.marketingActivity.cardValue.dto.CardValueRecordDTO;
|
||||||
import com.fuint.business.marketingActivity.cardValue.dto.SelectCard;
|
import com.fuint.business.marketingActivity.cardValue.dto.SelectCard;
|
||||||
import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord;
|
import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord;
|
||||||
@ -106,4 +107,10 @@ public interface CardValueRecordService extends IService<CardValueRecord> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<CardValueRecord> selectRecord();
|
List<CardValueRecord> selectRecord();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询充值记录
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<CardValueRecord> getCardValueByCardValueId(CardValueConditionVo cardValueConditionVo);
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,7 @@ import com.fuint.business.marketingActivity.cardFule.dto.CardFuelRecordDTO;
|
|||||||
import com.fuint.business.marketingActivity.cardFule.entity.CardFuelDiesel;
|
import com.fuint.business.marketingActivity.cardFule.entity.CardFuelDiesel;
|
||||||
import com.fuint.business.marketingActivity.cardFule.service.CardFuelDieselService;
|
import com.fuint.business.marketingActivity.cardFule.service.CardFuelDieselService;
|
||||||
import com.fuint.business.marketingActivity.cardFule.service.CardFuelRecordService;
|
import com.fuint.business.marketingActivity.cardFule.service.CardFuelRecordService;
|
||||||
|
import com.fuint.business.marketingActivity.cardFule.vo.CardValueConditionVo;
|
||||||
import com.fuint.business.marketingActivity.cardValue.dto.CardValueRecordDTO;
|
import com.fuint.business.marketingActivity.cardValue.dto.CardValueRecordDTO;
|
||||||
import com.fuint.business.marketingActivity.cardValue.dto.SelectCard;
|
import com.fuint.business.marketingActivity.cardValue.dto.SelectCard;
|
||||||
import com.fuint.business.marketingActivity.cardValue.entity.CardValueChild;
|
import com.fuint.business.marketingActivity.cardValue.entity.CardValueChild;
|
||||||
@ -80,6 +81,7 @@ import com.fuint.repository.mapper.MtStaffMapper;
|
|||||||
import com.fuint.repository.model.MtStaff;
|
import com.fuint.repository.model.MtStaff;
|
||||||
import io.lettuce.core.dynamic.annotation.Param;
|
import io.lettuce.core.dynamic.annotation.Param;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang.time.DateFormatUtils;
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.redisson.api.RLock;
|
import org.redisson.api.RLock;
|
||||||
@ -1386,5 +1388,12 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
|
|||||||
queryWrapper.eq("status","1");
|
queryWrapper.eq("status","1");
|
||||||
return baseMapper.selectList(queryWrapper);
|
return baseMapper.selectList(queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CardValueRecord> getCardValueByCardValueId(CardValueConditionVo cardValueConditionVo) {
|
||||||
|
List list=cardValueRecordMapper.getCardValueByCardValueId(cardValueConditionVo,cardValueConditionVo.getDataRange()[0]
|
||||||
|
,cardValueConditionVo.getDataRange()[1]);
|
||||||
|
return list;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,7 +145,18 @@ public class AllOrderInfoController extends BaseController {
|
|||||||
IPage<AllOrderInfoVo> list = allOrderInfoService.getTradingPage(page, allOrderInfo);
|
IPage<AllOrderInfoVo> list = allOrderInfoService.getTradingPage(page, allOrderInfo);
|
||||||
return getSuccessResult(list);
|
return getSuccessResult(list);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 交易对账
|
||||||
|
* 交易明细分页查询
|
||||||
|
*/
|
||||||
|
@GetMapping("tradingList")
|
||||||
|
public ResponseObject gettradingListPage(AllOrderInfoDto 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.gettradingListPage(page, allOrderInfo);
|
||||||
|
return getSuccessResult(list);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -175,8 +186,7 @@ public class AllOrderInfoController extends BaseController {
|
|||||||
public ResponseObject getTradingData(AllOrderInfoDto allOrderInfo,
|
public ResponseObject getTradingData(AllOrderInfoDto allOrderInfo,
|
||||||
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
|
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
|
||||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
|
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
|
||||||
Page page =new Page(pageNo,pageSize);
|
AllOrderInfoVo list = allOrderInfoService.getTradingsData(allOrderInfo);
|
||||||
AllOrderInfoVo list = allOrderInfoService.getTradingData(allOrderInfo);
|
|
||||||
return getSuccessResult(list);
|
return getSuccessResult(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -423,4 +433,54 @@ public class AllOrderInfoController extends BaseController {
|
|||||||
public ResponseObject queryByOrderNo(String orderNo){
|
public ResponseObject queryByOrderNo(String orderNo){
|
||||||
return getSuccessResult(allOrderInfoService.queryByOrderNo(orderNo));
|
return getSuccessResult(allOrderInfoService.queryByOrderNo(orderNo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询这个油站的所有员工
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("getStaffByStorId")
|
||||||
|
public ResponseObject getStaffByStorId(){
|
||||||
|
return getSuccessResult(allOrderInfoService.getStaffByStorId());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出油站订单
|
||||||
|
* @param response
|
||||||
|
*/
|
||||||
|
@PostMapping("exportExcelOrderMsgApi")
|
||||||
|
public void exportExcelOrderMsgApi(HttpServletResponse response, @RequestBody AllOrderInfoRes allOrderInfoRes) {
|
||||||
|
this.allOrderInfoService.exportExcelOrderMsgApi(response, allOrderInfoRes);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 导出退款明细
|
||||||
|
* @param response
|
||||||
|
*/
|
||||||
|
@PostMapping("exportExcelBackOrderMsgsApi")
|
||||||
|
public void exportExcelBackOrderMsgsApi(HttpServletResponse response, @RequestBody AllOrderInfoRes allOrderInfoRes) {
|
||||||
|
this.allOrderInfoService.exportExcelBackOrderMsgsApi(response, allOrderInfoRes);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 交易对账
|
||||||
|
* 交易明细分页查询
|
||||||
|
*/
|
||||||
|
@GetMapping("tradingNewList")
|
||||||
|
public ResponseObject tradingNewList(AllOrderInfoDto 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.tradingNewList(page, allOrderInfo);
|
||||||
|
return getSuccessResult(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("getTradingNewData")
|
||||||
|
public ResponseObject getTradingNewData(AllOrderInfoDto allOrderInfo,
|
||||||
|
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
|
||||||
|
AllOrderInfoVo list = allOrderInfoService.getTradingNewData(allOrderInfo);
|
||||||
|
return getSuccessResult(list);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -124,5 +124,9 @@ public class AllOrderInfo extends BaseEntity implements Serializable {
|
|||||||
private Long deptId;
|
private Long deptId;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private List<Long> storeIds;
|
private List<Long> storeIds;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String userName;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String[] dataRange;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ import com.fuint.business.order.vo.AllOrderActivityVo;
|
|||||||
import com.fuint.business.order.vo.AllOrderInfoUniVo;
|
import com.fuint.business.order.vo.AllOrderInfoUniVo;
|
||||||
import com.fuint.business.order.vo.AllOrderInfoVo;
|
import com.fuint.business.order.vo.AllOrderInfoVo;
|
||||||
import com.fuint.business.order.vo.CardBalanceChangeVo;
|
import com.fuint.business.order.vo.CardBalanceChangeVo;
|
||||||
|
import com.fuint.business.order.vo.Excel.TradingBackOrderExcel;
|
||||||
import com.fuint.business.order.vo.Excel.allorderVOo;
|
import com.fuint.business.order.vo.Excel.allorderVOo;
|
||||||
import com.fuint.business.store.entity.MtStore;
|
import com.fuint.business.store.entity.MtStore;
|
||||||
import com.fuint.business.userManager.vo.UserBalanceVo;
|
import com.fuint.business.userManager.vo.UserBalanceVo;
|
||||||
@ -44,6 +45,8 @@ public interface AllOrderInfoMapper extends BaseMapper<AllOrderInfo> {
|
|||||||
BigDecimal allStream(@Param("list") List<MtStore> mtStoreList);
|
BigDecimal allStream(@Param("list") List<MtStore> mtStoreList);
|
||||||
|
|
||||||
AllOrderInfoVo getTradingData(@Param("allOrderInfo") AllOrderInfoDto allOrderInfo);
|
AllOrderInfoVo getTradingData(@Param("allOrderInfo") AllOrderInfoDto allOrderInfo);
|
||||||
|
AllOrderInfoVo getTradingsData(@Param("allOrderInfo") AllOrderInfoDto allOrderInfo,
|
||||||
|
@Param("beginTime") String beginTime,@Param("endTime") String endTime);
|
||||||
|
|
||||||
IPage<AllOrderInfoVo> getTradingPage(@Param("page") Page page, @Param("allOrderInfo") AllOrderInfo allOrderInfo);
|
IPage<AllOrderInfoVo> getTradingPage(@Param("page") Page page, @Param("allOrderInfo") AllOrderInfo allOrderInfo);
|
||||||
|
|
||||||
@ -108,7 +111,25 @@ public interface AllOrderInfoMapper extends BaseMapper<AllOrderInfo> {
|
|||||||
Double getCountMemberBalance(@Param("storeId") Integer storeId,@Param("endTime") String endTime);
|
Double getCountMemberBalance(@Param("storeId") Integer storeId,@Param("endTime") String endTime);
|
||||||
|
|
||||||
AllOrderInfoVo selectByOrderNo(String orderNo);
|
AllOrderInfoVo selectByOrderNo(String orderNo);
|
||||||
IPage<AllOrderInfoVo> transactionList(Page page,@Param("obj") AllOrderInfoRes allOrderInfoRes);
|
IPage<AllOrderInfoVo> transactionList(Page page,@Param("obj") AllOrderInfoRes allOrderInfoRes,
|
||||||
|
@Param("beginTime") String beginTime,@Param("endTime") String endTime);
|
||||||
|
|
||||||
Map<String, Object> orderStatistics(@Param("obj") AllOrderInfoRes allOrderInfoRes);
|
Map<String, Object> orderStatistics(@Param("obj") AllOrderInfoRes allOrderInfoRes,@Param("beginTime") String beginTime,@Param("endTime") String endTime);
|
||||||
|
|
||||||
|
List transactionAllList(@Param("obj") AllOrderInfoRes allOrderInfoRes,
|
||||||
|
@Param("beginTime") String beginTime,@Param("endTime") String endTime);
|
||||||
|
|
||||||
|
|
||||||
|
IPage<AllOrderInfoVo> gettradingListPage(@Param("page") Page page, @Param("allOrderInfo") AllOrderInfo allOrderInfo,
|
||||||
|
@Param("beginTime") String beginTime,@Param("endTime") String endTime);
|
||||||
|
|
||||||
|
List<TradingBackOrderExcel> transactionBackAllList(@Param("obj") AllOrderInfoRes allOrderInfoRes,
|
||||||
|
@Param("beginTime") String beginTime, @Param("endTime") String endTime);
|
||||||
|
|
||||||
|
|
||||||
|
IPage<AllOrderInfoVo> tradingNewList(Page page,@Param("obj") AllOrderInfoDto allOrderInfo,
|
||||||
|
@Param("beginTime") String beginTime, @Param("endTime") String endTime);
|
||||||
|
|
||||||
|
AllOrderInfoVo getTradingNewData(@Param("obj") AllOrderInfoDto allOrderInfo,
|
||||||
|
@Param("beginTime") String beginTime,@Param("endTime") String endTime);
|
||||||
}
|
}
|
@ -41,8 +41,7 @@
|
|||||||
mu.mobile userMobile
|
mu.mobile userMobile
|
||||||
from all_order_info aoi
|
from all_order_info aoi
|
||||||
left join mt_user mu ON aoi.user_id = mu.id
|
left join mt_user mu ON aoi.user_id = mu.id
|
||||||
<where>
|
where (aoi.status='refund' or aoi.status='refunding') and aoi.store_id=#{allOrderInfo.storeId}
|
||||||
|
|
||||||
<if test="allOrderInfo.type != null and allOrderInfo.type != ''">
|
<if test="allOrderInfo.type != null and allOrderInfo.type != ''">
|
||||||
and aoi.type = #{allOrderInfo.type}
|
and aoi.type = #{allOrderInfo.type}
|
||||||
</if>
|
</if>
|
||||||
@ -67,14 +66,6 @@
|
|||||||
<if test="allOrderInfo.params.endTime != null and allOrderInfo.params.endTime != ''"><!-- 结束时间检索 -->
|
<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')
|
and date_format(pay_time,'%y%m%d') <= date_format(#{allOrderInfo.params.endTime},'%y%m%d')
|
||||||
</if>
|
</if>
|
||||||
<if test="allOrderInfo.storeIds != null">
|
|
||||||
and aoi.store_id in
|
|
||||||
<foreach collection="allOrderInfo.storeIds" item="item" open="(" close=")" separator=",">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
|
|
||||||
order by aoi.create_time desc
|
order by aoi.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@ -865,39 +856,528 @@
|
|||||||
SELECT
|
SELECT
|
||||||
ai.*,
|
ai.*,
|
||||||
mu.NAME AS userName,
|
mu.NAME AS userName,
|
||||||
mc.merchant_name as merchantName
|
mc.merchant_name as merchantName,
|
||||||
|
mt.account_name as createBy
|
||||||
FROM
|
FROM
|
||||||
all_order_info ai
|
all_order_info ai
|
||||||
LEFT JOIN mt_user mu ON ai.user_id = mu.id
|
LEFT JOIN mt_user mu ON ai.user_id = mu.id
|
||||||
LEFT JOIN merchant_config mc on mc.id = ai.m_id
|
LEFT JOIN merchant_config mc on mc.id = ai.m_id
|
||||||
<where>
|
left join t_account mt on ai.create_by=mt.acct_id
|
||||||
<if test="obj.storeId != null and obj.storeId != ''">
|
where 1=1
|
||||||
ai.store_id = #{obj.storeId}
|
and ai.store_id = #{obj.storeId}
|
||||||
|
<if test="obj.paymentChannel != null and obj.paymentChannel != ''">
|
||||||
|
and ai.payment_channel = #{obj.paymentChannel}
|
||||||
|
</if>
|
||||||
|
<if test="obj.orderNo != null and obj.orderNo != ''">
|
||||||
|
and ai.order_no like concat('%', #{obj.orderNo}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="obj.payType != null and obj.payType != ''">
|
||||||
|
and ai.pay_type = #{obj.payType}
|
||||||
|
</if>
|
||||||
|
<if test="obj.type != null and obj.type != ''">
|
||||||
|
and ai.type = #{obj.type}
|
||||||
|
</if>
|
||||||
|
<if test="obj.payChannel != null and obj.payChannel != ''">
|
||||||
|
and ai.pay_channel = #{obj.payChannel}
|
||||||
|
</if>
|
||||||
|
<if test="obj.userName != null and obj.userName != ''">
|
||||||
|
and mu.name like concat('%', #{obj.userName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="obj.status != null and obj.status != ''">
|
||||||
|
and ai.status = #{obj.status}
|
||||||
|
</if>
|
||||||
|
<if test="obj.staffId != null and obj.staffId != ''">
|
||||||
|
and ai.create_by = #{obj.staffId}
|
||||||
|
</if>
|
||||||
|
<if test="beginTime != null and beginTime != ''">
|
||||||
|
<![CDATA[and ai.create_time >= #{beginTime} ]]>
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null and endTime != ''">
|
||||||
|
<![CDATA[ and ai.create_time <= #{endTime} ]]>
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
</where>
|
|
||||||
ORDER BY ai.create_time DESC
|
ORDER BY ai.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
<select id="orderStatistics" resultType="java.util.Map">
|
<select id="orderStatistics" resultType="java.util.Map">
|
||||||
SELECT
|
SELECT
|
||||||
SUM( CASE WHEN ai.pay_type = 'WECHAT' THEN ai.pay_money ELSE 0 END ) AS s1,-- 微信实付
|
IFNULL(SUM( CASE WHEN ai.pay_type = 'WECHAT' THEN ai.pay_money ELSE 0 END),0) AS s1,-- 微信实付
|
||||||
SUM( CASE WHEN ai.pay_type = 'WECHAT' THEN 1 ELSE 0 END ) AS s2,-- 微信订单笔数
|
IFNULL(SUM( CASE WHEN ai.pay_type = 'WECHAT' THEN 1 ELSE 0 END ),0) AS s2,-- 微信订单笔数
|
||||||
SUM( CASE WHEN ai.pay_type = 'ALIPAY' THEN ai.pay_money ELSE 0 END ) AS s3,-- 支付宝实收
|
IFNULL(SUM( CASE WHEN ai.pay_type = 'ALIPAY' THEN ai.pay_money ELSE 0 END ),0) AS s3,-- 支付宝实收
|
||||||
SUM( CASE WHEN ai.pay_type = 'ALIPAY' THEN 1 ELSE 0 END ) AS s4,-- 支付宝订单笔数
|
IFNULL(SUM( CASE WHEN ai.pay_type = 'ALIPAY' THEN 1 ELSE 0 END ),0) AS s4,-- 支付宝订单笔数
|
||||||
SUM( CASE WHEN ai.pay_type = 'UNIONPAY' THEN ai.pay_money ELSE 0 END ) AS s5,-- 银联实收
|
IFNULL(SUM( CASE WHEN ai.pay_type = 'UNIONPAY' THEN ai.pay_money ELSE 0 END ),0) AS s5,-- 银联实收
|
||||||
SUM( CASE WHEN ai.pay_type = 'UNIONPAY' THEN 1 ELSE 0 END ) AS s6,-- 银联订单笔数
|
IFNULL(SUM( CASE WHEN ai.pay_type = 'UNIONPAY' THEN 1 ELSE 0 END ),0) AS s6,-- 银联订单笔数
|
||||||
SUM( CASE WHEN ai.pay_type = 'CASH' THEN ai.pay_money ELSE 0 END ) AS s7,-- 现金实收
|
IFNULL(SUM( CASE WHEN ai.pay_type = 'CASH' THEN ai.pay_money ELSE 0 END ),0) AS s7,-- 现金实收
|
||||||
SUM( CASE WHEN ai.pay_type = 'CASH' THEN 1 ELSE 0 END ) AS s8,-- 订单笔数
|
IFNULL(SUM( CASE WHEN ai.pay_type = 'CASH' THEN 1 ELSE 0 END),0) AS s8,-- 订单笔数
|
||||||
SUM( CASE WHEN mu.id IS NOT NULL THEN ai.pay_money ELSE 0 END ) AS s9,-- 会员实收
|
IFNULL(SUM( CASE WHEN mu.id IS NOT NULL THEN ai.pay_money ELSE 0 END ),0) AS s9,-- 会员实收
|
||||||
SUM( CASE WHEN mu.id IS NOT NULL THEN 1 ELSE 0 END ) AS s10,-- 会员订单笔数
|
IFNULL(SUM( CASE WHEN mu.id IS NOT NULL THEN 1 ELSE 0 END ),0) AS s10,-- 会员订单笔数
|
||||||
SUM( CASE WHEN ai.pay_type = 'after_pay' THEN ai.pay_money ELSE 0 END ) AS s11,-- 挂账实收
|
IFNULL(SUM( CASE WHEN ai.pay_type = 'after_pay' THEN ai.pay_money ELSE 0 END ),0) AS s11,-- 挂账实收
|
||||||
SUM( CASE WHEN ai.pay_type = 'after_pay' THEN 1 ELSE 0 END ) AS s12 -- 挂账订单笔数
|
IFNULL(SUM( CASE WHEN ai.pay_type = 'after_pay' THEN 1 ELSE 0 END ),0) AS s12 -- 挂账订单笔数
|
||||||
|
|
||||||
FROM
|
FROM
|
||||||
all_order_info ai
|
all_order_info ai
|
||||||
LEFT JOIN mt_user mu ON ai.user_id = mu.id
|
LEFT JOIN mt_user mu ON ai.user_id = mu.id
|
||||||
LEFT JOIN merchant_config mc ON mc.id = ai.m_id
|
LEFT JOIN merchant_config mc ON mc.id = ai.m_id
|
||||||
|
left join mt_staff mt on ai.create_by=mt.id
|
||||||
|
where 1=1
|
||||||
|
<if test="obj.storeId != null and obj.storeId != ''">
|
||||||
|
and ai.store_id = #{obj.storeId}
|
||||||
|
</if>
|
||||||
|
<if test="obj.paymentChannel != null and obj.paymentChannel != ''">
|
||||||
|
and ai.payment_channel = #{obj.paymentChannel}
|
||||||
|
</if>
|
||||||
|
<if test="obj.orderNo != null and obj.orderNo != ''">
|
||||||
|
and ai.order_no like concat('%', #{obj.orderNo}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="obj.payType != null and obj.payType != ''">
|
||||||
|
and ai.pay_type = #{obj.payType}
|
||||||
|
</if>
|
||||||
|
<if test="obj.type != null and obj.type != ''">
|
||||||
|
and ai.type = #{obj.type}
|
||||||
|
</if>
|
||||||
|
<if test="obj.payChannel != null and obj.payChannel != ''">
|
||||||
|
and ai.pay_channel = #{obj.payChannel}
|
||||||
|
</if>
|
||||||
|
<if test="obj.userName != null and obj.userName != ''">
|
||||||
|
and mu.name like concat('%', #{obj.userName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="obj.status != null and obj.status != ''">
|
||||||
|
and ai.status = #{obj.status}
|
||||||
|
</if>
|
||||||
|
<if test="obj.staffId != null and obj.staffId != ''">
|
||||||
|
and ai.create_by = #{obj.staffId}
|
||||||
|
</if>
|
||||||
|
<if test="beginTime != null and beginTime != ''">
|
||||||
|
<![CDATA[and ai.create_time >= #{beginTime} ]]>
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null and endTime != ''">
|
||||||
|
<![CDATA[ and ai.create_time <= #{endTime} ]]>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<select id="transactionAllList" resultType="com.fuint.business.order.vo.Excel.TradingOrderExcel">
|
||||||
|
SELECT
|
||||||
|
ai.order_no,
|
||||||
|
CASE WHEN ai.pay_channel = 'cashier' THEN '收银台'
|
||||||
|
WHEN ai.pay_channel = 'POS' THEN 'POS机'
|
||||||
|
WHEN ai.pay_channel = 'PC' THEN '平台'
|
||||||
|
WHEN ai.pay_channel = 'applet' THEN '小程序'
|
||||||
|
END as payChannel,
|
||||||
|
CASE WHEN ai.type = '1' THEN '油品订单'
|
||||||
|
WHEN ai.type = '2' THEN '商品订单'
|
||||||
|
WHEN ai.type = '3' THEN '储值卡订单'
|
||||||
|
WHEN ai.type = '4' THEN '积分商城订单'
|
||||||
|
WHEN ai.type = '5' THEN '囤油卡订单'
|
||||||
|
WHEN ai.type = '6' THEN '收银台订单'
|
||||||
|
WHEN ai.type = '7' THEN '挂账订单'
|
||||||
|
WHEN ai.type = '8' THEN 'POS订单'
|
||||||
|
END as type,
|
||||||
|
ai.goods_money,
|
||||||
|
ai.discount_amount,
|
||||||
|
ai.pay_money as payMoney,
|
||||||
|
ai.pay_money as paysMoney,
|
||||||
|
ai.ref_money,
|
||||||
|
CASE WHEN ai.pay_type = 'ALIPAY' THEN '支付宝'
|
||||||
|
WHEN ai.pay_type = 'WECHAT' THEN '微信'
|
||||||
|
WHEN ai.pay_type = 'UNIONPAY' THEN '银联二维码'
|
||||||
|
WHEN ai.pay_type = 'CASH' THEN '现金'
|
||||||
|
WHEN ai.pay_type = 'APPLET_CODE' THEN '小程序码'
|
||||||
|
WHEN ai.pay_type = 'card_value' THEN '储值卡'
|
||||||
|
WHEN ai.pay_type = 'fule_card' THEN '囤油卡'
|
||||||
|
WHEN ai.pay_type = 'car_card_value' THEN '车队卡'
|
||||||
|
WHEN ai.pay_type = 'after_pay' THEN '挂账'
|
||||||
|
END as payType,
|
||||||
|
CASE WHEN ai.status = 'paid' THEN '已支付'
|
||||||
|
WHEN ai.status = 'unpaid' THEN '未支付'
|
||||||
|
WHEN ai.status = 'refund' THEN '已退款'
|
||||||
|
WHEN ai.status = 'payFail' THEN '支付失败'
|
||||||
|
WHEN ai.status = 'refunding' THEN '退款中'
|
||||||
|
END as status,
|
||||||
|
ai.payment_channel as paymentChannel,
|
||||||
|
ai.mchnt_cd,
|
||||||
|
ai.create_time,
|
||||||
|
ai.update_time,
|
||||||
|
mu.NAME AS userName,
|
||||||
|
mc.merchant_name as merchantName,
|
||||||
|
mt.account_name as createBy
|
||||||
|
FROM
|
||||||
|
all_order_info ai
|
||||||
|
LEFT JOIN mt_user mu ON ai.user_id = mu.id
|
||||||
|
LEFT JOIN merchant_config mc on mc.id = ai.m_id
|
||||||
|
left join t_account mt on ai.create_by=mt.acct_id
|
||||||
|
where 1=1
|
||||||
|
<if test="obj.storeId != null and obj.storeId != ''">
|
||||||
|
and ai.store_id = #{obj.storeId}
|
||||||
|
</if>
|
||||||
|
<if test="obj.paymentChannel != null and obj.paymentChannel != ''">
|
||||||
|
and ai.payment_channel = #{obj.paymentChannel}
|
||||||
|
</if>
|
||||||
|
<if test="obj.orderNo != null and obj.orderNo != ''">
|
||||||
|
and ai.order_no like concat('%', #{obj.orderNo}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="obj.payType != null and obj.payType != ''">
|
||||||
|
and ai.pay_type = #{obj.payType}
|
||||||
|
</if>
|
||||||
|
<if test="obj.type != null and obj.type != ''">
|
||||||
|
and ai.type = #{obj.type}
|
||||||
|
</if>
|
||||||
|
<if test="obj.payChannel != null and obj.payChannel != ''">
|
||||||
|
and ai.pay_channel = #{obj.payChannel}
|
||||||
|
</if>
|
||||||
|
<if test="obj.userName != null and obj.userName != ''">
|
||||||
|
and mu.name like concat('%', #{obj.userName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="obj.status != null and obj.status != ''">
|
||||||
|
and ai.status = #{obj.status}
|
||||||
|
</if>
|
||||||
|
<if test="obj.staffId != null and obj.staffId != ''">
|
||||||
|
and ai.create_by = #{obj.staffId}
|
||||||
|
</if>
|
||||||
|
<if test="beginTime != null and beginTime != ''">
|
||||||
|
<![CDATA[and ai.create_time >= #{beginTime} ]]>
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null and endTime != ''">
|
||||||
|
<![CDATA[ and ai.create_time <= #{endTime} ]]>
|
||||||
|
</if>
|
||||||
|
ORDER BY ai.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<select id="gettradingListPage" 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,
|
||||||
|
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,
|
||||||
|
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.content AS orderContent,
|
||||||
|
aoi.create_time AS createTime,
|
||||||
|
aoi.update_time AS updateTime,
|
||||||
|
aoi.update_by AS updateBy,
|
||||||
|
aoi.reason_Refund AS reasonRefund,
|
||||||
|
aoi.ref_order_no AS refOrderNo,
|
||||||
|
aoi.ref_money AS refMoney,
|
||||||
|
aoi.payment_channel AS paymentChannel,
|
||||||
|
aoi.ref_by AS refBy,
|
||||||
|
aoi.discount_amount AS discountAmount,
|
||||||
|
aoi.mchnt_cd AS mchntCd,
|
||||||
|
mu.name userName,
|
||||||
|
mu.mobile userMobile,
|
||||||
|
mc.merchant_name as merchantName,
|
||||||
|
mt.account_name as createBy
|
||||||
|
from all_order_info aoi
|
||||||
|
left join mt_user mu ON aoi.user_id = mu.id
|
||||||
|
LEFT JOIN merchant_config mc on mc.id = aoi.m_id
|
||||||
|
left join t_account mt on aoi.create_by=mt.acct_id
|
||||||
|
where (aoi.status='refund' or aoi.status='refunding') and 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.staffId != null and allOrderInfo.staffId != ''">
|
||||||
|
and aoi.create_by =#{allOrderInfo.staffId}
|
||||||
|
</if>
|
||||||
|
<if test="allOrderInfo.paymentChannel != null and allOrderInfo.paymentChannel != ''">
|
||||||
|
and aoi.payment_channel =#{allOrderInfo.paymentChannel}
|
||||||
|
</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.status != null and allOrderInfo.status != ''">
|
||||||
|
and aoi.status = #{allOrderInfo.status}
|
||||||
|
</if>
|
||||||
|
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
|
||||||
|
<![CDATA[ and aoi.create_time >= #{beginTime}]]>
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
|
||||||
|
<![CDATA[and aoi.create_time <= #{endTime}]]>
|
||||||
|
</if>
|
||||||
|
order by aoi.create_time desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getTradingsData" resultType="com.fuint.business.order.vo.AllOrderInfoVo">
|
||||||
|
select
|
||||||
|
SUM(CASE WHEN pay_type = 'CASH' THEN pay_money ELSE 0 END) AS CASH,
|
||||||
|
SUM(CASE WHEN pay_type = 'WECHAT' THEN pay_money ELSE 0 END) AS WECHAT,
|
||||||
|
SUM(CASE WHEN pay_type = 'ALIPAY' THEN pay_money ELSE 0 END) AS ALIPAY,
|
||||||
|
SUM(CASE WHEN pay_type = 'balance' THEN pay_money ELSE 0 END) AS balance,
|
||||||
|
COUNT(CASE WHEN pay_type = 'CASH' THEN 0 END) AS CASHCount,
|
||||||
|
COUNT(CASE WHEN pay_type = 'WECHAT' THEN 0 END) AS WECHATCount,
|
||||||
|
COUNT(CASE WHEN pay_type = 'ALIPAY' THEN 0 END) AS ALIPAYCount,
|
||||||
|
COUNT(CASE WHEN pay_type = 'balance' THEN 0 END) AS balanceCount,
|
||||||
|
SUM(CASE WHEN aoi.status = 'refund' THEN pay_money ELSE 0 END) AS refBalance,
|
||||||
|
COUNT(CASE WHEN aoi.status = 'refund' THEN 0 END) AS refBalanceCount,
|
||||||
|
SUM(pay_money) AS sumBalance,
|
||||||
|
count(*) AS countBalance,
|
||||||
|
SUM(CASE WHEN aoi.content = '储值卡订单' THEN pay_money ELSE 0 END) AS userBalance,
|
||||||
|
COUNT(CASE WHEN aoi.content = '储值卡订单' THEN 0 END) AS userBalanceCount,
|
||||||
|
SUM(CASE WHEN aoi.content = '油品充值' THEN pay_money ELSE 0 END) AS oilBalance,
|
||||||
|
COUNT(CASE WHEN aoi.content = '油品充值' THEN 0 END) AS oilBalanceCount,
|
||||||
|
SUM(CASE WHEN (aoi.content = '储值卡订单' or aoi.content = '油品充值') and pay_type = 'WECHAT' THEN pay_money ELSE 0 END)
|
||||||
|
AS userBalanceByWechat,
|
||||||
|
COUNT(CASE WHEN (aoi.content = '储值卡订单' or aoi.content = '油品充值') and pay_type = 'WECHAT' THEN 0 END) AS
|
||||||
|
userBalanceCountByWechat,
|
||||||
|
SUM(CASE WHEN (aoi.content = '储值卡订单' or aoi.content = '油品充值') and pay_type = 'ALIPAY' THEN pay_money ELSE 0 END)
|
||||||
|
AS userBalanceByAli,
|
||||||
|
COUNT(CASE WHEN (aoi.content = '储值卡订单' or aoi.content = '油品充值') and pay_type = 'ALIPAY' THEN 0 END) AS
|
||||||
|
userBalanceCountByali,
|
||||||
|
SUM(CASE WHEN aoi.type = '1' THEN pay_money ELSE 0 END) AS oilOrder,
|
||||||
|
COUNT(CASE WHEN aoi.type = '1' THEN 0 END) AS oilOrderCount,
|
||||||
|
SUM(CASE WHEN aoi.type = '6' THEN pay_money ELSE 0 END) AS convenienceStore,
|
||||||
|
COUNT(CASE WHEN aoi.type = '6' THEN 0 END) AS convenienceStoreCount,
|
||||||
|
SUM(CASE WHEN aoi.type = '4' THEN pay_money ELSE 0 END) AS integral,
|
||||||
|
COUNT(CASE WHEN aoi.type = '4' THEN 0 END) AS integralCount
|
||||||
|
from all_order_info aoi
|
||||||
|
left join mt_user mu ON aoi.user_id = mu.id
|
||||||
|
LEFT JOIN merchant_config mc on mc.id = aoi.m_id
|
||||||
|
left join t_account mt on aoi.create_by=mt.acct_id
|
||||||
|
where
|
||||||
|
(aoi.status='refund' or aoi.status='refunding') and 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.staffId != null and allOrderInfo.staffId != ''">
|
||||||
|
and aoi.create_by =#{allOrderInfo.staffId}
|
||||||
|
</if>
|
||||||
|
<if test="allOrderInfo.paymentChannel != null and allOrderInfo.paymentChannel != ''">
|
||||||
|
and aoi.payment_channel =#{allOrderInfo.paymentChannel}
|
||||||
|
</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.status != null and allOrderInfo.status != ''">
|
||||||
|
and aoi.status = #{allOrderInfo.status}
|
||||||
|
</if>
|
||||||
|
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
|
||||||
|
<![CDATA[ and aoi.create_time >= #{beginTime}]]>
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
|
||||||
|
<![CDATA[and aoi.create_time <= #{endTime}]]>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="transactionBackAllList" resultType="com.fuint.business.order.vo.Excel.TradingBackOrderExcel">
|
||||||
|
SELECT
|
||||||
|
ai.order_no,
|
||||||
|
CASE WHEN ai.pay_channel = 'cashier' THEN '收银台'
|
||||||
|
WHEN ai.pay_channel = 'POS' THEN 'POS机'
|
||||||
|
WHEN ai.pay_channel = 'PC' THEN '平台'
|
||||||
|
WHEN ai.pay_channel = 'applet' THEN '小程序'
|
||||||
|
END as payChannel,
|
||||||
|
CASE WHEN ai.type = '1' THEN '油品订单'
|
||||||
|
WHEN ai.type = '2' THEN '商品订单'
|
||||||
|
WHEN ai.type = '3' THEN '储值卡订单'
|
||||||
|
WHEN ai.type = '4' THEN '积分商城订单'
|
||||||
|
WHEN ai.type = '5' THEN '囤油卡订单'
|
||||||
|
WHEN ai.type = '6' THEN '收银台订单'
|
||||||
|
WHEN ai.type = '7' THEN '挂账订单'
|
||||||
|
WHEN ai.type = '8' THEN 'POS订单'
|
||||||
|
END as type,
|
||||||
|
ai.goods_money,
|
||||||
|
ai.discount_amount,
|
||||||
|
ai.pay_money as payMoney,
|
||||||
|
ai.pay_money as paysMoney,
|
||||||
|
ai.ref_money,
|
||||||
|
CASE WHEN ai.pay_type = 'ALIPAY' THEN '支付宝'
|
||||||
|
WHEN ai.pay_type = 'WECHAT' THEN '微信'
|
||||||
|
WHEN ai.pay_type = 'UNIONPAY' THEN '银联二维码'
|
||||||
|
WHEN ai.pay_type = 'CASH' THEN '现金'
|
||||||
|
WHEN ai.pay_type = 'APPLET_CODE' THEN '小程序码'
|
||||||
|
WHEN ai.pay_type = 'card_value' THEN '储值卡'
|
||||||
|
WHEN ai.pay_type = 'fule_card' THEN '囤油卡'
|
||||||
|
WHEN ai.pay_type = 'car_card_value' THEN '车队卡'
|
||||||
|
WHEN ai.pay_type = 'after_pay' THEN '挂账'
|
||||||
|
END as payType,
|
||||||
|
CASE WHEN ai.status = 'paid' THEN '已支付'
|
||||||
|
WHEN ai.status = 'unpaid' THEN '未支付'
|
||||||
|
WHEN ai.status = 'refund' THEN '已退款'
|
||||||
|
WHEN ai.status = 'payFail' THEN '支付失败'
|
||||||
|
WHEN ai.status = 'refunding' THEN '退款中'
|
||||||
|
END as status,
|
||||||
|
ai.payment_channel as paymentChannel,
|
||||||
|
ai.mchnt_cd,
|
||||||
|
ai.create_time,
|
||||||
|
ai.update_time,
|
||||||
|
mu.NAME AS userName,
|
||||||
|
mc.merchant_name as merchantName,
|
||||||
|
mt.account_name as createBy
|
||||||
|
FROM
|
||||||
|
all_order_info ai
|
||||||
|
LEFT JOIN mt_user mu ON ai.user_id = mu.id
|
||||||
|
LEFT JOIN merchant_config mc on mc.id = ai.m_id
|
||||||
|
left join t_account mt on ai.create_by=mt.acct_id
|
||||||
|
where 1=1 and (ai.status='refund' or ai.status='refunding') and ai.store_id=#{obj.storeId}
|
||||||
|
<if test="obj.paymentChannel != null and obj.paymentChannel != ''">
|
||||||
|
and ai.payment_channel = #{obj.paymentChannel}
|
||||||
|
</if>
|
||||||
|
<if test="obj.orderNo != null and obj.orderNo != ''">
|
||||||
|
and ai.order_no like concat('%', #{obj.orderNo}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="obj.payType != null and obj.payType != ''">
|
||||||
|
and ai.pay_type = #{obj.payType}
|
||||||
|
</if>
|
||||||
|
<if test="obj.type != null and obj.type != ''">
|
||||||
|
and ai.type = #{obj.type}
|
||||||
|
</if>
|
||||||
|
<if test="obj.payChannel != null and obj.payChannel != ''">
|
||||||
|
and ai.pay_channel = #{obj.payChannel}
|
||||||
|
</if>
|
||||||
|
<if test="obj.userName != null and obj.userName != ''">
|
||||||
|
and mu.name like concat('%', #{obj.userName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="obj.status != null and obj.status != ''">
|
||||||
|
and ai.status = #{obj.status}
|
||||||
|
</if>
|
||||||
|
<if test="obj.staffId != null and obj.staffId != ''">
|
||||||
|
and ai.create_by = #{obj.staffId}
|
||||||
|
</if>
|
||||||
|
<if test="beginTime != null and beginTime != ''">
|
||||||
|
<![CDATA[and ai.create_time >= #{beginTime} ]]>
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null and endTime != ''">
|
||||||
|
<![CDATA[ and ai.create_time <= #{endTime} ]]>
|
||||||
|
</if>
|
||||||
|
ORDER BY ai.create_time DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="tradingNewList" resultType="com.fuint.business.order.vo.AllOrderInfoVo">
|
||||||
|
SELECT
|
||||||
|
ai.*,
|
||||||
|
mu.NAME AS userName,
|
||||||
|
mc.merchant_name as merchantName,
|
||||||
|
mt.account_name as createBy
|
||||||
|
FROM
|
||||||
|
all_order_info ai
|
||||||
|
LEFT JOIN mt_user mu ON ai.user_id = mu.id
|
||||||
|
LEFT JOIN merchant_config mc on mc.id = ai.m_id
|
||||||
|
left join t_account mt on ai.create_by=mt.acct_id
|
||||||
|
where 1=1
|
||||||
|
and ai.store_id = #{obj.storeId} and discount_amount !=0.00
|
||||||
|
<if test="obj.paymentChannel != null and obj.paymentChannel != ''">
|
||||||
|
and ai.payment_channel = #{obj.paymentChannel}
|
||||||
|
</if>
|
||||||
|
<if test="obj.orderNo != null and obj.orderNo != ''">
|
||||||
|
and ai.order_no like concat('%', #{obj.orderNo}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="obj.payType != null and obj.payType != ''">
|
||||||
|
and ai.pay_type = #{obj.payType}
|
||||||
|
</if>
|
||||||
|
<if test="obj.type != null and obj.type != ''">
|
||||||
|
and ai.type = #{obj.type}
|
||||||
|
</if>
|
||||||
|
<if test="obj.payChannel != null and obj.payChannel != ''">
|
||||||
|
and ai.pay_channel = #{obj.payChannel}
|
||||||
|
</if>
|
||||||
|
<if test="obj.userName != null and obj.userName != ''">
|
||||||
|
and mu.name like concat('%', #{obj.userName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="obj.status != null and obj.status != ''">
|
||||||
|
and ai.status = #{obj.status}
|
||||||
|
</if>
|
||||||
|
<if test="obj.staffId != null and obj.staffId != ''">
|
||||||
|
and ai.create_by = #{obj.staffId}
|
||||||
|
</if>
|
||||||
|
<if test="beginTime != null and beginTime != ''">
|
||||||
|
<![CDATA[and ai.create_time >= #{beginTime} ]]>
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null and endTime != ''">
|
||||||
|
<![CDATA[ and ai.create_time <= #{endTime} ]]>
|
||||||
|
</if>
|
||||||
|
ORDER BY ai.create_time DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getTradingNewData" resultType="com.fuint.business.order.vo.AllOrderInfoVo">
|
||||||
|
select
|
||||||
|
SUM(pay_money) AS discountMoneyAll,
|
||||||
|
COUNT(pay_money) AS discountMoneyAllNo,
|
||||||
|
SUM(CASE WHEN aoi.type = '1' THEN pay_money ELSE 0 END) AS discountMoneyOil,
|
||||||
|
COUNT(CASE WHEN aoi.type = '1' THEN 0 END) AS discountMoneyOilNo,
|
||||||
|
SUM(CASE WHEN aoi.type = '6' THEN pay_money ELSE 0 END) AS discountMoneyStore,
|
||||||
|
COUNT(CASE WHEN aoi.type = '6' THEN 0 END) AS discountMoneyStoreNo,
|
||||||
|
SUM(CASE WHEN aoi.type = '4' THEN pay_money ELSE 0 END) AS discountMoneyIntegral,
|
||||||
|
COUNT(CASE WHEN aoi.type = '4' THEN 0 END) AS discountMoneyIntegralNo
|
||||||
|
from all_order_info aoi
|
||||||
|
left join mt_user mu ON aoi.user_id = mu.id
|
||||||
|
LEFT JOIN merchant_config mc on mc.id = aoi.m_id
|
||||||
|
left join t_account mt on aoi.create_by=mt.acct_id
|
||||||
|
where 1=1
|
||||||
|
and aoi.store_id = #{obj.storeId} and discount_amount !=0.00
|
||||||
|
<if test="obj.paymentChannel != null and obj.paymentChannel != ''">
|
||||||
|
and aoi.payment_channel = #{obj.paymentChannel}
|
||||||
|
</if>
|
||||||
|
<if test="obj.orderNo != null and obj.orderNo != ''">
|
||||||
|
and aoi.order_no like concat('%', #{obj.orderNo}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="obj.payType != null and obj.payType != ''">
|
||||||
|
and aoi.pay_type = #{obj.payType}
|
||||||
|
</if>
|
||||||
|
<if test="obj.type != null and obj.type != ''">
|
||||||
|
and aoi.type = #{obj.type}
|
||||||
|
</if>
|
||||||
|
<if test="obj.payChannel != null and obj.payChannel != ''">
|
||||||
|
and aoi.pay_channel = #{obj.payChannel}
|
||||||
|
</if>
|
||||||
|
<if test="obj.userName != null and obj.userName != ''">
|
||||||
|
and mu.name like concat('%', #{obj.userName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="obj.status != null and obj.status != ''">
|
||||||
|
and aoi.status = #{obj.status}
|
||||||
|
</if>
|
||||||
|
<if test="obj.staffId != null and obj.staffId != ''">
|
||||||
|
and aoi.create_by = #{obj.staffId}
|
||||||
|
</if>
|
||||||
|
<if test="beginTime != null and beginTime != ''">
|
||||||
|
<![CDATA[and aoi.create_time >= #{beginTime} ]]>
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null and endTime != ''">
|
||||||
|
<![CDATA[ and aoi.create_time <= #{endTime} ]]>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
@ -10,6 +10,7 @@ import com.fuint.business.order.entity.CashierOrder;
|
|||||||
import com.fuint.business.order.entity.HandoverRecord;
|
import com.fuint.business.order.entity.HandoverRecord;
|
||||||
import com.fuint.business.order.vo.*;
|
import com.fuint.business.order.vo.*;
|
||||||
import com.fuint.framework.exception.BusinessCheckException;
|
import com.fuint.framework.exception.BusinessCheckException;
|
||||||
|
import com.fuint.repository.model.MtStaff;
|
||||||
import com.fuint.system.dept.vo.SysDeptVo;
|
import com.fuint.system.dept.vo.SysDeptVo;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@ -80,9 +81,9 @@ public interface AllOrderInfoService {
|
|||||||
|
|
||||||
Map<String,String> getOrderInfo(String orderNo, String type);
|
Map<String,String> getOrderInfo(String orderNo, String type);
|
||||||
|
|
||||||
AllOrderInfoVo getTradingData(AllOrderInfoDto allOrderInfo);
|
AllOrderInfoVo getTradingsData(AllOrderInfoDto allOrderInfo);
|
||||||
|
IPage<AllOrderInfoVo> gettradingListPage(Page page, AllOrderInfoDto allOrderInfo);
|
||||||
IPage<AllOrderInfoVo> getTradingPage(Page page, AllOrderInfoDto allOrderInfo);
|
IPage<AllOrderInfoVo> getTradingPage(Page page, AllOrderInfoDto allOrderInfo);
|
||||||
|
|
||||||
IPage<AllOrderInfoVo> transactionList(Page page, AllOrderInfoRes allOrderInfoRes);
|
IPage<AllOrderInfoVo> transactionList(Page page, AllOrderInfoRes allOrderInfoRes);
|
||||||
|
|
||||||
IPage<SysDeptVo> runningWaterByInstituion(Page page, AllOrderInfoDto allOrderInfo);
|
IPage<SysDeptVo> runningWaterByInstituion(Page page, AllOrderInfoDto allOrderInfo);
|
||||||
@ -203,4 +204,12 @@ AllOrderActivityVo getOneByOrderId(Integer orderId);
|
|||||||
HomeDataShowVo getDataCount(String startTime, String endTime);
|
HomeDataShowVo getDataCount(String startTime, String endTime);
|
||||||
|
|
||||||
Object cashierRefund(Map<String, String> map) throws Exception;
|
Object cashierRefund(Map<String, String> map) throws Exception;
|
||||||
|
|
||||||
|
List<MtStaff> getStaffByStorId();
|
||||||
|
|
||||||
|
void exportExcelOrderMsgApi(HttpServletResponse response, AllOrderInfoRes allOrderInfoRes);
|
||||||
|
void exportExcelBackOrderMsgsApi(HttpServletResponse response, AllOrderInfoRes allOrderInfoRes);
|
||||||
|
|
||||||
|
IPage<AllOrderInfoVo> tradingNewList(Page page, AllOrderInfoDto allOrderInfo);
|
||||||
|
AllOrderInfoVo getTradingNewData(AllOrderInfoDto allOrderInfo);
|
||||||
}
|
}
|
||||||
|
@ -70,6 +70,7 @@ import com.fuint.repository.mapper.MtStaffMapper;
|
|||||||
import com.fuint.repository.mapper.MtUserMapper;
|
import com.fuint.repository.mapper.MtUserMapper;
|
||||||
import com.fuint.repository.model.MtStaff;
|
import com.fuint.repository.model.MtStaff;
|
||||||
import com.fuint.repository.model.MtUser;
|
import com.fuint.repository.model.MtUser;
|
||||||
|
import com.fuint.repository.model.TAccount;
|
||||||
import com.fuint.system.dept.entity.SysDept;
|
import com.fuint.system.dept.entity.SysDept;
|
||||||
import com.fuint.system.dept.mapper.SysDeptMapper;
|
import com.fuint.system.dept.mapper.SysDeptMapper;
|
||||||
import com.fuint.system.dept.service.ISysDeptService;
|
import com.fuint.system.dept.service.ISysDeptService;
|
||||||
@ -133,10 +134,12 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
|||||||
@Autowired
|
@Autowired
|
||||||
private CardBalanceChangeMapper cardBalanceChangeMapper;
|
private CardBalanceChangeMapper cardBalanceChangeMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private MtUserMapper mtUserMapper;
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> orderStatistics(AllOrderInfoRes allOrderInfoRes) {
|
public Map<String, Object> orderStatistics(AllOrderInfoRes allOrderInfoRes) {
|
||||||
return allOrderInfoMapper.orderStatistics(allOrderInfoRes);
|
return allOrderInfoMapper.orderStatistics(allOrderInfoRes, allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[0],
|
||||||
|
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -837,8 +840,7 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
|||||||
StaffService staffService;
|
StaffService staffService;
|
||||||
@Resource
|
@Resource
|
||||||
MemberService memberService;
|
MemberService memberService;
|
||||||
@Resource
|
|
||||||
private MtUserMapper mtUserMapper;
|
|
||||||
|
|
||||||
|
|
||||||
public AllOrderInfoVo getTradingData(AllOrderInfoDto allOrderInfo) {
|
public AllOrderInfoVo getTradingData(AllOrderInfoDto allOrderInfo) {
|
||||||
@ -868,6 +870,15 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
|||||||
return allOrderInfoMapper.getTradingData(allOrderInfo);
|
return allOrderInfoMapper.getTradingData(allOrderInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public AllOrderInfoVo getTradingsData(AllOrderInfoDto allOrderInfo) {
|
||||||
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
allOrderInfo.setStoreId(nowAccountInfo.getStoreId());
|
||||||
|
return allOrderInfoMapper.getTradingsData(allOrderInfo,
|
||||||
|
allOrderInfo.getDataRange()==null?"":allOrderInfo.getDataRange()[0],
|
||||||
|
allOrderInfo.getDataRange()==null?"":allOrderInfo.getDataRange()[1]);
|
||||||
|
}
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
MtStaffMapper mtStaffMapper;
|
MtStaffMapper mtStaffMapper;
|
||||||
|
|
||||||
@ -876,7 +887,7 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
|||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
|
||||||
if (ObjectUtil.isEmpty(allOrderInfo.getDeptId())) {
|
if (ObjectUtil.isEmpty(allOrderInfo.getDeptId())) {
|
||||||
IPage<SysDeptVo> sysDepts = sysDeptMapper.selectChildrenDeptById2(new Page(1, 10000), nowAccountInfo.getDeptId(), allOrderInfo.getDeptId(), allOrderInfo.getDeptType());
|
IPage<SysDeptVo> sysDepts = sysDeptMapper.selectChildrenDeptById2(new Page(1, 10000), nowAccountInfo.getDeptId(), nowAccountInfo.getDeptId(), allOrderInfo.getDeptType());
|
||||||
|
|
||||||
if (ObjectUtil.isEmpty(sysDepts.getRecords())) {
|
if (ObjectUtil.isEmpty(sysDepts.getRecords())) {
|
||||||
throw new RuntimeException("组织下没有油站!");
|
throw new RuntimeException("组织下没有油站!");
|
||||||
@ -952,20 +963,32 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
|||||||
return pageList;
|
return pageList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<AllOrderInfoVo> gettradingListPage(Page page, AllOrderInfoDto allOrderInfo) {
|
||||||
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
allOrderInfo.setStoreId(nowAccountInfo.getStoreId());
|
||||||
|
IPage<AllOrderInfoVo> pageList = allOrderInfoMapper.gettradingListPage(page, allOrderInfo,
|
||||||
|
allOrderInfo.getDataRange()==null?"":allOrderInfo.getDataRange()[0],
|
||||||
|
allOrderInfo.getDataRange()==null?"":allOrderInfo.getDataRange()[1]);
|
||||||
|
return pageList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<AllOrderInfoVo> transactionList(Page page, AllOrderInfoRes allOrderInfoRes) {
|
public IPage<AllOrderInfoVo> transactionList(Page page, AllOrderInfoRes allOrderInfoRes) {
|
||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
allOrderInfoRes.setStoreId(nowAccountInfo.getStoreId());
|
allOrderInfoRes.setStoreId(nowAccountInfo.getStoreId());
|
||||||
|
|
||||||
IPage<AllOrderInfoVo> allOrderInfoVoIPage = super.baseMapper.transactionList(page, allOrderInfoRes);
|
IPage<AllOrderInfoVo> allOrderInfoVoIPage = super.baseMapper.transactionList(page, allOrderInfoRes,
|
||||||
|
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[0],
|
||||||
|
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[1]);
|
||||||
return allOrderInfoVoIPage;
|
return allOrderInfoVoIPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void tradingExportExcel(HttpServletResponse response, AllOrderInfoDto order) {
|
public void tradingExportExcel(HttpServletResponse response, AllOrderInfoDto order) {
|
||||||
|
|
||||||
IPage<AllOrderInfoVo> tradingPage = getTradingPage(new Page(1, 100000), order);
|
IPage<AllOrderInfoVo> tradingPage = getTradingPage(new Page(1, 100000), order);
|
||||||
List<TradingExcel> tradingExcel = new ArrayList<>();
|
List<TradingExcel> tradingExcel = new ArrayList<>();
|
||||||
for (AllOrderInfoVo record : tradingPage.getRecords()) {
|
for (AllOrderInfoVo record : tradingPage.getRecords()) {
|
||||||
@ -2478,4 +2501,122 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据storid查询员工
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List getStaffByStorId() {
|
||||||
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
nowAccountInfo.getStoreId();
|
||||||
|
List<TAccount> mtStaffs= mtStaffMapper.getStaffByStorId(nowAccountInfo.getStoreId());
|
||||||
|
return mtStaffs;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void exportExcelOrderMsgApi(HttpServletResponse response, AllOrderInfoRes allOrderInfoRes) {
|
||||||
|
List<TradingOrderExcel> list= transactionAllList(allOrderInfoRes);
|
||||||
|
List<TradingOrderExcel> tradingExcel = new ArrayList<>();
|
||||||
|
for (TradingOrderExcel record : list) {
|
||||||
|
TradingOrderExcel excel = new TradingOrderExcel();
|
||||||
|
BeanUtils.copyProperties(record, excel);
|
||||||
|
excel.setType("其他");
|
||||||
|
tradingExcel.add(excel);
|
||||||
|
}
|
||||||
|
// 设置响应头信息
|
||||||
|
response.setContentType("application/vnd.ms-excel");
|
||||||
|
response.setCharacterEncoding("utf-8");
|
||||||
|
response.setHeader("Content-disposition", "attachment;filename=demo.xlsx");
|
||||||
|
try {
|
||||||
|
// 写入文件数据
|
||||||
|
EasyExcel.write(response.getOutputStream(), TradingOrderExcel.class).sheet("download").doWrite(tradingExcel);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询全部订单数据
|
||||||
|
* @param
|
||||||
|
* @param allOrderInfoRes
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List transactionAllList(AllOrderInfoRes allOrderInfoRes) {
|
||||||
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
allOrderInfoRes.setStoreId(nowAccountInfo.getStoreId());
|
||||||
|
System.out.println(allOrderInfoRes.getDataRange());
|
||||||
|
List allOrderInfoVo = super.baseMapper.transactionAllList(allOrderInfoRes,
|
||||||
|
allOrderInfoRes.getDataRange().length==0?"":allOrderInfoRes.getDataRange()[0],
|
||||||
|
allOrderInfoRes.getDataRange().length==0?"":allOrderInfoRes.getDataRange()[1]);
|
||||||
|
|
||||||
|
return allOrderInfoVo;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void exportExcelBackOrderMsgsApi(HttpServletResponse response, AllOrderInfoRes allOrderInfoRes) {
|
||||||
|
List<TradingBackOrderExcel> list= transactionBackAllList(allOrderInfoRes);
|
||||||
|
List<TradingBackOrderExcel> tradingExcel = new ArrayList<>();
|
||||||
|
for (TradingBackOrderExcel record : list) {
|
||||||
|
TradingBackOrderExcel excel1 = new TradingBackOrderExcel();
|
||||||
|
BeanUtils.copyProperties(record, excel1);
|
||||||
|
tradingExcel.add(excel1);
|
||||||
|
}
|
||||||
|
// 设置响应头信息
|
||||||
|
response.setContentType("application/vnd.ms-excel");
|
||||||
|
response.setCharacterEncoding("utf-8");
|
||||||
|
response.setHeader("Content-disposition", "attachment;filename=demo.xlsx");
|
||||||
|
try {
|
||||||
|
// 写入文件数据
|
||||||
|
EasyExcel.write(response.getOutputStream(), TradingBackOrderExcel.class).sheet("download").doWrite(tradingExcel);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询退单订单数据
|
||||||
|
* @param
|
||||||
|
* @param allOrderInfoRes
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List transactionBackAllList(AllOrderInfoRes allOrderInfoRes) {
|
||||||
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
allOrderInfoRes.setStoreId(nowAccountInfo.getStoreId());
|
||||||
|
List allOrderInfoVo = super.baseMapper.transactionBackAllList(allOrderInfoRes,
|
||||||
|
allOrderInfoRes.getDataRange().length==0?"":allOrderInfoRes.getDataRange()[0],
|
||||||
|
allOrderInfoRes.getDataRange().length==0?"":allOrderInfoRes.getDataRange()[1]);
|
||||||
|
|
||||||
|
return allOrderInfoVo;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 查询退单订单数据
|
||||||
|
* @param
|
||||||
|
* @param allOrderInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<AllOrderInfoVo> tradingNewList(Page page, AllOrderInfoDto allOrderInfo) {
|
||||||
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
allOrderInfo.setStoreId(nowAccountInfo.getStoreId());
|
||||||
|
return baseMapper.tradingNewList(page,allOrderInfo,
|
||||||
|
allOrderInfo.getDataRange()==null?"":allOrderInfo.getDataRange()[0],
|
||||||
|
allOrderInfo.getDataRange()==null?"":allOrderInfo.getDataRange()[1]);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public AllOrderInfoVo getTradingNewData(AllOrderInfoDto allOrderInfo) {
|
||||||
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
allOrderInfo.setStoreId(nowAccountInfo.getStoreId());
|
||||||
|
return allOrderInfoMapper.getTradingNewData(allOrderInfo,
|
||||||
|
allOrderInfo.getDataRange()==null?"":allOrderInfo.getDataRange()[0],
|
||||||
|
allOrderInfo.getDataRange()==null?"":allOrderInfo.getDataRange()[1]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -92,4 +92,35 @@ public class AllOrderInfoVo extends AllOrderInfo {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private Double laKaLaCount;
|
private Double laKaLaCount;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String oilOrder;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String oilOrderCount;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String convenienceStore;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String convenienceStoreCount;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String integral;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String integralCount;
|
||||||
|
@TableField(exist = false)
|
||||||
|
|
||||||
|
//优惠金额
|
||||||
|
private String discountMoneyAll;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String discountMoneyAllNo;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String discountMoneyOil;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String discountMoneyOilNo;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String discountMoneyStore;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String discountMoneyStoreNo;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String discountMoneyIntegral;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String discountMoneyIntegralNo;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,36 @@
|
|||||||
|
package com.fuint.business.order.vo.Excel;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TradingBackOrderExcel {
|
||||||
|
@ExcelProperty("订单号")
|
||||||
|
private String orderNo; // 订单号
|
||||||
|
@ExcelProperty("订单类型")
|
||||||
|
private String payChannel; // 订单类型
|
||||||
|
@ExcelProperty("订单分类")
|
||||||
|
private String type; // 订单分类
|
||||||
|
@ExcelProperty("订单金额")
|
||||||
|
private Double goodsMoney; // 订单金额
|
||||||
|
@ExcelProperty("实收金额")
|
||||||
|
private Double payMoney; // 实收金额
|
||||||
|
@ExcelProperty("会员支付金额")
|
||||||
|
private Double paysMoney; // 会员支付金额
|
||||||
|
@ExcelProperty("归还金额")
|
||||||
|
private Double refMoney; // 归还金额
|
||||||
|
@ExcelProperty("付款用户")
|
||||||
|
private String userName; // 付款用户
|
||||||
|
@ExcelProperty("支付方式")
|
||||||
|
private String payType; // 支付方式
|
||||||
|
@ExcelProperty("支付渠道")
|
||||||
|
private String paymentChannel; // 支付渠道
|
||||||
|
@ExcelProperty("商户号")
|
||||||
|
private String mchntCd; // 付款用户
|
||||||
|
@ExcelProperty("收银员")
|
||||||
|
private String createBy; // 收银员
|
||||||
|
@ExcelProperty("订单完成时间")
|
||||||
|
private Date updateTime; // 支付时间
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
package com.fuint.business.order.vo.Excel;
|
||||||
|
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TradingOrderExcel {
|
||||||
|
|
||||||
|
@ExcelProperty("订单号")
|
||||||
|
private String orderNo; // 订单号
|
||||||
|
@ExcelProperty("订单类型")
|
||||||
|
private String payChannel; // 订单类型
|
||||||
|
@ExcelProperty("订单分类")
|
||||||
|
private String type; // 订单分类
|
||||||
|
@ExcelProperty("订单金额")
|
||||||
|
private Double goodsMoney; // 订单金额
|
||||||
|
@ExcelProperty("优惠金额")
|
||||||
|
private Double discountAmount; // 优惠金额
|
||||||
|
@ExcelProperty("实收金额")
|
||||||
|
private Double payMoney; // 实收金额
|
||||||
|
@ExcelProperty("会员支付金额")
|
||||||
|
private Double paysMoney; // 会员支付金额
|
||||||
|
@ExcelProperty("归还金额")
|
||||||
|
private Double refMoney; // 归还金额
|
||||||
|
@ExcelProperty("付款用户")
|
||||||
|
private String userName; // 付款用户
|
||||||
|
@ExcelProperty("支付方式")
|
||||||
|
private String payType; // 支付方式
|
||||||
|
@ExcelProperty("订单状态")
|
||||||
|
private String status; // 订单状态
|
||||||
|
@ExcelProperty("支付渠道")
|
||||||
|
private String paymentChannel; // 支付渠道
|
||||||
|
@ExcelProperty("商户号")
|
||||||
|
private String mchntCd; // 付款用户
|
||||||
|
@ExcelProperty("收银员")
|
||||||
|
private String createBy; // 收银员
|
||||||
|
@ExcelProperty("订单创建时间")
|
||||||
|
private Date createTime; // 支付时间
|
||||||
|
@ExcelProperty("订单完成时间")
|
||||||
|
private Date updateTime; // 支付时间
|
||||||
|
}
|
@ -80,7 +80,11 @@ public class OilSuppliersController extends BaseController {
|
|||||||
sysLog.setContent("新增油站供应商的数据信息");
|
sysLog.setContent("新增油站供应商的数据信息");
|
||||||
sysLogService.saveVo(sysLog);
|
sysLogService.saveVo(sysLog);
|
||||||
}catch (Exception ignored){}
|
}catch (Exception ignored){}
|
||||||
return getSuccessResult(this.oilSuppliersService.insert(oilSuppliers));
|
int mm =this.oilSuppliersService.insert(oilSuppliers);
|
||||||
|
if(mm==1){
|
||||||
|
return getFailureResult("供应商名称不能重复");
|
||||||
|
}
|
||||||
|
return getSuccessResult(mm);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -86,6 +86,14 @@ public interface OilSuppliersMapper {
|
|||||||
*/
|
*/
|
||||||
int deleteById(Integer id);
|
int deleteById(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过名字查询油站信息
|
||||||
|
*
|
||||||
|
* @param name
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List getSuppliersByName(String name);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,6 +143,10 @@
|
|||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getSuppliersByName"
|
||||||
|
resultType="com.fuint.business.petrolStationManagement.entity.OilSuppliers">
|
||||||
|
select * from oil_suppliers where supplier_name=#{name}
|
||||||
|
</select>
|
||||||
|
|
||||||
<!--新增所有列-->
|
<!--新增所有列-->
|
||||||
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
||||||
|
@ -40,7 +40,7 @@ public interface OilSuppliersService {
|
|||||||
* @param oilSuppliers 实例对象
|
* @param oilSuppliers 实例对象
|
||||||
* @return 实例对象
|
* @return 实例对象
|
||||||
*/
|
*/
|
||||||
OilSuppliers insert(OilSuppliers oilSuppliers);
|
Integer insert(OilSuppliers oilSuppliers);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改数据
|
* 修改数据
|
||||||
|
@ -56,12 +56,16 @@ public class OilSuppliersServiceImpl implements OilSuppliersService {
|
|||||||
* @return 实例对象
|
* @return 实例对象
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public OilSuppliers insert(OilSuppliers oilSuppliers) {
|
public Integer insert(OilSuppliers oilSuppliers) {
|
||||||
|
List<OilSuppliers> oilSuppliers1 =this.oilSuppliersDao.getSuppliersByName(oilSuppliers.getSupplierName());
|
||||||
|
if(oilSuppliers1.size()>0){
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
oilSuppliers.setStoreId(nowAccountInfo.getStoreId());
|
oilSuppliers.setStoreId(nowAccountInfo.getStoreId());
|
||||||
oilSuppliers.setCreateBy(nowAccountInfo.getStaffId().toString());
|
oilSuppliers.setCreateBy(nowAccountInfo.getStaffId().toString());
|
||||||
this.oilSuppliersDao.insert(oilSuppliers);
|
this.oilSuppliersDao.insert(oilSuppliers);
|
||||||
return oilSuppliers;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -10,12 +10,20 @@ import com.fuint.business.printer.service.PrinterService;
|
|||||||
import com.fuint.business.printer.template.*;
|
import com.fuint.business.printer.template.*;
|
||||||
import com.fuint.business.printer.unit.Methods;
|
import com.fuint.business.printer.unit.Methods;
|
||||||
import com.fuint.business.printer.vo.OrderPayment;
|
import com.fuint.business.printer.vo.OrderPayment;
|
||||||
|
import com.fuint.business.setting.entity.ReceiptPrinting;
|
||||||
|
import com.fuint.business.setting.service.ReceiptPrintingService;
|
||||||
|
import com.fuint.business.userManager.entity.LJUserGrade;
|
||||||
|
import com.fuint.business.userManager.entity.UserBalance;
|
||||||
|
import com.fuint.business.userManager.mapper.LJUserGradeMapper;
|
||||||
|
import com.fuint.business.userManager.mapper.UserBalanceMapper;
|
||||||
import com.fuint.common.dto.AccountInfo;
|
import com.fuint.common.dto.AccountInfo;
|
||||||
import com.fuint.common.util.Constants;
|
import com.fuint.common.util.Constants;
|
||||||
import com.fuint.common.util.RedisUtil;
|
import com.fuint.common.util.RedisUtil;
|
||||||
import com.fuint.common.util.TokenUtil;
|
import com.fuint.common.util.TokenUtil;
|
||||||
import com.fuint.framework.web.BaseController;
|
import com.fuint.framework.web.BaseController;
|
||||||
import com.fuint.framework.web.ResponseObject;
|
import com.fuint.framework.web.ResponseObject;
|
||||||
|
import com.fuint.repository.mapper.MtUserMapper;
|
||||||
|
import com.fuint.repository.model.MtUser;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.GsonBuilder;
|
import com.google.gson.GsonBuilder;
|
||||||
//import com.yly.print_sdk_librar.RequestMethod;
|
//import com.yly.print_sdk_librar.RequestMethod;
|
||||||
@ -53,7 +61,17 @@ public class printerController extends BaseController {
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
PrinterService printerService;
|
PrinterService printerService;
|
||||||
|
@Resource
|
||||||
|
private ReceiptPrintingService receiptPrintingService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private MtUserMapper mtUserMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private UserBalanceMapper userBalanceMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private LJUserGradeMapper ljUserGradeMapper;
|
||||||
@GetMapping("callback")
|
@GetMapping("callback")
|
||||||
public Map<String, String> callback(Map<String , String> map){
|
public Map<String, String> callback(Map<String , String> map){
|
||||||
log.info("------print/callback-------");
|
log.info("------print/callback-------");
|
||||||
@ -256,13 +274,45 @@ public class printerController extends BaseController {
|
|||||||
// PrintOilOrderReport.setHandover(handover);
|
// PrintOilOrderReport.setHandover(handover);
|
||||||
// Integer random6 = (int) ((Math.random() * 9 + 1) * 100000);
|
// Integer random6 = (int) ((Math.random() * 9 + 1) * 100000);
|
||||||
// String url=m.print("4004872261", PrintOilOrderReport.printOilOrder(), "Z"+System.currentTimeMillis()+random6.toString());
|
// String url=m.print("4004872261", PrintOilOrderReport.printOilOrder(), "Z"+System.currentTimeMillis()+random6.toString());
|
||||||
printerService.oilOrderReport(oilOrder,TokenUtil.getNowAccountInfo().getStoreId());
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
MtUser mtUser=null;
|
||||||
|
UserBalance userBalance=null;
|
||||||
|
LJUserGrade ljUserGrade=null;
|
||||||
|
String orderNo=null;
|
||||||
|
List<Map<String,String>> o = (List<Map<String,String>>)oilOrder.get("oilOrder");
|
||||||
|
for (Map<String, String> stringStringMap : o) {
|
||||||
|
orderNo=stringStringMap.get("orderNo");
|
||||||
|
if("散客".equals(stringStringMap.get("payUser"))){
|
||||||
|
}else {
|
||||||
|
mtUser=mtUserMapper.selectByPhone(stringStringMap.get("payUser"));
|
||||||
|
userBalance=userBalanceMapper.getUserBalanceByUserId(mtUser.getId().toString());
|
||||||
|
ljUserGrade= ljUserGradeMapper.getUserGradeByUserId(userBalance.getGradeId().toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ReceiptPrinting receiptPrinting = receiptPrintingService.queryReceiptPrintingOne(nowAccountInfo.getStoreId());
|
||||||
|
printerService.oilOrderReport(oilOrder,TokenUtil.getNowAccountInfo().getStoreId(),receiptPrinting,mtUser,userBalance,ljUserGrade,orderNo);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("rePrintOilOrderReport")
|
@PostMapping("rePrintOilOrderReport")
|
||||||
public void reOilOrderReport(@RequestBody Map<String, Object> oilOrder) {
|
public void reOilOrderReport(@RequestBody Map<String, Object> oilOrder) {
|
||||||
printerService.reOilOrderReport(oilOrder,TokenUtil.getNowAccountInfo().getStoreId());
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
MtUser mtUser=null;
|
||||||
|
UserBalance userBalance=null;
|
||||||
|
LJUserGrade ljUserGrade=null;
|
||||||
|
String orderNo=null;
|
||||||
|
List<Map<String,String>> o = (List<Map<String,String>>)oilOrder.get("oilOrder");
|
||||||
|
for (Map<String, String> stringStringMap : o) {
|
||||||
|
orderNo=stringStringMap.get("orderNo");
|
||||||
|
if("散客".equals(stringStringMap.get("payUser"))){
|
||||||
|
}else {
|
||||||
|
mtUser=mtUserMapper.selectByPhone(stringStringMap.get("payUser"));
|
||||||
|
userBalance=userBalanceMapper.getUserBalanceByUserId(mtUser.getId().toString());
|
||||||
|
ljUserGrade= ljUserGradeMapper.getUserGradeByUserId(userBalance.getGradeId().toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ReceiptPrinting receiptPrinting = receiptPrintingService.queryReceiptPrintingOne(nowAccountInfo.getStoreId());
|
||||||
|
printerService.reOilOrderReport(oilOrder,TokenUtil.getNowAccountInfo().getStoreId(),receiptPrinting,mtUser,userBalance,ljUserGrade,orderNo);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 余额充值订单
|
* 余额充值订单
|
||||||
@ -278,7 +328,23 @@ public class printerController extends BaseController {
|
|||||||
// PrintCardValueReport.setHandover(cardValue);
|
// PrintCardValueReport.setHandover(cardValue);
|
||||||
// Integer random6 = (int) ((Math.random() * 9 + 1) * 100000);
|
// Integer random6 = (int) ((Math.random() * 9 + 1) * 100000);
|
||||||
// String url=m.print("4004872261", PrintCardValueReport.printOilOrder(), "Z"+System.currentTimeMillis()+random6.toString());
|
// String url=m.print("4004872261", PrintCardValueReport.printOilOrder(), "Z"+System.currentTimeMillis()+random6.toString());
|
||||||
printerService.printCardValueReport(cardValue, TokenUtil.getNowAccountInfo().getStoreId());
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
MtUser mtUser=null;
|
||||||
|
UserBalance userBalance=null;
|
||||||
|
LJUserGrade ljUserGrade=null;
|
||||||
|
String orderNo=null;
|
||||||
|
List<Map<String,String>> o = (List<Map<String,String>>)cardValue.get("oilOrder");
|
||||||
|
for (Map<String, String> stringStringMap : o) {
|
||||||
|
orderNo=stringStringMap.get("orderNo");
|
||||||
|
if("散客".equals(stringStringMap.get("payUser"))){
|
||||||
|
}else {
|
||||||
|
mtUser=mtUserMapper.selectByPhone(stringStringMap.get("payUser"));
|
||||||
|
userBalance=userBalanceMapper.getUserBalanceByUserId(mtUser.getId().toString());
|
||||||
|
ljUserGrade= ljUserGradeMapper.getUserGradeByUserId(userBalance.getGradeId().toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ReceiptPrinting receiptPrinting = receiptPrintingService.queryReceiptPrintingOne(nowAccountInfo.getStoreId());
|
||||||
|
printerService.printCardValueReport(cardValue, TokenUtil.getNowAccountInfo().getStoreId(),receiptPrinting,mtUser,userBalance,ljUserGrade,orderNo);
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -86,6 +86,6 @@ public interface PrintDeviceInfoMapper extends BaseMapper<PrintDeviceInfo> {
|
|||||||
int getIsAcquiesceByStoreId(Integer storeId);
|
int getIsAcquiesceByStoreId(Integer storeId);
|
||||||
|
|
||||||
|
|
||||||
|
List<PrintDeviceInfo> getInfoListByStoreId(Integer storeId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -267,10 +267,14 @@ machine_code = values(machine_code)msign = values(msign)device_name = values(dev
|
|||||||
<update id="updateIsAcquiesce">
|
<update id="updateIsAcquiesce">
|
||||||
update print_device_info set acquiesce = false where store_id = #{storeId}
|
update print_device_info set acquiesce = false where store_id = #{storeId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="getIsAcquiesceByStoreId" resultType="java.lang.Integer">
|
<select id="getIsAcquiesceByStoreId" resultType="java.lang.Integer">
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getInfoListByStoreId" resultType="com.fuint.business.printer.entity.PrintDeviceInfo">
|
||||||
|
select
|
||||||
|
id,machine_code,msign,device_name,user_id,app_key,app_secret,app_public_key,platform_public_key,access_token,payment,create_time,update_time,create_by,update_by,store_id ,acquiesce from print_device_info
|
||||||
|
where store_id = #{storeId} limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package com.fuint.business.printer.service;
|
package com.fuint.business.printer.service;
|
||||||
|
|
||||||
|
import com.fuint.business.setting.entity.ReceiptPrinting;
|
||||||
|
import com.fuint.business.userManager.entity.LJUserGrade;
|
||||||
|
import com.fuint.business.userManager.entity.UserBalance;
|
||||||
|
import com.fuint.repository.model.MtUser;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
@ -22,12 +26,12 @@ public interface PrinterService {
|
|||||||
String printIndex(BigDecimal payAmount,Integer storeId);
|
String printIndex(BigDecimal payAmount,Integer storeId);
|
||||||
|
|
||||||
void getHandover(Map<String, Object> handover,Integer storeId);
|
void getHandover(Map<String, Object> handover,Integer storeId);
|
||||||
void oilOrderReport(Map<String, Object> handover,Integer storeId);
|
void oilOrderReport(Map<String, Object> handover, Integer storeId, ReceiptPrinting receiptPrinting, MtUser mtUser, UserBalance userBalance, LJUserGrade ljUserGrade,String orderNo);
|
||||||
void reOilOrderReport(Map<String, Object> oilOrder, Integer storeId);
|
void reOilOrderReport(Map<String, Object> oilOrder, Integer storeId, ReceiptPrinting receiptPrinting, MtUser mtUser, UserBalance userBalance, LJUserGrade ljUserGrade,String orderNo);
|
||||||
void printTagReport(Map<String, Object> integral,Integer storeId);
|
void printTagReport(Map<String, Object> integral,Integer storeId);
|
||||||
|
|
||||||
|
|
||||||
void printCardValueReport(Map<String, Object> printCardValue,Integer storeId);
|
void printCardValueReport(Map<String, Object> printCardValue,Integer storeId, ReceiptPrinting receiptPrinting, MtUser mtUser, UserBalance userBalance, LJUserGrade ljUserGrade,String orderNo);
|
||||||
void printFuelDieselReport(Map<String, Object> printCardValue,Integer storeId);
|
void printFuelDieselReport(Map<String, Object> printCardValue,Integer storeId);
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,6 +4,8 @@ import cn.hutool.core.util.ObjectUtil;
|
|||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.alipay.api.internal.util.codec.Base64;
|
import com.alipay.api.internal.util.codec.Base64;
|
||||||
|
import com.fuint.business.order.mapper.AllOrderInfoMapper;
|
||||||
|
import com.fuint.business.order.vo.AllOrderInfoVo;
|
||||||
import com.fuint.business.printer.entity.PrintDeviceInfo;
|
import com.fuint.business.printer.entity.PrintDeviceInfo;
|
||||||
import com.fuint.business.printer.mapper.PrintDeviceInfoMapper;
|
import com.fuint.business.printer.mapper.PrintDeviceInfoMapper;
|
||||||
import com.fuint.business.printer.service.PrintDeviceInfoService;
|
import com.fuint.business.printer.service.PrintDeviceInfoService;
|
||||||
@ -11,7 +13,11 @@ import com.fuint.business.printer.service.PrinterService;
|
|||||||
import com.fuint.business.printer.template.*;
|
import com.fuint.business.printer.template.*;
|
||||||
import com.fuint.business.printer.unit.Methods;
|
import com.fuint.business.printer.unit.Methods;
|
||||||
import com.fuint.business.printer.vo.OrderPayment;
|
import com.fuint.business.printer.vo.OrderPayment;
|
||||||
|
import com.fuint.business.setting.entity.ReceiptPrinting;
|
||||||
|
import com.fuint.business.userManager.entity.LJUserGrade;
|
||||||
|
import com.fuint.business.userManager.entity.UserBalance;
|
||||||
import com.fuint.common.util.RedisUtil;
|
import com.fuint.common.util.RedisUtil;
|
||||||
|
import com.fuint.repository.model.MtUser;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.GsonBuilder;
|
import com.google.gson.GsonBuilder;
|
||||||
import com.yly.print_sdk_library.RequestMethod;
|
import com.yly.print_sdk_library.RequestMethod;
|
||||||
@ -53,6 +59,8 @@ public class PrinterServiceImpl implements PrinterService {
|
|||||||
PrintDeviceInfoService printDeviceInfoService;
|
PrintDeviceInfoService printDeviceInfoService;
|
||||||
@Resource
|
@Resource
|
||||||
PrintDeviceInfoMapper printDeviceInfoMapper;
|
PrintDeviceInfoMapper printDeviceInfoMapper;
|
||||||
|
@Resource
|
||||||
|
private AllOrderInfoMapper allOrderInfoMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, String> PostPush(String ciphertext, String nonce, String tag, String additional_data, String iv, String signature) {
|
public Map<String, String> PostPush(String ciphertext, String nonce, String tag, String additional_data, String iv, String signature) {
|
||||||
@ -227,9 +235,10 @@ public class PrinterServiceImpl implements PrinterService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void oilOrderReport(Map<String, Object> oilOrder,Integer storeId) {
|
public void oilOrderReport(Map<String, Object> oilOrder, Integer storeId,ReceiptPrinting receiptPrinting, MtUser mtUser, UserBalance userBalance, LJUserGrade ljUserGrade
|
||||||
|
,String orderNo) {
|
||||||
PrintDeviceInfo infoByStoreId = printDeviceInfoMapper.getInfoByStoreId(storeId);
|
PrintDeviceInfo infoByStoreId = printDeviceInfoMapper.getInfoByStoreId(storeId);
|
||||||
|
AllOrderInfoVo allOrderInfoVo=allOrderInfoMapper.getOneByOrderNo(orderNo);
|
||||||
Methods m=Methods.getInstance();
|
Methods m=Methods.getInstance();
|
||||||
Object accessToken = RedisUtil.get("scancodemodel+" + storeId);
|
Object accessToken = RedisUtil.get("scancodemodel+" + storeId);
|
||||||
if (ObjectUtil.isNotEmpty(accessToken)) {
|
if (ObjectUtil.isNotEmpty(accessToken)) {
|
||||||
@ -244,7 +253,7 @@ public class PrinterServiceImpl implements PrinterService {
|
|||||||
m.init(infoByStoreId.getAppKey(), infoByStoreId.getAppSecret());
|
m.init(infoByStoreId.getAppKey(), infoByStoreId.getAppSecret());
|
||||||
PrintOilOrderReport.setHandover(oilOrder);
|
PrintOilOrderReport.setHandover(oilOrder);
|
||||||
Integer random6 = (int) ((Math.random() * 9 + 1) * 100000);
|
Integer random6 = (int) ((Math.random() * 9 + 1) * 100000);
|
||||||
String url=m.print(infoByStoreId.getMachineCode(), PrintOilOrderReport.printOilOrder(), "Z"+System.currentTimeMillis()+random6.toString());
|
String url=m.print(infoByStoreId.getMachineCode(), PrintOilOrderReport.printOilOrder(receiptPrinting,mtUser,userBalance,ljUserGrade,allOrderInfoVo), "Z"+System.currentTimeMillis()+random6.toString());
|
||||||
if (ObjectUtil.isNotEmpty(url)) {
|
if (ObjectUtil.isNotEmpty(url)) {
|
||||||
// 使用 Fastjson 将 JSON 字符串解析为 JSONObject
|
// 使用 Fastjson 将 JSON 字符串解析为 JSONObject
|
||||||
JSONObject jsonObject = JSON.parseObject(url);
|
JSONObject jsonObject = JSON.parseObject(url);
|
||||||
@ -252,14 +261,15 @@ public class PrinterServiceImpl implements PrinterService {
|
|||||||
String error = jsonObject.getString("error");
|
String error = jsonObject.getString("error");
|
||||||
if ("18".equals(error)) {
|
if ("18".equals(error)) {
|
||||||
getToken(storeId);
|
getToken(storeId);
|
||||||
reOilOrderReport(oilOrder,storeId);
|
oilOrderReport(oilOrder,storeId,receiptPrinting,mtUser,userBalance,ljUserGrade,orderNo);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void reOilOrderReport(Map<String, Object> oilOrder,Integer storeId) {
|
public void reOilOrderReport(Map<String, Object> oilOrder,Integer storeId,ReceiptPrinting receiptPrinting, MtUser mtUser, UserBalance userBalance, LJUserGrade ljUserGrade
|
||||||
|
,String orderNo) {
|
||||||
PrintDeviceInfo infoByStoreId = printDeviceInfoMapper.getInfoByStoreId(storeId);
|
PrintDeviceInfo infoByStoreId = printDeviceInfoMapper.getInfoByStoreId(storeId);
|
||||||
|
AllOrderInfoVo allOrderInfoVo=allOrderInfoMapper.getOneByOrderNo(orderNo);
|
||||||
Methods m=Methods.getInstance();
|
Methods m=Methods.getInstance();
|
||||||
Object accessToken = RedisUtil.get("scancodemodel+" + storeId);
|
Object accessToken = RedisUtil.get("scancodemodel+" + storeId);
|
||||||
if (ObjectUtil.isNotEmpty(accessToken)) {
|
if (ObjectUtil.isNotEmpty(accessToken)) {
|
||||||
@ -275,7 +285,7 @@ public class PrinterServiceImpl implements PrinterService {
|
|||||||
m.init(infoByStoreId.getAppKey(), infoByStoreId.getAppSecret());
|
m.init(infoByStoreId.getAppKey(), infoByStoreId.getAppSecret());
|
||||||
RePrintOilOrderReport.setHandover(oilOrder);
|
RePrintOilOrderReport.setHandover(oilOrder);
|
||||||
Integer random6 = (int) ((Math.random() * 9 + 1) * 100000);
|
Integer random6 = (int) ((Math.random() * 9 + 1) * 100000);
|
||||||
String url=m.print(infoByStoreId.getMachineCode(), RePrintOilOrderReport.rePrintOilOrder(), "Z"+System.currentTimeMillis()+random6.toString());
|
String url=m.print(infoByStoreId.getMachineCode(), RePrintOilOrderReport.rePrintOilOrder(receiptPrinting,mtUser,userBalance,ljUserGrade,allOrderInfoVo), "Z"+System.currentTimeMillis()+random6.toString());
|
||||||
if (ObjectUtil.isNotEmpty(url)) {
|
if (ObjectUtil.isNotEmpty(url)) {
|
||||||
// 使用 Fastjson 将 JSON 字符串解析为 JSONObject
|
// 使用 Fastjson 将 JSON 字符串解析为 JSONObject
|
||||||
JSONObject jsonObject = JSON.parseObject(url);
|
JSONObject jsonObject = JSON.parseObject(url);
|
||||||
@ -283,16 +293,17 @@ public class PrinterServiceImpl implements PrinterService {
|
|||||||
String error = jsonObject.getString("error");
|
String error = jsonObject.getString("error");
|
||||||
if ("18".equals(error)) {
|
if ("18".equals(error)) {
|
||||||
getToken(storeId);
|
getToken(storeId);
|
||||||
reOilOrderReport(oilOrder,storeId);
|
reOilOrderReport(oilOrder,storeId,receiptPrinting,mtUser,userBalance,ljUserGrade,orderNo);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void printCardValueReport(Map<String, Object> cardValue,Integer storeId) {
|
public void printCardValueReport(Map<String, Object> cardValue,Integer storeId,ReceiptPrinting receiptPrinting, MtUser mtUser, UserBalance userBalance, LJUserGrade ljUserGrade
|
||||||
|
,String orderNo) {
|
||||||
PrintDeviceInfo infoByStoreId = printDeviceInfoMapper.getInfoByStoreId(storeId);
|
PrintDeviceInfo infoByStoreId = printDeviceInfoMapper.getInfoByStoreId(storeId);
|
||||||
|
AllOrderInfoVo allOrderInfoVo=allOrderInfoMapper.getOneByOrderNo(orderNo);
|
||||||
log.info("handover:{}",cardValue.toString());
|
log.info("handover:{}",cardValue.toString());
|
||||||
Methods m=Methods.getInstance();
|
Methods m=Methods.getInstance();
|
||||||
Object accessToken = RedisUtil.get("scancodemodel+" + storeId);
|
Object accessToken = RedisUtil.get("scancodemodel+" + storeId);
|
||||||
@ -309,7 +320,7 @@ public class PrinterServiceImpl implements PrinterService {
|
|||||||
m.init(infoByStoreId.getAppKey(), infoByStoreId.getAppSecret());
|
m.init(infoByStoreId.getAppKey(), infoByStoreId.getAppSecret());
|
||||||
PrintCardValueReport.setHandover(cardValue);
|
PrintCardValueReport.setHandover(cardValue);
|
||||||
Integer random6 = (int) ((Math.random() * 9 + 1) * 100000);
|
Integer random6 = (int) ((Math.random() * 9 + 1) * 100000);
|
||||||
String url=m.print(infoByStoreId.getMachineCode(), PrintCardValueReport.printOilOrder(), "Z"+System.currentTimeMillis()+random6.toString());
|
String url=m.print(infoByStoreId.getMachineCode(), PrintCardValueReport.printOilOrder(receiptPrinting,mtUser,userBalance,ljUserGrade,allOrderInfoVo), "Z"+System.currentTimeMillis()+random6.toString());
|
||||||
if (ObjectUtil.isNotEmpty(url)) {
|
if (ObjectUtil.isNotEmpty(url)) {
|
||||||
// 使用 Fastjson 将 JSON 字符串解析为 JSONObject
|
// 使用 Fastjson 将 JSON 字符串解析为 JSONObject
|
||||||
JSONObject jsonObject = JSON.parseObject(url);
|
JSONObject jsonObject = JSON.parseObject(url);
|
||||||
@ -317,7 +328,7 @@ public class PrinterServiceImpl implements PrinterService {
|
|||||||
String error = jsonObject.getString("error");
|
String error = jsonObject.getString("error");
|
||||||
if ("18".equals(error)) {
|
if ("18".equals(error)) {
|
||||||
getToken(storeId);
|
getToken(storeId);
|
||||||
reOilOrderReport(cardValue,storeId);
|
printCardValueReport(cardValue,storeId,receiptPrinting,mtUser,userBalance,ljUserGrade,orderNo);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -349,7 +360,7 @@ public class PrinterServiceImpl implements PrinterService {
|
|||||||
String error = jsonObject.getString("error");
|
String error = jsonObject.getString("error");
|
||||||
if ("18".equals(error)) {
|
if ("18".equals(error)) {
|
||||||
getToken(storeId);
|
getToken(storeId);
|
||||||
reOilOrderReport(fuelDiesel,storeId);
|
printFuelDieselReport(fuelDiesel,storeId);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -382,7 +393,7 @@ public class PrinterServiceImpl implements PrinterService {
|
|||||||
String error = jsonObject.getString("error");
|
String error = jsonObject.getString("error");
|
||||||
if ("18".equals(error)) {
|
if ("18".equals(error)) {
|
||||||
getToken(storeId);
|
getToken(storeId);
|
||||||
reOilOrderReport(integral,storeId);
|
printIntegralReport(integral,storeId);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -424,7 +435,7 @@ public class PrinterServiceImpl implements PrinterService {
|
|||||||
String error = jsonObject.getString("error");
|
String error = jsonObject.getString("error");
|
||||||
if ("18".equals(error)) {
|
if ("18".equals(error)) {
|
||||||
getToken(storeId);
|
getToken(storeId);
|
||||||
reOilOrderReport(integral,storeId);
|
printTagReport(integral,storeId);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,19 +1,26 @@
|
|||||||
package com.fuint.business.printer.template;
|
package com.fuint.business.printer.template;
|
||||||
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.fuint.business.order.vo.AllOrderInfoVo;
|
||||||
|
import com.fuint.business.setting.entity.ReceiptPrinting;
|
||||||
|
import com.fuint.business.userManager.entity.LJUserGrade;
|
||||||
|
import com.fuint.business.userManager.entity.UserBalance;
|
||||||
import com.fuint.common.dto.AccountInfo;
|
import com.fuint.common.dto.AccountInfo;
|
||||||
import com.fuint.common.util.TokenUtil;
|
import com.fuint.common.util.TokenUtil;
|
||||||
|
import com.fuint.repository.model.MtUser;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
public class PrintCardValueReport {
|
public class PrintCardValueReport {
|
||||||
public static Map<String, Object> handover = new HashMap<>();
|
public static Map<String, Object> handover = new HashMap<>();
|
||||||
public static String printOilOrder() {
|
public static String printOilOrder(ReceiptPrinting receiptPrinting, MtUser mtUser, UserBalance userBalance, LJUserGrade ljUserGrade,
|
||||||
StringBuilder sb = new StringBuilder();
|
AllOrderInfoVo allOrderInfoVo) {
|
||||||
|
/* StringBuilder sb = new StringBuilder();
|
||||||
LocalDateTime now = LocalDateTime.now();
|
LocalDateTime now = LocalDateTime.now();
|
||||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||||
String formattedDateTime = now.format(formatter);
|
String formattedDateTime = now.format(formatter);
|
||||||
@ -55,7 +62,130 @@ public class PrintCardValueReport {
|
|||||||
sb.append("<center>谢谢惠顾,欢迎下次光临!</center>");
|
sb.append("<center>谢谢惠顾,欢迎下次光临!</center>");
|
||||||
|
|
||||||
|
|
||||||
return sb.toString();
|
return sb.toString();*/
|
||||||
|
StringBuilder sb=new StringBuilder();
|
||||||
|
|
||||||
|
LocalDateTime now = LocalDateTime.now();
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||||
|
String formattedDateTime = now.format(formatter);
|
||||||
|
System.out.println("当前时间:" + formattedDateTime);
|
||||||
|
// AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
if(allOrderInfoVo.getPayChannel().equals("applet") && allOrderInfoVo.getContent().equals("油品订单")){
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("zzzzz","一键加油"));
|
||||||
|
}else {
|
||||||
|
if(allOrderInfoVo.getContent().equals("收银台订单")){
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("zzzzz","收银台消费"));
|
||||||
|
}
|
||||||
|
if(allOrderInfoVo.getContent().equals("储值卡充值")){
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("zzzzz","会员充值"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
System.out.println( receiptPrinting.getPrintTemplateTop());
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("xxxxx","32131566313655"));
|
||||||
|
if(mtUser!=null&&mtUser.getUserNo()!=null){
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("kkkkk",mtUser.getUserNo()));
|
||||||
|
}else {
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("卡号:kkkkk\r\n",""));
|
||||||
|
}
|
||||||
|
if(mtUser!=null&&mtUser.getCarNo()!=null){
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("ccccc",mtUser.getCarNo()));
|
||||||
|
}else {
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("车牌号:ccccc\r\n",""));
|
||||||
|
}
|
||||||
|
if(ljUserGrade!=null&&ljUserGrade.getName()!=null){
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("ddddd",ljUserGrade.getName()));
|
||||||
|
}else {
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("等级:ddddd\r\n",""));
|
||||||
|
}
|
||||||
|
if(mtUser!=null&&mtUser.getMobile()!=null){
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("sssss",mtUser.getMobile()));
|
||||||
|
}else {
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("手机号:sssss\r\n",""));
|
||||||
|
}
|
||||||
|
if(userBalance!=null&&userBalance.getCardBalance().toString()!=null){
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("yyyyy",userBalance.getCardBalance().toString()));
|
||||||
|
}else {
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("余额:yyyyy\r\n",""));
|
||||||
|
}
|
||||||
|
if(userBalance!=null&&userBalance.getPoints().toString()!=null){
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("jjjjj",userBalance.getPoints().toString()));
|
||||||
|
}else {
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("积分:jjjjj\r\n",""));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (allOrderInfoVo.getType().equals("1")) {
|
||||||
|
sb.append("<table><tr><td>油品</td><td>金额</td></tr>");
|
||||||
|
List<Map<String,String>> o = (List<Map<String,String>>)handover.get("oilOrder");
|
||||||
|
for (Map<String, String> stringStringMap : o) {
|
||||||
|
sb.append("<tr><td>"+stringStringMap.get("oilName")+"</td>");
|
||||||
|
sb.append("<td>¥"+ stringStringMap.get("amount")+"</td></tr>");
|
||||||
|
}
|
||||||
|
sb.append("</table>");
|
||||||
|
sb.append("--------------------------------\r\n");
|
||||||
|
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isNotEmpty(handover.get("goodsOrder"))) {
|
||||||
|
sb.append("<table><tr><td>商品</td><td>数量</td><td>单价</td></tr>");
|
||||||
|
List<Map<String,String>> o = (List<Map<String,String>>)handover.get("goodsOrder");
|
||||||
|
for (Map<String, String> stringStringMap : o) {
|
||||||
|
sb.append("<tr><td>"+stringStringMap.get("oilName")+"</td>");
|
||||||
|
sb.append("<td>"+stringStringMap.get("unit")+"</td>");
|
||||||
|
|
||||||
|
sb.append("<td>"+ stringStringMap.get("amount")+"</td></tr>");
|
||||||
|
}
|
||||||
|
sb.append("</table>");
|
||||||
|
sb.append("--------------------------------\r\n");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
sb.append("支付方式:"+handover.get("payType")+"\r\n");
|
||||||
|
if ("credit".equals(handover.get("payType"))) {
|
||||||
|
sb.append("挂账单位:"+handover.get("unitName")+"\r\n");
|
||||||
|
sb.append("挂账金额:¥"+handover.get("creditAmount")+"\r\n");
|
||||||
|
sb.append("--------------------------------\r\n");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// if (ObjectUtil.isNotEmpty(handover.get("discount"))) {
|
||||||
|
// sb.append("订单总额:¥"+handover.get("discount")+"\r\n");
|
||||||
|
// sb.append("------------------------------------\r\n");
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
if (ObjectUtil.isNotEmpty(handover.get("discount"))) {
|
||||||
|
sb.append("优惠合计:¥"+handover.get("discount")+"\r\n");
|
||||||
|
sb.append("--------------------------------\r\n");
|
||||||
|
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isNotEmpty(handover.get("amount"))) {
|
||||||
|
sb.append("总金额:¥"+handover.get("amount")+"\r\n");
|
||||||
|
sb.append("--------------------------------\r\n");
|
||||||
|
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isNotEmpty(handover.get("consumeAmount"))) {
|
||||||
|
sb.append("储值卡付款:¥"+handover.get("consumeAmount")+"\r\n");
|
||||||
|
sb.append("--------------------------------\r\n");
|
||||||
|
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isNotEmpty(handover.get("consumeRefuelMoney"))) {
|
||||||
|
sb.append("囤油卡付款:¥"+handover.get("consumeRefuelMoney")+"\r\n");
|
||||||
|
sb.append("--------------------------------\r\n");
|
||||||
|
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isNotEmpty(handover.get("actualPay"))) {
|
||||||
|
sb.append("实付款:¥"+handover.get("actualPay")+"\r\n");
|
||||||
|
sb.append("--------------------------------\r\n");
|
||||||
|
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isNotEmpty(handover.get("seekZero"))) {
|
||||||
|
sb.append("找零:¥"+handover.get("seekZero")+"\r\n");
|
||||||
|
sb.append("--------------------------------\r\n");
|
||||||
|
|
||||||
|
}
|
||||||
|
receiptPrinting.setPrintTemplateDown(receiptPrinting.getPrintTemplateDown().
|
||||||
|
replace("ttttt",formattedDateTime));
|
||||||
|
System.out.println(receiptPrinting.getPrintTemplateTop()+sb.toString()+receiptPrinting.getPrintTemplateDown());
|
||||||
|
return receiptPrinting.getPrintTemplateTop()+sb.toString()+receiptPrinting.getPrintTemplateDown();
|
||||||
}
|
}
|
||||||
public static Map<String, Object> getHandover() {
|
public static Map<String, Object> getHandover() {
|
||||||
return handover;
|
return handover;
|
||||||
|
@ -1,8 +1,13 @@
|
|||||||
package com.fuint.business.printer.template;
|
package com.fuint.business.printer.template;
|
||||||
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.fuint.business.order.vo.AllOrderInfoVo;
|
||||||
|
import com.fuint.business.setting.entity.ReceiptPrinting;
|
||||||
|
import com.fuint.business.userManager.entity.LJUserGrade;
|
||||||
|
import com.fuint.business.userManager.entity.UserBalance;
|
||||||
import com.fuint.common.dto.AccountInfo;
|
import com.fuint.common.dto.AccountInfo;
|
||||||
import com.fuint.common.util.TokenUtil;
|
import com.fuint.common.util.TokenUtil;
|
||||||
|
import com.fuint.repository.model.MtUser;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
@ -10,25 +15,143 @@ import java.util.*;
|
|||||||
|
|
||||||
public class PrintOilOrderReport {
|
public class PrintOilOrderReport {
|
||||||
public static Map<String, Object> handover = new HashMap<>();
|
public static Map<String, Object> handover = new HashMap<>();
|
||||||
public static String printOilOrder(){
|
public static String printOilOrder(ReceiptPrinting receiptPrinting, MtUser mtUser, UserBalance userBalance, LJUserGrade ljUserGrade,
|
||||||
|
AllOrderInfoVo allOrderInfoVo){
|
||||||
|
// StringBuilder sb=new StringBuilder();
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// LocalDateTime now = LocalDateTime.now();
|
||||||
|
// DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||||
|
// String formattedDateTime = now.format(formatter);
|
||||||
|
// System.out.println("当前时间:" + formattedDateTime);
|
||||||
|
// AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
// sb.append("<center>订单统计\r\n</center>");
|
||||||
|
// sb.append("打印时间:"+formattedDateTime +"\r\n");
|
||||||
|
// sb.append("店铺名称:"+nowAccountInfo.getStoreName() +"\r\n");
|
||||||
|
// sb.append("--------------------------------\r\n");
|
||||||
|
// if (ObjectUtil.isNotEmpty(handover.get("oilOrder"))) {
|
||||||
|
// sb.append("<table><tr><td>油品</td><td>金额</td></tr>");
|
||||||
|
// List<Map<String,String>> o = (List<Map<String,String>>)handover.get("oilOrder");
|
||||||
|
// for (Map<String, String> stringStringMap : o) {
|
||||||
|
// sb.append("<tr><td>"+stringStringMap.get("oilName")+"</td>");
|
||||||
|
// sb.append("<td>¥"+ stringStringMap.get("amount")+"</td></tr>");
|
||||||
|
// }
|
||||||
|
// sb.append("</table>");
|
||||||
|
// sb.append("--------------------------------\r\n");
|
||||||
|
// }
|
||||||
|
// if (ObjectUtil.isNotEmpty(handover.get("goodsOrder"))) {
|
||||||
|
// sb.append("<table><tr><td>商品</td><td>数量</td><td>单价</td></tr>");
|
||||||
|
// List<Map<String,String>> o = (List<Map<String,String>>)handover.get("goodsOrder");
|
||||||
|
// for (Map<String, String> stringStringMap : o) {
|
||||||
|
// sb.append("<tr><td>"+stringStringMap.get("oilName")+"</td>");
|
||||||
|
// sb.append("<td>"+stringStringMap.get("unit")+"</td>");
|
||||||
|
//
|
||||||
|
// sb.append("<td>"+ stringStringMap.get("amount")+"</td></tr>");
|
||||||
|
// }
|
||||||
|
// sb.append("</table>");
|
||||||
|
// sb.append("--------------------------------\r\n");
|
||||||
|
// }
|
||||||
|
// sb.append("支付方式:"+handover.get("payType")+"\r\n");
|
||||||
|
// if ("credit".equals(handover.get("payType"))) {
|
||||||
|
// sb.append("挂账单位:"+handover.get("unitName")+"\r\n");
|
||||||
|
// sb.append("挂账金额:¥"+handover.get("creditAmount")+"\r\n");
|
||||||
|
// sb.append("--------------------------------\r\n");
|
||||||
|
// }
|
||||||
|
//// if (ObjectUtil.isNotEmpty(handover.get("discount"))) {
|
||||||
|
//// sb.append("订单总额:¥"+handover.get("discount")+"\r\n");
|
||||||
|
//// sb.append("------------------------------------\r\n");
|
||||||
|
//// }
|
||||||
|
// if (ObjectUtil.isNotEmpty(handover.get("discount"))) {
|
||||||
|
// sb.append("优惠合计:¥"+handover.get("discount")+"\r\n");
|
||||||
|
// sb.append("--------------------------------\r\n");
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// if (ObjectUtil.isNotEmpty(handover.get("amount"))) {
|
||||||
|
// sb.append("总金额:¥"+handover.get("amount")+"\r\n");
|
||||||
|
// sb.append("--------------------------------\r\n");
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// if (ObjectUtil.isNotEmpty(handover.get("consumeAmount"))) {
|
||||||
|
// sb.append("储值卡付款:¥"+handover.get("consumeAmount")+"\r\n");
|
||||||
|
// sb.append("--------------------------------\r\n");
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// if (ObjectUtil.isNotEmpty(handover.get("consumeRefuelMoney"))) {
|
||||||
|
// sb.append("囤油卡付款:¥"+handover.get("consumeRefuelMoney")+"\r\n");
|
||||||
|
// sb.append("--------------------------------\r\n");
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// if (ObjectUtil.isNotEmpty(handover.get("actualPay"))) {
|
||||||
|
// sb.append("实付款:¥"+handover.get("actualPay")+"\r\n");
|
||||||
|
// sb.append("--------------------------------\r\n");
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// if (ObjectUtil.isNotEmpty(handover.get("seekZero"))) {
|
||||||
|
// sb.append("找零:¥"+handover.get("seekZero")+"\r\n");
|
||||||
|
// sb.append("--------------------------------\r\n");
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// sb.append("<center>谢谢惠顾,欢迎下次光临!</center>");
|
||||||
|
//
|
||||||
|
// return sb.toString();
|
||||||
|
String orderNo=null;
|
||||||
|
List<Map<String,String>> o1 = (List<Map<String,String>>)handover.get("oilOrder");
|
||||||
|
for (Map<String, String> stringStringMap : o1) {
|
||||||
|
orderNo=stringStringMap.get("orderNo");
|
||||||
|
}
|
||||||
StringBuilder sb=new StringBuilder();
|
StringBuilder sb=new StringBuilder();
|
||||||
|
|
||||||
|
|
||||||
LocalDateTime now = LocalDateTime.now();
|
LocalDateTime now = LocalDateTime.now();
|
||||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||||
String formattedDateTime = now.format(formatter);
|
String formattedDateTime = now.format(formatter);
|
||||||
System.out.println("当前时间:" + formattedDateTime);
|
System.out.println("当前时间:" + formattedDateTime);
|
||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
// AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
if(allOrderInfoVo.getPayChannel().equals("applet") && allOrderInfoVo.getContent().equals("油品订单")){
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("zzzzz","一键加油"));
|
||||||
sb.append("<center>订单统计\r\n</center>");
|
}else {
|
||||||
|
if(allOrderInfoVo.getContent().equals("收银台订单")){
|
||||||
sb.append("打印时间:"+formattedDateTime +"\r\n");
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("zzzzz","收银台消费"));
|
||||||
sb.append("店铺名称:"+nowAccountInfo.getStoreName() +"\r\n");
|
}
|
||||||
|
if(allOrderInfoVo.getContent().equals("储值卡充值")){
|
||||||
sb.append("--------------------------------\r\n");
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("zzzzz","会员充值"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
System.out.println( receiptPrinting.getPrintTemplateTop());
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("xxxxx",orderNo));
|
||||||
|
if(mtUser!=null&&mtUser.getUserNo()!=null){
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("kkkkk",mtUser.getUserNo()));
|
||||||
|
}else {
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("卡号:kkkkk\r\n",""));
|
||||||
|
}
|
||||||
|
if(mtUser!=null&&mtUser.getCarNo()!=null){
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("ccccc",mtUser.getCarNo()));
|
||||||
|
}else {
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("车牌号:ccccc\r\n",""));
|
||||||
|
}
|
||||||
|
if(ljUserGrade!=null &&ljUserGrade.getName()!=null){
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("ddddd",ljUserGrade.getName()));
|
||||||
|
}else {
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("等级:ddddd\r\n",""));
|
||||||
|
}
|
||||||
|
if(mtUser!=null&&mtUser.getMobile()!=null){
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("sssss",mtUser.getMobile()));
|
||||||
|
}else {
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("手机号:sssss\r\n",""));
|
||||||
|
}
|
||||||
|
if(userBalance!=null&&userBalance.getCardBalance()!=null){
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("yyyyy",userBalance.getCardBalance().toString()));
|
||||||
|
}else {
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("余额:yyyyy\r\n",""));
|
||||||
|
}
|
||||||
|
if(userBalance!=null&&userBalance.getPoints().toString()!=null){
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("jjjjj",userBalance.getPoints().toString()));
|
||||||
|
}else {
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("积分:jjjjj\r\n",""));
|
||||||
|
}
|
||||||
if (ObjectUtil.isNotEmpty(handover.get("oilOrder"))) {
|
if (ObjectUtil.isNotEmpty(handover.get("oilOrder"))) {
|
||||||
|
|
||||||
sb.append("<table><tr><td>油品</td><td>金额</td></tr>");
|
sb.append("<table><tr><td>油品</td><td>金额</td></tr>");
|
||||||
List<Map<String,String>> o = (List<Map<String,String>>)handover.get("oilOrder");
|
List<Map<String,String>> o = (List<Map<String,String>>)handover.get("oilOrder");
|
||||||
for (Map<String, String> stringStringMap : o) {
|
for (Map<String, String> stringStringMap : o) {
|
||||||
@ -96,10 +219,9 @@ public class PrintOilOrderReport {
|
|||||||
sb.append("--------------------------------\r\n");
|
sb.append("--------------------------------\r\n");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
receiptPrinting.setPrintTemplateDown(receiptPrinting.getPrintTemplateDown().
|
||||||
sb.append("<center>谢谢惠顾,欢迎下次光临!</center>");
|
replace("ttttt",formattedDateTime));
|
||||||
|
return receiptPrinting.getPrintTemplateTop()+sb.toString()+receiptPrinting.getPrintTemplateDown();
|
||||||
return sb.toString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Map<String, Object> getHandover() {
|
public static Map<String, Object> getHandover() {
|
||||||
|
@ -1,8 +1,13 @@
|
|||||||
package com.fuint.business.printer.template;
|
package com.fuint.business.printer.template;
|
||||||
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.fuint.business.order.vo.AllOrderInfoVo;
|
||||||
|
import com.fuint.business.setting.entity.ReceiptPrinting;
|
||||||
|
import com.fuint.business.userManager.entity.LJUserGrade;
|
||||||
|
import com.fuint.business.userManager.entity.UserBalance;
|
||||||
import com.fuint.common.dto.AccountInfo;
|
import com.fuint.common.dto.AccountInfo;
|
||||||
import com.fuint.common.util.TokenUtil;
|
import com.fuint.common.util.TokenUtil;
|
||||||
|
import com.fuint.repository.model.MtUser;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
@ -13,32 +18,152 @@ import java.util.Map;
|
|||||||
|
|
||||||
public class RePrintOilOrderReport {
|
public class RePrintOilOrderReport {
|
||||||
public static Map<String, Object> handover = new HashMap<>();
|
public static Map<String, Object> handover = new HashMap<>();
|
||||||
public static String rePrintOilOrder(){
|
public static String rePrintOilOrder(ReceiptPrinting receiptPrinting, MtUser mtUser, UserBalance userBalance, LJUserGrade ljUserGrade,
|
||||||
|
AllOrderInfoVo allOrderInfoVo){
|
||||||
|
// StringBuilder sb=new StringBuilder();
|
||||||
|
//
|
||||||
|
// LocalDateTime now = LocalDateTime.now();
|
||||||
|
// DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||||
|
// String formattedDateTime = now.format(formatter);
|
||||||
|
// System.out.println("当前时间:" + formattedDateTime);
|
||||||
|
// AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// sb.append("<center>订单统计\r\n</center>");
|
||||||
|
//
|
||||||
|
// sb.append("打印时间:"+formattedDateTime +"\r\n");
|
||||||
|
// sb.append("店铺名称:"+nowAccountInfo.getStoreName() +"\r\n");
|
||||||
|
// sb.append("----------------------------\r\n");
|
||||||
|
//
|
||||||
|
// if (ObjectUtil.isNotEmpty(handover.get("oilOrder"))) {
|
||||||
|
// sb.append("<table><tr><td>油品</td><td>加油升数</td><td>金额</td></tr>");
|
||||||
|
// List<Map<String,String>> o = (List<Map<String,String>>)handover.get("oilOrder");
|
||||||
|
// for (Map<String, String> stringStringMap : o) {
|
||||||
|
// sb.append("<tr><td>"+stringStringMap.get("oilName")+"</td>");
|
||||||
|
// sb.append("<td>"+stringStringMap.get("oilNum")+"</td>");
|
||||||
|
// sb.append("<td>"+ stringStringMap.get("amount")+"</td></tr>");
|
||||||
|
// }
|
||||||
|
// sb.append("</table>");
|
||||||
|
// sb.append("----------------------------\r\n");
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// if (ObjectUtil.isNotEmpty(handover.get("goodsOrder"))) {
|
||||||
|
// sb.append("<table><tr><td>商品</td><td>数量</td><td>单价</td></tr>");
|
||||||
|
// List<Map<String,String>> o = (List<Map<String,String>>)handover.get("goodsOrder");
|
||||||
|
// for (Map<String, String> stringStringMap : o) {
|
||||||
|
// sb.append("<tr><td>"+stringStringMap.get("oilName")+"</td>");
|
||||||
|
// sb.append("<td>"+stringStringMap.get("unit")+"</td>");
|
||||||
|
// sb.append("<td>"+ stringStringMap.get("amount")+"</td></tr>");
|
||||||
|
// }
|
||||||
|
// sb.append("</table>");
|
||||||
|
// sb.append("----------------------------\r\n");
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// sb.append("支付方式:"+handover.get("payType")+"\r\n");
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// if (ObjectUtil.isNotEmpty(handover.get("amount"))) {
|
||||||
|
// sb.append("合计:¥"+handover.get("amount")+"\r\n");
|
||||||
|
// sb.append("----------------------------\r\n");
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// if (ObjectUtil.isNotEmpty(handover.get("payAmount"))) {
|
||||||
|
// sb.append("实付款:¥"+handover.get("payAmount")+"\r\n");
|
||||||
|
// sb.append("----------------------------\r\n");
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// if (ObjectUtil.isNotEmpty(handover.get("discount"))) {
|
||||||
|
// sb.append("优惠:¥"+handover.get("discount")+"\r\n");
|
||||||
|
// sb.append("----------------------------\r\n");
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// if (ObjectUtil.isNotEmpty(handover.get("seekZero"))) {
|
||||||
|
// sb.append("找零:¥"+handover.get("seekZero")+"\r\n");
|
||||||
|
// sb.append("----------------------------\r\n");
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// if (ObjectUtil.isNotEmpty(handover.get("type")) && "2".equals(handover.get("type"))) {
|
||||||
|
// if (ObjectUtil.isNotEmpty(handover.get("balanceAmount"))) {
|
||||||
|
// sb.append("储值卡:¥"+handover.get("balanceAmount")+"\r\n");
|
||||||
|
// sb.append("----------------------------\r\n");
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// if (ObjectUtil.isNotEmpty(handover.get("oilCardAmount"))) {
|
||||||
|
// sb.append("屯油卡:"+handover.get("oilCardAmount")+"L\r\n");
|
||||||
|
// sb.append("----------------------------\r\n");
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// if (ObjectUtil.isNotEmpty(handover.get("calculateRefundsV"))) {
|
||||||
|
// sb.append("退款:¥"+handover.get("calculateRefundsV")+"\r\n");
|
||||||
|
// sb.append("----------------------------\r\n");
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// sb.append("<center>谢谢惠顾,欢迎下次光临!</center>");
|
||||||
|
//
|
||||||
|
// return sb.toString();
|
||||||
StringBuilder sb=new StringBuilder();
|
StringBuilder sb=new StringBuilder();
|
||||||
|
|
||||||
LocalDateTime now = LocalDateTime.now();
|
LocalDateTime now = LocalDateTime.now();
|
||||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||||
String formattedDateTime = now.format(formatter);
|
String formattedDateTime = now.format(formatter);
|
||||||
System.out.println("当前时间:" + formattedDateTime);
|
System.out.println("当前时间:" + formattedDateTime);
|
||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
// AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
if(allOrderInfoVo.getPayChannel().equals("applet") && allOrderInfoVo.getContent().equals("油品订单")){
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("zzzzz","一键加油"));
|
||||||
|
}else {
|
||||||
|
if(allOrderInfoVo.getContent().equals("收银台订单")){
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("zzzzz","收银台消费"));
|
||||||
|
}
|
||||||
|
if(allOrderInfoVo.getContent().equals("储值卡充值")){
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("zzzzz","会员充值"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
System.out.println( receiptPrinting.getPrintTemplateTop());
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("xxxxx","32131566313655"));
|
||||||
|
if(mtUser!=null&&mtUser.getUserNo()!=null){
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("kkkkk",mtUser.getUserNo()));
|
||||||
|
}else {
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("卡号:kkkkk\r\n",""));
|
||||||
|
}
|
||||||
|
if( mtUser!=null && mtUser.getCarNo()!=null){
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("ccccc",mtUser.getCarNo()));
|
||||||
|
}else {
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("车牌号:ccccc\r\n",""));
|
||||||
|
}
|
||||||
|
if(ljUserGrade!=null&&ljUserGrade.getName()!=null){
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("ddddd",ljUserGrade.getName()));
|
||||||
|
}else {
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("等级:ddddd\r\n",""));
|
||||||
|
}
|
||||||
|
if(mtUser!=null && mtUser.getMobile()!=null){
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("sssss",mtUser.getMobile()));
|
||||||
|
}else {
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("手机号:sssss\r\n",""));
|
||||||
|
}
|
||||||
|
if(userBalance!=null && userBalance.getCardBalance().toString()!=null){
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("yyyyy",userBalance.getCardBalance().toString()));
|
||||||
|
}else {
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("余额:yyyyy\r\n",""));
|
||||||
|
}
|
||||||
|
if(userBalance!=null && userBalance.getPoints().toString()!=null){
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("jjjjj",userBalance.getPoints().toString()));
|
||||||
|
}else {
|
||||||
|
receiptPrinting.setPrintTemplateTop(receiptPrinting.getPrintTemplateTop().replace("积分:jjjjj\r\n",""));
|
||||||
|
}
|
||||||
|
|
||||||
sb.append("<center>订单统计\r\n</center>");
|
if (allOrderInfoVo.getType().equals("1")) {
|
||||||
|
sb.append("<table><tr><td>油品</td><td>金额</td></tr>");
|
||||||
sb.append("打印时间:"+formattedDateTime +"\r\n");
|
|
||||||
sb.append("店铺名称:"+nowAccountInfo.getStoreName() +"\r\n");
|
|
||||||
sb.append("----------------------------\r\n");
|
|
||||||
|
|
||||||
if (ObjectUtil.isNotEmpty(handover.get("oilOrder"))) {
|
|
||||||
sb.append("<table><tr><td>油品</td><td>加油升数</td><td>金额</td></tr>");
|
|
||||||
List<Map<String,String>> o = (List<Map<String,String>>)handover.get("oilOrder");
|
List<Map<String,String>> o = (List<Map<String,String>>)handover.get("oilOrder");
|
||||||
for (Map<String, String> stringStringMap : o) {
|
for (Map<String, String> stringStringMap : o) {
|
||||||
sb.append("<tr><td>"+stringStringMap.get("oilName")+"</td>");
|
sb.append("<tr><td>"+stringStringMap.get("oilName")+"</td>");
|
||||||
sb.append("<td>"+stringStringMap.get("oilNum")+"</td>");
|
sb.append("<td>¥"+ stringStringMap.get("amount")+"</td></tr>");
|
||||||
sb.append("<td>"+ stringStringMap.get("amount")+"</td></tr>");
|
|
||||||
}
|
}
|
||||||
sb.append("</table>");
|
sb.append("</table>");
|
||||||
sb.append("----------------------------\r\n");
|
sb.append("--------------------------------\r\n");
|
||||||
|
|
||||||
}
|
}
|
||||||
if (ObjectUtil.isNotEmpty(handover.get("goodsOrder"))) {
|
if (ObjectUtil.isNotEmpty(handover.get("goodsOrder"))) {
|
||||||
@ -47,57 +172,60 @@ public class RePrintOilOrderReport {
|
|||||||
for (Map<String, String> stringStringMap : o) {
|
for (Map<String, String> stringStringMap : o) {
|
||||||
sb.append("<tr><td>"+stringStringMap.get("oilName")+"</td>");
|
sb.append("<tr><td>"+stringStringMap.get("oilName")+"</td>");
|
||||||
sb.append("<td>"+stringStringMap.get("unit")+"</td>");
|
sb.append("<td>"+stringStringMap.get("unit")+"</td>");
|
||||||
|
|
||||||
sb.append("<td>"+ stringStringMap.get("amount")+"</td></tr>");
|
sb.append("<td>"+ stringStringMap.get("amount")+"</td></tr>");
|
||||||
}
|
}
|
||||||
sb.append("</table>");
|
sb.append("</table>");
|
||||||
sb.append("----------------------------\r\n");
|
sb.append("--------------------------------\r\n");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sb.append("支付方式:"+handover.get("payType")+"\r\n");
|
sb.append("支付方式:"+handover.get("payType")+"\r\n");
|
||||||
|
if ("credit".equals(handover.get("payType"))) {
|
||||||
|
sb.append("挂账单位:"+handover.get("unitName")+"\r\n");
|
||||||
if (ObjectUtil.isNotEmpty(handover.get("amount"))) {
|
sb.append("挂账金额:¥"+handover.get("creditAmount")+"\r\n");
|
||||||
sb.append("合计:¥"+handover.get("amount")+"\r\n");
|
sb.append("--------------------------------\r\n");
|
||||||
sb.append("----------------------------\r\n");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if (ObjectUtil.isNotEmpty(handover.get("payAmount"))) {
|
|
||||||
sb.append("实付款:¥"+handover.get("payAmount")+"\r\n");
|
|
||||||
sb.append("----------------------------\r\n");
|
|
||||||
|
|
||||||
}
|
// if (ObjectUtil.isNotEmpty(handover.get("discount"))) {
|
||||||
|
// sb.append("订单总额:¥"+handover.get("discount")+"\r\n");
|
||||||
|
// sb.append("------------------------------------\r\n");
|
||||||
|
//
|
||||||
|
// }
|
||||||
if (ObjectUtil.isNotEmpty(handover.get("discount"))) {
|
if (ObjectUtil.isNotEmpty(handover.get("discount"))) {
|
||||||
sb.append("优惠:¥"+handover.get("discount")+"\r\n");
|
sb.append("优惠合计:¥"+handover.get("discount")+"\r\n");
|
||||||
sb.append("----------------------------\r\n");
|
sb.append("--------------------------------\r\n");
|
||||||
|
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isNotEmpty(handover.get("amount"))) {
|
||||||
|
sb.append("总金额:¥"+handover.get("amount")+"\r\n");
|
||||||
|
sb.append("--------------------------------\r\n");
|
||||||
|
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isNotEmpty(handover.get("consumeAmount"))) {
|
||||||
|
sb.append("储值卡付款:¥"+handover.get("consumeAmount")+"\r\n");
|
||||||
|
sb.append("--------------------------------\r\n");
|
||||||
|
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isNotEmpty(handover.get("consumeRefuelMoney"))) {
|
||||||
|
sb.append("囤油卡付款:¥"+handover.get("consumeRefuelMoney")+"\r\n");
|
||||||
|
sb.append("--------------------------------\r\n");
|
||||||
|
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isNotEmpty(handover.get("actualPay"))) {
|
||||||
|
sb.append("实付款:¥"+handover.get("actualPay")+"\r\n");
|
||||||
|
sb.append("--------------------------------\r\n");
|
||||||
|
|
||||||
}
|
}
|
||||||
if (ObjectUtil.isNotEmpty(handover.get("seekZero"))) {
|
if (ObjectUtil.isNotEmpty(handover.get("seekZero"))) {
|
||||||
sb.append("找零:¥"+handover.get("seekZero")+"\r\n");
|
sb.append("找零:¥"+handover.get("seekZero")+"\r\n");
|
||||||
sb.append("----------------------------\r\n");
|
sb.append("--------------------------------\r\n");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
receiptPrinting.setPrintTemplateDown(receiptPrinting.getPrintTemplateDown().
|
||||||
if (ObjectUtil.isNotEmpty(handover.get("type")) && "2".equals(handover.get("type"))) {
|
replace("ttttt",formattedDateTime));
|
||||||
if (ObjectUtil.isNotEmpty(handover.get("balanceAmount"))) {
|
return receiptPrinting.getPrintTemplateTop()+sb.toString()+receiptPrinting.getPrintTemplateDown();
|
||||||
sb.append("储值卡:¥"+handover.get("balanceAmount")+"\r\n");
|
|
||||||
sb.append("----------------------------\r\n");
|
|
||||||
|
|
||||||
}
|
|
||||||
if (ObjectUtil.isNotEmpty(handover.get("oilCardAmount"))) {
|
|
||||||
sb.append("屯油卡:"+handover.get("oilCardAmount")+"L\r\n");
|
|
||||||
sb.append("----------------------------\r\n");
|
|
||||||
|
|
||||||
}
|
|
||||||
if (ObjectUtil.isNotEmpty(handover.get("calculateRefundsV"))) {
|
|
||||||
sb.append("退款:¥"+handover.get("calculateRefundsV")+"\r\n");
|
|
||||||
sb.append("----------------------------\r\n");
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
sb.append("<center>谢谢惠顾,欢迎下次光临!</center>");
|
|
||||||
|
|
||||||
return sb.toString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Map<String, Object> getHandover() {
|
public static Map<String, Object> getHandover() {
|
||||||
|
@ -157,5 +157,18 @@ public class ReceiptPrinting extends BaseEntity implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String storeName;
|
private String storeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打印模版顶部
|
||||||
|
*/
|
||||||
|
private String printTemplateTop;
|
||||||
|
/**
|
||||||
|
* 打印模版底部
|
||||||
|
*/
|
||||||
|
private String printTemplateDown;
|
||||||
|
/**
|
||||||
|
* 二维码的内容
|
||||||
|
*/
|
||||||
|
private String codeContent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,5 +19,9 @@ public interface ReceiptPrintingMapper extends BaseMapper<ReceiptPrinting> {
|
|||||||
// 更具 stordid查询当前油站小票打印配置
|
// 更具 stordid查询当前油站小票打印配置
|
||||||
List<ReceiptPrinting> queryReceiptPrintingList(@Param("receiptPrinting") ReceiptPrinting receiptPrinting);
|
List<ReceiptPrinting> queryReceiptPrintingList(@Param("receiptPrinting") ReceiptPrinting receiptPrinting);
|
||||||
|
|
||||||
|
void addReceiptPrinting(@Param("receiptPrinting") ReceiptPrinting receiptPrinting);
|
||||||
|
|
||||||
|
ReceiptPrinting queryReceiptPrintingOne(@Param("storeId") Integer storeId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,5 +11,43 @@
|
|||||||
store_id = #{receiptPrinting.storeId} and deleted = 0
|
store_id = #{receiptPrinting.storeId} and deleted = 0
|
||||||
order by id desc
|
order by id desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<insert id="addReceiptPrinting" >
|
||||||
|
INSERT into receipt_printing (logo_set, headfoot_set, shop_name, title, receipt_type, foot, top_set,
|
||||||
|
order_number, member_card, plate_number, membership_level, phone_number,
|
||||||
|
member_points, bottom_set, operate_time,
|
||||||
|
contact_way, console_operator, address, remarks, code_set, code_image,
|
||||||
|
loge_image,store_id,create_name,create_time,create_by,update_time,update_by,print_template_top,print_template_down,code_content)
|
||||||
|
VALUES (#{receiptPrinting.logoSet}, #{receiptPrinting.headfootSet}, #{receiptPrinting.shopName}, #{receiptPrinting.title},
|
||||||
|
#{receiptPrinting.receiptType}, #{receiptPrinting.foot}, #{receiptPrinting.topSet},
|
||||||
|
#{receiptPrinting.orderNumber}, #{receiptPrinting.memberCard}, #{receiptPrinting.plateNumber},
|
||||||
|
#{receiptPrinting.membershipLevel}, #{receiptPrinting.phoneNumber}, #{receiptPrinting.memberPoints},
|
||||||
|
#{receiptPrinting.bottomSet}, #{receiptPrinting.operateTime},
|
||||||
|
#{receiptPrinting.contactWay}, #{receiptPrinting.consoleOperator}, #{receiptPrinting.address},
|
||||||
|
#{receiptPrinting.remarks}, #{receiptPrinting.codeSet}, #{receiptPrinting.codeImage}, #{receiptPrinting.logeImage}
|
||||||
|
, #{receiptPrinting.storeId}, #{receiptPrinting.createName}, #{receiptPrinting.createTime}, #{receiptPrinting.createBy}
|
||||||
|
, #{receiptPrinting.updateTime}, #{receiptPrinting.updateBy}, #{receiptPrinting.printTemplateTop}, #{receiptPrinting.printTemplateDown},#{receiptPrinting.codeContent})
|
||||||
|
ON DUPLICATE KEY UPDATE
|
||||||
|
logo_set = #{receiptPrinting.logoSet}, headfoot_set = #{receiptPrinting.headfootSet}, shop_name = #{receiptPrinting.shopName},
|
||||||
|
title = #{receiptPrinting.title}, receipt_type = #{receiptPrinting.receiptType}, foot = #{receiptPrinting.foot},
|
||||||
|
top_set = #{receiptPrinting.topSet}, order_number = #{receiptPrinting.orderNumber}, member_card = #{receiptPrinting.memberCard},
|
||||||
|
plate_number = #{receiptPrinting.plateNumber},
|
||||||
|
member_points = #{receiptPrinting.membershipLevel}, bottom_set = #{receiptPrinting.bottomSet},
|
||||||
|
operate_time = #{receiptPrinting.operateTime},
|
||||||
|
contact_way = #{receiptPrinting.contactWay}, console_operator = #{receiptPrinting.consoleOperator},
|
||||||
|
address = #{receiptPrinting.address}, remarks = #{receiptPrinting.remarks}, code_set = #{receiptPrinting.codeSet},
|
||||||
|
code_image = #{receiptPrinting.codeImage},loge_image = #{receiptPrinting.logeImage},update_time = #{receiptPrinting.updateTime},
|
||||||
|
update_by = #{receiptPrinting.updateBy},print_template_top= #{receiptPrinting.printTemplateTop},print_template_down= #{receiptPrinting.printTemplateDown}
|
||||||
|
,code_content=#{receiptPrinting.codeContent}
|
||||||
|
|
||||||
|
</insert>
|
||||||
|
<select id="queryReceiptPrintingOne" resultType="com.fuint.business.setting.entity.ReceiptPrinting">
|
||||||
|
SELECT
|
||||||
|
*
|
||||||
|
FROM
|
||||||
|
receipt_printing
|
||||||
|
WHERE
|
||||||
|
store_id = #{storeId}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
@ -19,5 +19,5 @@ public interface ReceiptPrintingService extends IService<ReceiptPrinting> {
|
|||||||
|
|
||||||
ReceiptPrinting queryReceiptPrintingList(ReceiptPrinting receiptPrinting);
|
ReceiptPrinting queryReceiptPrintingList(ReceiptPrinting receiptPrinting);
|
||||||
|
|
||||||
|
ReceiptPrinting queryReceiptPrintingOne(Integer storeId);
|
||||||
}
|
}
|
||||||
|
@ -1,19 +1,33 @@
|
|||||||
package com.fuint.business.setting.service.impl;
|
package com.fuint.business.setting.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.fuint.business.printer.entity.PrintDeviceInfo;
|
||||||
|
import com.fuint.business.printer.mapper.PrintDeviceInfoMapper;
|
||||||
|
import com.fuint.business.printer.unit.Methods;
|
||||||
import com.fuint.business.setting.entity.ReceiptPrinting;
|
import com.fuint.business.setting.entity.ReceiptPrinting;
|
||||||
import com.fuint.business.setting.mapper.ReceiptPrintingMapper;
|
import com.fuint.business.setting.mapper.ReceiptPrintingMapper;
|
||||||
import com.fuint.business.setting.service.ReceiptPrintingService;
|
import com.fuint.business.setting.service.ReceiptPrintingService;
|
||||||
|
import com.fuint.business.store.entity.MtStore;
|
||||||
|
import com.fuint.business.store.mapper.MtStoreMapper;
|
||||||
import com.fuint.business.storeInformation.entity.LJStore;
|
import com.fuint.business.storeInformation.entity.LJStore;
|
||||||
import com.fuint.business.storeInformation.service.ILJStoreService;
|
import com.fuint.business.storeInformation.service.ILJStoreService;
|
||||||
import com.fuint.common.dto.AccountInfo;
|
import com.fuint.common.dto.AccountInfo;
|
||||||
|
import com.fuint.common.util.RedisUtil;
|
||||||
import com.fuint.common.util.TokenUtil;
|
import com.fuint.common.util.TokenUtil;
|
||||||
|
import com.yly.print_sdk_library.RequestMethod;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.net.InetAddress;
|
||||||
|
import java.net.UnknownHostException;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@ -24,28 +38,33 @@ import java.util.stream.Collectors;
|
|||||||
* @date : 2024-08-30 10:00
|
* @date : 2024-08-30 10:00
|
||||||
**/
|
**/
|
||||||
@Service
|
@Service
|
||||||
|
@Slf4j
|
||||||
public class ReceiptPrintingServiceImpl extends ServiceImpl<ReceiptPrintingMapper, ReceiptPrinting> implements ReceiptPrintingService {
|
public class ReceiptPrintingServiceImpl extends ServiceImpl<ReceiptPrintingMapper, ReceiptPrinting> implements ReceiptPrintingService {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ReceiptPrintingMapper receiptPrintingMapper;
|
private ReceiptPrintingMapper receiptPrintingMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ILJStoreService storeService;
|
private ILJStoreService storeService;
|
||||||
|
@Autowired
|
||||||
|
private PrintDeviceInfoMapper printDeviceInfoMapper;
|
||||||
|
@Autowired
|
||||||
|
private MtStoreMapper mtStoreMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public int addReceiptPrinting(ReceiptPrinting receiptPrinting) {
|
public int addReceiptPrinting(ReceiptPrinting receiptPrinting) {
|
||||||
|
|
||||||
// id不为空 查询 删除
|
// id不为空 查询 删除
|
||||||
if (receiptPrinting.getId() != null) {
|
// if (receiptPrinting.getId() != null) {
|
||||||
ReceiptPrinting receiptPrinting1 = new ReceiptPrinting();
|
// ReceiptPrinting receiptPrinting1 = new ReceiptPrinting();
|
||||||
receiptPrinting1.setId(receiptPrinting.getId());
|
// receiptPrinting1.setId(receiptPrinting.getId());
|
||||||
receiptPrinting1.setDeleted(1);
|
// receiptPrinting1.setDeleted(1);
|
||||||
receiptPrintingMapper.updateById(receiptPrinting1);
|
// receiptPrintingMapper.updateById(receiptPrinting1);
|
||||||
}
|
// }
|
||||||
// 为空进行新增
|
// 为空进行新增
|
||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
receiptPrinting.setStoreId(nowAccountInfo.getStoreId());
|
receiptPrinting.setStoreId(nowAccountInfo.getStoreId());
|
||||||
|
MtStore mtStore = mtStoreMapper.selectById(nowAccountInfo.getStoreId());
|
||||||
|
|
||||||
if (receiptPrinting.getHeadfootSets() != null && receiptPrinting.getHeadfootSets().size() > 0 ) {
|
if (receiptPrinting.getHeadfootSets() != null && receiptPrinting.getHeadfootSets().size() > 0 ) {
|
||||||
receiptPrinting.setHeadfootSet(chke(receiptPrinting.getHeadfootSets()));
|
receiptPrinting.setHeadfootSet(chke(receiptPrinting.getHeadfootSets()));
|
||||||
@ -59,10 +78,120 @@ public class ReceiptPrintingServiceImpl extends ServiceImpl<ReceiptPrintingMappe
|
|||||||
receiptPrinting.setBottomSet(chke(receiptPrinting.getBottomSets()));
|
receiptPrinting.setBottomSet(chke(receiptPrinting.getBottomSets()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//拼接模版
|
||||||
int insert = receiptPrintingMapper.insert(receiptPrinting);
|
StringBuilder sb=new StringBuilder();
|
||||||
|
LocalDateTime now = LocalDateTime.now();
|
||||||
return insert;
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||||
|
String formattedDateTime = now.format(formatter);
|
||||||
|
System.out.println("当前时间:" + formattedDateTime);
|
||||||
|
if(receiptPrinting.getLogoSet().equals("0")){
|
||||||
|
sb.append("<ML>1</ML>"+"\r\n");
|
||||||
|
sb.append("----------------------------\r\n");
|
||||||
|
String mm=setIice(receiptPrinting.getCodeImage(),nowAccountInfo.getStoreId());
|
||||||
|
if ("18".equals(mm)) {
|
||||||
|
getToken(nowAccountInfo.getStoreId());
|
||||||
|
setIice(receiptPrinting.getCodeImage(),nowAccountInfo.getStoreId());
|
||||||
|
}
|
||||||
|
// List<PrintDeviceInfo> infoByStoreId = printDeviceInfoMapper.getInfoListByStoreId(nowAccountInfo.getStoreId());
|
||||||
|
// for(int i=0;i<infoByStoreId.size();i++){
|
||||||
|
// Methods m=Methods.getInstance();
|
||||||
|
// Object accessToken = RedisUtil.get("scancodemodel+" + nowAccountInfo.getStoreId());
|
||||||
|
// if (ObjectUtil.isNotEmpty(accessToken)) {
|
||||||
|
// m.init(accessToken.toString());
|
||||||
|
// } else {
|
||||||
|
// String token = getToken(nowAccountInfo.getStoreId());
|
||||||
|
// if ("error".equals(token)) {
|
||||||
|
// throw new RuntimeException("获取参数失败,无法打印");
|
||||||
|
// }else {
|
||||||
|
// m.init(token);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// m.init(infoByStoreId.get(i).getAppKey(), infoByStoreId.get(i).getAppSecret());
|
||||||
|
// String url=m.setIcon(infoByStoreId.get(i).getMachineCode(), receiptPrinting.getLogeImage());
|
||||||
|
// if (ObjectUtil.isNotEmpty(url)) {
|
||||||
|
// // 使用 Fastjson 将 JSON 字符串解析为 JSONObject
|
||||||
|
// JSONObject jsonObject = JSON.parseObject(url);
|
||||||
|
// String error = jsonObject.getString("error");
|
||||||
|
// System.out.println(error);
|
||||||
|
// if ("18".equals(error)) {
|
||||||
|
// getToken(nowAccountInfo.getStoreId());
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}else {
|
||||||
|
sb.append("<ML>0</ML>"+"\r\n");
|
||||||
|
}
|
||||||
|
if(receiptPrinting.getHeadfootSet().contains("0")){
|
||||||
|
sb.append("<FB><center>"+nowAccountInfo.getStoreName() +"</center></FB>");
|
||||||
|
}
|
||||||
|
if(receiptPrinting.getHeadfootSet().contains("1")){
|
||||||
|
sb.append("<center>"+receiptPrinting.getTitle() +"</center>");
|
||||||
|
}
|
||||||
|
if(receiptPrinting.getHeadfootSet().contains("2")){
|
||||||
|
sb.append("<center>"+"zzzzz</center>");
|
||||||
|
}
|
||||||
|
sb.append("打印时间:"+formattedDateTime +"\r\n");
|
||||||
|
if(receiptPrinting.getTopSet().contains("0")){
|
||||||
|
sb.append("订单号:xxxxx\r\n");
|
||||||
|
}
|
||||||
|
if(receiptPrinting.getTopSet().contains("1")){
|
||||||
|
sb.append("卡号:kkkkk\r\n");
|
||||||
|
}
|
||||||
|
if(receiptPrinting.getTopSet().contains("2")){
|
||||||
|
sb.append("车牌号:ccccc\r\n");
|
||||||
|
}
|
||||||
|
if(receiptPrinting.getTopSet().contains("3")){
|
||||||
|
sb.append("等级:ddddd\r\n");
|
||||||
|
}
|
||||||
|
if(receiptPrinting.getTopSet().contains("4")){
|
||||||
|
sb.append("手机号:sssss\r\n");
|
||||||
|
}
|
||||||
|
if(receiptPrinting.getTopSet().contains("5")){
|
||||||
|
sb.append("余额:yyyyy\r\n");
|
||||||
|
}
|
||||||
|
if(receiptPrinting.getTopSet().contains("6")){
|
||||||
|
sb.append("积分:jjjjj\r\n");
|
||||||
|
}
|
||||||
|
sb.append("----------------------------\r\n");
|
||||||
|
receiptPrinting.setPrintTemplateTop(sb.toString());
|
||||||
|
StringBuilder sb1=new StringBuilder();
|
||||||
|
if(receiptPrinting.getBottomSet().contains("0")){
|
||||||
|
sb1.append("操作时间:ttttt\r\n");
|
||||||
|
}
|
||||||
|
if(receiptPrinting.getBottomSet().contains("1")){
|
||||||
|
if(mtStore.getPhone().toString()!=null){
|
||||||
|
sb1.append("联系方式:"+mtStore.getPhone()+"\r\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(receiptPrinting.getBottomSet().contains("2")){
|
||||||
|
if(nowAccountInfo.getAccountName().toString()!=null){
|
||||||
|
sb1.append("操作员:"+nowAccountInfo.getAccountName()+"\r\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(receiptPrinting.getBottomSet().contains("3")){
|
||||||
|
if(mtStore.getAddress().toString()!=null){
|
||||||
|
sb1.append("地址:"+mtStore.getAddress()+"\r\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(receiptPrinting.getBottomSet().contains("4")){
|
||||||
|
if(receiptPrinting.getRemarks().toString()!=null){
|
||||||
|
sb1.append("备注:"+receiptPrinting.getRemarks()+"\r\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sb1.append("----------------------------\r\n");
|
||||||
|
if(receiptPrinting.getHeadfootSet().contains("3")){
|
||||||
|
sb1.append("<center>"+receiptPrinting.getFoot()+"</center>\r\n");
|
||||||
|
}
|
||||||
|
if(receiptPrinting.getCodeSet().equals("1")){
|
||||||
|
// sb1.append("<QR>"+receiptPrinting.getCodeContent()+"</QR>\r\n");
|
||||||
|
sb1.append("<QR>"+receiptPrinting.getCodeContent()+"</QR>\r\n");
|
||||||
|
}
|
||||||
|
sb1.append("----------------------------\r\n");
|
||||||
|
sb1.append("<center>谢谢惠顾,欢迎下次光临!</center>\r\n");
|
||||||
|
receiptPrinting.setPrintTemplateDown(sb1.toString());
|
||||||
|
receiptPrintingMapper.addReceiptPrinting(receiptPrinting);
|
||||||
|
//int insert = receiptPrintingMapper.insert(receiptPrinting);
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -109,4 +238,76 @@ public class ReceiptPrintingServiceImpl extends ServiceImpl<ReceiptPrintingMappe
|
|||||||
.map(Integer::parseInt)
|
.map(Integer::parseInt)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String setIice(String address,Integer storeId) {
|
||||||
|
List<PrintDeviceInfo> infoByStoreId = printDeviceInfoMapper.getInfoListByStoreId(storeId);
|
||||||
|
for(int i=0;i<infoByStoreId.size();i++){
|
||||||
|
Methods m=Methods.getInstance();
|
||||||
|
Object accessToken = RedisUtil.get("scancodemodel+" + storeId);
|
||||||
|
if (ObjectUtil.isNotEmpty(accessToken)) {
|
||||||
|
m.init(accessToken.toString());
|
||||||
|
} else {
|
||||||
|
String token = getToken(storeId);
|
||||||
|
if ("error".equals(token)) {
|
||||||
|
throw new RuntimeException("获取参数失败,无法打印");
|
||||||
|
}else {
|
||||||
|
m.init(token);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
m.init(infoByStoreId.get(i).getAppKey(), infoByStoreId.get(i).getAppSecret());
|
||||||
|
InetAddress inetAddress = null;
|
||||||
|
try {
|
||||||
|
inetAddress = InetAddress.getLocalHost();
|
||||||
|
} catch (UnknownHostException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
String ipAddress = inetAddress.getHostAddress();
|
||||||
|
System.out.println(ipAddress);
|
||||||
|
System.out.println("http://192.168.31.54:81/dev-api/static/uploadImages/20241021/1be3cfc573d043d6b6eb42eac97e05a5.jpg");
|
||||||
|
String url=m.setIcon(infoByStoreId.get(i).getMachineCode(), "https://www.baidu.com/img/flexible/logo/pc/result.png");
|
||||||
|
if (ObjectUtil.isNotEmpty(url)) {
|
||||||
|
// 使用 Fastjson 将 JSON 字符串解析为 JSONObject
|
||||||
|
JSONObject jsonObject = JSON.parseObject(url);
|
||||||
|
String error = jsonObject.getString("error");
|
||||||
|
if ("18".equals(error)) {
|
||||||
|
return "18";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "success";
|
||||||
|
}
|
||||||
|
public String getToken(Integer storeId) {
|
||||||
|
PrintDeviceInfo infoByStoreId = printDeviceInfoMapper.getInfoByStoreId(storeId);
|
||||||
|
if (ObjectUtil.isEmpty(infoByStoreId)){
|
||||||
|
return "error";
|
||||||
|
}
|
||||||
|
log.info("--yilianyunAccessTokeninit--");
|
||||||
|
|
||||||
|
RequestMethod.getInstance().init(infoByStoreId.getAppKey(),infoByStoreId.getAppSecret());
|
||||||
|
log.info("--yilianyunAccessTokeninit2--");
|
||||||
|
try {
|
||||||
|
// String resJson = RequestMethod.getInstance().scanCodeModel_msign("4004872261", "628023865417");
|
||||||
|
String resJson = RequestMethod.getInstance().scanCodeModel_msign(infoByStoreId.getMachineCode(), infoByStoreId.getMsign());
|
||||||
|
log.info("--yilianyunAccessToken--{}",resJson);
|
||||||
|
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(resJson);
|
||||||
|
String errorDescription = jsonObject.getString("error_description"); // success
|
||||||
|
log.info("--errorDescriptionToken--{}",errorDescription);
|
||||||
|
|
||||||
|
if ("success".equals(errorDescription)) {
|
||||||
|
JSONObject body = jsonObject.getJSONObject("body");
|
||||||
|
String accessToken = body.getString("access_token");
|
||||||
|
RedisUtil.set("scancodemodel+"+storeId,accessToken,60*60*24);
|
||||||
|
return accessToken;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
return "error";
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ReceiptPrinting queryReceiptPrintingOne(Integer storeId) {
|
||||||
|
return receiptPrintingMapper.queryReceiptPrintingOne(storeId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,4 +23,6 @@ public interface LJUserGradeMapper extends BaseMapper<LJUserGrade> {
|
|||||||
String selectByUserId(@Param("storeId") Integer storeId, @Param("userId") Integer userId);
|
String selectByUserId(@Param("storeId") Integer storeId, @Param("userId") Integer userId);
|
||||||
|
|
||||||
LJUserGrade selectAllByGradeId(String gradeId);
|
LJUserGrade selectAllByGradeId(String gradeId);
|
||||||
|
|
||||||
|
LJUserGrade getUserGradeByUserId(String gradeId);
|
||||||
}
|
}
|
||||||
|
@ -24,4 +24,5 @@ public interface UserBalanceMapper extends BaseMapper<UserBalance> {
|
|||||||
Map<String,Object> selectHoverBalance();
|
Map<String,Object> selectHoverBalance();
|
||||||
|
|
||||||
Map<String,Object> addNumberSum();
|
Map<String,Object> addNumberSum();
|
||||||
|
UserBalance getUserBalanceByUserId(String userId);
|
||||||
}
|
}
|
||||||
|
@ -20,4 +20,7 @@
|
|||||||
<select id="selectAllByGradeId" resultType="com.fuint.business.userManager.entity.LJUserGrade">
|
<select id="selectAllByGradeId" resultType="com.fuint.business.userManager.entity.LJUserGrade">
|
||||||
select * from mt_user_grade where id = #{gradeId}
|
select * from mt_user_grade where id = #{gradeId}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getUserGradeByUserId" resultType="com.fuint.business.userManager.entity.LJUserGrade">
|
||||||
|
select * from mt_user_grade where id = #{gradeId}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
@ -79,5 +79,11 @@
|
|||||||
count(*) sumnum
|
count(*) sumnum
|
||||||
from mt_user_balance mub
|
from mt_user_balance mub
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getUserBalanceByUserId" resultType="com.fuint.business.userManager.entity.UserBalance">
|
||||||
|
select
|
||||||
|
*
|
||||||
|
from mt_user_balance mub
|
||||||
|
where mt_user_id=#{userId}
|
||||||
|
order by create_time desc limit 1
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
@ -1,7 +1,7 @@
|
|||||||
# \u57FA\u672C\u914D\u7F6E
|
# \u57FA\u672C\u914D\u7F6E
|
||||||
server.port=8080
|
server.port=8080
|
||||||
env.profile=dev
|
env.profile=dev
|
||||||
env.properties.path=C:/Users/qq244432/Desktop/project/oil-station/fuintBackend/configure/
|
env.properties.path=D:/work/sw/fuintBackend/configure/
|
||||||
#env.properties.path=F:/work/oilSystem/fuintBackend/configure/
|
#env.properties.path=F:/work/oilSystem/fuintBackend/configure/
|
||||||
#env.properties.path=D:/oil/new-oil/oilSystem/fuintBackend/configure/
|
#env.properties.path=D:/oil/new-oil/oilSystem/fuintBackend/configure/
|
||||||
#env.properties.path=D:/code/bulidmap/oil-station/fuintBackend/configure
|
#env.properties.path=D:/code/bulidmap/oil-station/fuintBackend/configure
|
||||||
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店铺员工表 Mapper 接口
|
* 店铺员工表 Mapper 接口
|
||||||
@ -20,4 +21,5 @@ public interface MtStaffMapper extends BaseMapper<MtStaff> {
|
|||||||
|
|
||||||
MtStaff queryStaffByUserId(@Param("userId") Integer userId);
|
MtStaff queryStaffByUserId(@Param("userId") Integer userId);
|
||||||
MtStaff queryStaffById(@Param("id") Integer id);
|
MtStaff queryStaffById(@Param("id") Integer id);
|
||||||
|
List getStaffByStorId(@Param("id") Integer id);
|
||||||
}
|
}
|
||||||
|
@ -41,4 +41,6 @@ public interface MtUserMapper extends BaseMapper<MtUser> {
|
|||||||
Long getStoreUserCountByTime(@Param("storeId") Integer storeId, @Param("beginTime") Date beginTime, @Param("endTime") Date endTime);
|
Long getStoreUserCountByTime(@Param("storeId") Integer storeId, @Param("beginTime") Date beginTime, @Param("endTime") Date endTime);
|
||||||
|
|
||||||
List<MemberTopBean> getMemberConsumeTopList(@Param("merchantId") Integer merchantId, @Param("storeId") Integer storeId, @Param("startTime") Date startTime, @Param("endTime") Date endTime);
|
List<MemberTopBean> getMemberConsumeTopList(@Param("merchantId") Integer merchantId, @Param("storeId") Integer storeId, @Param("startTime") Date startTime, @Param("endTime") Date endTime);
|
||||||
|
|
||||||
|
MtUser selectByPhone(@Param("phone") String phone);
|
||||||
}
|
}
|
||||||
|
@ -16,4 +16,7 @@
|
|||||||
<select id="queryStaffById" resultType="com.fuint.repository.model.MtStaff">
|
<select id="queryStaffById" resultType="com.fuint.repository.model.MtStaff">
|
||||||
select * from mt_staff t where t.id = #{id}
|
select * from mt_staff t where t.id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getStaffByStorId" resultType="com.fuint.repository.model.TAccount">
|
||||||
|
select * from t_account t where t.store_id = #{id}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
@ -90,5 +90,7 @@
|
|||||||
select * from mt_user t where t.Id = #{id}
|
select * from mt_user t where t.Id = #{id}
|
||||||
limit 1
|
limit 1
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectByPhone" resultType="com.fuint.repository.model.MtUser">
|
||||||
|
select * from mt_user t where t.mobile = #{phone}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,48 +1,45 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
<div class="top_new">
|
<div class="top_new">
|
||||||
<el-form :model="from" ref="queryForm" size="small" style="width: 100%" :inline="true">
|
<el-form :model="queryParams" ref="queryForm" size="small" style="width: 100%" :inline="true" >
|
||||||
|
|
||||||
<el-form-item label="优惠券名称">
|
<el-form-item label="" prop="payUser">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="from.cardName"
|
v-model="queryParams.payUser"
|
||||||
placeholder="请选择优惠券名称"
|
placeholder="请选择优惠券名称"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="手机号">
|
<el-form-item label="" prop="payUser">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="from.mobile"
|
v-model="queryParams.payUser"
|
||||||
placeholder="请输入用户手机号"
|
placeholder="请输入用户手机号"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="核销日期">
|
<el-form-item label="">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="from.startTime"
|
v-model="beginTime"
|
||||||
style="width: 160px"
|
style="width: 160px"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="开始日期"
|
placeholder="交易开始日期">
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
>
|
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
至
|
至
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="from.endTime"
|
v-model="endTime"
|
||||||
style="width: 160px"
|
style="width: 160px"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="结束日期"
|
placeholder="交易结束日期">
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
>
|
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item >
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="height: 32px;width: 20%;display: flex;justify-content: flex-end">
|
<div style="height: 32px;width: 20%;display: flex;justify-content: flex-end">
|
||||||
<el-button type="primary" icon="el-icon-search" @click="selectList">查询</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="">查询</el-button>
|
||||||
<el-button icon="el-icon-refresh" @click="">重置</el-button>
|
<el-button icon="el-icon-refresh" @click="">重置</el-button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -51,114 +48,73 @@
|
|||||||
<el-table
|
<el-table
|
||||||
:data="list"
|
:data="list"
|
||||||
border
|
border
|
||||||
style="width: 100%"
|
style="width: 100%">
|
||||||
>
|
|
||||||
<el-table-column type="index" width="50" align="center" label="序号"/>
|
<el-table-column type="index" width="50" align="center" label="序号"/>
|
||||||
<el-table-column label="优惠券名称" align="center" prop="cardName" width="220"/>
|
<el-table-column label="优惠券名称" align="center" prop="orderNo" width="220"/>
|
||||||
<el-table-column label="优惠券类型" align="center" prop="cardType"/>
|
<el-table-column label="优惠券类型" align="center" prop="terminal"/>
|
||||||
<el-table-column label="用户手机号" align="center" prop="mobile"/>
|
<el-table-column label="用户手机号" align="center" prop="terminal"/>
|
||||||
<el-table-column label="有效日期" align="center" prop="validity"/>
|
<el-table-column label="有效日期" align="center" prop="terminal"/>
|
||||||
<!-- <el-table-column label="可用时间" align="center" prop="terminal"/>-->
|
<el-table-column label="可用时间" align="center" prop="terminal"/>
|
||||||
<el-table-column label="兑换内容" align="center" prop="content"/>
|
<el-table-column label="兑换内容" align="center" prop="terminal"/>
|
||||||
<el-table-column label="适用会员等级" align="center" prop="memberLevel"/>
|
<el-table-column label="使用条件" align="center" prop="terminal"/>
|
||||||
<el-table-column label="核销人" align="center" prop="createBy"/>
|
<el-table-column label="核销人" align="center" prop="terminal"/>
|
||||||
<el-table-column label="核销时间" align="center" prop="createTime"/>
|
<el-table-column label="核销时间" align="center" prop="terminal"/>
|
||||||
<!-- <el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width">-->
|
<el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width">
|
||||||
<!-- <template slot-scope="scope">-->
|
<template slot-scope="scope">
|
||||||
<!-- <el-button style="color: #fe8c4a" @click="patchwork(scope.row)"-->
|
<el-button style="color: #fe8c4a"
|
||||||
<!-- type="text"-->
|
@click="patchwork(scope.row)"
|
||||||
<!-- >补打-->
|
type="text" >补打
|
||||||
<!-- </el-button>-->
|
</el-button>
|
||||||
<!-- <el-button style="color: #fe8c4a"-->
|
<el-button style="color: #fe8c4a"
|
||||||
<!-- v-if="scope.row.status === 'paid'"-->
|
v-if="scope.row.status === 'paid'"
|
||||||
<!-- @click="refHandleRefund(scope.row.id)"-->
|
@click="refHandleRefund(scope.row.id)"
|
||||||
<!-- type="text"-->
|
type="text">退款
|
||||||
<!-- >退款-->
|
</el-button>
|
||||||
<!-- </el-button>-->
|
</template>
|
||||||
<!-- </template>-->
|
</el-table-column>
|
||||||
<!-- </el-table-column>-->
|
|
||||||
|
|
||||||
</el-table>
|
</el-table>
|
||||||
<div class="pagination-box">
|
<div class="pagination-box">
|
||||||
<el-pagination
|
<el-pagination
|
||||||
background
|
background
|
||||||
layout="sizes, prev, pager, next"
|
layout="prev, pager, next"
|
||||||
v-show="total > 0"
|
v-show="total>0"
|
||||||
:total="total"
|
:total="total"
|
||||||
v-model:currentPage="queryParams.pageNo"
|
:page.sync="queryParams.page"
|
||||||
v-model:pageSize="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
@size-change="handleSizeChange"
|
@current-change="getList">
|
||||||
@current-change="pageList"
|
</el-pagination>
|
||||||
></el-pagination>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getList } from '@/api/online'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'order_Goods',
|
name: "order_Goods",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
list: [],
|
list:[],
|
||||||
beginTime: '',
|
beginTime:'',
|
||||||
endTime: '',
|
endTime:'',
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNo: 1,
|
page: 1,
|
||||||
pageSize: 10
|
pageSize: 10,
|
||||||
},
|
},
|
||||||
from: {},
|
total:0
|
||||||
total: 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
created() {
|
methods:{
|
||||||
this.selectList()
|
getList(){
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
// 分页
|
|
||||||
pageList(pageNo){
|
|
||||||
this.queryParams.pageNo = pageNo || this.queryParams.pageNo
|
|
||||||
getList(this.from, this.queryParams).then(
|
|
||||||
res => {
|
|
||||||
this.list = res.data.records
|
|
||||||
this.total = res.data.total
|
|
||||||
}
|
|
||||||
)
|
|
||||||
},
|
|
||||||
//分页切换 v-model 的更新是在事件触发之后进行的,而 @current-change 事件的处理函数 selectList 会在 v-model 更新之前执行
|
|
||||||
selectList() {
|
|
||||||
this.queryParams.pageNo = 1
|
|
||||||
getList(this.from, this.queryParams).then(
|
|
||||||
res => {
|
|
||||||
this.list = res.data.records
|
|
||||||
this.total = res.data.total
|
|
||||||
}
|
|
||||||
)
|
|
||||||
},
|
|
||||||
//条数变动
|
|
||||||
handleSizeChange(size) {
|
|
||||||
this.queryParams.pageSize = size
|
|
||||||
this.selectList()
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
.top_new{
|
||||||
.pagination-box {
|
|
||||||
width: 100%;
|
|
||||||
margin: 10px auto;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top_new {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
@ -171,7 +127,6 @@ export default {
|
|||||||
padding: 15px;
|
padding: 15px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-box {
|
.table-box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 66vh;
|
height: 66vh;
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -199,7 +199,9 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button style="color: #fe8c4a" @click="patchwork(scope.row)"
|
<el-button style="color: #fe8c4a"
|
||||||
|
v-if="scope.row.status === 'paid'"
|
||||||
|
@click="patchwork(scope.row)"
|
||||||
type="text" >补打
|
type="text" >补打
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button style="color: #fe8c4a"
|
<el-button style="color: #fe8c4a"
|
||||||
@ -538,7 +540,11 @@ export default {
|
|||||||
// 打印商品支付后的订单
|
// 打印商品支付后的订单
|
||||||
oilOrderReport() {
|
oilOrderReport() {
|
||||||
let oilOrderR = []
|
let oilOrderR = []
|
||||||
|
let o1 = {
|
||||||
|
payUser:this.goods.payUser,
|
||||||
|
orderNo:this.goods.orderNo
|
||||||
|
}
|
||||||
|
oilOrderR.push(o1)
|
||||||
let goodsOrderR = []
|
let goodsOrderR = []
|
||||||
if (this.goodsList) {
|
if (this.goodsList) {
|
||||||
this.goodsList.forEach(order => {
|
this.goodsList.forEach(order => {
|
||||||
@ -546,13 +552,12 @@ export default {
|
|||||||
oilName: order.name,
|
oilName: order.name,
|
||||||
unit: order.num + "" + order.unit,
|
unit: order.num + "" + order.unit,
|
||||||
// amount : order.memberPrice.toString()
|
// amount : order.memberPrice.toString()
|
||||||
amount: order.retailPrice.toString()
|
amount: order.retailPrice.toString(),
|
||||||
}
|
}
|
||||||
goodsOrderR.push(o)
|
goodsOrderR.push(o)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
console.log("333333333333333333333333")
|
||||||
|
|
||||||
// 支付方式
|
// 支付方式
|
||||||
const payTypeMap = {
|
const payTypeMap = {
|
||||||
'CASH': '现金',
|
'CASH': '现金',
|
||||||
|
@ -245,7 +245,10 @@
|
|||||||
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" >
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button style="color: #fe8c4a" @click="patchwork(scope.row)" type="text">补打
|
<el-button style="color: #fe8c4a"
|
||||||
|
@click="patchwork(scope.row)"
|
||||||
|
v-if="scope.row.orderStatus === 'paid'"
|
||||||
|
type="text">补打
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- @click="handleRefund(scope.row.id)" -->
|
<!-- @click="handleRefund(scope.row.id)" -->
|
||||||
|
|
||||||
@ -576,7 +579,9 @@ export default {
|
|||||||
let oilOrderR = []
|
let oilOrderR = []
|
||||||
let o = {
|
let o = {
|
||||||
oilName: this.getName(this.oilNameList, this.oilOrder.oils) + "-" + this.getName1(this.oilGunList, this.oilOrder.oilGunNum),
|
oilName: this.getName(this.oilNameList, this.oilOrder.oils) + "-" + this.getName1(this.oilGunList, this.oilOrder.oilGunNum),
|
||||||
amount: this.oilOrder.orderAmount.toString()
|
amount: this.oilOrder.orderAmount.toString(),
|
||||||
|
payUser:this.oilOrder.payUser.toString(),
|
||||||
|
orderNo:this.oilOrder.orderNo.toString()
|
||||||
}
|
}
|
||||||
oilOrderR.push(o)
|
oilOrderR.push(o)
|
||||||
|
|
||||||
|
@ -188,7 +188,7 @@
|
|||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<!-- <el-button size="mini" type="text" icon="el-icon-edit">更多操作</el-button>-->
|
<!-- <el-button size="mini" type="text" icon="el-icon-edit">更多操作</el-button>-->
|
||||||
<div style="width: 60px;color: #ff8c4b;margin: 0 auto"
|
<div class="makeupticket" style="width: 60px;color: #ff8c4b;margin: 0 auto"
|
||||||
@click="patchwork(scope.row)"
|
@click="patchwork(scope.row)"
|
||||||
type="primary" plain round>补打
|
type="primary" plain round>补打
|
||||||
</div>
|
</div>
|
||||||
@ -485,8 +485,14 @@ export default {
|
|||||||
};
|
};
|
||||||
let payTypeText = payTypeMap[this.oilOrder.paymentType]
|
let payTypeText = payTypeMap[this.oilOrder.paymentType]
|
||||||
// let actualPay = this.cardValueForm.paymentType == 'CASH' ? this.authCode:this.realyPayBills
|
// let actualPay = this.cardValueForm.paymentType == 'CASH' ? this.authCode:this.realyPayBills
|
||||||
|
let oilOrderR = []
|
||||||
|
let o = {
|
||||||
|
payUser:this.oilOrder.mobile,
|
||||||
|
orderNo:this.oilOrder.paymentNo
|
||||||
|
}
|
||||||
|
oilOrderR.push(o)
|
||||||
let a = {
|
let a = {
|
||||||
|
oilOrder:oilOrderR,
|
||||||
// 充值金额
|
// 充值金额
|
||||||
realyPayBills: this.oilOrder.amount ? this.oilOrder.amount : this.oilOrder.rechargeBalance,
|
realyPayBills: this.oilOrder.amount ? this.oilOrder.amount : this.oilOrder.rechargeBalance,
|
||||||
//赠送金额
|
//赠送金额
|
||||||
@ -740,4 +746,7 @@ export default {
|
|||||||
.el-form--inline .el-form-item {
|
.el-form--inline .el-form-item {
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
}
|
}
|
||||||
|
.makeupticket{
|
||||||
|
cursor:pointer;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user