Commit a3cb6e46 authored by chenzhao's avatar chenzhao

Merge remote-tracking branch 'origin/developer_bw' into developer_bw

parents 8af8a45a bd4ec951
......@@ -61,7 +61,7 @@ public class PowerStationEngineeringInfoAllDto {
WorkOrder workOrder;
//并网信息
//验收信息
AcceptanceCheck acceptanceCheck;
//保存标识 0 保存 1保存并提交
......
......@@ -47,6 +47,9 @@ public class SurveyInfoAllDto {
//自审信息
ConstructionRecords constructionRecords;
//验收信息
AcceptanceCheck acceptanceCheck;
}
......@@ -133,7 +133,12 @@ public class SurveyInformationServiceImpl
private RedisLockUtil redisLockUtil;
@Autowired
WorkflowImpl workflow;
@Autowired
HygfRectificationOrderServiceImpl rectificationOrderService;
private static final String PROCESSKEY = "ProcessEngineering";
@Autowired
AcceptanceCheckMapper acceptanceCheckMapper;
/**
* 分页查询
*/
......@@ -629,9 +634,21 @@ public class SurveyInformationServiceImpl
up2.eq(PowerStationConstructionData::getWorkOrderPowerStationId, workOrderPowerStationId);
PowerStationConstructionData powerStationConstructionData = powerStationConstructionDataMapper
.selectOne(up2);
//增加整改单数据
List<HygfRectificationOrder> hygfRectificationOrders = rectificationOrderService.selectForListBySource(String.valueOf(peasantHousehold.getSequenceNbr()), PROCESSKEY);
if (CollectionUtil.isNotEmpty(hygfRectificationOrders)){
List<HygfRectificationOrder> areaOrders = hygfRectificationOrders.stream().filter(e -> e.getRectificationSource().equals("area")).collect(Collectors.toList());
List<HygfRectificationOrder> engineeringOrders = hygfRectificationOrders.stream().filter(e -> e.getRectificationSource().equals("engineering")).collect(Collectors.toList());
List<HygfRectificationOrder> designOrders = hygfRectificationOrders.stream().filter(e -> e.getRectificationSource().equals("design")).collect(Collectors.toList());
powerStationConstructionData.setAreaOrders(areaOrders.size()>0?areaOrders:null);
powerStationConstructionData.setEngineeringOrders(engineeringOrders.size()>0?engineeringOrders:null);
powerStationConstructionData.setDesignOrders(designOrders.size()>0?designOrders:null);
}
// 工程信息
LambdaQueryWrapper<PowerStationEngineeringInfo> up3 = new LambdaQueryWrapper();
up3.eq(PowerStationEngineeringInfo::getWorkOrderId, workOrderId);
up3.eq(PowerStationEngineeringInfo::getWorkOrderPowerStationId, workOrderPowerStationId);
......@@ -658,6 +675,18 @@ public class SurveyInformationServiceImpl
up4.eq(HygfOnGrid::getWorkOrderId, workOrderId);
up4.eq(HygfOnGrid::getWorkOrderPowerStationId, workOrderPowerStationId);
HygfOnGrid hygfOnGrid = hygfOnGridMapper.selectOne(up4);
//增加整改单数据
List<HygfRectificationOrder> hygfRectificationOrderList= rectificationOrderService.selectForListBySource(String.valueOf(peasantHousehold.getSequenceNbr()), RectificationOrderEnum.并网.getName());
if (CollectionUtil.isNotEmpty(hygfRectificationOrderList)){
List<HygfRectificationOrder> areaOrders = hygfRectificationOrderList.stream().filter(e -> e.getRectificationSource().equals("bw-area")).collect(Collectors.toList());
List<HygfRectificationOrder> engineeringOrders = hygfRectificationOrderList.stream().filter(e -> e.getRectificationSource().equals("bw-engineering")).collect(Collectors.toList());
List<HygfRectificationOrder> designOrders = hygfRectificationOrderList.stream().filter(e -> e.getRectificationSource().equals("bw-design")).collect(Collectors.toList());
hygfOnGrid.setAreaOrders(areaOrders.size()>0?areaOrders:null);
hygfOnGrid.setEngineeringOrders(engineeringOrders.size()>0?engineeringOrders:null);
hygfOnGrid.setDesignOrders(designOrders.size()>0?designOrders:null);
}
surveyInfoAllDto.setHygfOnGrid(hygfOnGrid != null ? hygfOnGrid : new HygfOnGrid());
surveyInfoAllDto
.setPowerStationConstructionData(powerStationConstructionData != null ? powerStationConstructionData
......@@ -666,12 +695,32 @@ public class SurveyInformationServiceImpl
.setPowerStationEngineeringInfo(powerStationEngineeringInfo != null ? powerStationEngineeringInfo
: new PowerStationEngineeringInfo());
surveyInfoAllDto.setWorkOrder(workOrder != null ? workOrder : new WorkOrder());
} else {
surveyInfoAllDto.setHygfOnGrid(new HygfOnGrid());
surveyInfoAllDto.setPowerStationConstructionData(new PowerStationConstructionData());
surveyInfoAllDto.setPowerStationEngineeringInfo(new PowerStationEngineeringInfo());
surveyInfoAllDto.setWorkOrder(new WorkOrder());
}
//验收信息
LambdaQueryWrapper<AcceptanceCheck> quv1 = new LambdaQueryWrapper();
quv1.eq(AcceptanceCheck::getPeasantHouseholdId, peasantHouseholdId);
AcceptanceCheck acceptanceCheck = acceptanceCheckMapper.selectOne(quv1);
//增加整改单数据
List<HygfRectificationOrder> hygfRectificationOrderListYs= rectificationOrderService.selectForListBySource(String.valueOf(peasantHousehold.getSequenceNbr()), RectificationOrderEnum.验收.getName());
if (CollectionUtil.isNotEmpty(hygfRectificationOrderListYs)){
List<HygfRectificationOrder> areaOrders = hygfRectificationOrderListYs.stream().filter(e -> e.getRectificationSource().equals("ys-area")).collect(Collectors.toList());
List<HygfRectificationOrder> financeOrders = hygfRectificationOrderListYs.stream().filter(e -> e.getRectificationSource().equals("ys-tourong")).collect(Collectors.toList());
List<HygfRectificationOrder> legalOrders = hygfRectificationOrderListYs.stream().filter(e -> e.getRectificationSource().equals("ys-fawu")).collect(Collectors.toList());
List<HygfRectificationOrder> propertyOrders = hygfRectificationOrderListYs.stream().filter(e -> e.getRectificationSource().equals("ys-zichan")).collect(Collectors.toList());
acceptanceCheck.setAreaOrders(areaOrders.size()>0?areaOrders:null);
acceptanceCheck.setFinanceOrders(financeOrders.size()>0?financeOrders:null);
acceptanceCheck.setLegalOrders(legalOrders.size()>0?legalOrders:null);
acceptanceCheck.setPropertyOrders(propertyOrders.size()>0?propertyOrders:null);
}
surveyInfoAllDto.setAcceptanceCheck(acceptanceCheck);
if (!StringUtils.isEmpty(processInstanceId)) {
try {
......@@ -705,6 +754,8 @@ public class SurveyInformationServiceImpl
e.printStackTrace();
}
}
return surveyInfoAllDto;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment