mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-04 10:00:11 +08:00
电池充电报告新增字段
This commit is contained in:
@@ -29,6 +29,12 @@ public class ChargeAlgorithmRecord extends BaseEntity {
|
||||
@Excel(name = "订单编号")
|
||||
private String orderCode;
|
||||
|
||||
private String taskId;
|
||||
|
||||
private String webUrl;
|
||||
|
||||
private String pdfUrl;
|
||||
|
||||
/**
|
||||
* 总体得分
|
||||
*/
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
<resultMap type="com.jsowell.pile.domain.ChargeAlgorithmRecord" id="ChargeAlgorithmRecordResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="orderCode" column="order_code" />
|
||||
<result property="taskId" column="task_id" />
|
||||
<result property="webUrl" column="web_url" />
|
||||
<result property="pdfUrl" column="pdf_url" />
|
||||
<result property="score" column="score" />
|
||||
<result property="capacityMetrics" column="capacity_metrics" />
|
||||
<result property="energyIndicator" column="energy_indicator" />
|
||||
@@ -31,7 +34,7 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectChargeAlgorithmRecordVo">
|
||||
select id, order_code, score, capacity_metrics, energy_indicator, consistency, temp_consistency, volt_consistency,
|
||||
select id, order_code, task_id, web_url, pdf_url, score, capacity_metrics, energy_indicator, consistency, temp_consistency, volt_consistency,
|
||||
capacity_consistency, sot, thermal_runaway, cooling, seal, current_soc, soc_alarm, temp_diff_alarm, temp_rise_alarm,
|
||||
max_allowable_voltage_alarm, max_allowable_electricity_alarm, security_system_level, failure_metrics, performance_metrics, create_time from charge_algorithm_record
|
||||
</sql>
|
||||
@@ -40,6 +43,9 @@
|
||||
<include refid="selectChargeAlgorithmRecordVo"/>
|
||||
<where>
|
||||
<if test="orderCode != null and orderCode != ''"> and order_code = #{orderCode}</if>
|
||||
<if test="taskId != null and taskId != ''"> and task_id = #{taskId}</if>
|
||||
<if test="webUrl != null and webUrl != ''"> and web_url = #{webUrl}</if>
|
||||
<if test="pdfUrl != null and pdfUrl != ''"> and pdf_url = #{pdfUrl}</if>
|
||||
<if test="score != null and score != ''"> and score = #{score}</if>
|
||||
<if test="capacityMetrics != null "> and capacity_metrics = #{capacityMetrics}</if>
|
||||
<if test="energyIndicator != null "> and energy_indicator = #{energyIndicator}</if>
|
||||
@@ -72,6 +78,9 @@
|
||||
insert into charge_algorithm_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="orderCode != null">order_code,</if>
|
||||
<if test="taskId != null">task_id,</if>
|
||||
<if test="webUrl != null">web_url,</if>
|
||||
<if test="pdfUrl != null">pdf_url,</if>
|
||||
<if test="score != null">score,</if>
|
||||
<if test="capacityMetrics != null">capacity_metrics,</if>
|
||||
<if test="energyIndicator != null">energy_indicator,</if>
|
||||
@@ -96,6 +105,9 @@
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="orderCode != null">#{orderCode},</if>
|
||||
<if test="taskId != null">#{taskId},</if>
|
||||
<if test="webUrl != null">#{webUrl},</if>
|
||||
<if test="pdfUrl != null">#{pdfUrl},</if>
|
||||
<if test="score != null">#{score},</if>
|
||||
<if test="capacityMetrics != null">#{capacityMetrics},</if>
|
||||
<if test="energyIndicator != null">#{energyIndicator},</if>
|
||||
@@ -124,6 +136,9 @@
|
||||
update charge_algorithm_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="orderCode != null">order_code = #{orderCode},</if>
|
||||
<if test="taskId != null">task_id = #{taskId},</if>
|
||||
<if test="webUrl != null">web_url = #{webUrl},</if>
|
||||
<if test="pdfUrl != null">pdf_url = #{pdfUrl},</if>
|
||||
<if test="score != null">score = #{score},</if>
|
||||
<if test="capacityMetrics != null">capacity_metrics = #{capacityMetrics},</if>
|
||||
<if test="energyIndicator != null">energy_indicator = #{energyIndicator},</if>
|
||||
|
||||
@@ -78,13 +78,14 @@ public class BatteryChargeReportService {
|
||||
// 根据订单号查询订单信息
|
||||
OrderVO orderVO = orderBasicInfoService.getChargeOrderInfoByOrderCode(orderCode);
|
||||
if (orderVO == null) {
|
||||
return "订单信息为空";
|
||||
log.error("统一发送orderCode:{} 充电电池数据 error, 订单信息为空", orderCode);
|
||||
return null;
|
||||
}
|
||||
// 先判断直流桩还是交流桩,如果是交流桩就不进行计算
|
||||
PileDetailVO pileDetailVO = pileBasicInfoService.selectPileDetailByPileSn(orderVO.getPileSn());
|
||||
if (StringUtils.equals(Constants.TWO, pileDetailVO.getChargePortType())) {
|
||||
log.info("订单:{} 为交流桩订单,不进行充电算法计算", orderCode);
|
||||
return "不进行计算";
|
||||
return null;
|
||||
}
|
||||
|
||||
// 查询站点信息
|
||||
|
||||
Reference in New Issue
Block a user