|
|
@@ -16,7 +16,6 @@ import com.hz.pm.api.common.util.ExcelDownUtil; |
|
|
|
import com.hz.pm.api.common.util.ExcelExportStyle; |
|
|
|
import com.hz.pm.api.common.util.StrUtils; |
|
|
|
import com.hz.pm.api.projectdeclared.model.dto.DeclaredProjectExportDTO; |
|
|
|
import com.hz.pm.api.projectdeclared.model.dto.DefaultDeclaredDTO; |
|
|
|
import com.hz.pm.api.projectdeclared.model.entity.Contract; |
|
|
|
import com.hz.pm.api.projectdeclared.model.entity.Purchase; |
|
|
|
import com.hz.pm.api.projectdeclared.model.entity.PurchaseInst; |
|
|
@@ -26,12 +25,9 @@ import com.hz.pm.api.projectdeclared.service.IContractService; |
|
|
|
import com.hz.pm.api.projectdeclared.service.IPurchaseInstService; |
|
|
|
import com.hz.pm.api.projectdeclared.service.IPurchaseService; |
|
|
|
import com.hz.pm.api.projectlib.helper.ProjectHelper; |
|
|
|
import com.hz.pm.api.projectlib.manage.ProjectLibManage; |
|
|
|
import com.hz.pm.api.projectlib.model.dto.ProjectDTO; |
|
|
|
import com.hz.pm.api.projectlib.model.entity.Project; |
|
|
|
import com.hz.pm.api.projectlib.model.entity.ProjectAnnualPaymentPlan; |
|
|
|
import com.hz.pm.api.projectlib.model.entity.ProjectInst; |
|
|
|
import com.hz.pm.api.projectlib.model.enumeration.InstTypeEnum; |
|
|
|
import com.hz.pm.api.projectlib.model.enumeration.ProjectStatusEnum; |
|
|
|
import com.hz.pm.api.projectlib.model.enumeration.ProjectTypeNewEnum; |
|
|
|
import com.hz.pm.api.projectlib.model.enumeration.TenderStatusEnum; |
|
|
@@ -41,12 +37,10 @@ import com.hz.pm.api.projectlib.model.vo.TenderListInfoVO; |
|
|
|
import com.hz.pm.api.projectlib.service.IProjectAnnualPaymentPlanService; |
|
|
|
import com.hz.pm.api.projectlib.service.IProjectInstService; |
|
|
|
import com.hz.pm.api.projectlib.service.IProjectService; |
|
|
|
import com.hz.pm.api.sys.manage.NoticeManage; |
|
|
|
import com.hz.pm.api.user.security.model.UserFullInfoDTO; |
|
|
|
import com.hz.pm.api.user.security.model.UserInfoDetails; |
|
|
|
import com.hz.pm.api.user.util.LoginUserUtil; |
|
|
|
import com.ningdatech.basic.exception.BizException; |
|
|
|
import com.ningdatech.basic.function.VUtils; |
|
|
|
import com.ningdatech.basic.model.PageVo; |
|
|
|
import com.ningdatech.basic.util.CollUtils; |
|
|
|
import com.ningdatech.basic.util.NdDateUtils; |
|
|
@@ -65,14 +59,10 @@ import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.time.LocalDateTime; |
|
|
|
import java.util.*; |
|
|
|
import java.util.concurrent.atomic.AtomicInteger; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
import static com.hz.pm.api.staging.enums.MsgTypeEnum.PROJECT_REVIEW; |
|
|
|
import static com.hz.pm.api.todocenter.constant.WorkNoticeConst.PASS_MSG_TEMPLATE; |
|
|
|
|
|
|
|
/** |
|
|
|
* @Classname FinalAcceptanceManage |
|
|
|
* @Description 终验 |
|
|
@@ -105,7 +95,7 @@ public class FinalAcceptanceManage { |
|
|
|
* @return \ |
|
|
|
*/ |
|
|
|
public PageVo<ProjectLibListItemVO> projectLibList(ProjectListReq req) { |
|
|
|
UserFullInfoDTO user = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId()); |
|
|
|
UserInfoDetails user = LoginUserUtil.loginUserDetail(); |
|
|
|
LambdaQueryWrapper<Project> query = ProjectHelper.projectQuery(req); |
|
|
|
//待终验 并且还未过期 |
|
|
|
//只能看自己单位的 |
|
|
@@ -120,14 +110,11 @@ public class FinalAcceptanceManage { |
|
|
|
query.eq(Project::getNewest, Boolean.TRUE); |
|
|
|
query.orderByAsc(Project::getApprovalDate); |
|
|
|
Page<Project> page = projectService.page(req.page(), query); |
|
|
|
long total; |
|
|
|
if ((total = page.getTotal()) == 0) { |
|
|
|
if (page.getTotal() == 0) { |
|
|
|
return PageVo.empty(); |
|
|
|
} |
|
|
|
List<Long> allProjectIds = new ArrayList<>(); |
|
|
|
for (Project project : page.getRecords()) { |
|
|
|
allProjectIds.add(project.getId()); |
|
|
|
} |
|
|
|
|
|
|
|
Set<Long> allProjectIds = CollUtils.fieldSet(page.getRecords(), Project::getId); |
|
|
|
List<Purchase> purchases = purchaseService.listByProjectIds(allProjectIds); |
|
|
|
Map<Long, List<Purchase>> purchaseMap = CollUtils.group(purchases, Purchase::getProjectId); |
|
|
|
Map<Long, Contract> contractMap = contractService.listByProjectIds(projectIds); |
|
|
@@ -176,7 +163,7 @@ public class FinalAcceptanceManage { |
|
|
|
} |
|
|
|
return item; |
|
|
|
}); |
|
|
|
return PageVo.of(records, total); |
|
|
|
return PageVo.of(records, page.getTotal()); |
|
|
|
} |
|
|
|
|
|
|
|
public void exportList(HttpServletResponse response, ProjectListReq param) { |
|
|
|