no message

This commit is contained in:
DESKTOP-369JRHT\12997 2024-05-24 17:50:55 +08:00
parent 0a47825124
commit 3453f37647
9 changed files with 231 additions and 43 deletions

View File

@ -196,6 +196,11 @@ public class AllOrderInfoController extends BaseController {
@GetMapping("getIndexData4Pos") @GetMapping("getIndexData4Pos")
public ResponseObject getIndexData4Pos(){ public ResponseObject getIndexData4Pos(){
AllOrderInfoVo indexData4Pos = allOrderInfoService.getIndexData4Pos();
return getSuccessResult(allOrderInfoService.getIndexData4Pos()); return getSuccessResult(allOrderInfoService.getIndexData4Pos());
} }
@GetMapping("getOperatingDataPos")
public ResponseObject getOperatingDataPos(AllOrderInfoDto allOrderInfo){
return getSuccessResult(allOrderInfoService.getOperatingDataPos(allOrderInfo));
}
} }

View File

@ -299,17 +299,23 @@
</select> </select>
<select id="getTradingData" resultType="com.fuint.business.order.vo.AllOrderInfoVo"> <select id="getTradingData" resultType="com.fuint.business.order.vo.AllOrderInfoVo">
select select
SUM(CASE WHEN pay_type = 'CASH' THEN pay_money ELSE 0 END) AS CASH, 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 = '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 = 'ALIPAY' THEN pay_money ELSE 0 END) AS ALIPAY,
SUM(CASE WHEN pay_type = 'balance' THEN pay_money ELSE 0 END) AS balance, 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 = 'CASH' THEN 0 END) AS CASHCount,
COUNT(CASE WHEN pay_type = 'WECHAT' THEN 0 END) AS WECHATCount, 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 = 'ALIPAY' THEN 0 END) AS ALIPAYCount,
COUNT(CASE WHEN pay_type = 'balance' THEN 0 END) AS balanceCount, 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, 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 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 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>
@ -346,12 +352,15 @@
</select> </select>
<select id="getIndexData4Pos" resultType="com.fuint.business.order.vo.AllOrderInfoVo"> <select id="getIndexData4Pos" resultType="com.fuint.business.order.vo.AllOrderInfoVo">
SELECT SELECT
SUM(pay_money) AS total_pay_money, SUM(pay_money) AS totalPayMoney,
COUNT(*) AS total_count, COUNT(*) AS totalCount,
SUM(CASE WHEN status = 'refund' THEN pay_money ELSE 0 END) AS total_refund 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 FROM
all_order_info all_order_info
WHERE
DATE(pay_time) = CURDATE();
</select> </select>
<!-- WHERE-->
<!-- DATE(pay_time) = CURDATE();-->
</mapper> </mapper>

View File

@ -88,6 +88,7 @@ public interface AllOrderInfoService {
IPage<SysDeptVo> runningWaterByTissue(Page page, AllOrderInfoDto allOrderInfo); IPage<SysDeptVo> runningWaterByTissue(Page page, AllOrderInfoDto allOrderInfo);
AllOrderInfoVo getIndexData4Pos(); AllOrderInfoVo getIndexData4Pos();
AllOrderInfoVo getOperatingDataPos(AllOrderInfoDto allOrderInfo);
} }

View File

@ -514,6 +514,7 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
@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);
@ -899,13 +900,19 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
@Override
public AllOrderInfoVo getIndexData4Pos(){ 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(){ public AllOrderInfoVo getOperatingDataPos(AllOrderInfoDto allOrderInfo){
return allOrderInfoMapper.getIndexData4Pos(new AllOrderInfoDto()); AllOrderInfoVo tradingData = allOrderInfoMapper.getTradingData(allOrderInfo);
return allOrderInfoMapper.getTradingData(allOrderInfo);
} }

View File

@ -37,6 +37,19 @@ public class AllOrderInfoVo extends AllOrderInfo {
private String refBalance; private String refBalance;
private String refBalanceCount; 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;
} }

