Commit 0042f22d authored by hezhuozhi's avatar hezhuozhi

优化代码

parent ec210524
...@@ -25,7 +25,7 @@ public interface HouseholdContractMapper extends BaseMapper<HouseholdContract> { ...@@ -25,7 +25,7 @@ public interface HouseholdContractMapper extends BaseMapper<HouseholdContract> {
String getHygfCommercialScale(String peasantHouseholdNumber); String getHygfCommercialScale(String peasantHouseholdNumber);
List<Map<String,String>> getHygfCommercialScaleList(@Param("list") List<String> peasantHouseholdNumberList); List<Map<String,Object>> getHygfCommercialScaleList(@Param("list") List<String> peasantHouseholdNumberList);
List<Map<String, Object>> getDzhtqyEndTime(); List<Map<String, Object>> getDzhtqyEndTime();
} }
...@@ -75,6 +75,7 @@ public interface PeasantHouseholdMapper extends BaseMapper<PeasantHousehold> { ...@@ -75,6 +75,7 @@ public interface PeasantHouseholdMapper extends BaseMapper<PeasantHousehold> {
* 获取所有电站详情 * 获取所有电站详情
* @return * @return
*/ */
@UserEmpower(field = {"hph.regional_companies_code"}, dealerField = {"hph.regional_companies_code"}, fieldConditions = {"in"}, relationship = "and")
List<PowerStationTimeStatisticsDto> getAllPowerStationTimeDetail(); List<PowerStationTimeStatisticsDto> getAllPowerStationTimeDetail();
List<PowerStationTimeStatisticsDto> getKcTime(@Param("list") List<Long> peasantHouseholdIdList); List<PowerStationTimeStatisticsDto> getKcTime(@Param("list") List<Long> peasantHouseholdIdList);
......
...@@ -16,7 +16,7 @@ import java.util.Map; ...@@ -16,7 +16,7 @@ import java.util.Map;
public interface PowerStationEngineeringInfoMapper extends BaseMapper<PowerStationEngineeringInfo> { public interface PowerStationEngineeringInfoMapper extends BaseMapper<PowerStationEngineeringInfo> {
String getRealScaleByPeasantHouseholdNo(String peasantHouseholdNumber); String getRealScaleByPeasantHouseholdNo(String peasantHouseholdNumber);
List<Map<String,String>> getRealScaleByPeasantHouseholdNoList(@Param("list") List<String> peasantHouseholdNumberList); List<Map<String,Object>> getRealScaleByPeasantHouseholdNoList(@Param("list") List<String> peasantHouseholdNumberList);
String getRealScaleByPeasantHouseholdNoIsHisotry(String peasantHouseholdNumber); String getRealScaleByPeasantHouseholdNoIsHisotry(String peasantHouseholdNumber);
} }
...@@ -257,13 +257,12 @@ on hygf_document_station.preparation_money_id=hygf_preparation_money.sequence_nb ...@@ -257,13 +257,12 @@ on hygf_document_station.preparation_money_id=hygf_preparation_money.sequence_nb
hpsei.real_scale, hpsei.real_scale,
substring_index ( hph.project_address_name, '/', 1 ) AS province, substring_index ( hph.project_address_name, '/', 1 ) AS province,
hph.regional_companies_name, hph.regional_companies_name,
sub.real_name AS serviceAgent hph.developer_name AS serviceAgent
FROM FROM
hygf_peasant_household hph hygf_peasant_household hph
LEFT JOIN hygf_commercial hc ON hc.survey_information_id = hph.survey_information_id LEFT JOIN hygf_commercial hc ON hc.survey_information_id = hph.survey_information_id
LEFT JOIN hygf_work_order_power_station hwops ON hph.sequence_nbr = hwops.peasant_household_id LEFT JOIN hygf_work_order_power_station hwops ON hph.sequence_nbr = hwops.peasant_household_id
LEFT JOIN hygf_power_station_engineering_info hpsei ON hwops.sequence_nbr = hpsei.work_order_power_station_id LEFT JOIN hygf_power_station_engineering_info hpsei ON hwops.sequence_nbr = hpsei.work_order_power_station_id
LEFT JOIN std_user_biz sub ON sub.amos_user_id =hph.developer_user_id
</select> </select>
<select id="getKcTime" <select id="getKcTime"
......
...@@ -145,18 +145,18 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS ...@@ -145,18 +145,18 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
} }
}); });
if(CollectionUtil.isNotEmpty(powerStationCodeList)){ if(CollectionUtil.isNotEmpty(powerStationCodeList)){
List<Map<String, String>> hygfCommercialScaleList = householdContractMapper.getHygfCommercialScaleList(powerStationCodeList); List<Map<String, Object>> hygfCommercialScaleList = householdContractMapper.getHygfCommercialScaleList(powerStationCodeList);
Map<String,String> scaleMap = new HashMap<>(); Map<String,String> scaleMap = new HashMap<>();
if(CollectionUtil.isNotEmpty(hygfCommercialScaleList)){ if(CollectionUtil.isNotEmpty(hygfCommercialScaleList)){
for (Map<String, String> stringStringMap : hygfCommercialScaleList) { for (Map<String, Object> stringStringMap : hygfCommercialScaleList) {
scaleMap.put(stringStringMap.get("peasant_household_no"),stringStringMap.get("scale")); scaleMap.put(String.valueOf(stringStringMap.get("peasant_household_no")),String.valueOf(stringStringMap.get("scale")));
} }
} }
List<Map<String, String>> realScaleByPeasantHouseholdNoList = powerStationEngineeringInfoMapper.getRealScaleByPeasantHouseholdNoList(powerStationCodeList); List<Map<String, Object>> realScaleByPeasantHouseholdNoList = powerStationEngineeringInfoMapper.getRealScaleByPeasantHouseholdNoList(powerStationCodeList);
Map<String,String> realScaleMap = new HashMap<>(); Map<String,String> realScaleMap = new HashMap<>();
if(CollectionUtil.isNotEmpty(realScaleByPeasantHouseholdNoList)){ if(CollectionUtil.isNotEmpty(realScaleByPeasantHouseholdNoList)){
for (Map<String, String> stringStringMap : realScaleByPeasantHouseholdNoList) { for (Map<String, Object> stringStringMap : realScaleByPeasantHouseholdNoList) {
realScaleMap.put(stringStringMap.get("peasant_household_no"),stringStringMap.get("real_scale")); realScaleMap.put(String.valueOf(stringStringMap.get("peasant_household_no")),String.valueOf(stringStringMap.get("realScale")));
} }
} }
records.forEach(e -> { records.forEach(e -> {
......
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