refactor(ems): 移除振动数据表中的 remark 字段并优化查询

- 删除 EmsVibrationInstantMapper.xml 中对 remark 字段的映射与操作- 更新振动数据查询逻辑,移除 remark 相关字段处理
-修正 TWTempertureDataMapper.xml 中时间字段查询别名问题
- 调整温度数据查询排序字段为 recodeTime
- 注释掉 TWTempertureDataController 中的权限校验注解- 在振动数据服务中增加监测点名称关联查询支持
master
zangch@mesnac.com 1 month ago
parent 2a7c9966ec
commit fb6f332a6e

@ -45,7 +45,7 @@ public class TWTempertureDataController extends BaseController
/**
*
*/
@SaCheckPermission("ems/record:recordIOTInstant:list")
//@SaCheckPermission("ems/record:recordIOTInstant:list")
@GetMapping("/list")
public TableDataInfo list(TWTempertureData tWTempertureData, PageQuery pageQuery)
{
@ -122,7 +122,7 @@ public class TWTempertureDataController extends BaseController
/**
*
*/
@SaCheckPermission("ems/record:recordIOTInstant:export")
//@SaCheckPermission("ems/record:recordIOTInstant:export")
//@Log(title = "物联网实时数据", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, TWTempertureData tWTempertureData)
@ -135,7 +135,7 @@ public class TWTempertureDataController extends BaseController
/**
*
*/
@SaCheckPermission("ems/record:recordIOTInstant:query")
//@SaCheckPermission("ems/record:recordIOTInstant:query")
@GetMapping(value = "/{objid}")
public R getInfo(@PathVariable("objid") Long objid)
{
@ -145,7 +145,7 @@ public class TWTempertureDataController extends BaseController
/**
*
*/
@SaCheckPermission("ems/record:recordIOTInstant:add")
//@SaCheckPermission("ems/record:recordIOTInstant:add")
//@Log(title = "物联网实时数据", businessType = BusinessType.INSERT)
@PostMapping
public R add(@RequestBody TWTempertureData tWTempertureData)
@ -157,7 +157,7 @@ public class TWTempertureDataController extends BaseController
/**
*
*/
@SaCheckPermission("ems/record:recordIOTInstant:edit")
//@SaCheckPermission("ems/record:recordIOTInstant:edit")
//@Log(title = "物联网实时数据", businessType = BusinessType.UPDATE)
@PutMapping
public R edit(@RequestBody TWTempertureData tWTempertureData)
@ -169,7 +169,7 @@ public class TWTempertureDataController extends BaseController
/**
*
*/
@SaCheckPermission("ems/record:recordIOTInstant:remove")
//@SaCheckPermission("ems/record:recordIOTInstant:remove")
//@Log(title = "物联网实时数据", businessType = BusinessType.DELETE)
@DeleteMapping("/{objids}")
public R remove(@PathVariable Long[] objids)

@ -7,6 +7,7 @@ import lombok.RequiredArgsConstructor;
import org.dromara.common.core.utils.StringUtils;
import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.ems.base.domain.EmsBaseMonitorInfo;
import org.dromara.ems.record.domain.EmsVibrationInstant;
import org.dromara.ems.record.mapper.EmsVibrationInstantMapper;
import org.dromara.ems.record.service.IEmsVibrationInstantService;
@ -47,6 +48,8 @@ public class EmsVibrationInstantServiceImpl implements IEmsVibrationInstantServi
Map<String, Object> params = bo.getParams();
MPJLambdaWrapper<EmsVibrationInstant> lqw = JoinWrappers.lambda(EmsVibrationInstant.class)
.selectAll(EmsVibrationInstant.class)
.select(EmsBaseMonitorInfo::getMonitorName)
.leftJoin(EmsBaseMonitorInfo.class, EmsBaseMonitorInfo::getMonitorCode, EmsVibrationInstant::getSensorId)
.eq(bo.getObjId() != null, EmsVibrationInstant::getObjId, bo.getObjId())
.eq(bo.getCollectTime() != null, EmsVibrationInstant::getCollectTime, bo.getCollectTime())
.eq(StringUtils.isNotBlank(bo.getSensorId()), EmsVibrationInstant::getSensorId, bo.getSensorId())

@ -13,7 +13,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="acceleration" column="acceleration" />
<result property="temperature" column="temperature" />
<result property="recodeTime" column="recodeTime" />
<result property="remark" column="remark" />
<result property="monitorName" column="monitor_name" />
</resultMap>
@ -26,7 +25,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
rdi.acceleration,
rdi.temperature,
rdi.recodeTime,
rdi.remark,
bmi.monitor_name
from T_VibrationSensor_Data rdi
left join ems_base_monitor_info bmi on rdi.sensor_id = bmi.monitor_code
@ -75,7 +73,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="acceleration != null">acceleration,</if>
<if test="temperature != null">temperature,</if>
<if test="recodeTime != null">recodeTime,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="collectTime != null">#{collectTime},</if>
@ -85,7 +82,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="acceleration != null">#{acceleration},</if>
<if test="temperature != null">#{temperature},</if>
<if test="recodeTime != null">#{recodeTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
@ -99,7 +95,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="acceleration != null">acceleration = #{acceleration},</if>
<if test="temperature != null">temperature = #{temperature},</if>
<if test="recodeTime != null">recodeTime = #{recodeTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where objId = #{objId}
</update>

@ -72,9 +72,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
<if test="monitorId != null and monitorId != ''">and twtd.monitorId = #{monitorId}</if>
<if test="params.beginCollectTime != null and params.beginCollectTime != '' and params.endCollectTime != null and params.endCollectTime != ''">
and collectTime between #{params.beginCollectTime} and #{params.endCollectTime}</if>
and twtd.collectTime between #{params.beginCollectTime} and #{params.endCollectTime}</if>
<if test="params.beginRecordTime != null and params.beginRecordTime != '' and params.endRecordTime != null and params.endRecordTime != ''">
and recodeTime between #{params.beginRecordTime} and #{params.endRecordTime}</if>
and twtd.recodeTime between #{params.beginRecordTime} and #{params.endRecordTime}</if>
</where>
order by twtd.collectTime
</select>
@ -84,7 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
<if test="monitorId != null and monitorId != ''"> and twtd.monitorId = #{monitorId}</if>
</where>
order by twtd.recordTime desc
order by twtd.recodeTime desc
</select>
<insert id="insertTWTempertureData" parameterType="TWTempertureData" useGeneratedKeys="true" keyProperty="objid">

Loading…
Cancel
Save