|
@@ -18,6 +18,7 @@ import org.jeecg.modules.archives.entity.ProjectManageBusinessOther;
|
|
|
import org.jeecg.modules.archives.service.ProjectManageArchivesAndBusinessService;
|
|
|
import org.jeecg.modules.archives.service.ProjectManageArchivesService;
|
|
|
import org.jeecg.modules.archives.service.ProjectManageBusinessOtherService;
|
|
|
+import org.jeecg.modules.basedata.entity.BaseArchivesCollectionLine;
|
|
|
import org.jeecg.modules.basedata.service.IBaseArchivesCollectionLineService;
|
|
|
import org.jeecg.modules.invoice.entity.InvoiceManagePurchase;
|
|
|
import org.jeecg.modules.invoice.service.InvoiceManagePurchaseService;
|
|
@@ -38,6 +39,7 @@ import java.math.BigDecimal;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
+import java.util.UUID;
|
|
|
import java.util.stream.Collectors;
|
|
|
import java.util.stream.Stream;
|
|
|
|
|
@@ -115,7 +117,7 @@ public class ProReportServiceImpl implements ProReportService {
|
|
|
|
|
|
Map<String, List<ProjectManageArchivesAndBusiness>> businessMap = businesses.stream().collect(Collectors.groupingBy(t -> t.getPlanType()+"&"+t.getPlanId()));
|
|
|
|
|
|
- Map<String, String> CoLineMap = baseArchivesCollectionLineService.getDataMap();
|
|
|
+ Map<String, BaseArchivesCollectionLine> CoLineMap = baseArchivesCollectionLineService.getDataMap();
|
|
|
|
|
|
List<ProjectManageBusinessOther> otherList = projectManageBusinessOtherService.getAll(new ProjectManageBusinessOther(id));
|
|
|
|
|
@@ -173,7 +175,7 @@ public class ProReportServiceImpl implements ProReportService {
|
|
|
|
|
|
* @desc 配置收付款线条数据
|
|
|
*/
|
|
|
- private void setSecondChildren(List<ProjectManageArchivesAndBusiness> businesses, ProStatisticsRespDTO respDTO, Map<String, String> CoLineMap,
|
|
|
+ private void setSecondChildren(List<ProjectManageArchivesAndBusiness> businesses, ProStatisticsRespDTO respDTO, Map<String, BaseArchivesCollectionLine> CoLineMap,
|
|
|
List<ProjectManageBusinessOther> otherList, Map<String, List<ProjectManageArchivesAndBusiness>> businessMap, Map<String, List<ProWorkLogic>> logicMap,
|
|
|
Map<String, List<ProWorkMilestone>> milestoneMap, Map<String, List<PurchaseDataDTO>> purchaseDataMap, Map<String, List<SlipAllListDTO>> slipMap) {
|
|
|
List<ProStatisticsTwoRespDTO> list = Lists.newArrayList();
|
|
@@ -189,19 +191,12 @@ public class ProReportServiceImpl implements ProReportService {
|
|
|
if(business.getPlanType() == 3){
|
|
|
continue;
|
|
|
}
|
|
|
-
|
|
|
- if(i == 4){
|
|
|
- ProStatisticsTwoRespDTO twoRespDTO = new ProStatisticsTwoRespDTO(business, respDTO.getId());
|
|
|
-
|
|
|
- twoRespDTO.setChildren(null);
|
|
|
- twoRespDTO.setIsLeaf(true);
|
|
|
- list.add(twoRespDTO);
|
|
|
- continue;
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
+
|
|
|
ProStatisticsTwoRespDTO twoRespDTO = new ProStatisticsTwoRespDTO(business, respDTO.getId());
|
|
|
if(StringUtils.isNotBlank(business.getMileId1())){
|
|
|
- twoRespDTO.setCoArchivesCode(CoLineMap.get(business.getPlanId()));
|
|
|
+ twoRespDTO.setCoArchivesCode(CoLineMap.get(business.getPlanId()).getCode());
|
|
|
twoRespDTO.setMileId(business.getMileId1());
|
|
|
twoRespDTO.setMileName(business.getMilestone1());
|
|
|
List<ProjectManageArchivesAndBusiness> others = businessMap.get("3&"+business.getPlanId());
|
|
@@ -213,8 +208,9 @@ public class ProReportServiceImpl implements ProReportService {
|
|
|
setThreeChildren(twoRespDTO, otherList, i, logicMap, milestoneMap, purchaseDataMap, slipMap);
|
|
|
|
|
|
}
|
|
|
+
|
|
|
if(StringUtils.isNotBlank(business.getMileId2())){
|
|
|
- twoRespDTO.setCoArchivesCode(CoLineMap.get(business.getPlanId()));
|
|
|
+ twoRespDTO.setCoArchivesCode(CoLineMap.get(business.getPlanId()).getCode());
|
|
|
twoRespDTO.setMileId(business.getMileId2());
|
|
|
twoRespDTO.setMileName(business.getMilestone2());
|
|
|
List<ProjectManageArchivesAndBusiness> others = businessMap.get("3&"+business.getPlanId());
|
|
@@ -223,8 +219,9 @@ public class ProReportServiceImpl implements ProReportService {
|
|
|
}
|
|
|
setThreeChildren(twoRespDTO, otherList, i, logicMap, milestoneMap, purchaseDataMap, slipMap);
|
|
|
}
|
|
|
+
|
|
|
if(StringUtils.isNotBlank(business.getMileId3())){
|
|
|
- twoRespDTO.setCoArchivesCode(CoLineMap.get(business.getPlanId()));
|
|
|
+ twoRespDTO.setCoArchivesCode(CoLineMap.get(business.getPlanId()).getCode());
|
|
|
twoRespDTO.setMileId(business.getMileId3());
|
|
|
twoRespDTO.setMilePrice(business.getPrice3());
|
|
|
twoRespDTO.setMileName(business.getMilestone3());
|
|
@@ -234,8 +231,9 @@ public class ProReportServiceImpl implements ProReportService {
|
|
|
}
|
|
|
setThreeChildren(twoRespDTO, otherList, i, logicMap, milestoneMap, purchaseDataMap, slipMap);
|
|
|
}
|
|
|
+
|
|
|
if(StringUtils.isNotBlank(business.getMileId4())){
|
|
|
- twoRespDTO.setCoArchivesCode(CoLineMap.get(business.getPlanId()));
|
|
|
+ twoRespDTO.setCoArchivesCode(CoLineMap.get(business.getPlanId()).getCode());
|
|
|
twoRespDTO.setMileId(business.getMileId4());
|
|
|
twoRespDTO.setMileName(business.getMilestone4());
|
|
|
List<ProjectManageArchivesAndBusiness> others = businessMap.get("3&"+business.getPlanId());
|
|
@@ -244,8 +242,9 @@ public class ProReportServiceImpl implements ProReportService {
|
|
|
}
|
|
|
setThreeChildren(twoRespDTO, otherList, i, logicMap, milestoneMap, purchaseDataMap, slipMap);
|
|
|
}
|
|
|
+
|
|
|
if(StringUtils.isNotBlank(business.getMileId5())){
|
|
|
- twoRespDTO.setCoArchivesCode(CoLineMap.get(business.getPlanId()));
|
|
|
+ twoRespDTO.setCoArchivesCode(CoLineMap.get(business.getPlanId()).getCode());
|
|
|
twoRespDTO.setMileId(business.getMileId5());
|
|
|
twoRespDTO.setMilePrice(business.getPrice5());
|
|
|
twoRespDTO.setMileName(business.getMilestone5());
|
|
@@ -282,7 +281,7 @@ public class ProReportServiceImpl implements ProReportService {
|
|
|
Map<String, List<SlipAllListDTO>> slipMap) {
|
|
|
|
|
|
List<ProStatisticsThreeRespDTO> respDTOS = Lists.newArrayList();
|
|
|
-
|
|
|
+
|
|
|
i++;
|
|
|
for(ProjectManageBusinessOther other : otherList){
|
|
|
if(other.getPlanType() == i && other.getMuilesId().equals(twoRespDTO.getMileId())){
|
|
@@ -353,12 +352,68 @@ public class ProReportServiceImpl implements ProReportService {
|
|
|
respDTOS.add(threeRespDTO);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ if(i == 5){
|
|
|
+ ProjectManageBusinessOther other = new ProjectManageBusinessOther();
|
|
|
+ ProStatisticsThreeRespDTO threeRespDTO = new ProStatisticsThreeRespDTO(other, twoRespDTO);
|
|
|
+ threeRespDTO.setKey(UUID.randomUUID().toString());
|
|
|
+ threeRespDTO.setTitle(twoRespDTO.getMileName());
|
|
|
+ threeRespDTO.setMilesName(twoRespDTO.getMileName());
|
|
|
+
|
|
|
+
|
|
|
+ List<PurchaseDataDTO> purchaseDataDTOS = purchaseDataMap.get("2");
|
|
|
+ if(!CollectionUtils.isEmpty(purchaseDataDTOS)) {
|
|
|
+ for(PurchaseDataDTO purchaseDataDTO : purchaseDataDTOS) {
|
|
|
+ if(twoRespDTO.getCoArchivesName().equals(purchaseDataDTO.getCoArchivesName()) &&
|
|
|
+ threeRespDTO.getMilesName().equals(purchaseDataDTO.getProArchivesMilestone())) {
|
|
|
+ threeRespDTO.setMileInvoice(purchaseDataDTO.getCoPrice());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ List<PurchaseDataDTO> purchaseDataDTOS2 = purchaseDataMap.get("1");
|
|
|
+ if(!CollectionUtils.isEmpty(purchaseDataDTOS2)) {
|
|
|
+ for(PurchaseDataDTO purchaseDataDTO : purchaseDataDTOS2) {
|
|
|
+ if(twoRespDTO.getCoArchivesName().equals(purchaseDataDTO.getCoArchivesName()) &&
|
|
|
+ threeRespDTO.getMilesName().equals(purchaseDataDTO.getProArchivesMilestone())) {
|
|
|
+ threeRespDTO.setMileTicket(purchaseDataDTO.getCoPrice());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ List<SlipAllListDTO> slipAllListDTOS = slipMap.get("1");
|
|
|
+ if(!CollectionUtils.isEmpty(slipAllListDTOS)) {
|
|
|
+ for(SlipAllListDTO slipAllListDTO : slipAllListDTOS) {
|
|
|
+ if(slipAllListDTO.getCoArchivesName().equals(twoRespDTO.getCoArchivesName()) &&
|
|
|
+ slipAllListDTO.getProArchivesMilestone().equals(threeRespDTO.getMilesName())) {
|
|
|
+ threeRespDTO.setMileRealCollecion(slipAllListDTO.getCoPrvice());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ List<SlipAllListDTO> slipAllListDTOS2 = slipMap.get("2");
|
|
|
+ if(!CollectionUtils.isEmpty(slipAllListDTOS2)) {
|
|
|
+ for(SlipAllListDTO slipAllListDTO : slipAllListDTOS2) {
|
|
|
+ if(slipAllListDTO.getCoArchivesName().equals(twoRespDTO.getCoArchivesName()) &&
|
|
|
+ slipAllListDTO.getProArchivesMilestone().equals(threeRespDTO.getMilesName())) {
|
|
|
+ threeRespDTO.setMileRealPayment(slipAllListDTO.getCoPrvice());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ threeRespDTO.setIsLeaf(true);
|
|
|
+ threeRespDTO.setChilderen(null);
|
|
|
+ respDTOS.add(threeRespDTO);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
if(CollectionUtils.isEmpty(twoRespDTO.getChildren())){
|
|
|
twoRespDTO.setChildren(CollectionUtils.isEmpty(respDTOS)? null : respDTOS);
|
|
|
return;
|
|
|
}
|
|
|
- twoRespDTO.setChildren(CollectionUtils.isEmpty(respDTOS)? null : Stream.concat(respDTOS.stream(), twoRespDTO.getChildren().stream()).collect(Collectors.toList()));
|
|
|
+ twoRespDTO.setChildren(CollectionUtils.isEmpty(respDTOS)? null : Stream.concat(twoRespDTO.getChildren().stream(),
|
|
|
+ respDTOS.stream()).collect(Collectors.toList()));
|
|
|
}
|
|
|
|
|
|
|