退回状态显示

This commit is contained in:
jing's 2024-01-06 21:46:21 +08:00
parent d8542fee07
commit bdb726400f
2 changed files with 21 additions and 14 deletions

View File

@ -228,7 +228,7 @@ public class BomNewMbomMiddleVO extends BaseMaterialVO implements Serializable {
}
@ApiModelProperty(value = "状态 0-待处理 1-已处理 2- 驳回")
private Integer backStatus;
private Integer backStatus=0;
private List<BomNewMbomMiddleVO> childNodes = Collections.emptyList();

View File

@ -105,8 +105,12 @@
<!-- </select>-->
<select id="getParentChild" resultType="com.nflg.product.bomnew.pojo.vo.BomNewMbomMiddleVO">
select t1.*,(SELECT count(1) from t_bom_new_mbom_detail where parent_row_id=t1.row_id) as bom_exist
select t1.*,IFNULL(t2.back_status,0) as back_status,
(SELECT count(1) from t_bom_new_mbom_detail where parent_row_id=t1.row_id) as bom_exist
from t_bom_new_mbom_detail as t1
left join t_bom_new_mbom_back_material as t2
on t1.row_id=t2.detail_row_id
where t1.parent_row_id = #{rowId}
order by t1.order_number
</select>
@ -142,18 +146,21 @@
<select id="searchList" resultType="com.nflg.product.bomnew.pojo.vo.BomNewMbomMiddleVO">
<![CDATA[
SELECT t2.*,(SELECT count(1) from t_bom_new_mbom_detail where parent_row_id=t2.row_id) as bom_exist
FROM
(
SELECT
@r AS _row_id,
(SELECT @r := parent_row_id FROM t_bom_new_mbom_detail WHERE row_id = _row_id) AS parent_row_id
FROM
(SELECT @r := #{rowId}) vars, t_bom_new_mbom_detail AS h
WHERE @r <> 0
) t1
JOIN t_bom_new_mbom_detail t2
ON t1._row_id = t2.row_id
select T1.*, IFNULL(T2.back_status, 0) as back_status
from (SELECT t2.*, (SELECT count(1) from t_bom_new_mbom_detail where parent_row_id = t2.row_id) as bom_exist
FROM (SELECT @r AS _row_id,
(SELECT @r := parent_row_id
FROM t_bom_new_mbom_detail
WHERE row_id = _row_id) AS parent_row_id
FROM
(SELECT @r := #{rowId}) vars
, t_bom_new_mbom_detail AS h
WHERE @r <> 0) t1
JOIN t_bom_new_mbom_detail t2
ON t1._row_id = t2.row_id
)as T1
left join t_bom_new_mbom_back_material as T2
on T1.row_id=T2.detail_row_id
]]>
</select>