package org.jeecg.modules.dnc.service;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.modules.dnc.entity.DocFile;
|
import org.jeecg.modules.dnc.entity.DocInfo;
|
import org.jeecg.modules.dnc.entity.ProcessStream;
|
import org.jeecg.modules.dnc.response.QueryListResponseResult;
|
import org.jeecg.modules.dnc.response.QueryPageResponseResult;
|
import org.jeecg.modules.dnc.response.ResponseResult;
|
import org.jeecg.modules.dnc.request.DocInfoQueryRequest;
|
import org.jeecg.modules.dnc.request.DocInfoUploadRequest;
|
import org.springframework.web.multipart.MultipartFile;
|
|
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletResponse;
|
import java.io.File;
|
import java.util.List;
|
|
public interface IDocInfoService extends IService<DocInfo> {
|
|
/**
|
* 导入文档进口
|
* @param file
|
* @param docInfo
|
* @return
|
*/
|
boolean addDocInfo(MultipartFile file, DocInfoUploadRequest docInfo);
|
|
/**
|
* 编辑文档基本信息
|
* @param id
|
* @param docInfo
|
* @return
|
*/
|
boolean editDocInfo(String id, DocInfo docInfo);
|
|
/**
|
* 删除文档信息
|
* @param id
|
* @return
|
*/
|
boolean deleteDocInfo(String id);
|
/**
|
* 监控文件导入
|
* @param pathFile
|
* @return
|
*/
|
boolean addDocInfoRec(String pathFile,File fileRec);
|
|
boolean addDocInfoRecService(String equipmentId,File fileRec,String fileNameSuffix,String fileNameNew,String filePath );
|
/**
|
* 入库操作 文档对应文件升版
|
* @param id
|
* @return
|
*/
|
boolean pushDocFile(String id, MultipartFile file);
|
|
/**
|
* 文档出库检查
|
* @param id
|
* @return
|
*/
|
DocFile checkDocInfo(String id);
|
|
/**
|
* 文档发布
|
* @param id
|
* @return
|
*/
|
boolean publishDocInfo(String id);
|
/**
|
* 文档重发布
|
* @param id
|
* @return
|
*/
|
boolean republishDocInfo(String id);
|
/**
|
* 文档归档
|
* @param id
|
* @return
|
*/
|
boolean pigeonholeDocInfo(String id);
|
|
/**
|
* 取消出库
|
* @param id
|
* @return
|
*/
|
boolean cancelPullDocInfo(String id);
|
|
/**
|
* 分页查询接口
|
* @param page
|
* @param size
|
* @param docQuery
|
* @return
|
*/
|
Result<?> findPageList(int page, int size, DocInfoQueryRequest docQuery);
|
|
/**
|
*
|
* @param docId
|
* @param attributeId
|
* @param attrType
|
* @return
|
*/
|
DocInfo getByDocAttrAndDocId(String docId, Integer attrType, String attributeId);
|
|
/**
|
* 文档预览
|
* @param id
|
* @return
|
*/
|
DocFile previewDocFile(String id);
|
|
/**
|
* 删除产品下的所有文档
|
* @param productId
|
* @return
|
*/
|
boolean deleteByProductId(String productId);
|
|
/**
|
* 删除部件下的所有文档
|
* @param componentId
|
* @return
|
*/
|
boolean deleteByComponentId(String componentId);
|
|
/**
|
* 删除零件下的所有文档
|
* @param partsId
|
* @return
|
*/
|
boolean deleteByPartsId(String partsId);
|
|
/**
|
* 删除设备下的所有文档
|
* @param deviceId
|
* @return
|
*/
|
boolean deleteByDeviceId(String deviceId);
|
|
/**
|
* 删除工序下的所有文档
|
* @param processId
|
* @return
|
*/
|
boolean deleteByProcessId(String processId);
|
|
/**
|
* 删除工步下的所有文档
|
* @param stepId
|
* @return
|
*/
|
boolean deleteByStepId(String stepId);
|
|
/**
|
* 删除文档信息
|
* @param attrType
|
* @param attrId
|
* @return
|
*/
|
boolean deleteByDocAttr(Integer attrType, String attrId);
|
|
/**
|
* 出库
|
* @param request
|
* @param response
|
* @param id
|
* @return
|
*/
|
ResponseResult pullDocFile(HttpServletRequest request, HttpServletResponse response, String id);
|
|
/**
|
* 根据文档名称/绑定类型查找唯一的文档信息
|
* @param docName
|
* @param attrType
|
* @param attrId
|
* @return
|
*/
|
DocInfo findByAttrAndDocName(String docName, Integer attrType, String attrId);
|
|
/**
|
* 校验文档名称是否存在重复
|
* @param docName
|
* @param attrType
|
* @param attrId
|
* @param docId
|
* @return
|
*/
|
DocInfo findByAttrAndDocNameNotThis(String docName, Integer attrType, String attrId, String docId);
|
|
/**
|
*
|
* @param docId
|
* @return
|
*/
|
List<DocInfo> getByDocId(String docId);
|
|
/**
|
* 查询设备发送目录的文档状态
|
* @param page
|
* @param size
|
* @param docQuery
|
* @return
|
*/
|
IPage<DocInfo> findPageListByDevice(int page, int size, DocInfoQueryRequest docQuery);
|
|
/**
|
* 查询可指派的文档信息列表
|
* @param docQuery
|
* @return
|
*/
|
List<DocInfo> findList(DocInfoQueryRequest docQuery);
|
|
/**
|
* 获取一组工序下的文档信息列表
|
* @param streams
|
* @return
|
*/
|
List<DocInfo> getByProcessIds(List<ProcessStream> streams);
|
|
/**
|
* 批量删除文档接口
|
* @param docIds
|
* @return
|
*/
|
boolean batchRemoveDocInfo(String[] docIds);
|
|
/**
|
* 文档下载
|
* @param request
|
* @param response
|
* @param id
|
* @return
|
*/
|
ResponseResult downloadDocFile(HttpServletRequest request, HttpServletResponse response, String id);
|
}
|