feat(pbom): pbom工作表,只能查看本部门的数据

This commit is contained in:
曹鹏飞 2024-05-30 11:44:47 +08:00
parent 152c5c3ecf
commit 04d33ab25c
4 changed files with 11 additions and 5 deletions

View File

@ -10,9 +10,7 @@ import com.nflg.product.bomnew.pojo.vo.BomNewPbomWorkExcelVO;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.Collection; import java.util.Collection;
import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Set;
/** /**
* t_bom_new_pbom_parent 表数据库访问层 * t_bom_new_pbom_parent 表数据库访问层
@ -23,7 +21,7 @@ import java.util.Set;
*/ */
public interface BomNewPbomParentMapper extends BaseMapper<BomNewPbomParentEntity> { public interface BomNewPbomParentMapper extends BaseMapper<BomNewPbomParentEntity> {
Page<BomNewPbomParentVO> workDetailsListByPage(Page<BomNewPbomParentQuery> page, @Param("query") BomNewPbomParentQuery query , @Param("userFac") String userFac); Page<BomNewPbomParentVO> workDetailsListByPage(Page<BomNewPbomParentQuery> page, @Param("query") BomNewPbomParentQuery query, @Param("userFac") String userFac, Long deptRowId);
List<BomNewPbomWorkExcelVO> workDetailsExcel(@Param("userFac") String userFac); List<BomNewPbomWorkExcelVO> workDetailsExcel(@Param("userFac") String userFac);

View File

@ -355,6 +355,13 @@ public class BomNewPbomParentEntity implements Serializable {
@ApiModelProperty(value = "导入SAP时间") @ApiModelProperty(value = "导入SAP时间")
private LocalDateTime sapTime; private LocalDateTime sapTime;
/**
* 创建人所属部门rowId
*/
@TableField(value = "dept_row_id")
@ApiModelProperty(value = "创建人所属部门rowId")
private Long deptRowId;
private static final long serialVersionUID = -31999878274445137L; private static final long serialVersionUID = -31999878274445137L;
} }

View File

@ -139,7 +139,8 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
} }
return new Page<>(); return new Page<>();
} else { } else {
Page<BomNewPbomParentVO> result = this.getBaseMapper().workDetailsListByPage(new Page<>(query.getPage(), query.getPageSize()), query, userRoleService.getUserFactory()); Page<BomNewPbomParentVO> result = this.getBaseMapper().workDetailsListByPage(new Page<>(query.getPage()
, query.getPageSize()), query, userRoleService.getUserFactory(), SessionUtil.getDepartRowId());
materialMainService.intiMaterialInfo(result.getRecords(), EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT); materialMainService.intiMaterialInfo(result.getRecords(), EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT);
return result; return result;
} }

View File

@ -78,7 +78,7 @@
<!--获取工作列表--> <!--获取工作列表-->
<select id="workDetailsListByPage" resultType="com.nflg.product.bomnew.pojo.vo.BomNewPbomParentVO"> <select id="workDetailsListByPage" resultType="com.nflg.product.bomnew.pojo.vo.BomNewPbomParentVO">
select * , row_id as bomRowId select * , row_id as bomRowId
from t_bom_new_pbom_parent where (root_is=1 or root_state=1 ) and status &lt; 4 from t_bom_new_pbom_parent where (root_is=1 or root_state=1 ) and status &lt; 4 and dept_row_id = #{deptRowId}
<if test="userFac!=null and userFac!=''"> <if test="userFac!=null and userFac!=''">
and fac_code=#{userFac} and fac_code=#{userFac}
</if> </if>