李林
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
package com.chinaztt.mes.plan.mapper;
 
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.SqlParser;
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.chinaztt.mes.plan.dto.CustomerOrderDTO;
import com.chinaztt.mes.plan.dto.CustomerOrderExportData;
import com.chinaztt.mes.plan.dto.OADetailDTO;
import com.chinaztt.mes.plan.entity.CustomerOrder;
import com.chinaztt.mes.plan.entity.OrderParam;
import com.chinaztt.mes.plan.excel.CustomerOrderData;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
 
import java.util.List;
 
/**
 * 客户订单表
 *
 * @author cxf
 * @date 2020-09-14 16:35:26
 */
@Mapper
public interface CustomerOrderMapper extends BaseMapper<CustomerOrder> {
 
    /**
     * 分页查询客户订单
     *
     * @param page
     * @param planCustomerOrder
     * @param type
     * @return
     */
    IPage<List<CustomerOrderDTO>> getCustomerOrderPage(Page page, @Param("ew") QueryWrapper<CustomerOrder> planCustomerOrder, @Param("type") String type);
 
    /**
     * 获取客户订单和绑定的订单参数
     *
     * @param id
     * @param orderParam
     * @return
     */
    @SqlParser(filter = true)
    JSONObject getCustomerOrderById(@Param("orderId") Long id, @Param("query") OrderParam orderParam);
 
    JSONObject getCustomerOrderByIdnew(@Param("orderId") Long id);
 
    /**
     * 根据主计划获取对应的客户订单
     *
     * @param id
     * @return
     */
    List<CustomerOrder> getCustomerOrder(Long id);
 
    /**
     * 根据制造订单id获取对应的客户订单
     *
     * @param id
     * @return
     */
    List<CustomerOrder> getCustomerOrderByOrder(Long id);
 
    List<CustomerOrder> getCustomerOrderBySchedule(Long id);
 
    /**
     * Description: 通过制造订单id查询客户订单
     *
     * @param id
     * @return List<CustomerOrder>
     */
    List<CustomerOrder> getCustomer(Long id);
 
    /**
     * 通过id加载主生产计划来源(客户订单)
     *
     * @param id
     * @return
     */
    List<CustomerOrderDTO> loadMasterPlanSourceByCustomer(Long id);
 
    /**
     * 解除关联工艺文件
     *
     * @param id
     */
    void rejectHandleDocument(@Param("id") Long id);
 
    /**
     * 根据SN号获取客户订单的信息
     *
     * @param sn
     * @return
     */
    CustomerOrder getCustomerOrderByProductOutput(@Param("sn") String sn);
 
    /**
     * 查询导出数据
     *
     * @param wrapper
     * @return
     */
    List<CustomerOrderData> getExport(@Param("ew") QueryWrapper<CustomerOrderDTO> wrapper);
 
    List<String> getPartNamesByOrderNo(@Param("customerOrderNo") String customerOrderNo);
 
    CustomerOrderExportData getCustomerOrderExportData(@Param("id") Long id);
 
    /**
     * 查询OA工艺详情页面
     *
     * @param ids
     * @return
     */
    List<OADetailDTO> getOADetail(@Param("ids") List<Long> ids);
 
 
    /**
     * 查询订单,工艺文件,零件表
     *
     * @param ids
     * @return
     */
    List<CustomerOrderDTO> selectOrderDocAndPart(@Param("ids") List<Long> ids);
 
 
    /**
     * 通过计划订单号获取客户订单表
     *
     * @param id
     * @return
     */
    CustomerOrder getCustomerOrderByScheduleId(@Param("id") Long id);
 
    /**
     * 查询该订单号下除原本编辑订单行外的其他订单行记录
     *
     * @param customerOrderNo
     * @param id
     * @return
     */
    List<CustomerOrderDTO> getByCustomerOrderNo(@Param("customerOrderNo") String customerOrderNo, @Param("id") Long id);
 
    IPage<String> getAuditedOrderNoPage(@Param("customerOrderNo") String customerOrderNo, Page page);
 
    CustomerOrder getCustomerOrderNoByOperationTaskId(@Param("taskId") Long taskId);
}