李林
2023-10-07 658d4927d468c47208fd012d9128b09249c07eff
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
package com.chinaztt.mes.quality.service;
 
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.chinaztt.mes.quality.dto.ReportSampleDTO;
import com.chinaztt.mes.quality.dto.ReportSampleItemDTO;
import com.chinaztt.mes.quality.entity.ReportSample;
import com.chinaztt.mes.quality.entity.ReportSampleAttachment;
import com.chinaztt.mes.quality.entity.ReportSampleItem;
import com.chinaztt.ztt.common.core.util.R;
import org.springframework.web.multipart.MultipartFile;
 
import javax.servlet.http.HttpServletResponse;
import java.util.List;
 
/**
 * 检测汇报样品表
 *
 * @author cxf
 * @date 2021-04-06 14:29:44
 */
public interface ReportSampleService extends IService<ReportSample> {
 
    /**
     * 新增检测汇报样品表
     *
     * @param reportSampleList
     * @return
     */
    boolean saveBatchList(List<ReportSample> reportSampleList);
 
    /**
     * 查询
     *
     * @param gen
     * @return
     */
    List<ReportSampleDTO> getReportSampleList(QueryWrapper<ReportSampleDTO> gen);
 
    /**
     * 删除
     *
     * @param id
     * @return
     */
    boolean deleteById(Long id);
 
    /**
     * 通过id查询样品检测项目
     *
     * @param reportSampleDTO
     * @return
     */
    List<ReportSampleItemDTO> getSampleItemsById(ReportSampleDTO reportSampleDTO);
 
    /**
     * 通过id查询样品检测项目(含字典项)
     *
     * @param reportSampleDTO
     * @return
     */
    List<ReportSampleItemDTO> getSampleSysItemsById(ReportSampleDTO reportSampleDTO);
 
    /**
     * 上传文件
     *
     * @param file
     * @param sampleId
     * @return
     */
    R uploadFile(MultipartFile file, Long sampleId);
 
    /**
     * 通过文件名删除附件
     *
     * @param fileName
     * @return
     */
    R deleteFile(String fileName);
 
    /**
     * 通过id查询检测汇报样品附件
     *
     * @param id
     * @return
     */
    List<ReportSampleAttachment> getReportSampleAttachment(Long id);
 
    /**
     * 获取文件
     *
     * @param bucket
     * @param fileName
     * @param response
     */
    void getFile(String bucket, String fileName, HttpServletResponse response);
 
    /**
     * 新增自检结果,自动创建汇报单/汇报零件
     *
     * @param reportSampleDTO
     * @return
     */
    ReportSampleDTO saveSelfSampleItem(ReportSampleDTO reportSampleDTO);
 
    /**
     * 通过系统编号/制造订单号查询自检汇报样品表
     *
     * @param reportSampleDTO
     * @return
     */
    ReportSampleDTO getReportSampleForSelf(ReportSampleDTO reportSampleDTO);
 
    /**
     * 自检完移库操作
     *
     * @param reportSampleDTO
     * @return
     */
    ReportSampleDTO autoMoveStock(ReportSampleDTO reportSampleDTO);
 
    /**
     * 判定合格校验
     *
     * @param reportSampleDTO
     * @return
     */
    R judgmentSampleCheck(ReportSampleDTO reportSampleDTO);
 
    /**
     * 通过id判定合格
     *
     * @param reportSampleDTO
     * @return
     */
    ReportSampleDTO autoJudgmentSample(ReportSampleDTO reportSampleDTO);
 
    /**
     * 通过id修改
     *
     * @param reportSample
     * @return
     */
    ReportSample updateSampleById(ReportSample reportSample);
 
    /**
     * 通过id修改
     *
     * @param reportSample
     * @return
     */
    ReportSample updateSampleByIdV2(ReportSample reportSample);
 
    /**
     * 判断单条检测项
     * @param reportSampleItemDTO
     * @return
     */
    ReportSampleItemDTO autoJudgmentSampleSingle(ReportSampleItemDTO reportSampleItemDTO);
 
 
    /**
     * 大表数采
     * @param id
     * @param sn
     * @return
     */
    List<ReportSampleItemDTO> dataAcquisition(Long id,String sn);
 
    boolean insert(ReportSample reportSample);
 
    List<String> getTestStandardNoBySnOrPartId(String partBatchNo, Long partId, String testType);
}