Browse Source

桩号id修改

develop
lau572 10 months ago
parent
commit
106aa7f35e
  1. 4
      zc-business/src/main/java/com/zc/business/domain/DcStakeMark.java
  2. 2
      zc-business/src/main/java/com/zc/business/service/impl/DcDeviceServiceImpl.java
  3. 8
      zc-business/src/main/java/com/zc/business/service/impl/DcStakeMarkServiceImpl.java

4
zc-business/src/main/java/com/zc/business/domain/DcStakeMark.java

@ -13,8 +13,8 @@ public class DcStakeMark {
public static final String UP = "1";
public static final String CENTRE = "2";
public static final String DOWN = "3";
@ApiModelProperty("ID")
private String id;
@ApiModelProperty("桩号")
private String stakeMark;
@ApiModelProperty("经度")
private String longitude;
@ApiModelProperty("纬度")

2
zc-business/src/main/java/com/zc/business/service/impl/DcDeviceServiceImpl.java

@ -281,7 +281,7 @@ public class DcDeviceServiceImpl extends ServiceImpl<DcDeviceMapper, DcDevice> i
public DcStakeMark exampleQueryTheAssociatedPileNumber(DcDevice dcDevice) {
DcStakeMark dcStakeMark = new DcStakeMark();
dcStakeMark.setDirection(dcDevice.getDirection());
dcStakeMark.setId(dcDevice.getStakeMark());
dcStakeMark.setStakeMark(dcDevice.getStakeMark());
List<DcStakeMark> dcStakeMarks = dcStakeMarkService.listStakeMark(dcStakeMark);
if (dcStakeMarks.size() == 1) {
return dcStakeMarks.get(0);

8
zc-business/src/main/java/com/zc/business/service/impl/DcStakeMarkServiceImpl.java

@ -29,8 +29,8 @@ public class DcStakeMarkServiceImpl extends ServiceImpl<DcStakeMarkMapper, DcSta
LambdaQueryWrapper<DcStakeMark> queryWrapper = new LambdaQueryWrapper<>();
// 设备ID
if (StringUtils.hasText(dcStakeMark.getId())) {
queryWrapper.eq(DcStakeMark::getId, dcStakeMark.getId());
if (StringUtils.hasText(dcStakeMark.getStakeMark())) {
queryWrapper.eq(DcStakeMark::getStakeMark, dcStakeMark.getStakeMark());
}
// 经度
@ -69,7 +69,7 @@ public class DcStakeMarkServiceImpl extends ServiceImpl<DcStakeMarkMapper, DcSta
@Override
public boolean addStakeMark(DcStakeMark dcStakeMark) {
String id = dcStakeMark.getId();
String id = dcStakeMark.getStakeMark();
if (Objects.nonNull(id)) {
DcStakeMark device = getById(id);
if (Objects.nonNull(device)) {
@ -84,7 +84,7 @@ public class DcStakeMarkServiceImpl extends ServiceImpl<DcStakeMarkMapper, DcSta
@Override
public boolean editStakeMark(DcStakeMark dcStakeMark) {
String id = dcStakeMark.getId();
String id = dcStakeMark.getStakeMark();
// 检查设备id是否重复
DcStakeMark product = getById(id);

Loading…
Cancel
Save