no message
This commit is contained in:
parent
0a47825124
commit
3453f37647
@ -196,6 +196,11 @@ public class AllOrderInfoController extends BaseController {
|
||||
|
||||
@GetMapping("getIndexData4Pos")
|
||||
public ResponseObject getIndexData4Pos(){
|
||||
AllOrderInfoVo indexData4Pos = allOrderInfoService.getIndexData4Pos();
|
||||
return getSuccessResult(allOrderInfoService.getIndexData4Pos());
|
||||
}
|
||||
@GetMapping("getOperatingDataPos")
|
||||
public ResponseObject getOperatingDataPos(AllOrderInfoDto allOrderInfo){
|
||||
return getSuccessResult(allOrderInfoService.getOperatingDataPos(allOrderInfo));
|
||||
}
|
||||
}
|
||||
|
@ -299,17 +299,23 @@
|
||||
</select>
|
||||
<select id="getTradingData" 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(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
|
||||
from all_order_info aoi
|
||||
left join mt_user mu ON aoi.user_id = mu.id
|
||||
<where>
|
||||
@ -346,12 +352,15 @@
|
||||
</select>
|
||||
<select id="getIndexData4Pos" resultType="com.fuint.business.order.vo.AllOrderInfoVo">
|
||||
SELECT
|
||||
SUM(pay_money) AS total_pay_money,
|
||||
COUNT(*) AS total_count,
|
||||
SUM(CASE WHEN status = 'refund' THEN pay_money ELSE 0 END) AS total_refund
|
||||
SUM(pay_money) AS totalPayMoney,
|
||||
COUNT(*) AS totalCount,
|
||||
COUNT(CASE WHEN status = 'refund' THEN 1 ELSE NULL END) AS totalRefund -- 计算退款订单的总数
|
||||
|
||||
-- SUM(CASE WHEN status = 'refund' THEN pay_money ELSE 0 END) AS totalRefund
|
||||
FROM
|
||||
all_order_info
|
||||
WHERE
|
||||
DATE(pay_time) = CURDATE();
|
||||
|
||||
</select>
|
||||
<!-- WHERE-->
|
||||
<!-- DATE(pay_time) = CURDATE();-->
|
||||
</mapper>
|
@ -88,6 +88,7 @@ public interface AllOrderInfoService {
|
||||
IPage<SysDeptVo> runningWaterByTissue(Page page, AllOrderInfoDto allOrderInfo);
|
||||
|
||||
AllOrderInfoVo getIndexData4Pos();
|
||||
AllOrderInfoVo getOperatingDataPos(AllOrderInfoDto allOrderInfo);
|
||||
|
||||
|
||||
}
|
||||
|
@ -514,6 +514,7 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void tradingExportExcel(HttpServletResponse response, AllOrderInfoDto order) {
|
||||
|
||||
IPage<AllOrderInfoVo> tradingPage = getTradingPage(new Page(1, 100000), order);
|
||||
@ -899,13 +900,19 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public AllOrderInfoVo getIndexData4Pos(){
|
||||
return allOrderInfoMapper.getIndexData4Pos(new AllOrderInfoDto());
|
||||
AllOrderInfoDto allOrderInfoDto = new AllOrderInfoDto();
|
||||
AllOrderInfoVo indexData4Pos = allOrderInfoMapper.getIndexData4Pos(allOrderInfoDto);
|
||||
return allOrderInfoMapper.getIndexData4Pos(allOrderInfoDto);
|
||||
}
|
||||
|
||||
@Override
|
||||
// 获取经营数据
|
||||
public AllOrderInfoVo getOperatingDataPos(){
|
||||
return allOrderInfoMapper.getIndexData4Pos(new AllOrderInfoDto());
|
||||
public AllOrderInfoVo getOperatingDataPos(AllOrderInfoDto allOrderInfo){
|
||||
AllOrderInfoVo tradingData = allOrderInfoMapper.getTradingData(allOrderInfo);
|
||||
return allOrderInfoMapper.getTradingData(allOrderInfo);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -37,6 +37,19 @@ public class AllOrderInfoVo extends AllOrderInfo {
|
||||
private String refBalance;
|
||||
private String refBalanceCount;
|
||||
|
||||
private String sumBalance;
|
||||
private String countBalance;
|
||||
private String userBalance;
|
||||
private String userBalanceCount;
|
||||
private String oilBalance;
|
||||
private String oilBalanceCount;
|
||||
|
||||
|
||||
private String totalPayMoney;
|
||||
private String totalCount;
|
||||
private String totalRefund;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -229,11 +229,11 @@
|
||||
|
||||
<!-- mvn install:install-file -DgroupId=yly_sdk -DartifactId=yly_sdk -Dversion=2.2 -Dpackaging=jar -Dfile=D:\workspaces\oilSystem\fuintBackend\lib\yly_sdk_2.2.jar-->
|
||||
|
||||
<!--<dependency>
|
||||
<dependency>
|
||||
<groupId>yly_sdk</groupId>
|
||||
<artifactId>yly_sdk</artifactId>
|
||||
<version>2.2</version>
|
||||
</dependency>-->
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
@ -6,12 +6,12 @@
|
||||
<view class="title_top">京博加油站</view>
|
||||
<view class="title_centen">
|
||||
<view class="sm-size">今日营业额(元)</view>
|
||||
<view class="big-size">30000000.00</view>
|
||||
<view class="big-size">{{indexData.totalPayMoney}}</view>
|
||||
</view>
|
||||
<!-- 123-->
|
||||
<!-- 123-->
|
||||
<view class="ds-ab">
|
||||
<view class="sm-size">收款笔数 0</view>
|
||||
<view class="sm-size">退款笔数 0</view>
|
||||
<view class="sm-size">收款笔数 {{indexData.totalCount}}</view>
|
||||
<view class="sm-size">退款笔数 {{indexData.totalRefund}}</view>
|
||||
</view>
|
||||
<view class="jg-box">
|
||||
<view class="s-box" @click="goCollection()">
|
||||
@ -72,6 +72,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import request from "../../utils/request";
|
||||
|
||||
import headers from '../../components/header/headers.vue'
|
||||
import tabbar from '../../components/tabbar/tabbar.vue'
|
||||
export default {
|
||||
@ -82,11 +84,17 @@
|
||||
List: [],
|
||||
show: false,
|
||||
status: 'loading',
|
||||
indexData: {
|
||||
totalPayMoney: '0',
|
||||
totalCount: '0',
|
||||
totalRefund: '0',
|
||||
}
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
// this.actList = ["1", "1", "1", "1", "1", ]
|
||||
// this.status = "nomore" 底部刷新结束
|
||||
this.getIndexData();
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
console.log("刷新");
|
||||
@ -125,6 +133,24 @@
|
||||
},
|
||||
goback() {
|
||||
uni.navigateBack()
|
||||
},
|
||||
|
||||
// 获取销售数据
|
||||
getIndexData() {
|
||||
request({
|
||||
url: 'business/allOrderInfo/getIndexData4Pos',
|
||||
method: 'get',
|
||||
params: this.form
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.indexData = res.data
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data,
|
||||
icon: "none"
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -253,4 +279,4 @@
|
||||
overflow: hidden;
|
||||
margin-left: 10px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
@ -7,52 +7,62 @@
|
||||
<view class="h-box">
|
||||
<view class="">会员姓名</view>
|
||||
<view class="r-input">
|
||||
<input type="text" placeholder="请输入" />
|
||||
<input type="text" v-model="dataForm.name" placeholder="请输入" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="h-box">
|
||||
<view class="">手机号码</view>
|
||||
<view class="r-input">
|
||||
<input type="text" placeholder="请输入" />
|
||||
<input type="text" v-model="dataForm.mobile" placeholder="请输入" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="h-box">
|
||||
<!-- <view class="h-box">
|
||||
<view class="">支付密码</view>
|
||||
<view class="r-input">
|
||||
<input type="text" placeholder="请输入" />
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="h-box">
|
||||
<view class="">性别</view>
|
||||
<view class="d-s">
|
||||
<view class="">请选择</view>
|
||||
<view class="d-s" @click="showXingbie = true">
|
||||
<view class="">{{sex}}</view>
|
||||
<u-icon name="arrow-right" color="#2979ff" size="18"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="h-box">
|
||||
<view class="">生日</view>
|
||||
<view class="d-s">
|
||||
<view class="">请选择</view>
|
||||
<view class="d-s" @click="showTime= true">
|
||||
<view class="">{{dataForm.birthday?dataForm.birthday:"请选择"}}</view>
|
||||
<u-icon name="arrow-right" color="#2979ff" size="18"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="h-box">
|
||||
<view class="">会员等级</view>
|
||||
<view class="d-s">
|
||||
<view class="">请选择</view>
|
||||
<view class="d-s" @click="showGrade = true">
|
||||
<view class="">{{gradeName}}</view>
|
||||
<u-icon name="arrow-right" color="#2979ff" size="18"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="h-box">
|
||||
<view class="">备注</view>
|
||||
<view class="r-input">
|
||||
<input type="text" placeholder="请输入" />
|
||||
<input type="text" v-model="dataForm.description" placeholder="请输入" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<u-picker :show="showXingbie" :columns="xingbieList" keyName="name" @cancel="showXingbie = false"
|
||||
@confirm="chooseXingbie"></u-picker>
|
||||
|
||||
<u-datetime-picker :show="showTime" v-model="dataForm.birthday" mode="date" @cancel="showTime = false"
|
||||
@confirm="chooseTime"></u-datetime-picker>
|
||||
|
||||
<u-picker :show="showGrade" :columns="gradeList" keyName="name" @cancel="showGrade = false"
|
||||
@confirm="chooseGrade"></u-picker>
|
||||
|
||||
|
||||
|
||||
<view class="p-bottom">
|
||||
<view class="anniu" @click="goback()">
|
||||
@ -64,17 +74,55 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import request from "../../utils/request";
|
||||
import headers from '../../components/header/headers.vue'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
titles: "新增会员",
|
||||
showGrade: false,
|
||||
showXingbie: false,
|
||||
showTime: false,
|
||||
gradeList: [],
|
||||
xingbieList: [
|
||||
[{
|
||||
id: 1,
|
||||
name: "男"
|
||||
}, {
|
||||
id: 0,
|
||||
name: "女"
|
||||
}]
|
||||
],
|
||||
form: {},
|
||||
value1: '',
|
||||
sex: '请选择',
|
||||
gradeName: '请选择',
|
||||
|
||||
dataForm: {
|
||||
address: "",
|
||||
birthday: "",
|
||||
cardBalance: 0,
|
||||
description: "",
|
||||
endTime: "",
|
||||
gradeId: "",
|
||||
id: "",
|
||||
idcard: "",
|
||||
literCard: "0",
|
||||
mobile: "",
|
||||
name: "",
|
||||
official: "",
|
||||
points: 0,
|
||||
refuelMoney: "0",
|
||||
sex: 1,
|
||||
startTime: "",
|
||||
status: "qy",
|
||||
userNo: ""
|
||||
}
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
|
||||
this.getGradeList()
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
console.log("刷新");
|
||||
@ -90,8 +138,65 @@
|
||||
headers
|
||||
},
|
||||
methods: {
|
||||
// 获取等级接口
|
||||
getGradeList() {
|
||||
request({
|
||||
url: 'business/userManager/userGrade/list',
|
||||
method: 'get',
|
||||
params: this.form
|
||||
}).then((res) => {
|
||||
if (res.data) {
|
||||
this.gradeList = []
|
||||
this.gradeList.push(res.data.records)
|
||||
console.log(res.data.records)
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data,
|
||||
icon: "none"
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
chooseGrade(e) {
|
||||
console.log(123123, e.value[0])
|
||||
const data = e.value[0]
|
||||
|
||||
this.showGrade = false
|
||||
this.dataForm.gradeId = data.id
|
||||
this.gradeName = data.name
|
||||
},
|
||||
|
||||
chooseXingbie(e) {
|
||||
console.log(123123, e.value[0])
|
||||
const data = e.value[0]
|
||||
this.showXingbie = false
|
||||
this.dataForm.sex = data.id
|
||||
this.sex = data.name
|
||||
},
|
||||
chooseTime(e) {
|
||||
console.log(123123, e)
|
||||
this.showTime = false
|
||||
},
|
||||
|
||||
goback() {
|
||||
uni.navigateBack()
|
||||
request({
|
||||
url: 'business/userManager/user',
|
||||
method: 'post',
|
||||
data: this.dataForm
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '添加成功!',
|
||||
icon: "none"
|
||||
})
|
||||
uni.navigateBack()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '添加失败,请重试',
|
||||
icon: "none"
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,21 +9,21 @@
|
||||
</view>
|
||||
<view class="hm-box">
|
||||
<view class="hm-top">营业收入</view>
|
||||
<view class="lan-title">¥0.00</view>
|
||||
<view class="lan-title">¥{{dataForm.sumBalance}}</view>
|
||||
<view class="b-bs">
|
||||
<view class="">
|
||||
<view class="hui-">营业额/笔数</view>
|
||||
<view class="lan-">¥0.00/0</view>
|
||||
<view class="lan-">¥{{dataForm.sumBalance}}/{{dataForm.countBalance}}</view>
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="hui-">会员充值/笔数</view>
|
||||
<view class="lan-">¥0.00/0</view>
|
||||
<view class="lan-">¥{{dataForm.userBalance}}/{{dataForm.userBalanceCount}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="b-bs">
|
||||
<view class="">
|
||||
<view class="hui-">退款金额/笔数</view>
|
||||
<view class="lan-">¥0.00/0</view>
|
||||
<view class="lan-">¥{{dataForm.refBalance}}/{{dataForm.refBalanceCount}}</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
@ -39,7 +39,7 @@
|
||||
<view class="h-b-box">
|
||||
<view class="">
|
||||
<view class="hui-">营业额/笔数</view>
|
||||
<view class="lan-">¥0.00/0</view>
|
||||
<view class="lan-">¥{{dataForm.cash}}/{{dataForm.cashcount}}</view>
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="hui-">会员充值/笔数</view>
|
||||
@ -87,18 +87,23 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import request from "../../utils/request";
|
||||
|
||||
import headers from '../../components/header/headers.vue'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
titles: "经营数据",
|
||||
dataForm: {
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
// this.actList = ["1", "1", "1", "1", "1", ]
|
||||
// this.status = "nomore" 底部刷新结束
|
||||
this.getIndexData()
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
console.log("刷新");
|
||||
@ -116,6 +121,23 @@
|
||||
methods: {
|
||||
goback() {
|
||||
uni.navigateBack()
|
||||
},
|
||||
// 获取销售数据
|
||||
getIndexData() {
|
||||
request({
|
||||
url: 'business/allOrderInfo/getOperatingDataPos',
|
||||
method: 'get',
|
||||
params: this.form
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.dataForm = res.data
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data,
|
||||
icon: "none"
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user