|
@@ -398,15 +398,16 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|
|
l.eq(PmAuditDeptRef::getDeptId, SecurityUtils.getDeptId());
|
|
|
l.eq(PmAuditDeptRef::getRefType, "2");
|
|
|
list = pmAuditDeptRefService.list(l);
|
|
|
- if (Arrays.asList(1, 2, 3).contains(reqType)) {
|
|
|
- if (!ObjectUtils.isEmpty(list) && !SecurityUtils.getUserId().equals(Integer.parseInt("1"))) {
|
|
|
- lw.in(PmDemand::getDemandId, list.stream().map(PmAuditDeptRef::getRefId).collect(Collectors.toList()));
|
|
|
+ if (!pmDemandReqVo.getIsAdmin()) {
|
|
|
+ if (Arrays.asList(1, 2, 3).contains(reqType)) {
|
|
|
+ if (!ObjectUtils.isEmpty(list) && !SecurityUtils.getUserId().equals(Integer.parseInt("1"))) {
|
|
|
+ lw.in(PmDemand::getDemandId, list.stream().map(PmAuditDeptRef::getRefId).collect(Collectors.toList()));
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ lw.eq(PmDemand::getPurchaseDeptId, SecurityUtils.getDeptId());
|
|
|
}
|
|
|
- } else {
|
|
|
- lw.eq(PmDemand::getPurchaseDeptId, SecurityUtils.getDeptId());
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if (!StringUtils.isBlank(pmDemandReqVo.getProjectName())) {
|
|
|
lw.like(PmDemand::getProjectName, "%" + pmDemandReqVo.getProjectName() + "%");
|
|
|
}
|