Merge branch 'refs/heads/feature/DM/nflg-bom' into feature/DM/nflg-bom-transition
# Conflicts: # nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/pojo/entity/BomNewEbomParentEntity.java
This commit is contained in:
commit
feffa939c5
|
|
@ -82,7 +82,7 @@ public interface BomNewEbomParentMapper extends BaseMapper<BomNewEbomParentEntit
|
|||
|
||||
List<BomNewEbomParentEntity> getEBomParentByMaterialNos(@Param("job") Integer job, @Param("createdBy")String createdBy, @Param("materialNos") List<String> materialNos);
|
||||
|
||||
Page<BomNewEbomParentVO> workDetailsListByPageNew(Page<Object> objectPage, BomNewEbomParentQuery query, Integer userJob, String userCode);
|
||||
Page<BomNewEbomParentVO> workDetailsListByPageNew(Page<Object> objectPage, BomNewEbomParentQuery query, Integer userJob, String userCode, Long deptRowId);
|
||||
|
||||
List<BomNewEbomParentVO> getChildren(Long bomRowId, int type);
|
||||
|
||||
|
|
|
|||
|
|
@ -388,5 +388,12 @@ public class BomNewEbomParentEntity implements Serializable {
|
|||
@TableField(exist = false)
|
||||
private boolean isImportRoot = false;
|
||||
|
||||
/**
|
||||
* 创建人所属部门rowId
|
||||
*/
|
||||
@TableField(value = "dept_row_id")
|
||||
@ApiModelProperty(value = "创建人所属部门rowId")
|
||||
private Long deptRowId;
|
||||
|
||||
private static final long serialVersionUID = 265246823929418418L;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2222,7 +2222,8 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
|||
query.setPage(1L);
|
||||
query.setPageSize(20L);
|
||||
}
|
||||
Page<BomNewEbomParentVO> result = this.getBaseMapper().workDetailsListByPageNew(new Page<>(query.getPage(), query.getPageSize()), query, userRoleService.getUserJob(), SessionUtil.getUserCode());
|
||||
Page<BomNewEbomParentVO> result = this.getBaseMapper().workDetailsListByPageNew(new Page<>(query.getPage()
|
||||
, query.getPageSize()), query, userRoleService.getUserJob(), SessionUtil.getUserCode(), SessionUtil.getDepartRowId());
|
||||
if (StrUtil.isBlank(query.getMaterialNo()) && StrUtil.isBlank(query.getDrawingNo())) {
|
||||
//列表搜索
|
||||
materialMainService.intiMaterialInfo(result.getRecords(), EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT);
|
||||
|
|
|
|||
|
|
@ -131,6 +131,7 @@ public class EBomEdit {
|
|||
parentEntity.setEditStatus(createDTO.getOpType());
|
||||
parentEntity.setRootIs(parentEntity.getMaterialNo().startsWith("31") ? 1 : 0);
|
||||
parentEntity.setUserRootIs(1);
|
||||
parentEntity.setDeptRowId(SessionUtil.getDepartRowId());
|
||||
|
||||
createDTO.getDatas().forEach(k -> {
|
||||
k.setParentRowId(parentEntity.getRowId());
|
||||
|
|
|
|||
|
|
@ -387,6 +387,7 @@ public class OriginalBomToEBomV2Convert extends BaseConvert {
|
|||
this.eBomParentResult.add(ebom);
|
||||
}
|
||||
eBomParent.setMaterialOriginalUnit(eBomParent.getMaterialUnit());
|
||||
eBomParent.setDeptRowId(SessionUtil.getDepartRowId());
|
||||
this.eBomParentResult.add(eBomParent);
|
||||
|
||||
return eBomParent.getRowId();
|
||||
|
|
|
|||
|
|
@ -403,11 +403,13 @@
|
|||
<select id="workDetailsListByPageNew" resultType="com.nflg.product.bomnew.pojo.vo.BomNewEbomParentVO">
|
||||
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}))-->
|
||||
<where>
|
||||
<if test="query.showMySelfOnly == 1">
|
||||
AND created_by = #{userCode}
|
||||
</if>
|
||||
<if test="query.showMySelfOnly == 0">
|
||||
AND dept_row_id = #{deptRowId}
|
||||
</if>
|
||||
<if test="userJob==0">
|
||||
AND status IN (1,3) AND (root_is=1 OR user_root_is=1 OR root_is_for_wait_review=1) AND
|
||||
created_by=#{userCode}
|
||||
|
|
|
|||
|
|
@ -106,6 +106,10 @@ public class SessionUtil {
|
|||
return getUser().getSessionKey();
|
||||
}
|
||||
|
||||
public static Long getDepartRowId() {
|
||||
return getUser().getDepartRowId();
|
||||
}
|
||||
|
||||
public static LoginUserInfoDTO getUser() {
|
||||
return Optional.ofNullable(BaseApi.loginUser.get())
|
||||
.orElseThrow(() -> new NflgBusinessException(STATE.LoginError, "请登录"));
|
||||
|
|
|
|||
Loading…
Reference in New Issue