Fixiaobai
2023-11-16 d8d129a2e41f7099968cb4f4dc1b028ab985135f
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
package com.chinaztt.mes.plan.service;
 
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.chinaztt.mes.plan.dto.*;
import com.chinaztt.mes.plan.entity.MasterProductionSchedule;
import com.chinaztt.mes.plan.entity.OperationTaskProduce;
import com.chinaztt.ztt.common.core.util.R;
 
import java.util.List;
 
/**
 * 主生产计划
 *
 * @author cxf
 * @date 2020-09-23 14:42:39
 */
public interface MasterProductionScheduleService extends IService<MasterProductionSchedule> {
    /**
     * Description: 分页
     *
     * @param page
     * @param masterProductionScheduleDTO
     * @return IPage<List                                                               <                                                               MasterProductionScheduleDTO>>
     */
    IPage<List<MasterProductionScheduleDTO>> getMasterProductionSchedulePage(Page page, QueryWrapper<MasterProductionScheduleDTO> masterProductionScheduleDTO);
 
    /**
     * @param id
     * @return
     */
    MasterProductionScheduleDTO getByIdExt(Long id);
 
    /**
     * Description: 加载主生产计划来源
     *
     * @param id
     * @return List<PlanMpsSource>
     */
    List<MpsSourceDTO> loadMasterPlanSourceById(Long id);
 
    /**
     * Description: 修改来源的计划数量
     *
     * @param customerOrderDTO
     * @return
     */
    boolean updateQtyPlaned(CustomerOrderDTO customerOrderDTO);
 
    /**
     * 保存bom结构
     *
     * @param list
     * @param mpsId
     * @return
     */
    List<MpsStructureComponentDTO> saveMpsStructureComponent(List<MpsStructureComponentDTO> list, Long mpsId);
 
    /**
     * 根据id删除bom结构
     *
     * @param id
     * @return
     */
    boolean deleteMpsStructureComponentById(Long id);
 
    /**
     * 通过id查询bom结构
     *
     * @param id
     * @return
     */
    List<MpsStructureComponentTreeNode> getMpsStructureComponentByMpsId(Long id);
 
    /**
     * 新增bom结构
     *
     * @param mpsStructureComponentDTO
     * @param mpsId
     * @return
     */
    MpsStructureComponentDTO insertMpsStructureComponent(MpsStructureComponentDTO mpsStructureComponentDTO, Long mpsId);
 
    /**
     * 修改bom结构
     *
     * @param mpsStructureComponentDTO
     * @return
     */
    boolean updateMpsStructureComponent(MpsStructureComponentDTO mpsStructureComponentDTO);
 
    /**
     * Description: 改变状态
     *
     * @param ids
     * @param event
     * @return
     * @date: 2020/11/19 11:06
     */
    boolean changeState(List<Long> ids, String event);
 
    /**
     * 通过id加载下发的订单
     *
     * @param id
     * @return
     */
    List<OutsourcingOrderDTO> loadOrder(Long id);
 
    /**
     * 通过id加载主生产计划来源(客户订单)
     *
     * @param id
     * @return
     */
    List<CustomerOrderDTO> loadMasterPlanSourceByCustomer(Long id);
 
    /**
     * 订单行关联工艺文件
     *
     * @param ids
     * @param docId
     * @return
     */
    R handleDocument(List<Long> ids, Long docId);
 
    /**
     * 取消关联工艺文件
     *
     * @param ids
     * @return
     */
    R rejectHandleDocument(List<Long> ids);
 
    /**
     * oa对接
     *
     * @param id
     * @return
     */
    R oa(Long id);
 
    /**
     * 手动修改审核状态
     *
     * @param id
     * @param status
     * @return
     */
    R changeAudit(Long id, String status);
 
    /**
     * 根据零件号查询可用性计划
     *
     * @param partNo
     * @return
     */
    R queryInventUseablePlanStd(String partNo);
 
    /**
     * 查询工艺文件产品结构和工艺路线是否同步ifs
     *
     * @param id
     * @return
     */
    R checkIfsSync(Long id);
 
    /**
     * 查询理论用量数据
     *
     * @param id
     */
    R getTheoryQuantity(Long id, List<OperationTaskProduce> operationTaskProduceList);
 
    /**
     * 手动新增生产计划
     *
     * @param masterProductionSchedule
     * @return
     */
    R doAdd(MasterProductionSchedule masterProductionSchedule);
 
    /**
     * 根据id 获取计划
     *
     * @param id
     * @return
     */
    MasterProductionScheduleDTO getById(Long id);
 
    boolean addPlanPurchasing(List<MasterProductionSchedule>masterProductionSchedules);
}