mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-16 07:48:34 +08:00
update 电池算法应用Service
This commit is contained in:
@@ -15,6 +15,7 @@ import com.jsowell.pile.domain.ChargeAlgorithmRecord;
|
|||||||
import com.jsowell.pile.dto.*;
|
import com.jsowell.pile.dto.*;
|
||||||
import com.jsowell.pile.service.ChargeAlgorithmRecordService;
|
import com.jsowell.pile.service.ChargeAlgorithmRecordService;
|
||||||
import com.jsowell.pile.vo.base.StationInfoVO;
|
import com.jsowell.pile.vo.base.StationInfoVO;
|
||||||
|
import com.jsowell.pile.vo.uniapp.customer.ChargeAlgorithmRecordVO;
|
||||||
import com.jsowell.pile.vo.uniapp.customer.OrderVO;
|
import com.jsowell.pile.vo.uniapp.customer.OrderVO;
|
||||||
import com.jsowell.pile.vo.uniapp.customer.UniAppOrderVO;
|
import com.jsowell.pile.vo.uniapp.customer.UniAppOrderVO;
|
||||||
import com.jsowell.service.OrderService;
|
import com.jsowell.service.OrderService;
|
||||||
@@ -402,8 +403,8 @@ public class OrderController extends BaseController {
|
|||||||
public RestApiResponse<?> queryChargeAlgorithmRecord(HttpServletRequest request, @PathVariable("orderCode") String orderCode) {
|
public RestApiResponse<?> queryChargeAlgorithmRecord(HttpServletRequest request, @PathVariable("orderCode") String orderCode) {
|
||||||
RestApiResponse<?> response = null;
|
RestApiResponse<?> response = null;
|
||||||
try {
|
try {
|
||||||
ChargeAlgorithmRecord record = chargeAlgorithmRecordService.queryRecordByOrderCode(orderCode);
|
ChargeAlgorithmRecordVO vo = chargeAlgorithmRecordService.queryVOByOrderCode(orderCode);
|
||||||
response = new RestApiResponse<>(ImmutableMap.of("ChargeAlgorithmRecord", record));
|
response = new RestApiResponse<>(ImmutableMap.of("ChargeAlgorithmRecord", vo));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("查询电池充电报告 error, ", e);
|
logger.error("查询电池充电报告 error, ", e);
|
||||||
response = new RestApiResponse<>(e);
|
response = new RestApiResponse<>(e);
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.jsowell.pile.service;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.jsowell.pile.domain.ChargeAlgorithmRecord;
|
import com.jsowell.pile.domain.ChargeAlgorithmRecord;
|
||||||
|
import com.jsowell.pile.vo.uniapp.customer.ChargeAlgorithmRecordVO;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电池充电算法记录Service接口
|
* 电池充电算法记录Service接口
|
||||||
@@ -64,5 +65,8 @@ public interface ChargeAlgorithmRecordService {
|
|||||||
* @param orderCode
|
* @param orderCode
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
ChargeAlgorithmRecordVO queryVOByOrderCode(String orderCode);
|
||||||
|
|
||||||
|
|
||||||
ChargeAlgorithmRecord queryRecordByOrderCode(String orderCode);
|
ChargeAlgorithmRecord queryRecordByOrderCode(String orderCode);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,10 @@ package com.jsowell.pile.service.impl;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.JSON;
|
||||||
import com.jsowell.common.util.DateUtils;
|
import com.jsowell.common.util.DateUtils;
|
||||||
import com.jsowell.pile.service.ChargeAlgorithmRecordService;
|
import com.jsowell.pile.service.ChargeAlgorithmRecordService;
|
||||||
|
import com.jsowell.pile.vo.uniapp.customer.ChargeAlgorithmRecordVO;
|
||||||
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 com.jsowell.pile.mapper.ChargeAlgorithmRecordMapper;
|
import com.jsowell.pile.mapper.ChargeAlgorithmRecordMapper;
|
||||||
@@ -87,13 +89,50 @@ public class ChargeAlgorithmRecordServiceImpl implements ChargeAlgorithmRecordSe
|
|||||||
return chargeAlgorithmRecordMapper.deleteChargeAlgorithmRecordById(id);
|
return chargeAlgorithmRecordMapper.deleteChargeAlgorithmRecordById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ChargeAlgorithmRecord queryRecordByOrderCode(String orderCode) {
|
||||||
|
return chargeAlgorithmRecordMapper.queryRecordByOrderCode(orderCode);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过订单号查询充电电池算法报告
|
* 通过订单号查询充电电池算法报告
|
||||||
* @param orderCode
|
* @param orderCode
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public ChargeAlgorithmRecord queryRecordByOrderCode(String orderCode) {
|
public ChargeAlgorithmRecordVO queryVOByOrderCode(String orderCode) {
|
||||||
return chargeAlgorithmRecordMapper.queryRecordByOrderCode(orderCode);
|
ChargeAlgorithmRecord record = chargeAlgorithmRecordMapper.queryRecordByOrderCode(orderCode);
|
||||||
|
if (record == null) {
|
||||||
|
return new ChargeAlgorithmRecordVO();
|
||||||
|
}
|
||||||
|
String securitySystemLevel = record.getSecuritySystemLevel();
|
||||||
|
ChargeAlgorithmRecordVO.SecuritySystem securitySystem = JSON.parseObject(securitySystemLevel, ChargeAlgorithmRecordVO.SecuritySystem.class);
|
||||||
|
|
||||||
|
ChargeAlgorithmRecordVO vo = ChargeAlgorithmRecordVO.builder()
|
||||||
|
.orderCode(record.getOrderCode())
|
||||||
|
.score(record.getScore())
|
||||||
|
.capacityMetrics(record.getCapacityMetrics())
|
||||||
|
.energyIndicator(record.getEnergyIndicator())
|
||||||
|
.consistency(record.getConsistency())
|
||||||
|
.tempConsistency(record.getTempConsistency())
|
||||||
|
.voltConsistency(record.getVoltConsistency())
|
||||||
|
.capacityConsistency(record.getCapacityConsistency())
|
||||||
|
.sot(record.getSot())
|
||||||
|
.thermalRunaway(record.getThermalRunaway())
|
||||||
|
.cooling(record.getCooling())
|
||||||
|
.seal(record.getSeal())
|
||||||
|
.currentSoc(record.getCurrentSoc())
|
||||||
|
.socAlarm(record.getSocAlarm())
|
||||||
|
.tempDiffAlarm(record.getTempDiffAlarm())
|
||||||
|
.tempRiseAlarm(record.getTempRiseAlarm())
|
||||||
|
.maxAllowableVoltageAlarm(record.getMaxAllowableVoltageAlarm())
|
||||||
|
.maxAllowableElectricityAlarm(record.getMaxAllowableElectricityAlarm())
|
||||||
|
.securitySystemLevel(securitySystem)
|
||||||
|
.failureMetrics(record.getFailureMetrics())
|
||||||
|
|
||||||
|
.build();
|
||||||
|
|
||||||
|
return vo;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,158 @@
|
|||||||
|
package com.jsowell.pile.vo.uniapp.customer;
|
||||||
|
|
||||||
|
import com.jsowell.common.annotation.Excel;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电池充电订单报告VO
|
||||||
|
*
|
||||||
|
* @author Lemon
|
||||||
|
* @Date 2025/4/16 9:51:37
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Builder
|
||||||
|
public class ChargeAlgorithmRecordVO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单编号
|
||||||
|
*/
|
||||||
|
@Excel(name = "订单编号")
|
||||||
|
private String orderCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总体得分
|
||||||
|
*/
|
||||||
|
@Excel(name = "总体得分")
|
||||||
|
private String score;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 健康指标-soh
|
||||||
|
*/
|
||||||
|
@Excel(name = "健康指标-soh")
|
||||||
|
private BigDecimal capacityMetrics;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 健康指标-soe
|
||||||
|
*/
|
||||||
|
@Excel(name = "健康指标-soe")
|
||||||
|
private BigDecimal energyIndicator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 健康指标-一致性
|
||||||
|
*/
|
||||||
|
@Excel(name = "健康指标-一致性")
|
||||||
|
private String consistency;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 温度一致性
|
||||||
|
*/
|
||||||
|
@Excel(name = "温度一致性")
|
||||||
|
private String tempConsistency;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电压一致性
|
||||||
|
*/
|
||||||
|
@Excel(name = "电压一致性")
|
||||||
|
private String voltConsistency;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 容量一致性
|
||||||
|
*/
|
||||||
|
@Excel(name = "容量一致性")
|
||||||
|
private String capacityConsistency;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 健康指标-sot
|
||||||
|
*/
|
||||||
|
@Excel(name = "健康指标-sot")
|
||||||
|
private BigDecimal sot;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 安全指标-热失控
|
||||||
|
*/
|
||||||
|
@Excel(name = "安全指标-热失控")
|
||||||
|
private String thermalRunaway;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 安全指标-冷却系统
|
||||||
|
*/
|
||||||
|
@Excel(name = "安全指标-冷却系统")
|
||||||
|
private String cooling;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 安全指标-气密性
|
||||||
|
*/
|
||||||
|
@Excel(name = "安全指标-气密性")
|
||||||
|
private String seal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 充电后 soc 值
|
||||||
|
*/
|
||||||
|
@Excel(name = "充电后 soc 值")
|
||||||
|
private String currentSoc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 故障指标-Soc 跳变异常(value:结果值result:结果为0正常,其他异常 threshold:异常阈值)
|
||||||
|
*/
|
||||||
|
@Excel(name = "故障指标-Soc 跳变异常", readConverterExp = "v=alue:结果值result:结果为0正常,其他异常,t=hreshold:异常阈值")
|
||||||
|
private String socAlarm;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 故障指标-温差异常
|
||||||
|
*/
|
||||||
|
@Excel(name = "故障指标-温差异常")
|
||||||
|
private String tempDiffAlarm;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 故障指标-温升异常(value:结果值result:结果为0正常,其他异常 threshold:异常阈值)
|
||||||
|
*/
|
||||||
|
@Excel(name = "故障指标-温升异常", readConverterExp = "v=alue:结果值result:结果为0正常,其他异常,t=hreshold:异常阈值")
|
||||||
|
private String tempRiseAlarm;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* $column.columnComment
|
||||||
|
*/
|
||||||
|
@Excel(name = "最大允许电压告警", readConverterExp = "最大允许电压告警")
|
||||||
|
private String maxAllowableVoltageAlarm;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* $column.columnComment
|
||||||
|
*/
|
||||||
|
@Excel(name = "最大允许电流告警", readConverterExp = "最大允许电流告警")
|
||||||
|
private String maxAllowableElectricityAlarm;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 安全体系指标
|
||||||
|
*/
|
||||||
|
@Excel(name = "安全体系指标")
|
||||||
|
private SecuritySystem securitySystemLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 故障体系指标
|
||||||
|
*/
|
||||||
|
@Excel(name = "故障体系指标")
|
||||||
|
private String failureMetrics;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class SecuritySystem{
|
||||||
|
private SubSystem subSystem;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class SubSystem{
|
||||||
|
private String chargeAlarm;
|
||||||
|
private String tri;
|
||||||
|
private String soh;
|
||||||
|
private String consistence;
|
||||||
|
private String cooling;
|
||||||
|
private String securitySystemLevel;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user