领料申请时成套机具增加库存数量
This commit is contained in:
parent
fd18e83ced
commit
7bd381bb7f
|
|
@ -59,4 +59,7 @@ public class MaWholeVo {
|
|||
/** 套装所需配件数量 */
|
||||
@ApiModelProperty(value = "套装所需配件种类数量")
|
||||
private Integer totalNum;
|
||||
/** 库存数量 */
|
||||
@ApiModelProperty(value = "库存数量")
|
||||
private Integer num;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,12 +100,24 @@
|
|||
mt2.type_name AS typeName,
|
||||
mt.type_name AS deviceType,
|
||||
mws.whole_type_name as wholeTypeName,
|
||||
CASE mt.manage_type
|
||||
WHEN 0 THEN
|
||||
IFNULL(subquery0.num, 0)
|
||||
ELSE
|
||||
IFNULL(mt.num, 0)
|
||||
END as num,
|
||||
case when mws.ascription_type = 1 then '主体设备' else '配套设备' end as deviceAscription,
|
||||
mws.ascription_type as ascriptionType,
|
||||
mws.part_num AS deviceNum
|
||||
FROM
|
||||
ma_whole_set mws
|
||||
JOIN ma_type mt ON mws.type_id = mt.type_id
|
||||
left join (SELECT mt.type_id,
|
||||
count(mm.ma_id) num
|
||||
FROM ma_machine mm
|
||||
LEFT JOIN ma_type mt ON mt.type_id = mm.type_id
|
||||
WHERE mm.ma_code is not null and mm.ma_status in (15)
|
||||
GROUP BY mt.type_id) AS subquery0 ON subquery0.type_id = mt.type_id
|
||||
JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
|
||||
JOIN ma_type mt3 ON mt3.type_id = mt2.parent_id
|
||||
JOIN ma_type mt4 ON mt4.type_id = mt3.parent_id
|
||||
|
|
|
|||
Loading…
Reference in New Issue