|
|
|
@ -11,6 +11,7 @@ import com.op.common.core.utils.uuid.IdUtils;
|
|
|
|
|
import com.op.common.core.web.domain.AjaxResult;
|
|
|
|
|
import com.op.device.domain.EquCheckItemDetail;
|
|
|
|
|
import com.op.device.domain.EquItemEquipment;
|
|
|
|
|
import com.op.device.domain.EquPlanDetail;
|
|
|
|
|
import com.op.device.domain.dto.EquCheckItemDTO;
|
|
|
|
|
import com.op.device.domain.vo.EquCheckItemVO;
|
|
|
|
|
import com.op.device.mapper.EquCheckItemDetailMapper;
|
|
|
|
@ -284,14 +285,26 @@ public class EquCheckItemServiceImpl implements IEquCheckItemService {
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
@DS("#header.poolName")
|
|
|
|
|
public int deleteEquCheckItemByItemIds(String[] itemIds) {
|
|
|
|
|
public AjaxResult deleteEquCheckItemByItemIds(String[] itemIds) {
|
|
|
|
|
|
|
|
|
|
// 检验
|
|
|
|
|
for (String data : itemIds) {
|
|
|
|
|
// 检验
|
|
|
|
|
EquCheckItem equCheckItem = equCheckItemMapper.selectEquCheckItemByItemId(data);
|
|
|
|
|
List<EquPlanDetail> checkItemList = equCheckItemMapper.checkDelItem(equCheckItem.getItemCode());
|
|
|
|
|
if (checkItemList.size() > 0) {
|
|
|
|
|
return error(500,"该检查项已有计划使用,删除失败!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (String data : itemIds) {
|
|
|
|
|
// 逻辑删除检查项详情信息
|
|
|
|
|
equCheckItemDetailMapper.delEquCheckItemDetailByItemId(data);
|
|
|
|
|
// 逻辑删除设备关联
|
|
|
|
|
equItemEquipmentMapper.delEquItemEquipmentByItemId(data);
|
|
|
|
|
}
|
|
|
|
|
return equCheckItemMapper.deleteEquCheckItemByItemIds(itemIds);
|
|
|
|
|
equCheckItemMapper.deleteEquCheckItemByItemIds(itemIds);
|
|
|
|
|
return success("删除成功!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|