李林
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
package com.chinaztt.mes.quality.mapper;
 
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.chinaztt.mes.quality.dto.DockingIfsConditionActiveDTO;
import com.chinaztt.mes.quality.dto.IfsOperationReportDTO;
import com.chinaztt.mes.quality.dto.IfsOperationScrapDTO;
import com.chinaztt.mes.quality.dto.SubmitReportDTO;
import com.chinaztt.mes.quality.entity.Report;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
 
import java.util.List;
 
/**
 * 检测汇报表
 *
 * @author cxf
 * @date 2021-04-06 14:29:39
 */
@Mapper
public interface ReportMapper extends BaseMapper<Report> {
    /**
     * 根据SN号获取检测申请类型(同一个SN号可能会有多条检测申请,多条检测申请对应的检测申请类型可能会不一致)
     * @param sn
     * @return
     */
    List<String> getApplyTypeBySN(@Param("sn") String sn);
 
    /**
     * 根据SN号更新检测申请明细表的report_id
     * @param sn
     * @param reportId 检测汇报id
     */
    void updateApplyPartReportId(@Param("sn") String sn,@Param("reportId") long reportId);
 
    /**
     * 根据检测汇报主表id更新检测汇报记录行状态
     * @param reportId 检测汇报主表行id
     * @param state t:已提交;f:未提交
     */
    void updateQualityReportSubmitState(@Param("reportId") long reportId,@Param("state") Boolean state);
 
    /**
     * 根据产出明细的系统编号更细产出明细是否同步ifs状态标记
     * @param systemNo 系统编号
     * @param isSynIfs t:已提交;f:未提交
     */
    void updateProductOutIsSynIfs(@Param("systemNo") String systemNo,@Param("isSynIfs") Boolean isSynIfs);
 
    /**
     * 根据检测汇报明细行id获取车间订单信息
     * @param applyPartId 检测汇报明细行id
     */
    SubmitReportDTO getManufacturingOrderInfo(@Param("applyPartId") Long applyPartId);
 
    /**
     * 根据工作站id及库位类型码获取mes库位对应的ifs库位
     * @param workstationId
     * @param locationType 库位类型码(1:投料库位 2.产出待检库位 3.产出不合格库位 4.产出合格库位 5.机台已投料库位)
     * @return
     */
    String getIfsLocationArrivedByWorkstationId(@Param("workstationId") Long workstationId,@Param("locationType") Long locationType);
 
    /**
     * 根据产出明细系统编号判断产出对应的工序是否是最后一道工序
     * @param systemNo 产出明细系统编号
     * @return true:是最后一道工序;false:非最后一道工序
     */
    List<Boolean> isProdOutLastOperationBySystemNo(@Param("systemNo") String systemNo);
 
    /**
     * 根据汇报材料id获取检测汇报对接ifs条件结果状态
     * @param id 汇报材料id
     * @return
     */
    DockingIfsConditionActiveDTO getDockingIfsConditionActive(@Param("id") Long id);
 
    /**
     * 根据批次号获取ifs工序报废批量标识
     * @param batchNo 批次号
     * @return 工序报废批量标识
     */
    IfsOperationScrapDTO.DataBean getIfsOperationScrapDTODataBeanByBatchNo(@Param("batchNo") String batchNo);
 
    /**
     * 根据产出系统编号获取ifs工序报工批量标识
     * @param systemNo 产出系统编号
     * @return 工序报工批量标识
     */
    IfsOperationReportDTO.DataBean getIfsOperationReportDTOBeanBySystemNo(@Param("systemNo") String systemNo);
 
    /**
     * 根据制造订单id获取该制造订单下所有的ifs工序号
     * @param moId 制造订单id
     * @return
     */
    List<Integer> getIfsOperationReportAllOperationNo(@Param("moId") Long moId);
}