feat: ebom工作明细列表和正式表列表模糊搜索添加对“只显示自己”数据的支持

This commit is contained in:
曹鹏飞 2024-04-29 09:35:48 +08:00
parent 87521e0dbc
commit fa51e7dacd
2 changed files with 18 additions and 9 deletions

View File

@ -6,8 +6,6 @@ import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* t_bom_new_ebom_parent
@ -33,8 +31,6 @@ public class BomNewEbomParentQuery extends BasePageQuery implements Serializabl
@ApiModelProperty(value = "物料编码")
private String materialNo;
/**
* 设计人员名称
*/
@ -50,9 +46,11 @@ public class BomNewEbomParentQuery extends BasePageQuery implements Serializabl
@ApiModelProperty("数据类型 0-EBOM工作列表数据 1-EBOM正式工作表明细 2-变更影响")
private Integer dataType=0;
/*
* 是否仅显示自己的数据0=所有人的数据1=仅自己的数据默认为0
*/
@ApiModelProperty(value = "是否仅显示自己的数据0=所有人的数据1=仅自己的数据默认为0")
private Integer showMySelfOnly = 0;
private static final long serialVersionUID = 1L;
}

View File

@ -187,11 +187,19 @@
<!--BOM-正式工作表-->
<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
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
where a.status=4
<if test="query.showMySelfOnly == 1">
AND a.created_by = #{userCode}
</if>
</select>
<sql id="getUpgradeChangeListWhr">
@ -385,6 +393,9 @@
SELECT *,row_id as bomRowId
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}))-->
<if test="query.showMySelfOnly == 1">
AND created_by = #{userCode}
</if>
<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}
</if>