|
|
@@ -2,9 +2,7 @@ package com.hz.pm.api.projectdeclared.manage; |
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil; |
|
|
|
import cn.hutool.core.util.NumberUtil; |
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
import com.alibaba.excel.EasyExcel; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Assert; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
@@ -109,22 +107,22 @@ public class FinalAcceptanceManage { |
|
|
|
* @return \ |
|
|
|
*/ |
|
|
|
public FinalAcceptProgressStatisticsVO finalAcceptProgressStatistics(ProjectListReq req) { |
|
|
|
LambdaQueryWrapper<Purchase> purchaseQuery = Wrappers.lambdaQuery(Purchase.class) |
|
|
|
.select(Purchase::getProjectId, Purchase::getStatus) |
|
|
|
.in(Purchase::getStatus, FINAL_INSPECTED_TENDER_STATUS); |
|
|
|
List<Purchase> purchases = purchaseService.list(purchaseQuery); |
|
|
|
if (purchases.isEmpty()) { |
|
|
|
return null; |
|
|
|
} |
|
|
|
UserInfoDetails user = LoginUserUtil.loginUserDetail(); |
|
|
|
String buildOrgCode = req.getBuildOrgCode(); |
|
|
|
req.setBuildOrgCode(null); |
|
|
|
LambdaQueryWrapper<Project> query = ProjectManageUtil.projectQuery(req); |
|
|
|
Long buildOrgCodeNum = NumberUtil.parseLong(buildOrgCode, null); |
|
|
|
UnitQueryState queryState = mhUnitQueryHelper.listCanViewUnitIds(buildOrgCodeNum, user); |
|
|
|
if (!queryState.isState()) { |
|
|
|
return null; |
|
|
|
} |
|
|
|
LambdaQueryWrapper<Purchase> purchaseQuery = Wrappers.lambdaQuery(Purchase.class) |
|
|
|
.select(Purchase::getProjectId, Purchase::getStatus) |
|
|
|
.in(Purchase::getStatus, FINAL_INSPECTED_TENDER_STATUS); |
|
|
|
List<Purchase> purchases = purchaseService.list(purchaseQuery); |
|
|
|
if (purchases.isEmpty()) { |
|
|
|
return null; |
|
|
|
} |
|
|
|
LambdaQueryWrapper<Project> query = ProjectManageUtil.projectQuery(req); |
|
|
|
if (CollUtil.isNotEmpty(queryState.getUnitIds())) { |
|
|
|
query.in(Project::getBuildOrgCode, CollUtils.convert(queryState.getUnitIds(), String::valueOf)); |
|
|
|
} |
|
|
|