映射表设备测点排序修改
This commit is contained in:
parent
80952ac7f4
commit
8bd6cec89d
@ -275,6 +275,8 @@ public class SysNodeServiceImpl implements SysNodeService {
|
||||
@Override
|
||||
public void bindDevices(List<BindEquipmentInfoDto> equipmentList, Long linkId) {
|
||||
SysUserVo sysUserVo = (SysUserVo) StpUtil.getTokenSession().get(SessionUtil.SESSION_USER_KEY);
|
||||
//记录整体排序
|
||||
Integer order = 1;
|
||||
|
||||
// 如果绑定设备列表为空,则清空映射表
|
||||
if (CollectionUtils.isEmpty(equipmentList)) {
|
||||
@ -329,7 +331,8 @@ public class SysNodeServiceImpl implements SysNodeService {
|
||||
SysTabMapping mapping = sysImptabmappingMapper.selectById(item.getId());
|
||||
mapping.setMeasPointName(iotModelVo.getAttributeName());
|
||||
mapping.setHighSpeed(iotModelVo.getHighSpeed());
|
||||
mapping.setPorder(iotModelVo.getPorder());
|
||||
mapping.setPorder(order);
|
||||
order++;
|
||||
updateList.add(mapping);
|
||||
|
||||
}else{
|
||||
@ -341,7 +344,8 @@ public class SysNodeServiceImpl implements SysNodeService {
|
||||
mapping.setMeasPointCode(iotModelVo.getAttributeCode());
|
||||
mapping.setMeasPointName(iotModelVo.getAttributeName());
|
||||
mapping.setHighSpeed(iotModelVo.getHighSpeed());
|
||||
mapping.setPorder(iotModelVo.getPorder());
|
||||
mapping.setPorder(order);
|
||||
order++;
|
||||
mapping.setCreatedBy(sysUserVo.getAccount());
|
||||
mapping.setCreatedTime(new Date());
|
||||
mapping.setRevision(1);
|
||||
@ -368,7 +372,8 @@ public class SysNodeServiceImpl implements SysNodeService {
|
||||
|
||||
SysTabMapping mapping = sysImptabmappingMapper.selectById(item.getId());
|
||||
mapping.setMeasPointName(iotServiceVo.getServiceName());
|
||||
mapping.setPorder(iotServiceVo.getPorder());
|
||||
mapping.setPorder(order);
|
||||
order++;
|
||||
updateList.add(mapping);
|
||||
}else{
|
||||
SysTabMapping mapping = new SysTabMapping();
|
||||
@ -378,7 +383,8 @@ public class SysNodeServiceImpl implements SysNodeService {
|
||||
mapping.setMeasPointType(measType);
|
||||
mapping.setMeasPointCode(iotServiceVo.getServiceCode());
|
||||
mapping.setMeasPointName(iotServiceVo.getServiceName());
|
||||
mapping.setPorder(iotServiceVo.getPorder());
|
||||
mapping.setPorder(order);
|
||||
order++;
|
||||
mapping.setCreatedBy(sysUserVo.getAccount());
|
||||
mapping.setCreatedTime(new Date());
|
||||
mapping.setRevision(1);
|
||||
|
@ -75,8 +75,6 @@
|
||||
where
|
||||
t1.link_id = #{linkId} and t1.meas_point_type = #{type}
|
||||
order by
|
||||
t1.equipment_id ,
|
||||
t1.meas_point_type,
|
||||
t1.porder
|
||||
</select>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user