新增计量器具问题修复

This commit is contained in:
DYL0109 2025-09-01 11:18:40 +08:00
parent bb1defb24d
commit 2e33ceb225
2 changed files with 3 additions and 1 deletions

View File

@ -27,6 +27,7 @@ import lombok.AllArgsConstructor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import java.util.stream.Collectors;
@ -101,6 +102,7 @@ public class MeterServiceImpl implements IMeterService
* @return 结果
*/
@Override
@Transactional
public int insertMeterImplement(Meter meter)
{
meter.setCreateTime(DateUtils.getNowDate());

View File

@ -161,7 +161,7 @@
<foreach collection="energyIndices" item="meterPoint" separator=";">
insert into meter_point
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="meterPoint.indexId != null and meterPoint.indexId != ''">point_id,</if>
<if test="meterPoint.pointId != null and meterPoint.pointId != ''">point_id,</if>
<if test="meterPoint.name != null and meterPoint.name != ''">name,</if>
<if test="meterPoint.code != null and meterPoint.code != ''">code,</if>
<if test="meterPoint.pointType != null">point_type,</if>