Commit 0042f22d authored by hezhuozhi's avatar hezhuozhi

优化代码

parent ec210524
......@@ -25,7 +25,7 @@ public interface HouseholdContractMapper extends BaseMapper<HouseholdContract> {
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();
}
......@@ -75,6 +75,7 @@ public interface PeasantHouseholdMapper extends BaseMapper<PeasantHousehold> {
* 获取所有电站详情
* @return
*/
@UserEmpower(field = {"hph.regional_companies_code"}, dealerField = {"hph.regional_companies_code"}, fieldConditions = {"in"}, relationship = "and")
List<PowerStationTimeStatisticsDto> getAllPowerStationTimeDetail();
List<PowerStationTimeStatisticsDto> getKcTime(@Param("list") List<Long> peasantHouseholdIdList);
......
......@@ -16,7 +16,7 @@ import java.util.Map;
public interface PowerStationEngineeringInfoMapper extends BaseMapper<PowerStationEngineeringInfo> {
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);
}
......@@ -257,13 +257,12 @@ on hygf_document_station.preparation_money_id=hygf_preparation_money.sequence_nb
hpsei.real_scale,
substring_index ( hph.project_address_name, '/', 1 ) AS province,
hph.regional_companies_name,
sub.real_name AS serviceAgent
hph.developer_name AS serviceAgent
FROM
hygf_peasant_household hph
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_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 id="getKcTime"
......
......@@ -145,18 +145,18 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
}
});
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<>();
if(CollectionUtil.isNotEmpty(hygfCommercialScaleList)){
for (Map<String, String> stringStringMap : hygfCommercialScaleList) {
scaleMap.put(stringStringMap.get("peasant_household_no"),stringStringMap.get("scale"));
for (Map<String, Object> stringStringMap : hygfCommercialScaleList) {
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<>();
if(CollectionUtil.isNotEmpty(realScaleByPeasantHouseholdNoList)){
for (Map<String, String> stringStringMap : realScaleByPeasantHouseholdNoList) {
realScaleMap.put(stringStringMap.get("peasant_household_no"),stringStringMap.get("real_scale"));
for (Map<String, Object> stringStringMap : realScaleByPeasantHouseholdNoList) {
realScaleMap.put(String.valueOf(stringStringMap.get("peasant_household_no")),String.valueOf(stringStringMap.get("realScale")));
}
}
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