diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/BaseEquipmentServiceImpl.java b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/BaseEquipmentServiceImpl.java index b2e39a1d..5e0cb6c2 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/BaseEquipmentServiceImpl.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/BaseEquipmentServiceImpl.java @@ -359,7 +359,6 @@ public class BaseEquipmentServiceImpl implements IBaseEquipmentService { baseEquipmentMapper.bindAuxiliaryEquipment(equBindAuxiliaryEquipment); } } - return list; } @@ -372,6 +371,13 @@ public class BaseEquipmentServiceImpl implements IBaseEquipmentService { @Override @DS("#header.poolName") public int deleteBaseEquipmentByEquipmentIds(Long[] equipmentIds) { + for(long equipmentId:equipmentIds){ + BaseEquipment list = baseEquipmentMapper.selectBaseEquipmentByEquipmentId(equipmentId); + //删除备件信息 + baseEquipmentMapper.deleteEquSpareEquipmentByCode(list.getEquipmentCode()); + //删除辅助设备 + baseEquipmentMapper.deleteAuxiliaryEquipmentByCode(list.getEquipmentCode()); + } return baseEquipmentMapper.deleteBaseEquipmentByEquipmentIds(equipmentIds); } @@ -384,6 +390,11 @@ public class BaseEquipmentServiceImpl implements IBaseEquipmentService { @Override @DS("#header.poolName") public int deleteBaseEquipmentByEquipmentId(Long equipmentId) { + BaseEquipment list = baseEquipmentMapper.selectBaseEquipmentByEquipmentId(equipmentId); + //删除备件信息 + baseEquipmentMapper.deleteEquSpareEquipmentByCode(list.getEquipmentCode()); + //删除辅助设备 + baseEquipmentMapper.deleteAuxiliaryEquipmentByCode(list.getEquipmentCode()); return baseEquipmentMapper.deleteBaseEquipmentByEquipmentId(equipmentId); }