From 23855599412c4d61b38d78f0f3abd3430a48b5b1 Mon Sep 17 00:00:00 2001 From: zhangherong <571457620@qq.com> Date: 星期三, 25 六月 2025 11:51:38 +0800 Subject: [PATCH] Merge branch 'mdc_hyjs_master' --- lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/IDocInfoService.java | 270 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 270 insertions(+), 0 deletions(-) diff --git a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/IDocInfoService.java b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/IDocInfoService.java new file mode 100644 index 0000000..15990e5 --- /dev/null +++ b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/IDocInfoService.java @@ -0,0 +1,270 @@ +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.request.DocInfoQueryRequest; +import org.jeecg.modules.dnc.request.DocInfoUploadRequest; +import org.jeecg.modules.dnc.response.ResponseResult; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.File; +import java.io.FileNotFoundException; +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,String attrType,String attrId); + /** + * 鐩戞帶鏂囦欢瀵煎叆 + * @param pathFile + * @return + */ + boolean addDocInfoRec(String pathFile,File fileRec); + + /** + * 瑙f瀽NC鏂囨。閫氱敤鏂规硶锛堝伐鎺цВ鏋愭秹瀵嗭級 + * @param pathFile,fileRec + * @return + */ + boolean addDocInfoAnalysisGwNcService(String pathFile,File fileRec) throws FileNotFoundException; + + /** + * 绋嬪簭鍥炰紶锛堟秹瀵嗚В鏋愬伐鎺э級 + * @param pathFile + */ + boolean addDocInfoAnalysisSmwNcService(String pathFile,File fileRec); + + /** + * 鏂囨。瑙f瀽 + * @param equipmentId + * @param fileRec + * @param fileNameSuffix + * @param fileNameNew + * @param filePath + * @return + */ + 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); + + /** + * 鏍规嵁鏂囨。鍚嶇О/缁戝畾绫诲瀷鏌ユ壘鍞竴鐨勬枃妗d俊鎭� + * @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); + + /** + * 閫氳繃涓�缁刟ttributionId,docClassCode,attributionType鏌ヨ鍙寚娲剧殑鏂囨。淇℃伅鍒楄〃 + * @param docQuery + * @return + */ + List<DocInfo> findListByDocQuery(DocInfoQueryRequest docQuery); + + + /** + * 鑾峰彇涓�缁勫伐搴忎笅鐨勬枃妗d俊鎭垪琛� + * @param streams + * @return + */ + List<DocInfo> getByProcessIds(List<ProcessStream> streams); + + /** + * 鎵归噺鍒犻櫎鏂囨。鎺ュ彛 + * @param docIds + * @return + */ + boolean batchRemoveDocInfo(String[] docIds,String attrType,String attrId); + + /** + * 鏂囨。涓嬭浇 + * @param request + * @param response + * @param id + * @return + */ + ResponseResult downloadDocFile(HttpServletRequest request, HttpServletResponse response, String id); +} -- Gitblit v1.9.3