瀏覽代碼

modify:

1. 初验、终验超管看所有项目信息;
tags/24080901
WendyYang 3 月之前
父節點
當前提交
a16ce7df8a
共有 3 個檔案被更改,包括 18 行新增14 行删除
  1. +3
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ConstructionManage.java
  2. +3
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/FinalAcceptanceManage.java
  3. +12
    -12
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/service/impl/PurchaseServiceImpl.java

+ 3
- 1
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ConstructionManage.java 查看文件

@@ -310,7 +310,9 @@ public class ConstructionManage {
query.eq(Project::getStage, ProjectStatus.PROJECT_APPROVED.getCode());
query.eq(Project::getNewest, Boolean.TRUE);
//只能看自己单位的
query.eq(Project::getBuildOrgCode, user.getMhUnitIdStr());
if (!user.getSuperAdmin()) {
query.eq(Project::getBuildOrgCode, user.getMhUnitIdStr());
}
query.orderByAsc(Project::getDeliveryTime);
Page<Project> page = projectService.page(req.page(), query);
long total;


+ 3
- 1
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/FinalAcceptanceManage.java 查看文件

@@ -113,7 +113,9 @@ public class FinalAcceptanceManage {
if (projectIds.isEmpty()) {
return PageVo.empty();
}
query.eq(Project::getBuildOrgCode, user.getMhUnitIdStr());
if (!user.getRegionAdmin()) {
query.eq(Project::getBuildOrgCode, user.getMhUnitIdStr());
}
query.in(Project::getId, projectIds);
query.eq(Project::getStage, ProjectStatus.PROJECT_APPROVED.getCode());
query.eq(Project::getNewest, Boolean.TRUE);


+ 12
- 12
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/service/impl/PurchaseServiceImpl.java 查看文件

@@ -24,7 +24,6 @@ import com.hz.pm.api.projectlib.service.IProjectService;
import com.hz.pm.api.user.helper.MhUnitCache;
import com.hz.pm.api.user.security.model.UserFullInfoDTO;
import com.hz.pm.api.user.util.LoginUserUtil;
import com.ningdatech.basic.model.PageVo;
import com.ningdatech.basic.util.CollUtils;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@@ -36,7 +35,7 @@ import java.util.stream.Collectors;

/**
* <p>
* 服务实现类
* 服务实现类
* </p>
*
* @author zpf
@@ -63,12 +62,12 @@ public class PurchaseServiceImpl extends ServiceImpl<PurchaseMapper, Purchase>
.le(req.getCreateOnMax() != null, Purchase::getCreateOn, req.getCreateOnMax())
.ge(req.getCreateOnMin() != null, Purchase::getCreateOn, req.getCreateOnMin())
.eq(req.getStatus() != null, Purchase::getXcfhxApplyStatus, req.getStatus())
.eq(req.getSourceType() != null,Purchase::getSourceType,req.getSourceType())
.eq(req.getSourceType() != null, Purchase::getSourceType, req.getSourceType())
.orderByDesc(Purchase::getCreateOn);

if (Boolean.TRUE.equals(req.getFinished())) {
query.eq(Purchase::getXcfhxApplyStatus, TenderXcfhxApplyStatus.XCFHX_APPLY_PASSED.getCode());
} else if (Boolean.FALSE.equals(req.getFinished())){
} else if (Boolean.FALSE.equals(req.getFinished())) {
query.ne(Purchase::getXcfhxApplyStatus, TenderXcfhxApplyStatus.XCFHX_APPLY_PASSED.getCode());
}
UserFullInfoDTO user = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId());
@@ -80,8 +79,8 @@ public class PurchaseServiceImpl extends ServiceImpl<PurchaseMapper, Purchase>
if (CollUtil.isNotEmpty(purchases)) {
Set<Long> projectIds = CollUtils.fieldSet(purchases, Purchase::getProjectId);
List<Project> projects = projectIds.isEmpty() ? Lists.newArrayList() : projectService.list(Wrappers.lambdaQuery(Project.class)
.in(Project::getId,projectIds)
.like(StringUtils.isNotBlank(req.getProjectName()),Project::getProjectName,req.getProjectName()));
.in(Project::getId, projectIds)
.like(StringUtils.isNotBlank(req.getProjectName()), Project::getProjectName, req.getProjectName()));
Map<Long, Project> projectMap = CollUtils.listToMap(projects, Project::getId);
Map<Long, Contract> contractMap = projectIds.isEmpty() ? Maps.newHashMap()
: contractService.listByProjectIds(projectIds);
@@ -103,17 +102,17 @@ public class PurchaseServiceImpl extends ServiceImpl<PurchaseMapper, Purchase>

Contract contract = contractMap.get(w.getId());
if (contract != null) {
if(Objects.nonNull(req.getAmountStart()) && Objects.nonNull(contract.getTotalAmount())
&& req.getAmountStart().compareTo(contract.getTotalAmount()) > 0){
if (Objects.nonNull(req.getAmountStart()) && Objects.nonNull(contract.getTotalAmount())
&& req.getAmountStart().compareTo(contract.getTotalAmount()) > 0) {
return null;
}
if(Objects.nonNull(req.getAmountEnd()) && Objects.nonNull(contract.getTotalAmount())
&& req.getAmountEnd().compareTo(contract.getTotalAmount()) < 0){
if (Objects.nonNull(req.getAmountEnd()) && Objects.nonNull(contract.getTotalAmount())
&& req.getAmountEnd().compareTo(contract.getTotalAmount()) < 0) {
return null;
}
item.setContractAmount(contract.getTotalAmount());
}else{
if(Objects.nonNull(req.getAmountStart()) || Objects.nonNull(req.getAmountEnd())){
} else {
if (Objects.nonNull(req.getAmountStart()) || Objects.nonNull(req.getAmountEnd())) {
return null;
}
}
@@ -123,6 +122,7 @@ public class PurchaseServiceImpl extends ServiceImpl<PurchaseMapper, Purchase>
return others;
}

@Override
public boolean buildPurchaseQueryPermission(LambdaQueryWrapper<Purchase> query, UserFullInfoDTO user) {
boolean queryState = true;
Optional<DataScopeDTO> datascope = DataScopeUtil.getCurrentUserDataScopeHasUserId(user);


Loading…
取消
儲存