diff --git a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewPbomParentService.java b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewPbomParentService.java index 6e0c6046..c2881a2b 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewPbomParentService.java +++ b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewPbomParentService.java @@ -164,8 +164,10 @@ public class BomNewPbomParentService extends ServiceImpl(); } else { + String queryFac= StrUtil.isBlank(query.getFacCode())? userRoleService.getUserFactory():query.getFacCode(); + Page result = this.getBaseMapper().workDetailsListByPage(new Page<>(query.getPage() - , query.getPageSize()), query, userRoleService.getUserFactory(), SessionUtil.getDepartRowId(), SessionUtil.getUserCode()); + , query.getPageSize()), query, queryFac, SessionUtil.getDepartRowId(), SessionUtil.getUserCode()); materialMainService.intiMaterialInfo(result.getRecords(), EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT); return result; } @@ -1197,7 +1199,12 @@ public class BomNewPbomParentService extends ServiceImpl0){ return ImmutableList.of(EBomConstant.MAIN_FACTORY_CODE_1010,EBomConstant.XIAN_TAO_FACTORY_CODE_1020); }else { - return SessionUtil.getFullDeptName().contains("仙桃公司")? ImmutableList.of(EBomConstant.XIAN_TAO_FACTORY_CODE_1020) : ImmutableList.of(EBomConstant.MAIN_FACTORY_CODE_1010) ; + String dptCde=materialMainService.getBaseMapper().getUserDepartmentDptCode(SessionUtil.getDepartRowId()); + if(StrUtil.isNotBlank(dptCde) && dptCde.contains("仙桃公司")){ + return ImmutableList.of(EBomConstant.XIAN_TAO_FACTORY_CODE_1020) ; + } + return ImmutableList.of(EBomConstant.MAIN_FACTORY_CODE_1010) ; } }