增加是否带下级
This commit is contained in:
parent
b0d89937ba
commit
f2ed0fb5ca
|
|
@ -32,6 +32,11 @@ public interface BomNewMbomParentMapper extends BaseMapper<BomNewMbomParentEntit
|
|||
*/
|
||||
Page<BomNewMbomMiddleVO> indexListPage(Page<BomNewMbomMiddleVO> page, @Param("query") BomNewMbomParentQuery query );
|
||||
|
||||
/**
|
||||
* 递归向上查找所有数据
|
||||
* @param rowId 当前行
|
||||
* @return
|
||||
*/
|
||||
List<BomNewMbomMiddleVO> searchList(@Param("rowId") Long rowId );
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@ import lombok.experimental.Accessors;
|
|||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* t_bom_new_mbom_parent
|
||||
|
|
@ -201,7 +204,20 @@ public class BomNewMbomMiddleVO extends BaseMaterialVO implements Serializable {
|
|||
@ApiModelProperty(value = "是否虚拟件 0-否 1-是")
|
||||
private Integer virtualPartIs;
|
||||
|
||||
@ApiModelProperty(value = "是否有下级 0-否 1-是")
|
||||
private Integer bomExist;
|
||||
public Integer getBomExist(){
|
||||
if(Objects.isNull(bomExist)){
|
||||
return 0;
|
||||
}
|
||||
if(bomExist>0){return 1;}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private List<BomNewMbomMiddleVO> childNodes = Collections.emptyList();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@
|
|||
|
||||
<select id="searchList" resultType="com.nflg.product.bomnew.pojo.vo.BomNewMbomMiddleVO">
|
||||
<![CDATA[
|
||||
SELECT t2.*
|
||||
SELECT t2.*,(SELECT count(1) from t_bom_new_mbom_detail where parent_id=t2.row_id) as bomExist
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
|
|
|
|||
Loading…
Reference in New Issue