feat: ebom工作明细列表和正式表列表模糊搜索添加对“只显示自己”数据的支持
This commit is contained in:
parent
87521e0dbc
commit
fa51e7dacd
|
|
@ -6,8 +6,6 @@ import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* t_bom_new_ebom_parent
|
* t_bom_new_ebom_parent
|
||||||
|
|
@ -33,8 +31,6 @@ public class BomNewEbomParentQuery extends BasePageQuery implements Serializabl
|
||||||
@ApiModelProperty(value = "物料编码")
|
@ApiModelProperty(value = "物料编码")
|
||||||
private String materialNo;
|
private String materialNo;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设计人员名称
|
* 设计人员名称
|
||||||
*/
|
*/
|
||||||
|
|
@ -50,9 +46,11 @@ public class BomNewEbomParentQuery extends BasePageQuery implements Serializabl
|
||||||
@ApiModelProperty("数据类型 0-EBOM工作列表数据 1-EBOM正式工作表明细 2-变更影响")
|
@ApiModelProperty("数据类型 0-EBOM工作列表数据 1-EBOM正式工作表明细 2-变更影响")
|
||||||
private Integer dataType=0;
|
private Integer dataType=0;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 是否仅显示自己的数据:0=所有人的数据;1=仅自己的数据,默认为0
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "是否仅显示自己的数据:0=所有人的数据;1=仅自己的数据,默认为0")
|
||||||
|
private Integer showMySelfOnly = 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -187,11 +187,19 @@
|
||||||
|
|
||||||
<!--BOM-正式工作表-->
|
<!--BOM-正式工作表-->
|
||||||
<select id="formalWorksheet" resultType="com.nflg.product.bomnew.pojo.vo.BomNewEbomParentVO">
|
<select id="formalWorksheet" resultType="com.nflg.product.bomnew.pojo.vo.BomNewEbomParentVO">
|
||||||
select * , row_id as bomRowId from t_bom_new_ebom_parent a
|
select * , row_id as bomRowId
|
||||||
|
from t_bom_new_ebom_parent a
|
||||||
join (select material_no, max(current_version) current_version from t_bom_new_ebom_parent
|
join (select material_no, max(current_version) current_version from t_bom_new_ebom_parent
|
||||||
where status=4 <include refid="whr"/>
|
where status=4
|
||||||
|
<if test="query.showMySelfOnly == 1">
|
||||||
|
AND created_by = #{userCode}
|
||||||
|
</if>
|
||||||
|
<include refid="whr"/>
|
||||||
group by material_no) b on a.material_no=b.material_no and a.current_version=b.current_version
|
group by material_no) b on a.material_no=b.material_no and a.current_version=b.current_version
|
||||||
where a.status=4
|
where a.status=4
|
||||||
|
<if test="query.showMySelfOnly == 1">
|
||||||
|
AND a.created_by = #{userCode}
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<sql id="getUpgradeChangeListWhr">
|
<sql id="getUpgradeChangeListWhr">
|
||||||
|
|
@ -385,6 +393,9 @@
|
||||||
SELECT *,row_id as bomRowId
|
SELECT *,row_id as bomRowId
|
||||||
FROM t_bom_new_ebom_parent
|
FROM t_bom_new_ebom_parent
|
||||||
<!-- WHERE (root_is=1 OR ((user_root_is=1 OR root_is_for_wait_review=1) AND created_by=#{userCode}))-->
|
<!-- WHERE (root_is=1 OR ((user_root_is=1 OR root_is_for_wait_review=1) AND created_by=#{userCode}))-->
|
||||||
|
<if test="query.showMySelfOnly == 1">
|
||||||
|
AND created_by = #{userCode}
|
||||||
|
</if>
|
||||||
<if test="userJob==0">
|
<if test="userJob==0">
|
||||||
WHERE status IN (1,3) AND (user_root_is=1 OR root_is_for_wait_review=1) AND created_by=#{userCode}
|
WHERE status IN (1,3) AND (user_root_is=1 OR root_is_for_wait_review=1) AND created_by=#{userCode}
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue