|
@@ -5,6 +5,7 @@ import cn.start.tz.framework.common.exception.ErrorCode;
|
|
|
import cn.start.tz.framework.common.pojo.CommonResult;
|
|
import cn.start.tz.framework.common.pojo.CommonResult;
|
|
|
import cn.start.tz.framework.common.pojo.PageResult;
|
|
import cn.start.tz.framework.common.pojo.PageResult;
|
|
|
import cn.start.tz.framework.common.util.object.BeanUtils;
|
|
import cn.start.tz.framework.common.util.object.BeanUtils;
|
|
|
|
|
+import cn.start.tz.module.pressure2.controller.admin.equippipe.vo.EquipPipeBatchUpdateDistrictVO;
|
|
|
import cn.start.tz.module.pressure2.controller.admin.equippipe.vo.EquipPipePageReqVO;
|
|
import cn.start.tz.module.pressure2.controller.admin.equippipe.vo.EquipPipePageReqVO;
|
|
|
import cn.start.tz.module.pressure2.controller.admin.equippipe.vo.EquipPipeRespVO;
|
|
import cn.start.tz.module.pressure2.controller.admin.equippipe.vo.EquipPipeRespVO;
|
|
|
import cn.start.tz.module.pressure2.controller.admin.equippipe.vo.EquipPipeSaveReqVO;
|
|
import cn.start.tz.module.pressure2.controller.admin.equippipe.vo.EquipPipeSaveReqVO;
|
|
@@ -287,6 +288,40 @@ public class EquipPipeServiceImpl extends ServiceImpl<EquipPipeMapper, EquipPipe
|
|
|
equipPipeMapper.updateById(equipPipeDO);
|
|
equipPipeMapper.updateById(equipPipeDO);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void batchUpdateEquipDistrict(EquipPipeBatchUpdateDistrictVO batchUpdateVO) {
|
|
|
|
|
+ List<String> ids = batchUpdateVO.getIds();
|
|
|
|
|
+ if (ids == null || ids.isEmpty()) {
|
|
|
|
|
+ throw new IllegalArgumentException("设备ID列表不能为空");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ Integer equipDistrict = batchUpdateVO.getEquipDistrict();
|
|
|
|
|
+ Integer equipStreet = batchUpdateVO.getEquipStreet();
|
|
|
|
|
+
|
|
|
|
|
+ if (equipDistrict == null && equipStreet == null) {
|
|
|
|
|
+ throw new IllegalArgumentException("行政区和街道至少需要填写一个");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ for (String id : ids) {
|
|
|
|
|
+ EquipPipeDO equipPipe = equipPipeMapper.selectById(id);
|
|
|
|
|
+ if (equipPipe == null) {
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ EquipPipeDO updateObj = new EquipPipeDO();
|
|
|
|
|
+ updateObj.setId(id);
|
|
|
|
|
+
|
|
|
|
|
+ if (equipDistrict != null) {
|
|
|
|
|
+ updateObj.setEquipDistrict(equipDistrict);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (equipStreet != null) {
|
|
|
|
|
+ updateObj.setEquipStreet(equipStreet);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ equipPipeMapper.updateById(updateObj);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public List<EquipPipeRespVO> getEquipPipeListByTaskOrderId(String taskOrderId) throws JsonProcessingException {
|
|
public List<EquipPipeRespVO> getEquipPipeListByTaskOrderId(String taskOrderId) throws JsonProcessingException {
|
|
|
List<EquipPipeDO> equipPipeDOS = equipPipeMapper.selectEquipPipeListByTaskOrderId(taskOrderId);
|
|
List<EquipPipeDO> equipPipeDOS = equipPipeMapper.selectEquipPipeListByTaskOrderId(taskOrderId);
|