refactor(sis): 字段更改
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
This commit is contained in:
parent
e1f716c70b
commit
f35a15fc23
@ -35,7 +35,7 @@ public class SisElevatorFloorRefBo extends BaseEntity {
|
|||||||
private Long elevatorId;
|
private Long elevatorId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 楼层层数
|
* 楼层层数
|
||||||
*/
|
*/
|
||||||
@NotEmpty(message = "楼层层数不能为空", groups = { AddGroup.class, EditGroup.class })
|
@NotEmpty(message = "楼层层数不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
private Collection<Long> floorNums;
|
private Collection<Long> floorNums;
|
||||||
|
@ -123,7 +123,7 @@ public class HikAlarmCallBack implements HCNetSDK.FMSGCallBack_V31 {
|
|||||||
|
|
||||||
layerArray.forEach(layer -> {
|
layerArray.forEach(layer -> {
|
||||||
SisElevatorFloorRefVo floorRef = floorRefList.stream()
|
SisElevatorFloorRefVo floorRef = floorRefList.stream()
|
||||||
.filter(vo -> vo.getLayerNum().intValue() == layer) // 直接使用 layer
|
.filter(vo -> vo.getFloorNum().intValue() == layer) // 直接使用 layer
|
||||||
.findFirst()
|
.findFirst()
|
||||||
.orElse(null);
|
.orElse(null);
|
||||||
if (floorRef == null) {
|
if (floorRef == null) {
|
||||||
|
@ -88,6 +88,11 @@ public class SisElevatorFloorRefServiceImpl implements ISisElevatorFloorRefServi
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Boolean insertByBo(SisElevatorFloorRefBo bo) {
|
public Boolean insertByBo(SisElevatorFloorRefBo bo) {
|
||||||
|
// 清除已有权限
|
||||||
|
List<SisElevatorFloorRefVo> list = this.queryByElevatorId(bo.getElevatorId());
|
||||||
|
Collection<Long> ids = list.stream().map(SisElevatorFloorRefVo::getId).toList();
|
||||||
|
baseMapper.deleteByIds(ids);
|
||||||
|
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
for (Long num : bo.getFloorNums()){
|
for (Long num : bo.getFloorNums()){
|
||||||
SisElevatorFloorRef add = new SisElevatorFloorRef();
|
SisElevatorFloorRef add = new SisElevatorFloorRef();
|
||||||
|
Loading…
Reference in New Issue
Block a user