View File

@ -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--> <!-- 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> <groupId>yly_sdk</groupId>
<artifactId>yly_sdk</artifactId> <artifactId>yly_sdk</artifactId>
<version>2.2</version> <version>2.2</version>
</dependency>--> </dependency>
</dependencies> </dependencies>

View File

@ -6,12 +6,12 @@
<view class="title_top">京博加油站</view> <view class="title_top">京博加油站</view>
<view class="title_centen"> <view class="title_centen">
<view class="sm-size">今日营业额()</view> <view class="sm-size">今日营业额()</view>
<view class="big-size">30000000.00</view> <view class="big-size">{{indexData.totalPayMoney}}</view>
</view> </view>
<!-- 123--> <!-- 123-->
<view class="ds-ab"> <view class="ds-ab">
<view class="sm-size">收款笔数 0</view> <view class="sm-size">收款笔数 {{indexData.totalCount}}</view>
<view class="sm-size">退款笔数 0</view> <view class="sm-size">退款笔数 {{indexData.totalRefund}}</view>
</view> </view>
<view class="jg-box"> <view class="jg-box">
<view class="s-box" @click="goCollection()"> <view class="s-box" @click="goCollection()">
@ -72,6 +72,8 @@
</template> </template>
<script> <script>
import request from "../../utils/request";
import headers from '../../components/header/headers.vue' import headers from '../../components/header/headers.vue'
import tabbar from '../../components/tabbar/tabbar.vue' import tabbar from '../../components/tabbar/tabbar.vue'
export default { export default {
@ -82,11 +84,17 @@
List: [], List: [],
show: false, show: false,
status: 'loading', status: 'loading',
indexData: {
totalPayMoney: '0',
totalCount: '0',
totalRefund: '0',
}
} }
}, },
onShow() { onShow() {
// this.actList = ["1", "1", "1", "1", "1", ] // this.actList = ["1", "1", "1", "1", "1", ]
// this.status = "nomore" // this.status = "nomore"
this.getIndexData();
}, },
onPullDownRefresh() { onPullDownRefresh() {
console.log("刷新"); console.log("刷新");
@ -125,6 +133,24 @@
}, },
goback() { goback() {
uni.navigateBack() 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"
})
}
})
} }
} }
} }

View File

@ -7,52 +7,62 @@
<view class="h-box"> <view class="h-box">
<view class="">会员姓名</view> <view class="">会员姓名</view>
<view class="r-input"> <view class="r-input">
<input type="text" placeholder="请输入" /> <input type="text" v-model="dataForm.name" placeholder="请输入" />
</view> </view>
</view> </view>
<view class="h-box"> <view class="h-box">
<view class="">手机号码</view> <view class="">手机号码</view>
<view class="r-input"> <view class="r-input">
<input type="text" placeholder="请输入" /> <input type="text" v-model="dataForm.mobile" placeholder="请输入" />
</view> </view>
</view> </view>
<view class="h-box"> <!-- <view class="h-box">
<view class="">支付密码</view> <view class="">支付密码</view>
<view class="r-input"> <view class="r-input">
<input type="text" placeholder="请输入" /> <input type="text" placeholder="请输入" />
</view> </view>
</view> </view> -->
<view class="h-box"> <view class="h-box">
<view class="">性别</view> <view class="">性别</view>
<view class="d-s"> <view class="d-s" @click="showXingbie = true">
<view class="">请选择</view> <view class="">{{sex}}</view>
<u-icon name="arrow-right" color="#2979ff" size="18"></u-icon> <u-icon name="arrow-right" color="#2979ff" size="18"></u-icon>
</view> </view>
</view> </view>
<view class="h-box"> <view class="h-box">
<view class="">生日</view> <view class="">生日</view>
<view class="d-s"> <view class="d-s" @click="showTime= true">
<view class="">请选择</view> <view class="">{{dataForm.birthday?dataForm.birthday:"请选择"}}</view>
<u-icon name="arrow-right" color="#2979ff" size="18"></u-icon> <u-icon name="arrow-right" color="#2979ff" size="18"></u-icon>
</view> </view>
</view> </view>
<view class="h-box"> <view class="h-box">
<view class="">会员等级</view> <view class="">会员等级</view>
<view class="d-s"> <view class="d-s" @click="showGrade = true">
<view class="">请选择</view> <view class="">{{gradeName}}</view>
<u-icon name="arrow-right" color="#2979ff" size="18"></u-icon> <u-icon name="arrow-right" color="#2979ff" size="18"></u-icon>
</view> </view>
</view> </view>
<view class="h-box"> <view class="h-box">
<view class="">备注</view> <view class="">备注</view>
<view class="r-input"> <view class="r-input">
<input type="text" placeholder="请输入" /> <input type="text" v-model="dataForm.description" placeholder="请输入" />
</view> </view>
</view> </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="p-bottom">
<view class="anniu" @click="goback()"> <view class="anniu" @click="goback()">
@ -64,17 +74,55 @@
</template> </template>
<script> <script>
import request from "../../utils/request";
import headers from '../../components/header/headers.vue' import headers from '../../components/header/headers.vue'
export default { export default {
data() { data() {
return { return {
titles: "新增会员", 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() { onShow() {
this.getGradeList()
}, },
onPullDownRefresh() { onPullDownRefresh() {
console.log("刷新"); console.log("刷新");
@ -90,8 +138,65 @@
headers headers
}, },
methods: { 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() { 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"
})
}
})
} }
} }
} }

