|
|
@@ -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<Project> records = projectService.list(query); |
|
|
|
|
|
|
|
AtomicInteger serialNumber = new AtomicInteger(0); |
|
|
|
List<DeclaredProjectExportDTO> collect = Lists.newArrayList(); |
|
|
|
if (CollUtil.isNotEmpty(records)) { |
|
|
|
List<Long> projectIds = records.stream().map(Project::getId).collect(Collectors.toList()); |
|
|
|
|
|
|
|
List<Purchase> purchases = purchaseService.list(Wrappers.lambdaQuery(Purchase.class) |
|
|
|
.in(Purchase::getProjectId, projectIds)); |
|
|
|
Map<Long, Purchase> 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); |
|
|
|
} |
|
|
|