2024-1-23-2 基础信息模块-绑定辅助设备逻辑优化-临时任务

master
A0010407 1 year ago
parent 724b32dc85
commit 146234a43f

@ -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);
}

Loading…
Cancel
Save