Commit 89c37490 authored by wujiang's avatar wujiang

提交代码

parent d5614cf1
......@@ -44,7 +44,9 @@
WHEN hbga.grid_status = '7' THEN '片区运营待审核'
WHEN hbga.grid_status = '8' THEN '工程待审核'
WHEN hbga.grid_status = '9' THEN '整改待审核'
ELSE '待整改' END AS gridStatus
ELSE '待整改' END AS gridStatus,
hygf_commercial.scale,
hygf_power_station_engineering_info.real_scale as realScale
FROM
hygf_basic_grid_record hbga
LEFT JOIN hygf_peasant_household hph ON hph.sequence_nbr = hbga.peasant_household_id
......@@ -53,6 +55,9 @@
left join
(select work_order_power_station_id, MIN( operation_time ) as firstSubmitDate from hygf_construction_gird_records hcgr where operation_content = '提交并网资料' GROUP BY work_order_power_station_id)
newHcgr on newHcgr.work_order_power_station_id = hbga.work_order_power_station_id
LEFT JOIN hygf_commercial on hygf_commercial.survey_information_id =hph.survey_information_id
LEFT JOIN hygf_work_order_power_station on hygf_work_order_power_station.peasant_household_id =hph.sequence_nbr
LEFT JOIN hygf_power_station_engineering_info on hygf_power_station_engineering_info.work_order_power_station_id=hygf_work_order_power_station.sequence_nbr
<where>
hbga.is_delete = 0
<if test="map.routhPathId != null and map.routhPathId != ''">
......
......@@ -8,7 +8,7 @@
hph.sequence_nbr AS sequenceNbr,
hph.peasant_household_no peasantHouseholdNo,
hph.owners_name AS ownersName,
concat(hph.project_address_name,project_address_detail) AS projectAddress,
concat(hph.project_address_name,hph.project_address_detail) AS projectAddress,
hph.regional_companies_name AS regionalCompaniesName,
IFNULL( info.`status`, '待推送' ) AS status,
(select count( hfro.sequence_nbr ) from hygf_financing_rectification_order hfro where hfro.peasant_household_id = hph.sequence_nbr )orderNum,
......@@ -21,12 +21,18 @@
hph.developer_name developerName,
hph.is_history isHistory,
info.financing_companies_name financingCompaniesName,
hfi.tr_create_time trCreateTime
hfi.tr_create_time trCreateTime,
hygf_commercial.scale,
hygf_power_station_engineering_info.real_scale as realScale
FROM
`hygf_peasant_household` hph
LEFT JOIN hygf_financing_info info ON info.peasant_household_id = hph.sequence_nbr
LEFT JOIN hygf_unit_info on hph.developer_code = hygf_unit_info.amos_company_code
left join hygf_financing_info hfi on hfi.peasant_household_id = hph.sequence_nbr
LEFT JOIN hygf_commercial on hygf_commercial.survey_information_id =hph.survey_information_id
LEFT JOIN hygf_work_order_power_station on hygf_work_order_power_station.peasant_household_id =hph.sequence_nbr
LEFT JOIN hygf_power_station_engineering_info on hygf_power_station_engineering_info.work_order_power_station_id=hygf_work_order_power_station.sequence_nbr
<where>
hph.construction_state = '验收完成'
<if test="params.routhPathId != null and params.routhPathId != ''">
......
......@@ -98,14 +98,19 @@
and hygf_rectification_order.rectification_status = '已作废' and hygf_rectification_order.rectification_source = hygf_work_order_power_station.work_order_power_station_node and hygf_rectification_order.rectification_source in ('area','engineering','design')order by rec_date desc limit 1) as rollbackOrderId,
(select hygf_rectification_order.sequence_nbr from hygf_rectification_order
where hygf_rectification_order.peasant_househole_id = hygf_work_order_power_station.peasant_household_id
and hygf_rectification_order.rectification_status in ('待整改','待提交','整改中','整改待审核','待审核') and hygf_rectification_order.rectification_source in ('area','engineering','design') LIMIT 1) as rectificationNum
from hygf_work_order_power_station LEFT join hygf_work_order
on hygf_work_order.sequence_nbr=hygf_work_order_power_station.work_order_id
and hygf_rectification_order.rectification_status in ('待整改','待提交','整改中','整改待审核','待审核') and hygf_rectification_order.rectification_source in ('area','engineering','design') LIMIT 1) as rectificationNum,
hygf_commercial.scale,
hygf_power_station_engineering_info.real_scale as realScale
from hygf_work_order_power_station
LEFT join hygf_work_order on hygf_work_order.sequence_nbr=hygf_work_order_power_station.work_order_id
LEFT JOIN hygf_peasant_household on hygf_peasant_household.sequence_nbr=hygf_work_order_power_station.peasant_household_id
LEFT JOIN hygf_power_station_engineering_info on hygf_power_station_engineering_info.work_order_power_station_id=hygf_work_order_power_station.sequence_nbr
LEFT JOIN (
SELECT work_order_power_station_id, MIN( operation_time ) as firstConstructionDate FROM hygf_construction_records WHERE operation_content = '编辑施工资料' GROUP BY work_order_power_station_id
) newHcr ON newHcr.work_order_power_station_id = hygf_work_order_power_station.sequence_nbr
LEFT JOIN hygf_commercial on hygf_commercial.survey_information_id =hygf_peasant_household.survey_information_id
<where>
<if test="dto.routhPathId != null and dto.routhPathId != ''">
and hygf_work_order_power_station.sequence_nbr = #{dto.routhPathId}
......
......@@ -256,10 +256,10 @@ public class WorkOrderController extends BaseController {
else {
e.setIsAudit("1");
}
if(e.getPeasantHouseholdNo() != null) {
e.setScale(householdContractMapper.getHygfCommercialScale(e.getPeasantHouseholdNo()));
e.setRealScale(powerStationEngineeringInfoMapper.getRealScaleByPeasantHouseholdNo(e.getPeasantHouseholdNo()));
}
// if(e.getPeasantHouseholdNo() != null) {
// e.setScale(householdContractMapper.getHygfCommercialScale(e.getPeasantHouseholdNo()));
// e.setRealScale(powerStationEngineeringInfoMapper.getRealScaleByPeasantHouseholdNo(e.getPeasantHouseholdNo()));
// }
});
}
......
......@@ -125,15 +125,15 @@ public class BasicGridAcceptanceServiceImpl extends BaseService<BasicGridAccepta
pageNew.setTotal(page.getTotal());
pageNew.setSize(size);
if (page.getList() != null && page.getList().size() > 0) {
page.getList().forEach(e -> {
if (e.getPeasantHouseholdNo() != null) {
e.setScale(householdContractMapper.getHygfCommercialScale(e.getPeasantHouseholdNo()));
e.setRealScale(powerStationEngineeringInfoMapper
.getRealScaleByPeasantHouseholdNo(e.getPeasantHouseholdNo()));
}
});
}
// if (page.getList() != null && page.getList().size() > 0) {
// page.getList().forEach(e -> {
// if (e.getPeasantHouseholdNo() != null) {
// e.setScale(householdContractMapper.getHygfCommercialScale(e.getPeasantHouseholdNo()));
// e.setRealScale(powerStationEngineeringInfoMapper
// .getRealScaleByPeasantHouseholdNo(e.getPeasantHouseholdNo()));
// }
// });
// }
pageNew.setRecords(page.getList());
return pageNew;
......
......@@ -123,12 +123,12 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
PageHelper.startPage((int) page.getCurrent(), (int) page.getSize());
List<Map<String, Object>> list = financingInfoMapper.getStationFinancingInfoList(params, amosOrgCodes);
list.forEach(e -> {
e.put("scale", householdContractMapper.getHygfCommercialScale((String) e.get("peasantHouseholdNo")));
if (e.containsKey("isHistory") && e.get("isHistory").toString().equals("1")){
e.put("realScale", powerStationEngineeringInfoMapper.getRealScaleByPeasantHouseholdNoIsHisotry((String) e.get("peasantHouseholdNo")));
}else {
e.put("realScale", powerStationEngineeringInfoMapper.getRealScaleByPeasantHouseholdNo((String) e.get("peasantHouseholdNo")));
}
// e.put("scale", householdContractMapper.getHygfCommercialScale((String) e.get("peasantHouseholdNo")));
// if (e.containsKey("isHistory") && e.get("isHistory").toString().equals("1")){
// e.put("realScale", powerStationEngineeringInfoMapper.getRealScaleByPeasantHouseholdNoIsHisotry((String) e.get("peasantHouseholdNo")));
// }else {
// e.put("realScale", powerStationEngineeringInfoMapper.getRealScaleByPeasantHouseholdNo((String) e.get("peasantHouseholdNo")));
// }
e.put("regionName",e.get("projectAddress").toString().split("/")[0]);
e.put("trCreateTime", DateUtils.dateStringFormat(e.get("trCreateTime")));
if (null != e.get("instanceId") && e.get("instanceId").toString().contains(",")) {
......
......@@ -689,15 +689,15 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W
PageHelper.startPage(pageNum, pageSize);
List<WorkOrderPage> list = workOrderMapper.queryForwgpage(workOrder);
if(list != null && list.size() > 0) {
list.forEach(e -> {
if(e.getPeasantHouseholdNo() != null) {
e.setScale(householdContractMapper.getHygfCommercialScale(e.getPeasantHouseholdNo()));
e.setRealScale(powerStationEngineeringInfoMapper.getRealScaleByPeasantHouseholdNo(e.getPeasantHouseholdNo()));
}
});
}
// if(list != null && list.size() > 0) {
// list.forEach(e -> {
// if(e.getPeasantHouseholdNo() != null) {
// e.setScale(householdContractMapper.getHygfCommercialScale(e.getPeasantHouseholdNo()));
// e.setRealScale(powerStationEngineeringInfoMapper.getRealScaleByPeasantHouseholdNo(e.getPeasantHouseholdNo()));
// }
// });
//
// }
PageInfo<WorkOrderPage> page = new PageInfo(list);
......
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