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