This commit is contained in:
Lemon
2023-06-27 10:57:49 +08:00
16 changed files with 73 additions and 35 deletions

View File

@@ -4,6 +4,7 @@ import com.google.common.collect.Lists;
import com.jsowell.common.util.StringUtils;
import com.jsowell.pile.domain.ykcCommond.*;
import com.jsowell.pile.dto.RemoteAccountBalanceUpdateDTO;
import com.jsowell.pile.dto.UpdateFirmwareDTO;
import com.jsowell.pile.service.YKCPushCommandService;
import com.jsowell.pile.domain.PileBillingRelation;
import com.jsowell.pile.domain.PileBillingTemplate;
@@ -185,12 +186,13 @@ public class PileRemoteService {
/**
* 远程更新
*
* @param pileSns 前台传的桩号集合
*/
public void updateFirmware(List<String> pileSns) {
public void updateFirmware(UpdateFirmwareDTO dto) {
//
UpdateFirmwareCommand command = UpdateFirmwareCommand.builder().pileSnList(pileSns).build();
UpdateFirmwareCommand command = UpdateFirmwareCommand.builder()
.pileSnList(dto.getPileSns())
.filePath(dto.getFilePath())
.build();
ykcPushCommandService.pushUpdateFileCommand(command);
}

View File

@@ -5,6 +5,7 @@ import com.jsowell.common.constant.Constants;
import com.jsowell.common.core.domain.AjaxResult;
import com.jsowell.pile.dto.GenerateOrderDTO;
import com.jsowell.pile.dto.QueryPileDTO;
import com.jsowell.pile.dto.UpdateFirmwareDTO;
import com.jsowell.service.OrderService;
import com.jsowell.service.PileRemoteService;
import org.apache.commons.collections4.CollectionUtils;
@@ -105,11 +106,11 @@ public class PileRemoteController {
* @return
*/
@PostMapping("/updateFirmware")
public AjaxResult updateFirmware(@RequestBody QueryPileDTO queryPileDTO) {
if (CollectionUtils.isEmpty(queryPileDTO.getPileSns())) {
public AjaxResult updateFirmware(@RequestBody UpdateFirmwareDTO dto) {
if (CollectionUtils.isEmpty(dto.getPileSns())) {
return AjaxResult.error("参数不能为空");
}
pileRemoteService.updateFirmware(queryPileDTO.getPileSns());
pileRemoteService.updateFirmware(dto);
return AjaxResult.success();
}

View File

@@ -973,7 +973,7 @@ public class SpringBootTestController {
public void testRemoteUpdate() {
ArrayList<String> list = new ArrayList<>();
list.add("88000000000001");
pileRemoteService.updateFirmware(list);
// pileRemoteService.updateFirmware(list);
}
@Test

View File

@@ -12,5 +12,9 @@ import java.util.List;
@AllArgsConstructor
@Builder
public class UpdateFirmwareCommand {
List<String> pileSnList;
private List<String> pileSnList;
// /update.bin
private String filePath;
}

View File

@@ -0,0 +1,24 @@
package com.jsowell.pile.dto;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class UpdateFirmwareDTO {
/**
* 桩编码List
*/
private List<String> pileSns;
/**
* 固件路径
*/
private String filePath;
}

View File

@@ -340,7 +340,7 @@ public class YKCPushCommandServiceImpl implements YKCPushCommandService {
byte[] passwordByteArr = BytesUtil.checkLengthAndBehindAppendZero(BytesUtil.str2Asc(Constants.updateServerPassword), 32);
// 文件路径
byte[] filePathByteArr = BytesUtil.checkLengthAndBehindAppendZero(BytesUtil.str2Asc(Constants.filePath), 64);
byte[] filePathByteArr = BytesUtil.checkLengthAndBehindAppendZero(BytesUtil.str2Asc(command.getFilePath()), 64);
// 执行控制 01立即执行 02空闲执行
byte[] performTypeByteArr = Constants.oneByteArray;

View File

@@ -479,8 +479,8 @@ public class AMapServiceImpl implements AMapService {
Map<String, List<PileInfoVO>> pileMap = pileInfoList.stream().collect(Collectors.groupingBy(PileInfoVO::getPileSn));
info = new AMapEquipmentInfo();
for (Map.Entry<String, List<PileInfoVO>> pile : pileMap.entrySet()) {
info = new AMapEquipmentInfo();
String pileSn = pile.getKey();
List<PileInfoVO> value = pile.getValue();
PileInfoVO pileInfoVO = value.get(0);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

@@ -8,9 +8,8 @@
:src="require('@/assets/images/lightning.png')"
/>
<div class="flex1">
<b class="box-h1">{{ generalSituation.totalChargingDegree }}</b>
<b class="box-h1">{{ generalSituation.totalChargingDegree}}</b>
<div>总充电电量()</div>
<div class="progress" />
</div>
</div>
<div class="box">
@@ -19,7 +18,6 @@
<div class="flex1">
<b class="box-h1">{{ generalSituation.totalChargingAmount}}</b>
<div>总充电费用()</div>
<div class="progress" />
</div>
</div>
<div class="box">
@@ -29,7 +27,6 @@
<div class="flex1">
<b class="box-h1">{{ generalSituation.totalChargingQuantity}}</b>
<div>总充电订单数()</div>
<div class="progress" />
</div>
</div>
<div class="box">
@@ -39,7 +36,6 @@
<div class="flex1">
<b class="box-h1">{{ generalSituation.totalPileQuantity }}</b>
<div>总充电设备数量()</div>
<div class="progress" />
</div>
</div>
<div class="box" v-hasRole="['admin', 'common']">
@@ -50,7 +46,6 @@
<div class="flex1">
<b class="box-h1">{{ generalSituation.totalMemberAmount }}</b>
<div>总客户余额()</div>
<div class="progress" />
</div>
</div>
<!-- <div class="box">-->
@@ -366,9 +361,15 @@ export default {
box-shadow: 0 15px 10px -11px #1ab394;
margin-right: 24px;
margin-bottom: 20px;
position: relative;
.box-image{
width: 60px;
height: 60px;
// background-size: 100% 100%;
// position: absolute;
// right: 0;
// bottom: 0;
// filter: drop-shadow(40px 0px gray);
}
.flex1{
flex: 1;

View File

@@ -213,10 +213,13 @@
</el-row>
</el-tab-pane>
<!-- 右侧配置管理页面目前不管 -->
<el-tab-pane label="配置管理" name="second">
<el-button type="primary" icon="el-icon-s-tools" round @click="updateFirmware">远程升级</el-button>
</el-tab-pane>
<!-- 右侧配置管理页面目前不管 -->
<el-tab-pane label="配置管理" name="second">
<el-button type="primary" icon="el-icon-s-tools" round @click="updateFirmware('/update.bin')">远程升级</el-button>
<el-button type="primary" icon="el-icon-s-tools" round @click="updateFirmware('/update2.bin')">远程升级2</el-button>
</el-tab-pane>
</el-tabs>
</div>
</template>
@@ -290,9 +293,10 @@ export default {
},
methods: {
// 远程升级固件
updateFirmware() {
updateFirmware(filePath) {
const data = {
pileSns: [this.pileSn],
filePath: filePath
};
console.log("远程升级固件:", data);
updateFirmware(data).then((response) => {

View File

@@ -18,18 +18,18 @@
</el-card>
<template v-else>
<el-card class="box-card" shadow="hover" style="margin-bottom: 10px">
<h2>汇付会员</h2>
<h2>会员信息</h2>
<hr>
<el-descriptions :column="2" >
<el-descriptions-item label="会员昵称">{{
<el-descriptions>
<!-- <el-descriptions-item label="会员昵称">{{
dialogForm.nickname
}}</el-descriptions-item>
}}</el-descriptions-item> -->
<el-descriptions-item label="会员邮箱">{{
dialogForm.email
}}</el-descriptions-item>
<el-descriptions-item label="会员性别">{{
<!-- <el-descriptions-item label="会员性别">{{
dialogForm.gender === "FEMALE" ? "女" : "男"
}}</el-descriptions-item>
}}</el-descriptions-item> -->
<el-descriptions-item label="公司地址">{{
dialogForm.location
}}</el-descriptions-item>
@@ -37,7 +37,7 @@
</el-card>
<el-card class="box-card" shadow="hover" style="margin:20px 0">
<!-- <div style="margin: 12px 0">汇付结算账户</div> -->
<h2>汇付结算账户</h2>
<h2>结算账户</h2>
<hr>
<el-descriptions :column="2" v-for="(item,index) in settleAccountList" :key="index">
<el-descriptions-item label="银行账户类型">{{ item.bankAcctType === '1'? '对公':'对私'}}</el-descriptions-item>

View File

@@ -1,8 +1,8 @@
<template>
<div class="app-container">
<h2>营收总报</h2>
<el-card shadow="hover" style="margin-bottom:10px;padding:10px">
<el-descriptions >
<el-card shadow="hover" style="margin-bottom:10px;padding:10px" >
<el-descriptions v-if="merchantOrderReport !== null">
<el-descriptions-item label="用电度数">{{merchantOrderReport.useElectricity}}</el-descriptions-item>
<el-descriptions-item label="充电次数">{{merchantOrderReport.chargeNum}}</el-descriptions-item>
<el-descriptions-item label="充电时长">{{merchantOrderReport.chargeTime}}分钟</el-descriptions-item>
@@ -13,6 +13,7 @@
<el-descriptions-item label="交易手续费">{{merchantOrderReport.tradeFee}}</el-descriptions-item>
<el-descriptions-item label="虚拟金额">{{merchantOrderReport.virtualAmount}}</el-descriptions-item>
</el-descriptions>
<h3 v-else>暂无数据</h3>
</el-card>
<h2>营收日报</h2>
<el-form
@@ -141,6 +142,7 @@ export default {
this.total = response.data.pageResponse.total
} else{
this.reportList =[]
this.merchantOrderReport= null
}
}
);

View File

@@ -33,7 +33,7 @@
</p>
</div>
</div>
<el-tabs
<!-- <el-tabs
v-model="activeName"
type="card"
@tab-click="handleClick"
@@ -111,7 +111,7 @@
</el-form>
</el-tab-pane>
<el-tab-pane label="订单流水" name="second">订单流水</el-tab-pane>
</el-tabs>
</el-tabs> -->
<el-dialog title="提现申请" :visible.sync="dialogVisible" width="33%" :before-close="handleClose">
温馨提示
<div style="font-size:12px;color:gray">

View File

@@ -2,10 +2,10 @@
<div class="app-container">
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
<el-tab-pane label="汇付支付置" name="first">
<el-tab-pane label="支付置" name="first">
<adapay-member :merchantId="merchantId"></adapay-member>
</el-tab-pane>
<el-tab-pane label="配置管理" name="second">配置管理</el-tab-pane>
<!-- <el-tab-pane label="配置管理" name="second">配置管理</el-tab-pane> -->
<!-- <el-tab-pane label="角色管理" name="third">角色管理</el-tab-pane>-->
<el-tab-pane label="钱包汇总" name="wallet">
<wallet-summary :merchantId="merchantId"></wallet-summary>