View File

@ -9,21 +9,21 @@
</view> </view>
<view class="hm-box"> <view class="hm-box">
<view class="hm-top">营业收入</view> <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="b-bs">
<view class=""> <view class="">
<view class="hui-">营业额/笔数</view> <view class="hui-">营业额/笔数</view>
<view class="lan-">0.00/0</view> <view class="lan-">{{dataForm.sumBalance}}/{{dataForm.countBalance}}</view>
</view> </view>
<view class=""> <view class="">
<view class="hui-">会员充值/笔数</view> <view class="hui-">会员充值/笔数</view>
<view class="lan-">0.00/0</view> <view class="lan-">{{dataForm.userBalance}}/{{dataForm.userBalanceCount}}</view>
</view> </view>
</view> </view>
<view class="b-bs"> <view class="b-bs">
<view class=""> <view class="">
<view class="hui-">退款金额/笔数</view> <view class="hui-">退款金额/笔数</view>
<view class="lan-">0.00/0</view> <view class="lan-">{{dataForm.refBalance}}/{{dataForm.refBalanceCount}}</view>
</view> </view>
</view> </view>
@ -39,7 +39,7 @@
<view class="h-b-box"> <view class="h-b-box">
<view class=""> <view class="">
<view class="hui-">营业额/笔数</view> <view class="hui-">营业额/笔数</view>
<view class="lan-">0.00/0</view> <view class="lan-">{{dataForm.cash}}/{{dataForm.cashcount}}</view>
</view> </view>
<view class=""> <view class="">
<view class="hui-">会员充值/笔数</view> <view class="hui-">会员充值/笔数</view>
@ -87,18 +87,23 @@
</template> </template>
<script> <script>
import request from "../../utils/request";
import headers from '../../components/header/headers.vue' import headers from '../../components/header/headers.vue'
export default { export default {
data() { data() {
return { return {
titles: "经营数据", titles: "经营数据",
dataForm: {
}
} }
}, },
onShow() { onShow() {
// this.actList = ["1", "1", "1", "1", "1", ] // this.actList = ["1", "1", "1", "1", "1", ]
// this.status = "nomore" // this.status = "nomore"
this.getIndexData()
}, },
onPullDownRefresh() { onPullDownRefresh() {
console.log("刷新"); console.log("刷新");
@ -116,6 +121,23 @@
methods: { methods: {
goback() { goback() {
uni.navigateBack() 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"
})
}
})
} }
} }
} }