1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
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);
}