This commit is contained in:
cun-nan 2024-10-23 17:12:34 +08:00
parent 5dec74f184
commit 953c53696c
3 changed files with 82 additions and 37 deletions

View File

@ -150,21 +150,26 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="接收用户" :required="true"> <el-form-item label="接收用户" :required="true">
<div <!-- 原样式-->
style="border: 1px solid #DCDFE6;width: 100%;height: 100px; border-radius: 4px; flex-wrap: wrap;overflow-y: scroll;"> <!-- <div style="border: 1px solid #DCDFE6;width: 100%;height: 100px; border-radius: 4px; flex-wrap: wrap;overflow-y: scroll;">-->
<div style="display: flex;margin: 10px;"> <!-- <div style="display: flex;margin: 10px;">-->
<div @click="clickAdd" style="height: 32px;display: flex; <!-- <div @click="clickAdd" style="height: 32px;display: flex;-->
justify-content: center; /* 水平居中 */ <!-- justify-content: center; /* 水平居中 */-->
align-items: center; /* 垂直居中 */ "> <!-- align-items: center; /* 垂直居中 */ ">-->
<img src="../page/img/icon-adduser@3x.png"> <!-- <img src="../page/img/icon-adduser@3x.png">-->
</div> <!-- </div>-->
<div v-for="item in form.recipientUser" :key="item.id"> <!-- <div v-for="item in form.recipientUser" :key="item.id">-->
<el-badge value="x" class="item" style="margin-left: 10px"> <!-- <el-badge value="x" class="item" style="margin-left: 10px">-->
<el-button @click="clickUser(item.id)" size="mini">{{ item.userName }}</el-button> <!-- <el-button @click="clickUser(item.id)" size="mini">{{ item.userName }}</el-button>-->
</el-badge> <!-- </el-badge>-->
</div> <!-- </div>-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<!-- 新样式-->
<el-select v-model="form.recipientUser" multiple placeholder="请选择接收用户"
style="width: 100%;">
<el-option v-for="item in linshicunshu" :label="item.userName" :value="item.id"></el-option>
</el-select>
</el-form-item> </el-form-item>
<!-- 模板状态 --> <!-- 模板状态 -->
@ -327,13 +332,16 @@ export default {
let ids = this.form.recipientRoles.join(',') let ids = this.form.recipientRoles.join(',')
getByRoleIdApi({roleIds: ids}).then(res => { getByRoleIdApi({roleIds: ids}).then(res => {
const getUsertList = res.data; const getUsertList = res.data;
console.log(getUsertList,335)
// recipientUser // recipientUser
// this.form.recipientUser = [] // this.form.recipientUser = []
getUsertList.forEach(item => { getUsertList.forEach(item => {
this.form.recipientUser.push({ this.form.recipientUser.push(item.acctId)
id: item.acctId, // this.form.recipientUser.push({
userName: item.accountName, // id: item.acctId,
}) // staffId:item.staffId,
// userName: item.realName,
// })
this.getroleStaff.push({ this.getroleStaff.push({
id: item.acctId, id: item.acctId,
userName: item.accountName, userName: item.accountName,
@ -371,7 +379,7 @@ export default {
page: 1, page: 1,
pageSize: 10, pageSize: 10,
deviceName: '', deviceName: '',
}, }
this.getList() this.getList()
}, },
handleAdd(e) { handleAdd(e) {
@ -380,6 +388,7 @@ export default {
this.getDutyList() this.getDutyList()
this.title = "新增通知" this.title = "新增通知"
this.onlyGetUser()
}, },
userEnter1() { userEnter1() {
// //
@ -417,7 +426,7 @@ export default {
// this.form.recipientUser = JSON.parse(this.form.recipientUser) // this.form.recipientUser = JSON.parse(this.form.recipientUser)
// this.form.recipientRoles = JSON.parse(this.form.recipientRoles) // this.form.recipientRoles = JSON.parse(this.form.recipientRoles)
// this.getDutyList() // this.getDutyList()
this.onlyGetUser()
getSysNotifyInfo(e.id).then(res => { getSysNotifyInfo(e.id).then(res => {
this.open = true; this.open = true;
this.title = "编辑通知" this.title = "编辑通知"
@ -494,8 +503,18 @@ export default {
// this.loading = true; // this.loading = true;
// console.log(this.queryParams,222) // console.log(this.queryParams,222)
// this.addDateRange(this.queryParams, this.dateRange) // this.addDateRange(this.queryParams, this.dateRange)
this.linshicunshu = []
listUser1(this.queryParamsUser).then(response => { listUser1(this.queryParamsUser).then(response => {
this.userList = response.data.records; this.userList = response.data.records
console.log(this.userList,507)
this.userList.forEach(item => {
this.linshicunshu.push({
id: item.acctId,
staffId: item.staffId,
userName: item.realName ? item.realName : '--'
})
})
// this.total = response.data.total; // this.total = response.data.total;
// this.total = response.data.total; // this.total = response.data.total;
// this.loading = false; // this.loading = false;

View File

@ -37,9 +37,8 @@
@click="goList()">更多 <i class="el-icon-arrow-right"></i></div> @click="goList()">更多 <i class="el-icon-arrow-right"></i></div>
</div> </div>
<!-- <div class="hang_" v-for="(item,index) in 4" :key="index" >到期提醒百业兴智慧油站系统将于2024年07月10日到期...</div>--> <!-- <div class="hang_" v-for="(item,index) in 4" :key="index" >到期提醒百业兴智慧油站系统将于2024年07月10日到期...</div>-->
<div class="hang_" v-for="(item,index) in noticeList" :key="index">{{ <div class="hang_" v-for="(item,index) in noticeList" :key="index">
item.notificationType {{item.notificationType}}{{ item.templateContent }}
}}{{ item.templateContent }}
</div> </div>
<div class="hang_" v-if="this.noticeList.length==0">暂无通知</div> <div class="hang_" v-if="this.noticeList.length==0">暂无通知</div>
</div> </div>
@ -706,7 +705,8 @@ export default {
getStoreAmount() { getStoreAmount() {
getDataBoard(this.addDateRange(this.queryParams, this.value1)).then(res => { getDataBoard(this.addDateRange(this.queryParams, this.value1)).then(res => {
this.storeAmount = res.data this.storeAmount = res.data
// this.initChart() this.getDataAnalysis()
this.initChart()
}) })
}, },
countPercentage(upNum, downNum) { countPercentage(upNum, downNum) {

View File

@ -1647,7 +1647,7 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
Integer noOilNum = 0; Integer noOilNum = 0;
AllOrderInfo allOrderInfo = new AllOrderInfo(); AllOrderInfo allOrderInfo = new AllOrderInfo();
allOrderInfo.setType("1"); allOrderInfo.setType("6");
Map<String, Object> sumAndNum = getSumAndNum(allOrderInfo, map); Map<String, Object> sumAndNum = getSumAndNum(allOrderInfo, map);
oilAmount = Double.valueOf(sumAndNum.get("payMoney").toString()); oilAmount = Double.valueOf(sumAndNum.get("payMoney").toString());
oilNum = Integer.valueOf(sumAndNum.get("allNum").toString()); oilNum = Integer.valueOf(sumAndNum.get("allNum").toString());
@ -1764,7 +1764,10 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
oilList.add(oilOrder); oilList.add(oilOrder);
} }
} }
double averageValue = (Double.parseDouble(String.valueOf(oilList.size())) / oilOrders.size()) * 100; double averageValue = 0.0;
if (oilOrders.size() > 0) {
averageValue = (Double.parseDouble(String.valueOf(oilList.size())) / oilOrders.size()) * 100;
}
String formattedResult = getFormattedResult(averageValue); String formattedResult = getFormattedResult(averageValue);
homeDataAnalysisVo.setValue(Double.parseDouble(formattedResult)); homeDataAnalysisVo.setValue(Double.parseDouble(formattedResult));
list.add(homeDataAnalysisVo); list.add(homeDataAnalysisVo);
@ -1789,13 +1792,19 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
for (AllOrderInfo allOrderInfo : allOrderInfos) { for (AllOrderInfo allOrderInfo : allOrderInfos) {
if ("1".equals(allOrderInfo.getType())) { if ("1".equals(allOrderInfo.getType())) {
oilAllOrderInfos += 1; oilAllOrderInfos += 1;
} else if ("2".equals(allOrderInfo.getType()) || "3".equals(allOrderInfo.getType()) || "4".equals(allOrderInfo.getType()) || "5".equals(allOrderInfo.getType())) { } else if ("2".equals(allOrderInfo.getType()) || "3".equals(allOrderInfo.getType()) || "4".equals(allOrderInfo.getType()) || "5".equals(allOrderInfo.getType()) || "6".equals(allOrderInfo.getType())) {
productionAllOrderInfos += 1; productionAllOrderInfos += 1;
} }
} }
Double i = ((double) oilAllOrderInfos / (oilAllOrderInfos + productionAllOrderInfos)) * 100; Double i = 0.0;
if ((oilAllOrderInfos + productionAllOrderInfos) > 0) {
i = ((double) oilAllOrderInfos / (oilAllOrderInfos + productionAllOrderInfos)) * 100;
}
Double shareOfOilTransactions = Double.valueOf((getFormattedResult(i))); Double shareOfOilTransactions = Double.valueOf((getFormattedResult(i)));
Double shareOfNonOilTransactions = Double.valueOf(getFormattedResult(((double) productionAllOrderInfos / (oilAllOrderInfos + productionAllOrderInfos)) * 100)); Double shareOfNonOilTransactions = 0.0;
if ((oilAllOrderInfos + productionAllOrderInfos) > 0) {
shareOfNonOilTransactions = Double.valueOf(getFormattedResult(((double) productionAllOrderInfos / (oilAllOrderInfos + productionAllOrderInfos)) * 100));
}
HomeDataAnalysisVo oilhomeDataAnalysisVo = new HomeDataAnalysisVo(); HomeDataAnalysisVo oilhomeDataAnalysisVo = new HomeDataAnalysisVo();
oilhomeDataAnalysisVo.setName("油品交易占比"); oilhomeDataAnalysisVo.setName("油品交易占比");
@ -1833,25 +1842,41 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
HomeDataAnalysisVo mtUserVo = new HomeDataAnalysisVo(); HomeDataAnalysisVo mtUserVo = new HomeDataAnalysisVo();
mtUserVo.setName("会员充值占比"); mtUserVo.setName("会员充值占比");
mtUserVo.setType(3); mtUserVo.setType(3);
mtUserVo.setValue(Double.parseDouble(getFormattedResult(((double) mtUser / sum) * 100))); double value = 0.0;
if (sum>0){
value = Double.parseDouble(getFormattedResult(((double) mtUser / sum) * 100));
}
mtUserVo.setValue(value);
list.add(mtUserVo); list.add(mtUserVo);
HomeDataAnalysisVo productVo = new HomeDataAnalysisVo(); HomeDataAnalysisVo productVo = new HomeDataAnalysisVo();
productVo.setName("商品交易占比"); productVo.setName("商品交易占比");
productVo.setType(3); productVo.setType(3);
productVo.setValue(Double.parseDouble(getFormattedResult(((double) product / sum) * 100))); double value1 = 0.0;
if (sum>0){
value1 = Double.parseDouble(getFormattedResult(((double) product / sum) * 100));
}
productVo.setValue(value1);
list.add(productVo); list.add(productVo);
HomeDataAnalysisVo oilRechargeVo = new HomeDataAnalysisVo(); HomeDataAnalysisVo oilRechargeVo = new HomeDataAnalysisVo();
oilRechargeVo.setName("油品交易占比"); oilRechargeVo.setName("油品交易占比");
oilRechargeVo.setType(3); oilRechargeVo.setType(3);
oilRechargeVo.setValue(Double.parseDouble(getFormattedResult(((double) oilRecharge / sum) * 100))); double value2 = 0.0;
if (sum>0){
value2 = Double.parseDouble(getFormattedResult(((double) oilRecharge / sum) * 100));
}
oilRechargeVo.setValue(value2);
list.add(oilRechargeVo); list.add(oilRechargeVo);
HomeDataAnalysisVo pointMallVo = new HomeDataAnalysisVo(); HomeDataAnalysisVo pointMallVo = new HomeDataAnalysisVo();
pointMallVo.setName("积分商城交易占比"); pointMallVo.setName("积分商城交易占比");
pointMallVo.setType(3); pointMallVo.setType(3);
pointMallVo.setValue(Double.parseDouble(getFormattedResult((double) pointMall / sum * 100))); double value3 = 0.0;
if (sum>0){
value3 = Double.parseDouble(getFormattedResult((double) pointMall / sum * 100));
}
pointMallVo.setValue(value3);
list.add(pointMallVo); list.add(pointMallVo);
return list; return list;
} }
@ -1984,6 +2009,7 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
return dateList; return dateList;
} }
public List<String> getAllDatesBetweenMonth(String startTime, String endTime) { public List<String> getAllDatesBetweenMonth(String startTime, String endTime) {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");