lxp
2025-03-15 5a697e6fafbe3855336ca5fd7e1785de12840d16
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
package com.ruoyi.inspect.mapper;
 
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.inspect.dto.*;
import com.ruoyi.inspect.pojo.InsOrder;
import com.ruoyi.inspect.vo.DeviceVO;
import com.ruoyi.inspect.vo.ExportInsProductVO;
import com.ruoyi.inspect.vo.SampleDefectsFatherVo;
import com.ruoyi.inspect.vo.UnInsProductsVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
 
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
 
/**
 * @author gaoaoy
 * @description 针对表【ins_order(检验下单)】的数据库操作Mapper
 * @createDate 2024-03-12 16:17:55
 * @Entity com.ruoyi.inspect.pojo.InsOrder
 */
@Mapper
public interface InsOrderMapper extends BaseMapper<InsOrder> {
    // 获取检验任务查看结果表格数据
    List<Map<String,Object>> getInsOrderPlanList(@Param("sonLaboratory") String sonLaboratory,
                                                 @Param("entrustCode") String entrustCode,
                                                 @Param("sampleCode") String sampleCode,
                                                 @Param("createUser") Integer createUser,
                                                 @Param("startTime") String startTime,
                                                 @Param("endTime") String endTime,
                                                 @Param("sampleType")String sampleType);
 
    //动态获取tab表头
    List<Map<String,Object>> getTabHeader(@Param("sonLaboratory") String sonLaboratory,@Param("sample") String sample);
 
    //获取检验下单数据
    IPage<SampleOrderDto> selectInsOrderPage(IPage<InsOrder> page, @Param("ew") QueryWrapper<SampleOrderDto> ew, @Param("laboratory") String laboratory,
                                             @Param("startTime") String startTime,
                                             @Param("endTime") String endTime,
                                             @Param("eqState") String eqState,
                                             @Param("neState") String neState
    );
 
    // 获取导出已检验数据
    List<ExportInsProductVO> exportChecked(@Param("names") List<String> names, @Param("startTime") String startTime, @Param("endTime") String endTime);
 
 
    //修改检验下单数据
    int upInsOrderParameter(InsOrder itemParameter);
 
    String getLaboratoryCode(String name);
 
    List<SampleProductDto2> selectSampleAndProductByOrderId(@Param("ew") QueryWrapper<SampleProductDto2> ew, @Param("id") Integer id);
 
    IPage<CostStatisticsDto> selectCostStatistics(IPage<CostStatisticsDto> page, QueryWrapper<CostStatisticsDto> ew, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("laboratory") String laboratory);
 
    List<CostStatisticsDto> selectCostStatistics2(@Param("ew") QueryWrapper<CostStatisticsDto> ew,@Param("startTime") String startTime, @Param("endTime") String endTime,@Param("laboratory") String laboratory);
 
    DeviceVO selectDeviceList(String name);
    List<SampleDefectsFatherVo> selectSampleDefects(Page page, @Param("inspectionItems") String inspectionItems, @Param("orderNumber") String orderNumber);
 
    Long getCount(@Param("inspectionItems") String inspectionItems, @Param("orderNumber") String orderNumber);
 
    String getEnumLabelByValue(String value);
 
    String getStandardMethodCode(Integer id);
 
    int updateStatus( Integer id);
 
    String selLaboratoryCode(String laboratory);
 
    List<Map<Integer, Object>> selectReportModelByOrderId(@Param("id") Integer id, @Param("laboratory") String laboratory);
 
    String seldepLimsId(int depLimsId);
    // 获取部门
    String getDepartment(Integer id);
 
    /**
     * 委托费用
     */
    List<CommissionFeesDto> selectCommissionFees(@Param("laboratory") String laboratory, @Param("company") String company, @Param("startTime") String startTime, @Param("endTime") String endTime);
 
    List<UnInsProductsVO> selectUnInsProducts(@Param("laboratory")String laboratory,
                                              @Param("startDateTime")LocalDateTime startDateTime,
                                              @Param("endDateTime")LocalDateTime endDateTime,
                                              @Param("dto") UnInsProductsDTO unInsProductsDTO);
 
    IPage<TasksShowDto> getTasksShow(Page page, @Param("sonLaboratory") String sonLaboratory);
 
    Map<String,Object> selectCurrentCompanyUrgentQuota(Integer userId);
 
    int selectPlanCountBySonLaboratory(
            @Param("sonLaboratory") String sonLaboratory,
            @Param("startOfMonth")LocalDateTime startOfMonth,
            @Param("endOfMonth")LocalDateTime endOfMonth);
 
    List<ExportInsProductVO> getInsOrderTemList(@Param("entrustCode") String entrustCode,
                                                @Param("sampleCode") String sampleCode,
                                                @Param("startTime") String startTime,
                                                @Param("endTime") String endTime,
                                                @Param("checkName") String checkName
    );
}