diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionManage.java index f765210..ad63b24 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionManage.java @@ -19,12 +19,14 @@ import com.ningdatech.pmapi.common.util.ExcelExportStyle; import com.ningdatech.pmapi.projectdeclared.model.dto.ContractSaveDTO; import com.ningdatech.pmapi.projectdeclared.model.dto.DeclaredProjectExportDTO; import com.ningdatech.pmapi.projectdeclared.model.dto.PreInsSaveDTO; -import com.ningdatech.pmapi.projectdeclared.model.dto.PurchaseSaveDTO; import com.ningdatech.pmapi.projectdeclared.model.entity.Contract; import com.ningdatech.pmapi.projectdeclared.model.entity.PaymentPlan; import com.ningdatech.pmapi.projectdeclared.model.entity.PreInsAcceptancePerson; import com.ningdatech.pmapi.projectdeclared.model.entity.Purchase; -import com.ningdatech.pmapi.projectdeclared.model.vo.*; +import com.ningdatech.pmapi.projectdeclared.model.vo.ContractVO; +import com.ningdatech.pmapi.projectdeclared.model.vo.PaymentPlanVO; +import com.ningdatech.pmapi.projectdeclared.model.vo.PreInsAcceptancePersonVO; +import com.ningdatech.pmapi.projectdeclared.model.vo.PreInsVO; import com.ningdatech.pmapi.projectdeclared.service.IContractService; import com.ningdatech.pmapi.projectdeclared.service.IPaymentPlanService; import com.ningdatech.pmapi.projectdeclared.service.IPreInsAcceptancePersonService; @@ -47,7 +49,6 @@ import org.springframework.stereotype.Component; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.math.BigDecimal; -import java.time.LocalDate; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.Collections; @@ -349,15 +350,9 @@ public class ConstructionManage { query.orderByAsc(Project::getDeliveryTime); List records = projectService.list(query); - AtomicInteger serialNumber = new AtomicInteger(0); List collect = Lists.newArrayList(); if (CollUtil.isNotEmpty(records)) { - List projectIds = records.stream().map(Project::getId).collect(Collectors.toList()); - - List purchases = purchaseService.list(Wrappers.lambdaQuery(Purchase.class) - .in(Purchase::getProjectId, projectIds)); - Map purchaseMap = purchases.stream().collect(Collectors.toMap(Purchase::getProjectId, v -> v)); - + AtomicInteger serialNumber = new AtomicInteger(0); collect = records.stream().map(r -> { DeclaredProjectExportDTO exportDTO = new DeclaredProjectExportDTO(); BeanUtils.copyProperties(r, exportDTO); @@ -382,8 +377,6 @@ public class ConstructionManage { .registerWriteHandler(ExcelExportStyle.formalStyle()) .sheet(fileName) .doWrite(collect); - } catch (IOException e) { - throw new RuntimeException(e); } catch (Exception e) { throw new RuntimeException(e); }