update 电池算法报告平台

This commit is contained in:
Lemon
2025-11-20 11:02:44 +08:00
parent 277fad8918
commit 3a0ba80c5c
6 changed files with 195 additions and 22 deletions

View File

@@ -68,4 +68,18 @@ public interface ChargeAlgorithmRecordMapper {
* @return
*/
ChargeAlgorithmRecord queryRecordByOrderCode(String orderCode);
/**
* 插入或修改电池充电算法记录
* @param record
* @return
*/
int insertOrUpdateSelective(ChargeAlgorithmRecord record);
/**
* 通过 taskId 查询充电算法报告
* @param taskId
* @return
*/
ChargeAlgorithmRecord queryRecordByTaskId(String taskId);
}

View File

@@ -36,6 +36,13 @@ public interface ChargeAlgorithmRecordService {
*/
public int insertChargeAlgorithmRecord(ChargeAlgorithmRecord chargeAlgorithmRecord);
/**
* 插入或修改电池充电算法记录
* @param record
* @return
*/
int insertOrUpdateSelective(ChargeAlgorithmRecord record);
/**
* 修改电池充电算法记录
*
@@ -69,4 +76,11 @@ public interface ChargeAlgorithmRecordService {
ChargeAlgorithmRecord queryRecordByOrderCode(String orderCode);
/**
* 通过 taskId 查询充电算法报告
* @param taskId
* @return
*/
ChargeAlgorithmRecord queryRecordByTaskId(String taskId);
}

View File

@@ -56,6 +56,17 @@ public class ChargeAlgorithmRecordServiceImpl implements ChargeAlgorithmRecordSe
return chargeAlgorithmRecordMapper.insertChargeAlgorithmRecord(chargeAlgorithmRecord);
}
/**
* 插入或修改电池充电算法记录
* @param record
* @return
*/
@Override
public int insertOrUpdateSelective(ChargeAlgorithmRecord record) {
record.setCreateTime(DateUtils.getNowDate());
return chargeAlgorithmRecordMapper.insertOrUpdateSelective(record);
}
/**
* 修改电池充电算法记录
*
@@ -94,6 +105,16 @@ public class ChargeAlgorithmRecordServiceImpl implements ChargeAlgorithmRecordSe
return chargeAlgorithmRecordMapper.queryRecordByOrderCode(orderCode);
}
/**
* 通过 taskId 查询充电算法报告
* @param taskId
* @return
*/
@Override
public ChargeAlgorithmRecord queryRecordByTaskId(String taskId) {
return chargeAlgorithmRecordMapper.queryRecordByTaskId(taskId);
}
/**
* 通过订单号查询充电电池算法报告
* @param orderCode

View File

@@ -36,7 +36,8 @@
<sql id="selectChargeAlgorithmRecordVo">
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
max_allowable_voltage_alarm, max_allowable_electricity_alarm, security_system_level, failure_metrics, performance_metrics, create_time
from charge_algorithm_record
</sql>
<select id="selectChargeAlgorithmRecordList" parameterType="com.jsowell.pile.domain.ChargeAlgorithmRecord" resultMap="ChargeAlgorithmRecordResult">
@@ -179,4 +180,99 @@
<include refid="selectChargeAlgorithmRecordVo"/>
where order_code = #{orderCode,jdbcType=VARCHAR}
</select>
<insert id="insertOrUpdateSelective">
insert into charge_algorithm_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<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>
<if test="consistency != null">consistency,</if>
<if test="tempConsistency != null">temp_consistency,</if>
<if test="voltConsistency != null">volt_consistency,</if>
<if test="capacityConsistency != null">capacity_consistency,</if>
<if test="sot != null">sot,</if>
<if test="thermalRunaway != null">thermal_runaway,</if>
<if test="cooling != null">cooling,</if>
<if test="seal != null">seal,</if>
<if test="currentSoc != null">current_soc,</if>
<if test="socAlarm != null">soc_alarm,</if>
<if test="tempDiffAlarm != null">temp_diff_alarm,</if>
<if test="tempRiseAlarm != null">temp_rise_alarm,</if>
<if test="maxAllowableVoltageAlarm != null">max_allowable_voltage_alarm,</if>
<if test="maxAllowableElectricityAlarm != null">max_allowable_electricity_alarm,</if>
<if test="securitySystemLevel != null">security_system_level,</if>
<if test="failureMetrics != null">failure_metrics,</if>
<if test="performanceMetrics != null">performance_metrics,</if>
<if test="createTime != null">create_time,</if>
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<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>
<if test="consistency != null">#{consistency},</if>
<if test="tempConsistency != null">#{tempConsistency},</if>
<if test="voltConsistency != null">#{voltConsistency},</if>
<if test="capacityConsistency != null">#{capacityConsistency},</if>
<if test="sot != null">#{sot},</if>
<if test="thermalRunaway != null">#{thermalRunaway},</if>
<if test="cooling != null">#{cooling},</if>
<if test="seal != null">#{seal},</if>
<if test="currentSoc != null">#{currentSoc},</if>
<if test="socAlarm != null">#{socAlarm},</if>
<if test="tempDiffAlarm != null">#{tempDiffAlarm},</if>
<if test="tempRiseAlarm != null">#{tempRiseAlarm},</if>
<if test="maxAllowableVoltageAlarm != null">#{maxAllowableVoltageAlarm},</if>
<if test="maxAllowableElectricityAlarm != null">#{maxAllowableElectricityAlarm},</if>
<if test="securitySystemLevel != null">#{securitySystemLevel},</if>
<if test="failureMetrics != null">#{failureMetrics},</if>
<if test="performanceMetrics != null">#{performanceMetrics},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">id = #{id},</if>
<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>
<if test="consistency != null">consistency = #{consistency},</if>
<if test="tempConsistency != null">temp_consistency = #{tempConsistency},</if>
<if test="voltConsistency != null">volt_consistency = #{voltConsistency},</if>
<if test="capacityConsistency != null">capacity_consistency = #{capacityConsistency},</if>
<if test="sot != null">sot = #{sot},</if>
<if test="thermalRunaway != null">thermal_runaway = #{thermalRunaway},</if>
<if test="cooling != null">cooling = #{cooling},</if>
<if test="seal != null">seal = #{seal},</if>
<if test="currentSoc != null">current_soc = #{currentSoc},</if>
<if test="socAlarm != null">soc_alarm = #{socAlarm},</if>
<if test="tempDiffAlarm != null">temp_diff_alarm = #{tempDiffAlarm},</if>
<if test="tempRiseAlarm != null">temp_rise_alarm = #{tempRiseAlarm},</if>
<if test="maxAllowableVoltageAlarm != null">max_allowable_voltage_alarm = #{maxAllowableVoltageAlarm},</if>
<if test="maxAllowableElectricityAlarm != null">max_allowable_electricity_alarm = #{maxAllowableElectricityAlarm},</if>
<if test="securitySystemLevel != null">security_system_level = #{securitySystemLevel},</if>
<if test="failureMetrics != null">failure_metrics = #{failureMetrics},</if>
<if test="performanceMetrics != null">performance_metrics = #{performanceMetrics},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
</insert>
<select id="queryRecordByTaskId" resultMap="ChargeAlgorithmRecordResult">
<include refid="selectChargeAlgorithmRecordVo"/>
where task_id = #{taskId,jdbcType=VARCHAR}
</select>
</mapper>