退料接收时,检查结算表拿到待退料数量,防止多退
This commit is contained in:
parent
03bc1e1195
commit
a23651a16c
|
|
@ -190,7 +190,7 @@ public class BackReceiveController extends BaseController {
|
|||
}
|
||||
}
|
||||
|
||||
@Log(title = "退料接收-结束任务", businessType = BusinessType.MATERIAL)
|
||||
//@Log(title = "退料接收-结束任务", businessType = BusinessType.MATERIAL)
|
||||
@PreventRepeatSubmit
|
||||
@PostMapping("endBack")
|
||||
public AjaxResult endBack(@RequestBody BackApplyInfo record) {
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
|||
}
|
||||
//修改任务状态
|
||||
List<BackApplyInfo> list = backReceiveMapper.receiveView2(record);
|
||||
boolean allZeros = list.stream().allMatch(n -> Double.valueOf(n.getNum()).intValue() == 0);
|
||||
boolean allZeros = list.stream().allMatch(n -> Double.valueOf(n.getMaxBackNum()).intValue() == 0);
|
||||
if (allZeros) {
|
||||
res = updateTaskStatus(taskId, 40);
|
||||
if (res == 0) {
|
||||
|
|
|
|||
|
|
@ -730,15 +730,18 @@
|
|||
bad.pre_num as preNum,
|
||||
bad.audit_num as auditNum,
|
||||
bad.status as status,
|
||||
IFNULL(bad.audit_num,0)-IFNULL(aa.back_num,0) as num,
|
||||
IFNULL(sai.num, 0) as max_back_num,
|
||||
IFNULL(aa.back_num,0) as in_completed_back_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,type_id, sum(IFNULL(num, 0)) as num from slt_agreement_info where status=0
|
||||
group by agreement_id,type_id) sai on tta.agreement_id=sai.agreement_id and sai.type_id=bad.type_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
|
||||
|
|
@ -749,7 +752,7 @@
|
|||
FROM
|
||||
back_check_details
|
||||
WHERE
|
||||
parent_id=#{parentId}
|
||||
parent_id=#{parentId} and is_finished is null
|
||||
GROUP BY type_id
|
||||
) aa on aa.typeId=bad.type_id
|
||||
LEFT JOIN (
|
||||
|
|
|
|||
Loading…
Reference in New Issue