退料接收时,检查结算表拿到待退料数量,防止多退
This commit is contained in:
parent
bf33534597
commit
262cd6d595
|
|
@ -286,6 +286,11 @@ public class BackApplyInfo extends BaseEntity {
|
|||
*/
|
||||
private String finishedBackNum;
|
||||
|
||||
/**
|
||||
* 此协议号最大剩余退料数
|
||||
*/
|
||||
private String maxBackNum;
|
||||
|
||||
@ApiModelProperty(value = "详情id和数量")
|
||||
private String detailsIdByNum;
|
||||
|
||||
|
|
|
|||
|
|
@ -672,15 +672,18 @@
|
|||
bad.pre_num as preNum,
|
||||
bad.audit_num as auditNum,
|
||||
bad.status as status,
|
||||
IFNULL(sai.num, 0) as max_back_num,
|
||||
IFNULL(bad.audit_num,0)-IFNULL(aa.back_num,0) as num,
|
||||
IFNULL(bb.finished_back_num, 0) as finished_back_num,
|
||||
mt.manage_type as manageType,
|
||||
bb.finished_back_num,
|
||||
mtk.user_id,
|
||||
CONCAT('NSJJ',mt.`code`,mt.model_code) as `code`
|
||||
FROM
|
||||
back_apply_details bad
|
||||
LEFT JOIN back_apply_info bai on bai.id=bad.parent_id
|
||||
LEFT JOIN tm_task_agreement tta on tta.task_id=bai.task_id
|
||||
LEFT JOIN (select agreement_id, sum(IFNULL(num, 0)) as num from slt_agreement_info where status=0
|
||||
group by agreement_id) sai on tta.agreement_id=sai.agreement_id
|
||||
LEFT JOIN ma_type mt on mt.type_id=bad.type_id
|
||||
LEFT JOIN ma_type mt2 ON mt2.type_id=mt.parent_id
|
||||
LEFT JOIN ma_type_keeper mtk on mt.type_id=mtk.type_id
|
||||
|
|
|
|||
Loading…
Reference in New Issue