正在显示
1 个修改的文件
包含
3 行增加
和
1 行删除
@@ -11,6 +11,7 @@ import com.sunyo.energy.location.model.Location; | @@ -11,6 +11,7 @@ import com.sunyo.energy.location.model.Location; | ||
11 | import com.sunyo.energy.location.model.WaterMeter; | 11 | import com.sunyo.energy.location.model.WaterMeter; |
12 | import com.sunyo.energy.location.model.WaterMeterSacc; | 12 | import com.sunyo.energy.location.model.WaterMeterSacc; |
13 | import com.sunyo.energy.location.service.WaterMeterService; | 13 | import com.sunyo.energy.location.service.WaterMeterService; |
14 | +import com.sunyo.energy.location.utils.AllUtils; | ||
14 | import com.sunyo.energy.location.utils.HttpsUtils; | 15 | import com.sunyo.energy.location.utils.HttpsUtils; |
15 | import io.swagger.annotations.ApiOperation; | 16 | import io.swagger.annotations.ApiOperation; |
16 | import lombok.extern.slf4j.Slf4j; | 17 | import lombok.extern.slf4j.Slf4j; |
@@ -120,12 +121,13 @@ public class LocationController { | @@ -120,12 +121,13 @@ public class LocationController { | ||
120 | public ResultJson editLocation(@RequestBody Location location) throws Exception { | 121 | public ResultJson editLocation(@RequestBody Location location) throws Exception { |
121 | 122 | ||
122 | ResultJson resultJson = new ResultJson(); | 123 | ResultJson resultJson = new ResultJson(); |
124 | + location.setWmid(AllUtils.wmIdUtils(location.getWmid())); | ||
123 | // 旧表 表号 | 125 | // 旧表 表号 |
124 | String wmId = locationMapper.findWmId(location.getAdrname()); | 126 | String wmId = locationMapper.findWmId(location.getAdrname()); |
125 | // 水表 累计充值量记录表 | 127 | // 水表 累计充值量记录表 |
126 | WaterMeterSacc waterMeterSacc = new WaterMeterSacc(); | 128 | WaterMeterSacc waterMeterSacc = new WaterMeterSacc(); |
127 | // 判断是否存在 存在修改楼层 不存在修改水表 | 129 | // 判断是否存在 存在修改楼层 不存在修改水表 |
128 | - if (!StringUtils.isEmpty(wmId)){ | 130 | + if (location.getWmid().equals(wmId)){ |
129 | // 修改 房间号 | 131 | // 修改 房间号 |
130 | int i1 = locationMapper.updateByPrimaryKeySelective(location); | 132 | int i1 = locationMapper.updateByPrimaryKeySelective(location); |
131 | log.info("楼层编辑:{}", i1); | 133 | log.info("楼层编辑:{}", i1); |
-
请 注册 或 登录 后发表评论