feat(pbom): 添加筛选条件仅看自己
This commit is contained in:
parent
e823ed6e53
commit
aa3c3f5d37
|
|
@ -22,7 +22,8 @@ import java.util.Set;
|
|||
*/
|
||||
public interface BomNewPbomParentMapper extends BaseMapper<BomNewPbomParentEntity> {
|
||||
|
||||
Page<BomNewPbomParentVO> workDetailsListByPage(Page<BomNewPbomParentQuery> page, @Param("query") BomNewPbomParentQuery query, @Param("userFac") String userFac, Long deptRowId);
|
||||
Page<BomNewPbomParentVO> workDetailsListByPage(Page<BomNewPbomParentQuery> page, @Param("query") BomNewPbomParentQuery query
|
||||
, @Param("userFac") String userFac, Long deptRowId, String userCode);
|
||||
|
||||
|
||||
List<BomNewPbomWorkExcelVO> workDetailsExcel(@Param("userFac") String userFac);
|
||||
|
|
|
|||
|
|
@ -47,10 +47,10 @@ public class BomNewEbomParentQuery extends BasePageQuery implements Serializabl
|
|||
private Integer dataType=0;
|
||||
|
||||
/*
|
||||
* 是否仅显示自己的数据:0=所有人的数据;1=仅自己的数据,默认为0
|
||||
* 是否仅显示自己的数据:0=所有人的数据;1=仅自己的数据,默认为1
|
||||
*/
|
||||
@ApiModelProperty(value = "是否仅显示自己的数据:0=所有人的数据;1=仅自己的数据,默认为0")
|
||||
private Integer showMySelfOnly = 0;
|
||||
@ApiModelProperty(value = "是否仅显示自己的数据:0=所有人的数据;1=仅自己的数据,默认为1")
|
||||
private Integer showMySelfOnly = 1;
|
||||
|
||||
/**
|
||||
* 通知单号
|
||||
|
|
|
|||
|
|
@ -1,14 +1,11 @@
|
|||
package com.nflg.product.bomnew.pojo.query;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDate;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* t_bom_new_pbom_parent
|
||||
|
|
@ -56,6 +53,12 @@ public class BomNewPbomParentQuery implements Serializable {
|
|||
*/
|
||||
@ApiModelProperty(value = "当前页")
|
||||
private Long page = 1L;
|
||||
|
||||
/*
|
||||
* 是否仅显示自己的数据:0=所有人的数据;1=仅自己的数据,默认为1
|
||||
*/
|
||||
@ApiModelProperty(value = "是否仅显示自己的数据:0=所有人的数据;1=仅自己的数据,默认为1")
|
||||
private Integer showMySelfOnly = 1;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
|
|||
return new Page<>();
|
||||
} else {
|
||||
Page<BomNewPbomParentVO> result = this.getBaseMapper().workDetailsListByPage(new Page<>(query.getPage()
|
||||
, query.getPageSize()), query, userRoleService.getUserFactory(), SessionUtil.getDepartRowId());
|
||||
, query.getPageSize()), query, userRoleService.getUserFactory(), SessionUtil.getDepartRowId(), SessionUtil.getUserCode());
|
||||
materialMainService.intiMaterialInfo(result.getRecords(), EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT);
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,10 +78,14 @@
|
|||
<!--获取工作列表-->
|
||||
<select id="workDetailsListByPage" resultType="com.nflg.product.bomnew.pojo.vo.BomNewPbomParentVO">
|
||||
select * , row_id as bomRowId
|
||||
from t_bom_new_pbom_parent where (root_is=1 or root_state=1 ) and status < 4 and dept_row_id = #{deptRowId}
|
||||
from t_bom_new_pbom_parent where (root_is=1 or root_state=1 or user_root_is=1) and status < 4 and dept_row_id
|
||||
= #{deptRowId}
|
||||
<if test="userFac!=null and userFac!=''">
|
||||
and fac_code=#{userFac}
|
||||
</if>
|
||||
<if test="query.showMySelfOnly==1">
|
||||
and created_by=#{userCode}
|
||||
</if>
|
||||
<include refid="whr"/>
|
||||
order by created_time desc
|
||||
</select>
|
||||
|
|
|
|||
Loading…
Reference in New Issue