gaoluyang
昨天 8c65f898ed6e5b0c7a94c792c4562f6ec831dccd
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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
package cn.iocoder.yudao.module.mes.dal.dataobject.pro.feedback;
 
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import cn.iocoder.yudao.module.mes.dal.dataobject.md.item.MesMdItemDO;
import cn.iocoder.yudao.module.mes.dal.dataobject.md.workstation.MesMdWorkstationDO;
import cn.iocoder.yudao.module.mes.dal.dataobject.pro.route.MesProRouteDO;
import cn.iocoder.yudao.module.mes.dal.dataobject.pro.process.MesProProcessDO;
import cn.iocoder.yudao.module.mes.dal.dataobject.pro.workorder.MesProWorkOrderDO;
import cn.iocoder.yudao.module.mes.enums.pro.MesProFeedbackStatusEnum;
import cn.iocoder.yudao.module.mes.enums.pro.MesProFeedbackTypeEnum;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;
 
import java.math.BigDecimal;
import java.time.LocalDateTime;
import cn.iocoder.yudao.module.mes.enums.DictTypeConstants;
 
/**
 * MES 生产报工 DO
 *
 * @author 超级管理员
 */
@TableName("mes_pro_feedback")
@KeySequence("mes_pro_feedback_seq")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class MesProFeedbackDO extends BaseDO {
 
    /** 首次提交时的关联设备编号快照,逗号分隔;旧历史记录不反推。 */
    private String machineryIds;
    /**
     * 主计价设备编号(每次报工使用的设备,工资单价按此设备匹配规则)
     *
     * 关联 {@link cn.iocoder.yudao.module.mes.dal.dataobject.dv.machinery.MesDvMachineryDO#getId()}
     */
    private Long machineryId;
 
    /**
     * 编号
     */
    @TableId
    private Long id;
    /**
     * 报工单编号
     */
    private String code;
    /**
     * 报工类型
     *
     * 字典 {@link DictTypeConstants#MES_PRO_FEEDBACK_TYPE}
     * 枚举 {@link MesProFeedbackTypeEnum}
     */
    private Integer type;
    // TODO @芋艿:这个字段,暂时没使用到;
    /**
     * 报工途径
     *
     * 字典类型 mes_pro_feedback_channel
     */
    private String channel;
    /**
     * 报工时间
     */
    private LocalDateTime feedbackTime;
    /**
     * 工作站编号
     *
     * 关联 {@link MesMdWorkstationDO#getId()}
     */
    private Long workstationId;
    /**
     * 工艺路线编号
     *
     * 关联 {@link MesProRouteDO#getId()}
     */
    private Long routeId;
    /**
     * 工序编号
     *
     * 关联 {@link MesProProcessDO#getId()}
     */
    private Long processId;
    /**
     * 生产工单编号
     *
     * 关联 {@link MesProWorkOrderDO#getId()}
     */
    private Long workOrderId;
    // TODO @芋艿:这里待关联;
    /**
     * 生产任务编号
     */
    private Long taskId;
    /**
     * 产品物料编号(冗余自任务)
     *
     * 关联 {@link MesMdItemDO#getId()}
     */
    private Long itemId;
    /**
     * 过期日期
     */
    private LocalDateTime expireDate;
    /**
     * 生产批号
     *
     * TODO @芋艿:预留字段,当前未启用
     */
    private String lotNumber;
    /**
     * 排产数量
     */
    private BigDecimal scheduledQuantity;
    /**
     * 本次报工数量
     */
    private BigDecimal feedbackQuantity;
    /**
     * 合格品数量
     */
    private BigDecimal qualifiedQuantity;
    /**
     * 不良品数量
     */
    private BigDecimal unqualifiedQuantity;
    /**
     * 待检测数量
     */
    private BigDecimal uncheckQuantity;
    /**
     * 工废数量
     */
    private BigDecimal laborScrapQuantity;
    /**
     * 料废数量
     */
    private BigDecimal materialScrapQuantity;
    /**
     * 其他废品数量
     */
    private BigDecimal otherScrapQuantity;
    /**
     * 报工用户编号
     *
     * 关联 AdminUserDO#getId()
     */
    private Long feedbackUserId;
    /**
     * 计费类型快照
     *
     * 枚举 {@link cn.iocoder.yudao.module.mes.enums.pro.MesProProcessBillingTypeEnum}
     */
    private Integer billingType;
    /**
     * 工资定额快照
     *
     * 计时:元/小时;计件:元/件
     */
    private BigDecimal wageRate;
    /**
     * 命中的工序工资单价规则编号,空=使用工序默认工资定额
     *
     * 关联 {@link cn.iocoder.yudao.module.mes.dal.dataobject.pro.wage.MesProProcessWageRuleDO#getId()}
     */
    private Long wageRuleId;
    /**
     * 质量合格率(%),仅质检工序
     */
    private BigDecimal qualityPassRate;
    /**
     * 质量系数,仅质检工序且命中“合格率系数”规则
     */
    private BigDecimal qualityCoefficient;
    /**
     * 质量扣款,仅质检工序且命中“不合格扣款”规则
     */
    private BigDecimal qualityDeduction;
    /**
     * 本次报工工时(小时)
     *
     * 计时计薪的工序必填
     */
    private BigDecimal workHours;
    /**
     * 本次报工工资
     *
     * 计时 = 工时 × 工资定额;计件 = 报工数量 × 工资定额
     */
    private BigDecimal wageAmount;
    /**
     * 辅助计薪工时(小时)
     */
    private BigDecimal auxPaidHours;
    /**
     * 本次辅助工资
     */
    private BigDecimal auxWageAmount;
    /**
     * 工资计算明细快照(JSON)
     */
    private String wageBreakdown;
    /**
     * 本次生产长度(米),仅用于计算标准工时
     */
    private BigDecimal productionLength;
    /**
     * 标准工时(小时),只用于考核对比,不参与工资计算
     */
    private BigDecimal standardWorkHours;
    /**
     * 标准工时-主工时(小时)
     */
    private BigDecimal standardPrimaryHours;
    /**
     * 标准工时-辅助工时(小时)
     */
    private BigDecimal standardAuxHours;
    /**
     * 标准工时计算依据快照
     */
    private String stdCalcNote;
    /**
     * 审核用户编号
     *
     * 关联 AdminUserDO#getId()
     */
    private Long approveUserId;
    /**
     * 状态
     *
     * 字典 {@link DictTypeConstants#MES_PRO_FEEDBACK_STATUS}
     * 枚举 {@link MesProFeedbackStatusEnum}
     */
    private Integer status;
    /**
     * 备注
     */
    private String remark;
 
    /**
     * BPM 流程实例编号
     */
    private String processInstanceId;
 
    /**
     * BPM 流程定义 Key
     */
    private String processDefinitionKey;
 
}