Commit 9f374ee9 authored by chenzhao's avatar chenzhao

统计首页开发

parent 594a5f87
......@@ -30,8 +30,6 @@ public interface StatisticsHomepageMapper {
public List<Map<String,Object>> inverterTotal(@RequestParam(value = "developerCode") String developerCode, @RequestParam(value = "regionalCompaniesCode")String regionalCompaniesCode, @RequestParam(value = "province")String province, @RequestParam(value = "city") String city, @RequestParam(value = "district")String district, @RequestParam(value = "regions")List<String> regions);
@UserEmpower(field ={"jp.regional_companies_code"},dealerField ={"hygf_peasant_household.developer_code"} ,fieldConditions ={"eq"} ,relationship="and")
public List<Map<String,Object>> inverterTotalJp(@RequestParam(value = "developerCode") String developerCode, @RequestParam(value = "regionalCompaniesCode")String regionalCompaniesCode, @RequestParam(value = "province")String province, @RequestParam(value = "city") String city, @RequestParam(value = "district")String district, @RequestParam(value = "regions")List<String> regions);
@UserEmpower(field ={"hygf_peasant_household.regional_companies_code"},dealerField ={"hygf_peasant_household.developer_code"} ,fieldConditions ={"eq"} ,relationship="and")
public Map<String,Object> stationNum(String developerCode, String regionalCompaniesCode, String province, String city, String district);
}
......@@ -354,4 +354,25 @@
</foreach>
</if>
</select>
<select id="stationNum" resultType="map">
SELECT count(*) as total FROM hygf_peasant_household WHERE is_delete = 0
<if test="developerCode != null and developerCode != ''">
AND hygf_peasant_household.developer_code = #{developerCode}
</if>
<if test="regionalCompaniesCode != null and regionalCompaniesCode != ''">
AND hygf_peasant_household.regional_companies_code = #{regionalCompaniesCode}
</if>
<if test="province != null and province != ''">
AND hygf_peasant_household.project_address LIKE CONCAT ('%',#{province},'%')
</if>
<if test="city != null and city != ''">
AND hygf_peasant_household.project_address LIKE CONCAT ('%',#{city},'%')
</if>
<if test="district != null and district != ''">
AND hygf_peasant_household.project_address LIKE CONCAT ('%',#{district},'%')
</if>
</select>
</mapper>
\ No newline at end of file
......@@ -2,7 +2,9 @@ package com.yeejoin.amos.boot.module.hygf.biz.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.map.MapBuilder;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.sun.org.apache.bcel.internal.generic.SWITCH;
import com.yeejoin.amos.boot.module.hygf.api.entity.PeasantHousehold;
import com.yeejoin.amos.boot.module.hygf.api.mapper.JpStationMapper;
import com.yeejoin.amos.boot.module.hygf.api.mapper.StatisticsHomepageMapper;
import org.apache.activemq.util.MapHelper;
......@@ -47,9 +49,7 @@ public class StatisticsHomepageServiceImpl {
List<Map<String, Object>> inverterJpMaps = statisticsHomepageMapper.inverterTotalJp(developerCode, regionalCompaniesCode, province, city, district,regionNodeByCode);
inverterMaps.addAll(inverterJpMaps);
this.resuleMapBuild(map,resultMap,inverterMaps,"inverter");
map.put("stationNum",statisticsHomepageMapper.stationNum(developerCode, regionalCompaniesCode, province, city, district).get("total"));
resultMap.put("above",map);
return resultMap;
}
......@@ -67,9 +67,13 @@ public class StatisticsHomepageServiceImpl {
long gridNum = 0;
long acceptanceNum = 0;
long financingNum = 0;
long stationNum =0;
double stationRealScale = 0.00;
double disbursementMoney = 0.00;
LambdaQueryWrapper<PeasantHousehold> wrapper = new LambdaQueryWrapper<>();
List<String> surveKeys = new ArrayList<>(Arrays.asList("未通过","未勘察","已完成(法务审核)","进行中(审核)"));
List<String> contractKeys = new ArrayList<>(Arrays.asList("双方已签署","农户已签署","未发起"));
List<String> workOrder = new ArrayList<>(Arrays.asList("派工发料","未通过","施工资料已上传","完工登记","完工自审","审核中","已完成"));
......@@ -94,8 +98,6 @@ public class StatisticsHomepageServiceImpl {
}
if (!e.equals("未勘察")){
sureyNum += new BigDecimal(surey.get(e).toString()).longValue();
} else {
stationNum += (long)surey.get(e);
}
}
list = this.nullDataBuildResult(list,surveKeys);
......@@ -103,7 +105,6 @@ public class StatisticsHomepageServiceImpl {
}
li.put("surveNum",sureyNum);
li.put("stationNum",sureyNum+stationNum);
resultMap.put("surey",list);
break;
......
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