/* * Copyright (c) 2018-2025, ztt All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * Neither the name of the pig4cloud.com developer nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * Author: ztt */ package com.chinaztt.mes.technology.service; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; import com.chinaztt.mes.technology.dto.BomDTO; import com.chinaztt.mes.technology.dto.StructureTree; import com.chinaztt.mes.technology.entity.Bom; import com.chinaztt.mes.technology.entity.BomComponent; import com.chinaztt.mes.technology.entity.Structure; import com.chinaztt.mes.technology.excel.BomData; import com.chinaztt.ztt.common.core.util.R; import java.util.List; /** * 完整bom树 * * @author zhangxy * @date 2021-05-07 15:08:17 */ public interface BomService extends IService { /** * @param list */ void importExcel(List list); /** * 分页查询 * * @param page * @param ew * @return */ IPage> getPage(Page page, QueryWrapper ew); /** * 保存完整结构 * * @param bomDTO * @return */ R saveBom(BomDTO bomDTO); /** * bom 搭建 * * @param structureTree * @param bom */ void saveBomComp(StructureTree structureTree, Bom bom); /** * @Author: Hans * @Description: * @Date: 2022-06-01 */ R saveALLBom(List structures); /** * 更新 * * @param bomDTO * @return */ R updateBom(BomDTO bomDTO); /** * 根据零件查询所有BOM结构 * * @param partId * @return */ StructureTree getAllBomByPartId(Long partId); /** * 根据零件查询所有BOM结构 * * @param bom * @return */ StructureTree getAllBomExt(Bom bom, int bomLayers); /** * 查询Id * * @param id * @return */ BomDTO getBomDtoById(Long id); /** * 删除 * * @param ids * @return */ R delete(List ids); /** * 根据BOM ID 查询组件列表 * * @param bomId * @return */ List getComponentsById(Long bomId); /** * 更改状态 * * @param ids * @param event * @return */ boolean changeState(List ids, String event); }